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
86675ca3fe3906388091d791bb01d9c3124b70b0
make ssl use port 6697 by default
index.js
index.js
/*jslint node: true*/ "use strict"; var Emitter = require('events').EventEmitter; var Parser = require('slate-irc-parser'); var net = require('net'); var tls = require('tls'); var replies = require('irc-replies'); var StreamReadable = require('stream').Readable; var StreamWritable = require('stream').Writable; var uti...
JavaScript
0
@@ -2229,16 +2229,61 @@ k.nick;%0A + port = network.ssl == true ? 6697 : 6667%0A ret. @@ -2318,20 +2318,20 @@ fined ? -6667 +port : netwo
aae356ca89837fe7c486b4a3406433fed3522602
remove time log of esm import
index.js
index.js
require = require("esm")(module/*, options*/); console.time('playing-content-services import'); module.exports = require('./src/index').default; module.exports.DocTypes = require('./src/constants').DocTypes; module.exports.entities = require('./src/entities').default; module.exports.hooks = require('./src/hooks'); modu...
JavaScript
0.000001
@@ -44,57 +44,8 @@ /);%0A -console.time('playing-content-services import');%0A modu @@ -321,56 +321,4 @@ lt;%0A -console.timeEnd('playing-content-services import');%0A
c77420cb0eff3c5fca2eb676f97d885f03aac8e7
Convert options.sources to an int and default it
index.js
index.js
"use strict"; var url = require("url"), util = require("util"); var lockingCache = require("locking-cache"); var enableCaching = function(uri, source, locker) { if (source._cached) { // already cached return source; } if (typeof(uri) === "string") { uri = url.parse(uri, true); } var make...
JavaScript
0.000001
@@ -1956,16 +1956,64 @@ e %7C%7C 10; +%0A options.sources = (options.sources %7C 0) %7C%7C 6; %0A%0A // d @@ -2443,21 +2443,16 @@ .sources - %7C%7C 6 ,%0A di
59bc547a9d919f338b8ce05ac5cf95a6ff8d5727
update comment
index.js
index.js
/** * Module dependencies * @private */ var os = require('os'); var sleep = require('sleep'); var cluster = require('cluster'); /** * Module exports * @public */ exports.line = line; exports.mid = mid; exports.wave = wave; exports.cliff = cliff; /** * Basic function for drawing * @param {number} busy busyT...
JavaScript
0
@@ -1412,16 +1412,55 @@ a cliff +%EF%BC%8C 7s is nearly a tick of OS X's monitor %0A * @pub
61635a156e33ed816e3aa3d6448c123d21f480b6
ADD released error
index.js
index.js
var _ = require('underscore'), ginga = require('ginga'), semaphore = require('./semaphore'), queue = require('./queue'), params = ginga.params; module.exports = function( db ){ var count = 0, mutual = {}; function Transaction(options){ this.db = db; this.options = optio...
JavaScript
0
@@ -594,16 +594,112 @@ next)%7B%0A + if(this._released)%0A return next(new Error('Transaction has already been released.'));%0A%0A //op @@ -1102,16 +1102,17 @@ ();%0A %7D%0A +%0A functi @@ -1162,114 +1162,8 @@ s;%0A%0A - if(this._released)%0A return next(new Error('Transaction has already b...
b98cf31626376c431d448ea137fa4cc268902a87
Refactor pool check and return.
index.js
index.js
/** * Creates and manages the Mongo connection pool * * @type {exports} */ var Promise = require('es6-promise').Promise; var mongo = require('mongodb'); var MongoClient = mongo.MongoClient; var _ = require('underscore'); var connections = []; module.exports = function() { return { /** * Gets a connec...
JavaScript
0
@@ -1142,27 +1142,26 @@ If -no +a connec -i t +i on pool has @@ -1160,85 +1160,67 @@ ool -has been instantiated, instantiate it, else return a connection from the +was found, resolve the promise with it.%0A if ( pool +) %7B %0A @@ -1228,77 +1228,157 @@ -if(_.isUndefined(pool)) %7B%0A%0A ...
2c42607fb524c4216e4b65d90e300be8fc2f4fa8
fix a bug in tcurl as thrift
index.js
index.js
#!/usr/bin/env node // Copyright (c) 2015 Uber Technologies, Inc. // // 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 restriction, including without limitation the rights // to use...
JavaScript
0.000007
@@ -4925,32 +4925,127 @@ (opts.thrift) %7B%0A + if (opts.body) %7B%0A opts.body = JSON.parse(opts.body);%0A %7D%0A%0A send
492819f0341bb9cb6225117bd2cf64d6d30d4db3
fix index.js
index.js
index.js
/*! * eslint-config-marm <https://github.com/akileez/eslint-config-marm> * * Copyright (c) 2015 Keith Williams. * Licensed under the ISC license. */ module.exports = require('./rc/.eslintrc')
JavaScript
0
@@ -183,16 +183,15 @@ /rc/ -. eslintrc ')%0A @@ -187,11 +187,16 @@ eslintrc +.json ')%0A
3bba8912472c38d66abf029fe5c6555f13a7ec63
Fix AsyncStorage usage
index.js
index.js
// @flow import { AsyncStorage, NativeModules, PermissionsAndroid, Platform, // $FlowFixMe } from "react-native"; const { RNPermissions } = NativeModules; export const ANDROID_PERMISSIONS = { ...PermissionsAndroid.PERMISSIONS, // Dangerous permissions not included in PermissionsAndroid (which might be ...
JavaScript
0.000022
@@ -3068,14 +3068,30 @@ ey, +JSON.stringify( dedup) +) ;%0A%7D%0A
7565c7130320f231de3f935dbbeb8c1d15f07481
Clean up shitcode
index.js
index.js
const Promise = require('bluebird'); const request = require('request-promise'); const _fs = require('fs'); const fs = { readFile: Promise.promisify(_fs.readFile), writeFile: Promise.promisify(_fs.writeFile), } const querystring = require('querystring'); async function cachedGet(url) { let filename = 'pag...
JavaScript
0.000046
@@ -1674,17 +1674,16 @@ lt.push( -%7B %0A @@ -1691,207 +1691,56 @@ -title: events%5Bi%5D.title,%0A place: events%5Bi%5D.place,%0A place_url: events%5Bi%5D.place_url,%0A latitude: coords%5Bi%5D.latitude,%0A longitude: coords%5Bi%5D.longitude,%0A %7D +Obje...
122aa7833770ed7860b0c0e44376abb2288bffc5
Update index.js
index.js
index.js
var Service, Characteristic; var JSONRequest = require("jsonrequest"); module.exports = function (homebridge) { Service = homebridge.hap.Service; Characteristic = homebridge.hap.Characteristic; homebridge.registerAccessory("homebridge-domotiga", "Domotiga", Domotiga); } //Get data from config file funct...
JavaScript
0.000001
@@ -493,30 +493,10 @@ vice - %7C%7C %22TempHygroMeter%22 ,%0A + @@ -631,13 +631,8 @@ dity - %7C%7C 2 ,%0A @@ -674,13 +674,8 @@ tery - %7C%7C 4 ,%0A @@ -753,16 +753,16 @@ %7C%7C NA,%0A + @@ -794,16 +794,8 @@ tery - %7C%7C 3000 %0A
1766778782cfef4f78f5861a49be4b7a475c8c80
Add support for empty entries and default dest
index.js
index.js
/* Copyright 2015, Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms. */ var browserify = require('browserify'); var through = require('through2'); var shasum = require('shasum'); var path = require('path'); var fs = require('fs'); var async = require('async'); var...
JavaScript
0
@@ -1588,16 +1588,17 @@ tries = +( bundle.e @@ -1603,16 +1603,21 @@ .entries +%7C%7C%5B%5D) .map(fun @@ -1943,16 +1943,17 @@ ion.id, +( bundle.d @@ -1951,24 +1951,45 @@ (bundle.dest + %7C%7C bundleName+'.js') );%0A retur
d4f7fbf7475f9aad64151e2f7dc71b559b2a5323
Fix power on function
index.js
index.js
const { Samsung, KEYS, APPS } = require('samsung-tv-control') let config = require('config'); let btoa = require('btoa'); let wakeOnLan = require('node-wol'); let eventsource = require('eventsource'); let directv = require('directv-remote'); let didyoumean = require('didyoumean'); var http if (config.useHttps) { cons...
JavaScript
0.00001
@@ -1100,21 +1100,20 @@ tv. -power +turn On();%0A
95a83b78f18203df8f8f081cb829b5af46e7f881
Support node-fetch v2
index.js
index.js
var denodeify = require('es6-denodeify')(Promise) var tough = require('tough-cookie') module.exports = function fetchCookieDecorator (fetch, jar) { fetch = fetch || window.fetch jar = jar || new tough.CookieJar() var getCookieString = denodeify(jar.getCookieString.bind(jar)) var setCookie = denodeify(jar.setC...
JavaScript
0
@@ -656,43 +656,284 @@ kies - = res.headers.getAll('set-cookie') +%0A%0A if (res.headers.getAll) %7B%0A // node-fetch v1%0A cookies = res.headers.getAll('set-cookie')%0A %7D else %7B%0A // node-fetch v2%0A var cookie = res.headers.get('set-cookie')%0A cookies ...
ba112e1e27a489eb45ab6ab792806e04f0273f98
Fix environment variable name.
index.js
index.js
"use strict"; var dynamo = require('dynamo'), when = require('when'), sequence = require('sequence'); // Models have many tables. // Girths are short hand for throughput. function Model(tableData){ this.connected = false; this.girths = {}; this.tables = {}; this.tableData = tableData; } Model...
JavaScript
0.000027
@@ -7,16 +7,17 @@ trict%22;%0A +%0A var dyna @@ -33,16 +33,16 @@ ire( -' +%22 dynamo -' +%22 ),%0A @@ -63,14 +63,14 @@ ire( -' +%22 when -' +%22 ),%0A @@ -95,17 +95,17 @@ ire( -' +%22 sequence ');%0A @@ -100,17 +100,17 @@ sequence -' +%22 );%0A%0A%0A// @@ -450,19 +450,16 @@ env. -ENVIRONMENT +NODE_ENV ...
16e4b2c021b9baabc80fc7ba49b59ded22f9cb6c
Update 2.0.6
index.js
index.js
const discord = require('discord.js'), client = new discord.Client(); const token = "Mjk4NTQwODI1ODc1NTc4ODgw.C9OT6g.XXmUCpCGxsJMTKc2tqjH8IiCSaE"; const prefix = "?"; //embed_object = discord.Embed(color=my_color, title="my title") client.on('ready', () =>{ console.log('Patiente un peu...') console.lo...
JavaScript
0
@@ -4651,16 +4651,22 @@ %0A );%0D%0A + %7D%0D%0A %0D%0Aclient
c2f32799542bee3a7ac96e0831d43057fbe58027
remove log
index.js
index.js
'use strict'; var fs = require('fs'); var _ = require('lodash'); var Promise = require('bluebird'); var Waterline = require('waterline'); var pluralize = require('pluralize'); /** * A mapping of Postgres type to Waterline type. A reverse of * https://github.com/balderdashy/sails-postgresql/blob/master/lib/utils.js#...
JavaScript
0.000001
@@ -4037,32 +4037,8 @@ n);%0A - console.log(model);%0A
23354b119272c6cc32427f02f406cd9239119679
add a global description
index.js
index.js
'use strict'; exports.topic = { name: 'kafka', description: '' }; exports.commands = [ require('./commands/create_topic.js'), require('./commands/configure_topic.js'), require('./commands/delete_topic.js'), require('./commands/fail.js'), require('./commands/info.js'), require('./commands/list_topics.js...
JavaScript
0.999988
@@ -58,16 +58,44 @@ ption: ' +manage heroku kafka clusters '%0A%7D;%0A%0Aex
ff4da2d928f61958a804def2a7eae553b5570527
Update index.js
index.js
index.js
module.exports = filterObjectOnSchema; function filterObjectOnSchema(schema, doc){ var results; //console.log("DOC: ", JSON.stringify(doc, null, 2)); //console.log("SCH: ", JSON.stringify(schema, null, 2)); if (schema.type == 'object') { results = {}; // holds this levels items // pr...
JavaScript
0
@@ -991,32 +991,40 @@ if (doc%5Bkey%5D + != null ) results%5Bkey%5D =
d23c39afbf8ab9a72b0604f27ffec810ea3fe823
Add some error handling
index.js
index.js
'use strict'; const config = require('./config'); const login = require('facebook-chat-api'); const twilio = require('twilio')(config.twilio.accountSid, config.twilio.authToken); const Person = require('./models/person'); const Messages = require('./models/messages'); const Threads = require('./models/threads'); lo...
JavaScript
0.00001
@@ -1122,32 +1122,50 @@ if (err + %7C%7C person == null ) return HandleE @@ -3169,32 +3169,98 @@ ndleError(err);%0A + var name = person == null ? sms.from : person.name;%0A ap @@ -3273,23 +3273,16 @@ Message( -person. name + ' @@ -3305,17 +3305,17 @@ ody + ' -( +%5B ' + sms1...
7e49ec33e264fe93b70807e690aa36b5e9c28035
fix to expand multiple files
index.js
index.js
var fs = require('fs'); var path = require('path'); var parcelMap = require('parcel-map'); var match = require('minimatch'); var shasum = require('shasum'); var mkdirp = require('mkdirp'); var through2 = require('through2'); var path = require('path'); var fs = require('fs'); var EventEmitter = require('events').Event...
JavaScript
0.000001
@@ -2657,32 +2657,54 @@ %0A + if (!pkg.files%5Bprop%5D) pkg.files%5Bprop%5D
2f747d79f542577e5cf60d18b9fbf8eea82070da
Revert "Revert "resolve ala node_module resolution algorithim (NPM v3 support);""
index.js
index.js
'use strict'; module.exports = { name: 'Ember CLI ic-ajax', init: function(name) { this.treePaths['vendor'] = 'node_modules'; }, included: function(app) { var options = this.app.options.icAjaxOptions || {enabled: true}; if (options.enabled) { this.app.import('vendor/ic-ajax/dist/named-amd/...
JavaScript
0
@@ -117,22 +117,74 @@ %5D = -'node_modules' +require.resolve('ic-ajax').replace('ic-ajax/dist/cjs/main.js', '') ;%0A
eef93e2c0cb0e17ca7a6821410ba16bca9de43fb
fix chainability when not enabled
index.js
index.js
'use strict'; var chalk = require('chalk'); var cliCursor = require('cli-cursor'); var cliSpinners = require('cli-spinners'); var objectAssign = require('object-assign'); function Ora(options) { if (!(this instanceof Ora)) { return new Ora(options); } if (typeof options === 'string') { options = { text: opt...
JavaScript
0.000001
@@ -1353,24 +1353,29 @@ ) %7B%0A%09%09return + this ;%0A%09%7D%0A%0A%09this. @@ -1613,32 +1613,37 @@ s.id) %7B%0A%09%09return + this ;%0A%09%7D%0A%0A%09cliCursor @@ -1814,16 +1814,21 @@ %09%09return + this ;%0A%09%7D%0A%0A%09c
7a75a495a98ea7cec36e0779cc13b113faf548bb
Fix FunctionDeclaration and ObjectExpression nodes wrapping
index.js
index.js
'use strict'; module.exports = function(options){ var registratorName = options.registratorName; return function (_ref) { var Plugin = _ref.Plugin; var t = _ref.types; function getLocation(file, node){ return node.loc ? [ file.opts.filena...
JavaScript
0.000001
@@ -3123,25 +3123,19 @@ -this.insertAfter( +var node = wrap @@ -3166,16 +3166,98 @@ id.name) +;%0A node.skip_ = true;%0A this.insertAfter(node );%0A @@ -3868,27 +3868,313 @@ -ObjectExpression: %7B +shouldSkip: function(path)%7B%0A return path...
3579da3ad3ba567aef5a1399dcf89e9118b99464
use the host header instead of origin (as origin is sometimes missing)
index.js
index.js
var httpProxy = require('http-proxy'); var http = require('http'); var port = 8000; var hosts = require('./config.json'); var proxies = {} Object.keys(hosts).forEach(function(host){ proxies[host] = new httpProxy.createProxyServer(hosts[host]); proxies[host].on('error',errorHandler); }); function errorHandler(err...
JavaScript
0
@@ -191,16 +191,25 @@ ies%5Bhost ++%22:%22+port %5D = new @@ -264,16 +264,25 @@ ies%5Bhost ++%22:%22+port %5D.on('er @@ -521,26 +521,22 @@ req)%7B%0A -var host = +return req.hea @@ -544,74 +544,12 @@ ers. -origin.match(/%5C/%5C/(.*)$/);%0A return host !== null ? host%5B1%5D : null +host ;%0A%7D%0A @@ -676,...
5b2307fd8f921ada35261672575bf91f9f736527
fix rename
index.js
index.js
var fs = require('fs') var typeforce = require('typeforce') var Q = require('q') var fs = require('fs') var walk = require('walk') var rimraf = Q.nfbind(require('rimraf')) var mkdirp = require('mkdirp') var path = require('path') var readFile = Q.nfbind(fs.readFile) var writeFile = Q.nfbind(fs.writeFile) var unlink = ...
JavaScript
0.000012
@@ -535,20 +535,23 @@ options. -path +storage %0A this.
90c37377231038c9a7221bd94327f0a003adb290
Fix watch process exit when file deleted
index.js
index.js
var path = require('path'); var gulp = require('gulp'); var concat = require('gulp-concat'); var babel = require('gulp-babel'); var cached = require('gulp-cached'); var remember = require('gulp-remember'); var order = require('gulp-order'); var streamqueue = require('streamqueue'); var file = require('gulp-file'); var ...
JavaScript
0.000001
@@ -2221,28 +2221,16 @@ ches -%5B' +. modules -' + prefix%5D %5Beve @@ -2278,17 +2278,8 @@ les' - + prefix , ev
43d7af3381b4de090e2c4d7858e9b354355e142f
Fix whitespace
index.js
index.js
var http = require('http'); var util = require('util'); var child = require('child_process'); var fs = require('fs'); var path = require('path'); var mime = require('mime'); var chokidar = require('chokidar'); var rdbg = require('rdbg'); function serve(options, callback) { var server = http.createServer(function(req...
JavaScript
0.999999
@@ -580,17 +580,16 @@ src=%22' + - key + ' @@ -599,24 +599,24 @@ /script%3E');%0A + %7D%0A%0A @@ -1184,19 +1184,17 @@ %7D%0A %7D);%0A - %0A + server @@ -1541,19 +1541,17 @@ e%0A %7D);%0A - %0A + if (ca @@ -1601,19 +1601,17 @@ k);%0A %7D%0A - %0A + return @@ -2335,23 +2335,17 @@ ,...
306b8b4d75523d4c68e198a53f0dff9f43a2c3c3
set key to resolved key, whoops
index.js
index.js
var assert = require('assert') var fs = require('fs') var path = require('path') var xtend = require('xtend') var hyperdrive = require('hyperdrive') var resolveDatLink = require('dat-link-resolve') var debug = require('debug')('dat-node') var datStore = require('./lib/storage') var Dat = require('./dat') module.export...
JavaScript
0.000001
@@ -3407,17 +3407,25 @@ n (err, -k +resolvedK ey) %7B%0A @@ -3452,16 +3452,40 @@ cb(err)%0A + key = resolvedKey%0A cr
94578704cc3d3b24159043a82a6ed6ee76eb4025
Add DELETE end-point
index.js
index.js
'use strict'; const config = require('./config'); const utils = require('./utils'); require('marko/node-require').install(); const Hapi = require('hapi'); const Inert = require('inert'); const Path = require('path'); const MongoDB = require('mongodb'); const MongoClient = MongoDB.MongoClient; const moment = require(...
JavaScript
0.000047
@@ -290,16 +290,51 @@ Client;%0A +const ObjectId = MongoDB.ObjectID;%0A const mo @@ -2072,32 +2072,595 @@ %7D%0A%0A %7D%0A%7D);%0A%0A +server.route(%7B%0A method: 'DELETE',%0A path: '/log/%7Bid%7D',%0A handler: (req, reply) =%3E %7B%0A%0A MongoClient.connect(config.dbUrl, (err, db) =%3E %7B%0A if (er...
e94b88f888c0b9bbe910a99b4e5c3a49b0ab4e21
Correct type annotations
index.js
index.js
//@flow import { NativeModules, findNodeHandle } from "react-native"; const { RNViewShot } = NativeModules; export function takeSnapshot( view: number | ReactElement<any>, options ?: { width ?: number; height ?: number; format ?: "png" | "jpg" | "jpeg" | "webm"; quality ?: number; base64 ?: b...
JavaScript
0.000061
@@ -306,46 +306,49 @@ -base64 ?: bool;%0A filename ?: string +result: ?: %22file%22 %7C %22base64%22 %7C %22data-uri%22 ;%0A
eebe20e0603e2c6a542b00316f1661741fdf1124
use Buffer.from when avail
index.js
index.js
module.exports = toBuffer function toBuffer (buf, enc) { if (Buffer.isBuffer(buf)) return buf if (typeof buf === 'string') return new Buffer(buf, enc) if (Array.isArray(buf)) return new Buffer(buf) throw new Error('Input should be a buffer or a string') }
JavaScript
0
@@ -20,16 +20,174 @@ Buffer%0A%0A +var makeBuffer = Buffer.from && Buffer.from !== Uint8Array.from ? Buffer.from : bufferFrom%0A%0Afunction bufferFrom (buf, enc) %7B%0A return new Buffer(buf, enc)%0A%7D%0A%0A function @@ -278,36 +278,36 @@ string') return -new +make Buffer(buf, enc) @@ -332,36 +332,36 @@ ay(buf...
080ba21b5b8d47a6804312bd24e1fbccc0b52456
Remove incorrect addon init
index.js
index.js
/* eslint-env node */ 'use strict'; const VersionChecker = require('ember-cli-version-checker'); const satisfies = require('semver').satisfies; module.exports = { name: 'ember-compatibility-helpers', init(parent, project) { this._super.init.apply(this, arguments); // Create a root level version checker ...
JavaScript
0
@@ -206,26 +206,18 @@ in -it(parent, project +cluded(app ) %7B%0A @@ -234,18 +234,22 @@ super.in -it +cluded .apply(t @@ -262,24 +262,57 @@ rguments);%0A%0A + const parent = this.parent;%0A%0A // Creat @@ -429,39 +429,11 @@ ker( -%7B project, root: project.root %7D +app ).fo @@ -755,16 +755,20 @@ %7B%...
a3e885ab58ff60a4e9c262f5cfc02792f7bec9d6
fix eventemitter leak messages
index.js
index.js
var ess = require('event-source-stream') var nets = require('nets') var pump = require('pump') var through = require('through2') var noop = function () {} module.exports = function (app, urls) { if (!app) throw new Error('app name required') if (!urls || !urls.length) throw new Error('signalhub url(s) required') ...
JavaScript
0
@@ -740,16 +740,43 @@ .obj()%0A%0A + all.setMaxListeners(0)%0A stre
0ca6245c71fde2678fd1056b9021b4a314f4e661
remove all the 'wrap' exports that were never used
index.js
index.js
/* * index.js * * David Janes * IOTDB.org * 2015-02-28 * * Copyright [2013-2015] [David P. Janes] * * 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.apach...
JavaScript
0.000017
@@ -2100,148 +2100,4 @@ %0A%5D;%0A -%0Aexports.iotdb = require(%22iotdb%22);%0Aexports.wrap = function(name, initd) %7B%0A return exports.iotdb.make_wrap(name, exports.bindings, initd);%0A%7D;%0A
cb0ebc4c7ca492ed3c1144777643468ef0db054e
Change check to use endsWith for supporting loud comments
index.js
index.js
import postcss from 'postcss'; const postcssFlexibility = postcss.plugin('postcss-flexibility', () => css => { css.walkRules(rule => { const isDisabled = rule.some(({prop, text}) => prop === '-js-display' || text === 'flexibility-disable' || text === '! flexibility-disable' ); if (!isDisabled) { rule.wal...
JavaScript
0
@@ -173,16 +173,21 @@ op, text + = '' %7D) =%3E%0A%09%09 @@ -221,50 +221,19 @@ text - === 'flexibility-disable' %7C%7C text === '! +.endsWith(' flex @@ -248,16 +248,17 @@ disable' +) %0A%09%09);%0A%0A%09
cd92674d959dc4721a1914b63aa702dbe9254812
simplify resolve
index.js
index.js
/*! * parse-git-config <https://github.com/jonschlinkert/parse-git-config> * * Copyright (c) 2015 Jon Schlinkert. * Licensed under the MIT license. */ 'use strict'; var fs = require('fs'); var path = require('path'); var exists = require('fs-exists-sync'); var extend = require('extend-shallow'); var configPath =...
JavaScript
0.998512
@@ -2273,106 +2273,8 @@ ) %7B%0A - var isGlobal = false;%0A if (options === 'global') %7B%0A isGlobal = true;%0A options = %7B%7D;%0A %7D%0A%0A if @@ -2322,20 +2322,20 @@ ons = %7B -path +type : option @@ -2347,181 +2347,46 @@ %7D%0A -%0A // if %22global%22 isn't explicitly defined, let%0A // %60gi...
73dae24e3dfe9a79ea132f8aa4d47c6282fc44ef
use displayFolder in #19 as well
index.js
index.js
var fuse = require('fuse-bindings'); var fs = require('fs'); var mkdirp = require('mkdirp'); var torrents = require('torrent-stream'); var path = require('path'); var ENOENT = -2; var EPERM = -1; var EINVAL = -22; module.exports = function(source, mnt, isLazy) { if (!mnt) mnt = '.'; var handlers = {}; var engine ...
JavaScript
0
@@ -1332,32 +1332,65 @@ %09%7D, null);%0A%09%7D;%0A%0A + handlers.displayFolder = true%0A%0A %09handlers.getatt
f30f7e4f0f35cf9c722b7c9840d925002cb32503
fix subject bug
index.js
index.js
/* jshint esversion: 6, node: true */ const mailgun = require('mailgun.js'); class Mailer { constructor() { this.client = "uninitialized"; this.domain = ""; this.sender = "noreply@example.com"; this.username = "api"; this.body = undefined ; this.subject = undefined; } // construct em...
JavaScript
0.000001
@@ -278,25 +278,18 @@ bject = -undefined +%22%22 ;%0A %7D%0A @@ -2337,16 +2337,66 @@ body;%0A%0A + data.subject = data.subject %7C%7C this.subject;%0A%0A retu
db25ee36ae97dc83b3dfcffee4cb79cd0482b614
use strict
index.js
index.js
var through = require('through2'); var PluginError = require('gulp-util').PluginError; var flexSvg = require('flex-svg'); // Consts const PLUGIN_NAME = 'gulp-flex-svg'; // Plugin level function (dealing with files) module.exports = function gulpFlexSvg() { // Creating a stream through which each file will pass ...
JavaScript
0.001538
@@ -1,12 +1,27 @@ +'use strict';%0A%0A var through
37e937329474882c5eafef748d60404abf88a249
handle React deprecation
index.js
index.js
import React, { PropTypes, Component } from 'react'; import { requireNativeComponent, ViewPropTypes, UIManager, findNodeHandle, DeviceEventEmitter } from 'react-native'; class SketchView extends Component { constructor(props) { super(props); this.onChange = this.onChange.bind(this); this.subsc...
JavaScript
0
@@ -13,19 +13,8 @@ t, %7B - PropTypes, Com @@ -36,16 +36,56 @@ react';%0A +import %7B PropTypes %7D from 'prop-types';%0A import %7B
18fd5daffaad9b840375597b6e69e8912c7d016a
Upgrade Reflect.js Version
index.js
index.js
/* jshint node: true */ 'use strict'; const REFLECT_JS_VERSION = '0.1.62', REFLECT_JAVASCRIPT = 'https://cdn.reflect.io/' + REFLECT_JS_VERSION +'/reflect.js', DEFAULT_CSS_SOURCE = 'https://cdn.reflect.io/' + REFLECT_JS_VERSION + '/reflect.css'; const getHead = function(config) { var cssSource; if (co...
JavaScript
0
@@ -69,9 +69,9 @@ .1.6 -2 +3 ',%0A
b1c0662e9ef6ce68771b9ecd8d4d71a3662cb9a3
add support for ES6
index.js
index.js
var cp = require('child_process') var findRoot = require('find-root') var glob = require('glob') var Minimatch = require('minimatch').Minimatch var path = require('path') var split = require('split') var JSHINT = path.join(__dirname, 'node_modules', '.bin', 'jshint') var JSHINTRC = path.join(__dirname, 'rc', '.jshintr...
JavaScript
0
@@ -1795,16 +1795,28 @@ Reporter +, '--esnext' %5D%0A%0A i
7db7bc6edf65512764f75070d903a3e5592c493d
Add fail on missing flag.
index.js
index.js
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ var ConstDependency = require("webpack/lib/dependencies/ConstDependency"); var NullFactory = require("webpack/lib/NullFactory"); var MissingLocalizationError = require("./MissingLocalizationError"); function I18nPlugin(...
JavaScript
0
@@ -339,20 +339,35 @@ tionName +, failOnMissing ) %7B%0A - %09this.lo @@ -444,16 +444,62 @@ %7C %22__%22;%0A +%09this.failOnMissing = failOnMissing %7C%7C false;%0A %7D%0Amodule @@ -572,16 +572,16 @@ iler) %7B%0A - %09var loc @@ -609,16 +609,54 @@ lization +,%0A%09%09failOnMissing = this.failOnMissing ;%0A%09c...
876df4bc5700b19df1eda0c1f744df0869e48ac0
remove spa and yarn options
index.js
index.js
#!/usr/bin/env node const {join} = require('path'); const {spawnSync} = require('child_process'); const program = require('commander'); const packageInfo = require('./package.json'); /** * GENERATE NEW PROJECT * * @param {string} name - name of the project * @param {Object} options - commander options object * @r...
JavaScript
0
@@ -454,92 +454,8 @@ %5D; -%0A if (options.spa) args.push('--spa');%0A if (options.yarn) args.push('--yarn'); %0A%0A @@ -1417,111 +1417,8 @@ t')%0A - .option('-s, --spa', 'Create a new single page application')%0A .option('-y, --yarn', 'Use Yarn')%0A
431b9d8c071fb37b8af8ea9b9cc477e99af045ef
Make `distDir` configurable
index.js
index.js
/* jshint node: true */ 'use strict'; var BasePlugin = require('ember-cli-deploy-plugin'); var Promise = require('ember-cli/lib/ext/promise'); var fs = require('fs-extra'); var path = require('path'); var move = Promise.denodeify(fs.move); var targz = require('tar.gz'); module.exports = { ...
JavaScript
0
@@ -573,16 +573,128 @@ ild.tar' +,%0A distDir: function(context) %7B%0A return context.distDir;%0A %7D,%0A packedDirName: false %0A %7D @@ -894,33 +894,47 @@ distDir -= context. + = this.readConfig(' distDir +') ;%0A%0A @@ -1968,39 +1968,32 @@ stDir: function( -context ...
26336bf0d6693843a43f9a553c735ac477ab5572
remove the user-env-compile experiment
index.js
index.js
/** * Module dependencies */ var chain = require('slide').chain; var last = chain.last; var Heroku = require('heroku-client'); var spawn = require('child_process').spawn; var superagent = require('superagent'); /** * Create a GitHub hook * * @param {Object} config * @return {Function} */ module.exports = func...
JavaScript
0.000008
@@ -1416,74 +1416,8 @@ g%5D,%0A - %5Bapi, 'enableFeature', appname, 'user-env-compile', log%5D,%0A @@ -4515,16 +4515,22 @@ ' + data +, true );%0A %7D);
9d2d86c347c60c15900bf041deb2333b5ed54013
Remove failed file read error output
index.js
index.js
'use strict'; const {globalShortcut, ipcMain, dialog} = require('electron'); const menubar = require('menubar'); const Stopwatch = require('timer-stopwatch'); const Hrt = require('human-readable-time'); const fs = require('fs'); const path = require('path'); const AutoLaunch = require('auto-launch'); let timeFormat =...
JavaScript
0
@@ -3376,28 +3376,8 @@ ) %7B%0A -%09%09console.log(err);%0A %09%09co
2674d09c6f0ecc09e4d631bd37b6f750dce78a9c
move metrics endpoint to bootApp context
index.js
index.js
import "moment-timezone" import Bluebird from "bluebird" import xapp from "artsy-xapp" import compression from "compression" import express from "express" import expressMetrics from "express-node-metrics" import forceSSL from "express-force-ssl" import bodyParser from "body-parser" import { info, error } from "./src/li...
JavaScript
0.000001
@@ -955,129 +955,8 @@ ))%0A%0A -if (enableMetrics) %7B%0A app.get('/metrics', (req, res) =%3E %7B%0A res.send(expressMetrics.metrics.processMetrics())%0A %7D)%0A%7D%0A%0A xapp @@ -1474,16 +1474,147 @@ )%0A %7D)%0A%0A + if (enableMetrics) %7B%0A app.get('/metrics', (req, res) =%3E %7B%0A res.send(expre...
a6fd4abdb8144eedddae2f557b80f38a7f1a5457
Fix cheerio element, pathing
index.js
index.js
#!/usr/bin/env node 'use strict'; var request = require('request'); var cheerio = require('cheerio'); var Bottleneck = require('bottleneck'); var mkdirp = require('mkdirp'); var url = require('url'); var fs = require('fs'); var hostq = new Bottleneck(1, 10000); var scope = 'http://www.shiftylook.com/comics/'; var o...
JavaScript
0
@@ -217,16 +217,44 @@ e('fs'); +%0Avar path = require('path'); %0A%0Avar ho @@ -588,16 +588,25 @@ urn +path.join( outdir - + +, fqu @@ -634,16 +634,17 @@ /%5C//,'') +) ;%0A%7D%0A%0Afun @@ -681,16 +681,26 @@ return +path.join( savedFil @@ -711,21 +711,19 @@ e(fqurl) - + +, ' -/ index.ht @@ -725,16 +725,...
99afd84d086de2f5fa3f80217ec1bcdb3f57b695
update function to leave passed options unmodified
index.js
index.js
var fs = require('fs'); var Promise = require('bluebird'); module.exports = function(knex, path, tableName, mapTo, options) { return new Promise(function(resolve, reject) { if( typeof path === 'undefined' || tableName === 'undefined' || mapTo === 'undefined' ) { reject('path, tableNam...
JavaScript
0
@@ -400,24 +400,42 @@ fined' ? + Object.assign(%7B%7D, options : %7B%7D;%0A @@ -426,16 +426,17 @@ options +) : %7B%7D;%0A @@ -1623,32 +1623,33 @@ key === null %7C%7C +! cols%5Bindex%5D === @@ -1647,44 +1647,8 @@ dex%5D - === null %7C%7C cols%5Bindex%5D.length == 0 ) %7B%0A
b729cec56ef83f4db1cde7c2da353d53052a5ec3
Add some code that writes out geojson.
index.js
index.js
var fs = require('fs'), request = require('request'), url = require('url'), queue = require('queue-async'), qs = require('querystring'); var splitBbox = function(bbox) { var halfWidth = (bbox.xmax - bbox.xmin) / 2.0, halfHeight = (bbox.ymax - bbox.ymin) / 2.0; return [ {xmin: bb...
JavaScript
0
@@ -3620,32 +3620,59 @@ if ( +'subLayers' in metadata && metadata.subLaye @@ -3684,24 +3684,24 @@ ngth %3E 0) %7B%0A - @@ -4170,16 +4170,39 @@ k(error, + metadata.geometryType, feature @@ -4320,18 +4320,26 @@ p:// -www.sjcgis +gis.postfallsidaho .org @@ -4364,30 +4364,28 @@ ces/ -Pol...
d0f09d8f560675270d230ff09898ee99e5fb2d31
add include option
index.js
index.js
'use strict'; const qiniu = require('qiniu'); const path = require('path'); const ora = require('ora'); // Contants const REGEXP_HASH = /\[hash(?::(\d+))?\]/gi; // Uploading progress tip const tip = (uploaded, total) => { let percentage = Math.round(uploaded / total * 100); return `Uploading to Qiniu CDN: ${perc...
JavaScript
0.000001
@@ -2458,32 +2458,237 @@ return false;%0A%0A + // Check included files%0A if (%0A this.options.include &&%0A this.options.include instanceof RegExp%0A ) %7B%0A return this.options.include.test(fileName);%0A %7D%0A%0A return t
93f887ae6be1e6e5b84af310a0bb0d08641ea47c
Add `selector-no-empty` rule
index.js
index.js
'use strict'; module.exports = { rules: { 'at-rule-empty-line-before': ['always', { except: ['blockless-group', 'first-nested'], ignore: ['after-comment'] }], 'at-rule-name-case': 'lower', 'at-rule-no-unknown': [true, { ignoreAtRules: ['mixin', 'd...
JavaScript
0.000016
@@ -4187,16 +4187,51 @@ rs': 3,%0A + 'selector-no-empty': true,%0A
4864459a8301c942357fb45198afa6453ceddbfc
Update cipher algorithm name to aes-256-cbc
index.js
index.js
var crypto = require('crypto'); var scmp = require('scmp'); // Arbitrary min length, nothing should shorter than this: var MIN_KEY_LENGTH = 16; module.exports = function(opts) { if( typeof(opts) == 'string' ) { opts = { key: opts, hmac: true, debug: false }; } var key = opts.key; var...
JavaScript
0
@@ -1924,35 +1924,40 @@ ateCipheriv('aes +- 256 +-cbc ', cryptoKey, iv @@ -3981,19 +3981,24 @@ riv('aes +- 256 +-cbc ', crypt
eeee30e4b85ea3b6373efb2ec86ff3afd260d976
fix index.js
index.js
index.js
var production = process.env.NODE_ENV === 'production'; if (process.version.startsWith && process.version.startsWith('v6.')) return module.exports = require('./lib-node6' + (production ? '' : '-dev') + '/'); return module.exports = require('./lib-olderNode' + (production ? '' : '-dev') + '/'); // help autocomplete ...
JavaScript
0.000046
@@ -249,17 +249,18 @@ ib-older -N +-n ode' + (
ed05abb6749eb0356cd04995004120bda75d0408
update index on models
index.js
index.js
module.exports = { auth: { Account: require('./src/auth/account'), Profile: require('./src/auth/profile'), Role: require('./src/auth/role') }, inventory: { InventoryMovement: require('./src/inventory/inventory-movement'), Inventory: require('./src/inventory/inventory'...
JavaScript
0
@@ -6395,16 +6395,159 @@ equest') +,%0A PurchaseOrder: require('./src/purchasing/purchase-order'),%0A PurchaseOrderItem: require('./src/purchasing/purchase-order-item') %0A %7D,%0A
e77a955951dded70ababcef3997a497767afb781
change target option default value
index.js
index.js
require('img-load')(); function Plugin() { /** * Height which is used for comparing * @type {number} */ this._extremeHeight = undefined; /** * Window object * @type {jQuery} */ this.$window = undefined; /** * Elements to equalize * @type {jQuery} */ this.$target = undefined...
JavaScript
0.000002
@@ -484,11 +484,14 @@ ize- -col +target ',%0D%0A
7bf12851900701bbf25e666faf3eb79da784fe83
fix false property for content type
index.js
index.js
"use strict"; var path = require("path"); var fs = require("fs"); var util = require("util"); var gm = require("gm"); var validate = require("./lib/validate"); var createTargetDirectories = require("./lib/create-target-directories"); var getUniqueFilePath = require("./lib/get-unused-file-path"); var sum = function (a...
JavaScript
0.000054
@@ -863,16 +863,9 @@ ile. -contentT +t ype)
caa2ac9fdfba754211b83c0441875847758f5252
Refactor response status code
index.js
index.js
/** * Dependencie(s) */ const compile = require('./lib/compile') const parse = require('url').parse const join = require('path').join const morph = require('morph-stream') /** * Create web resource. * * @param {Object} obj * @return {Function} * @api public */ module.exports = (obj, relative = '') => { re...
JavaScript
0
@@ -348,24 +348,68 @@ , res) =%3E %7B%0A + const method = req.method.toLowerCase()%0A const ur @@ -502,32 +502,14 @@ has( -req. method -.toLowerCase() , ur @@ -592,25 +592,397 @@ ll, -err =%3E %7B%0A +reason =%3E status(res, reason))%0A )%0A %7D else %7B%0A return morph(status(res, %7...
dd892a12d630214eb048274cc0d78bfc836efa69
no trailing commas
index.js
index.js
/** * @author Erik Desjardins * See LICENSE file in root directory for full license. */ 'use strict'; var path = require('path'); var rollup = require('rollup'); function splitRequest(request) { var split = request.split('!'); if (split.length === 1) { return { loaders: '', resource: split[0] }; } el...
JavaScript
0.998805
@@ -2054,16 +2054,14 @@ %09%09%09%7D -, %0A%09%09%09%7D%5D -, %0A%09%09%7D
baf2019cd206b89e54f37a6ab8d54c4bbdf43d1c
switch to a more constant-like name
index.js
index.js
'use strict'; const loaderUtils = require('loader-utils'); const babel = require('babel-core'); const loader = function(source, inputSourceMap) { this.cacheable && this.cacheable(); const query = loaderUtils.parseQuery(this.query); const configKey = query.config || "elmAssetsLoader"; const options = this.opt...
JavaScript
0.00001
@@ -2160,24 +2160,29 @@ %0A%0Aconst -replaced +REPLACED_NODE = Symbo @@ -2364,24 +2364,29 @@ th.node%5B -replaced +REPLACED_NODE %5D) %7B%0A @@ -3567,16 +3567,21 @@ ent%5B -replaced +REPLACED_NODE %5D =
aff643a8602093f979ace5e1fe261ea44a29e8aa
Add files via upload
index.js
index.js
// Modules required to handle the request, and parse the resultant XML. const agent = require("superagent"); const request = require("request"); const parseString = require('xml2js').parseString; // Function to get the image XML from the Gelbooru server. exports.getImage = function (limit, tags, callback) { ...
JavaScript
0
@@ -1183,24 +1183,95 @@ else %7B%0D%0A +%0D%0A if (typeof(result.posts.post) != %22undefined%22) %7B%0D%0A @@ -1326,21 +1326,40 @@ om() * ( -limit +result.posts.post.length - 1)) + @@ -1363,19 +1363,18 @@ ) + 1;%0D%0A - +%0D%0A @@ -1378,27 +1378,16 @@ -%0...
50cc922d6d1587ee6617848ad6c9cf57ad32aa3e
Add license header
index.js
index.js
module.exports = require('./schema')
JavaScript
0
@@ -1,8 +1,606 @@ +/*%0A * Copyright 2015 Kyle E. Mitchell%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you%0A * may not use this file except in compliance with the License. You may%0A * obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unl...
1d8f3ac3b23ac1c63d2d4a49f879b8796ad53f44
Fix locale data
index.js
index.js
var Jed = require('jed'); var localeData = { frontend: { '': { domain: 'messages', 'lang': 'en', 'plural_forms': 'nplurals=2; plural=(n != 1);' } } }; var i18n = new Jed({locale_data: localeData}); i18n.moment = require('moment'); i18n.locale = 'en'; module.exports = i18n;
JavaScript
0.999527
@@ -45,16 +45,16 @@ %7B%0A -frontend +messages : %7B%0A @@ -99,14 +99,12 @@ -' lang -' : 'e @@ -113,17 +113,16 @@ ,%0A -' plural_f @@ -125,17 +125,16 @@ al_forms -' : 'nplur
f39b3fe2047ff526180f092f52f01e63d06ffc71
Correct spelling mistake (#4)
index.js
index.js
'use strict'; var util = require('util'); var Duplex = require('readable-stream').Duplex; function FirstChunkStream(options, cb) { var _this = this; var _state = { sent: false, chunks: [], size: 0 }; if (!(this instanceof FirstChunkStream)) { return new FirstChunkStream(options, cb); } options = option...
JavaScript
0.000136
@@ -1297,16 +1297,17 @@ s + emit +t ing an e
cb35727173efe4bf755c3322de484114bf73d0ab
Fix failOnError to actually fail
index.js
index.js
'use strict'; var slConfig = require('./lib/config'), groot = require('./lib/groot'), helpers = require('./lib/helpers'), slRules = require('./lib/rules'), glob = require('glob'), path = require('path'), fs = require('fs'); var sassLint = function (config) { config = require('./lib/config')...
JavaScript
0.000001
@@ -1910,16 +1910,109 @@ ts) %7B%0A +var result,%0A i;%0A%0A for (i = 0; i %3C results.length; i++) %7B%0A result = results%5Bi%5D;%0A%0A if (resu @@ -2009,25 +2009,24 @@ if (result -s .errorCount @@ -2028,24 +2028,26 @@ ount %3E 0) %7B%0A + throw ne @@ -2060,17 +2060,16 @@ r(result -s ....
c798370e223406517bce6ea2f72d5aa93a869b4c
Make no-underscore-dangle specific
index.js
index.js
module.exports = { parser: 'babel-eslint', parserOptions: { allowImportExportEverywhere: true }, env: { meteor: true, node: true, browser: true }, plugins: [ 'meteor' ], extends: [ 'airbnb', 'plugin:meteor/recommended' ], settings: { 'import/resolver': 'meteor' }, ...
JavaScript
0.000026
@@ -681,17 +681,53 @@ angle': -0 +%5B2, %7Ballow: %5B'_id', '_ensureIndex'%5D%7D%5D ,%0A 'o
98ded26910a319a9bfb7b9ce5cbece57254bbb31
Undo console log (was a demo of git)
index.js
index.js
$(document).ready(function() { $("#trcAge").slider({ id: "trcAge" }); $("#trcAge").on("slide", function(slideEvt) { console.log("Age range selected", slideEvt.value); $("#trcAgeSelection").text(slideEvt.value.join(" - ")); }); });
JavaScript
0
@@ -136,16 +136,19 @@ %0A + // console
d0c81a92e339df84a90d235388a7a72f56f0c852
Update index.js
index.js
index.js
"use strict"; var DEBUGNAME = __filename.slice(__dirname.length + 1, -3); //var debug = require("debug")(DEBUGNAME); var fs = require('fs'); const BASE_URL = "http://translate.google.com/translate_tts?"; var TextToMp3 = function () { } /** * * @type {{ie: string Cherset of text we are providing, * client...
JavaScript
0
@@ -801,20 +801,40 @@ += %22q=%22+ +encodeURIComponent( text +) +%22&%22;%0A @@ -4245,8 +4245,9 @@ ToMp3(); +%0A
f98cf6b1d47434f5956bcc0b926b3dd9fe308d07
prepare partials for res.render()
index.js
index.js
'use strict'; var Ractive = require('ractive'); var htmlExtReg = /\.html$/i; var path = require('path'); var fs = require('fs'); var zipObject = require('lodash-node/modern/arrays/zipObject'); var env = process.env.NODE_ENV || 'development'; var glob = require('glob'); var rewrite = require('rev-rewriter'); var assign ...
JavaScript
0
@@ -4823,16 +4823,17 @@ es%5B0%5D);%0A +%0A @@ -4973,32 +4973,33 @@ oluteViewPath);%0A +%0A @@ -5494,16 +5494,294 @@ irName;%0A + var _render = app.response.render;%0A app.response.render = function () %7B%0A this.locals.partials = assign(this.locals.partials %7C%7C %7B%7D,%0...
4f2f1d858e5378df113fd32c3b475ae2f71f39d4
use reduce, add error handling
index.js
index.js
'use strict'; var extract = require('esprima-extract-comments'); var minimist = require('minimist'); module.exports = function commendments(keywords, str) { var o = {missing: [], omit: []}; keywords = !Array.isArray(keywords) ? [keywords] : keywords var id = keywords.join('|'); var re = new RegExp('...
JavaScript
0
@@ -126,17 +126,17 @@ ion comm -e +a ndments( @@ -158,40 +158,285 @@ %7B%0A -var o = %7Bmissing: %5B%5D, omit: %5B%5D%7D; +if (!Array.isArray(keywords) && typeof keywords !== 'string') %7B%0A throw new TypeError('commandments expects a string or array as the first argument.');%0A %7D%0A%0A if (typeof str !== ...
92e35c489b206deead4693ccc3bc1bef327ed674
add cluster for better scalling
index.js
index.js
/** * Service entry point * use node index.js -p <port> -m <service name(s)> -e <environment> to start */ 'use strict'; // include header require('./header'); const fs = require('fs'); require('./server'); // load modules when necessary if (_CONF.services) { _CONF.services.map(function (item) { _v(`load ser...
JavaScript
0
@@ -117,16 +117,538 @@ rict';%0A%0A +const cluster = require('cluster');%0A%0Aglobal._isMaster = cluster.isMaster;%0Aglobal._isWorker = cluster.isWorker;%0A%0Aif (_isMaster) %7B%0A var numWorkers = require('os').cpus().length;%0A for (var i = 0; i %3C numWorkers; i++) %7B%0A cluster.fork();%0A %7D%0A%0A cluster...
6a81d1c5b958c578f150501b057eb9fe2e91b55f
Add pseudo p3p for IE
index.js
index.js
var express = require('express'); var fs = require('fs'); var svg2png = require('svg2png'); var uuid = require('node-uuid'); var app = express(); app.set('port', (process.env.PORT || 5000)); var TMP_PATH = __dirname + '/tmp/'; if (!fs.existsSync(TMP_PATH)) { fs.mkdirSync(TMP_PATH); } app.use(function(req, res,...
JavaScript
0.000001
@@ -752,24 +752,81 @@ ted-With');%0A + res.header('p3p', 'CP=%22This is not a P3P policy!%22');%0A next();%0A
a5094a4c67ee1a4677a2b15281d1c43bdea966c7
move for doc purposes
index.js
index.js
'use strict'; var util = require('./lib/util'); var Stack = require('./lib/Stack'); var Runtime = require('./lib/Runtime'); exports = module.exports = Runtime; /** Missing docs **/ exports.Stack = Stack; exports.Stack.createClass = util.classFactory(Stack); /** Missing docs **/ exports.create = function create(pr...
JavaScript
0
@@ -160,108 +160,8 @@ e;%0A%0A -/**%0A Missing docs%0A**/%0Aexports.Stack = Stack;%0Aexports.Stack.createClass = util.classFactory(Stack);%0A%0A /**%0A @@ -324,8 +324,108 @@ ntime);%0A +%0A/**%0A Missing docs%0A**/%0Aexports.Stack = Stack;%0Aexports.Stack.createClass = util.classFactory(Stack);%0A
d589891d22685aebf8c417ec3591d8b638c16420
remove helper
index.js
index.js
var Cubid = require("cubid"); var aufs = ["", "U", "U2", "U'"]; var justNeedsAUF = function(cube) { for (var i = 0; i < aufs.length; i++) { if (cube.apply(aufs[i]).isSolved()) { return true; } } return false; }; // Note these are the *inverses* var pllInverses = { "": "", "Aa": "R' F R' B2 R F...
JavaScript
0.000025
@@ -61,176 +61,8 @@ '%22%5D; -%0Avar justNeedsAUF = function(cube) %7B%0A for (var i = 0; i %3C aufs.length; i++) %7B%0A if (cube.apply(aufs%5Bi%5D).isSolved()) %7B%0A return true;%0A %7D%0A %7D%0A return false;%0A%7D; %0A%0A//
b7f311e4c016e6173e88eb1a34bb4274e88b3ac6
fix port
index.js
index.js
var argv = require('minimist')(process.argv.slice(2)) , Promise = require('bluebird') , Cluster = require('./lib/cluster') ; process.on('uncaughtException', function (err) { console.error('uncaughtException', err.stack || err.toString()); }); function main(options) { var cluster = new Cluster(options...
JavaScript
0.000001
@@ -598,16 +598,50 @@ : 8124%0A + , host : 'taskmill.io'%0A , ca @@ -693,67 +693,8 @@ dir%0A - , host : 'taskmill.io'%0A , port : 1337%0A
933ee47b1f2cf923f4937ebb8297cef49c3390f8
Use 404 instead of 500 when a file is not found
index.js
index.js
#!/usr/bin/env node const express = require('express'); const fileExists = require('file-exists'); const bodyParser = require('body-parser'); const fs = require('fs'); const { port = 8123 } = require('minimist')(process.argv.slice(2)); const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.us...
JavaScript
0.000001
@@ -573,35 +573,35 @@ turn res.status( -500 +404 ).send('Cannot f
0bf1ee06870348f009f7c97238895c44db57d8f0
Update console title.
index.js
index.js
const Discord = require("./discord"), Db = require("./db"), Log = require("./log"); // # # // # # // ### ### ### ### ### # # ### // ## # # # # # # # # # # // ## # # ## # # # # # # // ### ## # # # #...
JavaScript
0
@@ -449,24 +449,179 @@ g up...%22);%0A%0A + if (process.platform === %22win32%22) %7B%0A process.title = %22FusionBot%22;%0A %7D else %7B%0A process.stdout.write(%22%5Cx1b%5D2;FusionBot%5Cx1b%5Cx5c%22);%0A %7D%0A%0A const se
41b2a04486aedcacdae720f1ee908ccb5ac72cef
Change export syntax
index.js
index.js
module.exports = function (kibana) { return new kibana.Plugin({ uiExports: { visTypes: [ 'plugins/health_metric_vis/health_metric_vis' ] } }); };
JavaScript
0.000001
@@ -1,20 +1,18 @@ -module.exports = +export default fun @@ -200,8 +200,9 @@ %7D);%0A%7D; +%0A
3702493d18f093c958350f2fadfcf9c1d35ada3d
Fix undefined variable
index.js
index.js
"use strict"; var _ = require('lodash'); var fs = require('fs'); var path = require('path'); var ENVIRONMENT = "environment"; var IMPORT = "import"; var appDir = path.dirname(require.main.filename); var defaultConfig = { global: false, globalVariableName: 'config', path: path.join(appDir, 'config'), ...
JavaScript
0.966099
@@ -654,32 +654,36 @@ ath;%0A %7D%0A%0A +var testPath = path. @@ -5380,8 +5380,9 @@ nitFn;%0A%7D +%0A
7ac37b83f64ed550c96e60d48472fea318bc96df
format jsont
index.js
index.js
var twss = require('twss'); var express = require('express'); var app = express(); var request = require('request'); const child_process = require('child_process'); var bodyParser = require('body-parser'); // set the port of our application var port = process.env.PORT || 3000; // make express look in the client direc...
JavaScript
0.00015
@@ -1370,16 +1370,70 @@ err%7D%60);%0A +%09 res.setHeader('Content-Type', 'application/json');%0A %09 res.s
a2172115022e7658573428d9ddf9b094f9c6d1b5
Make the test a bit more strict
index.js
index.js
module.exports = isPromise; function isPromise(obj) { return obj && typeof obj.then === 'function'; }
JavaScript
0.998703
@@ -63,16 +63,74 @@ n obj && + (typeof obj === 'object' %7C%7C typeof obj === 'function') && typeof @@ -155,8 +155,9 @@ tion';%0A%7D +%0A
9955f6d2ede93432a622925998a0cd3d05fa55ed
fix failing test
index.js
index.js
'use strict'; var regexp = new RegExp([ '/?', // unsafe '(unsafe/)?', // meta '(meta/)?', // trim '(trim(:([^\\d]+))?(:(\\d+))?/)?', // crop '((\\d+)x(\\d+):(\\d+)x(\\d+)/)?', // fit-in '(fit-in/)?', // dimensions '((\\-?)(\\d*)x(\\-?)(\\d*)/)?', // halign '((left|right|center)/)?', // ...
JavaScript
0.000006
@@ -119,15 +119,29 @@ m(:( -%5B%5E%5C%5Cd%5D+ +top-left%7Cbottom-right ))?(
0cb0c3e08d2d86abfecd2502de502fdbee349dd2
remove unnecessary logging
index.js
index.js
const is = require('is_js') const ok = is.existy module.exports = Object .create({ /** * @description Fetches the env var with the given key. If no env var * with the specified key exists, the default value is returned if it is * provided else it returns undefined * * @param {(string|st...
JavaScript
0.000014
@@ -3057,52 +3057,8 @@ g':%0A - console.log('triggered string')%0A @@ -3155,52 +3155,8 @@ r':%0A - console.log('triggered number')%0A @@ -3260,53 +3260,8 @@ n':%0A - console.log('triggered boolean')%0A @@ -3357,52 +3357,8 @@ lt:%0A - console.log('i thoul...
6a6fd0b07f2093eb5939b1924dd395ff12548e51
fix times
index.js
index.js
'use strict'; const request = require('request-promise'); const memoizee = require('memoizee'); const ACTION = process.argv[2]; class Train { constructor(options) { this.id = options.equipmentID; this.geo = { lat: options.lat, lng: options.lng }; this.de...
JavaScript
0.000076
@@ -1501,38 +1501,36 @@ : $%7Btime ? time. -status +time : 'unknown'%7D%60;%0A @@ -1831,22 +1831,20 @@ ? time. -status +time : 'unkn
8d340b3819fc062ead894be51e2b4c13fdb03fe2
remove comment (out of date anyway!)
index.js
index.js
'use strict' function isArguments (obj) { return Object.prototype.toString.call(obj) === '[object Arguments]' } module.exports = match function match (obj, pattern) { return match_(obj, pattern, [], []) } /** 1. If the object is a string, and the pattern is a RegExp, then return true if `pattern.test(object)...
JavaScript
0
@@ -210,1326 +210,8 @@ %0A%7D%0A%0A -/**%0A1. If the object is a string, and the pattern is a RegExp, then return%0A true if %60pattern.test(object)%60.%0A2. Use loose equality (%60==%60) only for all other value types%0A (non-objects). %60tmatch%60 cares more about shape and contents than%0A type. This step wi...
abf9908a259988657c773ea111f83dfcece2ff5f
Increase max buffer for stdio
index.js
index.js
module.exports = { zip: zip, zipSync: zipSync, unzip: unzip, unzipSync: unzipSync } var cp = require('child_process') var fs = require('fs') var os = require('os') var path = require('path') var rimraf = require('rimraf') function zip (inPath, outPath, cb) { if (!cb) cb = function () {} if (process.platfo...
JavaScript
0
@@ -1377,32 +1377,57 @@ nPath, outPath), + %7B maxBuffer: Infinity %7D, function (err) @@ -2482,16 +2482,41 @@ utPath), + %7B maxBuffer: Infinity %7D, functio
cec196510c8a697752c28f8fd37f9df059dd8a8b
Return the deduped array
index.js
index.js
'use strict'; var startTime = Date.now(), fs = require('fs'), glob = require('glob'), path = require('path'), verbose = require('verboser'), encoding = {encoding: 'utf8'}, endTime, filesWithImports; var checkForImports = function (src) { var contents, importRegEx = new RegExp("@import"), matchingFi...
JavaScript
0.999999
@@ -1281,17 +1281,16 @@ ts(f);%0A%0A -%0A files. @@ -2187,24 +2187,25 @@ %7D%0A %7D);%0A%0A +%0A verbose.lo @@ -2288,22 +2288,32 @@ return -result +allDependentFile s;%0A%7D;%0A%0Ae
51dc9d390aa9389e9fd2bb6730936f6150f96ece
fix topTorrents and recentTorrents
index.js
index.js
var zlib, Promise, baseUrl, cheerio, getCategories, parseCategories, parsePage, parseResults, recentTorrents, request, search, topTorrents; request = require('request'); cheerio = require('cheerio'); Promise = require('es6-promise').Promise; baseUrl = 'http://thepiratebay.se'; zlib = require('zlib'); /* *opts: ...
JavaScript
0.000007
@@ -4031,556 +4031,110 @@ ar c -heck = $('body').find('body h2').text().match(/from (.*?) to (.*?) %5C(approx (.*?) found/);%0A if (check === null) %7B%0A return result = %7B%0A total: 0%0A %7D;%0A %7D%0A var itemsByPage, total, category, leechers, link, magnet...
bfad3b37cc7b945e8889e4c2e1dbda75f5516817
Make sure we only refresh once
index.js
index.js
/*! * gcal * Copyright(c) 2012 Randal Truong <randal@lever.co> * MIT Licensed */ var request = require('request'); var refreshGoogleToken = require('google-refresh-token'); module.exports = { Client: Client , CalendarResource: CalendarResource } function Client(appDomain, accessToken, refreshToken, clientId, c...
JavaScript
0
@@ -3666,16 +3666,48 @@ b(err);%0A + self.canRefresh = false; %0A @@ -3911,45 +3911,8 @@ ) %7B%0A - self.canRefresh = false;%0A
9820ecffe171c70f090be1719cdf768ecd5f6c68
allow context to be passed on `options.locals`
index.js
index.js
/*! * parse-blocks <https://github.com/jonschlinkert/parse-blocks> * * Copyright (c) 2014 Jon Schlinkert, contributors. * Licensed under the MIT license. */ 'use strict'; var delims = require('delimiter-regex'); var extend = require('extend-shallow'); module.exports = function blocks(str, options, thisArg) { ...
JavaScript
0
@@ -386,16 +386,62 @@ tions);%0A + var ctx = extend(%7B%7D, opts.locals, thisArg);%0A opts.n @@ -1235,35 +1235,35 @@ if ( -typeof thisArg === 'object' +Object.keys(ctx).length %3E 0 ) %7B%0A @@ -1315,23 +1315,19 @@ if ( -thisArg +ctx .hasOwnP @@ -1367,23 +1367,19 @@ ntext = -thisArg +ctx %5Bprops%5B0 @@...
ddc9aea964e440d4bcb3a18a928719bd3a88edaf
Fix racey registration case
index.js
index.js
var tracking = []; const throttle = require('lodash.throttle'); const _onScroll = throttle(() => window.requestAnimationFrame(checkForVisibleElements), 100, {leading: false}); function getTracking() { return tracking; } function isVisible(elm) { let rect = elm.getBoundingClientRect(); return rect.bottom > 0 &...
JavaScript
0
@@ -1133,16 +1133,22 @@ me(() =%3E + %7B%0A _trackN @@ -1174,20 +1174,21 @@ options) -) ;%0A%0A + if (tr @@ -1205,25 +1205,25 @@ gth === -0 +1 ) %7B%0A window.a @@ -1214,16 +1214,18 @@ ) %7B%0A + window.a @@ -1260,25 +1260,33 @@ nScroll);%0A -%7D + %7D%0A %7D); %0A%7D%0A%0Afunction
933bf89a4b619d546370c134a6e13d481acbbd43
order fix
index.js
index.js
var fs = require('fs'), restify = require('restify'), generator = require('viveka-fingerprint-generator'), differ = require('viveka-difference-tool'), server = restify.createServer({ name: 'Viveka server', version: '0.0.1' }), db = require('./database.js'); functio...
JavaScript
0.000002
@@ -4437,104 +4437,8 @@ );%0A%0A -server.get(/.*/, restify.serveStatic(%7B%0A directory: './public',%0A default: 'index.html'%0A%7D)); %0Aser @@ -4816,16 +4816,113 @@ erence); +%0Aserver.get(/.*/, restify.serveStatic(%7B%0A directory: './public',%0A default: 'index.html'%0A%7D)); %0A%0Aserver
e5eb8493058f4e4dc5cf110ec19dae20d1e22652
Add some basic routes
index.js
index.js
// Creation Date: 2015.03.06 // Author: Fernando L. Canizo - http://flc.muriandre.com/ "use strict"; // hard coded defaults for this application // some of them may be overriden with environment variables var tsDefaults = { port: 3000 }; var express = require('express'); var app = express(); app.set('port', proc...
JavaScript
0.000053
@@ -367,24 +367,354 @@ %0A%0A// - custom 404 page +//////////////////////////////////////////////////////////////////////////////%0A// routes%0A////////////////////////////////////////////////////////////////////////////////%0A%0Aapp.get('/', function (req, res) %7B%0A%09res.type(%22text/plain%22);%0A%09res.send(%22Ho...
f771ddfe8a106b724676fa64187108b0f9f292e2
fix require error on heroku
index.js
index.js
'use strict'; var util = require('util') , koa = require('koa') , common = require('koa-common') , router = require('koa-router') , views = require('co-views') , parse = require('co-body') , Q = require('q') , request = Q.denodeify(require('request')) , port = process.env.PORT || 3000 , app = koa() , csrf = require('k...
JavaScript
0
@@ -388,16 +388,18 @@ equire(' +./ github-a @@ -407,16 +407,19 @@ i-client +.js ')%0A, cli
ae752876f1861603a2b2dbd2d4e396025cdf279e
Make `.subtract` use `subtractGen`
index.js
index.js
"use strict"; function* mapGen(setObj, transform) { for (const itm of setObj) yield transform(itm, itm, setObj); } function* filterGen(setObj, filter) { for (const itm of setObj) { if (filter(itm, itm, setObj)) yield itm; } } function* subtractGen(set1, set2) { for (const ...
JavaScript
0.000027
@@ -2441,28 +2441,39 @@ urn -this.filter(itm =%3E ! +new SuperSet(subtractGen(this, othe @@ -2479,24 +2479,16 @@ erSetObj -.has(itm ));%0A
d690d2d9f9efb9e6870463feeba1621e89eb83e0
remove duplicate trash fields
index.js
index.js
'use strict'; var fs = require('fs'); fs.readFile('data.sql', 'utf8', function (err,data) { if (err) { return console.log(err); } var chunks = data.split('\n\n'); chunks.forEach(function(chunk){ console.log(chunk.match('CREATE TABLE `(.*)`')[1]); var lines = chunk.split('\n'); lines.forEach(fun...
JavaScript
0
@@ -323,16 +323,23 @@ ion(line +, index )%7B%0A @@ -347,9 +347,8 @@ if ( -! ~lin @@ -365,19 +365,58 @@ ' KEY ') -) %7B + %7C%7C index === 0) %7B%0A return;%0A %7D %0A @@ -494,16 +494,30 @@ ole.log( +index + ' ' + match%5B1%5D @@ -529,24 +529,16 @@ %7D%0A - %7D%0A %7D);%...
6f27a1fb6c71dee75b0a65a26e64fad9188379cc
fix string format
index.js
index.js
require("use-strict"); const cluster = require("cluster"); const fs = require("fs-extra"); if (!fs.existsSync("./Config.js")) { fs.copySync("./Config.example.js", "./Config.js"); } const Server = require("./lib/Server.js"); const RequestHandler = require("./lib/RequestHandler.js"); const NullCache = require("./lib/C...
JavaScript
0.999999
@@ -12,24 +12,54 @@ e-strict%22);%0A +const util = require(%22util%22);%0A const cluste @@ -4193,32 +4193,44 @@ ) %7B%0A%09%09%09log.info( +util.format( %22worker #%25d fork @@ -4266,32 +4266,33 @@ ker.process.pid) +) ;%0A%09%09%7D);%0A%0A%09%09clust @@ -4335,32 +4335,44 @@ ) %7B%0A%09%09%09log.info( +util.forma...
16d16e9334b8877ba2ee5e8afbc7c9d3bfc453bc
Remove list sorting
index.js
index.js
"use strict"; let Crawler = require('crawler'); let request = require('request'); let config = require('./config'); var access_token = ''; const api_prefix = 'https://anilist.co/api/'; const db_store = 'http://127.0.0.1:9200/'; let crawler = new Crawler({ maxConnections: 10, timeout: 5000, retries: 3, retry...
JavaScript
0.000003
@@ -2078,36 +2078,8 @@ ) %7B%0A - animeList.sort();%0A @@ -2995,32 +2995,8 @@ ) %7B%0A - staffList.sort;%0A @@ -3069,38 +3069,8 @@ %7D);%0A - characterList.sort();%0A