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
1568efdf348a4a794b81846c5c283400f58a42bf
Update DefaultCrosswalkVersion to latest stable version (#3676)
usecase/usecase-cordova-android-tests/steps/DefaultCrosswalkVersion/step.js
usecase/usecase-cordova-android-tests/steps/DefaultCrosswalkVersion/step.js
var step = '<font class="fontSize">' +'<p>Purpose:</p>' +'<p>Verify the webview plugin should default to crosswalk latest stable version</p>' +'<p>Expected Result:</p>' +'<li>The crosswalk version is the same with the latest version in https://download.01.org/crosswalk/re...
JavaScript
0
@@ -377,13 +377,8 @@ rary -_beta /%3C/l
e07e500597c81fb35edbc7b2fed312cd10b3a4ed
Update reject calls to return
lib/Email.js
lib/Email.js
'use strict' const fs = require('fs') const path = require('path') const juice = require('juice') const Inky = require('inky').Inky const cheerio = require('cheerio') const nunjucks = require('nunjucks') const htmlMinify = require('html-minifier').minify const sass = require('node-sass') const htmlToText = require('ht...
JavaScript
0
@@ -2521,32 +2521,49 @@ reject(error)%0A + return%0A %7D%0A%0A @@ -4147,32 +4147,49 @@ reject(error)%0A + return%0A %7D%0A%0A @@ -5524,32 +5524,49 @@ reject(error)%0A + return%0A %7D%0A%0A
6a0ad21b7ce4fda5d4b3e59127a2567afa234321
remove old code; basic structure
lib/Event.js
lib/Event.js
const EE = require('events'); module.exports = (event_name, args, scope) => { const obs = new EE(); const cache_key = 'l:' + event_name; // get cached module let cached_event = scope.cache.get(cache_key); if (cached_event) { process.nextTick(() => { obs.emit('ready', cached_ev...
JavaScript
0.018123
@@ -65,16 +65,22 @@ s, scope +, node ) =%3E %7B%0A%0A @@ -143,24 +143,334 @@ vent_name;%0A%0A + obs.link = (sequence) =%3E %7B%0A // if sequence is ready%0A // pipe to node._i (input)%0A return obs;%0A %7D;%0A obs.onEnd = (event) =%3E %7B%0A // emit args on node end%0A ret...
8589c29901786002251bfca20f1488c10c3d88d4
Implement Graph#removeMatches
lib/Graph.js
lib/Graph.js
/** * The very fastest graph for heavy read operations, but uses three indexes * TripletGraph (fast, triple indexed) implements DataStore [NoInterfaceObject] interface Graph { readonly attribute unsigned long length; Graph add (in Triple triple); Graph remove (in Triple tri...
JavaScript
0.000001
@@ -3056,26 +3056,104 @@ ion( -triple) %7B%0A%09// TODO +s, p, o) %7B%0A%09var graph = this;%0A%09this.match(s, p, o).forEach(function(t) %7B%0A%09%09graph.remove(t);%0A%09%7D); %0A%7D%0Aa
9dca882933d25ff8bf965626cdcbaa35417a9dd9
fix align error
lib/Style.js
lib/Style.js
var React = require('react'); var ReactNative = require('react-native'); var { StyleSheet, } = ReactNative; var Style = StyleSheet.create({ radioForm: { }, radioWrap: { flexDirection: 'row', alignItems: 'center', alignSelf: 'center', marginBottom: 5, }, radio: { justifyContent: 'center...
JavaScript
0.00002
@@ -202,59 +202,8 @@ w',%0A - alignItems: 'center',%0A alignSelf: 'center',%0A
ff1e46db46ceb2cb2e76fd054a242a56f0d6e278
Add create table function
dbsdk2/index.js
dbsdk2/index.js
'user strict' const mysql = require('mysql'); const q = require('q'); const { getDbCredentials } = require('./config'); let createDatabase = (params) => { let defer = q.defer(); let connection = mysql.createConnection(getDbCredentials()); let query = mysql.form...
JavaScript
0.000012
@@ -1610,28 +1610,1912 @@ return defer.promise;%0A%7D%0A +%0A// params object structure %5BWIP%5D%0A//%0A// %7B%0A// db : %7B%0A// name : '',%0A// %7D%0A//%0A// table : %7B%0A// name : '',%0A// fields : %5B%0A// %7B%0A// name : '',%0A// ...
30df6563a9479a7dbf01688290c52ca14d483c68
Fix match wrapping.
lib/beard.js
lib/beard.js
var iterator = 0; var exps = { 'statement': (/\{\s*([^}]+?)\s*\}/g), 'operators': (/\s+(and|or|eq|neq|not)\s+/g), 'if': (/^if\s+([^]*)$/), 'elseif': (/^else\s+if\s+([^]*)$/), 'else': (/^else$/), 'for': (/^for\s+([$A-Za-z_][0-9A-Za-z_]*)(?:\s*,\s*([$A-Za-z_][0-9A-Za-z_]*))?\s+in\s+(.*)$/), 'each': (/^each\s+([$A...
JavaScript
0
@@ -1520,21 +1520,33 @@ %09return -match +'%7B' + match + '%7D' ;%0A%09%7D%0A%0A%09i
1419336ce71e522a6cb4b0cf58bc2b4917f94c8e
Fix error with more defensive programming
lib/block.js
lib/block.js
const Emoji = require('node-emoji') const emojiRegex = require('emoji-regex') const hljs = require('highlight.js') const util = require('./util') const emojiByShortcode = require('markdown-it-emoji/lib/data/full.json') const emojiByCharacter = util.reverseKeyValue(emojiByShortcode) const hashtagRegex = require('hashtag...
JavaScript
0.000004
@@ -5789,60 +5789,196 @@ =%3E -oldConfigToUrl(x).replace(regex, encodeURIComponent) +%7B%0A const result = oldConfigToUrl(x)%0A if (typeof result === 'string') %7B%0A return result.replace(regex, encodeURIComponent)%0A %7D else %7B%0A return result%0A %7D%0A %7D %0A %7D
72bfb7c8212fba584ae587274bd4cf2c6f431d7f
Update minsoo.js
minsoo/minsoo.js
minsoo/minsoo.js
var count = document.getElementById("count"); var canvas = document.getElementById("canvas"); var dc = canvas.getContext("2d"); var ms = new Array(); var on_click = function(){ obj = { x : 320, y : 240, sx : Math.random() * 10, sy : Math.random() * 10, alpha : 255 } ms.push( obj ); } setInterval( f...
JavaScript
0.000001
@@ -194,19 +194,19 @@ x : -32 +64 0, y : -2 4 +8 0,%0A @@ -231,16 +231,20 @@ m() * 10 + - 5 , sy : M @@ -351,14 +351,15 @@ 0,0, -640,48 +1280,96 0);%0A
137ee3b2b54913d4c8c7c5375fcf2356360d167a
add all available params http://docs.gurock.com/testrail-api2/reference-cases#get_cases
lib/cases.js
lib/cases.js
/* Cases http://docs.gurock.com/testrail-api2/reference-cases http://docs.gurock.com/testrail-api2/reference-cases-fields http://docs.gurock.com/testrail-api2/reference-cases-types */ //http://docs.gurock.com/testrail-api2/reference-cases#get_case TestRail.prototype.getCase = function(obj) { return this.get(...
JavaScript
0.000001
@@ -498,24 +498,25 @@ project_id;%0A +%0A if (obj. @@ -520,24 +520,30 @@ bj.suite_id) + path += %22&s @@ -547,24 +547,30 @@ %22&suite_id=%22 + + obj.suite @@ -597,16 +597,20 @@ tion_id) + path += @@ -624,16 +624,20 @@ ion_id=%22 + + obj.s @@ -643,24 +643,770 @@ section_id;%0A + ...
497b9295177ba103e6726ba88b6f12e045f69f10
Comment for ApplicationAdapter
static/todoapp/app.js
static/todoapp/app.js
window.Todos = Ember.Application.create({}); Todos.ApplicationAdapter = DS.FixtureAdapter.extend();
JavaScript
0
@@ -37,16 +37,223 @@ ate(%7B%7D); +%0A%0A// Adapters are responsible for communicating with a source of data for your application.%0A// Typically this will be a web service API, but in this case we are using an adapter designed to load fixture data %0ATodos.A @@ -299,9 +299,8 @@ xtend(); -%0A
536b9ae3c49a00f1faa91fc062f64cc880a981b7
Remove more unused code
lib/haibu.js
lib/haibu.js
/* * haibu.js: Top level include for the haibu module * * (C) 2010, Nodejitsu Inc. * */ var fs = require('fs'), events = require('events'), path = require('path'), hookio = require('hook.io'); var haibu = module.exports = new events.EventEmitter(); // // Expose version through `pkginfo`. // require(...
JavaScript
0
@@ -115,40 +115,8 @@ '),%0A - events = require('events'),%0A @@ -147,14 +147,16 @@ -hookio +flatiron = r @@ -167,15 +167,16 @@ re(' -hook.io +flatiron ');%0A @@ -213,28 +213,160 @@ new -events.EventEmitter( +flatiron.App(%7B%0A directories: %7B%0A autostart: '#ROOT/autostart',%0A config: '#...
ef675c190419fcb18c426484ba707dfddf9b866c
Add TODO related to the auto-request hook feature
lib/hooks.js
lib/hooks.js
'use strict' var http = require('http') var shimmer = require('shimmer') var asyncState = require('./async-state') module.exports = function (client) { shimmer({ logger: client.logger.error }) shimmer.massWrap(http.Server.prototype, ['on', 'addListener'], function (fn) { return function (event, listener) { ...
JavaScript
0
@@ -147,16 +147,237 @@ ient) %7B%0A + // TODO: This will actual just use the logger of the last client parsed in.%0A // In most use-cases this is a non-issue, but if someone tries to initiate%0A // multiple clients with different loggers, this will get weird%0A shimme @@ -411,16 +411,17 @@ rror %7D)%0A +%0A ...
18f6a720b613e60bc4888e5e0ee31f2cf365a577
Update the adapter
lib/index.js
lib/index.js
const EngineParser = require("engine-parser") , EntrypointManager = require("engine-entrypoint-manager") , findValue = require("find-value") , setValue = require("set-value") , deffy = require("deffy") ; class FlowApi extends EngineParser { constructor (appPath, compositionCrud) { super...
JavaScript
0.000001
@@ -277,73 +277,39 @@ r (a -ppPath, compositionCrud) %7B%0A super(appPath, compositionCrud +dapter) %7B%0A super(adapter );%0A
7ea593e20ec162b5c88caee9e9c1c0c112d0d82c
it's response_code not statuscode
lib/index.js
lib/index.js
var DD = require("node-dogstatsd").StatsD; module.exports = function (options) { var datadog = options.dogstatsd || new DD(); var stat = options.stat || "node.express.router"; var tags = options.tags || []; var response_code = options.response_code || false; return function (req, res, next) { if (!req._startTi...
JavaScript
0.999884
@@ -864,22 +864,25 @@ %0A%09%09%09if ( -status +response_ code) %7B%0A
550cd0e54037a9a521cd192af839d0f89e900dac
Break on exception too
lib/index.js
lib/index.js
'use babel'; 'use strict'; const {EventEmitter} = require ('events'); const {Client} = require ('_debugger'); const {spawn} = require ('child_process'); const watt = require ('watt'); const escapeStringRegexp = require ('escape-string-regexp'); const path = require ...
JavaScript
0
@@ -3209,32 +3209,150 @@ %7B%7D));%0A %7D);%0A%0A + this._client.on ('exception', (ex) =%3E %7B%0A this._inspect (() =%3E this._client.reqContinue (() =%3E %7B%7D));%0A %7D);%0A%0A this._client @@ -3530,16 +3530,75 @@ ug-brk)%0A + yield this._client.reqSetExceptionBreak ('all', next);%0A %7D...
bd8eac80b27e15475a586d22ee8f69e9e42f9734
Handle exception
lib/index.js
lib/index.js
var PassThrough = require('stream').PassThrough; var Transform = require('./transform'); var util = require('util'); var PAYLOAD_SIZE = 1024 * 16; function PipeStream(options) { if (!(this instanceof PipeStream)) { return new PipeStream(options); } init(this); this._pipeError = (options && options.pipeEr...
JavaScript
0.001391
@@ -4240,16 +4240,29 @@ r done;%0A + var err;%0A var @@ -4268,32 +4268,33 @@ end = function( +e ) %7B%0A done = @@ -4300,16 +4300,31 @@ = true;%0A + err = e;%0A st @@ -4382,24 +4382,67 @@ andleData);%0A + stream.removeListener('error', end);%0A stream @@ -4516,24 +4516,29 @@ ...
cba260b20c29cc8488cbb47a4b799acafa102c3e
Revert "Security Fix for Remote Code Execution - huntr.dev"
lib/index.js
lib/index.js
'use strict'; const crossSpawn = require('cross-spawn'); const detectStreamKind = require('./detect-stream-kind'); const path = require('path'); /** * Runs either npm or yarn in a child process, depending on whether current process was itself started via * `npm run` or `yarn run`. Passes all command line arguments ...
JavaScript
0
@@ -2568,51 +2568,8 @@ Path -.split(' ')%5B0%5D,execPath.split(' ').slice(1) , sp
1ad35463c04960f238cca8c9dcb4e631aab5447f
Use key, not appGlobal when attaching to data.
lib/index.js
lib/index.js
var fs = require('fs'); var path = require('path'); var minimatch = require('minimatch'); var builder = require('./builder'); var store = {}; var lookupPackageData = function(attrs) { try { var parentRootDir = path.join(__dirname, '../../..'); var loadstar = require(path.join(parentRootDir, 'package')).load...
JavaScript
0
@@ -1039,31 +1039,19 @@ .global%5B -attrs.appGlobal +key %5D = %7B%7D;%0A @@ -1787,30 +1787,19 @@ .global%5B -data.appGlobal +key %5D;%0A s @@ -4606,30 +4606,19 @@ %0A%0A api%5B -data.appGlobal +key %5D = data @@ -4625,30 +4625,19 @@ .global%5B -data.appGlobal +key %5D;%0A%0A re
ec53cc2938608b9599eaabf27f6316c3cc91d3e2
replace callbacks with EventEmitters
lib/index.js
lib/index.js
var q = require('q'), _ = require('lodash'), dnode = require('dnode'), net = require('net'), common = require('@screeps/common'), config = Object.assign(common.configManager.config, {storage: new EventEmitter()}), databaseMethods = require('./db'), pubsub = require('./pubsub'), queueMeth...
JavaScript
0.000017
@@ -94,24 +94,75 @@ ire('net'),%0A + EventEmitter = require('events').EventEmitter,%0A common =
776d1432eb54331a5d5d29860a26e97a28f8e155
Update index.js
lib/index.js
lib/index.js
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (superagent) { // don't patch if superagent was patched already if (superagent._patchedBySuperagentMocker) { return init; } superagent._patchedBySuperagentMocker = true; // Patch the end method to shallow...
JavaScript
0.000002
@@ -793,30 +793,28 @@ %09%09%09%09%7D;%0A%09%09%09%7D -else %7B +%0A%09%09%09 %0A%09%09%09%09res = %7B @@ -871,25 +871,24 @@ t%0A%09%09%09%09%7D;%0A%09%09%09 -%7D %0A%0A%09%09%09try %7B%0A%09 @@ -3162,8 +3162,9 @@ mock;%0A%7D +%0A
af2cab3fce30277aca0f9776867e5ff9a81f2d3f
fix db.name for backwards compat
lib/index.js
lib/index.js
'use strict'; var utils = require('./pouch-utils'); var version = require('./version'); var ndj = require('ndjson'); var through = require('through2').obj; var pick = require('lodash.pick'); var toBufferStream = require('./to-buffer-stream'); var DEFAULT_BATCH_SIZE = 50; // params to the replicate() API that the user...
JavaScript
0.000003
@@ -834,16 +834,137 @@ uctor;%0A%0A + // db.name replaced db._db_name in pouch 6.0.0%0A /* istanbul ignore next */%0A var dbName = self.name %7C%7C self._db_name;%0A var ou @@ -982,22 +982,19 @@ PouchDB( -self.n +dbN ame, %7B%0A
b1a675c4b56d19287a833415eab27f4b354a96fe
use forEach
lib/index.js
lib/index.js
/* * biojs-io-snparser * https://github.com/jameshiew/biojs-io-snparser * * Copyright (c) 2015 James Hiew * Licensed under the MIT license. */ 'use strict' const csv = require('csv') /** @type {Map<string, object>} */ const dialects = new Map() dialects.set('23andMe-2015-07-22', { auto_parse: true, columns...
JavaScript
0.000002
@@ -1517,18 +1517,20 @@ ously%0A -le +cons t snps = @@ -1603,22 +1603,23 @@ (error, -output +rawSnps ) %7B%0A @@ -1716,33 +1716,59 @@ -for (le +rawSnps.forEach(function convertToSNPObjec t +( rawSnp - of output ) %7B%0A @@ -2105,24 +2105,25 @@ %7D))%0A %7D +) %0A %7D%0A %7D)%0A
739fa1573e59dee5c862ecf1f5e0dd71342ddfcc
Use the botstrap logger instead of console for logging
lib/index.js
lib/index.js
var math = require('mathjs'); var ERROR_RESPONSE = 'I can\'t calculate that!'; module.exports = function(argv, response) { var respBody = ERROR_RESPONSE; try { var expression = argv.slice(1).join(''); var result = math.eval(expression); if (typeof result === 'function') { console.error('Someh...
JavaScript
0
@@ -115,16 +115,24 @@ response +, logger ) %7B%0A va @@ -297,31 +297,30 @@ n') %7B%0A -console +logger .error('Some @@ -454,15 +454,14 @@ -console +logger .err
2f6faf4a1411d24397eae9592611123c2036968e
using comparator
lib/index.js
lib/index.js
export default heapsort; const {floor} = Math; function heapsort(array, comparator=ascendantComparator) { const count = array.length; heapify(array); let end = count - 1; while (end > 0) { swapElems(array, end, 0); end = end - 1; siftDown(array, 0, end); } return array; } function ascendantComparator...
JavaScript
0.998776
@@ -145,16 +145,28 @@ fy(array +, comparator );%0A%0A%09let @@ -272,16 +272,28 @@ , 0, end +, comparator );%0A%09%7D%0A%0A%09 @@ -360,11 +360,32 @@ n a -- b +%3E b ? 1 : a %3C b ? -1 : 0 ;%0A%7D%0A @@ -407,16 +407,28 @@ fy(array +, comparator ) %7B%0A%09con @@ -546,16 +546,28 @@ ount - 1 +, comparator );%0A%...
63466ff2adfff5ad2fc984e28701dc5baea4d981
Update index.js
lib/index.js
lib/index.js
'use strict'; // Load modules const Stream = require('stream'); const Boom = require('boom'); const Cryptiles = require('cryptiles'); const Hoek = require('hoek'); const Joi = require('joi'); // Declare internals const internals = {}; internals.schema = Joi.object().keys({ key: Joi.string().optional(), s...
JavaScript
0.000002
@@ -1257,25 +1257,25 @@ skip: false - +,
47b5698218b37b246f0c97f173abeb0062525d4f
Return this from customize for chaining.
lib/index.js
lib/index.js
/** * Copyright (c) Microsoft. All rights reserved. * * 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 required by applicable law or ag...
JavaScript
0
@@ -1589,30 +1589,28 @@ wCustomizer( -config +this );%0A if (! @@ -1955,32 +1955,50 @@ omizer);%0A %7D); +%0A%0A return this; %0A %7D;%0A%0A config.
d8d55f3ef69007c500dec5f654b39b571209ad4e
Remove remaining cast methods & properties
lib/index.js
lib/index.js
import { Platform, AppRegistry, DeviceEventEmitter, NativeEventEmitter, NativeModules } from 'react-native'; import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource'; const { TrackPlayerModule: TrackPlayer } = NativeModules; function resolveAsset(uri) { if(!uri) return undefined; retur...
JavaScript
0
@@ -4838,296 +4838,8 @@ E;%0A%0A -// Cast States%0Amodule.exports.CAST_NO_DEVICES_AVAILABLE = TrackPlayer.CAST_NO_DEVICES_AVAILABLE;%0Amodule.exports.CAST_NOT_CONNECTED = TrackPlayer.CAST_NOT_CONNECTED;%0Amodule.exports.CAST_CONNECTING = TrackPlayer.CAST_CONNECTING;%0Amodule.exports.CAST_CONNECTED = TrackPlayer.CAST_C...
b5aa3e5cf13f12eebfeeb95140d8f07f58de5cfa
Fix domain
lib/index.js
lib/index.js
'use strict'; var request = require('request'); var fs = require('fs'); var path = require('path'); var urls = require('./urls'); function kintone(domain, authorization) { var fullDomain = domain + '.cybozu.com'; function requestBase(link, data, callback) { var method = link.pop(); link.unshift(fullDoma...
JavaScript
0.000017
@@ -173,24 +173,48 @@ %7B%0A -var fullDomain = +if (!domain.match('cybozu%5C%5C.com')) %7B%0A dom @@ -218,16 +218,17 @@ domain + += '.cyboz @@ -234,16 +234,20 @@ zu.com'; +%0A %7D %0A%0A func @@ -334,21 +334,17 @@ unshift( -fullD +d omain, ' @@ -1371,13 +1371,9 @@ ' + -fullD +d omai
3cc2aa6efee9ed7818a78dcbb35eee5304c6b780
change this to print out all tags
lib/index.js
lib/index.js
// Load modules var Util = require('util'); var GoodReporter = require('good-reporter'); var Hoek = require('hoek'); var Moment = require('moment'); var SafeStringify = require('json-stringify-safe'); // Declare internals var internals = {}; module.exports = internals.GoodConsole = function (events, options) { ...
JavaScript
0.000022
@@ -1024,11 +1024,19 @@ tags -%5B0%5D +.toString() + '
0a712a9dc7b61e56eee6e1c25fc28b62c88c041b
Replace \r\n with \n
lib/index.js
lib/index.js
var Mehdown; if (typeof exports === 'object' && typeof require === 'function') { Mehdown = exports; } else { Mehdown = {}; } Mehdown.usernameRegExp = /(^|[^@\w])@(\w{1,15})\b/g; Mehdown.parse = function(text) { // Replace single newlines with <br /> tags: http://stackoverflow.com/questions/18011260/regex...
JavaScript
0.999999
@@ -370,16 +370,56 @@ ew-line%0A + text = text.replace(/%5Cr%5Cn/g, '%5Cn');%0A text @@ -445,23 +445,17 @@ %7C%5B%5E%5C -r%5C n%5D)%5C -r%5C n(?!%5C -r%5C n)/g
39ea95037158ed7a7670ac469c494adef6c0f3d7
Bump pngcrush version to 1.7.83
lib/index.js
lib/index.js
'use strict'; var BinWrapper = require('bin-wrapper'); var path = require('path'); var pkg = require('../package.json'); /** * Variables */ var BIN_VERSION = '1.7.82'; var BASE_URL = 'https://raw.githubusercontent.com/imagemin/pngcrush-bin/v' + pkg.version + '/vendor/'; /** * Initialize a new BinWrapper */ var...
JavaScript
0
@@ -162,17 +162,17 @@ = '1.7.8 -2 +3 ';%0Avar B
89b82b20fd07375598f8912cbdd642ab10840626
Fix for karma@0.13.x
lib/index.js
lib/index.js
'use strict'; var Q = require('q'); var sort = require('./sort.js'); var path = require('path'); var angularFilesort = function(emitter, logger, basePath, config) { config = typeof config === 'object' ? config : {}; var log = logger.create('karma-angular-filesort'); // Normalize whitelist paths against basePath ...
JavaScript
0
@@ -675,23 +675,21 @@ (event, -promise +files ) %7B%0A%09%09if @@ -728,114 +728,8 @@ ) %7B%0A -%09%09%09originalEmit.call(emitter, event, Q.Promise(function (resolve) %7B%0A%09%09%09%09promise.then(function (files) %7B%0A%09%09 %09%09%09/ @@ -810,18 +810,16 @@ ment%0A%09%09%09 -%09%09 files.in @@ -869,38 +869,57...
1ab465724cf65ca2668fe984b9bbbc743552e5a6
Improved date.since() output
lib/index.js
lib/index.js
/* Helper functions */ (function(helpers, global) { "use strict"; var is = (typeof require !== 'undefined') ? require('nor-is') : global && global.nor_is; if(!is) { throw new TypeError("nor-date requires nor-is"); } /* Get current time */ helpers.now = function() { return new Date(); }; /** Get time since `time` a...
JavaScript
0.999999
@@ -1377,21 +1377,19 @@ ll%C3%A4: - ', ' -Mennyt: +Loppui: '%5D;%0A @@ -1474,16 +1474,84 @@ w%22); %7D%0A%0A +%09var bid_active = (now.getTime() %3C time.getTime()) ? true : false;%0A%0A %09var sec @@ -1758,16 +1758,17 @@ s = %5B%5D;%0A +%0A %09items.p @@ -1777,38 +1777,18 @@ h( ( -now.getTime() %3C time.getT...
aeecf1cd2c11de8dcdb9ecd64137a2ef2933052f
Use child_process.exec instead of spawn to execute jobs
lib/index.js
lib/index.js
var readline = require("readline"); var fs = require("fs"); var childProcess = require("child_process"); var CronJob = require("cron").CronJob; var parseCrontabRe = new RegExp(/^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$/); function parseCrontab(line){ var matched = parseCrontabRe.exec(line); i...
JavaScript
0
@@ -1054,31 +1054,13 @@ ess. -spawn(parsed.command, %7B +exec( %0A @@ -1080,19 +1080,22 @@ -shell: true +parsed.command ,%0A @@ -1116,283 +1116,145 @@ -stdio: %5B%22ignore%22, %22pipe%22, %22pipe%22%5D%0A %7D);%0A%0A proc.stdout.on('data', function(data)%7B%0A ...
ea500cd547bc1ab34736a3ae7e22f67e2e5084e2
Update code comment
lib/index.js
lib/index.js
'use strict'; // MODULES // var pinf = require( 'const-pinf-float64' ); var ninf = require( 'const-ninf-float64' ); var abs = require( 'math-abs' ); var floor = require( 'math-floor' ); var rpad = require( 'utils-right-pad-string' ); var lpad = require( 'utils-left-pad-string' ); var repeat = require( 'utils-repeat-s...
JavaScript
0
@@ -918,17 +918,16 @@ case: +- - infinity
62efbd8c99719f5a4d715b3990a82c8ee54407c6
check if server is defined
lib/index.js
lib/index.js
var _ = require('lodash'), semver = require('semver'); exports.create = function (Arrow) { var min = '1.7.0'; if (semver.lt(Arrow.Version || '0.0.1', min)) { throw new Error('This connector requires at least version ' + min + ' of Arrow; please run `appc use latest`.'); } var Connector = A...
JavaScript
0.000002
@@ -79,17 +79,16 @@ function - (Arrow) @@ -579,16 +579,38 @@ */%0A + if (server) %7B%0A serv @@ -639,14 +639,17 @@ tion - () %7B%0A + @@ -689,19 +689,29 @@ ');%0A + -%7D); + %7D);%0A %7D %0A%0A re
e1afde2721be170f0bfd6d5dc934ed567a91fd28
fix logging of error objects as meta-data
lib/index.js
lib/index.js
var util = require('util') var winston = require('winston') var Transport = winston.Transport var common = require('winston/lib/winston/common') var _dirname = require('path').dirname var LogseneJS = require('logsene-js') var flat = require('flat') var Logsene = function (options) { Transport.call(this, options) op...
JavaScript
0.000036
@@ -335,16 +335,59 @@ s %7C%7C %7B%7D%0A + this.logsene_debug=options.logsene_debug%0A this.h @@ -2045,16 +2045,38 @@ back) %7B%0A + var metaData = meta%0A if (th @@ -2084,24 +2084,24 @@ s.silent) %7B%0A - return c @@ -2272,16 +2272,8 @@ if ( -!msg && meta @@ -2301,46 +2301,127 @@ -msg = meta.m...
7a5d54bd9039a7e94f608185ac4d53a9205b5e63
Fix service uuids
lib/nuimo.js
lib/nuimo.js
var noble = require('noble'); function Nuimo() { // Private members var handlers = undefined; var ledMatrix = undefined; // Public members this.createDataForLedMatrix = createDataForLedMatrix; this.init = init; this.writeToLEDs = writeToLEDs; this.SERVICES = { LED...
JavaScript
0.000007
@@ -2358,33 +2358,33 @@ anning(%5B'180 -F +f ', '180 -A +a '%5D, false);%0A @@ -4258,17 +4258,17 @@ '180 -F +f ', '180 -A +a '%5D,
6cc119d6ef52e7f2d109f9d7e7f5ccabccb3afa6
Create new file on enter and no selection
lib/panel.js
lib/panel.js
'use babel' import R from 'ramda' import Bacon from 'baconjs' import React from 'react-for-atom' import Path from 'path' import * as atoms from './atom-streams' import DisposableValues from './disposable-values' import PanelComponent from './react/panel' // Wrap the panel component, bridges between Atom context and t...
JavaScript
0
@@ -2020,18 +2020,16 @@ n%0A - .fromEve @@ -2076,18 +2076,16 @@ click')%0A - .f @@ -2155,18 +2155,16 @@ ditor))%0A - .m @@ -3828,107 +3828,167 @@ item -%0A reactPanel.selectedItemProp%0A .sampledBy(openFileStream)%0A .filter(R.is(Object)) + if any, or create a new file%...
ffe288fb1d63d0440415380d7dd3391234dc999d
Check in node.js environment before exporting
lib/poker.js
lib/poker.js
var POKER = { rankToString: ['', '', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A'], suitToString: ['h', 'd', 'c', 's'], rankToInt: {'2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'T': 10, 'J': 11, 'Q': 12, 'K': 13, 'A': 14}, suitToInt: {'h': 0, 'd': 1,...
JavaScript
0
@@ -4367,16 +4367,114 @@ s) %7B%7D;%0A%0A +// if in Node.js environment export the POKER namespace%0Aif (typeof exports !== 'undefined') %7B%0A exports. @@ -4488,8 +4488,10 @@ POKER;%0A +%7D%0A
c4812b1d7f7164a5c23c1c723d564cfdac584680
Use path.resolve instead of string join
lib/praat.js
lib/praat.js
var info = require('./info'); var path = require('path'); var myPackageJson = require('../package.json'); var version = myPackageJson.praatVersion; module.exports = [__dirname, '..', 'node_modules', '.bin', info.praatRealExecName(info.getOsInfo(), version)].join(path.sep);
JavaScript
0.000099
@@ -162,9 +162,21 @@ s = -%5B +path.resolve( __di @@ -265,22 +265,7 @@ ion) -%5D.join(path.sep );%0A
d8885e00d0bbebbc5d7f165e47f441a86e3569a0
Include method in proxy logging
lib/proxy.js
lib/proxy.js
var _ = require('underscore'), config = require('./config'), cookieMonster = require('./cookieMonster').cookieMonster, cors = require('./cors'), http = require('http'), https = require('https'), url = require("url"); var fs = require('fs'); var servicePattern = /service=([^&]+)/; var methodPatt...
JavaScript
0
@@ -1657,17 +1657,17 @@ le.info( -%22 +' start pr @@ -1674,17 +1674,17 @@ oxy url: -%22 +' , req.ur @@ -1690,15 +1690,38 @@ rl, -%22 +'method:', req.method, ' host: -%22 +' , op @@ -1732,23 +1732,23 @@ s.host, -%22 +' time: -%22 +' , startT
b98e1aca9a4674999ffc1a36bac14ee4b0fe99bf
Update razor.js
lib/razor.js
lib/razor.js
/*! * Razor * Copyright(c) 2012 David Murdoch <david@davidmurdoch.com> * MIT Licensed */ /** * Module dependencies. */ var Utils = require( "./utils" ), Proxy = require("node-proxy"), Parser = require( "./parser" ), Html = require( "./html" ), _ = require( "lodash" ), fs = require( "fs" ), nil = require( ...
JavaScript
0.000001
@@ -295,19 +295,21 @@ ( %22fs%22 ) -, +; %0A%09 +// nil = re @@ -1806,27 +1806,8 @@ ull) - && val !== nil.nil ) %7B @@ -1822,13 +1822,10 @@ = n -il.ni +ul l;%0A%09 @@ -5584,8 +5584,9 @@ derFile; +%0A
be52e5ba78e704b56d0f5d4c27ca0c768d5e4fe0
Call onSend in case of errors
lib/reply.js
lib/reply.js
/* eslint-disable no-useless-return */ 'use strict' const pump = require('pump') const validation = require('./validation') const serialize = validation.serialize const statusCodes = require('http').STATUS_CODES const stringify = JSON.stringify const flatstr = require('flatstr') const fastseries = require('fastseries...
JavaScript
0
@@ -4102,219 +4102,8 @@ %0A%7D%0A%0A -function wrapReplyEnd (reply, payload) %7B%0A if (!reply.res.getHeader('Content-Length')) %7B%0A reply.res.setHeader('Content-Length', Buffer.byteLength(payload))%0A %7D%0A reply.sent = true%0A reply.res.end(payload)%0A%7D%0A%0A func @@ -4136,24 +4136,24 @@ payload) %7B%...
135fbc903fa6cfce1062ad5b6337c24d556f075f
update properties, add history
models/device.js
models/device.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ObjectId = Schema.Types.ObjectId; var checklist = require('./checklist').deviceChecklistSchema; var device = new Schema({ serialNo: { type: String, index: true, unique: true }, name: String, type: String, department: String, ...
JavaScript
0
@@ -96,16 +96,66 @@ bjectId; +%0Avar addHistory = require('./history').addHistory; %0A%0Avar ch @@ -581,43 +581,201 @@ ce: -ObjectId,%0A installToSlot: ObjectId +%7B%0A serialNo: %7Btype: String, default: null%7D,%0A id: %7Btype: String, default: null%7D,%0A %7D,%0A installToSlot: %7B%0A name: %7Btype: ...
ffa0c2b5bc9b2971cac1552be0e0af17d8c79231
add missing callback so will work with node-resque 3.0
lib/rider.js
lib/rider.js
var util = require("util"); var worker = require("node-resque").worker; var utils = require(__dirname + '/sections/utils.js'); var bus = require(__dirname + '/bus.js').bus; var rider = function(options, jobs){ worker.call(this, options, jobs); var busClassKey = this.busDefaults().busClassKey; this....
JavaScript
0
@@ -760,16 +760,29 @@ connect( +function()%7B %7D );%0A var
d037921547985288fc111e9be6fe6c6d4c84fb77
Replace path.sep with "/"
lib/route.js
lib/route.js
var EventEmitter = require('events').EventEmitter, path = require('path'), _ = require('underscore'), store = {}, Route = new EventEmitter(); var format = Route.format = function(str){ str = str.replace(/\\/g, '/'); if (str.substr(0, 1) === '/') str = str.substring(1); var last = str.substr(str.length ...
JavaScript
0.999999
@@ -141,16 +141,66 @@ mitter() +,%0A sep = path.sep,%0A sepre = new RegExp(sep, 'g') ;%0A%0Avar f @@ -261,13 +261,11 @@ ace( -/%5C%5C/g +sep , '/
c5dc94db90e9135e7b70096e6f93dd2bbae9b171
refactor unit tests
browser_client/__test__/components/greeting_controls-test.js
browser_client/__test__/components/greeting_controls-test.js
import React from 'react'; import { renderIntoDocument, scryRenderedDOMComponentsWithTag, Simulate, } from 'react-addons-test-utils'; import GreetingControls from '../../components/greeting_controls'; function setup (requestsPending = false) { const props = { requestsPending, fetchAndA...
JavaScript
0.001162
@@ -61,82 +61,85 @@ -scryRenderedDOMComponentsWithTag,%0A Simulate,%0A%7D from 'react-addons-test- +Simulate,%0A%7D from 'react-addons-test-utils';%0Aimport %7B createFinder %7D from '../ util @@ -496,126 +496,27 @@ nst -divs +find = -s cr -yRenderedDOMComponentsWithTag(greetingControls, 'div');%0A c...
7c4986ad0231fbd2cc1b3f367c8cf385440ef017
Update flairs for Elite
modules/flair.js
modules/flair.js
module.exports = { ark: { list: [ 'arkstone', 'dodo-blue', 'dodo-cyan', 'dodo-default', 'dodo-lime', 'dodo-red', 'dodo-yellow', 'mushroom', 'woodsign', ], type: 'author_flair_css_class...
JavaScript
0
@@ -4392,24 +4392,49 @@ img viper',%0A + 'cmdr star',%0A
a84e6cafd20ffe74cf271dc336b54b04e8c5a0d8
Change description of 'notify' function
lib/snarl.js
lib/snarl.js
'use strict'; var request = require('request') , extend = require('node.extend') , clean ; /** * Constructor. * @author Tomás Hernández <tomas.hernandez03@gmail.com> * @since 2015-02-21 * @param {Object} options You can see the options to set in "defaultOptions" */ function Snarl(options){ var self = t...
JavaScript
0.001224
@@ -2158,15 +2158,48 @@ to -send an +create a notification and send it over a htt @@ -2220,34 +2220,21 @@ narl +%0A * server - and create a snarl +. %0A
09c8207064bc81bd960df897fc23183085647364
Fix #5
lib/stats.js
lib/stats.js
var os = require('os') , fs = require('fs') , p = require('path') , exec = require('child_process').exec , helpers = require('./helpers') var stats = { history: {}, cpu: null, //used to store cpu informations proc: function(pid, options, done) { var self = this if(this.cpu !== null) { ...
JavaScript
0.000001
@@ -422,26 +422,185 @@ l)%0A %7D -%0A%0A + else if(uptime === undefined) %7B%0A console.error(%22We couldn't find uptime from /proc/uptime%22)%0A self.cpu.uptime = os.uptime()%0A %7D else %7B%0A self @@ -634,32 +634,50 @@ ' ')%5B0%5D%0A +%7D%0A%0A return sel...
e452f62a12f97741cfd1b379c63b8d65ce215bcb
remove series and parallel
lib/stuff.js
lib/stuff.js
'use strict'; var ConfigurableRecipeRegistry = require('./recipe/registry'); var cwd = process.cwd(); module.exports = function (options) { return { flows: ConfigurableRecipeRegistry.builder('flow') .dir(cwd, 'gulp/flows') .npm(options) .require('gulp-ccr-parallel') .require('gulp-ccr-series') .req...
JavaScript
0.000001
@@ -246,72 +246,8 @@ ns)%0A -%09%09%09.require('gulp-ccr-parallel')%0A%09%09%09.require('gulp-ccr-series')%0A %09%09%09.
a67bbe622f61bacdb45ba233c8ad67e6f7ce2a9b
Fix a typo
modules/silly.js
modules/silly.js
var figlet = require('figlet'); var quote = function(quotes, log) { if(!(quotes instanceof Array)) { quotes = [quotes]; } return function(data, nick) { if(log) { this.log(log.split("$nick").join(nick)); } this.talk(quotes[(Math.random() * quotes.length) | 0].replace("$nick", nick)); }; };...
JavaScript
1
@@ -3302,24 +3302,25 @@ eafs%22)%0A %7D +, %0A %22lahey%22
e6aefa4b0730da77ab0d997a07eda700631a7f31
fix tests
test/unit/function-overloading.js
test/unit/function-overloading.js
'use strict'; var JSIGSnippet = require('../lib/jsig-snippet.js'); JSIGSnippet.test('function overloading works', { snippet: function m() {/* foo('').split(''); foo(2).split(''); foo(2) + 4; foo('') + 4; foo({}) + 4; function foo(x) { return x; ...
JavaScript
0.010887
@@ -826,17 +826,317 @@ ual, - 'Number' +%0A '%7B%5Cn' +%0A ' toFixed: (this: Number, digits?: Number) =%3E String,%5Cn' +%0A ' toExponential: (this: Number, digits?: Number) =%3E String,%5Cn' +%0A ' toPrecision: (this: Number, precision?: Number) =%3E String,%5Cn' +%0A ' ...
d05eda15b38a7630d32192cd7b28f3ec671f5283
remove semicolon to match v0.12 error
test/utils/test_files_getMtime.js
test/utils/test_files_getMtime.js
const files = require('../../lib/utils/files'); const path = require('path'); const fs = require("fs"); describe("files.getMtime",function(){ it("throw an error on file not found",function(){ return expect(files.getMtime( "file:///my/imaginary/path")).to.eventually.be.rejectedWith(/Error: ENOENT:/) }); });
JavaScript
0.005715
@@ -296,17 +296,16 @@ : ENOENT -: /)%0A %7D);
8f8df704678d311141793c097c08bfbee8149a53
Fix timer callback issue
lib/timer.js
lib/timer.js
"use strict"; var dataflow = require("dataflow"); module.exports = dataflow.define({ activate: function () { this.intervalObject = setInterval( this.send("tick", true), this.props.delay); }, deactivate: function () { clearInterval(this.intervalObject); }, outputs: ["tick"], props: { delay: 1000 } });
JavaScript
0.000001
@@ -141,17 +141,34 @@ nterval( - +(function () %7B%0A%09%09%09 this.sen @@ -182,16 +182,33 @@ %22, true) +;%0A%09%09%7D).bind(this) , this.p
9686e5c935b096925762745c28b79d1ec9c2d23c
Fix typo
lib/track.js
lib/track.js
var _ = require('lodash'); var PassThrough = require('stream').PassThrough; var ffmpeg = require('fluent-ffmpeg'); exports = module.exports = Track; function Track(track, _wimp){ this._wimp = _wimp; _.merge(this, track); this.soundQuality = 'HIGH'; } Track.prototype.play = function(){ var wimp = this._wimp; var st...
JavaScript
0.999999
@@ -855,16 +855,17 @@ am = com +m and.pipe
0d2a235fd4bd7e82bd6e421eece1af6c8cd2bf0f
make execute and executeSync handle options
lib/utils.js
lib/utils.js
/* * Copyright 2014, Gregg Tavares. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of condi...
JavaScript
0
@@ -1723,32 +1723,41 @@ ction(cmd, args, + options, callback) %7B%0A v @@ -1745,32 +1745,111 @@ ns, callback) %7B%0A + if (callback === undefined) %7B%0A callback = options;%0A options = %7B%7D;%0A %7D%0A var spawn = re @@ -1901,34 +1901,39 @@ pawn(cmd, args, -%7B%7D +options );%0A var stdout @@ -...
b8b195875ad3ebd62ce82c17a7983efd6ee767bb
Set default log level to environment variable, or warn
lib/utils.js
lib/utils.js
var winston = require('winston'), path = require('path'), Q = require('q'); var logLevel = 'warn'; var sharedLogger = function(filename) { return new winston.Logger({ level: logLevel, transports: [ new winston.transports.Console({ prettyPrint: true, timestamp: true, ...
JavaScript
0
@@ -101,16 +101,41 @@ gLevel = + process.env.LOG_LEVEL %7C%7C 'warn';
2d8ed4d1f15c0410967d113ad628e4aa5705c9a9
Add isFunction to utils
lib/utils.js
lib/utils.js
'use strict'; const path = require('path'); /** * Naive filename sanitize function. * * @link https://github.com/parshap/node-sanitize-filename * @param {String} [name=''] Name to be clean up * @return {String} Sanitized name */ function sanitizeName(name='') { function toCamelCase(str) { ...
JavaScript
0.000008
@@ -1484,24 +1484,130 @@ rn main;%0A%7D%0A%0A +function isFunction(fn)%7B%0A return typeof fn === 'function';%0A%7D%0A%0Amodule.exports.isFunction = isFunction;%0A%0A /**%0A * Get n
b1235d3b10d8600b9ca446d8bbe6d63643de5ff2
Fix bug in Utils.format that ignore falsy values.
lib/utils.js
lib/utils.js
var mysql = require("mysql") , connection = mysql.createConnection({}) , util = require("util") , DataTypes = require("./data-types") var Utils = module.exports = { _: (function() { var _ = require("underscore") , _s = require('underscore.string') _.mixin(_s.exports()) _.mixin({...
JavaScript
0.999997
@@ -1161,138 +1161,8 @@ ) %7B%0A - var query = arr%5B0%5D%0A , replacements = Utils._.compact(arr.map(function(obj) %7B return obj != query ? obj : null%7D))%0A%0A @@ -1209,27 +1209,24 @@ n, %5B -query, replacements +arr.shift(), arr %5D)%0A
d58b9da1512c457661f898bfa8fbc5c092924d5e
Fix duplicate variable declaration #38 (#39)
lib/utils.js
lib/utils.js
module.exports = (() => { const _ = require('lodash'); const os = require('os'); const fs = require('fs'); const os = require('os'); const path = require('path'); const execSync = require('child_process').execSync; const spawn = require('child_process').spawn; const promptly = require('promptly'); co...
JavaScript
0.000001
@@ -110,36 +110,8 @@ ');%0A - const os = require('os');%0A co
a4956b50a3a383aa3841ad1886a23f08b23571c0
Convert dates inside formatNodes function
lib/utils.js
lib/utils.js
var request = require( 'request' ); var async = require( 'async' ); var _ = require( 'underscore' ); var moment = require( 'moment' ); var parseString = require('xml2js').parseString; var utils = module.exports; utils.formatDateTimeItem = function ( item ) { var reDateTime = new RegExp("[0-9]{8} [0-9]{2}:[0-9]...
JavaScript
0.000254
@@ -213,455 +213,8 @@ ;%0A%0A%0A -utils.formatDateTimeItem = function ( item ) %7B%0A%0A var reDateTime = new RegExp(%22%5B0-9%5D%7B8%7D %5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7D$%22);%0A var reDateTimeSeconds = new RegExp(%22%5B0-9%5D%7B8%7D %5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7D:%5B0-9%5D%7B2%7D$%22);%0A%0A if ( reDateT...
a47d6f43d397f6ac52fabb3881056af9e8c0a86a
Fix HTTP status code error messages
lib/utils.js
lib/utils.js
var STATUS_CODES = require('http'); exports.error = function (statusCode, message) { var err; if (message instanceof Error) { err = message; } else { err = new Error(message || STATUS_CODES[statusCode]); } err.status = statusCode; return err; }; exports.extend = function exte...
JavaScript
0.006499
@@ -27,16 +27,29 @@ ('http') +.STATUS_CODES ;%0A%0Aexpor
d0e30249ae5c0b47fad251565640f23fe3cdc26d
add header comment; replace "try-catch" statement with "path.exists()"
lib/watch.js
lib/watch.js
var fs = require('fs') , path = require('path'); /** * Utility functions to synchronously test whether the giving path * is a file or a directory. */ var is = (function(ret) { ['File', 'Directory'].forEach(function(method) { var memo = {} , fileObj; ret[method] = function(fpath) { if (m...
JavaScript
0
@@ -1,12 +1,45 @@ +/**%0A * Module dependencies.%0A */%0A var fs = r @@ -420,106 +420,102 @@ -try %7B%0A fileObj = fs.statSync(fpath);%0A %7D catch(e) %7B%0A return memo%5Bfpath%5D = false; +if (path.existsSync(fpath)) %7B%0A return memo%5Bfpath%5D = fs.statSync(fpath)%5B'is'+method%...
d8140e122f83b78cf93f6bb3d4e921bd8088b40b
make sure date parsing handles microseconds&&offset, microseconds||offset
ckanext/project/public/shared/src/services/utilityService.js
ckanext/project/public/shared/src/services/utilityService.js
var app = angular.module("app") .service("utilityService",function($mdToast) { var service = {}; /** * This function formats a timestamp and returns it into a simple date dd/mm/yyyy * @returns {*} */ service.formatDate = function(dateString){ if(!(da...
JavaScript
0.000094
@@ -332,16 +332,206 @@ return;%0A + /**%0A * some dates return with microseconds and an offset%0A * while other dates return with one or the other%0A * handle all cases%0A */ %0A @@ -578,16 +578,19 @@ in(%22/%22)%0A + @@ -629,23 +629,21 @...
89157468287be1b0a59d537c4498bf345d4ccdcc
remove cyclic dependency
client/js/modules/entries/containers/EntryDetailContainer.js
client/js/modules/entries/containers/EntryDetailContainer.js
import React, { Component, PropTypes } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { routerActions as RouterActions } from 'react-router-redux'; import LayoutHeader from '../../../layouts/LayoutHeader'; import LayoutContent from '../../../layouts/LayoutConten...
JavaScript
0.000418
@@ -733,20 +733,35 @@ %0Aimport -user +* as entriesActions from '. @@ -766,32 +766,30 @@ '../ -../user +actions ';%0A +%0A import -entries +user fro @@ -797,23 +797,20 @@ '../../ -entries +user ';%0Aimpor @@ -7249,18 +7249,17 @@ (entries -.a +A ctions,
26bc33be05e3c4ec5403f8074bace5aa447dacf4
Enable touch events on old React versions
demo/js/demo.js
demo/js/demo.js
'use strict'; var require = typeof require === 'undefined' ? function() {} : require; var React = window.React || require('react'); var ReactDom = window.ReactDOM || require('react-dom') || React; var ElementPan = React.createFactory(window.reactElementPan || require('react-element-pan')); // Simple image demo React...
JavaScript
0
@@ -283,24 +283,101 @@ nt-pan'));%0A%0A +if (React.initializeTouchEvents) %7B%0A React.initializeTouchEvents(true);%0A%7D%0A%0A // Simple im
74f933b7f79ea797c07564931b0ed81be28fae84
update dammy environment
tests/dummy/config/environment.js
tests/dummy/config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
JavaScript
0
@@ -1078,16 +1078,74 @@ table';%0A + ENV%5B'ember-cli-mirage'%5D = %7B%0A enabled: true%0A %7D%0A %7D%0A%0A r
3eddf1e1e21601c23d4922f5524af0cf2a023f53
Allow the editor component to be copied itself
public/visifile_drivers/ui_components/formEditorComponent.js
public/visifile_drivers/ui_components/formEditorComponent.js
function component( args ) { /* base_component_id("form_editor_component") load_once_from_file(true) */ //alert(JSON.stringify(args,null,2)) var uid2 = uuidv4() var mm = null var texti = args.text Vue.component("form_editor_component", { data: function () { return { text: ...
JavaScript
0.000001
@@ -203,24 +203,77 @@ = args.text%0A + var designMode = true%0A //*** COPY_START ***//%0A Vue.comp @@ -348,16 +348,53 @@ eturn %7B%0A + design_mode: designMode,%0A @@ -2344,16 +2344,62 @@ //%5Cn%22 +%0A + %22var designMode = false%5Cn%22 +%0A%0A @@ -3461,12 +3...
b048ae93f0e862e323f307e382a2061675db6403
add optionsSchema
jsreport.config.js
jsreport.config.js
module.exports = { 'name': 'studio', 'main': 'lib/studio.js', 'dependencies': ['express'] }
JavaScript
0.000001
@@ -1,8 +1,9 @@ +%0A module.e @@ -60,16 +60,252 @@ io.js',%0A + 'optionsSchema': %7B%0A extensions: %7B%0A studio: %7B%0A type: 'object',%0A properties: %7B%0A entityTreeOrder: %7B%0A type: 'array',%0A items: %7B type: 'string' %7D%0A %7D%0A %7D%0A...
a66e9e1737b18fbaebf3664afbf712e340de9511
Update deconfigure.js
canvas/utils/deconfigure.js
canvas/utils/deconfigure.js
if (!Canvas.deconfigure) { Canvas.deconfigure = function(canvasElement) { if (!this.configured) { console.warn("KAPhy warning - Attempted to reconfigure canvas."); return; } Canvas.element = null; Canvas.configured = false; Canvas.relWidth = null; Canvas.relHeight = null; Ca...
JavaScript
0.000001
@@ -16,16 +16,51 @@ onfigure + %7C%7C KAPhy.version !== KAPhy.current ) %7B%0A Ca
66d229360a98f53a88c41c1c8da5aaade18cc6af
enable test for #154
test/common.test.js
test/common.test.js
'use strict'; const assert = require('assert'); const common = require('../lib/common'); const blank = { title: '', rows: [], description: undefined }; const schema0 = {}; const schema1 = { properties: { firstName: { type: 'string', description: 'your name' } } }; cons...
JavaScript
0.000003
@@ -2539,84 +2539,8 @@ -// this is the actual depth calculation test which is failing%0A // asse
f20c04f0ea85f96a23c4f5ab54ddf8ddd2e66787
test if es6 env is disabled
test/config-test.js
test/config-test.js
'use strict'; var assert = require('assert'); var config = require('../'); var reactConfig = require('../react'); var babelConfig = require('../babel'); assert.equal(config.env.node, true); assert((reactConfig.plugins || []).indexOf('react') > -1); assert(reactConfig.ecmaFeatures.jsx); assert(reactConfig.rules['reac...
JavaScript
0.000001
@@ -184,16 +184,53 @@ , true); +%0Aassert.equal(config.env.es6, false); %0A%0Aassert
77caa2b4d57241ad5dda5bd0354c491438b1efa0
Correct /test-data mount point
test/default/pre.js
test/default/pre.js
try { this['Module'] = Module; Module.test; } catch(e) { this['Module'] = Module = {}; } Module['preRun'] = Module['preRun'] || []; Module['preRun'].push(function(){ var randombyte = null; try { function randombyte_standard() { var buf = new Int8Array(1); ...
JavaScript
0.000006
@@ -896,16 +896,21 @@ , '/test +-data ');%0A
e7a8db2bb331aeb55d243e6f7498f22f10e100f0
switch from tape to ava
test/docker.spec.js
test/docker.spec.js
'use strict' const sinon = require('sinon') const test = require('tape') const {execSync} = require('child_process') const log = require('../src/npmlog-env') const docker = !!process.env.WECHATY_DOCKER !docker && test('Docker test skipped', function(t) { t.pass('not in docker, skip docker tests') t.end(...
JavaScript
0.000001
@@ -1,95 +1,49 @@ -'use strict'%0A%0Aconst sinon = require('sinon')%0Aconst test = require('tape')%0A%0Acons +import %7B test %7D from 'ava'%0A%0Aimpor t %7B + execSync %7D = @@ -42,20 +42,16 @@ Sync -%7D = require( + %7D from 'chi @@ -65,53 +65,61 @@ ess' -)%0A%0Aconst log = require('../src/npmlog-env') +%...
94535715187e0a30b4448f03627e7c5c61d1cc8b
change idempotence tests structure otherwise errors might happen on beforeEach, which is hard to track
test/format.spec.js
test/format.spec.js
/*jshint node:true*/ /*global describe:false, it:false, beforeEach:false*/ "use strict"; var esprima = require('esprima'); var expect = require('chai').expect; var _glob = require('glob'); var _path = require('path'); var esformatter = require('../lib/esformatter'); var _helpers = require('./helpers'); var readOut ...
JavaScript
0
@@ -51,26 +51,8 @@ alse -, beforeEach:false */%0A%22 @@ -979,32 +979,70 @@ in%5C.js/, '$1');%0A +%0A it(id, function () %7B%0A var @@ -1068,44 +1068,8 @@ ult; -%0A%0A beforeEach(function()%7B %0A @@ -1213,57 +1213,8 @@ t);%0A - %7D);%0A%0A it(id, fu...
8d19905ff0408d5f8e9fe2b0beb8da625fd21651
Test configuration variations for pending requests
test/max_pending.js
test/max_pending.js
// Copyright (c) 2015 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
JavaScript
0
@@ -1299,36 +1299,63 @@ ter');%0A%0Atest -WithOptions( +Battle('cap maximum pending requests', %7B%0A numPee @@ -1608,28 +1608,67 @@ );%0A%0Atest -WithOptions( +Battle('cap maximum pending requests per service', %7B%0A nu @@ -1965,33 +1965,657 @@ );%0A%0A -function testWithOptions( +testBattle('channel-sco...
ec74e2c1960b364a919484d54e79575ec9eaec90
add two parameter function spec
test/plugin.spec.js
test/plugin.spec.js
const expect = require('chai').expect; let Validator = require('jsonschema').Validator; const isPlugin = require('..'); const v = new Validator(); v.attributes.is = isPlugin(); describe('jsonschema is.js tests', function() { it('should have schema function error', function(done) { const schema = { type: ...
JavaScript
0.000002
@@ -1286,12 +1286,666 @@ );%0A %7D); +%0A%0A it('should pass two parameter function', function(done) %7B%0A const schema = %7B%0A type: 'object',%0A properties: %7B%0A text: %7B type: 'string', is: 'include:some text' %7D%0A %7D%0A %7D;%0A let result = v.validate(%7B text: 'some text.....
6f259a703ca6a7d53e529707f8c5d97f45d30e9f
Fix css for dataset picker dialog [fix #34954383]
app/assets/javascripts/dialogs/tabular_data/import_datasets_picker_dialog.js
app/assets/javascripts/dialogs/tabular_data/import_datasets_picker_dialog.js
chorus.dialogs.ImportDatasetsPicker = chorus.dialogs.PickItems.extend({ title: t("dataset.pick"), constructorName: "DatasetsPickerDialog", submitButtonTranslationKey: "actions.dataset_select", emptyListTranslationKey: "dataset.none", searchPlaceholderKey: "dataset.dialog.search_table", selectedE...
JavaScript
0
@@ -672,16 +672,86 @@ _list%22;%0A + this.pickItemsList.className = %22import_datasets_picker_list%22;%0A %7D,%0A%0A
cecb778b4b44cf76b17c36781cec5e7f37616a5e
fix querystring tests
test/querystring.js
test/querystring.js
var common = require('../lib/common') var test = require('tape') // https://github.com/webtorrent/webtorrent/issues/196 test('encode special chars +* in http tracker urls', function (t) { var q = { info_hash: Buffer.from('a2a15537542b22925ad10486bf7a8b2a9c42f0d1', 'hex').toString('binary') } var encoded = 'i...
JavaScript
0.000001
@@ -196,14 +196,32 @@ q = -%7B%0A +Object.create(null)%0A q. info @@ -225,17 +225,18 @@ nfo_hash -: + = Buffer. @@ -314,11 +314,8 @@ y')%0A - %7D %0A v
7a45d261a7720133c7004487f273915c48cfef7b
Fix inviting others to private messages.
app/assets/javascripts/discourse/components/private_message_map_component.js
app/assets/javascripts/discourse/components/private_message_map_component.js
/** The controls at the top of a private message in the map area. @class PrivateMessageMapComponent @extends Ember.Component @namespace Discourse @module Discourse **/ Discourse.PrivateMessageMapComponent = Ember.View.extend({ templateName: 'components/private-message-map', tagName: 'section', classNam...
JavaScript
0
@@ -457,42 +457,8 @@ s);%0A - this.set('controller', this);%0A %7D, @@ -973,18 +973,30 @@ his. -sendAction +get('controller').send ('sh
9ca9ac07cbbf12a2fd8d7ff6e890fbcc45e54307
Add more tests.
test/request.get.js
test/request.get.js
var request = require('request'), should = require('should'), muxamp = require('../lib/server').getApplication(), testutils = require('../lib/testutils'); describe('GET', function() { var baseUrl = 'http://localhost:' + 3000 + '/'; testutils.server.testWithServer(3000, function() { describe('search endp...
JavaScript
0
@@ -340,266 +340,1064 @@ %0A%09%09%09 -it('should return search results as JSON', function(done) %7B%0A%09%09%09%09request(%7Burl: baseUrl + 'search/ytv/0/deadmau5'%7D, function(err, response, body) %7B%0A%09%09%09%09%09response.statusCode.should.eql(200);%0A%09%09%09%09%09should.not.exist(err);%0A%09%09%09%09%09JSON....
2d9feaa714088dafc473434b8a57e559b3416a5d
Update learn getters to create page link references
kolibri/plugins/learn/assets/src/modules/pluginModule.js
kolibri/plugins/learn/assets/src/modules/pluginModule.js
import mutations from './coreLearn/mutations'; import * as getters from './coreLearn/getters'; import * as actions from './coreLearn/actions'; import classAssignments from './classAssignments'; import classes from './classes'; import examReportViewer from './examReportViewer'; import examViewer from './examViewer'; imp...
JavaScript
0
@@ -1,12 +1,74 @@ +import %7B PageNames, ClassesPageNames %7D from './../constants';%0A import mutat @@ -759,16 +759,1275 @@ getters +: %7B%0A ...getters,%0A learnPageLinks() %7B%0A const params = %7B%7D;%0A return %7B%0A HomePage: %7B%0A name: PageNames.HOME,%0A params,%0A ...
23d82be04e8189667084a3f168eb593f62216325
add n to desc
test/statistical.js
test/statistical.js
var LFSR = require('../index.js'), expect = require('chai').expect, utils = require('./utils.js'), bin = utils.bin, str = utils.str; context('statistical', function() { utils.everyLength(28, function(n) { (function(n) { it('max length for n = ' + n + ' is ' + (Math.pow(2, n) - 1...
JavaScript
0
@@ -871,17 +871,30 @@ tes bits -' + for n = ' + n , functi
b223c3f57215b8e42ee1792d507c146afad1129d
Test to add a subscriber to new list and remove it.
test/subscribers.js
test/subscribers.js
JavaScript
0
@@ -0,0 +1,927 @@ +/* global describe, it */%0A%0A'use strict'%0A%0Avar expect = require('expect.js')%0A%0Avar MailerLite = require('..')%0Avar ML = new MailerLite()%0A%0Aconst LIST_NAME = 'Mocha Test'%0A%0Aconst TEST_SUBSCRIBERS = %5B%0A %7B%0A email: 'foo@bar.com',%0A name: 'Foo Bar'%0A %7D,%0A %7B%0A ema...
039500e9fda16a2ef8dadc6f67f0722a1e13ad5a
add a failing test for #319 (#328)
test/switch_test.js
test/switch_test.js
import check from './support/check.js'; describe('switch', () => { it('works with a single case', () => { check(` switch a when b c `, ` switch (a) { case b: c; break; } `); }); it('works when there is a comment after the expression', (...
JavaScript
0.000001
@@ -4233,32 +4233,257 @@ %0A %60);%0A %7D);%0A%0A + it.skip('works with %60switch%60 used as an expression surrounded by parens', () =%3E %7B%0A check(%60%0A a(switch b%0A when c then d)%0A %60, %60%0A a((() =%3E %7B switch (b) %7B%0A case c: return d; %7D %7D)());%0A %60);%0A %7...
b32a902c2347b62ed27bcb38f4164903a64261de
Update test-filter.js
test/test-filter.js
test/test-filter.js
var TweetFilter = require('../lib/filter.js') var filter = new TweetFilter('filters', ['excludeme']) var matches = [ 'help me go vegan', 'help me become vegan', 'help me be vegan', 'i want to go vegan', 'i want to become vegan', 'i want to be vegan', 'i wanna go vegan', 'i wanna be vega...
JavaScript
0.000001
@@ -1289,16 +1289,117 @@ vegan%22,%0A + %22i can see myself becoming a vegan someday%22,%0A %22i could definitely picture myself going vegan%22%0A %5D;%0A%0Avar @@ -3655,28 +3655,29 @@ n name%22);%0A test.done();%0A%7D +%0A
8de92e7e3acee87e6bf9b2932a56783d0d3ebacf
Add test for PR page, check if author is redacted
test/test-github.js
test/test-github.js
"use strict"; const {expect} = require("chai"); before(() => { browser.url("/login"); browser.setCookie({ name: "user_session", value: process.env.USER_SESSION, }); }); describe("Pull Requests (listings)", () => { it("should redact the author", () => { browser.url("/pulls/mentioned"); const...
JavaScript
0
@@ -412,16 +412,524 @@ y$/);%0A %7D);%0A%7D);%0A +%0Adescribe(%22(single) Pull Request Page%22, () =%3E %7B%0A it(%22should redact the author%22, () =%3E %7B%0A browser.url(%22/zombie/testing-reviews/pull/3%22);%0A%0A const topFlash = $(%22div.flash %3E div%22).getText();%0A expect(topFlash).to.equal(%22req...
655a586c7837594222042dcf6d8d2e6b26eb0d87
Add test case in case fetch is overriden
lib/assets/test/spec/cartodb/models/organization.spec.js
lib/assets/test/spec/cartodb/models/organization.spec.js
describe('cdb.admin.Organization', function() { beforeEach(function() { this.organization = new cdb.admin.Organization({ id: "68a57d79-d454-4b28-8af8-968e97b1349c", seats: 5, quota_in_bytes: 1234567890, created_at: "2014-06-05T16:34:51+02:00", updated_at: "2014-06-05T16:34:51+02:00...
JavaScript
0
@@ -1922,16 +1922,60 @@ %0A );%0A + this.originalSync = this.orgUsers.sync;%0A this @@ -3060,16 +3060,657 @@ %0A %7D);%0A%0A + describe('when fetch is given data options', function() %7B%0A beforeEach(function() %7B%0A spyOn(Backbone, 'sync').and.returnValue($.Deferred());%0A this.orgUsers.s...
5c4d2f2a42655a87aec7d2323faf642ff8cbcc32
Add EDITING_MANAGEMENT_KEY constant.
assets/js/components/dashboard-sharing/DashboardSharingSettings/constants.js
assets/js/components/dashboard-sharing/DashboardSharingSettings/constants.js
/** * DashboardSharingSettings constants. * * Site Kit by Google, Copyright 2021 Google LLC * * 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 * * https://www.apache.org/licenses/LI...
JavaScript
0
@@ -712,24 +712,88 @@ roles-key';%0A +export const EDITING_MANAGEMENT_KEY = 'editing-management-key';%0A export const
9fcccb71a5d9ff84f3415f64a72658bf19f1fe17
Iterator is workflow_template not workflow_job_template
awx/ui/client/src/access/rbac-multiselect/rbac-multiselect-list.directive.js
awx/ui/client/src/access/rbac-multiselect/rbac-multiselect-list.directive.js
/************************************************* * Copyright (c) 2015 Ansible, Inc. * * All Rights Reserved *************************************************/ /* jshint unused: vars */ export default ['addPermissionsTeamsList', 'addPermissionsUsersList', 'TemplateList', 'ProjectList', 'InventoryList', 'Crede...
JavaScript
0.999857
@@ -3541,36 +3541,32 @@ late%22, workflow_ -job_ template)';%0A
20476caed9ff374a9b201b057d2dcff3522c6ca4
Convert typeof tests to mocha
test/typeOf-test.js
test/typeOf-test.js
"use strict"; var buster = require("buster"); var sinon = require("../lib/sinon"); var assert = buster.assert; buster.testCase("sinon.typeOf", { "returns boolean": function () { assert.equals(sinon.typeOf(false), "boolean"); }, "returns string": function () { assert.equals(sinon.typeOf("S...
JavaScript
0.999999
@@ -1,8 +1,64 @@ +/*eslint-env mocha*/%0A/*eslint max-nested-callbacks: 0*/%0A %22use str @@ -68,22 +68,23 @@ %22;%0A%0Avar -buster +referee = requi @@ -87,22 +87,23 @@ equire(%22 -buster +referee %22);%0Avar @@ -148,22 +148,23 @@ ssert = -buster +referee .assert; @@ -169,22 +169,15 @@ t;%0A%0A -buster.test...
1dd437eb6b29a2d9e88ed1542cba5a3bd4e66c99
fix conflict between mocks and skip (#863)
test/utils/utils.js
test/utils/utils.js
const child = require('child_process'); const path = require('path'); const chalk = require('chalk'); const common = require('../../src/common'); function numLines(str) { return typeof str === 'string' ? (str.match(/\n/g) || []).length + 1 : 0; } exports.numLines = numLines; function getTempDir() { // a very ra...
JavaScript
0.000006
@@ -142,16 +142,164 @@ mon');%0A%0A +// Capture process.stderr.write, otherwise we have a conflict with mocks.js%0Aconst _processStderrWrite = process.stderr.write.bind(process.stderr);%0A%0A function @@ -921,28 +921,35 @@ ) %7B%0A -console.warn +_processStderrWrite ('Got EP @@ -1035,16 +1035,18 @@ ng test. +%...
f640e18e54943a419d28ebee83cc7b227acbc7e4
apply all screen updates in a single animationFrame
browser/src/render/Renderer.js
browser/src/render/Renderer.js
'use strict' import ViewState from './ViewState' import BrowserRtcBufferFactory from '../BrowserRtcBufferFactory' import YUVASurfaceShader from './YUVASurfaceShader' import YUVSurfaceShader from './YUVSurfaceShader' import Size from '../Size' export default class Renderer { /** * * @param {BrowserSession} bro...
JavaScript
0
@@ -1201,16 +1201,299 @@ = canvas +%0A%0A this._animationScheduled = false%0A this._sceneUpdates = %5B%5D%0A this._updateScene = (timestamp) =%3E %7B%0A this._sceneUpdates.forEach(frameUpdate =%3E %7B frameUpdate() %7D)%0A this.browserSession.flush()%0A this._sceneUpdates = %5B%5D%0A this....
0186cefa3255905033403ec5432c7ead0b987c77
Fix #292
resources/assets/js/stores/queue.js
resources/assets/js/stores/queue.js
import { head, last, includes, union, difference, indexOf, map, shuffle } from 'lodash'; export default { state: { songs: [], current: null, }, init() { // We don't have anything to do here yet. // How about another song then? // ...
JavaScript
0.000001
@@ -67,21 +67,8 @@ ce,%0A - indexOf,%0A @@ -3865,24 +3865,16 @@ return -indexOf( this.sta @@ -3877,26 +3877,33 @@ .state.songs -, +.indexOf( song);%0A %7D
85a3519496664cf08cd3d622b54ee85fa4811345
fix typo
www/js/controllers.js
www/js/controllers.js
angular.module('starter.controllers', []) .controller('LoginCtrl', function($scope, auth, $state, store) { auth.signin({ closable: false, // This asks for the refresh token // So that the user never has to log in again authParams: { scope: 'openid offline_access' } }, function(profile, id...
JavaScript
0.999991
@@ -1462,9 +1462,9 @@ ===' -Y +y es'
c46557d6f73943a959b67bb25fcad484ad9941a0
correct label for activity/processinstance dropdown in timing tab
src/main/resources/plugin-webapp/statistics-plugin/app/directives/startEndControlElement.js
src/main/resources/plugin-webapp/statistics-plugin/app/directives/startEndControlElement.js
ngDefine('cockpit.plugin.statistics-plugin.directives', function(module) { module.directive('startEndControlElement', function(){ return { restrict: 'E', template: '<form class="form-horizontal">'+ '<h5>Show:<h5>'+ '<h5>starting time or ending time</h5>'+ ...
JavaScript
0
@@ -888,17 +888,17 @@ or -user task +activitie s%3Ch5
0503cca3e7d94a4cff23984653f59b6fbca3ec4c
Remove one DOM element in the Card actions (#9952)
docs/src/pages/demos/cards/RecipeReviewCard.js
docs/src/pages/demos/cards/RecipeReviewCard.js
import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import classnames from 'classnames'; import Card, { CardHeader, CardMedia, CardContent, CardActions } from 'material-ui/Card'; import Collapse from 'material-ui/transitions/Collapse'; import Avatar from 'mate...
JavaScript
0
@@ -779,24 +779,63 @@ : 194,%0A %7D,%0A + actions: %7B%0A display: 'flex',%0A %7D,%0A expand: %7B%0A @@ -830,24 +830,24 @@ expand: %7B%0A - transfor @@ -982,16 +982,40 @@ %7D),%0A + marginLeft: 'auto',%0A %7D,%0A e @@ -1073,24 +1073,24 @@ avatar: %7B%0A + backgrou @@ -1117,49 +1117...