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
ef8756828d9ace90e39e178be0f2b28c6099d244
allow pass promise module through static properties
index.js
index.js
/*! * always-promise <https://github.com/hybridables/always-promise> * * Copyright (c) 2015 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk) * Released under the MIT license. */ 'use strict' /** * > Promisify everything! * * **Example** * * ```js * const promisify = require('always-promise'...
JavaScript
0
@@ -507,16 +507,17 @@ %7D %60%5BProm +e %5D%60 custo @@ -684,16 +684,17 @@ al, Prom +e ) %7B%0A va @@ -725,22 +725,22 @@ unction -hybrid +promis ified () @@ -797,16 +797,92 @@ s, val)%0A + var PromiseCtor = Prome %7C%7C alwaysPromise.promise %7C%7C promisified.promise%0A retu @@ -914,16 +914,23 @@ nc,...
545083f84be619d6edd85a78d336b0feb5c3d147
deploy test2
index.js
index.js
var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello, its really! working!\n'); }).listen(61768, "127.0.0.1"); console.log('Server running at http://127.0.0.1:61768/'); return; /** * Created by MT on 05.07.2015. */ var express = re...
JavaScript
0
@@ -1,268 +1,4 @@ -var http = require('http');%0Ahttp.createServer(function (req, res) %7B%0A res.writeHead(200, %7B'Content-Type': 'text/plain'%7D);%0A res.end('Hello, its really! working!%5Cn');%0A%7D).listen(61768, %22127.0.0.1%22);%0Aconsole.log('Server running at http://127.0.0.1:61768/');%0Areturn;%0A%0A /**%0...
1a11af5481a2b609c447a22c34a745e144019996
set isDeveloping addon false
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-dynamic-forms', included: function (app) { this._super.included(app); app.import(app.bowerDirectory + '/handlebars/handlebars.js'); app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js'); app.import(app.bowerDirec...
JavaScript
0.999536
@@ -628,19 +628,20 @@ return -tru +fals e;%0A %7D%0A%7D
275ca10d6c5c28a53d040cade8c44526962ff6ef
Add store.getState
index.js
index.js
var createEmitter = require('namespace-emitter') var isPlainObject = require('is-plain-object') var extend = require('xtend') /** * Create the store * @name createStoreEmitter * @param {function} modifier * @param {object} [initialState] * @example * var createStore = require('store-emitter') * var store = createStore...
JavaScript
0.000027
@@ -773,16 +773,44 @@ alState%0A + store.getState = getState%0A store. @@ -1982,24 +1982,197 @@ lState%0A %7D%0A%0A + /**%0A * Get the current state of the store%0A * @name store.getState%0A * @example%0A * var state = store.getState()%0A */%0A function getState () %7B%0A return state%0A %7D%0A%0...
5e4c5c4d4ecc1698c5adddb31a2378df0e78ec22
Change exposed function name to espowerSource
index.js
index.js
/** * espower-source - Power Assert instrumentor from source to source. * * https://github.com/twada/espower-source * * Copyright (c) 2014 Takuto Wada * Licensed under the MIT license. * https://github.com/twada/espower-source/blob/master/MIT-LICENSE.txt */ var espower = require('espower'), esprima = req...
JavaScript
0.000019
@@ -473,24 +473,16 @@ erSource -ToSource (jsCode, @@ -1251,14 +1251,6 @@ urce -ToSource ;%0A
61e6b6ec63a68b444cc1079cbaa668677b8b4210
remove some cruft
index.js
index.js
var fs = require('fs'); var path = require('path'); var emmet = require('emmet'); var prettify = require('js-beautify').html; var tabStops = require('emmet/lib/assets/tabStops'); var resources = require('emmet/lib/assets/resources'); var parser = require('emmet/lib/parser/abbreviation'); var _ = require('lodash'); f...
JavaScript
0.000001
@@ -2104,70 +2104,8 @@ ;%0A%0A%0A -// console.log(snippets.expand('zf-head', %7Bprettify: true%7D));%0A cons @@ -2170,124 +2170,4 @@ ));%0A -%0A%0Avar re = /%5E(%5C/?%7C)(%5B%5Cs%5CS%5D*?)((?:%5C.%7B1,2%7D%7C%5B%5E%5C/%5D+?%7C)(%5C.%5B%5E.%5C/%5D*%7C))(?:%5B%5C/%5D*)$/;%0A%0Aconsole.log('a/b/c/d/e/f/ghi.js'.match(re...
8a81aa7d942e86687b4997c50a67cfb4269e43b7
remove redundant code
index.js
index.js
var fs = require('fs') var path = require('path') var mime = require('mime') var merge = require('merge') var EventEmitter = require('events').EventEmitter var parseUrl = require('url').parse var google = require('googleapis') var youtube = google.youtube('v3') var OAuth2Client = google.auth.OAuth2 var Nightmare = requ...
JavaScript
0.997487
@@ -1503,76 +1503,8 @@ ) %7B%0A - if (!this._authenticated) return missingAuthentication(callback)%0A%0A va @@ -1758,30 +1758,32 @@ urn -youtube.videos. +this._command(' insert -( +', opti @@ -1896,112 +1896,47 @@ %7B%0A -if (!this._authenticated) return missingAuthentication(callback)%0A return youtube.v...
40794378ec9e9cab7deb22b70cbff81e29a072b5
Expose proxy object in module.exports
index.js
index.js
/** * Dependencies */ const url = require('url') const HttpProxy = require('http-proxy') const pathMatch = require('path-match') /** * Constants */ const proxy = HttpProxy.createProxyServer() const route = pathMatch({ // path-to-regexp options sensitive: false, strict: false, end: false }) let eventRegis...
JavaScript
0.999999
@@ -1642,16 +1642,45 @@ %0A %7D)%0A%7D%0A +module.exports.proxy = proxy; %0Afunctio
4f437edaed950fcc8fd417002f1e7d959a8a3ac9
Add ability to read default state from config.json
index.js
index.js
var Service, Characteristic; var exec = require("child_process").exec; module.exports = function(homebridge){ Service = homebridge.hap.Service; Characteristic = homebridge.hap.Characteristic; homebridge.registerAccessory("homebridge-cmdswitch", "cmdSwitch", cmdSwitchAccessory); } function cmdSwitchAccessory(log...
JavaScript
0.000001
@@ -686,16 +686,72 @@ serial;%0A +%09if (config.default == %22on%22)%09this.state = true;%0A%09else%09%09%09 %09this.st
dd8c179ccb884dc4bbfa854f86b7d395253f6056
Add "bottom" class to settings after changed
index.js
index.js
var coat = 36; var jacket = 45; var sweater = 60; var profile; function query(location) { $.ajax({ type: 'GET', url: 'https://api.wunderground.com/api/dba29ab1640cac5b/hourly' + location + '.json', dataType: 'json', success: function(data) {processData(data);} }); } function pr...
JavaScript
0.000001
@@ -3019,16 +3019,55 @@ ata%5B2%5D;%0A + $('#settings').addClass(%22bottom%22);%0A %7D%0A%0A @@ -3174,24 +3174,63 @@ ettings() %7B%0A + $('#settings').addClass(%22bottom%22);%0A if (!$('
8bedf3ba3e1729fd6c52682b5d1b2b85ac1c188a
add then method.
index.js
index.js
const PENDING = 'PENDING' const FULFILLED = 'FULFILLED' const REJECTED = 'REJECTED' function Promise(resolver) { if (!(this instanceof Promise)) { return new Promise(resolver) } this.$status = PENDING this.$value = undefined this.$queue = [] if (resolver) { execResolver.call(this, resolver) } ...
JavaScript
0
@@ -748,16 +748,26 @@ f)%0A %7D%0A%0A + try %7B%0A resolv @@ -789,16 +789,51 @@ nError)%0A + %7D catch (e) %7B%0A onError(e)%0A %7D%0A %7D%0A%0Afunct @@ -864,16 +864,23 @@ (var i = + 0; i %3C this.$q @@ -894,25 +894,13 @@ ngth - - 1; i %3E= 0; i-- +; i++ ) %7B%0A @@ -961,16 +961,41 @@ em.exec( +thi...
b99737551168c16e7638cae28e28b580166080b6
Fix server port variable
index.js
index.js
var Hapi = require('hapi') var Config = require('./config') var server = new Hapi.Server() server.connection({ port: Config.server.port, labels: ['signal'] }) server.register([ require('./signal') ], function (error) { if (error) { throw error } }) if (Config.client.enable) { server.connection({ port: Co...
JavaScript
0.000001
@@ -561,23 +561,26 @@ ' + -server.info.uri +Config.server.port + '
4131c5198510cd7cf7c02a6fe7f8745aab61f772
handle errors/warnings in child compilations
index.js
index.js
var stripANSI = require('strip-ansi'); var path = require('path'); var objectAssign = require('object-assign'); var os = require('os'); var notifier = require('node-notifier'); var DEFAULT_LOGO = path.join(__dirname, 'logo.png'); var WebpackNotifierPlugin = module.exports = function(options) { this.options = opti...
JavaScript
0
@@ -458,24 +458,404 @@ on(stats) %7B%0A + function findFirstDFS(compilation, key) %7B%0A var match = compilation%5Bkey%5D%5B0%5D;%0A if (match) %7B%0A return match;%0A %7D%0A%0A var children = compilation.children;%0A for (var i = 0; i %3C children.length; ++i) %7B%0A ...
f11f2085bf0d75fffd70299d63b819a77ed51d03
document that parsed torrents are valid torrentId
index.js
index.js
// TODO: support blocklists module.exports = WebTorrent var Client = require('bittorrent-client') var concat = require('concat-stream') var extend = require('extend.js') var fs = require('fs') var FSStorage = require('./lib/fs-storage') var http = require('http') var inherits = require('inherits') var mime = require(...
JavaScript
0.996739
@@ -1167,18 +1167,16 @@ %0A *%0A * - - a magnet @@ -1197,18 +1197,16 @@ ng)%0A * - - a torrent @@ -1224,19 +1224,16 @@ er)%0A * - - an info ha @@ -1263,18 +1263,63 @@ r)%0A * - -an +parsed torrent (from parse-torrent module)%0A * - http/ht @@ -1358,18 +1358,16 @@ ng)%0A * - - a filesys @@ -1443,16 +144...
ed0562694e0a5c2e39910d4ac9d05fb9c26a0285
fix potential compatibility problem
index.js
index.js
'use strict' const fs = require('hexo-fs') hexo.extend.filter.register('after_render:html', function (str) { const idReg = /<div +id *= *["']disqus_thread["'] *>/ const srcReg = /s.src *= *['"]https:\/\/.+\.disqus\.com\/embed\.js['"];?/ const insertReg = /\(d\.head *\|\| *d\.body\)\.appendChild\(s\);?/ if (i...
JavaScript
0.000033
@@ -716,24 +716,97 @@ %22%3E%3C/script%3E%0A + %3Cscript src=%22//cdn.bootcss.com/fetch/2.0.3/fetch.min.js%22%3E%3C/script%3E%0A %3Clink
59b003b5c50703578c8f1f47b255d1a3086c6d1b
correct base path
index.js
index.js
/** * Module dependencies. */ var fs = require("fs") var path = require("path") var base64 = require("js-base64").Base64 var mime = require("mime") var reduceFunctionCall = require("reduce-function-call"); /** * Fix url() according to source (`from`) or destination (`to`) * * @param {Object} options */ module.ex...
JavaScript
0.000003
@@ -2618,16 +2618,28 @@ Path - %7C%7C from +;%0A var fullFilePath ;%0A @@ -2664,24 +2664,48 @@ 8%0A -var file +if (basePath) %7B%0A fullFilePath = path. reso @@ -2700,23 +2700,20 @@ = path. -resolve +join (basePat @@ -2714,20 +2714,55 @@ asePath, -%0A + value)%0A %7D%0A else %7B%0A fullFilePat...
2083f66c81315589377d6c2a174d45c5d32ff564
Update mobile width to 840 px
index.js
index.js
'use strict' var window = require('global/window') var Struct = require('observ-struct') var Observ = require('observ') var minimumViewport = require('minimum-viewport') var orientation = require('screen-orientation') var MOBILE_WIDTH = 640 var device = Struct({ mobile: Observ(false), orientation: Observ(null) }...
JavaScript
0
@@ -236,9 +236,9 @@ H = -6 +8 40%0A%0A
4434204485628b66fd8e2e8b988fa2ae51eeb39f
fix file ext
index.js
index.js
const createScheduler = require('probot-scheduler'); const Freeze = require('./lib/freeze'); const formatParser = require('./lib/format-parser'); const githubHelper = require('./lib/github-helper'); /* Configuration Variables */ module.exports = robot => { robot.on('integration_installation.added', installationEven...
JavaScript
0.000001
@@ -562,24 +562,27 @@ onf/defaults +.js '));%0A%0A co @@ -984,32 +984,35 @@ './conf/defaults +.js '));%0A const f @@ -1456,16 +1456,19 @@ defaults +.js '));%0A
0e0f696ae98b21dde3bf4ad6b2d274738f8da57b
test functionality
index.js
index.js
'use strict'; const express = require('express'); var app = express(); app.get('/', function (req, res) { if (req.query['hub.mode'] === 'subscribe' && req.query['hub.verify_token'] === '^sdB]~"i4+1v 3b') { console.log("Validating webhook"); res.status(200).send(req.query['hub.challenge']); } else { console.e...
JavaScript
0.000001
@@ -48,29 +48,946 @@ ');%0A -%0Avar app = express(); +const https = require('https');%0Aconst bodyParser = require('body-parser');%0Aconst crypto = require('crypto');%0Aconst config = require('config');%0A%0Avar app = express();%0Aapp.set('port', process.env.PORT %7C%7C 5000);%0Aapp.use(bodyParser.json(%7B verify: ver...
2dfb61ac2450fdccf8561a3cac7ac7a8c4a89a25
fix potential bug where script exits before network request completes
index.js
index.js
const puppeteer = require("puppeteer"); (async () => { console.log("launching Chrome"); const browser = await puppeteer.launch({ args: ["--no-sandbox"] }); const page = await browser.newPage(); page.setViewport({ width: 1280, height: 721 }); try { // login console.log("logging in"); await page.g...
JavaScript
0
@@ -1693,24 +1693,90 @@ on.click();%0A + await page.waitForNavigation(%7B waitUntil: %22networkidle%22 %7D);%0A consol
fdd38100e0303e65c4ea5b40e452f4ccb8d401da
Reorder scheme detection to cascade into port detection
index.js
index.js
var http = module.exports; var EventEmitter = require('events').EventEmitter; var Request = require('./lib/request'); http.request = function (params, cb) { if (!params) params = {}; if (!params.host && !params.port) { params.port = parseInt(window.location.port, 10); } if (!params.host) params...
JavaScript
0
@@ -281,24 +281,104 @@ 10);%0A %7D%0A + if (!params.scheme) params.scheme = window.location.protocol.split(':')%5B0%5D;%0A if (!par @@ -504,88 +504,8 @@ 80;%0A - if (!params.scheme) params.scheme = window.location.protocol.split(':')%5B0%5D;%0A
c52607e85f3605123c6484339e1e4c99c2d0d7d2
fix err msg
index.js
index.js
'use strict'; var os = require('os'), spawn = require('child_process').spawn, fs = require('fs'), https = require('https'), tar = require('tar'), zlib = require('zlib'), path = require('path'), mkdirp = require('mkdirp'), Q = require('q'), debug = require('debug')('dynamodb-local');...
JavaScript
0.000021
@@ -5321,21 +5321,25 @@ - r +redirectR esponse.
eb3511ae4210b7a64f515907a0031bd015757e5d
Add a deep argument to delete() to fix multiple extend()
index.js
index.js
'use strict'; const assert = require('assert'); const pathToRx = require('path-to-regexp'); function isDefined (obj) { return typeof obj !== 'undefined'; } function isGeneratorObject (obj) { return Object.prototype.toString.call(obj) === '[object Generator]'; } function isFunction (fn) { return 'function' === typ...
JavaScript
0.000002
@@ -4894,24 +4894,30 @@ %09delete (key +, deep ) %7B%0A%09%09if (!i @@ -5029,32 +5029,47 @@ es.delete(key);%0A +%09%09if (deep) %7B%0A%09 %09%09this.delete(th @@ -5092,16 +5092,20 @@ (key));%0A +%09%09%7D%0A %09%09this.f
61a47517ce293d41cb552b344f63e75e1163501e
abort after confirmation
index.js
index.js
'use strict'; var mguri = require('magnet-uri'); var request = require('request'); var q = require('q'); var service = {}, servUrl = [ function(hash) { return 'http://bt.box.n0808.com/' + hash.slice(0, 2) + '/' + hash.slice(-2) + '/' + hash + '.torrent'; }, function(hash) { return 'htt...
JavaScript
0.000017
@@ -997,16 +997,24 @@ %7D;%0A + var r = request @@ -1358,24 +1358,55 @@ torrent') %7B%0A + r.abort();%0A
37bbeefeb7e1014261946f4cd66275681c52e393
Add flag for printing license text
index.js
index.js
var path = require('path'); var fs = require('fs'); var IsThere = require('is-there'); var objectAssign = require('object-assign'); var MODULE_DIR = 'node_modules'; var moduleReader = { readPackageJson: function(mod) { var pathName = path.join(this.context, MODULE_DIR, mod, 'package.json'); var file = fs.re...
JavaScript
0
@@ -3412,22 +3412,31 @@ ) %7B%0A -return +var formatted = mod.nam @@ -3456,18 +3456,63 @@ .version +;%0A if (this.addLicense) %7B%0A formatted + += '%5Cn' + @@ -3518,32 +3518,59 @@ mod.licenseText +%0A %7D%0A return formatted ;%0A %7D,%0A compile
f170d5f364f8bba9d1670e2c058bf0011b8606c9
Change minutes to min
index.js
index.js
/** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} options * @return {String|Number} * @api public */ module.expo...
JavaScript
0.000105
@@ -2018,19 +2018,16 @@ m, 'min -ute ')%0A %7C @@ -2162,24 +2162,25 @@ eturn;%0A if +( (ms %3C n * 1. @@ -2181,16 +2181,35 @@ n * 1.5) + %7C%7C name === 'min') return
ea6efbabafa79603f37a3ed269e5bf7f7c39cfd5
fix build issue
index.js
index.js
// if (process.env.NODE_ENV === 'production') { // var Vue = require('vue') // var Raven = require('raven-js') // var RavenVue = require('raven-js/plugins/vue') // Raven // .config('https://93be86fbce7f4ebab4d9e0abf3dcee17@sentry.io/145052') // .addPlugin(RavenVue, Vue) // .install() // } var app =...
JavaScript
0.000001
@@ -337,45 +337,8 @@ = %7B%0A - backend: require('./src/backend'),%0A ui
8dd2fe5c2501a3fe9252ce3982b5dc45916043b1
add pre and pub intro; add .xgconfig file check
index.js
index.js
var path = require('path'); var fs = require('fs'); var fis = module.exports = require('fis3'); var logo = require('./lib/logo.js'); // 内置项目config var XG_CONFIGS = { angular: require('./config/fis-conf-angular.js').config, vue: require('./config/fis-conf-vue.js').config } fis.require.prefixes.unshift('xg'); ...
JavaScript
0.000001
@@ -381,117 +381,8 @@ );%0A%0A -fis.cli.version = function() %7B%0A logo.logLogo();%0A console.log(' v' + fis.cli.info.version + '%5Cn');%0A%7D;%0A%0A // %E8%AF%BB @@ -673,22 +673,168 @@ e = -'angular';%0A%7D%0A%0A +null;%0A%7D%0A%0A// %E7%89%88%E6%9C%AC%E4%BF%A1%E6%81%AF: xg -v%0Afis.cli.version = function ...
e0f1b2689c8e7fd6e8616c0ebfb110f56110eca7
Use path.join() instead of string concat for deleteOld
index.js
index.js
var crypto = require('crypto'), through2 = require('through2'), gutil = require('gulp-util'), assign = require('lodash.assign'), template = require('lodash.template'), path = require('path'), Promise = require('es6-promise').Promise, fs = require('fs'); var exportObj = function(options) { options = assi...
JavaScript
0.000001
@@ -25,18 +25,20 @@ ypto'),%0A -%09%09 + through2 @@ -61,18 +61,20 @@ ugh2'),%0A -%09%09 + gutil = @@ -95,18 +95,20 @@ util'),%0A -%09%09 + assign = @@ -134,18 +134,20 @@ sign'),%0A -%09%09 + template @@ -177,18 +177,20 @@ late'),%0A -%09%09 + path = r @@ -205,18 +205,20 @@ path'),%0A -%...
be04f5391f2c74aed74e92f9c08b80e99b6b922a
remove unnecessary touch checks
index.js
index.js
var cancelEvents = [ 'touchstart', 'touchmove', 'touchcancel' ] module.exports = Tap function Tap(callback) { // to keep track of the original listener listener.handler = callback return listener // el.addEventListener('touchstart', listener) function listener(e1) { // tap should only happen wit...
JavaScript
0.000001
@@ -654,176 +654,12 @@ -// note: not sure if these are all necessary%0A if (e2.touches.length %3E 1%0A %7C%7C e1.changedTouches.length %3E 1%0A %7C%7C e2.changedTouches.length %3E 1%0A %7C%7C +if ( e1.d @@ -673,24 +673,16 @@ revented -%0A %7C%7C e2.d
c936ca93ca5bf4f9c9806e355b127422cf085a87
Fix errors caused by undefined and text nodes
index.js
index.js
'use strict'; var cssauron = require('cssauron'); function isString(thing) { return typeof thing === 'string'; } function isArray(thing) { return Object.prototype.toString.call(thing) === '[object Array]'; } var language = cssauron({ tag: 'tag', contents: function(node) { if (isString(node)) { retu...
JavaScript
0.000006
@@ -969,24 +969,88 @@ el : %5Bel%5D;%0A + els = els.filter(function(el) %7B return el !== undefined %7D);%0A var foun @@ -1498,16 +1498,77 @@ hildren. +filter(function(child) %7B return typeof child === 'object' %7D). forEach(
79aa31b15ba2a903d8ea59052e92355e51e8dff4
stop when time runs out on last video
index.js
index.js
var enterSearchMsg = "Search..."; var enterUrlMsg = "Paste URL Here..."; var enterTimeMsg = "Type length of video... (ex. 2:49 or 2 49)"; var pauseImgSrc = "//cdn.rawgit.com/iconic/open-iconic/master/png/media-pause-4x.png"; var playImgSrc = "//cdn.rawgit.com/iconic/open-iconic/master/png/media-play-4x.png"; var sear...
JavaScript
0
@@ -1590,24 +1590,45 @@ %0A else %7B%0A + timer.pause();%0A timer
e5a91c678cfcbe60e0a982cb1787a49192d1e588
fix index.js
index.js
index.js
require('./lib/slotmachine');
JavaScript
0.000046
@@ -1,9 +1,26 @@ %0A +module.exports = require(
3555c59922ff044f3d3699f2933314083b0c9409
move to using events instead of a logger param
index.js
index.js
var inherits = require('util').inherits var EventEmitter = require('events').EventEmitter var Pool = require('generic-pool').Pool var once = require('once') var chain = require('./lib/chain') module.exports = ConnectionPool inherits(ConnectionPool, EventEmitter) function ConnectionPool (ad...
JavaScript
0
@@ -1113,178 +1113,8 @@ ts)%0A - %0A // set up our logging function%0A this._queryLogger = (options.queryLogger && typeof options.queryLogger === 'function' ? options.queryLogger : function() %7B%7D);%0A %7D%0A%0AC @@ -1182,24 +1182,66 @@ callback) %7B%0A + this.emit('query', statement, params)%0A %09va...
5428468d239c607af28f312218bc6c1abf500fb8
Fix path parsing in Node.js ^0.10.0
index.js
index.js
var EventEmitter = require('events').EventEmitter var Importer = require('node-matrix-importer') var inherits = require('inherits') var gzip = require('zlib').createGzip() var path = require('path') var tar = require('tar-stream') var fs = require('fs') function Bundler (opts) { if (!(this instanceof Bundler)) { ...
JavaScript
0.00073
@@ -1214,16 +1214,100 @@ arse -(source) + ? path.parse(source) : %7B%0A ext: path.extname(source),%0A base: path.basename(source)%0A %7D )%0A%0A
0abed6d6413e8430305748d47d670f4adfe45dea
fix guard
index.js
index.js
/* vim: set ts=2 sw=2 expandtab : */ var request = require('request'); var Backoff = require('backoff-retry'); var querystring = require('querystring'); var _ = require('underscore'); var Busboy = require('busboy'); function nullLog(){ } function EdmodoAPI(options){ if(!options.api_key) ...
JavaScript
0.000001
@@ -1385,25 +1385,26 @@ 'function') +%7B %0A - this.log @@ -1455,16 +1455,20 @@ d, url); +%0A %7D %0A%0A var @@ -1578,36 +1578,36 @@ %7B%0A if(typeof -this +self .logger.debug == @@ -1619,16 +1619,17 @@ nction') +%7B %0A s @@ -1685,24 +1685,30 @@ nse, body);%0A + %7D%0A if(err)%7B
1b669246540eba1270faebbff9335449df56e9c5
move parser and renderer to their own functions
index.js
index.js
/*! * remarkable-regexp * Copyright (c) 2014 Alex Kocharin * MIT Licensed */ /** * Module dependencies. */ var util = require('util') var stuff = require('./utils') /** * Expose `Plugin` */ module.exports = Plugin /** * Constructor function */ function Plugin(regexp, replacer) { // return value shoul...
JavaScript
0
@@ -1134,89 +1134,159 @@ %7B%0A -var self = this%0A%0A // push an inline rule%0A remarkable.inline.ruler.push(self.id, +remarkable.inline.ruler.push(this.id, this.parse.bind(this))%0A%0A remarkable.renderer.rules%5Bthis.id%5D = this.render.bind(this)%0A%7D%0A%0APlugin.prototype.parse = fun @@ -1308,18 +1308,16 ...
506d97d0b8022e987011e76849dc54e1a807653d
remove asyncmanager exposition in yamvish index
index.js
index.js
/** @author Gilles Coomans <gilles.coomans@gmail.com> */ var y = function(t) { return new y.Template(t); }; // yamvish core y.api = require('./lib/api'); y.env = require('./lib/env'); y.utils = require('./lib/utils'); y.AsyncManager = require('./lib/async'); var ctx = require('./lib/context'); y.Context = ctx.Conte...
JavaScript
0.000002
@@ -217,49 +217,8 @@ s'); -%0Ay.AsyncManager = require('./lib/async'); %0A%0Ava
62cb4a31d786434f9d72740d17925cb1e80e014c
Update comments
index.js
index.js
/** * http://wunderdog.fi/koodaus-hassuimmat-sanat * * Marko Raatikka // marko.raatikka@gmail.com * * Parameters: * --file The filename of a text file to search (default: input.txt) */ console.time('start'); var fs = require('fs'); var path = require('path'); var VOWELS = [ 'a', 'e', 'i', 'u', 'o', 'y', 'ä...
JavaScript
0
@@ -204,21 +204,28 @@ e.time(' -start +Processed in ');%0Avar @@ -768,79 +768,73 @@ ) %7B%0A - var highestScore = wordObjects.length ? wordObjects%5B0%5D.points : 0 +%0A if (!wordObjects) return console.log('Nothing to print.') ;%0A +%0A @@ -888,20 +888,29 @@ (' + -highestScore +wordObjects%5B0%5D.poi...
be9edb357e5ec2ae7cf99723018d5decbe154ccf
Mark output format as XML
index.js
index.js
'use strict'; var MarkdownIt = require('markdown-it'); exports.name = 'markdown-it'; exports.outputFormat = 'html'; exports.render = function (str, options) { var md = MarkdownIt(options); return md.render(str); };
JavaScript
0.999998
@@ -108,10 +108,9 @@ = ' -ht +x ml';
93f554312e37129027fcf4916f48cb8d1b53588c
Fix `this` referring to the global object instead of `module.exports` in `verify()`
index.js
index.js
var jws = require('jws'); var JsonWebTokenError = module.exports.JsonWebTokenError = require('./lib/JsonWebTokenError'); var TokenExpiredError = module.exports.TokenExpiredError = require('./lib/TokenExpiredError'); module.exports.decode = function (jwt, options) { options = options || {}; var decoded = jws.decod...
JavaScript
0
@@ -4077,19 +4077,29 @@ yload = -thi +module.export s.decode
4ac699a923c1c7589cd210f65019894ba2c81560
Change jumps when going towards bounds
index.js
index.js
function start_game() { //load elements svg = document.getElementsByTagName("svg")[0]; sprite = svg.getElementById("sprite"); highscore = 0; jump = false; jump_x = 2; var x = parseInt(sprite.getAttribute("cx").slice(0,-1)); var r1 = make_rect(-15, 5); var r2 = make_rect(-30, 5); var r3 = make_rect(-60,10); v...
JavaScript
0
@@ -3444,33 +3444,35 @@ %09%09%09velocity -+ = +- jump_x +/2 ;%0A%09%09%09jump = @@ -4002,33 +4002,32 @@ %09%09%09velocity -- = jump_x ;%0A%09%09%09jump = @@ -4006,32 +4006,34 @@ elocity = jump_x +/2 ;%0A%09%09%09jump = fals
4f435467da306049ecff06efea807384fd534f26
set proto so any machine readable properties are preserved
index.js
index.js
function getStack(err) { if(err.stack && err.name && err.message) return err.stack.substring(err.name.length + 3 + err.message.length) .split('\n') else if(err.stack) return err.stack.split('\n') } function removePrefix (a, b) { return a.filter(function (e) { return !~b.indexOf(e) }) } var ...
JavaScript
0
@@ -593,16 +593,40 @@ ('%5Cn')%0A%0A + _err.__proto__ = err%0A%0A _err.s @@ -722,12 +722,14 @@ urn _err%0A%7D%0A%0A +%0A%0A
439842b1f1759e44c48e98ebe3c33708e94df52d
Improve compatibility
index.js
index.js
'use strict'; var execFile = require('child_process').execFile; var fkill = require('fkill'); exports.isShown = function (cb) { if (process.platform !== 'darwin') { throw new Error('Only OS X systems are supported'); } var cmd = 'defaults'; var args = [ 'read', 'com.apple.finder', 'AppleShowAllFiles' ]; ...
JavaScript
0
@@ -397,16 +397,52 @@ rn;%0A%09%09%7D%0A +%09%09%0A%09%09res = res.trim().toLowerCase(); %0A%09%09cb(nu @@ -448,23 +448,16 @@ ull, res -.trim() === 'tr @@ -459,16 +459,33 @@ = 'true' + %7C%7C res === 'yes' );%0A%09%7D);%0A
62bab781c0f341791e8254d1ece813f5be694c1b
Fix args number when there is no doc object
index.js
index.js
var j2w = require('./json2wadl'), jade = require('jade'), fs = require('fs'), methods = require('./methods'), path = require('path'); var jadeTemplate = fs.readFileSync(path.join(__dirname, 'doc.jade'), 'utf8'); var DocRouter = function (connectRouter, baseUrl) { if (!connectRouter) throw new Err...
JavaScript
0.000316
@@ -1291,16 +1291,65 @@ uments;%0A + var handlersCount = args.length;%0A @@ -1467,16 +1467,16 @@ gument.%0A - @@ -1621,16 +1621,56 @@ h - 1%5D;%0A + handlersCount -= 1;%0A @@ -1903,16 +1903,17 @@ guments%0A +%0A @@ -1975,31 +1975,29 @@ rgs, ...
14dc7605b95ff343dd00ab82e6778fd1fce4122a
Set gzip regex to only match for .gz at the end of the filename
index.js
index.js
'use strict'; var es = require('event-stream'); var knox = require('knox'); var gutil = require('gulp-util'); var mime = require('mime'); var yargs = require('yargs').argv; mime.default_type = 'text/plain'; module.exports = function (aws, options) { options = options || {}; if (!options.delay) { options.delay = ...
JavaScript
0.000001
@@ -384,21 +384,8 @@ /%5C. -(%5Ba-z%5D%7B2,%7D)%5C. gz$/
76212ea39315bfef33bee6e7e9d7fd818ba563a2
Fix bug with loading override (#9)
index.js
index.js
const loaderUtils = require('loader-utils'); const path = require('path'); const deepMerge = require('./lib/deep-merge'); module.exports = function(source) { const callback = this.async(); const options = loaderUtils.getOptions(this); const overridePath = path.resolve(__dirname, `test/cases/lib/${options.ove...
JavaScript
0
@@ -273,41 +273,22 @@ lve( -__dirname,%0A %60test/cases/lib/$%7B +this.context, opti @@ -303,10 +303,8 @@ ride -%7D%60 );%0A%0A
e27e9a33e8a346f26a970c2b7f67e89d335870e7
Check isNotClosed on all tasks
index.js
index.js
var detect = require('rtc-core/detect'); var debug = require('cog/logger')('rtc-taskqueue'); var zip = require('whisk/zip'); var findPlugin = require('rtc-core/plugin'); var PriorityQueue = require('priorityqueuejs'); var EventEmitter = require('eventemitter3'); var PRIORITY_LOW = 100; var PRIORITY_WAIT = 1000; // pr...
JavaScript
0.000001
@@ -4177,16 +4177,29 @@ hecks: %5B + isNotClosed %5D.concat @@ -6231,37 +6231,8 @@ , %7B%0A - checks: %5B isNotClosed %5D,%0A @@ -6379,21 +6379,8 @@ s: %5B - isNotClosed, isN @@ -6498,37 +6498,8 @@ , %7B%0A - checks: %5B isNotClosed %5D,%0A
c47f43b3cb6fe04c9fd66452da5445e874dfad26
Handle NetworkErrors in the same manner at @kumavis rtc-data-stream
index.js
index.js
/* jshint node: true */ 'use strict'; var debug = require('cog/logger')('rtc-dcstream'); var stream = require('stream'); var toBuffer = require('typedarray-to-buffer'); var util = require('util'); var closingStates = ['closing', 'closed']; var ENDOFSTREAM = '::endofstream'; /** # rtc-dcstream Node streams2 inter...
JavaScript
0
@@ -4631,24 +4631,163 @@ catch (e) %7B%0A + // handle closed streams where we didn't get the memo%0A if (e.name == 'NetworkError') %7B%0A return this._handleClose();%0A %7D%0A %0A return c
7ee86a394fa10ccad0f081e03c6deae49b2e3aa5
fix push
index.js
index.js
/** * follow - index.js * Auth dead-horse <dead_horse@qq.com> */ "use strict"; /** * Module dependencies. */ var config = require('./config'); var wechat = require('./common/wechat'); var mail = require('./common/mail'); var urllib = require('urllib'); var fs = require('fs'); function noop() { } var lastTrad...
JavaScript
0.000003
@@ -1326,16 +1326,22 @@ %E5%BC%80%E5%A7%8B%E8%8E%B7%E5%8F%96%E4%BA%A4%E6%98%93%EF%BC%81' +, noop );%0A %7D%0A @@ -1345,266 +1345,51 @@ %7D%0A -urllib.request(config.url, function (err, data) %7B%0A if (err) %7B%0A if (err.message.indexOf('timeout') %3E 0) %7B%0A return ;%0A %7D%0A return...
649719031386e512e5510dc7e43fe41a2042a1de
streamline globals API is now require('streamline-runtime').globals
index.js
index.js
"use strict"; module.exports = { flows: require('./lib/flows'), }
JavaScript
0.00001
@@ -11,34 +11,1288 @@ t%22;%0A -module.exports = %7B%0A%09flows: +%0A/// !doc%0A/// %0A/// # Container for global context%0A/// %0A/// The %60globals%60 module is a container for the global %60context%60 object which is maintained across%0A/// asynchronous calls.%0A/// %0A/// This context is very handy to store inform...
f52bd8f6f70ddb6dea78a0474573f08de92b6e85
make bulk-require more flexible
index.js
index.js
const bulk = require('bulk-require') module.exports = { patchcore: bulk(__dirname, [ './+(config|keys|sbot|emoji|invite).js', './+(lib|about|feed|message|contact|blob)/**/*.js' ]) }
JavaScript
0.000002
@@ -30,16 +30,17 @@ quire')%0A +%0A module.e @@ -92,90 +92,51 @@ './ -+(config%7Ckeys%7Csbot%7Cemoji%7Cinvite).js',%0A './+(lib%7Cabout%7Cfeed%7Cmessage%7Ccontact%7Cblob +!(index).js',%0A './!(node_modules%7Cexample )/**
598132f82b351931194b71160f1a97b7a727a96b
remove console.log
index.js
index.js
var fs = require('fs'); var path = require('path'); var parseURL = require('url').parse; var reduceFunctionCall = require('reduce-function-call'); var mkdirp = require('mkdirp'); var postcss = require('postcss'); var chalk = require('chalk'); module.exports = postcss.plugin('postcss-assets-rebase', function(options) {...
JavaScript
0.000006
@@ -3871,42 +3871,8 @@ );%0A%0A -%09console.log('postfix', postfix);%0A %09if
b6bafaf771e799611481a1a6f5b9c55058ee55bc
fix trailing show
index.js
index.js
var inherits = require('inherits'); var EventEmitter = require('events').EventEmitter; var mkdirp = require('mkdirp'); var fs = require('fs'); var path = require('path'); var x256 = require('x256'); var showMenu = require('./lib/menu.js'); module.exports = Shop; inherits(Shop, EventEmitter); function Shop (opts) { ...
JavaScript
0.000003
@@ -2895,21 +2895,16 @@ );%0A -show( p.verify @@ -2999,17 +2999,16 @@ )%0A %7D) -) ;%0A%7D;%0A%0ASh
dc9e9219cf9694469f9c3ed2eeccbab0a1aa6c7b
add batched function
index.js
index.js
// Generated by CoffeeScript 1.7.1 (function() { var deepMerge, isArray; deepMerge = require('./deep_merge'); isArray = Array.isArray; module.exports = { create: function(inputData, onChange, historySize) { var Cursor, data, redo, redos, undo, undos, update; if (historySize == null) { ...
JavaScript
0.000001
@@ -232,16 +232,25 @@ Cursor, + batched, data, r @@ -370,24 +370,47 @@ inputData;%0A + batched = false;%0A undos @@ -2445,32 +2445,200 @@ s);%0A %7D;%0A%0A + Cursor.prototype.batched = function(cb) %7B%0A batched = true;%0A cb();%0A batched = false;%0A ...
7f3a183dcd2b74671c51f6721d89480988647015
Fix typo (#2)
index.js
index.js
export default function toSeconds(string) { const parts = string.split(':'); let seconds = 0; let mininutes = 1; while (parts.length > 0) { seconds += mininutes * Number.parseInt(parts.pop(), 10); mininutes *= 60; } return seconds; }
JavaScript
0.008093
@@ -93,26 +93,24 @@ 0;%0A%09let min -in utes = 1;%0A%0A%09 @@ -152,18 +152,16 @@ s += min -in utes * N @@ -198,18 +198,16 @@ );%0A%09%09min -in utes *=
cbadb4a62c10e45e3195ebfd55a67d2df6ab8bff
Simplify regular expressions.
index.js
index.js
var parser = require('js-yaml') var seperators = [ '---', '= yaml ='] var optionalByteOrderMark = '\\ufeff?' var pattern = '^(' + optionalByteOrderMark + '((= yaml =)|(---))' + '$([\\s\\S]*?)' + '\\2' + '$' + (process.platform === 'win32' ? '\\r?' : '') + '(?:\\n)?)' var regex ...
JavaScript
0.000062
@@ -29,46 +29,8 @@ l')%0A -var seperators = %5B '---', '= yaml ='%5D%0A var @@ -123,25 +123,24 @@ + '( -( = yaml = )%7C(---)) @@ -131,24 +131,21 @@ = yaml = -)%7C( +%7C ---) -) '%0A @@ -468,43 +468,36 @@ && -lines%5B0%5D.match(/((= yaml =)%7C(---))/ +/= yaml =%7C---/.test(lines%5B0%5D )) %7B
5182d4d6410b6248fc3d0ff5e151e303906c7e90
Add tagStart end End parameters
index.js
index.js
'use strict'; var _ = require('lodash'); var fs = require('fs'); var PO = require('pofile'); var gutil = require('gulp-util'); var through = require('through2'); var path = require('path'); var glob = require('glob'); var PluginError = gutil.PluginError; var PLUGIN_NAME = require('./package.json').name; function get...
JavaScript
0.000001
@@ -456,16 +456,34 @@ e(poFile +, tokStart, tokEnd ) %7B%0A @@ -795,31 +795,99 @@ T = -%22@%3C%3C%22;%0A%09var TOKEN_END = +tokStart !== undefined ? tokStart : %22@%3C%3C%22;%0A%09var TOKEN_END = tokEnd !== undefined ? tokEnd : %22%3E%3E
c3249b7f420d3625777a7b02f233775149798c3a
delete from index.js
index.js
index.js
function HtmlReplaceWebpackPlugin(options) { options = Array.isArray(options) ? options : [options] options = options || [ { pattern: undefined, replacement: undefined }] options.forEach(function(option) { if(typeof option.pattern == 'undefined' || typeof option.replacement == 'undefined'...
JavaScript
0.000001
@@ -98,93 +98,8 @@ ons%5D -%0A options = options %7C%7C %5B%0A %7B%0A pattern: undefined,%0A replacement: undefined%0A %7D%5D %0A%0A
d0a1fa104a84d680fe22fc7b718a079d6bcb70b1
return the stream
index.js
index.js
var WriteStream = require("write-stream") module.exports = forEach function forEach(stream, iterator, finish) { stream.pipe(WriteStream(iterator, finish)) }
JavaScript
0.999999
@@ -154,10 +154,28 @@ inish))%0A + return stream%0A %7D%0A
8b094bb2f51b31dc1cb93dac96c4884c8830e8b1
fix typo
index.js
index.js
'use strict'; var typeforce = require('assert'); var express = require('express'); var common = require('tradle-utils'); var domain = require('domain'); var debug = require('debug')('bitjoe-server'); function createServer(conf, callback) { typeforce({ bitjoe: 'Object', port: 'Number', ipWhitelist: 'Arra...
JavaScript
0.999991
@@ -1292,16 +1292,17 @@ name +) === -1) ) %7B%0A @@ -1297,17 +1297,16 @@ === -1) -) %7B%0A
7544211017c455500f3e3a7bf6787b71ced520e7
fix issues #1
index.js
index.js
var path = require('path'); var through = require('through2'); var cheerio = require('cheerio'); var gutil = require('gulp-util'); var fs = require('fs'); var dateformat = require('dateformat') var url = require('url'); var _ = require('lodash'); var crypto = require('crypto'); var fileverCache = {}; module.exports =...
JavaScript
0.000416
@@ -561,29 +561,234 @@ var -newpath = orgPath + +reg = new RegExp ('((%5C%5C?%7C%5C%5C&%7C%5C%5C&amp%5C%5C;)' + options.suffix + '=)(%5B%5E&%5C%5Cs%5D+)', 'gi');%0A var newpath = orgPath;%0A if(reg.test(orgPath))%7B%0A newpath = orgPath.replace(reg, %22$1%22 + rev);%0A %7Delse%7B%0A new...
95045759ec759b82be45a82ee87f0b562cafd281
Remove unneeded var declaration
index.js
index.js
/** * Exports */ module.exports = Dispatcher; /** * Dispatcher prototype */ var dispatcher = Dispatcher.prototype; /** * Dispatcher * * @return {Object} * @api public */ function Dispatcher() { if (!(this instanceof Dispatcher)) return new Dispatcher; this.callbacks = []; }; /** * Register a new sto...
JavaScript
0.000001
@@ -976,18 +976,23 @@ %0A%0A -var array +if (undefined = = th @@ -1015,35 +1015,8 @@ ion%5D -;%0A%0A if (undefined == array ) th
1d6916e5fee8161241793b0cd34635a72e09aafe
Check for 200 before returning raw file
index.js
index.js
var assert = require('assert') , multiparty = require('multiparty') , knox = require('knox') , uuid = require('node-uuid') , mime = require('mime') , Batch = require('batch') , gm = require('gm') ; var Framer = module.exports = function Framer(opts) { if (typeof opts !== 'object') opts = {}; var sel...
JavaScript
0
@@ -4516,90 +4516,8 @@ );%0A%0A - if (sizeOptions === 'raw') %7B%0A return s3res.pipe(res);%0A %7D%0A%0A @@ -4636,32 +4636,122 @@ nd'));%0A %7D +%0A %0A if (sizeOptions === 'raw') %7B%0A return s3res.pipe(res);%0A %7D %0A%0A self._
e1994aba4595f9ba3b6940fbf71cc098a0fc9e7f
make treeFor work
index.js
index.js
'use strict'; var path = require('path'); var fs = require('fs'); function DraggableEach(project) { this.project = project; this.name = 'draggable-each'; } function unwatchedTree(dir) { return { read: function() { return dir; }, cleanup: function() { } }; } DraggableEach.prototype....
JavaScript
0.000005
@@ -17,21 +17,16 @@ ar path - = requir @@ -45,21 +45,16 @@ ar fs - = requir @@ -338,16 +338,32 @@ name) %7B%0A + var treePath;%0A if(nam @@ -368,9 +368,9 @@ ame -! += == ' @@ -393,25 +393,12 @@ ') %7B - return; %7D%0A%0A var +%0A tre @@ -448,16 +448,18 @@ nts');%0A%0A + if (fs @@ ...
94aa208a7fff0a634bc48713a8a8d365488a7647
Add physicalPath in response
index.js
index.js
var express = require('express'); var multer = require('multer'); var LRU = require('lru-cache'); var objectAssign = require('object-assign'); var debug = require('debug')('filebin'); var del = require('del'); var onUpload = function(req, res, next) { res.status(req.upload.code).json(req.upload.response); }; var on...
JavaScript
0.000001
@@ -1916,20 +1916,21 @@ or (var -name +index in req. @@ -1965,20 +1965,21 @@ q.files%5B -name +index %5D;%0A @@ -2066,32 +2066,42 @@ field: +file.field name,%0A @@ -2251,14 +2251,61 @@ ield -: name +: file.fieldname,%0A physicalPath: file.path ,%0A
b431f03c3ab3f5c2dee00afc65f61167231e5854
Return changelist as 'Number' type
index.js
index.js
'use strict'; var exec = require('child_process').exec; var p4options = require('./p4options'); function optionBuilder(options) { options = options || {}; var results = {stdin: [], args: [], files: []}; Object.keys(options).map(function (option) { var p4option = p4options[option]; if (!p4option) return...
JavaScript
0.005575
@@ -1517,48 +1517,106 @@ -return callback(null, (matched %7C%7C %5B%5D)%5B0%5D +if (matched.length %3E 0) return callback(null, parseInt(matched%5B0%5D, 10));%0A else return callback( );%0A
da3d8bf5855c8da80d17e090e9cb7dbd6514f0ec
add unique main() call
index.js
index.js
const fs = require('fs'); const phantom = require('phantom') const Slack = require('slack-node'); const slackify = require('slackify-html'); const USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'; // Retrieve config const login = require('./confi...
JavaScript
0.000001
@@ -3464,38 +3464,12 @@ %0A%7D%0A%0A -setInterval(main, checkInterval +main( );%0A
b6ebab9c9682d1fa4fbd637c10155eadb4d8ae6f
Improve error message formatting
index.js
index.js
'use strict'; const http = require('http'); const contentType = require('content-type'); const getRawBody = require('raw-body'); function _throwNoHandlerError() { throw new Error( 'Pardon me! A request handler is required.' + 'For Example: `(req, res) => res.end(\'ok\')`.' ); } function _throwNoReqError() { t...
JavaScript
0.000013
@@ -183,14 +183,14 @@ %0A%09%09' -Pardon +Excuse me! @@ -216,24 +216,25 @@ is required. + ' +%0A%09%09'For E @@ -242,16 +242,20 @@ ample: %60 +sir( (req, re @@ -275,16 +275,17 @@ (%5C'ok%5C') +) %60.'%0A%09);%0A @@ -386,16 +386,17 @@ equired. + ' +%0A%09%09'I @@ -453,16 +453,18 @@ the %60sir +() %60 meth...
d699b4a5e7e6a0609d0f8626fb4befe515eb6a8b
fix logic
index.js
index.js
/** * glob2fp <https://github.com/tunnckoCore/glob2fp> * * Copyright (c) 2014 Charlike Mike Reagent, contributors. * Released under the MIT license. */ 'use strict'; var parsePath = require('parse-filepath'); var isGlob = require('is-glob'); /** * Recursively extract real path from glob pattern * * **Example...
JavaScript
0.000244
@@ -1084,16 +1084,49 @@ opts) %7B%0A + if (!fp) %7B%0A return '';%0A %7D%0A%0A opts = @@ -1196,21 +1196,23 @@ ilepath) +; %0A %7D%0A +%0A if (is @@ -1249,16 +1249,17 @@ path(fp) +; %0A %7D%0A%0A @@ -1271,93 +1271,89 @@ n fp -.charAt(0) === '!' ? fp.slice(1) : fp; // is this need?%0A%0A function ma...
477045bdc10e4a520110de840e4f49dfd2833f96
use redis hmset
index.js
index.js
/* globals process */ 'use strict' const express = require('express') const app = express() const bodyParser = require('body-parser') const twitterParse = require('twitter-url-parser') const twitterAPI = require('node-twitter-api') const twitter = new twitterAPI({ consumerKey: process.env.TWITTER_CONSUMER_KEY, co...
JavaScript
0.000023
@@ -2134,19 +2134,21 @@ client. -set +HMSET ('reques @@ -3157,11 +3157,13 @@ ent. -set +HMSET ('ac
737c778e1d94df2c2ea238de211d4b13572332f3
fix escape character issue
index.js
index.js
#!/usr/bin/env node const fs = require('fs') const colors = { blue: '\x1b[47m \x1b[34m %s \x1b[0m \x1b[0m', red: '\x1b[47m \x1b[31m %s \x1b[0m \x1b[0m' } const createFile = (fileName, content) => { fs.writeFile(fileName, content, { flag: 'wx' }, (err) => { if (err) { if (err.code === 'EEXIST') { ...
JavaScript
0.000001
@@ -537,16 +537,50 @@ () =%3E %7B%0A + const os = require('os').type()%0A const @@ -599,16 +599,17 @@ s.cwd()%0A +%0A const @@ -624,16 +624,68 @@ hIndex = + (os === 'Windows_NT') ? cwd.lastIndexOf('%5C%5C') + 1 : cwd.las
285e29e43384950b5da26a0ac9ef3386ec49abff
fix lint error
index.js
index.js
'use strict'; const path = require('path'); const find = require('findit'); const Promise = require('promise'); const fs = require('fs-extra'); const mkdirp = require('mkdirp'); const extend = require('extend'); const atomicBuilder = {}; const getDirName = path.dirname; const processPath = process.cwd(); const getFi...
JavaScript
0.000006
@@ -3233,27 +3233,24 @@ './css'), ( -err ) =%3E %7B%0A @@ -4053,28 +4053,11 @@ th, -dist, './components' +src ), (
15e18308435e5a0c3f36a28b847f0e3bf66cec8c
Fix body limit
index.js
index.js
var concat = require('co-concat-stream'); module.exports = function(opts) { opts = opts || {}; opts.limit = opts.limit || 2<<20; // 1MB return function*(next) { var length = this.req.headers['content-length']; if(length > opts.limit) { this.throw(413); } var body = yield* concat(this.req, o...
JavaScript
0
@@ -120,17 +120,17 @@ imit %7C%7C -2 +1 %3C%3C20; //
1171fa0573ad037a9a692d09dfd0427bfe787d5a
Add to index
index.js
index.js
'use strict'; /** * This is a support factory which generates and returns AWS client instances * for various regions that have been wrapped in promise decorators * * This factory memoizes the api objects it returns. If the requested Api does * not already exist it is created, otherwise the existing one is returne...
JavaScript
0
@@ -938,24 +938,220 @@ Scaling'),%0A%0A + /**%0A * Returns a Promises compliant AWS.CloudFormation api.%0A *%0A * @param %7Bobject%7D options The AWS.CloudFormation constructor options.%0A */%0A cloudFormation: require('./cloudFormation'),%0A%0A /**%0A * R
90eac92151fb18803b5f930532dc224f35b4748e
fix default strategy to http-server
index.js
index.js
module.exports = function(options) { var options = options || {}; options.timeout = options.timeout || 10000; options.strategy = options.strategy || "http-servers"; if (options.strategy === "http-server") { return new (require("./lib/manager-servers.js"))(options); } if (options.strat...
JavaScript
0.000002
@@ -167,17 +167,16 @@ p-server -s %22;%0A%0A
4ab0ab7e9774fed46e41cee176391ca914cf2df4
need rev
index.js
index.js
var router = require('ramrod')(), form = require('formidable').IncomingForm(), http = require('http'), couchdb = require('felix-couchdb'), client = couchdb.createClient(), db = client.db('redwah'), web = require('./lib/web.js'), redwah = { version: "0.0.1", description: "dont trust your gut: make ...
JavaScript
0.999522
@@ -1575,32 +1575,44 @@ etDoc(params.id, + params.rev, function (err,
ab0019ba97389e78e982777aa701e019af8b3092
Add REPL history
index.js
index.js
'use strict'; const Promise = require('bluebird'); const repl = require('repl'); const os = require('os'); module.exports = function getPlugin(S) { const SCli = require(S.getServerlessPath('utils/cli')); const SError = require(S.getServerlessPath('Error')); class ServerlessRepl extends S.classes.Plugin { ...
JavaScript
0.000001
@@ -51,20 +51,18 @@ ;%0Aconst -repl +fs = requi @@ -65,20 +65,18 @@ equire(' -repl +fs ');%0Acons @@ -97,16 +97,95 @@ ('os');%0A +const repl = require('repl');%0A%0Aconst HISTORY_FILE_NAME = '.node_repl_history';%0A %0A%0Amodule @@ -1901,26 +1901,24 @@ - const projec @@ -1937,18 +1937,16 @@ je...
4ea5c565fdd73eefecfee0c4f33cf7a4f5f71716
Update index.js
index.js
index.js
'use strict'; let Accessory, Service, Characteristic, UUIDGen; const Homee = require("homee-api"); const nodeTypes = require("./lib/node_types"); let HomeeAccessory, WindowCoveringAccessory, HomeegramAccessory; module.exports = function(homebridge) { Service = homebridge.hap.Service; Characteristic = homebrid...
JavaScript
0
@@ -2013,9 +2013,10 @@ s %3E -5 +10 ) %7B%0A
1d459402dce2b26b999f14b9cd6cc99cc8c691d3
Add detconv.convertStream
index.js
index.js
'use strict'; const Buffer = require('buffer').Buffer; const Transform = require('stream').Transform; const jschardet = require('jschardet'); const iconv = require('iconv-lite'); const detconv = module.exports; const normalizeCharsetName = name => name.toLowerCase().replace(/_/g, '-'); detconv.convert = (input, enc...
JavaScript
0.000254
@@ -878,8 +878,824 @@ ng);%0A%7D;%0A +%0Aclass DetconvConvertStream extends Transform %7B%0A constructor(encoding, options) %7B%0A super(options);%0A this._encoding = encoding;%0A this._buffer = null;%0A %7D%0A _transform(chunk, encoding, done) %7B%0A if (!this._buffer) this._buffe...
f5571cba7eb866545aae77731a7c0aca3e219bfc
remove empty init function
index.js
index.js
/* eslint-env node */ 'use strict'; var path = require('path'); module.exports = { name: 'ember-cli-summernote', init: function() { }, contentFor: function(type, config) { // Const let summernoteConfig = config['ember-cli-summernote'] || {}; let summernotePath = 'bower_components/summernote/d...
JavaScript
0.000042
@@ -116,36 +116,8 @@ ',%0A%0A - init: function() %7B%0A%0A %7D,%0A%0A co
88dd255baeaa9dbc41c930b1502a078979a29b0c
Send authorization header optionally. (#10)
index.js
index.js
'use strict' const parseArgs = require('minimist'); const Storage = require('@google-cloud/storage'); const puppeteer = require('puppeteer'); async function uploadFile(argv, data) { let gsoptions = {}; if (!argv.local) { gsoptions.keyFilename = '/etc/pdfgen/service-account.json'; } let storage = Storag...
JavaScript
0
@@ -767,16 +767,33 @@ 'bucket' +, 'authorization' %5D,%0A b @@ -1062,16 +1062,49 @@ test.pdf + %5B--authorization %22Bearer token%22%5D ');%0A @@ -1247,16 +1247,142 @@ wPage(); +%0A%0A if (argv.authorization) %7B%0A await page.setExtraHTTPHeaders(%7B%0A 'Authorization': %60$%7Bargv.authorization%7D...
be2669112bafe577441e9a13ef6b2f05c0fb3596
update callable
index.js
index.js
'use strict'; const util = require('util'); const _EventEmitter = require('events'); function callable(instance) { return function(...args) { instance.call.apply(instance, args); }; } function wrapPromise(fn) { return function(...args) { return new Promise((resolve, reject) => { ...
JavaScript
0.000001
@@ -166,25 +166,12 @@ call -.apply(instance, +(... args
94f719f87cde5cfe3f98df5b65fe1416db1141c6
Add some indention
index.js
index.js
/* ListJS with beta 1.0.0 By Jonny Strömberg (www.jonnystromberg.com, www.listjs.com) */ (function( window, undefined ) { "use strict"; var document = window.document, getByClass = require('get-by-class'), extend = require('extend'), indexOf = require('indexof'); var List = function(id, options, values) { va...
JavaScript
0.001309
@@ -4,26 +4,17 @@ List -JS with beta 1.0.0 +.js 1.1.1 %0ABy @@ -478,16 +478,18 @@ lass + = %22list%22 @@ -514,16 +514,18 @@ hClass + + = %22searc @@ -548,24 +548,26 @@ ortClass + + = %22sort%22;%0A @@ -586,16 +586,20 @@ e + + = 200;%0A @@ -617,16 +617,22 @@ + = ...
c8b40de5f8ebc152cc5f9103fcd72a6d72f31a68
Add ability to size files within modules
index.js
index.js
const path = require('path'); const fs = require('fs'); const os = require('os'); const npm = require('npm'); const webpack = require('webpack'); const uglify = require('uglify-js'); const gzipSize = require('gzip-size'); const tmp = os.tmpdir(); const index = path.join(tmp, 'index.js'); const bundle = path.join(tmp, ...
JavaScript
0
@@ -403,32 +403,233 @@ (packageName) %7B%0A + // Ignore path after module name such as %60express/lib/application'%0A // Also supports scoped modules such as '@rill/http/adapter/browser'%0A packageName = packageName.match(/%5E(@%5B%5E%5C/%5D+%5C/)?%5B%5E%5C/%5D+/)%5B0%5D%0A%0A return new Pro
b942d8e11e4b12a38fdc92d62c93a6babfefa00a
Drop queue size argument
index.js
index.js
'use strict'; var xhr = require('xhr'); var queue = require('d3-queue').queue; module.exports = geocodemany; function geocodemany(accessToken, throttle) { throttle = (throttle === undefined) ? 200 : throttle; return function(list, transform, progress, callback) { var q = queue(1), todo = list.length, ...
JavaScript
0.000001
@@ -283,17 +283,16 @@ = queue( -1 ),%0A
671d861d798ff3c21ca35d1d685c2b99ba6cf815
fix url transformation for the flat option
index.js
index.js
/** * gulp-html-dependencies * Copyright(c) 2016 Sébastien Demanou * MIT Licensed */ 'use strict'; /** * Module dependencies. * @private */ var es = require('event-stream') , gutil = require('gulp-util') , mkdirp = require("mkdirp") , path = require('path') , fs = require('fs'); const PLUGIN_NAME = ...
JavaScript
0.000006
@@ -902,35 +902,11 @@ nst -dest_file = path.join(dest, +f = opt @@ -951,16 +951,124 @@ filename +;%0A const dest_file = path.join(dest, f);%0A const url_file = path.join(options.prefix, f );%0A @@ -1455,43 +1455,16 @@ e + -path.join(options.prefix, filename) +url_file + q
13b4c11b05290623c5fdf8e20a2d008f39d7d55e
Handle SMS verification
index.js
index.js
var http = require('http') var request = require('request') var omit = require('lodash.omit') var parseUrl = require('url').parse var decamelize = require('decamelize') var PORT = 8488 var REDIRECT_URI = 'http://localhost:' + PORT var BASE_URL = 'https://accounts.google.com/o/oauth2/auth' var GOOGLE_OAUTH2_TOKEN_URL =...
JavaScript
0
@@ -161,16 +161,48 @@ melize') +%0Avar prompt = require('prompt'); %0A%0Avar PO @@ -670,24 +670,25 @@ er(callback) +; %0A%0A nightm @@ -714,24 +714,154 @@ (800, 1600)%0A + .useragent('Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36')%0A ....
c9b44b790fc12d5decea6f7fe035746e45f33cd9
remove `require-optimization` rule
index.js
index.js
'use strict'; module.exports = { parserOptions: { ecmaFeatures: { jsx: true } }, plugins: [ 'react' ], rules: { 'react/no-danger': 2, 'react/no-deprecated': 2, 'react/no-did-update-set-state': 2, 'react/no-direct-mutation-state': 2, 'react/no-find-dom-node': 2, 'react/no-is-mounted': 2, 'rea...
JavaScript
0
@@ -469,43 +469,8 @@ 2,%0A -%09%09'react/require-optimization': 2,%0A %09%09'r
8b500f74a72e25a3143d9d95cdd3a1b42ae3d20f
Fix random merge error?
index.js
index.js
var app = require('express')(); var bodyParser = require('body-parser'); var http = require('http').Server(app); var path = require('path'); var io = require('socket.io')(http); var usernames = []; var routes = require('./routes/index'); //mongoose/mongodb **NEED THIS IN ORDER FOR TEXT TO APPEAR ON PAGE OPEN** var mo...
JavaScript
0.000002
@@ -2971,24 +2971,27 @@ doc)%7B%0A + // doc.title = @@ -3175,29 +3175,24 @@ title: -updatedDocNam +doc.titl e%7D);%0A
e5011a86e6cbf0e0a381cf8db24dd842119e40a9
add version report
index.js
index.js
module.exports = doctor function doctor (args, cb) { cb("The doctor is out") }
JavaScript
0
@@ -22,61 +22,1228 @@ or%0A%0A -function doctor (args, cb) %7B%0A cb(%22The doctor is out%22 +var npm = require(%22npm%22)%0Avar semver = require(%22semver%22)%0Avar npmlog = require(%22npmlog%22)%0A%0Avar stdout = process.stdout%0A%0Avar OLD_STABLE_NODE = %220.8.28%22%0Avar STABLE_NODE = %220.10.33%22%0A%0Avar LATES...
a3e655b5c338c62ab73b669a33fe67aa720f4170
Fix path
index.js
index.js
'use strict'; let getArticlesFromLink = require('../lib/board').getArticlesFromLink; let getArticleFromLink = require('../lib/article').getArticleFromLink; module.exports = { getArticlesFromLink, getArticleFromLink, };
JavaScript
0.000018
@@ -40,25 +40,24 @@ = require('. -. /lib/board') @@ -113,17 +113,16 @@ quire('. -. /lib/art
cf3a8a3620e4fa655b8362961f694c33a29f9de2
fix syntax error.
index.js
index.js
var isolines = require('turf-isolines'), grid = require('turf-grid'), destination = require('turf-destination'), point = require('turf-point'), distance = require('turf-distance'), extent = require('turf-extent'), featureCollection = require('turf-featurecollection'), polylineDecode = requir...
JavaScript
0
@@ -3144,16 +3144,18 @@ gth - 1) + %7B continu @@ -3156,16 +3156,18 @@ ontinue; + %7D %0A
24ae87eca54f0baa1a379c21cac17fcc3c70f10c
Use multiple var statements and `Object.create`
index.js
index.js
function Fs() {} Fs.prototype = require('fs') var fs = new Fs() , Promise = require('promise') module.exports = exports = fs for (var key in fs) if (!(typeof fs[key] != 'function' || key.match(/Sync$/) || key.match(/^[A-Z]/) || key.match(/^create/) || key.match(/^(un)?watch/) )) ...
JavaScript
0
@@ -1,36 +1,27 @@ -function Fs() %7B%7D%0AFs.prototype = +var fs = Object.create( requ @@ -33,30 +33,13 @@ fs') +) %0Avar - fs = new Fs()%0A , Pro
8dfa8c86d0c3247094dc865734f280863b2211f9
Add dir parameter to run function.
index.js
index.js
const puppeteer = require("puppeteer"); const fs = require("fs"); const colors = require("colors/safe"); const path = require("path"); const cli = require("./modules/cli.js"); const configParser = require("./modules/config.js"); const runner = require("./modules/runner.js"); const Table = require('cli-table'); module....
JavaScript
0
@@ -337,20 +337,27 @@ nction ( +rootDir ) %7B%0A - %0A%09// pro @@ -424,25 +424,23 @@ Command( -__dirname +rootDir );%0A%09cli. @@ -638,25 +638,23 @@ uration( -__dirname +rootDir , comman @@ -1244,25 +1244,23 @@ ion=%22 + -__dirname +rootDir + path. @@ -1570,17 +1570,15 @@ sts( -__dirname +rootDir , br
df47faf789f8819b86ef244479d9cc0725a3f5cf
add null option
index.js
index.js
// 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, copy, modify, merge...
JavaScript
0.000003
@@ -3810,16 +3810,24 @@ s.statsd + %7C%7C null ;%0A if
6827ac7eb23f2c3e732fdc9e232ab0a763049b1f
Make polyfill run lazily
index.js
index.js
'use strict'; // focusin polyfill for firefox require('focusin'); var tabbable = require('tabbable'); function init(element) { function focus() { (tabbable(element)[0] || element).focus() } function onFocusIn(event) { if (element !== event.target && !element.contains(event.target)) { focus(); ...
JavaScript
0.000002
@@ -12,61 +12,8 @@ ';%0A%0A -// focusin polyfill for firefox%0Arequire('focusin');%0A%0A var @@ -70,16 +70,81 @@ ment) %7B%0A +%0A // lazily polyfill focusin for firefox%0A require('focusin');%0A%0A functi
d5912bb431f60f54c76a80b53f369ce32db816ef
Fix a bug that caused a crash if a websocket server sent a empty string.
index.js
index.js
var through = require('through') var isBuffer = require('isbuffer') var WebSocketPoly = require('ws') function WebsocketStream(server, options) { if (!(this instanceof WebsocketStream)) return new WebsocketStream(server, options) this.stream = through(this.write.bind(this), this.end.bind(this)) this.stream.web...
JavaScript
0
@@ -1193,24 +1193,31 @@ a = e%0A if ( +typeof data.data) d @@ -1213,16 +1213,32 @@ ata.data + !== 'undefined' ) data = @@ -1248,18 +1248,16 @@ ta.data%0A - %0A // ty
2b3001dcae0212ed54b0432f3f74557d7c947147
Format URL pathname
index.js
index.js
/** * Dependencies. */ const url = require('url').parse const query = require('querystring').parse const Readable = require('readable-stream').Readable const content = require('request-content') const pass = require('morph-stream') const status = require('response-error') const routes = require('manner-path') /** ...
JavaScript
0.000002
@@ -312,47 +312,259 @@ ')%0A%0A +%0A /**%0A * -This is a simple description.%0A * +Create HTTP endpoint from an object containing%0A * HTTP methods (lowercase).%0A *%0A * Examples:%0A *%0A * %60%60%60js%0A * const service = require('manner')%0A * service(%7B%0A * get(query, data) %7B%0A * // return s...
1fba7fb93d23f71b5fe0be590a148ee684e09c34
fix handling of unterminated comment. Closes #24
index.js
index.js
module.exports = function(css){ /** * Parse stylesheet. */ function stylesheet() { return { stylesheet: { rules: rules() }}; } /** * Opening brace. */ function open() { return match(/^{\s*/); } /** * Closing brace. */ function close() { return match(/^}\s*/); } ...
JavaScript
0
@@ -1090,32 +1090,33 @@ css%5B1%5D) return;%0A +%0A var i = 2;%0A @@ -1123,16 +1123,35 @@ while + (null != css%5Bi%5D && ('*' != @@ -1179,16 +1179,17 @@ %5Bi + 1%5D) +) ++i;%0A @@ -1198,24 +1198,25 @@ i += 2;%0A +%0A var comment @@ -1207,23 +1207,19 @@ var -comment +str = css.s @@ -12...