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
70ce9cfe4a0192ad766eac75f6fd51d32cd43024
server.js
server.js
'use strict'; const WebApp = require('./services/WebApp'); const app = new WebApp(); app .configure({ files: [ __dirname + '/config/application.js' ] }) .bootstrap() .launch(); module.exports = app;
'use strict'; const WebApp = require('./services/WebApp'); const app = new WebApp(); app .configure({ files: [ `${__dirname}/config/application.js`, `${__dirname}/config/application.local.js`, ], }) .bootstrap() .launch(); module.exports = app;
Add support for local config overrides
Add support for local config overrides
JavaScript
mit
release-notes/release-notes-hub,release-notes/release-notes-hub
5e27c30b83bf462f152b3839646f3ffc17b2f62e
_promisify.js
_promisify.js
var falsey = { 0: true, false: true, no: true, nope: true } var bloob = process.env.MZ_BLUEBIRD if (typeof Promise === 'undefined' || (bloob && !falsey[bloob])) { // use bluebird var promisify try { promisify = require('bluebird').promisify } catch (err) { throw new Error('please install blueb...
var falsey = { 0: true, false: true, no: true, nope: true } var bloob = process.env.MZ_BLUEBIRD if (typeof Promise === 'undefined' || (bloob && !falsey[bloob])) { // use bluebird var promisify try { promisify = require('bluebird').promisify } catch (err) { throw new Error('please install blueb...
Optimize native promisification and support multiple arguments
Optimize native promisification and support multiple arguments
JavaScript
mit
normalize/mz,aminuga/mz,petkaantonov/mz
e8c149607f9266b348fa519addf05f8f311f19f5
src/sorted_unique_count.js
src/sorted_unique_count.js
'use strict'; /** * For a sorted input, counting the number of unique values * is possible in constant time and constant memory. This is * a simple implementation of the algorithm. * * Values are compared with `===`, so objects and non-primitive objects * are not handled in any special way. * * @param {Array} ...
'use strict'; /** * For a sorted input, counting the number of unique values * is possible in constant time and constant memory. This is * a simple implementation of the algorithm. * * Values are compared with `===`, so objects and non-primitive objects * are not handled in any special way. * * @param {Array} ...
Fix code style of sorted unique count.
Fix code style of sorted unique count.
JavaScript
isc
simple-statistics/simple-statistics,GerHobbelt/simple-statistics,simple-statistics/simple-statistics,llimllib/simple-statistics,simple-statistics/simple-statistics,tmcw/simple-statistics
497be86d19253138425577534f68acd76143b275
authWindow.js
authWindow.js
const electron = require('electron'); const BrowserWindow = electron.BrowserWindow; const ipcMain = electron.ipcMain; module.exports = { createAuthWindow: function(mainWindow, loginCallback) { var loginWindow = new BrowserWindow({ frame: false, height: 250, modal: true, parent: mainWindow, movabl...
const electron = require('electron'); const BrowserWindow = electron.BrowserWindow; const ipcMain = electron.ipcMain; module.exports = { createAuthWindow: function(mainWindow, loginCallback) { var loginWindow = new BrowserWindow({ frame: false, height: 250, modal: true, parent: mainWindow, movabl...
Fix electron behaviour when cancelling http basic auth
Fix electron behaviour when cancelling http basic auth
JavaScript
mit
bobar/tdfb,bobar/tdfb,bobar/tdfb,bobar/tdfb
a30e8e8d64c242fd699dadd1de970d0024edcbd4
config/initializers/sequelize.js
config/initializers/sequelize.js
Sequelize = require('sequelize') dbConfig = require('../database.json')['staging'] pg = require('pg').native; var db; if (process.env.POSTGRES_URL) { var match = process.env.POSTGRES_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/); var db = new Sequelize(match[5], match[1], match[2], { dialect: ...
Sequelize = require('sequelize') dbConfig = require('../database.json')['staging'] pg = require('pg').native; var db; if (process.env.DATABASE_URL) { var match = process.env.DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/); var db = new Sequelize(match[5], match[1], match[2], { dialect: ...
Use DATABASE_URL instead of POSTGRES_URL
[CHORE] Use DATABASE_URL instead of POSTGRES_URL
JavaScript
isc
crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd
47d9342ea808373ba8cd410e39a1e1d5f7e088b5
cli/lib/validate.js
cli/lib/validate.js
'use strict'; var validate = exports; var validator = require('validator'); validate.name = function(input) { /** * TODO: Change js validation for json schema */ var error = 'Please provide your full name'; return input.length < 3 || input.length > 64? error : true; }; validate.email = function(input) {...
'use strict'; var validate = exports; var validator = require('validator'); validate.name = function(input) { /** * TODO: Change js validation for json schema * https://github.com/arigatomachine/cli/issues/134 */ var error = 'Please provide your full name'; return input.length < 3 || input.length > 64...
Document TODO for JSON schema
Document TODO for JSON schema
JavaScript
bsd-3-clause
luizbranco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli
65f772caa5aa0350ae0456e8bc2f447db1f21921
packages/internal-test-helpers/tests/index-test.js
packages/internal-test-helpers/tests/index-test.js
QUnit.module('internal-test-helpers'); QUnit.test('module present', function(assert) { assert.ok(true, 'each package needs at least one test to be able to run through `npm test`'); });
import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; moduleFor('internal-test-helpers', class extends AbstractTestCase { ['@test module present'](assert) { assert.ok(true, 'each package needs at least one test to be able to run through `npm test`'); } });
Convert internal-test-helpers to new test style
[CLEANUP] Convert internal-test-helpers to new test style
JavaScript
mit
fpauser/ember.js,tildeio/ember.js,jaswilli/ember.js,asakusuma/ember.js,emberjs/ember.js,karthiick/ember.js,qaiken/ember.js,jaswilli/ember.js,xiujunma/ember.js,givanse/ember.js,Turbo87/ember.js,Gaurav0/ember.js,kellyselden/ember.js,givanse/ember.js,intercom/ember.js,jaswilli/ember.js,asakusuma/ember.js,miguelcobain/embe...
2ad65976d5fbbea38e74004b4836c97d13394993
web/js/profile.js
web/js/profile.js
/** * Created by nkmathew on 05/07/2016. */ $(document).ready(function () { $("#profile-form").submit(function (e) { $("#btn-submit-profile").spin(BIG_SPINNER); var url = '/site/profile'; $.ajax({ type: 'POST', url: url, data: $("#profile-for...
/** * Created by nkmathew on 05/07/2016. */ $(document).ready(function () { $("#profile-form").submit(function (e) { $("#btn-submit-profile").spin(BIG_SPINNER); var url = '/site/profile'; $.ajax({ type: 'POST', url: url, data: $("#profile-for...
Add button for jumping to todays date
Add button for jumping to todays date
JavaScript
bsd-3-clause
nkmathew/intern-portal,nkmathew/intern-portal
69aed72d668bbe18883ce511a4b359c268c9c582
src/commands/commands.js
src/commands/commands.js
'use strict'; // This is a very simple interface // Used to fire up gulp task in your local project var runner = require('../utils/runner'), cb = require('../utils/callback'), argv = require('minimist')(process.argv.slice(2)); var commands = function(options) { var command = argv._[0] || options.parent.rawA...
'use strict'; // This is a very simple interface // Used to fire up gulp task in your local project var runner = require('../utils/runner'), cb = require('../utils/callback'), argv = require('minimist')(process.argv.slice(2)); var commands = function(options) { var command = argv._[0] || options.parent.rawA...
Adjust switch for accept alias to serve and build.
Adjust switch for accept alias to serve and build.
JavaScript
mit
mattma/ember-rocks,mattma/ember-rocks,mattma/ember-rocks
954fd1c7892d72ce9148a49554f49c8a554d5abe
app/config.js
app/config.js
// Use this file to change prototype configuration. // Note: prototype config can be overridden using environment variables (eg on heroku) module.exports = { // Service name used in header. Eg: 'Renew your passport' serviceName: " ", // Default port that prototype runs on port: '3000', // Enable or disab...
// Use this file to change prototype configuration. // Note: prototype config can be overridden using environment variables (eg on heroku) module.exports = { // Service name used in header. Eg: 'Renew your passport' serviceName: " ", // Default port that prototype runs on port: '80', // Enable or disable...
Change port that its running on
Change port that its running on
JavaScript
mit
tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui,SkillsFundingAgency/das-alpha-ui,tyfairclough/das-aml-beta-ui,tyfairclough/das-aml-beta-ui,tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui,tyfairclough/das-aml-beta-ui,SkillsFundingAgency/das-alpha-ui
51d3aa5289b62f4d6a602e7807ef934f4862525c
app/config.js
app/config.js
module.exports = (function () { 'use strict'; var config = { development: { server: { port: 3000 }, wsapp: { port: 3334 } }, testing: { server: { port: 3001 }, wsapp: { port: 3334 } }, production: { server: { ...
module.exports = (function () { 'use strict'; var config = { development: { server: { port: 3000 }, wsapp: { port: 3334 } }, testing: { server: { port: 3001 }, wsapp: { port: 3334 } }, production: { server: { ...
Use env port for app to listen on
Use env port for app to listen on
JavaScript
mit
cr0cK/mockify,Gandi/mockify
46014be39155d26a1b04d14485990a0a562b4695
src/som/vmobjects/SAbstractObject.js
src/som/vmobjects/SAbstractObject.js
'use strict'; function SAbstractObject() { this.toString = function () { var clazz = getClass(); if (clazz === null) { return "an Object(clazz==null)"; } return "a " + clazz.getName().getString(); }; this.send = function (selectorString, args) { var sele...
'use strict'; function SAbstractObject() { var _this = this; this.toString = function () { var clazz = _this.getClass(); if (clazz === null) { return "an Object(clazz==null)"; } return "a " + clazz.getName().getString(); }; this.send = function (selectorStr...
Use _this when it seems necessary
Use _this when it seems necessary Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
JavaScript
mit
smarr/JsSOM,smarr/JsSOM,SOM-st/JsSOM,smarr/JsSOM,smarr/JsSOM,SOM-st/JsSOM,SOM-st/JsSOM,SOM-st/JsSOM
99c8d2b74710d88b465b2cdaddc97216ce6404f4
tests/support/end2end-server.js
tests/support/end2end-server.js
let task = require('./lib/task'); if (process.platform === 'win32') { console.log('Windows is currently not supported. Please use'); console.log(' npm run test:end2end:ldap'); console.log(' npm run test:end2end:meteor'); console.log('instead.'); process.exit(0); } function logTask(taskname)...
let task = require('./lib/task'); if (process.platform === 'win32') { console.log('Windows is currently not supported. Please use'); console.log(' npm run test:end2end:ldap'); console.log(' npm run test:end2end:meteor'); console.log('instead.'); process.exit(0); } function logTask(taskname)...
Use correct name for array method 'forEach'
Use correct name for array method 'forEach'
JavaScript
mit
RobNeXX/4minitz,4minitz/4minitz,Huggle77/4minitz,4minitz/4minitz,Huggle77/4minitz,4minitz/4minitz,RobNeXX/4minitz,RobNeXX/4minitz,Huggle77/4minitz
8ffc94a2239933f0134cfc603d019da3a9b9a499
tests/unit/routes/index_test.js
tests/unit/routes/index_test.js
import Index from 'appkit/routes/index'; import App from 'appkit/app'; var route; module("Unit - IndexRoute", { setup: function(){ route = App.__container__.lookup('route:index'); } }); test("it exists", function(){ ok(route); ok(route instanceof Ember.Route); }); test("#model", function(){ deepEqual(...
import Index from 'appkit/routes/index'; import App from 'appkit/app'; var route; module("Unit - IndexRoute", { setup: function(){ route = routeFor('index'); } }); test("it exists", function(){ ok(route); ok(route instanceof Ember.Route); }); test("#model", function(){ deepEqual(route.model(), ['red',...
Refactor to use new test helper
Refactor to use new test helper
JavaScript
mit
dierbro/ember-invoice
5cd19bdea12501dc8a2a8cf8255f132f2794046d
src/gulpfile.js
src/gulpfile.js
var elixir = require('laravel-elixir'); elixir(function(mix) { mix.copy( 'node_modules/bootstrap/dist/fonts', 'public/build/fonts' ); mix.copy( 'node_modules/font-awesome/fonts', 'public/build/fonts' ); mix.copy( 'node_modules/ionicons/dist/fonts', ...
var elixir = require('laravel-elixir'); elixir(function(mix) { mix.copy( 'node_modules/bootstrap/dist/fonts', 'public/build/fonts' ); mix.copy( 'node_modules/font-awesome/fonts', 'public/build/fonts' ); mix.copy( 'node_modules/ionicons/dist/fonts', ...
Fix invalid path for Bootstrap js file
Fix invalid path for Bootstrap js file
JavaScript
mit
syahzul/admin-theme
57dd338eb6a7013eaace069ad8a5886ae16db57b
app/assets/javascripts/analytics/_register.js
app/assets/javascripts/analytics/_register.js
(function (root) { "use strict"; root.GOVUK.GDM = root.GOVUK.GDM || {}; root.GOVUK.GDM.analytics = { 'register': function () { GOVUK.Analytics.load(); var cookieDomain = (root.document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : root.document.domai...
(function (root) { "use strict"; root.GOVUK.GDM = root.GOVUK.GDM || {}; root.GOVUK.GDM.analytics = { 'register': function () { GOVUK.Analytics.load(); var cookieDomain = (root.document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : root.document.domai...
Fix analytics wrapper for window.location.href
Fix analytics wrapper for window.location.href
JavaScript
mit
alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend
8c36e50421438506ef24e5566761ebb30ec849fa
packages/ember-template-compiler/tests/system/compile_options_test.js
packages/ember-template-compiler/tests/system/compile_options_test.js
import { defaultCompileOptions } from 'ember-template-compiler'; import TransformOldBindingSyntax from 'ember-template-compiler/plugins/transform-old-binding-syntax'; import TransformItemClass from 'ember-template-compiler/plugins/transform-item-class'; import TransformAngleBracketComponents from 'ember-template-compil...
import { defaultCompileOptions } from 'ember-template-compiler'; import defaultPlugins from 'ember-template-compiler/plugins'; QUnit.module('ember-template-compiler: default compile options'); QUnit.test('default options are a new copy', function() { notEqual(defaultCompileOptions(), defaultCompileOptions()); }); ...
Fix tests confirming default plugins are included in compileOptions.
Fix tests confirming default plugins are included in compileOptions.
JavaScript
mit
jherdman/ember.js,intercom/ember.js,mfeckie/ember.js,HeroicEric/ember.js,miguelcobain/ember.js,cibernox/ember.js,amk221/ember.js,emberjs/ember.js,code0100fun/ember.js,cbou/ember.js,nickiaconis/ember.js,xiujunma/ember.js,stefanpenner/ember.js,tsing80/ember.js,chadhietala/ember.js,kaeufl/ember.js,sandstrom/ember.js,inter...
4640bab0430674787ed3d6ad613c9525925dbfbf
bindings/pyroot/ROOTaaS/html/static/js/custom.js
bindings/pyroot/ROOTaaS/html/static/js/custom.js
/* ROOTaaS JS */ // Make sure Clike JS lexer is loaded, then configure syntax highlighting for %%cpp and %%dcl magics require(['codemirror/mode/clike/clike', 'base/js/namespace', 'notebook/js/codecell'], function(Clike, IPython, CodeCell) { IPython.CodeCell.config_defaults.highlight_modes['magic_text/x-c++src'] = ...
/* ROOTaaS JS */ highlight_cells = function(IPython, mime) { IPython.CodeCell.options_default.cm_config.mode = mime; var cells = IPython.notebook.get_cells(); for (i = 0; i < cells.length; i++) { var cell = cells[i]; if (cell.cell_type == "code") { cell.code_mirror.setOption('mo...
Configure C++ syntax highlighting for ROOT prompt notebooks
Configure C++ syntax highlighting for ROOT prompt notebooks
JavaScript
lgpl-2.1
mkret2/root,veprbl/root,BerserkerTroll/root,gganis/root,CristinaCristescu/root,sbinet/cxx-root,bbockelm/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,beniz/root,beniz/root,thomaskeck/root,BerserkerTroll/root,esakellari/root,arch1tect0r/root,Y--/root,lgiommi/root,simonpf/root,veprbl/root,sirinath/root,agarciamo...
738918c2cf2eb9d3d4f88798a6e57a200985abaf
webpack.config.js
webpack.config.js
var webpack = require('webpack'), path = require('path'), yargs = require('yargs'); var libraryName = 'hdrhistogram', plugins = [], outputFile; if (yargs.argv.p) { //plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true })); outputFile = libraryName + '.min.js'; } else { outputFile =...
var webpack = require('webpack'), path = require('path'), yargs = require('yargs'); var libraryName = 'hdrhistogram', plugins = [], outputFile; if (yargs.argv.p) { plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true })); outputFile = libraryName + '.min.js'; } else { outputFile = l...
Add pako as a webpack external dependency
Add pako as a webpack external dependency
JavaScript
bsd-2-clause
alexvictoor/HdrHistogramJS,HdrHistogram/HdrHistogramJS,HdrHistogram/HdrHistogramJS,HdrHistogram/HdrHistogramJS,alexvictoor/HdrHistogramJS
1f727966e6416ca11789722552f52ee27297c2ab
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }...
'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }...
Remove build as dependency from release task.
chore(gulp): Remove build as dependency from release task.
JavaScript
mit
sebald/guidelines,sebald/guidelines
48017f9a9135b16b47a0404dab9d4e30c19ef4e1
gulpfile.js
gulpfile.js
'use strict'; const gulp = require('gulp'); const tools = require('./src'); const unmockedModulePathPatterns = [ 'node_modules/.*', 'utils/helper-tests.js' ]; tools.setGlobalConfiguration(defaults => { defaults.sourceFiles = defaults.sourceFiles.concat(// eslint-disable-line no-param-reassign '!**/dist/**'...
'use strict'; const gulp = require('gulp'); const tools = require('./src'); const unmockedModulePathPatterns = [ 'node_modules/.*', 'utils/helper-tests.js' ]; tools.setGlobalConfiguration(defaults => { defaults.sourceFiles = defaults.sourceFiles.concat(// eslint-disable-line no-param-reassign '!**/dist/**'...
Increase timeout for mocha tests
Increase timeout for mocha tests
JavaScript
mit
urbanjs/urbanjs-tools,urbanjs/urbanjs-tools,urbanjs/tools,urbanjs/tools,urbanjs/tools,urbanjs/urbanjs-tools
a30c0038343c6ccdfbe78c7e31e787b701b02e0c
gulpfile.js
gulpfile.js
const gulp = require('gulp'); const jasmineNode = require('gulp-jasmine-node'); const livereload = require('gulp-livereload'); // Loads Jasmine Browser gulp.task('test', () => gulp.src('jasmine/spec/*_spec.js').pipe(jasmineNode())); // Loads Jasmine Browser gulp.task('browser', () => gulp.src('index.html').pipe(live...
/* jshint esversion: 6 */ const gulp = require('gulp'); const jasmineNode = require('gulp-jasmine-node'); const livereload = require('gulp-livereload'); // Loads Jasmine Browser gulp.task('test', () => gulp.src('jasmine/spec/*_spec.js').pipe(jasmineNode())); // Loads Jasmine Browser gulp.task('browser', () => gul...
Add jshint esverion: 6 comment
Add jshint esverion: 6 comment
JavaScript
mit
andela-wmaina/inverted-index,andela-wmaina/inverted-index
30f768e24be58b83fed22847bc255dd3aaf68add
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var path = require('path'); var metal = require('gulp-metal'); var runSequence = require('run-sequence'); var codeFileGlobs = [ 'src/**/*.js', 'test/**/*.js', 'gulpfile.js', '!test/**/assets/**/*.js' ]; metal.registerTasks({ corePathFromSoy: function(file) { return pa...
'use strict'; var gulp = require('gulp'); var path = require('path'); var metal = require('gulp-metal'); var runSequence = require('run-sequence'); var codeFileGlobs = [ 'src/**/*.js', 'test/**/*.js', 'gulpfile.js', '!test/**/assets/**/*.js' ]; metal.registerTasks({ corePathFromSoy: function(file) { return pa...
Redefine build:all:js task to skip jquery builds
Redefine build:all:js task to skip jquery builds
JavaScript
bsd-3-clause
travisc5/metal.js,zsagia/metal.js,travisc5/metal.js,mairatma/metal.js,zsagia/metal.js
f8d297353f33accefde38b9100cb877ca680af49
app/scripts/helpers/repository-data-mapper.js
app/scripts/helpers/repository-data-mapper.js
'use babel'; import $ from 'jquery'; import CONFIG from '../constants/AppConstants'; let RepositoryDataMapper = { parse: (data) => { let xml = $($.parseXML(data)); return xml.find('Projects').map(function(){ let el = $(this).find('Project'); let lastBuildStatus = el.attr('lastBuildStatus'); ...
'use babel'; import $ from 'jquery'; import CONFIG from '../constants/AppConstants'; const getClassByBuildStatus = (lastBuildStatus) => { let statusClassname = ''; switch(lastBuildStatus) { case CONFIG.BUILD_STATUS_SUCCESS: statusClassname = CONFIG.CARD_SUCCESS_CLASS; break; case CONFIG.BUILD_...
Add new classes and icons based in cctray response status
Add new classes and icons based in cctray response status
JavaScript
mit
willmendesneto/build-checker-app,willmendesneto/build-checker-app
abc76d852c0ac8bc8e156cedea3b4a44c90e322f
htdocs/components/EG_10_Piechart.js
htdocs/components/EG_10_Piechart.js
Ensembl.Panel.Piechart.prototype.getContent = function() { var panel = this; var visible = []; this.graphData = []; this.graphConfig = {}; this.graphEls = {}; this.dimensions = eval($('input.graph_dimensions', this.el).val()); // ParaSite: sometimes the order of items in the DOM doesn't match th...
Ensembl.Panel.Piechart.prototype.init = function () { var panel = this; this.base(); if (typeof Raphael === 'undefined') { $.getScript('/raphael/raphael-min.js', function () { $.getScript('/raphael/g.raphael-min.js', function () { $.getScript('/raphael/g.pie-modified.js', function () { panel.g...
Use modified version of raphael piechart code
Use modified version of raphael piechart code
JavaScript
apache-2.0
EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite
3c450f8338cc14f2ecbc1f411f45084b7bbf0b65
webpack.config.js
webpack.config.js
module.exports = { entry: './src/index.js', output: { path: './dist', filename: 'hyperline.js' }, module: { loaders: [ { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { presets: ['es2015'] } } ] } };
module.exports = { entry: './src/index.js', output: { path: './dist', filename: 'hyperline.js', libraryTarget: "commonjs" }, module: { loaders: [ { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { presets: ['es2015'] } ...
Set webpack libraryTarget to commonjs
Set webpack libraryTarget to commonjs
JavaScript
mit
Hyperline/hyperline,edoren/hyperline
7d42f49e80f1abdb8917363835dd9b372f281b0b
webpack.config.js
webpack.config.js
/* eslint-env node */ const isProduction = process.env.NODE_ENV === 'production'; module.exports = { entry: { daypicker: './DayPicker.dist.js', }, output: { path: `${__dirname}/lib`, filename: `[name]${isProduction ? '.min' : ''}.js`, library: 'DayPicker', libraryTarget: 'umd', }, extern...
/* eslint-env node */ const isProduction = process.env.NODE_ENV === 'production'; module.exports = { devtool: 'source-map', entry: { daypicker: './DayPicker.dist.js', }, output: { path: `${__dirname}/lib`, filename: `[name]${isProduction ? '.min' : ''}.js`, library: 'DayPicker', libraryTar...
Add source-map to minified build
Add source-map to minified build
JavaScript
mit
saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker
eb2caed8e729b35d4311c2e80b85b6981bb42f37
webpack.config.js
webpack.config.js
const path = require('path'); module.exports = { devtool: 'cheap-module-eval-source-map', entry: { eventPage: './src/eventPage.js', contentScript: './src/contentScript.jsx', }, output: { path: path.join(__dirname, '/dist'), filename: '[name].bundle.js', }, module: { loaders: [ { ...
const path = require('path'); module.exports = { devtool: 'cheap-module-eval-source-map', entry: { eventPage: './src/eventPage.js', contentScript: './src/contentScript.jsx', }, output: { path: path.join(__dirname, '/dist'), filename: '[name].bundle.js', }, module: { loaders: [ { ...
Enable import of React components without .jsx suffix
Enable import of React components without .jsx suffix
JavaScript
mit
JohnAmadeo/fb-messenger-slackmoji,JohnAmadeo/fb-messenger-slackmoji
0ec06924f2c02763a6e21ca6b0e8e8a45644c0b7
webpack.config.js
webpack.config.js
const path = require('path'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const CompressionPlugin = require('compression-webpack-plugin'); const config = { entry: path.resolve(__dirname, './src/index.js'), output: { path: path.resolve(__dirname, './dist'), filename: 'ap...
const path = require('path'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const config = { entry: path.resolve(__dirname, './src/index.js'), output: { path: path.resolve(__dirname, './dist'), filename: 'app.bundle.js', }, module: { rules: [ {...
Remove devtool in production build
Remove devtool in production build - Reduces bundle size by 90%
JavaScript
mit
arnav-aggarwal/react-boilerplate-setup
17305541fff8cdf2ad709f16ecb6db1dfed325ca
src/hyper-content-for.js
src/hyper-content-for.js
angular.module("hyperContentFor", []) .value("HYPER_CONTENT_FOR_IDS", { }) .directive("hyperContent", function() { return { scope: { "for": "@" }, restrict: "E", transclude: true, controller: function($scope, $transclude, HYPER_CONTENT_FOR_IDS) { HYPER_CONTENT_FOR_IDS[$scope[...
angular.module('hyperContentFor', []) .value('HYPER_CONTENT_FOR_IDS', { }) .directive('hyperContent', function() { return { scope: { 'for': '@' }, restrict: 'E', transclude: true, controller: function($scope, $transclude, HYPER_CONTENT_FOR_IDS) { HYPER_CONTENT_FOR_IDS[$scope[...
Swap out double quotes with single quotes
Swap out double quotes with single quotes
JavaScript
mit
hyperoslo/hyper-content-for-angular,hyperoslo/hyper-content-for-angular
eced298af987ec1bc6e42392f80b9c6afc27e752
slickdeals-dont-track-me.user.js
slickdeals-dont-track-me.user.js
// ==UserScript== // @name Slickdeals Don't Track Me! // @version 1.0 // @description Replaces outgoing Slickdeals tracking links with direct links. // @match http://slickdeals.net/f/* // @namespace https://github.com/gg/slickdeals-dont-track-me // @author Gregg Gajic <https://github.com/gg> // @licen...
// ==UserScript== // @name Slickdeals Don't Track Me! // @version 1.1 // @description Replaces outgoing Slickdeals tracking links with direct links. // @match http://slickdeals.net/f/* // @namespace https://github.com/gg/slickdeals-dont-track-me // @author Gregg Gajic <https://github.com/gg> // @licen...
Add support for forum thread view
Add support for forum thread view
JavaScript
mit
gg/slickdeals-dont-track-me
17ab6c096163fffce68104d107a3e5abc868e414
static/script/debug.js
static/script/debug.js
var Debug = { init: function() { $( '.enable-profiling' ).click( function() { return toggleProfiling.bind( this )( true ); } ); $( '.disable-profiling' ).click( function() { return toggleProfiling.bind( this )( false ); } ); function toggleProfiling( ...
var Debug = { ready: function() { $( '.enable-profiling' ).click( function() { return toggleProfiling.bind( this )( true ); } ); $( '.disable-profiling' ).click( function() { return toggleProfiling.bind( this )( false ); } ); function toggleProfiling(...
Rename Debug.init JS function to Debug.ready for consistency with other modules
Rename Debug.init JS function to Debug.ready for consistency with other modules
JavaScript
mit
dionyziz/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes
d855c11a138e15dde2582319c3f8ccc443910f7a
test/PageClick-test.js
test/PageClick-test.js
describe('PageClick', () => { const PageClickInjector = require('inject!../src/PageClick'); let mock, PageClick; beforeEach(() => { mock = jasmine.createSpyObj('mock', ['']); }); beforeEach(() => PageClick = PageClickInjector({ mock })); it('should be ok', () => { expect(PageClick).toBeT...
import React from 'react/addons'; const TestUtils = React.addons.TestUtils; describe('PageClick', () => { const PageClickInjector = require('inject!../src/PageClick'); let mock, PageClick; beforeEach(() => { mock = jasmine.createSpyObj('mock', ['']); }); beforeEach(() => PageClick = PageClickInjecto...
Add tests for document click sub/unsub
Add tests for document click sub/unsub
JavaScript
mit
nkbt/react-page-click
71d93fec3444fc2813df4e93050eb1c5206ec6d9
bin/message.js
bin/message.js
module.exports = (function() { var def = require('./def'); var util = require('./util'); var guard_undef = util.guard_undef; var Message = def.type(function(raw_msg) { guard_undef(raw_msg); this.def_prop('raw', raw_msg); this.def_prop('channel', slack.getChannelGroupOrDMByID(raw_msg.channel)); ...
module.exports = (function() { var def = require('./def'); var util = require('./util'); var guard_undef = util.guard_undef; var Message = def.type(function(client, raw_msg) { guard_undef(raw_msg); this.def_prop('raw', raw_msg); this.def_prop('channel', client.getChannelGroupOrDMByID(raw_msg.chan...
Fix reference to non-existent field. Inject session state into ctor.
Fix reference to non-existent field. Inject session state into ctor.
JavaScript
mit
bassettmb/slack-bot-dev
b5b2d02b60c9db94b4fce6d7839832eb7b6a0356
config/webpack.js
config/webpack.js
const path = require('path'); const options = require('../utils/commandOptions'); module.exports = { commonn: { convertPxToRem: { enable: false, options: { rootValue: 108, // 设计稿为3倍图 propList: ['*', '!border'], unitPrecision: 4, ...
const path = require('path'); const options = require('../utils/commandOptions'); module.exports = { commonn: { convertPxToRem: { enable: false, options: { rootValue: 108, // 设计稿为3倍图 propList: ['*', '!border'], unitPrecision: 4, ...
Solve the default random avatar path problem
fix: Solve the default random avatar path problem
JavaScript
mit
yinxin630/fiora,yinxin630/fiora,yinxin630/fiora
aafe773244155b0630eed62ae72014d8a471b001
template/test/index.js
template/test/index.js
import glob from 'glob'; glob.sync('**/*-test.js', {realpath: true, cwd: __dirname}).forEach(require);
'use strict'; require('react-component-template/test');
Use test runner from react-component-template
Use test runner from react-component-template
JavaScript
mit
nkbt/cf-react-component-template
a49043204b258ae6e04038c69c40a4bb16ca18e8
server/config/routes.js
server/config/routes.js
const userController = require('./users/userController.js'); const listingController = require('./listings/listingController.js'); module.exports = (app, db) => { // Routes for all users app.get('/api/users', userController.getAll); app.post('/api/users', userController.createOne); // Routes for specific use...
const userController = require('./users/userController.js'); const listingController = require('./listings/listingController.js'); module.exports = (app, db, path, rootPath) => { // Routes for all users app.get('/api/users', userController.getAll); app.post('/api/users', userController.createOne); // Routes ...
Add catch-all route to allow page refreshing
Add catch-all route to allow page refreshing
JavaScript
mit
bwuphan/raptor-ads,Darkrender/raptor-ads,bwuphan/raptor-ads,wolnewitz/raptor-ads,Velocies/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads,wolnewitz/raptor-ads
1eb7f32e8bb7097cfca068dda7b339aca4691938
components/message/Message.js
components/message/Message.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import { ButtonGroup } from '../button'; import cx from 'classnames'; import theme from './theme.css'; class Message extends PureComponent { static propTypes = { className: PropTypes.string, children: ...
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import { ButtonGroup } from '../button'; import cx from 'classnames'; import theme from './theme.css'; class Message extends PureComponent { static propTypes = { className: PropTypes.string, children: ...
Drop the wrapper, clone the element and apply the class instead
Drop the wrapper, clone the element and apply the class instead
JavaScript
mit
teamleadercrm/teamleader-ui
de314b6ba5fcc799090d328e379002e04e8fc10f
lib/conditions/index.js
lib/conditions/index.js
const express = require('express'); const logger = require('../logger').policy; const schemas = require('../schemas'); const predefined = require('./predefined'); const conditions = {}; function register ({ name, handler, schema }) { const validate = schemas.register('condition', name, schema); conditions[name] =...
const express = require('express'); const logger = require('../logger').policy; const schemas = require('../schemas'); const predefined = require('./predefined'); const conditions = {}; function register ({ name, handler, schema }) { const validate = schemas.register('condition', name, schema); conditions[name] =...
Use log.warn instead of debug and claim it's a warn
Use log.warn instead of debug and claim it's a warn
JavaScript
apache-2.0
ExpressGateway/express-gateway
6ff68041de291f09753ef50f1c6d9b2b1f40b976
lib/less/tree/extend.js
lib/less/tree/extend.js
(function (tree) { tree.Extend = function Extend(selector, option, index) { this.selector = selector; this.option = option; this.index = index; switch(option) { case "all": this.allowBefore = true; this.allowAfter = true; break; default: this...
(function (tree) { tree.Extend = function Extend(selector, option, index) { this.selector = selector; this.option = option; this.index = index; this.object_id = tree.Extend.next_id++; this.parent_ids = [this.object_id]; switch(option) { case "all": this.allowBefore = true; ...
Set object id and initiate parent_ids array
Set object id and initiate parent_ids array
JavaScript
apache-2.0
mcanthony/less.js,wjb12/less.js,demohi/less.js,PUSEN/less.js,nolanlawson/less.js,jjj117/less.js,wjb12/less.js,less/less.js,PUSEN/less.js,angeliaz/less.js,Nastarani1368/less.js,MrChen2015/less.js,bammoo/less.js,dyx/less.js,Nastarani1368/less.js,paladox/less.js,SomMeri/less-rhino.js,NaSymbol/less.js,seven-phases-max/less...
eaa3fa7e5224932ccbcefdd26db81b384b3155fc
n3-composer/server/api/decisions.js
n3-composer/server/api/decisions.js
import { Router } from 'express' import bodyParser from 'body-parser' import Decision from './classes/Decision.js' var router = Router() router.use(bodyParser.urlencoded({ extended: true })) router.post('/createDecision', function(req, res) { // TODO These 4 fields (IUN, Version, unitIds, organizationId) should be ...
import { Router } from 'express' import bodyParser from 'body-parser' import Decision from './classes/Decision.js' var router = Router() router.use(bodyParser.urlencoded({ extended: true })) router.post('/createDecision', function(req, res) { // TODO These 4 fields (IUN, Version, unitIds, organizationId) should be ...
Return success param on successful decision upload
Return success param on successful decision upload
JavaScript
mit
eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia,eellak/gsoc17-diavgeia
caedc16fc57aec421d711dbdac3ebc37ebfb3283
src/index.js
src/index.js
import React, { PropTypes } from 'react'; import markdownIt from 'markdown-it'; import ast from './util/ast'; import renderTokens from './util/renderTokens'; import components from './components'; const md = new markdownIt(); /** * Renders React components from a Markdown string. * @todo Allow for custom markdown-i...
import React, { PropTypes } from 'react'; import markdownIt from 'markdown-it'; import ast from './util/ast'; import renderTokens from './util/renderTokens'; import components from './components'; /** * Renders React components from a Markdown string. * @todo Allow for custom components. */ export default function ...
Allow custom markdown-it instance to be passed to the <Markdown /> component
Allow custom markdown-it instance to be passed to the <Markdown /> component
JavaScript
mit
gakimball/meact,gakimball/meact
190e5fb8e549493841b9bb9ffd7820ddb00e6d85
src/index.js
src/index.js
function FakeStorage() { this.clear(); } FakeStorage.prototype = { key(index) { // sanitise index as int index = parseInt(index); // return early if index isn't a positive number or larger than length if (isNaN(index) || index < 0 || index >= this.length) { return null; } // loop thro...
class FakeStorage { #data = {}; get length() { return Object.keys(this.#data).length; } key(n) { return Object.keys(this.#data)[Number.parseInt(n, 10)] ?? null; } getItem(key) { const _data = this.#data; const _key = `${key}`; return Object.prototype.hasOwnProperty.call(_data, _key) ...
Rewrite using modern JavaScript features
Rewrite using modern JavaScript features
JavaScript
mit
jacobbuck/fake-storage
3ca2c46fef9c7b2339ca8df5e64044736f166ed0
src/index.js
src/index.js
/** * __ _ __ ____ * / / | |/ // __ \ * / / | // / / / * / /___/ |/ /_/ / * /_____/_/|_/_____/ * * @author Alan Doherty (BattleCrate Ltd.) * @license MIT */ // requires var Client = require('./classes/Client'); /** * Creates a new client at the specified host, if none * is provided the ...
/** * __ _ __ ____ * / / | |/ // __ \ * / / | // / / / * / /___/ |/ /_/ / * /_____/_/|_/_____/ * * @author Alan Doherty (BattleCrate Ltd.) * @license MIT */ // requires var Client = require('./classes/Client'); /** * Creates a new client at the specified host, if none * is provided the ...
Change js2doc fields in lxd init function
Change js2doc fields in lxd init function
JavaScript
mit
alandoherty/node-lxd
0c9d564d3733fa5807c36cb992e13026c0ec21c7
src/loading_bar_middleware.js
src/loading_bar_middleware.js
import { showLoading, hideLoading } from './loading_bar_ducks' const defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'] export default function loadingBarMiddleware(config = {}) { const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes return ({ dispatch }) => next => action => { ...
import { showLoading, hideLoading } from './loading_bar_ducks' const defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'] export default function loadingBarMiddleware(config = {}) { const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes return ({ dispatch }) => next => action => { ...
Update the way we identify suffixes to be more precise
Update the way we identify suffixes to be more precise
JavaScript
mit
mironov/react-redux-loading-bar
a2d2e80470b4d054424c00060c9ad4fe8c312fb8
src/model.js
src/model.js
/* Where is defined the DB connection. * * We got the following collections (cf. schema.js): * - User * - Client * - Grant * */ require.paths.unshift(__dirname + "/../vendors/rest-mongo/src") var events = require('events') , rest_mongo = require("rest-mongo/core") , mongo_backend = require("rest-mongo/...
/* Where is defined the DB connection. * * We got the following collections (cf. schema.js): * - User * - Client * - Grant * */ require.paths.unshift(__dirname + "/../vendors/rest-mongo/src") var events = require('events') , rest_mongo = require("rest-mongo/core") , mongo_backend = require("rest-mongo/...
Fix delete client: authorizations should be removed.
Fix delete client: authorizations should be removed. Signed-off-by: François de Metz <4073ce8ed0c8af431a3bf625d935cc2c9542ae9c@af83.com> Signed-off-by: Virtuo <ff019a5748a52b5641624af88a54a2f0e46a9fb5@ruyssen.fr>
JavaScript
agpl-3.0
AF83/auth_server
977b87be2bd6d05ee626e09b5ec7faff0edf888b
src/proxy.js
src/proxy.js
var http = require('http'); exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) { var proxy_req = http.createClient(proxy_port, proxy_host).request( client_req.method, client_req.url, client_req.headers); client_req.setEncoding('binary'); proxy_req.setEncoding('binary'); proxy_re...
var http = require('http'); exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) { var proxy_req = http.createClient(proxy_port, proxy_host).request( client_req.method, client_req.url, client_req.headers); client_req.setEncoding('binary'); proxy_req.addListener('response', function (p...
Revert "more encoding settings." because it's stupid.
Revert "more encoding settings." because it's stupid. This reverts commit ccb99882a11a9edd301de8c6e42bf9700e6f8bf5.
JavaScript
apache-2.0
tilgovi/lode,tilgovi/lode
8de119d3bf8d14d30b71efe3af5a1bf41eaca220
src/responseBuilderHandler.js
src/responseBuilderHandler.js
'use strict'; var ResponseBuilder = require('./ResponseBuilder'); module.exports = function(promiseReturningHandlerFn, request, cb, CustomRespBuilderClass) { promiseReturningHandlerFn() .then(function(respBuilder) { // eslint-disable-next-line no-console console.log('completed with %s milli...
'use strict'; var ResponseBuilder = require('./ResponseBuilder'); /** * In our APIs, we often have errors that are several promises deep, and without this, * it's hard to tell where the error actually originated (especially with AWS calls, etc). * This will generally make error stack traces much more helpful to us...
Enable Q's long stack support by default
Enable Q's long stack support by default Since the response builder handler is often one of the first things created in our APIs, it provides a convenient place to enable the long stack support in Q.
JavaScript
mit
silvermine/apigateway-utils
2c3f63b6cc372fac32cc0a917100d381f82743be
ui/js/dashboard/nco.js
ui/js/dashboard/nco.js
'use strict'; module.exports = { template: require('./nco.html'), data: function () { return { region : 12907, campaign: true, // Trick with-indicator into loading without a campaign overview: [{ title : 'Influencer', indicators: [164,165,166,167], chart : 'chart-bar' }, { t...
'use strict'; module.exports = { template: require('./nco.html'), data: function () { return { region : null, campaign: null, overview: [{ title : 'Influencer', indicators: [164,165,166,167], chart : 'chart-bar' }, { title : 'Information Source', indicators: [164,165,...
Set campaign and region to null by default
Set campaign and region to null by default Campaign and region are getting passed down by the dashboard view from the dropdowns, so there is no need to provide defaults in the NCO dashboard component.
JavaScript
agpl-3.0
unicef/polio,unicef/polio,unicef/polio,unicef/polio,unicef/rhizome,SeedScientific/polio,unicef/rhizome,unicef/rhizome,SeedScientific/polio,SeedScientific/polio,SeedScientific/polio,SeedScientific/polio,unicef/rhizome
6972b64ab05f7b66af8e512067a83cba0e0be917
jakefile.js
jakefile.js
/*global desc, task, jake, fail, complete */ (function() { "use strict"; task("default", ["lint"]); desc("Lint everything"); task("lint", [], function() { var lint = require("./build/lint/lint_runner.js"); var files = new jake.FileList(); files.include("**/*.js"); files.exclude("node_modules"); var opt...
/*global desc, task, jake, fail, complete */ (function() { "use strict"; desc("Build and test"); task("default", ["lint"]); desc("Lint everything"); task("lint", [], function() { var lint = require("./build/lint/lint_runner.js"); var files = new jake.FileList(); files.include("**/*.js"); files.exclude("...
Set up continuous integration script
Set up continuous integration script
JavaScript
mit
kyroskoh/lets_code_javascript,kyroskoh/lets_code_javascript,halcwb/lets_code_javascript,halcwb/lets_code_javascript,halcwb/lets_code_javascript,kyroskoh/lets_code_javascript
d5c4e9fe858c226b163114f6d9f5e2636c8a5589
spec/strong-api-spec.js
spec/strong-api-spec.js
describe('strong-api', function(){ var StrongAPI = require('../lib/strong-api'); var api; beforeEach(function () { api = new StrongAPI(); }); it('should translate in the default default locale', function() { expect(api.translate('everything')).toEqual('I am a translated string for locale: en'); ...
describe('strong-api', function(){ var StrongAPI = require('../lib/strong-api'); var api; beforeEach(function () { api = new StrongAPI(); }); it('should translate in the default default locale', function() { expect(api.translate('everything')).toEqual('I am a translated string for locale: en'); ...
Write a failing test to show variable substitution
Write a failing test to show variable substitution I plan to just use sprintf's support for this. http://www.diveintojavascript.com/projects/javascript-sprintf
JavaScript
mit
fs-webdev/strong,timshadel/strong
65942a18a3050a4572a1200bbe69a0d146251c15
test/components/MenuScreen/MenuScreen.spec.js
test/components/MenuScreen/MenuScreen.spec.js
import React from "react"; import ReactTestUtils from "react-addons-test-utils"; import MenuScreen from "src/components/MenuScreen/MenuScreen.js"; describe("MenuScreen", () => { it("should exist", () => { MenuScreen.should.exist; }); it("should be react element", () => { ReactTestUtils.isElement(<Menu...
import React from "react"; import ReactTestUtils from "react-addons-test-utils"; import jsdom from "mocha-jsdom"; import MenuScreen from "src/components/MenuScreen/MenuScreen.js"; import Button from "src/components/Shared/Button.js"; import setCurrentScreenAction from "src/actions/ScreenActions.js"; import { GAME_SCR...
Add tests for menu buttons
Add tests for menu buttons
JavaScript
mit
Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React
fa1180e20689c88f6e5db4023770cb51ba9d3e9a
utils/elementToText.js
utils/elementToText.js
import { isValidElement } from 'react' const whitespacesRe = /\s+/g const _format = (str = '') => str.replace(whitespacesRe, ' ') const elementToTextRec = x => { if (Array.isArray(x)) { return x.map(elementToTextRec).join('') } else if (isValidElement(x)) { return elementToTextRec(x.props.children) } el...
import { isValidElement } from 'react' const whitespacesRe = /\s+/g const _format = (str = '') => str.trim().replace(whitespacesRe, ' ') const elementToTextRec = x => { if (Array.isArray(x)) { return x.map(elementToTextRec).join('') } else if (isValidElement(x)) { return elementToTextRec(x.props.children)...
Move trim into more sensible place
Move trim into more sensible place
JavaScript
mit
styled-components/styled-components-website,styled-components/styled-components-website
a5fd7493788a20e1175d66f23dde1fdde6ff7fd2
src/article/shared/BlockQuoteComponent.js
src/article/shared/BlockQuoteComponent.js
import { NodeComponent } from '../../kit' export default class BlockQuoteComponent extends NodeComponent { render ($$) { let node = this.props.node let el = $$('div') .addClass('sc-block-quote') .attr('data-id', node.id) el.append( this._renderValue($$, 'content').ref('content'), ...
import { NodeComponent } from '../../kit' export default class BlockQuoteComponent extends NodeComponent { render ($$) { let node = this.props.node let el = $$('div') .addClass('sc-block-quote') .attr('data-id', node.id) el.append( this._renderValue($$, 'content', { container: true })....
Make BlockQuote.content editable as container.
Make BlockQuote.content editable as container.
JavaScript
mit
substance/texture,substance/texture
62e6ed3baa6183897b1af121269d1dee9edb2704
js/popup.js
js/popup.js
// Filename: popup.js // Date: July 2017 // Authors: Evgeni Dobranov & Thomas Binu // Purpose: Defines extension UI and functional behavior // Entry point into app functionality function onPopupLoad(){ // Immediately inject script to get page content chrome.tabs.executeScript(null, { file: "js/contentsc...
// Filename: popup.js // Date: July 2017 // Authors: Evgeni Dobranov & Thomas Binu // Purpose: Defines extension UI and functional behavior // Entry point into app functionality function onPopupLoad(){ // Immediately inject script to get page content chrome.tabs.executeScript(null, { file: "js/contentsc...
Update regex that cleans page content
Update regex that cleans page content Regex no longer removes common punctuation. Line breaks are replaced with a space.
JavaScript
apache-2.0
our-sinc-topo/visable-marketplace,our-sinc-topo/visable-marketplace
8c8317d74cd996a2ea6d4fb014d51199108dbe01
src/components/Page/styles/Actions.css.js
src/components/Page/styles/Actions.css.js
// @flow import baseStyles from '../../../styles/resets/baseStyles.css.js' import styled from '../../styled' export const config = { marginBottom: 100, padding: '12px 0', spacing: 5, } export const ActionsUI = styled('div')` ${baseStyles} display: flex; flex-direction: row-reverse; margin-left: -${config....
// @flow import baseStyles from '../../../styles/resets/baseStyles.css.js' import styled from '../../styled' export const config = { marginBottom: 100, padding: '12px 0', spacing: 10, } export const ActionsUI = styled('div')` ${baseStyles} display: flex; flex-direction: row-reverse; margin-left: -${config...
Adjust spacing between Page.Actions items
Adjust spacing between Page.Actions items
JavaScript
mit
helpscout/blue,helpscout/blue,helpscout/blue
1a0c26c08f4c61db23fe5ad990b69e1da7579d16
test/transformer.spec.js
test/transformer.spec.js
var tape = require('tape'); tape.test('transformer - should be a function', function (assert) { assert.equals(typeof require('../lib/transformer'), 'function'); assert.end(); }); tape.test('transformer - should return a templating function', function (assert) { assert.equals(typeof require('../lib/transformer')(),...
var tape = require('tape'); tape.test('transformer - should be a function', function (assert) { assert.equals(typeof require('../lib/transformer'), 'function'); assert.end(); }); tape.test('transformer - should return a templating function', function (assert) { assert.equals(typeof require('../lib/transformer')(),...
Add tests for the {index} placeholder
Add tests for the {index} placeholder
JavaScript
mit
nsand/newid
53a9b2e2afbd83c76d007dacdb8bfc1491e6d34e
tests/helperfunctions.js
tests/helperfunctions.js
function getMap(){ var map = new OpenLayers.Map({ layers: [ new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", { layers: "basic" } ) ] }); return m...
function getMap(){ var map = new OpenLayers.Map({ layers: [ new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", { layers: "basic" } ) ] }); return m...
Adjust the helperfunction for a lazy map component to use the correct xtype.
Adjust the helperfunction for a lazy map component to use the correct xtype.
JavaScript
bsd-3-clause
geoext/GXM,geoext/GXM
da1be2ea51c8afa987e237216154f436fe0fa867
lib/compolib.build.js
lib/compolib.build.js
'use strict' // var util = require('util') var console = require('better-console') // var renderNav = require('./compolib.renderNav') var filetreeToJSON = require('./compolib.filetreeToJSON') var components = require('./compolib.components') var ncp = require('ncp').ncp module.exports = function build (opts) { // c...
'use strict' // var util = require('util') var console = require('better-console') // var renderNav = require('./compolib.renderNav') var filetreeToJSON = require('./compolib.filetreeToJSON') var components = require('./compolib.components') var ncp = require('ncp').ncp module.exports = function build (opts) { // c...
Add non-hardcoded variable that leads to styleguide assets folder
Add non-hardcoded variable that leads to styleguide assets folder
JavaScript
mit
karlisup/chewingum,karlisup/chewingum
493bfd49c7a7d45bb723a4108889c27afc6bddff
examples/artwork-of-selection.js
examples/artwork-of-selection.js
var iTunes = require('../') , conn = null iTunes.createConnection(onConn); function onConn (err, c) { if (err) throw err; conn = c; conn.selection( onSelection ); } function onSelection (err, selection) { if (err) throw err; if (selection.length > 0) { var track = selection[0]; track.artworks(o...
var iTunes = require('../') , conn = null iTunes.createConnection(onConn); function onConn (err, c) { if (err) throw err; conn = c; conn.selection( onSelection ); } function onSelection (err, selection) { if (err) throw err; if (selection.length > 0) { var track = selection[0]; track.artworks(o...
Add a test case to ensure that the memory leak is fixed.
Add a test case to ensure that the memory leak is fixed.
JavaScript
mit
TooTallNate/node-iTunes,TooTallNate/node-iTunes,TooTallNate/node-iTunes
eb4c550d39d3231873e5dc059a062c052d3707de
webpack/plugins/commonsChunk.js
webpack/plugins/commonsChunk.js
const { optimize: { CommonsChunkPlugin }, } = require('webpack'); function isCss({ resource }) { return resource && resource.match(/\.(css|sss)$/); } function isVendor({ resource }) { return resource && resource.indexOf('node_modules') >= 0 && resource.match(/\.js$/); } module.exports = (config) =>...
const { optimize: { CommonsChunkPlugin }, } = require('webpack'); function isCss({ resource }) { return resource && resource.match(/\.(css|sss)$/); } function isVendor({ resource }) { return resource && resource.indexOf('node_modules') >= 0 && resource.match(/\.js$/); } module.exports = (config) =>...
Rename common chunk "manifest" to "runtime"
Rename common chunk "manifest" to "runtime"
JavaScript
mit
AlexMasterov/webpack-kit,AlexMasterov/webpack-kit
e204f56c778711d707589a96b0aff021f2efeda3
tickle-frontend/src/errorReporting.js
tickle-frontend/src/errorReporting.js
// This should be the only file aware that we use Opbeat for error reporting. import { opbeatAppId, opbeatOrgId } from './settings' const init = () => { window._opbeat('config', { orgId: opbeatOrgId, appId: opbeatAppId }) } const setExtraContext = (extraContext) => { window._opbeat('setExtraContext', ex...
// This should be the only file aware that we use Opbeat for error reporting. import { opbeatAppId, opbeatOrgId } from './settings' const init = () => { window._opbeat('config', { orgId: opbeatOrgId, appId: opbeatAppId }) } const setExtraContext = (extraContext) => { window._opbeat('setExtraContext', ex...
Use extra context from error object
Use extra context from error object
JavaScript
mit
ovidner/bitket,ovidner/bitket,ovidner/bitket,ovidner/bitket
9d8b30591611a56c2d6410eab501fcdb5997f3c3
test/decoder/decode.js
test/decoder/decode.js
import test from 'ava'; import { decoder } from '../../src'; import base from '../base'; test('should be able to compose decoder functions', t => { t.deepEqual( decoder.decode( [].concat( base.latLngBytes, base.unixtimeBytes, base.uint16Bytes, base.tempBytes, base.ui...
import test from 'ava'; import { decoder } from '../../src'; import base from '../base'; test('should be able to compose decoder functions', t => { t.deepEqual( decoder.decode( [].concat( base.latLngBytes, base.unixtimeBytes, base.uint16Bytes, base.tempBytes, base.ui...
Fix copy-paste typo in unit test.
Fix copy-paste typo in unit test.
JavaScript
mit
thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization
99057f25b5c98fb4ff89090f96dbcb112ab93c86
dropbox_client.js
dropbox_client.js
DropboxOAuth = {}; // Request dropbox credentials for the user // @param options {optional} // @param callback {Function} Callback function to call on // completion. Takes one argument, credentialToken on success, or Error on // error. DropboxOAuth.requestCredential = function (options, callback) { // support bo...
DropboxOAuth = {}; // Request dropbox credentials for the user // @param options {optional} // @param callback {Function} Callback function to call on // completion. Takes one argument, credentialToken on success, or Error on // error. DropboxOAuth.requestCredential = function (options, callback) { // support bo...
Undo code for client logic
Undo code for client logic
JavaScript
mit
gcampax/meteor-dropbox-oauth,gcampax/meteor-dropbox-oauth
f2264fa5eab081f13ba87bf79eae1e1a6c64bf8f
test/sugar_dom_test.js
test/sugar_dom_test.js
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/ /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ (function(el, document) { test('is awesome', 1, function() { ...
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/ /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ (function(el, document) { test('creating plain DOM elements', ...
Add more basic tests for creating elements
Add more basic tests for creating elements
JavaScript
mit
webmat/sugar_dom
5c67a13bd8167183720cb8d39ff9e5630d8398e3
src/js/api.js
src/js/api.js
import ApiEvents from './events/ApiEvents'; import { firebaseRef } from './appconfig'; var ref = firebaseRef.child('notes'); var API = { start() { ref.on('child_added', (snapshot) => { var noteName = snapshot.key(); var note = snapshot.val(); ApiEvents.noteAdded(noteName, note); }); r...
import ApiEvents from './events/ApiEvents'; import { firebaseRef } from './appconfig'; var noteRef = firebaseRef.child('notes'); var API = { start() { noteRef.on('child_added', (snapshot) => { var noteName = snapshot.key(); var note = snapshot.val(); ApiEvents.noteAdded(noteName, note); })...
Rename ref to noteRef in API
Rename ref to noteRef in API Will need ref to ref the base ref.
JavaScript
mit
kentor/notejs-react,kentor/notejs-react,kentor/notejs-react
a012312485095fd894806b4070164f859bcab523
minechat.js
minechat.js
var readline = require('readline'); var mineflayer = require('mineflayer'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false }); var bot = mineflayer.createBot({ host: "hostname", username: "user@email.com", password: "password" }); rl.on('line', function(lin...
var readline = require('readline'); var mineflayer = require('mineflayer'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false }); function print_help() { console.log("usage: node minechat.js <hostname> <user> <password>"); } if (process.argv.length < 5) { console....
Read host, user and passwd from arglist
Read host, user and passwd from arglist
JavaScript
mit
ut7/minechat,llbit/minechat
dbd02d4ae342e0b5797dc2cd4b7092daf20a1e73
js/select_place.js
js/select_place.js
var Place = {}; $(document).on('pageshow', '#select-place', function() { $('#select-place-map').css('height', 500); utils.getCurrentLocation().done(function(location) { Place.map = Map.createMap('select-place-map', location.latitude, location.longitude, 12); Place.currentLocation = Map.createMarker(Pl...
var Place = {}; $(document).on('pageshow', '#select-place', function() { $('#select-place-map').css('height', 450); var pos = Map.map.getCenter(); Place.map = Map.createMap('select-place-map', pos.lat(), pos.lng(), 8); // kutc Place.currentLocation = Map.createMarker(Place.map, 'Current Location', ...
Set select place marker latlng based on main map center latlng
Set select place marker latlng based on main map center latlng
JavaScript
mit
otknoy/michishiki
d0cf2ffa9ed5613bd6bb34c7cd6049d8b6304b27
test/cypress/plugins/index.js
test/cypress/plugins/index.js
/* eslint-disable */ require('dotenv').config() module.exports = (on, config) => { if (config.testingType === 'component') { require('@cypress/react/plugins/load-webpack')(on, config, {webpackFilename: './webpack.config.js'}) return config } require('@cypress/code-coverage/task')(on, config) on('file:...
/* eslint-disable */ require('dotenv').config() module.exports = (on, config) => { if (config.testingType === 'component') { require('@cypress/react/plugins/load-webpack')(on, config, { webpackFilename: './webpack.config.js' }) return config } require('@cypress/code-coverage/task')(on, config) on('fil...
Fix formatting in plugins file
Fix formatting in plugins file
JavaScript
mit
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
b3aa0298d5bdccd24a614f7a1194fae0762e4685
js/forum/src/components/DiscussionRenamedPost.js
js/forum/src/components/DiscussionRenamedPost.js
import EventPost from 'flarum/components/EventPost'; /** * The `DiscussionRenamedPost` component displays a discussion event post * indicating that the discussion has been renamed. * * ### Props * * - All of the props for EventPost */ export default class DiscussionRenamedPost extends EventPost { icon() { ...
import EventPost from 'flarum/components/EventPost'; /** * The `DiscussionRenamedPost` component displays a discussion event post * indicating that the discussion has been renamed. * * ### Props * * - All of the props for EventPost */ export default class DiscussionRenamedPost extends EventPost { icon() { ...
Fix use of "new" keyword making eslint angry
Fix use of "new" keyword making eslint angry
JavaScript
mit
Albert221/core,flarum/core,malayladu/core,falconchen/core,renyuneyun/core,vuthaihoc/core,Luceos/core,flarum/core,dungphanxuan/core,datitisev/core,zaksoup/core,falconchen/core,datitisev/core,Albert221/core,Onyx47/core,Luceos/core,zaksoup/core,datitisev/core,Albert221/core,renyuneyun/core,kirkbushell/core,kidaa/core,zaks...
762e01365545b5eb2638fbe8efd9753fef907d92
app.js
app.js
function Dialogue(title,contents,buttons) { var Title; var Contents; var Buttons; /** Setters */ function SetTitle(){ } function SetButtons(){ } function SetContents(){ } function SetID(){ } /** Getters */ function GetTitle(){ } function GetButtons...
function App(){ return { assert: function(a, b, message) { if (a !== b) { throw message || "Assertion Failed"; } } } } function Dialogue(title,contents,buttons){ var Title; var Contents; var Buttons; var ID; var app = new App(); ...
Add assert as part of App();
Add assert as part of App();
JavaScript
mit
lgoldstien/legacy.JS
69100f5362709045ef496caad23a464921dc63ba
frontend/app/base/directives/editable_link.js
frontend/app/base/directives/editable_link.js
angular.module('app.directives').directive('editableLink', editableLink); function editableLink() { return { restrict: 'E', scope: { viewModel: '=', type: '@', field: '@', object: '=?', socialMediaName: '@?', }, templateUrl...
angular.module('app.directives').directive('editableLink', editableLink); function editableLink() { return { restrict: 'E', scope: { viewModel: '=', type: '@', field: '@', object: '=?', socialMediaName: '@?', }, templateUrl...
Allow clearing of social media fields with inline editing
LILY-2266: Allow clearing of social media fields with inline editing
JavaScript
agpl-3.0
HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily
120096cd116a7dcd910ea5d887a6e969b206b53d
controller.js
controller.js
'use strict'; const Foxx = require('org/arangodb/foxx'); const schema = require('./schema'); const graphql = require('graphql-sync').graphql; const ctrl = new Foxx.Controller(applicationContext); // This is a regular Foxx HTTP API endpoint. ctrl.post('/graphql', function (req, res) { // By just passing the raw body...
'use strict'; const Foxx = require('org/arangodb/foxx'); const schema = require('./schema'); const graphql = require('graphql-sync').graphql; const formatError = require('graphql-sync').formatError; const ctrl = new Foxx.Controller(applicationContext); // This is a regular Foxx HTTP API endpoint. ctrl.post('/graphql'...
Use formatError to expose errors
Use formatError to expose errors
JavaScript
apache-2.0
arangodb-foxx/demo-graphql
67eb630c11fe5ef0578411745d9734714ae39022
util/debug.js
util/debug.js
var browserify = require('browserify'); var cssify = require('cssify'); var watchify = require('watchify'); var through = require('through'); var fs = require('fs'); var path = require('path'); var cp = require('child_process'); function globalOl(file) { var data = ''; function write(buf) { data += buf; } functi...
var browserify = require('browserify'); var cssify = require('cssify'); var watchify = require('watchify'); var through = require('through'); var fs = require('fs'); var path = require('path'); var cp = require('child_process'); function globalOl(file) { var data = ''; function write(buf) { data += buf; } functi...
Remove accidently added error handler from update listener
Remove accidently added error handler from update listener
JavaScript
bsd-2-clause
ahocevar/openlayers-app,ahocevar/openlayers-app
26b3b8c32d8fd9a51e374f4cdd278a5fcec92daf
project/static/js/authors/friend-requests.js
project/static/js/authors/friend-requests.js
$(function() { var $friend_request_button = $("#send-friend-request-button"); var $friend_request_sent_message = $("#friend-request-sent-message"); $friend_request_button.on('click', function () { var $that = $(this); $.post($that.data('url'), function () { $that.hide(); ...
$(function() { var $friend_request_button = $("#send-friend-request-button"); var $friend_request_sent_message = $("#friend-request-sent-message"); var $follow_button = $("#follow-button"); var $unfollow_button = $("#unfollow-button"); $friend_request_button.on('click', function () { var $t...
Update UI to represent that author is also followed when you send a friend request
Update UI to represent that author is also followed when you send a friend request
JavaScript
apache-2.0
TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution
5de73ce2cf93631bf48fee2ae5ae7c54bd500fba
src/values/PropertyDescriptor.js
src/values/PropertyDescriptor.js
"use strict"; /* @flow */ const Value = require('../Value'); let serial = 0; //TODO: We should call this a PropertyDescriptor, not a variable. class PropertyDescriptor { constructor(value) { this.value = value; this.serial = serial++; this.configurable = true; this.enumerable = true; this.writeable = tru...
"use strict"; /* @flow */ const Value = require('../Value'); let serial = 0; //TODO: We should call this a PropertyDescriptor, not a variable. class PropertyDescriptor { constructor(value) { this.value = value; this.serial = serial++; this.configurable = true; this.enumerable = true; this.writeable = tru...
Call setter even if object isn't writable.
Call setter even if object isn't writable.
JavaScript
mit
codecombat/esper.js,codecombat/esper.js,codecombat/esper.js
66d7acce7bf82ddc0a0afa5e1fae8e6a13214c47
Chapter_2/app.js
Chapter_2/app.js
var http = require('http'); var os = require('os'); var handler = function(request, response) { response.writeHead(200); response.end("You've hit " + os.hostname()); } var www = http.createServer(handler); www.listen(8080);
var http = require('http'); var os = require('os'); var handler = function(request, response) { response.writeHead(200); response.end("You've hit " + os.hostname() + "\n"); } var www = http.createServer(handler); www.listen(8080);
Add a new line character
Add a new line character
JavaScript
mit
Evalle/k8s-in-action,Evalle/k8s-in-action
0fb6b78a3f59152405c0f6e5a81adcd939c1fc01
src/commands/tick-rm.js
src/commands/tick-rm.js
export default rm import Entry from '../entry' import PouchDB from 'pouchdb' import {write} from './output' import chalk from 'chalk' import conf from '../config' let db = new PouchDB(conf.db) function rm (yargs) { let argv = yargs .usage('tick rm entryid') .argv db.get(argv._[1]) .then(removeEntry) }...
export default rm import Entry from '../entry' import PouchDB from 'pouchdb' import {write} from './output' import chalk from 'chalk' import conf from '../config' let db = new PouchDB(conf.db) function rm (yargs) { let argv = yargs .usage('Usage: tick rm [options] <entryid ...>') .help('h') .alias('h', 'help...
Clean up tick rm usage and add help
Clean up tick rm usage and add help
JavaScript
agpl-3.0
jonotron/tickbin,tickbin/tickbin,chadfawcett/tickbin
c02374368a35d3780d67d88c79e8bfef139fae80
ckeditor/static/ckeditor/ckeditor/config.js
ckeditor/static/ckeditor/ckeditor/config.js
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6...
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6...
Disable the SCAYT and context menu CKEditor plugins so we can use the native browser / OS spell-checker instead.
Disable the SCAYT and context menu CKEditor plugins so we can use the native browser / OS spell-checker instead.
JavaScript
bsd-3-clause
ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor
623b9508b89f243f7f0652d01cf18f79c7604405
snippets/base/static/js/templateChooserWidget.js
snippets/base/static/js/templateChooserWidget.js
;$(function() { 'use strict'; if ($('.inline-template').length > 1) { $('.inline-template').hide(); $('#id_template_chooser').change(function() { let template = $(this).val(); $('.inline-template').hide(); if (template) { $inline = $('.' + tem...
;$(function() { 'use strict'; function showTemplate() { let value = $('#id_template_chooser').val(); if (value) { $('.inline-template').hide(); $('.' + value).show(); } } if ($('.inline-template').length > 1) { $('.inline-template').hide(); ...
Fix template chooser on save error.
Fix template chooser on save error.
JavaScript
mpl-2.0
glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service,mozmar/snippets-service,mozilla/snippets-service,mozmar/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service,glogiotatidis/snippets-service,mozilla/snippets-service,glogiotatidis/snippets-service
b1416f9fabc1a6c17436eb443050ec8e997abc1a
app/js/arethusa.core/arethusa_local_storage.js
app/js/arethusa.core/arethusa_local_storage.js
"use strict"; /** * @ngdoc service * @name arethusa.core.arethusaLocalStorage * * @description * Arethusa's API to communicate with `localStorage`. All values stored are * prefixed with `arethusa.`. * * Performs type coercion upon retrieval for Booleans, so that `true`, `false` * and `null` can be used proper...
"use strict"; /** * @ngdoc service * @name arethusa.core.arethusaLocalStorage * * @description * Arethusa's API to communicate with `localStorage`. All values stored are * prefixed with `arethusa.`. * * Performs type coercion upon retrieval for Booleans, so that `true`, `false` * and `null` can be used proper...
Add delegator for keys() in arethusaLocalStorage
Add delegator for keys() in arethusaLocalStorage
JavaScript
mit
Masoumeh/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa
8d479ed64e6e21445cfa8e5c60f46605bd8eea5a
lib/components/completeBlock/completeBlock.js
lib/components/completeBlock/completeBlock.js
import CompleteBlock from './completeBlock.html'; import './completeBlock.scss'; class CompleteBlock { static detailsComponent() { return { templateUrl: CompleteBlock, bindings: { headerImg: '@', headerTitle: '@', headerPicto: '@', headerColor: '@', headerBackgroundColor: '@', bodyBack...
import TemplateCompleteBlock from './completeBlock.html'; import './completeBlock.scss'; class CompleteBlock { static detailsComponent() { return { templateUrl: TemplateCompleteBlock, bindings: { headerImg: '@', headerTitle: '@', headerPicto: '@', headerColor: '@', headerBackgroundColor: '...
Rename variable because the template and the class has the same name
fix: Rename variable because the template and the class has the same name
JavaScript
mit
kevincaradant/web-template-webpack,kevincaradant/web-template-webpack
46c3ec4c3eb99e3a8812e6674ce6940f4f15a5aa
test/client/ui-saucelabs.conf.js
test/client/ui-saucelabs.conf.js
exports.config = { specs: ['ui/**/*.spec.js'], sauceUser: process.env.SAUCE_USERNAME, sauceKey: process.env.SAUCE_ACCESS_KEY, baseUrl: 'http://localhost:3000', capabilities: { 'browserName': 'firefox', 'platform': 'Linux', 'version': '32', 'tunnel-identifier': process.env.TRA...
exports.config = { specs: ['ui/**/*.spec.js'], sauceUser: process.env.SAUCE_USERNAME, sauceKey: process.env.SAUCE_ACCESS_KEY, baseUrl: 'http://localhost:3000', capabilities: { 'browserName': 'firefox', 'platform': 'Windows 7', 'version': '32', 'tunnel-identifier': process.env...
Use Windows on Sauce to avoid unsupported platform combinations
Use Windows on Sauce to avoid unsupported platform combinations
JavaScript
mit
agilejs/2014-10-code-red
efbef4f393cd571b593b5aafb7cd3465f1102e62
src/components/utils.js
src/components/utils.js
export function asyncHandler(handler) { return function(req, res, next) { if (!handler) { throw new Error(`Invalid handler ${handler}, it must be a function.`); } handler(req, res, next) .then(function(response) { if (response) { res.send(response); } }) ...
export function asyncHandler(handler) { return function(req, res, next) { if (!handler) { throw new Error(`Invalid handler ${handler}, it must be a function.`); } handler(req, res, next) .then(function(response) { if (response) { res.send(response); } }) ...
Fix incorrect extraction of error code
Fix incorrect extraction of error code
JavaScript
mit
arkakkar/electron-update-api,TakeN0/squirrel-updates-server,Aluxian/squirrel-updates-server
a1e25a3e10cc2ce7cbf9c07284981cd2cc5b85eb
app/assets/javascripts/application.js
app/assets/javascripts/application.js
//= require jquery //= require jquery_ujs //= require jquery.remotipart //= require select2 //= require cocoon //= require dropzone //= require govuk/selection-buttons //= require moj //= require modules/moj.cookie-message.js //= require_tree . (function () { 'use strict'; delete moj.Modules.devs; $('#fixed-fee...
//= require jquery //= require jquery_ujs //= require jquery.remotipart //= require select2 //= require cocoon //= require dropzone //= require vendor/polyfills/bind //= require govuk/selection-buttons //= require moj //= require modules/moj.cookie-message.js //= require_tree . (function () { 'use strict'; delete ...
Fix issue with PhantomJS and Function.prototype.bind support
Fix issue with PhantomJS and Function.prototype.bind support
JavaScript
mit
ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments
97b56dd8f09dbc18f4c57652fd665f325aec6bcb
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Remove require_self and back to require ./wookmark...
Remove require_self and back to require ./wookmark...
JavaScript
mit
ninabreznik/RefugeesWork,ninabreznik/RefugeesWork,ninabreznik/RefugeesWork
15732c641dfbd0d814dff0bb6cfdc9c0d4293d2a
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Remove loading of scrollify, not using
Remove loading of scrollify, not using
JavaScript
mit
fma2/cfe-money,fma2/cfe-money,fma2/cfe-money
650f4373a69a4af57def67ce53356ef8093e603b
test/specs/component/TextSpec.js
test/specs/component/TextSpec.js
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={200}>This is really...
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={300} style={{ fontF...
Set fontFamily on <Text> tests to guarantee consistent regardless of environment (hopefully fix failures in CI)
Set fontFamily on <Text> tests to guarantee consistent regardless of environment (hopefully fix failures in CI)
JavaScript
mit
recharts/recharts,sdoomz/recharts,recharts/recharts,sdoomz/recharts,thoqbk/recharts,thoqbk/recharts,sdoomz/recharts,recharts/recharts,recharts/recharts,thoqbk/recharts
dbe6cea973ff30b9b5ca61f09b34b61b8cf5295d
src/elements/element.js
src/elements/element.js
import TYPES from 'types'; function isMember(element) { if (element.element) { return element.element === TYPES.MEMBER; } return element === TYPES.MEMBER; } function getValueType({element, content}) { if (isMember(element)) { return content.value.element; } return element; } function getType(el...
import TYPES from 'types'; function isMember(element) { if (element.element) { return element.element === TYPES.MEMBER; } return element === TYPES.MEMBER; } function getValueType({element, content}) { if (isMember(element)) { return content.value.element; } return element; } function getType(el...
Remove the ‘isNestedObject’ helper, no longer used.
Element: Remove the ‘isNestedObject’ helper, no longer used.
JavaScript
mit
apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit
4ffa7245d7f0cb5e053ff3219d8b586c62938819
src/js/pebble-js-app.js
src/js/pebble-js-app.js
var initialized = false; var options = {}; Pebble.addEventListener("ready", function() { console.log("ready called!"); initialized = true; }); Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); Pebble.openURL('http://assets.getpebble.com.s3-website-us-east-1.amazon...
var initialized = false; var options = {}; Pebble.addEventListener("ready", function() { console.log("ready called!"); initialized = true; }); Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); Pebble.openURL('http://assets.getpebble.com.s3-website-us-east-1.amazon...
Improve robustness of cancellation detection.
Improve robustness of cancellation detection.
JavaScript
mit
pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo
5b3e52464bb32c64ba3c08a705c166a064fc537a
lib/transform/transform-space.js
lib/transform/transform-space.js
import Promise from 'bluebird' import { omit, defaults } from 'lodash/object' import { partialRight } from 'lodash/partialRight' import * as defaultTransformers from './transformers' const spaceEntities = [ 'contentTypes', 'entries', 'assets', 'locales', 'webhooks' ] /** * Run transformer methods on each item for ...
import Promise from 'bluebird' import { omit, defaults } from 'lodash/object' import * as defaultTransformers from './transformers' const spaceEntities = [ 'contentTypes', 'entries', 'assets', 'locales', 'webhooks' ] /** * Run transformer methods on each item for each kind of entity, in case there * is a need to ...
Revert Enable async entity transforms
fix(transformers): Revert Enable async entity transforms This reverts commit 6dcad860e5fc67fabcebeee762aad42d06e029e9.
JavaScript
mit
contentful/contentful-batch-libs
e4594662b73173fae86d3ad64351828421aae962
src/palettes/nearest.js
src/palettes/nearest.js
// @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { level...
// @flow import { RANGE } from "constants/controlTypes"; import type { ColorRGBA } from "types"; const optionTypes = { levels: { type: RANGE, range: [1, 256], default: 2 } }; const defaults = { levels: optionTypes.levels.default }; // Gets nearest color const getColor = ( color: ColorRGBA, options: { level...
Return early if full colour
Nearest: Return early if full colour
JavaScript
mit
gyng/ditherer,gyng/ditherer,gyng/ditherer
9fe2fb9aed4fb4c8833443a4df400591d18976da
dangerfile.js
dangerfile.js
import { danger, warn } from 'danger'; const packageChanged = danger.git.modified_files.includes('package.json'); const lockfileChanged = danger.git.modified_files.includes('package-lock.json'); if (packageChanged && !lockfileChanged) { warn(`Changes were made to package.json, but not to package-lock.json. Perhaps y...
import { danger, warn } from 'danger'; const packageChanged = danger.git.modified_files.includes('package.json'); const lockfileChanged = danger.git.modified_files.includes('package-lock.json'); if (packageChanged && !lockfileChanged) { warn(`Changes were made to package.json, but not to package-lock.json. Perhaps y...
Update message when package-lock.json should be updated
Chore: Update message when package-lock.json should be updated No need to remove lock file anymore.
JavaScript
mit
styleguidist/react-styleguidist,sapegin/react-styleguidist,sapegin/react-styleguidist,styleguidist/react-styleguidist,bluetidepro/react-styleguidist,styleguidist/react-styleguidist
fdedf38a1ccc570ca5ce30e4bf72a0927fa119b1
scripts/tasks/download.js
scripts/tasks/download.js
'use strict' var github = require('octonode') var client = github.client() var evRepo = client.repo('nodejs/evangelism') var https = require('https') var path = require('path') var fs = require('fs') /* Currently proof-of-concept work. Outstanding: * ================ * - [ ] gulpify * - [ ] add to local boot proc...
'use strict' const github = require('octonode') const https = require('https') const path = require('path') const fs = require('fs') const basePath = path.join(__dirname, '..', '..', 'locale', 'en', 'blog', 'weekly-updates') const repo = github.client().repo('nodejs/evangelism') /* Currently proof-of-concept work. O...
Use `fs.access` instead of `fs.existsSync`
Use `fs.access` instead of `fs.existsSync`
JavaScript
mit
strawbrary/nodejs.org,marocchino/new.nodejs.org,abdelrahmansaeedhassan/yuri,boneskull/new.nodejs.org,nodejs/new.nodejs.org,rnsloan/new.nodejs.org,yous/new.nodejs.org,matthewloring/new.nodejs.org,rnsloan/new.nodejs.org,boneskull/new.nodejs.org,yous/new.nodejs.org,nodejs/new.nodejs.org,strawbrary/nodejs.org,phillipj/new....
9df9040dfbb5004a3a3ff90287caed2d03c77c3f
simplayer.js
simplayer.js
#!/usr/bin/env node 'use strict'; var childProcess = require('child_process'); /** * play * To run the process to match the platform. * @param {string} filepath * @param {function} callback * @return {Object} childProcess */ function play(filepath, callback) { var mediaSoundPlayer = '(New-Object System.Media...
#!/usr/bin/env node 'use strict'; var childProcess = require('child_process'); /** * play * To run the process to match the platform. * @param {string} filepath * @param {function} callback * @return {Object} childProcess */ function play(filepath, callback) { var mediaSoundPlayer = '"(New-Object System.Medi...
Fix no exit to the powershell in windows
Fix no exit to the powershell in windows
JavaScript
mit
MaxMEllon/simplayer
22935d8ed0181fba9910f01d00a8c148de4be021
src/app/result/result.controller.js
src/app/result/result.controller.js
class ResultController { constructor(SocketService, GameService, toastr, _, GameFactory) { 'ngInject'; this._ = _; this.GameService = GameService; this.players = GameService.players; this.toastr = toastr; SocketService.extendedHandler = (message) => { if(message.type === 'player_create...
class ResultController { constructor(SocketService, GameService, toastr, _, GameFactory) { 'ngInject'; this._ = _; this.GameService = GameService; this.players = GameService.players; this.toastr = toastr; SocketService.extendedHandler = (message) => { if(message.type === 'player_create...
Fix toast not showing player name
Fix toast not showing player name
JavaScript
mit
hendryl/Famous-Places-Web,hendryl/Famous-Places-Web
f273fe7f02f95698fbb139aa63b9ceccf65ba8db
lib/clifton-smtp.js
lib/clifton-smtp.js
//@Authors: Oliver Barnwell(ob6160) Harry Dalton(Hoolean) //Requires var net = require("net"); var util = require("util"); var EventEmitter = require("event").EventEmitter; //Exports module.exports = function(options) { return new clifton-smtp(options); } function clifton-smtp(options) { EventEmitter.call(this); ...
Add cliffton-server object & some base functionality
Add cliffton-server object & some base functionality
JavaScript
mit
CliftonJS/clifton-smtp
3d94482d5e8a9be898cb707f4ceccf1c90b9c068
lib/EventService.js
lib/EventService.js
const P = require('bluebird'); const preq = require('preq'); const uuid = require('cassandra-uuid').TimeUuid; function getResourceChangeEvent(resourceUri, domain) { return { meta: { topic: 'resource_change', uri: resourceUri, id: uuid.now().toString(), dt: new Date().toISOString(), ...
const P = require('bluebird'); const preq = require('preq'); const uuid = require('cassandra-uuid').TimeUuid; function getResourceChangeEvent(resourceUri, domain) { return { meta: { topic: 'resource_change', uri: resourceUri, id: uuid.now().toString(), dt: new Date().toISOString(), ...
Add protocol to resource_change event URIs
Add protocol to resource_change event URIs
JavaScript
apache-2.0
kartotherian/tilerator,kartotherian/tilerator,kartotherian/tilerator
a62988bb0fd8f72faac3ed409eac105e06bf565f
demo/index.js
demo/index.js
require('./lib/seed')() const { compose } = require('ramda') const http = require('http') const util = require('util') const { logger, methods, mount, parseJson, redirect, routes, static } = require('..') const { createCourse, fetchCourse, fetchCourses, updateCourse } = require('./api/courses') const...
require('./lib/seed')() const { compose } = require('ramda') const http = require('http') const util = require('util') const { logger, methods, mount, parseJson, redirect, routes, static } = require('..') const { createCourse, fetchCourse, fetchCourses, updateCourse } = require('./api/courses') const...
Use PORT env var for heroku demo
Use PORT env var for heroku demo
JavaScript
mit
articulate/paperplane
b05972b6d8695469c655f89235773cea751e7410
src/star_constructor.js
src/star_constructor.js
function chart(selection) { // Merging the various user params vars.user_vars = vistk.utils.merge(vars.user_vars, vars._user_vars); // Merging with current charts parameters set by the user in the HTML file vars = vistk.utils.merge(vars, vars.user_vars); // Create the top level element conainin...
function chart(selection) { // Merging the various user params vars.user_vars = vistk.utils.merge(vars.user_vars, vars._user_vars); // Merging with current charts parameters set by the user in the HTML file vars = vistk.utils.merge(vars, vars.user_vars); // Create the top level element conainin...
Allow elements within SVG to overflow
Allow elements within SVG to overflow
JavaScript
mit
cid-harvard/vis-toolkit,cid-harvard/vis-toolkit