commit stringlengths 40 40 | old_file stringlengths 4 236 | new_file stringlengths 4 236 | old_contents stringlengths 1 3.26k | new_contents stringlengths 16 4.43k | subject stringlengths 16 624 | message stringlengths 17 3.29k | lang stringclasses 5
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
997a25099704796203d9c0364c0046e82b028ea9 | index.js | index.js | 'use strict';
var gutil = require('gulp-util');
var through = require('through2');
var assign = require('object-assign');
var nunjucks = require('nunjucks');
module.exports = function (opts) {
return through.obj(function (file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()... | 'use strict';
var gutil = require('gulp-util');
var through = require('through2');
var assign = require('object-assign');
var nunjucks = require('nunjucks');
module.exports = function (opts) {
return through.obj(function (file, enc, cb) {
if (file.isNull()) {
cb(null, file);
return;
}
if (file.isStream()... | Fix wrong options variable assignment | Fix wrong options variable assignment
This caused the name options's function to ran only for the first file. | JavaScript | mit | sindresorhus/gulp-nunjucks |
3f7358297887dbff61704835a8cf782de9735846 | lib/utils/runGulp.js | lib/utils/runGulp.js | const path = require('path');
const execa = require('execa');
const errorHandler = require('./errorHandler');
module.exports = function runGulp() {
execa('gulp',
[
'--cwd', process.cwd(),
'--gulpfile', path.join(__dirname, '../gulpfile.js'),
],
{ stdio: 'inherit' },
)
.catch(err => erro... | const path = require('path');
const execa = require('execa');
const errorHandler = require('./errorHandler');
module.exports = function runGulp() {
execa('node',
[
path.join(__dirname, '../../node_modules/.bin/gulp'),
'--cwd', process.cwd(),
'--gulpfile', path.join(__dirname, '../gulpfile.js'),... | Use bundled gulp instead of global | Use bundled gulp instead of global
| JavaScript | mit | strt/bricks |
fcb2b86684d814825b3efc4d7b37484482e1a784 | index.js | index.js | 'use strict';
var bind = require('function-bind');
var define = require('define-properties');
var replace = bind.call(Function.call, String.prototype.replace);
var rightWhitespace = /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u20... | 'use strict';
var bind = require('function-bind');
var define = require('define-properties');
var replace = bind.call(Function.call, String.prototype.replace);
var rightWhitespace = /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u20... | Fix a bug in node 0.10 (and presumably other browsers) where the zero-width space is erroneously trimmed. | Fix a bug in node 0.10 (and presumably other browsers) where the zero-width space is erroneously trimmed.
| JavaScript | mit | es-shims/String.prototype.trimRight,ljharb/String.prototype.trimRight |
f4644972b893e61bece5f40ec9bbd76fbae61765 | index.js | index.js | /**
* @typedef {import('unist').Node} Node
* @typedef {import('unist').Parent} Parent
*/
import {modifyChildren} from 'unist-util-modify-children'
export const affixEmoticonModifier = modifyChildren(mergeAffixEmoticon)
/**
* Merge emoticons into an `EmoticonNode`.
*
* @param {Node} child
* @param {number} ind... | /**
* @typedef {import('unist').Node} Node
* @typedef {import('unist').Parent} Parent
*/
import {modifyChildren} from 'unist-util-modify-children'
export const affixEmoticonModifier = modifyChildren(mergeAffixEmoticon)
/**
* Merge emoticons into an `EmoticonNode`.
*
* @param {Node} node
* @param {number} inde... | Fix tests for changes in `@types/unist` | Fix tests for changes in `@types/unist`
| JavaScript | mit | wooorm/nlcst-affix-emoticon-modifier |
9a93e67a36a9618c6f4511d267bf361ea104a07b | js/components/Incident.js | js/components/Incident.js | import React, { PropTypes } from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import styles from './Incident.css';
import Map from './Map';
import GridTile from 'material-ui/lib/grid-list/grid-tile';
const Incident = ({ incident }) => (
<ReactCSSTransitionGroup
transitionName... | import React, { PropTypes } from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import styles from './Incident.css';
import Map from './Map';
import GridTile from 'material-ui/lib/grid-list/grid-tile';
import Paper from 'material-ui/lib/paper';
const Incident = ({ incident }) => (
... | Add paper for neat effect on incidents | Add paper for neat effect on incidents
| JavaScript | mit | nickbabcock/udps,nickbabcock/udps,nickbabcock/udps |
cc260e279f5055058471ad101266dd46199b9ae1 | public/dist/js/voter-ballot.js | public/dist/js/voter-ballot.js | $(document).ready(function() {
$('#ballot_response').submit(function(event) {
confirm("Are you sure you want to submit your ballot?");
var sortableList = $("#candidates");
var listElements = sortableList.children();
var listValues = [];
for (var i = 0; i < listElemen... | $(document).ready(function() {
$('#ballot_response').submit(function(event) {
if(confirm("Are you sure you want to submit your ballot?")) {
var sortableList = $("#candidates");
var listElements = sortableList.children();
var listValues = [];
for (var i = 0; i ... | Update confirm to be if | Update confirm to be if | JavaScript | agpl-3.0 | WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus,WireShoutLLC/votehaus |
47c554a5ffa52d7c2a24ab3143a977edc99e1c8e | main/announcement.js | main/announcement.js | module.exports = {
init
}
var electron = require('electron')
var get = require('simple-get')
var config = require('../config')
var log = require('./log')
var ANNOUNCEMENT_URL = config.ANNOUNCEMENT_URL +
'?version=' + config.APP_VERSION +
'&platform=' + process.platform
function init () {
get.concat(ANNOUNCE... | module.exports = {
init
}
var electron = require('electron')
var get = require('simple-get')
var config = require('../config')
var log = require('./log')
var ANNOUNCEMENT_URL = config.ANNOUNCEMENT_URL +
'?version=' + config.APP_VERSION +
'&platform=' + process.platform
function init () {
get.concat(ANNOUNCE... | Support custom window title, main message, details | Announcement: Support custom window title, main message, details
| JavaScript | mit | webtorrent/webtorrent-desktop,feross/webtorrent-desktop,feross/webtorrent-app,yciabaud/webtorrent-desktop,yciabaud/webtorrent-desktop,yciabaud/webtorrent-desktop,feross/webtorrent-desktop,feross/webtorrent-app,webtorrent/webtorrent-desktop,michaelgeorgeattard/webtorrent-desktop,feross/webtorrent-desktop,webtorrent/webt... |
7e962bb5df10f4740c37501360a8437b952853f7 | client/js/main.js | client/js/main.js | //make sure all dependencies are loaded
require([
'es5shim',
'angular',
'json!data/config.json',
'angular-ui-router',
'angular-flash',
'angular-moment',
'angular-sanitize',
'emoji',
'socketio',
'socket',
'jquery',
'jquery-filedrop',
'app',
'services/services',
'controllers/controller... | //make sure all dependencies are loaded
require([
'es5shim',
'angular',
'json!data/config.json',
'angular-ui-router',
'angular-flash',
'angular-moment',
'angular-sanitize',
'emoji',
'socketio',
'socket',
'jquery',
'jquery-filedrop',
'app',
'services/services',
'controllers/controller... | Check for active session before bootstrapping | Check for active session before bootstrapping
| JavaScript | mit | rserve/arrangr,rserve/arrangr |
363716de3e6996605d2457d1ac8d6b5fa09ad994 | lib/PropertyValue.js | lib/PropertyValue.js | const ParserCommon = require('./ParserCommon');
function PropertyValue(xml) {
this.Annotations = {};
this.validElements = {
};
this.validAttributes = {
'Bool': {bool: true},
'String': {},
'Path': {},
'Property': {alreadyHandeled: true}
};
var init = ParserCommon.initEntity.b... | const ParserCommon = require('./ParserCommon');
function PropertyValue(xml) {
this.Annotations = {};
this.validElements = {
};
this.validAttributes = {
'Bool': {bool: true},
'String': {},
'Path': {},
'Property': {alreadyHandeled: true},
'EnumMember': {}
};
var init = Pa... | Add EnumMember as a valid expression | Add EnumMember as a valid expression
| JavaScript | apache-2.0 | pboyd04/CSDLParser |
299db6b86cdc1434c9ab4ce181a7c58affb36afd | lib/decryptStream.js | lib/decryptStream.js | var crypto = require('crypto'),
util = require('util'),
Transform = require('stream').Transform;
function DecryptStream(options) {
if (!(this instanceof DecryptStream))
return new DecryptStream(options);
Transform.call(this, options);
this.key = options.key;
this._decipher = crypto.createDecipheri... | var crypto = require('crypto'),
util = require('util'),
Transform = require('stream').Transform;
function DecryptStream(options) {
if (!(this instanceof DecryptStream))
return new DecryptStream(options);
Transform.call(this, options);
this.key = options.key;
this._decipher = crypto.createDecipheri... | Call final() on stream flush. | Call final() on stream flush.
| JavaScript | mit | oliviert/node-snapchat |
5b50d1999c4dc41f7b47b47df24461fd7e098396 | agent.js | agent.js | /**
* Helper module used to alias browser names parsed out of the 'useragent'
* module to the equivalent names used in the config.json for each polyfill.
* Should always be lowercase values as it makes comparisons easier.
*/
var agentlist = {
"chromium": "chrome",
"mobile safari": "safari ios"
};
/**
* Return... | /**
* Helper module used to alias browser names parsed out of the 'useragent'
* module to the equivalent names used in the config.json for each polyfill.
* Should always be lowercase values as it makes comparisons easier.
*/
var agentlist = {
"chromium": "chrome",
"mobile safari": "safari ios",
"firefox beta": ... | Add fx beta and mobile safari | Add fx beta and mobile safari
| JavaScript | mit | kdzwinel/polyfill-service,jonathan-fielding/polyfill-service,mcshaz/polyfill-service,JakeChampion/polyfill-service,mcshaz/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,jonathan-fielding/polyfill-service,JakeChampion/polyfill-service,mcshaz/polyfill-service,kdzwinel/polyfill-service |
8f98c3375a4f0d3172ad1b7f34112ebe7cb5280e | src/firefox/lib/url-handler.js | src/firefox/lib/url-handler.js | var { Cc, Ci, Cr } = require('chrome');
exports.setup = function(panel) {
var observer = {
observe: function (subject, topic, data) {
if ('http-on-modify-request' !== topic) {
return;
}
subject.QueryInterface(Ci.nsIHttpChannel);
var url = subject.URI.spec
if (!/https:\/\/w... | var { Cc, Ci, Cr } = require('chrome');
exports.setup = function(panel) {
var observer = {
observe: function (subject, topic, data) {
if ('http-on-modify-request' !== topic) {
return;
}
subject.QueryInterface(Ci.nsIHttpChannel);
var url = subject.URI.spec
if (!/https:\/\/w... | Fix a small mistake in how opening the uProxy panel is done in Firefox | Fix a small mistake in how opening the uProxy panel is done in Firefox
| JavaScript | apache-2.0 | jpevarnek/uproxy,roceys/uproxy,roceys/uproxy,IveWong/uproxy,chinarustin/uproxy,itplanes/uproxy,chinarustin/uproxy,MinFu/uproxy,roceys/uproxy,itplanes/uproxy,qida/uproxy,MinFu/uproxy,itplanes/uproxy,dhkong88/uproxy,MinFu/uproxy,qida/uproxy,itplanes/uproxy,MinFu/uproxy,IveWong/uproxy,chinarustin/uproxy,qida/uproxy,qida/u... |
33e91cd319b71c6960a663a1462aee291825f753 | src/js/markovWordsetBuilder.js | src/js/markovWordsetBuilder.js | 'use strict';
var markovWordsetBuilder = (function() {
var max_words = 80000;
function stripChars(word) {
return word.replace(/[^A-Za-z0-9\s\.\!\?\'\,\—\-]/gi, '');
}
function addWords(words, delimiter) {
var wordSet = [];
var aw = words.split(delimiter);
var len = aw.length;
if (len > max_words) len... | 'use strict';
var markovWordsetBuilder = (function() {
var max_words = 80000;
function transformWord(word) {
word = word.replace("Mr.", "Mr");
word = word.replace("Mrs.", "Mrs");
return word.replace(/[^A-Za-z0-9\s\.\!\?\'\,\—\-]/gi, '');
}
function addWords(words, delimiter) {
var wordSet = [];
var a... | Rename stripChars() to transformWord(), and add some transforms to it (drop period from "Mr." and "Mrs.") | Rename stripChars() to transformWord(), and add some transforms to it (drop period from "Mr." and "Mrs.")
| JavaScript | bsd-3-clause | petejscott/jsMarkov |
cdfe747966fed67ea9ad59ff8ad036984d986839 | util/load-config.js | util/load-config.js | "use strict";
var fs = require("fs");
var yaml = require("js-yaml");
module.exports = function loadConfig () {
var config = yaml.safeLoad(fs.readFileSync(".titorrc", "utf8"));
if (typeof config !== "object") throw Error("Invalid .titorrc");
if (typeof config.export !== "string")
throw Error("Invalid or mi... | "use strict";
var sh = require("shelljs");
sh.set("-e");
var yaml = require("js-yaml");
module.exports = function loadConfig () {
var config = yaml.safeLoad(sh.cat(".titorrc"));
if (typeof config !== "object") throw Error("Invalid .titorrc");
if (typeof config.export !== "string")
throw Error("Invalid o... | Use shelljs instead of fs for consistency | Use shelljs instead of fs for consistency
| JavaScript | mit | meeber/titor,meeber/titor |
08f877cb5d0434e6d2ef605dceb7e7c53d0015a4 | server/build/loaders/polyfill-loader.js | server/build/loaders/polyfill-loader.js | import { getOptions, stringifyRequest } from 'loader-utils'
module.exports = function (content, sourceMap) {
this.cacheable()
const options = getOptions(this)
const { buildId, modules } = options
this.callback(null, `
// Webpack Polyfill Injector
function main() {${modules.map(module => `\n require(${st... | import { getOptions, stringifyRequest } from 'loader-utils'
module.exports = function (content, sourceMap) {
this.cacheable()
const options = getOptions(this)
const { buildId, modules } = options
this.callback(null, `
// Webpack Polyfill Injector
function main() {${modules.map(module => `\n require(${st... | Use next public path for polyfill loader | Use next public path for polyfill loader | JavaScript | mit | kpdecker/next.js |
419cc5591ecd9f10e8036b99cef314ee879c2395 | test/util/atomHelper.js | test/util/atomHelper.js | if (typeof global.atom === 'undefined') {
global.atom = {
notifications: {
addError: function (desc, obj) {
return new Promise(function (resolve, reject) {
console.log('wtf', obj)
reject(obj.error)
})
}
}
}
}
| if (typeof global.atom === 'undefined') {
global.atom = {
notifications: {
addError: function (desc, obj) {
return new Promise(function (resolve, reject) {
reject(obj.error)
})
}
}
}
}
| Stop logging error notifications in tests | Stop logging error notifications in tests
At least with Node.js v6 these unhandled rejections get reported to the console already.
| JavaScript | isc | gustavnikolaj/linter-js-standard-engine |
180173646ed757adf89a0fd4753cd9366cae481e | lib/persistent_session.js | lib/persistent_session.js | Session.old_set = Session.set;
Session.set = function _psSet(key, value, persist) {
if (persist === undefined) {
persist = true;
}
Session.old_set(key, value);
if (persist) {
if (value === undefined) {
value = null; // we can't pass (key, undefined) to amplify.store() to unset a value
}
am... | Session.old_set = Session.set;
Session.set = function _psSet(key, value, persist) {
if (persist === undefined) {
persist = true;
}
Session.old_set(key, value);
if (persist) {
if (value === undefined) {
value = null; // we can't pass (key, undefined) to amplify.store() to unset a value
}
am... | Add comment about unused get call | Add comment about unused get call
| JavaScript | mit | ryepdx/meteor-persistent-session,okgrow/meteor-persistent-session |
f59ee0289334a31336aadfae02cb28ebfc0ebbc8 | server/services/CardService.js | server/services/CardService.js | const _ = require('underscore');
const logger = require('../log.js');
class CardService {
constructor(db) {
this.cards = db.get('cards');
this.packs = db.get('packs');
}
replaceCards(cards) {
return this.cards.remove({})
.then(() => this.cards.insert(cards));
}
... | const _ = require('underscore');
const logger = require('../log.js');
class CardService {
constructor(db) {
this.cards = db.get('cards');
this.packs = db.get('packs');
}
replaceCards(cards) {
return this.cards.remove({})
.then(() => this.cards.insert(cards));
}
... | Fix role restriction validation bug | Fix role restriction validation bug
| JavaScript | mit | jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki |
df01fedc57674fb198c3a80889fabe546178a627 | signup/static/invite-dialog.js | signup/static/invite-dialog.js | if (!document.createElement('dialog').showModal) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'static/dialog-polyfill.css';
var script = document.createElement('script');
script.src = 'static/dialog-polyfill.js';
var head = document.getElementsByTagName('head')[0];
hea... | window.addEventListener("load", function() {
if (!document.createElement('dialog').showModal) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'static/dialog-polyfill.css';
var script = document.createElement('script');
script.src = 'static/dialog-polyfill.js';
... | Fix JS error in invite dialog button | Fix JS error in invite dialog button
| JavaScript | apache-2.0 | notriddle/aelita,notriddle/aelita,notriddle/aelita,notriddle/aelita,notriddle/aelita |
5e73ba5ca42329defbf277327cb21f2f1830c7ba | assets/js/review.js | assets/js/review.js | ( function( $ ) {
'use strict';
$( function() {
var body = $( 'body' ),
writeReview = $( '.write-a-review' );
// If review link exists.
if ( writeReview.length ) {
// On click trigger review window.
writeReview.on( 'click', function( e ) {
// Prevent default browser action.
e.preve... | ( function( $ ) {
'use strict';
$( function() {
var body = $( 'body' ),
writeReview = $( '.write-a-review' ),
singleReview = $( '.single-re-google-reviews' );
// If review link exists.
if ( writeReview.length ) {
// On click trigger review window.
writeReview.on( 'click', function( e )... | Update JS to prepend html from CPT to body. | Update JS to prepend html from CPT to body.
| JavaScript | mit | xBLADEx/re-google-review,xBLADEx/re-google-review |
d55b8a04a1618e570c0bc3f3f266a2c1a96f860a | static/scripts/teamOverview.js | static/scripts/teamOverview.js | $(document).ready(() => {
console.log('event bla');
$('.section-teamInvitations a').click(function handler(e) {
e.stopPropagation();
e.preventDefault();
const id = $(this).parents('.sc-card-wrapper').data('id');
console.log(id, $(this).parents('.sc-card-wrapper'));
$.ajax({
url: `/teams/invitation/acce... | $(document).ready(() => {
$('.section-teamInvitations a').click(function handler(e) {
e.stopPropagation();
e.preventDefault();
const id = $(this).parents('.sc-card-wrapper').data('id');
$.ajax({
url: `/teams/invitation/accept/${id}`,
method: 'GET',
}).done(() => {
$.showNotification('Einladung erf... | Implement click handler for team card | Implement click handler for team card
| JavaScript | agpl-3.0 | schul-cloud/schulcloud-client,schul-cloud/schulcloud-client,schul-cloud/schulcloud-client |
1333b6206866a2e1a8f3c4ce038f97f046105701 | app/actions/index.js | app/actions/index.js | 'use strict';
export const TOGGLE_EVENT_MODAL = 'TOGGLE_EVENT_MODAL';
export const toggleEventModal = () => ({
type: TOGGLE_EVENT_MODAL
});
| 'use strict';
export const LOG_EVENT_MODAL_DATA = 'LOG_EVENT_MODAL_DATA';
export const TOGGLE_EVENT_MODAL = 'TOGGLE_EVENT_MODAL';
export const logEventModalData = (payload) => ({
type: LOG_EVENT_MODAL_DATA,
payload
});
export const toggleEventModal = () => ({
type: TOGGLE_EVENT_MODAL
});
| Include Redux action for managing Modal's data | feat: Include Redux action for managing Modal's data
| JavaScript | mit | IsenrichO/react-timeline,IsenrichO/react-timeline |
1b8bbca8489cea7a697ccfac935604fb3c41f36b | build.js | build.js | ({
baseUrl: 'src',
name: '../node_modules/almond/almond',
include: ['quick-switcher'],
out: 'dist/quick-switcher.min.js',
wrap: {
startFile: '.almond/start.frag',
endFile: '.almond/end.frag',
},
paths: {
'text': '../node_modules/requirejs-text/text',
},
});
| ({
baseUrl: 'src',
name: '../node_modules/almond/almond',
include: ['quick-switcher'],
out: 'dist/quick-switcher.min.js',
wrap: {
startFile: '.almond/start.frag',
endFile: '.almond/end.frag',
},
paths: {
'text': '../node_modules/text/text',
},
});
| Fix path to requirejs-text plugin | Fix path to requirejs-text plugin
| JavaScript | mit | lightster/quick-switcher,lightster/quick-switcher,lightster/quick-switcher |
60ee494ac85e0d3d15462b04ce27f3f6f7de2a5b | lib/ui/src/containers/preview.js | lib/ui/src/containers/preview.js | import React from 'react';
import { Preview } from '@storybook/components';
import memoize from 'memoizerific';
import { Consumer } from '../core/context';
const createPreviewActions = memoize(1)(api => ({
toggleFullscreen: () => api.toggleFullscreen(),
}));
const createProps = (api, layout, location, path, storyId... | import React from 'react';
import { Preview } from '@storybook/components';
import memoize from 'memoizerific';
import { Consumer } from '../core/context';
const createPreviewActions = memoize(1)(api => ({
toggleFullscreen: () => api.toggleFullscreen(),
}));
const createProps = (api, layout, location, path, storyId... | FIX failure to pass location | FIX failure to pass location
| JavaScript | mit | kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook |
93b2510b8f6125eeaf9dbb5aa6e10cc5696c228c | webpack.build.config.js | webpack.build.config.js | const commonConfig = require("./webpack.common.config");
const nodeExternals = require("webpack-node-externals");
const merge = (...objs) => require("deepmerge").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });
const combinedConfig = merge({}, commonConfig, {
output: {
path: "./dist",
libraryTarget: "... | const path = require("path");
const commonConfig = require("./webpack.common.config");
const nodeExternals = require("webpack-node-externals");
const merge = (...objs) => require("deepmerge").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });
const combinedConfig = merge({}, commonConfig, {
output: {
path... | Fix absolute path requirement for output.path since webpack 2.3.0 | Fix absolute path requirement for output.path since webpack 2.3.0
| JavaScript | mit | aeinbu/webpack-application-template,aeinbu/webpack-application-template |
612a0782d71884c1f43e53083d2e02d3212a88ca | config/ember-try.js | config/ember-try.js | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.10',
dependencies: {
ember: '~1.10.0'
}
},
{
name: 'ember-1.11',
dependencies: {
ember: '~1.11.0'
}
},
{
name: 'ember-1.12',
... | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.10',
dependencies: {
ember: '~1.10.0'
}
},
{
name: 'ember-1.11',
dependencies: {
ember: '~1.11.0'
}
},
{
name: 'ember-1.12',
... | Test against ember 2.0.x and 2.1.x in CI | Test against ember 2.0.x and 2.1.x in CI
| JavaScript | mit | mike-north/ember-load,mike-north/ember-load,mike-north/ember-load |
4ac00c206641644670113cee3dff506bd9b5ece6 | bufferjs/indexOf.js | bufferjs/indexOf.js | /*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/
(function () {
"use strict";
/**
* A naiive 'Buffer.indexOf' function. Requires both the
* needle and haystack to be Buffer instances.
*/
function indexOf(haystack, needle, i) {
if (... | /*jshint strict:true node:true es5:true onevar:true laxcomma:true laxbreak:true eqeqeq:true immed:true latedef:true*/
(function () {
"use strict";
/**
* A naiive 'Buffer.indexOf' function. Requires both the
* needle and haystack to be Buffer instances.
*/
function indexOf(haystack, needle, i) {
if (... | Use array index instead of Buffer.get | Use array index instead of Buffer.get
Buffer.get was depracted in 2013 [1] and removed entirely in
Node 6 [2].
Closes #13.
[1] https://github.com/nodejs/node/issues/4587
[2] https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6#buffer
| JavaScript | mit | coolaj86/node-bufferjs |
1782ff515a8d4ddd1fcad495cadb9ce27eba361f | test/resources/BadConfigSuite/config.js | test/resources/BadConfigSuite/config.js | module.exports = {
build: function(promise, promiseTrigger) {
setTimeout(function() {
promise.reject(new Error('boom'));
}, 0);
return promise.promise;
}
}
| module.exports = {
build: function(promise) {
setTimeout(function() {
promise.reject(new Error('boom'));
}, 0);
return promise.promise;
}
}
| Remove obsolete promise trigger in test | Remove obsolete promise trigger in test
| JavaScript | agpl-3.0 | MattiSG/Watai,MattiSG/Watai |
3ef6ecdaaf556dd67d82275883e0c9cd344e9fa8 | connectors/v2/odnoklassniki.js | connectors/v2/odnoklassniki.js | 'use strict';
/* global Connector */
Connector.playerSelector = 'body';
Connector.artistSelector = '.mus_player_artist';
Connector.trackSelector = '.mus_player_song';
Connector.isPlaying = function () {
return $('#topPanelMusicPlayerControl').hasClass('toolbar_music-play__active');
};
| 'use strict';
/* global Connector */
var INFO_CURRENT_TIME = 1;
var INFO_DURATION = 2;
Connector.playerSelector = 'body';
Connector.artistSelector = '.mus_player_artist';
Connector.trackSelector = '.mus_player_song';
Connector.getCurrentTime = function() {
return getTimeInfo(INFO_CURRENT_TIME);
};
Connector.get... | Add current time/duration processing to Odnoklassniki connector | Add current time/duration processing to Odnoklassniki connector
| JavaScript | mit | galeksandrp/web-scrobbler,alexesprit/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,david-sabata/web-scrobbler,galeksandrp/web-scrobbler,alexesprit/web-scrobbler,Paszt/web-scrobbler,inverse/web-scrobbler,usdivad/web-scrobbler,carpet-berlin/web-scrobbler,ex47/web-s... |
70e12c9f72267b70cf19d39913431a3a1315ec3d | app/Config.js | app/Config.js | 'use strict';
module.exports = Config;
Config.$inject = ['$stateProvider', '$urlRouterProvider', '$anchorScrollProvider'];
function Config($stateProvider, $urlRouterProvider, $anchorScrollProvider) {
$anchorScrollProvider.disableAutoScrolling();
$urlRouterProvider.otherwise('/dashboard/profile');
$stateProv... | 'use strict';
module.exports = Config;
Config.$inject = ['$stateProvider', '$urlRouterProvider', '$uiViewScrollProvider'];
function Config($stateProvider, $urlRouterProvider, $uiViewScrollProvider) {
$uiViewScrollProvider.useAnchorScroll();
$urlRouterProvider.otherwise('/dashboard/profile');
$stateProvider
... | Fix the dumb scrolling issue | Fix the dumb scrolling issue
| JavaScript | mit | failpunk/angular-playground,failpunk/angular-playground |
a3403a51a21ceade309af191278215c4c5244e69 | app/components/gravatar-image.js | app/components/gravatar-image.js | import Ember from 'ember';
export default Ember.Component.extend({
size: 250,
email: '',
alt: '',
imgClass: '',
gravatarUrl: function() {
var email = this.get('email'),
size = this.get('size');
return '//www.gravatar.com/avatar/' + md5(email) + '?s=' + size;
}.property('email', 'size'),
... | import Ember from 'ember';
export default Ember.Component.extend({
size: 250,
email: '',
alt: '',
imgClass: '',
default: '',
gravatarUrl: function() {
var email = this.get('email'),
size = this.get('size'),
def = this.get('default');
return '//www.gravatar.com/avatar/' + md5(email... | Add property for default images. | Add property for default images.
| JavaScript | mit | johnotander/ember-cli-gravatar,johnotander/ember-cli-gravatar,nightsh/ember-cli-libravatar,nightsh/ember-cli-libravatar |
47c887ad3090b772440c049d63e9d867d03ea61e | bin/global.js | bin/global.js | #!/usr/bin/env node --harmony-async-await
const kamerbotchi = require('../index.js')
console.log('KamerBOTchi v'+require('../package.json').version)
console.log('Developed with <3 by Sander Laarhoven')
console.log('https://git.io/kamergotchi')
console.log('\nPlayer token is set to ' + process.argv[2])
kamerbotchi.set... | #!/bin/sh
":" //# http://sambal.org/?p=1014 ; exec /usr/bin/env node --harmony-async-await "$0" "$@"
const kamerbotchi = require('../index.js')
console.log('KamerBOTchi v'+require('../package.json').version)
console.log('Developed with <3 by Sander Laarhoven')
console.log('https://git.io/kamergotchi')
console.log('\n... | Fix shebang arguments for Ubuntu users. | Fix shebang arguments for Ubuntu users.
http://sambal.org/2014/02/passing-options-node-shebang-line/
| JavaScript | mit | lesander/kamergotchi-bot,lesander/kamergotchi-bot |
2ea983793b5bb734954fa091be6a4579c4768203 | src/content_scripts/view/story_listener.js | src/content_scripts/view/story_listener.js | import $ from 'jquery'
import AnalyticsWrapper from "../utilities/analytics_wrapper";
export default (modal) => {
$(document).on('click', '.finish.button', function () {
chrome.runtime.sendMessage({ eventType: 'pop' });
modal.modal('show');
});
};
| import $ from 'jquery'
export default (modal) => {
$(document).on('click', '.finish.button', function () {
chrome.runtime.sendMessage({ eventType: 'pop' });
modal.modal('show');
});
};
| Revert "Missing import for AnalyticsWrapper" | Revert "Missing import for AnalyticsWrapper"
We stopped using AnalyticsWrapper and now send messages to the background instead
This reverts commit 0f6cd479b089319275d3f08e79c8e9ecbf96eb5e.
| JavaScript | isc | oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker |
141ac976ff38506cd68db5402d0a96fe0899abab | libs/cmd.js | libs/cmd.js | 'use strict';
const fs = require('fs');
var importCmd = () => {
let files = fs.readdirSync(__dirname+'/../cmds/');
let cmds = {};
for(var i in files) {
let ext = require(__dirname+'/../cmds/'+files[i]).cmds;
for(var index in ext) {
cmds[index] = ext[index];
}
}
return cmds;
};
module.expo... | 'use strict';
const fs = require('fs');
const remote = require('remote');
var getExtDir = () => {
return remote.app.getPath('userData')+'/cmds';
};
var importCmd = () => {
let cmds = {};
cmds = importInternal(cmds);
cmds = importExternal(cmds);
return cmds;
};
var importInternal = (cmds) => {
let files ... | Allow injection of simple extensions | Allow injection of simple extensions
Allows to inject single file extensions with basic task.
| JavaScript | bsd-2-clause | de-luca/Pinata,de-luca/Pinata |
996398912fd327022bc934153cd58ee8b89e9393 | config/configuration.js | config/configuration.js | /**
* @file Defines the provider settings.
*
* Will set the path to Mongo, and applications id
* Most of the configuration can be done using system environment variables.
*/
// Load environment variables from .env file
var dotenv = require('dotenv');
dotenv.load();
// node_env can either be "development" or "pro... | /**
* @file Defines the provider settings.
*
* Will set the path to Mongo, and applications id
* Most of the configuration can be done using system environment variables.
*/
// Load environment variables from .env file
var dotenv = require('dotenv');
dotenv.load();
// node_env can either be "development" or "pro... | Use GDRIVE prefix in env vars | Use GDRIVE prefix in env vars
| JavaScript | mit | AnyFetch/gdrive-provider.anyfetch.com |
65501f32f2266e0c6c6750c28218d5df5ad67bbd | swh/web/assets/src/bundles/webapp/index.js | swh/web/assets/src/bundles/webapp/index.js | /**
* Copyright (C) 2018 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
// webapp entrypoint bundle centralizing global custom... | /**
* Copyright (C) 2018 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
// webapp entrypoint bundle centralizing global custom... | Add missing filterXSS function export | assets/webapp: Add missing filterXSS function export
| JavaScript | agpl-3.0 | SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui,SoftwareHeritage/swh-web-ui |
ba850707c1f8031717bb75065c23345665328977 | app/lib/firebase_auth.js | app/lib/firebase_auth.js | import EmberObject from "@ember/object";
import config from "fakturama/config/environment";
const { APP: { FIREBASE, FIREBASE: { projectId } } } = config;
const { firebase } = window;
const app = firebase.initializeApp(FIREBASE);
function delegateMethod(name) {
return function() {
return this.get("content")[na... | import EmberObject from "@ember/object";
import config from "fakturama/config/environment";
const {
APP: {
FIREBASE,
FIREBASE: { projectId }
}
} = config;
const { firebase } = window;
const app = firebase.initializeApp(FIREBASE);
function delegateMethod(name) {
return function() {
return this.get("... | Add profile scope to google auth | Add profile scope to google auth
| JavaScript | mit | cowbell/fakturama,cowbell/fakturama |
1515fe0fbfb7dfb39f602da4d1d9051069ee8454 | src/languages/css.js | src/languages/css.js | define(function() {
// Export
return function(Prism) {
Prism.languages.css = {
'comment': /\/\*[\w\W]*?\*\//g,
'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,
'url': /url\((["']?).*?\1\)/gi,
'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,
'string': /("|')(\\?.... | define(function() {
return function(Prism) {
Prism.languages.css = {
'comment': /\/\*[\w\W]*?\*\//g,
'atrule': /@[\w-]+?(\s+[^;{]+)?(?=\s*{|\s*;)/gi,
'url': /url\((["']?).*?\1\)/gi,
'selector': /[^\{\}\s][^\{\}]*(?=\s*\{)/g,
'property': /(\b|\B)[a-z-]+(?=\s*:)/ig,
'string': /("... | Fix indentation of the CSS grammar | Fix indentation of the CSS grammar
| JavaScript | mit | apiaryio/prism |
c0ca6b23053d338fd94f20a61c49b46634abb1fb | api/index.js | api/index.js | module.exports = function createApi (osm) {
return {
getMap: require('./get_map.js')(osm),
getElement: require('./get_element.js')(osm),
createElement: require('./create_element.js')(osm),
createChangeset: require('./create_changeset.js')(osm),
closeChangeset: require('./close_changeset.js')(osm),... | module.exports = function createApi (osm) {
return {
getMap: require('./get_map.js')(osm),
getElement: require('./get_element.js')(osm),
createElement: require('./create_element.js')(osm),
createChangeset: require('./create_changeset.js')(osm),
closeChangeset: require('./close_changeset.js')(osm),... | Remove osm export from API | Remove osm export from API
| JavaScript | bsd-2-clause | substack/osm-p2p-server,digidem/osm-p2p-server |
c8c9d34c76811176d6c719527a69ec456005c0d2 | app/index.js | app/index.js | const canvas = document.getElementById('pong');
console.log('canvas', canvas);
| const canvas = document.getElementById('pong');
const context = canvas.getContext('2d');
const COLORS = {
BACKGROUND: '#000',
PROPS: '#FFF',
};
context.fillStyle = COLORS.BACKGROUND;
context.fillRect(0, 0, canvas.width, canvas.height);
const Player = function() {};
Player.prototype.draw = function(positionX, posi... | Add basic drawing functionality to test canvas is functional and behaving correctly | Add basic drawing functionality to test canvas is functional and behaving correctly
| JavaScript | mit | oliverbenns/pong,oliverbenns/pong |
39d14512e8bf4791d569fb417e01e82ddfbcfb63 | bin/pwned.js | bin/pwned.js | #!/usr/bin/env node
// Enable source map support
require('source-map-support').install();
// Polyfill Promise if necessary
if (global.Promise === undefined) {
require('es6-promise').polyfill();
}
var program = require('commander');
var pkg = require('../package.json');
var addCommands = require('../lib/commands');... | #!/usr/bin/env node
// Polyfill Promise if necessary
if (global.Promise === undefined) {
require('es6-promise').polyfill();
}
var program = require('commander');
var pkg = require('../package.json');
var addCommands = require('../lib/commands');
// Begin command-line argument configuration
program
.usage('[opt... | Remove unnecessary source map support from entry point | Remove unnecessary source map support from entry point
Transpiling the entry point was discontinued in e4c1ed8f.
| JavaScript | mit | wKovacs64/pwned,wKovacs64/pwned |
eafc8e98d29bd60db63ce1d3ffca5ff28bd8412f | algorithm/sorting/quick/basic/code.js | algorithm/sorting/quick/basic/code.js | tracer._print('original array = [' + D.join(', ') + ']');
tracer._sleep(1000);
tracer._pace(500);
function quicksort(low, high) {
if (low < high) {
var p = partition(low, high);
quicksort(low, p - 1);
quicksort(p + 1, high);
}
}
function partition(low, high) {
var pivot = D[high];
... | tracer._print('original array = [' + D.join(', ') + ']');
tracer._sleep(1000);
tracer._pace(500);
function quicksort(low, high) {
if (low < high) {
var p = partition(low, high);
quicksort(low, p - 1);
quicksort(p + 1, high);
}
}
function partition(low, high) {
var pivot = D[high];
... | Fix define warning in "temp" variable | Fix define warning in "temp" variable | JavaScript | mit | archie94/AlgorithmVisualizer,archie94/AlgorithmVisualizer,makintunde/AlgorithmVisualizer,nem035/AlgorithmVisualizer,makintunde/AlgorithmVisualizer,nem035/AlgorithmVisualizer |
812ac44c9e0e837a44651cd731e06d07b370976a | config/tabs.js | config/tabs.js | export const TABS = [
{
name: 'latest',
title: 'Nåtid',
chartKind: 'bar',
year: 'latest'
},
{
name: 'chronological',
title: 'Over tid',
chartKind: 'stackedArea',
year: 'all'
},
{
name: 'map',
title: 'Kart',
chartKind: 'map',
year: 'latest'
},
{
name: 'be... | export const TABS = [
{
name: 'latest',
title: 'Nåtid',
chartKind: 'bar',
year: 'latest'
},
{
name: 'chronological',
title: 'Over tid',
chartKind: 'line',
year: 'all'
},
{
name: 'map',
title: 'Kart',
chartKind: 'map',
year: 'latest'
},
{
name: 'benchmark... | Change default for chronological tab to line | Change default for chronological tab to line
| JavaScript | mit | bengler/imdikator,bengler/imdikator |
5bd4af9d7a3ccfee9a347a0e6cdd6641e64fec79 | gh-pages-stub/public/js/process404.js | gh-pages-stub/public/js/process404.js | /*
* Copyright 2014-2016 CyberVision, Inc.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applic... | /*
* Copyright 2014-2016 CyberVision, Inc.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applic... | Add separate eventCategory for broken links | JEK-8: Add separate eventCategory for broken links
| JavaScript | apache-2.0 | aglne/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,aglne/kaa,sashadidukh/kaa,aglne/kaa,vtkhir/kaa,aglne/kaa,vtkhir/kaa,vtkhir/kaa,vtkhir/kaa,aglne/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,sashadidukh/kaa,aglne/kaa,vtkhir/kaa,sashadidukh/kaa,sashadidukh/kaa,vtkhir/kaa,aglne/kaa |
bce6148287de314127188099c59c82ce79905156 | lib/client.js | lib/client.js | var aws = require('aws-sdk');
module.exports = function() {
aws.config.update({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
region: 'us-east-1'
});
return new aws.EC2();
} | var aws = require('aws-sdk');
module.exports = function() {
if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY) {
throw new Error('Must set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY')
}
aws.config.update({
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_S... | Add check for env vars | Add check for env vars
| JavaScript | mit | freeman-lab/tinycloud |
27c8e704ab182ae6e2d6dfb39a64b8417c809680 | lib/concat.js | lib/concat.js | (function(){
module.exports = concat
var fs = require('fs')
function concat(files, target, done){
validateInputs(files, target, done)
var writeStream = fs.createWriteStream(target, {flags: 'a'})
writeFiles(files.reverse(), writeStream, done)
}
function writeFiles(files, writeStream, ca... | (function(){
module.exports = concat
var fs = require('fs')
function concat(files, target, done, errFunction){
validateInputs(files, target, done, errFunction)
var writeStream = fs.createWriteStream(target, {flags: 'a'})
writeFiles(files.reverse(), writeStream, done, errFunction)
}
fun... | Allow for error handler to be passed as parameter | Allow for error handler to be passed as parameter
So that errors can be properly handled in cases like Promises etc. | JavaScript | mit | andreicioban/file-concat-stream |
06e38be848b204b60db34fac3f7adb50fa3d1e7a | packages/stylus/package.js | packages/stylus/package.js | Package.describe({
summary: 'Expressive, dynamic, robust CSS',
version: "2.0.0_511"
});
Package.registerBuildPlugin({
name: 'compileStylusBatch',
use: ['ecmascript', 'caching-compiler'],
sources: [
'plugin/compile-stylus.js'
],
npmDependencies: {
stylus: "https://github.com/meteor/stylus/tarball/... | Package.describe({
summary: 'Expressive, dynamic, robust CSS',
version: "2.0.0_511"
});
Package.registerBuildPlugin({
name: 'compileStylusBatch',
use: ['ecmascript', 'caching-compiler'],
sources: [
'plugin/compile-stylus.js'
],
npmDependencies: {
stylus: "https://github.com/meteor/stylus/tarball/... | Remove lru-cache dependency from stylus | Remove lru-cache dependency from stylus | JavaScript | mit | joannekoong/meteor,msavin/meteor,lpinto93/meteor,meteor-velocity/meteor,DCKT/meteor,Theviajerock/meteor,deanius/meteor,SeanOceanHu/meteor,chasertech/meteor,Prithvi-A/meteor,mubassirhayat/meteor,yinhe007/meteor,udhayam/meteor,Theviajerock/meteor,hristaki/meteor,chiefninew/meteor,hristaki/meteor,aldeed/meteor,alexbeletsk... |
b5ea8b96c1ae114220f45635c6e4bf783881964c | plugins/dropkick.jquery.js | plugins/dropkick.jquery.js | jQuery.fn.dropkick = function ( opts, args ) {
return $( this ).each(function() {
if ( !opts || typeof opts === 'object' ) {
new Dropkick( this, opts || {} );
} else if ( typeof opts === 'string' ) {
new Dropkick( this )[ opts ]( args );
}
});
}; | jQuery.fn.dropkick = function ( opts ) {
return $( this ).each(function() {
var dk;
if ( !opts || typeof opts === 'object' ) {
new Dropkick( this, opts || {} );
} else if ( typeof opts === 'string' ) {
dk = new Dropkick( this );
dk[ opts ].apply( dk, arguments.slice(1) );
}
})... | Allow multiple args for jQuery extension | Allow multiple args for jQuery extension | JavaScript | mit | Robdel12/DropKick,GerHobbelt/DropKick,alex-riabenko/DropKick,Robdel12/DropKick,chrismoulton/DropKick,alexgleason/DropKick,acebalajadia/DropKick,chrismoulton/DropKick,spoonben/DropKick,alexgleason/DropKick,GerHobbelt/DropKick,acebalajadia/DropKick,alex-riabenko/DropKick |
040d5d1f6ef2f582a0c5c2b8fe6263bb0c1b7c4d | packages/plug-auth-server/test/authenticator.js | packages/plug-auth-server/test/authenticator.js | import test from 'ava'
import authenticator from '../src/authenticator'
import testUsers from './util/testUsers'
function localUsersRepository () {
return {
getUser(id) {
const result = testUsers.find((user) => user.id === id)
if (!result) {
return Promise.reject(new Error('User not found'))... | import test from 'ava'
import authenticator from '../src/authenticator'
import testUsers from './util/testUsers'
function localUsersRepository () {
return {
getUser(id) {
const result = testUsers.find((user) => user.id === id)
if (!result) {
return Promise.reject(new Error('User not found'))... | Fix test for getAuthBlurb() result | Fix test for getAuthBlurb() result
| JavaScript | mit | goto-bus-stop/plug-auth |
86ee32602f9257790c2da7b4e84e2070ace5bfb7 | client/constants/NavigateConstants.js | client/constants/NavigateConstants.js | import constantCreator from '../lib/constantCreator'
const NavigateConstants = constantCreator('NAVIGATE', {
START: null,
FAILURE: null,
SUCCESS: null
})
export default NavigateConstants
| import constantCreator from '../lib/constantCreator'
const NavigateConstants = constantCreator('NAVIGATE', {
START: null,
FAILURE: null,
SUCCESS: null,
TRANSITION_TO: null
})
export default NavigateConstants
| Add transition constant for navigation | Add transition constant for navigation
| JavaScript | apache-2.0 | cesarandreu/bshed,cesarandreu/bshed |
d9497da46e647f2ca9d6a2ad2f3fcf4d8c56c90d | assets/src/edit-story/elements/video/display.js | assets/src/edit-story/elements/video/display.js | /**
* External dependencies
*/
import PropTypes from 'prop-types';
import styled from 'styled-components';
/**
* Internal dependencies
*/
import { ElementWithPosition, ElementWithSize, ElementWithRotation } from '../shared';
const Element = styled.video`
${ ElementWithPosition }
${ ElementWithSize }
${ Element... | /**
* External dependencies
*/
import PropTypes from 'prop-types';
import styled from 'styled-components';
/**
* Internal dependencies
*/
import { ElementWithPosition, ElementWithSize, ElementWithRotation } from '../shared';
const Element = styled.video`
${ ElementWithPosition }
${ ElementWithSize }
${ Element... | Add some basic video element. | Add some basic video element.
| JavaScript | apache-2.0 | GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp |
6336e7cd56c760d90ef63694ecea0eee529705a7 | test/stores/Store.spec.js | test/stores/Store.spec.js | import store from "src/stores/Store.js";
import app from "src/reducers/App.js";
describe("store", () => {
it("should exist", () => {
store.should.exist;
});
it("should have all API methods", () => {
store.dispatch.should.be.a.function;
store.getState.should.be.a.function;
store.replaceReducer.s... | import store from "src/stores/Store.js";
import app from "src/reducers/App.js";
describe("store", () => {
it("should exist", () => {
store.should.exist;
});
it("should have all API methods", () => {
store.dispatch.should.be.a.function;
store.getState.should.be.a.function;
store.replaceReducer.s... | Fix Store: fix broken test whether store use app reducer or not | Fix Store: fix broken test whether store use app reducer or not
| JavaScript | mit | Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React |
00d96d49e368313190aad149d5f3de0f9a226149 | examples/expected_invocation_test.js | examples/expected_invocation_test.js | var Ajax = {
get: function(uri) { }
};
var Updater = Class.create({
initialize: function(bookId) {
this.bookId = bookId;
setSample('<div id="title"></div>');
},
run: function() {
var book = Ajax.get('http://example.com/books/'+this.bookId+'.json');
var title = book.title;
$('title').inne... | var Ajax = {
get: function(uri) { }
};
var Updater = Class.create({
initialize: function(bookId) {
this.bookId = bookId;
},
run: function() {
var book = Ajax.get('http://example.com/books/'+this.bookId+'.json');
var title = book.title;
$('title').innerHTML = book.title;
}
});
Moksi.descri... | Fix something in the the expected invocation example. | Fix something in the the expected invocation example.
| JavaScript | mit | Manfred/moksi |
19d3b4ee7b416b219903ec2b2f42aedfc665c3b3 | server.js | server.js | var http = require('http');
var r = require('request');
var config = require('./config.json');
var doneUrl;
var userUrl;
http.createServer(function(request, response) {
if (!isEvent(request)) return;
r.post({
url: doneUrl
}, function(error, response, body) {
if (error !== null) {
... | var http = require('http');
var r = require('request');
var config = require('./config.json');
var doneUrl;
var userUrl;
http.createServer(function(request, response) {
if (!isEvent(request)) return;
r.post({
url: doneUrl
}, function(error, response, body) {
if (error !== null) {
... | Remove unnecessary parsing of body -- it's already an object. | Remove unnecessary parsing of body -- it's already an object.
| JavaScript | mit | RemoteHelper/client-mock-node |
8805437d1b1c1e37f29223bbe2ef74920a719fc2 | packages/app/source/client/components/appeals-editor/appeal-form.js | packages/app/source/client/components/appeals-editor/appeal-form.js | Space.flux.BlazeComponent.extend(Donations, 'AppealForm', {
events() {
return [{
'keyup .appeal.form input': this._onInputChange,
'keyup .appeal.form .description': this._onInputChange,
'click .appeal.form .submit': this._onSubmit
}];
},
_onInputChange() {},
_onSubmit() {},
_getVa... | Space.flux.BlazeComponent.extend(Donations, 'AppealForm', {
ENTER: 13,
events() {
return [{
'keyup .appeal.form input': this._onInputChange,
'keyup .appeal.form .description': this._onInputChange,
'click .appeal.form .submit': this._onSubmit
}];
},
_onInputChange() {
if (event.k... | Add enter keymap to Appeals editor | Add enter keymap to Appeals editor
Note that there’s some fuzzy UI logic that is linking the isEditing
state to the submit being clicked.
| JavaScript | mit | meteor-space/donations,meteor-space/donations,meteor-space/donations |
eb85db3ed1dbd7f30ebc0a67777951c37dfe766e | app/adapters/gist-file.js | app/adapters/gist-file.js | import ApplicationAdapter from './application';
export default ApplicationAdapter.extend({
generateIdForRecord: function(store, type, inputProperties) {
return inputProperties.filePath.replace(/\//gi, '.');
}
}); | import ApplicationAdapter from './application';
export default ApplicationAdapter.extend({
seq: 0,
generateIdForRecord: function(store, type, inputProperties) {
return inputProperties.filePath.replace(/\//gi, '.') + "." + this.incrementProperty('seq');
}
});
| Fix issue cannot create two files of the same type | Fix issue cannot create two files of the same type
| JavaScript | mit | pangratz/ember-twiddle,pangratz/ember-twiddle,vikram7/ember-twiddle,Gaurav0/ember-twiddle,ember-cli/ember-twiddle,knownasilya/ember-twiddle,knownasilya/ember-twiddle,Gaurav0/ember-twiddle,vikram7/ember-twiddle,knownasilya/ember-twiddle,vikram7/ember-twiddle,pangratz/ember-twiddle,Gaurav0/ember-twiddle,ember-cli/ember-t... |
0e149f3fe042b6c2aaed0ff8d97116624f148951 | server/game/cards/02.3-ItFC/ChasingTheSun.js | server/game/cards/02.3-ItFC/ChasingTheSun.js | const _ = require('underscore');
const DrawCard = require('../../drawcard.js');
const { Locations, CardTypes, EventNames } = require('../../Constants');
class ChasingTheSun extends DrawCard {
setupCardAbilities() {
this.action({
title: 'Move the conflict to another eligible province',
... | const _ = require('underscore');
const DrawCard = require('../../drawcard.js');
const { Locations, CardTypes, EventNames } = require('../../Constants');
class ChasingTheSun extends DrawCard {
setupCardAbilities() {
this.action({
title: 'Move the conflict to another eligible province',
... | Add canBeAttacked condition to Chasing the Sun | Add canBeAttacked condition to Chasing the Sun
| JavaScript | mit | gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki |
511d83a1612d0c348045bb0511bbd6ecc6cb01a7 | jenkins/seedDatabase.js | jenkins/seedDatabase.js | var system = require('system');
var url = encodeURI(system.args[1]);
var page = require('webpage').create();
page.open(url, function(status) {
console.log("Status: " + status);
phantom.exit();
});
| var system = require('system');
console.log(system.args[1]);
var url = encodeURI(system.args[1]);
console.log(url);
var page = require('webpage').create();
page.open(url, function(status) {
console.log("Status: " + status);
phantom.exit();
});
| Include debugging in seed database script | Include debugging in seed database script
| JavaScript | apache-2.0 | ecohealthalliance/infrastructure,ecohealthalliance/infrastructure,ecohealthalliance/infrastructure,ecohealthalliance/infrastructure |
3fbbec30b1bfd3f635becb3496481a187f29b7e3 | index.ios.js | index.ios.js | /**
* @providesModule RNShare
* @flow
*/
'use strict';
var NativeRNShare = require('react-native').NativeModules.RNShare;
var invariant = require('invariant');
/**
* High-level docs for the RNShare iOS API can be written here.
*/
var RNShare = {
test: function() {
NativeRNShare.test();
},
open: functi... | /**
* @providesModule RNShare
* @flow
*/
'use strict';
var NativeRNShare = require('NativeModules').RNShare;
var invariant = require('invariant');
/**
* High-level docs for the RNShare iOS API can be written here.
*/
var RNShare = {
test: function() {
NativeRNShare.test();
},
open: function(options) {... | Revert "updateRN 0.14.0 new native module Api" | Revert "updateRN 0.14.0 new native module Api"
| JavaScript | mit | EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share,EstebanFuentealba/react-native-share |
612a144c611549b6ceef9f59e2df0eb246d881d0 | concat-svg/concat-svg.js | concat-svg/concat-svg.js | #!/usr/bin/env node
var fs = require('fs');
var cheerio = require('cheerio');
var path = require('path');
var cheerioOptions = {xmlMode: true};
var files = process.argv.slice(2);
function read(file) {
var content = fs.readFileSync(file, 'utf8');
return cheerio.load(content, cheerioOptions);
}
function transmogr... | #!/usr/bin/env node
var fs = require('fs');
var cheerio = require('cheerio');
var path = require('path');
var cheerioOptions = {xmlMode: true};
var files = process.argv.slice(2);
function read(file) {
var content = fs.readFileSync(file, 'utf8');
return cheerio.load(content, cheerioOptions);
}
function transmogr... | Remove spacer rectangles and flatten groups in source SVG files | Remove spacer rectangles and flatten groups in source SVG files
Saves 30K on the iconsets!
| JavaScript | bsd-3-clause | jorgecasar/tools,imrehorvath/tools,Polymer/tools,Polymer/tools,imrehorvath/tools,Polymer/tools,jorgecasar/tools,Polymer/tools |
5bcd4d2b709128e9e908812279280d3e4fca5eca | app/app.js | app/app.js | "use strict";
// Declare app level module which depends on views, and components
angular.module("myApp", [
"ngRoute",
"myApp.view1",
"myApp.view2",
"myApp.version",
"ui.bootstrap"
]).
config(["$routeProvider", function($routeProvider) {
$routeProvider.otherwise({redirectTo: "/view1"});
}]);
| "use strict";
// Declare app level module which depends on views, and components
angular.module("myApp", [
"ngRoute",
"myApp.view1",
"myApp.view2",
"myApp.version"
]).
config(["$routeProvider", function($routeProvider) {
$routeProvider.otherwise({redirectTo: "/view1"});
}]);
| Fix integration test by removing bootstrap module | Fix integration test by removing bootstrap module | JavaScript | mit | mikar/cmis-browser,mikar/cmis-browser |
d6807bb4f28e0b8bc3cf990ce629edfe186dfa80 | js/events.js | js/events.js | function Events()
{
var listeners = {}
$.extend(this, {
on: function(type, cb)
{
if (!$.isArray(listeners[type]))
listeners[type] = []
if (listeners[type].indexOf(cb) < 0)
listeners[type].push(cb)
},
once: function(type, cb)
{
this.o... | function Events()
{
var listeners = {}
$.extend(this, {
on: function(type, cb)
{
if (!$.isArray(listeners[type]))
listeners[type] = []
if (listeners[type].indexOf(cb) < 0)
listeners[type].push(cb)
},
once: function(type, cb)
{
this.o... | Make emit able to return an array of values | Make emit able to return an array of values
| JavaScript | artistic-2.0 | atrodo/fission_engine,atrodo/fission_engine |
65eff470cfe7e52ec3c778290dc0c20d046ee23a | src/Disp/buildingTiles/toggleBuildingLock.js | src/Disp/buildingTiles/toggleBuildingLock.js | /**
* This function toggle the locked state of a building
* @param {number} index Index of the row to change
*/
export default function toggleBuildingLock(index) {
if (l(`productLock${index}`).innerHTML === 'Lock') {
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.lockedMinigames.push(
index.t... | /**
* This function toggle the locked state of a building
* @param {number} index Index of the row to change
*/
export default function toggleBuildingLock(index) {
if (l(`productLock${index}`).innerHTML === 'Lock') {
// Add to storing array
Game.mods.cookieMonsterFramework.saveData.cookieMonsterMod.lockedM... | Fix bug with storing locked buildings | Fix bug with storing locked buildings
| JavaScript | mit | Aktanusa/CookieMonster,Aktanusa/CookieMonster |
3bb25ff6053f6ea0ce124a7fdfa804f15631ede9 | grunt/config/copy.js | grunt/config/copy.js | module.exports = {
docs: {
files: [
{
src: ['css/**/*'],
dest: 'docs/public/'
},
{
src: ['img/**/*'],
dest: 'docs/public/'
}
]
}
}; | module.exports = {
docs: {
files: [
{
src: ['css/**/*'],
dest: 'docs/public/'
},
{
src: ['img/**/*'],
dest: 'docs/public/'
},
{
src: ['js/**/*'],
dest: 'docs/public/'
}
]
}
}; | Copy the JS to the docs dir | Copy the JS to the docs dir
| JavaScript | agpl-3.0 | FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes,FiviumAustralia/OpenEyes |
ff4679095d924160e1ee69a1b1051bf846689dac | config/passportConfig.js | config/passportConfig.js | /*
* This file contains all of the Passport configuration that will
* be used through the application for Facebook authentication.
*/
var FacebookStrategy = require('passport-facebook').Strategy;
var keys = require('./keys');
var model = require('../models/index');
module.exports = function(app, passport) {
ap... | /*
* This file contains all of the Passport configuration that will
* be used through the application for Facebook authentication.
*/
var FacebookStrategy = require('passport-facebook').Strategy;
var keys = require('./keys');
var model = require('../models/index');
module.exports = function(app, passport) {
ap... | Add sessions and more robust Facebook auth. | Add sessions and more robust Facebook auth.
| JavaScript | mit | kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender |
90fb58a96ea37dfe6c9e08e2248b833e60038093 | bin/cmd.js | bin/cmd.js | #!/usr/bin/env node
var fs = require('fs')
var path = require('path')
var argv = require('yargs')
.alias('s', 'silent')
.describe('s', 'print empty string instead of erroring out')
.argv
var pkg = path.join(process.cwd(), 'package.json')
var field = argv._[0] || 'name'
fs.readFile(pkg, 'utf8... | #!/usr/bin/env node
var fs = require('fs')
var path = require('path')
var argv = require('yargs')
.boolean('s')
.alias('s', 'silent')
.describe('s', 'print empty string instead of erroring out')
.argv
var pkg = path.join(process.cwd(), 'package.json')
var field = argv._[0] || 'name'
... | Use -s option before or after argument | Use -s option before or after argument
| JavaScript | mit | mattdesl/package-field |
ce3b4d7c61fde7c4918205df77f7f009c2eb461c | Welcomer/index.js | Welcomer/index.js | /*Tell users to read the rules,
with a direct link to the channel,
when they join.*/
var info = console.log.bind(console, "[Welcomer]");
var message = [
"Welcome to the server!",
"We have rules that we'd like you to follow, so make sure to check out the <#155309620540342272> channel.",
"We hope you enjoy ... | /*Tell users to read the rules,
with a direct link to the channel,
when they join.*/
var info = console.log.bind(console, "[Welcomer]");
var message = [
"Welcome to the server!",
"We have rules that we'd like you to follow, so make sure to check out the <#155309620540342272> channel.",
"We hope you enjoy ... | Join the welcome message on script init | Join the welcome message on script init
| JavaScript | mit | izy521/Sera-PCMR |
271c7b629d84c0fbe4fe0003cb49e07c8d8b5cf5 | generators/app/templates/gulp-tasks/build/composer.js | generators/app/templates/gulp-tasks/build/composer.js | const childProcess = require('child_process');
const path = require('path');
const setup = require('setup/setup');
function exec(command) {
const run = childProcess.exec;
return new Promise((resolve, reject) => {
run(command, (error, stdout, stderr) => {
if (error) {
return reject(stderr);
... | const childProcess = require('child_process');
const path = require('path');
const setup = require('setup/setup');
function exec(command) {
const run = childProcess.exec;
return new Promise((resolve, reject) => {
run(command, (error, stdout, stderr) => {
if (error) {
return reject(stderr);
... | Fix task not complete error | Fix task not complete error
| JavaScript | mit | ethancfchen/generator-nodena-api-php |
63dbcbe2fa8a1ca0fb1dbc1e4df928f11e52f45e | js/getData.js | js/getData.js | window.onload = initializeData()
var ref = new Firebase("https://cepatsembuh.firebaseio.com");
var no_antri = new Firebase(ref + '/no_antrian');
function initializeData() {
var right_now = document.getElementById("right_now");
var date = new Date();
right_now.textContent = date.getFullYear() + '-' + date.getMont... | window.onload = initializeData()
var ref = new Firebase("https://cepatsembuh.firebaseio.com");
var no_antri = new Firebase(ref + '/no_antrian');
function initializeData() {
var right_now = $('#right_now');
var date = new Date();
right_now.textContent = date.getFullYear() + '-' + date.getMonth() + '-' + date.getD... | Use jQuery to get elements | Use jQuery to get elements
| JavaScript | mit | mercysmart/cepatsembuh-iqbal,mercysmart/cepatsembuh-iqbal |
0d306907d1f2de812504af43fbaa360e070d720a | karma.conf.js | karma.conf.js | module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai'],
files: ['test/**/*.js', 'xterm-terminal.js'],
reporters: ['progress'],
port: 9876, // karma web server port
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless'],
autoWatch: false,
conc... | module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai'],
files: ['test/**/*.js', 'node_modules/xterm/dist/xterm.js', 'xterm-terminal.js'],
reporters: ['progress'],
port: 9876, // karma web server port
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadle... | Add xterm.js to included files | Add xterm.js to included files | JavaScript | mit | parisk/xterm-terminal,parisk/xterm-terminal |
fba020f9b26f4f8f8beefc925f219c5211174ea4 | www/last_photo_taken.js | www/last_photo_taken.js | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use ... | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use ... | Update js interface to allow more params | Update js interface to allow more params
| JavaScript | apache-2.0 | xlongtang/cordova-last-photo-taken,xlongtang/cordova-last-photo-taken |
6424996e2bd5f6ba06443c8efc4f3ae13f7b2186 | app/js/views/edit_profile_modal.js | app/js/views/edit_profile_modal.js | define(["application"], function(App) {
App.EditProfileModalView = Ember.View.extend({
actions: {
save: function () {
var person = this.get('controller.person')
, personData = this.get('controller.personData')
, newProperties = personData.getProperties([
'name', 'ti... | define(["application"], function(App) {
App.EditProfileModalView = Ember.View.extend({
actions: {
save: function () {
var person = this.get('controller.person')
, personData = this.get('controller.personData')
, newProperties = personData.getProperties([
'name', 'ti... | Send person data in the request. | Send person data in the request.
| JavaScript | mit | mhs/t2-people,mhs/t2-people,mhs/t2-people |
908cee1e2d7a13863ff6b4dc0501f56e65eed958 | lib/index.js | lib/index.js | /**
server
The backbone of the server module. In development, this runs proxied through
BrowserSync server.
@param {Object} options Options passed on to "globals"
@param {Function} next Called when server successfully initialized
**/
var reorg = require("reorg");
module.exports = reorg(function(options,... | /**
server
The backbone of the server module. In development, this runs proxied through
BrowserSync server.
@param {Object} options Options passed on to "globals"
@param {Function} next Called when server successfully initialized
**/
var reorg = require("reorg");
module.exports = reorg(function(options,... | Enforce strict routing (handled in compiler) | Enforce strict routing (handled in compiler)
| JavaScript | apache-2.0 | shippjs/shipp-server,shippjs/shipp-server |
2d7da7b416b460aaa646e6662a622990bda1a07b | src/components/services/ConfigService.js | src/components/services/ConfigService.js | (function() {
'use strict';
angular.module('civic.services')
.constant('ConfigService', {
serverUrl: 'http://localhost:3000/',
mainMenuItems: [
{
label: 'Collaborate',
state: 'collaborate'
},
{
label: 'Help',
state: 'help'
},
... | (function() {
'use strict';
angular.module('civic.services')
.constant('ConfigService', {
serverUrl: 'http://localhost:3000/',
mainMenuItems: [
{
label: 'Collaborate',
state: 'collaborate'
},
{
label: 'Help',
state: 'help'
},
... | Replace the Contact page with the FAQ page | Replace the Contact page with the FAQ page
| JavaScript | mit | yanyangfeng/civic-client,yanyangfeng/civic-client,genome/civic-client,genome/civic-client |
54cb3847e205dff54c4f3490a15e659f81b0bb5a | app/javascript/messages.js | app/javascript/messages.js | /* global angular */
const MESSAGE_TIMEOUTS = {message: 7000, success: 6000, error: 14000};
angular.module('dappChess').controller('MessagesCtrl', function ($scope) {
$scope.messages = [];
$scope.$on('message', function(event, message, type = message, topic = null) {
let id = Math.random();
if(topic) {
... | /* global angular */
const MESSAGE_TIMEOUTS = {message: 7000, success: 6000, error: 14000};
angular.module('dappChess').controller('MessagesCtrl', function ($scope, $timeout) {
$scope.messages = [];
$scope.$on('message', function(event, message, type = message, topic = null) {
let id = Math.random();
if(... | Use $timeout instead of setTimeout for better compatibility | Use $timeout instead of setTimeout for better compatibility | JavaScript | mit | ise-ethereum/on-chain-chess,ise-ethereum/on-chain-chess |
b752f54661aa11ea235ed6c092a2b41188685e68 | src/beat.js | src/beat.js | (function() {
var Beat = function ( dance, freq, threshold, decay, onBeat, offBeat ) {
this.dance = dance;
this.freq = freq;
this.threshold = threshold;
this.decay = decay;
this.onBeat = onBeat;
this.offBeat = offBeat;
this.isOn = false;
this.currentThreshold = t... | (function() {
var Beat = function ( dance, frequency, threshold, decay, onBeat, offBeat ) {
this.dance = dance;
this.frequency = frequency;
this.threshold = threshold;
this.decay = decay;
this.onBeat = onBeat;
this.offBeat = offBeat;
this.isOn = false;
this.currentThr... | Change Beat's instance property 'freq' to 'frequency' for more natural get/setting | Change Beat's instance property 'freq' to 'frequency' for more natural get/setting
| JavaScript | mit | modulexcite/dancer.js,kyroskoh/dancer.js,ngokevin/dancer.js,jsantell/dancer.js,kyroskoh/dancer.js,ngokevin/dancer.js,modulexcite/dancer.js,hoboman313/dancer.js,hoboman313/dancer.js,suryasingh/dancer.js,suryasingh/dancer.js |
989bd29938fe860ea862fe914254d1373a6422da | app/mirage/route-handlers/index.js | app/mirage/route-handlers/index.js | import getDailyRiderships from './get-daily-riderships';
import getRoute from './get-route';
import getRoutes from './get-routes';
import getServiceHourRiderships from './get-service-hour-riderships';
import getSystemTrends from './get-system-trends';
export {getDailyRiderships as getDailyRiderships};
export {getServi... | import getDailyRiderships from './get-daily-riderships';
import getHighRidership from './get-high-ridership';
import getRoute from './get-route';
import getRoutes from './get-routes';
import getRouteLabels from './get-route-labels';
import getServiceHourRiderships from './get-service-hour-riderships';
import getSystemT... | Add new Mirage route handlers. | Add new Mirage route handlers.
| JavaScript | mit | jga/capmetrics-web,jga/capmetrics-web |
ecca67b6eb571673adca35cf952b5e3bcaa01832 | gulp/handlebars.js | gulp/handlebars.js | import path from 'path';
import _ from 'lodash';
import minimatch from "minimatch";
let allFiles = {}
module.exports.helpers = {
equal(lvalue, rvalue, options) {
if (arguments.length < 3)
throw new Error("Handlebars Helper equal needs 2 parameters");
if( lvalue!=rvalue ) {
return options.inverse(this);
}... | import path from 'path';
import _ from 'lodash';
import minimatch from "minimatch";
let allFiles = {}
module.exports.helpers = {
equal(lvalue, rvalue, options) {
if (arguments.length < 3)
throw new Error("Handlebars Helper equal needs 2 parameters");
if( lvalue!=rvalue ) {
return options.inverse(this);
}... | Fix context loss for eachFile helper | Fix context loss for eachFile helper
| JavaScript | apache-2.0 | stellar/developers,stellar/developers |
cfaa1420009e4525aa74f7374c04adb0d29721b4 | src/v2/components/UI/Layouts/BlankLayout/components/BaseStyles/index.js | src/v2/components/UI/Layouts/BlankLayout/components/BaseStyles/index.js | import { createGlobalStyle } from 'styled-components'
export default createGlobalStyle`
body {
margin: 0;
padding: 0;
-webkit-font-smoothing: antialiased;
font-family: ${props => props.theme.fonts.sans};
background-color: ${props => props.theme.colors.background};
}
a {
text-decoration: ... | import { createGlobalStyle } from 'styled-components'
export default createGlobalStyle`
body {
margin: 0;
padding: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: ${props => props.theme.fonts.sans};
background-color: ${props => props.theme.colors.backg... | Add font smoothing for firefox | Add font smoothing for firefox
| JavaScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell |
c40a5137dd0236ff6a9ad4ebfda4071381f3fd9a | src/app/services/messaging.js | src/app/services/messaging.js | import socketCluster from 'socketcluster-client';
import socketOptions from '../constants/socketOptions';
let socket;
let channel;
export function subscribe(subscriber, options) {
if (socket) socket.disconnect();
socket = socketCluster.connect({
...socketOptions,
...options
});
socket.emit('login', {... | import socketCluster from 'socketcluster-client';
import socketOptions from '../constants/socketOptions';
let socket;
let channel;
export function subscribe(subscriber, options = socketOptions) {
if (socket) socket.disconnect();
socket = socketCluster.connect(options);
socket.emit('login', {}, (err, channelNam... | Use default options from socketcluster when not specified | Use default options from socketcluster when not specified
| JavaScript | mit | zalmoxisus/remotedev-app,zalmoxisus/remotedev-app |
dbc6e45a1b2c8de616f1d28646c388951125d241 | src/defaultPropTypes.js | src/defaultPropTypes.js | import { PropTypes } from 'react';
export default {
message: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element
]).isRequired,
action: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.string
]),
onClick: PropTypes.func,
style: PropTypes.bool,
actionStyle: PropTypes.object,
barStyl... | import { PropTypes } from 'react';
export default {
message: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element
]).isRequired,
action: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.string,
PropTypes.node
]),
onClick: PropTypes.func,
style: PropTypes.bool,
actionStyle: PropTyp... | Change proptypes for action to allow node | Change proptypes for action to allow node
* Changed proptypes for action in order to remove the proptypes warning when passing a node.
* Changed action proptype to accept node
| JavaScript | mit | pburtchaell/react-notification |
fbda3cfcb96e7cb8b5535fcb8985b942b7f0606d | javascript/DependentDynamicListDropdownField.js | javascript/DependentDynamicListDropdownField.js | (function($){
$.entwine('ss', function($){
$('select.dependentdynamiclistdropdown').entwine({
onmatch : function(){
var self = $(this),
dependentOn = $('select[name=' + self.data('dependenton') + ']');
if(!dependentOn.length){
return;
}
if(dependentOn.val()){
self.updateOptions(d... | (function($){
$.entwine('ss', function($){
$('select.dependentdynamiclistdropdown').entwine({
onmatch : function(){
var self = $(this),
dependentOn = $('select[name=' + self.data('dependenton') + ']');
if(!dependentOn.length){
return;
}
if(dependentOn.val()){
self.updateOptions(d... | FIX (field js): correctly refresh chosen fields if dependent field already has value | FIX (field js): correctly refresh chosen fields if dependent field already has value
| JavaScript | bsd-3-clause | sheadawson/silverstripe-dynamiclists,sheadawson/silverstripe-dynamiclists |
c79d4fee907c01e8a1acb8d33fbac5be67493f9f | app/components/game-nav.js | app/components/game-nav.js | import * as React from 'react'
import {Octicon as OcticonClass} from './octicon'
import {Link} from 'react-router'
let Octicon = React.createFactory(OcticonClass);
let GameNavbar = React.createClass({
render() {
return React.createElement('ul', {id: 'game-nav', className: 'menu'},
React.createElement('li', {key... | import * as React from 'react'
import {State} from 'react-router'
import {Octicon as OcticonClass} from './octicon'
import {Link as LinkClass} from 'react-router'
let Link = React.createFactory(LinkClass);
let Octicon = React.createFactory(OcticonClass);
let GameNavbar = React.createClass({
mixins: [State],
render(... | Use the RouterState mixin in GameNav | Use the RouterState mixin in GameNav
| JavaScript | mit | hawkrives/svg-diplomacy,hawkrives/svg-diplomacy,hawkrives/svg-diplomacy,hawkrives/svg-diplomacy |
79924bfd5429029b7ab7943bbbd9ac67182bb0e0 | src/core/touch.js | src/core/touch.js | /**
* Flag indicating if the client supports touch events.
*
* @returns {Boolean} <em>true</em> if have touch support
* @preserve
*/
sn.hasTouchSupport = (function() {
if ( !(global && global.document) ) {
return false;
}
if ( 'createTouch' in global.document ) { // True on the iPhone
return true;
}
try ... | /**
* Flag indicating if the client supports touch events.
*
* @returns {Boolean} <em>true</em> if have touch support
* @preserve
*/
sn.hasTouchSupport = (function() {
if ( !(global && global.document) ) {
return false;
}
if ( 'createTouch' in global.document ) { // True on the iPhone
return true;
}
try ... | Add missing tapEventNames and tapCoordinates properties. | Add missing tapEventNames and tapCoordinates properties.
| JavaScript | apache-2.0 | SolarNetwork/solarnetwork-d3,SolarNetwork/solarnetwork-d3 |
c4fbfd51a6281efa61bfa0cff69ee9d6f3c152a6 | lib/client.js | lib/client.js | var Promise = require('es6-promise').Promise;
module.exports = {
init: function(url) {
createIframe(url)
.then(sendHandshake);
}
};
function createIframe(url) {
var iframe = document.createElement('iframe');
iframe.src = url;
var iframeLoaded = new Promise(function(resolve, reject) {
onIfra... | var Promise = require('es6-promise').Promise;
module.exports = {
init: function(url) {
createIframe(url)
.then(sendHandshake)
.then(undefined, errorHandler);
}
};
function createIframe(url) {
var iframe = document.createElement('iframe');
iframe.src = url;
var iframeLoaded = new Promise... | Add simple error handling during iframe creation. | Add simple error handling during iframe creation.
| JavaScript | mit | igoratron/iframe-api |
d31252d2335c1f4a66a27e068fc32c87ed2b52e2 | app/feed/model.js | app/feed/model.js | import Ember from 'ember';
import DS from 'ember-data';
import _ from 'npm:lodash';
var Feed = DS.Model.extend({
onestop_id: Ember.computed.alias('id'),
operators: DS.hasMany('operator', { async: true }),
url: DS.attr('string'),
feed_format: DS.attr('string'),
license_name: DS.attr('string'),
license_url: DS.att... | import Ember from 'ember';
import DS from 'ember-data';
import _ from 'npm:lodash';
var Feed = DS.Model.extend({
onestop_id: Ember.computed.alias('id'),
operators: DS.hasMany('operator', { async: true }),
url: DS.attr('string'),
feed_format: DS.attr('string'),
license_name: DS.attr('string'),
license_url: DS.att... | Add timezone/geometry/tags to new Operators from Feed | Add timezone/geometry/tags to new Operators from Feed
| JavaScript | mit | transitland/feed-registry,transitland/feed-registry |
7382b2af070e4b3210bd378242483058ce5f98f0 | lib/utils.js | lib/utils.js | module.exports.extend = function(constructor, parent) {
constructor.prototype = Object.create(parent.prototype);
constructor.prototype.constructor = constructor;
};
var utils = {};
utils.extend = function(constructor, parent) {
constructor.prototype = Object.create(parent.prototype);
constructor.prototype.con... | module.exports.extend = function(constructor, parent) {
constructor.prototype = Object.create(parent.prototype);
constructor.prototype.constructor = constructor;
};
var utils = {};
utils.extend = function(constructor, parent) {
constructor.prototype = Object.create(parent.prototype);
constructor.prototype.con... | Make sure options is an object. | Make sure options is an object.
| JavaScript | mit | jnsmalm/jsplay,jnsmalm/jsplay |
1ca4cbf376d39c152cb6b2680f777985bd03cea3 | input/utils/fieldset.js | input/utils/fieldset.js | 'use strict';
var Db = require('../');
module.exports = Db;
require('./row');
Db.prototype.set('toDOMFieldset', function (document/*, options*/) {
var options = Object(arguments[1]), names, container, rows, body;
if (options.names != null) names = options.names;
else names = this.getPropertyNames(options.tag);
... | 'use strict';
var Db = require('../');
module.exports = Db;
require('./row');
Db.prototype.set('toDOMFieldset', function (document/*, options*/) {
var options = Object(arguments[1]), names, container, rows, body;
if (options.names != null) names = options.names;
else names = this.getPropertyNames(options.tag);
... | Support custom options for each field | Support custom options for each field
| JavaScript | mit | medikoo/dbjs-dom |
2c5954d3964bbab33cb381037604d37db7bf4f6b | gatsby-node.js | gatsby-node.js | const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
module.exports.onCreateWebpackConfig = ({ actions, stage }, { logo, icons = {}, title, background }) => {
if (stage === 'develop-html' || stage === 'build-html') {
const prefix = __PATH_PREFIX__ ? __PATH_PREFIX__ : '';
actions.setWebpackConfi... | const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
module.exports.onCreateWebpackConfig = ({ actions, stage, getConfig }, { logo, icons = {}, title, background }) => {
if (stage === 'develop-html' || stage === 'build-html') {
actions.setWebpackConfig({
plugins: [
new FaviconsWebpackP... | Use webpack config to set publicPath | Use webpack config to set publicPath
| JavaScript | mit | Creatiwity/gatsby-plugin-favicon |
d4bad6943f16db6d651725dd39df7974549cf245 | js/injector.js | js/injector.js | /////////////////////////////////
// Dropbox injection functions //
/////////////////////////////////
Dropbox.appKey = "8oj6dw6o6urk6wn";
function addDropboxScriptTag() {
$("head").append('<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="8oj6dw6o6urk6... | /////////////////////////////////
// Dropbox injection functions //
/////////////////////////////////
Dropbox.appKey = "8oj6dw6o6urk6wn";
function addDropboxScriptTag() {
$("head").append('<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="8oj6dw6o6urk6... | Remove temp download link format that doesn't work | Remove temp download link format that doesn't work
| JavaScript | mit | Speenah/rit-mycourses-file-downloader |
694ae32b7f74402bddd4d14e8f2b492776e6c66b | assets/js/profile-index.js | assets/js/profile-index.js | ---
---
$(document).ready(function() {
'use strict';
// Navbar
// =======================================================
const header = $('.header');
const navbar = $('.navbar-profile');
const range = 64; // Height of navbar
$(window).on('scroll', function() {
let scrollTop = $(this).scrollTop();
... | ---
---
$(document).ready(function() {
'use strict';
// Navbar
// =======================================================
const header = $('.header');
const navbar = $('.navbar-profile');
const range = 64; // Height of navbar
$(window).on('scroll', function() {
let scrollTop = $(this).scrollTop();
... | Fix sidenav on full-index page | Fix sidenav on full-index page
| JavaScript | mit | grantmakers/profiles,grantmakers/profiles,grantmakers/profiles |
503fc48217ebb38e8d69d858a7e51aa953929225 | tests/integration/_testHelpers/setupTeardown.js | tests/integration/_testHelpers/setupTeardown.js | let serverless
export async function setup(options) {
const { servicePath } = options
if (RUN_TEST_AGAINST_AWS) {
return
}
// require lazy, AWS tests will execute faster
const { default: Serverless } = await import('serverless')
const { argv } = process
// just areally hacky way to pass options
... | const { node } = require('execa')
const { resolve } = require('path')
let serverlessProcess
const serverlessPath = resolve(
__dirname,
'../../../node_modules/serverless/bin/serverless',
)
export async function setup(options) {
const { servicePath } = options
if (RUN_TEST_AGAINST_AWS) {
return
}
ser... | Rewrite plugin instantiation for integration tests | Rewrite plugin instantiation for integration tests
| JavaScript | mit | dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline |
a57f7e9e4e64740c5207d691c5cfb4d62df9381a | app.js | app.js | require('dotenv').config();
var path = require('path');
var express = require('express');
var passport = require('passport');
var authRouter = require('./routes/auth');
// Create a new Express application.
var app = express();
require('./boot/auth')();
// Configure view engine to render EJS templates.
app.set('vi... | require('dotenv').config();
var express = require('express');
var passport = require('passport');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var authRouter = require('./routes/auth');
var app = express();
require('./boot/auth')();
// view engine setup
a... | Use middleware as generated by express-generator. | Use middleware as generated by express-generator.
| JavaScript | unlicense | passport/express-4.x-facebook-example,passport/express-4.x-facebook-example |
bf6bf26788ca5b1aa9af01fa647aca883766af0f | server/sessions/sessionsController.js | server/sessions/sessionsController.js | var helpers = require( '../config/helpers' );
var Session = require( './sessions' );
module.exports = {
getAllSessions: function( reqw, res, next ) {
Session.findAll()
.then( function( sessions ) {
response.send( sessions );
})
},
addSession: function( req, res, next ) {
var sessionName =... | var helpers = require( '../config/helpers' );
var Session = require( './sessions' );
module.exports = {
getAllSessions: function( reqw, res, next ) {
Session.findAll()
.then( function( sessions ) {
res.send( sessions );
})
},
addSession: function( req, res, next ) {
var sessionName = req.... | Refactor to use shorthand req res | Refactor to use shorthand req res
| JavaScript | mpl-2.0 | RubiginousChanticleer/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer |
f90e02e8e62807d1b22698ec57fcb08281e33834 | lib/command/utils.js | lib/command/utils.js | 'use strict';
let fileExists = require('../utils').fileExists;
let output = require("../output");
let fs = require('fs');
let path = require('path');
let colors = require('colors');
module.exports.getTestRoot = function (currentPath) {
let testsPath = path.join(process.cwd(), currentPath || '.');
if (!currentPath... | 'use strict';
let fileExists = require('../utils').fileExists;
let output = require("../output");
let fs = require('fs');
let path = require('path');
let colors = require('colors');
module.exports.getTestRoot = function (currentPath) {
let testsPath = path.resolve(currentPath || '.');
if (!currentPath) {
outp... | Fix path resolution on the command line to support absolute paths | Fix path resolution on the command line to support absolute paths
Before the change, I could not `codecept run /my/absolute/path`.
`path.join` would always stick the current working directory in front.
More proper path resolution is also simpler, as `path.resolve` will stick
the current working directory if the pat... | JavaScript | mit | Codeception/CodeceptJS,Codeception/CodeceptJS,Codeception/CodeceptJS,Shullaca1/Teste-do-CdB,williammizuta/CodeceptJS,williammizuta/CodeceptJS,Nighthawk14/CodeceptJS,Nighthawk14/CodeceptJS,Shullaca1/Teste-do-CdB,williammizuta/CodeceptJS,Shullaca1/Teste-do-CdB |
7e38fce931f119035c611825a4c923a59b5a43f9 | lib/flash-message.js | lib/flash-message.js | App.FlashMessage = Ember.Object.extend({
type: 'notice',
dismissable: true,
message: null,
isNotice: function(){
return this.get('type') == 'notice';
}.property('type'),
isWarning: function(){
return this.get('type') == 'warning';
}.property('type'),
isAlert: function(){
return this.get('... | App.FlashMessage = Ember.Object.extend({
type: 'notice',
message: null,
dismissable: true,
isInfo: Ember.computed.equal('type', 'info'),
isAlert: Ember.computed.equal('type', 'alert'),
isNotice: Ember.computed.equal('type', 'notice'),
isWarning: Ember.computed.equal('type', 'warni... | Use computed properties instead of manually checking equality | Use computed properties instead of manually checking equality
| JavaScript | mit | aackerman/ember-flash-queue |
3e5afa07ed9d94a1c607c0dff8355c157d6cded1 | karma-unit.conf.js | karma-unit.conf.js | module.exports = function(config) {
config.set({
basePath: '',
files: [
'vendor/angular/angular.js',
'vendor/angular-animate/angular-animate.js',
'vendor/angular-mocks/angular-mocks.js',
'dist/*.template.js',
'src/**/*.js'
],
exclude: [
],
frameworks: ['jasmine'],
browsers: ['Chrome'],... | module.exports = function(config) {
config.set({
basePath: '',
files: [
'vendor/angular/angular.js',
'vendor/angular-animate/angular-animate.js',
'vendor/angular-mocks/angular-mocks.js',
'vendor/angular-progress-arc/angular-progress-arc.js',
'dist/*.template.js',
'src/**/*.module.js',
'src/*... | Make sure `module` files are loaded first. | chore(karma): Make sure `module` files are loaded first.
| JavaScript | mit | sebald/ed,mps-gmbh/ed,sebald/ed,mps-gmbh/ed,mps-gmbh/ed,sebald/ed |
db90a78b8cc5fc0f30e2ae88ff58165ea8714d4f | lib/number.js | lib/number.js | 'use strict';
function hasTypeNumber(numberToCheck) {
return typeof numberToCheck === 'number';
}
module.exports = {
isNumeric: function isNumeric(numberToCheck) {
if(!hasTypeNumber(numberToCheck)) {
return false;
}
return (numberToCheck - parseFloat(numberToCheck) + 1) >... | 'use strict';
function hasTypeNumber(numberToCheck) {
return typeof numberToCheck === 'number';
}
module.exports = {
isNumeric: function isNumeric(numberToCheck) {
if(!hasTypeNumber(numberToCheck) || isNaN(numberToCheck)) {
return false;
}
return (numberToCheck - parseFlo... | Add additional isNaN check for check methods. | Add additional isNaN check for check methods.
| JavaScript | mit | lxanders/belt |
8ce1c294cfc87ba18d743cf14801843cc112a0b4 | app/actions/item-actions.js | app/actions/item-actions.js | import AppDispatcher from '../dispatchers/app-dispatcher';
import {products} from '../lib/sprintly-client';
let ItemActions = {
addItem(productId, data) {
let product = products.get(productId);
if (!product) {
throw new Error('Missing product: %s', productId);
}
data.product = product.toJSON(... | import AppDispatcher from '../dispatchers/app-dispatcher';
import {products} from '../lib/sprintly-client';
import Promise from 'bluebird';
let ItemActions = {
addItem(productId, data) {
let product = products.get(productId);
if (!product) {
throw new Error('Missing product: %s', productId);
}
... | Return a promise from a failed item save | Return a promise from a failed item save | JavaScript | isc | jeffreymoya/sprintly-kanban,whitebird08/sprintly-kanban,sprintly/sprintly-kanban,pipermerriam/sprintly-kanban,florapdx/sprintly-kanban,florapdx/sprintly-kanban,sprintly/sprintly-kanban,datachand/sprintly-kanban,whitebird08/sprintly-kanban,datachand/sprintly-kanban,pipermerriam/sprintly-kanban,jeffreymoya/sprintly-kanba... |
b53c220b892f41d431487ab4ad7ff3c7ef92de21 | src/panels/EmptyDetailPanel.js | src/panels/EmptyDetailPanel.js | /**
* Empty panel which is shown when no data object is selected.
* @class
*/
export default class EmptyDetailPanel {
constructor(rootElement, rb) {
this.rootElement = rootElement;
this.rb = rb;
}
render() {
let panel = $('#rbro_detail_panel');
$('#rbro_detail_panel').app... | /**
* Empty panel which is shown when no data object is selected.
* @class
*/
export default class EmptyDetailPanel {
constructor(rootElement, rb) {
this.rootElement = rootElement;
this.rb = rb;
}
render() {
let panel = $('#rbro_detail_panel');
$('#rbro_detail_panel').app... | Add missing method for empty panel | Add missing method for empty panel
| JavaScript | agpl-3.0 | jobsta/reportbro-designer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.