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
93aadcedf6abaaeea65e0bdddcfedabd4f0bcf5a
Add callback for building metadata
index.js
index.js
var crypto = require('crypto') var stream = require('stream') var fileType = require('file-type') function staticValue (value) { return function (req, file, cb) { cb(null, value) } } function defaultKey (req, file, cb) { crypto.randomBytes(16, function (err, raw) { cb(err, err ? undefined : raw.toString...
JavaScript
0.000001
@@ -505,24 +505,101 @@ stream')%0A%7D%0A%0A +function defaultMetadata (req, file, cb) %7B%0A setImmediate(cb, null, null)%0A%7D%0A%0A function aut @@ -1228,32 +1228,135 @@ return cb(err)%0A%0A + storage.getMetadata(req, file, function (err, metadata) %7B%0A if (err) return cb(err)%0A%0A s...
016ab1e17dc850be50057443be02a0863c3beb2f
minor prettification
index.js
index.js
var postcss = require('postcss'); var reduceFunctionCall = require('reduce-function-call'); var d3 = require('d3-color'); function justFloat(n) { return parseFloat(n); } function objectToArray(o) { return Object.keys(o).map(function (key) { return o[key]; }); } function colorValuesDefined(hcl) {...
JavaScript
0.999999
@@ -85,17 +85,16 @@ call');%0A -%0A var d3 = @@ -603,17 +603,19 @@ lColor)) + %7B %0A - @@ -670,32 +670,42 @@ + value + '%22');%0A + %7D%0A if (!hcl @@ -724,16 +724,18 @@ yable()) + %7B %0A @@ -792,32 +792,43 @@ + value + '%22');%0A + %7D%0A%0A var hex @@ -1044,...
3011ee97d94c6b98dde64b29abd3d819c1854b71
simplify index.js
index.js
index.js
var electron = require('electron') var path = require('path') var app = electron.app // report crashes to the Electron project require('crash-reporter').start({ // TODO: collect crash reports // productName: 'WebTorrent', // companyName: 'WebTorrent', // submitURL: 'https://webtorrent.io/crash-report', // a...
JavaScript
0.999946
@@ -101,33 +101,12 @@ shes - to the Electron project%0A +%0A// requ @@ -139,45 +139,12 @@ t(%7B%0A - // -TODO: collect crash reports%0A // + pro @@ -167,20 +167,20 @@ rrent',%0A - // + company @@ -199,20 +199,20 @@ rrent',%0A - // + submitU @@ -253,20 +253,20 @@ eport',%0A - // + aut...
95f6c9f9e7ad81a55dc05bd23796764437f1d18e
Fix options mapping for array values
index.js
index.js
'use strict'; var _ = require('lodash'), child_process = require('child_process'), gutil = require('gulp-util'), PluginError = gutil.PluginError, es = require('event-stream'), path = require('path'), fs = require('fs'), PLUGIN_NAME = 'gulp-mspec-runner', MSPEC_CONSOLE = 'mspec-clr4.exe', MSPEC_X86_CO...
JavaScript
0.999999
@@ -1843,32 +1843,33 @@ y) %7B%0A%09%09%09%09return +%5B (switchChar + ke @@ -1869,24 +1869,18 @@ ar + key - + ':' + +), val.joi @@ -1885,17 +1885,17 @@ oin(',') -) +%5D ;%0A%09%09%09%7D%0A%09 @@ -1996,24 +1996,34 @@ %09return +_.flatten( filtered ;%0A%09%7D%0A%0Afu @@ -2014,16 +2014,17 @@ filtered +) ;%0...
eaab25b309d3ebd178e67d5a267428d5f8bdd402
fix java executable name
index.js
index.js
var count = 0; var spawn = require('child_process').spawn; var fs = require('fs'); function parseUml(page) { uml = page.content.match(/^```uml((.*\n)+?)?```$/igm); if (uml) { fs.writeFileSync("./plantuml.uml", uml); return true; } return false; } function execFile(command, args, callba...
JavaScript
0.999828
@@ -2458,17 +2458,16 @@ le('java -a ', %5B'-ja
c4d3e056f36ce7cd89607d6c6699ff8a19fe9cd4
Remove redundant console.log.
index.js
index.js
"use strict"; // A Quick var assign = Object.assign || require('./src/utils/object.assign.polyfill'); var commandLineArgumentsResolver = require('./src/resolvers/CommandLineArgumentsResolver'); var environmentVariablesResolver = require('./src/resolvers/EnvironmentVariablesResolver'); var jsonResolver = require('./sr...
JavaScript
0.000002
@@ -852,44 +852,4 @@ ;%0A%7D; -%0A%0Aconsole.log(module.exports.resolve());
737acdbf451d057a2e3bc00e80aaf2e81a0f4f4d
index machinetypeindicator
index.js
index.js
module.exports = { auth: { Account: require('./src/auth/account'), Profile: require('./src/auth/profile'), Role: require('./src/auth/role'), ApiEndpoint: require('./src/auth/api-endpoint') }, master: { Product: require('./src/master/product'), Buyer: require('...
JavaScript
0.000002
@@ -1402,17 +1402,17 @@ ne-type- -I +i ndicator
39e7b05060d0e764ca32d0bed602d145b7d7706a
Use new readable event from midiplex to start pipe
index.js
index.js
var Midiplex = require('midiplex') var midi = require('midi') var through = require('through') var net = require('net') var mp = new Midiplex() function controlServer(controlNum) { return net.createServer(function(stream) { mp.addControllerStream(stream, {maxVal: 127, controller: controlNum}) }) } var server...
JavaScript
0
@@ -542,16 +542,49 @@ output)%0A +%0Amp.on('readable', function()%7B%0A mp.getRe @@ -615,8 +615,11 @@ Stream)%0A +%7D)%0A
32054b4d31d050df3471d6e4b9afe10105dfad9d
Add "up and running" message to root of app.
index.js
index.js
var express = require('express'); var Fulcrum = require('fulcrum-app'); var models = require('fulcrum-models'); var fulcrumMiddleware = require('connect-fulcrum-webhook'); var Forecast = require('forecast.io'); var app = express(); var form; // Change the variables below to ma...
JavaScript
0
@@ -2711,24 +2711,123 @@ mConfig));%0A%0A +app.get('/', function (req, resp) %7B%0A resp.send('fulcrum-record-weather is up and running!');%0A%7D);%0A%0A var port = (
947a5276bdbcf4eb6ea98e16d89baea282cd0645
fix the merge conflict again whatever
index.js
index.js
var through = require('through'); var browserify = require('browserify'); var chokidar = require('chokidar'); module.exports = watchify; watchify.browserify = browserify; function watchify(opts) { if (!opts) opts = {}; var b = typeof opts.bundle === 'function' ? opts : browserify(opts); var cache = {}; ...
JavaScript
0.000001
@@ -434,29 +434,16 @@ s = %7B%7D;%0A -%3C%3C%3C%3C%3C%3C%3C HEAD%0A var @@ -492,84 +492,8 @@ %0A -=======%0A var first = true;%0A%0A%3E%3E%3E%3E%3E%3E%3E accept cache and pkgcache as options%0A @@ -598,79 +598,12 @@ %7D%0A -%3C%3C%3C%3C%3C%3C%3C HEAD%0A %0A=======%0A%0A%3E%3E%3E%3E%3E%3E%3E ac...
d3529aab61b169e5dda205489113664b8acda057
Fix path
index.js
index.js
'use strict'; const app = require('app'), BW = require('browser-window'), path = require('path'); // Various tasks to do before the app is ready. require('crash-reporter').start(); app.commandLine.appendSwitch('enable-transparent-visuals'); let main = null; app.on('ready', function(){ const screen = r...
JavaScript
0.000018
@@ -643,17 +643,8 @@ ame, - 'views', 'in
02c50eb26ff44dbd4c70507f12f9488758e6210a
save bytes
index.js
index.js
'use strict' module.exports = pixie pixie.compile = compile pixie.render = render function pixie (source, open, close) { open = open || '{{' close = close || '}}' var openLength = open.length var closeLength = close.length var fragments = [] var expressions = [] var first var last for (var i = 0; ...
JavaScript
0.000002
@@ -867,27 +867,18 @@ -if ( value -) %7B%0A + && ( sour @@ -892,14 +892,9 @@ alue -%0A %7D +) %0A %7D
2dcb00a2be18d2247dc52810b7888a8810eafc31
Add https client support
index.js
index.js
//////////////////////////////////////////////// // // Web Request Handler // //////////////////////////////////////////////// // Add 'startsWith' function to String objects // Reference: http://stackoverflow.com/questions/646628/how-to-check-if-a-string-startswith-another-string if (typeof String.prototype.startsWit...
JavaScript
0
@@ -457,24 +457,54 @@ re('http');%0A +var https = require('https');%0A var urlParse @@ -3431,32 +3431,41 @@ th;%0A%0A var + client = upstreamRequest @@ -3468,15 +3468,89 @@ uest - +Options.protocol = = +' http +s:' ? https : http;%0A var upstreamRequest = client .req
6a15e08b7618f298ae19b873c9e2eb7d9d9fce9d
update basic package-file testing
test/testPackageFiles.js
test/testPackageFiles.js
/* jshint -W097 */// jshint strict:false /*jslint node: true */ var expect = require('chai').expect; var fs = require('fs'); describe('Test package.json and io-package.json', function() { it('Test package files', function (done) { var fileContentIOPackage = fs.readFileSync(__dirname + '/../io-packag...
JavaScript
0
@@ -11,18 +11,19 @@ -W097 */ -// +%0A/* jshint @@ -34,19 +34,23 @@ ct:false + */ %0A/* + jslint n @@ -62,16 +62,40 @@ true */%0A +/* jshint expr: true */%0A var expe @@ -1158,32 +1158,738 @@ !');%0A %7D%0A%0A + expect(ioPackage.common.authors).to.exist;%0A if (ioPackage.common.name.index...
0e67be76485d7e836b3d7ccfa61f9a3f02dc36a6
support node_modules/.bin
index.js
index.js
var hackfile = require('hackfile') var fs = require('fs') module.exports = function(src) { var tree = hackfile(src.toString().replace(/(\s+)run (.+)\n/g, '$1run\n$1 $2\n').replace(/#[^\n]+/g, '')) // haxx var tick = 1 var backgrounds = [] var fns = [] var visit = function(line) { var cmd = line[0] ...
JavaScript
0.000001
@@ -1663,16 +1663,51 @@ n/bash%5Cn +export PATH=node_modules/.bin:$PATH '+fns.jo
493c7762f5b3922a1cb90813933831ae8fd5e7a3
update basic package-file testing
test/testPackageFiles.js
test/testPackageFiles.js
/* jshint -W097 */ /* jshint strict:false */ /* jslint node: true */ /* jshint expr: true */ var expect = require('chai').expect; var fs = require('fs'); describe('Test package.json and io-package.json', function() { it('Test package files', function (done) { console.log(); var fileContentI...
JavaScript
0
@@ -2574,130 +2574,8 @@ ue;%0A - expect(fs.existsSync(__dirname + '/../LICENSE'), 'ERROR: LICENSE needs to exist! Please create one.').to.be.true;%0A
c302d96b9c4027b15bf769d05c3f6e7c226082c2
Refactor the transform into smaller pieces
index.js
index.js
var transformTools = require('browserify-transform-tools'); var sourceMap = require('convert-source-map'); var extend = require('underscore').extend; var defaults = { sourceMap: false, readableNames: true, modules: [], }; var useMacros = /"use macros"|'use macros'/; var options = { includeExtensions: [".js",...
JavaScript
0.998569
@@ -104,22 +104,17 @@ ');%0Avar -extend +_ = requi @@ -133,15 +133,8 @@ re') -.extend ;%0A%0Av @@ -166,12 +166,11 @@ ap: -fals +tru e,%0A @@ -260,446 +260,162 @@ /;%0A%0A -var options = %7B%0A includeExtensions: %5B%22.js%22, %22.sjs%22%5D%0A%7D;%0A%0Amodule.exports = transformTools.makeStringTransform(%0A ...
45337604f15086a04c2007715d41231747accc2d
Add "@" to start of single line .cmd files
index.js
index.js
// On windows, create a .cmd file. // Read the #! in the file to see what it uses. The vast majority // of the time, this will be either: // "#!/usr/bin/env <prog> <args...>" // or: // "#!<prog> <args...>" // // Write a binroot/pkg.bin + ".cmd" file that has this line in it: // @<prog> <args...> %~dp0<target> %* modu...
JavaScript
0
@@ -3041,16 +3041,22 @@ cmd = + %22@%22 + prog +
e02a479f4d8e6e511d9b67238a00571acdf2838a
remove psvr
index.js
index.js
"use strict"; const PORT = 4422; const path = require('path'); //to control iRobot create2 const SerialPort = require("serialport"); const fs = require("fs"); const Repl = require("repl"); const Devices = require("./src/detect"); const express = require('express'); const app = express(); const http = require('http')....
JavaScript
0.000014
@@ -1144,61 +1144,8 @@ SVR%0A -var PSVR = require(%22psvr%22);%0Avar device = new PSVR();%0A let @@ -2165,232 +2165,8 @@ );%0A%0A - device.on(%22data%22, function(data) %7B%0A yaw = Math.floor(data.yaw * 0.00002) + 90;%0A%0A if( yaw %3C 0 ) %7B%0A yaw = 10;%0A %7D else if ( yaw %3E 180) %7B%0A y...
e3c51b51d660d9988b913c595ab7343dcf568b5b
fix gpio paths
index.js
index.js
"use strict" const fs = require("fs"); const path = require("path"); const base = "/sys/class/gpio/" exports.activate = (gpio) => { fs.createWriteStream(base + 'export').end(gpio.toString()) }; exports.deactivate= (gpio) => { fs.createWriteStream(base + 'unexport').end(gpio.toString()) }; exports.read = (g...
JavaScript
0.000004
@@ -93,16 +93,20 @@ ss/gpio/ +gpio %22%0A%0Aexpor @@ -378,24 +378,35 @@ (base + gpio + + %22/value%22 ));%0A%7D;%0A%0Aexpo @@ -485,15 +485,26 @@ e + gpio + + %22/value%22 ));%0A%7D;%0A
72660cc82266f9c39eee9a885865035a17273bfe
use _.extend on options in toc.add() method
index.js
index.js
/** * marked-toc <https://github.com/jonschlinkert/marked-toc> * * Copyright (c) 2014 Jon Schlinkert, contributors. * Licensed under the MIT license. */ 'use strict'; var file = require('fs-utils'); var marked = require('marked'); var chalk = require('chalk'); var matter = require('gray-matter'); var ...
JavaScript
0.000003
@@ -3031,24 +3031,74 @@ options) %7B%0A + var opts = _.extend(%7Bclean: %5B'docs'%5D%7D, options)%0A var conten @@ -3228,33 +3228,20 @@ ontent, -%7Bclean: %5B'docs'%5D%7D +opts ));%0A co @@ -3283,12 +3283,13 @@ ), dest);%0A%7D; +%0A
2e3c812965e7f8f95cb8e4738b52c80b8dbc80b2
fix #623
index.js
index.js
import Swiper from './src/' module.exports = Swiper
JavaScript
0
@@ -25,28 +25,255 @@ c/'%0A -module.exports = Swiper +/**%0A * Resolve ES6 and CommonJS compatibility issues%0A * 1. CommonJS code%0A * const Swiper = require('react-native-swiper');%0A * 2. ES6 code%0A * import Swiper from 'react-native-swiper';%0A */%0Amodule.exports = Swiper;%0Amodule.exports.default = Swiper...
7ca8e8b82b453fb3e071d108551f6da2a6469890
support opt.maxListeners
index.js
index.js
var CachedEmitter = require("cached-events") , slice = Array.prototype.slice module.exports = CachedOperation function CachedOperation(f, getKey) { var keys = {} , emitter = CachedEmitter() getKey = getKey || defaultGetKey return operation function operation() { var args = slice...
JavaScript
0
@@ -137,22 +137,20 @@ tion(f, -getKey +opts ) %7B%0A @@ -204,16 +204,43 @@ ()%0A%0A +opts = opts %7C%7C %7B%7D%0A%0A var getKey = @@ -236,24 +236,29 @@ ar getKey = +opts. getKey %7C%7C de @@ -270,16 +270,103 @@ GetKey%0A%0A + if (opts.maxListeners) %7B%0A emitter.setMaxListeners(opts.maxL...
d5fd035b30fbebd7c30348250264e05f150617f0
Add tokenizeMethod as default
index.js
index.js
var _ = require( "lodash" ); var WORDS = "a, about, above, across, after, again, against, all, almost, alone, along, already, also, although, always, among, an, and, another, any, anybody, anyone, anything, anywhere, are, area, areas, around, as, ask, asked, asking, asks, at, away, b, back, backed, backing, backs, be,...
JavaScript
0.000001
@@ -3091,13 +3091,114 @@ rn: -/%5CW+/ +undefined, %0A tokenizeMethod: function( s ) %7B%0A return s.replace(/%5B%5E%5Cw%5Cs-%5D/, %22%22).split( %22 %22 );%0A %7D ,%0A @@ -3540,49 +3540,155 @@ ults - = s.split(this.options.tokenizePattern); +;%0A if( this.options.tokenizePattern )%0A results = s.sp...
c6f4f200b60fb288f210610bc137577816369dfc
Use correct port for HTTPS
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.000088
@@ -382,16 +382,49 @@ s.port = + params.scheme == 'https' ? 443 : 80;%0A
e4c78f1a4f338a52f4154aade95e3814746dbc7d
add module_folder to exports
index.js
index.js
/* * index.js * * David Janes * IOTDB.org * 2015-06-22 * * Copyright [2013-2015] [David P. Janes] * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apach...
JavaScript
0.000001
@@ -1944,12 +1944,48 @@ );%0A %7D%0A%7D;%0A +%0Aexports.module_folder = __dirname;%0A
0f582c22b792b578cf9500a057a486b45dbe98bc
make sure we're working with string in the string stringifier
index.js
index.js
'use strict'; function isObject(x) { return typeof x === 'object' && x !== null; } module.exports = function (val, opts, pad) { var seen = []; return (function stringify(val, opts, pad) { opts = opts || {}; opts.indent = opts.indent || '\t'; pad = pad || ''; if (typeof val === 'number' || typeof val =...
JavaScript
0.000204
@@ -1429,27 +1429,35 @@ eturn '%22' + +String( val +) .replace(/%22/ @@ -1495,19 +1495,27 @@ '%5C'' + +String( val +) .replace
96fcb7b050504c3b83854794e83cb4c9c797578b
move constructor methods to top level
index.js
index.js
module.exports = { Parser = require('./lib/parser.js'), Evaluator = require('./lib/evaluator.js'), types = require('./types') };
JavaScript
0
@@ -22,18 +22,70 @@ Parser - = +: require('./lib/parser.js').Parser,%0A createParser: require @@ -99,24 +99,37 @@ /parser.js') +.createParser ,%0A Evalua @@ -131,18 +131,79 @@ valuator - = +: require('./lib/evaluator.js').Evaluator,%0A createEvaluator: require @@ -224,16 +224,32 @@ tor.js') +.create...
a801611772d73f564260b6690a156f047a1757f5
Change sendFile error
index.js
index.js
const fs = require('fs'); const config = require('./config.json'); const restify = require('restify'); const Router = require('./Router'); const router = new Router(); const server = restify.createServer({ name: 'SmallCDN', }); server.use(restify.gzipResponse()); server.use((req, res, next) => { res.sendFile = ...
JavaScript
0.000001
@@ -500,19 +500,17 @@ %7B code: -500 +6 , messag @@ -516,19 +516,46 @@ ge: -err.message +%22there was an error reading from disk%22 %7D);
e3b1656e91606c8c19aea649a40fb277398df43b
Update some doc comments.
index.js
index.js
export {Transform} from "./transform" export {Step, StepResult} from "./step" export {canLift, canWrap} from "./ancestor" export {joinPoint, joinableBlocks} from "./join" export {PosMap, MapResult, Remapping} from "./map" import "./mark" import "./split" import "./replace" // !! This module defines a way to transform ...
JavaScript
0
@@ -869,24 +869,110 @@ onment).%0A//%0A +// You can read more about transformations in %5Bthis%0A// guide%5D(guide/transform.md).%0A//%0A // These are
e004df50879299306ecc3cf0310c98eb53f2b9be
Remove extraneous statements, use new class name
index.js
index.js
// jscs:disable requireMultipleVarDecl 'use strict'; var Promise = require('bluebird'), StorageBase = require('ghost-storage-base'), imgur = require('imgur'); class ImgurStore extends StorageBase { constructor() { super(); } save(image) { // TODO: save delete url return new P...
JavaScript
0.0003
@@ -87,27 +87,27 @@ '),%0A +Base Storage -Base = requi @@ -178,16 +178,18 @@ mgurStor +ag e extend @@ -194,19 +194,19 @@ nds +Base Storage -Base %7B%0A @@ -314,56 +314,8 @@ urn -new Promise(function(resolve, reject) %7B%0A imgu @@ -339,18 +339,16 @@ e.path)%0A - @@ -384,76 +384,3...
20de9a903fb14a38eef2321438309ed1dfbe807d
Fix movements 3.
index.js
index.js
// Load dependencies const express = require('express'); var app = express(); const path = require('path'), server = require('http').createServer(app), port = process.env.PORT || 5223; io = require('socket.io')(server); // Server global acc, vel, dist variables var aX = 0, aY = 0, aZ = 0, vX = 0, vY = 0, vZ ...
JavaScript
0
@@ -1003,10 +1003,9 @@ 67, -60 +1 );%0A
37b9d0b60166a80f5fe5d0597ffa01fc67a0afe5
Remove flow file annotation rule
index.js
index.js
const restrictedGlobals = require("eslint-restricted-globals"); module.exports = { root: true, parser: "babel-eslint", extends: [ "airbnb", "plugin:flowtype/recommended", "prettier", "prettier/flowtype", "prettier/react" ], plugins: ["flowtype"], globals: { _LTracker: false, ...
JavaScript
0
@@ -2512,127 +2512,8 @@ %5D,%0A - %22flowtype/require-valid-file-annotation%22: %5B%0A %22warn%22,%0A %22always%22,%0A %7B annotationStyle: %22line%22 %7D%0A %5D,%0A
d7b72e48aaf6eda79c2f874439b4866838f7808c
Revert "Testing"
index.js
index.js
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ______ ______ ______ __ __ __ ______ /\ == \ /\ __ \ /\__ _\ /\ \/ / /\ \ /\__ _\ \ \ __< \ \ \/\ \ \/_/\ \/ \ \ _"-. \ \ \ \/_/\ \/ \ \_____\ \ \_____\ \ \_\ \ \_\ \_\ \ \_\ \ \_\ \/_____/ \/_____/ ...
JavaScript
0
@@ -3808,16 +3808,8 @@ ') %7B - // test %0A
56678965684e2604a30b423ea83cc4a47f5ad97b
Edit comments.
index.js
index.js
/* Copyright (c) 2015 Jesse McCarthy <http://jessemccarthy.net/> */ var rs = require('readable-stream'), util = require('util'); // A full pragma looks like // `({"compiler": "browserify", "version": "1.23.456"});` module.exports = BrowserifyPragma; function BrowserifyPragma (opts) { if (!(this instanceof Bro...
JavaScript
0
@@ -132,38 +132,353 @@ );%0A%0A -// A full pragma looks like%0A// +module.exports = BrowserifyPragma;%0A%0A/**%0A * Implement browserify pragma handling logic. A pragma is a fragment that can%0A * be prepended to bundles and subsequently detected by browserify during%0A * bundling to apply appropriate handling to the ...
3dd57320b5f5596bab0a475cc7547def7fb5f141
Fix grid generation bugs
app/scripts/hexmap.js
app/scripts/hexmap.js
'use strict'; /** * @ngdoc function * @name learningAngularJsApp.controller:HexmapCtrl * @description * # HexmapCtrl * Controller of the learningAngularJsApp */ // Hex math defined here: http://blog.ruslans.com/2011/02/hexagonal-grid-math.html function HexagonGrid(canvasId, radius) { this.radius = radius...
JavaScript
0
@@ -1984,16 +1984,17 @@ ius; u %3C += radius; @@ -2032,16 +2032,17 @@ ius; v %3C += radius; @@ -2145,17 +2145,22 @@ (a,b) %3E -3 +radius )%7B%0A
0ad05f23c5e4fc1c4eec99c75aa69de235bcb86c
Simplify API and add a method for getting global options.
index.js
index.js
'use strict'; var assign = require('object-assign'); var argv = require('minimist')(process.argv.slice(2)); var path = require('path'); var loaded = []; function loadTask (task, opts) { var func; var funcLoadError; // Don't trace tasks if they've already been loaded. if (loaded.indexOf(task) > -1) { retu...
JavaScript
0
@@ -102,16 +102,40 @@ ce(2));%0A +var fs = require('fs');%0A var path @@ -150,24 +150,25 @@ re('path');%0A +%0A var loaded = @@ -168,18 +168,18 @@ oaded = -%5B%5D +%7B%7D ;%0A%0Afunct @@ -186,28 +186,114 @@ ion -loadTask (task, opts +resolvePath (p) %7B%0A return path.isAbsolute(p) ? p : path.join(process.cwd...
fe907951ffd0033a2752649c4d380d3de93ca35c
change codestyle
index.js
index.js
const isSeparator = (input) => input === '-' || (Array.isArray(input) && input[0] === '-') const isClickHandler = (fn) => typeof fn === 'function' const isRole = (role) => [ 'undo', 'redo', 'cut', 'copy', 'paste', 'pasteandmatchstyle', 'selectall', 'delete', 'minimize', 'close', 'quit', 'togglefullscreen', 'about',...
JavaScript
0.000028
@@ -560,16 +560,17 @@ esc%0A %7D%0A +%0A if (me @@ -601,71 +601,10 @@ urn -menuDesc%0A menuDesc = menuDesc.slice(0) // shallow clone array%0A +%5B%5D %0A i @@ -664,46 +664,8 @@ r' %7D -%0A%0A // is it a menu-item or a submenu? %0A i @@ -682,25 +682,25 @@ menuDesc%5B0%5D -= +! == 'string') @@ -700,20 +7...
f18c4103c7e29e17a8a185821fed4a11f625275f
remove unused modules
index.js
index.js
'use strict'; function hasLocalConfig() { try { require.resolve('./localConfig'); return true; } catch (e) { return false; } } if (hasLocalConfig()) Object.assign(process.env, require('./localConfig')); const path = require('path'); const co = require('co'); const koa = require('koa'); const rout...
JavaScript
0.000002
@@ -6,16 +6,74 @@ strict'; +%0Aconst path = require('path');%0Aconst koa = require('koa'); %0A%0Afuncti @@ -280,164 +280,8 @@ );%0A%0A -%0Aconst path = require('path');%0Aconst co = require('co');%0Aconst koa = require('koa');%0Aconst route = require('koa-route');%0Aconst gh = require('./lib/github'); %0A%0Aco
32ca55b674243e19e3dbc40830860208a5f14c0a
handle `unhandledRejection`s, tweaks
index.js
index.js
/*! * always-done <https://github.com/tunnckoCore/always-done> * * Copyright (c) 2015 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk) * Released under the MIT license. */ 'use strict' var sliced = require('sliced') var onetime = require('onetime') var dezalgo = require('dezalgo') var Bluebird = ...
JavaScript
0
@@ -1231,16 +1231,59 @@ , done)%0A + process.once('unhandledRejection', done)%0A proces @@ -1807,20 +1807,104 @@ , done, -done +function () %7B%0A callback.apply(self, %5Bnull%5D.concat(sliced(arguments)))%0A %7D )%0A @@ -2016,24 +2016,41 @@ null, ret)%0A + return ret%0A %7D, d...
236e521dd312f0140edf6d7ce390e54b5718da1e
Use repl
index.js
index.js
/* Licensed under the MIT License. See the accompanying LICENSE file for terms. */ var readline = require('readline'), async = require('async'), serialport = require('serialport'), SerialPort = serialport.SerialPort, connected = false, candidates = [], input, esp; function readPorts(err, p...
JavaScript
0.000001
@@ -87,34 +87,136 @@ r re -adline = require('readline +pl = require('repl'), // https://github.com/joyent/node/blob/master/lib/repl.js%0A util = require('util'),%0A vm = require('vm '),%0A @@ -325,16 +325,59 @@ alPort,%0A + espruinoStub = require('./data/stub'),%0A conn @@ -412,16 +412,29 @@ s = %5B%5...
94566feb4d0d66c97091282bd687e1589e6f4033
Corrige nome de uma variável.
index.js
index.js
'use strict'; function um(num) { var numeros = [ 'zero', 'um', 'dois', 'três', 'quatro', 'cinco', 'seis', 'sete', 'oito', 'nove' ]; return numeros[num]; } function dez(num) { if (num < 10) { return um(num); } ...
JavaScript
0
@@ -1584,16 +1584,17 @@ mero, si +n gular, p @@ -1901,24 +1901,25 @@ n 'um ' + si +n gular;%0A @@ -2060,32 +2060,33 @@ return si +n gular + ' e ' + @@ -2148,16 +2148,17 @@ eturn si +n gular + @@ -2290,32 +2290,33 @@ eturn 'um ' + si +n gular + ' e ' + @@ -2386,16 +2386,17 @@ m ' + si +n gular...
4b6e393288853a1cf21bb92de29f9c18f7e7e02a
add load test
index.js
index.js
/** *@file index.js *@description 合并ajax请求 请求格式eg: *@author xtx1130 *@example: $.ajax({ url:'http://127.0.0.1:8086', type:'post', data:{ 0:{ url:'http://url', type:'get', data:'qipuId=1' }, 1:{ url:'http://url', type:'get', data:'qipuId=1' } }, success:function(data){ ...
JavaScript
0.000001
@@ -1,11 +1,12 @@ /** +1 %0A *@file
b97e0dc7a97b9ed76bd9e376b8c2e2fe28c929c8
Add options for exact or g regex
index.js
index.js
'use strict'; module.exports = function() { return new RegExp('^\\s*(?:\\+?(\\d{1,3}))?[-. (]*(\\d{3})[-. )]*(\\d{3})[-. ]*(\\d{4})(?: *x(\\d+))?\\s*$'); }
JavaScript
0.000001
@@ -38,34 +38,65 @@ ion( -) %7B%0A return new RegExp('%5E +options) %7B%0A options = options %7C%7C %7B%7D;%0A var regexBase = ' %5C%5Cs* @@ -180,9 +180,122 @@ %5C%5Cs* -$ +';%0A%0A return options.exact ? new RegExp('%5E' + regexBase + '$') :%0A new RegExp(regexBase, 'g ');%0A
ee03843f84a84ce36b26c32ff89b4c5d7dad13f0
remove extra space
index.js
index.js
var app = require('./src'); var port = process.env.PORT || 5000; app.listen(port); console.log("Linx API server listening on port ", port); module.exports = app;
JavaScript
0.002319
@@ -125,17 +125,16 @@ on port - %22, port)
698a66400593281a6c97a3f69643d7f6ddaa3301
remove unneeded Promise.all()
index.js
index.js
/* jslint node: true, esnext: true */ "use strict"; const AdpaterInboundFileFactory = require('./lib/adapter-inbound-file'); exports.adpaterInboundFile = AdpaterInboundFileFactory; exports.registerWithManager = manager => Promise.all([ manager.registerStep(AdpaterInboundFileFactory) ]);
JavaScript
0.000001
@@ -31,17 +31,17 @@ true */%0A -%22 +' use stri @@ -46,9 +46,9 @@ rict -%22 +' ;%0A%0Ac @@ -222,23 +222,8 @@ =%3E -Promise.all(%5B%0A%09 mana @@ -269,9 +269,6 @@ ory) -%0A%5D) ;%0A
a304e6d5d0706d03fc664634a058325cfab099d0
delete console.log
app/static/js/edit.js
app/static/js/edit.js
$(document).ready(function() { playground({ 'codeEl': '#code', 'outputEl': '#output', 'runEl': '#run', 'fmtEl': '#fmt', 'fmtImportEl': '#imports', 'shareEl': '#share', 'shareURLEl': '#shareURL', 'enableHistory': true }); playgroundEmbed({ 'codeEl': '#code', '...
JavaScript
0.000007
@@ -1430,84 +1430,8 @@ %22);%0A -%09%09%09%09console.log(data);%0A%09%09%09%09console.log(textStatus);%0A%09%09%09%09console.log(jqXHR);%0A %09%09%09%7D @@ -1531,91 +1531,8 @@ %22);%0A -%09%09%09%09console.log(jqXHR);%0A%09%09%09%09console.log(textStatus);%0A%09%09%09%09console.log(errorThrown);%0A %09%09%09%7D
50443f9afce31d8a7bfe4e663e42e04702820441
Use full gain on the sine/cosine waves
index.js
index.js
'use strict' var debug = require('debug')('monster-drift') delete process.env.DEBUG // hackrf doesn't like this flag var devices = require('hackrf')() var ook = require('./lib/ook') var commands = require('./lib/commands') module.exports = MonsterDrift function MonsterDrift (opts) { if (!(this instanceof MonsterD...
JavaScript
0.000001
@@ -677,10 +677,11 @@ in: -32 +127 ,%0A
0b232e0f71c1f08a73d6942c97377c603a8e97d7
Fix SafeBuffer.from() to throw when passed a number
index.js
index.js
var buffer = require('buffer') if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { module.exports = buffer } else { // Copy properties from require('buffer') Object.keys(buffer).forEach(function (prop) { exports[prop] = buffer[prop] }) exports.Buffer = SafeBuffer } functio...
JavaScript
0.000001
@@ -607,13 +607,11 @@ eof -value +arg ===
ea615f1e0c4ff0200f28a681971f6d883c9163d2
Use strictEqual in test.js
app/templates/test.js
app/templates/test.js
'use strict'; var assert = require('assert'); var <%=camelize(props.project)%> = require('./index.js'); it('should do something', function () { assert.equals(true, false); });
JavaScript
0.000002
@@ -150,14 +150,19 @@ ert. -e +strictE qual -s (tru
c78d3dd455311f0bef1f29b8ea4c35b70158cb1e
Update signal check on child process exit
index.js
index.js
'use strict'; var Promise = require('bluebird'); var PriorityQueue = require('js-priority-queue'); var cp = require('child_process'); var uuid = require('uuid'); var _ = require('lodash'); var Tadpole = (function () { //Private Variables var _initialized = false, _options, _addsPending = 0, _toRemove = 0, _a...
JavaScript
0
@@ -5878,17 +5878,16 @@ if ( -! signal -= +! == ' @@ -7209,8 +7209,9 @@ Tadpole; +%0A
341a926419f625a64f09db044e69942d81314433
Add readable stream
index.js
index.js
import request from 'request'; import cheerio from 'cheerio'; export function sendInitialQuery(query, callback) { if (!query.year) { return process.nextTick(callback, new Error('query.year is not provided')); } const j = request.jar(); const INITIAL_URL = `http://${query.ip}/alis/EK/do_searh.php?radiodate=...
JavaScript
0.000008
@@ -54,16 +54,142 @@ heerio'; +%0Aimport Stream from 'stream';%0A%0Aexport const ReadableStreamBooks = new Stream.Readable();%0AReadableStreamBooks._read = () =%3E %7B%7D; %0A%0Aexport
3b64740ef9027c174fa24ce23b39f9d6ca76309a
remove unnecessary code
index.js
index.js
'use strict'; var debug = require('debug')('prompt-list'); var Radio = require('prompt-radio'); var cyan = require('ansi-cyan'); var dim = require('ansi-dim'); /** * List prompt */ function List(question, answers, ui) { debug('initializing from <%s>', __filename); Radio.apply(this, arguments); this.listIniti...
JavaScript
0.00242
@@ -364,75 +364,8 @@ t';%0A -%0A this.default = question.default;%0A this._when = question.when;%0A%0A th @@ -1504,33 +1504,66 @@ %7B%0A -if (this._when && !this._ +var that = this;%0A return Promise.resolve(Radio.prototype. when @@ -1590,19 +1590,46 @@ ts)) +%0A .then(function(when) %7B%0A -this +...
df46c56adfc09dc634dfe00a1f1616c0a86c3c9d
add plugin.expose to rethinkdb as documented
index.js
index.js
'use strict'; var rethink = require('rethinkdb'); exports.register = function (plugin, opts, next) { opts = opts || {}; if (!opts.url) { opts.port = opts.port || 28015; opts.host = opts.host || 'localhost'; opts.db = opts.db || 'test'; } else { var url = require('url').parse(opts.url); opts....
JavaScript
0
@@ -791,16 +791,57 @@ think);%0A + plugin.expose('rethinkdb', rethink);%0A plug
b99e4d691373bdbf01c2585597a1c635d8dad61e
fix index.js style
index.js
index.js
var fs = require('fs') var path = require('path') var stripComments = require('strip-json-comments') var filename = path.join(__dirname, '.eslintrc') var data = fs.readFileSync(filename, {encoding: 'utf-8'}) var dataWithoutComments = stripComments(data) var parsed = JSON.parse(dataWithoutComments) module.exports = pa...
JavaScript
0.000176
@@ -1,12 +1,27 @@ +'use strict';%0A%0A var fs = req @@ -30,16 +30,17 @@ re('fs') +; %0Avar pat @@ -58,16 +58,17 @@ ('path') +; %0Avar str @@ -110,16 +110,17 @@ mments') +; %0A%0Avar fi @@ -161,16 +161,17 @@ lintrc') +; %0Avar dat @@ -219,13 +219,13 @@ 'utf -- 8'%7D) +; %0Avar @@ -266,16 +266,17 @@ ts(data)...
d74c9dbf5d71d02efe6c6c5074e57b09f9e7059d
Add ALLOW_RELEASE_CANDIDATE_TAG env option
index.js
index.js
#! /usr/bin/env node require('dotenv').config({ path: `${ process.env.PWD }/.env` }) const standardChangelog = require('standard-changelog') , conventionalGithubReleaser = require('conventional-github-releaser') , bump = require('bump-regex') , inquirer = require('inquirer') , fs = require('fs') ,...
JavaScript
0.000002
@@ -3230,33 +3230,87 @@ eid === RC_PREID -) + && !process.env.ALLOW_RELEASE_CANDIDATE_TAG) %7B%0A return version%0A @@ -3305,24 +3305,30 @@ urn version%0A + %7D%0A let defe @@ -4596,20 +4596,56 @@ t tag', -true +!process.env.ALLOW_RELEASE_CANDIDATE_TAG ))%0A.then
6b7effa076c38a4843c1be98f68a34ff5b599a36
Add a start parameter to get event only from a specific date
index.js
index.js
"use strict"; var https = require("https"); var xmljs = require("libxmljs"); module.exports = { /** * Get a list of Folders/Calendars from a given url * * @param {String} url * @param {String} user * @param {String} pass * @param {function} cb */ getList: function (url, user, pass, cb)...
JavaScript
0
@@ -2545,32 +2545,101 @@ %7BString%7D pass%0A + * @param %7BString%7D date from which to start like 20140617T112033Z%0A * @param %7Bfu @@ -2687,32 +2687,39 @@ url, user, pass, + start, cb) %7B%0A%0A var @@ -3321,32 +3321,25 @@ start=%22 -20140617T112033Z +'+start+' %22/%3E%5Cn' + @@ -5472,8 +5472,9...
f967eab11e2877d3504ccd6b36e1da45c92d4ddb
Fix jslint errors
index.js
index.js
/*jslint indent: 2 */ /*global console: true, require: true, exports */ var EventEmitter = require('events').EventEmitter; var GoogleClientLogin = require('googleclientlogin').GoogleClientLogin; var util = require('util'); var querystring = require('querystring'); const contactsUrl = '/m8/feeds/contacts/', conta...
JavaScript
0.000436
@@ -11,16 +11,29 @@ ndent: 2 +, nomen: true */%0A/*gl @@ -276,13 +276,12 @@ );%0A%0A -const +var con @@ -314,20 +314,16 @@ acts/',%0A - contac @@ -356,20 +356,16 @@ oups/',%0A - typeCo @@ -385,20 +385,16 @@ tacts',%0A - typeGr @@ -410,20 +410,16 @@ roups',%0A - projec @@ -1124,17 ...
6c0d7af43219c275d4451e53bb08b2d91ec8022b
Fix ssdb client pool from update
index.js
index.js
var express = require('express'); var app = express(); var ssdb = require('ssdb') var debug = require('debug')('rapidchat') //ssdb promise global.Promise = require('bluebird').Promise app.get('/', function(req, res){ res.sendFile(__dirname + '/index.html') }) app.use(express.static(__dirname)) var server = app.li...
JavaScript
0
@@ -120,20 +120,30 @@ at')%0A%0A// -ssdb +replace native promise @@ -383,16 +383,62 @@ 23)%0A%7D)%0A%0A +var pool = ssdb.createPool(%7Bpromisify: true%7D)%0A //@todo @@ -488,37 +488,20 @@ t = -ssdb.createClient().promisify +pool.acquire ()%0Av
b95f46d0025624ccf22390b96caa43d495600e8b
remove `ask` plugin for now
index.js
index.js
/*! * update <https://github.com/jonschlinkert/update> * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. */ 'use strict'; /** * module dependencies */ var path = require('path'); var minimist = require('minimist'); var expand = require('expand-args'); var cli = require('base-cli'); var...
JavaScript
0
@@ -467,43 +467,8 @@ e'); -%0Avar ask = require('assemble-ask'); %0A%0Ava @@ -1998,24 +1998,8 @@ ())%0A - .use(ask())%0A
686e65c9e3bc0ecb03e3b31de17c52d469ecc860
Set a title
app/webpack.common.js
app/webpack.common.js
'use strict' const path = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') const CleanWebpackPlugin = require('clean-webpack-plugin') const webpack = require('webpack') const merge = require('webpack-merge') const devClientId = '3a723b10ac5575cc5bb9' const devClientSecret = '22c34d87789a365981...
JavaScript
0.999999
@@ -3641,33 +3641,63 @@ gin(%7B%0A -' +title: 'GitHub Desktop',%0A filename ': 'crash.ht @@ -3684,17 +3684,16 @@ filename -' : 'crash @@ -3702,32 +3702,30 @@ tml',%0A -' chunks -' : %5B'crash'%5D%0A
83ce9359345cf944a2f715db8a39cf839658f472
Update splitEvery test with ES6 syntax
test/util/split-every.js
test/util/split-every.js
import {assert} from 'chai'; import splitEvery from '../../src/util/split-every.js'; describe('#splitEvery', () => { it('should split a collection into slices of the specified length', function() { assert.deepEqual(R.splitEvery(1, [1, 2, 3, 4]), [[1], [2], [3], [4]]); assert.deepEqual(R.splitEvery(2, [1, 2, ...
JavaScript
0
@@ -185,18 +185,13 @@ h', -function() +() =%3E %7B%0A
ceb96e712da4212770713d5e77714b471b0bdc09
put built browser file into root dir for visual test
test/visual/runvisual.js
test/visual/runvisual.js
var connect = require('connect'), fs = require("fs"), path = require("path"), sys = require("sys"); build(path.resolve(__dirname, "../../package.json")); connect.createServer( connect.staticProvider({ root: path.join(__dirname, "files"), cache: true }) ).listen(3000); sys.puts("visit http://127.0.0.1:3...
JavaScript
0
@@ -106,16 +106,58 @@ sys%22);%0A%0A +var root = path.join(__dirname, %22files%22);%0A build(pa @@ -262,37 +262,12 @@ ot: -path.join(__dirname, %22files%22) +root , ca @@ -523,16 +523,32 @@ dest %7C%7C + path.join(root, name + @@ -552,18 +552,18 @@ + %22.js%22 +) ; -%0A %0A var c
a1da80b41584d9ddaacf774aabbece61e31c082f
Add test for number names
tests/validation.test.js
tests/validation.test.js
/* global describe, it */ 'use strict'; (function () { var expect = require('chai').expect; var utils = require('../src/utils'); var Command = require('../src/command'); var KWArg = require('../src/kwarg'); var Flag = require('../src/flag'); var Arg = require('../src/arg'); describe('validation', fun...
JavaScript
0.000072
@@ -793,32 +793,88 @@ throw(anError);%0A + expect(node.bind(null, 1)).to.throw(anError);%0A %7D);%0A
dd541abcc57e23d79410a2f24d1472c60de3acc3
fix cross require
indexer.js
indexer.js
var request = require('request'); var async = require('async'); var _ = require('lodash'); var fs = require('fs'); var moment = require('moment'); var autocomplete = require('./autocomplete'); var EventEmitter = require('events').EventEmitter; var cross = require('cross'); //var url = "http://sis.rutgers.edu/soc/subje...
JavaScript
0
@@ -258,16 +258,18 @@ equire(' +./ cross');
872560892c58fb1ac1f8cb32d6625ba8784e4f86
fix exec
release.config.js
release.config.js
const CHANGELOG_HEADER = `# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), enforced with [semantic-release](https://gith...
JavaScript
0.000001
@@ -992,52 +992,8 @@ %7B%0A - verifyConditionsCmd: './verify.sh',%0A
ffe4a0cbd3b4ad95110afc4bf88a94faf00b1478
Remove commented code
routes/newUser.js
routes/newUser.js
const UserDB = require('../db/userdb').Users exports.save = (req, res, next) => { var data = req.body.user //req.session.user = user UserDB.insert(data, (err, user) => { console.log('<newUser.js, save > callback from DB after insert user -> ', user) if (err) throw new Error(err) retriveUserDetailAndR...
JavaScript
0
@@ -107,36 +107,8 @@ ser%0A - //req.session.user = user%0A Us
a6eb117fd246888474b08546a969385d4f71c34c
Remove debug
routes/threads.js
routes/threads.js
module.exports = function threads(app, apiClient){ app.get('/:shortname', function(req, res){ var shortName = req.params.shortname, page = req.query.page; apiClient.getBoard(shortName, function(err, board){ var boardName; if(board && board.name){ boardName = board.name.toLowerCase(); } apiCli...
JavaScript
0.000001
@@ -378,34 +378,8 @@ s)%7B%0A -%09%09%09%09console.log(threads);%0A %09%09%09%09
a6b2580b1ff344216b27e6ee5cf8a53fe6c8877e
comment out to debug an error
routes/webhook.js
routes/webhook.js
// for facebook verification 'use strict' const util = require('util'); const path = require('path'); const constants = require(path.join(__dirname, "../setup/constants")); const USER_DOMAIN = 'https://graph.facebook.com/v2.6/1356921494324269'; const request = require('request'), pageAccessToken = constants.PAG...
JavaScript
0
@@ -2080,16 +2080,18 @@ ction%0A%09%09 +// testCont
bbe7be31955150f734a1a652a1fa575274af96dc
update if exists by author/name
app-database.js
app-database.js
var Bacon = require("baconjs") var randomstring = require("randomstring") var MongoClient = require('mongodb').MongoClient function AppDatabase(mongoUrl, app) { MongoClient.connect(mongoUrl, function(err, conn) { if (err) { console.log("ERROR: cannot connect to mongo at ", mongoUrl, err) } else { ...
JavaScript
0.000001
@@ -844,32 +844,24 @@ mongoFind(%7B%22 -content. author%22: req @@ -881,27 +881,12 @@ r, %22 -content.description +name %22: r @@ -972,56 +972,153 @@ -var data = %7B%0A id: randomstring.generate(10) +sendResult(mongoPost(req.body), res)%0A %7D)%0A function mongoPost(content) %7B%0A var data = %7B%0A...
9f718de3d22b05d70b9cbd94f0f86cbeb719d154
this.getUint16 should be this.dv.getUint16
typeServices/application/x-java-class.js
typeServices/application/x-java-class.js
define(function() { 'use strict'; function ClassView(buffer, byteOffset, byteLength) { this.dv = new DataView(buffer, byteOffset, byteLength); this.bytes = new Uint8Array(buffer, byteOffset, byteLength); } ClassView.prototype = { get signature() { return this.dv.getUint32(0, false); },...
JavaScript
0.999993
@@ -4104,32 +4104,35 @@ stantPools%5Bthis. +dv. getUint16(this.c @@ -4234,16 +4234,19 @@ ls%5Bthis. +dv. getUint1
0127c0947ced28baddc096e0e73065308ed111c3
Test game on mobile with js movements
app/game/car.js
app/game/car.js
var carIDList = []; var printed = false; function newCarID(){ var newID = "car" + carIDList.length; carIDList.push(newID); return newID; } Car.prototype.id = "" //String: ID of DOM representation Car.prototype.name = "" //String Car.prototype.color = "" //Color as String Car.prototype.position = 0 //Double Car.pr...
JavaScript
0
@@ -289,28 +289,95 @@ ype. -position = 0 //Doubl +boardSize = 100; //Double%0ACar.prototype.position = 0 //Double as percentage of boardSiz e%0ACa @@ -607,16 +607,39 @@ %22red%22;%0A +%09this.boardSize = 100;%0A %09this.po @@ -813,16 +813,16 @@ ement)%7B%0A - %09//conso @@ -858,16 +858,45 @@ .name);%0A +%09this...
92e02d8a322678aed62e451ad53043928397d416
Rename interface.
app/gateways.js
app/gateways.js
exports = module.exports = function(IoC, dfault) { var Factory = require('fluidfactory'); var factory = new Factory(); return Promise.resolve(factory) .then(function(factory) { var detectorPlugIns = IoC.components('http://i.bixbyjs.org/platform/http/gatewayDetector'); return Promise.al...
JavaScript
0
@@ -268,17 +268,17 @@ rm/http/ -g +G atewayDe
ee46763a7aa8468a2c2e04dfa829ca4d97267e9d
Make sure midnight gets converted properly. Fixes feedbin/support#349.
vendor/assets/javascripts/format_date.js
vendor/assets/javascripts/format_date.js
(function () { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; var re = new RegExp(/%(a|A|b|B|c|C|d|D|e|F|h|H|I|j|k|l|L|m|M|n|p|P|r|R|s|S|t|T|u|U|v|V|W|w|x|X|y|Y|z)/g); var abbreviatedWeekdays = ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"]; var fullWeekdays = ["S...
JavaScript
0
@@ -1603,24 +1603,89 @@ veHour(d) %7B%0A + if (d.getHours() == 0) %7B%0A return 12;%0A %7D%0A else %7B%0A return d @@ -1737,16 +1737,22 @@ ours();%0A + %7D%0A %7D%0A %0A
c3eb73c926839ba188c9ad2dc14a2be1cbd532be
add SLACK_APP_CLIENT_ID from Heroku config to bundle
tasks/loadHerokuEnv.js
tasks/loadHerokuEnv.js
import { herokuConfig } from './util' import { extend, pick } from 'lodash' const keys = [ 'ASSET_HOST', 'ASSET_PATH', 'AWS_ACCESS_KEY_ID', 'AWS_S3_BUCKET', 'AWS_S3_HOST', 'AWS_SECRET_ACCESS_KEY', 'FACEBOOK_APP_ID', 'FILEPICKER_API_KEY', 'GOOGLE_BROWSER_KEY', 'GOOGLE_CLIENT_ID', 'LOG_LEVEL', 'N...
JavaScript
0
@@ -340,16 +340,41 @@ T_KEY',%0A + 'SLACK_APP_CLIENT_ID',%0A 'UPSTR
8f7dc33e6b0751b1a1c6fb451d42409759f52aa5
change admin.js
app/js/admin.js
app/js/admin.js
var admin_ready = function() { $('#admin_page_controller').hide(); var eventName = getURLParameter("q"); $('#text_event_name').text("Event name: " + eventName); if(eventName == null || eventName.trim() == "") { $('#text_event_name').text("Error: Invalid event name "); } } $(document).ready(admin_ready)...
JavaScript
0.000001
@@ -2656,12 +2656,13 @@ f= %22 -ma in +dex .htm
92bd419428e1b21b191a4032ed55a656b35ea254
Reset timer just before starting them
app/js/index.js
app/js/index.js
'use strict'; // get the duration for all timer from configuration var configuration = require('../configuration.js'); var timerDurations = configuration.readSettings('TimerDuration'); var pomodoroTimer = timerDurations[0]; var shortBreakTimer = timerDurations[1]; var longBreakTimer = timerDurations[2]; // create the...
JavaScript
0
@@ -1912,57 +1912,61 @@ -console.log('start');%0A if (step %25 2 == 0)%7B +if (step %25 2 == 0)%7B%0A timer_pomodoro.reset(); %0A @@ -2047,16 +2047,53 @@ === 7)%7B%0A + timer_longBreak.reset();%0A @@ -2141,32 +2141,70 @@ else%7B%0A + timer_shortBreak...
f0567847372c1d9807861a4f0e61403e68ca3bbf
fix bug - report check in wrong place
tasks/utils/printer.js
tasks/utils/printer.js
var fs = require('fs'); var emitter = require('./emitter'); var toArray = require('./toArray'); var CONSOLE = 'console'; var NEWLINE = '\n'; var TAB = '\t'; var printStr = ''; var grunt, options = {report: false}; var PRINT_VERBOSE = 'print::verbose'; var PRINT_REPORT = 'print::report'; var PRINT_FILE = 'print::file'...
JavaScript
0
@@ -453,57 +453,8 @@ ) %7B%0A - if (!options.report) %7B%0A return;%0A %7D%0A @@ -2363,32 +2363,52 @@ %7D%0A %7D else + if (options.report) %7B%0A var o @@ -2841,32 +2841,33 @@ Grunt = function + (val) %7B%0A grun @@ -2908,16 +2908,17 @@ function + (val) %7B%0A
902414f0b159fdfb6c4b2ddd681143b61ebe2df7
Fix error from merge conflict.
app/js/index.js
app/js/index.js
import React from 'react' import 'babel-polyfill' import 'inert-polyfill' import '../styles/bootstrap.min.css' import '../styles/fonts.css' import '../styles/font-awesome.css' import '../styles/app.css' import { render } from 'react-dom' import { Provider } from 'react-redux' import routes from './routes' import { ...
JavaScript
0
@@ -1204,18 +1204,16 @@ x.js')%0A%0A - configur @@ -1222,18 +1222,16 @@ ogging(%0A - log4js @@ -1234,18 +1234,16 @@ g4js,%0A - - logServe @@ -1249,18 +1249,16 @@ erPort,%0A - author @@ -1296,18 +1296,16 @@ ord),%0A - - process. @@ -1321,15 +1321,11 @@ ENV%0A - )%0A%0A - if ( @@ -1365,...
338f8270b9c1743bc8f396cbf0cbb3d312f42d1e
add actual usage vs just billable usage
teksavvy-data-watch.js
teksavvy-data-watch.js
var CONFIG = require("./config"), nodemailer = require("nodemailer"), API_URL = "https://api.teksavvy.com/web/Usage/UsageRecords?$skip=40", urllib = require('urllib'), onPeakDownloadTotal = 0, onPeakUploadTotal = 0, offPeakDownloadTotal = 0,...
JavaScript
0
@@ -2549,16 +2549,17 @@ al + %22GB +* of %22 + @@ -2615,16 +2615,194 @@ + %22%25%22); +%0A%09%09console.log (%22%22);%0A%09%09console.log (%22* Billable usage, actual usage %22 + (onPeakDownloadTotal + offPeakDownloadTotal + onPeakUploadTotal + offPeakUploadTotal).toFixed(2) + %22GB%22 ); %0A%0A%09%09var
c1722979ee7258dda36ec425c3c641db778c1beb
call notify if notifyBlocking is not defined
lib/Bugsnag.js
lib/Bugsnag.js
import { NativeModules } from 'react-native'; const NativeClient = NativeModules.BugsnagReactNative; /** * A Bugsnag monitoring and reporting client */ export class Client { /** * Creates a new Bugsnag client */ constructor(apiKeyOrConfig) { if (apiKeyOrConfig.constructor === String) { this.con...
JavaScript
0
@@ -2928,24 +2928,65 @@ rt);%0A %7D%0A%0A + if (NativeClient.notifyBlocking) %7B%0A NativeCl @@ -3025,110 +3025,109 @@ N(), -%0A blocking %7C%7C false,%0A postSendCallback); + blocking %7C%7C false, postSendCallback);%0A %7D else %7B%0A ...
58d997d00fdb819066c84fb97ed12c969e13d3af
remove console.log
lib/Channel.js
lib/Channel.js
var Model = require('./Model'); var Note = require('./Note'); var Collection = require('./Collection'); var volumeParams = require('./mixins/volumeParams'); // var debounce = require('lodash.debounce'); var expressions = require('dilla-expressions'); var NotesCollection = Collection.extend({ model: Note }); var Cha...
JavaScript
0.000006
@@ -3080,101 +3080,8 @@ ) %7B%0A - console.log('?', ghost.position, ghost.key, !!ghost.original, note === ghost.original)%0A
19e03b9f4305be90f22b15cc964c91daac4db198
serilize regex to string
Utility/build_syntax.js
Utility/build_syntax.js
#!/usr/bin/env node var fs = require("fs"); var output_dir = ""; var input_dir = ""; function report_error(msg) { console.error(msg); process.exit(-1); } function parse_args(args) { args = args.slice(2); if (args.length == 0) report_error("should run with parameters"); for (i = 0; i < args.length; i++){ if ...
JavaScript
0.999982
@@ -1360,30 +1360,60 @@ %09if( -typ +! (obj instanc eof -obj != %22object%22 +Object) %7C%7C (obj instanceof RegExp) ) re @@ -1941,16 +1941,121 @@ ex.js%22); +%0Afunction replacer(key, value) %7B%0A%09if (value instanceof RegExp) return value.source;%0A%09else return value;%0A%7D %0A%0Afuncti @@ -2498,20 +2498,24...
4b2ad6ca95196a7b44a37a46cf79a11091e140fc
Fix crash on monitor component launch
lib/Monitor.js
lib/Monitor.js
var EventEmitter = require('eventemitter2').EventEmitter2, util = require('util'), Discovery = require('./Discovery'), axon = require('axon'), portfinder = require('portfinder'), _ = require('lodash'), charm = require('charm')(); var Monitor = function(advertisement, discoveryOptions) { di...
JavaScript
0.000001
@@ -1047,13 +1047,11 @@ ub.s -erver +ock .on(
7768f52f92054ac8cd0b2cbd78047c10c746b4aa
Fix vue-kitchen-sink config
examples/vue-kitchen-sink/.storybook/main.js
examples/vue-kitchen-sink/.storybook/main.js
module.exports = { stories: ['../src/stories/**/*.stories.(js|mdx)'], addons: [ '@storybook/addon-docs/preset', '@storybook/addon-storysource', '@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-notes', '@storybook/addon-knobs', '@storybook/addon-viewport', '@sto...
JavaScript
0.000066
@@ -107,15 +107,8 @@ docs -/preset ',%0A @@ -431,37 +431,8 @@ s',%0A - '@storybook/addon-docs',%0A %5D,
9f5d81c3239c502591c731593ca37a42edbd43d3
Add code format
keyframes-tool.js
keyframes-tool.js
/*! Keyframes-Tool | The MIT License (MIT) | Copyright (c) 2017 GibboK */ const css = require('css'); const R = require('ramda'); const fs = require('fs'); const path = require('path'); let fileIn, fileOut; /** * Check software requirements. */ let checkPrerequisites = () => { return new Promise((fulfill, ...
JavaScript
0.000035
@@ -7536,27 +7536,16 @@ %7D;%0A - %0A
bfa431493680c980eb8c3243d02df1616450d0a5
Update main.js
Server/main.js
Server/main.js
"use strict"; var express = require("express"), logger = require("morgan"), cookieParser = require("cookie-parser"), bodyParser = require("body-parser"), methodOverride = require("method-override"), session = require("express-session"), mongojs = require("mongojs"), compression = require('co...
JavaScript
0.000001
@@ -984,18 +984,32 @@ nt%22));%0A%0A -// +app.use(%22/api/%22, require @@ -1023,21 +1023,16 @@ tes/ -test +api .js%22) -(app );%0A%0A
4ed1f73aaa922e8b71300d0fbc1ae0b2dc5a8f48
Update Updater.js
lib/Updater.js
lib/Updater.js
"use strict"; var chalk = require('chalk'); var readline = require('readline'); var rl = readline.createInterface(process.stdin, process.stdout); var sys = require('sys'); var exec = require('child_process').exec; var fs = require('fs'); var request = require('request'); var tempWrite = require('temp-write');...
JavaScript
0.000001
@@ -588,20 +588,21 @@ com/ -LifeMushroom +PranavMahesh1 /Mod
ea20e28f5c60420a7ad5bc3fb2fa2dcb0cc353cc
Remove Register() binding; it's been deprecated
lib/account.js
lib/account.js
module.exports = function(exports) { // ************************ // Contacts Methods // ************************ var https = require('https') , qs = require('querystring') , vars = exports.vars ; /** * Retrieves the basic account information for the Dwolla account a...
JavaScript
0
@@ -2092,748 +2092,5 @@ %0A - %0A /**%0A * Register a new Dwolla user account.%0A * https://www.dwolla.com/developers/endpoints/register/user%0A *%0A * @param %7BObject%7D userInfo%0A * @param %7BFunction%7D fn%0A */%0A exports.register = function(userInfo, fn) %7B%0A if (typeo...
2ec0985f70d44782da08f4566ef721636408e904
update file /lib/account.js
lib/account.js
lib/account.js
var mbaasApi = require('fh-mbaas-api'); var q = require('q'); var request = require('request'); var Account = function () { this.login = oAuthPostLogin; /** * This function consumes the sessionToken, and the authResponse * * @param {String} sessionToken session token returned by the OAuth mbaa...
JavaScript
0.000002
@@ -1931,24 +1931,16 @@ uest -.request(request +(options , ha
fbefb8675b26320b295f481b4872ce99f0180807
Disable progress bar
lib/adduser.js
lib/adduser.js
module.exports = adduser var log = require('npmlog') var npm = require('./npm.js') var read = require('read') var userValidate = require('npm-user-validate') var output = require('./utils/output') var usage = require('./utils/usage') var chain = require('slide').chain var crypto try { crypto = require('crypto') } c...
JavaScript
0.000083
@@ -776,16 +776,40 @@ u = %7B%7D%0A%0A + log.disableProgress()%0A chain(
6ef7292a987643fd9cbea9ef97360a51b2c3b2ac
Remove some old code
lib/apphost.js
lib/apphost.js
module.exports = exports = createAppHost; function createAppHost() { } exports.virtualAppLoader = require('./middleware/app-loader'); exports.devSandbox = require('./middleware/dev-sandbox'); exports.htmlPage = require('./middleware/html-page'); exports.trafficControl = require('./middleware/traffic-control'); expor...
JavaScript
0.001477
@@ -1,78 +1,4 @@ -module.exports = exports = createAppHost;%0A%0Afunction createAppHost() %7B%0A%0A%7D%0A%0A expo
4fadd0aa113deebece4c73d79083849ef5d00c6c
Mark apiLoader.services as private
lib/browser.js
lib/browser.js
var AWS = require('./core'); // Load browser API loader AWS.apiLoader = function(svc, version) { return AWS.apiLoader.services[svc][version]; }; AWS.apiLoader.services = {}; // Load the DOMParser XML parser AWS.XML.Parser = require('./xml/browser_parser'); // Load the XHR HttpClient require('./http/xhr'); if (typ...
JavaScript
0
@@ -140,16 +140,41 @@ ion%5D;%0A%7D; +%0A%0A/**%0A * @api private%0A */ %0AAWS.api
9ebe3ab2df3e82e9ea79b4ccc56542f7c97cc2fa
Refresh after upload
routes/git.js
routes/git.js
var Repo = require('../models/repo.js'); var nodegit = require('nodegit'); var promisify = require("promisify-node"); var validator = require('validator'); var fse = promisify(require("fs-extra")); var fs = require('fs'); var path = require('path'); var EasyZip = require('easy-zip').EasyZip; var AdmZip = require('adm-...
JavaScript
0
@@ -1804,16 +1804,91 @@ true);%0A +%09%09%09res.redirect(req.get('referer'));%09//Semi-hackish way of refreshing page%0A %09%09%7D);%0A%09%7D @@ -2007,16 +2007,29 @@ ctory = +path.resolve( __dirnam @@ -2068,32 +2068,33 @@ + %22/%22 + repoName +) ;%0A%09%09var destinat @@ -2102,16 +2102,29 @@ onURL = +path.res...
1e12579e4d8d6efceb21979a75d32473cc82da39
Move days and month outside of function
lib/convert.js
lib/convert.js
var relative = require('./relative'); module.exports = function(dateTime, pattern, options) { if(this.constructor == module.exports) { // Called as constructor var _dateTime; var _pattern; var _options = options; // If first argument is pattern assigning it to _pattern if(typeof dateTime === 'string') { ...
JavaScript
0.000002
@@ -32,16 +32,249 @@ ive');%0A%0A +const days = %5B'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'%5D;%0Aconst months = %5B'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'%5D;%0A%0A module.e @@ -344,16 +344,17 @@ uct...
8991fe1903598bca46387b7aefa0d668929a181e
add case
lib/fengine.js
lib/fengine.js
/*! * fengine * Version: 0.0.1 * Date: 2016/8/2 * https://github.com/Nuintun/fengine * * This is licensed under the MIT License (MIT). * For details, see: https://github.com/Nuintun/fengine/blob/master/LICENSE */ 'use strict'; var os = require('os'); var fs = require('fs'); var url = require('url'); var path ...
JavaScript
0.999999
@@ -4583,19 +4583,8 @@ urce -.toString() , %7B%0A
bde8dacc2ca3f035f68462051ad10baf6db32811
Use the new config
lib/filters.js
lib/filters.js
var bodyParser = require('body-parser') , crypto = require('crypto'); module.exports = function(app) { // Payload parser app.use(bodyParser.json()); // Validates secret token sent by Github with POST app.use(function(req, res, next) { if (req.method !== 'POST') return next(); var secret = app.get('...
JavaScript
0.000002
@@ -63,16 +63,46 @@ crypto') +%0A , cfg = require('./config') ;%0A%0Amodul @@ -133,28 +133,8 @@ ) %7B%0A - // Payload parser%0A ap @@ -318,31 +318,21 @@ t = -app.get('secret_token') +cfg.api.TOKEN %0A @@ -1020,33 +1020,25 @@ d = -app.get('github_events'); +cfg.github.EVENTS %0A%0A
498b0d591f57be266ef19023297ba8a7885bc483
Fix a bug with autocompleting namespaced objects
lib/helpers.js
lib/helpers.js
/* @flow */ import stringScore from 'sb-string_score' import type { TextEditor, Point } from 'atom' const REGEX_LABEL = /(\w+)/ const REGEX_PREFIX = /((:\w[\w:-]+)|(\$\w*)|::(\w+)|(\w+))$/ export function getTransformedText(textEditor: TextEditor, bufferPosition: Point): string { const textBuffer = textEditor.getB...
JavaScript
0
@@ -176,18 +176,22 @@ :(%5Cw+)%7C( +%5B %5Cw +%5C%5C%5D +))$/%0A%0Ae
450b0ca4e1a34356713c721dd41fdd418ca90f7c
Implement getPrototypeOf in firstImplementer correctly
lib/helpers.js
lib/helpers.js
import fs from 'fs-extra'; import {ncp} from 'ncp'; /** * Takes an array of targets and returns a proxy. The proxy intercepts property accessor calls and * returns the value of that property on the first object in `targets` where the target implements that property. */ export function firstImplementer(...targets) {...
JavaScript
0
@@ -46,16 +46,246 @@ 'ncp';%0A%0A +%0Afunction descriptorsFromProto(proto) %7B%0A return Object.getOwnPropertyNames(proto).reduce((acc, name) =%3E %7B%0A Object.assign(acc, %7B%0A %5Bname%5D: Reflect.getOwnPropertyDescriptor(proto, name),%0A %7D);%0A return acc;%0A %7D, %7B%7D);%0A%7D%0A%0A /**%0A * T...
42d1872ce9173de74bb348b5aada8eaa75855c63
change to use const and let
lib/hydrate.js
lib/hydrate.js
/** value should have the following format { body: { responseType: '', responseText: value, status: '', statusText: '' }, headers: '' } */ // borrow from superagent function trim (s = '') { return ''.trim ? s.trim(s) : s.replace(/(^\s*|\s*$)/g, '') } // borrow from superagent function parseHea...
JavaScript
0
@@ -333,19 +333,21 @@ '') %7B%0A -var +const lines = @@ -368,19 +368,19 @@ ?%5Cn/)%0A -var +let fields @@ -386,19 +386,19 @@ = %7B%7D%0A -var +let index%0A @@ -402,19 +402,19 @@ x%0A -var +let line%0A var @@ -409,19 +409,19 @@ line%0A -var +let field%0A @@ -425,11 +425,11 @@ d%0A -v...