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
24ad6dce6cfa93773061b1a7faa8822d9d74998d
use UTC timestamps
index.js
index.js
(function() { 'use strict'; /** * @var {Number} the interval to gather the sensor output in seconds. * Defaults to 5 minutes (300). */ var interval = process.env.SENSOR_INTERVAL || 5*60; var resinDeviceUuid = process.env.RESIN_DEVICE_UUID; var firebaseUrl = process.env.FIREBASE_URL; var sensorType = ...
JavaScript
0.000106
@@ -989,27 +989,16 @@ perature -.toFixed(2) ;%0A @@ -1029,19 +1029,8 @@ dity -.toFixed(2) ;%0A%0A @@ -1095,18 +1095,71 @@ var -m = moment +timestamp = Date.now();%0A var m = moment(timestamp).utc ();%0A @@ -1211,18 +1211,16 @@ t() + ': -%5Cn ',%0A @@ -1263,16 +1263,26 @@ ture +.toFixed(2)...
b486ad235f39404a2d1a037d56b5132127ff4372
Fix the return URL by using s3.amazonaws.com.
index.js
index.js
'use strict'; // # S3 storage module for Ghost blog http://ghost.org/ var fs = require('fs'); var path = require('path'); var nodefn = require('when/node/function'); var when = require('when'); var readFile = nodefn.lift(fs.readFile); var unlink = nodefn.lift(fs.unlink); var AWS = require('aws-sdk'); var options = {};...
JavaScript
0.999999
@@ -698,16 +698,19 @@ ket + '. +s3. amazonaw
ce007d7e5ce1ec0055d654f49970712ac8d41c2b
fix range to batch leveldb scemantics
index.js
index.js
//abstract out the patterns I'm using to group documents into levelup! /** patterns I am currently using: ~PREFIX~[2, group1, group2] or ~PREFIX~KEY so, if you get everything between {start: '~PREFIX~', end: '~PREFIX~~'} that will be everything in the bucket, note: never use '' or '~' as a key. I'm using JSO...
JavaScript
0
@@ -2504,16 +2504,17 @@ .start %3C += key && @@ -2518,16 +2518,17 @@ && key %3C += range.e
60d6faea561bc83c8f56044f91a7700886ac4132
Use writeFileSync
index.js
index.js
/* jshint node: true */ 'use strict'; var compress = require('brotli/compress'); var Promise = require('ember-cli/lib/ext/promise'); var fs = require('fs'); var path = require('path'); var minimatch = require('minimatch'); var denodeify = require('rsvp').denodeify; var renameFile = denodeify(fs.rename);...
JavaScript
0.000001
@@ -2771,16 +2771,24 @@ fs.write +FileSync (outFile
e802dbde5958acd5073fcf6a46181f4133e4f708
make bundledDeps match what is installed after the build
lib/buildbot.js
lib/buildbot.js
var Understudy = require('understudy').Understudy; var Repository = require('repositron').Repository; var tar = require('tar'); var async = require('async'); var chownr = require('chownr'); var zlib = require('zlib'); var fs = require('fs'); var spawn = require('child_process').spawn; var fstream = require("fstream"); ...
JavaScript
0
@@ -3244,56 +3244,8 @@ ) %7B%0A - console.error(spawnOptions.spawnWith.cwd)%0A @@ -3276,16 +3276,16 @@ udo', %5B%0A + @@ -3966,35 +3966,640 @@ -console.error('finishing')%0A +var pkgJSON = spawnOptions.spawnWith.cwd + '/package.json';%0A fs.readdir(spawnOptions.spawnWith.cwd + '/node...
c36984450f4cb965b947bef2fc1e1dc7f6e1e438
allow points to be activated or deactivated
lib/channels.js
lib/channels.js
'use strict'; const USERS = require('./users.js'); const TIMERS = require('./timers.js'); let db, client, channel, userstate, message; function processChannels(database, cl, ch, us, msg) { db = database; client = cl; channel = ch; userstate = us; message = msg; if (message[0] === 'join') { // Inp...
JavaScript
0
@@ -712,24 +712,155 @@ eration();%0A%0A + %7D else if (message%5B1%5D === 'points_activated') %7B%0A%0A // Input: %5Bsettings, points_activated, false%5D%0A changePointsActivated();%0A%0A %7D%0A%0A%7D%0A%0Afunc @@ -4028,16 +4028,718 @@ %7D%0A%0A%7D%0A%0A +async function changePointsActivated() %7B%0A try...
04dbcad228bee2223d630d700abcd27224d690fc
Add support for webpack compiler
index.js
index.js
var child = require('child_process'); var chokidar = require('chokidar'); var fs = require('fs'); var http = require('http'); var mime = require('mime'); var path = require('path'); var rdbg = require('rdbg'); var util = require('util'); var temp = require('temp'); function serve(options, callback) { var server = ht...
JavaScript
0
@@ -1483,32 +1483,193 @@ ;%0A break;%0A%0A + case 'webpack':%0A var command = 'webpack';%0A var args = %5B%0A '--watch',%0A '--output-file',%0A options.output,%0A %5D;%0A break;%0A%0A default:%0A
1f880f6b4561d81d8e79bec2c2ab0d7f9ecfb92b
fix query
index.js
index.js
'use strict'; const express = require('express'); const bodyParser = require('body-parser'); const http = require('http'); const https = require('https'); const restService = express(); var request, response, type; var speech = ''; var message = ''; var jobList = ''; restService.use(bodyParser.json()); restService...
JavaScript
0.999742
@@ -3552,17 +3552,40 @@ port +'%5D .IATA -'%5D ;%0A + console.log(query); %0A @@ -3937,32 +3937,36 @@ ime (results) %7B%0A + %0A var waitTi
dee475dc300b2f7663446d4be3db7160f3dbf1f9
remove extra lines
index.js
index.js
// base-x encoding // Forked from https://github.com/cryptocoinjs/bs58 // Originally written by Mike Hearn for BitcoinJ // Copyright (c) 2011 Google Inc // Ported to JavaScript by Stefan Thomas // Merged Buffer refactorings from base58-native by Stephen Pair // Copyright (c) 2013 BitPay Inc /** * @param {string} ALPH...
JavaScript
0.000679
@@ -290,92 +290,8 @@ nc%0A%0A -/**%0A * @param %7Bstring%7D ALPHABET%0A * @return %7Bencode: function, decode: function%7D%0A */%0A modu @@ -544,81 +544,8 @@ %7D%0A%0A - /**%0A * @param %7B(Buffer%7Cnumber%5B%5D)%7D source%0A * @return %7Bstring%7D%0A */%0A fu @@ -686,134 +686,41 @@ -var carry = (di...
3a2155f65192a64045dda21d9531e04aa3f436cb
add more error codes
index.js
index.js
module.exports = { '-1' : 'system busy, retry later', 0 : 'success', 1 : 'internal error, contact us', 10001: 'require appKey', 10002: 'require appSecret', 10003: 'require deviceId', 10004: 'invalid appKey', 10005: 'invalid appSecret', 10006: 'failed to create/update device, contact us', 1000...
JavaScript
0
@@ -1361,24 +1361,59 @@ b',%0A 40006: + 'failed to find regions',%0A 40007: 'failed to
c2bb62d9771448a642073e7035a99c3ed553059c
Fix destructuring for gitbook compilation
index.js
index.js
'use strict' const cheerio = require('cheerio') const { readFileSync } = require('fs') function readJSON(path){ const file = readFileSync(path, { encoding: 'utf8'}) let ret = {} try{ ret = JSON.parse(file) } catch(e){ ret = {} } finally{ return ret } } function getFigureIndex(figKey, figures){ return Object.ke...
JavaScript
0.000005
@@ -47,18 +47,16 @@ ')%0Aconst - %7B readFil @@ -60,18 +60,16 @@ FileSync - %7D = requi @@ -76,16 +76,29 @@ re('fs') +.readFileSync %0A%0Afuncti
ba2cb4f6c30ec3cf80a9410fd9d3b8155c8fbcc6
Fix for Karma-Cajon
index.js
index.js
var path = require('path'); var fs = require('fs'); // TODO Do not expect require to be included before plugins var requireUsed = function(files) { if (files) { for (var i = files.length, pattern; i > 0; i--) { pattern = files[i] && files[i].pattern; if (typeof pattern === 'string'...
JavaScript
0
@@ -403,24 +403,205 @@ %7D%0A + if (typeof pattern === 'string' && (pattern.indexOf(%22%5C%5Ckarma-cajon%5C%5C%22) !== -1 %7C%7C pattern.indexOf(%22/karma-cajon/%22) !== -1)) %7B%0A return true;%0A %7D%0A %7D%0A @@ -3535,8 +3535,9 @@ exports; +%0A
7536f5304c6d3a605cc805d2482f4bd3842881cc
Update index.js to use common handler
index.js
index.js
import Config from './src/Config'; import Controller from './src/Controller'; exports.createCookbook = async (event, context, callback) => { try { const config = Config.load(); const controller = new Controller(config); const response = await controller.createCookbook(event); return callback(null, r...
JavaScript
0
@@ -76,83 +76,8 @@ ';%0A%0A -exports.createCookbook = async (event, context, callback) =%3E %7B%0A try %7B%0A cons @@ -94,36 +94,32 @@ Config.load();%0A - const controller @@ -149,34 +149,179 @@ g);%0A - const response = await +%0A/**%0A * A map of lambda handlers to controller methods%0A * @return %7...
df6be04b658ec51f136e03ac0a9f48915bae88ef
refactor cmd_admin
index.js
index.js
var slack = require('slack') var bot = slack.rtm.client() var env = require('node-env-file') var channels = require('./channels') var admins = require('./admins') env(__dirname + '/.env') var token = process.env.SLACK_TOKEN var commands = [] // auto rejoin bot.channel_left(function(msg) { var toJoin = channels.whi...
JavaScript
0.999987
@@ -1097,25 +1097,18 @@ ins. -reduce((str, user +map((admin ) =%3E @@ -1119,22 +1119,16 @@ turn - str + '%3C@' + user @@ -1123,20 +1123,21 @@ '%3C@' + -user +admin .name + @@ -1142,15 +1142,20 @@ + '%3E -%5Cn'%7D, ' +'%7D).join('%5Cn ')%0A
30079b300bcdb3c3bedafc4f0f342836c01bf936
clean up
index.js
index.js
/*! * repeat-string <https://github.com/jonschlinkert/repeat-string> * * Copyright (c) 2014 Jon Schlinkert, contributors. * Licensed under the MIT License */ 'use strict'; module.exports = function repeat(str, count) { if (typeof str !== 'string') { throw new TypeError('repeat-string expects a string.'); ...
JavaScript
0.000001
@@ -87,16 +87,21 @@ (c) 2014 +-2015 Jon Sch @@ -215,21 +215,19 @@ at(str, -count +num ) %7B%0A if @@ -324,47 +324,8 @@ %7D%0A%0A - if (count %3C 1) %7B%0A return '';%0A %7D%0A%0A va @@ -333,18 +333,16 @@ res -ult = '';%0A +%0A wh @@ -350,17 +350,11 @@ le ( -count %3E 0 +num ) %7B%0A @@ -361,21...
159ce91dd240f820ffb6c51ebecbd93a2f78cfe3
Fix issues with running under Node 4.
index.js
index.js
'use strict'; const buildLiveReloadPath = require('clean-base-url'); const VersionChecker = require('ember-cli-version-checker'); module.exports = { name: 'live-reload-middleware', contentFor: function(type) { let liveReloadPort = process.env.EMBER_CLI_INJECT_LIVE_RELOAD_PORT; let baseURL = process.env.E...
JavaScript
0
@@ -1978,27 +1978,78 @@ ion( -%7B options, app %7D) %7B +config) %7B%0A let options = config.options;%0A let app = config.app;%0A %0A
0dee6324e804110fba84895a4a84ac1cf694bb7c
remove require for semver
index.js
index.js
#!/usr/bin/env node var semver = require("semver") process.stdin.resume() process.stdin.setEncoding('utf8') var d = "" process.stdin.on('data', function (data) { d += data }) process.stdin.on('end', function () { var json = JSON.parse(d) Object.keys(json).forEach(function (pkg) { if (json[pkg].wanted !==...
JavaScript
0.000001
@@ -18,40 +18,8 @@ de%0A%0A -var semver = require(%22semver%22)%0A%0A proc
3e42419c64eb15ae5e6574622a5031f3a197cd43
Clean up trailing space after comments.
lib/comments.js
lib/comments.js
var assert = require("assert"); var linesModule = require("./lines"); var Lines = linesModule.Lines; var concat = linesModule.concat; var Visitor = require("./visitor").Visitor; exports.add = function(ast, lines) { var comments = ast.comments; assert.ok(comments instanceof Array); delete ast.comments; ...
JavaScript
0.000001
@@ -2866,95 +2866,564 @@ var -fnsp = lines.firstNonSpacePos(loc.end);%0A parts.push(lines.slice(loc.end, fnsp)); +trailingSpace = lines.slice(%0A loc.end,%0A lines.firstNonSpacePos(loc.end)%0A );%0A%0A if (trailingSpace.length === 1) %7B%0A // If the trailing spac...
bfe4cb4ffed246eb522c22e71334e5dafc2c39b6
Fix paths in sourcemap file for Windows
lib/compiler.js
lib/compiler.js
'use strict'; var tsc = require('./tsc'); var path = require('path'); var util = require('util'); var async = require('async'); var xtend = require('xtend'); var byline = require('byline'); var temp = require('temp'); var through = require('through2'); var fsSrc = require('vinyl-fs').src; var EventEmitter = require('e...
JavaScript
0.000001
@@ -5046,32 +5046,107 @@ ), sourcePath);%0A + if (path.sep == '%5C%5C') sourcePath = sourcePath.replace(/%5C%5C/g, '/');%0A return s
b4d68e7021e033fdbb4b9435eb5fe2ceb3c73e3a
Add unsafe-eval in development.
index.js
index.js
module.exports = { name: 'ember-cli-content-security-policy', config: function(/* environment, appConfig */) { return { contentSecurityPolicyHeader: 'Content-Security-Policy', contentSecurityPolicy: { 'default-src': "'none'", 'script-src': "'self'", 'connect-src': "'self'", ...
JavaScript
0
@@ -81,11 +81,8 @@ ion( -/* envi @@ -88,16 +88,19 @@ ironment + /* , appCon @@ -113,22 +113,25 @@ ) %7B%0A -return +var ENV = %7B%0A @@ -388,16 +388,189 @@ %7D%0A %7D +%0A%0A if (environment === 'development') %7B%0A ENV.contentSecurityPolicy%5B'script-src'%5D = ENV.contentSecurityPolicy%5...
68bd7d2baf1352d9170cf42df1f3f1c52a8f8543
make duplicate key error regex work with mongoose 5
index.js
index.js
/* jshint node: true */ 'use strict'; module.exports = function(options) { this.prefix = (options || {}).prefix ||  'error.'; this.handler = function(handler) { var self = this; return function(err, req, res, next) { if (!err) return next(err); if (typeof res.__ !== 'function') { console.error('no i1...
JavaScript
0.000075
@@ -1771,45 +1771,53 @@ %5Cs.* +? %5C. +? %5C$ +? (.*)_ -1 +%5Cd %5Csdup - +%5Cs+ key:%5Cs -%5C +* %7B%5Cs +* :%5Cs +* %22(.*)%22%5Cs %5C%7D/. @@ -1812,17 +1812,17 @@ %22(.*)%22%5Cs -%5C +* %7D/.exec(
8a59fbfa2d2b73c5d7ce0a52bb826918da23fd2b
add source files
lib/css-deps.js
lib/css-deps.js
/** * Created by Newton on 2015/5/9. */ 'use strict'; var is = require('is'); var css = require('css'); /** * get css resource uri * @param src * @param replace * @param onpath * @param prefix * @returns {*} */ function cdeps(src, replace, onpath, prefix){ if (Buffer.isBuffer(src)) src = src.toString(); ...
JavaScript
0.000001
@@ -318,175 +318,8 @@ );%0A%0A - var ast = css.parse(src);%0A var rules = ast.stylesheet.rules;%0A var PATHRE = /url%5C(%5B%22'%5D?(.*?)%5B%22'%5D?%5C)/gi;%0A var IMPORTRE = /url%5C(%5B%22'%5D?(.*?)%5B%22'%5D?%5C)%7C%5B'%22%5D(.*?)%5B'%22%5D/gi;%0A%0A re @@ -603,24 +603,253 @@ fined;%0A %7D%0A%0A + try %7B%0...
07482bacfcbd55e1c2e095aaf7c376bdc8c0ac4c
remove debug logging
index.js
index.js
#!/usr/bin/env node var program = require('commander'), chalk = require('chalk'), package = require('./package.json'), s2l = require('./lib/swagger2locust'); program .description("swagger2locust is a CLI tool that creates locust.io config tasks file from swagger specification.\n\n Website: https://gith...
JavaScript
0.000002
@@ -939,34 +939,8 @@ ) %7B%0A - console.log(options);%0A
0f113ee1a753cb4b17fe33fe3f49394224dbf6e3
Mark "options" param as optional in jsdoc (#77)
index.js
index.js
/** * Helpers. */ var s = 1000 var m = s * 60 var h = m * 60 var d = h * 24 var y = d * 365.25 /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} options * @throws {Error} throw an error if val is not a non-empty str...
JavaScript
0
@@ -242,23 +242,25 @@ Object%7D +%5B options +%5D %0A * @thr
af747a9bd356a767f1c77b3ad7768252e7bd3aee
Resolve image paths relative to the md file
index.js
index.js
'use strict'; const fs = require('fs'); const path = require('path'); const url = require('url'); const fileUrl = require('file-url'); const Promise = require('bluebird'); const showdown = require('showdown'); const showdownEmoji = require('showdown-emoji'); const cheerio = require('cheerio'); const pdf = require('html...
JavaScript
0
@@ -2171,20 +2171,29 @@ sSrc(src +, options ) %7B%0A - %09if (has @@ -2279,24 +2279,18 @@ src;%0A%09%7D%0A - +%0A%09 // We ne @@ -2302,24 +2302,82 @@ convert it%0A +%09const resolvedSrc = path.resolve(options.assetDir, src);%0A %09return file @@ -2380,17 +2380,25 @@ fileUrl( -s +resolvedS rc);%0A%7D%0...
87ca88924b2afb568db9c9514dde8732d0cc1608
add path prop for context
index.js
index.js
! function() { 'use strict'; var his = window.history var loc = window.location var nativePushState = history.pushState var nativeReplaceState = history.replaceState var lts = [] // Houted listeners var evt = 'popstate' var curctx var T_MANUAL = 'manual' var T_ROUTE = 'route' ...
JavaScript
0.000001
@@ -1832,17 +1832,102 @@ pathname -, +%0A this.path = location.pathname + location.search // for routedjs like property %0A @@ -1956,17 +1956,16 @@ n.search -, %0A @@ -1990,17 +1990,16 @@ ion.hash -, %0A @@ -2024,17 +2024,16 @@ ion.href -, %0A @@ -2051,17 +2051,16 @@ n = type...
05bb13da4ef94894e956dc38f37b03582b769cfe
clean up regex, add negation
index.js
index.js
/*! * is-glob <https://github.com/jonschlinkert/is-glob> * * Copyright (c) 2014-2015 Jon Schlinkert. * Licensed under the MIT License */ module.exports = function isGlob(str) { return typeof str === 'string' && /[*{}?[\]]|\([^|]*\|[^)]*\)/.test(str); };
JavaScript
0.999473
@@ -80,16 +80,17 @@ 014-2015 +, Jon Sch @@ -223,33 +223,20 @@ & /%5B +! *%7B%7D? +(%7C) %5B%5C%5D%5D -%7C%5C(%5B%5E%7C%5D*%5C%7C%5B%5E)%5D*%5C) /.te
297531bc40465bda8f22bdccc47da59ba70cfa0f
remove unused deps
index.js
index.js
var fs = require('fs'); var through = require('through2'); var split = require('split'); var trim = require('trim'); var expr = require('./lib/utils/regexes'); var parseLine = require('./lib/parse-line'); module.exports = function (done) { done = done || function () {}; var stream = through(); var testNum...
JavaScript
0.000053
@@ -1,28 +1,4 @@ -var fs = require('fs');%0A var
8f522a861b50eadedc239655ad8200a229036a6d
Eliminate long messages
index.js
index.js
#!/usr/bin/env node var program = require('commander'); var userArgs = process.argv.splice(2); console.log(userArgs.join(' '));
JavaScript
0.999999
@@ -93,38 +93,204 @@ 2);%0A -%0Aconsole.log(userArgs.join(' ') +var message = userArgs.join(' ');%0A%0Aif (message.length %3E 140) %7B%0A console.log('Message was too long. Can only be 140 characters. It was: ', message.length);%0A process.exit(1);%0A%7D%0A%0Aconsole.log(message );%0A
71f9a08148251f90b70685b706447120f98927a6
add getPhotos function
index.js
index.js
/** * This file contains the main functionality for the unsplash-api module * * @author Noah Dietz */ 'use strict'; var request = require('request'); var path = require('path'); var HOST = 'https://api.unsplash.com/' var client_id; module.exports = { init: apiInit, getUserPhotos: getUserPhotos, getUserByN...
JavaScript
0.000001
@@ -331,17 +331,41 @@ erByName +,%0A getPhotos: getPhotos %0A - %7D;%0A%0A/**%0A @@ -1298,17 +1298,17 @@ am %7Bstr -o +i ng%7D us @@ -1887,28 +1887,1061 @@ JSON.parse(body));%0A %7D);%0A%7D%0A +%0A/**%0A * gets a single page of photos from the list of all photos%0A * @param %7Bint%7D page target p...
430ed230ab3000779ae178e48642eeb64d889027
add index.js
index.js
index.js
JavaScript
0.000005
@@ -0,0 +1,716 @@ +'use strict';%0A%0Avar helper = require('configurable-gulp-helper');%0Avar verify = helper.verifyStreamPrerequisite('pipe');%0A%0A/**%0A * Recipe:%0A * %09Stream Pipe%0A *%0A * Ingredients:%0A * %09stream.pipe()%0A *%0A * @config %E9%87%9D%E5%B0%8D%E6%9C%AC task %E7%9A%84 configuration%E3%80%82%0A * ...
de9ecd2addbd774189e69f07d53be3599e56f5a1
Update error method to allow for new Error objects
index.js
index.js
var LogEmitter = function (source) { this.source = source; }; LogEmitter.prototype.info = function (message) { process.emit("gulp:log", { level: "info", message: message, source: this.source }); }; LogEmitter.prototype.warn = function (message) { process.emit("gulp:log", { level: "warn", message: message, source: ...
JavaScript
0
@@ -388,49 +388,44 @@ %7B%0A%09 -process.emit(%22gulp:log%22, %7B +var data = %7B%7D;%0A%09data. level -: + = %22error%22 , me @@ -420,34 +420,41 @@ %22error%22 -, +;%0A%09data. message -: + = message , source @@ -441,33 +441,40 @@ ge = message -, +;%0A%09data. source -: + = this.source @@ -465,34 +4...
748ee24f492d08e9e351726cc9e0ba3e2c9a21a2
Update silly story generator
javascript/introduction-to-js-1/assessment-finished/main.js
javascript/introduction-to-js-1/assessment-finished/main.js
const customName = document.getElementById('customname'); const randomize = document.querySelector('.randomize'); const story = document.querySelector('.story'); function randomValueFromArray(array){ const random = Math.floor(Math.random()*array.length); return array[random]; } let storyText = 'It was 94 fahrenhe...
JavaScript
0
@@ -278,18 +278,20 @@ om%5D;%0A%7D%0A%0A -le +cons t storyT @@ -544,18 +544,20 @@ day.';%0A -le +cons t insert @@ -580,16 +580,17 @@ Goblin', + 'Big Dad @@ -593,16 +593,17 @@ Daddy', + 'Father @@ -611,26 +611,28 @@ hristmas'%5D;%0A -le +cons t insertY = @@ -651,16 +651,17 @@ itchen', + 'Disneyl @@ -6...
ebca10b7c884525c80cbd013dcd6651a85f57f38
Make sure that the CachingWriter constructor is called.
index.js
index.js
var path = require('path'); var exec = require('child_process').exec; var merge = require('merge'); var dargs = require('dargs'); var Writer = require('broccoli-caching-writer'); var rsvp = require('rsvp'); var fse = require('fs-extra'); var expand = require('glob-expand'); var ignoredOptions = [ 'compassCommand...
JavaScript
0
@@ -4026,38 +4026,8 @@ %5D;%0A%0A - this.inputTree = inputTree;%0A th @@ -4592,16 +4592,123 @@ dLine(); +%0A%0A // Call %22super%22 (the broccoli-caching-writer constructor)%0A Writer.call(this, inputTree, this.options); %0A%7D%0A%0AComp
c975b12b38b4a6519569953f580b5d68dba03c77
Clear references of pending arrays
lib/deferred.js
lib/deferred.js
// Returns function that returns deferred or promise object. // // 1. If invoked without arguments then deferred object is returned // Deferred object consist of promise (unresolved) function and resolve // function through which we resolve promise // 2. If invoked with one argument then promise is returned which...
JavaScript
0
@@ -1999,24 +1999,53 @@ e.resolved;%0A +%09%09%09%09delete dPromise.pending;%0A %09%09%09%09if (dPro
95d98e6994d0789948acbf0e3dfeb0e0d69501bf
Revert "undefined is fine"
index.js
index.js
'use strict' const EventEmitter = require('events').EventEmitter const Parser = require('node-expat').Parser class XMLStream extends EventEmitter { constructor (stream, options) { super() options = options || {} this.encoding = options.encoding || 'UTF-8' this.stream = stream this.parser = new P...
JavaScript
0.00002
@@ -3175,16 +3175,56 @@ l = el._ + %7C%7C null // Otherwise, it's 'undefined'. %0A
eaf5651e39a13de8ddc221fbb9445a26e52f044f
Remove function wrapping in fromNode call
index.js
index.js
var Asyncplify = require('asyncplify'); var fs = require('fs'); var Watch = require('./watch'); module.exports = { access: function (options) { return Asyncplify.fromNode(function (cb) { fs.access(options.path || options, options.mode ? options.mode : cb, options.mode && cb); }); }, appendFile: function (opt...
JavaScript
0.000003
@@ -168,35 +168,16 @@ romNode( -function (cb) %7B%0A%09%09%09 fs.acces @@ -177,17 +177,18 @@ s.access -( +, options. @@ -220,54 +220,8 @@ mode - ? options.mode : cb, options.mode && cb);%0A%09%09%7D );%0A%09 @@ -286,35 +286,16 @@ romNode( -function (cb) %7B%0A%09%09%09 fs.appen @@ -295,25 +295,26 @@ s.appendF...
6e8085b839e15fa27f6b6d8086d6cb09e726b4e0
remove old requires
index.js
index.js
module.exports = { blockgenesis: require('./BasicTests/blockgenesistest'), genesishashes: require('./BasicTests/genesishashestest'), hexencode: require('./BasicTests/hexencodetest'), keyaddrtests: require('./BasicTests/keyaddrtest'), rlptest: require('./BasicTests/rlptest'), trieTests: { trietest: requi...
JavaScript
0.000037
@@ -19,249 +19,55 @@ %0A b -lockgenesis: require('./BasicTests/blockgenesistest'),%0A genesishashes: require('./BasicTests/genesishashestest'),%0A hexencode: require('./BasicTests/hexencodetest'),%0A keyaddrtests: require('./BasicTests/keyaddrtest'),%0A rlptest: require('. +asicTests: require('require-all')(__dir...
bd2b6df43740207d23d4b6a34c1c8c69b0b23680
fix order of plugins
index.js
index.js
'use strict'; module.exports = exports = ({ hashtag = '/tags/', mention = '/users/', tocLevel = [1,2], containers = [ 'container', ] } = {}) => { const md = require('markdown-it')({ html: true, xhtmlOut: false, breaks: true, langPrefix: 'language-', ...
JavaScript
0.000207
@@ -1173,203 +1173,8 @@ %7D)%0A - .use(require('markdown-it-custom-block'), %7B%0A video (url) %7B%0A return %60%3Cdiv class=%22block-embed block-embed-video%22%3E%0A %3Cvideo src=%22$%7Burl%7D%22%3E%3C/video%3E%0A %3C/div%3E%60;%0A %7D%0A %7D)%0A @@ -2350,16 +2350,215 @@ rli...
7d354bee5c48fa22bb085927bff800ee99a32b49
add content:encoded field
index.js
index.js
var Entities = require("entities"); var FS = require('fs'); var XML2JS = require('xml2js'); var HTTP = require('http'); var HTTPS = require('https'); var Parser = module.exports = {}; var TOP_FIELDS = ['title', 'description', 'author', 'link']; var ITEM_FIELDS = [ 'title', 'link', 'pubDate', 'author', ] var...
JavaScript
0.000001
@@ -307,16 +307,37 @@ uthor',%0A + 'content:encoded',%0A %5D%0A%0Avar s @@ -2813,16 +2813,65 @@ .guid%5B0%5D +;%0A if (entry.guid._) entry.guid = entry.guid ._;%0A
b58334604964d6a61aa445984abe29eedd7f13d3
save the image
index.js
index.js
var express = require('express'); var app = express(); app.use(express.bodyParser()); app.get('/', function(req, res){ res.send('COFFEE?!\n'); }); if(process.env.USERNAME && process.env.PASSWORD) app.post('/',express.basicAuth(process.env.USERNAME, process.env.PASSWORD)) app.post('/', function(req, res){ res.s...
JavaScript
0.000004
@@ -27,16 +27,40 @@ ress');%0A +var fs = require('fs');%0A var app @@ -108,72 +108,8 @@ );%0A%0A -app.get('/', function(req, res)%7B%0A res.send('COFFEE?!%5Cn');%0A%7D);%0A%0A if(p @@ -266,16 +266,17 @@ , res)%7B%0A +%0A res.se @@ -298,10 +298,332 @@ ');%0A -%7D) +%0A fs.readFile(req.files.file.path, functi...
c0330cc40488743b7a7787e13e634bf8bac80016
Add IMDB URL instead of Letterboxd, seem to be quite a lot of movies missing from TMDB/Letterboxd hence breaking the links
index.js
index.js
'use strict'; var http = require('http'); var querystring = require('querystring'); var movie = require('node-movie'); var slack = require('slack-notify')(process.env.SLACK_HOOK_URL); var config = { username: process.env.USERNAME || 'movies', emoji: process.env.EMOJI || ':movie_camera:', token: process.env.SLA...
JavaScript
0
@@ -1240,27 +1240,26 @@ p:// -letterboxd.com/imdb +www.imdb.com/title /' + @@ -1276,14 +1276,8 @@ dbID - + '/' ,%0A
bb7a05ae79e14a60294ae950bfc26a505ddb3feb
Exclude multiple properties instead of just one
index.js
index.js
var assert = require('assert') class Given { constructor (args, matcher) { this.args = args this.matcher = matcher } match (subject) { this.matcher.match(() => subject.apply(null, this.args)) } toString () { return `given ${this.args} ${this.matcher}` } } class Returns { constructor (r...
JavaScript
0.000012
@@ -839,17 +839,19 @@ tPropert -y +ies (this, ' @@ -856,16 +856,48 @@ 'setup' +, 'withoutProperties', 'matcher' ))%0A %7D,%0A @@ -1161,17 +1161,19 @@ pert -y +ies (object , pr @@ -1172,21 +1172,63 @@ ject -, property) %7B +) %7B%0A var properties = Array.from(arguments).slice(1) %0A @@ -1293,24 +1293,...
1b49dbb70c0121b87313b808151fb0508d021ae1
remove platform usage, use defaulting values.
index.js
index.js
'use strict'; const aws = require('aws-sdk'); const fs = require('fs-extra'); const platform = require('platform'); const path = require('path'); const crontab = require('crontab'); const _ = require('lodash'); function Mirri(iamClient) { this.iamClient = iamClient; } Mirri.prototype.Rotate = function(profile, force...
JavaScript
0
@@ -76,46 +76,8 @@ ');%0A -const platform = require('platform');%0A cons @@ -739,16 +739,24 @@ dentials + (linux) or %25USE @@ -764,20 +764,22 @@ PROFILE%25 +/ .aws +/ credenti @@ -781,16 +781,26 @@ dentials + (windows) %0A%09%09let c @@ -820,118 +820,31 @@ e = -platform.os.family && platform.os.family.matc...
89e9c8f64c1ea0fefffd991441ca8bca09111be6
Refactor comment-style
index.js
index.js
'use strict' module.exports = nlcstToString /* Stringify a NLCST node or list of nodes. */ function nlcstToString(node, separator) { var sep = separator || '' var values var length var children if (!node || (!('length' in node) && !node.type)) { throw new Error('Expected node, not `' + node + '`') } ...
JavaScript
0.000001
@@ -40,17 +40,17 @@ tring%0A%0A/ -* +/ Stringi @@ -56,15 +56,17 @@ ify -a NLCST +one nlcst nod @@ -84,19 +84,16 @@ f nodes. - */ %0Afunctio @@ -464,17 +464,17 @@ gth%0A%0A / -* +/ Shortcu @@ -531,11 +531,8 @@ win. - */ %0A i
6743e03f49a06e28e23dbb6bbfc83a529c0de10d
Converts `basePath` to an absolute path
index.js
index.js
var postcss = require('postcss'); var parseBytes = require('./lib/parseBytes'); var unescapeCss = require('./lib/unescapeCss'); var fs = require('fs'); var path = require('path'); var url = require('url'); var base64 = require('js-base64').Base64; var mime = require('mime'); var sizeOf = require('image-size'); cons...
JavaScript
0.999537
@@ -533,16 +533,17 @@ ions) %7B%0A +%0A option @@ -561,16 +561,45 @@ %7C%7C %7B%7D;%0A +%0A if (options.basePath) %7B%0A option @@ -611,16 +611,29 @@ ePath = +path.resolve( options. @@ -640,19 +640,52 @@ basePath - %7C%7C +);%0A %7D else %7B%0A options.basePath = process @@ -692,16 +692,21 @@ .cw...
5b5f6762c61f62e9aad3f5b2414def65ad2378ba
Refactor to remove unneeded splice
index.js
index.js
'use strict'; var visit = require('unist-util-visit'); var remove = require('unist-util-remove'); var getDefinitions = require('mdast-util-definitions'); module.exports = inlineLinks; function inlineLinks(options) { return transformer; function transformer(tree) { var reference = referenceFactory(tree, opti...
JavaScript
0.000001
@@ -1231,25 +1231,17 @@ dren -.splice( +%5B index -, 1, +%5D = rep @@ -1248,17 +1248,16 @@ lacement -) ;%0A %7D%0A
3e1e84aeee6c188db72ffc5fb5961502346591e6
Create index.js
index.js
index.js
//import express module and create an express application var express = require('express'); var fs=require('fs'); //import file system module var app = express(); //sets the port for the server app.set('port', (process.env.PORT || 5000)); //serving files in 'public' directory app.use(express.static(__dirname + '/publ...
JavaScript
0.000002
@@ -2092,24 +2092,139 @@ %09%7D);%0A%09%7D);%0A +%09$(%22ul li%22).on(%22click%22, function() %7B%0A %09%09$(%22li%22).removeClass(%22active%22);%0A %09%09$(this).addClass(%22active%22);%0A %09%7D);%0A %7D);%0A%0A//creat
6c3dd0d62f7e83b50a2a0a71e7138c893c08d79f
Fix resolve for scp on Windows
lib/dvcs-url.js
lib/dvcs-url.js
'use strict'; // eslint-disable-line strict const url = require('url'); const path = require('path'); // Work with URLs used by Git and Mercurial. // Do it ourselves! // See GIT URLS on https://git-scm.com/docs/git-clone // // The following syntaxes may be used: // ssh://[user@]host.xz[:port]/path/to/repo.git/ // ...
JavaScript
0.000001
@@ -3535,32 +3535,38 @@ nst temp = path. +posix. join(urlObject.p
ce8fe0dd37a338dc31c26e3a37121fe2b56376a9
Stop mutating query
components/facet.js
components/facet.js
import { format } from 'url' import React from 'react' import PropTypes from 'prop-types' import { translate } from 'react-i18next' import { withRouter } from 'next/router' import Link from './link' class Facet extends React.Component { static propTypes = { facet: PropTypes.shape({ name: PropTypes.oneOf([...
JavaScript
0.000037
@@ -1297,14 +1297,43 @@ ame%5D -.push( + = %5B%0A ...match,%0A face @@ -1335,25 +1335,34 @@ facet.value -) +%0A %5D %0A %7D els
62ce550fcbd5427ce96b39d99785ac8683130ee1
Add alt / title
components/utils.js
components/utils.js
import React from 'react'; const connection = navigator.connection const slow = connection && /(^([23]g?)$)/.test(connection.type) const devicePixelRatio = (!slow && window.devicePixelRatio) || 1 export function logoFor(party) { return ( <img className="party-logo" src={`https://ww...
JavaScript
0.000005
@@ -285,16 +285,94 @@ y-logo%22%0A + alt=%7BpartyNameFor(party)%7D%0A title=%7BpartyNameFor(party)%7D%0A
abb3c03d73c657aae566def18f48a6be3e71659d
clear stack every 100 iterations of syncLoop to prevent segfault with complex blocks (e.g DRK block:72764)
lib/explorer.js
lib/explorer.js
var request = require('request') , settings = require('./settings') , Address = require('../models/address'); var base_url = 'http://127.0.0.1:' + settings.port + '/api/'; function coinbase_supply(cb) { Address.findOne({a_id: 'coinbase'}, function(err, address) { if (address) { return cb(address.sent)...
JavaScript
0
@@ -4363,59 +4363,287 @@ -process(loop); // Run our process, pass in the loop +if (index %25 100 === 0) %7B //clear stack%0A setTimeout(function() %7B%0A process(loop); // Run our process, pass in the loop%0A %7D, 0);%0A %7D else %7B%0A p...
ac14e691352412bf7d1e316b081e7430f592de93
Fix typo in ember-try configuration
config/ember-try.js
config/ember-try.js
/*jshint node:true*/ module.exports = { scenarios: [ { name: 'ember-1-13', bower: { dependencies: { 'ember': '~1.13.0' }, resolutions: { 'ember': '~1.13.0' } } }, { name: 'ember-2.0', bower: { dependencies: { ...
JavaScript
0.000057
@@ -74,17 +74,17 @@ 'ember-1 -- +. 13',%0A
cfab13d449d0f527d3ae33371ce4ff086e72ac5a
add ember-auto-import@^2.2.3 dependency to ember-release scenario (#705)
config/ember-try.js
config/ember-try.js
/* eslint-env node */ const getChannelURL = require('ember-source-channel-url'); const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); module.exports = function () { return Promise.all([ getChannelURL('release'), getChannelURL('beta'), getChannelURL('canary'), ]).then(urls =>...
JavaScript
0
@@ -1888,24 +1888,102 @@ releaseUrl,%0A + 'ember-auto-import': '%5E2.2.3',%0A webpack: '%5E5.0.0',%0A
26d1046ba3bdd4f129be07b2f7cc2bf81cc9efb7
fix ember-try scenario name
config/ember-try.js
config/ember-try.js
/*jshint node:true*/ module.exports = { scenarios: [ { name: 'default', bower: { } }, { name: 'ember-1.13', bower: { dependencies: { 'ember': '~1.13.0' }, resolutions: { 'ember': '~1.13.0' } } }, { name: 'ember...
JavaScript
0.998824
@@ -324,9 +324,9 @@ s-2. -4 +8 ',%0A
5d02be9b541c29b7e78061e8e5d82772f2f422cf
add opencv4 include path when building with auto-build script
lib/includes.js
lib/includes.js
const opencvBuild = require('opencv-build'); const { resolvePath, defaultIncludeDir, defaultIncludeDirOpenCV4 } = require('./commons'); if (opencvBuild.isAutoBuildDisabled()) { const explicitIncludeDir = resolvePath(process.env.OPENCV_INCLUDE_DIR); if (explicitIncludeDir) { console.log(explicitIncludeDir); ...
JavaScript
0
@@ -502,8 +502,62 @@ lude));%0A +console.log(resolvePath(opencvBuild.opencv4Include));%0A
c1569068893dc85ad889be6492fcb729872ecb1e
update API
lib/interval.js
lib/interval.js
/** * Interval.js * * @constructor * @param {function} func - The function you want to be called repeatly * @param {int} delay - milliseconds that should wait before each call * @param {int} lifetime - if set, clearInterval will be called after `lifetime` milliseconds */ function Interval(func, delay, lifetime) ...
JavaScript
0.000001
@@ -296,31 +296,23 @@ l(func, -delay, lifetime +options ) %7B%0A @@ -346,21 +346,35 @@ delay = -delay +options.delay %7C%7C 16 ;%0A th @@ -379,32 +379,40 @@ this.lifetime = +options. lifetime;%0A th @@ -397,32 +397,134 @@ tions.lifetime;%0A + this.useRequestAnimationFrame = options.useRequestAnim...
137ee18cd56ed4a9d37a9f318c76cdfa2e975ffe
remove debuging log
lib/js/drone.js
lib/js/drone.js
/* DEMO */ /* McCarthy evaluation */ var time = performance || Date; /* commom Drone constructor */ var Drone = function() { this.createCanvas(); this.createObjects(); this.initSpeedInput(); // this.addListeners(); this.frames = new Frames(function() { this.moveObjects(); this.clearCanvas(); th...
JavaScript
0.000001
@@ -2462,16 +2462,19 @@ ity;%0A + // console
ee38d9cc2437e8e43f9cd78048cffee873fca9c8
Use the correct value for input type="submit"
lib/jsonform.js
lib/jsonform.js
(function($,_) { // from Underscorejs // We copy it here to avoid conflicts with _.templateSettings var _template = function(str, data) { var c = { evaluate : /<%([\s\S]+?)%>/g, interpolate : /<%=([\s\S]+?)%>/g }; var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);}...
JavaScript
0.000092
@@ -2018,10 +2018,24 @@ ue=%22 -OK +%3C%25= elt.value %25%3E %22/%3E'
d37760cf2bd19632f22473098c166af786f62466
remove old comment
controllers/book.js
controllers/book.js
'use strict'; var zenodotus = angular.module('zenodotus', ['ngResource']); zenodotus.factory('Book', ['$resource', function($resource) { var Book = $resource('/books/:id', {id: '@id'}); Book.prototype.getUrl = function() { return 'https://www.googleapis.com/books/v1/volumes?q=isbn:' + this.isbn + '&callback=...
JavaScript
0
@@ -1280,46 +1280,8 @@ API%0A - //%0A // (Using a test ISBN for now)%0A $s
ddef0f254c3e8506177a3cae95796a8c9b6d3cf2
fix chat via title
controllers/chat.js
controllers/chat.js
exports.index = function (req, res) { res.render('chat/index'); };
JavaScript
0
@@ -61,9 +61,35 @@ dex' +, %7B%0A title: %22Chat%22%0A %7D );%0A%7D; +%0A
66f766677d71640aec1a071ff2ea92abcfbb0fac
rename this page in controller as well
controllers/help.js
controllers/help.js
const express = require('express'); const moment = require('moment'); const { Converter } = require('showdown'); const authHelper = require('../helpers/authentication'); const api = require('../api'); const { MAXIMUM_ALLOWABLE_TOTAL_ATTACHMENTS_SIZE_BYTE } = require('../config/global'); const router = express.Router(...
JavaScript
0
@@ -2016,19 +2016,22 @@ e: ' -Lern-Nugget +Datenschutzkur s',%0A
dc64af205e8fcbe6646d38d0fd4937c1c21229e3
Use interstellar-stellar-api
index.es6
index.es6
import {Module, Intent} from "interstellar-core"; import interstellarSessions from "interstellar-sessions"; import interstellarNetwork from "interstellar-network"; import interstellarUiMessages from "interstellar-ui-messages"; import moduleDatastore from "./util/module-datastore.es6"; const mod = new Module('interstel...
JavaScript
0.00672
@@ -157,16 +157,79 @@ twork%22;%0A +import interstellarStellarApi from %22interstellar-stellar-api%22;%0A import i @@ -518,16 +518,49 @@ twork);%0A +mod.use(interstellarStellarApi);%0A mod.use(
e5b07c659a3691e38f4cf7af7e6e4d42d89ed478
Add hooks to packages node context
lib/packages.js
lib/packages.js
var Q = require("q"); var _ = require("lodash"); var path = require("path"); var Packager = require("pkgm"); var pkg = require("../package.json"); var logger = require("./utils/logger")("packages"); var manager = new Packager({ 'engine': "codebox", 'version': pkg.version, 'folder': path.resolve(__dirname,...
JavaScript
0.000001
@@ -468,24 +468,59 @@ context = %7B%0A + hooks: require(%22./hooks%22),%0A even
8bbbc164b2854e5bbc6a7bb1e53123a2e8facbfd
remove redundant keys declaration, https://github.com/phetsims/perennial/issues/259 https://github.com/phetsims/phet-core/issues/97
js/accessibility/describers/DirectionEnum.js
js/accessibility/describers/DirectionEnum.js
// Copyright 2018-2022, University of Colorado Boulder /** * Possible directions for a freely draggable item; it can move up, down, left, right, * and along the diagonals of these orientations. * * @author Michael Kauzmann (PhET Interactive Simulations) * @author Jesse Greenberg (PhET Interactive Simulations) */...
JavaScript
0.000047
@@ -826,137 +826,12 @@ %3E %7B%0A -%0A%0A -/**%0A * @type %7Bstring%5B%5D%7D - the keys tha make up the enum%0A */%0A DirectionEnum.keys = Object.keys( DirectionEnum );%0A %0A
8fdf85685c3f105d16c98cae8e1e864471340012
update NativePermissionsAndroid.js to include ACCESS_BACKGROUND_LOCATION (#26668)
Libraries/PermissionsAndroid/NativePermissionsAndroid.js
Libraries/PermissionsAndroid/NativePermissionsAndroid.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. * * @format * @flow strict-local */ 'use strict'; import type {TurboModule} from '../TurboModule/RCTExport'; import * as TurboMod...
JavaScript
0.000001
@@ -806,24 +806,76 @@ T_ACCOUNTS'%0A + %7C 'android.permission.ACCESS_BACKGROUND_LOCATION'%0A %7C 'android
b414781099c5c6b0aed1f50e1e6a2aaae195fc78
Update powerup_ids.js
common/powerup_ids.js
common/powerup_ids.js
module.exports = { BOMB_STRENGTH: 5, BOMB_CAPACITY: 6, SPEED: 7, isAPowerup: function(id) { return id === this.BOMB_STRENGTH || id === this.BOMB_CAPACITY || id === this.SPEED; } }
JavaScript
0.000001
@@ -32,9 +32,10 @@ TH: -5 +10 ,%0A%0A%09 @@ -53,9 +53,10 @@ TY: -6 +12 ,%0A%0A%09 @@ -66,9 +66,10 @@ ED: -7 +14 ,%0A%0A%09 @@ -185,8 +185,9 @@ ED;%0A%09%7D%0A%7D +%0A
8a81a258e87f9a2a47f234e0a745250f5fb5376a
fix secrets for hpeful DB integration
config/secrets.js
config/secrets.js
module.exports = { db: process.env.MONGODB|| 'mongodb://nodejitsu_jeffscottward:mp8g56ren9fkig7tqofurrvhjd@ds029950.mongolab.com:29950/nodejitsu_jeffscottward_nodejitsudb9050804341', sessionSecret: process.env.SESSION_SECRET || 'mp8g56ren9fkig7tqofurrvhjd', localAuth: true, mailgun: { login: process.env....
JavaScript
0
@@ -21,30 +21,8 @@ db: - process.env.MONGODB%7C%7C 'mo @@ -84,20 +84,20 @@ hjd@ds02 -9950 +7479 .mongola @@ -106,13 +106,14 @@ com: -29950 +027479 /nod @@ -210,33 +210,15 @@ %7C%7C ' -mp8g56ren9fkig7tqofurrvhj +passwor d',%0A
6c5b00bd222a2694bd49dc1bae26fc449aa8e665
Fix regression in AssetModal.
commons/AssetModal.js
commons/AssetModal.js
import { Component, $$ } from '../dom' import { Form, FormRow, Modal, Input, HorizontalStack } from '../ui' export default class AssetModal extends Component { getInitialState () { // NOTE: when creating a new file, the file instance is passed as props const archive = this.context.api.archive const { mod...
JavaScript
0
@@ -343,16 +343,58 @@ .props%0A%0A + let data%0A if (mode === 'edit') %7B%0A let @@ -399,16 +399,18 @@ t asset%0A + if ( @@ -437,32 +437,34 @@ sset')) %7B%0A + asset = node%0A @@ -460,16 +460,18 @@ = node%0A + %7D el @@ -510,24 +510,26 @@ ')) %7B%0A + asset = arch ...
6898d08332102eaf480020d5085768db486f44e3
support nested queries
type-checker/lib/update-object.js
type-checker/lib/update-object.js
'use strict'; var assert = require('assert'); var JsigAST = require('../../ast/'); var cloneJSIG = require('./clone-ast.js'); module.exports = updateObject; function updateObject(targetType, keyPath, newValue) { if (targetType.type === 'object') { return _updateObject(targetType, keyPath, newValue); ...
JavaScript
0.000002
@@ -518,77 +518,20 @@ -assert(keyPath.length === 1, 'can only have shallow keys');%0A var k +var primaryK ey = @@ -899,17 +899,24 @@ key === -k +primaryK ey) %7B%0A
a6f1cf7fad32f212626c2c766bcf59b844c265fa
Include step stubs for Machine test
test/machine.js
test/machine.js
var assert = require('assert'); var expect = require('chai').expect; var Fabric = require('../'); var Machine = Fabric.Machine; describe('Machine', function () { it('should correctly compute a known instruction', function () { var machine = new Machine(); machine.use('OP_TEST', function (state) { ret...
JavaScript
0
@@ -270,18 +270,21 @@ machine. -us +defin e('OP_TE @@ -383,23 +383,20 @@ machine. -compu +s te +p ();%0A%0A
23b708440904d15f1f3001054f1c41ccda8ba51f
fix tests #157691848
src/c/dashboard-subscription-card-detail.js
src/c/dashboard-subscription-card-detail.js
import m from 'mithril'; import _ from 'underscore'; import moment from 'moment'; import UserFollowBtn from './user-follow-btn'; import ownerMessageContent from './owner-message-content'; import I18n from 'i18n-js'; import modalBox from './modal-box'; import subscriptionStatusIcon from './subscription-status-icon'; imp...
JavaScript
0
@@ -873,41 +873,17 @@ s = -Object.assign(args.user.address, +_.extend( %7Bcou @@ -906,16 +906,35 @@ ry.name%7D +, args.user.address );%0A @@ -1116,40 +1116,26 @@ + user = -Object.assign(args.user, +_.extend( %7Bpro @@ -1177,19 +1177,32 @@ nal_id %7D +, args.user ),%0A + @@ -1227,16 ...
af790efd13c2f28a444f207bb3e023844eb5b451
use URL object to parse URL
firefox-addon/data/panel.js
firefox-addon/data/panel.js
var urlInput = document.getElementById('url'); var passwordInput = document.getElementById('password'); var roundsInput = document.getElementById('rounds'); var keyindexInput = document.getElementById('keyindex'); var outputSpan =...
JavaScript
0
@@ -2079,105 +2079,8 @@ ex;%0A - var parts = urlInput.value.split('/'); // Extract protocol and host from input value%0A @@ -2259,75 +2259,89 @@ -UniquePasswordBuilder.generate(%7B protocol:parts%5B0%5D, host:parts%5B2%5D %7D +var url = new URL(urlInput.value);%0A UniquePasswordBuilde...
5f7d2177d330fe85a56f63b2df5b7cf6f844aab6
add isPending helper
packages/nova-posts/lib/helpers.js
packages/nova-posts/lib/helpers.js
import moment from 'moment'; import Posts from './collection.js'; import Users from 'meteor/nova:users'; ////////////////// // Link Helpers // ////////////////// /** * @summary Return a post's link if it has one, else return its post page URL * @param {Object} post */ Posts.getLink = function (post, isAbsolute = f...
JavaScript
0.000018
@@ -2749,32 +2749,271 @@ ved(this);%7D%7D);%0A%0A +/**%0A * @summary Check if a post is pending%0A * @param %7BObject%7D post%0A */%0APosts.isPending = function (post) %7B%0A return post.status === Posts.config.STATUS_PENDING;%0A%7D;%0APosts.helpers(%7BisPending: function () %7Breturn Posts.isPending(this);%7D%7D);%0...
356a31113535120339bfdc6c32a6b4faa7fd332e
fix linting error
src/client/providers/react-router-scroll.js
src/client/providers/react-router-scroll.js
import React from 'react'; import { Provider } from 'react-redux'; import { applyRouterMiddleware, browserHistory, Router } from 'react-router'; import { useScroll } from 'react-router-scroll'; import getRoutes from 'universal-redux/routes'; export default function(store, devComponent) { const root = ( <Provider...
JavaScript
0.000005
@@ -259,16 +259,17 @@ function + (store,
7616070cf1958e0b36201b6503af133376de5643
add comment about plugin workaround
packages/plugin-tab/src/snippet.js
packages/plugin-tab/src/snippet.js
function addPanels() { window.patternlab.panels.add({ id: 'sg-panel-scss', name: 'SCSS', default: false, templateID: 'pl-panel-template-code', httpRequest: true, httpRequestReplace: '.scss', httpRequestCompleted: false, prismHighlight: true, language: 'scss', keyCombo: 'ctrl+sh...
JavaScript
0
@@ -330,16 +330,80 @@ %7D);%0A%7D%0A%0A +// workaround to try recovering from load order race conditions%0A if (wind
e53b04123a01dca30ee2c472e7f91fbc9d922dd2
update to add ariaControls prop
react/src/components/toggle/SprkToggle.js
react/src/components/toggle/SprkToggle.js
import React, { Component } from 'react'; import AnimateHeight from 'react-animate-height'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import SprkIcon from '../icons/SprkIcon'; import uniqueId from 'lodash/uniqueId'; class SprkToggle extends Component { constructor(props) { super(pr...
JavaScript
0
@@ -876,16 +876,36 @@ onName,%0A + ariaControls,%0A .. @@ -911,16 +911,16 @@ ..other%0A - %7D = @@ -979,68 +979,8 @@ e;%0A%0A - const ariaControls = uniqueId('sprk_toggle_content_');%0A%0A @@ -2089,16 +2089,66 @@ color',%0A + ariaControls: uniqueId('sprk_toggle_content_'),%0A %7D;%0A%0A...
a3ce1abfd8843660279049131a90bfc8ddff80b4
remove params, add timeout to avoid null data
www/js/controllers/main.js
www/js/controllers/main.js
// Login Page angular.module('healthCalculators') .controller('MainCtrl', function ($scope, $rootScope, $location, $window, loginFactory) { $scope.signIn = function() { loginFactory.signIn(); }; });
JavaScript
0
@@ -105,26 +105,155 @@ e, $ -location, $window, +timeout, loginFactory) %7B%0A%0A $scope.user = loginFactory.getUser();%0A $scope.env = loginFactory.getEnv();%0A%0A $scope.signIn = function() %7B%0A log @@ -261,24 +261,33 @@ nFactory -) %7B +.signIn(); %0A +%7D; %0A $sc @@ -286,34 +286,35 @@ ...
533c86b7f63c969986a4ede47c3f14f0cad75b1a
Fix dependency requirement
lib/sentinel.js
lib/sentinel.js
var config = require('./configBase.js'); var redis = require('redis'); var EventEmitter = require('events').EventEmitter; var util = require('util'); var childProcess = require('child_process'); var _ = require('underscore'); var log = require('PDITCLogger'); var logger = log.newLogger(); logger.prefix = path.basename...
JavaScript
0.000009
@@ -304,12 +304,23 @@ x = +require(' path +') .bas
6c55320d3f0eb23de56270a55c74602fc8d63c8a
Use \s in the regex for better readability.
javascript/atoms/locators/id.js
javascript/atoms/locators/id.js
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
JavaScript
0
@@ -3394,22 +3394,26 @@ ape +white space -s because som @@ -3412,16 +3412,16 @@ ause +%0A * some -%0A * web @@ -4020,17 +4020,18 @@ lace(/(%5B - +%5Cs '%22%5C%5C#.:;
e2ff627ea09278fb28a65c2d6082e7df5dee0697
Improve timestamp docs
local_modules/timestamp/index.js
local_modules/timestamp/index.js
// HTML timestamp. Keep this module separate for // server-side usage. var timeago = require('./timeago'); module.exports = function (isoTime) { // Parameters: // isoTime // string in ISO format. See ISO 8601 return '<time datetime="' + isoTime + '" title="' + isoTime + '" data-toggle="tooltip...
JavaScript
0.000032
@@ -16,58 +16,97 @@ mp. -Keep this module separate for%0A// server +Intended for both client and server side%0A// unlike georap-ui that is for client -side -usage +only .%0A%0Av
04222e260ba0345ad7e43cec64fab0fa7879c9c8
Up tweet count to 200
javascript/services.js
javascript/services.js
angular.module('Gistter.services', []).factory('twitterService', function($q) { var authorizationResult = false; return { initialize: function() { //initialize OAuth.io with public key of the application OAuth.initialize('aPN6TnBWF7isEd2atAUftS3UbOg', { cache: t...
JavaScript
0.999989
@@ -1590,16 +1590,26 @@ ine.json +?count=200 ';%0A @@ -1719,17 +1719,16 @@ url += ' -? max_id='
27510eceb22ce1508d70758d3b786ac11f641014
Update helpers.js
components/helpers.js
components/helpers.js
const Crypto = require('crypto'); const OS = require('os'); const SteamID = require('steamid'); const EOSType = require('../enums/EOSType.js'); const EResult = require('../enums/EResult.js'); /** * If the input isn't already a SteamID object, converts it into one and returns it * @param input * @returns {SteamID} ...
JavaScript
0
@@ -1002,18 +1002,18 @@ et id = -os +OS .hostnam @@ -1018,18 +1018,18 @@ ame() + -os +OS .totalme
313a454114e917dc75924edd33e57862567682e7
fix displaying filename after creation
lib/jekyll-admin/public/src/containers/views/DataFileNew.js
lib/jekyll-admin/public/src/containers/views/DataFileNew.js
import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { browserHistory } from 'react-router'; // Constants import { ADMIN_PREFIX } from '../../constants'; // Components import Editor from '../../components/Editor'; // Actions im...
JavaScript
0.000001
@@ -631,35 +631,23 @@ // -check if there is an +trim the exten -t +s ion%0A @@ -656,40 +656,12 @@ -const slug = filename.substr(0, +if ( file @@ -685,25 +685,8 @@ '.') -);%0A if (slug %3E 0 @@ -712,12 +712,53 @@ e = -slug +filename.substr(0, filename.lastIndexOf('.')) ;%0A
1d2cdc001be64d1e2415fb6fad45f375880594f0
add convenience methods for game pad buttons #core (cherry picked from commit e30ac6f)
www/js/highfivejs/input/entity/GamePad.js
www/js/highfivejs/input/entity/GamePad.js
H5.GamePad = (function (navigator) { "use strict"; var Button = { A: 0, B: 1, X: 2, Y: 3, LEFT_BUMPER: 4, RIGHT_BUMPER: 5, LEFT_TRIGGER: 6, RIGHT_TRIGGER: 7, BACK: 8, START: 9, LEFT_STICK: 10, RIGHT_STICK: 11, ...
JavaScript
0
@@ -2345,32 +2345,518 @@ START);%0A %7D;%0A%0A + GamePad.prototype.isDPadUpPressed = function () %7B%0A return this.__isButtonPressed(Button.D_PAD_UP);%0A %7D;%0A%0A GamePad.prototype.isDPadRightPressed = function () %7B%0A return this.__isButtonPressed(Button.D_PAD_RIGHT);%0A %7D;%0A%0A ...
7bc4b9d4aa03577153853122f96d9581c9294226
Fix a bug
client/components/ExternalShare/AccessLogModal.js
client/components/ExternalShare/AccessLogModal.js
import React from 'react' import PropTypes from 'prop-types' import { translate } from 'react-i18next' import moment from 'moment' import platform from 'platform' import { Modal, Table, Alert } from 'react-bootstrap' import Pagination from 'components/Common/Pagination' class AccessLogModal extends React.Component { ...
JavaScript
0.000192
@@ -2773,20 +2773,8 @@ ', %7B - ...options, lim @@ -2795,16 +2795,28 @@ : pageId +, ...options %7D)%0A @@ -3216,16 +3216,159 @@ %7D%0A %7D%0A%0A + componentDidMount() %7B%0A const %7B pageId = null %7D = this.props%0A if (pageId !== this.state.pageId) %7B%0A this.getPage(pageId)%0A %7D%0A %...
47dd11e576cc78a61922ae5758f81574e7fd10b9
Use PreviewField for LocationPreview
client/src/components/previews/LocationPreview.js
client/src/components/previews/LocationPreview.js
import { gql } from "@apollo/client" import API from "api" import Leaflet from "components/Leaflet" import _escape from "lodash/escape" import { Location } from "models" import PropTypes from "prop-types" import React from "react" const GQL_GET_LOCATION = gql` query($uuid: String!) { location(uuid: $uuid) { ...
JavaScript
0
@@ -52,16 +52,70 @@ m %22api%22%0A +import %7B PreviewField %7D from %22components/FieldHelper%22%0A import L @@ -1229,100 +1229,40 @@ %3C -div className=%22p +P review --f +F ield -- + label += %22 -%3E Name -%3C/div%3E%0A %3Cdiv className=%22preview-field- +%22 value -%22%3E += %7Bloc @@ -1272,2...
4e3ee90c78562525ce6e418439eb46a9e49657fa
Update util.js
rest-on-couch/util.js
rest-on-couch/util.js
'use strict'; module.exports = { async getNextId(roc, viewName, type) { const v = await roc.view(viewName, { reduce: true }); if (!v.length || !v[0].value || !v[0].value[type]) { return type + '-000001-' + getCheckDigit(1); } var id = v[0].value[typ...
JavaScript
0.000001
@@ -381,24 +381,104 @@ urrent + 1;%0A + return numberToId(nextID, type);%0A %7D%0A %0A numberToId(num, type) %7B%0A var @@ -500,21 +500,18 @@ kDigit(n -extID +um );%0A @@ -518,21 +518,18 @@ var n -extID +um Str = St @@ -534,21 +534,18 @@ String(n -extID +um );%0A @@ -583,21...
e90dae3f5520efecf3d27cf463b893eafd598266
remove autoscroll from popup
packages/shared/src/popup/Popup.js
packages/shared/src/popup/Popup.js
// @flow strict import * as React from 'react'; import { View, ScrollView } from 'react-native'; import { SafeAreaView } from 'react-navigation'; import { defaultTokens } from '@kiwicom/mobile-orbit'; import AdaptableLayout from '../view/AdaptableLayout'; import Modal from '../Modal'; import StyleSheet from '../Platf...
JavaScript
0
@@ -489,359 +489,43 @@ %7B%0A -scrollView: ?React$ElementRef%3CScrollView%3E;%0A%0A constructor() %7B%0A super();%0A%0A this.scrollView = null;%0A %7D%0A%0A onClose = () =%3E this.props.onClose();%0A%0A scrollToEnd = () =%3E %7B%0A if (this.scrollView) %7B%0A this.scrollView.scrollToEnd(%7B animate...
9f8d8f954faedbe7d3ccc64320781072b80000c9
fix compatibility with S4E
resource/modules/compatibilityFix/S4E.jsm
resource/modules/compatibilityFix/S4E.jsm
// VERSION 2.0.1 this.S4E = { state: false, get progress () { return $('urlbar-progress-alt'); }, handleEvent: function(e) { switch(e.type) { // focusing forces a Top style, but bluring sometimes doesn't revert back to the original style, // I have no idea how _pmpack is lost though case 'LoadedSlimChr...
JavaScript
0
@@ -8,17 +8,17 @@ ION 2.0. -1 +2 %0A%0Athis.S @@ -1287,23 +1287,19 @@ %7D, ' -status4evar', ' +caligon.s4e ');%0A
08466c8cdd7ad34a8da2e3987de772e8459d1218
clarify code variables
packages/truffle-contract/index.js
packages/truffle-contract/index.js
const Schema = require("truffle-contract-schema"); const Contract = require("./lib/contract"); const truffleContractVersion = require("./package.json").version; const contract = (options = {}) => { const binary = Schema.normalize(options); // Note we don't use `new` here at all. This will cause the class to // ...
JavaScript
0.000329
@@ -173,23 +173,20 @@ ract = ( -opti +js on -s = %7B%7D) = @@ -197,22 +197,40 @@ const -binary +normalizedArtifactObject = Schem @@ -245,15 +245,12 @@ ize( -opti +js on -s );%0A%0A @@ -398,14 +398,32 @@ one( -binary +normalizedArtifactObject );%0A%7D
9b712a9ef8d47db1171d8b0cc00547ac64f2f266
Make sure elem.href is not relative, disable fuzzy substring matching
hnduplicatechecker.js
hnduplicatechecker.js
let hnDuplicateChecker = (function(){ let input = document.querySelector( 'input[name=url]' ), elem = document.createElement( 'a' ), yearAgo = Math.floor( Date.now() / 1000 ) - 31540000, request; input.addEventListener( 'blur', getDuplicates ); function getDuplicates(){ elem.href = input.value; ...
JavaScript
0.000001
@@ -315,107 +315,181 @@ alue -;%0A let host = elem.host, // TODO: Modify this such that host will not be empty with bare domains +.includes( '//' ) ? input.value : '//' + input.value; // Hacky way to ensure protocol exists so elem.href is not relative to document.location.host%0A let host = elem.host, %0A @@...
6a3089a803350308fa60860ed561e40277619203
Add assertion to validate HTML is correct.
zerver/tests/frontend/node/stream_list.js
zerver/tests/frontend/node/stream_list.js
var assert = require('assert'); add_dependencies({ _: 'third/underscore/underscore', Dict: 'js/dict', Handlebars: 'handlebars', templates: 'js/templates', muting: 'js/muting', narrow: 'js/narrow', hashchange: 'js/hashchange' }); set_global('recent_subjects', new global.Dict()); set_global(...
JavaScript
0
@@ -411,16 +411,47 @@ .js');%0A%0A +global.$ = require('jquery');%0A%0A global.u @@ -953,15 +953,106 @@ c_html); +%0A%0A var topic = $(topic_html).find('a').text().trim();%0A assert.equal(topic, 'coding'); %0A%7D());%0A
f1d5f53c90c504b1895546de6fad4d39cbfb70a2
fix long line
src/components/textarea/textarea.stories.js
src/components/textarea/textarea.stories.js
import React from 'react'; import { storiesOf } from '@storybook/react'; import { boolean, number, text, select } from '@storybook/addon-knobs'; import { State, Store } from '@sambego/storybook-state'; import Textarea from './textarea'; import OptionsHelper from '../../utils/helpers/options-helper'; import notes from...
JavaScript
0.671454
@@ -625,16 +625,17 @@ Helper;%0A +%0A cons @@ -635,18 +635,16 @@ const - %7B warnOve @@ -653,80 +653,35 @@ imit -: limitWarn, expandable: expand, enforceCharacterLimit: enforce + = boolean('warnOver Limit - %7D = +', Tex @@ -701,72 +701,22 @@ Prop -s;%0A%0A const warnOverLimit = boolean('warnOverLim...
114c2de2d59c5cdde09ff2c5f446d9e182523762
Update API version
config/api-version.js
config/api-version.js
/* eslint-env node */ module.exports = 'v1.36';
JavaScript
0
@@ -42,8 +42,8 @@ v1.3 -6 +7 ';%0A
3bbcb64c6b5b786cdb1936a7eace6e6684c420d7
update layout
src/containers/DocumentPage/DocumentPage.js
src/containers/DocumentPage/DocumentPage.js
// Style import './_DocumentPage.scss'; // React & Redux import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; // import ArticleListItem from '../../components/ArticleListItem/ArticleListItem'; import * as DocumentActions from '../../ac...
JavaScript
0.000001
@@ -1007,24 +1007,41 @@ %3C/button%3E%0A + %3Cbr /%3E%0A %3Cd
6b3d509522f43d8c3923734ff55945410806806d
Move method below constructor
lib/tags/Tag.js
lib/tags/Tag.js
module.exports = class Tag { static create(id, name) { switch (id) { case 0: return new EndTag(name); case 1: return new ByteTag(name); case 2: return new ShortTag(name); case 3: return new IntTag...
JavaScript
0
@@ -1120,24 +1120,107 @@ me);%0A %7D%0A%0A + constructor(id, name) %7B%0A this.id = id;%0A this.name = name;%0A %7D%0A%0A loadFrom @@ -1318,91 +1318,8 @@ %7D -%0A%0A constructor(id, name) %7B%0A this.id = id;%0A this.name = name;%0A %7D %0A%7D%0A%0A
48a081e175a7c84d9aa0073cdfcc6846056ee650
Улучшить распознование типа кода в ace
js/ace-sample-frame.js
js/ace-sample-frame.js
// Ace editor loader (function(global) { var aceSrc = 'https://cdn.jsdelivr.net/g/ace@1.2.3(' + 'noconflict/ace.js+' + 'noconflict/mode-html.js+' + 'noconflict/theme-chrome.js+' + 'noconflict/mode-json.js)'; var aceEditorsLoader = new Promise(function(resolve, reject) { loader(global.document, ...
JavaScript
0.000001
@@ -320,23 +320,16 @@ aceSrc) -%0A .then(ac @@ -341,23 +341,16 @@ orsInit) -%0A .then(fu @@ -388,28 +388,15 @@ - Promise -%0A .all @@ -415,27 +415,16 @@ romises) -%0A .then(fu @@ -436,28 +436,24 @@ n(result) %7B%0A - reso @@ -469,22 +469,8 @@ t);%0A - ...
9c3db542d9ef96c90dd14a3a4499fd9284fa9ff7
Allow for center alignment of vertex labels.
js/barycentric-main.js
js/barycentric-main.js
/*globals Barycentric*/ (function( window, document, undefined ) { 'use strict'; var PI2 = 2 * Math.PI; var canvas = document.getElementById( 'barycentric-canvas' ), context = canvas.getContext( '2d' ); canvas.width = 512; canvas.height = 512; var mouse = { x: 0, y: 0 }; function onM...
JavaScript
0
@@ -4186,16 +4186,23 @@ tAlign = + dx ? ( dx %3E 0 @@ -4219,16 +4219,29 @@ 'right' + ) : 'center' ;%0A @@ -4258,16 +4258,23 @@ seline = + dy ? ( dy %3E 0 @@ -4291,16 +4291,29 @@ 'bottom' + ) : 'middle' ;%0A%0A
782e08e44c2149ae1ed0d2cb5a7e4a5940ab8f49
replace cheerio with native DOM in extractHeadword
src/core/extractHeadword/extractHeadword.js
src/core/extractHeadword/extractHeadword.js
import cheerify from '../../utils/cheerify/cheerify'; const extractHeadword = pageMarkup => { const $ = cheerify(pageMarkup); const headword = $('h1.pagetitle') // I add h1 in selector, because page has two .pagetitle elements, and one of them is span .text() .trim(); return headword; } export default ex...
JavaScript
0.000006
@@ -1,20 +1,18 @@ import -cheer +dom ify from @@ -29,27 +29,22 @@ ils/ -cheerify/cheer +domify/dom ify' -; %0A%0Aco @@ -85,24 +85,32 @@ %3E %7B%0A -%09 + const -$ = cheer +headword = dom ify( @@ -124,32 +124,31 @@ kup) -;%0A%0A%09const headword =%0A%09%09$ +%0A .querySelector ('h1 @@ -255,33 +255...