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
8ecb964c57e20f6a0226f075d0e91593a30b1c7a
Remove max length 150
index.js
index.js
module.exports = { parser: 'babel-eslint', extends: ['airbnb', 'plugin:ava/recommended'], plugins: ['import', 'ava'], rules: { indent: [ 'error', 4, { SwitchCase: 1, MemberExpression: 1, VariableDeclarator: 1, ...
JavaScript
0.999961
@@ -747,229 +747,8 @@ '%5D,%0A - 'max-len': %5B%0A 'error',%0A 150,%0A 4,%0A %7B ignoreUrls: true, ignoreComments: false, ignoreRegExpLiterals: true, ignoreStrings: true, ignoreTemplateLiterals: true %7D,%0A %5D,%0A
f1986b79db60a43544b26c9a5cf449f3e80ef763
add shortcut
index.js
index.js
'use strict'; const electron = require('electron'); const electronDebug = require('electron-debug'); let menu = null; let rightClickPos = null; function inpectElementMenu() { const Menu = process.type === 'renderer' ? electron.remote.Menu : electron.Menu; const MenuItem = process.type === 'renderer' ...
JavaScript
0.000004
@@ -49,57 +49,8 @@ n'); -%0Aconst electronDebug = require('electron-debug'); %0A%0Ale @@ -976,16 +976,67 @@ in =%3E %7B%0A + const electronDebug = require('electron-debug');%0A const @@ -1096,120 +1096,204 @@ ();%0A - const Menu = electron.Menu;%0A%0A return Menu.buildFromTemplate(%5B%0A %7B%0A label...
87a44d744d83e41f4ffcd28e5d3ae20a1fc865a6
make xlsdb more flexible
index.js
index.js
'use strict' var __ = require('lodash'); // var mysqlInitDB = require('./mysql/init_database'); // var mysqlLoadDB = require('./mysql/load_data'); // var oracleInitDB = require('./oracle/init_database'); // var oracleLoadDB = require('./oracle/load_data'); /* var config = { path : '/path/to/config.ini', db...
JavaScript
0.000001
@@ -12,25 +12,16 @@ '%0Avar __ - = requi @@ -38,226 +38,8 @@ ');%0A -%0A// var mysqlInitDB = require('./mysql/init_database');%0A// var mysqlLoadDB = require('./mysql/load_data');%0A// var oracleInitDB = require('./oracle/init_database');%0A// var oracleLoadDB = require('./oracle/load_data');%0A%0A /*%0Av...
2befa16cd31f083476e546a03ca62fa3b821bcac
implement url retrieval logic
index.js
index.js
"use strict"; var http = require("http"); var levelup = require("levelup"); var db = levelup("./mydb"); var fs = require("fs"); var keyRange = require("./key-range"); var prefix; function prefixOf(key) { return key.substring(0, key.length - 2); } function getExistingKeys(prefix, cb) { var keys = []; db....
JavaScript
0.000909
@@ -973,24 +973,314 @@ %22 + key;%0A%7D%0A%0A +function internalServerError(res) %7B%0A res.statusCode = 500;%0A res.end(%22Internal Server Error%22);%0A%7D%0A%0Afunction notFound(res) %7B%0A res.statusCode = 404;%0A res.end(%22Not Found%22);%0A%7D%0A%0Afunction redirectTo(res, url) %7B%0A res.writeHead...
d14ad0d025348be01af1617d91e120a302adc803
rename variable url to path
index.js
index.js
/** * node-tvdb * * Node.js library for accessing TheTVDB API at <http://www.thetvdb.com/wiki/index.php?title=Programmers_API> * * Copyright (c) 2014 Edward Wellbrook <edwellbrook@gmail.com> * MIT Licensed */ var request = require("superagent").get, parseString = require("xml2js").parseString; var Client...
JavaScript
0.00052
@@ -612,35 +612,36 @@ allback) %7B%0A%09var -url +path = this._token + @@ -669,35 +669,36 @@ his.sendRequest( -url +path , function(error @@ -1001,35 +1001,36 @@ allback) %7B%0A%09var -url +path = %22Updates.php? @@ -1051,35 +1051,36 @@ his.sendRequest( -url +path , function(error @@ -1235,27 +1235,28 @@ a...
06846bdb7d627bd2e8158c0dea2f4c1f8e366ab6
Fix definition error
index.js
index.js
/** * * Copyright 2016 David Herron * * This file is part of AkashaCMS (http://akashacms.com/). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/lic...
JavaScript
0.000004
@@ -1279,17 +1279,16 @@ ;%0A%09%7D%0A%7D%0A%0A -%0A module.e @@ -1293,16 +1293,26 @@ .exports +.mahabhuta = %5B%0A%0A
2a30c1fcbb78aac9ceb9922692fbffcf405801b2
Add defaults and fix silly bug
index.js
index.js
var mongodb = require('mongodb'); module.exports = function(connect) { var Store = connect.Store || connect.session.Store; var MongoDBStore = function(options, callback) { var _this = this; Store.call(this, options); this._options = options; mongodb.MongoClient.connect(options.uri, function(erro...
JavaScript
0
@@ -123,81 +123,524 @@ re;%0A -%0A var MongoDBStore = function(options, callback) %7B%0A var _this = this; + var defaults = %7B%0A uri: 'mongodb://localhost:27017/test',%0A collection: 'sessions',%0A expires: 1000 * 60 * 60 * 24 * 14 // 2 weeks%0A %7D;%0A%0A var MongoDBStore = function(options, callbac...
1173d2f4b3dd4d7b469e99c418e55732532f9347
fix type of size
index.js
index.js
#!/usr/bin/env node var argv = require('yargs') .usage('Send bitcoin when the wallet balance exceeds max\n' + 'Usage: $0 -u [uri] -d [destination] -m [max balance] -n [min balance]') .demand(['u', 'd', 'm', 'n']) .default('interval', 10) .count('v') .describe('s', 'do not actually send') .describe('u', 'uri as bitcoin:...
JavaScript
0.000022
@@ -1861,16 +1861,17 @@ nation, ++ size, fu
d0fc2b318e04e6e9a0ce996da336731b3b00943a
add stop in next
index.js
index.js
var watch = require('recursive-watch') var createReadStream = require('fd-read-stream') var fs = require('fs') var path = require('path') var events = require('events') module.exports = mirror function mirror (src, dst, opts, cb) { if (typeof opts === 'function') return mirror(src, dst, null, opts) if (!opts) opt...
JavaScript
0.000017
@@ -2173,24 +2173,48 @@ error', err) +%0A if (stopped) return %0A%0A pendin
6ab7e01bad7865ec5929b0a9143445162c74ac9c
delete code
src/effect/effectutility.js
src/effect/effectutility.js
/* * EffectUtility.js * 2014/08/08 * @auther minimo * This Program is MIT license. */ //爆発エフェクト投入(標準) pbr.Effect.enterExplode = function(layer, x, y, vx, vy, delay) { vx = vx || 0; vy = vy || 0; delay = delay || 0; // pbr.Effect.Explode(delay).addChildTo(parentScene).setPosition(x, y).setVelo...
JavaScript
0.000005
@@ -236,106 +236,8 @@ 0;%0A -// pbr.Effect.Explode(delay).addChildTo(parentScene).setPosition(x, y).setVelocity(vx, vy, 0);%0A @@ -592,122 +592,8 @@ 3);%0A -// pbr.Effect.Debri(pattern, delay2).addChildTo(parentScene).setPosition(x, y).setVelocity(vx2, vy2, 0.9);%0A @@ -802,106 +802,8 @@ 0;%0...
a4c4848ff428401ca243dc87c9205619363c6732
Format and refactor capturing ref.
index.js
index.js
import React, { Component } from 'react' import PropTypes from 'prop-types' import { Platform, View, Image, NativeModules, requireNativeComponent, ViewPropTypes, StyleSheet, } from 'react-native' const resolveAssetSource = require('react-native/Libraries/Image/resolveAssetSource') const FastImageViewNat...
JavaScript
0
@@ -722,16 +722,54 @@ s)%0A %7D%0A%0A + captureRef = e =%3E (this._root = e)%0A%0A render @@ -769,24 +769,24 @@ render() %7B%0A - const %7B%0A @@ -1090,37 +1090,31 @@ ref=%7B -e =%3E (this._root = e) +this.captureRef %7D%0A @@ -1482,47 +1482,29 @@ er%5D%7D -%0A ref=%7Be =%3E (this._r...
859866ddcbb7807b75f5790bf5648aaae3626aaf
Rename a copied and pasted variable.
index.js
index.js
var parse = require('./tokenizer').parse function rangify (pattern) { var ranges = [{ size: 0, fixed: true, pattern: [], patternIndex: 0 }] pattern.forEach(function (field, index) { ranges[0].size += field.bytes * field.repeat ranges[0].pattern.push(field) }) return ranges } functi...
JavaScript
0
@@ -924,36 +924,40 @@ bff' %5D%0A%0A var -pars +serializ er = require('./ @@ -1001,37 +1001,45 @@ true)%0A%0A -parser = pars +serializer = serializ er.replace(/ @@ -1151,36 +1151,40 @@ , 'callback' %5D, -pars +serializ er)%0A%7D%0A%0APacketize
20683f733a31b8b47ae743b224af8bdadcc26f3c
Change 'query' event signature
index.js
index.js
var inherits = require('util').inherits var EventEmitter = require('events').EventEmitter var Pool = require('generic-pool').Pool var once = require('once') var chain = require('./lib/chain') module.exports = ConnectionPool inherits(ConnectionPool, EventEmitter) function ConnectionPool(ada...
JavaScript
0.00001
@@ -1390,66 +1390,54 @@ )%0A%09%09 -self.emit('query', statement, params)%0A%09%09conn.query( +conn.query(query);%0A%09%09self.emit('query', query) -; %0A%09%09v
08d6c18a55b8e46e90f96dde36c3f3200ecf56a3
add commit
index.js
index.js
exports.name = "CPCPYC";
JavaScript
0
@@ -17,8 +17,26 @@ CPCPYC%22; + //this is my name
641dd77a07ba4c1929c8f79aabe088fe4d301db2
Change default format.
index.js
index.js
var events = require('events') , util = require('util') , path = require('path') , 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 = fun...
JavaScript
0
@@ -1456,17 +1456,8 @@ me : -message : deli @@ -1461,16 +1461,25 @@ elimiter + :message '%0A%0A thi
b317eabdbedcf7893ae4e6b8a45049155a0fa385
switch to port 8008
index.js
index.js
var path = require('path') var home = require('osenv').home var nonPrivate = require('non-private-ip') module.exports = require('rc')('ssb', { //just use an ipv4 address by default. //there have been some reports of seemingly non-private //ipv6 addresses being returned and not working. //https://github.com/ssb...
JavaScript
0.000005
@@ -376,12 +376,12 @@ rt: -2000 +8008 ,%0A
8b25f55b2387e15f3db2afd7b414cc455e3efd59
update new version of flowchart and raphael
index.js
index.js
var assign = require('deep-assign'); var renderer = require('./lib/renderer'); hexo.config.flowchart = assign({ flowchart: 'https://cdnjs.cloudflare.com/ajax/libs/flowchart/1.6.5/flowchart.min.js', raphael: 'https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.7/raphael.min.js', options: { 'scale': 1, 'lin...
JavaScript
0
@@ -175,11 +175,12 @@ t/1. -6.5 +11.3 /flo @@ -262,9 +262,9 @@ 2.2. -7 +8 /rap
c4c2d19174db88064473b6be4c215af66e785aa9
Remove unnecessary self var in markdown stream
src/markdown-stream.js
src/markdown-stream.js
var marked = require('marked'); var pygmentize = require('pygmentize-bundled'); var Transform = require('stream').Transform; var fs = require('fs'); var util = require('util'); var _ = require('underscore'); /* Wraps the Marked library into a naive Readable stream that can be injected into a pipeline, with some nice ...
JavaScript
0
@@ -575,28 +575,8 @@ );%0A%0A - var self = this;%0A%0A th
223c1e0b789b9a834e437da28cf0d8fc86d6b54e
Add "retrieve"
lib/methods/retrieve.js
lib/methods/retrieve.js
"use strict"; var debug = require( "debug" )( "keystone-restful:retrieve" ); var errors = require( "errors" ); module.exports = function( list, config, entry ){ return { handle : function( req, res, next ){ ...
JavaScript
0.000088
@@ -104,16 +104,95 @@ rors%22 ); +%0Avar _ = require( %22lodash%22 );%0A%0Avar handleResult = require( %22../handleResult%22 ); %0A%0Amodule @@ -289,16 +289,89 @@ ntry )%7B%0A + config = _.defaults( %7B name : list.singular.toLowerCase() %7D, config );%0A return @@ -577,21 +577,19 @@ ig.s -elect +how , config ...
3c5a2d836febc5893c193ab722ae081c5a1a9f77
update bundler context to use getBundles
index.js
index.js
"use strict"; const createShardTreeBuilder = require("./src/shard/treeBuilder"); const createShardRepository = require("./src/shard/repository"); const Splitter = require("./src/splitter"); const path = require("path"); const loaderJS = require("fs").readFileSync(path.join(__dirname, "loader.js")); function createSp...
JavaScript
0
@@ -581,32 +581,33 @@ ontext.getBundle +s (%22main%22);%0A cons @@ -1727,16 +1727,17 @@ etBundle +s (%22main%22) @@ -1964,16 +1964,17 @@ etBundle +s (shardNa
bf26976d3e1bc2b94f96fc05ed23f2e9f30dce5c
Fix encoding issue for HTML content (#58)
lib/mixins/fetchable.js
lib/mixins/fetchable.js
"use strict"; const cache = require("../cache"); const request = require("request"); const urlencode = require("urlencode"); const mustache = require("mustache"); const postProcessor = require("../post-processor"); const fetchUrl = require("../fetch-url"); const services = require("../services"); mustache.escape = v ...
JavaScript
0
@@ -1590,26 +1590,16 @@ return -urlencode( this.cdn @@ -1610,17 +1610,16 @@ + query -) ;%0A %7D%0A
b2395737ef3c03e4cfa93471e8a5adf1debb82ad
Revert temporary changes
lib/models/situation.js
lib/models/situation.js
/* ** Module dependencies */ var mongoose = require('mongoose'); var utils = require('../utils'); var openfisca = require('../simulation/openfisca'); var Schema = mongoose.Schema; var ressourceTypes = [ 'aah', 'aeeh', 'af', 'aide_logement', 'allocationsChomage', 'allocationSecurisationPro', ...
JavaScript
0.000001
@@ -3962,97 +3962,8 @@ : %7B%0A - revenusLocatifs: %5BRessourceSchema%5D,%0A revenusDuCapital: %5BRessourceSchema%5D,%0A
cf8b0cb8d17ef1e63ca8d6c9d86dbaa6ce52358a
Fix gain setter in PlayerEngine
src/engines/PlayerEngine.js
src/engines/PlayerEngine.js
import AudioTimeEngine from '../core/AudioTimeEngine'; function optOrDef(opt, def) { if(opt !== undefined) return opt; return def; } /** * Used with a buffer to serve audio files. * * [example]{@link https://rawgit.com/wavesjs/waves-audio/master/examples/player-engine/index.html} * * @extends AudioTimeE...
JavaScript
0
@@ -4514,16 +4514,21 @@ ainNode. +gain. cancelSc @@ -4568,16 +4568,21 @@ ainNode. +gain. setValue @@ -4643,16 +4643,21 @@ ainNode. +gain. linearRa
6a23bf69cfede5beeac9656c235c69fe62ecc2a8
Document blueprint hax
index.js
index.js
// @ts-check 'use strict'; const IncrementalTypescriptCompiler = require('./lib/incremental-typescript-compiler'); const Funnel = require('broccoli-funnel'); const MergeTrees = require('broccoli-merge-trees'); const stew = require('broccoli-stew'); module.exports = { name: 'ember-cli-typescript', init() { th...
JavaScript
0.000001
@@ -345,32 +345,326 @@ s, arguments);%0A%0A + // If we're a direct dependency of the app, we cheat and add our instance of the blueprints%0A // addon to the project, as only top-level addons contribute blueprints.%0A // This won't be necessary in 2.x if we shift to adding the blueprints addon as a host%0A ...
f4d8daeccc4318906546bba153df631204f33b42
Clarify events
src/events/EventRegistry.js
src/events/EventRegistry.js
import ExecutionEnvironment from '../util/ExecutionEnvironment'; import addRootListener from './addRootListener'; import setHandler from './setHandler'; const standardNativeEvents = [ 'click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', // mouse buttons 'wheel', 'mousewheel', ...
JavaScript
0.999999
@@ -1040,93 +1040,300 @@ // -dnd%0A 'drag', 'drop',%0A 'dragstart', 'dragend',%0A 'dragenter', 'dragleave',%0A 'dragover', +Drag and Drop events%0A 'drag', 'drop', // dnd%0A 'dragstart', 'dragend', // dnd%0A 'dragenter', 'dragleave', ...
7374db79fc81d9e5119e31bca58dda3bc306968e
Fix character-class match in CommentChars
lib/nearley-language.js
lib/nearley-language.js
var NullPP = function(argument) {return null;} function rule(name, symbols, proc) { return { name: name, symbols: symbols, postprocess: proc }; } var Word = ["word"], WS = ["whit"], OptionalWS = ["whit?"], ProductionRule = ["prod"], Expression = ["expr"], CompleteExpression = ["cexpr"], Ex...
JavaScript
0.000121
@@ -958,10 +958,10 @@ s, / -%5E %5B +%5E %5Cn%5D/
4ffd0e9a6c1eaf529e1456aa68fcd7ea7fafddbf
Remove stray console.log.
lib/npm_publish_task.js
lib/npm_publish_task.js
/* * Jake JavaScript build tool * Copyright 2112 Matthew Eernisse (mde@fleegix.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-...
JavaScript
0
@@ -1767,59 +1767,8 @@ nfo%0A - console.log(JSON.stringify(pkg, true, 2));%0A
5a47466a094e8c66b8158e76ff0710819cd56203
Fix incorrect method call
index.js
index.js
'use strict'; // Deps require('dotenv').config(); // If using this in multi-environment (local and deployed versions) might want to add logic for checking NODE_ENV environment variable to load only if local var RC = require('ringcentral'); var Helpers = require('ringcentral-helpers'); var http = require('http'); var u...
JavaScript
0.997769
@@ -38,14 +38,12 @@ v'). -config +load ();
890ab44021f243b3042c233563146109e1232da8
Use array instead of object to track numbers.
index.js
index.js
let addEventsToButtons = () => { addDigitsListener(); addOperationsListener(); } let addDigitsListener = () => { let digitButtons = document.getElementsByClassName('digits'); let responsePane = document.getElementById('response-pane'); for (let elem of digitButtons) { elem.addEventListener('click', (e) =...
JavaScript
0
@@ -75,24 +75,180 @@ tener();%0A%7D%0A%0A +let math = %7B%0A '+': (x, y) =%3E %7B return x + y %7D,%0A '-': (x, y) =%3E %7B return x - y %7D,%0A '%C3%B7': (x, y) =%3E %7B return x / y %7D,%0A '%C3%97': (x, y) =%3E %7B return x * y %7D,%0A%7D%0A%0A let addDigit @@ -800,24 +800,95 @@ er = () =%3E %7B + // consider...
4060a42bfb673e7c724d1225a16c2fce91f78fea
Revert rebase conflict
index.js
index.js
'use strict'; var fs = require('fs'); var path = require('path'); var _ = require('lodash'); var tmpl = require('blueimp-tmpl').tmpl; function HtmlWebpackPlugin(options) { this.options = options || {}; } HtmlWebpackPlugin.prototype.apply = function(compiler) { var self = this; compiler.plugin('emit', function(c...
JavaScript
0.000001
@@ -4242,53 +4242,19 @@ cat( -webpackStatsJson.assetsByChunkName%5BchunkName%5D +chunk.files ).ma
492a72172925c3638373e337bc3b0b3471ce484a
Include dependant modules for depending modules.
index.js
index.js
'use strict'; var fs = require( 'fs' ); var getConfig = function( recordPath, isRecording ) { var config = { directivesPreprocess: { "flags" : { "js" : { "RECORDING" : isRecording } } }, files : [ { pattern: __dirname + '/differs.js', served: true, included: true, watched: false }, { p...
JavaScript
0
@@ -759,24 +759,32 @@ ugins: %5B%0A%09%09%09 +require( %22karma-json- @@ -805,21 +805,30 @@ ocessor%22 +) ,%0A%09%09%09 +require( %22karma-d @@ -850,21 +850,30 @@ ocessor%22 +) ,%0A%09%09%09 +require( %22vui-kar @@ -893,16 +893,17 @@ eporter%22 +) %0A%09%09%5D,%0A%09%09
a238880543cffe7d359d5fa312f69a40e756d673
Support for component folders
index.js
index.js
#!/usr/bin/env node "use strict"; var Liftoff = require('liftoff'); var Patata = new Liftoff({ name: 'patata', processTitle: 'patata', moduleName: 'patata', configName: 'patatafile' }); Patata.launch({}, function(result) { var argv = require('yargs').argv; if (argv._.length === 0) { throw "N...
JavaScript
0
@@ -996,35 +996,31 @@ Args = build -FeatureArgs +Require (patata.curr @@ -1031,14 +1031,17 @@ uite -, true +.features ); @@ -1055,38 +1055,114 @@ var -featureArgs = buildFeatureArgs +componentsRequireArgs = buildRequire(patata.currentSuite.components);%0A var featureArgs = buildNoRequire (pat @@ -1183,14 +1...
c2fde5d00b98a6b78c952b0204489d14f55ef3d2
Make stripPrefixes optional when using an object
index.js
index.js
'use strict'; var path = require('path'), fs = require('fs'), gutil = require('gulp-util'), glob = require('glob'), _ = require('lodash'), through = require('through2'); module.exports = function (options) { var options = options || {}, startRegExp = /(?:<!--|\/...
JavaScript
0
@@ -2356,32 +2356,37 @@ rn.stripPrefixes + %7C%7C 0 ;%0A
d79706dfff487b48738e6f20db9de87ab2fd0507
Add reference for exports object.
index.js
index.js
var _ = require('underscore')._, fs = require('fs'), path = require('path'), express = require('express'); module.exports = function(options) { // Allow options to be passed via `--config [JSON file]`. if (options && options.config) { try { options = JSON.parse(fs.readFileSync(o...
JavaScript
0
@@ -1067,16 +1067,38 @@ %7D;%0A%0A + var exports = %7B%7D;%0A if ( @@ -1135,36 +1135,40 @@ Port) %7B%0A -var +exports. server = express @@ -1182,27 +1182,26 @@ Server() -,%0A +;%0A uiSer @@ -1184,35 +1184,40 @@ rver();%0A - +exports. uiServer = serve @@ -1215,15 +121...
ae3a6c7b15d634dc1b2667a2be760536ea443e75
Implement database connection
index.js
index.js
var keys = require('./keys.js'); var config = require('./config.js'); exports.keys = keys; exports.config = config; process.title = "justfansofbot"; if(process.argv.filter(c => c == '-s' || c == '--silent').length > 0) { console.log = () => {}; // @TODO proper logging } var bot = require('./bot.js'); // Clean...
JavaScript
0.000007
@@ -272,16 +272,408 @@ ging%0A%7D%0A%0A +var mongodb = require('mongodb');%0A%0Avar MongoClient = mongodb.MongoClient;%0Avar url = 'mongodb://' + keys.mongo.user + ':' + keys.mongo.pwd + '@' + keys.mongo.url + ':' + keys.mongo.port + '/' + keys.mongo.db;%0AMongoClient.connect(url, (err, db) =%3E %7B%0A if (err) %7B...
d012e24e001b8685074fdb1d176b62bd03d6bc9c
Change starting method
index.js
index.js
'use strict'; var express = require('express'); var nunjucks = require('nunjucks'); var _ = require('lodash'); var app = express(); // Static file serving var staticOptions = { }; if (app.settings.env != 'development') { staticOptions.maxAge = 60 * 60 * 365; } app.use('/assets', express.static('assets/dist', stati...
JavaScript
0.000002
@@ -849,58 +849,80 @@ ver%0A -var listener = app.listen(process.env.PORT %7C%7C 3000 +app.set('port', (process.env.PORT %7C%7C 3000));%0A%0Aapp.listen(app.get('port') , fu @@ -927,17 +927,16 @@ function - () %7B%0A c @@ -951,53 +951,53 @@ og(' -Listening on port ' + listener.address(). +Node app is running on po...
d4a30798ca630185377e7fb691ce85789731e6b9
make require global
index.js
index.js
#!/usr/bin/env node "use strict" const Flow = require(__dirname + "/node_modules/flow"); const fs = require("fs"); const presolve = require("path").resolve; const promisify = require("util").promisify; const exec = promisify(require("child_process").exec); const access = promisify(fs.access); const read = promisify(fs...
JavaScript
0.003418
@@ -661,16 +661,42 @@ Paths(); +%0Aglobal.require = require; %0A%0AFlow(%7B @@ -1203,19 +1203,8 @@ er%22, - %22require%22, scr @@ -1545,17 +1545,8 @@ %7D%0A%7D -, require )(se
f4f3340974eab3223d07147a12c912d3ca590315
fix lint error
index.js
index.js
'use strict'; var gutil = require('gulp-util'), _ = require('lodash'), attachHelp = require('./lib/attach-help.js'), calculateMargin = require('./lib/calculate-margin.js'), DEFAULT_OPTIONS = { aliases: [], description: 'Display this help text.', afterPrintCallback: gutil.noop }; module.exports =...
JavaScript
0.000006
@@ -2597,14 +2597,12 @@ e, %5B - name - %5D, g @@ -3315,17 +3315,16 @@ elp %7C%7C %7B - message: @@ -3339,17 +3339,16 @@ ions: %7B%7D - %7D;%0A @@ -4081,18 +4081,70 @@ ns);%0A%0A -if +// do not add default task if one already exists%0A if (gulp.ta @@ -4172,16 +4172,22 @@ defined) + %7B%0A gu...
90f732edbb538dba96e618d78991926df6b03d31
call on this and change function name
index.js
index.js
'use strict'; var Pagelet = require('pagelet') , pagelet; // // Extend the default pagelet and store the extended instance. This allows // the constructor to access the __super__ property. // pagelet = Pagelet.extend({ view: 'view.hbs', css: 'css.styl', js: 'client.js', // // Depend on the latest jQuery,...
JavaScript
0.000001
@@ -1140,20 +1140,18 @@ unction -list +by (a, b) %7B @@ -1594,17 +1594,26 @@ a = data -( +.call(this );%0A i @@ -1672,36 +1672,34 @@ ta.slice().sort( -list +by ).map(map));%0A%0A @@ -1859,17 +1859,28 @@ data -( +.call(this, function @@ -1973,20 +1973,18 @@ ().sort( -list +by ).map(ma @@ -2495,17 +2...
d5bc913ba9f33addff5569a51c7231f7ebc65a60
Use req.path to allow for cache busting headers
index.js
index.js
var mime = require("mime"); var express = require("express"); module.exports = expressStaticGzip; /** * Generates a middleware function to serve static files. It is build on top of the express.static middleware. * It extends the express.static middleware with the capability to serve (previously) gziped files. For t...
JavaScript
0
@@ -1528,19 +1528,20 @@ les%5Breq. -url +path %5D;%0A @@ -3134,19 +3134,20 @@ kup(req. -url +path );%0A @@ -3191,25 +3191,24 @@ (type);%0A -%0A req.url @@ -3203,25 +3203,163 @@ -req.url = req.url +var search = req.url.split('?').splice(1).join('?');%0A%0A if (search !== %22%22) %...
33e17a09deeb20bccc4c22aa22ba4f92dc3c38e0
Use cuid instead of Utils.guid()
index.js
index.js
function makeKeyboard(elm) { // Duplicated from Native.Signal function send(node, timestep, changed) { var kids = node.kids; for (var i = kids.length; i--; ) { kids[i].recv(timestep, changed, node.id); } } var Signal = Elm.Signal.make(elm); var NList = Elm.Native.List.make(elm); var Util...
JavaScript
0
@@ -1,8 +1,36 @@ +var cuid = require('cuid');%0A %0Afunctio @@ -334,50 +334,8 @@ lm); -%0A var Utils = Elm.Native.Utils.make(elm); %0A%0A @@ -896,15 +896,9 @@ d = -Utils.g +c uid(
8381d9fae1e13e0aa32e9b0bc138f669e3e0fa3c
fix regexp to match new lines in read method
index.js
index.js
var fs = require('fs') var postcss = require('postcss') module.exports.parse = function parse (css) { var root = postcss.parse(css) var res = [] root.walkComments(function (node, i) { if (node.type === 'comment') { var text = node.text var tmp = {} var names =...
JavaScript
0.000002
@@ -2398,16 +2398,17 @@ %5Cn%7C$))/g +m )%0A if
fd875a5cfa541ef067e582d79ec148c33ecacb93
Make lint happy
index.js
index.js
"use strict"; var React = require('react'); var invariant = require('react/lib/invariant'); var Preloaded = require('./lib/Preloaded'); var getComponentFingerprint = require('./lib/getComponentFingerprint'); var injectIntoMarkup = require('./lib/injectIntoMarkup'); ...
JavaScript
0.000047
@@ -678,32 +678,35 @@ == undefined + %7C%7C %0A %7C%7C Fiber.cu @@ -685,35 +685,32 @@ fined %7C%7C%0A - %7C%7C Fiber.current = @@ -721,24 +721,27 @@ ndefined + %7C%7C %0A %7C%7C Fibe @@ -732,19 +732,16 @@ %0A - %7C%7C Fiber.c
3e8213ecef5a05afda56a576c97cc268bca85b98
Remove unneccessary reference
index.js
index.js
import {run, Rx} from '@cycle/core'; import {makeDOMDriver, h} from '@cycle/dom'; import CycleTimeTravel from 'cycle-time-travel'; import $ from 'jquery'; import _ from 'lodash'; import rhyme from 'rhyme'; Rx.config.longStackSupport = true; function log (label) { return console.log.bind(console, label); } function...
JavaScript
0.002314
@@ -2710,25 +2710,8 @@ tion -, availableRhymes %7D) =
d77a350c4fb743127162f5906a0b21318435b194
Add `noop`, `source`, `flush`
index.js
index.js
'use strict'; var extend = require('xtend'); var isBuffer = require('is-buffer'); var readableStream = require('readable-stream').Readable; var through = require('through2'); var defaultOpts = { castBuffers: true, objectMode: true }; var toString = function(chunk) { return isBuffer(chunk) ? chunk.toString() : ...
JavaScript
0.000008
@@ -333,14 +333,976 @@ ar t -su = %7B +ransformNoop = function(chunk, encoding, transformCb) %7B%0A transformCb(null, chunk);%0A%7D;%0A%0Avar tsu = %7B%7D;%0A%0A// NO-OP%0A%0Atsu.noop = function(opts) %7B%0A return through(extend(defaultOpts, opts));%0A%7D;%0A%0A// SOURCE%0A%0Atsu.source = function(opts, x) %7B%0A ...
65693f3c0ac35868d97254aa200778608571db88
添加prefer-const,使用 let 声明,在解构中,所有变量都应该是const,该规则将发出警告
index.js
index.js
module.exports = { extends: [ 'eslint-config-airbnb', ], env: { browser: true, node: true, mocha: true, jest: true, es6: true, }, parser: 'babel-eslint', parserOptions: { ecmaVersion: 6, ecmaFeatures: { jsx: true, experimentalObjectRestSpread: true, }, }, ...
JavaScript
0
@@ -1403,62 +1403,8 @@ %7D%5D,%0A - 'react/sort-comp': 0,%0A 'import/extensions': 0,%0A %7D,
13b6665162cc6be497b8f7082c6bab0c600440c5
Add a config to prepend a protocol
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-google-map', contentFor: function (type, config) { var src, content = '', google = config.googleMap || {}, params = [], apiKey; if (type === 'head') { src = "//maps.googleapis.com/maps/api/js"; // shouldn't need encoding, bu...
JavaScript
0
@@ -277,16 +277,98 @@ pi/js%22;%0A + %0A protocol = google.protocol %7C%7C '';%0A src = protocol + src;%0A %0A //
9795f1ebb2204efc537f7287be65a96175376117
Allow to have router script in any directory and start the server using "-t" option.
index.js
index.js
'use strict'; var spawn = require('child_process').spawn; var exec = require('child_process').exec; var http = require('http'); var open = require('opn'); var binVersionCheck = require('bin-version-check'); var fs = require('fs'); module.exports = (function () { var checkServerTries = 0; var workingPort = 8000; fu...
JavaScript
0
@@ -7,16 +7,54 @@ trict';%0A +var extend = require('util')._extend;%0A var spaw @@ -1140,426 +1140,8 @@ %09%7D%0A%0A -%09function extend(obj /* , ...source */) %7B%0A%09 for (var i = 1; i %3C arguments.length; i++) %7B%0A%09 for (var key in arguments%5Bi%5D) %7B%0A%09 if (Object.prototype.hasOwnProperty.cal...
0d7808cf52a96f64ecd5a1ca928a60a7d304fb3d
add user-agent to the request
index.js
index.js
'use strict'; var githubRepos = require('github-repositories'); var githubTokenUser = require('github-token-user'); var got = require('got'); var eachAsync = require('each-async'); var objectAssign = require('object-assign'); function addCollab(user, repo, opts, cb) { var url = [ 'https://api.github.com/repos/' + ...
JavaScript
0.000002
@@ -1354,16 +1354,17 @@ ization: + 'token ' @@ -1399,16 +1399,78 @@ ngth': 0 +,%0A%09%09'User-Agent': 'https://github.com/kevva/github-add-collab' %0A%09%7D;%0A%0A%09g
027200893e2399c6e03446f25cffe69a8e54c3ac
Fix typo in index.js
index.js
index.js
var express = require('express'); var Zschema = require("z-schema"); var jsonJob = require('./job'); var schema = require('./schema'); var validator = new Zschema({ breakOnFirstError: false, strictMode: true }); var app = express(); app.set('port', (process.env.PORT || 5000)); app.get('/', function(req, res)...
JavaScript
0.002691
@@ -601,17 +601,16 @@ son(%7Berr -r os: err,
d72ce1f96fda58b95a266d7327eb52cbb09fa872
remove logging
index.js
index.js
var ruler = require('./ruler') var labels = require('./labels') var Color = require('color') //Tau is much easier to visualize. //rotating one quarter is Tau/4, etc var TAU = 2*Math.PI function find (ary, test) { for(var i in ary) if(test(ary[i], i, ary)) return ary[i] } /* now, we can only support 2 sc...
JavaScript
0.000001
@@ -1044,45 +1044,8 @@ 3%0A%0A - console.error('colours', colours)%0A%0A va
28e090b55502192f61fa3b3b2095eb0db6789629
Support for intro pages
index.js
index.js
var cheerio = require('cheerio'); module.exports = { book: { assets: "assets", css: [ "multipart.css" ] }, hooks: { // Gets plain text content "summary:before": function(summary) { // If the file contains an h2, we need to reformat it if (summary.con...
JavaScript
0
@@ -357,79 +357,409 @@ -// Indent all existing list items, then replace the h2 with a top level +var parts = summary.content.split(/(?=##)/);%0A for (var i = 0; i %3C parts.length; i++) %7B%0A // Remove any blank lines%0A parts%5Bi%5D = parts%5Bi%5D.replace(/(%...
dca7bb0c3bb14a71e404597c73519819a437f582
Upgrade composeMessage function #11
index.js
index.js
/** * Chai-Mugshot Plugin * * @param mugshot - Mugshot instance * @param testRunnerCtx - Context of the test runner where the assertions are * done */ module.exports = function(mugshot, testRunnerCtx) { return function(chai) { var Assertion = chai.Assertion; function composeMessage(message) { ...
JavaScript
0
@@ -1,8 +1,31 @@ +var Q = require('q');%0A%0A /**%0A * C @@ -311,32 +311,38 @@ composeMessage( +item, message) %7B%0A @@ -405,16 +405,149 @@ of -#%7Bact%7D'; +%5C'' +%0A item.name + '%5C'';%0A%0A if (item.selector) %7B%0A standardMessage = standardMessage + ' (' + item.selector + ')';%...
0ea69dad81b1f74901b5ca1de116c1562fb25b87
Add command when an error occurs to aid debugging.
index.js
index.js
/** * class RubySassEngine * * Engine for the SASS/SCSS compiler. You will need `sass` Ruby gem installed * in order to use [[Mincer]] with `*.sass` or `*.scss` files: * * gem install sass * * * ##### SUBCLASS OF * * [[Template]] **/ 'use strict'; var Mincer = require('mincer'); var Templa...
JavaScript
0
@@ -1174,21 +1174,13 @@ c -ss +md = -sh.exec( 'ech @@ -1238,16 +1238,41 @@ (' -I ') +,%0A css = sh.exec(cmd );%0A%0A if @@ -1305,16 +1305,56 @@ w Error( +'Error compiling Sass: ' + cmd + %22%5Cn%22 + css.stdo
e70ec853f85494cd6e184dd55ce13fe9360f4b99
Update index.js
index.js
index.js
var fs = require('fs'); module.exports = function requireAll(options) { if (typeof options === 'string') { options = { dirname: options, filter: /(.+)\.js(on)?$/, excludeDirs: /^\.(git|svn)$/, dependencies : options.dependencies }; } var files = fs.readdirSync(options.dirname); ...
JavaScript
0
@@ -755,16 +755,61 @@ ludeDirs +,%0A dependencies : options.dependencies %0A %7D
aaf50df15bebffe2d8eab149e3743e0ac76081fa
Update PORT env var
index.js
index.js
'use strict'; var kraken = require('kraken-js'), app = {}; app.configure = function configure(nconf, next) { // Async method run on startup. next(null); }; app.requestStart = function requestStart(server) { // Run before most express middleware has been registered. }; app.requestBeforeRoute = fu...
JavaScript
0.000002
@@ -588,17 +588,8 @@ env. -VCAP_APP_ PORT
8b69e1e05dc300eabc96c1c5de7bb412343bd58d
Fix a hard coding of the configuration file name
index.js
index.js
#!/usr/bin/env node const co = require('co'); const util = require('./lib/util'); const m = require('./lib/main'); const initCommand = require('./lib/init.cmd'); const constants = require('./lib/constants'); const main = function* (argv) { if (argv.help) { return util.writeLn(yield util.help()); } if (argv....
JavaScript
0.032457
@@ -577,28 +577,45 @@ eLn( -' +%60 Error: -ssh-seed.yml +$%7Bconstants.CONFIG_FILE_NAME%7D is @@ -623,17 +623,17 @@ ot found -' +%60 );%0A p
ce58a7991be21b8a431f6c18189a956f36a7bc26
Add extra ./ prefix check when matching main
index.js
index.js
// builtin var fs = require('fs'); var path = require('path'); // vendor var resv = require('resolve'); // given a path, create an array of node_module paths for it // borrowed from substack/resolve function nodeModulesPaths (start, cb) { var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; var part...
JavaScript
0.000001
@@ -5360,17 +5360,103 @@ dex.js'%5D -; + %7C%7C%0A info.browser%5B'./' + info.main %7C%7C './index.js'%5D;%0A %0A
999b952c2f88f4fdfc059d3ef9c77b460c5d6562
Indicate that _inject method is private.
index.js
index.js
var argsList = require('args-list'); var DiContainer = function() { this.dependencies = {}; this.factories = {}; }; DiContainer.prototype = { factory: function(name, factory) { this.factories[name] = factory; }, register: function(name, dependency) { this.dependencies[name] = dependency; }, ge...
JavaScript
0.999998
@@ -473,16 +473,17 @@ && this. +_ inject(f @@ -639,16 +639,17 @@ %7D,%0A%0A +_ inject:
d1bc9125b0b91543970c92ce38860f01cc9cd385
support multiple arguments in middleware use
index.js
index.js
var _ = require('lodash'), Promise = require('bluebird'), async = require('async'); function lift (done) { var self = this; var routes = self.config.routes; _.each((self.config.http || {}).middlewares || [], function (middleware) { self.expressApp.use(middleware()); }); _.each(self.config.routes, f...
JavaScript
0
@@ -166,121 +166,1020 @@ %0A%0A -_.each((self.config.http %7C%7C %7B%7D).middlewares %7C%7C %5B%5D, function (middleware) %7B%0A self.expressApp.use(middleware()); +// support middlewares like below:%0A // %5B%0A // function () %7B%0A // return framework.express.static(framework.config.paths.public %7C%7...
a5e78fbd9f761c7c7eaea6a61d464d6d568ba4a1
Add kinesis into index.js
index.js
index.js
'use strict'; /** * This is a support factory which generates and returns AWS client instances * for various regions that have been wrapped in promise decorators * * This factory memoizes the api objects it returns. If the requested Api does * not already exist it is created, otherwise the existing one is returne...
JavaScript
0.000058
@@ -1898,24 +1898,192 @@ ('./iam'),%0A%0A + /**%0A * Returns a Promises compliant AWS.Kinesis api.%0A *%0A * @param %7Bobject%7D options The AWS.Kinesis constructor options.%0A */%0A kinesis: require('./kinesis'),%0A%0A /**%0A * R
0748de38ef460dd1dfd5fe1a9e09f7b9b5f1c235
Use project root rather than cwd
index.js
index.js
'use strict'; var fs = require('fs'); var execSync = require('execSync').exec; var rimraf = require('rimraf'); var TMP_PATH = "./tmp"; var RAMDISK_BYTES = 2 * 1024 * 1024 * 1024; var BLOCK_SIZE = 512; var RAMDISK_BLOCKS = RAMDISK_BYTES / BLOCK_SIZE; var RAMDISK_NAME = "EmberCliRamdisk"; var RAMDISK_PATH = "/Volumes/"...
JavaScript
0
@@ -110,32 +110,8 @@ );%0A%0A -var TMP_PATH = %22./tmp%22;%0A var @@ -682,16 +682,30 @@ rectory( +projectTmpPath ) %7B%0A if @@ -721,24 +721,30 @@ dirSync( -TMP_PATH +projectTmpPath ).length @@ -781,24 +781,30 @@ our %22 + -TMP_PATH +projectTmpPath + %22 dir @@ -919,24 +919,30 @@ af.sync( -TMP_PATH +projec...
7de204863e410364a7e3607745115e266b793fcc
format log
index.js
index.js
/** * Created by maya on 2015/7/18. */ import Moment from 'moment'; //This file comes from: http://stackoverflow.com/questions/1638337/the-best-way-to-synchronize-client-side-javascript-clock-with-server-date#answer-22969338 // the NTP algorithm // t0 is the client's timestamp of the request packet transmission, //...
JavaScript
0.000002
@@ -2498,19 +2498,19 @@ P delay: -%22, + %22+ c.roundt @@ -2517,19 +2517,20 @@ ripdelay ++%22 , -%22 NTP offs @@ -2536,19 +2536,19 @@ set: -%22, + %22+ c.offset , %22c @@ -2543,19 +2543,20 @@ c.offset ++%22 , -%22 correcte @@ -2557,19 +2557,19 @@ rrected: -%22, + %22+ Moment(t
0a975b99f05d5909aab21db0ea36cb760df30ee5
Add fillAssets
index.js
index.js
var fs = require('fs-extra'); var GT = { load: function (assetsPath) { return { assetsPath: assetsPath, assets: GT.tam.read(assetsPath), clean: GT.tasks.clean, build: GT.tasks.build, watch: GT.tasks.watch }; }, tasks: { clean: function () { var dist = this.assets.d...
JavaScript
0.000001
@@ -127,24 +127,25 @@ ets: GT. -tam.read +getAssets (assetsP @@ -248,16 +248,117 @@ %7D;%0A %7D,%0A + getAssets: function (assetsPath) %7B%0A return GT.tam.fillAssets(GT.tam.read(assetsPath), %7B%7D);%0A %7D,%0A tasks: @@ -422,18 +422,8 @@ dist - %7C%7C 'dist' ;%0A @@ -655,50 +655,8 @@ is;%0A - va...
b8da3a07110920207bc922b326b0434db482cfa4
Use src/ relative file paths internally
index.js
index.js
var fs = require('fs-extra'); var path = require('path'); var replaceExt=require('replace-ext'); var glob = require('glob'); var matter = require('gray-matter'); var cons = require('consolidate'); var yaml = require('js-yaml'); var marked = require('marked'); var async = require('async'); var _ = require('lodash'); // ...
JavaScript
0
@@ -869,23 +869,8 @@ lob( -path.join(src, '**/ @@ -891,17 +891,16 @@ rkdown)' -) , functi @@ -1423,25 +1423,8 @@ Path -.replace(src, '') ), ' @@ -1768,24 +1768,39 @@ efaults( +path.join(src, filePath , functi @@ -1783,32 +1783,33 @@ in(src, filePath +) , function (err, @@ -3614,20 +3614,36 @@ eadFile( +pa...
b3863f6f8bdfe4bdeb0eb69a11fe329ba55e8a64
remove extraneous clone
index.js
index.js
var _ = require('lodash'); var jstoxml = require('jstoxml'); var componentToJson = function (component) { var componentJson = {}; var componentArray = []; var name; if (_.isArray(component)) { _.forEach(component, function (item) { componentArray.push(componentToJson(item)); }); return comp...
JavaScript
0.000678
@@ -694,42 +694,8 @@ n%5D;%0A - children = _.clone(children);%0A
59fe0ff8543295b6b23ab48cbeb14ba65a354a9b
Switch to arrow functions in a couple of places
index.js
index.js
const UINode = require('./lib/node'); const UIWindow = ObjC.classes.UIWindow; function get(predicate) { return new Promise(function (resolve, reject) { let tries = 0; function tryResolve() { ObjC.schedule(ObjC.mainQueue, function () { const window = UIWindow.keyWindow(); const layout =...
JavaScript
0
@@ -120,25 +120,16 @@ Promise( -function (resolve @@ -137,16 +137,19 @@ reject) + =%3E %7B%0A l @@ -230,19 +230,13 @@ ue, -function () +() =%3E %7B%0A
d2f37abb5539f5638481b6fd421f026bc34887b8
Disable rules covered by the TS compiler
index.js
index.js
module.exports = { extends: [ require.resolve('./javascript'), 'plugin:@typescript-eslint/recommended', 'plugin:import/typescript', 'prettier/@typescript-eslint', ], rules: { // upgrade severity from warning to error '@typescript-eslint/explicit-function-return-type': [ 2, {all...
JavaScript
0
@@ -62,16 +62,68 @@ ript'),%0A + 'plugin:@typescript-eslint/eslint-recommended',%0A 'plu @@ -592,27 +592,8 @@ 0,%0A - 'no-undef': 0,%0A %7D,
684e27c86cd53f0681536d7e6a4cc20ece71ff50
Extend mp3 type support
index.js
index.js
'use strict'; module.exports = function (buf) { if (!buf || buf.length < 3) { return false; } return (buf[0] === 73 && buf[1] === 68 && buf[2] === 51) || ( buf[0] === 255 && buf[1] === 251 ); };
JavaScript
0
@@ -186,24 +186,25 @@ 55 &&%0A +( buf%5B1%5D === 2 @@ -205,16 +205,35 @@ === 251 + %7C%7C buf%5B1%5D === 250) %0A );%0A
512e76cc7fd921c6a1a984bc8a8e1eaef64f5735
Revert "use _.runInContext"
index.js
index.js
'use strict'; var glob = null; if (typeof window !== 'undefined') { glob = window } else { glob = global; } if (typeof require === 'function') { glob._ = require('lodash'); } /* * Apply difference between two objects without without rewriting * destination object * @param source {object} - the source objec...
JavaScript
0
@@ -2732,40 +2732,8 @@ %0A%7D%0A%0A -var lodash = _.runInContext();%0A%0A if ( @@ -2761,22 +2761,17 @@ n') %7B%0A -lodash +_ .mixin(%7B @@ -2879,22 +2879,17 @@ ) %7B%0A -lodash +_ .mixin(%7B
2dab3c6085d9bd8e5ed685eb0a61fe6cb51f1d7f
Simplify pipeline and fix deps json
index.js
index.js
/* Copyright 2015, Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms. */ var browserify = require('browserify'); var through = require('through2'); var shasum = require('shasum'); var path = require('path'); var fs = require('fs'); var async = require('async'); var...
JavaScript
0
@@ -2173,323 +2173,89 @@ %0A%0A -b.transform(%22babelify%22);%0A b.transform(path.join(__dirname, %22packages/mendel-treenherit%22), %7B%22dirs%22: bundle.chain%7D);%0A%0A var hasher = through.obj(function (row, enc, next) %7B%0A row.sha = shasum(row.source);%0A this.push(row);%0A next();%0A %7D);%0A b....
1575f3327e2f9fd81b67240ad5ff65f61ec510a7
change default value of maxRequests to 4
index.js
index.js
var _ = require('underscore') , _s = require('underscore.string') , async = require('async') , exec = require('child_process').exec , fs = require('fs') , path = require('path') , qs = require('qs') , request = require('request'); module.exports = function (options, callback) { var params = { cli...
JavaScript
0.000001
@@ -482,25 +482,25 @@ axRequests: -1 +4 %0A , sampl
de7414b6304d7cee677fba4e9a0589e599fece91
Fix gulp watch stopping on error.
index.js
index.js
'use strict'; var gutil = require('gulp-util'); var through = require('through2'); var assign = require('object-assign'); var path = require('path'); var applySourceMap = require('vinyl-sourcemaps-apply'); var PLUGIN_NAME = 'gulp-sass'; ////////////////////////////// // Main Gulp Sass function //////////////////////...
JavaScript
0
@@ -4231,16 +4231,36 @@ atted);%0A + this.emit('end');%0A %7D;%0A%0A////
37a5924ab9052d4e3c2d161f2d67433ae866607a
remove possibility of infinite loop if no \n
index.js
index.js
var repeat = require('lodash.repeat'); module.exports = function(md, opts) { // default to being two spaces wide var tabWidth; if (!opts || typeof opts.tabWidth === 'undefined') { tabWidth = 2; } else { tabWidth = Math.max(0, opts.tabWidth); } // patch the current rule, don't replace it completely...
JavaScript
0.999046
@@ -1159,18 +1159,113 @@ n', idx) +;%0A%0A // if there are no %60%5Cn%60 characters, break%0A if (idx === -1) %7B break; %7D%0A%0A idx + += 1;%0A
e29b1e0a994f70ecb58b1ae00558f3b067c164be
Update error message for invalid sources argument.
index.js
index.js
/* * node-elm-compiler * https://github.com/rfeldman/node-elm-compiler * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
JavaScript
0
@@ -1249,56 +1249,71 @@ e() -did not receive an Array for its list of sources +received neither an Array nor a String for its sources argument .%22%0A
f9ab83440fc5e57c076d7e0eaff3cf3b209caa52
Fix for the docker analyzer.
index.js
index.js
/* * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, O...
JavaScript
0
@@ -2233,22 +2233,22 @@ nalyzer( -system +config ),%0A s
353da3379ded4bf9a53608550cb19862b8b2b239
Fix specifying loadSchema() function from webpack configuration
index.js
index.js
const Ajv = require('ajv'); const ajvPack = require('ajv-pack'); const loaderUtils = require('loader-utils'); const path = require('path'); module.exports = function (schemaStr, sourceMap) { const done = this.async(); const loadSchema = uri => { const filePath = path.resolve(this.co...
JavaScript
0.000001
@@ -788,57 +788,8 @@ %7B%7D;%0A - const ajvOptions = options.ajv %7C%7C %7B%7D;%0A @@ -840,16 +840,42 @@ dden%0A + const ajvOptions = Object. @@ -881,26 +881,18 @@ .assign( -ajvOptions +%7B%7D , defaul @@ -904,26 +904,33 @@ ptions, -ajvO +o ptions +.ajv %7C%7C %7B%7D , %7B sour
820747a25518a584dde857727a663b0e6cc5b92f
comment fix
index.js
index.js
/* * MIT License http://opensource.org/licenses/MIT * Author: Ben Holloway @bholloway */ 'use strict'; var path = require('path'), loaderUtils = require('loader-utils'), rework = require('rework'), visit = require('rework-visit'), convert = require...
JavaScript
0
@@ -2571,16 +2571,88 @@ g slash) + due to%0A // https://github.com/webpack/webpack-dev-server/issues/266 %0A if
45c0286f585bdc4d4b4d59258c306ad0cd1df6e6
Remove `showResults` from state
index.js
index.js
import React, { Component, PropTypes } from 'react'; import { ListView, Platform, StyleSheet, Text, TextInput, View } from 'react-native'; class AutoComplete extends Component { static propTypes = { ...TextInput.propTypes, /** * These styles will be applied to the container which * surr...
JavaScript
0.000001
@@ -1745,16 +1745,17 @@ props);%0A +%0A cons @@ -1846,22 +1846,16 @@ tate = %7B -%0A dataSou @@ -1891,68 +1891,8 @@ ata) -,%0A showResults: props.data && props.data.length %3E 0%0A %7D;%0A @@ -1924,25 +1924,24 @@ veProps( -nextProps +%7B data %7D ) %7B%0A @@ -1999,18 +1999,8 @@ ows( -nex...
b3380819b45b50da430bfc7c268f7f6c78561f66
use configFile option in upload task too.
index.js
index.js
var gutil = require('gulp-util'); var zip = require('gulp-zip'); var del = require('del'); var install = require('gulp-install'); var runSequence = require('run-sequence'); var AWS = require('aws-sdk'); var rename = require("gulp-rename"); var fs = require('fs'); module.exports = function(gulp, opts) { if (!gulp) { ...
JavaScript
0
@@ -2254,25 +2254,27 @@ + %22/ -lambda- +%22 + opts. config -.js%22 +File );%0A
c8cb346bbf9f8d6106ed8d6e9bfdde26f12b7176
update index.js
index.js
index.js
var express = require('express'); var bodyParser = require('body-parser'); var app = express(); var FalcorServer = require('falcor-express'); var FalcorRouterDemo = require('falcor-router-demo'); app.use(bodyParser.text({ type: 'text/*' })); // Simple middleware to handle get/post app.use('/model.json', FalcorServer....
JavaScript
0.000001
@@ -135,25 +135,25 @@ ress');%0Avar -F +f alcorRouterD @@ -155,16 +155,23 @@ uterDemo +Factory = requi @@ -220,34 +220,40 @@ ser. -text(%7B type: 'text/*' +urlencoded(%7B extended: false %7D)) -; %0A%0A// @@ -378,13 +378,9 @@ urn -new F +f alco @@ -390,17 +390,25 @@ uterDemo -( +Factory(1 );%0A%7D));%0A
e5c58b78a99d41f7b6aba49ddcdaeafbcc706508
Update ratio value processing; simply replace x:y style with % anywhere that it is used.
index.js
index.js
var postcss = require('postcss'); // Default properties for aspect ratios. var defaults = {}; defaults.container = { "position": "relative", "box-sizing": "border-box" } defaults.item = { "position": "absolute", "top": "0", "right": "0", "bottom": "0", "left": "0", "box-sizing": "border-box" } defau...
JavaScript
0
@@ -987,18 +987,68 @@ = null;%0A -%0A + var re = /%5B'%22%5D?((%5Cd+)(?:%5C:%7C%5C%7C)(%5Cd+))%5B'%22%5D?/g;%0A%0A // ratio = @@ -1098,16 +1098,19 @@ %5Cs*/);%0A + // if(rati @@ -1112,26 +1112,29 @@ (ratio) %7B%0A +// + ratio = rati @@ -1163,16 +1163,19 @@ + '%25';%0A + // conso @@ -1187,27 +1...
b8ed434f225ec3f066e172df33d87db9bdca628c
fix content-type bug:bug:
index.js
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){ console.log(JS...
JavaScript
0.000006
@@ -1692,16 +1692,44 @@ t-type'%5D +%7C%7C'text/html; charset=UTF-8' );%0A%09%09//c
3e96318699f272fe08431cc1e7a58a745f6371bc
Add presence validator to requires array
src/model/Postgrest.js
src/model/Postgrest.js
Ext.define('Jarvus.model.Postgrest', { extend: 'Ext.data.Model', requires: [ 'Jarvus.connection.Postgrest', 'Jarvus.proxy.Postgrest', 'Ext.data.identifier.Negative' ], identifier: 'negative', fetchRemoteFields: false, onClassExtended: function(modelCls, data, hooks) { ...
JavaScript
0.000001
@@ -189,16 +189,55 @@ egative' +,%0A 'Ext.data.validator.Presence' %0A %5D,%0A
096fbe905b14dd7df8be15daf20418751e8d0f51
Update to previous: debug logging removed
src/models/lectures.js
src/models/lectures.js
import knex from '../utils/db'; const lectureSummaryFields = ['id', 'createdAt', 'title', 'dates']; const lectureDetailedFields = '*'; export const dbGetLectures = userId => ( knex('lectures') .select(lectureSummaryFields) .where({ teacherId: userId }) ); export const dbGetLecture = id => ( knex('lecture...
JavaScript
0.000001
@@ -442,33 +442,8 @@ %3E (%0A - console.log(%7Bfields%7D),%0A kn
649948187b92f16368a8c3b1be811af207c13dda
Use a callback ref instead of findDOMNode
index.js
index.js
'use strict'; var React = require('react'); var ReactDOM = require('react-dom'); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } ...
JavaScript
0.000001
@@ -42,45 +42,8 @@ ');%0A -var ReactDOM = require('react-dom');%0A var @@ -1048,16 +1048,74 @@ );%0A %7D,%0A + setRangeRef: function(ref) %7B%0A this.range = ref;%0A %7D,%0A compon @@ -1161,34 +1161,18 @@ -ReactDOM.findDOMNode(this) +this.range .val @@ -1438,16 +1438,45 @@ ion() %7B%7D +,%0A r...
8670a2c3463521efd7c23282385ebdf0599a71ef
Remove react/jsx-no-bind rule
index.js
index.js
module.exports = { "env": { "browser": true, "node": true, "jest": true }, // Later for charable configs // Reference: http://eslint.org/docs/developer-guide/shareable-configs "extends": ["standard", "standard-jsx"], "plugins": [ "import", "node", "promise", "babel", "react...
JavaScript
0.000001
@@ -2564,42 +2564,8 @@ : 1, -%0A %22react/jsx-no-bind%22: %22error%22, %0A%0A
da3bdb90832921d36216fd213e34ed15848adc38
fix florins display when user has not entered bets or raffles
src/modules/florins.js
src/modules/florins.js
import assign from 'object-assign' import Promise from 'bluebird' const debug = require('debug')('wololobot:florins') export default function (opts) { opts = assign({ delay: 4000 , gain: 5 // 5 florins per 10 minutes , subGain: 10 // 10 florins per 10 minutes , gainInterval: 10 * 60 * 1000 // 10 minutes ...
JavaScript
0
@@ -1930,32 +1930,37 @@ entryValue(name) + %7C%7C 0 %0A let @@ -2006,24 +2006,29 @@ yValue(name) + %7C%7C 0 %0A
d8acf05fbabf26d56a4afc8517caaafaefacf927
Fix transactions() calls with empty arrays.
src/modules/florins.js
src/modules/florins.js
const ms = require('ms') const debug = require('debug')('wololobot:florins') module.exports = function (opts) { opts = Object.assign({ delay: ms('4 seconds'), gain: 5, // 5 florins per 10 minutes subGain: 10, // 10 florins per 10 minutes gainInterval: ms('10 minutes'), excludeMods: false }, opt...
JavaScript
0
@@ -1603,24 +1603,73 @@ ns (list) %7B%0A + if (list.length === 0) %7B%0A return%0A %7D%0A%0A const tr
87ba36cadedaf124c61af406788992057d7b81cf
test binding
index.js
index.js
var express = require('express') var path = require("path") var wechat = require('wechat') // get config var weConfig = require('./config') var helper = require('./modules/helper') // create app var app = express() // menu var WechatAPI = require('wechat-api') var menuModel = require('./modules/menu') var api = new ...
JavaScript
0
@@ -1480,17 +1480,34 @@ ing.html -' +?' + baseInfoQuery ))%0A
9ecda0ced7b0a863103c7fcf9b1c6c229bf1d7e6
Set minimum width for text inputs because IntViews with min and max set were too small.
src/foam/u2/TextInputCSS.js
src/foam/u2/TextInputCSS.js
foam.CLASS({ package: 'foam.u2', name: 'TextInputCSS', extends: 'foam.u2.CSS', documentation: ` A CSS axiom for text-based inputs such as normal text inputs, date & time inputs, selects, and number inputs. We didn't put this directly on foam.u2.Input because other inputs that extend that model such...
JavaScript
0
@@ -1,12 +1,136 @@ +/**%0A * @license%0A * Copyright 2018 The FOAM Authors. All Rights Reserved.%0A * http://www.apache.org/licenses/LICENSE-2.0%0A */%0A%0A foam.CLASS(%7B @@ -620,16 +620,43 @@ %5E %7B%0A + min-width: 64px;%0A @@ -1726,9 +1726,8 @@ %5D,%0A%7D);%0A -%0A
a5903b97d8a421ef843b1cad98f1cf1bff42b473
Remove error
index.js
index.js
'use strict'; var assert = require('assert'), Batch = require('batch'), getStylesData = require('style-data'), getStylesheetList = require('list-stylesheets'), getHrefContent = require('href-content'); module.exports = function (html, options, callback) { var batch = new Batch(), data = ge...
JavaScript
0.000002
@@ -745,122 +745,123 @@ -var stylesData = results.shift(),%0A css;%0A%0A if (err) %7B%0A return callback(err);%0A %7D +if (err) %7B%0A return callback(err);%0A %7D%0A%0A var stylesData = results.shift(),%0A css;%0A %0A
bbd3f97d35fb0f789d3c6f8d87109e95572d3be5
fix ignored options on input
index.js
index.js
var _ = require('underscore') var S = require('string') function updateProcessArgs () { // fix freeze during debugging process.execArgv = _.filter(process.execArgv, function (arg) { return !S(arg).startsWith('--debug') }) } module.exports = function (_options) { var options = options || {} options.time...
JavaScript
0.000001
@@ -284,16 +284,17 @@ tions = +_ options
ddd16b7b6775c305bd44c77951a6fae1682f1583
print commit authors in msg if github token is defined
index.js
index.js
const IncomingWebhook = require('@slack/client').IncomingWebhook; const humanizeDuration = require('humanize-duration'); const config = require('./config.json'); module.exports.webhook = new IncomingWebhook(config.SLACK_WEBHOOK_URL); module.exports.status = config.GC_SLACK_STATUS; // subscribe is the main function ca...
JavaScript
0.000003
@@ -1,13 +1,15 @@ const + %7B Incomin @@ -16,16 +16,18 @@ gWebhook + %7D = requi @@ -49,24 +49,8 @@ nt') -.IncomingWebhook ;%0Aco @@ -144,16 +144,119 @@ son');%0A%0A +const token = process.env.GITHUB_TOKEN;%0Aconst %7B getCommitAuthor %7D = require('./lib/getCommitAuthor');%0A%0A module.e @@ -448,24 +448,20 @...
9d345ba48aace10d9b5355609fb07d26d7d39e07
Set user cookie to team id
index.js
index.js
import express from 'express' import db from 'sqlite' import bodyParser from 'body-parser' import Promise from 'bluebird' import cookieParser from 'cookie-parser' // Start Express const app = express() app.set('view engine', 'pug') // init the body parser app.use(bodyParser.json()) app.use(bodyParser.urlencoded({exte...
JavaScript
0.000001
@@ -1707,20 +1707,31 @@ efault:%0A +%09%09%09break;%0A %09%7D%0A%7D +) %0A%0A// ren @@ -1818,16 +1818,17 @@ dmin')%0A%7D +) %0A%0A// get @@ -2145,16 +2145,22 @@ gister', + async (req, r @@ -2172,31 +2172,8 @@ %3E %7B%0A -%09db.serialize(() =%3E %7B%0A%09 %09let @@ -2191,18 +2191,20 @@ y = -db.prepare +await...
e2a19b29eef82a93e00283703f49aa1b8d02f1fe
Use process.env.EMBER_ENV for env check.
index.js
index.js
'use strict'; var path = require('path'); var fs = require('fs'); var Funnel = require('broccoli-funnel'); var VersionChecker = require('ember-cli-version-checker'); // The different types/area for which we have content for. var ALLOWED_CONTENT_FOR = [ 'head-footer', 'test-head-footer' ]; module.exports = { na...
JavaScript
0
@@ -1361,28 +1361,37 @@ if ( -this.app.env +process.env.EMBER_ENV !== 'pr @@ -1822,20 +1822,29 @@ d = -this.app.env +process.env.EMBER_ENV ===
d6e7f2c3a05f812e9de2d34d3a3a5df3278aa3f9
Improve the regex (#4)
index.js
index.js
'use strict'; function posix(path) { return path.charAt(0) === '/'; } function win32(path) { // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; var result = splitDeviceRe.exec(pat...
JavaScript
0.005738
@@ -223,17 +223,16 @@ -Z%5D:%7C%5B%5C%5C -%5C /%5D%7B2%7D%5B%5E%5C @@ -236,24 +236,21 @@ %5B%5E%5C%5C -%5C /%5D+%5B%5C%5C -%5C /%5D+%5B%5E%5C%5C -%5C /%5D+) @@ -254,17 +254,16 @@ %5D+)?(%5B%5C%5C -%5C /%5D)?(%5B%5Cs
cab32f434ae5575d524a87411fdb4791ef8187fc
Update privateFunctions.js
lib/privateFunctions.js
lib/privateFunctions.js
'use strict'; module.exports = { getDevHash: _getDevHash, handleError: _handleError, makeRequest: _makeRequest }; var md5 = require('MD5'); var request = require('request-promise'); /** * @param {String} secret * @return {Object} * @private */ function _getDevHash (secret) { var timestamp = Math.floor(...
JavaScript
0.000001
@@ -139,10 +139,10 @@ re(' -MD +md 5');
a58b48fa0e79b62a7f097a993263c586348de695
Add a break in a for
index.js
index.js
const defaultConfig = require('./lib/default-config') const getContents = require('./lib/get-file-contents') const generateBody = require('./lib/generate-body') const commitIsInPR = require('./lib/commit-is-in-pr') const generateLabel = require('./lib/generate-label') const reopenClosed = require('./lib/reopen-clo...
JavaScript
0.000119
@@ -1668,24 +1668,41 @@ contents)%0D%0A + break%0D%0A %7D%0D%0A
a1020f56055aa8f0c07c8cc8b79e7603cc0205a1
allow opts.fs as a parameter
index.js
index.js
var EventEmitter = require('events').EventEmitter; var fs = require('fs'); var path = require('path'); module.exports = function walk (dir, opts, emitter, dstat) { if (!opts) opts = {}; var fdir = opts._original || dir; opts._original = undefined; if (!emitter) { emitter = new EventEmitter...
JavaScript
0
@@ -48,16 +48,17 @@ er;%0Avar +r fs = req @@ -255,16 +255,45 @@ efined;%0A + var fs = opts.fs %7C%7C rfs;%0A %0A