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
ddaed5d7e81798b4ed4e5db2872469e4468db1b8
server/common/set_language.js
server/common/set_language.js
// Store the preference locale in cookies and (if available) session to use // on next requests. 'use strict'; var _ = require('lodash'); var LOCALE_COOKIE_MAX_AGE = 0xFFFFFFFF; // Maximum 32-bit unsigned integer. module.exports = function (N, apiPath) { N.validate(apiPath, { locale: { type: 'string' } ...
// Store the preference locale in cookies and (if available) session to use // on next requests. 'use strict'; var _ = require('lodash'); var LOCALE_COOKIE_MAX_AGE = 0xFFFFFFFF; // Maximum 32-bit unsigned integer. module.exports = function (N, apiPath) { N.validate(apiPath, { locale: { type: 'string' } ...
Update user locale without fetching user's account.
Update user locale without fetching user's account.
JavaScript
mit
nodeca/nodeca.users
d2d6fbddfbdfe74671f4813d7f3b80582ee11928
gulpfile.js
gulpfile.js
var name = require('./package.json').moduleName, fs = require('fs'), gulp = require('gulp'), plugins = require('gulp-load-plugins')() var head = fs.readFileSync('./node_modules/@electerious/modulizer/head.js', { encoding: 'utf8' }), foot = fs.readFileSync('./node_modules/@electerious/moduliz...
var name = require('./package.json').moduleName, fs = require('fs'), gulp = require('gulp'), plugins = require('gulp-load-plugins')() var head = fs.readFileSync('./node_modules/@electerious/modulizer/head.js', { encoding: 'utf8' }), foot = fs.readFileSync('./node_modules/@electerious/moduliz...
Include sub-folders when watching for changes
Include sub-folders when watching for changes
JavaScript
mit
electerious/scrollSnap,electerious/scrollSnap
2c6bfb27c4b7122ac76db7bd5a1edc1939567fb7
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var mocha = require('gulp-mocha'); var coffee = require('gulp-coffee'); var concat = require('gulp-concat'); require('coffee-script/register'); gulp.task('test', function(){ return gulp.src('./test/**/*.coffee') .pipe(mocha()); }); gulp.task('bundle', function(done) { gu...
var gulp = require('gulp'); var mocha = require('gulp-mocha'); var coffee = require('gulp-coffee'); var concat = require('gulp-concat'); require('coffee-script/register'); gulp.task('test', ['bundle'], function(){ return gulp.src('./test/**/*.coffee') .pipe(mocha()); }); gulp.task('bundle', function(...
Set 'bundle' as a dependency to 'test'
Set 'bundle' as a dependency to 'test' Set 'bundle' as a dependency to 'test'
JavaScript
mit
casesandberg/react-map-styles
1ff930c6b1662558ad6f9ec5a400327f552e42b1
lib/main.js
lib/main.js
const async = require('./async') module.exports = function(providers, cb) { function setup(values) { const currentValues = results.reduce(( pre, cur ) => Object.assign(pre, cur), {}) cb(null, { get: key => currentValues[key], getDynamic: key => () => currentValues[key], all: c...
const async = require('./async') module.exports = function(providers, cb) { function setup(values) { const currentValues = results.reduce(( pre, cur ) => Object.assign(pre, cur), {}) cb(null, { get: key => currentValues[key], getDynamic: key => () => currentValues[key], all: c...
Simplify passing read to merge call
Simplify passing read to merge call
JavaScript
apache-2.0
reneweb/dvar,reneweb/dvar
ddb525f99c03dd70c41325eca6e00ddfd454fcdd
middleware/get_macaroon_user_secret.js
middleware/get_macaroon_user_secret.js
var MacaroonAuthUtils = require("../utils/macaroon_auth.js"); module.exports = function(options) { return function getMacaroonUserSecret(req, res, next) { if(typeof options.collection !== "undefined" && options.collection !== ""){ var userId = ""; if(req.method == "GET" || req...
var mAuthMint = require("mauth").mAuthMint; module.exports = function(options) { return function getMacaroonUserSecret(req, res, next) { if(typeof options.collection !== "undefined" && options.collection !== ""){ var userId = ""; if(req.method == "GET" || req.method == "DELETE"){ ...
Fix require to use new mauth package
Fix require to use new mauth package
JavaScript
bsd-3-clause
Saganus/macaroons-express-demo,Saganus/macaroons-express-demo
fc9513427abdd10d65fc2381c4a4945bbc32c9af
webpack/shared.config.js
webpack/shared.config.js
const CleanWebpackPlugin = require("clean-webpack-plugin") const path = require("path") const webpack = require("webpack") const dist = path.join(process.cwd(), "public") const src = path.join(process.cwd(), "src") //module.exports = { dist, src } module.exports = { entry: [path.join(src, "index.js")], module: { ...
const CleanWebpackPlugin = require("clean-webpack-plugin") const path = require("path") const webpack = require("webpack") const dist = path.join(process.cwd(), "public") const src = path.join(process.cwd(), "src") //module.exports = { dist, src } module.exports = { entry: [path.join(src, "index.js")], module: { ...
Change project root variable in clean plugin
Change project root variable in clean plugin
JavaScript
mit
DevNebulae/ads-pt-api
fefcc30a9cf75496f118c5cfaf09760297f319c7
lib/pint.js
lib/pint.js
"use strict" var _ = require('underscore'), fs = require('fs'), sys = require('sys'), exec = require('child_process').exec, program = require('commander'); var path = require('path'), fs = require('fs'), lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); // CLI program.version('0.0.1')...
"use strict" var _ = require('underscore'), fs = require('fs'), sys = require('sys'), exec = require('child_process').exec, program = require('commander'), path = require('path'); var pintPath = path.join(__dirname, '..'), targetPath = process.cwd() // CLI program.version('0.0.1') .parse(process.argv);...
Change files to be Pintfiles so as not to conflict with Grunt
Change files to be Pintfiles so as not to conflict with Grunt
JavaScript
mit
baer/pint
c4c331cbce72af7d298b8f221648bc2bd8a5c6e8
wave/war/swellrt-beta.js
wave/war/swellrt-beta.js
// SwellRT bootstrap script // A fake SwellRT object to register on ready handlers // before the GWT module is loaded window.swellrt = { onReady: function(handler) { if (!handler || typeof handler !== "function") return; if (!window._lh) window._lh = []; wind...
// SwellRT bootstrap script // A fake SwellRT object to register on ready handlers // before the GWT module is loaded window.swellrt = { onReady: function(handler) { if (!handler || typeof handler !== "function") return; if (window.swellrt.runtime) { handler.apply(window, window.s...
Fix code launching onReady() handlers
Fix code launching onReady() handlers
JavaScript
apache-2.0
P2Pvalue/swellrt,P2Pvalue/swellrt,P2Pvalue/swellrt,Grasia/swellrt,P2Pvalue/swellrt,Grasia/swellrt,Grasia/swellrt,Grasia/swellrt
1cba85bfc369fea8168ef3f7bed0d1747c131e8f
generator/index.js
generator/index.js
var path = require('path'); var util = require('util'); var yeoman = require('yeoman-generator'); module.exports = TestGenerator; // TestGenerator stubs out a very basic test suite during the generation // process of a new generator. // // XXX: // - consider adding _.string API to generators prototype function...
var path = require('path'); var util = require('util'); var yeoman = require('yeoman-generator'); module.exports = TestGenerator; // TestGenerator stubs out a very basic test suite during the generation // process of a new generator. // // XXX: // - consider adding _.string API to generators prototype function...
Update dasherized name to use this._
Update dasherized name to use this._
JavaScript
bsd-2-clause
yeoman/generator-mocha,yeoman/generator-mocha
60bcaf4ec4f4ecf4f0add2d2823eaa8dbcfdb738
lib/plugins/ticker/coinbase/coinbase.js
lib/plugins/ticker/coinbase/coinbase.js
const _ = require('lodash/fp') const axios = require('axios') const BN = require('../../../bn') function getBuyPrice (obj) { const currencyPair = obj.currencyPair return axios({ method: 'get', url: `https://api.coinbase.com/v2/prices/${currencyPair}/buy`, headers: {'CB-Version': '2017-07-10'} }) ...
const _ = require('lodash/fp') const axios = require('axios') const BN = require('../../../bn') function getBuyPrice (obj) { const currencyPair = obj.currencyPair return axios({ method: 'get', url: `https://api.coinbase.com/v2/prices/${currencyPair}/buy`, headers: {'CB-Version': '2017-07-10'} }) ...
Add DASH to Coinbase ticker
Add DASH to Coinbase ticker
JavaScript
unlicense
lamassu/lamassu-server,naconner/lamassu-server,naconner/lamassu-server,naconner/lamassu-server,lamassu/lamassu-server,lamassu/lamassu-server
722a07de86d32807dd0968ff0cf0b7bb93f88d97
spec/api-deprecations-spec.js
spec/api-deprecations-spec.js
const assert = require('assert') const deprecations = require('electron').deprecations describe('deprecations', function () { beforeEach(function () { deprecations.setHandler(null) process.throwDeprecation = true }) it('allows a deprecation handler function to be specified', function () { var messag...
const assert = require('assert') const deprecations = require('electron').deprecations describe('deprecations', function () { beforeEach(function () { deprecations.setHandler(null) process.throwDeprecation = true }) it('allows a deprecation handler function to be specified', function () { var messag...
Add explicit call to deprecate.log
Add explicit call to deprecate.log
JavaScript
mit
electron/electron,aichingm/electron,tonyganch/electron,jhen0409/electron,the-ress/electron,brave/electron,tonyganch/electron,Gerhut/electron,leethomas/electron,dongjoon-hyun/electron,Gerhut/electron,thompsonemerson/electron,Gerhut/electron,miniak/electron,noikiy/electron,leethomas/electron,shiftkey/electron,dongjoon-hy...
76e5c44b4bfa07dceb8e5c2b24583334542ecd7c
services/user-service.js
services/user-service.js
var cote = require('cote'), models = require('../models'); var userResponder = new cote.Responder({ name: 'user responder', namespace: 'user', respondsTo: ['create'] }); var userPublisher = new cote.Publisher({ name: 'user publisher', namespace: 'user', broadcasts: ['update'] }); userResp...
var cote = require('cote'), models = require('../models'); var userResponder = new cote.Responder({ name: 'user responder', namespace: 'user', respondsTo: ['create'] }); var userPublisher = new cote.Publisher({ name: 'user publisher', namespace: 'user', broadcasts: ['update'] }); userResp...
Add get API to user service
Add get API to user service
JavaScript
mit
dashersw/cote-workshop,dashersw/cote-workshop
a7d9fd9a03d96a517cdad5a4126c3b8f9db4b7b9
.storybook/utils/index.js
.storybook/utils/index.js
export const INTRODUCTION = '1. Introduction'; export const PRIMITIVES = '2. Primitives'; export const FOUNDATION = '3. Foundation'; export const LOW_LEVEL_BLOCKS = '4. Low level blocks'; export const MID_LEVEL_BLOCKS = '5. Mid level blocks'; export const COMPOSITIONS = '6. Compositions'; export const PLAYGROUND = '7. ...
export const INTRODUCTION = '1. Introduction'; export const PRIMITIVES = '2. Primitives'; export const FOUNDATION = '3. Foundation'; export const LOW_LEVEL_BLOCKS = '4. Low level blocks'; export const MID_LEVEL_BLOCKS = '5. Mid level blocks'; export const COMPOSITIONS = '6. Compositions'; export const PLAYGROUND = '7. ...
Add function to compose the story title based on group name
Add function to compose the story title based on group name
JavaScript
mit
teamleadercrm/teamleader-ui
3838fc789467d5488623d79d986791c79a31134f
app/routes.js
app/routes.js
import React from 'react' import { Router, Route, browserHistory } from 'react-router' // views. import Layout from './views/Layout' import Home from './views/Home' import About from './views/About' const Routes = () => { return ( <Router history={browserHistory}> <Route component={Layout}> <Route...
import React from 'react' import { Router, Route, browserHistory } from 'react-router' import Layout from './views/Layout' import Home from './views/Home' import About from './views/About' const Routes = () => { return ( <Router history={browserHistory}> <Route component={Layout}> <Route name='ho...
Remove the unnecessary comment from the store.js file.
Remove the unnecessary comment from the store.js file.
JavaScript
mit
rhberro/the-react-client,rhberro/the-react-client
31f3e1b1fee376bde552365d92ec51211d1718ae
webpack.common.config.js
webpack.common.config.js
const {resolve} = require('path'); const webpack =require('webpack'); module.exports = { entry: [ './index.tsx' ], output:{ filename: 'bundle.js', path: resolve(__dirname, 'static'), publicPath: '' }, resolve:{ extensions: ['js', '.jsx', '.ts', '.tsx', '.css'...
const {resolve} = require('path'); const webpack =require('webpack'); module.exports = { entry: [ './index.tsx' ], output:{ filename: 'bundle.js', path: resolve(__dirname, 'static'), publicPath: '' }, resolve:{ extensions: ['.js', '.jsx', '.ts', '.tsx', '.css...
Fix typo for js file.
Fix typo for js file.
JavaScript
mit
bernalrs/react-typescript-webpack2,bernalrs/react-typescript-webpack2,bernalrs/react-typescript-webpack2
88b940117ccc0ce7e88ed03f4e642f70b9835ee6
gpm-dlv/js/main.js
gpm-dlv/js/main.js
(function() { var element = null; var nav_elements = document.querySelectorAll('li.nav-item-container'); for (var i = 0; i < nav_elements.length; i++) { var current = nav_elements[i]; if (current.innerHTML == 'My Library') { element = current; break; } } ...
(function() { var element = null; var nav_elements = document.querySelectorAll('.nav-item-container'); for (var i = 0; i < nav_elements.length; i++) { var current = nav_elements[i]; if (current.innerHTML == 'My Library') { element = current; break; } } ...
Fix selector after Google change
Fix selector after Google change
JavaScript
mit
bluekeyes/gpm-dlv,bluekeyes/gpm-dlv
a3f9c48c28f7d4ab46667b97f4c55123021c1c7d
bin/cliapp.js
bin/cliapp.js
#! /usr/bin/env node var yargs = require("yargs"); console.log(yargs.parse(process.argv.slice(2))); //var argv = require("yargs").argv; //process.argv.slice(2).forEach(function (val, index, array) { // console.log(index + ': ' + val); //}); // function readStdIn(callback) { // var called = false, data = "", fin...
#! /usr/bin/env node var App = require("../lib/app").App; var app = new App(); app.run();
Clean up CLI entry point script.
Clean up CLI entry point script.
JavaScript
mit
pjdietz/rester-client,pjdietz/rester-client
9553367d007ad813bf42051af94bc671619fc308
boot/redis.js
boot/redis.js
var URL = require('url') , redis = require('redis'); module.exports = function (config) { var client, url, port, host, db, pass; if (config = config || {}) { try { url = URL.parse(config && config.url || process.env.REDIS_PORT || 'redis://localhost:6379'); port = url.port; host ...
var URL = require('url') , redis = require('redis'); module.exports = function (config) { var client, url, port, host, db, auth, options; if (config = config || {}) { try { url = URL.parse(config && config.url || process.env.REDIS_PORT || 'redis://localhost:6379'); port = url.port; ...
Define variables that are used but not defined
fix(boot): Define variables that are used but not defined
JavaScript
mit
henrjk/connect,anvilresearch/connect,tonyevans/connect,henrjk/connect,tonyevans/connect,anvilresearch/connect,EternalDeiwos/connect,henrjk/connect,tonyevans/connect,jawaid/connect,EternalDeiwos/connect,EternalDeiwos/connect,anvilresearch/connect,jawaid/connect,msamblanet/connect,msamblanet/connect
33d56f057c974d466102b8bd05a7b0a99cbb0c5e
app/scripts/app/controllers/item/edit.js
app/scripts/app/controllers/item/edit.js
var ItemEditController = Em.ObjectController.extend({ setComplete: function () { var complete = this.get('canonicalModel.complete'); this.set('model.complete', complete); }.observes('canonicalModel.complete'), actions: { cancel: function () { this.get('model').destroy(); this.transitionTo...
var ItemEditController = Em.ObjectController.extend({ setComplete: function () { var model = this.get('model'), complete; // this observer fires even when this controller is not part of the active route. // this is because route controllers are singletons and persist. // since changing routes...
Fix ItemEditController observer accessing model when model was destroyed
Fix ItemEditController observer accessing model when model was destroyed
JavaScript
mit
darvelo/wishlist,darvelo/wishlist
9b7f8f849643c6503b3e78ba41525865ce0da91b
app/scripts/app/controllers/item/edit.js
app/scripts/app/controllers/item/edit.js
var ItemEditController = Em.ObjectController.extend({ complete: function (key, value) { if (arguments.length > 1) { return value; } return this.get('canonicalModel.complete'); }.property('canonicalModel.complete'), actions: { cancel: function () { this.get('model').destroy(); t...
var ItemEditController = Em.ObjectController.extend({ setComplete: function () { var complete = this.get('canonicalModel.complete'); this.set('model.complete', complete); }.observes('canonicalModel.complete'), actions: { cancel: function () { this.get('model').destroy(); this.transitionTo...
Fix saving item `complete` field
Fix saving item `complete` field
JavaScript
mit
darvelo/wishlist,darvelo/wishlist
44b69f28d261efc2295cbc79b68b36471b53a3ca
webroot/js/elements/login-dialog.ctrl.js
webroot/js/elements/login-dialog.ctrl.js
(function() { 'use strict'; angular .module('app') .controller('LoginDialogController', ['$mdDialog', function($mdDialog) { var vm = this; vm.showDialog = showDialog; /////////////////////////////////////////////////////////////////////////// ...
(function() { 'use strict'; angular .module('app') .controller('LoginDialogController', ['$mdDialog', function($mdDialog) { var vm = this; vm.showDialog = showDialog; /////////////////////////////////////////////////////////////////////////// ...
Make login dialog fullscreen on -xs and -sm breakpoints
Make login dialog fullscreen on -xs and -sm breakpoints
JavaScript
agpl-3.0
Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2
bacbc61e1f74fc8e40544c7e6e2434d68509c773
lib/exec.js
lib/exec.js
'use strict'; const shell = require('shelljs'); const cmd = require('./cmd'); // Execute msbuild.exe with passed arguments module.exports = function exec(args) { process.exit(shell.exec(cmd(args)).code); }
'use strict'; const shell = require('shelljs'); const cmd = require('./cmd'); // Execute msbuild.exe with passed arguments module.exports = function exec(args) { const result = shell.exec(cmd(args)).code; if (result !== 0) { console.log(); console.log(`MSBuild failed. ERRORLEVEL '${result}'.'`...
Fix handling of MSBuild errors
Fix handling of MSBuild errors
JavaScript
mit
TimMurphy/npm-msbuild
0d705644e49cab96f5ffd4b4337d2ac8d5cbb053
lib/deps.js
lib/deps.js
var canihaz = require('canihaz'), fs = require('fs'), p = require('path'); /** * Install dependency modules that are not yet installed, and needed for executing the tasks. * * @param {Array} depNames: an array of dependency module names * @param {String} dir: application directory where node_modules dir is loc...
var canihaz = require('canihaz'), fs = require('fs'), p = require('path'); /** * Install dependency modules that are not yet installed, and needed for executing the tasks. * * @param {Array} depNames: an array of dependency module names * @param {String} dir: application directory where node_modules dir is loc...
Add note that lazy-installed modules are once-off only.
Add note that lazy-installed modules are once-off only.
JavaScript
mit
cliffano/bob
329ab24aed5a9848e98d6a504ad8b2997142c23b
lib/main.js
lib/main.js
var buffer = require("./buffer"); /** * @namespace Splat */ module.exports = { makeBuffer: buffer.makeBuffer, flipBufferHorizontally: buffer.flipBufferHorizontally, flipBufferVertically: buffer.flipBufferVertically, ads: require("./ads"), AStar: require("./astar"), BinaryHeap: require("./binary-heap"), ...
var buffer = require("./buffer"); /** * @namespace Splat */ module.exports = { makeBuffer: buffer.makeBuffer, flipBufferHorizontally: buffer.flipBufferHorizontally, flipBufferVertically: buffer.flipBufferVertically, ads: require("./ads"), AStar: require("./astar"), BinaryHeap: require("./binary-heap"), ...
Remove big export of components
Remove big export of components
JavaScript
mit
SplatJS/splat-ecs
6f3d8b949133178a7f7202a060fcc35b19f4cac2
src/root.js
src/root.js
import React from 'react'; const Root = (props) => { return ( <div>{props.children}</div> ); }; Root.displayName = 'Root'; export default Root;
import React, { Children } from 'react'; const Root = ({ children }) => Children.only(children); Root.displayName = 'Root'; export default Root;
Remove <div/> from Root and add Children.only
Remove <div/> from Root and add Children.only
JavaScript
artistic-2.0
raulmatei/frux-table-test,raulmatei/frux-table-test
1461598f43ec70e9cfea8313406b3c5482d7032b
src/image/transform/bitDepth.js
src/image/transform/bitDepth.js
import Image from '../image'; export default function bitDepth(newBitDepth = 8) { this.checkProcessable('bitDepth', { bitDepth: [8, 16] }); if (![8,16].includes(newBitDepth)) throw Error('You need to specify the new bitDepth as 8 or 16'); if (this.bitDepth === newBitDepth) return this.clone(...
import Image from '../image'; export default function bitDepth(newBitDepth = 8) { this.checkProcessable('bitDepth', { bitDepth: [8, 16] }); if (!~[8,16].indexOf(newBitDepth)) throw Error('You need to specify the new bitDepth as 8 or 16'); if (this.bitDepth === newBitDepth) return this.clone(...
Remove includes to be compatible with currently released chrome
Remove includes to be compatible with currently released chrome
JavaScript
mit
image-js/ij,image-js/core,image-js/ij,image-js/image-js,image-js/core,image-js/image-js,image-js/ij
7bed9dc2f607264f7499251119a36e9bd530b2f9
HelloWorld/lib/myPanel.js
HelloWorld/lib/myPanel.js
/* See license.txt for terms of usage */ "use strict"; const self = require("sdk/self"); const { Cu, Ci } = require("chrome"); const { Panel } = require("dev/panel.js"); const { Class } = require("sdk/core/heritage"); const { Tool } = require("dev/toolbox"); /** * This object represents a new {@Toolbox} panel */ ...
/* See license.txt for terms of usage */ "use strict"; const self = require("sdk/self"); const { Cu, Ci } = require("chrome"); const { Panel } = require("dev/panel.js"); const { Class } = require("sdk/core/heritage"); const { Tool } = require("dev/toolbox"); /** * This object represents a new {@Toolbox} panel */ ...
Set debuggee in HelloWorld example
Set debuggee in HelloWorld example
JavaScript
bsd-3-clause
firebug/devtools-extension-examples,firebug/devtools-extension-examples
ec86eded4c14b5b82a36dd731c272a43b8565ea6
test/bin.js
test/bin.js
(function() { 'use strict'; var cli = require('casper').create().cli; var parapsych = require(cli.raw.get('rootdir') + '/dist/parapsych').create(require); parapsych.set('cli', cli) .set('initUrl', '/') .set('initSel', 'body'); describe('/', function() { it('should pass --grep filter' , function...
(function() { 'use strict'; var cli = require('casper').create().cli; var parapsych = require(cli.raw.get('rootdir') + '/dist/parapsych').create(require); parapsych.set('cli', cli) .set('initUrl', '/') .set('initSel', 'body'); describe('group 1', function() { it('should pass --grep filter' , fu...
Add a 2nd describe() block to auto-start logic
Add a 2nd describe() block to auto-start logic
JavaScript
mit
codeactual/conjure,codeactual/conjure
aa3925cdf7d3427541d0d50a08bef0f628aabd2c
test/ResultItem.js
test/ResultItem.js
'use strict'; var Component = require('../ui/Component'); function ResultItem() { ResultItem.super.apply(this, arguments); } ResultItem.Prototype = function() { this.shouldRerender = function() { return false; }; this.render = function($$) { var test = this.props.test; var result = this.props.r...
'use strict'; var Component = require('../ui/Component'); function ResultItem() { ResultItem.super.apply(this, arguments); } ResultItem.Prototype = function() { this.shouldRerender = function() { return false; }; this.render = function($$) { var test = this.props.test; var result = this.props.r...
Fix in test result renderer.
Fix in test result renderer.
JavaScript
mit
podviaznikov/substance,substance/substance,substance/substance,michael/substance-1,andene/substance,michael/substance-1,stencila/substance,podviaznikov/substance,andene/substance
bd0b72d850975ba74e3b7eb785fc169ab08c4c8c
feature-detects/emoji.js
feature-detects/emoji.js
// Requires a Modernizr build with `canvastest` included // http://www.modernizr.com/download/#-canvas-canvastext Modernizr.addTest('emoji', function() { if (!Modernizr.canvastext) return false; var node = document.createElement('canvas'), ctx = node.getContext('2d'); ctx.textBaseline = 'top'; ctx.font = ...
// Requires a Modernizr build with `canvastext` included // http://www.modernizr.com/download/#-canvas-canvastext Modernizr.addTest('emoji', function() { if (!Modernizr.canvastext) return false; var node = document.createElement('canvas'), ctx = node.getContext('2d'); ctx.textBaseline = 'top'; ctx.font = ...
Fix longstanding typo. SORRY GUISE
Fix longstanding typo. SORRY GUISE
JavaScript
mit
Modernizr/Modernizr,Modernizr/Modernizr
d6b84881d747f2fe6f2fe61a5e762c04ac821ae5
client/app/controllers/boltController.js
client/app/controllers/boltController.js
angular.module('bolt.controller', []) .controller('BoltController', function($scope, Geo){ })
angular.module('bolt.controller', []) .controller('BoltController', function($scope, $window){ $scope.session = $window.localStorage; })
Add user session to bolt $scope
Add user session to bolt $scope
JavaScript
mit
gm758/Bolt,boisterousSplash/Bolt,gm758/Bolt,thomasRhoffmann/Bolt,elliotaplant/Bolt,thomasRhoffmann/Bolt,boisterousSplash/Bolt,elliotaplant/Bolt
113f8c74b6780af1def3c07d1c87b266223930dc
test/Voice-test.js
test/Voice-test.js
import Voice from '../lib/Voice'; import NexmoStub from './NexmoStub'; var voiceAPIs = [ 'sendTTSMessage', 'sendTTSPromptWithCapture', 'sendTTSPromptWithConfirm', 'call' ]; describe('Voice Object', function () { it('should implement all v1 APIs', function() { NexmoStub.checkAllFunctionsAreDefined(...
import Voice from '../lib/Voice'; import NexmoStub from './NexmoStub'; var voiceAPIs = { 'sendTTSMessage': 'sendTTSMessage', 'sendTTSPromptWithCapture': 'sendTTSPromptWithCapture', 'sendTTSPromptWithConfirm': 'sendTTSPromptWithConfirm', 'call': 'call' }; describe('Voice Object', function () { it('shou...
Update Voice tests with mappings
Update Voice tests with mappings
JavaScript
mit
Nexmo/nexmo-node
eba9d1a3a4615726c2ef6db72bf9cd508c6a0489
gulpfile.js/tasks/css.js
gulpfile.js/tasks/css.js
'use strict'; // Modules // =============================================== var gulp = require('gulp'), gutil = require('gulp-util'), browserSync = require("browser-sync"), paths = require('../paths'); // Copy CSS to build folder // =============================================== gulp.task('css', function() { re...
'use strict'; // Modules // =============================================== var gulp = require('gulp'), paths = require('../paths'), gutil = require('gulp-util'), browserSync = require("browser-sync"), debug = require('gulp-debug'); // Copy CSS to build folder // =============================================== g...
Add info about CSS files to console
Add info about CSS files to console
JavaScript
mit
ilkome/front-end,ilkome/frontend,ilkome/front-end,ilkome/frontend
32a0847fa95609901cb97ac28003a148e8ad559a
app/components/__tests__/Preview-test.js
app/components/__tests__/Preview-test.js
import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; // see: https://github.com/mochajs/mocha/issues/1847 const { describe, it } = global; import Preview from '../Preview'; describe('<Preview />', () => { it('renders a block with preview css class', () => { cons...
import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; // see: https://github.com/mochajs/mocha/issues/1847 const { describe, it } = global; import Preview from '../Preview'; describe('<Preview />', () => { it('renders a block with preview css class', () => { cons...
Add test for highlight.js rendering
Add test for highlight.js rendering
JavaScript
mit
PaulDebus/monod,TailorDev/monod,TailorDev/monod,TailorDev/monod,PaulDebus/monod,PaulDebus/monod
4394772d90e017a0fad11f5292f819cd2790ae71
api/app/features/events/eventHandler.js
api/app/features/events/eventHandler.js
const Boom = require('boom'); const hostService = require('../../domain/services/host-service'); const eventService = require('../../domain/services/event-service'); module.exports = { create(request, reply) { const { user } = request.payload; const { event } = request.payload; return host...
const Boom = require('boom'); const hostService = require('../../domain/services/host-service'); const eventService = require('../../domain/services/event-service'); module.exports = { create(request, reply) { return hostService .createHost(request.payload.user) .then(({ _id: userId...
Add little error management in event route
Add little error management in event route
JavaScript
agpl-3.0
Hypernikao/who-brings-what
079f1469cfd4daca8d9c900835ea557f94304a1e
app/assets/javascripts/pageflow/editor/views/change_theme_view.js
app/assets/javascripts/pageflow/editor/views/change_theme_view.js
pageflow.ChangeThemeView = Backbone.Marionette.ItemView.extend({ template: 'templates/change_theme', ui: { changeThemeButton: '.change_theme', labelText: 'label .name' }, events: { 'click .change_theme': function() { pageflow.ChangeThemeDialogView.open({ model: this.model, th...
pageflow.ChangeThemeView = Backbone.Marionette.ItemView.extend({ template: 'templates/change_theme', ui: { changeThemeButton: '.change_theme', labelText: 'label .name' }, events: { 'click .change_theme': function() { pageflow.ChangeThemeDialogView.open({ model: this.model, th...
Update chosen theme in ChangeThemeView on theme change
Update chosen theme in ChangeThemeView on theme change
JavaScript
mit
codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,tf/pageflow-dependabot-test,Modularfield/pageflow,Modularfield/pageflow,Modularfield/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow,Modularfield/pageflow,codevise/pageflow,tf/pageflow-dependabot-test,tf/pageflow-dependabot-test,tf/pageflow-dependabot-test
98ce6706af142a0383449e4b734907741ce5a898
karma.conf.js
karma.conf.js
var path = require("path"); module.exports = function (config) { config.set({ logLevel: config.LOG_DEBUG, port: 3334, browsers: ["PhantomJS"], singleRun: true, frameworks: ["jasmine"], files: [ "src/**/*Tests.ts" ], preprocessors: { "src/**/*Tests.ts": ["webpack", "sourcem...
var path = require("path"); module.exports = function (config) { config.set({ logLevel: config.LOG_DEBUG, port: 3334, browsers: ["PhantomJS"], singleRun: true, frameworks: ["jasmine"], files: [ "src/**/*Tests.ts" ], mime: { "text/x-typescript": ["ts"] }, preprocess...
Fix to get tests running again.
Fix to get tests running again.
JavaScript
apache-2.0
matthewrwilton/citibank-statement-to-sheets,matthewrwilton/citibank-statement-to-sheets,matthewrwilton/citibank-statement-to-sheets
bd0deb99380267ae9636791180cbe39eaf9ef8e5
app.js
app.js
(function() { var todolist = document.querySelector('#todolist'); var todolistView = new ToMvc.View( 'todolist', '#todolist' ); var todolistModel = new ToMvc.Model( 'todolist' ); var nrTodos = 0; function init() { document.querySelector('#add-todo button').addEventListener( 'cli...
( function() { var todolist = document.querySelector( '#todolist' ); var todolistView = new ToMvc.View( 'todolist', '#todolist' ); var todolistModel = new ToMvc.Model( 'todolist' ); // var todolistModel = function() { // this.name = 'todolist'; // } // todolistModel.prototy...
Add created todos to localStorage
Add created todos to localStorage
JavaScript
mit
ludder/tomvc
0c425775317ef58273184f031affafc2a6e61330
lib/middlewares.js
lib/middlewares.js
var twilio = require('twilio'); var _ = require('lodash'); var config = require('./config'); // Middleware to valid the request is coming from twilio function validRequest(req, res, next) { if (twilio.validateExpressRequest(req, config.twilio.token)) { next() } else { res.status(403).send('You ar...
var twilio = require('twilio'); var _ = require('lodash'); var config = require('./config'); // Middleware to valid the request is coming from twilio function validRequest(req, res, next) { if (!twilio.validateExpressRequest(req, config.twilio.token)) { next() } else { res.status(403).send('You a...
Fix valid of twilio request
Fix valid of twilio request
JavaScript
apache-2.0
hart/betty,hart/betty,SamyPesse/betty,SamyPesse/betty,nelsonic/betty,nelsonic/betty
d0a6efa2827627c67743eb0f248a981b69a0d68a
whenever.js
whenever.js
var Whenever = function(){ var callbacks = []; var ready = false; var args; return { ready: function(){ args = arguments; callbacks.forEach(function(callback){ callback.apply(this, args); }); ready = this; }, whenReady: function(callback){ if(ready){ callback.apply(this, args); }else...
var Whenever = function(){ var callbacks = []; var ready = false; var args; return { get state(){ return { ready: ready, args: args, pendingCallbacks: callbacks.length }; }, ready: function(){ args = arguments; callbacks.forEach(function(callback){ callback.apply(this, args); })...
Add state object and improve memory usage
Add state object and improve memory usage
JavaScript
mit
David-Mulder/whenever.js
3d24b99f496ad3707fb3fc6bc5136b44cf4a3a97
generators/karma-conf/templates/karma-coverage.conf.js
generators/karma-conf/templates/karma-coverage.conf.js
'use strict'; module.exports = function(config) { config.set({ frameworks: ['<%= testFramework %>', 'browserify'], files: [ 'src/**/*.js', 'test/**/*.js', { pattern: 'src/**/*.ts', included: false, watched: false }, { pattern: 'test/**/*.ts', included: false, watched: false }, ...
'use strict'; module.exports = function(config) { config.set({ // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['<%= testFramework %>', 'browserify'], // list of files / patterns to load in the browser files: [ 'src/**/*.js', ...
Update karma coverage file comments.
Update karma coverage file comments.
JavaScript
mit
yohangz/generator-typescript-npm-bower,yohangz/generator-typescript-npm-bower,yohangz/generator-typescript-npm-bower
d38a4d3011421fc8fe4681170401cb234426e78d
src/js/containers/App.js
src/js/containers/App.js
import React, { Component, PropTypes } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import InvitationDialog from '../components/InvitationDialog'; import * as inviteActions from '../actions/invite'; import * as bootstrapUtils from 'react-bootstrap/lib/utils/bootstrapU...
import React, { Component, PropTypes } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import InvitationDialog from '../components/InvitationDialog'; import * as inviteActions from '../actions/invite'; import * as bootstrapUtils from 'react-bootstrap/lib/utils/bootstrapU...
Add "Fork me on GitHub" ribbon
chore(fork): Add "Fork me on GitHub" ribbon
JavaScript
mit
webcom-components/visio-sample,webcom-components/visio-sample,webcom-components/visio-sample
ba3ff79946cc25f8b3f5eebe3f544d0c8c233dfa
src/util/define-properties.js
src/util/define-properties.js
export default function (obj, props) { Object.keys(props).forEach(function (name) { const prop = props[name]; const descrptor = Object.getOwnPropertyDescriptor(obj, name); const isDinosaurBrowser = name !== 'arguments' && name !== 'caller' && 'value' in prop; const isConfigurable = !descrptor || descr...
export default function (obj, props) { Object.keys(props).forEach(function (name) { const prop = props[name]; const descriptor = Object.getOwnPropertyDescriptor(obj, name); const isDinosaurBrowser = name !== 'arguments' && name !== 'caller' && 'value' in prop; const isConfigurable = !descriptor || des...
Fix variable spelling error and ensure prop is writable before applying it.
Fix variable spelling error and ensure prop is writable before applying it.
JavaScript
mit
chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs
28fd05ef69b975df9aec6f2e93d39ede4d2fb5f1
gulpfile.js
gulpfile.js
var gulp = require('gulp'), sass = require('gulp-sass'), cssmin = require('gulp-minify-css'), prefix = require('gulp-autoprefixer'), rename = require('gulp-rename'), header = require('gulp-header'), pkg = require('./package.json'), banner = [ '/*!', ' <%= pkg.name %> v<%...
var gulp = require('gulp'), sass = require('gulp-sass'), cssmin = require('gulp-minify-css'), prefix = require('gulp-autoprefixer'), rename = require('gulp-rename'), header = require('gulp-header'), pkg = require('./package.json'), banner = [ '/*!', ' <%= pkg.name %> v<%...
Create default gulp task, that depends on build
Create default gulp task, that depends on build
JavaScript
mit
KolibriDev/Cress
3939f1697d5c8e1a50cf71a034aa0cd07e24cfee
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var runSequence = require('run-sequence'); var bs = require('browser-sync').create(); var del = require('del'); gulp.task('lint', function () { return gulp.src('app/js/**/*.js') .pipe($.eslint()) .pipe($.eslint.format()) ....
'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var runSequence = require('run-sequence'); var bs = require('browser-sync').create(); var del = require('del'); gulp.task('lint', function () { return gulp.src('app/js/**/*.js') .pipe($.eslint()) .pipe($.eslint.format()) ....
Add lint to the default task
Add lint to the default task
JavaScript
mit
htanjo/gulp-boilerplate,htanjo/gulp-boilerplate
b3136d3fb55977e2da0a8641e19d6b7b2ddc7e23
gulpfile.js
gulpfile.js
var gulp = require("gulp"), connect = require("gulp-connect"), babel = require("gulp-babel"); gulp.task("webserver", function () { connect.server(); }); gulp.task("babel", function () { return gulp.src("src/js/bpm-counter.js") .pipe(babel()) .pipe(gulp.dest("dist/")); }); gulp.task("default", ["webserver...
var gulp = require("gulp"), connect = require("gulp-connect"), babel = require("gulp-babel"); gulp.task("webserver", function () { connect.server(); }); gulp.task("babel", function () { return gulp.src("src/js/bpm-counter.js") .pipe(babel()) .pipe(gulp.dest("dist/")); }); gulp.task("default", ["babel", "...
Add babel to the default task
Add babel to the default task
JavaScript
mit
khwang/plum,khwang/plum
587ed71e7dd5a39e9cb550e619b6638da59933eb
lib/dowhen.js
lib/dowhen.js
var async = require('async'); var DoWhen = function(obj, ev) { var args, triggerCallbacks, objCallback, callbacks = []; triggerCallbacks = function() { for(var i = 0; i < callbacks.length; ++i) { var callback = callbacks.splice(i)[0]; async.next...
var async = require('async'); var DoWhen = function(obj, ev) { var args, triggerCallbacks, objCallback, callbacks = []; triggerCallbacks = function() { if (callbacks.length > 0) { for(var i = 0; i < callbacks.length; ++i) { var callback = callbacks[i]; ...
Fix splice for removeCallback, and avoid using splice for triggerCallbacks
Fix splice for removeCallback, and avoid using splice for triggerCallbacks
JavaScript
bsd-2-clause
1stvamp/dowhen.js
8eaa78b65d74a276278a61d05381edfb0a407467
chrome/content/addressList.js
chrome/content/addressList.js
window.addEventListener('load', function() { // https://developer.mozilla.org/en/Code_snippets/Tabbed_browser var browser = window.opener.getBrowser(); var doc = window.opener.content.document; var c = doc.SimpleMap; Components.utils.reportError(c.addresses); // DEBUG var addressArray = c.addresses; v...
window.addEventListener('load', function() { // https://developer.mozilla.org/en/Code_snippets/Tabbed_browser var browser = window.opener.getBrowser(); var doc = window.opener.content.document; var c = doc.SimpleMap; Components.utils.reportError(c.addresses); // DEBUG var addressArray = c.addresses; v...
Change event listener to command
Change event listener to command
JavaScript
isc
chrslgn/cs3300-ramrod-map
1e744c94a6db22cb9a7b20ab2ec1f34308458964
spec/main-spec.js
spec/main-spec.js
'use babel' import * as _ from 'lodash' import * as path from 'path' describe('The Ispell provider for Atom Linter', () => { const lint = require('../lib/providers').provideLinter().lint beforeEach(() => { waitsForPromise(() => { return atom.packages.activatePackage('linter-spell') }) }) it('f...
'use babel' import * as _ from 'lodash' import * as path from 'path' describe('The Ispell provider for Atom Linter', () => { const lint = require('../lib/providers').provideLinter().lint beforeEach(() => { waitsForPromise(() => { return atom.packages.activatePackage('linter-spell') }) }) it('f...
Upgrade specs to latest API
:arrow_up: Upgrade specs to latest API
JavaScript
mit
yitzchak/linter-hunspell,yitzchak/linter-hunspell
a6f6fa942486ec30ac459b5187a334604188f419
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var webpack = require('webpack-stream'); var client = { config: require('./config/webpack.prod.client.js'), in: './src/client/index.jsx' }, server = { config: require('./config/webpack.prod.server.js'), in: './src/server/index.js' }; gulp.task('bundle-client', function() { ...
var gulp = require('gulp'); var webpack = require('webpack'); var clientConfig = require('./config/webpack.prod.client.js') var serverConfig = require('./config/webpack.prod.server.js') gulp.task('bundle-client', function(done) { webpack( clientConfig ).run(onBundle(done)) }); gulp.task('bundle-server', functio...
Refactor gulp task to bundle front/backend
Refactor gulp task to bundle front/backend
JavaScript
mit
AdamSalma/Lurka,AdamSalma/Lurka
1a6b85141a7589ed4ebadefd75340d643d61a687
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'), browserify = require('browserify'), transform = require('vinyl-transform'), uglify = require('gulp-uglify'), sourcemaps = require('gulp-sourcemaps'), jasmine = require('gulp-jasmine'); gulp.task('default', ['build', 'watch']); gulp.task('watch', function ...
'use strict'; var gulp = require('gulp'), browserify = require('browserify'), transform = require('vinyl-transform'), uglify = require('gulp-uglify'), sourcemaps = require('gulp-sourcemaps'), jasmine = require('gulp-jasmine'); gulp.task('default', ['build', 'watch']); gulp.task('watch', function ...
Add watch of test files to gulp
Add watch of test files to gulp
JavaScript
mit
rowanoulton/bowler,rowanoulton/bowler
f0742659c8af024a8d73bd2ea9b8fae52591b7d9
lib/knife/apply_rules.js
lib/knife/apply_rules.js
var lodash = require('lodash'); module.exports = { applyRules: function(rules, element, opts) { if (!rules) { return []; } return lodash.flatten(rules.map(function(rule) { return rule.lint.call(rule, element, opts); })); } };
var lodash = require('lodash'); module.exports = { applyRules: function(rules, element, opts) { if (!rules) { return []; } return lodash.flatten(rules.map(function(rule) { var issues = rule.lint.call(rule, element, opts); // apparently we can also get a...
Add rule name to issues for a better output
Add rule name to issues for a better output
JavaScript
isc
KrekkieD/htmllint,htmllint/htmllint,htmllint/htmllint,KrekkieD/htmllint
2d1b2627997c7e0568b66fdbbde15a15d63fd67f
components/cors/controller.js
components/cors/controller.js
const Config = use('config'); const CORSController = { path: 'cors', permissions: {}, OPTIONS : [ function () { // @path: .* this.response.headers['Access-Control-Allow-Methods'] = Config.cors.methods.toString(); this.response.headers['Ac...
const Config = use('config'); const CORSController = { path: 'cors', permissions: {}, OPTIONS : [ function () { // @path: .* // @summary: Handle CORS OPTIONS request this.response.headers['Access-Control-Allow-Methods'] = Config.cors.meth...
Add doc for CORS component
Add doc for CORS component
JavaScript
mit
yura-chaikovsky/dominion
18ad9cc05ed8a0aaabc438e32b3ef086687622e4
src/bin/eslint.js
src/bin/eslint.js
import path from 'path'; import {CLIEngine, linter} from 'eslint'; import PackageJson from '../lib/package_json'; const project = PackageJson.load(); const baseConfig = linter.defaults(); const options = { baseConfig: Object.assign(baseConfig, { parser: 'babel-eslint', env: Object.assign(baseConfig.env, { ...
import path from 'path'; import {CLIEngine, linter} from 'eslint'; import PackageJson from '../lib/package_json'; const project = PackageJson.load(); const baseConfig = linter.defaults(); const options = { baseConfig: Object.assign(baseConfig, { parser: 'babel-eslint', env: Object.assign(baseConfig.env, { ...
Allow double quotes to avoid escaping single quotes
Allow double quotes to avoid escaping single quotes
JavaScript
mit
vinsonchuong/eslint-defaults
88c77686a6eb10444037b98fb110ec129344e0dd
tests/integration/ParameterTableFixture.js
tests/integration/ParameterTableFixture.js
floatValue = /\d+.\d+/ ongoingDateRange = /partir du \d{1,2}\/\d{1,2}\/\d{4}/ dateRange = /Du \d{1,2}\/\d{1,2}\/\d{4} au \d{1,2}\/\d{1,2}\/\d{4}/ interruptionMessage = /ne figure plus dans la législation depuis le \d{1,2}\/\d{1,2}\/\d{4}/
floatValue = /\d+.\d+/ ongoingDateRange = /\d{2}\/\d{2}\/\d{4}/ dateRange = /\d{2}\/\d{2}\/\d{4}.+\d{2}\/\d{2}\/\d{4}/ interruptionMessage = /\d{2}\/\d{2}\/\d{4}/
Update integration tests for localised dates
Update integration tests for localised dates
JavaScript
agpl-3.0
openfisca/legislation-explorer
1b73efa26e8778cf9755b407acc00d55494e4a16
tests/mocha/client/displayAListOfPlaces.js
tests/mocha/client/displayAListOfPlaces.js
if (!(typeof MochaWeb === 'undefined')){ MochaWeb.testOnly(function () { setTimeout(function (){ describe('The Route "/"', function () { it('Should have the title "Map"', function () { var title = document.title console.log(title) chai.assert.include(title, 'Map') ...
if (!(typeof MochaWeb === 'undefined')){ MochaWeb.testOnly(function () { Meteor.flush() describe('The Route "/"', function () { it('Should have the title "Map"', function () { var title = document.title chai.assert.include(title, 'Map') }) }) describe('A list of places', fu...
Remove hack is was breaking the tests
Remove hack is was breaking the tests
JavaScript
mit
Kriegslustig/Bergbau-Graub-nden,Kriegslustig/Bergbau-Graub-nden,Kriegslustig/Bergbau-Graub-nden
073326ef326964f261bcdb2fe210493efaaf73fe
lib/communication/handler/index.js
lib/communication/handler/index.js
module.exports = { 'speedyfx:msg': require('./message'), 'speedyfx:prs': require('./presence'), 'speedyfx:rq': require('./request') };
module.exports = { 'speedy:msg': require('./message'), 'speedy:prs': require('./presence'), 'speedy:rq': require('./request') };
Modify namespace of message type
Modify namespace of message type
JavaScript
mit
johnsmith17th/SpeedyFx
12ac4e2696d611956a9e6acfbe2ed2ebf7517c06
app/login/current-user.js
app/login/current-user.js
(function() { angular.module('notely.login') .service('CurrentUser', CurrentUser); CurrentUser['$inject'] = ['$window'] function CurrentUser($window) { var currentUser = JSON.parse($window.localStorage.getItem('currentUser')); this.set = function(user) { currentUser = user; $window.local...
angular.module('notely.login') .service('CurrentUser', ['$window', ($window) => { class CurrentUser { constructor() { this.currentUser = JSON.parse($window.localStorage.getItem('currentUser')); } set(user) { this.currentUser = user; $window.localStorage.setItem('currentUser', JSON.st...
Make CurrentUser service use class syntax with inherited dependencies.
Make CurrentUser service use class syntax with inherited dependencies. This is one way to possibly alleviate concerns with having to tack `this` to the beginning of everything. Instead of using the class directly, DI an anonymous function, and declare/return the class inside of it.
JavaScript
mit
FretlessBecks/notely,FretlessBecks/notely
09f37253a32542839ef72174cdc14b2a61575d93
lib/ChunkedBlob.js
lib/ChunkedBlob.js
const rankSize = 16 function blobLength(b) { if (typeof b.byteLength !== 'undefined') return b.byteLength if (typeof b.size !== 'undefined') return b.size return b.length } export default class ChunkedBlob { constructor() { this.size = 0 this.ranks = [[]] } add(b) { this.size += blobLength(b...
const rankSize = 16 function blobLength(b) { if (typeof b.byteLength !== 'undefined') return b.byteLength if (typeof b.size !== 'undefined') return b.size return b.length } export default class ChunkedBlob { constructor() { this.size = 0 this.ranks = [] } add(b) { this.size += blobLength(b) ...
Use one big array for all blobs instead of ranks.
Use one big array for all blobs instead of ranks.
JavaScript
bsd-3-clause
codebhendi/filepizza,hanford/filepizza,bradparks/filepizza_javascript_send_files_webrtc,jekrb/filepizza,codevlabs/filepizza,Ribeiro/filepizza,gramakri/filepizza,pquochoang/filepizza
95046feb15b5450b4bc19fbf73a46cba5e7ab842
server/frontend/store/configureStore.js
server/frontend/store/configureStore.js
import { createStore, applyMiddleware } from 'redux'; import { reduxReactRouter } from 'redux-router'; import createHistory from 'history/lib/createBrowserHistory'; import routes from '../routes'; import thunkMiddleware from 'redux-thunk'; import createLogger from 'redux-logger'; import rootReducer from '../reducers'; ...
import { createStore, applyMiddleware, compose } from 'redux'; import { reduxReactRouter } from 'redux-router'; import thunk from 'redux-thunk'; import createHistory from 'history/lib/createBrowserHistory'; import routes from '../routes'; import createLogger from 'redux-logger'; import rootReducer from '../reducers'; ...
Configure store creation to incorporate ReduxRouter
Configure store creation to incorporate ReduxRouter
JavaScript
mit
benjaminhoffman/Encompass,benjaminhoffman/Encompass,benjaminhoffman/Encompass
d24fac89a787dcf182fc99630f32bc96df61cba2
app/controllers/trains.js
app/controllers/trains.js
import Ember from 'ember'; import $ from 'jquery'; export default Ember.Controller.extend({ transportApiSrv: Ember.inject.service('trasport-api'), searchLocation: null, destinations: null, selectedDestination: null, timetable: null, setInitialState () { const initialStation = this.get('model').station...
import Ember from 'ember'; import $ from 'jquery'; export default Ember.Controller.extend({ transportApiSrv: Ember.inject.service('trasport-api'), searchLocation: null, destinations: null, selectedDestination: null, timetable: null, setInitialState () { const initialStation = this.get('model').station...
Set actions for select fields
feat: Set actions for select fields
JavaScript
mit
pe1te3son/transportme,pe1te3son/transportme
a04731b805376dcbfcbafffc08e91698009b4cfc
lib/TokenClient.js
lib/TokenClient.js
import request from 'superagent'; import { Promise } from 'bluebird'; import { isValidToken } from './jwt'; export default class TokenClient { constructor(config) { this.user = config.user; this.password = config.password; this.routes = config.routes; this.token = config.token; } getValidToken()...
import request from 'superagent'; import { Promise } from 'bluebird'; import { isValidToken } from './jwt'; export default class TokenClient { constructor(config) { this.user = config.user; this.password = config.password; this.routes = config.routes; this.token = config.token; } getValidToken()...
Replace bind with fat arrow syntax
Replace bind with fat arrow syntax
JavaScript
mit
andrewk/biodome-client
ca2e8dfa402e899fcb95256e3f24917d8fcd7f9d
lib/catch-links.js
lib/catch-links.js
module.exports = function (root, cb) { root.addEventListener('click', (ev) => { if (ev.altKey || ev.ctrlKey || ev.metaKey || ev.shiftKey || ev.defaultPrevented) { return true } let anchor = null for (let n = ev.target; n.parentNode; n = n.parentNode) { if (n.nodeName === 'A') { a...
module.exports = function (root, cb) { root.addEventListener('click', (ev) => { if (ev.altKey || ev.ctrlKey || ev.metaKey || ev.shiftKey || ev.defaultPrevented) { return true } let anchor = null for (let n = ev.target; n.parentNode; n = n.parentNode) { if (n.nodeName === 'A') { a...
Fix URI decode error breaking messages
Fix URI decode error breaking messages
JavaScript
agpl-3.0
ssbc/patchwork,ssbc/patchwork
8d958f42d2de3dd0d5dbae778df32100092aa962
test/helpers/MockData.js
test/helpers/MockData.js
const CurrentData = { display_location: { full: 'Den' }, temp_f: 70 }; const ForecastData = { txt_forecast: { forecastday:[{ title: 'Monday', fcttext: 'Clear all day', }] }, simpleforecast: { forecastday:[{ conditions: 'Clear', high: { fahrenheit: 70, }...
const CurrentData = { display_location: { full: 'Den' }, temp_f: 70 }; const ForecastData = { txt_forecast: { forecastday:[{ title: 'Monday', fcttext: 'Clear all day', }] }, simpleforecast: { forecastday:[{ conditions: 'Clear', high: { fahrenheit: 70, }...
Test for error handling when location is not found.
Test for error handling when location is not found.
JavaScript
mit
thatPamIAm/weathrly,thatPamIAm/weathrly
258666fc69af024c9aa5a51b7714f8647c77c537
test/integration/main.js
test/integration/main.js
var gpio = require('rpi-gpio'); var async = require('async'); var assert = require('assert'); var sinon = require('sinon'); var message = 'Please ensure that your Raspberry Pi is set up with with physical pins ' + '7 and 11 connected via a 1kΩ resistor (or similar) to make this test work' console.log(message) ...
var gpio = require('../../rpi-gpio'); var async = require('async'); var assert = require('assert'); var sinon = require('sinon'); var message = 'Please ensure that your Raspberry Pi is set up with with physical pins ' + '7 and 11 connected via a 1kΩ resistor (or similar) to make this test work' console.log(mes...
Fix integration test path to module
Fix integration test path to module
JavaScript
mit
JamesBarwell/rpi-gpio.js
9124af224228fd3bf3c41967f9bc6b2baa6f9e53
vendor/ember-component-attributes/index.js
vendor/ember-component-attributes/index.js
/* globals Ember */ (function() { const { Component, computed } = Ember; Component.reopen({ __HTML_ATTRIBUTES__: computed({ set: function(key, value) { let attributes = Object.keys(value); let customBindings = []; for (let i = 0; i < attributes.length; i++) { let attrib...
/* globals Ember */ (function() { const { Component, computed } = Ember; Component.reopen({ __HTML_ATTRIBUTES__: computed({ set: function(key, value) { let attributes = Object.keys(value); let customBindings = []; for (let i = 0; i < attributes.length; i++) { let attrib...
Make work with and without pre-existing attributeBindings.
Make work with and without pre-existing attributeBindings. When a component has no attribute bindings, `this.attributeBindings` is undefined. This updates the computed setter to handle that scenario.
JavaScript
mit
mmun/ember-component-attributes,mmun/ember-component-attributes
1991066ed6b2f8c93ae76034f30ed3c23ac2dca5
lib/yamb/proto/define.js
lib/yamb/proto/define.js
"use strict"; var utils = require('./../../utils'); function define(name, prop, priv) { var descriptor = {enumerable: true}; var getter = prop.get; var setter = prop.set; if (getter !== false) { if (!utils.is.fun(getter) && getter !== false) { getter = function() { return this[priv.symbl][...
"use strict"; var utils = require('./../../utils'); function define(name, prop, priv) { var descriptor = {enumerable: true}; var getter = prop.get; var setter = prop.set; if (getter !== false) { if (!utils.is.fun(getter) && getter !== false) { getter = function() { return this[priv.symbl][...
Add updated flags for default setter
Add updated flags for default setter
JavaScript
mit
yamb/yamb
9114f3e67a68a6fba193a1bfa09d411b805e3a94
lib/node_modules/@stdlib/string/remove-first/lib/index.js
lib/node_modules/@stdlib/string/remove-first/lib/index.js
'use strict'; /** * Remove the first character of a string. * * @module @stdlib/string/remove-first * * @example * var removeFirst = require( '@stdlib/string/remove-first' ); * * var out = removeFirst( 'last man standing' ); * // returns 'ast man standing' * * out = removeFirst( 'Hidden Treasures' ); * // returns 'hid...
'use strict'; /** * Remove the first character of a string. * * @module @stdlib/string/remove-first * * @example * var removeFirst = require( '@stdlib/string/remove-first' ); * * var out = removeFirst( 'last man standing' ); * // returns 'ast man standing' * * out = removeFirst( 'Hidden Treasures' ); * // returns 'idd...
Fix return value in example code
Fix return value in example code
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
236eb48a65cef8928ce5ad8fdadee95124c67866
packages/flow-dev-tools/src/constants.js
packages/flow-dev-tools/src/constants.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import {resolve} from 'path'; const TOOL_ROOT = resolve(__dirname, "../"); const FLOW_ROOT = resolve(__dirname, "../....
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ import {dirname, join, resolve} from 'path'; const FLOW_ROOT = resolve(__dirname, '../../../'); export con...
Allow workspaces outside of the workspace root
Allow workspaces outside of the workspace root Summary: As part of the workspace separation, and because our repo does not have an ideal layout (for example `react-native-github` consists of both product and tooling code, and is hard to move right now), I am in need of making workspaces outside of a workspace root wor...
JavaScript
mit
nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow
68d37b8d80edef757b252205d69290a829bdf9e1
src/script/window/action/context-menu.js
src/script/window/action/context-menu.js
'use strict'; const remote = require('remote'); const Menu = remote.require('menu'); const MenuItem = remote.require('menu-item'); const slackWebview = appRequire('webview/slack-webview'); let popupOpenEvent; function initialise() { const menu = new Menu(); menu.append(new MenuItem({ label: 'Inspect element...
'use strict'; const remote = require('remote'); const Menu = remote.require('menu'); const MenuItem = remote.require('menu-item'); const slackWebview = appRequire('webview/slack-webview'); let popupOpenEvent; function initialise() { const menu = new Menu(); menu.append(new MenuItem({ label: 'Inspect element...
Remove context menu item accelerators, as they are not honoured.
Remove context menu item accelerators, as they are not honoured.
JavaScript
mit
pekim/slack-wrapped,pekim/slack-wrapped
939d1502140150ae539c6c74dd4fe1b2eb613438
lib/jestUnexpected.js
lib/jestUnexpected.js
const unexpected = require('unexpected'); const baseExpect = unexpected.clone(); baseExpect.addAssertion( '<string> to jest match <string>', (expect, subject, value) => { expect.errorMode = 'bubble'; return expect(subject, 'to contain', value); } ); baseExpect.addAssertion( '<string> t...
const unexpected = require('unexpected'); const baseExpect = unexpected.clone(); baseExpect.addAssertion( '<string> to jest match <string>', (expect, subject, value) => { expect.errorMode = 'bubble'; return expect(subject, 'to contain', value); } ); baseExpect.addAssertion( '<string> t...
Switch toMatch() to "to match" in the case of a regex on the RHS.
Switch toMatch() to "to match" in the case of a regex on the RHS.
JavaScript
bsd-3-clause
alexjeffburke/jest-unexpected
58f635a28ceac0466ad3b928a5201c4443e60ff2
source/js/tests/config.js
source/js/tests/config.js
// Documentation available at https://theintern.github.io define({ proxyPort: 9010, proxyUrl: 'http://localhost:9010/', excludeInstrumentation: /^(?:bower_components|node_modules|public)\//, tunnel: 'NullTunnel', loaderOptions: { packages: [ { name: 'Wee', location: '/public/assets/js', main: 'sc...
// Documentation available at https://theintern.github.io define({ proxyPort: 9010, proxyUrl: 'http://localhost:9010/', excludeInstrumentation: /^(?:bower_components|node_modules|public)\//, tunnel: 'NullTunnel', loaderOptions: { packages: [ { name: 'Wee', location: 'public/assets/js', main: 'scr...
Update testing path to support new core /$root proxy route
Update testing path to support new core /$root proxy route
JavaScript
apache-2.0
weepower/wee,weepower/wee
b297f9bad36d7955d1841744301a37489aa528bf
addon/adapters/web-api.js
addon/adapters/web-api.js
import Ember from 'ember'; import DS from 'ember-data'; const VALIDATION_ERROR_STATUSES = [400, 422]; export default DS.RESTAdapter.extend({ namespace: 'api', isInvalid: function(status) { return VALIDATION_ERROR_STATUSES.indexOf(status) >= 0; }, // Override the parseErrorResponse method from RESTAdapte...
import Ember from 'ember'; import DS from 'ember-data'; const VALIDATION_ERROR_STATUSES = [400, 422]; export default DS.RESTAdapter.extend({ namespace: 'api', isInvalid: function(status) { return VALIDATION_ERROR_STATUSES.indexOf(status) >= 0; }, // Override the parseErrorResponse method from RESTAdapte...
Update the comment with the URL to the source
Update the comment with the URL to the source
JavaScript
mit
CrshOverride/ember-web-api,CrshOverride/ember-web-api
a6bf1851c243ed51d8c17dc5b3d007fbee9a758b
addons/knobs/src/index.js
addons/knobs/src/index.js
import { window } from 'global'; import deprecate from 'util-deprecate'; import addons from '@storybook/addons'; import { vueHandler } from './vue'; import { reactHandler } from './react'; import { angularHandler } from './angular'; import { knob, text, boolean, number, color, object, array, date, manager } from './b...
import { window } from 'global'; import deprecate from 'util-deprecate'; import addons from '@storybook/addons'; import { vueHandler } from './vue'; import { reactHandler } from './react'; import { knob, text, boolean, number, color, object, array, date, manager } from './base'; export { knob, text, boolean, number,...
REMOVE angular knobs from old-style import
REMOVE angular knobs from old-style import
JavaScript
mit
storybooks/storybook,storybooks/storybook,rhalff/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,rhalff/storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,rhalff/storybook,rhalff/storybook,rhalff/storybook...
70e1ebb7559a7e131e72cef4e50a37e2c7792838
assets/js/document-nav.js
assets/js/document-nav.js
$(function() { var $documentNav = $('.document-nav'); if($documentNav.length) { var targets = [] , $window = $(window); $documentNav.find('a').each(function() { targets.push( $($(this).attr('href')) ) }); function setActive($current) { var $...
$(function() { var $documentNav = $('.document-nav'); if($documentNav.length) { var targets = [] , $window = $(window) , changeHash = false; $documentNav.find('a').each(function() { targets.push( $($(this).attr('href')) ) }); function setActiv...
Fix scrollSpy bug preventing original scroll to happen if a hash is present
Fix scrollSpy bug preventing original scroll to happen if a hash is present
JavaScript
mit
pillars/bibliosoph
95b6e11a11d21dba2eef8ce8d426f1c866c289f9
app/assets/javascripts/representatives.js
app/assets/javascripts/representatives.js
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. function VoteStatsGraph(selector, options) { this.selector = selector; this.options = options; } VoteStatsGraph.prototype.render = function() { this.chart = new High...
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. function VoteStatsGraph(selector, options) { this.selector = selector; this.options = options; } VoteStatsGraph.prototype.render = function() { this.chart = new High...
Remove empty lines in representative graph.
Remove empty lines in representative graph.
JavaScript
bsd-3-clause
holderdeord/hdo-site,holderdeord/hdo-site,holderdeord/hdo-site,holderdeord/hdo-site
3937af4c24411a6b34015f2c69f1df5fa5ab6475
packages/relay-compiler/RelayCompiler.js
packages/relay-compiler/RelayCompiler.js
/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @flow * ...
/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @flow * ...
Test importing from graphql-compiler package
Test importing from graphql-compiler package Reviewed By: leebyron Differential Revision: D5828011 fbshipit-source-id: 3c514c9b611f900234a22004bba1554436bf9df8
JavaScript
mit
kassens/relay,kassens/relay,facebook/relay,benjaminogles/relay,dbslone/relay,facebook/relay,zpao/relay,xuorig/relay,voideanvalue/relay,cpojer/relay,facebook/relay,dbslone/relay,benjaminogles/relay,josephsavona/relay,iamchenxin/relay,atxwebs/relay,wincent/relay,xuorig/relay,xuorig/relay,iamchenxin/relay,voideanvalue/rel...
b2e834f24e5e6dbe7cb0f3beb39253eb978704d9
notifications/helpers.js
notifications/helpers.js
import { createClient, } from 'redis'; import nconf from '../config'; let sub; let client; function redisConns() { sub = createClient(nconf.get('redis')); client = createClient(nconf.get('redis')); } export function fetchChannelList(redis, table) { console.log(`fetching channels for ${table}`); return new ...
import { createClient, } from 'redis'; import nconf from '../config'; let sub; let client; function redisConns() { sub = createClient(nconf.get('redis')); client = createClient(nconf.get('redis')); } export function fetchChannelList(redis, table) { console.log(`fetching channels for ${table}`); return new ...
Fix the issue with posting all notifications even when you are subscribed to one
Fix the issue with posting all notifications even when you are subscribed to one
JavaScript
mit
rit-sse/slushbot,rit-sse/slushbot
6dd54b63ee36f46b490bcbfda97193d567386756
dev/_/components/js/visualizationView.js
dev/_/components/js/visualizationView.js
AV.VisualizationView = Backbone.View.extend({ el: '#visualization', // The rendering of the visualization will be slightly // different here, because there is no templating necessary: // The server gives back a page. render: function() { this.model.url = this.model.urlRoot + this.model.id + ...
AV.VisualizationView = Backbone.View.extend({ el: '#visualization', initialize: function() { this.$el.load(_.bind(function(){ console.log("it did a reload"); console.log(this.$el.contents()[0].title); if (!(this.$el.contents()[0].title)) { console.log...
Refresh iframe on "RENDERING" change
Refresh iframe on "RENDERING" change
JavaScript
bsd-3-clause
Swarthmore/juxtaphor,Swarthmore/juxtaphor
495701f1977ef5493497a8855cd9fcafb1ceaad5
src/clientDOMInterface.js
src/clientDOMInterface.js
var $ = require('jquery'); var _ = require('./utils.js'); // When passed to the template evaluator, // its render method will create actual DOM elements var DOMInterface = function() { return { createFragment: function() { return document.createDocumentFragment(); }, createDOMElement: function(ta...
var $ = require('jquery'); var _ = require('./utils.js'); // When passed to the template evaluator, // its render method will create actual DOM elements var DOMInterface = function() { return { createFragment: function() { return document.createDocumentFragment(); }, createDOMElement: function(ta...
Fix regression when setting custom attributes on DOM elements
Fix regression when setting custom attributes on DOM elements
JavaScript
mit
syntheticore/declaire
7eaad2f4582da2f63cfe57e182d73f97abaebfca
src/components/table-view/checker.js
src/components/table-view/checker.js
import React from 'react' export default function Checker({ multiselect, checked, disabled, id, name, onChange }) { if (disabled) { return null } return ( <label className="ars-table-checker"> <span className="ars-hidden"> {checked ? 'Deselect' : 'Select'} {name} </span> ...
import React from 'react' export default function Checker({ multiselect, checked, disabled, id, name, onChange }) { if (disabled) { return null } return ( <label className="ars-table-checker"> <span className="ars-hidden"> {checked ? 'Deselect' : 'Select'} {name} </span> ...
Use the same name on checkboxes to allow keyboard entry
Use the same name on checkboxes to allow keyboard entry
JavaScript
mit
vigetlabs/ars-arsenal,vigetlabs/ars-arsenal,vigetlabs/ars-arsenal
5781e808241d4ac821e58832abee7b4847e54f1c
src/components/Restart.js
src/components/Restart.js
import React, { Component } from 'react'; import { connect } from 'react-redux'; import store from '../store.js'; import { restart } from '../actions/name-actions'; import { selectGender } from '../actions/gender-actions'; import MdBack from 'react-icons/lib/md/keyboard-arrow-left'; class Restart extends Component { ...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import store from '../store.js'; import { restart } from '../actions/name-actions'; import { selectGender } from '../actions/gender-actions'; import MdBack from 'react-icons/lib/md/keyboard-arrow-left'; class Restart extends Component { ...
Add new class to restart
Add new class to restart
JavaScript
apache-2.0
johnbrowe/barnanavn,johnbrowe/barnanavn,johnbrowe/barnanavn
8e406d84dbc5c0da73428c1be5ce3915c12a59de
src/foam/nanos/auth/Relationships.js
src/foam/nanos/auth/Relationships.js
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ /* foam.RELATIONSHIP({ cardinality: '*:*', sourceModel: 'foam.nanos.auth.Group', targetModel: 'foam.nanos.auth.Permission', forwardName: 'permissions', inverseName: 'groups', sourcePro...
/** * @license * Copyright 2017 The FOAM Authors. All Rights Reserved. * http://www.apache.org/licenses/LICENSE-2.0 */ /* foam.RELATIONSHIP({ cardinality: '*:*', sourceModel: 'foam.nanos.auth.Group', targetModel: 'foam.nanos.auth.Permission', forwardName: 'permissions', inverseName: 'groups', sourcePro...
Make group property in user visible.
Make group property in user visible.
JavaScript
apache-2.0
jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2
a5d22e50ef1c18a37c4b59d24f893677839ca5e1
lib/util/nullwritable.js
lib/util/nullwritable.js
/* * stompit.NullWritable * Copyright (c) 2014 Graham Daws <graham.daws@gmail.com> * MIT licensed */ var stream = require('stream'); var util = require('util'); function NullWritable(){ stream.Writable.call(this); this.bytesWritten = 0; } util.inherits(NullWritable, stream.Writable); NullWrita...
/* * stompit.NullWritable * Copyright (c) 2014 Graham Daws <graham.daws@gmail.com> * MIT licensed */ var stream = require('stream'); var util = require('util'); var crypto = require('crypto'); function NullWritable(hashAlgorithm){ stream.Writable.call(this); this.bytesWritten = 0; this._hash = crypto....
Add hash digest calcuation to NullWritable
Add hash digest calcuation to NullWritable
JavaScript
mit
gdaws/node-stomp
e154bb8b1d231b80340baf56fbf5549eaffe7669
lib/utils/queryparams.js
lib/utils/queryparams.js
var querystring = require('querystring'); function isFunction(func) { return typeof func == 'function'; } module.exports = { stringify: function(object) { var converted = {}; for (var key in object) { if (isFunction(object[key].getTime)) { converted[key] = Math.round(object[key].getTime() /...
var querystring = require('querystring'); function isFunction(func) { return typeof func === 'function'; } module.exports = { stringify: function(object) { var converted = {}; for (var key in object) { if (isFunction(object[key].getTime)) { converted[key] = Math.round(object[key].getTime() ...
Use strict equals for function checking
Use strict equals for function checking
JavaScript
mit
delighted/delighted-node,callemall/delighted-node
63cea3de01e108c43815cac66f88ccde3d22f1a8
lang-ext.js
lang-ext.js
/** * Extend +destination+ with +source+ */ function extend(destination, source) { for (var property in source) { destination[property] = source[property]; } return destination; }; extend(Array.prototype, { /** * Performs the given function +f+ on each element in the array instance. * The function is...
/** * Extend +destination+ with +source+ */ function extend(destination, source) { for (var property in source) { destination[property] = source[property]; } return destination; }; extend(Array.prototype, { /** * Performs the given function +f+ on each element in the array instance. * The function is...
Add map() and contains() functions to Array class.
Add map() and contains() functions to Array class.
JavaScript
mit
Northern01/tuneup_js,MYOB-Technology/tuneup_js,Northern01/tuneup_js,misfitdavidl/tuneup_js,alexvollmer/tuneup_js,songxiang321/ios-monkey,MYOB-Technology/tuneup_js,alexvollmer/tuneup_js,giginet/tuneup_js,songxiang321/ios-monkey,Banno/tuneup_js,giginet/tuneup_js,misfitdavidl/tuneup_js,Banno/tuneup_js
b687c6d803bd7a026d68927e5ec16a7323814c8b
src/authentication/steps/install.js
src/authentication/steps/install.js
/** * Step 7 * Where installation are run (npm, bower) */ export default function () { this.npmInstall( this.options['social-networks'].split(',').map(service => `passport-${service.toLowerCase()}-token`), {save: true} ) };
/** * Step 7 * Where installation are run (npm, bower) */ const PASSPORT_DEPENDENCIES = { local: ['passport-local'], jwt: ['passport-jwt'], facebook: ['passport-facebook-token'], twitter: ['passport-twitter-token'], vkontakte: ['passport-vkontakte-token'], foursquare: ['passport-foursquare-token'], gi...
Move passport dependencies to hash map
refactor(authentication): Move passport dependencies to hash map Add PASSPORT_DEPENDENCIES object that contains all passport strategies
JavaScript
mit
ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,tnunes/generator-trails,jaumard/generator-trails,italoag/generator-sails-rest-api,konstantinzolotarev/generator-trails
d9097a2a1296a690b942043e63ac4b42f0532229
loading-indicator.ios.js
loading-indicator.ios.js
var indicator = {} indicator.show = function() { var hud = MBProgressHUD.showHUDAddedToAnimated(this._getRootWindow(), true); hud.dimBackground = true; }; indicator.hide = function() { MBProgressHUD.hideHUDForViewAnimated(this._getRootWindow(), true); }; indicator._getRootWindow = function() { return UIAppli...
var indicator = {} indicator.show = function() { MBProgressHUD.showHUDAddedToAnimated(this._getRootWindow(), true); }; indicator.hide = function() { MBProgressHUD.hideHUDForViewAnimated(this._getRootWindow(), true); }; indicator._getRootWindow = function() { return UIApplication.sharedApplication().windows[0];...
Remove dim background, it's a bit stark.
Remove dim background, it's a bit stark.
JavaScript
mit
pocketsmith/nativescript-loading-indicator,pocketsmith/nativescript-loading-indicator
c4660c920dcf68d502e279dc44a4dd1995f19a22
static/app/directives/dst_top_nav.js
static/app/directives/dst_top_nav.js
angular.module('genome.directive', []) .directive('dstTopNav', function() { return { controller: function($scope, $cookies, $rootScope, $location, SelfFactory) { $scope.user_first_name = $cookies.user_first_name; $scope.expand = false; // $scope.toggleNavList = function (ev) { // if (...
angular.module('genome.directive', []) .directive('dstTopNav', function() { return { controller: function($scope, $cookies, $rootScope, $location, SelfFactory) { $scope.user_first_name = $cookies.user_first_name; $scope.expand = false; $scope.onpoolpage = $location.$$path === '/pool' ? true :...
Remove mouseLeave functionality from top nav
Remove mouseLeave functionality from top nav
JavaScript
mit
ThunderousFigs/Genomes,ThunderousFigs/Genomes,ThunderousFigs/Genomes
e70bc552af4ea37157a9e2f18cf9ad47eecd3e8c
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { all: [ 'Gruntfile.js', 'lib/*.js', 'test/*.js' ], options: { jshintrc: '.jshintr...
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { all: [ 'Gruntfile.js', 'lib/*.js', 'test/*.js' ], options: { jshintrc: '.jshintr...
Split out 'test' from 'jshint' subcommands in grunt
Split out 'test' from 'jshint' subcommands in grunt
JavaScript
mit
b225ccc/linerate_node_rest_api_module,b225ccc/linerate_node_rest_api_module
69d3a7503d50ccd000b34fbd7dd64255088507bc
example/migrations/2_deploy_contracts.js
example/migrations/2_deploy_contracts.js
module.exports = function(deployer) { deployer.deploy(ConvertLib); deployer.autolink(MetaCoin); deployer.deploy(MetaCoin); };
module.exports = function(deployer) { deployer.deploy(ConvertLib); deployer.autolink(); deployer.deploy(MetaCoin); };
Make example deploy a bit simpler.
Make example deploy a bit simpler.
JavaScript
mit
DigixGlobal/truffle,prashantpawar/truffle
bcdd65f8c220249204df1e21b9d8c19fdbd94890
src/rules/property-no-unknown/index.js
src/rules/property-no-unknown/index.js
import { isString, isArray, isBoolean, } from "lodash" import { isStandardSyntaxProperty, isCustomProperty, report, ruleMessages, validateOptions, } from "../../utils" import { all as properties } from "known-css-properties" export const ruleName = "property-no-unknown" export const messages = ruleMes...
import { isString, isArray, } from "lodash" import { isStandardSyntaxProperty, isCustomProperty, report, ruleMessages, validateOptions, } from "../../utils" import { all as properties } from "known-css-properties" export const ruleName = "property-no-unknown" export const messages = ruleMessages(ruleNam...
Fix rule to match the project standards
Fix rule to match the project standards
JavaScript
mit
stylelint/stylelint,hudochenkov/stylelint,stylelint/stylelint,heatwaveo8/stylelint,hudochenkov/stylelint,gucong3000/stylelint,heatwaveo8/stylelint,heatwaveo8/stylelint,gaidarenko/stylelint,stylelint/stylelint,hudochenkov/stylelint,gucong3000/stylelint,stylelint/stylelint,gaidarenko/stylelint,gaidarenko/stylelint,gucong...
4f030e8ae4aadf0dbfc155cb763d2d947d70252d
app/containers/AssessmentEntry/AssessmentEntryColHeader.js
app/containers/AssessmentEntry/AssessmentEntryColHeader.js
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; const AssessmentEntryColHeaderView = ({ questions }) => { const values = Object.keys(questions); return ( <tr className="bg-info"> <td>UID</td> <td colSpan="2">Boundary Name</td> <td>Name</td...
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; const AssessmentEntryColHeaderView = ({ questions }) => { const values = Object.keys(questions); return ( <tr className="bg-info"> <td>ID</td> <td colSpan="2">Boundary Name</td> <td>Name</td>...
Change the label UID to ID.
fix: Change the label UID to ID.
JavaScript
isc
klpdotorg/tada-frontend,klpdotorg/tada-frontend,klpdotorg/tada-frontend
92401a1125db1df5b48fb2fbaa80cc8719b0e047
client/components/forms/form-control.js
client/components/forms/form-control.js
import React, { Component, PropTypes } from 'react' import classnames from 'classnames' import { ControlButtons } from './' class FormControl extends Component { render () { const { componentClass: Component, className, style, submitted, ...props } = this.props const { $formRedux: { formInline, submit...
import React, { Component, PropTypes } from 'react' import classnames from 'classnames' import { ControlButtons } from './' class FormControl extends Component { render () { const { componentClass: Component, className, style, submitted, ...props } = this.props const { $formRedux: { formInline, submit...
Fix warning invalid props for textarea
Fix warning invalid props for textarea
JavaScript
agpl-3.0
nossas/bonde-client,nossas/bonde-client,nossas/bonde-client
09ee3b4d8098e6e69d34e453cb48487129d591ff
gom/app/components/formUtil/formUtil.js
gom/app/components/formUtil/formUtil.js
'use strict'; function getDescProp(obj, prop) { var parts = prop.split('.'); while(parts.length) obj = obj[parts.shift()]; return obj; } angular.module('gomApp.formUtil', [ 'ngMaterial' ]) .directive('gomAsyncSave', [ '$mdToast', function($mdToast) { return { restrict: 'A', require: 'ngMod...
'use strict'; function getDescProp(obj, prop) { var parts = prop.split('.'); while(parts.length) obj = obj[parts.shift()]; return obj; } angular.module('gomApp.formUtil', [ 'ngMaterial' ]) .directive('gomAsyncSave', [ '$mdToast', function($mdToast) { return { restrict: 'A', require: 'ngMod...
Tweak time to display, allow for explict labelling.
Tweak time to display, allow for explict labelling.
JavaScript
bsd-2-clause
jhogg41/gm-o-matic,jhogg41/gm-o-matic,jhogg41/gm-o-matic
d04fe29f5f079300a9f2a5c3cc35da47ad5ff097
app/renderer/containers/app.js
app/renderer/containers/app.js
const React = require('react') const { connect } = require('react-redux') const RequestsContainer = require('./requests') const SidebarContainer = require('./sidebar') const AppBar = require('material-ui/AppBar').default const App = ({ requests }) => <div className='app-container'> <Sideb...
const React = require('react') const { connect } = require('react-redux') const RequestsContainer = require('./requests') const SidebarContainer = require('./sidebar') const AppBar = require('material-ui/AppBar').default const titleStyle = { textAlign: 'center', height: '40px', lineHeight: '40px' } /* eslint-dis...
Change title text and center it.
Change title text and center it.
JavaScript
isc
niklasi/halland-proxy,niklasi/halland-proxy
ec242ddabc3867627ebb3b652e1f6a58a7732783
app/templates/tasks/scripts.js
app/templates/tasks/scripts.js
import gulp from 'gulp'; import gulpif from 'gulp-if'; import named from 'vinyl-named'; import webpack from 'webpack'; import gulpWebpack from 'webpack-stream'; import plumber from 'gulp-plumber'; import livereload from 'gulp-livereload'; import args from './lib/args'; gulp.task('scripts', (cb) => { return gulp.src(...
import gulp from 'gulp'; import gulpif from 'gulp-if'; import named from 'vinyl-named'; import webpack from 'webpack'; import gulpWebpack from 'webpack-stream'; import plumber from 'gulp-plumber'; import livereload from 'gulp-livereload'; import args from './lib/args'; const ENV = args.production ? 'production' : 'dev...
Add node env to script
Add node env to script - helps with optimising production code like react
JavaScript
mit
HaNdTriX/generator-chrome-extension-kickstart,HaNdTriX/generator-chrome-extension-kickstart
57266bd4bfb9a61f7efc106c4d2df47b432f9a7d
client/ember-cli-build.js
client/ember-cli-build.js
/* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); var Funnel = require('broccoli-funnel'); module.exports = function(defaults) { var app = new EmberApp(defaults, { // Any other options }); // Use `app.import` to add additional libraries to the generated // output f...
/* global require, module */ var EmberApp = require('ember-cli/lib/broccoli/ember-app'); var Funnel = require('broccoli-funnel'); module.exports = function(defaults) { var app = new EmberApp(defaults, { // Any other options }); // Use `app.import` to add additional libraries to the generated // output f...
Include leaflet lib + assets
Include leaflet lib + assets
JavaScript
mit
Turistforeningen/Hytteadmin,Turistforeningen/Hytteadmin
3244fcd522bd87e892732cbb67b97a26ae49d851
Twitter_FollowFly.user.js
Twitter_FollowFly.user.js
// ==UserScript== // @name Twitter Best // @namespace localhost // @description Get best tweets from profile // @include /^https://twitter\.com/[a-zA-Z0-9_]+$/ // @version 1 // @grant none // ==/UserScript== var l = document.createElement("a"); l.appendChild(document.createTextNode("View on Foll...
// ==UserScript== // @name Twitter - Add link to FollowFly from profile // @namespace localhost // @description Get best tweets from profile using FollowFly // @include /^https://twitter\.com/[a-zA-Z0-9_]+/?$/ // @version 1 // @grant none // ==/UserScript== var l = document.createElement("a"); l...
Add support for URLs with trailing slash
TwitterFollowFly: Add support for URLs with trailing slash
JavaScript
cc0-1.0
Tailszefox/Userscripts
c408f8fc7edef5e10b83b010c06d69df80c20442
tests/unit/services/multi-store-test.js
tests/unit/services/multi-store-test.js
import { moduleFor, test } from 'ember-qunit'; moduleFor('service:multi-store', 'Unit | Service | multi store', {}); test('it exists', function(assert) { let service = this.subject(); assert.ok(service); }); test('it starts empty', function(assert) { let service = this.subject(); assert.deepEqual([],...
import { moduleFor, test } from 'ember-qunit'; moduleFor('service:multi-store', 'Unit | Service | multi store', {}); test('it exists', function(assert) { let service = this.subject(); assert.ok(service); }); test('it starts empty', function(assert) { let service = this.subject(); assert.deepEqual([],...
Add in more unit tests.
Add in more unit tests.
JavaScript
mit
jonesetc/ember-cli-multi-store-service,jonesetc/ember-cli-multi-store-service