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
33ac2a333a50023b581743585d08612fad4c2dfc
Update JSON callback content.
index.js
index.js
require('shelljs/global'); var express = require('express'); var bodyParser = require('body-parser'); var https = require('https'); var URL_TRUEDICE = 'https://www.random.org/integers/?num=50&min=1&max=6&col=1&base=10&format=plain&rnd=new'; var POOL_TRUEDICE = []; var SEQDELAY_DICEPOOL = 5000; var app = express(); a...
JavaScript
0
@@ -3042,59 +3042,51 @@ %09%09%09%22 -displayUser%22: %7B%0A%09%09%09%09%09%22name%22: botName,%0A%09%09%09%09%09%22avatarU +username%22: botName,%0A %22icon_u rl%22: @@ -3100,14 +3100,8 @@ tar%0A -%09%09%09%09%7D%0A %09%09%09%7D
b07d84ad483038151f4a37fc26e0e2f61bf0b908
Fix problems when using histogram datamodel in histogram widgets
src/dataviews/histogram-dataview/histogram-data-model.js
src/dataviews/histogram-dataview/histogram-data-model.js
var _ = require('underscore'); var moment = require('moment'); var BackboneAbortSync = require('../../util/backbone-abort-sync'); var Model = require('../../core/model'); var MOMENT_AGGREGATIONS = { day: 'd', hour: 'h', minute: 'm', month: 'M', quarter: 'Q', second: 's', week: 'w', year: 'y' }; /** *...
JavaScript
0.000097
@@ -587,130 +587,8 @@ === - 'number' && this.get('bins')) %7B%0A params.push('bins=' + this.get('bins'));%0A %7D else if (this.get('column_type') === 'da @@ -678,24 +678,106 @@ egation'));%0A + %7D else if (this.get('bins')) %7B%0A params.push('bins=' + this.get('bins'));%0A %7D%0A if
404bbfd8185b382d84ad40b403a89a11f4b82a75
reset cache when it gets to 100,000 elements
index.js
index.js
var ADDR_RE = /^\[?([^\]]+)\]?:(\d+)$/ // ipv4/ipv6/hostname + port var cache = {} module.exports = function addrToIPPort (addr) { if (!cache[addr]) { var m = ADDR_RE.exec(addr) if (!m) throw new Error('invalid addr') cache[addr] = [ m[1], Number(m[2]) ] } return cache[addr] } module.exports.reset ...
JavaScript
0.000001
@@ -78,16 +78,177 @@ e = %7B%7D%0A%0A +// reset cache when it gets to 100,000 elements (~ 600KB of ipv4 addresses)%0A// so it will not grow to consume all memory in long-running processes%0Avar size = 0%0A%0A module.e @@ -287,16 +287,50 @@ addr) %7B%0A + if (size === 100000) cache = %7B%7D%0A if (!c @@ -459,16 +...
650b2cadf290a0ee42f80f2a305e3a361ff23625
fix lint error
lib/basic.js
lib/basic.js
'use strict' module.exports = function (realm) { const challenge = `Basic realm="${realm}"` return function * (next) { let authorization = this.header['authorization'] if (authorization != null && authorization.slice(0, 6) === 'Basic ') { authorization = new Buffer(authorization.slice(6), 'base64').t...
JavaScript
0.000006
@@ -518,20 +518,22 @@ ssword: +( test +) =%3E test
58a1af2afb8482fb24d2446a1c08b2cff362f3bb
Update index unit tests after mongoQuery changes
src/endpoints/http/collections/export/test/index_test.js
src/endpoints/http/collections/export/test/index_test.js
import assert from 'assert'; import sinon from 'sinon'; import sinonStubPromise from 'sinon-stub-promise'; import * as index from '../'; import * as parsers from '../lib/parser'; import * as archive from '../lib/archive'; import fs from 'fs'; import stream from 'stream'; import * as fhconfig from 'fh-config'; class Mo...
JavaScript
0
@@ -930,34 +930,59 @@ nst -supportedF +options = %7B%0A f ormat - = +: 'json' +,%0A mongoQuery: %7B%7D%0A%7D ;%0A +%0A cons @@ -1482,39 +1482,31 @@ ollections, -supportedFormat +options , new MockWr @@ -2149,39 +2149,31 @@ ollections, -supportedFormat +options , new MockWr @@ -2772,31 +2772,23 @@ ctions...
3ba16a3e889b21f20fa1407132b1a32440217325
Rename uses of trimBuffer to match changes to the function definiton
lib/bloom.js
lib/bloom.js
const Buffer = require('safe-buffer').Buffer const assert = require('assert') const utils = require('ethereumjs-util') const byteSize = 256 /** * drops leading zeroes from a buffer * @function dropLeadingZeroes * @param {Buffer} buff */ function dropLeadingZeroes (buff) { for (var i = 0; i < buff.length; i++) { ...
JavaScript
0
@@ -857,34 +857,41 @@ utils.sha3( -trimBuffer +dropLeadingZeroes (e))%0A var m @@ -1303,18 +1303,25 @@ ha3( -trimBuffer +dropLeadingZeroes (e))
641252108f063266300201fdfdfe1942f5fe0c05
Use buffer equality util from bytewise-core
index.js
index.js
var assert = require('assert') var bytewise = require('bytewise-core') var levelup = require('levelup') var updown = require('level-updown') var xtend = require('xtend') // // brand prefix instance to keep track of subspace root // function Prefix(path) { this.path = path this.buffer = bytewise.encode(path) } Pre...
JavaScript
0
@@ -64,16 +64,64 @@ -core')%0A +var equal = require('bytewise-core/util').equal%0A var leve @@ -549,46 +549,21 @@ /%0A -assert(Buffer.isBuffer(key))%0A return +equal( this @@ -573,16 +573,10 @@ ffer -.equals( +, key. @@ -647,24 +647,56 @@ ion (key) %7B%0A + assert(Buffer.isBuffer(key))%0A%0A if (!this...
b563be8e80229c9ead1b0743d72df10081e4b993
Check session
library.js
library.js
'use strict'; var meta = module.parent.require('./meta'); var user = module.parent.require('./user'); var db = module.parent.require('./database'); // NodeBB / src / database 참고. var au = module.parent.require('./controllers/authentication'); // NodeBB / src / controllers 참고. var winston = require('winston'); var jw...
JavaScript
0
@@ -790,16 +790,28 @@ sSession +, res.locals );%0A%0A%09plu @@ -980,16 +980,23 @@ else %7B%0A +%09%09if %0A%0A %09%09jwt.ve @@ -2302,21 +2302,116 @@ a);%0A -%0A%09callback(); +%09console.log(data.res);%0A%0A%09if (typeof callback === 'function')%09%7B%0A%09%09callback();%09%0A%09%7D else %7B%0A%09%09return true;%...
95b1f910ae5b539d33aa022ac73727c541190074
print user, session
library.js
library.js
'use strict'; var meta = module.parent.require('./meta'); var user = module.parent.require('./user'); var db = module.parent.require('./database'); // NodeBB / src / database 참고. var au = module.parent.require('./controllers/authentication'); // NodeBB / src / controllers 참고. var winston = require('winston'); va...
JavaScript
0.000001
@@ -1206,21 +1206,34 @@ .log(req -, res +.user, req.session );%0A%0A%09//
41c1cfeab83f83efa1fccbaed329eab3fb8292b1
Switch from hapi-db to hapi-mongo
index.js
index.js
'use strict'; var inflect = require('i')(); var _ = require('underscore'); var internals = {}; exports.register = function (plugin, options, next) { plugin.dependency(['hapi-bearer', 'hapi-db']); plugin.auth.strategy('bearer', 'bearer'); plugin.expose('get', internals.get); plugin.expose('post', internals.po...
JavaScript
0
@@ -190,15 +190,20 @@ api- +mongo db'%5D);%0A - pl @@ -659,32 +659,37 @@ r.plugins%5B'hapi- +mongo db'%5D.db;%0A i @@ -1842,24 +1842,29 @@ ugins%5B'hapi- +mongo db'%5D.db,%0A @@ -2796,32 +2796,32 @@ quest, reply) %7B%0A - var db = r @@ -2840,32 +2840,37 @@ r.plugins%5B'hapi- +mongo db'%5D.db;...
d5fdfbd5f87c1fda29159f4b2a4d5c1083f45178
Remove duplicate error logging in test mode
index.js
index.js
/** * index.js * * AWS Lambda function Uploader. * * Created by kylewbanks on 15-02-28. */ 'use strict'; /** * @imports */ var AWS = require('aws-sdk'), async = require('async'), fs = require('fs'), archiver = require('archiver'), util = require('util'); /** * @private */ var _testMode = pro...
JavaScript
0.000001
@@ -3582,48 +3582,8 @@ ) %7B%0A - _log(%22ERROR: %25s%22, err);%0A
d0b53576487b5fe3f3389331ce1c82e30410d064
fix prettier syntax errors
index.js
index.js
const EventEmitter = require('events'); const assert = require('assert'); const Primus = require('primus'); const uglify = require('uglify-js'); class PrimusWebpackPlugin { constructor(options) { this.options = Object.assign( {}, { filename: 'primus-client.js', minify: false, ...
JavaScript
0.000113
@@ -354,18 +354,17 @@ options -, %0A + );%0A @@ -958,25 +958,24 @@ ilation.hash -, %0A );%0A @@ -1645,17 +1645,16 @@ ion.hash -, %0A @@ -2008,33 +2008,32 @@ tTag + '%3C/head%3E' -, %0A );%0A @@ -2166,33 +2166,32 @@ tTag + '%3C/body%3E' -, %0A );%0A @@ -2239,16 +2239,...
5fba00550028a8589f30df16ea13e9eff1771141
Remove imports from index file
index.js
index.js
var async = require('async'); var css = require('css'); var exec = require('child_process').exec; var fs = require('fs'); var glob = require('glob'); var handlebars = require('./lib/handlebars'); var hljs = require('highlight.js'); var jsdoc = require('jsdoc3-parser'); var mar...
JavaScript
0.000001
@@ -1,500 +1,4 @@ -var async = require('async');%0Avar css = require('css');%0Avar exec = require('child_process').exec;%0Avar fs = require('fs');%0Avar glob = require('glob');%0Avar handlebars = require('./lib/handlebars');%0Avar hljs = require('highlight.js');%0Avar jsdoc = ...
c580d55be741042163b10e48882202dd69a40b6d
Exit with correct status code (#1045)
src/providers/sh/commands/remove.js
src/providers/sh/commands/remove.js
#!/usr/bin/env node // Packages const mri = require('mri') const chalk = require('chalk') const ms = require('ms') const plural = require('pluralize') const table = require('text-table') // Utilities const Now = require('../util') const { handleError, error } = require('../util/error') const logo = require('../../../...
JavaScript
0
@@ -4480,27 +4480,24 @@ console. -error(error +log(info (%0A @@ -4497,16 +4497,18 @@ %0A %60 +%3E Could no @@ -4720,33 +4720,33 @@ rn process.exit( -1 +0 )%0A %7D%0A%0A try %7B%0A
7dfbd289d9aeaae28f063a4e676348ccb0da5325
Use l10n helper for new category filter feature
src/extension/features/budget/filter-categories/index.js
src/extension/features/budget/filter-categories/index.js
import fuzzysort from 'fuzzysort'; import { Feature } from 'toolkit/extension/features/feature'; import { isCurrentRouteBudgetPage } from 'toolkit/extension/utils/ynab'; export class FilterCategories extends Feature { TEXTBOX = `<div class="toolkit-categories-filter-wrapper"> <i class="toolkit-catego...
JavaScript
0
@@ -162,16 +162,72 @@ s/ynab'; +%0Aimport %7B l10n %7D from 'toolkit/extension/utils/toolkit'; %0A%0Aexport @@ -505,17 +505,16 @@ =%22false%22 - %0A @@ -541,53 +541,13 @@ =%22$%7B -ynabToolKit.l10nData && ynabToolKit.l10nData%5B +l10n( 'too @@ -579,20 +579,17 @@ eholder' -%5D %7C%7C +, 'Filter @@ -600,...
2b06aced7b7d701c46906d374a023076ee5085cb
add methods in !terse mode
index.js
index.js
var deepExtend = require('deep-extend') var methods = { createReadStream : {type: 'readable'}, readStream : {type: 'readable'}, createValueStream : {type: 'readable'}, valueStream : {type: 'readable'}, createKeyStream : {type: 'readable'}, keyStream : {type: 'readable'}, createWr...
JavaScript
0
@@ -997,21 +997,27 @@ .methods -)%0A + %7C%7C !terse) man.met @@ -1034,24 +1034,26 @@ if(!terse) + %7B %0A deepExt @@ -1103,16 +1103,18 @@ thods)%0A + %7D else%0A
35c808daa96cfc92b5703a7d54124b75ef3a32c5
Fix for query params in file URIs
index.js
index.js
/** * NodeJS dependencies */ var fs = require('fs'); var fse = require('fs-extra'); var path = require('path'); var regexEscape = require('regex-escape'); /** * Vendor dependencies */ var resolve = require('resolve'); var cssp = require('cssp'); var traverse = require('traverse'); /** * Mark file recursively for...
JavaScript
0
@@ -3560,24 +3560,160 @@ uriFile);%0A%0A + // Fix to exclude query parameters from file names.%0A copyFrom = copyFrom.split('?')%5B0%5D;%0A%0A
309d2265929077c8a6988e6759a67b77862f50a5
add default values
index.js
index.js
const Fs = require('fs') const Path = require('path') const Log = require('./lib/logging'); var GITHUB_TOKEN = process.env['GITHUB_TOKEN']; var SLACK_BOT_TOKEN = process.env['SLACK_TOKEN']; // Validations if(!GITHUB_TOKEN || GITHUB_TOKEN.length == 0){ Log.error("GITHUB_TOKEN environment variab...
JavaScript
0.000007
@@ -798,16 +798,21 @@ _START'%5D + %7C%7C 9 ;%0Avar wo @@ -844,16 +844,22 @@ RK_END'%5D + %7C%7C 17 ;%0A%0Aperso
d8138929671c7a42939ba5354ad9bd333930df46
Update node check
index.js
index.js
module.exports = getCanvasContext function getCanvasContext (type, opts) { if (typeof type !== 'string') { throw new TypeError('must specify type string') } if (typeof document === 'undefined') { return null // check for Node } opts = opts || {} var canvas = opts.canvas || document.createElement('c...
JavaScript
0.000001
@@ -153,24 +153,48 @@ string')%0A %7D +%0A%0A opts = opts %7C%7C %7B%7D%0A %0A if (typeo @@ -219,16 +219,32 @@ defined' + && !opts.canvas ) %7B%0A @@ -277,36 +277,18 @@ ode%0A %7D%0A -%0A -opts = opts %7C%7C %7B%7D %0A var c
7917033d33dfaa4d50c92fb13a979902e7fc20b3
use short opts for old gits, lint/strict
index.js
index.js
#!/usr/bin/env node /** * Copyright (c) 2012 Yahoo! Inc. All rights reserved. * Copyrights licensed under the MIT License. * See the accompanying LICENSE file for terms. */ var exec = require('child_process').exec, Table = require('cli-table'), CHUNK_RE = /^([* ]) (\S+)\s+([0-9a-f]+) (.+)$/, REMOTE_RE...
JavaScript
0
@@ -170,16 +170,65 @@ rms.%0A */ +%0A/*jslint node:true, regexp:true */%0A'use strict'; %0A%0Avar ex @@ -565,422 +565,8 @@ h'%0A%0A -function chunk(err, stdout, stderr) %7B%0A var table;%0A%0A if(err) %7B%0A console.error(stderr);%0A return process.exit(err.code);%0A %7D%0A%0A stdout.split(...
5d370e4de81a40ed95faa7da5d22c1a56fc18dd7
Revert "Improve detection"
index.js
index.js
'use strict'; const fs = require('fs'); let isDocker; function hasDockerEnv() { try { fs.statSync('/.dockerenv'); return true; } catch (_) { return false; } } function hasDockerCGroup() { try { const cGroup = fs.readFileSync('/proc/self/cgroup', 'utf8'); return cGroup.includes('docker') || cGroup.s...
JavaScript
0
@@ -206,22 +206,14 @@ %7B%0A%09%09 -const cGroup = +return fs. @@ -257,154 +257,26 @@ f8') -;%0A%0A%09%09return cGroup.includes('docker') %7C%7C%0A%09%09%09cGroup.split('%5Cn').some(line =%3E line.length %3E 0 && !line.endsWith('/') && !line.endsWith('init.scope') +.includes('docker' );%0A%09
804f9ffe5f3f6108741b4da0622ce51c1d86895b
Update copyright
index.js
index.js
/* * http-request-parser * Copyright(c) 2014 AlexanderMac <amatsibarov@gmail.com> * MIT Licensed */ module.exports = require('./lib/parser');
JavaScript
0
@@ -39,16 +39,21 @@ (c) 2014 +-2015 Alexand
65cdd7df23a6bcc2fe4e4d13d986852e517c91b3
index changes
index.js
index.js
'use strict'; var express = require('express'), exphbs = require('express-handlebars'), mysql = require('mysql'), myConnection = require('express-myconnection'), bodyParser = require('body-parser'), products = require('./routes/products'), sales = require('./routes/sales'); var app = expr...
JavaScript
0.000001
@@ -878,16 +878,19 @@ son())%0A%0A +// function @@ -926,16 +926,19 @@ next) %7B%0A +// res.st @@ -948,16 +948,19 @@ s(500);%0A +// res.re @@ -990,16 +990,19 @@ err %7D);%0A +// %7D%0A%0A//set @@ -1788,24 +1788,26 @@ s.delete);%0A%0A +// app.use(erro
41ed421ab1978c514b91c369fd79fb7e0205579e
Fix man page date
index.js
index.js
'use strict'; var registryUrl = require('registry-url')(), got = require('got'), MdAst = require('mdast'), mdastMan = require('mdast-man'), mdastStripBadges = require('mdast-strip-badges'); module.exports = function (name, opts, cb) { if (typeof opts == 'function') { cb = opts; opts = {}; ...
JavaScript
0.00077
@@ -694,16 +694,51 @@ cription +,%0A date: pkg.time.modified %0A
781872894f70c460b789a824ce89854b4d0fde3a
Change arcitecture a bit
index.js
index.js
const compose = require("compose-function") /** * Allows an update function to transform the * model based on the message sent through Hjelm. */ function send(hjelm) { return hjelm.program.model = hjelm.program.update(hjelm.message, hjelm.program.model) } /** * Logs the Hjelm instance everytime a message ...
JavaScript
0
@@ -152,20 +152,27 @@ unction -send +updateModel (hjelm) @@ -179,27 +179,12 @@ %7B%0A -return hjelm.progra +hjel m.mo @@ -192,33 +192,30 @@ el = -%0A hjelm. -program +ops .update +Model (hje @@ -236,22 +236,292 @@ elm. -program.model) +model)%0A%0A return hjelm%0A%7D%0A%0A%0A/**%0A * Runs sid%0A */%0A...
f86fd8e44b95bffce889f70fc5974b401c110836
fix ReferenceError by declaring variable, whoops
index.js
index.js
'use strict'; var node = document.createElement('style'); //node.innerHTML = '.siteLinks ul li:first-child,.siteLinks .languageSwitcher{display:none;}'; // hide redundant links in hamburger menu node.innerHTML += '.content {display:none;}'; // hide wikipedia panel node.innerHTML += '.relatedLibrarian.content,.relatedT...
JavaScript
0
@@ -705,16 +705,20 @@ () %7B%0A +var links = @@ -866,11 +866,8 @@ ion( -idx ) %7B%0A
e77c08e8344e84eb444c85b101290670eb05955d
fix replace quote in user name
libs/db.js
libs/db.js
/*jslint node: true*/ "use strict"; var sql = require('mssql'); // config for DB connections var config = require('config'); var lastProcessed = config.App.lastProcessed; function getAccount(recordset, processed) { // loop record sets to get account var async = require('async'); async.map(recordset, function (r...
JavaScript
0.000002
@@ -701,17 +701,17 @@ e(%22'%22, %22 -%5C +' '%22) + '%5C @@ -2330,9 +2330,8 @@ %7D);%0A%7D;%0A -%0A
7652eb2b552d0755b7ced491a476b423e927a1dc
improve scaffolding code
index.js
index.js
const testing = process.env.NODE_ENV === 'test'; /* istanbul ignore next */ require('dotenv').config({ path: testing ? '.env.dev' : '.env' }); const path = require('path'); const log = require('debug')('flint'); const chalk = require('chalk'); const { generateEnvFile } = require('./server/utils/generateEnvFile'); con...
JavaScript
0.000001
@@ -2460,16 +2460,36 @@ FLINT;%0A%0A + Promise.all(%5B%0A scaf @@ -2508,26 +2508,28 @@ emplatePath) -;%0A +,%0A scaffold @@ -2542,25 +2542,66 @@ .publicPath) -; +,%0A scaffold(FLINT.logsPath),%0A %5D);%0A %0A if (!FL @@ -2649,38 +2649,8 @@ th); -%0A scaffold(FLINT.logsPath); %0A%0A ...
5a86005c53042d4e12d758d23b72e553743ac1fb
return the bounds tree
index.js
index.js
import * as THREE from './node_modules/three/build/three.module.js' import './MeshRaycastRewrite.js' import TriangleBoundsTree from './TriangleBoundsTree.js' THREE.Geometry.prototype.computeBoundsTree = function() { this.boundsTree = new TriangleBoundsTree(this); } THREE.Geometry.prototype.disposeBoundsTree = fun...
JavaScript
0.999893
@@ -254,32 +254,60 @@ undsTree(this);%0A + return this.boundsTree;%0A %7D%0A%0ATHREE.Geometr @@ -498,16 +498,44 @@ (this);%0A + return this.boundsTree;%0A %7D%0A%0ATHREE
56a53da9eef7b9d79fbd98cb59af4bd9d6f25606
Fix typo
lib/danzi.js
lib/danzi.js
var Emitter = require('events').EventEmitter, path = require('path'), im = require('imagemagick'); /* * filesystem storage * - save request.files to uploadPath * - if request.files.each has many versions * process each version * store each version to uploadPath * * aws storage * - upload request....
JavaScript
0.999999
@@ -318,25 +318,25 @@ st.files to -s +S 3%0A * - if re @@ -409,19 +409,16 @@ store -to each ver @@ -425,17 +425,17 @@ sion to -s +S 3%0A */%0Ava
68cf9d1ea183044cc5633cf762a996610fa3e5a4
Make the Test Summary bolder.
src/test_runner/index.js
src/test_runner/index.js
import chalk from 'chalk'; import SnapshotRunner from './snapshot_runner'; export default class Runner { constructor(options) { const { configDir = './.storybook', update, updateInteractive: interactive, } = options; this.configDir = configDir; this.update = update; this.intera...
JavaScript
0.000002
@@ -2819,14 +2819,16 @@ ld(' +%5Cn Test -s +S umma @@ -3584,17 +3584,16 @@ em.%5Cn%60));%0A %7D%0A%7D%0A -%0A
2bc2a03b6126f1c7c6d221e162cc06fbb8dd72ce
fix omit data in render
index.js
index.js
/** * https://github.com/Aequiternus/node-jsin * v 0.1.5 * * Copyright © 2014 Maksim Krylosov <Aequiternus@gmail.com> * * 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 http://mozilla.org/MPL...
JavaScript
0.000001
@@ -984,18 +984,18 @@ d -elete data +ata = null ;%0A
d138569a3f24a8bc27ed1c4348503f23a4ea522a
Fix lint
src/workers/GambitCampaignSignupRelayWorker.js
src/workers/GambitCampaignSignupRelayWorker.js
'use strict'; const fetch = require('node-fetch'); const logger = require('winston'); const BlinkRetryError = require('../errors/BlinkRetryError'); const Worker = require('./Worker'); class GambitCampaignSignupRelayWorker extends Worker { constructor(blink) { super(blink); this.blink = blink; this.bas...
JavaScript
0.000032
@@ -977,24 +977,25 @@ sage',%0A %7D +; %0A%0A const
556115022dec30d40f15f1583b22395bdedb22e9
update ip regex
index.js
index.js
var restify = require('restify'); var request = require('superagent'); var jsdom = require('jsdom'); var eachSeries = require('async/eachSeries'); var server = restify.createServer({ name: 'sempre geo lookup', version: '1.0.0' }); server.use(restify.queryParser()); server.use(restify.bodyParser()); server.get(...
JavaScript
0.000001
@@ -894,17 +894,47 @@ = / -%5E(.*) - - +(%5Cd+%5C.%5Cd+.%5Cd+%5C.%5Cd+), %5Cd+%5C.%5Cd+.%5Cd+%5C.%5Cd+$ /;%0As
63998d59dc4e1be65d3aa255aab68e27b55916d5
tweak normalize
index.js
index.js
(exports = module.exports = function(){ var spawn = require('child_process').spawn; var fs = require('fs'); var ThreeDimensionBinPack = {}; ThreeDimensionBinPack.Bin = function(h,w,d) { this.packages = []; this.initialize.apply(this, arguments); } ThreeDimensionBin...
JavaScript
0.000002
@@ -1072,17 +1072,16 @@ (n * 100 -0 );%0A %7D
796cccb70435bc1f1519d14c73fb846acb18d2a1
Fix proxy support
index.js
index.js
var HttpProxyAgent = require('http-proxy-agent'); //var HttpsProxyAgent = require('https-proxy-agent'); var io = require('socket.io-client'); var request = require('request'); var url = require('url'); var path = require('path'); var nconf = require('nconf'); var _ = require('underscore'); // nconf goes from earliest ...
JavaScript
0.000001
@@ -503,16 +503,64 @@ tp_proxy + && /http:%5C/%5C//.test(nconf.get('socket_server')) ) %7B%0A ag @@ -564,16 +564,20 @@ agent = + new HttpPro @@ -587,12 +587,8 @@ gent -.new (pro
72121f949addc3a0b706a32dad6499ac460c9310
Add cleaner support for asynchronous reactive functions
index.js
index.js
// By Curran Kelleher April 2016 var ReactiveFunction = require("reactive-function"); var ReactiveProperty = require("reactive-property"); function ReactiveModel(){ // The model instance object. // This is the value returned from the constructor. var model = function (options){ //console.log("Invoking mod...
JavaScript
0
@@ -1988,28 +1988,16 @@ ush( -function (newValue)%7B +output); %0A%0A @@ -2006,18 +2006,16 @@ - - // Wrap @@ -2085,18 +2085,16 @@ - // async @@ -2147,18 +2147,16 @@ - - setTimeo @@ -2189,75 +2189,8 @@ - -output(newValue);%0A %7D);%0A %7D);%0A%0...
e2264e1691ca49871d08957177078f3450c646b4
Rename maps folder
index.js
index.js
var BaseColors = require('./base_colors'); var util = require('util'); var fs = require('fs'); var SourceMapConsumer = require('source-map').SourceMapConsumer; var KarmaPhantomJSSourceMapReporter = function(formatError, baseReporterDecorator) { baseReporterDecorator(this); BaseColors.call(this); this.writeCommo...
JavaScript
0.000001
@@ -697,20 +697,24 @@ p/tests/ +__ maps +__ )/(.*?%5C%5C @@ -1077,20 +1077,24 @@ blic/js/ +__ maps +__ /') + '.
d41a53c634bf09c8df08f580f4afa41ff2e04709
support 16777216 services on ubuntu
index.js
index.js
var net = require('net') var pump = require('pump') var network = require('network-address') var multicast = require('multicast-dns') var tick = 0 module.exports = function() { var services = {} var hosts = {} var mdns = multicast() var me = network() mdns.on('query', function(query, rinfo) { if (rinfo...
JavaScript
0
@@ -127,16 +127,113 @@ t-dns')%0A +var os = require('os')%0A%0Avar osx = os.platform() === 'darwin'%0Avar limit = true ? 256 : 256*256*256 %0Avar tic @@ -1084,19 +1084,21 @@ i %3C -255 +limit ; i++) %7B // @@ -1097,81 +1097,165 @@ +) %7B - // TODO: generate 127.x.x.x as well etc%0A if (tick === 255) tick ...
fad9e8ed0ea02796a0155ac258ddc126cd286c95
Add docstring to stegosaurus.embedHandler
index.js
index.js
var multiparty = require('multiparty'); var fs = require('fs'); var _ = require('underscore'); var steghide = require('./steghide'); module.exports.embedHandler = function(options) { options = options || {}; _.defaults(options, { uploadDir: '/tmp/stegosaurus', imageFileParamName: 'the_image', messageF...
JavaScript
0.000001
@@ -128,16 +128,908 @@ ide');%0A%0A +/**%0A * Build a request handler around steghide embed%0A *%0A * @param options the settings to use for the request handler. Expects an%0A * object with zero or more of the following keys. The format for the below%0A * is %60name%60: type (default).%0A *%0A * - %60uploadDir%...
5e3c1ca28a8cc700390208b6392e705fd06540dd
update for webpack 2
index.js
index.js
'use strict' const path = require('path'); const fs = require('fs'); const utils = require('loader-utils'); const yaml = require('js-yaml'); const matter = require('gray-matter'); const md = require('markdown-it')({ html: true, linkify: true, typographer: true }); module.exports = function(source){ th...
JavaScript
0
@@ -356,90 +356,8 @@ %0A - // lets load the shared locals object%0A let locals = this.options.locals; %0A%0A @@ -422,91 +422,98 @@ .get -LoaderConfig(this, %22pages%22 +Options(this );%0A +%0A -%0A let pug = utils.getLoaderConfig(this, %22pug%22); +// lets load the shared locals object%0A ...
97f6ad79c911270d2431151e9ec8deef00a0e898
Update path
lib/elise.js
lib/elise.js
/* * elise * https://github.com/stwind/elise * * Copyright (c) 2012 stwind * Licensed under the MIT license. */ var _ = require('underscore'), Universe = require('./views/Universe'), Board = require('./views/board'), schema = require('./schema'), ShowTimeline = require('./timeline'), ShowTime...
JavaScript
0.000001
@@ -1046,34 +1046,8 @@ ) %7B%0A - $('#loading').hide();%0A @@ -1132,24 +1132,52 @@ nction () %7B%0A + $('#loading').hide();%0A var bo
6a34156a9254291dcf26ff6f332a7bbad4466deb
add a closing method
lib/fetch.js
lib/fetch.js
/*jslint node: true */ /* global -Promise */ 'use strict'; var _ = require('lodash'); var Promise = require('promise'); var assert = require('assert'); var PoliteError = require('./error'); var PoliteLookup = require('./lookup'); var PoliteRobot = require('./robot'); var FetchPolitely = function (callback, options...
JavaScript
0.000001
@@ -2879,24 +2879,208 @@ %7D);%0A%7D;%0A%0A +FetchPolitely.prototype.close = function () %7B%0A if (this.options.lookup.close) %7B this.options.lookup.close(); %7D%0A if (this.options.allowed.close) %7B this.options.allowed.close(); %7D%0A%7D;%0A%0A FetchPolitel
ed408fc0a71cb265b9fef1cd5a522a8acef1885b
Add `react/static-property-placement` rule
index.js
index.js
'use strict'; module.exports = { parserOptions: { ecmaFeatures: { jsx: true } }, plugins: [ 'react', 'react-hooks' ], settings: { react: { version: 'detect' } }, rules: { 'react/boolean-prop-naming': [ 'error', { validateNested: true } ], 'react/button-has-type': 'error', '...
JavaScript
0.000001
@@ -1384,32 +1384,78 @@ comp': 'error',%0A +%09%09'react/static-property-placement': 'error',%0A %09%09'react/style-p
dfb727bc880104605a2275c23a3650638daf4eb8
Clarify intent of applyEffect()
index.js
index.js
/* index.js - "tart-tracing": Tracing configuration implementation The MIT License (MIT) Copyright (c) 2013 Dale Schumacher, Tristan Slominski 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 wi...
JavaScript
0.000007
@@ -2021,24 +2021,379 @@ %7D;%0A %0A + /*%0A Conditionally apply effects accumulated in %60exports.effect%60.%0A If there are effects to apply,%0A they are recorded in %60exports.history%60%0A and a new %60export.effect%60 object is initialized.%0A As a convenience, the original value of %60ex...
eb123828e17eb7187458ac8a939c7e080fb76251
include minimal face size in branching criteria
src/scripts/2dzeo.js
src/scripts/2dzeo.js
import * as generators from '../common/generators'; import * as branch from '../dsymbols/branchings2d'; import * as covers from '../dsymbols/covers'; import * as DS from '../dsymbols/delaney'; import * as DS2D from '../dsymbols/delaney2d'; import * as props from '../dsymbols/properties'; const good = ds => DS.orbitR...
JavaScript
0
@@ -735,16 +735,19 @@ hings(ds +, 4 )))%0A
2ed8ba963379f67a4a3f388ba299182160472f02
Change event for search field resetting (fixes #4)
src/scripts/index.js
src/scripts/index.js
import compose from 'ramda/src/compose'; import { runOnCondition, addParams } from './utils/function-transformers'; import checkKeyNameFromEvent from './utils/check-key-name-from-event'; import { getDOMNode, addListenerToDOMNode, removeListenerFromDOMNode } from './utils/dom-node-helpers'; import { updateCheatsheet, ...
JavaScript
0
@@ -1417,21 +1417,18 @@ FieldKey -Press +Up = compo @@ -1488,37 +1488,34 @@ eldListener('key +u p -ress ', handleSearchF @@ -1521,21 +1521,18 @@ FieldKey -Press +Up );%0A%0A// P @@ -1843,13 +1843,10 @@ 'key +u p -ress ', h @@ -1868,13 +1868,10 @@ dKey -Press +Up );%0A
45af038809adaba40c148727bae29171f4908696
add better error handling in itShouldEndAsync
index.js
index.js
var assert = require('assert'); var should = require ('should'); module.exports.itShouldClose = function (options) { return function (source) { it(options && options.title || 'should close', function () { source.subscribe().close(); }); return source; }; }; module.exports.itShouldEmitValues = function (op...
JavaScript
0.000001
@@ -1112,17 +1112,116 @@ s.error) + %7B %0A +%09%09%09%09%09%09if (typeof options.error === 'string')%0A%09%09%09%09%09%09%09options.error.should.equal(err);%0A%09%09%09%09%09%09else%0A%09 %09%09%09%09%09%09as @@ -1241,28 +1241,32 @@ null);%0A%09%09%09%09%09 +%7D else + %7B %0A%09%09%09%09%09%09asser @@ -1281,16...
dfebc76a171c0289ea6de93043c334ef8cb6d301
Fix condition
index.js
index.js
'use strict'; var lock = require('es5-ext/function/#/lock') , copy = require('es5-ext/object/copy') , isCallable = require('es5-ext/object/is-callable') , callable = require('es5-ext/object/valid-callable') , escape = require('es5-ext/reg-exp/escape') , exec = require('exec-batch/exec...
JavaScript
0.000001
@@ -1227,17 +1227,16 @@ %09%09%09%09if ( -! tracksBr
b1c044db1a875d202c26f1eb2f0c042241ab93de
Add prefix to cache
index.js
index.js
var sys = require("sys"); var path = require("path"); // openssl support var have_openssl; try { var crypto = require('crypto'); have_openssl=true; } catch (e) { have_openssl=false; } var parser = require("./parser"); var compiler = require("./compiler"); var cache = require("./cache"); /** *...
JavaScript
0.000002
@@ -591,16 +591,28 @@ ar key = + %22__tpl__%22 + origin;
996c23436ecb2ecfbcc0344de355185e57ce746c
Set location to keep tracking.
companion-m/src/scenes/MainScreen.js
companion-m/src/scenes/MainScreen.js
import React from 'react'; import { StyleSheet, Text, View, TextInput } from 'react-native'; import { Actions } from 'react-native-router-flux'; import MapView from 'react-native-maps'; import Button from '../common/Button'; import Input from '../common/Input'; import { marginTop } from '../styles/layout'; import colo...
JavaScript
0
@@ -580,16 +580,82 @@ %7D;%0A%0A + this.getCurrentLocation = this.getCurrentLocation.bind(this);%0A this @@ -704,16 +704,63 @@ (this);%0A + this.interval = null; // Set after mounted%0A %7D%0A%0A c @@ -771,12 +771,11 @@ nent -Will +Did Moun @@ -842,16 +842,146 @@ tion();%0A + this.interval = ...
1f82970e00ab3a5a0ea8780213d762a9f1fe2316
fix bug: crashes when showing total filesize (--list)
index.js
index.js
#!/usr/bin/env node var program = require('commander'); var request = require('request'); var humanFormat = require('human-format'); var _ = require('lodash'); require('console.table'); function list(val) { return val.split(','); } program .version('0.0.1') .option('-t, --token <token>', 'Your Sla...
JavaScript
0
@@ -3505,38 +3505,38 @@ :', humanFormat( -file.s +totalS ize, %7Bscale: 'bi
ad1a96dab2fef233f13454f9317d08008df77ec7
Update gameTheoryController.js
game-theory/gameTheoryController.js
game-theory/gameTheoryController.js
var gameModule = angular.module('app', []). controller("gameTheoryControl", function gameTheoryControl($scope){ function number(num){ this.name = num; this.selected = false; return this; } $scope.numbers=[]; $scope.solutions=[]; function solution...
JavaScript
0.000001
@@ -1879,17 +1879,22 @@ lerNums) -%7B +;%0A%09%09%09%09 %0A%09%09%09%09%09fo @@ -2081,25 +2081,24 @@ %0A%09%09%09%09%09%7D%0A%09%09%09%09 -%7D %0A%09%09%09%09%0A%09%09%09%09if
855992f0d3f930c68d0f78664b0876283e9aeebd
Update gameTheoryController.js
game-theory/gameTheoryController.js
game-theory/gameTheoryController.js
var gameModule = angular.module('app', []). controller("gameTheoryControl", function gameTheoryControl($scope){ function number(num){ this.name = num; return this; } $scope.numbers=[{name: 1},{name: 2}, {name: 3}]; $scope.amount = 10; $scope.newN...
JavaScript
0.000001
@@ -498,15 +498,41 @@ %09%09%7D%0A%09%09%7D%0A +%09%09%0A%09%09$scope.newNumbers();%0A %09%0A%09%7D);%0A
842736e68576dbcda17b6c4f5fff55ca8f8abffe
Fix case of directory
index.js
index.js
module.exports = { Slugify: require('./lib/Slugify') , Diacritics: require('./lib/diacritics/Diacritics') , fromLocale: function(locale) { return new this.Slugify(new this.Diacritics(this.requireLocale(locale))); } , requireLocale: function(locale) { return require('./lib/diacritics/locale/' + locale + '.j...
JavaScript
0.998524
@@ -71,33 +71,33 @@ require('./lib/ -d +D iacritics/Diacri @@ -279,17 +279,17 @@ ('./lib/ -d +D iacritic @@ -324,8 +324,9 @@ ;%0A%09%7D%0A%0A%7D; +%0A
d44a54c65e55002a828a3ed4c762792ba8913fe3
Simplify code a bit.
formulaParser.js
formulaParser.js
const MIN_PRECEDENCE = 0; /** * Returns the remainder of a given string after slicing off * the length of a given symbol and any following whitespace. * (Does not verify that the symbol is an initial substring.) * * @private * @static * @param {string} str - a string to slice * @param {string} symbol - an i...
JavaScript
0.000065
@@ -397,20 +397,14 @@ %7B%0A -const tail = +return str @@ -428,91 +428,14 @@ gth) -;%0A const whitespace = tail.match(/%5E%5Cs*/)%5B0%5D;%0A return tail.slice(whitespace.length +.trim( );%0A%7D @@ -3998,16 +3998,8 @@ eft' - ? 1 : 0 );%0A
cbcb96608a94c835d8065400f4be026c369dfa57
add chalk, fix SSR express's handling
src/server/server.js
src/server/server.js
import app from './express' import API from './api' import useSSR from './ssr' // see src/server/index.js const {PORT, BASE_API} = process.env // Add API route app.use(BASE_API, API) // Add SSR handler app.get('*', useSSR) // Start server app.listen(PORT, () => { console.log(`Server is running on ${PORT} port!`) })
JavaScript
0
@@ -76,42 +76,42 @@ sr'%0A -// see src/server/index.js +import chalk from 'chalk'%0A %0Aconst %7B PORT @@ -110,22 +110,16 @@ st %7B -PORT, BASE_API %7D = @@ -114,16 +114,22 @@ BASE_API +, PORT %7D = proc @@ -203,17 +203,12 @@ app. -get('*', +use( useS @@ -266,17 +266,31 @@ ole.log( -%60 +chalk.green(%60%5...
38b92245fe9abf305f1ec6a03b6aa672a26b8056
improve non-qsa fallback insertion point
loadCSS.js
loadCSS.js
/*! loadCSS: load a CSS file asynchronously. [c]2015 @scottjehl, Filament Group, Inc. Licensed MIT */ (function(w){ "use strict"; /* exported loadCSS */ w.loadCSS = function( href, before, media ){ // Arguments explained: // `href` [REQUIRED] is the URL for your CSS file. // `before` [OPTIONAL] is the element ...
JavaScript
0.000001
@@ -1005,21 +1005,46 @@ se %7B%0A%09%09%09 -ref +var scope = + w.document.body %7C%7C w.docum @@ -1074,23 +1074,75 @@ e( %22 -script%22 )%5B 0 +head%22 );%0A%09%09%09ref = scope.childNodes%5B scope.childNodes.length - 1 %5D; + %0A%09%09%7D
35f04c3669008120b06f99f26590cda87704d88a
Add @links where applicable in filter-input.js.
frontend/src/components/Utils/filter-input.js
frontend/src/components/Utils/filter-input.js
import * as firebase from 'firebase/app'; import authUtils from '../AuthUtils'; import { getUserUidArrFromUserEmailArr } from './temp-auth-utils.js' import { getTimestampFromDateString } from './time.js' import * as DB from '../../constants/database.js'; /** * An object containing the raw input data from a SaveTripM...
JavaScript
0
@@ -2918,20 +2918,32 @@ cleaned -trip +%7B@link TripData%7D object @@ -2963,27 +2963,30 @@ used - as the data%0A * for +%0A * to instantiate the the @@ -3032,10 +3032,16 @@ hat -%60r +%7B@link R awTr @@ -3050,9 +3050,9 @@ Data -%60 +%7D wil @@ -3092,21 +3092,21 @@ elds for - a %0A * + a trip do
85b0917290aa50a4184441297ed7329bce3735f4
add some comments
index.js
index.js
var Querystring = require('querystring'); var internals = {}; internals.setKey = function (obj, chain, val) { var root = chain.shift(); if (chain.length > 1) { obj[root] = {}; internals.setKey(obj[root], chain, val); } else if (chain.length === 1) { var index = /\[(\d+)?\]/.e...
JavaScript
0
@@ -291,49 +291,138 @@ -var index = /%5C%5B(%5Cd+)?%5C%5D/.exec(chain%5B0%5D);%0A +// check if the next key is %5B%5D or %5B0%5D%0A var index = /%5C%5B(%5Cd+)?%5C%5D/.exec(chain%5B0%5D);%0A%0A // it's not, so continue as normal %0A @@ -538,32 +538,92 @@ %0A else %7B%0A + // we...
c94b93e87e1364fab1f232995d3d8b2ebb64b241
Use ES5 functions instead of arrow functions
index.js
index.js
var data = require('./data'); var accounting = require('accounting'); var CurrencyFormatter = function() { this.defaultCurrency = { symbol: '', thousandsSeparator: ',', decimalSeparator: '.', symbolOnLeft: true, spaceBetweenAmountAndSymbol: false, decimalDigits: 2 } } CurrencyFormatter.pro...
JavaScript
0.000002
@@ -376,36 +376,52 @@ ncy = data.find( -c =%3E +function(c) %7B return c.code === opti @@ -428,16 +428,19 @@ ons.code +; %7D ) %7C%7C thi @@ -1218,12 +1218,28 @@ ind( -c =%3E +function(c) %7B return c.c @@ -1258,16 +1258,19 @@ encyCode +; %7D );%0A%7D%0A%0Amo
0063bc69d9fa25a016377043a3cac009044c236f
test all paths in getWidth
src/utils/__tests__/getWidth.test.js
src/utils/__tests__/getWidth.test.js
import getWidth, { widths } from '../getWidth'; describe('getWidth', () => { it('returns a width', () => { window.innerWidth = 993; expect(getWidth()).toEqual(widths.large); }); });
JavaScript
0.000001
@@ -84,17 +84,27 @@ returns -a +the correct width', @@ -183,16 +183,159 @@ large);%0A +%09%09window.innerWidth = 800;%0A%09%09expect(getWidth()).toEqual(widths.medium);%0A%09%09window.innerWidth = 360;%0A%09%09expect(getWidth()).toEqual(widths.small);%0A %09%7D);%0A%7D);
7cb54ad655b1a362533e1e672f6674d5e7fe17a4
remove var
index.js
index.js
const Writable = require('stream').Writable const ebml = require('ebml') const ebmlBlock = require('ebml-block') const readElement = require('./lib/read-element') // track elements we care about const TRACK_ELEMENTS = ['TrackNumber', 'TrackType', 'Language', 'CodecID', 'CodecPrivate'] const SUBTITLE_TYPES = ['S_TEXT/U...
JavaScript
0.000005
@@ -543,27 +543,27 @@ uper()%0A%0A -var +let currentTrac @@ -567,35 +567,35 @@ rack = null%0A -var +let currentSubtitle @@ -611,19 +611,19 @@ ull%0A -var +let current @@ -1085,19 +1085,21 @@ %7D%0A%0A -var +const self = @@ -1850,19 +1850,21 @@ -var +const track = @@ -2893,19 +2...
a1a91f8c6dd29b709f22804d91c2a810cd2b14e0
simplify reverseMap, only en property is used
index.js
index.js
var domify = require('domify'); var keys = { en: ['C', 'D', 'E', 'F', 'G', 'A', 'B'], de: ['C', 'D', 'E', 'F', 'G', 'A', 'H'] }; var keyReverseMap = { en: { C: 0, D: 1, E: 2, F: 3, G: 4, A: 5, B: 6 }, de: { C: 0, D: 1, ...
JavaScript
0
@@ -150,38 +150,24 @@ erseMap = %7B%0A - en: %7B%0A C: 0,%0A @@ -160,36 +160,32 @@ %7B%0A C: 0,%0A - - D: 1,%0A E: @@ -170,36 +170,32 @@ ,%0A D: 1,%0A - - E: 2,%0A F: @@ -184,38 +184,30 @@ E: 2,%0A - - F: 3,%0A - G: 4,%0A @@ -196,36 +196,32 @...
d5176946b3312bc7d84d28c6f7f97a4cd21b2ad4
Allow to skip a shift by entering '-'
index.js
index.js
require('datejs'); var config = require('./config'); var prompt = require('prompt'); var Nightmare = require('nightmare'); var colors = require('colors'); // Monkey patch for https://github.com/segmentio/nightmare/issues/126 (function () { var sockjs = require('nightmare/node_modules/phantom/node_modules/sho...
JavaScript
0.000027
@@ -1306,16 +1306,268 @@ rim();%0A%0A +%09// If you don't enter a time, then skip the entry.%0A%09// This way, you can enter %22-%22 or something to skip%0A%09if (!parseInt(shift1Start%5B0%5D, 10)) %7B%0A%09%09shift1Start = shift1End = '';%0A%09%7D%0A%09if (!parseInt(shift2Start%5B0%5D, 10)) %7B%0A%09%09shift2Start = ...
63266199cb3624098698c200963de82f521a4150
Update request method to receive an URL.
index.js
index.js
/** * index.js * Client entry point. * * @author Francis Brito <fr.br94@gmail.com> * @license MIT */ 'use strict'; var request = require('request'), querystring = require('querystring'); /** * Client * Provides methods to access PrintHouse's API. * * @param {String} apiKey API key identifying account ...
JavaScript
0
@@ -2084,26 +2084,19 @@ method, -collection +url , body, @@ -2116,47 +2116,35 @@ -var url = this._getUrlFor(collection) +if (query) %7B%0A url + += _to @@ -2164,26 +2164,33 @@ s(query) -, +; %0A +%7D%0A%0A +var opts = %7B @@ -2198,20 +2198,16 @@ - - url: url @@ -2216,20...
5862cdb6b695b4bb4bfb53d77b3728cc749b99d0
Support React Native ^0.26 import
index.js
index.js
import React, { Component, PropTypes, Text, TouchableOpacity, View } from "react-native"; import styles from "./styles"; export default class LayoutTester extends Component { static displayName = "LayoutTester"; static propTypes = { children: PropTypes.node, config: PropT...
JavaScript
0
@@ -8,20 +8,16 @@ React, %7B -%0A Compone @@ -19,20 +19,16 @@ mponent, -%0A PropTyp @@ -29,17 +29,41 @@ ropTypes -, + %7D from 'react';%0Aimport %7B %0A Tex
48a7de4ea4eb3326ed0c5c5e41e63b17400292b9
Change upper/lower bound speech
index.js
index.js
#!/usr/bin/env node /*jshint node:true */ 'use strict'; var version = require('./package.json').version; var request = require('request'); var program = require('commander'); var nextTime = require('next-time'); var spawn = require('child_process').spawn; require('colors'); program .version(version) .usage('[options]...
JavaScript
0.000042
@@ -1826,17 +1826,19 @@ ay(' -stop loss +lower bound ');%0A @@ -1984,20 +1984,19 @@ ay(' -price target +upper bound ');%0A
93eb5cee7074f799f02612405e5da1058852f728
add Currency manager
index.js
index.js
module.exports = { managers: { master: { BuyerManager: require("./src/managers/master/buyer-manager"), SupplierManager: require("./src/managers/master/supplier-manager"), ProductManager: require("./src/managers/master/product-manager"), CategoryManager: requir...
JavaScript
0.000013
@@ -490,32 +490,112 @@ er/uom-manager') +,%0A CurrencyManager: require('./src/managers/master/currency-manager') %0A %7D,%0A
909debf2f355ec8fc832b85afb136b40841656d1
Improve basic command parsing
index.js
index.js
const Discord = require('discord.js'); const client = new Discord.Client(); const config = require("./config.json"); client.on('ready', () => { console.log("I am ready!"); }); client.on('message', (message) => { if (!message.content.startsWith(config.prefix) || message.author.bot) return; // Ignore messages not ...
JavaScript
0.000428
@@ -1,12 +1,13 @@ +%0A %0Aconst Disco @@ -71,16 +71,17 @@ ient();%0A +%0A const co @@ -110,24 +110,191 @@ ig.json%22);%0A%0A +String.prototype.isCommand = function(commandString) %7B%0A let str = this.valueOf();%0A return str === commandString %7C%7C%0A str.startsWith(commandString + ' ');%0A%7D;%0A%0A c...
d10403130b6ade5b4120e83782bd971398e8cb62
add 'custom icon' prototype to sidebar nav [SCT-1235] - this will surely change in the final form, but it does work - some pixel-level differences between browsers, though.
src/plugins/mainwindow/modules/components/sidebarMenu.js
src/plugins/mainwindow/modules/components/sidebarMenu.js
define([ 'kb_knockout/registry', 'kb_knockout/lib/generators', 'kb_common/html' ], function ( reg, gen, html ) { 'use strict'; var t = html.tag, div = t('div'), a = t('a'); class ViewModel { constructor(params) { this.buttons = params.buttons; ...
JavaScript
0
@@ -1647,24 +1647,1232 @@ %7D%0A %7D);%0A%0A + function buildPublicSearchIcon() %7B%0A return div(%7B%0A class: 'fa-stack fa-2x',%0A style: %7B%0A marginBottom: '-12px'%0A %7D,%0A ariaHidden: 'true'%0A %7D,%5B%0A div(%7B%0A ...
fb859954d11cb5c73fd8ab59de7fb5fb51e45e37
Fix cursor behavior with multiline when controlled (#4430) (#7006)
src/TextField/EnhancedTextarea.js
src/TextField/EnhancedTextarea.js
import React, {Component} from 'react'; import PropTypes from 'prop-types'; import EventListener from 'react-event-listener'; const rowsHeight = 24; function getStyles(props, context, state) { return { root: { position: 'relative', // because the shadow has position: 'absolute' }, textarea: { ...
JavaScript
0
@@ -2843,50 +2843,220 @@ -this.setState(%7B%0A height: newHeight, +const input = this.refs.input;%0A const cursorPosition = input.selectionStart;%0A this.setState(%7B%0A height: newHeight,%0A %7D, () =%3E %7B%0A input.setSelectionRange(cursorPosition, cursorPosition); %0A
843ad50296c0a19d3e342c5be9ea92e37fac109a
remove peculiar web language
Libraries/Components/Touchable/TouchableWithoutFeedback.js
Libraries/Components/Touchable/TouchableWithoutFeedback.js
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
JavaScript
0.002028
@@ -940,81 +940,8 @@ hed. - This is%0A * one of the primary reasons a %22web%22 app doesn't feel %22native%22. %0A *%0A
e74a9ca9ffad081e9602840e417928743f67ea34
test task commented out
src/TrackTV.WebClient/gulpfile.js
src/TrackTV.WebClient/gulpfile.js
'use strict'; const gulp = require('gulp'), runSequence = require('run-sequence'); let taskNames = require('./modules/load'); gulp.task('default', function () { runSequence(...taskNames); }); //gulp.task('build', function () { // // runSequence( // 'build-clean', // 'build-index', // ...
JavaScript
0.000003
@@ -790,24 +790,26 @@ );%0A//%7D);%0A%0A +// gulp.task('t @@ -829,25 +829,29 @@ nction () %7B%0A -%0A +//%0A// const gl @@ -881,16 +881,18 @@ ).sync,%0A +// @@ -914,24 +914,26 @@ derscore'),%0A +// path @@ -948,24 +948,26 @@ re('path'),%0A +// copy @@ -1006,17 +1006,21 @@ iles'...
4bca760f4b165dc66de6057f9ea9f4ae40773927
Add to the sample apps ul
index.js
index.js
console.log('loading electron-updater-sample-plugin...') function plugin(context) { console.log('loaded electron-updater-sample-plugin!') } module.exports = plugin
JavaScript
0
@@ -88,28 +88,123 @@ %7B%0D%0A%09 -console.log('loaded +var d = context.document%0D%0A%09var ul = d.getElementById('plugins')%0D%0A%09var li = d.createElement('li')%0D%0A%09li.innerHTML = ' elec @@ -233,10 +233,29 @@ ugin -! ' +%0D%0A%09ul.appendChild(li )%0D%0A%7D
9046f1a43d4101fbc411ef58a4b7aec3425ccb5a
add loadingqueue parameter for dataset import
index.js
index.js
const DeveloperAPIEndpoints = require('./endpoints'); const request = require('request-promise'); module.exports = function (baseURL, clientName, clientSecret) { var endpoints = new DeveloperAPIEndpoints(baseURL); return { getToken: function (authorisationCode, attributes) { if (typeof attrib...
JavaScript
0
@@ -3521,16 +3521,35 @@ Location +, addToLoadingQueue ) %7B%0A @@ -3782,32 +3782,66 @@ attributes:%7B%0A + addToLoadingQueue%0A
58e5255f485098c64736027757e1f18c28351749
update Notification
src/_Notification/Notification.js
src/_Notification/Notification.js
/** * @file Notification component * @author liangxiaojun(liangxiaojun@derbysoft.com) */ import React, {Component} from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import IconButton from '../IconButton'; import AnchorButton from '../AnchorButton'; import PureRender from '../_...
JavaScript
0.000001
@@ -289,57 +289,8 @@ ';%0A%0A -import PureRender from '../_vendors/PureRender';%0A impo @@ -370,20 +370,8 @@ ';%0A%0A -@PureRender%0A clas
96b750217f8979d3f5fa8e86e6a96438dfc3a9d6
Refactor the construction of the requestor dependency.
index.js
index.js
var _ = require('underscore'); var apiUrls = require('./lib/utils/apis.js'); exports.createClient = function(clientOptions) { var requestor = clientOptions.requestor; if(!requestor) { var requestorConfig = _.pick(clientOptions, 'maxRetryTime', 'calcRetryBackoff'); requestor = require('./lib/utils/httpReque...
JavaScript
0
@@ -75,39 +75,31 @@ );%0A%0A -exports.createClient = function +function buildRequestor (cli @@ -114,20 +114,33 @@ ns) %7B%0A -var +if(clientOptions. requesto @@ -140,18 +140,24 @@ equestor - = +) return clientO @@ -180,27 +180,9 @@ ;%0A -if(!requestor) %7B%0A +%0A va @@ -200,16 +200,20 @@ Config = +%...
eae959a267518d99dfc4184528c4f3d2a223c73a
Remove unused Transform stream pipeline implementation
src/search/search-index-pipeline.js
src/search/search-index-pipeline.js
import stream from 'stream' import reduce from 'lodash/fp/reduce' import transformPageText from 'src/util/transform-page-text' // Meant to match domain + TLD + optional ccTLD of a URL without leading `protocol://www.`. // It end-delimits the domain by either a forward-slash or end-of-input. // From a `String.prot...
JavaScript
0.000003
@@ -1,32 +1,4 @@ -import stream from 'stream'%0A impo @@ -31,16 +31,16 @@ reduce'%0A + %0Aimport @@ -677,389 +677,8 @@ ')%0A%0A -/**%0A * Transforms a page doc to doc structured for use with the index.%0A * All searchable page data (content) is concatted to make a composite field.%0A * This represents the general ...
3d2f94c73a199776bd39bff287314f96ebfc4344
Add killcount
platformer/platformer.js
platformer/platformer.js
(function (cells, MAP, Entity) { 'use strict'; var getCellData = window.GAME.fn.getCellData; var tileToPixel = window.GAME.fn.tileToPixel; // https://developer.mozilla.org/en-US/docs/Web/API/Performance.now%28%29 function timestamp() { return window.performance && window.performance.now ? window.perform...
JavaScript
0.000001
@@ -4053,32 +4053,204 @@ tile / 2);%0A %7D +%0A%0A ctx.fillStyle = palette.slate;%0A for(var i = 0; i %3C player.killed ; i++) %7B%0A ctx.fillRect(tileToPixel(2 + i), tileToPixel(3), MAP.tile / 2, MAP.tile / 2);%0A %7D %0A %7D%0A%0A function
1606657be6f7fbafa653ffbf1ed8f85948bf1bcf
improve error message
index.js
index.js
/*! * resolve-from-npm | MIT (c) Shinnosuke Watanabe * https://github.com/shinnn/resolve-from-npm */ 'use strict'; var npmCliDir = require('npm-cli-dir'); var PinkiePromise = require('pinkie-promise'); var resolveFrom = require('resolve-from'); module.exports = function resolveFromNpm(moduleId) { return npmCliDir...
JavaScript
0.000008
@@ -111,16 +111,56 @@ rict';%0A%0A +var inspect = require('util').inspect;%0A%0A var npmC @@ -482,14 +482,15 @@ -String +inspect (mod
28c96d4fed839d4b436b0efc7c47ae035870763a
Add checkElementEquality to array
array.js
array.js
'use strict'; var ARRAY_TYPE = 'array'; // Iterate over the array, passing each element to the given function. function each(a, cb) { for (var i = 0; i < a.length; i++) { cb(a[i]); } } // Return the set of elements that appear in both arrays `a` and `b`. function union(a, b) { var set = {}; v...
JavaScript
0
@@ -8,16 +8,56 @@ rict';%0A%0A +var ObjectUtils = require('./object');%0A%0A var ARRA @@ -647,16 +647,732 @@ ult;%0A%7D%0A%0A +/**%0A * Iterates over each element in a pair of arrays and returns a result array%0A * signifying whether elements at a shared index are equal.%0A * @param %7BArray%7D a%0A * @param %7BAr...
4416c0a6d4a71a3a6b13606fe6e9afa7bc5b860c
Add user without group to seed data
seeds/development.js
seeds/development.js
const bcrypt = require('bcrypt'); exports.seed = (knex, Promise) => { // Deletes ALL existing entries return knex('token_group_access').del() .then(() => knex('tokens').del()) .then(() => knex('user_saldos').del()) .then(() => knex('transactions').del()) .then(() => knex('users').del()) .then((...
JavaScript
0.000001
@@ -646,16 +646,75 @@ ('1243', + 6)%7D'),%60 +%0A %60(4,'testUser4','$%7Bbcrypt.hashSync('4312', 6)%7D');%60
f50a71d9940dd5ec4959817eb8d9a1e4ec16ac98
Add IE9+ to the list of browsers for testing
index.js
index.js
'use strict'; var del = require('del'); var GlobalsFormatter = require('es6-module-transpiler-globals-formatter'); var gulp = require('gulp'); var gutil = require('gulp-util'); var jspm = require('jspm'); var jspmCore = require('jspm/lib/core'); var karma = require('karma').server; var merge = require('merge'); var op...
JavaScript
0
@@ -3832,16 +3832,60 @@ 'Safari' +, 'IE9 - Win7', 'IE10 - Win7', 'IE11 - Win7' %5D%0A %7D,
b8fcf66d9fc84f4b4d83e77c506965d5bebad389
Update index.js
lib/index.js
lib/index.js
'use strict'; var fs = require('fs'); var path = require('path'); var libpath = process.env.TEST_COV ? '../lib-cov/' : '../lib/'; var detector = require(libpath + 'detector'); var handlers = {}; var types = require(libpath + 'types'); // load all available handlers types.forEach(function (type) { handlers[type] =...
JavaScript
0.000001
@@ -513,16 +513,20 @@ 128*1024 +*100 ;%0A%0Afunct
98e7c3e18e89df73cf92bf2b16e874b2b306cbde
Rename to FallingDrawer
index.js
index.js
import React, { Component } from 'react' import { Dimensions, TouchableOpacity, Text, Platform } from 'react-native' import View from 'react-native-view' import PropTypes from 'prop-types'; import MAIcon from 'react-native-vector-icons/MaterialIcons' import _ from 'lodash' import * as Animatable from 'r...
JavaScript
0.999996
@@ -5857,27 +5857,23 @@ %7D%0A%7D%0A%0A -Collapsible +Falling Drawer.p @@ -6093,19 +6093,15 @@ %7D;%0A%0A -Collapsible +Falling Draw
595a4634df20b0845b15fcd2701646e67a9af52b
Exit with error code
lib/index.js
lib/index.js
'use strict'; var R = require('ramda'); var util = require('util'); var events = require('events'); var fs = require('fs-extra'); var needleSchedule = require('needle-schedule'); var cs = require('chronostore'); var bunyan = require('bunyan'); var BunyanToLoggly = require('bunyan-loggly'); var BunyanToSlack = require(...
JavaScript
0.000001
@@ -3194,16 +3194,17 @@ ss.exit( +1 );%0A %7D
7d125c2f059c34a256b13de7779f4f122d5ed05d
Manage paths on save
lib/index.js
lib/index.js
/* * Vecna * https://github.com/eburgos/Vecna * * Copyright (c) 2015 goliatone * Licensed under the MIT license. */ 'use strict'; var debug = require('debug')('vcn'); var extend = require('gextend'); var _inherit = require('util').inherits; var EventEmitter = require('events').EventEmitter; var Promise = requir...
JavaScript
0
@@ -336,51 +336,73 @@ var -knox = Promise.promisifyAll(require('knox') +tildify = require('tildify');%0Avar untildify = require('untildify' );%0Av @@ -1611,24 +1611,32 @@ path: +tildify( filepath ,%0A @@ -1627,16 +1627,17 @@ filepath +) ,%0A @@ -3456,24 +3456,25 @@ ug('data');%0A +%0A ...
70370b9bc141010739cacff926c2872cf15a75d5
add support for jsx file ext
index.js
index.js
'use strict'; var react = require('react-tools'); module.exports = function duoJSX (opts) { opts = opts || {}; return function transform (file) { if (file.type !== 'js') return; file.src = react.transform(file.src, opts); }; };
JavaScript
0
@@ -1,18 +1,4 @@ -'use strict';%0A %0Avar @@ -73,18 +73,16 @@ opts) %7B%0A - opts = @@ -95,18 +95,16 @@ %7C%7C %7B%7D;%0A%0A - return @@ -122,16 +122,19 @@ ransform +JSX (file) @@ -143,16 +143,34 @@ - if ( +file.type !== 'js' %7C%7C file @@ -182,16 +182,17 @@ !== 'js +x ') retur @@ -194...
01cd814893cd74e325bc3ce6a4c696c04b533385
fix require name
index.js
index.js
var libob = require('libobject'); var transform = require('./lib/transform'); var translate = require('./lib/translate'); var logic = require('./lib/logic'); var mask = require('./lib/mask'); var json = require('./lib/json'); var slice = require('./lib/slicer'); //var join = require('./lib/join'); exports.deep = funct...
JavaScript
0.000041
@@ -251,17 +251,16 @@ ib/slice -r ');%0A//va
d6225ac5bb1d084838bcd471bb71bef1f9e3a61f
return key if translations has not been found
lib/index.js
lib/index.js
"use strict"; var t = require('fuchs-template'); var variableRegex = /\{[\w-]+?\}/g; module.exports = function translations(locale, isDevelopment) { if (typeof locale !== 'object') throw new Error('The locale has to be an object.'); var invalidLocale = Object.keys(locale).some(function(key) { return typ...
JavaScript
0.000018
@@ -599,10 +599,11 @@ urn -'' +key ;%0A
86e2d09783ef65c5dfd202790f0839d622d4f9da
add process.env.CI
index.js
index.js
console.log("process.env.TRAVIS_JOB_NUMBER") console.log("value is: " + process.env.TRAVIS_JOB_NUMBER); console.log("type is: " + typeof process.env.TRAVIS_JOB_NUMBER); console.log("process.env.TRAVIS_TAG") console.log("value is: " + process.env.TRAVIS_TAG); console.log("type is: " + typeof process.env.TRAVIS_TAG); s...
JavaScript
0.000003
@@ -312,16 +312,141 @@ _TAG);%0A%0A +console.log(%22process.env.CI%22)%0Aconsole.log(%22value is: %22 + process.env.CI);%0Aconsole.log(%22type is: %22 + typeof process.env.CI);%0A%0A setTimeo
71cd4e3c1343f2954ae61cd6f5756e0a363177e6
Improve naming
index.js
index.js
/*! * Percent v1.1.1 (http://git.io/percentjs) * Licensed under the MIT license. */ 'use strict'; /* * Percent calculation */ exports.calc = function (value, total, decimal, sign) { var wrong = [NaN, Infinity, -Infinity]; // Avoid argument type problems if (typeof value !== 'number' || typeof total...
JavaScript
0.000808
@@ -189,21 +189,26 @@ %7B%0A var -wrong +badNumbers = %5BNaN, @@ -507,21 +507,26 @@ 0; i %3C -wrong +badNumbers .length; @@ -573,21 +573,26 @@ indexOf( -wrong +badNumbers %5Bi%5D) %3E - @@ -609,21 +609,26 @@ return -wrong +badNumbers %5Bi%5D;%0A
b092de7baa8719861874774e3dc9165b5dfef948
Remove isInBounds function
index.js
index.js
function start() { svg = document.getElementsByTagName("svg")[0]; sprite = svg.getElementById("sprite"); score_box = svg.getElementById("score"); highscore = 0; jump = false; jump_x = 2; var x = parseInt(sprite.getAttribute("cx").slice(0,-1)); var r1 = makeRect(-15, 5); var r2 = makeRect(-30, 5); var r3 = mak...
JavaScript
0.001642
@@ -1690,137 +1690,8 @@ %0A%7D%0A%0A -function isInBounds(x, velocity) %7B%0A%09if (0 %3C x + velocity && x + velocity %3C 100) %7B%0A%09%09return true;%0A%09%7D else %7B%0A%09%09return false;%0A%09%7D%0A%7D%0A%0A func @@ -2426,38 +2426,27 @@ ;%0A%09%09%7D%0A%09%09if ( -!isInBounds(x, +x + velocity)) @@ -2434,33 ...
9e94ff5fe1b5cdecbf3e99fd4a3277e45b9a31f8
tweak parseEnv
index.js
index.js
'use strict'; const childProcess = require('child_process'); const path = require('path'); const execa = require('execa'); const stripAnsi = require('strip-ansi'); const shell = process.env.SHELL || '/bin/sh'; const user = process.env.USER; const opts = {encoding: 'utf8'}; function clean(str) { return stripAnsi(str.t...
JavaScript
0.000001
@@ -1025,39 +1025,8 @@ ) %7B%0A -%09env = stripAnsi(env.trim());%0A%0A %09con @@ -1039,16 +1039,26 @@ hLine = +stripAnsi( env.trim @@ -1059,16 +1059,17 @@ v.trim() +) .split('
b501b908ded0ea0d26f85488b07e1b321fd03003
set user confirmed flag on access
server/auth/login.js
server/auth/login.js
import {HTTP} from "meteor/http"; import {getSessionInfo, isSingleSignOnEnabled} from "../sso-commons"; import bunyan from "bunyan"; import Elasticsearch from "bunyan-elasticsearch"; var esStream = new Elasticsearch({ indexPattern: "[meteor-auth-]YYYY.MM.DD", type: "logs", host: process.env.ELASTIC_SEARCH_...
JavaScript
0.000001
@@ -3640,32 +3640,71 @@ id%0A %7D +,%0A %22profile.confirmed%22: true %0A %7D%0A %7D
5f247e80c39bb42fc14bbedc3ccd0959f0ecf63d
Parse the url
lib/index.js
lib/index.js
var Http = require("http") , Ul = require("ul") ; var JsonRequest = module.exports = function (options, callback) { // Handle options as string if (typeof options === "string") { options = { url: options }; } // Merge options Ul.merge(options, { method: "GE...
JavaScript
1
@@ -43,16 +43,41 @@ e(%22ul%22)%0A + , Url = require(%22url%22)%0A ;%0A%0Avar @@ -282,87 +282,140 @@ -// Merge options%0A Ul.merge(options, %7B%0A +var parsed = Url.parse(options.url)%0A , defaults = Ul.clone(parsed)%0A ;%0A%0A defaults. method -: + = %22GET%22 +; %0A - , +d...
b9b03f47a54ea98ed7e7f1ac43cb3d18a4436cdc
Attach error pages
lib/index.js
lib/index.js
var BloggifyLib = module.exports = {}; var _cache = {}; BloggifyLib.clearCache = function (options) { if (options && options.root) { _cache.APP_ROOT = options.root; } else { options = { root: _cache.APP_ROOT }; } // Require config var Config = global.Config = ...
JavaScript
0.000001
@@ -1031,24 +1031,174 @@ in%22%0A %7D;%0A%0A + // Attach error pages%0A for (var err in Config.errorPages) %7B%0A Config.site.parsed.roots.pages%5B%22/%22 + err%5D = Config.errorPages%5Berr%5D;%0A %7D%0A%0A // Stati
7783cbff0b9f508f9252f3612413f0af2e2dd8ee
fix(build) specify extension
lib/index.js
lib/index.js
/* Copyright @ 2015 - Present, 8x8 Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
JavaScript
0.999998
@@ -619,11 +619,14 @@ /interop +.js ';%0A
6c1e1816197eb556342f66e866c2720ca2934ce3
Simplify module export
lib/index.js
lib/index.js
// Dependencies var LastChar = require("last-char"); /** * DoubleLast * Doubles the last letter. * * @name DoubleLast * @function * @param {String} input The input string. * @param {Array} letters An array of letters: if the last letter of the input * is not found in this list, it will *not* be doubled. * @re...
JavaScript
0
@@ -352,16 +352,34 @@ ng.%0A */%0A +%0Amodule.exports = function @@ -544,35 +544,6 @@ t;%0A%7D -%0A%0Amodule.exports = DoubleLast ;%0A