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
6528e0bf99c9c4b3dc72f7ee914e458e243fbc86
Fix modchat's group
commands/mod/modchat.js
commands/mod/modchat.js
'use strict' const { Command } = require('discord.js-commando'); const { symbols, hierarchy, top } = require("../../data/ranks.js") module.exports = class ModchatCommand extends Command { constructor(client) { super(client, { name: 'modchat', group: 'info', memberName: ...
JavaScript
0
@@ -286,12 +286,11 @@ p: ' -info +mod ',%0A
b3d7bef22b774794172df92f99dffb854f76274e
Disable alignment unless for imports
index.js
index.js
module.exports = { "parser": "babel-eslint", "settings": { "ecmascript": 6, "jsx": true }, "plugins": [ "react" ], "env": { "node": true, "browser": true }, "rules": { "comma-dangle": [1, "always-multiline"], "no-cond-assign": 1, "no-console": 1, "no-constant-condition": 1,...
JavaScript
0.000001
@@ -1673,74 +1673,22 @@ %7B %22 -VariableDeclarator%22: true, %22ImportDeclaration%22: true, %22CallExpress +ImportDeclarat ion%22
fe6ff8646371e59b4dbda2505e2f98ea6c198768
remove unused test config properties
test/sms_nurse.test.js
test/sms_nurse.test.js
var vumigo = require("vumigo_v02"); var fixtures_IdentityStore = require("./fixtures_identity_store"); var fixtures_StageBasedMessaging = require("./fixtures_stage_based_messaging"); var AppTester = vumigo.AppTester; var assert = require("assert"); var _ = require("lodash"); var SeedJsboxUtils = require("seed-jsbox-ut...
JavaScript
0.000001
@@ -838,521 +838,169 @@ -endpoints: %7B%0A %22sms%22: %7B%22delivery_class%22: %22sms%22%7D%0A %7D,%0A channel: %22longcode%22,%0A nurse_ussd_channel: %22nurse_ussd_channel%22,%0A testing_message_id: %220170b7bb-978...
289cef0c4e610d666191149ad9609dc3eb1ec7bd
Fix changing to blue theme - record number zero was incorrectly treated as no record (issue #2)
modules/mongovision/src/web/static/script/ux/ThemeSwitcher.js
modules/mongovision/src/web/static/script/ux/ThemeSwitcher.js
// // Copyright 2010-2011 Three Crickets LLC. // // The contents of this file are subject to the terms of the Apache License // version 2.0: http://www.opensource.org/licenses/apache2.0.php // // Alternatively, you can obtain a royalty free commercial license with less // limitations, transferable or non-transferable,...
JavaScript
0.000018
@@ -2503,25 +2503,24 @@ ecord) %7B%0A%09%09%09 -%09 this.doSwitc @@ -3157,15 +3157,23 @@ if ( -! record + === null ) %7B%0A
e5212ec075a57cf1e42290d7eb9e1f2f21db6cd0
throw an exception if the powershell command fails
index.js
index.js
module.exports = { zip: zip, zipSync: zipSync, unzip: unzip, unzipSync: unzipSync } var cp = require('child_process') var fs = require('fs') var os = require('os') var path = require('path') var rimraf = require('rimraf') function zip (inPath, outPath, cb) { if (!cb) cb = function () {} if (process.platfo...
JavaScript
0.000008
@@ -3019,32 +3019,41 @@ th, $myOutPath); + exit !$? %7D',%0A '-myI @@ -3519,16 +3519,25 @@ utPath); + exit !$? %7D',%0A
142877a4a160d8028026d82da9497e0e65f4ed5f
Load environment variables before server is built
bin/server.js
bin/server.js
'use strict'; const http = require('http'); const config = require('../config'); const app = require('../src/server/webapp'); const sockets = require('../src/server/sockets'); const log = require('../src/util/log'); let server = http.createServer(app); let io = require('socket.io')(server); sockets.init(io); server....
JavaScript
0
@@ -8,16 +8,36 @@ rict';%0A%0A +require('../env');%0A%0A const ht
bc3e85aafc3fa1095169153661093d3f012424e2
Change way in which storeRegistry expects stores to be returned, it's now a hash
node_modules/hotCoreStoreRegistry/lib/hotCoreStoreRegistry.js
node_modules/hotCoreStoreRegistry/lib/hotCoreStoreRegistry.js
"use strict"; /*! * Module dependencies. */ var dummy , hotplate = require('hotplate') ; exports.getAllStores = hotplate.cachable( function( done ){ var res = { stores: {}, collections: {}, }; hotplate.hotEvents.emit( 'stores', function( err, results){ results.forEach( function( element )...
JavaScript
0.000001
@@ -316,21 +316,35 @@ ent ) %7B%0A +%0A + Object.keys( element @@ -350,16 +350,18 @@ t.result + ) .forEach @@ -376,16 +376,54 @@ on( -Store )%7B +k )%7B%0A%0A var Store = element.result%5B k %5D; %0A%0A
726d2f9c4aa14b3903c3d01b6ab6024bdfb6ce98
Move require statement to top of file
index.js
index.js
var url = require('url') var tokenKey = ':_authToken' var userKey = ':username' var passwordKey = ':_password' var base64 = require('./base64') var decodeBase64 = base64.decodeBase64 var encodeBase64 = base64.encodeBase64 module.exports = function getRegistryAuthInfo(registryUrl, opts) { var options = opts || {} ...
JavaScript
0
@@ -22,96 +22,8 @@ l')%0A -%0Avar tokenKey = ':_authToken'%0Avar userKey = ':username'%0Avar passwordKey = ':_password'%0A%0A var @@ -51,16 +51,17 @@ ase64')%0A +%0A var deco @@ -131,16 +131,103 @@ Base64%0A%0A +var tokenKey = ':_authToken'%0Avar userKey = ':username'%0Avar passwordKey = ':_password'%0A%0A modul...
09d5075b2f8ea3ec9cd7013940222e56261ee698
Remove unused promisification
index.js
index.js
'use strict'; const BbPromise = require('bluebird'); const jsdom = BbPromise.promisifyAll(require('jsdom')); const fs = BbPromise.promisifyAll(require('fs')); const streamBuffers = require('stream-buffers'); const EventEmitter = require('events'); jsdom.defaultDocumentFeatures = { FetchExternalResources: ['script'...
JavaScript
0
@@ -3929,39 +3929,16 @@ anvas = -BbPromise.promisifyAll( window.d @@ -3970,17 +3970,16 @@ yChart') -) ;%0A
39e5a1338515696956b29e0b41eefd6cbab24d6a
Fix conditional finding
index.js
index.js
'use strict'; const assert = require('assert'); const fs = require('fs'); const cfenv = require('cfenv'); const _ = require('lodash'); module.exports = function Config(path) { assert(_.isString(path), "Must specify path that exists."); fs.accessSync(path, fs.R_OK); let vcap; let config; if (!!process...
JavaScript
0.025794
@@ -67,16 +67,46 @@ e('fs'); +%0Aconst path = require('path'); %0A%0Aconst @@ -198,16 +198,20 @@ fig(path +name ) %7B%0A%0A a @@ -231,16 +231,20 @@ ing(path +name ), %22Must @@ -256,16 +256,20 @@ ify path +name that ex @@ -300,16 +300,20 @@ ync(path +name , fs.R_O @@ -420,29 +420,41 @@ require(path - + +....
48ac3e8e348f47c94795b48f37ea52b779617b8c
add `.tag` and `.branch` methods
index.js
index.js
/** * online-branch-exist <https://github.com/tunnckoCore/online-branch-exist> * * Copyright (c) 2014-2015 Charlike Mike Reagent, contributors. * Released under the MIT license. */ 'use strict'; var fs = require('fs'); var fmt = require('util').format; var got = require('got'); var errs = require('handle-errors'...
JavaScript
0.000002
@@ -464,35 +464,306 @@ s = -function onlineBranchExist( +onlineBranchExist;%0AonlineBranchExist.tag = onlineTagExist;%0AonlineBranchExist.branch = onlineBranchExist%0A%0Afunction onlineBranchExist(pattern, callback) %7B%0A core('branches', pattern, callback);%0A%7D%0A%0Afunction onlineTagExist(pattern, callback) %7B...
9235990779b1098df387e534656a921107732818
Move close functionality on location change into mwMenuTopBar
src/mw-menu/directives/mw_menu_top_entries.js
src/mw-menu/directives/mw_menu_top_entries.js
angular.module('mwUI.Menu') .directive('mwMenuTopEntries', function ($rootScope, $timeout) { return { scope: { menu: '=mwMenuTopEntries', right: '=' }, transclude: true, templateUrl: 'uikit/mw-menu/directives/templates/mw_menu_top_entries.html', controller: function ...
JavaScript
0
@@ -556,319 +556,8 @@ );%0A%0A - scope.unCollapse = function () %7B%0A var collapseEl = el.find('.navbar-collapse');%0A if (collapseEl.hasClass('in')) %7B%0A collapseEl.collapse('hide');%0A %7D%0A %7D;%0A%0A $rootScope.$on('$locationChangeSuccess', function ()...
b9c96cfc73b6e0adcb7b747c40ac40c74995ea7f
Add caveat about symbols to string error message
eslint-rules/no-primitive-constructors.js
eslint-rules/no-primitive-constructors.js
/** * Copyright 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @emails react...
JavaScript
0.000004
@@ -375,16 +375,130 @@ text) %7B%0A + function report(node, name, msg) %7B%0A context.report(node, %60Do not use the $%7Bname%7D constructor. $%7Bmsg%7D%60);%0A %7D%0A%0A functi @@ -553,28 +553,8 @@ me;%0A - let msg = null;%0A @@ -591,37 +591,81 @@ olean':%0A -msg = +report(%0A node...
ff24493b47694c23e669f1d06c56b7504393e7e8
fix identation
packages/react-freezeframe/src/components/ReactFreezeframe.js
packages/react-freezeframe/src/components/ReactFreezeframe.js
import React from 'react'; import Freezeframe from 'freezeframe'; class ReactFreezeframe extends React.Component { constructor(props) { super(props); this.state = { isPlaying: false }; this.freeze = React.createRef(); } componentDidMount() { this.$freezeframe = new Freezeframe(this.fre...
JavaScript
0.998365
@@ -819,26 +819,16 @@ %7B -%0A childre @@ -839,18 +839,16 @@ - - ? %3Cdiv r @@ -923,17 +923,17 @@ - : %3Cimg%0A + @@ -970,16 +970,18 @@ + + alt=%7Balt @@ -982,16 +982,18 @@ t=%7Balt%7D%0A + @@ -1006,16 +1006,18 @@ c=%7Bsrc%7D%0A +
95a30b735ab02b220d7d64b176019b47ab3ef8ab
Fix my own tests, woopsie
src/Parser/Core/EventGrouper.test.js
src/Parser/Core/EventGrouper.test.js
import EventGrouper from './EventGrouper'; describe('EventGrouper', () => { it('Adds a new stem event', () => { const eventGrouper = new EventGrouper(0); eventGrouper.addNewStemTimestamp({ timestamp: 420 }); expect(eventGrouper.cache[420]).toBeTruthy(); }); it('Checks for events within a threshold...
JavaScript
0.000005
@@ -651,33 +651,33 @@ ew EventGrouper( -1 +2 00);%0A eventGr @@ -704,25 +704,25 @@ timestamp: -0 +1 %7D);%0A%0A co @@ -812,11 +812,9 @@ ual( -%220%22 +1 );%0A @@ -944,17 +944,17 @@ estamp: -0 +1 %7D, %7B ti @@ -983,17 +983,17 @@ tamp: 10 -1 +2 %7D, %7B ti @@ -1140,24 +1140,62 @@ rocessor);%0A%0A...
8aa85b90cbffc79fdc54ba1aac070d7fb2a8dccb
Add relevant Customer section changes to main.router.js
public/controllers/main.routes.js
public/controllers/main.routes.js
'use strict'; angular.module('StudentApp').config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $routeProvider.when('/studentPage', { templateUrl: 'views/student/student.list.html', controller: 'StudentController' }).when('/comments/:...
JavaScript
0
@@ -686,32 +686,169 @@ rderController'%0A + %7D).when('/customerPage', %7B%0A templateUrl: 'views/Customer/Customer.html',%0A controller: 'CustomerController'%0A %7D).other
bdb59c85f0b1e967cfae00ae0408a6525d83f619
add compat logging for mutations
packages/react-relay/compat/mutations/RelayCompatMutations.js
packages/react-relay/compat/mutations/RelayCompatMutations.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; const invariant = require('invariant'); const warning = require('warning'); const { getRe...
JavaScript
0
@@ -841,95 +841,601 @@ ';%0A%0A -function commitUpdate%3CT%3E(%0A environment: CompatEnvironment,%0A config: MutationConfig%3CT%3E +/**%0A * Sets a logging function that logs whether a compat mutation was executed in%0A * a modern or classic environment.%0A */%0Atype CompatLoggingFunction = (moduleName: string, isMo...
a3e0616aa73c55e760f4b084947e2695499f2880
add autosave (interval 60s)
public/javascripts/application.js
public/javascripts/application.js
(function($){ clickingLink = false; $(".content.editable").on("mousedown", function(e){ if(e.target.tagName == "A" && !$(this).hasClass("aloha-editable-active")){ clickingLink = true; e.preventDefault(); e.stopImmediatePropagation(); } }).on("mouseup", functi...
JavaScript
0
@@ -1061,32 +1061,74 @@ ditable').html() +.replace(%22 class=%5C%22aloha-link-text%5C%22%22, %22%22) ,%0A ti @@ -1771,24 +1771,54 @@ %7D%0A %7D;%0A +%0A setInterval(save, 6e4);%0A%0A Aloha.bi
6dbb0073e110b152dbcbe0915bedf81210fe13bb
Fix Disabled typography type mapping
packages/react/src/elements/components/Typography/Disabled.js
packages/react/src/elements/components/Typography/Disabled.js
import React from "react"; import PropTypes from "prop-types"; import { Typography as VanillaTypography } from "hig-vanilla"; import Typography from "../../../adapters/TypographyAdapter"; export default class Disabled extends React.PureComponent { render() { console.warn( "Component Disabled is deprecated ...
JavaScript
0.000001
@@ -446,17 +446,17 @@ y type=%22 -D +d isabled%22
9e275cef9d04f67738781fe70c440beaf6bcb6d7
remove Promise
index.js
index.js
const exec = require('child_process').exec; const HDMI_ON_CMD = "/opt/vc/bin/tvservice -p" const HDMI_OFF_CMD = "/opt/vc/bin/tvservice -o" const HDMI_STATUS_CMD = "/opt/vc/bin/tvservice -o" module.exports.status = function(){ return new Promise(function(resolve, reject){ exec(HDMI_STATU...
JavaScript
0.002054
@@ -202,128 +202,68 @@ ce - -o%22%0D%0A%0D%0A%0D%0A%0D%0Amodule.exports.status = function()%7B%0D%0A return new Promise(function(resolve, reject +-status%22%0D%0A%0D%0A%0D%0Avar runCmd = function(cmd, chain )%7B%0D%0A - - exec( -HDMI_STATUS_CMD +cmd , f @@ -287,18 +287,16 @@ dout)%7B%0D%0A - if(e @@ -...
b8ddceb1a0613f61b3721e2b5ac99938be30b785
Use an options object instead of parameters.
index.js
index.js
'use strict'; /** * Randomize the order of the elements in a given array. * @param {array} arr - The given array. * @param {boolean} [copy] - Sets if should return a shuffled copy of the given array. By default it's a falsy value. * @returns {array} */ function shuffle(arr, copy, rng) { if (!Array.isArray(arr)...
JavaScript
0
@@ -72,33 +72,33 @@ ray.%0A * @param %7B -a +A rray%7D arr - The @@ -121,17 +121,80 @@ @param %7B -b +Object%7D %5Boptions%5D - Optional configuration options.%0A * @param %7BB oolean%7D @@ -194,16 +194,24 @@ olean%7D %5B +options. copy%5D - @@ -299,16 +299,97 @@ value.%0A + * @param %7BFunction%7D %5Boption...
ee226d87e65a1d5c313ce308d29da3c32cdae79f
Fix comma handling in live table sorting.
public/javascripts/application.js
public/javascripts/application.js
function insert_default(element) { if($(element).attr('value') == ''){ $(element).addClass('defaulted'); $(element).attr('value', $(element).attr('default')); } } $(window).load(function(){ $('input#thing').focus(); }); $(document).ready(function() { $('a[rel*=facebox]').facebox(); $('.hide')....
JavaScript
0
@@ -169,16 +169,304 @@ %0A %7D%0A%7D%0A%0A +jQuery.tablesorter.addParser(%7B%0A id: %22commaDigit%22,%0A is: function(s, table) %7B%0A var c = table.config;%0A return jQuery.tablesorter.isDigit(s.replace(/,/g, %22%22), c);%0A %7D,%0A format: function(s) %7B%0A return jQuery.tablesorter.formatFloat(s.repl...
41d7d50660b69698a04c88233cd5dd0427166f02
Set mode `777` on downloaded files
index.js
index.js
'use strict'; var exec = require('child_process').exec; var Download = require('download'); var rm = require('rimraf'); var tempfile = require('tempfile'); /** * Initialize new `BinBuild` * * @api public */ function BinBuild() { if (!(this instanceof BinBuild)) { return new BinBuild(); } thi...
JavaScript
0
@@ -1047,16 +1047,27 @@ ct: true +, mode: 777 %7D)%0A
87a189bf58d17f70cf08ae6b625bea21922a3cae
Add more helpful error message when no focusable elements are found; closes #1
index.js
index.js
var tabbable = require('tabbable'); var trap; var tabbableNodes; var previouslyFocused; var activeFocusTrap; var config; function activate(element, options) { // There can be only one focus trap at a time if (activeFocusTrap) deactivate(); activeFocusTrap = true; trap = (typeof element === 'string') ? do...
JavaScript
0
@@ -699,16 +699,132 @@ %7D());%0A + if (!focusNode) %7B%0A throw new Error('You can%5C't have a focus-trap without at least one focusable element');%0A %7D%0A focusN
82392a2ddf55a485c983c4e88cbb1b116a861c36
add cors headers to api
index.js
index.js
/** * Dependencies * ============ */ var twilio = require('twilio'); var express = require('express'); var mongoose = require('mongoose'); var bodyParser = require('body-parser'); /** * Express config * ============== */ var app = express(); app.use( bodyParser.json() ); app.use( bodyParser.urlencoded...
JavaScript
0
@@ -1688,16 +1688,136 @@ res ) %7B +%0A res.header('Access-Control-Allow-Origin', '*');%0A res.header('Access-Control-Allow-Headers', 'X-Requested-With'); %0A%0A va @@ -2112,57 +2112,8 @@ rl,%0A - from : confession.from,%0A
82389dd8e87fb2000c3104d14067577c18c60b5b
add config as first params
index.js
index.js
const request = require('request-promise'); const debug = require('debug')('kong-admin-client'); const Kong = function kong(baseUrl, opts = {}) { this.config = { baseUrl }; this.config.apiKey = opts.apiKey || null; this.config.apiKeyName = opts.apiKeyName || 'apikey'; return this; }; Kong.prototype.get = fu...
JavaScript
0.000001
@@ -127,16 +127,22 @@ (baseUrl +OrOpts , opts = @@ -148,16 +148,59 @@ = %7B%7D) %7B%0A + if (baseUrlOrOpts instanceof Object) %7B%0A this.c @@ -210,18 +210,16 @@ ig = - %7B baseUrl %7D;%0A @@ -218,111 +218,114 @@ eUrl - %7D;%0A this.config.apiKey = opts.apiKey %7C%7C null;%0A this.config.apiKeyName = o...
9a3299415c96ff6c76e4b72cc28ac66acb67fa0c
add link name to properly notify
index.js
index.js
#!/usr/bin/env node //npm modules var program = require('commander'); var request = require('request'); //connected devices try { var Gpio = require('onoff').Gpio; var powerTail = new Gpio(408, 'out', null, {activeLow: true}); } catch (error) { console.log(error); } //misc variables var SLACK_...
JavaScript
0
@@ -2592,16 +2592,35 @@ essage%7D%60 +,%0A link_names: 1 %0A %7D%0A%0A
0c16d39f13367145b95fba549e65d889adf29e33
Add animation when delete is done
public/js/controllers/postCtrl.js
public/js/controllers/postCtrl.js
(function(){ 'use strict'; angular .module('feedApp') .controller('feedCtrl', ['$scope','API', feedCtrl]); function feedCtrl($scope, API) { 'use strict'; /* jshint validthis: true */ var vm = this; vm.list = null; API.Posts.getAll().success(function(data) { if(data && dat...
JavaScript
0.000001
@@ -1099,16 +1099,23 @@ unction( +event, id) %7B%0A @@ -1194,16 +1194,156 @@ done) %7B%0A + var row = $(event.toElement).parents(%22tr%22);%0A row.fadeOut(function() %7B%0A $(this).remove();%0A %7D); %0A
b78d4305a6e85aa3d1ba5f2db0b61d323fa5457d
fix undefined error of currentPage.
index.js
index.js
var React = require('react-native') var { PanResponder, View, StyleSheet, Dimensions, PropTypes} = React var {height, width} = Dimensions.get('window'); var rebound = require('rebound'); var released = true; var distinct = 0; var previousPage=0; var timer = null; var carousel = React.createClass({ _panResponder: {}, ...
JavaScript
0
@@ -2207,32 +2207,36 @@ tion()%7B%0A +var currentPage = -1 @@ -2228,32 +2228,93 @@ urrentPage = -1; + // if this.props.speed is not undefined, it will be error. %0A that._s
f506f0b4a2b0f45d70d93bfbb6d5e3f0cac780d4
Add more gmail examples
examples/provider/google.js
examples/provider/google.js
var cred = { app:require('../../config/app'), user:require('../../config/user') } exports = module.exports = function (p) { return { // get all google contact's groups 0: function () { p.get('groups/default/full', { api:'contacts', qs:{ access_token:cred.user.google.toke...
JavaScript
0
@@ -135,16 +135,34 @@ eturn %7B%0A +%0A // Contacts%0A%0A // g @@ -965,16 +965,17 @@ (var i=0 +; i %3C lin @@ -982,16 +982,17 @@ k.length +; i++) %7B%0A @@ -1862,16 +1862,16 @@ length)%0A - %7D) @@ -1872,16 +1872,649 @@ %7D))%0A + %7D,%0A%0A // GMail%0A%0A // get a single message%0A...
ffda2e57acac59f6bf99fa1b08c753ee1d607c1a
Add code documentation
wrappers/mapKey.js
wrappers/mapKey.js
'use strict'; var fs = require('fs') var template = fs.readFileSync(__dirname + '/../templates/key.html', 'utf8') var handlebars = require('handlebars') var keyTemplate = handlebars.compile(template) class MapKey { constructor(config) { this.config = config this.title_ = '' this.items = [] ...
JavaScript
0.000001
@@ -212,22 +212,129 @@ e)%0A%0A -class MapKey %7B +/**%0A * Class to handle reading and writing to the map key dom structure%0A */%0Aclass MapKey %7B%0A%0A /**%0A * @constructor%0A */ %0A c @@ -536,16 +536,93 @@ ()%0A %7D%0A%0A + /**%0A * Used to set the title of the key%0A * @param %7Bstring%7D title%0A...
c11d0b3d616fb1d03cdbf0453dcdc5cb39ac122a
Add support for an index mode
lib/node_modules/@stdlib/types/ndarray/ctor/lib/getnd.js
lib/node_modules/@stdlib/types/ndarray/ctor/lib/getnd.js
'use strict'; // MODULES // var isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive; // FUNCTIONS // /** * Returns an array element. * * @private * @param {...integer} idx - indices * @throws {TypeError} provided indices must be integer valued * @throws {RangeError} index exceeds array dimensions * @ret...
JavaScript
0.000001
@@ -91,16 +91,60 @@ mitive;%0A +var getIndex = require( './get_index.js' );%0A %0A%0A// FUN @@ -468,40 +468,19 @@ ar i -;%0A%0A%09// TODO: support index modes +nd;%0A%09var i; %0A%0A%09l @@ -727,16 +727,82 @@ );%0A%09%09%7D%0A +%09%09ind = getIndex( arguments%5B i %5D, this._shape%5B i %5D, this._mode );%0A %09%...
2d1bd23a872645053b8e19bdf8b656b8ca872c4b
Handle case where dotenv is not included in production.
index.js
index.js
require('babel/register'); require('dotenv').load(); var startServer = require('./app'); var port = process.env['PORT'] || 3000; startServer(port);
JavaScript
0
@@ -20,16 +20,64 @@ ster');%0A +%0Aif (process.env.NODE_ENV !== 'production') %7B%0A require( @@ -93,16 +93,18 @@ .load(); +%0A%7D %0A%0Avar st @@ -160,16 +160,13 @@ .env -%5B' +. PORT -'%5D %7C%7C
936971fd93f327b15cea0788f2404754c8bc11bf
Update index.js
index.js
index.js
module.exports = filterObjectOnSchema; function filterObjectOnSchema(schema, doc){ var results; //console.log("DOC: ", JSON.stringify(doc, null, 2)); //console.log("SCH: ", JSON.stringify(schema, null, 2)); if (schema.type == 'object') { results = {}; // holds this levels items // pr...
JavaScript
0
@@ -969,20 +969,56 @@ %7D -else +%0A else if(sp.type == 'boolean') %7B%0A @@ -1017,33 +1017,32 @@ %7B%0A if - (doc%5Bkey%5D != nul @@ -1042,16 +1042,118 @@ != null + && typeof doc%5Bkey%5D != 'undefined') results%5Bkey%5D = doc%5Bkey%5D;%0A %7Delse%7B%0A if (d...
e82fe2982f647ac63f792d292b63d938f7f3b70d
fix host
index.js
index.js
process.title = 'rachelandjoey' const hapi = require('hapi') , path = require('path') , fs = require('fs') , atomifyCSS = require('atomify-css') , React = require('react') , jace = require('jace') , browserify = require('browserify') , entryJs = require('./components/home/index.jsx') , config = jace({ ...
JavaScript
0.000006
@@ -651,23 +651,23 @@ config%0A -server. +%0Aconst connecti @@ -668,17 +668,26 @@ nnection -( +Options = %7Bport: 8 @@ -693,15 +693,72 @@ 8000 -, +%7D%0Aif (config.nodeEnv === 'development') connectionOptions. host -: + = 'lo @@ -765,17 +765,52 @@ calhost' -%7D +%0Aserver.connection(connectionOptions )%0A...
05f99b6123ad836140f1a0d4c84e1a2f1c9fcaff
add more comments
index.js
index.js
/** * Expose `Normalizer`. */ module.exports = Normalizer; /*! * Module dependencies. */ var assert = require('assert'); /** * @class * Create a normalizer value from the given value. * * @param {*} val The value object * @param {Object} opts The Options */ function Normalizer(val, opts) { this.val = val;...
JavaScript
0
@@ -5603,16 +5603,82 @@ s = %7B%7D;%0A + // use maxCoerceLevel to prevent circular reference parse error%0A var ma
c8e61e06502ec73876bf29eff6d5589c8e803ec3
Add --man
index.js
index.js
'use strict'; var makeMan = require('./lib/make-man'); var registryUrl = require('registry-url')(), got = require('got'); module.exports = function (name, cb) { got(registryUrl + name, { json: true }, function (err, info) { if (err) return cb(err); cb(err, makeMan(info)); }); };
JavaScript
0.000003
@@ -160,13 +160,141 @@ me, -cb) %7B +opts, cb) %7B%0A if (typeof opts == 'function') %7B%0A cb = opts;%0A opts = %7B%7D;%0A %7D%0A%0A if (opts.man == null) %7B%0A opts.man = true;%0A %7D%0A %0A g @@ -392,29 +392,73 @@ -cb(err, makeMan(info) +var man = opts.man ? makeMan(info) : info.readme;%0A ...
b89a3febd4c5d8b2ceb9462526dd394f43de8994
Fix default export with dependencies.
index.js
index.js
var queue = [], map = queue.map, some = queue.some; export var require = requireFrom(function(name) { if (!name.length || /^[\s._]/.test(name) || /\s$/.test(name)) throw new Error("illegal name"); return "https://unpkg.com/" + name; }); export function requireFrom(source) { var modules = new Map; function re...
JavaScript
0
@@ -1191,18 +1191,11 @@ %7B%0A -queue.push +if (arg @@ -1215,194 +1215,102 @@ %3C 2 - %7C%7C !some.call(dependencies, isexports) ? function() %7B%0A return typeof factory === %22function%22 ? new Promise(function(resolve) %7B%0A return resolve(factory());%0A %7D) : factory;%0A %7D : +) factory = depe...
36379543ecc79504e7026104ab1d41ad85a73289
Make filePath configurable by using reporterOptions
index.js
index.js
'use-strict'; var xml = require('xml'); var Base = require('mocha').reporters.Base; var fs = require('fs'); module.exports = MochaJUnitReporter; /** * JUnit reporter for mocha.js. * @module mocha-junit-reporter * @param {EventEmitter} runner - the test runner */ function MochaJUnitReporter(runner) { var fileP...
JavaScript
0.000001
@@ -260,16 +260,62 @@ runner%0A + * @param %7BObject%7D options - reporter options%0A */%0Afunc @@ -344,16 +344,25 @@ r(runner +, options ) %7B%0A va @@ -363,16 +363,113 @@ %7B%0A var +filePath;%0A if (options && options.mochaFile) %7B%0A filePath = options.mochaFile;%0A %7D else %7B%0A filePath @@ ...
bdf83c2975d41b01d191508464459eeb4408a994
clean up and handle /hello get and post requests
index.js
index.js
const settings = require('./settings/settings.json') const express = require('express') const colors = [ 'red', 'orange', 'yellow', 'green', 'blue', 'purple' ] const names = [ {first: 'Bill', last: 'Gates'}, {first: 'Ted', last: 'Bundy'}, {first: 'Bill', last: 'Nye'}, {first: 'William'...
JavaScript
0
@@ -85,92 +85,118 @@ s')%0A -%0A const -colors = %5B%0A 'red',%0A 'orange',%0A 'yellow',%0A 'green',%0A 'blue',%0A 'purple'%0A%5D +bodyParser = require('body-parser')%0A%0Aconst urlencodedParser = bodyParser.urlencoded(%7B extended: false %7D) %0A%0Aco @@ -510,18 +510,8 @@ dex' -, %7Bcolors%7D )%0A%7D) @@ -...
24bddca531b721ab42071b4e01f2eedb1a19d201
Fix require statement.
index.js
index.js
var through = require('through2'); var remarkable = require('remarkable '); module.exports = function(options) { return through.obj(function(file, encoding, callback) { if (!file.isBuffer()) { callback(); } var md = new remarkable('full'); var src = file.contents.toString(); var html ...
JavaScript
0.000001
@@ -69,17 +69,16 @@ markable - ');%0A%0Amod @@ -335,32 +335,8 @@ );%0A%0A - console.log(html);%0A%0A
25cc28eccca76da55d79479541a1169c159822dd
return respond body, even if there was an error
index.js
index.js
/*global window*/ var extend = require("xtend") , once = require("once") , protocolLess = /^\/\/[^\/]+\// , hasProtocol = /^https?:\/\// , messages = { "0": "Internal XMLHttpRequest Error" , "4": "4xx Client Error" , "5": "5xx Server Error" } , _window = typeof window ==...
JavaScript
0.000049
@@ -2419,16 +2419,88 @@ f, error +, self.response %7C%7C%0A self.responseText %7C%7C self.responseXML )%0A
ca8cdd0eb3a15d3d360bf8643a7d2b7893ebf570
Fix indentation in index.js
index.js
index.js
module.exports = function(combine, initialValue, aStream) { return new Promise((resolve, reject) => { let accumulatedValue = initialValue aStream.on('data', (data) => { accumulatedValue = combine(accumulatedValue, data) }) aStream.on('end', () => res...
JavaScript
0.004299
@@ -53,18 +53,16 @@ ream) %7B%0A - return @@ -93,30 +93,24 @@ eject) =%3E %7B%0A - let accu @@ -138,22 +138,16 @@ lValue%0A%0A - aStr @@ -173,28 +173,16 @@ a) =%3E %7B%0A - ac @@ -230,28 +230,16 @@ , data)%0A - %7D) @@ -240,28 +240,24 @@ %7D) %0A...
f4255e5e26efef61726d8550e7d82f7294f47a53
Refactor user-input checking
index.js
index.js
'use strict'; function deepMap(object, fn, opts) { opts = opts || {}; if (!fn) { throwError(Error, 'transformFn must be defined'); } if (!isFunction(fn)) { throwError(TypeError, 'transformFn must be a function'); } if (!isObject(opts)) { throwError(TypeError, 'options must be an object or unde...
JavaScript
0.000001
@@ -133,26 +133,29 @@ fined');%0A %7D -%0A +else if (!isFunc @@ -230,18 +230,21 @@ n');%0A %7D -%0A +else if (!is
c97e8413ad32198055ea123ba0aa50124fca38e4
Add host to config. Add logging
index.js
index.js
var path = require('path'), Sequelize = require('sequelize'), config = { database: 'myDatabase', username: null, password: null, url: 'mysql://localhost', port: 3306, dialect: 'mysql', models: './models' }; expo...
JavaScript
0.000001
@@ -1,12 +1,43 @@ var +fs = require('fs'),%0A path @@ -221,22 +221,15 @@ -url: 'mysql:// +host: ' loca @@ -320,16 +320,44 @@ /models' +,%0A logging: false %0A @@ -569,16 +569,37 @@ var +models = %7B%7D,%0A sequeliz @@ -669,32 +669,36 @@ word, %7B%0A +...
1a10f6dda6963db629ca356e154a50c70692bbf9
Move default identicon to willMount
recipe-server/client/control/components/recipes/RecipeForm.js
recipe-server/client/control/components/recipes/RecipeForm.js
import { Row, Col, Alert, Button, Form, Input, Select } from 'antd'; import autobind from 'autobind-decorator'; import { is, Map } from 'immutable'; import PropTypes from 'prop-types'; import React from 'react'; import { connect } from 'react-redux'; import FormItem from 'control/components/forms/FormItem'; import For...
JavaScript
0.000001
@@ -2133,105 +2133,60 @@ co -nstructor(props) %7B%0A super(props);%0A this.defaultIdenticonSeed = this.defaultIdenticonSeed %7C%7C +mponentWillMount() %7B%0A this.defaultIdenticonSeed = Ide
5ebd17d859a992e9a9ddb680f0dbb87260fa7863
Return the whole session, not just IBI.
index.js
index.js
'use strict'; var async = require('async'); var request = require('request'); var moment = require('moment'); var request = request.defaults({ jar: true }); var userForm = { username: process.env.EMPATICA_USERNAME, password: process.env.EMPATICA_PASSWORD }; var empaticaUtils = { getDeviceName: fu...
JavaScript
0.000003
@@ -4548,17 +4548,8 @@ sion -.data.ibi );%0A
295d048179e9667c060d2ada47be6442807d6d77
add reduce to utils
index.js
index.js
function countIf (testFunc, arr) { var count = 0 for (var i = 0; i < arr.length; i++) { if (testFunc(arr[i])) { count ++ } } return count } function filter (func, arr) { var emails = [] for (var i = 0; i < arr.length; i++) { if (func(arr[i])) emails.push(arr[i]) } return emails } ...
JavaScript
0.000003
@@ -468,16 +468,361 @@ es;%0A%0A%7D%0A%0A +function reduce(reducerFunction, collection, initialResult) %7B%0A var result = initialResult; // initialise the result to be returned - could be of any type%0A for (var i = 0; i %3C Object.keys(collection).length; i++) %7B%0A var val = (collection%5BObject.keys(colle...
a3f95e13d78f3ed210390626f20e91ecc355318d
Add feed parameter
index.js
index.js
/** * Module dependencies */ var request = require('superagent') , _ = require('underscore'); // API endpoint var endpoint = 'http://api.tradedoubler.com/1.0/products.json' var Tradedoubler = module.exports = function Tradedoubler (opts) { if (!(this instanceof Tradedoubler)) return new Tradedoubler(opts); t...
JavaScript
0.000001
@@ -422,24 +422,110 @@ , this;%0A%7D;%0A%0A +Tradedoubler.prototype.feed = function (feed) %7B%0A return this._feed = feed, this;%0A%7D;%0A%0A Tradedoubler @@ -624,16 +624,46 @@ s._id%7D)%0A + .query(%7Bfid: this._feed%7D)%0A .que
68e6935883595644237ba26e7b68b3acbc589199
Add pagination
index.js
index.js
/** * Module dependencies */ var request = require('superagent') , _ = require('underscore'); // API endpoint var endpoint = 'http://api.tradedoubler.com/1.0/products.json' var Tradedoubler = module.exports = function Tradedoubler (opts) { if (!(this instanceof Tradedoubler)) return new Tradedoubler(opts); t...
JavaScript
0.000022
@@ -539,30 +539,418 @@ ype. -done = function (cb) %7B +limit = function (limit) %7B%0A if (!limit) return this;%0A return this._limit = limit, this;%0A%7D;%0A%0ATradedoubler.prototype.one = function (one) %7B%0A one = ('undefined' === typeof one) ? true : !!one;%0A return this._one = one, this;%0A%7D;%0A%0ATradedo...
0e0618e7295b0e6103fcfeba05bac937d71abd0c
Use array spread syntax
index.js
index.js
"use strict"; const path = require('path'); const del = require('del'); const runSequence = require('run-sequence'); const streamqueue = require('streamqueue'); const remoteSrc = require('gulp-remote-src'); const concat = require('gulp-concat'); const URL = require('url'); const karmaServer = require('karma').Server; ...
JavaScript
0.000002
@@ -5436,16 +5436,29 @@ tasks = +%5B%0A ... this._ta @@ -5475,17 +5475,9 @@ cies -.concat(%5B +, %0A @@ -5552,17 +5552,16 @@ %0A %5D -) ;%0A%0A
30cbea286ad36b3764aef8b45aec8a810bee452f
implement beforeSend
index.js
index.js
var window = require("global/window") var once = require("once") var messages = { "0": "Internal XMLHttpRequest Error", "4": "4xx Client Error", "5": "5xx Server Error" } var XHR = window.XMLHttpRequest || noop var XDR = "withCredentials" in (new XHR()) ? window.XMLHttpRequest : window.XDomainRequ...
JavaScript
0.000001
@@ -1984,24 +1984,160 @@ seType%0A %7D +%0A %0A if (%22beforeSend%22 in options && %0A typeof options.beforeSend === %22function%22%0A ) %7B%0A options.beforeSend(xhr)%0A %7D %0A%0A xhr.se
4217cd0dfed3702b8196727adef7bdb2ecf56350
Implement zip operator
index.js
index.js
const combine = (combiner, ...observables) => next => { let state = Array(observables.length) observables.forEach((base, index) => base(value => { state[index] = value if(Object.keys(state).length === state.length) next(combiner(...state)) })) } const constant = (base, value) => map(base, () => v...
JavaScript
0.000001
@@ -1326,16 +1326,367 @@ %7D)%0A%7D%0A%0A +const zip = (merger, ...observables) =%3E next =%3E %7B%0A const stock = Array.from(%7Blength%7D = observables, _ =%3E %5B%5D),%0A checkStock = _ =%3E stock.every(list =%3E list.length),%0A emit = _ =%3E next(merger(stock.map(list =%3E list.shift())))%0A%0A observab...
3321cc95a521445a1ad1a2f70c057acb583ac71e
Add identity gard before firing layout change
solutions.digamma.damas.ui/src/components/layouts/app-page.js
solutions.digamma.damas.ui/src/components/layouts/app-page.js
import Vue from "vue" export default { name: 'AppPage', props: { layout: { type: String, required: true, validator: [].includes.bind(["standard", "empty"]) } }, created() { let component = components[this.layout] if (!Vue.options.compo...
JavaScript
0
@@ -445,24 +445,77 @@ ;%0A %7D%0A + if (this.$parent.layout !== component) %7B%0A this @@ -558,16 +558,26 @@ onent);%0A + %7D%0A %7D,%0A @@ -785,8 +785,9 @@ mpty%22)%0A%7D +%0A
72863175df491c1e39ab8d7fbd493ff1d23078a1
Teste de atualização do Bower.
index.js
index.js
'use strict' module.exports = { globalize: require('./src/globalize'), toUpperLowerCase: require('./src/toUpperLowerCase'), substituir: require('./src/substituir'), dataHora: require('./src/dataHora'), chaveUnica: require('./src/chaveUnica'), ajaxSubmit: require('./src/ajaxSubmit'), verific...
JavaScript
0
@@ -384,11 +384,32 @@ /isCPF') +,%0A teste: %22sei la%22 %0A%7D%0A
a1b25135524525f56610e0a66cb96abce346c644
Set HTTP response status directly before return
routes/fileUpload.js
routes/fileUpload.js
const utils = require('../lib/utils') const challenges = require('../data/datacache').challenges const libxml = require('libxmljs') const vm = require('vm') exports = module.exports = function fileUpload () { return (req, res, next) => { const file = req.file if (utils.notSolved(challenges.uploadSizeChalleng...
JavaScript
0
@@ -920,32 +920,8 @@ g()%0A - res.status(410)%0A @@ -930,16 +930,16 @@ try %7B%0A + @@ -1413,32 +1413,58 @@ ge)%0A %7D%0A + res.status(410)%0A next(n @@ -1932,16 +1932,16 @@ ter.'))%0A - @@ -1951,16 +1951,44 @@ else %7B%0A + res.status(410...
3fa20d94c644cb2eadf849f69bcce8806052c604
Add badge label
index.js
index.js
/** * Dependencies. */ import React from 'react' /** * This is a simple description. * * @param {Object} props * @api public */ export default (props) => { //itms-apps return ( <a href={'https://itunes.apple.com/app/' + props.id}> <img src="https://tether.github.io/react-download-ios/badge.png"...
JavaScript
0.000002
@@ -174,16 +174,74 @@ ms-apps%0A + const title = props.title %7C%7C 'Download iOS application'%0A return @@ -299,16 +299,35 @@ rops.id%7D + aria-label=%7Btitle%7D %3E%0A @@ -402,49 +402,13 @@ le=%7B -props.title %7C%7C 'Download iOS application' +title %7D%3E%3C/
b8faae3b2641531ca3bb83740dc04aefe8e47844
Add activation, layer, praxis, FeedForward, and Recurrent into es5 and browser index.js file.
index.js
index.js
var crossValidate = require('./dist/cross-validate').default; var likely = require('./dist/likely').default; var lookup = require('./dist/lookup').default; var NeuralNetwork = require('./dist/neural-network').default; var NeuralNetworkGPU = require('./dist/neural-network-gpu').default; var TrainStream = require('./dist...
JavaScript
0
@@ -1,12 +1,59 @@ +var activation = require('./dist/activation');%0A var crossVal @@ -98,24 +98,61 @@ ').default;%0A +var layer = require('./dist/layer');%0A var likely = @@ -225,32 +225,129 @@ okup').default;%0A +var praxis = require('./dist/praxis');%0Avar FeedForward = require('./dist/feed-forward').default;%0A ...
a6cef4536164a01f18045d22779775bad27d1206
Reset route stack with this.props.reset()
index.js
index.js
'use strict'; var React = require('react-native'); var NavBarContainer = require('./components/NavBarContainer'); var { StyleSheet, Navigator, StatusBarIOS, View, } = React; var Router = React.createClass({ getInitialState: function() { return { route: { name: null, index: null...
JavaScript
0
@@ -1224,32 +1224,105 @@ %7D.bind(this);%0A%0A + var goToFirstRoute = function() %7B%0A navigator.popToTop()%0A %7D;%0A%0A var customAc @@ -2526,16 +2526,49 @@ kwards%7D%0A + reset=%7BgoToFirstRoute%7D%0A
3bffa6a9cca8cd2b681b3ac5062ef6aa4e0e7fd5
remove console
index.js
index.js
var varint = require('varint') var ONE = 128, TWO = 128*128, THREE = 128*128*128, FOUR = 128*128*128*128 //I'll make this into a pull request for varint later //if this turns out to be a good idea. varint.dynamicLength = function (v) { return ( v < ONE ? 1 : v < TWO ? 2 : v < THREE ? 3 : v < FOUR ? ...
JavaScript
0.000002
@@ -1004,63 +1004,8 @@ h )%0A - console.log(b, funLen ? getLength(obj) : length)%0A @@ -1086,56 +1086,8 @@ ) %7B%0A - console.log('struct encode', k, obj%5Bk%5D)%0A @@ -3440,74 +3440,8 @@ lue%0A - console.log('EncodeBuffer', value, offset, len, value.length)%0A @@ -5122,48 +5122,8 @@...
3bfa939fe14102a1e05c55c044d51778593b9788
Add cost matrix calculation.
registration/point-set/js/main.js
registration/point-set/js/main.js
(function( window, document, undefined ) { 'use strict'; var PI2 = 2 * Math.PI; var canvas = document.querySelector( 'canvas' ), context = canvas.getContext( '2d' ); canvas.width = window.innerWidth; canvas.height = window.innerHeight; var pointsA = [], pointsB = []; function randomPoin...
JavaScript
0
@@ -518,16 +518,760 @@ %5D;%0A %7D%0A%0A + function costMatrix( n, m ) %7B%0A var height = 0.5 * n.length;%0A var width = 0.5 * m.length;%0A%0A var array = %5B%5D;%0A for ( var y = 0; y %3C height; y++ ) %7B%0A array.push( %5B%5D );%0A %7D%0A%0A var max = Number.NEGATIVE_INFINITY;%0A var mi...
77174ca4c0e6e663ed9fb1cd5ef74d3ae7ec865c
Refactor method definitions on prototype to be more DRY
index.js
index.js
"use strict"; var _ = require("lodash"); var HTTP_STATUS_CODES = require("http").STATUS_CODES; var request = require("request"); var url = require("url"); function LamernewsAPI(root) { this.root = root; return this; } LamernewsAPI.prototype.getNews = function getNews(options, callback) { var defaults = {...
JavaScript
0
@@ -248,18 +248,25 @@ type -. + = %7B%0A getNews - = +: fun @@ -296,24 +296,28 @@ callback) %7B%0A + var defa @@ -333,16 +333,20 @@ + count: 3 @@ -348,16 +348,20 @@ nt: 30,%0A + @@ -378,16 +378,20 @@ + type: %22l @@ -401,19 +401,27 @@ st%22%0A -%7D;%0A...
3baab7bafe302c6c8e612ea32961424e1bb02350
resolve merge conflicts
index.js
index.js
#!/usr/bin/env node var pkg = require('./package.json'); var log = require('yalm'); var config = require('./config.js'); var Mqtt = require('mqtt'); var mqttConnected; var tvConnected; log.setLevel(config.verbosity); log.info(pkg.name + ' ' + pkg.version + ' starting'); log.info('mqtt trying to...
JavaScript
0.000001
@@ -1977,32 +1977,1295 @@ break;%0A +%0A case 'move':%0A case 'drag':%0A // the event type is 'move' for both moves and drags.%0A sendPointerEvent('move', %7B%0A dx: payload.dx,%0A dy: payload...
fa997efcb2e788785cd84920ed2d9a76d2d99cd0
Write down API ideas
index.js
index.js
exports.waterfall = function () { // TODO: check tasks types? var tasks = [].slice.call(arguments); var index = -1; var callback; function handler(err) { if (err) return callback(err); index++; if (index >= tasks.length) return callback.apply(null, arguments); var a...
JavaScript
0.000003
@@ -1,16 +1,566 @@ +// Ideads:%0A// - support %5Barrays%5D and %7Bobjects%7D in serial() and parallel()%0A// - support %3Cflow-func%3E(tasks, callback) syntax, aka async.compatible%0A// - select return value from serial(), parallel(), auto() like%0A// serial(...).select(1) // second%0A// parallel(...).s...
1936dcbbfee2962cb651bcfcb7d54267e8ad494c
fix path slash
index.js
index.js
var _ = require('lodash'); var webpack = require('webpack'); var imports = require('imports-loader'); var browserSync = require('browser-sync'); var reload = browserSync.reload; var fs = require('fs'); var path = require("path"); var glob = require('glob'); var express = require('express') var serveStatic = require('...
JavaScript
0.000005
@@ -2457,17 +2457,16 @@ name +'/ -/ lib/asse
aae2fe36ea6907d79579387faf5c78444790fec7
use finally for closing client
index.js
index.js
var Q = require('q'); var natUpnp = require('nat-upnp'); function Client() { if (!(this instanceof Client)) return new Client(); this.client = natUpnp.createClient(); } Client.prototype.mapPort = function(pub, priv, hijack) { var client = this.client; var prep; if (hijack) prep = this.unmapPort(pub); ...
JavaScript
0
@@ -2591,12 +2591,15 @@ ise. -done +finally (fun
6d77b3a0a9e8f4fc690e62546216fd388116deb1
add batch mode: trigger.start()
index.js
index.js
var shasum = require('shasum') //if a job starts, and another is queued before the current job ends, //delay it, so that the job is only triggered once. module.exports = function (input, jobs, map, work) { if(!work) work = map, map = function (data) { return data.key } //create a subsection for the jobs, //if y...
JavaScript
0.000001
@@ -1143,18 +1143,8 @@ %0A%0A -input.pre( func @@ -1148,16 +1148,23 @@ unction +doHook (ch, add @@ -1358,17 +1358,225 @@ + 1%0A %7D -) +%0A%0A input.pre(doHook)%0A%0A //process the whole db as a batch%0A jobs.start = function () %7B%0A input.createReadStream()%0A .on('data', function (data) %7B%0A...
74a387e156ab17bbf6fd30a7c5e7dea931368a4e
Undo sending correct status code for corresponding action.
index.js
index.js
var passport = require('passport'); function login(req, res, next) { passport.authenticate('local', function(err, user) { if (err) { return next(err); } if (!user) { return res.forbidden('Authentication failure.'); } return res.ok('Authenticated.'); })(req, res, next); } module.exports = function(sa...
JavaScript
0
@@ -1179,29 +1179,54 @@ ser/login': +passport.authenticate(' login +') ,%0A%09%09%09%09'post @@ -1239,21 +1239,46 @@ login': +passport.authenticate(' login +') ,%0A%09%09%09%09'g
b9d13c225b6bafa624cd439fd653e4a35f8e570e
fix #393
index.js
index.js
var template = require('./lib/template-node'); var extension = require('./lib/extension'); var precompile = require('./lib/precompile'); template.extension = extension; template.precompile = precompile; require.extensions[template.defaults.extname] = extension; module.exports = template;
JavaScript
0
@@ -88,119 +88,39 @@ ');%0A -var precompile = require('./lib/precompile');%0A%0Atemplate.extension = extension;%0Atemplate.precompile = precompile +%0Atemplate.extension = extension ;%0Are
9a85f51e0504f2e7e736ee0fe43745b80c0d7844
fix bug
index.js
index.js
// https://github.com/webpack/html-loader/blob/master/index.js /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ /* MIT License http://www.opensource.org/licenses/mit-license.php Modified by Tao Fei */ var attrParse = require("./lib/parser"); var loader...
JavaScript
0.000001
@@ -1500,24 +1500,116 @@ ion(link) %7B%0A + //not ng-include / ng-inline%0A if(embedAttrs.indexOf(link.attrName) %3C 0)%7B%0A if(! @@ -1662,24 +1662,28 @@ + return;%0A @@ -1678,33 +1678,48 @@ return;%0A -%7D + %7D%0A %7D%0A %0A var val
9686e26a8b75afa7058ce1fb29c57887c37f49ee
Move boundary creation to factory function
maply.js
maply.js
(function(){ function initializeMap() { var scotts_house, map; // default options when first displaying the map scotts_house = { center: { lat: 39.957139, lng: -86.17521599999999 }, zoom: 15, mapTypeId: google.maps.MapTypeId.HYBRID }; // create the map map = new google.maps...
JavaScript
0
@@ -622,32 +622,112 @@ tion.lng);%0A %7D%0A%0A + function createBoundaries() %7B%0A return new google.maps.LatLngBounds();%0A %7D%0A%0A function addLo @@ -1670,68 +1670,29 @@ s = -new google.maps.LatLng +create Bound +arie s();%0A%0A - // watch for form submit%0A $(
9b854eff45c23f70594b7389158671bf711ddf51
rename createError to createErr
index.js
index.js
var Individual = require('individual') var VERSION_KEY = '1'; var ERROR_CACHE_KEY = '__RUST_RESULT_ERROR_UUID@' + VERSION_KEY var OK_CACHE_KEY = '__RUST_RESULT_OK_UUID@' + VERSION_KEY var ERROR_UUID = Individual(ERROR_CACHE_KEY, fakeUUID('Error')) var OK_UUID = Individual(OK_CACHE_KEY, fakeUUID('Ok')) function Ok(v)...
JavaScript
0.000001
@@ -727,18 +727,16 @@ reateErr -or (err) %7B%0A @@ -1063,18 +1063,16 @@ reateErr -or %0A%7D%0A%0Afunc
a8af92ffb4e5e3dba453806921ee3f6eb39b1360
add options object, make onTick an instance variable, add option to pass a stream to use for writing, make clearLine an instance method
index.js
index.js
var readline = require('readline'); var defaultSpinnerString = 0; var defaultSpinnerDelay = 60; function defaultOnTick(msg) { clearLine(); process.stdout.write(msg); }; var Spinner = function(textToShow){ if(!(this instanceof Spinner)) return new Spinner(textToShow) this.text = textToShow || ''; this.s...
JavaScript
0
@@ -121,24 +121,29 @@ ck(msg) %7B%0A +this. clearLine(); @@ -144,27 +144,35 @@ ine( -);%0A process.stdout +this.stream);%0A this.stream .wri @@ -208,26 +208,23 @@ unction( -textToShow +options )%7B%0A if( @@ -274,19 +274,133 @@ ner( -textToShow) +options)%0A%0A if(typeof options === %22string%22)%7B%0A ...
ab2f474d40d76afc2064a2d5fc563a342117e190
Move map and push.apply to a for loop
index.js
index.js
/** * Expose `pathtoRegexp`. */ module.exports = pathtoRegexp; /** * The main path matching regexp utility. * * @type {RegExp} */ var PATH_REGEXP = new RegExp([ // Match already escaped characters that would otherwise incorrectly appear // in future matches. This allows the user to escape special characters ...
JavaScript
0
@@ -2040,22 +2040,16 @@ ?!%5C?)/g) - %7C%7C %5B%5D ;%0A%0A / @@ -2087,19 +2087,22 @@ numeric -key +indexe s and pu @@ -2127,82 +2127,92 @@ -keys.push.apply(keys, groups.map(function (match, index) %7B%0A return %7B%0A +if (groups) %7B%0A for (var i = 0; i %3C groups.length; i++) %7B%0A ke...
a5dd15b746b2165423a4faab9fc978ac3b436c1c
Fix error when no process are found in non-english Windows (#19)
index.js
index.js
'use strict'; const childProcess = require('child_process'); const pify = require('pify'); const neatCsv = require('neat-csv'); const sec = require('sec'); module.exports = (options = {}) => { if (process.platform !== 'win32') { return Promise.reject(new Error('Windows only')); } const args = ['/nh', '/fo', 'csv...
JavaScript
0
@@ -989,14 +989,25 @@ %09// -%60INFO: +Not start with %60%22 %60 me @@ -1038,9 +1038,10 @@ ee # -9 +11 .%0A%09%09 @@ -1079,22 +1079,13 @@ th(' -INFO:') ? %5B%5D : +%22') ? nea @@ -1107,16 +1107,21 @@ eaders%7D) + : %5B%5D )%0A%09%09.the
061184aaaa064325af0bfbf8163aee4c5de081f9
include version in table
index.js
index.js
var gui = require( 'easy-web-app' ) var log = require( 'npmlog' ) var MongoClient = require( 'mongodb' ).MongoClient, assert = require( 'assert' ) var dateFormat = require('dateformat') var pjson = require('./package.json'); //---------------------------------------------------------------------------- // evaluate a...
JavaScript
0.000001
@@ -1078,16 +1078,43 @@ =name',%0A + 'Version=version',%0A @@ -1128,16 +1128,16 @@ check',%0A - @@ -1393,16 +1393,52 @@ res ) %7B%0A +%09 %09//log.info( 'services','start')%0A %09%09%09Mongo @@ -2167,16 +2167,87 @@ eatTime%0A +%09%09%09%09 %09%09%09%09svc%5B docs%5Bi%5D.serviceName %5D...
a7948d15dc3b71e3a997e2f399c04bfb37842390
Implement starting
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.000187
@@ -1619,24 +1619,88 @@ out, cb) %7B%0A + logger.info('deploying');%0A out.stdout('--%3E deploying');%0A%0A var slug @@ -2769,35 +2769,385 @@ starting');%0A +var cmd = 'docker run ' + containerDef.specific.execute.args + ' ' +%0A (containerDef.specific.execute.name %7C%7C containerDef.spe...
ed5050059101415d8931882fd193916c2e257657
Add `mocha` prefix to "no-empty-description" rule name in recommended config
index.js
index.js
'use strict'; module.exports = { rules: { 'handle-done-callback': require('./lib/rules/handle-done-callback'), 'max-top-level-suites': require('./lib/rules/max-top-level-suites'), 'no-async-describe': require('./lib/rules/no-async-describe'), 'no-exclusive-tests': require('./lib/rul...
JavaScript
0.000103
@@ -4376,32 +4376,38 @@ ' +mocha/ no-empty-descrip
0840e0dd58638c6c95ad5d859327ef83dc42fefb
Fix broken log messages in index
index.js
index.js
'use strict'; const Discord = require('discord.js'); const client = new Discord.Client(); const logger = require('./lib/logging'); require('dotenv').config(); // set up our event handlers const channelHandler = require('./event_handlers/channel_handler'); const messageHandler = require('./event_handlers/message_hand...
JavaScript
0.000037
@@ -610,17 +610,17 @@ 'info', -' +%60 Logged i @@ -638,13 +638,10 @@ as -%25s', +$%7B clie @@ -651,16 +651,18 @@ user.tag +%7D%60 );%0A // @@ -797,43 +797,17 @@ o', -' +%60 Using -%25s as prefix for commands', +$%7B proc @@ -828,16 +828,41 @@ D_PREFIX +%7D as prefix for commands%60 );%0A //
4e5bde3ed428ae042404bac364ce25db9003d58b
work with arrays or with strings
index.js
index.js
/*** given a stream of words, map to a datastructure that maps a given length of chars to a next letter, with frequencies. useful for generating random test data. { abc: { d: 1 '': 4 //< that means the end of the word. } } **/ var through = require('through') module.exports = function (len) { var map = {...
JavaScript
0.000001
@@ -173,15 +173,19 @@ : %7B%0A + d: 1%0A + '' @@ -224,16 +224,18 @@ e word.%0A + %7D%0A%0A%7D%0A%0A** @@ -238,16 +238,466 @@ %0A%0A**/%0A%0A%0A +function sub(seq, from, to) %7B%0A var f = Array.isArray(seq) ? seq.slice : seq.substring%0A return to == null ? f.call(seq, from) : f.call(seq, from, to)%0A...
52d2a14ef60d19ea0aac2f566be31208a056f0d1
Set the inspector layer to wikidata
index.js
index.js
'use strict'; /* global App */ var mapboxglLive = require('./mapbox-gl-live'); mapboxgl.accessToken = 'pk.eyJ1IjoicGxhbmVtYWQiLCJhIjoiY2l2dzVxbzA3MDAwNDJzbDUzMzVzbXc5dSJ9.WZ4_UtVvuVmOw4ofNMkiJw'; var map = new mapboxgl.Map({ container: 'map', style: 'mapbox://styles/mapbox/light-v9', zoom: 3, center: ...
JavaScript
0.000002
@@ -1375,38 +1375,34 @@ p, %7B - highlightProperty: 'distance' +layers: %5B'wikidata-layer'%5D %7D);
1f38c3ef33892df82dbc59f25deba74b4ef65151
Standardize cached object format (#42)
index.js
index.js
'use strict'; const mimicFn = require('mimic-fn'); const isPromise = require('p-is-promise'); const mapAgeCleaner = require('map-age-cleaner'); const cacheStore = new WeakMap(); const defaultCacheKey = (...arguments_) => { if (arguments_.length === 0) { return '__defaultKey'; } if (arguments_.length === 1) { ...
JavaScript
0
@@ -861,39 +861,8 @@ turn - maxAge ? cache.get(key).data : cac @@ -872,16 +872,21 @@ get(key) +.data ;%0A%09%09%7D%0A%0A%09 @@ -953,17 +953,8 @@ key, - maxAge ? %7B%0A%09 @@ -982,16 +982,25 @@ %09maxAge: + maxAge ? Date.no @@ -1015,24 +1015,23 @@ xAge -%0A%09%09%7D : cacheItem + : Infinity%0A%09%09%7D );%0...
f6b75f0fd82c7b24a9f61adab5a847630bcb8084
debug msg
index.js
index.js
(function() { 'use strict'; const pbr = require('picoborgrev').picoborgrev(); const app = require('express')(); // const http = require('http').Server(app); const expressWs = require('express-ws')(app); // const io = require('socket.io')(http); const serveStatic = require('serve-static'); const exec = r...
JavaScript
0.000005
@@ -964,27 +964,51 @@ g', -JSON.stringify(msg) +typeof msg, msg.token, msg.event, msg.power );%0A%0A
6bf3957f61143b73204bbb8ec36bc54227f4a3c9
fix module export
index.js
index.js
import CardMaker from './src'; export default CardMaker;
JavaScript
0
@@ -1,57 +1,34 @@ -import CardMaker from './src';%0A%0Aexport default CardMaker +module.exports = require('./src') ;
63cba0ce404941a41f64ed5986b5b99ea2f4e37f
add latin capital letter thorn
index.js
index.js
var removeAccents = function(string) { for( accented in characterMap ) { string = string.replace( new RegExp(accented, "g"), characterMap[accented] ); } return string; } var characterMap = { "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Å": "A", "Æ": "AE", "Ç": "C", "È": "E", "É": "E", "Ê": "E", ...
JavaScript
0.999999
@@ -2529,16 +2529,28 @@ %22%C7%BF%22: %22o%22 +,%0A%09%22%C3%9E%22: %22TH%22 %0A%7D%0A%0Amodu
f79758b657dccb898dc0d8b6a0f064e925919deb
fix stream ending
index.js
index.js
var path = require('path') var lsstream = require('ls-stream') , through = require('through') module.exports = dirstream function dirstream(_options) { var stream = through(write, noop) , ls = null , arr = [] , options options = _options || {} return stream function write(buf) { arr.push...
JavaScript
0.00002
@@ -181,19 +181,23 @@ write, n -oop +ext_dir )%0A , @@ -500,20 +500,73 @@ error', -noop +function(err) %7B%0A stream.emit('error', err)%0A %7D )%0A%0A f @@ -1252,19 +1252,21 @@ )%0A %7D%0A -%0A +%7D%0A%0A functi @@ -1281,26 +1281,24 @@ dir() %7B%0A - if(!arr.leng @@ -1299,16 +...
1053470e92a9dbe95314914a03736548bb8e768c
add system dependent file path resolvement
index.js
index.js
'use strict'; require( 'crash-reporter' ).start(); const app = require( 'app' ); const Menu = require( 'menu' ); const Tray = require( 'tray' ); const NativeImage = require( 'native-image' ); const powerSaveBlocker = require( 'power-save-blocker' ); let appIcon = null...
JavaScript
0
@@ -46,16 +46,60 @@ art();%0A%0A +const path = require( 'path' );%0A const ap @@ -129,24 +129,24 @@ e( 'app' );%0A - const Menu @@ -530,35 +530,43 @@ createFromPath( -%60$%7B +path.join( __dirname%7D/media @@ -554,32 +554,36 @@ n( __dirname -%7D/ +, ' media -/ +', ' icon_active. @@ -585,17 +585...
777b8e0a9341ab96835974f522278070e98f3bbe
Update real name parsing
index.js
index.js
'use strict'; var url = require('url'); var request = require('then-request'); var showingRealNames = true; var realNames = { 'AndrewHunterRedGate': 'Andrew Hunter', 'andrewdenty': 'Andrew Denty' }; function loadRealName(username, path) { if (realNames[username]) return; realNames[username] = username; req...
JavaScript
0
@@ -409,20 +409,19 @@ me = /%5C%3C -span +div class%5C= @@ -473,12 +473,11 @@ %5C%3C%5C/ -span +div %5C%3E/.
24da1f94656e89f3356ad1c604e2f15a4790d6b3
Remove extra space after main project result
index.js
index.js
var through = require('through2'); var indent = function (biggest, current) { for ( var i = 0; i < biggest - current.length; i++ ) { process.stdout.write(' '); } }; module.exports = function (compare) { return through.obj(function (file, type, done) { var results = JSON.parse(file.contents...
JavaScript
0.000001
@@ -1167,17 +1167,16 @@ e + ' ms - ');%0A%0A @@ -1203,32 +1203,75 @@ != compare ) %7B%0A + process.stdout.write(' ');%0A
2483b2b6b70ee223f261083c7fb44ca19a562650
remove extra space
index.js
index.js
const fetch = require('node-fetch'); const Atrium = function(apiKey, clientID, url) { this.url = url; this.credentials = { apiKey, clientID }; }; Atrium.prototype._fetch = function(endpoint, method, params = null) { const body = params ? JSON.stringify(params) : null; return (fetch(this.url + end...
JavaScript
0.002319
@@ -44,17 +44,16 @@ Atrium - = functi
84db18897540f06b450a894dbd38e275a1b4fd69
Add functionality to expose TextNode instead of HTMLSpanElement from TextOM Text nodes (fixes #1)
index.js
index.js
'use strict'; var visit = require('retext-visit'); /* istanbul ignore if: Running in the wrong environment */ if (typeof document !== 'object') { throw new Error('Missing document object for retext-dom'); } function oninsertinside(node) { node.parent.toDOMNode().insertBefore(node.toDOMNode(), node.pr...
JavaScript
0
@@ -825,24 +825,267 @@ DOMNode;%0A%7D%0A%0A +function toDOMTextNode() %7B%0A var self = this,%0A DOMNode = self.DOMNode;%0A%0A if (!DOMNode) %7B%0A DOMNode = document.createTextNode();%0A self.DOMNode = DOMNode;%0A DOMNode.TextOMNode = self;%0A %7D%0A%0A return DOMNode;%0A%7D%0A...
8d667cb5a20c747b1306758453a985cb3d768cb5
Fix capitalization
index.js
index.js
const server = require('./server') const port = process.env.port || 8080 const host = process.env.IP || '0.0.0.0' server.listen(port, host, () => { console.log('Server listening on http://' + host + ':' + port + '/') })
JavaScript
0.999999
@@ -54,20 +54,20 @@ ess.env. -port +PORT %7C%7C 8080
fd718481705d4696ccf0658dd760cb1da0d56d24
remove s in collection name added by mongoose
index.js
index.js
var mongoose = require('mongoose'), _ = require('lodash'), async = require('async'), fs = require('fs'), pathUtil = require('path'), Schema = mongoose.Schema; function composeMongodbConnectionString(config) { return 'mongodb://'+ (config.user ? (config.user + ':' + config.password + '@'): '') + config.host...
JavaScript
0
@@ -1609,16 +1609,55 @@ tributes +, %7Bcollection: modelName.toLowerCase()%7D ));%0A
53b44c5124461f09c2562f1937457c7341d68ab7
update api for koa 2.x
index.js
index.js
'use strict'; var heartbeat = function (options) { var path, status, body, type, headers, match; if (options != null) { path = options.path; status = options.status; body = options.body; type = options.type; headers = options.headers; } if (path == null...
JavaScript
0
@@ -725,24 +725,30 @@ return +async function * heartb @@ -743,9 +743,8 @@ tion -* hea @@ -751,16 +751,25 @@ rtbeat ( +context, next) %7B%0A @@ -786,20 +786,23 @@ (match( -this +context .path)) @@ -815,20 +815,23 @@ -this +context .status @@ -852,20 +852,23 @@ -this +context .body ...
ed49bfb5c88979cbff29412f675f5dac12b95ee6
Add test for values
index.js
index.js
var chai = require('chai'); var should = chai.should(); var expect = chai.expect; var testNumbers = [0, 1, 3, 4, 1968, 2999, 3000, 10000]; var testChars = [null, '', "I", "III", "IIII", "IV", "V", 'CDXXIX', 'CD1X', 'error', 'MCDLXXXII', 'MMMMCMXCIX', 'MMMMDMXCIX', '1493']; describe('Number', function(){ it('shou...
JavaScript
0.000003
@@ -1727,47 +1727,8 @@ %7D); -%0A%0A it('should be between 1 and 3999'); %0A i @@ -2001,24 +2001,647 @@ rror);%0A %7D); +%0A%0A it('should be between 1 and 3999', function()%0A %7B%0A var invalidNumber = function()%7Bnew RomanNumber(%22MMMMDMXCIX%22)%7D%0A expect(invalidNumber).to.throw(Error);%0A %7D);...
22144a890d96ec7ce29fd7680a5f0320738d2804
Fix error when pages or posts is set to false in config
index.js
index.js
var util = require('hexo-util'), keywords = require('keyword-extractor'); hexo.extend.generator.register('json-content', hexo_generator_json_content); function hexo_generator_json_content(site) { var cfg = hexo.config.hasOwnProperty('jsonContent') ? hexo.config.jsonContent : { meta: true }, minify = function...
JavaScript
0.000011
@@ -1585,132 +1585,33 @@ %0A%0A -var pagesPropertyNames = Object.getOwnPropertyNames(pages).filter(function (item) %7B%0A return pages%5Bitem%5D;%0A %7D);%0A var post +if (pages) %7B%0A var page sPro @@ -1651,19 +1651,19 @@ yNames(p -ost +age s).filte @@ -1686,24 +1686,26 @@ ) %7B%0A + + return p ...
7d83f3d9a6d4ac4f6b4f6fe37b7aac11c8022bb8
update feature media assignment
index.js
index.js
'use strict'; const _ = require('lodash'); const cheerio = require('cheerio'); const async = require('async'); const util = require('util'); const debuglog = util.debuglog('ans'); const bulk = require('bulk-require'); const lib_p = bulk(__dirname + '/lib', ['parsers/**/*.js', '**/*.js']); const lib_i = bulk(__dirname +...
JavaScript
0
@@ -3745,16 +3745,74 @@ thors)%7B%0A + console.log('attaching authors in transform')%0A @@ -3902,24 +3902,39 @@ -output%5B' +console.log('attaching featured _med @@ -3933,20 +3933,59 @@ ured -_ + media -'%5D = %5B + in transform')%0A _.assign(output, feat @@ -3994,17 +3994...
d7b416e87f80cb6d738fccf0ddad5329c6c5c60d
Test Method
index.js
index.js
var express = require('express'); var bodyParser = require('body-parser'); var request = require('request'); var app = express(); app.use(bodyParser.urlencoded({extended: false})); app.use(bodyParser.json()); app.listen((process.env.PORT || 3000)); // Server frontpage app.get('/', function (req, res) { ...
JavaScript
0.000002
@@ -1176,18 +1176,43 @@ d, m -essage) %7B +sg) %7B %0A%09var message = %7Btext: msg%7D; %0A
4e22f77def081c1317ac044847fe7fc6f99d8c1d
Send item data on progress
index.js
index.js
'use strict'; const path = require('path'); const electron = require('electron'); const { BrowserWindow } = electron; const unusedFilename = require('unused-filename'); const request = require("request"); const app = electron.app; let downloadFolder = app.getPath("downloads"); let lastWindowCreated; let queue = []; ...
JavaScript
0
@@ -1145,16 +1145,22 @@ progress +, item );%0A
7e50d7a68bb5cf20e931d1df1ed1bc762bf5c7c9
Set default jsFileName
index.js
index.js
'use strict'; var path = require('path'); var gutil = require('gulp-util'); var through = require('through2'); var crisper = require('crisper'); module.exports = function (opts) { opts = opts || {}; opts.jsFileName = opts.jsFileName || 'dep.js'; return through.obj(function (file, enc, cb) { if (file.isNull()) {...
JavaScript
0.000003
@@ -7,16 +7,17 @@ trict';%0A +%0A var path @@ -196,21 +196,27 @@ %7C%7C %7B%7D;%0A%09 -opts. +var current jsFileNa @@ -239,20 +239,8 @@ Name - %7C%7C 'dep.js' ;%0A%0A%09 @@ -286,16 +286,84 @@ cb) %7B%0A%0A +%09%09opts.jsFileName = currentjsFileName %7C%7C path.basename(file.path);%0A%0A %09%09if (fi @@ -1114,3...