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
b938dbc89bad4d4399ec0226291fd39157fc23d3
upgrade for streams2 levelup readstream
index.js
index.js
var ReadStream = require("read-stream") , WriteStream = require("write-stream") , wrap = require("streams2") module.exports = query function query(db, options) { options = options || {} var queue = ReadStream() , stream = queue.stream , start = options.start , end = options.en...
JavaScript
0
@@ -80,41 +80,8 @@ am%22) -%0A , wrap = require(%22streams2%22) %0A%0Amo @@ -351,13 +351,8 @@ r = -wrap( db.r @@ -369,17 +369,16 @@ options) -) %0A%0A re
c97f83992c9591b51bf6aef7daeea5aa75fbcedb
fix flags encoding
index.js
index.js
exports.encode = encode exports.decode = decode exports.encodingLength = encodingLength decode.bytes = encode.bytes = 0 function encode (packet, buf, offset) { if (!buf) buf = new Buffer(exports.encodingLength(packet)) if (!offset) offset = 0 buf[offset] = packet.version << 4 | (packet.ihl || 5) buf[offset + ...
JavaScript
0.00012
@@ -556,16 +556,25 @@ t %7C%7C 0), + offset + 6)%0A bu
de6eb83801737d86f1d73650d6ce5889676fdbbb
remove access control header
index.js
index.js
const express = require('express') const { getPronounciation } = require('./word') const port = process.env.PORT || 5000 const envTask = (dev = () => { }, prod = () => { }) => { const env = process.env.NODE_ENV return (env === 'development' ? dev() : prod()) } const app = express() app.set('port', port) app.set...
JavaScript
0
@@ -376,16 +376,19 @@ 'ejs')%0A%0A +// app.use( @@ -405,24 +405,27 @@ next) =%3E %7B%0A +// res.header @@ -461,18 +461,21 @@ ', '*')%0A +// + res.head @@ -515,16 +515,19 @@ , '*')%0A%0A +// next() @@ -527,16 +527,19 @@ next()%0A +// %7D)%0A%0Aapp.
0f313a0862638f06d53da84b26d6c9643f33d988
Allow publish thru exchange
index.js
index.js
var maxPossibleDelay = Math.pow(2,32) - 1; module.exports = function scheduler(conn, opt) { opt = opt || {}; opt.separator = opt.separator || '.'; opt.prefix = opt.prefix || 'schedule'; opt.threshold = opt.threshold || 10000; opt.round = opt.round || 1000; return function publish(exchange, route, message, ...
JavaScript
0
@@ -82,22 +82,34 @@ onn, opt +, exchange ) %7B%0A + + opt = op @@ -117,16 +117,18 @@ %7C%7C %7B%7D;%0A + opt.se @@ -159,16 +159,18 @@ %7C%7C '.';%0A + opt.pr @@ -200,24 +200,26 @@ chedule';%0A + + opt.threshol @@ -246,16 +246,18 @@ 10000;%0A + opt.ro @@ -281,18 +281,21 @@ %7C 1000;%0A ...
b1d8f17e6c8364d419cf6d8cbd716e49ade79f6f
verify that the object is not an array
index.js
index.js
var extend = require("xtend") module.exports = DeepMerge function DeepMerge(merger) { return deepmerge function deepmerge(target, source, key) { if (Array.isArray(source) && Array.isArray(target)) { return merger(target, source, key) } else if (isObject(source) && isObject(target)...
JavaScript
0.999438
@@ -1043,16 +1043,37 @@ ject%22 && + !Array.isArray(x) && x !== n
e7a373f99705ef47699ce77b2abaec9c8ae27023
fix path to loadstyle.js. hopefully this is the very last time we see this commit message
index.js
index.js
const loadStylePath = require.resolve("bit-loader-css/loadstyle.js"); const loadStyleName = "$bit-loader-css/loadstyle"; var defaults = { match: { extensions: ["css"], name: loadStyleName }, resolve: function(meta) { if (meta.name === loadStyleName) { return { path: loadStylePath ...
JavaScript
0
@@ -1,24 +1,15 @@ const -loadStyleP +p ath = re @@ -17,33 +17,62 @@ uire -.resolve(%22bit-loader-css/ +(%22path%22);%0Aconst loadStylePath = path.join(__dirname, %22 load
fa5baa77730e68a9d1f2e31f80695e3ea7e7f160
Use a slightly simpler separator
index.js
index.js
'use strict'; var setHeader = require('setheader') , parse = require('url').parse , ms = require('ms'); /** * Configure the CORS / Access Control headers. * * @param {Object} options Configuration * @returns {Function} * @api public */ function access(options) { options = options || {}; // The allowed ...
JavaScript
0.000413
@@ -1662,16 +1662,35 @@ %7D%0A%0A var + re = /%5B, %5D+/%0A , methods @@ -1724,34 +1724,26 @@ ase().split( -/%5B%5C,%7C%5Cs%5D+/ +re ).filter(Boo @@ -1796,34 +1796,26 @@ ase().split( -/%5B%5C,%7C%5Cs%5D+/ +re ).filter(Boo @@ -1876,18 +1876,10 @@ lit( -/%5B%5C,%7C%5Cs%5D+/ +re ).fi
d3c5fe6bf32f309d09a37003761fa3cf3002a08a
Allow lazypipe-s in assets
index.js
index.js
'use strict'; var gutil = require('gulp-util'), through = require('through2'), useref = require('node-useref'), path = require('path'); function getSearchPaths(cwd, searchPath, filepath) { // Check for multiple search paths within the array if (searchPath.indexOf(',') !== -1) { return searc...
JavaScript
0.99906
@@ -3574,16 +3574,18 @@ e(stream +() );%0A
7252bf6e86b85fc7629c9c90a2abc501763bcc38
解决重复 import 问题,highlight 参数改为默认 true
index.js
index.js
var loaderUtils = require('loader-utils'); var MarkdownIt = require('markdown-it'); var hljs = require('highlight.js'); var path = require('path'); module.exports = function (source) { this.cacheable(); var options = loaderUtils.getOptions(this); var markdownOptions = { html: true }; ...
JavaScript
0.00074
@@ -305,69 +305,18 @@ true -%0A %7D;%0A if (options.highlight) %7B%0A markdownOptions. +,%0A high @@ -320,18 +320,17 @@ ighlight - = +: functio @@ -397,24 +397,102 @@ ;%0A %7D%0A + %7D;%0A if (options.highlight) %7B%0A delete markdownOptions.highlight;%0A %7D%0A%0A ...
de31c19601290ae761b156bd58c63b0e516f42a5
Remove complex code for now
index.js
index.js
const config = require('./config.js'); console.info(`Creating ${config.bots.length} bots`); global.Olm = require('olm'); const sdk = require('matrix-js-sdk'); const fs = require('fs'); const makeMessageResponder = require('personality-helper'); config.bots.forEach((botConfig) => { console.info(`Starting PoliteAI ...
JavaScript
0.000002
@@ -2504,24 +2504,26 @@ +/* const room_k @@ -2565,16 +2565,17 @@ sha256', + salt)%0A @@ -2694,16 +2694,18 @@ ase64'); +*/ %0A @@ -2844,17 +2844,8 @@ in/' -+room_key );%0A%0A
7ea32e95cf8a9255f61e52739f9661cc5a759ec8
Rename `mutableListener` to `linkedObserver`
index.js
index.js
'use strict'; var assign = require('es5-ext/object/assign') , d = require('d') , autoBind = require('d/auto-bind') , lazy = require('d/lazy') , toStringTagSymbol = require('es6-symbol').toStringTag , ee = require('event-emitter') , is ...
JavaScript
0.000035
@@ -684,37 +684,36 @@ nge', this._ -mutableListen +linkedObserv er);%0A%09%09value @@ -1087,37 +1087,36 @@ nge', this._ -mutableListen +linkedObserv er);%0A%09%09%7D%0A%09%09i @@ -1246,29 +1246,28 @@ , this._ -mutableListen +linkedObserv er);%0A%09%09%09 @@ -2208,21 +2208,20 @@ %7B%0A%09_ -mutableListen +linkedO...
4d693a71e712f74c2ce5ecbd7d7534accdbfb164
add use strict, fix global variable
index.js
index.js
/** * @license simple-loop https://github.com/flams/simple-loop * * The MIT License (MIT) * * Copyright (c) 2014 Olivier Scherrer <pode.fr@gmail.com> */ var assert = require("assert"); /** * Small abstraction for looping over objects and arrays * Warning: it's not meant to be used with nodeList * To use with nodeLi...
JavaScript
0.000001
@@ -146,16 +146,31 @@ com%3E%0A*/%0A +%22use strict%22;%0A%0A var asse @@ -900,16 +900,20 @@ for ( +var i in ite
9b930445a4912599c1ac2c32eb47066b2f81dc3c
return value from get
index.js
index.js
module.exports = function (max) { var size = 0, cache = {}, _cache = {} function update (key, value) { cache[key] = value size ++ if(size >= max) { size = 0 _cache = cache cache = {} } } return { get: function (key) { var v = cache[key] if(v) return v if...
JavaScript
0.000001
@@ -330,16 +330,26 @@ he%5Bkey%5D) + %7B%0A update( @@ -356,16 +356,41 @@ key, v)%0A + return v%0A %7D%0A %7D,%0A
e9ddde55e65218e235da56f4c86a6b3037c9d9a2
Support unquoted data URLs
index.js
index.js
/** * Module dependencies. */ var debug = require('debug')('css-parse'); module.exports = function(css){ /** * Parse stylesheet. */ function stylesheet() { return { stylesheet: { rules: rules() }}; } /** * Opening brace. */ function open() { return match(/^{\s*/); } /** * C...
JavaScript
0.99801
@@ -1667,16 +1667,28 @@ %22%7C.)*?%22%7C +%5C(%5B%5E%5C)%5D*?%5C)%7C %5B%5E%7D;%5D)+)
d50b53af071649b081939e9143fd7348bdd0bd7a
add help screen if no filename was displayed
index.js
index.js
#!/usr/bin/env node var link = require('./link.js'), program = require('commander'); program .version('1.0.0') .option('-f, --filename [filename]', 'Link only the specified [filename]', '') .parse(process.argv); link.linkNewFile(program.filename);
JavaScript
0.000002
@@ -212,16 +212,108 @@ argv);%0A%0A +// display the help if no filename was passed%0Aif (! program.filename) %7B%0A%09program.help();%0A%7D%0A%0A link.lin @@ -339,8 +339,9 @@ lename); +%0A
3e41e5f548037c263f49cc436dbd1732e5a99785
make UUP same colours as Conservatives
index.js
index.js
'use strict'; var data = { 'lab':{ short:'Lab', full:'Labour', class:'labour', populous:'Labour', colour:'#e25050', electionForecast:'Labour', secondaryColour:'#bf1f1f' }, 'c':{ short:'Con', full:'Conservatives', class:'conservative', populous:'Tory', colour:'#6da8...
JavaScript
0.000006
@@ -2236,38 +2236,38 @@ ',%0A colour:'# -827996 +6da8e1 ',%0A electionF @@ -2299,30 +2299,30 @@ aryColour:'# -443e71 +1369bf '%0A %7D%0A%7D;%0A%0Afu
ee3a7cd13811c07bae3e55ad8d52f3471edf9446
Fix bug for webpack v4.x
index.js
index.js
function HtmlReplaceWebpackPlugin(options) { options = Array.isArray(options) ? options : [options] options.forEach(option => { if (typeof option.pattern == 'undefined' || typeof option.replacement == 'undefined') { throw new Error('Both `pattern` and `replacement` options must be defined!') } }) ...
JavaScript
0
@@ -1384,26 +1384,18 @@ r.hooks. -compilatio +ru n.tap('H
895c20d738894329a3fdb94d57915c19fb2b0215
Remove forgotten module reference
index.js
index.js
"use strict"; // nodeca var NLib = require('nlib'); module.exports = NLib.Application.create({ root: __dirname, name: 'nodeca.core', bootstrap: function (nodeca, callback) { // empty bootstrap... for now.. callback(); } }); // // Register filters // require('./lib/filters'); // // Preinitializ...
JavaScript
0
@@ -395,34 +395,4 @@ ');%0A -require('./lib/permissions');%0A
88c6c0dd9e4a9efee64fdc01290c29f264663051
Change specifying plugins to new 1.0.0 format API.
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-cli-deploy-yapp-pack', getConfiguration: function(prefix, appName, deployTarget) { var Promise = require('ember-cli/lib/ext/promise'); var VALID_DEPLOY_TARGETS = [ 'dev', 'devindex', 'qa', 'prod' ]; var E...
JavaScript
0
@@ -663,16 +663,39 @@ %7D%0A %7D; +%0A ENV.pipeline = %7B%7D; %0A%0A if @@ -1039,57 +1039,75 @@ NV.p -lugins = %5B'build', 'redis'%5D; // only redis in dev +ipeline.disabled = %7B%0A allExcept: %5B'build', 'redis'%5D%0A %7D; %0A @@ -1167,29 +1167,17 @@ pipeline - = %7B%0A +. activa...
85ca26c073998a89e9931f1903094eea71c4f69d
Support Promise in convert_by_someone
index.js
index.js
var chance = require('chance').Chance(); function Rpncc() { var myself = this; /** Operators allowed in this program. These values declare the precedence. */ const operators = { "^": 4, "*": 3, "/": 3, ...
JavaScript
0
@@ -4075,18 +4075,8 @@ sion -, callback ) %7B%0A @@ -4131,63 +4131,31 @@ = %7B -author: chance.name()%7D;%0A result.gender = +representative: chance. gend @@ -4154,16 +4154,15 @@ nce. -gender +name () +%7D ;%0A%0A @@ -4216,18 +4216,27 @@ -e r +esult.erro r = Erro @@ -4260,14 +4260,22 @@ u...
f12af5ce2083668157d70542d5fefbe13c8237f7
support refresh command
index.js
index.js
var skynet = require('skynet'); module.exports = function(config) { var skynetConnection = skynet.createConnection({ uuid: config.uuid, token: config.token }); var deviceManager = require('./device-manager')({ uuid: config.uuid, token: config.token, devicePath: config.devicePath, tmpPath: config.tm...
JavaScript
0.000001
@@ -636,36 +636,28 @@ %0A%0A -skynetConnection.on('ready', +var refreshDevices = fun @@ -658,29 +658,26 @@ = function( -data ) + %7B%0A skynet @@ -694,20 +694,18 @@ .whoami( -data +%7B%7D , functi @@ -779,64 +779,208 @@ %0A %7D -);%0A%0A skynetConnection.on('message', function(message)%7B%0A +%0A%0A ...
bdfb13802ef9bae3a4841c7b3d4720f6731e3b73
Add Stop, Cancel, and Help intents
index.js
index.js
var Alexa = require('alexa-sdk'); var parse = require('xml2js').parseString; var request = require('request'); exports.handler = function(event, context, callback){ var alexa = Alexa.handler(event, context); alexa.registerHandlers(handlers); alexa.execute(); }; var handlers = { // TODO "Is there a new XKCD?"...
JavaScript
0
@@ -294,44 +294,413 @@ TODO - %22Is there a new XKCD?%22%0A%09'IsThereNew +: Handle the %22Open XKCD%22 command correctly and store sessions%0A%0A%09// TODO %22Is there a new XKCD?%22%0A%09'IsThereNewIntent' : function() %7B%0A%09%7D,%0A%0A%09// TODO: This needs to ask a question back to the user%0A%09'AMAZON.HelpInte...
a015a759ca87663dcaaf328c01c0359059d9d791
fix typeError
index.js
index.js
var spawn = require('child_process').spawn; module.exports = function (file, opts, cb) { if (typeof opts === 'function') { cb = opts; opts = {}; } if (!opts) opts = {}; var ed = /^win/.test(process.platform) ? 'notepad' : 'vim'; var editor = opts.editor || process.env.VISUAL ||...
JavaScript
0.000005
@@ -649,17 +649,16 @@ ) %7B%0A -( process. @@ -674,18 +674,50 @@ RawMode -%7C%7C +? process.stdin.setRawMode(mode) : tty.set @@ -723,17 +723,16 @@ tRawMode -) (mode);%0A
2059de3d35ca6d7b08a107e4b129f9e80fbf281a
use common promise fail handler
index.js
index.js
var Q = require('q'); module.exports = Qedis; function Qedis(redisClient) { this.redisClient = redisClient; } Qedis.prototype.exists = function(cacheKey) { return Q.ninvoke(this.redisClient, 'exists', cacheKey) .fail(function(err) { console.log(err); throw err; }); }; Qedis.prototype.fetch = functio...
JavaScript
0
@@ -224,65 +224,22 @@ il(f -unction(err) %7B%0A console.log(err);%0A throw err;%0A %7D); +ailureHandler) %0A%7D;%0A @@ -496,65 +496,22 @@ il(f -unction(err) %7B%0A console.log(err);%0A throw err;%0A %7D); +ailureHandler) %0A%7D;%0A @@ -652,65 +652,22 @@ il(f -unction(err) %7B%0A console.log(err);%...
f69412af01914deb179508793519584847a79df6
Use correct destination directory
index.js
index.js
'use strict'; var gutil = require('gulp-util'); var path = require('path'); var through = require('through2'); var css = require('css'); var fs = require('fs'); module.exports = function (opts) { return through.obj(function (file, enc, cb) { if (file.isNull()) { cb(null, file); return; } if...
JavaScript
0.000002
@@ -2050,19 +2050,8 @@ oin( -__dirname, (opt
230dd4a46d1e95ff55fa9b0bc248fb872efd7e15
Implement _clear
index.js
index.js
'use strict'; var flatten = require('es5-ext/array/#/flatten') , constant = require('es5-ext/function/constant') , setPrototypeOf = require('es5-ext/object/set-prototype-of') , ensureString = require('es5-ext/object/validate-stringifiable-value') , ensureObject = require('es5-ex...
JavaScript
0.99997
@@ -5358,24 +5358,106 @@ romise;%0A%09%7D), +%0A%09_clear: d(function () %7B%0A%09%09return this.collection.invokeAsync('deleteMany');%0A%09%7D), %0A%0A%09// Connec
cc222b860c1b31daaba993d6fe5a38ac3a382211
Replace React.createClass
index.js
index.js
'use strict'; var React = require('react'); var PropTypes = require('prop-types') var Immutable = require('immutable'); var window = require('global/window'); var document = require('global/document'); var r = require('r-dom'); var WebGLHeatmap = require('webgl-heatmap'); var ViewportMercator = require('viewport-merca...
JavaScript
0
@@ -75,16 +75,71 @@ -types') +;%0Avar createReactClass = require('create-react-class'); %0Avar Imm @@ -471,20 +471,19 @@ s = -React. create +React Clas
8be6c5b8406d36c09ef81d83289096447d237803
Fix Typo
index.js
index.js
'use strict'; /** * Module dependencies. */ var Client = require('mongodb').MongoClient, uri = require('mongodb-uri'), zlib = require('zlib'), noop = function () {}; /** * Export `MongoStore`. */ exports = module.exports = { create : function (args) { return MongoStore(args); } }; /** * MongoStore con...
JavaScript
0.000009
@@ -742,16 +742,20 @@ %7B%0A +var MongoOpt @@ -2222,18 +2222,16 @@ %7D);%0A %7D -); %0A%0A /**%0A
4a2e13f3300d6e054906887975d73d734d490216
add option for selecting amazon region
index.js
index.js
var ses = require('node-ses'); var SimpleSESAdapter = sesOptions => { if (!sesOptions || !sesOptions.apiKey || !sesOptions.apiSecret || !sesOptions.domain || !sesOptions.fromAddress) { throw 'SimpleSESAdapter requires an API Key, domain, and fromAddress.'; } var client = ses.createClient({ key: sesOptions....
JavaScript
0
@@ -262,16 +262,115 @@ .';%0A %7D%0A + %0A if(!sesOptions.amazon)%7B%0A sesOptions.amazon = 'https://email.us-east-1.amazonaws.com'%0A %7D%0A %0A var c @@ -448,16 +448,44 @@ piSecret +, amazon : sesOptions.amazon %7D);%0A%0A
ff426006a5cc267a1601c13d227cd19630e8421b
Support FreeBSD and OpenBSD
index.js
index.js
var os = require('os'); var platform = os.platform(); module.exports = { win: platform.match(/^win/), linux: platform === 'linux', mac: platform === 'darwin' };
JavaScript
0.000001
@@ -168,12 +168,47 @@ 'darwin' +,%0A bsd: platform.match(/bsd$/) %0A%7D;%0A
a2f85d74c83803ed4b6155f7c1f54b2fe0a1e276
Improve native WeakMap check for newer node versions
index.js
index.js
'use strict'; var assert = require('assert'); var WM = require('es6-weak-map'); var hasNativeWeakmap = require('es6-weak-map/is-native-implemented'); var defaultResolution = require('default-resolution'); var runtimes = new WM(); function isFunction(fn){ return (typeof fn === 'function'); } function isExtensible...
JavaScript
0
@@ -82,27 +82,21 @@ %0Avar has -Native Weak -m +M ap = req @@ -121,15 +121,8 @@ /is- -native- impl @@ -318,21 +318,17 @@ (has -Native Weak -m +M ap +() )%7B%0A
8a6f8178971950b9f410b4786ee3c8f42408c754
implement multiply, and modInt
index.js
index.js
//add two buffers, //putting least significant at left will be simplest. exports.add = function (a, b, c) { var l = Math.max(a.length, b.length) if(!c) c = new Buffer(l); c.fill() var carry = 0 for(var i = 0; i < l; i++) { var v = (a[i] || 0) + (b[i] || 0) + carry c[i] = v & 0xff carry = v >> 8 ...
JavaScript
0.000001
@@ -893,24 +893,948 @@ A - B%0A %7D%0A return c%0A%7D%0A +%0Aexports.mul =%0Aexports.multiply = function (a, b, c) %7B%0A var l = Math.max(a.length, b.length)%0A if(!c) c = new Buffer(l)%0A c.fill()%0A //for each place in A, multiply each place in B,%0A //and add it to the running total.%0A for(var i = 0; i %...
121b7754b5e1e01b7c995d6c7627123f20c27d46
remove typo in deprecation message
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-try', init: function() { this._super.init && this._super.init.apply(this, arguments); if (this.project.pkg.devDependencies && this.project.pkg.devDependencies['ember-try']) { this.ui.writeDeprecateLine('ember-try is now included wi...
JavaScript
0.003064
@@ -369,16 +369,17 @@ is unnec +e ssary.')
60864875c891560a8989c59d0e8490a24e38e3b7
Enable bootstrapping
index.js
index.js
#!/usr/bin/env node const parseConfig = require('./lib/parse-config'); const getFiles = require('./lib/get-files'); const parseFiles = require('./lib/parse-files'); const handleDrafts = require('./lib/handle-drafts'); const setPaths = require('./lib/set-file-paths'); const render = require('./lib/render'); const writeF...
JavaScript
0.000001
@@ -386,25 +386,25 @@ ;%0Aconst -parseArgs +bootstrap = requi @@ -417,244 +417,293 @@ lib/ -parse-args');%0A%0AparseArgs()%0A .then( args =%3E path.isAbsolute(args.config) ? args.config : path.resolve(__dirname, args.config))%0A .then( configPath =%3E parseConfig(configPath) )%0A .then( config =%3E %7B%0A...
54e48051d88429d33f893dae73e9aa40d89a98c9
Remove updateReachability that was removed from the HAP-NodeJS API
index.js
index.js
'use strict'; const Hs100Api = require('hs100-api'); var Accessory, Service, Characteristic, UUIDGen; module.exports = function (homebridge) { Accessory = homebridge.platformAccessory; Service = homebridge.hap.Service; Characteristic = homebridge.hap.Characteristic; UUIDGen = homebridge.hap.uuid; homebridg...
JavaScript
0
@@ -884,65 +884,8 @@ d);%0A - accessory.accessory.updateReachability(false);%0A @@ -1239,64 +1239,8 @@ d);%0A - accessory.accessory.updateReachability(true);%0A @@ -5616,56 +5616,8 @@ %3E %7B%0A - this.accessory.updateReachability(true);%0A%0A
cb5c9d6f9445d2fbc4e050d7bb3f2dc39c8e829d
debug removed
index.js
index.js
'use strict' const app = require('./app'); const http = require('http'); const port = normalizePort(process.env.PORT || '3000'); app.set('port', port); const server = http.createServer(app); server.listen(port); server.on('error', onError); server.on('listening', onListening); function normalizePort(val) { cons...
JavaScript
0
@@ -1203,39 +1203,6 @@ rt;%0A - debug('Listening on ' + bind);%0A %7D%0A
bfc451706280a390e95f4b94cba424f72f300599
Call callback with proper context
index.js
index.js
import Vue from 'vue'; export var version = '2.2.1'; var compatible = (/^2\./).test(Vue.version); if (!compatible) { Vue.util.warn('VueClickaway ' + version + ' only supports Vue 2.x, and does not support Vue ' + Vue.version); } // @SECTION: implementation var HANDLER = '_vue_clickaway_handler'; function bind(...
JavaScript
0.000005
@@ -320,24 +320,31 @@ (el, binding +, vnode ) %7B%0A unbind @@ -350,16 +350,43 @@ d(el);%0A%0A + var vm = vnode.context;%0A%0A var ca @@ -1888,17 +1888,26 @@ callback -( +.call(vm, ev);%0A
4eccc1c953e855306744b80503306acc694cab0b
update undefined error
index.js
index.js
"use strict"; const fs = require('fs-extra'); const fileExtension = require('file-extension'); const Thumbler = require('thumbler'); // constractor function Upload(data){ return function (req, res, next) { moveFile(req.files, data,function(err, files){ if (err) return res.send(err); next(); }); } } // ren...
JavaScript
0.000001
@@ -1285,17 +1285,50 @@ (typeof - +(files) === 'undefined' %7C%7C typeof( files%5Bfi @@ -1331,17 +1331,19 @@ s%5Bfield%5D - +) = == 'unde
fe0471d96208de7b5cdbe8c9dbdf489b3f6aa090
Remove pattern from match state
index.js
index.js
"use strict"; var pattern = require('url-pattern'); var React = require('react'); var merge = require('react/lib/merge'); var invariant = require('react/lib/invariant'); var ExecutionEnvironment = require('react/lib/ExecutionEnvironment'); var Environment ...
JavaScript
0.000001
@@ -3460,53 +3460,8 @@ th,%0A - pattern: page ? page.pattern : null,%0A
d2ad792bab71b7bb11fbe6785c37a11827858f5b
use parent project for importing fonts
index.js
index.js
/* eslint-env node */ 'use strict'; const fs = require('fs'); const Funnel = require('broccoli-funnel'); const mergeTrees = require('broccoli-merge-trees'); const path = require('path'); module.exports = { name: 'fixtable-ember', included() { this._super.included.apply(this, arguments); let fontAwesomeT...
JavaScript
0
@@ -292,16 +292,97 @@ ments);%0A + let fa = path.dirname(require.resolve('font-awesome/fonts/FontAwesome.otf')); %0A let @@ -423,52 +423,10 @@ ync( -%60$%7Bthis.nodeModulesPath%7D/font-awesome/fonts%60 +fa );%0A @@ -568,40 +568,24 @@ ort( -path.join(this.nodeModulesPath, +require.resolve( 'fix @@ -611,17 ...
f3b89688a84c2a0c78c68fed1dd2514597b7b373
remove comment
index.js
index.js
#!/usr/bin/env node var c = require('commander'), through = require('through'), dirstream = require('dir-stream'), filestream = require('file-content-stream'), es = require('event-stream'), type = require('ack-types'), color = require('bash-color'), Readable = require('stream').Readable, ...
JavaScript
0
@@ -3959,18 +3959,16 @@ ll);%0A%0A -// rs.pipe( @@ -4015,111 +4015,7 @@ t);%0A - rs.pipe(dirstream(%7B onlyFiles: true %7D)).pipe(filestream()).pipe(wack(settings)).pipe(process.stdout);%0A %7D%0A%0A
f6b815ea87d47aa9d46c1713e71a6c8b98f3a536
fix use of browserify with bson npm module
index.js
index.js
/** * Copyright (c) 2014, 2015 Tim Kuijsten * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR...
JavaScript
0
@@ -929,21 +929,27 @@ BSON = + new bson +() ;%0A%7D else
24b2107b8dd0a23f5faff102aa2bf4a45ab37d77
call writeTemplate on script
index.js
index.js
const resolveCli = require('./src/resolveCli'); const getConfig = require('./src/getConfig'); const executeScript = require('./src/executeScript'); const questionParams = require('./src/questionParams'); const readTemplate = require('./src/readTemplate'); const reder = require('./src/render'); function getArgFromCli(p...
JavaScript
0.000001
@@ -287,16 +287,70 @@ ender'); +%0Aconst writeTemplate = require('./src/writeTemplate'); %0A%0Afuncti @@ -808,40 +808,8 @@ s);%0A - console.log(result.config);%0A @@ -938,118 +938,74 @@ -console.log(template);%0A %7D);%0A %7D);%0A%0A // TODO: load Template%0A // TODO: render ejs%0A // TODO: wri...
b080d76795bd58be90e49e768aeb64f7c1baae61
Set function
index.js
index.js
var TelegramBot = require('node-telegram-bot-api'); var bot = new TelegramBot(process.env.CHAINTACT_BOT_TOKEN, {polling: true}); var mongoose = require('mongoose'); var dbUrl = "mongodb://chaintact_db/chaintactdb"; mongoose.connect(dbUrl); var db = mongoose.connection; db.on('error', console.error.bind(console, 'conne...
JavaScript
0.000164
@@ -2771,26 +2771,22 @@ d : %22 + -telegramID +fromId );%0A
81535d090cf7ffe3cc0ef12d7e21d8a1b1da6ca0
fix missing newline after reddit comment
index.js
index.js
/* eslint no-var: 0, prefer-template: 0 */ var fs = require('fs'); var path = require('path'); var difficulty = process.argv[2]; var number = process.argv[3]; var difficulties = ['e', 'i', 'h', 'easy', 'intermediate', 'hard']; var diffIndex = difficulties.indexOf(difficulty); var BASE_PATH; function capitalise(str) ...
JavaScript
0.000179
@@ -1186,16 +1186,18 @@ dit.com/ +%5Cn ' +%0A
35d70bbacb2f2549ab0f2e81756156a1ed7fded9
use the value also for integers and floats so no ternary operator is needed
index.js
index.js
/** * Exports */ exports = module.exports = is; exports.typeLabel = typeLabel; /** * The actual function */ function is(what){ var leType = { }, ctorName, super_, label; if( what === null || what === void 0 ) { leType[''+what] = true; return leType; } ctorName = (what.constructor.name || null); ...
JavaScript
0.000001
@@ -1337,20 +1337,20 @@ teger = -true +what ;%0A else @@ -1369,20 +1369,20 @@ float = -true +what ;%0A%0A if(
f447c1bbf457997fbe1fbfae7631e02f35a0a10a
Allow solo statements when short-circuiting or using ternaries
index.js
index.js
// Rules are grouped by the same sections as http://eslint.org/docs/rules/ const possibleErrors = { // Warn when `console` is used 'no-console': 1, // No multiline statements that look like separate statements 'no-unexpected-multiline': 2 }; const bestPractices = { // Never omit curly braces around blocks...
JavaScript
0.000002
@@ -1297,25 +1297,76 @@ pressions': -2 +%5B2, %7B allowShortCircuit: true, allowTernary: true %7D%5D ,%0A%0A // No %60
37f90dda4c3d5785ad26e2e8fbae30c33dcad4c1
fix TODOs
index.js
index.js
//FIX _replace_escaped_operators? WTF? //FIX fix difference between wsdl parsed by json-q and by old parser //TODO make it works with browsers (IE9+) //TODO thing to calc code coverage //TODO performance? const clone = require('clone'); const { dedup, deep_filter, flatten } = require('./helper'); const { par...
JavaScript
0.000002
@@ -159,35 +159,20 @@ ODO -thing to calc code coverage +add strings? %0D%0A//
cfb9f7ce10a156a8f8be427c2eaca312152391b9
Handle no command line arguments
index.js
index.js
#!/usr/bin/env node /** * To run, `node smap <path/to/js/file>:<line>:<col> [path to source directory, default is ../../]` **/ var argv = require('minimist')(process.argv.slice(2), { alias: { "h": "help", "v":"version", "s": "source-path" } }); if(argv["help"]) { console.log(""); console.log("Usage: \n\t...
JavaScript
0.000001
@@ -127,151 +127,27 @@ **/%0A -var argv = require('minimist')(process.argv.slice(2), %7B%0A%09alias: %7B%0A%09%09%22h%22: %22help%22, %0A%09%09%22v%22:%22version%22,%0A%09%09%22s%22: %22source-path%22%0A%09%7D%0A%7D);%0A%0Aif(argv%5B%22help%22%5D +%0Afunction showHelp( ) %7B%0A @@ -1129,16 +1129,246 @@ rn ;%0A%7D%0A...
f08ff4bc377404f5e150248e555ceb3297e771d5
Change `arrow-parens` rule
index.js
index.js
'use strict'; module.exports = { root: true, parserOptions: { ecmaFeatures: { jsx: true, experimentalObjectRestSpread: true } }, env: { node: true, es6: true }, globals: { logger: false }, extends: 'eslint:recommended', ...
JavaScript
0
@@ -3540,16 +3540,44 @@ parens': + 1, // TODO: maybe change to %5B1, 'as @@ -3608,33 +3608,34 @@ ockBody: true %7D%5D -, + ? %0A 'arrow-
2508d8f2792ecaf3669ad844679f4bb0f4071dcf
edit function is optional
index.js
index.js
'use strict'; var path = require('path') , fs = require('fs') , mkdirp = require('mkdirp') , runnel = require('runnel') , sinless = require('sinless') , HOME = path.join(__dirname, 'test', 'fixtures', 'home') // process.env.HOME ; function copy(srcFile, tgtFile, cb) { var readStream =...
JavaScript
0.000892
@@ -1221,16 +1221,21 @@ noConfig +Found (config @@ -1292,16 +1292,61 @@ l));%0A%7D%0A%0A +function noop (config) %7B%0A return config;%0A%7D%0A%0A /**%0A * %0A @@ -2017,58 +2017,8 @@ var - defaultConfig = opts.defaultConfig %7C%7C null%0A , con @@ -2116,24 +2116,89 @@ configFile)%0A + ;%0A %0A var...
84478080b1cfe265e0aa3198e16b87c4e1b14c8b
add some rules
index.js
index.js
module.exports = { "extends": [ "eslint:recommended", "plugin:react/recommended" ], "plugins": [ "react" ], "parserOptions": { "ecmaVersion": 6 }, "rules": { // disallow await inside of loops "no-await-in-loop": "error", // disallow unnecessary parentheses "no-extra-parens"...
JavaScript
0
@@ -712,24 +712,992 @@ %22: %22error%22,%0A + // enforce getter and setter pairs in objects%0A %22accessor-pairs%22: %22error%22,%0A // enforce return statements in callbacks of array methods%0A %22array-callback-return%22: %22error%22,%0A // enforce the use of variables within the scope they are define...
90e944d9835f3b07fadb39ff3e6c4c41b3abfda5
add some comments
index.js
index.js
/** * XadillaX created at 2015-09-11 12:31:52 With ♥ * * Copyright (c) 2015 Souche.com, all rights * reserved. */ var bling = require("./build/Release/bling"); var Long = require("long"); /** * bkdr * @param {String} str the string will be hashed * @return {Number} the hash value */ exports.bkdr = function(st...
JavaScript
0
@@ -1563,78 +1563,280 @@ %7D;%0A%0A -exports.city32 = function(str) %7B%0A return bling.cityHash32(str);%0A%7D;%0A +/**%0A * city32%0A * @param %7BString%7D str the string will be hashed%0A * @return %7BNumber%7D the hash value%0A */%0Aexports.city32 = function(str) %7B%0A return bling.cityHash32(str);%0A%7D;%0A...
25f59d7233794b1a24176aea8f6c4f6c3c368e96
remove code preventing toc from rendering when toc is defined in a layout
index.js
index.js
/*! * template-toc <https://github.com/jonschlinkert/template-toc> * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var isPrimitive = require('is-primitive'); var extend = require('extend-shallow'); var toc = require('markdown-toc'); module.exports = function(app, optio...
JavaScript
0
@@ -355,207 +355,8 @@ ) %7B%0A - // unescape escaped %60%3C!!-- toc%60 comments%0A if (!/(%7B%25=%7C%3C!--) toc/.test(view.content)) %7B%0A view.content = unescape(view.content);%0A view.data.toc = '';%0A next();%0A return;%0A %7D%0A%0A
dc9dd35b67bac0297003e01cc611108f4fbd58ce
Fix `xorGen` generator
index.js
index.js
"use strict"; function* mapGen(setObj, transform) { for (let itm of setObj) yield transform(itm, itm, setObj); } function* filterGen(setObj, filter) { for (let itm of setObj) if (filter(itm, itm, setObj)) yield itm; } function* unionGen(set1, set2) { yield* set1; yield* se...
JavaScript
0.000007
@@ -254,78 +254,8 @@ %0A%7D%0A%0A -function* unionGen(set1, set2) %7B%0A yield* set1;%0A yield* set2;%0A%7D%0A%0A func @@ -376,19 +376,21 @@ nction* -xor +union Gen(set1 @@ -403,22 +403,90 @@ ) %7B%0A -return +yield* set1;%0A yield* set2;%0A%7D%0A%0Afunction* xorGen(set1, set2) %7B%0A yield* uni...
cdb0a52a5419cd649374d2b6eeeaded422667ed6
Support `getRouteMap(function (annotations) {...})` signature
index.js
index.js
'use strict'; var annotations = require('express-annotations'), methods = require('methods'), pathTo = require('./lib/pathto'); exports.extend = extendApp; exports.pathTo = pathTo; function extendApp(app) { if (app['@map']) { return app; } // Add Express Annotations support to the `app`. an...
JavaScript
0.000002
@@ -1622,24 +1622,553 @@ his:true */%0A +%0A // Support a function, single array of annotations, or var-args.%0A if (typeof annotations === 'function') %7B%0A // Replaces an %60annotations%60 function with a wrapper that is bound to%0A // the original function which is only called for paths that ha...
7375ae196b0dbc876391097f0ba7352ad8bcaa6c
Set the name of the ValidationError properly
index.js
index.js
'use strict' var _ = require('lodash') var http = require('http') var minimist = require('minimist') var url = require('url') class ValidationError extends Error { } class Command { static isSubset (subset, superset) { return subset.every(item => superset.indexOf(item) > -1) } run (options) { var optio...
JavaScript
0.000073
@@ -158,16 +158,85 @@ Error %7B%0A + constructor () %7B%0A super()%0A this.name = 'ValidationError'%0A %7D%0A %7D%0A%0Aclass
226c6e72190f17038f818624ab3963797778a6b6
add support of custom profile by using customLaunchers of karma config
index.js
index.js
var fs = require('fs'); var spawn = require('child_process').spawn; var PREFS = 'user_pref("browser.shell.checkDefaultBrowser", false);\n' + 'user_pref("browser.bookmarks.restore_default_bookmarks", false);\n' + 'user_pref("dom.disable_open_during_load", false);\n' + 'user_pref("dom.max_script_run_tim...
JavaScript
0
@@ -1469,16 +1469,69 @@ mmand(); +%0A var profilePath = args.profile %7C%7C self._tempDir; %0A%0A fs @@ -1652,29 +1652,27 @@ ofile', -self._tempDir +profilePath , '-no-r
4cdbd365783f2071183119682004c4c7e22bae9c
trim whitespace on include
index.js
index.js
/*! * helper-coverage <https://github.com/jonschlinkert/helper-coverage> * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; var fs = require('fs'); var stripAnsi = require('strip-ansi'); module.exports = function coverage(fp) { if (!fs.existsSync(fp)) { throw new Er...
JavaScript
0.000002
@@ -408,14 +408,13 @@ ;%0A -return +str = str @@ -448,11 +448,32 @@ m, '');%0A + return str.trim();%0A %7D;%0A
7fe55144e532ed0bcc9b9081f4e4140e81ede36c
return spawned program
index.js
index.js
var spawn = require('child_process').spawn; var machine = require('space-machine'); module.exports = function (command, options) { var args = machine(command); var program = args.shift(); spawn(program, args, options); };
JavaScript
0.000001
@@ -1,18 +1,18 @@ %0Avar -spawn +child = requi @@ -34,14 +34,8 @@ ss') -.spawn ;%0Ava @@ -181,16 +181,29 @@ ft();%0A%0A%09 +return child. spawn(pr
1b1053dfe6e59a8aff390f71d24ac8c8753c48a0
fix issue #1
index.js
index.js
'use strict'; var fs = require('fs'); var BufferHelper = require('bufferhelper'); var Handlebars = require('handlebars'); function log(t){ console.dir('[TPL_APPLY LOG] ' + t); } /** * Basic */ function tpl_apply(template_path, data_obj, dest_file_path) { tpl_apply_with_register_helper(Handlebars, template_path, ...
JavaScript
0.000001
@@ -522,27 +522,8 @@ h, %7B -encoding: 'utf-8', buff @@ -724,16 +724,22 @@ oString( +'utf8' );%0A%09%09var
73e6de656d4d4a87a439cbc96df51aaaf19ceea4
use physics instead of physicsSettings
index.js
index.js
module.exports = pixel; var THREE = require('three'); var createNodeView = require('./lib/nodeView.js'); var createEdgeView = require('./lib/edgeView.js'); var createAutoFit = require('./lib/autoFit.js'); var createInput = require('./lib/input.js'); var layout3d = require('ngraph.forcelayout3d'); var layout2d = require...
JavaScript
0.000003
@@ -721,24 +721,16 @@ .physics -Settings ) : layo @@ -752,32 +752,24 @@ ions.physics -Settings );%0A var isS @@ -5044,32 +5044,24 @@ ions.physics -Settings );%0A %7D els @@ -5114,16 +5114,8 @@ sics -Settings );%0A
35e26ddb44a27cdf638425d928009aaab64dc990
update iotos-rpi-zero
index.js
index.js
const fb = require('./fb') const Gpio = require('onoff').Gpio light("room1", 17) function light (room, gpio) { let led = new Gpio(gpio, 'out') fb.child(room).on('value', function (data) { if (data.val().Light == "1") { led.writeSync(1) // var iv = setInterval(function(){ // led.writeSy...
JavaScript
0
@@ -221,32 +221,35 @@ == %221%22) %7B%0A + // led.writeSync(1 @@ -251,27 +251,24 @@ ync(1)%0A - // var iv = se @@ -286,35 +286,32 @@ unction()%7B%0A - // led.writeSy @@ -344,27 +344,24 @@ 1 : 0)%0A - // %7D, 800)%0A
9c74fff2a1b62230fda494853c867ce3fe2ea21b
Update default repository urls. Keep old ids for backwards compatibility
index.js
index.js
'use strict'; var del = require('del'); var maven = require('gulp-maven-deploy'); var path = require('path'); var runSequence = require('run-sequence'); module.exports = function(gulp, opt_options) { var options = opt_options || {}; options.artifactIdPrefix = options.artifactIdPrefix || 'com.liferay.webjars.'; opt...
JavaScript
0
@@ -667,24 +667,31 @@ liferay- +public- releases -ce/'%0A%09%09 @@ -682,19 +682,160 @@ releases --ce +/'%0A%09%09%09%7D,%0A%09%09%09%7B%0A%09%09%09%09'id': 'liferay-public-releases',%0A%09%09%09%09'url': 'https://repository.liferay.com/nexus/content/repositories/liferay-public-releases /'%0A%09%09%09%7D%0A @@ -870...
29777da55d4c965c1fb12173c3ffe87998fce54f
Allow to specify a custom random number generator
index.js
index.js
'use strict'; /** * Randomize the order of the elements in a given array. * @param {array} arr - The given array. * @param {boolean} [copy] - Sets if should return a shuffled copy of the given array. By default it's a falsy value. * @returns {array} */ function shuffle(arr, copy) { if (!Array.isArray(arr)) { ...
JavaScript
0
@@ -278,20 +278,25 @@ rr, copy +, rng ) %7B%0A - %0A if (! @@ -428,24 +428,56 @@ arr.length,%0A + rng = rng %7C%7C Math.random,%0A random @@ -585,35 +585,27 @@ Math.floor( -Math.random +rng () * len);%0A @@ -1020,24 +1020,29 @@ n(arr, picks +, rng ) %7B%0A%0A if (! @@ -1131,24 +1131,57 @@ eter....
a883c8eb528038b255fa8f2d7b104a52ecc22641
Stop excluding PDFs with uppercase extensions
index.js
index.js
// jshint esnext:true // Started as a PDF.js example file, originally licensed public domain var fs = require('fs'), util = require('util'), dsv = require('d3-dsv'), path = require('path'); global.DOMParser = require('./lib/domparsermock.js').DOMParserMock; var pdfjsLib = require('pdfjs-dist'); const fi...
JavaScript
0.000004
@@ -6372,16 +6372,35 @@ '.pdf') +.replace('.PDF','') ;%0A @@ -7342,16 +7342,41 @@ ilePath) +%0A .filter( @@ -7388,16 +7388,30 @@ =%3E file. +toLowerCase(). includes
c09838fce11ef6763c78b6e6c2484f58273e021e
Fix comment
index.js
index.js
/*! * promised-handlebars <https://github.com/nknapp/promised-handlebars> * * Copyright (c) 2015 Nils Knappmeier. * Released under the MIT license. */ 'use strict' var Q = require('q') // Store for promises created during a template execution var promises = null module.exports = promisedHandlebars /** * Retur...
JavaScript
0
@@ -2714,18 +2714,16 @@ ists: We -rm are exe
ca231a95746290a3670286689b85b3971a8fb671
Fix the Repo URL
index.js
index.js
/* * grunt-rewrite-middleware * https://github.com/viart/grunt-rewrite-middleware * * Copyright (c) 2013 Artem Vitiuk * Licensed under the MIT license. */ 'use strict'; function Rewriter (rules, grunt) { this.rules = []; this.initLogger(grunt); (rules || []).forEach(this.registerRule, this); } Rewri...
JavaScript
0.000121
@@ -1,19 +1,18 @@ /*%0A * -grunt +http -rewrite @@ -51,21 +51,20 @@ m/viart/ -grunt +http -rewrite
ddd972fcd43e4fa0da191b8e154024fe56dcf1c9
Split index.js file out into a separate file
index.js
index.js
(function () { 'use strict'; }()); var govTrack = require('govtrack-node'); govTrack.findRole({current: true }, function(err, res) { if(! err) { // console.log(JSON.stringify(res)); } }); govTrack.findPerson({}, function(err, res) { if (! err) { for (var i in res.objects) {...
JavaScript
0.000003
@@ -35,638 +35,4 @@ ));%0A -%0Avar govTrack = require('govtrack-node');%0A%0AgovTrack.findRole(%7Bcurrent: true %7D, function(err, res) %7B%0A if(! err) %7B%0A // console.log(JSON.stringify(res));%0A %7D%0A%7D);%0A%0AgovTrack.findPerson(%7B%7D,%0A function(err, res) %7B%0A if (! err) %7B%0A ...
ec66fd9a9e27690ff44538c94845ac9c1baae896
remove dead code
index.js
index.js
'use strict'; var biedaconfig = require('./biedaconfig.json'); var gf = require('gimme-files'); var fbc = require('filebit-client'); var async = require('async'); var filebitRequest = function(link, cb) { fbc.login( biedaconfig.filebit.user, biedaconfig.filebit.password, function(error, loggedIn){ ...
JavaScript
0.987022
@@ -1080,42 +1080,8 @@ %7D%0A - console.log('titles', titles); %0A @@ -1190,45 +1190,8 @@ -console.log('eldo', element, result); %0A @@ -1869,280 +1869,4 @@ yb;%0A -%0Abiedaszyb.show('American Dad!', 10, 1, 2, function(err, result) %7B%0A console.log('ERR', err);%0A console.log('NO HEJKA!', resul...
0213be2d4abba261d78f9f82975cfc1b6ff51b26
rebuild namespaces when process.env.DEBUG was set
index.js
index.js
'use strict' var pino = require('pino') require('module').wrap = override var debug = require('debug') module.exports = pinoDebug if (module.parent && module.parent.parent === null && module.parent.filename === null) { // preloaded with -r flag pinoDebug() } function pinoDebug (logger, opts) { if (pinoDebug.c...
JavaScript
0.000001
@@ -513,10 +513,23 @@ s = -%5B%5D +getNamespaces() %0A d @@ -971,24 +971,214 @@ in(','))%0A%7D%0A%0A +function getNamespaces () %7B%0A var namespaces = process.env.DEBUG%0A if (namespaces != null) %7B%0A return (typeof namespaces === 'string' ? namespaces : '').split(/%5B%5Cs,%5D+/)%0A %7D%0A return %5B%5D%...
d3201d5327b5bfb05c8d1398e5434b7dd3c161ae
allow using through HTTP GET
index.js
index.js
var stremio = require("stremio-addons"); var _ = require("lodash"); var async = require("async"); var needle = require("needle"); var fs = require('fs'); var magnet = require('magnet-uri'); var path = require('path'); var manifest = { "name": "Popcorn", "description": "Watch from YTS and EZTV", //"icon": ...
JavaScript
0
@@ -2172,16 +2172,34 @@ %7D%0A%7D, %7B + stremioget: true, secret:
eca4cb700d743b96101dcf0589a107289c181616
make sure to call callback on server close
index.js
index.js
var net = require('net') var fs = require('fs') var path = require('path') var hyperdrive = require('hyperdrive') var mkdirp = require('mkdirp') var through = require('through2') var pump = require('pump') var homeDir = require('home-dir') var discoveryChannel = require('discovery-channel') var Connections = require('c...
JavaScript
0
@@ -2318,24 +2318,26 @@ self.close( +cb )%0A %7D%0A%0A
1cbc6c18f5cd407a78c64c508f877836ac02b042
Set headers for Buffer
index.js
index.js
/* Name: pastecapi Description: Lightweight module for Pastec image recognition API Author: Franklin van de Meent (https://frankl.in) Source code: https://github.com/fvdm/nodejs-pastecapi Feedback: https://github.com/fvdm/nodejs-pastecapi/issues License: Unlicense (Public Domain, see LICENSE fi...
JavaScript
0.000001
@@ -3399,32 +3399,136 @@ s.body = image;%0A + options.headers = %7B%0A 'Content-Length': image.length,%0A 'Content-Type': 'image/jpeg'%0A %7D;%0A talk (option @@ -4669,24 +4669,128 @@ dy = image;%0A + options.headers = %7B%0A 'Content-Length': image.length,%0A 'Content-Type': 'image/...
68c0623f9b7b84926e0766712171e7825c834b4f
allow passing a env object to the build server
index.js
index.js
/** * Module dependencies */ var chain = require('slide').chain; var last = chain.last; var Heroku = require('heroku-client'); var anvil = require('anvil-cli'); var superagent = require('superagent'); /** * Create a GitHub hook * * @param {Object} config * @return {Function} */ module.exports = function(confi...
JavaScript
0
@@ -218,14 +218,14 @@ e a -GitHub +Heroku hoo @@ -429,16 +429,40 @@ g.drain; +%0A var env = config.env; %0A%0A if ( @@ -1550,24 +1550,29 @@ g, task.dir, + env, log%5D,%0A @@ -1688,32 +1688,70 @@ return fn(err);%0A +%0A // TODO run integration tests%0A%0A if (branch @@ -1781,53 +1781,8 @@ )...
b186bd1e69ddb42f68dc8c2bee567c98d8469861
fix options casting (#92)
index.js
index.js
var assert = require('assert') var hyperdrive = require('hyperdrive') var xtend = require('xtend') var path = require('path') var untildify = require('untildify') var debug = require('debug')('dat-node') var initArchive = require('./lib/init-archive') var Dat = require('./dat') module.exports = createDat function cre...
JavaScript
0
@@ -28,47 +28,8 @@ t')%0A -var hyperdrive = require('hyperdrive')%0A var @@ -312,135 +312,35 @@ %7B%0A -assert.ok(dirOrDrive, 'directory or drive required')%0A if (typeof opts === 'function') return createDat(dirOrDrive, %7B%7D, +if (!cb) %7B%0A cb = opts -)%0A%0A +%0A op @@ -348,487 +348,445 @@ s = ...
f4fd796e83fe52aea37ce7335f85352e5cef9879
Update up to changes to site-tree
index.js
index.js
'use strict'; var normalizeOptions = require('es5-ext/object/normalize-options') , setPrototypeOf = require('es5-ext/object/set-prototype-of') , ensureObject = require('es5-ext/object/valid-object') , ensureStringifiable = require('es5-ext/object/validate-stringifiable-value') , d ...
JavaScript
0
@@ -937,16 +937,17 @@ Tree),%0A%09 +_ resolveT
c4bf1dd1d0b26ab71e3fd78ae6c614cb77f91d07
Improve cancel event handling.
index.js
index.js
var events = require('events') , util = require('util') , async = require('async') , read = require('./read') , utils = require('cli-util') , merge = utils.merge , native = require('cli-native'); var schema; try{ schema = require('async-validate'); }catch(e){} var Prompt = function(options, rl) { this...
JavaScript
0
@@ -2000,21 +2000,21 @@ e.emit(' -after +value ', value @@ -2985,24 +2985,88 @@ , result) %7B%0A + if(err.cancel) return scope.emit('cancel', prompts, scope);%0A if(err & @@ -3739,13 +3739,13 @@ on(' -after +value ', f @@ -4002,18 +4002,20 @@ sult) %7B%0A - +// if(err &
5685299734300f6d65c912621b0930219f70b9c0
add some new text
index.js
index.js
console.log('hello world'); console.log('by wach');
JavaScript
0.00441
@@ -41,12 +41,46 @@ 'by wach');%0A +console.log('today is Thuesday');%0A
1f9b2d8dac5d0018c1eb2f6a8287d665fbd50aeb
3d in terms of 2d
index.js
index.js
var showf = require('fixed-width-float'); module.exports = function (m, opts) { if (!opts) opts = {}; if (!opts.width) opts.width = 8; if (m.shape.length === 1) return d1(m, opts); if (m.shape.length === 2) return d2(m, opts); if (m.shape.length === 3) return d3(m, opts); }; function d1 (m, o...
JavaScript
0.999949
@@ -148,36 +148,33 @@ %0A if (m. -shape.length +dimension === 1) retu @@ -195,36 +195,33 @@ ;%0A if (m. -shape.length +dimension === 2) retu @@ -250,20 +250,17 @@ (m. -shape.length +dimension === @@ -848,265 +848,39 @@ -for (var x = 0; x %3C m.shape%5B0%5D; x++) %7B%0A var row = %5B%5D...
7abd6b0d62f4417fd613ddfee5c3ac1323409b64
refactor .once
index.js
index.js
/** * Expose `Emitter`. */ module.exports = Emitter; /** * Initialize a new `Emitter`. * * @api public */ function Emitter(obj) { if (obj) return mixin(obj); }; /** * Mixin the emitter properties. * * @param {Object} obj * @return {Object} * @api private */ function mixin(obj) { for (var key in Em...
JavaScript
0.000559
@@ -988,71 +988,8 @@ n)%7B%0A - var self = this;%0A this._callbacks = this._callbacks %7C%7C %7B%7D;%0A%0A fu @@ -1010,12 +1010,12 @@ -self +this .off
cdde2ed9b82a51bef4812fe0a2b4ee275684a2bd
Fix typo in ApplicationForm.js (#354)
ui/src/views/applications/ApplicationForm.js
ui/src/views/applications/ApplicationForm.js
import React from "react"; import { withStyles } from "@material-ui/core/styles"; import TextField from '@material-ui/core/TextField'; import FormControl from "@material-ui/core/FormControl"; import FormLabel from "@material-ui/core/FormLabel"; import FormHelperText from "@material-ui/core/FormHelperText"; import Typo...
JavaScript
0.000292
@@ -5276,17 +5276,16 @@ ng%3E: the -y payload
b6b7858415dc06f20849c992678f05e444012b9e
fix linter errors
index.js
index.js
/**@license * data-components v{{version}} <https://github.com/rafaelrinaldi/data-components> * Released under {{license}} license * Author: Rafael Rinaldi <http://rinaldi.io> **/ (function(exports) { 'use strict'; // Component store var store = {}; // Query selector helper function $(selector) { va...
JavaScript
0
@@ -1,8 +1,49 @@ +/* global define */%0A/* eslint-disable */%0A /**@lice @@ -218,16 +218,36 @@ o%3E%0A **/%0A +/* eslint-enable */%0A (functio @@ -247,16 +247,17 @@ function + (exports @@ -468,17 +468,16 @@ up);%0A %7D -; %0A%0A /**%0A @@ -625,16 +625,25 @@ rget -, +/* ... source +s */ ) %7B%0A @@ -798,...
2344cc5f7cf2c716741048b15b26bf9cb11fe07e
fix replacer
index.js
index.js
var Filter = require('broccoli-filter'); module.exports = TemplateI18nFilter; TemplateI18nFilter.prototype = Object.create(Filter.prototype); TemplateI18nFilter.prototype.constructor = TemplateI18nFilter; function TemplateI18nFilter (inputTree, options) { if (!(this instanceof TemplateI18nFilter)) return new Templat...
JavaScript
0.000001
@@ -719,10 +719,16 @@ ex, -cb +replacer ) %7B%0A
964b216fe7a97570d331f09ca83742fd3776e6cb
Improve code style
index.js
index.js
#!/usr/bin/env node const child_process = require('child-process-promise') const chalk = require('chalk') const inquirer = require('inquirer') const emoji = require('node-emoji') const hooks = require('./hooks') const spawn = child_process.spawn const exec = child_process.exec const actions = hooks.actions const quest...
JavaScript
0.000196
@@ -1055,38 +1055,15 @@ =%3E -%7B%0A return promise%0A +promise .th @@ -1097,14 +1097,8 @@ me)) -%0A %7D , Pr
8cd1ced9450dbf5839d1d46620a53bd64d3891b7
Update API folder to lib
index.js
index.js
const bin = require('./bin'); module.exports = bin;
JavaScript
0
@@ -16,19 +16,19 @@ uire('./ -bin +lib ');%0Amodu
541949d2af8005f287e6c3e2a91626510481e8e3
remove debug logging
index.js
index.js
function head (a) { return a[0] } function last (a) { return a[a.length - 1] } function tail(a) { return a.slice(1) } function retreat (e) { return e.pop() } function hasLength (e) { return e.length } function any(ary, test) { for(var i in ary) if(test(ary[i])) return true return false } v...
JavaScript
0.000002
@@ -5165,38 +5165,8 @@ e%5D%0A%0A - console.log('rules',rules)%0A%0A fu
d86bf0d952542ea9615c1262c6073542212058a5
Fix typo
index.js
index.js
'use strict'; var intl = require('intl'); var isBrowser = require('is-browser'); var objectAssign = require('object-assign'); module.exports = function (val, opts) { if (!opts.locales || !opts.locales.length) { throw new Error('Locales is required'); } if (!opts.currency) { throw new Error('Currency is require...
JavaScript
0.999999
@@ -481,16 +481,23 @@ intl;%0A%09%09 +return new Intl
8f24708c7961a71035f0a093a0c84dbedc632481
remove debug
index.js
index.js
/*jslint node: true, vars: true, indent: 4 */ 'use strict'; var util = require('util'), Imap = require('imap'), MailParser = require('mailparser').MailParser, EventEmitter = require('events').EventEmitter; function Notifier(opts) { EventEmitter.call(this); var self = this; self.options = opts...
JavaScript
0.000002
@@ -2376,51 +2376,8 @@ ) %7B%0A - console.log('state', this.imap.state);%0A
819100db926f07a08abb4ced45a1917a8ea1234c
Fix for bug mentioned in #18
index.js
index.js
var checker = require('ember-cli-version-checker'); module.exports = { name: 'ember-cli-babel', shouldSetupRegistryInIncluded: function() { return !checker.isAbove(this, '0.2.0'); }, setupPreprocessorRegistry: function(type, registry) { var options = getOptions(this.parent && this.parent.options &&...
JavaScript
0
@@ -1094,16 +1094,26 @@ options. +blacklist. indexOf( @@ -1138,16 +1138,56 @@ ;%0A %7D%0A + %0A delete options.compileModules;%0A %7D else
26b8d77f40d5d51a6345573f7728a1b6dd328f3c
update spread to use ...arguments
index.js
index.js
'use strict'; const logger = require('fastlog')(); const http = require('http'); const util = require('util'); /** * Base HTTP error class built with a message and a status code * @extends Error */ class ErrorHTTP extends Error { constructor(message, status = 500) { super(); if (typeof message === 'numb...
JavaScript
0
@@ -1142,25 +1142,16 @@ tructor( -...params ) %7B%0A @@ -1183,21 +1183,24 @@ rmat(... -p ar -am +gument s);%0A
293e3e508c4eed74c3aa872da9fbeaf5c7769042
Use lodash instead of dash
index.js
index.js
'use strict'; var path = require('path'); var gutil = require('gulp-util'); var through = require('through2'); var objectAssign = require('object-assign'); var file = require('vinyl-file'); var revHash = require('rev-hash'); var revPath = require('rev-path'); var sortKeys = require('sort-keys'); var modifyFilename = re...
JavaScript
0.000074
@@ -222,43 +222,8 @@ ');%0A -var revPath = require('rev-path');%0A var @@ -827,24 +827,242 @@ t);%0A%09%7D);%0A%7D%0A%0A +%0Afunction revPath (pth, hash) %7B%0A%09if (arguments.length !== 2) %7B%0A%09%09throw new Error('%60path%60 and %60hash%60 required');%0A%09%7D%0A%0A%09return modifyFilename(pth, function (file...
d6fad4294d51eb7c3c29c8f0092efd4e85db87ab
Delete sendTextMessage out of index.js
index.js
index.js
'use strict'; const Wit = require('node-wit').Wit; const Hapi = require('hapi'); const request = require('request'); const config = require('./config'); const witService = require('./app/services/wit'); const keepr = require('./app/services/keepr'); const Facebook = require('./app/services/facebook'); const routes =...
JavaScript
0.000001
@@ -377,536 +377,8 @@ r(); -%0Aconst token = process.env.PAGE_TOKEN %7C%7C '';%0A%0A%0Afunction sendTextMessage(sender, text) %7B%0A let messageData = %7B%0A text:text%0A %7D%0A request(%7B%0A url: 'https://graph.facebook.com/v2.6/me/messages',%0A qs: %7Baccess_token:token%7D,%0A method: 'POST',%0A j...
c81c98d0b4e16406f0f44530f0c3dc504b1d3d15
add "Bring All to Front"
index.js
index.js
var startTime = Date.now() require('debug/browser') var debug = require('debug')('index') var electron = require('electron') var path = require('path') var app = electron.app app.on('open-file', onOpen) app.on('open-url', onOpen) function onOpen (e, torrentId) { e.preventDefault() mainWindow.send('action', 'ad...
JavaScript
0
@@ -5095,16 +5095,135 @@ nimize'%0A + %7D,%0A %7B%0A type: 'separator'%0A %7D,%0A %7B%0A label: 'Bring All to Front',%0A role: 'front'%0A %7D%0A
91422969993877992f58418a53b27fadfd7c3332
Fix mode on index.js
index.js
index.js
'use strict'; var repl = require('repl'); var fs = require('fs'); var path = require('path'); var xtend = require('xtend'); var camelCase = require('camel-case'); var pkginfo = require('pkginfo'); var Replit = module.exports = function(opts){ if (!(this instanceof Replit)) { return new Replit(opts); } this...
JavaScript
0.000001
5d7bbe14f555170ea7d6ece89911ba53687ccb45
Clean types
index.js
index.js
// @flow import React, { Component, Element } from 'react'; import Count from 'countup.js'; type Props = { className: string, decimal: string, decimals: number, duration: number, easingFn: () => void, end: number, formattingFn: () => void, onComplete: () => void, onStart: () => void, prefix: strin...
JavaScript
0.000001
@@ -19,32 +19,8 @@ eact -, %7B Component, Element %7D fro @@ -61,16 +61,56 @@ tup.js'; +%0Aimport type %7B Component %7D from 'react'; %0A%0Atype P @@ -1369,15 +1369,13 @@ ent%3C -*, *, * +Props %3E) = @@ -2208,16 +2208,22 @@ extends +React. Componen @@ -2223,16 +2223,23 @@ omponent +%3CProps%3E %7B%0A st...
aab332fb215fd0adb87298691b0bfd7a6f5ac404
Add default values
index.js
index.js
var THREE = require('three'); var createOrbitViewer = require('three-orbit-viewer')(THREE); var dat = require('exdat'); var tileGrabber = require('./tile-grabber'); var tileSources = { 'satellite': 'http://otile1.mqcdn.com/tiles/1.0.0/sat/', 'osm' : 'http://a.tile.openstreetmap.org/', 'toner' : 'http://a.tile.stam...
JavaScript
0.000003
@@ -687,17 +687,17 @@ stacks: -1 +4 0,%0A%09%09rad @@ -701,17 +701,17 @@ radius: -3 +4 ,%0A%09%09stri @@ -740,10 +740,8 @@ 0.1 -25 ,%0A%09%09 @@ -783,10 +783,9 @@ om: -17 +8 ,%0A%09%09 @@ -793,36 +793,19 @@ at: -40.657521,%0A%09%09lon: -73.959439 +0,%0A%09%09lon: 0 ,%0A%09%09 @@ -856,17 +856,17 @@ Count...
79e30d9f2bc128fc87bb19255e36dabaac462bff
refactor to make waitFor a bit simpler by using justWait
index.js
index.js
var q = require('q'); module.exports = { waitFor: function(condition, timeout, frequency){ timeout = timeout || 1000 frequency = frequency || 10 return new q.promise(function(resolve, reject){ var timedout = false, it = setInterval(function(){ try { condition() resolve()...
JavaScript
0.000043
@@ -156,101 +156,58 @@ -return new q.promise(function(resolve, reject)%7B +var now = new Date().getTime() %0A +%0A -var timedout = false, it = setInterval( + var try = func @@ -203,32 +203,37 @@ try = function( +error )%7B%0A try %7B @@ -229,182 +229,136 @@ - - try %7B%0A con...
b6aae571a02cb570ca575ad08eb30c52b697ca68
Fix linting error by using ternaries
index.js
index.js
'use strict'; var through2 = require('through2'); var Combine = require('ordered-read-streams'); var unique = require('unique-stream'); var glob = require('glob'); var pumpify = require('pumpify'); var isNegatedGlob = require('is-negated-glob'); var globParent = require('glob-parent'); var resolveGlob = require('to-a...
JavaScript
0
@@ -562,20 +562,29 @@ ore;%0A%0A -if ( +ourOpt.cwd = typeof o @@ -593,17 +593,17 @@ Opt.cwd -! += == 'stri @@ -605,23 +605,18 @@ 'string' -) %7B%0A +? ourOpt. @@ -619,17 +619,17 @@ Opt.cwd -= +: process @@ -634,32 +634,37 @@ ss.cwd();%0A -%7D%0A if ( +ourOpt.dot = typeof ourOp @@ -669,17 +669,...
ecfed646fa6d42d429b5287f823fc6ee9b732b3f
tidy up comments
index.js
index.js
var config = require("./config.js"); var commands = require("./commands.js"); var when = require("./when.js"); var slack = require("./slack.js"); var utility = require("./utility.js"); // periodically kill the process to get a clean slate (and let 'forever' restart it) setInterval(function(){ utility.log('Doing a per...
JavaScript
0
@@ -478,16 +478,46 @@ t(%0A%09%0A%09// + onconnect:%0A%09function() %7B%0A%09%09// get del @@ -530,30 +530,16 @@ ommands%0A -%09function() %7B%0A %09%09when.g @@ -823,27 +823,18 @@ %09// -listen for +on message -s +: %0A%09fu