commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
ac00259e45c078caa79fcf60c7105844e64a0ff4
Make Compass plugin a separate object, lazy init options, make output file name to be configurable
index.js
index.js
var path = require('path'); var merge = require('lodash-node/modern/objects/merge'); var compileCompass = require('broccoli-compass-compiler'); var renameFiles = require('broccoli-rename-files'); module.exports = { name: 'ember-cli-compass-compiler', included: function(app) { this._super.included.apply(this, a...
JavaScript
0
@@ -194,226 +194,191 @@ );%0A%0A -module.exports = %7B%0A name: 'ember-cli-compass-compiler',%0A included: function(app) %7B%0A this._super.included.apply(this, arguments);%0A var projectName = app.project.name();%0A%0A app.registry.add('css', %7B%0A +var removeLeadingSlash = function(string) %7B%0A ...
937ae76e2c49dba674b2332ab7145d3cd784aa01
Update formatting of index.js
index.js
index.js
import React from 'react'; import {NativeModules, Platform} from 'react-native'; const invariant = require('invariant'); const RNCookieManagerIOS = NativeModules.RNCookieManagerIOS; const RNCookieManagerAndroid = NativeModules.RNCookieManagerAndroid; let CookieManager; if (Platform.OS === 'ios') { invariant(RNCoo...
JavaScript
0.000001
@@ -28,16 +28,17 @@ import %7B + NativeMo @@ -52,16 +52,17 @@ Platform + %7D from ' @@ -339,16 +339,38 @@ ' +react-native-cookies: Add RNCo @@ -552,17 +552,16 @@ Android, - %0A @@ -562,16 +562,38 @@ ' +react-native-cookies: Import l @@ -618,16 +618,45 @@ d %22r -npm link +eact-nativ...
5b937cf51861d8e702a76aa320d39880b1a2afc0
disable colored output
index.js
index.js
var cp = require('child_process'); var fs = require('fs'); var path = require('path'); var async = require('async'); var request = require('request'); var nodemailer = require('nodemailer'); var nl2br = require('nl2br'); var date = new Date(); fs.readFile(process.argv[2], 'utf8', onFile); // takes "third" argument ...
JavaScript
0.000001
@@ -750,16 +750,27 @@ --batch +--no-color %7C',%0A
ee53960c116468a6a9f19ca20b74ca635bf2af09
create public api
index.js
index.js
'use strict'; function parse(argv) { if (!(argv && argv.length)) { return []; } const args = argv.slice(2); const components = args.reduce((components, arg) => { components.push(...componentsFromArg(arg)); return components; }, []); return components; } function compone...
JavaScript
0
@@ -17,21 +17,1170 @@ unction -parse +createParser(schemaDefinitions) %7B%0A const schema = createSchema(schemaDefinitions);%0A%0A function parse(argv) %7B%0A const components = parseComponents(argv);%0A return processComponents(components, schema);%0A %7D%0A%0A // TODO: public API docs%0A ...
7155868d8fe735ec4e47c840d2ed94ff8b943979
Fix LinearRing error for multiple LinearRings
index.js
index.js
/** * Generates a new GeoJSON Polygon feature, given an array of coordinates * and list of properties. * * @module turf/polygon * @param {number[][]} rings - an array of LinearRings * @param {Object} properties - an optional properties object * @return {GeoJSONPolygon} output * @example * var poly1 = turf.poly...
JavaScript
0.000076
@@ -685,223 +685,201 @@ ');%0A +%0A -if ((coordinates%5Bcoordinates.length - 1%5D.length !== coordinates%5B0%5D.length %7C%7C !coordinates%5Bcoordinates.length - 1%5D.every(function(position, index) %7B%0A return coordinates%5B0%5D%5Bindex%5D === position;%0A %7D))) %7B%0A +for (var i = 0; i %3C coord...
4b854da35114896105939ab786f22a2ca27f8049
Add qplus.series function
index.js
index.js
// Requires var Q = require('q'); // Retry a function a maximum of N times // the function must use promises and will always be executed once function retry(fn, N, retryTimeout) { // Default args N = ((N === undefined || N < 0) ? 0 : N - 1); retryTimeout = (retryTimeout === undefined ? 0 : retryTimeout); ...
JavaScript
0.00004
@@ -1409,16 +1409,81 @@ %7D;%0A%7D%0A%0A +function series(funcs) %7B%0A return funcs.reduce(Q.when, Q());%0A%7D%0A %0A// Expo @@ -1509,8 +1509,33 @@ retry;%0A +exports.series = series;%0A
e6db61f615d08568d3c08eb71e5762dfe6504be5
add test for species()
index.js
index.js
'use strict'; var binsPromise = require('gramene-bins-client').binsPromise; var treesPromise = require('gramene-trees-client').promise; var Q = require('q'); var _ = require('lodash'); function addGenomesToTaxonomy(taxonomy, genomes) { taxonomy.leafNodes().forEach(function (speciesNode) { var species = speciesN...
JavaScript
0.000001
@@ -328,36 +328,8 @@ el,%0A - taxonId = species.id,%0A @@ -355,14 +355,17 @@ get( -taxonI +species.i d);%0A
3489b6adca3ebed1a86f73f56956e295567d8d4d
Fix jsc errors
index.js
index.js
var debug = require('debug')('loopback-ds-computed-mixin'); var _ = require('lodash'); function computed(Model, options) { 'use strict'; // Trigger a warning and remove the property from the watchlist when one of // the property is not found on the model or the defined callback is not found _.mapKeys(options....
JavaScript
0.001045
@@ -333,17 +333,16 @@ function - (callbac @@ -1069,17 +1069,16 @@ function - (ctx, ne @@ -1236,17 +1236,16 @@ function - (propert @@ -1611,16 +1611,17 @@ ();%0A %7D) +; %0A%7D%0A%0Amodu
90988cf181d642c57a02c9b802b0f6c3899505d7
Optimize content type detection
index.js
index.js
#!/usr/bin/env node 'use strict' var fs = require('fs') var pump = require('pump') var menu = require('appendable-cli-menu') var log = require('single-line-log').stdout var chalk = require('chalk') var bonjour = require('bonjour')() var spy = require('ipp-spy') var gunzip = require('gunzip-maybe') var peek = require('...
JavaScript
0.000005
@@ -1338,16 +1338,32 @@ = peek(%7B + newline: false, maxBuff
5cce31e533ec4a97144280ea613a71a7302a7ec3
add support for homebrew
index.js
index.js
module.exports = null if (process.platform === 'darwin') return module.exports = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' if (process.platform !== 'win32') return module.exports = require('which').sync('google-chrome') var fs = require('fs') var suffix = '\\Google\\Chrome\\Application\\chr...
JavaScript
0
@@ -1,24 +1,48 @@ +var fs = require('fs')%0A%0A module.exports = null%0A%0Ai @@ -78,32 +78,24 @@ in') + %7B %0A -return module.exports +var regPath = ' @@ -155,16 +155,129 @@ Chrome' +;%0A var altPath = '~' + regPath;%0A%0A return module.exports = fs.existsSync(regPath)%0A ? regPath%0A : altPath%0A%7D%...
e83d80a50d3d762fc75d68034134fa045c38279a
create the module
index.js
index.js
/* * __proto__ * Node Schema Abstraction * https://github.com/thanpolas/__proto__ * * Copyright (c) 2014 Thanasis Polychronakis * Licensed under the MIT license. */ /** * @fileOverview __proto__ bootstrap module. */ module.exports = require('./lib/__proto__');
JavaScript
0.000001
@@ -3,44 +3,96 @@ %0A * -__proto__%0A * Node Schema Abstraction +ffmpeg-binary-linux-64bit%0A * Provides staticly compiled binaries for linux environments. %0A * @@ -120,25 +120,41 @@ anpolas/ -__proto__ +ffmpeg-binary-linux-64bit %0A *%0A * C @@ -233,16 +233,17 @@ se.%0A */%0A +%0A /**%0A * @ @@ -259,81 +259,5...
9a4a65cbfec8ffb8e8b577178f210dd7b5fc30d8
throw error for non existing queue
index.js
index.js
// const cluster = require('cluster') global.Promise = require('bluebird') Promise.config({ longStackTraces: true }) const _ = require('lodash') const Queue = require('promise-queue') const env = require('./lib/env') const dbs = require('./lib/dbs') const statsd = require('./lib/statsd') require('./lib/rollbar') ...
JavaScript
0.000019
@@ -2611,24 +2611,57 @@ ta.name)) %7B%0A + if (queues%5Bdata.name%5D) %7B%0A return @@ -2702,16 +2702,82 @@ r(job))%0A + %7D%0A throw new Error(%60Unknown queue name: $%7Bdata.name%7D%60)%0A %7D%0A%0A
c52188d7e9e1a1ea379137b921e8ac70b2c0f8eb
clean up
index.js
index.js
var colors = require('colors'); var package = require('./package.json'); var JSON5 = require('json5'); var glob = require('glob'); var path = require('path'); var fs = require('fs'); function start() { var cwd = path.resolve(__dirname, '../../'); console.log('files', process.argv.slice(2)); process.arg...
JavaScript
0.000001
@@ -253,57 +253,8 @@ ');%0A - console.log('files', process.argv.slice(2));%0A
9485903cbf96e0f05bf187b924e7040ee554ab09
Remove null charakter byte from model
index.js
index.js
const http = require('http'); const execSync = require('child_process').execSync; const fs = require('fs'); const os = require("os"); const diskspace = require('fd-diskspace'); const port = 9360; console.log('started raspberry-status-server at port ' + port); console.log(getOperatingSystem())...
JavaScript
0.000001
@@ -1532,22 +1532,23 @@ %7D%0A%0A -return +model = fs.read @@ -1571,24 +1571,73 @@ e, 'utf8');%0A + model.replace(/%5C0/g, '');%0A%0A return model;%0A %7D%0A%0Afunction
e6a020e8dd6a63caae376938af0acd6eb01782b3
Add jasmine-core
index.js
index.js
#!/usr/bin/env node 'use strict'; const fs = require('fs'); const path = require('path'); const package_json = path.resolve('./package.json'); const tsconfig_json = path.resolve('./tsconfig.json'); const webpack_config_js = path.resolve('./webpack.config.js'); const karma_config_js = path.resolve('./karma.config.js')...
JavaScript
0.998811
@@ -1577,24 +1577,37 @@ pes/jasmine +jasmine-core karma karma-
f420a11a431679a6b8be1ba1634eff4efb5fc935
return response
index.js
index.js
module.exports = function (options) { return { available: function (callback) { if (typeof navigator === 'undefined') return callback(false); return callback(!!navigator.mimeTypes['application/x-shockwave-flash']); }, permission: function (callback) { this.rec = {}; Wami.setup({ ...
JavaScript
0.999999
@@ -483,20 +483,16 @@ this.rec -.url );%0A %7D
8b104f38c0dddc5e5bba386c802a21ecc22e1b74
fix example typo
index.js
index.js
'use strict'; /** * Module dependencies. */ var logger = require('mm-node-logger')(module), mongoose = require('mongoose'); /** * This module follow best practice for creating, maintaining and using a Mongoose connection like: * - open the connection when the app process start * - start the app server wh...
JavaScript
0.003131
@@ -312,26 +312,41 @@ server when -th +after the databas e connection @@ -342,25 +342,26 @@ connection -i +wa s open (opti
cccf536090800cbce4cdf7e8b84d8f2fcbc1b868
fix nam export
index.js
index.js
module.exports.Sortable = require('./src/Sortable.js'); module.exports.SortableNested = require('./src/SortableNested.js');
JavaScript
0.000001
@@ -42,16 +42,27 @@ Sortable +Composition .js');%0Am
19ca2d84a6b7a20a8cf53edcb899b4f871e07301
Create person with last seen
api/missing/create.js
api/missing/create.js
var MissingPerson = require('../../app/models/missingPerson'); exports.create = function (req, res) { var firstname = req.body.firstname; var surname = req.body.surname; var missingPerson = new MissingPerson(); if (firstname) { missingPerson.forenames = firstname; } if (surname) { ...
JavaScript
0
@@ -822,24 +822,287 @@ ateGUID();%0A%0A + var lastSeen = %7B%7D;%0A lastSeen.date = new Date();%0A lastSeen.longitude = req.body.longitude;%0A lastSeen.latitude = req.body.latitude;%0A lastSeen.accountId = req.body.accountId;%0A lastSeen.description = '';%0A missingPerson.lastSeen.push(lastSeen);%...
7f3a6beb7fc99fc6a8761edaba5d398614dd2a20
Move back to Streams1
index.js
index.js
'use strict'; module.exports = function read(stream, options, cb) { if (!stream) { throw new Error('stream argument is required'); } if (typeof options === 'function') { cb = options; options = {}; } if (typeof options === 'string' || options === undefined || options === null) { options = { encoding: op...
JavaScript
0.000003
@@ -460,16 +460,12 @@ on(' -readable +data ', f @@ -477,60 +477,17 @@ on ( -) %7B%0A%09%09var chunk;%0A%09%09while (chunk = stream.read() +chunk ) %7B%0A -%09 %09%09ch @@ -506,17 +506,16 @@ unk);%0A%09%09 -%09 len += c @@ -527,20 +527,16 @@ length;%0A -%09%09%7D%0A %09%7D);%0A%0A%09s
b65e558127c14197dbc5cb416b04e71c48f23a6b
remove underline
index.js
index.js
const { deploy } = require('sftp-sync-deploy'); hexo.extend.deployer.register("sftp", function(args, callback) { if (!args.host || !args.user) { const help = [ "You should argsure deployment settings in _config.yml first!", "", "Example:", " deploy:", " type: sftp", " h...
JavaScript
0.0003
@@ -20,17 +20,17 @@ require( -' +%22 sftp-syn @@ -37,17 +37,17 @@ c-deploy -' +%22 );%0A%0Ahexo @@ -878,18 +878,8 @@ ent%22 -.underline %0A @@ -1358,16 +1358,16 @@ de: -' +%22 remove -' +%22 ,%0A @@ -1544,16 +1544,21 @@ options) +%0A .then(() @@ -1559,32 +1559,34 @@ hen(() =%3E %7B%0A + cal...
d917d1d90f3781c27c1504f29d0cc2963a7341ad
refactor - remove unnecessary code
index.js
index.js
(function(){ var Traverse = require('traverse'); module.exports = datify; function datify(raw){ if (typeof raw === 'string'){ return datifyString(raw); } else { return Traverse.map(raw, function(value){ if (typeof value === 'string'){ this.update(datifyString(value)); } }); } }; f...
JavaScript
0.000001
@@ -98,83 +98,8 @@ w)%7B%0A -%09%09if (typeof raw === 'string')%7B%0A%09%09%09return datifyString(raw);%0A%09%09%7D%0A%09%09else %7B%0A%09 %09%09re @@ -138,17 +138,16 @@ value)%7B%0A -%09 %09%09%09if (t @@ -177,17 +177,16 @@ ')%7B%0A%09%09%09%09 -%09 this.upd @@ -215,25 +215,19 @@ ));%0A -%09 %09%09%09%7D%0A%09...
af6c08aa60e9cca984e81be9f07fcdf8bc7e0ca5
add two missing let for err
index.js
index.js
'use strict'; const util = require('util'); const events = require('events'); const crypto = require('crypto'); const extend = require('util-extend'); const requestPromise = require('request-promise-native'); const querystring = require('querystring'); /** * BitcoindeClient connec...
JavaScript
0.006444
@@ -3153,24 +3153,25 @@ %09reject(err) +; %0A%09%09%09%09%09%7D);%0A%09%09 @@ -3699,24 +3699,28 @@ rors?%0A%09%09%09%09%09%09 +let err = new Er @@ -3724,17 +3724,17 @@ Error(' -B +b itcoin.d @@ -3756,17 +3756,19 @@ error: ' -+ + + data.err @@ -3828,24 +3828,25 @@ %09reject(err) +; %0A%09%09%09%09%09%7D els...
c69a0859d50bbc77d41e61073a43efcea1205827
add all pass cases
regression.js
regression.js
[ /******************************** * STEP 1 PASS * ******************************/ { code: "<p><span class='first-sentence'>Groupers are others</span></p> <p><span class='first-sentence'>Groupers are things</span></p>", steps: ["pass"] }, /******************************** * STEP 1 FAIL * ***********...
JavaScript
0.000009
@@ -430,17 +430,16 @@ ****/%0A %0A - %7B%0A co
dc107d1199887914b9fba8f68fd3408b773a490b
remove css extension that never used
webpack/isomorphic.tools.config.js
webpack/isomorphic.tools.config.js
import WebpackIsomorphicToolsPlugin from 'webpack-isomorphic-tools/plugin' import _debug from 'debug' import projectConfig from '../config' const debug = _debug('app:webpack:isomorphic:tools:config') debug('Create configuration.') // https://github.com/halt-hammerzeit/webpack-isomorphic-tools#configuration // https...
JavaScript
0
@@ -605,15 +605,8 @@ s: %5B -'css', 'scs
4557823f8e9bfe7623ef9602ca311f509fcd806a
Allow arbitrary java args to be passed
index.js
index.js
var Buffer = require('buffer').Buffer; var child_process = require('child_process'); var fs = require('fs'); var gutil = require('gulp-util'); var path = require('path'); var tempWrite = require('temp-write'); var through = require('through'); const PLUGIN_NAME = 'gulp-closure-library'; module.exports = function(opt,...
JavaScript
0
@@ -2068,24 +2068,101 @@ erFlags));%0A%0A + var javaFlags = opt.javaFlags %7C%7C %5B%5D;%0A args = javaFlags.concat(args);%0A%0A // Force
382393e1f2adbd8db9390930a66d3a422505bc2a
fix challenge ordering Now challenges are ordered on map first by top order value of json file second by index of array
index.js
index.js
/* eslint-disable no-process-exit */ require('babel/register'); require('dotenv').load(); var fs = require('fs'), _ = require('lodash'), path = require('path'), app = require('../server/server'), nonprofits = require('./nonprofits.json'), jobs = require('./jobs.json'); function getFilesFor(dir) { ...
JavaScript
0
@@ -1847,24 +1847,44 @@ r = -+('' + +order;%0A challenge.sub order -+ ( += inde @@ -1888,18 +1888,16 @@ ndex + 1 -)) ;%0A
9e057b8c7ffcce74d7c8392521518d351888c27b
Update index
index.js
index.js
'use strict'; const express = require('express'); const bodyParser = require('body-parser'); const restService = express(); restService.use(bodyParser.json()); restService.post('/hook', function (req, res) { console.log('hook request'); try { var speech = 'empty speech'; if (req.body) { ...
JavaScript
0.000001
@@ -88,16 +88,43 @@ ser');%0A%0A +var time = require('time'); %0Aconst r @@ -314,16 +314,172 @@ peech';%0A + var now = new time.Date();%0A var hour = now.setTimezone(%22America/Chicago%22).getHours();%0A var action = %5B'coverage.speedingTickets'%5D;%0A %0A
be706fc097e91710473656f322c000a077207494
remove var proto pattern
index.js
index.js
'use strict'; var TypedError = require('error/typed'); var LogMessage = require('./log-message.js'); var DebugLogBackend = require('./backends/debug-log-backend.js'); var LEVELS = require('./levels.js').LEVELS_BY_NAME; var validNamespaceRegex = /^[a-zA-Z0-9]+$/; var InvalidNamespaceError = TypedError({ type: 'de...
JavaScript
0.000002
@@ -1416,20 +1416,8 @@ %0A%7D%0A%0A -var proto = Debu @@ -1434,24 +1434,16 @@ rototype -;%0A%0Aproto ._log = @@ -1620,180 +1620,30 @@ %7D;%0A%0A -proto.whitelist = function whitelist(level, msg) %7B%0A this._backend.whitelist(level, msg);%0A%7D;%0A%0Aproto.items = function items() %7B%0A return this._backe...
b4724a0df1c9a710bace85e7cb51565042d9d6eb
allow for null characters
index.js
index.js
var spaceCode = ' '.charCodeAt(0) function stringToBits(str) { var bits = [] for (var i = 0, l = str.length; i < l; i += 1) { var character = str[i] , number = str.charCodeAt(i) || spaceCode // Non-standard characters are treated as spaces if (number > 255) number = spaceCode // Split the ...
JavaScript
0.00001
@@ -190,21 +190,8 @@ t(i) - %7C%7C spaceCode %0A%0A
9c6d73c94ef8d91015581af1101f32f9fb25a48f
Fix typo
app/client/js/fink.js
app/client/js/fink.js
'use strict' ;(function (Fink, fetch, _isURI, parseURI) { Fink.isURI = function (uri) { return _isURI(uri, window.location.hostname) } Fink.register = function (uri) { return fetch(Fink.endpoint, { method: 'post', headers: { 'Accept': 'application/json', 'Content-Type': 'appl...
JavaScript
0.999999
@@ -42,18 +42,8 @@ sURI -, parseURI ) %7B%0A @@ -694,30 +694,20 @@ ch, -require('fink-is-uri') +window.isURI ); /
7da2af251e8e57a3ad9fb9074fe3250b2e4ac37c
Fix Proxy.set return value to match ES6 specifications
index.js
index.js
var deasync = require("deasync"); module.exports = function Rebridge(client) { if (!client) { var redis = require("redis"); client = redis.createClient(); } return _Rebridge(client); }; function _Rebridge(client, base = {}, inTree = []) { // Yeah, that's a bit weird, but it works. // "inTree" is the list of ...
JavaScript
0
@@ -2388,100 +2388,20 @@ %09%09%09%09 -try %7B%0A%09%09%09%09%09return _Rebridge(client, value, tree);%0A%09%09%09%09%7D catch (e) %7B%0A%09%09%09%09%09return value;%0A%09%09%09%09%7D +return true; %0A%09%09%09
afa9d03b029b51101af8340151a2b408932d02d4
Replace native Promises with Bluebird Promises
index.js
index.js
require('babel-core/register'); require('./server.js');
JavaScript
0.999999
@@ -1,16 +1,55 @@ +global.Promise = require('bluebird');%0A%0A require('babel-c
cdbdcd6b95983599b223b5e9ff21e9399e18add8
Remove obsolete comment.
webpack/devserver.js
webpack/devserver.js
/* @flow weak */ "use strict" var gutil = require('gulp-util') var path = require('path') var webpack = require('webpack') var webpackDevServer = require('webpack-dev-server') module.exports = function(webpackConfig) { return function(callback) { // It seems webpackDevServer doesn't emit errors, so we can't us...
JavaScript
0
@@ -249,160 +249,8 @@ ) %7B%0A - // It seems webpackDevServer doesn't emit errors, so we can't use gulp-notify.%0A // Webpack callback does not work with webpackDevServer as well.%0A
ab77dc7791728414c75545a05cae6f22321bac3c
throw a type error if `bubbleErrors` option is not Boolean
index.js
index.js
var stream = require("readable-stream"); var duplex2 = module.exports = function duplex2(options, writable, readable) { return new DuplexWrapper(options, writable, readable); }; var DuplexWrapper = exports.DuplexWrapper = function DuplexWrapper(options, writable, readable) { if (typeof readable === "undefined") {...
JavaScript
0.012111
@@ -1,12 +1,27 @@ +%22use strict%22;%0A%0A var stream = @@ -50,16 +50,77 @@ eam%22);%0A%0A +var Duplex = stream.Duplex;%0Avar Readable = stream.Readable;%0A%0A var dupl @@ -351,31 +351,24 @@ le) %7B%0A if ( -typeof readable === @@ -364,25 +364,24 @@ eadable === -%22 undefined%22) @@ -377,17 +377,16 @@ ndefi...
d315a21d8b9b3874b1d52e8e2e0d579a82f2b708
Fix crashing on viewing, add proper db gets
index.js
index.js
var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); var databaseUrl = "data"; var collections = ["publicChores", "privateChores", "users"]; var db = require("mongojs").connect(databaseUrl, collections); app.use(require('express').static(__dirname +'/public')); ...
JavaScript
0
@@ -361,21 +361,20 @@ ndfile(' -index +list .html'); @@ -1482,72 +1482,25 @@ ');%0A -%0A%09//Determines which collection to look at%0A%09var p;%0A%09if ( +%09var p = isPublic )%0A%09%09 @@ -1499,15 +1499,10 @@ blic -)%0A%09%09p = + ? db. @@ -1517,24 +1517,10 @@ ores -%5B0%5D;%0A%09else%0A%09%09p = + : db. @...
9a23afadf30c4626b89099d102a7ec7d2714e3f0
remove debug logging
webui/src/media_size_controller.js
webui/src/media_size_controller.js
import mapValues from 'lodash/mapValues' import objectValues from 'lodash/values' import SettingsModel, { FontSize, MediaSize, MediaSizeIndex } from './settings_model' const MediaSizes = Object.freeze({ small: 0, medium: 29, large: 43, }); const FontScale = Object.freeze({ small: 0.875, medium: 1....
JavaScript
0.000002
@@ -1818,103 +1818,8 @@ %5D;%0A%0A - console.log(this.settingsModel.mediaSize);%0A console.log(query.getMediaSize());%0A%0A
c47fe3734bc19be10ec557adf124afc1f993b552
Add callback wrapper test
test/add-subtask-spec.js
test/add-subtask-spec.js
var _ = require( 'lodash' ); var should = require( 'should' ); var sinon = require( 'sinon' ); var pequire = require( 'proxyquire' ); var tutil = require( './test-util' ); var HAPPY_PROXY_DEPS = { path: { dirname: _.noop }, './hub-util': { isValidHubFile: function (){ return true } } ...
JavaScript
0.000001
@@ -3741,64 +3741,234 @@ t( ' -changes the working directory to the subfile%5C's dirname' +wraps the subtask%5C's callbacks in a function that corrects the working directory', function () %7B%0A var testTasks = %7B%7D;%0A var callbackSpy = sinon.spy();%0A var dirnameSpy = sinon.spy( function () %7...
fa67204eb8e3e5e2b5b1e018cf9a43809774d47f
Fix incorrect paths
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-trix-editor', included: function (app) { this._super.included(app); app.import(app.vendorDirectory + '/trix.js'); app.import(app.vendorDirectory + '/trix.css'); } };
JavaScript
0.999979
@@ -157,39 +157,23 @@ .import( -app. +' vendor -Directory + ' /trix.js @@ -195,31 +195,15 @@ ort( -app. +' vendor -Directory + ' /tri
2eba0709215996883f953b45c4ae844f2b91e3d2
Add missing unit test for auth_hdr.
test/auth_header-test.js
test/auth_header-test.js
var auth_hdr = require('../lib/auth_header') describe('Parsing Auth Header field-value', function() { it('Should handle single space separated values', function() { var res = auth_hdr.parse("SCHEME VALUE"); expect(res).to.deep.equal({scheme: "SCHEME", value: "VALUE"}); }); it('Should ha...
JavaScript
0
@@ -656,12 +656,169 @@ %7D);%0A%0A%0A + it('Should return null when the auth header is not a string', function() %7B%0A var res = auth_hdr.parse(%7B%7D);%0A expect(res).to.be.null;%0A %7D);%0A %7D);%0A
2f66115ad0a6b082e9771b947523457cc228cc4d
add fs require for linux
index.js
index.js
var ReadStream = require('tty').ReadStream; var _fs = process.binding('fs'); var _constants = process.binding('constants'); var _TTY = process.binding('tty_wrap').TTY; module.exports = openTTY; function openTTY() { var fd; if (process.platform === 'win32') { fd = _fs.open('CONIN$', _constants.O_RDWR...
JavaScript
0.000001
@@ -1,12 +1,36 @@ +var fs = require('fs');%0A var ReadStre
dfa6917606eea85337b1f9a51451715df122f16a
update for swf.create,用例有编译错误
test/baidu/swf/create.js
test/baidu/swf/create.js
module("baidu.swf.create"); // 1、normal test("test ver", function() { stop(); var div = document.body.appendChild(document.createElement('div')); div.id = "div_id"; baidu.swf.create({ id : 'test1', url : "short1.swf", width:'100', height:'100', ver:'6.0.0' }, div); ok(true, "flash对象创建成功")...
JavaScript
0.000001
@@ -310,24 +310,54 @@ ash%E5%AF%B9%E8%B1%A1%E5%88%9B%E5%BB%BA%E6%88%90%E5%8A%9F%22); +//%E8%BF%99%E4%B8%AA%E8%B2%8C%E4%BC%BC%E4%B9%9F%E6%B2%A1%E6%9C%89%E6%A0%A1%E9%AA%8C%E3%80%82%E3%80%82%E5%9B%9E%E5%A4%B4%E7%A1%AE%E8%AE%A4%EF%BC%8C%E7%A1%AE%E8%AE%A4%E5%AE%8C%E6%AF%95%E8%AF%B7%E7%A7%BB%E9%99%A4%E6%AD%A4%E5%A4%84%E7%9A...
7c158605187303ed7476a4ee48ed0978c043c12c
Update `cursorTo` to use `SEP` constant (#28)
index.js
index.js
const ESC = '\u001B['; const OSC = '\u001B]'; const BEL = '\u0007'; const SEP = ';'; const isTerminalApp = process.env.TERM_PROGRAM === 'Apple_Terminal'; const ansiEscapes = {}; ansiEscapes.cursorTo = (x, y) => { if (typeof x !== 'number') { throw new TypeError('The `x` argument is required'); } if (typeof y !=...
JavaScript
0
@@ -385,19 +385,19 @@ + 1) + -';' +SEP + (x +
9bf4cfce1bab6dbe2e9055f48b790e459afb9a0d
remove usage of replace at city names
index.js
index.js
const request = require('request'); const APP_ID = '59f807307ebf813df0c1dd3647242945'; const BASE_URL = 'http://api.openweathermap.org/data/2.5/weather?q='; const getRequestOptions = city => ({ url: `${BASE_URL}${city}&APPID=${APP_ID}`, headers: { 'User-Agent': 'agentWeatherrApi' } }) const getWordWithoutS...
JavaScript
0.002747
@@ -294,111 +294,8 @@ %7D%0A%7D) -%0A%0Aconst getWordWithoutSomething = (str, find, replace) =%3E%0A str.replace(new RegExp(find, 'g'), replace) ;%0A%0A/ @@ -371,66 +371,8 @@ %3E %7B%0A - city = getWordWithoutSomething(city.trim(), ' ', '-');%0A%0A co @@ -399,33 +399,41 @@ uestOptions(city -) +.trim()); %0A%0...
043444775be67ef475defd117c72d3cd530cabf2
change default mysql host to match docker-compose
test/dbconfig.example.js
test/dbconfig.example.js
'use strict' module.exports = { name: 'senecatest', host: 'localhost', user: 'senecatest', password: 'senecatest', port: 3306 }
JavaScript
0.000001
@@ -61,17 +61,13 @@ t: ' -localhost +mysql ',%0A
4dd0b830c489df352236b6e6974701a94706f915
Reset debug preference when resetting VTR options
index.js
index.js
/* ***** BEGIN LICENSE BLOCK ***** * * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. * * ***** END LICENSE BLOCK ***** */ "use strict"; // SDK var simplePrefs = re...
JavaScript
0
@@ -1087,16 +1087,147 @@ ce);%0A%09%7D%0A +%09%0A%09// Reset hidden preferences not inited in package.json%0A%09if (preferences%5B%22debug%22%5D == true)%0A%09%7B%0A%09%09preferences%5B%22debug%22%5D = false;%0A%09%7D%0A %7D%0Asimple
f0e4922ae87fb862ce81bad9b7be5f607a2c8c76
Change to new Artifact property from serverless 1.18.0 (#35)
index.js
index.js
'use strict'; const bluebird = require('bluebird'); const _ = require('lodash'); const path = require('path'); const jszip = require('jszip'); const fs = require('fs'); const minimatch = require('minimatch'); const munge = require('./serverless-cljs-plugin/munge'); const mkdirp = bluebird.pr...
JavaScript
0.000001
@@ -1044,26 +1044,10 @@ -_.set(fn, 'package +fn .art @@ -1051,18 +1051,18 @@ artifact -', + = serverl @@ -1079,33 +1079,32 @@ e.__cljsArtifact -) ;%0A %7D%0A
b628361ea495d252924b32a2ac857f4a81606982
Add type and id to script tag
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-inspectlet', contentFor: function(type, config) { var wid = config.APP.INSPECTLET_WID; if (wid != null && type === 'head') { return "<script>\n" + "window.__insp = window.__insp || [];\n" + "__insp.push(['wid'...
JavaScript
0.000009
@@ -228,16 +228,57 @@ %22%3Cscript + type='text/javascript' id='inspectletjs' %3E%5Cn%22 +%0A
d290fc36c3002c8c9e35eba80053dba86272a7b1
Remove timestamp
index.js
index.js
var express = require('express'); var pg = require('pg'); var receiver = require('./receiver'); var crud = require('./crud'); var app = express(); app.use(express.static(__dirname + '/public')); app.set('port', (process.env.PORT || 5000)); app.post('/receiver', function (request, response) { var body = ''; reques...
JavaScript
0.999758
@@ -686,21 +686,8 @@ ore) -, +new Date() %5D,%0A%09
e53ea9b8c9cafd8d53175665435ebe3f1273f6a6
Fix path to optimist-config-file import
index.js
index.js
module.exports = require('lib/optimist-config-file');
JavaScript
0.000062
@@ -20,16 +20,18 @@ equire(' +./ lib/opti @@ -49,8 +49,9 @@ -file'); +%0A
a53cfa19f0ea7828c9c84ada7e7eef5787e7622f
allow for anonymous map generation using boolean outSorceMap flag
index.js
index.js
var UglifyJS = require("uglify-js"); var loaderUtils = require('loader-utils'); module.exports = function(source, inputSourceMap) { var callback = this.async(); if (this.cacheable) { this.cacheable(); } var opts = this.options['uglify-loader'] || {}; // just an indicator to generate sourc...
JavaScript
0
@@ -375,40 +375,110 @@ -opts.outSourceMap = %22out.map.js%22 +// tell UglifyJS2 not to emit a name by just setting outSourceMap to true%0A opts.outSourceMap = true ;%0A
9763f69c70aa11fe63e15d22010778b3d8e059e8
Remove unnecessary argument.
index.js
index.js
var scuttleup = require('scuttleup'); var crypto = require('crypto'); var events = require('events'); var sublevel = require('level-sublevel'); var pump = require('pump'); var through = require('through2'); var cas = function(db, opts) { var subs = sublevel(db) var log = scuttleup(subs.sublevel('log'), {id: opts.i...
JavaScript
0.000129
@@ -2184,20 +2184,16 @@ turn cb( -null );%0A @@ -2227,20 +2227,16 @@ () %7B cb( -null ) %7D;%0A
855729d903aaaaaaa8b597f77eccb1d13cef7d96
fix file
index.js
index.js
var jst = require('jst_compiler'); var through = require('through'); var gutil = require('gulp-util'); var PluginError = gutil.PluginError; var path = require('path'); var File = gutil.File; module.exports = function (fileName, options) { if (!fileName) { throw new PluginError('gulp-jst_compiler', 'Missi...
JavaScript
0.000001
@@ -697,32 +697,107 @@ ed'));%0A %7D +%0A %0A if (!firstFile) %7B%0A firstFile = file;%0A %7D %0A%0A buffer
eac40f08bedee5cb8db8f8f46d97b4d25cb8c716
add photoCtrl. bind simple search result and implement tagging and untagging prototype.
app/js/controllers.js
app/js/controllers.js
'use strict'; /* Controllers */ angular.module('flickrDupFinder.controllers', []) .controller('MyCtrl1', [function() { }]) .controller('MyCtrl2', [function() { }]);
JavaScript
0
@@ -12,27 +12,8 @@ ';%0A%0A -/* Controllers */%0A%0A angu @@ -39,18 +39,17 @@ upFinder -.c +C ontrolle @@ -52,18 +52,72 @@ ollers', - %5B +%0A %5B'flickrDupFinderServices', 'underscore' %5D)%0A .co @@ -129,66 +129,608 @@ ler( -'My +%0A 'photo Ctrl -1 ', - %5Bfunction() %7B%0A%0A %7D%5D)%0A ...
a13edbf13b605663214757f622508a6adf0b3e13
Make faces() and attr() calls order-independent
index.js
index.js
var normalize = require('./normalize') var glType = require('gl-to-dtype') var createVAO = require('gl-vao') var dtype = require('dtype') module.exports = GLGeometry function GLGeometry(gl) { if (!(this instanceof GLGeometry)) return new GLGeometry(gl) this._elementsType = 5123 this._elementsBytes = 2 th...
JavaScript
0.000007
@@ -354,33 +354,61 @@ = true%0A this._ -l +attrLength = 0%0A this._facesL ength = 0%0A this @@ -663,33 +663,37 @@ ys = %5B%5D%0A this._ -l +attrL ength = 0%0A this @@ -677,32 +677,166 @@ ._attrLength = 0 + // Length of this attribute (the number of vertices it feeds)%0A this._facesLength = 0 // Number of v...
a8146f3112c05db457caa496c5193c3a96ca9fe5
Add units to y-axis - closes #20
app/js/controllers.js
app/js/controllers.js
'use strict'; /* Controllers */ angular.module('quixrWebview.controllers', []). controller('WrapperCtrl1', function($scope, $location, $routeParams) { $scope.isActive = function (viewLocation) { return $location.path().indexOf(viewLocation) != -1; }; $scope.searchDisabled = funct...
JavaScript
0
@@ -1464,32 +1464,108 @@ unction(unit) %7B%0A + chartObject.options = %7BvAxis: %7Btitle: unit.toUpperCase()%7D%7D;%0A
6730b53b09b473c3a00725950377287b610d551e
Set Mac prompt to feature ⌘
index.js
index.js
var deselectCurrent = require('toggle-selection'); function copy(text, options) { var debug, message, cb, reselectPrevious, range, selection, mark; if (!options) { options = {}; } debug = options.debug || false; message = options.message || 'Copy to clipboard: Ctrl+C, Enter'; cb = options.cb || Function.prot...
JavaScript
0
@@ -88,16 +88,25 @@ r debug, + copyKey, message @@ -153,16 +153,16 @@ , mark;%0A - if (!o @@ -221,16 +221,82 @@ false;%0A + copyKey = /mac os x/i.test(navigator.userAgent) ? '%E2%8C%98' : 'Ctrl';%0A messag @@ -338,20 +338,31 @@ pboard: -Ctrl +' + copyKey + ' +C, Ente
4b631a264a7c80f17dac3ad12ccf1472337e1409
Remove unused if
index.js
index.js
'use strict' var Primus = require('primus') var config = require('config') var workflowHandler = require('./lib/eventHandlers/workflow.js') var jobSourceCorePoller = require('./lib/jobSources/corePoller.js') var EventEmitter = require('eventemitter3') var pollingInterval = 1000 if (!(config.coreAPIToken)) { if (co...
JavaScript
0.000002
@@ -890,29 +890,4 @@ en)%0A -%0Aif (!module.parent) %7B%0A%7D%0A
be67e80697647837d6c1271eaaae1a4edd80e1fe
fix ga expression
app/js/controllers.js
app/js/controllers.js
'use strict'; angular.module('SecretSantaApp.controllers', []) .controller('eventController', function($scope, emailAPIService, _) { $scope.event = { title: null, cashAmount: 15, cashCurrency: 'eur', date: new Date("2013-12-25T00:00:00.000Z"), message: '', valid: false } $scope.people = ...
JavaScript
0.999996
@@ -3631,14 +3631,17 @@ ss%5E= +%22 joris- +%22%5D ').o
74094fe0e72280f1275979abeb0079e75aa4f386
disable rotation, confused the noobs
app/js/modules/map.js
app/js/modules/map.js
import mapboxgl from 'mapbox-gl'; let Map = class { constructor(mapOptions, geoJSON, breaks, colors, bounds = [], selected = []) { this.mapOptions = mapOptions; this.geoJSON = geoJSON; this.breaks = breaks; this.colors = colors; this.selected = selected; this.bounds ...
JavaScript
0
@@ -521,16 +521,165 @@ ounds;%0A%0A + // disable map rotation using right click + drag and touch%0A map.dragRotate.disable();%0A map.touchZoomRotate.disableRotation();%0A%0A
331fc1b613ea90bae7c9e266ff1619a1691cdb68
Make the configuration from HtmlWebpackplugin (options.favicons) work (#54)
index.js
index.js
'use strict'; var childCompiler = require('./lib/compiler.js'); var assert = require('assert'); var _ = require('lodash'); var fs = require('fs'); var path = require('path'); function FaviconsWebpackPlugin (options) { if (typeof options === 'string') { options = {logo: options}; } assert(typeof options === '...
JavaScript
0.001477
@@ -1851,24 +1851,32 @@ + '$&');%0A + %7D%0A call @@ -1903,26 +1903,16 @@ nData);%0A - %7D%0A %7D)
6abc43730b85f9bbd6ce149209b79483b3e58a0e
change Tags in profileCtrl.js
app/js/profileCtrl.js
app/js/profileCtrl.js
app.controller("profileCtrl", function($scope, Auth, $firebaseArray, $firebaseObject,$window, $stateParams) { Auth.$onAuthStateChanged(function(authData){ //initialize if (authData) { $scope.authData = authData; ref = firebase.database().ref("users/"+$scope.authData.uid+"/readOnly/info"); $scope...
JavaScript
0.000001
@@ -102,16 +102,23 @@ teParams +,Helper ) %7B%09%0A%09%09A @@ -417,43 +417,32 @@ ile_ -readOnly_checkbox = %22return false;%22 +info.tags = Helper.tags; %0A%09%09%09
6a66368a647a18b390f172baf004a8465abb8898
Need to return the value in the set function
index.js
index.js
module.exports = lookup; function lookup() { if( !( this instanceof lookup ) ) { var newObj = Object.create(lookup.prototype); lookup.apply(newObj, arguments); return newObj; } if( arguments.length % 2 != 0 ) { throw new Error( 'Incorrect key value amount. You should pass in arguments as key,...
JavaScript
0.999996
@@ -1042,19 +1042,27 @@ value;%0A -%0A + %7D%0A %0A retu @@ -1071,22 +1071,16 @@ value;%0A - %7D%0A %7D,%0A%0A
cead7d3f89d6f483285952006bfc66465ade81df
allow binding css width to elements
index.js
index.js
var Vec2 = require('vec2') var Rec2 = require('rec2') var mouse, scroll, screen var element = exports.element = function (el, bind) { var rec = el.getBoundingClientRect() var rec2 = new Rec2 var style = getComputedStyle(el) console.log(style.left, style.right) rec2.set(rec.left - parseFloat(style['ma...
JavaScript
0
@@ -73,17 +73,23 @@ , screen +, size %0A - %0Avar ele @@ -242,47 +242,9 @@ el)%0A - console.log(style.left, style.right) %0A + re @@ -430,16 +430,16 @@ 2.size)%0A - rec2 @@ -472,16 +472,196 @@ eight)%0A%0A + if(bind) %7B%0A rec2.size.change(function (size) %7B%0A console.log('wh', size.x, size....
95574fb7bdc67bf8de704f9be86a1a352895c102
Update to use lazypipe style calling
index.js
index.js
var gulp = require('gulp'); var Elixir = require('laravel-elixir'); var inky = require('inky'); var prettify = require('gulp-prettify'); var fs = require('fs'); var siphon = require('siphon-media-query'); var lazypipe = require('lazypipe'); var inlineCss = require('gulp-inline-css'); var htmlmin = require('gulp-htmlmin...
JavaScript
0
@@ -1278,17 +1278,18 @@ nlineCss -( +, %7B preser @@ -1311,17 +1311,16 @@ true %7D) -) %0A
5098ad1f09f7d04aba7f5f8883ddbafa70cc65ae
Add check for remaining queue items
app/libs/queue/add.js
app/libs/queue/add.js
'use strict'; // Load requirements const assign = require('deep-assign'); // Load libraries const logger = require('../log'); // Variables let queueCache = []; // Send back the function module.exports = function(task) { return new Promise((resolve, reject) => { // Variables let added = [], promis...
JavaScript
0
@@ -1495,28 +1495,22 @@ his. -current %3C this.total +items.queue%5B0%5D ) %7B
6a9e72c1f230a0d92a74e2cfc3c0b0627cfc88f7
Update index.js
index.js
index.js
const Discord = require('discord.js'); const config = require('./settings.json'); const client = new Discord.Client(); const ddiff = require('return-deep-diff'); const path = require('path'); //Events client.on('ready', () =>{ console.log('This is Margarine speaking!'); console.log('Online and awaiting orders!...
JavaScript
0
@@ -1933,24 +1933,12 @@ thor - === client.user +.bot ) re @@ -1943,16 +1943,18 @@ return;%0A +%09%0A %09if (mes @@ -2147,16 +2147,198 @@ ng');%0A%09%7D + else%0A%09%0A%09if (message.content.startWith(config.prefix + 'send'))%7B%0A%09%09console.log('Trans-channel message sent!');%0A%09%09client.channel.get('3041297...
20ad858a60c9d1c4e46db1c14e2f7c9a4443fd8f
fix `cascade` option
index.js
index.js
'use strict'; var autoprefixer = require('autoprefixer'); var plugin = module.exports; function prefix() { var browsers = atom.config.get('autoprefixer.browsers'); var editor = atom.workspace.getActiveEditor(); var isCSS = editor.getGrammar().name === 'CSS'; if (!editor) { return; } // process the selected t...
JavaScript
0.000221
@@ -466,40 +466,11 @@ sers -).process(text, %7B%0A%09%09%09safe: true, +, %7B %0A%09%09%09 @@ -518,16 +518,51 @@ scade')%0A +%09%09%7D).process(text, %7B%0A%09%09%09safe: true%0A %09%09%7D).css
9b74ef0002fd915d67842d320d3c86b87aa913f3
Call transport through domain reference
index.js
index.js
/* index.js - "tart-marshal": Send messages between memory domains (tart module) The MIT License (MIT) Copyright (c) 2013 Dale Schumacher Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without...
JavaScript
0
@@ -4243,16 +4243,21 @@ +self. transpor
6a1e55db514da3ea2f39e6fb68eeed965791b85f
Remove superfluous routes
index.js
index.js
var _, app, badge, bodyParser, config, cookieParser, cors, docket, docs, express, expressSession, fs, http, httpServer, io, LocalStrategy, logger, login, mongoose, notAllowed, options, passport, path, port, Rat, rat, register, Rescue, rescue, router, socket, winston, ws // IMPORT // ===============================...
JavaScript
0.999975
@@ -4146,45 +4146,8 @@ )%0A%0A -app.get( '/register', register.get )%0A app. @@ -4186,39 +4186,8 @@ )%0A%0A -app.get( '/login', login.get )%0A app.
87db0af964ea1fa827a41b34f9b5bccfc9efba06
allow top-level http
index.js
index.js
var npa = require('npm-package-arg'); var guessVersion = require('./lib/guessVersion.js'); var Promise = require('bluebird'); module.exports = buildGraph; module.exports.isRemote = isRemote; function buildGraph(http, url) { url = url || 'http://registry.npmjs.org/'; if (url[url.length - 1] !== '/') { throw ne...
JavaScript
0.000001
@@ -1426,18 +1426,18 @@ e depend -n e +n cies (e. @@ -1566,32 +1566,32 @@ %7D);%0A %7D%0A%0A - var escape @@ -1622,24 +1622,567 @@ scapedName;%0A + if (!escapedName && isHttp(work.name)) %7B%0A return http(work.name).then(res =%3E %7B%0A if (res.data) %7B%0A // TODO: ...
8fc81855575b3962d35fabcbebe289b8ced9ef40
Add headers option to request().
index.js
index.js
/*! * Pact * Copyright 2011 Yahoo! Inc. * Licensed under the BSD license. */ /** * Dependencies. */ var assert = require('assert'); var http = require('./lib/http'); var STATUS_CODES = require('http').STATUS_CODES; /** * A starting server port number. */ var _port = 8099; /** * Factory for server port numb...
JavaScript
0
@@ -756,16 +756,89 @@ r POST.%0A + * - headers: HTTP request headers object.%0A *%0A * These are all optional.%0A *%0A * In @@ -1830,16 +1830,77 @@ method;%0A + if ('headers' in req) options.headers = req.headers;%0A %7D%0A
e4bfb406d4bcbee2a130c2a0fe5ba7ec1186c602
remove console.log
index.js
index.js
module.exports = function blacklist (src) { var copy = {}, filter = arguments[1] if (typeof filter === 'string') { filter = {} for (var i = 1; i < arguments.length; i++) { filter[arguments[i]] = true } } console.log(filter, arguments) for (var key in src) { // blacklist? if (filter[k...
JavaScript
0.000004
@@ -225,39 +225,8 @@ %0A %7D - console.log(filter, arguments) %0A%0A
14d7fea999c608cea41e9e001ce60f93d887f8cc
Fix index function
index.js
index.js
var debug = require('debug'); module.exports = function (app) { return new Connectr(app); }; var merge = function(a, b){ if (a && b) { for (var key in b) { a[key] = b[key]; } } return a; }; module.exports.patch = function (app) { if (app._use) throw new Error('This app is already patched...
JavaScript
0.000084
@@ -3691,32 +3691,36 @@ this.app.stack%5Bi +ndex %5D.handle;%0A retu
a7f9fddf54706c4de899a3e1a28c95f918e7afa5
Support math block
index.js
index.js
#! /usr/bin/env node const fetch = require("node-fetch"); const url = "http://qiita.com/api/v2/items/"; const item_id = process.argv[2]; const template = { ipynb: { "cells": null, "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_inf...
JavaScript
0.000001
@@ -1290,16 +1290,42 @@ false;%0A +%09let isMathBlock = false;%0A %09let cel @@ -1370,16 +1370,16 @@ nCell);%0A - %0A%09ipynb. @@ -1616,16 +1616,40 @@ = true; +%0A%09%09%09isMathBlock = false; %0A%0A%09%09// e @@ -1843,24 +1843,48 @@ ock = false; +%0A%09%09%09isMathBlock = false; %0A%0A%09%09// insid @@ -1924...
ad82bea368ebe49fec3eeac9e04dee0fb43155df
fix performance.timing check
index.js
index.js
/** * Initialize the environment */ var envs = require('envs'); if (window.env) envs.set(window.env); /** * Module dependencies */ var angular = require('angular'); var hyper = require('ng-hyper'); var feature = require('ng-feature'); var logger = require('./lib/logger'); var hyperagent = require('hyperagent'); ...
JavaScript
0.000001
@@ -2594,16 +2594,17 @@ ature);%0A +%0A if ( @@ -2623,18 +2623,18 @@ ormance -&& +%7C%7C !window
048332b15cbb3f501ec9a88fece3e4ffaeee950f
fix winning
app/models/auction.js
app/models/auction.js
var couch = require('../couch.js'); var userModel = require('../models/user.js'); var uuid = require('node-uuid'); var fs = require('fs'); var auctionModel = { create: function(prop) { this._id = uuid.v4(); this.auctioneer_id = prop.auctioneer_id; this.auction_name = prop.auction_name; this.date_cre...
JavaScript
0.000004
@@ -1956,16 +1956,196 @@ t += 1;%0A + // TODO: remove this property from ever being set in the auction model, it should be in app level model for auction details (once extant)%0A auction_data.winning = undefined;%0A couc
763172ac8bac1c2f57e7fc3e4d2848fb2a24db34
fix watch mode in webpack 4
index.js
index.js
/** * @author Eoin Hennessy * @author Erik Desjardins * See LICENSE file in root directory for full license. */ 'use strict'; var path = require('path'); var loaderUtils = require('loader-utils'); var SingleEntryPlugin = require('webpack').SingleEntryPlugin; var InertEntryPlugin = require('inert-entry-webpack-plu...
JavaScript
0
@@ -1240,16 +1240,140 @@ e works%0A +%09// ...this format is required for webpack 4%0A%09this.addDependency(request);%0A%09// ...and this format is required for webpack 5%0A %09this.ad
228623231192377e310f313c83649424513fd6a9
Fix handling of non-paragraphs on selection edges.
index.js
index.js
import AbstractCommand from 'abstract-command'; class PaddingCommand extends AbstractCommand { constructor({ direction = 'auto', delta = 50, max = 200, min = 0 } = {}, root = document.documentElement, doc: Document = root.ownerDocument) { super(doc); this.direction = direction; this.delta = delta; th...
JavaScript
0
@@ -1439,25 +1439,32 @@ %0A _find -Paragraph +ClosestOrTopmost (node) %7B @@ -1548,24 +1548,77 @@ eturn node;%0A + if (node.parentNode == this.root) return node;%0A node = @@ -1703,25 +1703,20 @@ et first -Paragraph +Node = this. @@ -1716,33 +1716,40 @@ = this._find -Paragraph +ClosestOrTopmost (ra...
e43415c6ce8db8bf42f0608eef61b6304eb9ac31
Refactor exports
index.js
index.js
import strings from './src/i18n/strings'; export { default as Validator } from './src/validator'; export function load(app) { if (app.i18n()) { app.i18n().strings(strings); } }
JavaScript
0.000001
@@ -1,22 +1,24 @@ import -strings +Validator from '. @@ -26,88 +26,63 @@ src/ -i18n/strings';%0A%0Aexport %7B default as Validator %7D from './src/validator';%0A%0Aexport +validator';%0Aimport strings from './src/i18n/strings';%0A%0A func @@ -157,8 +157,41 @@ ;%0A %7D%0A%7D%0A +%0Aexport %7B%0A Validator,%0A ...
9fc473a9161af61027173da7ea008a991c0e345b
Replace opaque 0, 1, 2 with transparent "off", "warn", "error" (#23)
index.js
index.js
'use strict'; module.exports = { env: { es6: true, }, extends: ['eslint:recommended', require.resolve('eslint-config-prettier')], parserOptions: { ecmaVersion: 2017, sourceType: 'module', }, plugins: ['liferayportal', 'no-only-tests'], rules: { 'liferayportal/arrowfunction-newline': 0, 'no-console': 0...
JavaScript
0.000072
@@ -289,25 +289,29 @@ n-newline': -0 +'off' ,%0A%09%09'no-cons @@ -316,17 +316,21 @@ nsole': -0 +'off' ,%0A%09%09'no- @@ -350,17 +350,21 @@ ition': -0 +'off' ,%0A%09%09'no- @@ -371,17 +371,21 @@ empty': -0 +'off' ,%0A%09%09'no- @@ -476,17 +476,21 @@ s-env': -0 +'off' ,%0A%09%09'com @@ -502,17 +502,21 @@ ...
071ad1e281590d30698dadf2ec07520d2099b0fa
use this.field and this.log
index.js
index.js
'use strict'; var _ = require('lodash'); var nex = require('nex-api'); var rimraf = require('rimraf'); var path = require('path'); var fs = require('fs'); var proc = require('child_process'); var color = require('colors'); var handler = module.exports = new nex.Handler('linkDependencies'); /** * @override */ hand...
JavaScript
0
@@ -218,17 +218,16 @@ ors');%0A%0A -%0A var hand @@ -350,33 +350,28 @@ each(pkg -.linkDependencies +%5Bthis.field%5D , functi @@ -867,25 +867,20 @@ (pkg -.linkDependencies +%5Bthis.field%5D , fu @@ -1060,14 +1060,20 @@ e));%0A %7D +, this );%0A%7D;%0A
b0d75e5be09e14fd69957192725c0eed51ac2744
add once function
index.js
index.js
var http = require('http') var request = require('request') var omit = require('lodash.omit') var parseUrl = require('url').parse var decamelize = require('decamelize') var PORT = 8488 var REDIRECT_URI = 'http://localhost:' + PORT var BASE_URL = 'https://accounts.google.com/o/oauth2/auth' var GOOGLE_OAUTH2_TOKEN_URL =...
JavaScript
0.000017
@@ -3814,12 +3814,153 @@ ' + name)%0A%7D%0A +%0Afunction once(fn) %7B%0A var one = true%0A return function () %7B%0A if (call) %7B%0A call = false%0A fn.apply(null, arguments)%0A %7D%0A %7D%0A%7D%0A%0A
5474277f6b10911a2776c979631b88b05b776cdf
Declare `i` before using in `optimizeFunction`
index.js
index.js
var estraverse = require('estraverse'), escope = require('escope'), tcoLabel = { type: 'Identifier', name: 'tco' }; function equals(a, b, s) { var equal, k; if(typeof a != typeof b) return false; if(typeof a == 'object' || typeof a == 'array') { equal =...
JavaScript
0.000016
@@ -3279,32 +3279,52 @@ : function(n) %7B%0A + var i;%0A%0A ance
0fc21a2f8296e86458f2cacc13e7b8f1d64008c1
Fix WireframeHelper deprecation
index.js
index.js
/* global AFRAME, THREE */ if (typeof AFRAME === 'undefined') { throw new Error('Component attempted to register before AFRAME was available.'); } require('./lib/terrainloader.js'); /** * Terrain model component for A-Frame. */ AFRAME.registerComponent('terrain-model', { schema: { DEM: { type: 'asset...
JavaScript
0.000003
@@ -3222,25 +3222,32 @@ -wireframe +var wireGeometry = new T @@ -3264,90 +3264,220 @@ rame -Helper( surface, 0x4caf50 );%0A el.setObject3D('terrain-wireframe', wireframe +Geometry(geometry);%0A var wireMaterial = new THREE.LineBasicMaterial(%7Bcolor: 0x4caf50, linewidth: 2%7D);%0A var ...
9ce804ddb9e96222d22a6fa1e69e4be490719014
Switch isHttpOnly to false
index.js
index.js
/* jshint -W064 */ 'use strict'; const composer = require('./server/composer'); const cleanUp = require('./server/cleaner').cleanUp; composer((err, server) => { if (err) { throw err; } server.state('Hawk-Session-Token', { ttl: 24 * 60 * 60 * 1000, path: '/', isSecure: tru...
JavaScript
0.99963
@@ -336,19 +336,20 @@ tpOnly: -tru +fals e,%0A
24341076e667b849cca4fa5f3f63f558b900ab4a
Use database...
index.js
index.js
const express = require('express'); const https = require('https'); const http = require('http'); const fs = require('fs'); const url = require('url'); const app = express(); const mongoose = new (require('mongoose').Mongoose)(); mongoose.connect(process.env.N_DB); const db = mongoose.connection; db.on('error', functio...
JavaScript
0
@@ -189,13 +189,8 @@ e = -new ( requ @@ -208,20 +208,8 @@ se') -.Mongoose)() ;%0Amo @@ -1138,92 +1138,8 @@ %7D); -%0A app.use(function(req, res, next) %7B%0A req.db = db;%0A next();%0A %7D); %0A%0A
6205bdd76f9d8b68e4fc0d1d6d1d309c9b90005e
Fix var name typo in `exposeRoutes()` method
index.js
index.js
'use strict'; var annotations = require('express-annotations'), state = require('express-state'); exports.extend = extendApp; function extendApp(app) { if (app['@map']) { return app; } // Add Express Annotations and Express State support to the `app`. annotations.extend(app); state.extend(...
JavaScript
0.000812
@@ -1892,32 +1892,43 @@ t validthis:true +, expr:true */%0A var app @@ -2096,20 +2096,19 @@ = route -Path +Map ;%0A
0ca36122f915fa499482c976519f8854330e9524
Returns on origin equals false
index.js
index.js
/** * CORS middleware * * @param {Object} [options] * @return {Function} * @api public */ module.exports = function(settings) { var defaults = { origin: '*', methods: 'GET,HEAD,PUT,POST,DELETE' }; settings = settings || defaults; return function* cors(next) { var options = settings; ...
JavaScript
0.999733
@@ -590,24 +590,81 @@ s.origin === + false) %7B%0A return;%0A %7D else if (options.origin === true) %7B%0A
4450dd7d7c757d8eba1697f15495ca65d6c27012
Use named function to clear stacktrace
index.js
index.js
var postcss = require('postcss'); var definition = function (variables, node) { var name = node.prop.slice(1); variables[name] = node.value; node.remove(); }; var variable = function (variables, node, str, name, opts, result) { if ( opts.only ) { if ( typeof opts.only[name] !== 'undefined' ) {...
JavaScript
0.000003
@@ -32,34 +32,27 @@ );%0A%0A -var definition = func +function defini tion - (var @@ -160,26 +160,10 @@ );%0A%7D -; %0A%0A -var variable = func @@ -159,32 +159,40 @@ ();%0A%7D%0A%0Afunction +variable (variables, node @@ -695,22 +695,26 @@ %0A %7D%0A%7D -; %0A%0A -var +function simpleS @@ -714,36 +714,2...
40a634bb037052011165043d229d648876409150
Add code that was previously in anyDB.createPool
index.js
index.js
var inherits = require('util').inherits var EventEmitter = require('events').EventEmitter var Transaction = require('any-db-transaction') var Pool = require('generic-pool').Pool var once = require('once') var chain = require('./lib/chain') module.exports = ConnectionPool inherits(Connectio...
JavaScript
0.000001
@@ -552,16 +552,572 @@ %7C%7C %7B%7D%0A%0A + if (options.create %7C%7C options.destroy) %7B%0A throw new Error(%22Use onConnect/reset options instead of create/destroy.%22)%0A %7D%0A%0A if (connParams.adapter == 'sqlite3'%0A && /:memory:$/i.test(connParams.database)%0A && (options.min %3E 1 %7C%7C opt...
a0dd08e6e28bfb04ba5414d92ebe1d87d3ce8339
Remove strict mode rule
index.js
index.js
const never = "never"; const always = "always"; const possibleErrorRules = { "no-cond-assign": 2, "no-console": 2, "no-constant-condition": 2, "no-control-regex": 2, "no-debugger": 2, "no-dupe-args": 2, "no-dupe-keys": 2, "no-duplicate-case": 2, "no-empty": 2, "no-empty...
JavaScript
0.000028
@@ -1153,55 +1153,8 @@ %7D;%0A%0A -const strictModeRules = %7B%0A %22strict%22: 2,%0A%7D;%0A%0A cons @@ -3352,33 +3352,8 @@ es,%0A - strictModeRules,%0A
c1efbc2b8fa99649a3ce6fabbf312df0a6f99b57
Move possessive outside of <a>
www/assets/%version/gittip/horn.js
www/assets/%version/gittip/horn.js
Gittip.horn = {}; Gittip.horn.init = function() { Gittip.horn.since_id = undefined; $('#toot-form').submit(Gittip.horn.toot); Gittip.horn.update({limit: 20}); }; Gittip.horn.update = function(data) { clearTimeout(Gittip.horn.handle); data = data || {}; if (Gittip.horn.since_id !== undefined) ...
JavaScript
0.000001
@@ -1433,15 +1433,15 @@ + ' -%5C's %3C/a%3E +%5C's '%0A
bdd548eef782c79dae26a175f9ac4cf188b27fed
Corrected some grammatical mistakes
index.js
index.js
var express = require('express'); var app = express(); var path = require("path"); //Express does not deliever anything beyond route // So need to set it up to use the public directory for static content app.use(express.static(path.join(__dirname, 'public'))); var http = require('http'); var httpServer = http.Server(a...
JavaScript
0.999999
@@ -99,17 +99,16 @@ not deli -e ver anyt @@ -1126,17 +1126,16 @@ og('Conn -c ected' +
f4ae4703817a84eb3389c99fa2ef3a5ae7afc0cd
Fix typo
index.js
index.js
'use strict'; const methodNames = [ 'arc', 'arcTo', 'beginPath', 'bezierCurveTo', 'clearRect', 'clip', 'closePath', 'createLinearGradient', 'createRadialGradient', 'drawImage', 'ellipse', 'fill', 'fillRect', 'fillText', 'lineTo', 'moveTo', 'quadraticCurveTo', 'rect', 'resetClip', ...
JavaScript
0.999999
@@ -2414,16 +2414,17 @@ .res +t ore();%0A @@ -4506,8 +4506,9 @@ einwand; +%0A
31e96ff19ba1d201ed16892ef89f7b31eccc0395
Fix exposure rounding
index.js
index.js
// Tournament algorithm to generate lineups from only exposures and salaries const _ = require('underscore'); const pool = require('./samplePool.json'); // sample NBA fanduel pool from 12/12/16 // default to one lineup if no argument provided const lineupsToBuild = process.argv[2] || 1; // returns the salary for a li...
JavaScript
0.000005
@@ -1942,13 +1942,12 @@ ath. -floor +ceil (cur @@ -1968,20 +1968,16 @@ utCount) - + 1 %7D %7D), %7B
8c7ba09a723dd281062502fc2010f330e9a3d50a
version option exits with 0, not error
index.js
index.js
#! /usr/bin/env node 'use strict'; var fs = require('fs'); var path = require('path'); var shell = require('shelljs'); var parser = require('nomnom'); var async = require('async'); var glob = require('glob'); var logger = require('./util/logger'); var ParseUtils = require('./util/parseUtils'); var CacheDependencyMana...
JavaScript
0.000033
@@ -1388,23 +1388,28 @@ ;%0A -return +console.log( packageP @@ -1421,16 +1421,40 @@ .version +);%0A process.exit(0) ;%0A %7D%0A
a7f103391bbb7f043b82c2082442fe8881bd4cbd
handle ascii for last line
index.js
index.js
function toHex (buf, group, wrap, LE, ascii) { toAscii = ascii ? asciipp : function() { return ''; }; buf = buf.buffer || buf var s = '' var l = buf.byteLength || buf.length for(var i = 0; i < l ; i++) { var byte = (i&0xfffffffc)|(!LE ? i%4 : 3 - i%4) s = s + ((buf[byte]>>4).toString(16)) + ...
JavaScript
0.000005
@@ -467,16 +467,218 @@ '')%0A %7D%0A + var lastLine = l%25wrap;%0A var filler = (wrap-lastLine)*2 + Math.floor((wrap-lastLine+group-1)/group);%0A if (ascii) %7B%0A while(filler--)%0A s += ' ';%0A s += toAscii(buf.slice(l-lastLine, l));%0A %7D%0A return
639af73664988c2bcce83017799c197c52ab5c02
Fix logging
index.js
index.js
'use strict'; const params = require('./param.json'); const metrics = require('./metrics.json'); const os = require('os'); const postprocessors = require('./postprocessors'); const { getByPath, fetch } = require('./util'); const pollInterval = params.pollInterval || ...
JavaScript
0
@@ -2930,18 +2930,8 @@ ric%7D - $%7Bsource%7D $%7Bi @@ -2942,16 +2942,26 @@ .result%7D + $%7Bsource%7D %60);%0A
eff2976b24bad0d09adf28d8ac42e2badd773a4d
Tidy unused variable.
index.js
index.js
var short = '-', long = '--'; var sre = /^-[^-]+/, lre = /^--[^-]+/, negate = /--no-/; var camelcase = require('cli-util').camelcase; function toOptionKey(arg, negated, opts) { var result = alias(arg, opts), key; if(result.aliased) return result.key; key = arg.replace(/^-+/, ''); if(negated) key = key.replace(...
JavaScript
0
@@ -689,22 +689,8 @@ eys, - skip = false, i = @@ -839,26 +839,12 @@ gth; + i++ -, key = keys%5Bi%5D ) %7B%0A @@ -1140,23 +1140,8 @@ %7D%0A - return skip;%0A %7D%0A%0Af