commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
3c77d4e89dc8f097810ce84608b74ba158a8deb7
src/util/compose.js
src/util/compose.js
const compose = (...functions) => { return (...initial) => { let count = functions.length; return (function accum(arg) { return count ? (count--, accum(functions[count].call(functions[count], arg))) : arg; }).apply(functions[count - 1], initial); }; }; export default compose;
const compose = (...functions) => { return (...initial) => { let count = functions.length; return (function accumulator(arg) { return count ? (count--, accumulator(functions[count].call(functions[count], arg))) : arg; }).apply(functions[count - 1], initial); }; }; export default compose;
Refactor to use a consistent name across functions
Refactor to use a consistent name across functions
JavaScript
mit
restrung/restrung-js
3625063c9b71d3d45bede0bd83af2152d83cd5ee
imports/ui/components/header/drawer-navigation.js
imports/ui/components/header/drawer-navigation.js
import React from 'react'; import Drawer from 'material-ui/Drawer'; import DrawerMenuItems from '../../containers/drawer-menu-items'; import * as ImagesHelper from '../../../util/images'; export default class DrawerNavigation extends React.Component { componentDidMount() { // iubenda Privacy Policy (functio...
import React from 'react'; import Drawer from 'material-ui/Drawer'; import DrawerMenuItems from '../../containers/drawer-menu-items'; import * as ImagesHelper from '../../../util/images'; export default class DrawerNavigation extends React.Component { componentDidMount() { // iubenda Privacy Policy (functio...
Set overflow:hidden to hide default windows scrollbars on drawer
Set overflow:hidden to hide default windows scrollbars on drawer
JavaScript
mit
irvinlim/free4all,irvinlim/free4all
184ffcd99116c9053e7956a3db5f5acc152fc971
js/src/forum/components/DiscussionsUserPage.js
js/src/forum/components/DiscussionsUserPage.js
import UserPage from './UserPage'; import DiscussionList from './DiscussionList'; /** * The `DiscussionsUserPage` component shows a discussion list inside of a user * page. */ export default class DiscussionsUserPage extends UserPage { init() { super.init(); this.loadUser(m.route.param('username')); } ...
import UserPage from './UserPage'; import DiscussionList from './DiscussionList'; /** * The `DiscussionsUserPage` component shows a discussion list inside of a user * page. */ export default class DiscussionsUserPage extends UserPage { init() { super.init(); this.loadUser(m.route.param('username')); } ...
Sort user discussion list properly
Sort user discussion list properly
JavaScript
mit
datitisev/core,datitisev/core,flarum/core,malayladu/core,datitisev/core,flarum/core,datitisev/core,malayladu/core,malayladu/core,flarum/core,malayladu/core
c8e673124e479dfc25a8ae0992c1e449d1d1362d
plugins/embed/gui-themes/themes/zeit-amp.js
plugins/embed/gui-themes/themes/zeit-amp.js
define([ 'plugins/post-hash', 'plugins/status', 'plugins/predefined-types', 'theme/scripts/js/plugins/ampify', 'theme/scripts/js/plugins/button-pagination', 'theme/scripts/js/plugins/social-share', 'css!theme/liveblog', 'tmpl!theme/container', 'tmpl!theme/posts-list', 'tmpl!theme...
define([ 'plugins/post-hash', 'plugins/status', 'plugins/predefined-types', 'theme/scripts/js/plugins/ampify', 'theme/scripts/js/plugins/button-pagination', 'theme/scripts/js/plugins/social-share', // 'css!theme/liveblog', 'tmpl!theme/container', 'tmpl!theme/posts-list', 'tmpl!th...
Disable CSS for ZEIT AMP theme
Disable CSS for ZEIT AMP theme
JavaScript
agpl-3.0
superdesk/Live-Blog,superdesk/Live-Blog,superdesk/Live-Blog,superdesk/Live-Blog
dc6833e9115f7cb61de753b928781c30b2937958
source/assets/javascripts/all.js
source/assets/javascripts/all.js
document.addEventListener("DOMContentLoaded", function(){ var select = document.querySelector('.locales select'); select.addEventListener('change', function(event){ origin = window.location.origin; languageCode = event.currentTarget.selectedOptions[0].value window.location.replace(origin + "/" + languag...
document.addEventListener("DOMContentLoaded", function(){ var select = document.querySelector('.locales select'); select.addEventListener('change', function(event){ origin = window.location.origin; languageCode = event.currentTarget.selectedOptions[0].value window.location.replace(origin + "/" + languag...
Fix JS bug in FAQ
Fix JS bug in FAQ
JavaScript
mit
olivierlacan/keep-a-changelog,olivierlacan/keep-a-changelog
316855e8230f114bdf409b59809c86bed2dd27bc
build/wrapper.template.js
build/wrapper.template.js
(function(){var g={}; (function(window){%output%}.bind(g,this))(); if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka; else if (typeof(define)!="undefined")define(function(){return g.shaka}); else this.shaka=g.shaka; })();
(function(){var g={}; (function(window){%output%}.bind(g,this))(); if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka; else if (typeof(define)!="undefined" && define.amd)define(function(){return g.shaka}); else this.shaka=g.shaka; })();
Check for define.amd along with typeof(define)
Check for define.amd along with typeof(define) To prevent crashing with other module loaders that support `define`, but are not full AMD module loaders, check for `define.amd` as well before defining the AMD module.
JavaScript
apache-2.0
brightcove/shaka-player,priyajeet/shaka-player,priyajeet/shaka-player,baconz/shaka-player,cmgrecu/shaka-player,sanbornhnewyyz/shaka-player,Afrostream/shaka-player,treejames/shaka-player,baconz/shaka-player,vimond/shaka-player,treejames/shaka-player,tvoli/shaka-player,ustudio/shaka-player,TheModMaker/shaka-player,samdut...
cea824e63e4db6953c05ac67a1c9923f1f48abfc
test/129026_cog_sog_rapid_update.js
test/129026_cog_sog_rapid_update.js
var chai = require("chai"); chai.Should(); chai.use(require('chai-things')); describe('129026 COG & SOG, Rapid Update', function () { it('complete sentence converts', function () { var tree = require("../n2kMapper.js").toNested( JSON.parse('{"timestamp":"2014-08-15-18:00:10.005","prio":"2","src":"160","ds...
var chai = require("chai"); chai.Should(); chai.use(require('chai-things')); chai.use(require('signalk-schema').chaiModule); describe('129026 COG & SOG, Rapid Update', function () { it('complete sentence converts', function () { var tree = require("../n2kMapper.js").toNested( JSON.parse('{"timestamp":"20...
Fix 129026 COG & SOG
Fix 129026 COG & SOG
JavaScript
apache-2.0
SignalK/n2k-signalk
7624bbab290982806204b03df05d23e8932a11a7
test/feature/Scope/BlockBinding6.js
test/feature/Scope/BlockBinding6.js
function testBlock() { // Test function expressions. { var x = function g() { return 'g'; } || function h() { return 'h'; }; return x; } } // ---------------------------------------------------------------------------- var result = testBlock(); assertEquals('g', result()); assertEquals('g', result.name)...
function testBlock() { // Test function expressions. { var x = function g() { return 'g'; } || function h() { return 'h'; }; return x; } } // ---------------------------------------------------------------------------- var result = testBlock(); assertEquals('g', result());
Remove test that tests function instance name since that is non standard
Remove test that tests function instance name since that is non standard
JavaScript
apache-2.0
ide/traceur,ide/traceur,ide/traceur
49253300460d315b475feca48a0727ad50d6dd13
test/monkeyPatchSinonStackFrames.js
test/monkeyPatchSinonStackFrames.js
// Monkey-patch sinon.create to patch all created spyCall instances // so that the top stack frame is a predictable string. // Prevents every test from failing when the test suite is updated. module.exports = function (sinon) { // Copied from test/monkeyPatchSinonStackFrames.js function patchCall(call) { ...
// Monkey-patch sinon.create to patch all created spyCall instances // so that the top stack frame is a predictable string. // Prevents every test from failing when the test suite is updated. module.exports = function (sinon) { function isSpy(value) { return value && typeof value.id === 'string' && ...
Test suite: Fix overeager monkey-patching of the sinon.stub return value that made sinon.createStubInstance() return an object with getCall and getCalls methods.
Test suite: Fix overeager monkey-patching of the sinon.stub return value that made sinon.createStubInstance() return an object with getCall and getCalls methods.
JavaScript
mit
unexpectedjs/unexpected-sinon,unexpectedjs/unexpected-sinon
84945daecb84911f27dbe4c6911f4cba4c994e78
test/specs/simulation.drone.spec.js
test/specs/simulation.drone.spec.js
const { generateRandom } = require('../../server/simulation/drone'); describe('generateRandom()', () => { const sampleArguments = {coords: {lat: 1, long: 1}, distance: 1000 }; test('returns an object', () => { expect( typeof generateRandom(sampleArguments) ).toBe('object'); }); test('returns a...
const { generateRandom } = require('../../server/simulation/drone'); describe('generateRandom()', () => { const sampleArguments = {coords: {lat: 1, long: 1}, distance: 1000 }; test('returns an object', () => { expect( typeof generateRandom(sampleArguments) ).toBe('object'); }); test('returns a...
Add tests to check missions_completed attribute in random drone generator
Add tests to check missions_completed attribute in random drone generator
JavaScript
mit
DAVFoundation/missioncontrol,DAVFoundation/missioncontrol,DAVFoundation/missioncontrol
7c2213c67cbc670a7a4aecd5dbdab47013dca4ed
test/testServer.js
test/testServer.js
/** * Created by Omnius on 18/07/2016. */ 'use strict'; const Hapi = require('hapi'); const HapiAuthBasic = require('hapi-auth-basic'); const HapiAuthHawk = require('hapi-auth-hawk'); const Inert = require('inert'); module.exports = function () { const server = new Hapi.Server(); server.connection({ ...
/** * Created by Omnius on 18/07/2016. */ 'use strict'; const Hapi = require('hapi'); const HapiAuthBasic = require('hapi-auth-basic'); const HapiAuthHawk = require('hapi-auth-hawk'); const Inert = require('inert'); const Handlebars = require('handlebars'); const Vision = require('vision'); const Visionary = require...
Add view manager on test server
Add view manager on test server
JavaScript
mit
identityclash/hapi-login-test,identityclash/hapi-login-test
a11e9cbf5006c81826fdc1d8a79680c3b5097f2e
tests/view.spec.js
tests/view.spec.js
// http://mochajs.org/ // @see http://chaijs.com/api/bdd/ describe('View', function() { var App; var View; var testView; beforeEach(function() { App = window.App; View = App.View; }); afterEach(function() { testView = undefined; App = null; View = null; }); it('should set templa...
// http://mochajs.org/ // @see http://chaijs.com/api/bdd/ describe('View', function() { var App; var View; var testView; beforeEach(function() { App = window.App; View = App.View; }); afterEach(function() { testView = undefined; App = null; View = null; }); it('should set templa...
Add render template with js instructions
Add render template with js instructions
JavaScript
mit
easy-deep-learning/mvc-pure-js,easy-deep-learning/mvc-pure-js
0e5134d71da887d125b228ee773a47935b528c8a
config/adapters.js
config/adapters.js
/** * Global adapter config * * The `adapters` configuration object lets you create different global "saved settings" * that you can mix and match in your models. The `default` option indicates which * "saved setting" should be used if a model doesn't have an adapter specified. * * Keep in mind that options y...
/** * Global adapter config * * The `adapters` configuration object lets you create different global "saved settings" * that you can mix and match in your models. The `default` option indicates which * "saved setting" should be used if a model doesn't have an adapter specified. * * Keep in mind that options y...
Change db config to use postgres. Use secret config file to load connection settings.
Change db config to use postgres. Use secret config file to load connection settings.
JavaScript
mit
thomaslangston/sailsnode
62e63833c58b5ac8068199bb34897569654448e2
reviewboard/static/rb/js/utils/consoleUtils.js
reviewboard/static/rb/js/utils/consoleUtils.js
var _origAssert = console.assert; if (typeof window.console === 'undefined') { window.console = {}; } if (typeof console.log === 'undefined') { console.log = function() {} } /* * console.assert may not behave as we'd hope on all implementations. * On Chrome, for instance, it doesn't raise an exception. So...
var _origAssert; if (typeof window.console === 'undefined') { window.console = {}; } _origAssert = console.assert; if (typeof console.log === 'undefined') { console.log = function() {} } /* * console.assert may not behave as we'd hope on all implementations. * On Chrome, for instance, it doesn't raise an ...
Fix the console fallbacks to not break older browsers.
Fix the console fallbacks to not break older browsers. The console fallbacks were designed to work if no console API was defined, but it still ended up accessing stuff inside of console. It also had some unused code at the end. This has been fixed and should restore compatibility with Firefox 3.x and IE. Fixes bug #2...
JavaScript
mit
custode/reviewboard,chipx86/reviewboard,sgallagher/reviewboard,davidt/reviewboard,custode/reviewboard,davidt/reviewboard,reviewboard/reviewboard,reviewboard/reviewboard,1tush/reviewboard,beol/reviewboard,1tush/reviewboard,brennie/reviewboard,beol/reviewboard,custode/reviewboard,beol/reviewboard,custode/reviewboard,chip...
d7253c7ddde991aa57eb607e8888758ff6fc27b8
client/views/home/home.js
client/views/home/home.js
Template.home.rendered = function () { initInfiniteScroll.call(this, 'topics'); }; Template.home.destroyed = function () { stopInfiniteScroll.call(this); }; Template.home.helpers({ topics: function() { return Topics.find(); }, moreTopics: function () { return Topics.find().count() > Session.get('topicsLimi...
Template.home.rendered = function () { initInfiniteScroll.call(this, 'topics'); }; Template.home.destroyed = function () { stopInfiniteScroll.call(this); }; Template.home.helpers({ topics: function() { return Topics.find(); }, moreTopics: function () { return Topics.find().count() === Session.get('itemsLim...
Fix infinite scroll loading helper
Fix infinite scroll loading helper
JavaScript
mit
erasaur/binary,erasaur/binary,erasaur/binary
f3c665de8dc05b474e8b7ec993b1354cf028505c
src/filters.js
src/filters.js
(function() { 'use strict'; var app = angular.module('bonito-filters', []); /** * Print large number using prefixes (k, M, G, etc.) to * keep their size short and to be friendlier to the poor non-robots. * Adapted from: https://gist.github.com/thomseddon/3511330 */ app.filter('humanNumber', functi...
(function() { 'use strict'; var app = angular.module('bonito-filters', []); /** * Print large number using prefixes (k, M, G, etc.) to * keep their size short and to be friendlier to the poor non-robots. * Adapted from: https://gist.github.com/thomseddon/3511330 */ app.filter('humanNumber', functi...
Fix NaN when input is 0
Fix NaN when input is 0
JavaScript
apache-2.0
tsg/bonito,tsg/bonito
2075a9bb23763def637f025c551e7cb1044312a8
config/mongoose.js
config/mongoose.js
const config = require('config'); const mongooseOptions = { useNewUrlParser: true, useFindAndModify: false, useCreateIndex: true, useUnifiedTopology: true, readPreference: 'secondaryPreferred', // Has MongoDB prefer secondary servers for read operations. appname: 'subscriptions', // Displays th...
const config = require('config'); const mongooseOptions = { useNewUrlParser: true, useFindAndModify: false, useCreateIndex: true, useUnifiedTopology: false, readPreference: 'secondaryPreferred', // Has MongoDB prefer secondary servers for read operations. appname: 'subscriptions', // Displays t...
Disable mongo unified topology, see what happens...
Disable mongo unified topology, see what happens...
JavaScript
mit
gfw-api/gfw-subscription-api,gfw-api/gfw-subscription-api,gfw-api/gfw-subscription-api
59040c2d68bae66da58e4abe8c54ab0ec9142823
website/addons/googledrive/static/node-cfg.js
website/addons/googledrive/static/node-cfg.js
'use strict'; var ko = require('knockout'); var AddonNodeConfig = require('js/addonNodeConfig').AddonNodeConfig; var url = window.contextVars.node.urls.api + 'googledrive/config/'; new AddonNodeConfig('Google Drive', '#googledriveScope', url, '#googledriveGrid', { decodeFolder: (function(folder_name) { ...
'use strict'; var AddonNodeConfig = require('js/addonNodeConfig').AddonNodeConfig; var url = window.contextVars.node.urls.api + 'googledrive/config/'; new AddonNodeConfig('Google Drive', '#googledriveScope', url, '#googledriveGrid', { decodeFolder: (function(folder_name) { return decodeURIComp...
Remove knockout requirement, as it is not used by the custom functions
Remove knockout requirement, as it is not used by the custom functions
JavaScript
apache-2.0
dplorimer/osf,laurenrevere/osf.io,njantrania/osf.io,hmoco/osf.io,Johnetordoff/osf.io,icereval/osf.io,barbour-em/osf.io,jolene-esposito/osf.io,caneruguz/osf.io,mattclark/osf.io,binoculars/osf.io,fabianvf/osf.io,KAsante95/osf.io,caneruguz/osf.io,HalcyonChimera/osf.io,caneruguz/osf.io,asanfilippo7/osf.io,CenterForOpenScie...
1d23855155e98688fc1c8b85612e5532c52cc3a3
lib/client.js
lib/client.js
var _ = require('lodash'); var Client = module.exports = function(config) { if (! config) { config = {}; } this.version = config.version || '1'; this._apiSetup(); }; Client.prototype._apiSetup = function() { var api = require('./v' + this.version + '/api.js'); // Extend the Client object with the a...
var _ = require('lodash'); var Client = module.exports = function(config) { if (! config) { config = {}; } this.version = config.version || '3'; this._apiSetup(); }; Client.prototype._apiSetup = function() { var api = require('./v' + this.version + '/api.js'); // Extend the Client object with the a...
Change default API version to v3
Change default API version to v3
JavaScript
mit
sungwoncho/node-ufc-api
89755b9c7da113508ccc5715d7d62a8ee44a809a
config/dependency-lint.js
config/dependency-lint.js
/* eslint-env node */ 'use strict'; module.exports = { allowedVersions: { 'ember-getowner-polyfill': '^1.0.0 || ^2.0.0', 'ember-inflector': '^1.0.0 || ^2.0.0', 'ember-runtime-enumerable-includes-polyfill': '^1.0.0 || ^2.0.0', 'ember-require-module': '^0.1', } };
/* eslint-env node */ 'use strict'; module.exports = { allowedVersions: { 'ember-cli-string-helpers': '^1.4.0', //temporary workaround for conflict with ember-light-table 'ember-getowner-polyfill': '^1.0.0 || ^2.0.0', 'ember-inflector': '^1.0.0 || ^2.0.0', 'ember-runtime-enumerable-includes-polyfill'...
Allow multiple versions of ember-cli-string-helpers
Allow multiple versions of ember-cli-string-helpers This is a temporary workaround for a conflict with ember-light-table
JavaScript
mit
thecoolestguy/frontend,thecoolestguy/frontend,ilios/frontend,djvoa12/frontend,dartajax/frontend,ilios/frontend,jrjohnson/frontend,dartajax/frontend,jrjohnson/frontend,djvoa12/frontend
88b360cc27fb12df1d683b3221535a0fdd36a570
web/src/js/lib/models/LayerModel.js
web/src/js/lib/models/LayerModel.js
cinema.models.LayerModel = Backbone.Model.extend({ constructor: function (defaults, options) { Backbone.Model.call(this, {}, options); if (typeof defaults === 'string') { this.setFromString(defaults); } else if (defaults) { this.set('state', defaults); } ...
cinema.models.LayerModel = Backbone.Model.extend({ constructor: function (defaults, options) { Backbone.Model.call(this, {}, options); if (typeof defaults === 'string') { this.setFromString(defaults); } else if (defaults) { this.set('state', defaults); } ...
Fix layer model serialize method to use new organization
Fix layer model serialize method to use new organization
JavaScript
bsd-3-clause
Kitware/cinema,Kitware/cinema,Kitware/cinema,Kitware/cinema
676117cba78bb0269ce1b8d46d760fe779e2b09e
migrations/20170329060832-rename_allowence_to_allowance.js
migrations/20170329060832-rename_allowence_to_allowance.js
'use strict'; module.exports = { up: function (queryInterface, Sequelize) { return queryInterface.renameColumn('Departments', 'allowence', 'allowance'); }, down: function (queryInterface, Sequelize) { return queryInterface.renameColumn('Departments', 'allowance', 'allowence'); } };
'use strict'; var models = require('../lib/model/db'); module.exports = { up: function (queryInterface, Sequelize) { if ('sqlite' === queryInterface.sequelize.getDialect()) { console.log('Going into SQLIite case'); return queryInterface // Create Temp Departments based on current model de...
Add SQLite specific logic for recent migration.
Add SQLite specific logic for recent migration. It appeared that out of box renameColumn looses some meta inforamtion for subject column.
JavaScript
mit
YulioTech/timeoff,YulioTech/timeoff,timeoff-management/application,timeoff-management/application
45d0b315423946df17853708bf0d48005b92544b
webroot/js/responsive/app.module.js
webroot/js/responsive/app.module.js
(function() { 'use strict'; angular .module('app', ['ngMaterial', 'ngMessages', 'ngCookies', 'ngSanitize']) .config(['$mdThemingProvider', '$mdIconProvider', '$httpProvider', function($mdThemingProvider, $mdIconProvider, $httpProvider) { $mdThemingProvider.theme('default') ...
(function() { 'use strict'; angular .module('app', ['ngMaterial', 'ngMessages', 'ngCookies', 'ngSanitize']) .config(['$mdThemingProvider', '$mdIconProvider', '$httpProvider', '$cookiesProvider', function( $mdThemingProvider, $mdIconProvider, $httpProvider, $cookiesProvider )...
Set global path and +1 month expiration date in angular cookies
Set global path and +1 month expiration date in angular cookies
JavaScript
agpl-3.0
Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2
5bf9c027fa2896d8cb41750904a2631c3391b508
example/backend/passport.js
example/backend/passport.js
'use strict'; var passport = require('passport'), BitbucketTokenStrategy = require('../../lib/index'), User = require('mongoose').model('User'); module.exports = function () { passport.use(new BitbucketTokenStrategy({ clientID: 'app-id', clientSecret: 'client-secret' apiVersion: '1.0', ...
'use strict'; var passport = require('passport'), BitbucketTokenStrategy = require('../../lib/index'), User = require('mongoose').model('User'); module.exports = function () { passport.use(new BitbucketTokenStrategy({ clientID: 'app-id', clientSecret: 'client-secret', apiVersion: '1.0', ...
Fix type in backend example
Fix type in backend example
JavaScript
mit
GenFirst/passport-bitbucket-token
6ca34a9c9c51ea5bc8d4abd99a78952834e04385
examples/Basic/index.ios.js
examples/Basic/index.ios.js
import React from 'react-native'; const { AppRegistry, Component, Text, View } = React; import NavigationBar from 'react-native-navbar'; class Basic extends Component { render() { return ( <View style={{ flex: 1, backgroundColor: '#ff9900' }}> <NavigationBar title={{ title: 'Title...
import React from 'react-native'; const { AppRegistry, Component, Text, View } = React; import NavigationBar from 'react-native-navbar/ios'; class Basic extends Component { render() { return ( <View style={{ flex: 1, backgroundColor: '#ff9900' }}> <NavigationBar title={{ title: 'T...
Use iOS version of nabar
Use iOS version of nabar
JavaScript
mit
Kureev/react-native-navbar,react-native-fellowship/react-native-navbar
08c8816c5a5267257cbd72b1ab292adcd219373e
backend/server/db/model/files.js
backend/server/db/model/files.js
/** * @fileOverview * @name files.js * @author V. Glenn Tarcea <glenn.tarcea@gmail.com> * @license */ module.exports = function(r) { 'use strict'; return { countInProject: countInProject }; function *countInProject(ids, projectID) { let rql = r.table('datafiles').getAll.apply(this...
/** * @fileOverview * @name files.js * @author V. Glenn Tarcea <glenn.tarcea@gmail.com> * @license */ module.exports = function(r) { 'use strict'; return { countInProject: countInProject }; function *countInProject(ids, projectID) { let rql = r.table('datafiles').getAll(r.args(ids...
Update how we call getAll to properly parse out an array of keys using r.args() rather than doing getAll.apply(this, items) (which doesn't work).
Update how we call getAll to properly parse out an array of keys using r.args() rather than doing getAll.apply(this, items) (which doesn't work).
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
2d40e0c1366e403ab50be6c9aaa603a67825a4c8
packages/ember-data/lib/transforms/base.js
packages/ember-data/lib/transforms/base.js
/** The `DS.Transform` class is used to serialize and deserialize model attributes when they are saved or loaded from an adapter. Subclassing `DS.Transform` is useful for creating custom attributes. All subclasses of `DS.Transform` must implement a `serialize` and a `deserialize` method. Example ```java...
/** The `DS.Transform` class is used to serialize and deserialize model attributes when they are saved or loaded from an adapter. Subclassing `DS.Transform` is useful for creating custom attributes. All subclasses of `DS.Transform` must implement a `serialize` and a `deserialize` method. Example ```java...
Add a better transform example
Add a better transform example
JavaScript
mit
fsmanuel/data,wecc/data,lostinpatterns/data,pdud/data,hibariya/data,ryanpatrickcook/data,sammcgrail/data,eriktrom/data,swarmbox/data,duggiefresh/data,mphasize/data,bf4/data,rtablada/data,PrecisionNutrition/data,bf4/data,davidpett/data,martndemus/data,rtablada/data,swarmbox/data,heathharrelson/data,fpauser/data,funtusov...
784943c1278e479382c7f26f1f65aa53bb28517d
test/config.js
test/config.js
module.exports = { appKey : 'mgb7ka1nbs3wg', appSecret : 'm1Rv2MHHND', token : { userId : '0001', name : 'TestUser', portraitUri : 'http://rongcloud.cn/images/logo.png' }, message : { fromUserId : '546eb521c613156d331e91bb', toUserId : '5460603c1002a6e311f89e7f', textMsg : 'Hello, world!' }...
module.exports = { appKey : 'mgb7ka1nbs3wg', appSecret : 'm1Rv2MHHND', token : { userId : '0001', name : 'TestUser', portraitUri : 'http://rongcloud.cn/images/logo.png' }, message : { fromUserId : '546eb521c613156d331e91bb', toUserId : '5460603c1002a6e311f89e7f', textMsg : 'Hello, world!' }...
Add more chat room infos.
Add more chat room infos.
JavaScript
mit
rongcloud/server-sdk-nodejs,coocon/server-sdk-nodejs
443be4271f06692f65b00054c2ec725b02fc6b0b
client/app/components/todos-list/component.js
client/app/components/todos-list/component.js
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'ul', channel: Ember.inject.service(), });
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'ul', channel: Ember.inject.service(), didInsertElement: function(){ var socket = this.get('channel').socket(); socket.connect(); var chan = socket.chan("todos:list", {}); chan.join().receive("ok", chan => { consol...
Connect to our channel:topic as really basic test.
Connect to our channel:topic as really basic test.
JavaScript
mit
cincinnati-elixir/todos_phoenix_ember_example,cincinnati-elixir/todos_phoenix_ember_example,cincinnati-elixir/todos_phoenix_ember_example
35a09e0e9d366e06a3eacea63b5aefe6b18c6cf4
sample/testParser.js
sample/testParser.js
const AnnotationParser = require(__dirname+"/../").AnnotationParser; const Request = require(__dirname+"/myannotations/Request"); AnnotationParser.parse( __dirname+"/annotatedFile.js", __dirname+"/myannotations/", (err, annotatedElements) => { if (err) { console.log(err); } else...
const AnnotationParser = require(__dirname+"/../").AnnotationParser; const Request = require(__dirname+"/myannotations/Request"); try { let annotatedElements = AnnotationParser.parse(__dirname+"/annotatedFile.js", __dirname+"/myannotations/"); for (let i in annotatedElements) { if (typeof annotatedEle...
Update to support Synchronous Parsing
Update to support Synchronous Parsing
JavaScript
mit
anupam-git/nodeannotations
9652df246c011d31aa3b6d68ea5155d2d846dabc
src/db/user-queries.js
src/db/user-queries.js
const db = require('./db') const pgp = require('pg-promise')() const userQueries = { createUser: (name, email, password) => { return db.one(` INSERT INTO users (name, email, password) VALUES ($1, $2, $3) RETURNING id`, [name, email, password]) .then(pgp.end()) .catch((error) => { ...
const db = require('./db') const pgp = require('pg-promise')() // NOTE: remove pgp.end and .catch once they are handled elsewhere const userQueries = { createUser: (name, email, password) => { return db.(` INSERT INTO users (name, email, password) VALUES ($1, $2, $3) RETURNING id`, [name,...
Add note for refactoring once other parts are built
Add note for refactoring once other parts are built
JavaScript
mit
EmmaEm/Roam,EmmaEm/Roam
d4421c2a43112c2c1a702ddfd6ce9219967744c7
tests/index.js
tests/index.js
var Jasmine = require("jasmine"); var jasmine = new Jasmine(); var config = { spec_dir: "", spec_files: ["tests/**/*.js", "app/**/tests/index.js", "app/**/tests.js"], helpers: [], stopSpecOnExpectationFailure: false, random: false }; // Pass in a custom test glob for running only specific tests if (process.e...
var Jasmine = require("jasmine"); var jasmine = new Jasmine(); var config = { spec_dir: "", spec_files: ["tests/**/*.js", "app/**/tests/index.js", "app/**/tests.js"], helpers: [], stopSpecOnExpectationFailure: true, random: false }; // Pass in a custom test glob for running only specific tests if (process.en...
Stop testing spec on failure
Stop testing spec on failure
JavaScript
cc0-1.0
davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot
45fcea40fe53c784145d015d30f0846926cf01f9
src/client/es6/controller/cart-blog-list.js
src/client/es6/controller/cart-blog-list.js
import CartBase from './base/cart-base.js'; class CartBlogListCtrl extends CartBase { constructor($scope, ...args) { super(...args); this.logInit('CartBlogListCtrl'); this.$scope = $scope; this.postList = []; this.init(); } init() { if (!this.apiService.isDataInitialized()) { /...
import CartBase from './base/cart-base.js'; class CartBlogListCtrl extends CartBase { constructor($scope, $timeout, ...args) { super(...args); this.logInit('CartBlogListCtrl'); this.$scope = $scope; this.$timeout = $timeout; this.postList = []; this.init(); } init() { if (!this.a...
Use $timeout to make $apply functions go to the next digest, to prevent "$digest already in progress".
Use $timeout to make $apply functions go to the next digest, to prevent "$digest already in progress".
JavaScript
mit
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
8cb0444c4ebd9d4ea42d92942eb02899c14e011b
src/components/providers/cdg/Prefs/Prefs.js
src/components/providers/cdg/Prefs/Prefs.js
import React from 'react' export default class Prefs extends React.Component { static propTypes = { prefs: React.PropTypes.object.isRequired, setPrefs: React.PropTypes.func.isRequired, providerRefresh: React.PropTypes.func.isRequired, } toggleEnabled = this.toggleEnabled.bind(this) handleRefresh =...
import React from 'react' export default class Prefs extends React.Component { static propTypes = { prefs: React.PropTypes.object.isRequired, setPrefs: React.PropTypes.func.isRequired, providerRefresh: React.PropTypes.func.isRequired, } setEnabled = this.setEnabled.bind(this) handleRefresh = this....
FIx warning and remove use of preventDefault on checkbox
FIx warning and remove use of preventDefault on checkbox
JavaScript
isc
bhj/karaoke-forever,bhj/karaoke-forever
dade414e6dad3bae1f358f6132f30858a6958c8e
src/githubpusher/frontend/static/install.js
src/githubpusher/frontend/static/install.js
function register() { navigator.serviceWorker.register("sw.js", {scope: '/'}).then( function(serviceWorkerRegistration) { serviceWorkerRegistration.pushManager.subscribe().then( function(pushSubscription) { console.log(pushSubscription.endpoint); var data = new FormData(); ...
function register() { navigator.serviceWorker.register("sw.js", {scope: '/'}); navigator.serviceWorker.ready.then( function(swr) { swr.pushManager.subscribe().then( function(pushSubscription) { var data = new FormData(); data.append('endpoint', pushSubscription.endpoint); ...
Use serviceWorker.ready.then before calling subscribe
Use serviceWorker.ready.then before calling subscribe
JavaScript
apache-2.0
dougt/githubwebpush,dougt/githubwebpush,dougt/githubwebpush
039bda9c3ffb82749732ef1109c869c3a733d003
posts/index.js
posts/index.js
module.exports = [ { "title": "BibleJS NPM Module" , "slug": "bible-js" , "publishedAt": "25-05-2014" , "content": "bible-js.md" } , { "title": "Testing Code Highlight" , "slug": "testing-code-highlight" , "publishedAt": "18-05-2014" , "content": "testing-co...
module.exports = [ { "title": "BibleJS NPM Module" , "slug": "bible-js" , "publishedAt": "25-05-2014" , "path": "bible-js.md" } , { "title": "Testing Code Highlight" , "slug": "testing-code-highlight" , "publishedAt": "18-05-2014" , "path": "testing-code-hig...
Save name of md file in path field
Save name of md file in path field
JavaScript
mit
IonicaBizau/ionicabizau.net,IonicaBizau/ionicabizau.net
60679fa6c82d5b858d9323bfeff41612c6b8b7b3
lib/parser.js
lib/parser.js
var sax = require('sax') var parser = {} parser.stream = function () { return sax.createStream({ trim: true, normalize: true, lowercase: true }) } parser.capture = function (stream) { return new Promise(function (resolve, reject) { var frames = [{}] stream.on('opentagstart', (node) => frame...
var sax = require('sax') var parser = {} parser.stream = function () { return sax.createStream({ trim: true, normalize: true, lowercase: true }) } parser.capture = function (stream) { return new Promise(function (resolve, reject) { var frames = [{}] stream.on('opentagstart', (node) => frame...
Throw an error if the XML is invalid.
Throw an error if the XML is invalid.
JavaScript
mpl-2.0
Schoonology/boardgamegeek
902bf0c2a79c6967ad339adee867893e86763663
lib/runner.js
lib/runner.js
var util = require("util"); var thunkify = require("thunkify"); var spawn = require("child_process").spawn; var debug = require("debug")("offload:runner"); var runner = function(cmd, args, body, cb){ debug("preping job"); var envCopy = util._extend({}, process.env); envCopy.OFFLOAD_WORKSPACE = this.workspace; ...
var util = require("util"); var thunkify = require("thunkify"); var spawn = require("child_process").spawn; var debug = require("debug")("offload:runner"); var runner = function(cmd, args, body, cb){ debug("preping job"); var envCopy = util._extend({}, process.env); envCopy.OFFLOAD_WORKSPACE = this.workspace; ...
Send back stderr for command-line jobs
Send back stderr for command-line jobs
JavaScript
mit
socialtables/offload
b58c49d85de57f7def4917f0df99fec2391f2114
app/sentry.js
app/sentry.js
var Raven = require('raven-js'); Raven .config('https://fde1d4c9741e4ef3a3416e4e88b61392@sentry.data.gouv.fr/17', { ignoreUrls: [ /^file:\/\//i ] }) .addPlugin(require('raven-js/plugins/angular'), window.angular) .install();
var Raven = require('raven-js'); Raven .config('https://fde1d4c9741e4ef3a3416e4e88b61392@sentry.data.gouv.fr/17', { whitelistUrls: [ /mes-aides\.gouv\.fr/ ], ignoreUrls: [ /^file:\/\//i ] }) .addPlugin(require('raven-js/plugins/angular'), window.angul...
Add production domain to whitelistUrls.
Add production domain to whitelistUrls.
JavaScript
agpl-3.0
sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui
66ca45a0a094507eb319ba594c9a4030128dc776
index.js
index.js
var GraphemeBreaker = require('grapheme-breaker'); var assign = require('object-assign'); /** * Extracts a section of a string and returns a new string. */ function slice(str, beginSlice, endSlice) { return GraphemeBreaker.break(str) .slice(beginSlice, endSlice) .join(''); } /** * Truncates string if it’...
var GraphemeBreaker = require('grapheme-breaker'); var assign = require('object-assign'); /** * Extracts a section of a string and returns a new string. */ function slice(str, beginSlice, endSlice) { return GraphemeBreaker.break(str) .slice(beginSlice, endSlice) .join(''); } /** * Truncates string if it’...
Fix truncate incorrectly handling length < omission.length
Fix truncate incorrectly handling length < omission.length
JavaScript
mit
Lokiedu/grapheme-utils
64ffd76107741f8894faf91f3de1d2fc54682bbf
index.js
index.js
var express = require('express'); var app = express(); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/dist')); // views is directory for all template files // app.set('views', __dirname + '/views'); // app.set('view engine', 'ejs'); app.get('/', function(request, response) { res...
var express = require('express'); var app = express(); app.set('port', (process.env.PORT || 5000)); app.use(express.static(__dirname + '/dist')); app.listen(app.get('port'), function() { console.log('Node app is running on port', app.get('port')); });
Trim out old demo code
Trim out old demo code
JavaScript
mit
RobEasthope/lazarus,RobEasthope/lazarus
2e045cd85f4e1ce600eeecd378c51184a8d60776
schema/me/update_collector_profile.js
schema/me/update_collector_profile.js
import gravity from '../../lib/loaders/gravity'; import { CollectorProfileType } from './collector_profile'; import { GraphQLBoolean, } from 'graphql'; export default { type: CollectorProfileType, decription: 'Updating a collector profile (loyalty applicant status).', args: { loyalty_applicant: { typ...
import gravity from '../../lib/loaders/gravity'; import { CollectorProfileType } from './collector_profile'; import { GraphQLBoolean, } from 'graphql'; export default { type: CollectorProfileType, decription: 'Updating a collector profile (loyalty applicant status).', args: { loyalty_applicant: { typ...
Switch to PUT over POST
Switch to PUT over POST
JavaScript
mit
mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,mzikherman/metaphysics-1,broskoski/metaphysics,craigspaeth/metaphysics,craigspaeth/metaphysics,artsy/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1
c9f287a5f683a53eed3b18646f29b047c410ea4f
src/updater/updaters/MerchandisesUpdater.js
src/updater/updaters/MerchandisesUpdater.js
const Updater = require('./Updater'); const SplatNet = require('../splatnet'); const { getOriginalGear } = require('../../js/splatoon'); class MerchandisesUpdater extends Updater { constructor() { super({ name: 'Merchandises', filename: 'merchandises.json', request: (spl...
const Updater = require('./Updater'); const SplatNet = require('../splatnet'); const { getOriginalGear } = require('../../js/splatoon'); class MerchandisesUpdater extends Updater { constructor() { super({ name: 'Merchandises', filename: 'merchandises.json', request: (spl...
Remove original_gear brand data from merchandises.json
Remove original_gear brand data from merchandises.json This is a bit redundant and doesn't really add anything we don't already have.
JavaScript
mit
misenhower/splatoon2.ink,misenhower/splatoon2.ink,misenhower/splatoon2.ink
269ccb8878f11531b71df3dbb1d990317b2a275b
server.js
server.js
var express = require('express'); var port = process.env.PORT || 3333; var app = express(); app.use(express.static(__dirname + '/dev/patterns')); app.get('/', function (req, res) { res.sendFile('index.html'); }); app.listen(port);
var express = require('express'); var port = process.env.PORT || 3333; var app = express(); // Controlling shutdown of nodemon // https://github.com/remy/nodemon#controlling-shutdown-of-your-script process.once('SIGUSR2', function () { process.kill(process.pid, 'SIGUSR2'); }); app.use(express.static(__dirname + '/...
Add process killer for controlling shutdown of nodemon When manually starting and stopping `npm run dev` script, which includes nodemon, the nodemon process doesn't always exit cleanly. This code (I think) controls the shutdown process so that there's always a clean exit
Add process killer for controlling shutdown of nodemon When manually starting and stopping `npm run dev` script, which includes nodemon, the nodemon process doesn't always exit cleanly. This code (I think) controls the shutdown process so that there's always a clean exit
JavaScript
apache-2.0
carbon-design-system/carbon-components,carbon-design-system/carbon-components,carbon-design-system/carbon-components
c5e1d62e88221c0780c04683b8f66a01a4008f75
server.js
server.js
'use strict' const express = require('express') const Slapp = require('slapp') const ConvoStore = require('slapp-convo-beepboop') const Context = require('slapp-context-beepboop') // use `PORT` env var on Beep Boop - default to 3000 locally var port = process.env.PORT || 3000 var slapp = Slapp({ // Beep Boop sets ...
'use strict' const express = require('express') const Slapp = require('slapp') const ConvoStore = require('slapp-convo-beepboop') const Context = require('slapp-context-beepboop') // use `PORT` env var on Beep Boop - default to 3000 locally var port = process.env.PORT || 3000 var slapp = Slapp({ // Beep Boop sets ...
Test of regex is the issue
Test of regex is the issue
JavaScript
mit
andreascreten/zoom-links
bb0e24071e545d06b62d1028f53bfa0a0850361d
index.js
index.js
'use strict'; var isSvg = require('is-svg'); var SVGO = require('svgo'); var through = require('through2'); module.exports = function (opts) { opts = opts || {}; return through.ctor({objectMode: true}, function (file, enc, cb) { if (file.isNull()) { cb(null, file); return; } if (file.isStream()) { ...
'use strict'; var isSvg = require('is-svg'); var SVGO = require('svgo'); var through = require('through2'); module.exports = function (opts) { opts = opts || {}; return through.ctor({objectMode: true}, function (file, enc, cb) { if (file.isNull()) { cb(null, file); return; } if (file.isStream()) { ...
Return the original file if SVGO fails
Return the original file if SVGO fails
JavaScript
mit
imagemin/imagemin-svgo
b22c3e01fb12c170f651f92758241ddf1499990b
index.js
index.js
module.exports = asString module.exports.add = append function asString(fonts) { var href = getHref(fonts) return '<link href="' + href + '" rel="stylesheet" type="text/css">' } function asElement(fonts) { var href = getHref(fonts) var link = document.createElement('link') link.setAttribute('href', href) ...
module.exports = asString module.exports.add = append function asString(fonts) { var href = getHref(fonts) return '<link href="' + href + '" rel="stylesheet" type="text/css">' } function asElement(fonts) { var href = getHref(fonts) var link = document.createElement('link') link.setAttribute('href', href) ...
Use a protocol relative URL so the package can be used other HTTPS as well
Use a protocol relative URL so the package can be used other HTTPS as well
JavaScript
mit
hughsk/google-fonts,hughsk/google-fonts
e81cde0e9247ef9b52e50bada6eb2cc0e804ddf4
src/systems/simulation/handle-collisions.js
src/systems/simulation/handle-collisions.js
"use strict"; var onEntityDelete = require("splat-ecs/lib/systems/box-collider").onEntityDelete; function getCamera(entities) { return entities[1]; } module.exports = function(ecs, data) { // eslint-disable-line no-unused-vars ecs.addEach(function(entity, elapsed) { // eslint-disable-line no-unused-vars if (enti...
"use strict"; var onEntityDelete = require("splat-ecs/lib/systems/box-collider").onEntityDelete; function getCamera(entities) { return entities[1]; } module.exports = function(ecs, data) { // eslint-disable-line no-unused-vars ecs.addEach(function(entity, elapsed) { // eslint-disable-line no-unused-vars if (enti...
Attach to player, not other things
Attach to player, not other things
JavaScript
mit
TwoScoopGames/Cluster-Junk,TwoScoopGames/Cluster-Junk,TwoScoopGames/Cluster-Junk
c46bdbc1225dc1883c71cb6c32363573d7beab28
server.js
server.js
var express = require('express') var expressApp = express() var path = require('path') var pickerApp = require('./src/bootstrap') var registerRoutes = require('./src/routes') var port = 8080 // Open up the static files expressApp.use(express.static('dist')) // Serve index.html expressApp.get('/', function(req, res) ...
var express = require('express') var expressApp = express() var path = require('path') var pickerApp = require('./src/bootstrap') var registerRoutes = require('./src/routes') var port = 8080 // Open up the static files expressApp.use(express.static(path.join(__dirname + '/dist'))) // Serve index.html expressApp.get(...
Use absolute path for serving static files
Use absolute path for serving static files
JavaScript
mit
cvalarida/name-picker,cvalarida/name-picker
266d52354571e3f341996e1fa1c74c490f290a75
src/transformers/importExportDeclaration.js
src/transformers/importExportDeclaration.js
import replacePath from "../helpers/replacePath"; export default function (t, path, state, {toMatch, toRemove, toReplace}) { const pathIsImportDeclaration = path.isImportDeclaration(); const pathToMatch = path.get("source"), pathToRemove = pathIsImportDeclaration && !path.node.specifiers.length && path, pathToRe...
import replacePath from "../helpers/replacePath"; const replaceImport = (t, replacementObj, pathToReplace) => { const props = []; let firstDeclaration, firstIdentifier; for(let specifier of pathToReplace.node.specifiers) { if(t.isImportNamespaceSpecifier(specifier)) { firstDeclaration = t.variableDeclarator(...
Allow to replace named imports with objects per property
feat(transformers): Allow to replace named imports with objects per property
JavaScript
mit
Velenir/babel-plugin-import-redirect
0662a23ca1b5b9ac8fd09cd3b94fcf79ccbe37d3
server/frontend/components/Landing.js
server/frontend/components/Landing.js
import React, { PropTypes, Component } from 'react'; import d3 from 'd3'; //import * as parcoords from './lib/d3.parcoords.js'; import Parallel from './Parallel.js'; export default class Landing extends Component { constructor() { super(); this.state = {data: []} } // componentDidMount() { // d3....
import React, { PropTypes, Component } from 'react'; import d3 from 'd3'; //import * as parcoords from './lib/d3.parcoords.js'; import Parallel from './Parallel.js'; export default class Landing extends Component { constructor() { super(); this.state = {data: []} } // componentDidMount() { // d3....
Clean up test text from landing page
Clean up test text from landing page
JavaScript
mit
benjaminhoffman/Encompass,benjaminhoffman/Encompass,benjaminhoffman/Encompass
d80648f8854a168d33eec16bbac453ebbf0b4820
lib/jsdom/living/aborting/AbortSignal-impl.js
lib/jsdom/living/aborting/AbortSignal-impl.js
"use strict"; const { setupForSimpleEventAccessors } = require("../helpers/create-event-accessor"); const EventTargetImpl = require("../events/EventTarget-impl").implementation; const Event = require("../generated/Event"); class AbortSignalImpl extends EventTargetImpl { constructor(args, privateData) { super()...
"use strict"; const { setupForSimpleEventAccessors } = require("../helpers/create-event-accessor"); const EventTargetImpl = require("../events/EventTarget-impl").implementation; const Event = require("../generated/Event"); class AbortSignalImpl extends EventTargetImpl { constructor(args, privateData) { super()...
Set abort event isTrusted to true
Set abort event isTrusted to true
JavaScript
mit
mzgol/jsdom,mzgol/jsdom,mzgol/jsdom,tmpvar/jsdom,tmpvar/jsdom
0e54f763654fc79af4005e49dae810c1478fe128
server.js
server.js
var express = require('express'); var childProcess = require('child_process'); var middleware = require('./config/initializers/middleware.js'); var router = require('./config/routes.js'); var host = process.env.HOST; var port = process.env.PORT || 4000; var app = express(); middleware.configure(app); router.route(app)...
var express = require('express'); var childProcess = require('child_process'); var middleware = require('./config/initializers/middleware.js'); var router = require('./config/routes.js'); var host = process.env.HOST; var port = process.env.PORT || 4000; var app = express(); middleware.configure(app); router.route(app)...
Add child process for payments monitor
[FEATURE] Add child process for payments monitor
JavaScript
isc
zealord/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,zealord/gatewayd,xdv/gatewayd
d05d48d6ab8a4fc29412f74247a028ff3921e215
index.js
index.js
'use strict'; var PluginError = require('plugin-error'), through = require('through2'), inlineCss = require('inline-css'); module.exports = function (opt) { return through.obj(function (file, enc, cb) { var self = this, _opt = JSON.parse(JSON.stringify(opt || {})); // 'url' op...
'use strict'; var PluginError = require('plugin-error'), through = require('through2'), inlineCss = require('inline-css'); module.exports = function (opt) { return through.obj(function (file, enc, cb) { var self = this, _opt = JSON.parse(JSON.stringify(opt || {})); // 'url' op...
Convert file to string before sending downstream.
Convert file to string before sending downstream.
JavaScript
mit
jonkemp/gulp-inline-css,jonkemp/gulp-inline-css
a1939530519f310e7e4e957b9360ac125ace618a
index.js
index.js
var Batcher = require('byte-stream') var manualMergeStream = require('manual-merge-stream') var diff2daff = require('diff2daff') module.exports = function (diffStream, opts, merge) { if (!opts) { opts = {} } var limit = (opts.limit || 20) * 2 var batchStream = Batcher(limit) var vizFn = opts.vizFn || dif...
var Batcher = require('byte-stream') var manualMergeStream = require('manual-merge-stream') var diff2daff = require('diff2daff') module.exports = function (diffStream, opts, merge) { if (!opts) { opts = {} } var limit = (opts.limit || 20) * 2 var batchStream = Batcher(limit) var opts = { vizFn: opts...
Use new manual-merge-stream vizFn opts
Use new manual-merge-stream vizFn opts
JavaScript
bsd-2-clause
karissa/knead,finnp/knead
14c2d99e593603f4cd49a1b152f30dbc19ac9cf5
index.js
index.js
/* eslint-env node */ 'use strict'; const htmlTags = require('html-tags'); const diff = require('lodash/difference'); const compileCSS = require('broccoli-postcss'); const removeableElements = () => { const whitelistedTags = ['html', 'body']; const removeableTags = diff(htmlTags, whitelistedTags); const { getIt...
/* eslint-env node */ 'use strict'; const htmlTags = require('html-tags'); const diff = require('lodash/difference'); const merge = require('lodash/merge'); const compileCSS = require('broccoli-postcss'); const removeableElements = () => { const whitelistedTags = ['html', 'body']; const removeableTags = diff(htmlT...
Remove classes that are not present in application
Remove classes that are not present in application
JavaScript
mit
fauxton/ember-tachyons-sweeper,fauxton/ember-tachyons-sweeper
3ab481b770d2aeb7aba08a73733043210cb6fb99
index.js
index.js
#!/usr/bin/env node console.log("Starting bert. Type 'exit' when you're done.") // TODO: run file watcher // TODO: add command line option to specify logs location let logDir = resolveHome('~/.bert/'); // create the log directory if it doesn't already exist createDirectory(logDir); // start `script` var spawn = requ...
#!/usr/bin/env node console.log("Starting bert. Type 'exit' when you're done.") // TODO: run file watcher // TODO: add command line option to specify logs location let logDir = resolveHome('~/.bert/'); // create the log directory if it doesn't already exist createDirectory(logDir); // start `script` var spawn = requ...
Disable script start and end messages
Disable script start and end messages
JavaScript
mit
oliveroneill/bert
781a59f0ae255040bebd4d3ea54de70b812c049f
express/models/rule_parser.js
express/models/rule_parser.js
// L-System Rule Parser function RuleParser(str) { this.str = str; this.rules = {}; this.parse = function() { var c, d; var env = 0; var rule_str; var variable; for (var i = 0; i < this.str.length; i++) { c = this.str[i]; if (i > 0) { d = this.str[i-1]; } else { d = null;...
// L-System Rule Parser function RuleParser(str) { this.str = str; this.rules = {}; this.parse = function() { var c, d; var env = 0; var rule_str; var variable; for (var i = 0; i < this.str.length; i++) { c = this.str[i]; if (i > 0) { d = this.str[i-1]; } else { d = null;...
Allow control char as rule "variable"
Allow control char as rule "variable"
JavaScript
bsd-3-clause
dwjackson/html_fractals
a3238411dc7bde812d20ee6385f3be8e2eefd548
index.js
index.js
'use strict'; var React = require('react'); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var Range = Reac...
'use strict'; var React = require('react'); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var Range = Reac...
Check if user passes in their own keyDown function
Check if user passes in their own keyDown function
JavaScript
isc
mapbox/react-range
468570966eb500348066665bc29177c218b663d3
tests/unit/odata/execute-odata-CRUD-test.js
tests/unit/odata/execute-odata-CRUD-test.js
import Ember from 'ember'; import { module, test } from 'qunit'; import ODataAdapter from 'ember-flexberry-data/adapters/odata'; import startApp from '../../helpers/start-app'; import config from '../../../../dummy/config/environment'; export default function executeTest(testName, callback) { if (config.APP.testOD...
import Ember from 'ember'; import { module, test } from 'qunit'; import ODataAdapter from 'ember-flexberry-data/adapters/odata'; import startApp from '../../helpers/start-app'; import config from '../../../../dummy/config/environment'; export default function executeTest(testName, callback) { if (config.APP.testOD...
Fix execute-odata helper base-store now default
Fix execute-odata helper base-store now default
JavaScript
mit
Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections
b62e6b8b50dd8f7c45bab95b1986c73a14ff27f0
server.js
server.js
// Import modules var connect = require('connect'); var http = require('http'); var serveStatic = require('serve-static'); // Create middleware functions, from nodeJS, to set up server var app = connect(); app.use(serveStatic('./dist')); app.use(serveStatic('./')); // Start server console.log('Starting webserver on h...
// Import modules var connect = require('connect'); var http = require('http'); var serveStatic = require('serve-static'); var fs = require('fs'); var url = require('url'); // Create middleware functions, from nodeJS, to set up server var app = connect(); app.use(serveStatic('./dist')); app.use(serveStatic('./')); //...
Add lines for another app.use() for coveringall expected URLs to be used in the SPA (Single Page App). Tried to come up with a regex to replace the basic regex on line 23. Function was written by Chad Killingsworth as an in-class example, in the msu-calendar project.
Add lines for another app.use() for coveringall expected URLs to be used in the SPA (Single Page App). Tried to come up with a regex to replace the basic regex on line 23. Function was written by Chad Killingsworth as an in-class example, in the msu-calendar project. I learned how the first block of statements are rel...
JavaScript
mit
NBumgardner/YouTube-Notes,NBumgardner/YouTube-Notes
534f5464d21d3b7ff5485422169e31366ddb1c41
index.js
index.js
var core = require("./core"); var prompt = require("prompt-sync")(); var fs = require("fs"); var env = process.env.NODE_ENV || "development"; module.exports = function(filepath, password) { var out = fs.readFileSync(filepath).toString(); var json = JSON.parse(out); if(!password) { if(env === "development")...
var core = require("./core"); var prompt = require("./bin/prompt"); var fs = require("fs"); var env = process.env.NODE_ENV || "development"; module.exports = function(filepath, password) { var out = fs.readFileSync(filepath).toString(); var json = JSON.parse(out); if(!password) { if(env === "development") ...
Fix for js API to store in key chain
Fix for js API to store in key chain
JavaScript
mit
orangemug/encrypt-conf
729e73e920ddfd4beb67d4558e7dc17a1fb648df
project/src/js/ui/tournament/tournamentCtrl.js
project/src/js/ui/tournament/tournamentCtrl.js
import socket from '../../socket'; import * as utils from '../../utils'; import * as xhr from './tournamentXhr'; import socketHandler from './socketHandler'; import helper from '../helper'; import m from 'mithril'; const tournament = m.prop([]); export default function controller() { let id = m.route.param('id'); ...
import socket from '../../socket'; import * as utils from '../../utils'; import * as xhr from './tournamentXhr'; import socketHandler from './socketHandler'; import helper from '../helper'; import m from 'mithril'; export default function controller() { const tournament = m.prop([]); function reload (data) { ...
Make tournament a private variable of controller
Make tournament a private variable of controller
JavaScript
mit
btrent/lichobile,btrent/lichobile,btrent/lichobile,btrent/lichobile
2a284b62b649a352ddaa3810790ab26ef76edc3e
index.js
index.js
module.exports = function styleInject (css, returnValue) { css = css || ''; var head = document.head || document.getElementsByTagName('head')[0]; var style = document.createElement('style'); style.type = 'text/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(do...
module.exports = function styleInject (css, returnValue) { if (typeof document === 'undefined') { return returnValue; } css = css || ''; var head = document.head || document.getElementsByTagName('head')[0]; var style = document.createElement('style'); style.type = 'text/css'; if (style.styleSheet){ ...
Allow usage in isomorphic components
Allow usage in isomorphic components Any dependency of this package will fail if run in a Node environment. This commit allows code to be run on the server by simply returning if no `document` is available.
JavaScript
mit
egoist/style-inject
1d7229a91ce127276235fa327ec33d8aba1335f9
index.js
index.js
/** * Module dependencies */ var request = require('superagent') , _ = require('underscore'); // Factory module.exports = function (opts) { return new Affilinet(opts); }; // Api endpoint var endpoint = 'http://product-api.affili.net/V3/productservice.svc/JSON/SearchProducts'; var Affilinet = function Affilinet...
/** * Module dependencies */ var request = require('superagent') , _ = require('underscore'); // Factory module.exports = function (opts) { return new Affilinet(opts); }; // Api endpoint var endpoint = 'http://product-api.affili.net/V3/productservice.svc/JSON/SearchProducts'; var Affilinet = function Affilinet...
Remove byte order indicator before attempting parse
Remove byte order indicator before attempting parse Really? Really? Really? Really?
JavaScript
mit
urgeiolabs/node-affilinet-lookup
8d5527791bcc7f664a784e7e8554d700815a47a1
play-audio.js
play-audio.js
module.exports = function(RED) { function PlayAudioNode(config) { RED.nodes.createNode(this,config); var node = this; this.on('input', function(msg) { RED.comms.publish("playaudio", msg.payload); }); } RED.nodes.registerType("play audio", PlayAudioNode); }
module.exports = function(RED) { function PlayAudioNode(config) { RED.nodes.createNode(this,config); var node = this; this.on('input', function(msg) { if(Buffer.isBuffer(msg.payload)){ RED.comms.publish("playaudio", msg.payload); } }); } RED.nodes.registerType("play audio", PlayAudioNode); }
Make sure input data is a buffer
Make sure input data is a buffer
JavaScript
apache-2.0
lorentzlasson/node-red-contrib-play-audio,lorentzlasson/node-red-contrib-play-audio
39dc300c60583cfa66cec96b01869f4ec33286d5
examples/basic/babel.config.js
examples/basic/babel.config.js
module.exports = { presets: [ [ '@babel/env', { debug: true, modules: false, useBuiltIns: 'usage', }, ], '@babel/react', ], plugins: ['@babel/plugin-proposal-class-properties'], };
module.exports = { presets: [ [ '@babel/env', { modules: false, useBuiltIns: 'usage', }, ], '@babel/react', ], plugins: ['@babel/plugin-proposal-class-properties'], };
Disable Babel debug mode in the basic example
Chore: Disable Babel debug mode in the basic example
JavaScript
mit
styleguidist/react-styleguidist,sapegin/react-styleguidist,sapegin/react-styleguidist,styleguidist/react-styleguidist,styleguidist/react-styleguidist
6ae83b945f7ca90b5886e50c4dbcb848cd5deab8
public/javascripts/home/index.js
public/javascripts/home/index.js
$(function() { var pageToFetch = 2; $(".more").click(function() { $(this).addClass("loading"); $.get("/home/mock_set", {page: pageToFetch}, function(data) { $(".more").removeClass("loading"); if (data.trim().length > 0) { $(data).insertBefore('.more'); } if (pageToFetch === ...
$(function() { var pageToFetch = 2; var prevQueryLength = 0; $(".more").click(function() { $(this).addClass("loading"); $.get("/home/mock_set", {page: pageToFetch}, function(data) { $(".more").removeClass("loading"); if (data.trim().length > 0) { $(data).insertBefore('.more'); }...
Improve mockr project search speed
Improve mockr project search speed As a hackathon project, we use some smarter search techniques to hide and show fewer list elements when each search is performed. For each keystroke, this narrows down or broadens the existing list instead of hiding and showing everything. This is motivated by the slowdown in speed ...
JavaScript
mit
causes/mockr,causes/mockr,causes/mockr
3b59fd06535fa25aa9611259a0eaf82e38df6a81
editor/collections/commands.js
editor/collections/commands.js
var Q = require("q"); var _ = require("hr.utils"); var Collection = require("hr.collection"); var logger = require("hr.logger")("commands"); var Command = require("../models/command"); var Commands = Collection.extend({ model: Command, // Initialize initialize: function() { Commands.__super__.ini...
var Q = require("q"); var _ = require("hr.utils"); var Collection = require("hr.collection"); var logger = require("hr.logger")("commands"); var Command = require("../models/command"); var Commands = Collection.extend({ model: Command, // Initialize initialize: function() { Commands.__super__.ini...
Fix error message when command not found
Fix error message when command not found
JavaScript
apache-2.0
CodeboxIDE/codebox,indykish/codebox,kustomzone/codebox,quietdog/codebox,nobutakaoshiro/codebox,nobutakaoshiro/codebox,rodrigues-daniel/codebox,blubrackets/codebox,Ckai1991/codebox,LogeshEswar/codebox,code-box/codebox,ahmadassaf/Codebox,rodrigues-daniel/codebox,listepo/codebox,quietdog/codebox,LogeshEswar/codebox,ahmada...
27e6e8d24e213c9d7fb787a5103222c8ef28f1fe
src/article/converter/r2t/FootnoteConverter.js
src/article/converter/r2t/FootnoteConverter.js
import { findChild, findAllChildren } from '../util/domHelpers' export default class FootnoteConverter { get type () { return 'fn' } get tagName () { return 'fn' } import (el, node, importer) { // TODO: at some point we want to retain the label and determine if the label should be treated as custom // ...
import { findChild, findAllChildren } from '../util/domHelpers' import { getLabel } from '../../shared/nodeHelpers' // TODO: at some point we want to retain the label and determine if the label should be treated as custom // or be generated. export default class FootnoteConverter { get type () { return 'fn' } get...
Fix export of footnote labels.
Fix export of footnote labels.
JavaScript
mit
substance/texture,substance/texture
9ee1f3962dc33d4f0a431b81ac375900af3b866d
src/components/views/elements/AppPermission.js
src/components/views/elements/AppPermission.js
import React from 'react'; import PropTypes from 'prop-types'; import url from 'url'; export default class AppPermission extends React.Component { constructor(props) { super(props); const curl = this.getCurl(); this.state = { curl: curl, }; console.log('curl', c...
import React from 'react'; import PropTypes from 'prop-types'; import url from 'url'; export default class AppPermission extends React.Component { constructor(props) { super(props); const curl = this.getCurl(); this.state = { curl: curl, }; console.log('curl', c...
Set display URL from wurl if curl not specified.
Set display URL from wurl if curl not specified.
JavaScript
apache-2.0
matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk
e0f1af644da67217118f9b49caaac8d30816fd34
src/createDisposableWorker.js
src/createDisposableWorker.js
export const createDisposableWorker = response => { const URL = window.URL || window.webkitURL const blob = new Blob([response], { type: 'application/javascript' }) // eslint-disable-line const worker = new Worker(URL.createObjectURL(blob)) // eslint-disable-line worker.post = message => new Promise((resolv...
export const createDisposableWorker = response => { const URL = window.URL || window.webkitURL const blob = new Blob([response], { type: 'application/javascript' }) // eslint-disable-line const objectURL = URL.createObjectURL(blob) const worker = new Worker(objectURL) // eslint-disable-line worker.post = mess...
Fix object URL not being revoked at when the worker is not being used anymore
Fix object URL not being revoked at when the worker is not being used anymore
JavaScript
mit
israelss/simple-web-worker,israelss/simple-web-worker
2e52ced1b1d03db640618ae2eba5cb6851435dd3
components/subreddit/post-row.js
components/subreddit/post-row.js
const React = require('react-native'); const { Image, Text, StyleSheet, View, } = React; module.exports = React.createClass({ render: function() { const data = this.props.rowData.data; var Thumbnail; if (data.thumbnail) { Thumbnail = ( <Image source={{uri: data.thumbnail}} style={...
const React = require('react-native'); const { Image, Text, StyleSheet, View, } = React; module.exports = React.createClass({ render: function() { const data = this.props.rowData.data; var Thumbnail; if (data.thumbnail) { Thumbnail = ( <Image source={{uri: data.thumbnail}} style={...
Add post meta to individual rows
Add post meta to individual rows When viewing posts meta is shown below the title, including the subreddit, the domain it was posted to, and the author.
JavaScript
mit
BlakeWilliams/newred
935bb29bd5116a08a476592b49214d312d871244
src/addon/pnacl/lib/axiom_pnacl/executables.js
src/addon/pnacl/lib/axiom_pnacl/executables.js
// Copyright (c) 2014 The Axiom Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import AxiomError from 'axiom/core/error'; import environment from 'axiom_shell/environment'; import PnaclCommand from 'axiom_pnacl/pnacl_command'; //...
// Copyright (c) 2014 The Axiom Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import AxiomError from 'axiom/core/error'; import environment from 'axiom_shell/environment'; import PnaclCommand from 'axiom_pnacl/pnacl_command'; //...
Fix running python by setting PYTHONHOME to '/'.
Fix running python by setting PYTHONHOME to '/'.
JavaScript
apache-2.0
umop/axiom_old_private,chromium/axiom,rpaquay/axiom,ussuri/axiom,mcanthony/axiom
f9923404dd63dc4ea1288dabde34332fb3ca8b58
pkg/time/index.js
pkg/time/index.js
const timeout = (dispatch, props) => setTimeout(() => dispatch(props.action), props.delay) const interval = (dispatch, props) => { const id = setInterval(() => { dispatch(props.action, Date.now()) }, props.delay) return () => clearInterval(id) } const getTime = (dispatch, props) => dispatch(props.action, ...
const timeout = (dispatch, props) => setTimeout(() => dispatch(props.action), props.delay) const interval = (dispatch, props) => { const id = setInterval(() => { dispatch(props.action, Date.now()) }, props.delay) return () => clearInterval(id) } const getTime = (dispatch, props) => dispatch(props.action, ...
Use valid jsdoc comment syntax
Use valid jsdoc comment syntax
JavaScript
mit
hyperapp/hyperapp,hyperapp/hyperapp,jbucaran/hyperapp
2c0bd5dfeef5aaff007f5a1ff0391bdc89c16276
app/assets/javascripts/factsheet/drawLegend.js
app/assets/javascripts/factsheet/drawLegend.js
/* globals I18n $ */ /** * Given the definition for a chart, returns an array of <div/> elements * describing each series in the chart. */ function drawLegend(definition, periods) { var showPeriods = periods || ['future']; var list = definition.map(function(series) { var key = series.key.replace(/_/g, '-')...
/* globals I18n $ */ /** * Given the definition for a chart, returns an array of <div/> elements * describing each series in the chart. */ function drawLegend(definition, periods) { var showPeriods = periods || ['future']; var list = definition.map(function(series) { var key = series.key.replace(/_/g, '-')...
Remove hard-coded TJ unit from legends
Factsheet: Remove hard-coded TJ unit from legends
JavaScript
mit
quintel/etmodel,quintel/etmodel,quintel/etmodel,quintel/etmodel
f301299ba20a0067f44d86e359bf1814d810a9a1
public/app/ui/components/search/results/SearchResultsComponent.js
public/app/ui/components/search/results/SearchResultsComponent.js
(function () { 'use strict'; define( [ 'lodash', 'knockout', 'config/routes', 'util/container' ], function (_, ko, routes, container) { return function (parameters) { var typeFor = function (result) { ...
(function () { 'use strict'; define( [ 'lodash', 'knockout', 'config/routes', 'util/container' ], function (_, ko, routes, container) { return function (parameters) { var typeFor = function (result) { ...
Add missing error handling logic.
Add missing error handling logic.
JavaScript
mit
rwahs/research-frontend,rwahs/research-frontend
53827506709f2a501bb4328b848cfbf470dac5e7
app/js/app/controllers/AdminPageControllers.js
app/js/app/controllers/AdminPageControllers.js
/** * Copyright 2014 Ian Davies * * 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 * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
/** * Copyright 2014 Ian Davies * * 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 * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in...
Fix bug introduced in previous commit.
Fix bug introduced in previous commit.
JavaScript
mit
ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app
19dfa3f30e552f3cfed7e176262a3282d0380a19
lib/commit-panel-component.js
lib/commit-panel-component.js
/** @babel */ /** @jsx etch.dom */ import etch from 'etch' import StagingAreaComponent from './staging-area-component' export default class CommitPanelComponent { constructor ({repository}) { this.repository = repository etch.initialize(this) } destroy () { this.subscription.dispose() return et...
/** @babel */ /** @jsx etch.dom */ import etch from 'etch' import StagingAreaComponent from './staging-area-component' export default class CommitPanelComponent { constructor ({repository}) { this.repository = repository etch.initialize(this) } destroy () { this.subscription.dispose() return et...
Delete extra div that's not needed for position purposes
:fire: Delete extra div that's not needed for position purposes
JavaScript
mit
atom/github,atom/github,atom/github
e78b0b6f4c8ddd378da9c3e5c81d59cfd5746617
src/main/resources/static/js/script.js
src/main/resources/static/js/script.js
$('body').scrollspy({ target: '.bs-docs-sidebar', offset: 40 });
$('body').scrollspy({ target: '.bs-docs-sidebar', offset: 40 }); if ($('textarea#content').length > 0) { var regex = new RegExp('https?://[^\\s]*', 'g'); var subst = new Array(24).join('.'); $('label[for="content"]').append('<div class="small text-muted">(<span id="charcount">0</span> of 140 chars)</div>')...
Add JS char counter for Tweet content
Add JS char counter for Tweet content
JavaScript
epl-1.0
spinfo/autoChirp,spinfo/autoChirp,spinfo/autoChirp
b78f6e0e9f8a9ca3e7c8c096400dd32428550397
lib/fs/readdir-directories.js
lib/fs/readdir-directories.js
// Read all filenames from directory and it's subdirectories 'use strict'; var fs = require('fs') , aritize = require('es5-ext/lib/Function/aritize').call , curry = require('es5-ext/lib/Function/curry').call , invoke = require('es5-ext/lib/Function/invoke') , k = require('es5-ext/lib/Function/k'...
// Read all filenames from directory and it's subdirectories 'use strict'; var fs = require('fs') , aritize = require('es5-ext/lib/Function/prototype/aritize') , invoke = require('es5-ext/lib/Function/invoke') , k = require('es5-ext/lib/Function/k') , a2p = require('deferred/lib/async-to-promi...
Update up to changes in es5-ext
Update up to changes in es5-ext
JavaScript
mit
medikoo/node-ext
5293f49e247b3cb8617e943f7e0b33431de8d1ae
assets/js/components/page-header-date-range.js
assets/js/components/page-header-date-range.js
/** * PageHeaderDateRange component. * * Site Kit by Google, Copyright 2020 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE...
/** * PageHeaderDateRange component. * * Site Kit by Google, Copyright 2020 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE...
Remove unnecessary filter from within .
Remove unnecessary filter from within .
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
d7107ec75e0be80a100705ce790f593f4014df90
lib/server/plugins/map/src.js
lib/server/plugins/map/src.js
var fs = require('fs'), path = require('path'), _ = require('lodash'), gulp = require('gulp'), through = require('through2'), file = require('gulp-file'); module.exports = mapSrcPlugin; var contents = {}; /** * @ignore * Loads `map.json` into stream. * @alias "map.src" * @param {Object} data ...
var fs = require('fs'), path = require('path'), _ = require('lodash'), gulp = require('gulp'), through = require('through2'), file = require('gulp-file'); module.exports = mapSrcPlugin; var contents = {}; function requireFresh (src) { delete require.cache[require.resolve(src)]; return req...
Allow watching changes in modules map for ymb dev mode
Allow watching changes in modules map for ymb dev mode
JavaScript
mpl-2.0
yandex/yms
7fcb5b81f41088cdcb780e6c42dd529f8160ced5
src/js/app/global.js
src/js/app/global.js
import Helper from "./Helper"; const h = new Helper; export let userItems; if (h.detectEnvironment() === "development") { userItems = "./src/data/list.json"; } else if (h.detectEnvironment() === "production") { userItems = global.process.resourcesPath + "/app/src/data/list.json"; } else { throw `global |...
import Helper from "./Helper"; const h = new Helper; export let userItems; export let settings; if (h.detectEnvironment() === "development") { userItems = "./src/data/list.json"; settings = "./src/data/settings.json"; } else if (h.detectEnvironment() === "production") { userItems = global.process.resourc...
Fix wrong path to settings in production
Fix wrong path to settings in production
JavaScript
mpl-2.0
LosEagle/MediaWorld,LosEagle/MediaWorld
f8e2bc8801ddda5301f4ff7c473ee72583c442e8
src/lib/analytics.js
src/lib/analytics.js
import GoogleAnalytics from 'react-ga'; GoogleAnalytics.initialize('UA-30688952-5', { debug: (process.env.NODE_ENV !== 'production'), titleCase: true, sampleRate: 100, forceSSL: true }); export default GoogleAnalytics;
import GoogleAnalytics from 'react-ga'; GoogleAnalytics.initialize('UA-30688952-5', { debug: (process.env.NODE_ENV !== 'production'), titleCase: true, sampleRate: (process.env.NODE_ENV === 'production') ? 100 : 0, forceSSL: true }); export default GoogleAnalytics;
Make sure GA events are not transmitted outside of production
Make sure GA events are not transmitted outside of production
JavaScript
bsd-3-clause
cwillisf/scratch-gui,LLK/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui,cwillisf/scratch-gui
ae9d478e9abecb289c875ac9069dbff0dba96bcb
src/utils/storage.js
src/utils/storage.js
export default class Storage { }
import fs from 'fs' export default class Storage { static async addHistoryItem (title, url) { return new Promise((resolve, reject) => { if (title != null && url != null) { // Get today's date. let today = new Date() let dd = today.getDate() let mm = today.getMonth() + 1 ...
Add saving & reading history functions
Add saving & reading history functions
JavaScript
apache-2.0
Nersent/Wexond,Nersent/Wexond
46c0243fce1efc22a61998033f45956d88ed6421
tools/static-assets/server/npm-rebuild-args.js
tools/static-assets/server/npm-rebuild-args.js
// Command-line arguments passed to npm when rebuilding binary packages. var args = [ "rebuild", // The --no-bin-links flag tells npm not to create symlinks in the // node_modules/.bin/ directory when rebuilding packages, which helps // avoid problems like https://github.com/meteor/meteor/issues/7401. "--no-...
// Command-line arguments passed to npm when rebuilding binary packages. var args = [ "rebuild", // The --no-bin-links flag tells npm not to create symlinks in the // node_modules/.bin/ directory when rebuilding packages, which helps // avoid problems like https://github.com/meteor/meteor/issues/7401. "--no-...
Support additional `meteor rebuild` flags via environment variable.
Support additional `meteor rebuild` flags via environment variable.
JavaScript
mit
Hansoft/meteor,chasertech/meteor,mjmasn/meteor,Hansoft/meteor,chasertech/meteor,mjmasn/meteor,chasertech/meteor,mjmasn/meteor,chasertech/meteor,mjmasn/meteor,Hansoft/meteor,chasertech/meteor,Hansoft/meteor,chasertech/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,Hansoft/meteor,chasertech/meteor,mjmasn/meteor,mjmas...
4d1935449f76de2fb775a6a70518e2a897e32b90
src/content-tooltip/constants.js
src/content-tooltip/constants.js
export const TOOLTIP_DEFAULT_OPTION = true export const POSITION_DEFAULT_OPTION = 'mouse' export const HIGHLIGHTS_DEFAULT_OPTION = true export const HIGHLIGHTS_STORAGE_NAME = 'memex_link_highlights' export const TOOLTIP_STORAGE_NAME = 'memex_link_tooltip' export const POSITION_STORAGE_NAME = 'memex_link_position' expor...
export const TOOLTIP_DEFAULT_OPTION = true export const POSITION_DEFAULT_OPTION = 'mouse' export const HIGHLIGHTS_DEFAULT_OPTION = true export const HIGHLIGHTS_STORAGE_NAME = 'memex_link_highlights' export const TOOLTIP_STORAGE_NAME = 'memex_link_tooltip' export const POSITION_STORAGE_NAME = 'memex_link_position' expor...
Change keyboard shortcut defaults to shift+
Change keyboard shortcut defaults to shift+
JavaScript
mit
WorldBrain/WebMemex,WorldBrain/WebMemex
951089170b2b7c3e9e53f292c537165bbd1c5551
lib/mailer/transporter.js
lib/mailer/transporter.js
const nodemailer = require('nodemailer') const config = require('../config') let opts = config.get('mailer.service') ? config.get('mailer') : config.get('nodemailer') // Use directTransport when nothing is configured if (opts && Object.keys(opts).length === 0) { opts = undefined } const transport = opts ? no...
const nodemailer = require('nodemailer') const config = require('../config') let opts = config.get('mailer.service') ? config.get('mailer') : config.get('nodemailer') // Use directTransport when nothing is configured if (opts && Object.keys(opts).length === 0) { opts = undefined } const transport = opts ? no...
Fix Cannot set property 'mailer' of undefined error
Fix Cannot set property 'mailer' of undefined error
JavaScript
mit
DemocracyOS/notifier
2136ad411edde6f3f2208acc12ce204c2d7137c6
lib/collections/projects.js
lib/collections/projects.js
Projects = new Mongo.Collection('projects'); Meteor.methods({ insertProject: function(projectAttributes) { check(Meteor.userId(), String); check(projectAttributes, { name: Match.Where(function(val) { check(val, String); return val.length > 0; }), description: String }); ...
Projects = new Mongo.Collection('projects'); Meteor.methods({ insertProject: function(projectAttributes) { check(Meteor.userId(), String); check(projectAttributes, { name: Match.Where(function(val) { check(val, String); return val.length > 0; }), description: String }); ...
Update request status to 'accepted'
Update request status to 'accepted'
JavaScript
mit
PUMATeam/puma,PUMATeam/puma
4e6ebfc002b096753575f9bc966ffe30e201411f
test/git-describe.js
test/git-describe.js
/* * Copyright 2017 HM Revenue & Customs * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
/* * Copyright 2017 HM Revenue & Customs * * 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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
Switch execFile out for spawn and flatten args in tests
Switch execFile out for spawn and flatten args in tests
JavaScript
apache-2.0
hmrc/node-git-versioning
6fa2ccc5eee5e7d3fa76a989a029f4a8ba6ee0a7
app.js
app.js
var express = require('express'), app = express(), swig = require('swig'); var bodyParser = require('body-parser'); var https = require('https'), config = require('./config'); app.engine('html', swig.renderFile); app.set('view engine', 'html'); app.set('views', __dirname + '/pages'); app.set('view cache', false); sw...
var express = require('express'), app = express(), swig = require('swig'); var bodyParser = require('body-parser'); var https = require('https'), config = require('./config'); app.engine('html', swig.renderFile); app.set('view engine', 'html'); app.set('views', __dirname + '/pages'); app.set('view cache', false); sw...
Convert debug info to string
Convert debug info to string
JavaScript
mit
iveysaur/PiCi
17d489ce36b25598ee22a6eec5570b5395fd52c3
app.js
app.js
var express = require('express'); var bunyan = require('bunyan'); var log = bunyan.createLogger({ name: 'app' }); var app = express(); var pkg = require('./index.js'); pkg.boot(app, 'somesecret'); app.post('/', pkg.router(function(req, res, event) { log.info(req.body); switch (event) { case 'ping': ...
var express = require('express'); var bunyan = require('bunyan'); var log = bunyan.createLogger({ name: 'app' }); var app = express(); var pkg = require('./index.js'); pkg.boot(app, 'somesecret'); app.post('/', pkg.router(function(req, res, event) { log.info(req.body, event); switch (event) { case 'ping...
Add the event to the log
Add the event to the log
JavaScript
mit
datashaman/datashaman-webhooks
a8688da380bd94ecc62c3b3e5591e39358fe2e05
app.js
app.js
const express = require('express'); const app = express(); const port = 3000; require('./middleware.js')(app, express); app.listen(port, function() { console.log('Now listening on port', port); }); module.exports = app;
const express = require('express'); const app = express(); const port = process.env.PORT || 3000; require('./middleware.js')(app, express); app.listen(port, function() { console.log('Now listening on port', port); }); module.exports = app;
Fix server port for Heroku deployment
Fix server port for Heroku deployment
JavaScript
mit
MapReactor/SonderServer,aarontrank/SonderServer,aarontrank/SonderServer,MapReactor/SonderServer
f72cae72a9227502282e63d5bacb7c520cbfdf73
app.js
app.js
var WebSocketServer = require('websocket').server; var http = require('http'); var argv = require('yargs') .alias('e', 'exec') .default('port', 8080) .alias('p', 'password') .describe('p', 'Set a specific password to the WebSocket server') .demand(['e']) .argv; var controllers = require('./lib/connectio...
var WebSocketServer = require('websocket').server; var http = require('http'); var argv = require('yargs') .alias('e', 'exec') .default('port', 8080) .alias('p', 'password') .alias('ssl', 'https') .boolean('ssl') .describe('ssl', 'Add https support') .describe('ssl-key', 'Route to SSL key') ...
ADD https flags and flags improvement
ADD https flags and flags improvement
JavaScript
mit
Drag0s/node-websocketd
6935fb259a228bca7d11ac173e23c56235d235dc
app.js
app.js
/* * Mailchimp AJAX form submit VanillaJS * Vanilla JS * Author: Michiel Vandewalle * Github author: https://github.com/michiel-vandewalle * Github project: https://github.com/michiel-vandewalle/Mailchimp-AJAX-form-submit-vanillaJS */ (function () { document.getElementsByTagName('form')[0].addEventListener('...
/* * Mailchimp AJAX form submit VanillaJS * Vanilla JS * Author: Michiel Vandewalle * Github author: https://github.com/michiel-vandewalle * Github project: https://github.com/michiel-vandewalle/Mailchimp-AJAX-form-submit-vanillaJS */ (function () { if (document.getElementsByTagName('form').length > 0) { ...
Make sure the subscribe form is available before running the script
Make sure the subscribe form is available before running the script
JavaScript
mit
michiel-vandewalle/Mailchimp-AJAX-form-submit-vanillaJS,michiel-vandewalle/Mailchimp-AJAX-form-submit-vanillaJS
857435f7c5981286f2ac479661f5d60ad8360f45
cli.js
cli.js
#!/usr/bin/env node 'use strict'; var npmMan = require('./'); var help = require('help-version')(usage()).help, minimist = require('minimist'), manPager = require('man-pager'), defaultPager = require('default-pager'); function usage() { return 'Usage: npm-man [--no-man] <package>'; } var opts = min...
#!/usr/bin/env node 'use strict'; var npmMan = require('./'); var help = require('help-version')(usage()).help, minimist = require('minimist'), manPager = require('man-pager'), defaultPager = require('default-pager'); function usage() { return 'Usage: npm-man [--no-man] <package>'; } var opts = min...
Use default pager for Markdown
Use default pager for Markdown
JavaScript
mit
eush77/npm-man
d659a3fb4492ebe6a782ada2407030fc47853487
tests/integration/components/back-link-test.js
tests/integration/components/back-link-test.js
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('back-link', 'Integration | Component | back link', { integration: true }); test('it renders', function(assert) { // Set any properties with this.set('myProperty', 'value'); // Handle any ac...
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('back-link', 'Integration | Component | back link', { integration: true }); test('it renders', function(assert) { this.render(hbs`{{back-link}}`); assert.equal(this.$().text().trim(), 'Back'...
Fix bad test for back-link helper
Fix bad test for back-link helper
JavaScript
mit
ilios/common,ilios/common
a45d5b16fe896c216622f429e0af95eb141f485b
web/src/main/ember/app/serializers/application.js
web/src/main/ember/app/serializers/application.js
import Ember from 'ember'; import DS from 'ember-data'; // Adapted from http://springember.blogspot.com.au/2014/08/using-ember-data-restadapter-with.html export default DS.RESTSerializer.extend({ serializeIntoHash: function(hash, type, record, options) { var serialized = this.serialize(record, options); ...
import Ember from 'ember'; import DS from 'ember-data'; // Adapted from http://springember.blogspot.com.au/2014/08/using-ember-data-restadapter-with.html export default DS.RESTSerializer.extend({ serializeIntoHash: function(hash, type, record, options) { var serialized = this.serialize(record, options); ...
Fix serializer to keep 'false' values
Fix serializer to keep 'false' values
JavaScript
agpl-3.0
MarSik/shelves,MarSik/shelves,MarSik/shelves,MarSik/shelves
d44e463495dc2636253a747018eaafd447d652a6
src/routes/index.js
src/routes/index.js
import React from 'react' import { Router, Route, IndexRoute, browserHistory } from 'react-router' import App from '../containers/App' import Article from '../containers/Article' import Blank from '../containers/Blank' import Category from '../containers/Category' import Home from '../containers/Home' import Photograp...
import React from 'react' import { Router, Route, IndexRoute, browserHistory } from 'react-router' import App from '../containers/App' import Article from '../containers/Article' import Blank from '../containers/Blank' import Category from '../containers/Category' import Home from '../containers/Home' import Photograp...
Add Topic landing page route
[Add] Add Topic landing page route
JavaScript
agpl-3.0
garfieldduck/twreporter-react,twreporter/twreporter-react,nickhsine/twreporter-react,hanyulo/twreporter-react,garfieldduck/twreporter-react,hanyulo/twreporter-react