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
04962c1bf228ce05aa898b710163424693f822da
update the loop when the speed is changed
src/app/home/home.js
src/app/home/home.js
angular.module( 'ngBoilerplate.home', [ 'ui.router', 'directive.diGameBoard', 'directive.diGameMenu', 'service.GameManager', 'service.animframePolyFill', 'service.Keyboard' ]) .config(function config( $stateProvider ) { $stateProvider.state( 'home', { url: '/home', views: { "main": { ...
JavaScript
0
@@ -654,18 +654,64 @@ var loop - = +;%0A%0A function setUpGameLoop() %7B%0A return _.throt @@ -817,24 +817,59 @@ %0A %7D); +%0A %7D%0A%0A loop = setUpGameLoop(); %0A%0A functi @@ -1316,16 +1316,21 @@ adcast(' +home. GameOn') @@ -2505,18 +2505,16 @@ pe.$on(' -di Piece.cr @@ -2584,24 +2...
34f2069c10969959021b5a392d4de95bfe97af8c
correct wording
src/main/javascript/backbone.chromeStorage.js
src/main/javascript/backbone.chromeStorage.js
/* Copyright 2013 Simon Paulger <spaulger@codezen.co.uk> 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 agre...
JavaScript
0.999886
@@ -5450,16 +5450,23 @@ tify err +or call back if
ee80d73a864186046cd2c49afe2fc09bc5806ac2
fix wrong arguments (thanks flow 0.32)
Tuple.js
Tuple.js
// @flow import { HKT } from './HKT' import type { HKT2 } from './HKT' import type { Semigroupoid } from './Semigroupoid' import type { Functor } from './Functor' import type { Bifunctor } from './Bifunctor' import type { Extend } from './Extend' import type { Comonad } from './Comonad' class IsTuple {} export type T...
JavaScript
0
@@ -1099,16 +1099,17 @@ %5Bf(ac%5B0%5D +) , g(ac%5B1 @@ -1110,17 +1110,16 @@ g(ac%5B1%5D) -) %5D)%0A%7D%0A%0Aex
b0892f4482aa0537b79fb5e71098cc9b0cf94003
Revert "Allow dynamic arguments to twine to pass into applicaiton. For Server side params"
Twine.js
Twine.js
/** * @license Copyright (c) 2011 Cello Software, LLC. * All rights reserved. * Available via the new BSD License. */ /*jshint asi: false, bitwise: false, boss: false, curly: true, eqeqeq: true, eqnull: false, es5: true, evil: false, expr: true, forin: true, globalstrict: false, immed: true, indent: 4, latedef: t...
JavaScript
0
@@ -1303,20 +1303,16 @@ n Twine( -args ) %7B%0A%09%09// @@ -1762,35 +1762,8 @@ %09%09%7D%0A -%09%09this.args = args %7C%7C %7B%7D ;%0A %09%7D%0A%0A
14220defded8cad05af0f67f42b9948cefc0e151
Refactor background script
background.js
background.js
import { urlInfo } from "./helpers"; // fires when tab is updated chrome.tabs.onUpdated.addListener(updateBadge); // fires when active tab changes chrome.tabs.onActivated.addListener(updateBadge); chrome.tabs.onCreated.addListener(updateBadge); function updateBadge() { // get active tab on current window chrome....
JavaScript
0
@@ -405,19 +405,27 @@ const -t +%5BactiveT ab +%5D = array @@ -430,20 +430,47 @@ ayOfTabs -%5B0%5D; +;%0A%0A if (!activeTab) return;%0A %0A con @@ -500,17 +500,23 @@ urlInfo( -t +activeT ab.url). @@ -538,109 +538,8 @@ ng;%0A - // the return value is an array%0A var activeTab = arrayOfTabs%5B0%5D...
1246e79eba8e7957df3c9adca7908af96e50ba18
Fix teardown script
samples/e2eTestUtils/jest-puppeteer-utils/jestTeardown.js
samples/e2eTestUtils/jest-puppeteer-utils/jestTeardown.js
const serverUtils = require("./serverUtils"); function kill(rootDir) { serverUtils.killServer(rootDir); }; module.exports = (jestOptions) => { if(jestOptions.projects) { jestOptions.projects.forEach((project) => { const jestConfig = require(`${project}\\jest.config.js`); kill(j...
JavaScript
0.000001
@@ -38,16 +38,46 @@ Utils%22); +%0Aconst path = require(%22path%22); %0A%0Afuncti @@ -298,21 +298,31 @@ ire( -%60$%7B +path.resolve( project -%7D%5C%5C +, %22 jest @@ -335,9 +335,10 @@ g.js -%60 +%22) );%0A
877e484b792fc0cee2ba148657b13aabb30fdb77
Update Actor.move to return current coordinates
actor.js
actor.js
var Actor = function(args) { this.context = args.context; this.x = args.startX; this.y = args.startY; this.name = args.name; this.radius = 6; this.direction = args.direction; this.speed = PAC_MOVE_DELAY; this.mouthPos = 0.0; this.mouthIsOpening = true; this.moveIntervalID = false; this.keyStates =...
JavaScript
0.000001
@@ -3825,32 +3825,31 @@ turn + %7Bx: this. -detectCollision(); +x, y: this.y%7D %0A%7D;%0A
27ea2b2e1951431b0f6bae742d7c3babf5053bc1
Configure tests to fail fast
jest.config.js
jest.config.js
module.exports = { verbose: !!process.env.VERBOSE, moduleNameMapper: { testHelpers: '<rootDir>/testHelpers/index.js', }, setupTestFrameworkScriptFile: '<rootDir>/testHelpers/setup.js', testResultsProcessor: './node_modules/jest-junit', testPathIgnorePatterns: ['/node_modules/'], testEnvironment: 'node...
JavaScript
0
@@ -316,10 +316,24 @@ 'node',%0A + bail: true,%0A %7D%0A
ebfbf5c60ec1e9b223aca380fc5bb929638b553f
Put the return back where it was, we are just chaining at this point.
jquery.thar.js
jquery.thar.js
/*! * jquery.thar - Automatic content anchors * https://github.com/gocom/jquery.thar * * Copyright (C) 2013 Jukka Svahn * * 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 restr...
JavaScript
0
@@ -2011,16 +2011,23 @@ %3E');%0A%0A%09%09 +return this.eac @@ -3569,23 +3569,8 @@ %7D);%0A -%09%09return this;%0A %09%7D;%0A
24531bc4cdf85e3f59704d1b295d4eeb62c00a2e
Fix exited bars being maintained for longer than needed
src/browser/chart.js
src/browser/chart.js
const d3 = require('d3'); module.exports = class { constructor(user, pings) { const chartEl = document.querySelector('#chart'); const d3Svg = d3.select(chartEl).append('svg:svg'); // [1] Use the parent node dimensions as Firefox doesn't seem to work with // the svg element ones const d3SvgHeight ...
JavaScript
0
@@ -2610,20 +2610,16 @@ interval - * 2 ).remove
3b800687f60dd1170a5cf378c4908a81f9d803cb
add TODO items for issues, #393
js/MenuItem.js
js/MenuItem.js
// Copyright 2017, University of Colorado Boulder /** * TODO #393 document me * * @author - Michael Kauzmann (PhET Interactive Simulations) */ define( function( require ) { 'use strict'; // modules var inherit = require( 'PHET_CORE/inherit' ); var joist = require( 'JOIST/joist' ); var Tandem = require( ...
JavaScript
0
@@ -1935,24 +1935,82 @@ options );%0A%0A + //TODO #393 don't pass option to Node.call and mutate%0A Node.cal @@ -2016,24 +2016,24 @@ ll( this, %7B%0A - cursor @@ -3779,16 +3779,94 @@ %0A %7D%0A%0A + //TODO #393 does not follow PhET convention, see for example sun.Carousel%0A this @@ -5469,2...
15053b98ca37ed8c24a40f02ce68c60f161c4d15
Rename ObjectIO.instance => phetioObject, see https://github.com/phetsims/tandem/issues/91
js/SliderIO.js
js/SliderIO.js
// Copyright 2017-2018, University of Colorado Boulder /** * IO type for Slider * * @author Sam Reid (PhET Interactive Simulations) */ define( function( require ) { 'use strict'; // modules var BooleanIO = require( 'TANDEM/types/BooleanIO' ); var NodeIO = require( 'SCENERY/nodes/NodeIO' ); var phetioInh...
JavaScript
0
@@ -811,32 +811,36 @@ this. -instance +phetioObject .setMajorTic @@ -1141,24 +1141,28 @@ this. -instance +phetioObject .setMino
44a941d6e3adf6c592b8b003bb6b37e7a9e0cb6c
change image size to overflow:hidden;
js/get_data.js
js/get_data.js
$(function() { $.getJSON("https://mywebservice.info/beautyUniversity/data_out.php", function(data) { var str = ""; for (var i = data.length - 1; i >= 0; i--) { if(data[i]["message"] === "" || data[i]["object_id"] === "") { continue; } str += "<img class='shadow-img' data-src='"+"https://graph.facebook...
JavaScript
0
@@ -681,16 +681,18 @@ () %7B%0A%09%09%09 +// var maxH @@ -737,16 +737,18 @@ px%22;%0A%09%09%09 +// $( %22.pho @@ -794,16 +794,71 @@ ight );%0A +%09%09%09$( %22.photopopup img%22 ).css( %22overflow%22, %22hidden%22 );%0A %09%09%7D%0A%09%7D);
78c1a1612074070d4f3f91c365f9c8d878e84e49
Update mentions.js
js/mentions.js
js/mentions.js
jQuery(function($){ var urls = []; var base; $("*[data-webmention-count]").each(function(i,e){ var parser = document.createElement('a'); parser.href = $(e).data('url'); base = parser.protocol + "//" + parser.hostname; urls.push(parser.pathname+parser.search); }); $.getJSON("https://webmentio...
JavaScript
0.000001
@@ -16,37 +16,8 @@ ($)%7B -%0A var urls = %5B%5D;%0A var base; %0A%0A @@ -120,19 +120,14 @@ -parser.href +target = $ @@ -147,107 +147,8 @@ ');%0A - base = parser.protocol + %22//%22 + parser.hostname;%0A urls.push(parser.pathname+parser.search);%0A %7D) @@ -215,46 +215,22 @@ -base: base,%0...
d911c9dfb76e8a3336a36321bbb7045a48991537
Move idle to more sensible location.
js/organism.js
js/organism.js
function Organism(sex) { return { id: guid(), type: 'organism', sex: sex || Math.random() < 0.5 ? 'male' : 'female', position: { x: Math.floor(Math.random() * canvas.width) + 1, y: Math.floor(Math.random() * canvas.height) + 1 }, task: 'idle', ...
JavaScript
0
@@ -1580,17 +1580,17 @@ argin = -5 +2 ;%0A%0A @@ -2277,32 +2277,238 @@ lse;%0A %7D,%0A + idle: function () %7B%0A this.position.x += Math.floor(Math.random() * -3) + 2;%0A this.position.y += Math.floor(Math.random() * -3) + 2;%0A this.checkBlocked();%0A %7D...
b2d01b023d7f9d8a0e052428376a05dc29794f37
fix ga location field => referrer
js/pageview.js
js/pageview.js
'use strict'; /* Send pageview signal to analytics providers IVW and Google Analytics. Not to be tied to angular app. */ var sendPageview = { _foundProviders: [], // Cache after first lookup _sendIVW: function() { if (!window.iom) return; var iam_data = { "st": window._iframeDataset.szmSt, // ...
JavaScript
0.000001
@@ -699,25 +699,8 @@ nd', - 'pageview', '/', %7B%0A @@ -740,16 +740,17 @@ referrer +, // set @@ -763,16 +763,44 @@ ent url%0A + hitType: 'pageview'%0A %7D)
92fd1d12aab980182fceae67bfa24789e8716282
create featuredIndex array
js/projects.js
js/projects.js
--- --- function slugify(text) { text = text.replace(/[^-a-zA-Z0-9\s+]+/ig, ''); text = text.replace(/\s+/gi, "-"); return text; } var cfapi_url = 'http://codeforamerica.org/api/organizations/Code-for-San-Francisco/projects'; // Go get projects! Then show them off. $.getJSON(cfapi_url, showProjects); function ...
JavaScript
0.000001
@@ -530,16 +530,18 @@ %7B%0A +// featured
aaae7bdc5e57c0a59e4b2914b86870009d1179fb
Fix the broken register button. Remove the previous validation errors when re-clicking
js/register.js
js/register.js
(function() { $('#register-btn').on('click', function(e) { e.preventDefault(); var confirmPassword = $('#confirm-user-password').val(); var password = $('#user-password').val(); var $email = $('#user-email'); if($email.val().trim() === '') { e.preventDefault(); $email.after('<span class="validation-...
JavaScript
0.000002
@@ -55,32 +55,45 @@ (e) %7B%0A%09%09 -e.preventDefault +$('.validation-error').remove ();%0A%09%09va
7eeb54c4179af85280a5e54c34a2823136de79fa
Fix for recent updates from javascriptobfuscator.com
jsObfuscate.js
jsObfuscate.js
var Q = require('q'); var http = require('http'); var entities = require('entities'); var querystring = require('querystring'); var htmlparser = require('htmlparser2'); function request(method, postData, reqHeaders) { var deferred = Q.defer(); reqHeaders = reqHeaders || {}; var headers = { ...
JavaScript
0
@@ -2993,20 +2993,50 @@ s = %7B%7D;%0A - +%09if(res.headers%5B'set-cookie'%5D)%7B%0A%09%09 var cook @@ -3070,20 +3070,18 @@ e'%5D%5B0%5D;%0A - +%09%09 var cook @@ -3127,20 +3127,18 @@ (';'));%0A - +%09%09 headers%5B @@ -3161,16 +3161,24 @@ iedata;%0A +%09%7D%0A %0A head
e3e848f78a979c08ce155470df7a2e6fdaa9bb8e
Fix setting temp to null when filter is used
jsaf.js
jsaf.js
/*! * JSAF by OriginalEXE * https://github.com/OriginalEXE/JSAF * MIT licenced */ window.JSAF = { actions: {}, // holds all actions filters: {}, // holds all filters functions: {}, // holds all functions temp: {}, // will hold actions or filters but only temporary add_action: function( hook, user_function, ...
JavaScript
0
@@ -3893,24 +3893,47 @@ %09%09%7D);%0A%0A%09%09%7D); +%0A%09%09%0A%09%09this.temp = null; %0A%0A%09%09if ( is_ @@ -3985,37 +3985,16 @@ ;%0A%0A%09%09%7D%0A%0A -%09%09this.temp = null;%0A%0A %09%7D,%0A%0A%09ap
b768dadfacfa128b6215ed814f255e47aabf803b
Set Uvs.
PlanetBuilderWeb/scripts/PlanetChunckMeshBuilder.js
PlanetBuilderWeb/scripts/PlanetChunckMeshBuilder.js
var PlanetChunckMeshBuilder = (function () { function PlanetChunckMeshBuilder() { } PlanetChunckMeshBuilder.BuildVertexData = function (size, iPos, jPos, kPos, r, data) { var vertexData = new BABYLON.VertexData(); var vertices = new Array(); var positions = new Array(); var i...
JavaScript
0
@@ -3461,16 +3461,46 @@ ormals;%0A + vertexData.uvs = uvs;%0A
bb8f710b52c23cc5f42d79abda978ea5306d1bc3
use sync file readers in cli
src/cli/v3vsp2png.js
src/cli/v3vsp2png.js
const process = require('process') const fs = require('fs') const createVerge3VspLoader = require('../loader/createVerge3VspLoader') const createVerge3VspConverter = require('../converter/createVerge3VspConverter') const vspFilename = process.argv[2] fs.readFile(vspFilename, (err, data) => { const loader = createVe...
JavaScript
0
@@ -246,16 +246,29 @@ argv%5B2%5D%0A +const data = fs.readF @@ -270,16 +270,20 @@ readFile +Sync (vspFile @@ -290,29 +290,10 @@ name -, (err, data) =%3E %7B%0A +)%0A cons @@ -333,18 +333,16 @@ %7Bdata%7D)%0A - const vs @@ -359,18 +359,16 @@ .load()%0A - const co @@ -404,18 +404,16 @@ erter(%7B%0A - ...
5b9f19f109865f6c03cda7ade8eb879ce53fb0cb
fix genTransId callback params
krpc.js
krpc.js
var events = require('events'), util = require('util'), crypto = require('crypto'), bencode = require('bencode'), TRANS_ID_BYTES = 2; module.exports = exports = function(options) { events.EventEmitter.call(this); if(!options) options = {}; this._transBytes = options.transBytes || 2; this._nextTransId = ...
JavaScript
0
@@ -1600,16 +1600,21 @@ p, rPort +, res ) %7B%0A%09%09%09i @@ -1832,28 +1832,26 @@ ack. -apply +call (null, -argument +err, re s);%0A
42954e5a2a321092d46d796ea98529bfc9810e67
Improve error message when no server is running (#136)
src/commands/stop.js
src/commands/stop.js
import { readFileSync } from 'fs'; import { execSync } from 'child_process'; import { findFile } from '../util.js'; export const stop = () => { const filePath = findFile('.esprintrc'); const rc = JSON.parse(readFileSync(filePath)); if (rc.port) { const { port } = rc; const command = `lsof -i TCP:${port...
JavaScript
0
@@ -299,27 +299,40 @@ = %60 +kill -9 $( lsof +-t -i -TCP +tcp :$%7Bport%7D %7C g @@ -331,82 +331,176 @@ ort%7D - %7C grep LISTEN %7C awk '%7Bprint $2%7D' %7C xargs kill -9%60;%0A execSync(command); +)%60;%0A try %7B%0A execSync(command, %7B%0A stdio: 'ignore'%0A %7D);%0A %7D catch (...
04ae8e9de3dd0094ad958fbdafdeb433d52e20da
Fix typo in load.js
load.js
load.js
/* lib/load.js Originally created on 11/29/16 by KhanCS (https://github.com/khancs). */ (function(context) { var ka = { _root: "https://khancs.github.io/lib/" }; context.ka = ka; var loadScript = function(src) { var el = context.document.createElement('script'); el.setAttr...
JavaScript
0.002529
@@ -1040,16 +1040,17 @@ n ka.lib +r aries%5Bli
b2ff84648bf081505b85cc7c0f90cfa38284766b
Add propertyDepsResolver
src/compiler/emit.js
src/compiler/emit.js
// TODO: source map support function emitProperty(tree) { const block = () => { switch (tree.expr.type) { case "jsExpr": return `return ${tree.expr.content}`; case "jsBlock": return tree.expr.content; } }(); // TODO: resolve dependencies return ` this.bindProperty("${tr...
JavaScript
0
@@ -35,42 +35,645 @@ ion -emitP +p roperty -(tree) %7B%0A const block +DepsResolver(expr) %7B%0A // e.g. foo.bar%0A const exprWithCheck = expr.replace(/(%5Ba-zA-Z_$%5D%5B0-9a-zA-Z_$%5D*)%5Cs*%5C.%5Cs*(%5Ba-zA-Z_$%5D%5B0-9a-zA-Z_$%5D*)%5Cs*(?=%5B%5E(%5D)/, (match, obj, prop) =%3E %7B%0A return %60__checkDep($%7...
353f62bba77a80188431798b83a2ad855b0d4833
Store last block number and log index in dedicated type.
elastic-ethereum.js
elastic-ethereum.js
var Web3 = require('web3'); var web3 = new Web3(); var elasticsearch = require('elasticsearch'); var config = require('config'); var index = config.get('elasticsearch.index'); web3.setProvider(new web3.providers.HttpProvider(config.get('ethereum.provider'))); var client = new elasticsearch.Client({ host: config.ge...
JavaScript
0
@@ -422,22 +422,19 @@ %0Aclient. -search +get (%7B%0A ind @@ -457,186 +457,34 @@ e: ' -mytype',%0A%0A body: %7B%0A %22query%22: %7B%0A %22match_all%22: %7B%7D%0A %7D,%0A %22size%22: 1,%0A %22sort%22: %5B%0A %7B%0A %22_timestamp%22: %7B%0A %22order%22: %22desc%22%0A %7D%...
1ee6e6d7855ee4bc1975c9b874bc71cbd7518385
fix option
main.js
main.js
#!/usr/bin/env node const electron = require('electron'); const path = require('path'); const spawn = require('child_process').spawn; const program = require('commander'); const {ipcMain} = require('electron'); program .version('0.6.12') .option('-e, --entry-file [entryFile]', 'The file to load into Electron'...
JavaScript
0.000077
@@ -4189,17 +4189,20 @@ --target - +', ' ES2015'%0A
68620a1f2ea8feb026931fbce05b16a802fd5d7a
Increase minWidth of whole window a bit
main.js
main.js
'use strict'; const electron = require('electron'); const fs = require('fs'); const menuTemplate = require('./menu.js'); // Copy config file to appData if no config file exists in appData function copyConfigFile(destPath, appDataPath) { if (!fs.existsSync(appDataPath)) fs.mkdirSync(appDataPath); if (!fs.exi...
JavaScript
0
@@ -2553,11 +2553,11 @@ h: 1 -088 +100 ,%0A
871934e6dc659cd27a732fc88c90ab7f18e27f65
Make babel global
main.js
main.js
#!/usr/bin/env node const command = require('sergeant') const chalk = require('chalk') const chokidar = require('chokidar') const thenify = require('thenify') const fs = require('fs') const path = require('path') const mkdirp = thenify(require('mkdirp')) const fsReadFile = thenify(fs.readFile) const fsWriteFile = theni...
JavaScript
0.00033
@@ -3691,16 +3691,32 @@ ets%0A %7D) +, %7Bglobal: true%7D )%0A%0A bun
13cea678188db63ccac9d910b8b7c7bef5577230
move daycycle update to pre-render hook to avoid flicker
main.js
main.js
/*** Map ***/ var styles = { "daycycle": "daynight.yaml", "highways": "//cdn.rawgit.com/tangrams/highways-demo/a95a428fad9adcf07df1118c859e317c52e1b5c1/scene.yaml", "halftone": "halftone.yaml", "tron": "//cdn.rawgit.com/tangrams/tangram-sandbox/dac373596f80065d6e77ec4f6fc7c5541fcb3775/styles/tron.ya...
JavaScript
0
@@ -2912,38 +2912,69 @@ ate( -) %7B%0A%7D%0A%0Afunction postUpdate() %7B +will_render) %7B%0A if (!will_render) %7B%0A return;%0A %7D%0A %0A @@ -3070,24 +3070,51 @@ k;%0A %7D%0A%7D%0A%0A +function postUpdate() %7B%0A%7D%0A%0A function day
1e74d71731e01b1e8de71b772352f513630e600c
Add scenario
main.js
main.js
var program = require('commander'); var util = require('util'); var Hubic = require('./hubic.js'); var HFile = require('./hfile.js'); var LFile = require('./lfile.js'); var Syncer = require('./syncer.js'); module.exports = { Hubic : Hubic, Syncer : Syncer }; program.option("--scenario <path>", "Scenario file"); ...
JavaScript
0.999369
@@ -56,16 +56,46 @@ 'util'); +%0Avar async = require('async'); %0A%0Avar Hu
beafcbd707bdce5fbf279cd458942c642a17b26a
switch all settings over to dev/prod split
main.js
main.js
/* eslint no-path-concat: 0, func-names:0 */ const electron = require('electron'); const app = electron.app; const BrowserWindow = electron.BrowserWindow; const fs = require('fs'); const ipc = electron.ipcMain; const menu = electron.Menu; const gsc = electron.globalShortcut; const JSONStorage = require('node-localstora...
JavaScript
0
@@ -621,17 +621,75 @@ scratch' -; + + (process.env.NODE_ENV === 'development' ? '/dev' : '');%0A %0Aglobal. @@ -798,76 +798,15 @@ + '/ -' + (process.env.NODE_ENV === 'development' ? 'dev' : ' content -') + ' .txt @@ -1200,16 +1200,22 @@ wstate') + %7C%7C %7B%7D ;%0A %7D ca
8add28df85579fbab4b35bfe1e521958c6e44ed2
Fix library path addition when user don't provide a valid path
main.js
main.js
var app = require('app'); var Configstore = require('configstore'); var BrowserWindow = require('browser-window'); var ipc = require('ipc'); var dialog = require('dialog'); var conf = new Configstore('musicpicker-player'); var qs = require('query-string'); var fileUrl = require('file-url'); var Library = require('./l...
JavaScript
0.000004
@@ -1488,16 +1488,39 @@ aths) %7B%0A +%09%09if (!paths) return;%0A%0A %09%09var co @@ -1566,21 +1566,16 @@ fPaths) -%7B%0A%09%09%09 confPath @@ -1584,17 +1584,16 @@ = %5B%5D;%0A%09%09 -%7D %0A%09%09confP
8a236267ec518ef109e33924618a705018f6a9a0
Reimplement node showing
main.js
main.js
/* Dasca, an idle game by @CylonicRaider (github.com/CylonicRaider/dasca) * Game implementation */ 'use strict'; /* Utilities */ function $id(id, elem) { return (elem || document).getElementById(id); } function $sel(sel, elem) { return (elem || document).querySelector(sel); } function $selAll(sel, elem) { ret...
JavaScript
0
@@ -2040,12 +2040,1567 @@ turn ret;%0A%7D%0A +%0A/* Show the given UI element, hiding any siblings and showing all its%0A * showable parents */%0Afunction showNode(node) %7B%0A if (! node) return;%0A /* Resolve ID-s */%0A if (typeof node == %22string%22) node = $id(node);%0A /* Hide siblings */%0A var prev = node...
3d394252b72fe6d5c04bec32aed18b4cd5cde48f
delete 8cc3a2ea commit
main.js
main.js
'use strict' // require const { app, BrowserWindow, protocol, ipcMain } = require('electron') const path = require('path') const url = require('url') const fs = require('fs') const db = require('./database/nedb_module.js') let nedb = new db() //open server require('./server/app.js') // const const dirname = '__dirna...
JavaScript
0.000002
@@ -171,77 +171,8 @@ fs') -%0Aconst db = require('./database/nedb_module.js')%0A%0Alet nedb = new db() %0A%0A// @@ -1025,113 +1025,8 @@ ))%0A%0A - win.webContents.on('did-finish-load', () =%3E %7B%0A win.webContents.send('load_clip', 'load_test')%0A %7D)%0A%0A wi @@ -2071,24 +2071,24 @@ break%0A + %7D%...
3e426086c964810a52525d65b6dcf4b267285208
add mac title bar back in
main.js
main.js
const electron = require('electron') // Module to control application life. const app = electron.app // Module to create native browser window. const BrowserWindow = electron.BrowserWindow const client = require('electron-connect').client; app.commandLine.appendSwitch('ignore-certificate-errors', true); app.commandLi...
JavaScript
0
@@ -805,16 +805,19 @@ rue,%0A + // titleBa
18d8fa3efed90b1c6b39871658f5514ab07e61b8
Remove typeDispatch check
main.js
main.js
require(['ByteSource', 'Item', 'AppleVolume', 'DataSegment'], function(ByteSource, Item, AppleVolume, DataSegment) { 'use strict'; function makeFileDrop(el, callback) { if (typeof el === 'string') { el = document.getElementById(el); if (!el) { console.error('filedrop element not found'...
JavaScript
0
@@ -1348,58 +1348,8 @@ else - if (typeDispatch.byExtension.hasOwnProperty(ext)) %7B%0A
f74b8c8e2eaacad3d0c339924c0beb2c75443eb5
remove debugger
main.js
main.js
define(function(require) { var Backbone = require('backbone'), ContentView = require('streamhub-backbone/views/ContentView'); var TimelineView = Backbone.View.extend( { initialize: function (opts) { this.$el.addClass(this.className); this.$el.hide(); this.startDate = opts.startDate ...
JavaScript
0.000133
@@ -1551,22 +1551,8 @@ 00;%0A - debugger;%0A
de864714a0ebf155254e4bf7b1db99e76bfb809e
Add system code.
main.js
main.js
/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ /*global define, brackets, $, window, CSSLint, Mustache */ define (function (require, exports, module) { "use strict"; var AppInit = brackets.getModule("utils/AppInit"), CodeInspection = brackets.getModule("lan...
JavaScript
0.000001
@@ -338,24 +338,26 @@ ion%22);%0A %0A +// require @@ -377,21 +377,25 @@ lint%22);%0A +// %0A +// func @@ -399,19 +399,20 @@ unction -css +ruby Linter(t @@ -424,24 +424,26 @@ fullPath) %7B%0A +// var @@ -451,16 +451,18 @@ esults;%0A +// @@ -454,32 +454,34 @@ lts;%0A// ...
d3e2c5027c65e71e3d7222ea4547b9dfc583e386
Remove call to crashReporter.start()
main.js
main.js
'use strict'; const electron = require('electron'); const app = electron.app; // Module to control application life. const BrowserWindow = electron.BrowserWindow; // Module to create native browser window. // Report crashes to our server. electron.crashReporter.start(); // Keep a global reference of the window obje...
JavaScript
0
@@ -206,74 +206,8 @@ w.%0A%0A -// Report crashes to our server.%0Aelectron.crashReporter.start();%0A%0A // K
f43e346386fc8bdb6fc838482b6aa08f4356174f
Fix indenting
make.js
make.js
'use strict' module.exports = function make (name, loader, callback, extensions) { extensions = extensions || {} loader(name, function (err, template) { var lines = template.split(/\s*(@.*)\n/g) var code = [` module.exports = function ${ extensions.name || name } (content) { var output = [] ...
JavaScript
0.000369
@@ -3679,32 +3679,34 @@ + var output = %5B%5D%0A @@ -3697,32 +3697,34 @@ var output = %5B%5D%0A + @@ -3761,32 +3761,34 @@ + return output%0A @@ -3785,16 +3785,18 @@ output%0A + @@ -4617,32 +4617,34 @@ + var output = %5B%...
6f35191019c6994175ad28cd5fb55a994cfc9773
Fix bundling
make.js
make.js
var b = require('substance-bundler') var fs = require('fs') var path = require('path') var docgenConfig = require('./.docgenrc') b.task('clean', function() { b.rm('./dist') }) function _css(DIST) { b.copy('*.css', DIST) b.copy('packages/**/*.css', DIST) } b.task('css', function() { _css('dist/') }) function...
JavaScript
0.000018
@@ -2949,16 +2949,19 @@ reader/* +*/* ', '.doc
684b02e0d4751056ea7716306209e2c43a10eac6
fix a bit
menu.js
menu.js
var parentId = chrome.contextMenus.create({ "type" : "normal", "title" : "copyrepo", "contexts" : ["page"], "documentUrlPatterns" : ["https://github.com/*/*"] }); chrome.contextMenus.create({ "parentId" : parentId, "type" : "normal", "title" : "Name", "contexts" : ["page"], "onclick" ...
JavaScript
0.000469
@@ -1,9 +1,25 @@ %0A +(function() %7B%0A var pare @@ -54,16 +54,18 @@ reate(%7B%0A + %22type%22 @@ -73,32 +73,34 @@ : %22normal%22,%0A + %22title%22 : %22 @@ -108,24 +108,26 @@ opyrepo%22,%0A + + %22contexts%22 : @@ -137,16 +137,18 @@ page%22%5D,%0A + %22docum @@ -184,37 +184,41 @@ i...
2e4b2aa5830a54d4e258deb934ba9406029b3d9e
Revert "hide dictation menu item"
menu.js
menu.js
const electron = require('electron'); const app = electron.app; const BrowserWindow = electron.BrowserWindow; const messages = require('./messages'); const getTemplate = () => { const template = [{ label: 'iDAI.field', submenu: [{ label: messages.get('menu.about'), role: '...
JavaScript
0
@@ -3984,100 +3984,8 @@ %7D;%0A%0A -electron.systemPreferences.setUserDefault('NSDisabledDictationMenuItem', 'boolean', true);%0A%0A %0Amod
a71275c1c8cab2395e11653e4d66ba3a45f984a8
Support priority and enabled to be set in initialValues
Sources/Interaction/Widgets/AbstractWidget/index.js
Sources/Interaction/Widgets/AbstractWidget/index.js
import macro from 'vtk.js/Sources/macro'; import vtkInteractorObserver from 'vtk.js/Sources/Rendering/Core/InteractorObserver'; // ---------------------------------------------------------------------------- // vtkAbstractWidget methods // ---------------------------------------------------------------------------- f...
JavaScript
0
@@ -2120,16 +2120,171 @@ UES = %7B%0A + enabled: false, // Make widgets disabled by default%0A priority: 0.5, // Use a priority of 0.5, since default priority from vtkInteractorObserver is 0.0.%0A widget @@ -2482,29 +2482,32 @@ %7B%0A -Object.assign(model, +const newDefault = %7B ... DEFA @@ -2518,16 +2518,1...
80d0c3d8054e87e70b9712206b3472d108116857
fix null start token
jquery.el.js
jquery.el.js
/** * simple way to create elements in jquery * example: * $.el("table#tab1[border=0]").el("tbody").el("tr.odd").el("td{text}"); */ (function ($) { function startNextToken(char) { switch (char) { case "#": return { type: "id", value: "" }; case ".": return { type: "class", ...
JavaScript
0.000001
@@ -197,16 +197,42 @@ char) %7B%0A +%09%09%09case null:%0A%09%09%09%09return;%0A %09%09%09case
7eb654d7d5b95da8c68d31bdc965c1d5e5d4c957
Remove unused _canvasObj variable
js/Motion.js
js/Motion.js
/* * This class handles collisions. */ 'use strict'; import Vector from 'Vector.js'; export default class { constructor(actorsInstance) { this._actorsInstance = actorsInstance; this._canvasObj = {}; } moveActors(canvasWidth, canvasHeight) { let actors = this._actorsInstance.get(); // We clone...
JavaScript
0.000001
@@ -184,34 +184,8 @@ ce;%0A - this._canvasObj = %7B%7D;%0A %7D%0A
fd6dd6bbe2220181202535eb6df9715bf78cf956
Add event tracking to google analytics
js/agency.js
js/agency.js
/*! * Start Bootstrap - Agnecy Bootstrap Theme (http://startbootstrap.com) * Code licensed under the Apache License v2.0. * For details, see http://www.apache.org/licenses/LICENSE-2.0. */ // jQuery for page scrolling feature - requires jQuery Easing plugin $(function() { $('a.page-scroll').bind('click', functi...
JavaScript
0
@@ -640,16 +640,1142 @@ op'%0A%7D)%0A%0A +// Event tracking for google analytics%0A// inspired by http://cutroni.com/blog/2012/02/21/advanced-content-tracking-with-google-analytics-part-1/%0Avar timer = 0;%0Avar callBackTime = 700;%0Avar debugTracker = false;%0Avar startTime = new Date().getTime();%0Avar currentItem =...
9a56e8e6197c5abef335667897d794e0f0480750
Update gh-pages
js/config.js
js/config.js
var Config = { Services: { PubMed: "http://local/2012/07/pubmed/articles/" } }
JavaScript
0
@@ -43,28 +43,27 @@ p:// -local/2012/07/pubmed +pubmed.macropus.org /art
f65743464ba44d20a1c013c7af5ab56eb5550f1a
fix style for p2-grid
plot.js
plot.js
'use strict' var hashStr = require('murmurhash-js') var fs = require('fs') var path = require('path') module.exports = plotBenchmark //TODO: If you are running this locally, create an account with plotly and get an API key // Store this in a local file called plotly.json with two keys: // // username: your plo...
JavaScript
0
@@ -1313,16 +1313,17 @@ urn '#cc +5 '%0A %7D%0A%0A
ec80626957e69e13be1e27e570cef41bd883bf85
make node path use process.execPath to fix Windows issue
fetch.js
fetch.js
const fs = require('fs'); const path = require('path'); const exec = require('child_process').exec; // this is from the env of npm, not node const nodePath = process.env.NODE; const version = process.versions.v8; const tmpfile = path.join(__dirname, version+'.flags.json'); if (!fs.existsSync(tmpfile)) { exec('"'+no...
JavaScript
0
@@ -165,15 +165,15 @@ ss.e -nv.NODE +xecPath ;%0Aco
dffb12113e3a79d91ffd644ac782d0f19d6e8168
Move body to _body to prevent accessing directly.
fetch.js
fetch.js
(function() { 'use strict'; if (window.fetch) { return } function Headers(headers) { this.map = {} var self = this if (headers instanceof Headers) { headers.forEach(function(name, values) { values.forEach(function(value) { self.append(name, value) }) }) ...
JavaScript
0
@@ -1498,24 +1498,25 @@ %7B%0A this. +_ body = null%0A @@ -1757,24 +1757,25 @@ Blob(%5Bthis. +_ body%5D))%0A @@ -1847,24 +1847,25 @@ decode(this. +_ body))%0A %7D @@ -2004,24 +2004,25 @@ body = this. +_ body%0A r @@ -2304,24 +2304,25 @@ esolve(this. +_ body)%0A %7D%0A @@ -2430,24 +2430,25 ...
06f426868195ec8c9797be6df299c8bf8aa8d443
Update primeDistance.js
challenges/nextPrimeDistance/primeDistance.js
challenges/nextPrimeDistance/primeDistance.js
function primeDistance(number) { number = parseInt(number); var nextH = number, nextL = number; var isPrimeH, isPrimeL; if(number == 0){return 2;} if(number == 1){return 1;} if(number == 2){return 0;} if(isPrime(number) && number % 2 != 0){return 0;} if(nextH % 2 ==0){ ...
JavaScript
0.000001
@@ -478,18 +478,26 @@ xt highe -st +r or lower prime%0A
b9fb08002cf4c73a3246f0a13d7e874edab80275
Fix typo
src/application/components/Application/EnumModel/index.js
src/application/components/Application/EnumModel/index.js
import React, { PropTypes } from 'react'; import H1 from '../../../../components/H1'; import H2 from '../../../../components/H2'; import ParameterList from '../../ParameterList'; import ReactMarkdown from 'react-markdown'; import { simplifyName } from '../../../../utils'; import styles from './enumModel.css'; const ...
JavaScript
0.999999
@@ -706,17 +706,16 @@ cription -u : ''%7D c
0b67df48cd5818bf57f51b2f0d972c1f1348c947
fix audio
addon/components/ember-theater/curtain/component.js
addon/components/ember-theater/curtain/component.js
import Ember from 'ember'; import layout from './template'; import { singularize } from 'ember-inflector'; import config from 'ember-get-config'; const modulePrefix = config.modulePrefix; const { Component, computed, get, inject, on, run, set } = Ember; const { filterBy, union } = computed; export...
JavaScript
0.000017
@@ -561,29 +561,17 @@ lterBy(' -emberTheaterS +s ounds', @@ -1339,37 +1339,25 @@ = this.get(' -emberTheaterS +s ounds');%0A @@ -1385,37 +1385,25 @@ n this.set(' -emberTheaterS +s ounds', Embe @@ -2631,29 +2631,17 @@ ngth', ' -emberTheaterS +s ounds.le @@ -2723,21 +2723,9 @@ et(' -emberTheaterS +s ound
a4dd9ca769c62cf5f65fadc8da0d23d865116046
fix comment stripping
gdocs.js
gdocs.js
#!/usr/bin/env node var http = require('http'); var https = require('https'); var fs = require('fs'); var collections = { 'guide': 'http://docs.google.com/feeds/default/private/full/folder%3A0B9PsajIPqzmANGUwMGVhZmYtMTk1ZC00NTdmLWIxMDAtZGI5YWNlZjQ2YjZl/contents', 'api': 'http://docs.google.com/feeds/default/priva...
JavaScript
0
@@ -2512,24 +2512,123 @@ mg, '%5Cn');%0A%0A + // strip out all text annotations%0A data = data.replace(/%5C%5B%5Ba-zA-Z%5D%7B1,2%7D%5C%5D/mg, '');%0A%0A // s
df6dd980fa455605a4adf9ba94c8b02984f0ecc3
Automate qunit tests into grunt process
grunt.js
grunt.js
/*global module:false*/ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: '<json:package.json>', meta: { banner: "/*! jsSIP v@<%= pkg.version %> jssip.net | jssip.net/license */" }, lint: { dist: "dist/<%= pkg.name %>-<%= pkg.version %>.js", grun...
JavaScript
0.000035
@@ -2221,24 +2221,73 @@ : %7B%7D%0A %7D,%0A + qunit: %7B%0A all: %5B'qunitjs/*html'%5D%0A %7D,%0A uglify: @@ -2396,16 +2396,22 @@ post_min + qunit ' );%0A%7D;%0A
056fe60a1b4dabb0839756362c22350215171665
Fix indentation
grunt.js
grunt.js
module.exports = function(grunt) { grunt.initConfig({ pkg: '<json:package.json>', meta: { wpStyleHeader: '/*\n' + ' Theme Name: Ally\n' + ' Theme URI: http://www.axisphilly.com\n' + ' Description: Custom theme for AxisPhilly\n' + ' Author: Casey Thomas, Jeff Frankl\n' + ...
JavaScript
0.017244
@@ -2158,26 +2158,24 @@ %7D,%0A - sass: %7B%0A
c89621f28aeaa11da267be0a0d32102258e96565
Add tap minification target
grunt.js
grunt.js
/*global require, module*/ var cp = require('child_process'); module.exports = function(grunt) { // Project configuration. grunt.initConfig({ meta: { version: '0.1.0pre', banner: '/*! Touché - v<%= meta.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %>\n' + '* https://github.com/stoffeastr...
JavaScript
0
@@ -931,35 +931,9 @@ .js' -,%0A%09%09%09%09%09'lib/gestures/*.js' %0A + %09%09%09%09 @@ -1031,33 +1031,130 @@ ', ' -%3Cconfig:concat.dist.dest%3E +lib/gestures/*.js'%5D,%0A%09%09%09%09dest: 'dist/touche.min.js'%0A%09%09%09%7D,%0A%09%09%09tap: %7B%0A%09%09%09%09src: %5B'%3Cbanner:meta.banner%3E', 'lib/gestures/tap.j...
df51fe8404de180e1fac8b21397a764a5541e204
Make watch the default task.
grunt.js
grunt.js
module.exports = function(grunt) { // Load required tasks grunt.loadNpmTasks('grunt-compass'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-html'); // Config grunt.initConfig({ pkg: '<json:package.json>', lin...
JavaScript
0.000001
@@ -2191,19 +2191,21 @@ ault', ' -dev +watch ');%0A
d41f0c2f2891d096e1245a471709fda8508332e3
Move example from Null Island to Oslo
index.js
index.js
var inside = require('turf-inside'); /** * Calculates the average value of a field for points * within a set of polygons. * * @module turf/average * @param {FeatureCollection} polygons a FeatureCollection of {@link Polygon} features * @param {FeatureCollection} points a FeatureCollection of {@link Point} feature...
JavaScript
0.000004
@@ -705,99 +705,259 @@ (%5B%5B%5B -0,0%5D,%5B10,0%5D,%5B10,10%5D, %5B0,10%5D%5D%5D);%0A * var poly2 = turf.polygon(%5B%5B%5B10,0%5D,%5B20,10%5D,%5B20,20%5D, %5B20,0 +10.666351,59.890659%5D,%5B10.666351,59.936784%5D,%5B10.762481,59.936784%5D,%5B10.762481,59.890659%5D,%5B10.666351,59.890659%5D%5D%5D);%0A * var poly2 = t...
7b523c46ed48b8e5425dfab48a6974a77f3263f5
remove nesting rule
index.js
index.js
/** * Main configuration for stylelint shareable configuration stylelint-config-chromatix. * * @author Tim Malone <tim.malone@chromatix.com.au> */ 'use strict'; module.exports = { // Ignore magic numbers in config for ESLint. /* eslint-disable no-magic-numbers */ // @see // https://github.com/bjankord/s...
JavaScript
0.001076
@@ -2474,78 +2474,14 @@ h': -%5B%0A 4,%0A %7B%0A ignoreAtRules: %5B 'include' %5D%0A %7D%0A %5D, +null, %0A
c70399df538401ed308e3f517070cc2e8fe50218
remove targer from mailto link
index.js
index.js
import './style'; import Router from 'preact-router'; import { Feed } from './feed'; import jsonData from './data.json'; const App = (props) => ( <div> <div> <h1>National Food Today</h1> </div> <Router> <Feed path="/" data={jsonData} /> <Feed path="/:year/:month/:day" data={jsonData} /> </Router> <...
JavaScript
0
@@ -349,50 +349,8 @@ %22%3E%3Ca - target=%22_blank%22 rel=%22noopener noreferrer%22 hre
45a262c64337fec732f64d0447580451ab350323
Set the session maxAge to 4 hours to cut down on storage.
index.js
index.js
/* globals process, console, __dirname */ // App Monitoring require('newrelic'); // Modules var _ = require('underscore'); var express = require('express'); var app = express(); var server = require('http').createServer(app); var mongoStore = require('connect-mongo')(express); // Lib var TwitterOauth = require('./li...
JavaScript
0
@@ -996,16 +996,83 @@ ssionKey +,%0A%09cookie: %7B%0A%09%09maxAge: new Date(Date.now() + 1000 * 60 * 60 * 4)%0A%09%7D %0A%7D;%0Aif (
c8b454f88f07ddd6952e42832104a01c7742e352
fix react component compatibility
index.js
index.js
/** * Module dependencies */ var router = require('routington'); var assert = require('assert'); /** * Wayfarer prototype */ var wayfarer = Wayfarer.prototype; /** * Expose 'router' */ module.exports = Wayfarer; /** * Create a new router * * @return {Wayfarer} * @api public */ function Wayfarer...
JavaScript
0.000001
@@ -863,16 +863,23 @@ ath);%0A +return match.no
ecc37046d9b00d496dcbc19988e53aa8f43aab44
remove unecessary require statements
index.js
index.js
'use strict'; var finalhandler = require('finalhandler'); var typer = require('media-typer'); var mime = require('mime'); var Res = require('./lib/response'); module.exports = function(handler, options) { options = options || {}; var onerror = options.onerror || logError; if (typeof handler !== 'function') { ...
JavaScript
0.019232
@@ -56,72 +56,8 @@ ');%0A -var typer = require('media-typer');%0Avar mime = require('mime');%0A var
283643fe58eef3c3e4b30b567261847350762be7
Fix point form
index.js
index.js
/** * Combines a FeatureCollection of point, linestring, or polygon Features into multipoint, multilinestring, or multipolygon Features. * * @module turf/combine * @param {FeatureCollection} fc a Feature or FeatureCollection of any type * @return {FeatureCollection} a FeatureCollection of corresponding type to input * ...
JavaScript
0.000024
@@ -193,19 +193,34 @@ c a +%7B@link Feature +%7D or +%7B@link Feat @@ -228,24 +228,25 @@ reCollection +%7D of any type @@ -357,24 +357,25 @@ turf.point( +%5B 19.026432, 4 @@ -381,16 +381,17 @@ 47.49134 +%5D );%0A* var @@ -408,16 +408,17 @@ f.point( +%5B 19.07449 @@ -429,16 +429,17 @@ 7.509548 +%5D ...
a5898df02de351368aac7250ec1877c208a4df29
remove logging
index.js
index.js
'use strict' var sublevel = require('level-sublevel/bytewise') var pull = require('pull-stream') var pl = require('pull-level') var paramap = require('pull-paramap') var timestamp = require('monotonic-timestamp') var defer = require('pull-defer') var createFilter = require('./filter') var createInit...
JavaScript
0.000001
@@ -4473,41 +4473,8 @@ ry)%0A - console.log('QUERY', opts)%0A
0a7b8bf93093ead5775b46287e4b79f95ccb7132
Update index.js
index.js
index.js
import morphdom from 'morphdom' export default (container, ...elms) => { const children = [...container.childNodes] const length = Math.max(children.length, elms.length) for (let i = 0; i < length; i += 1) { let elm = elms[i] let child = children[i] if (child) { if (elm) { if (child.nod...
JavaScript
0
@@ -26,16 +26,87 @@ phdom'%0A%0A +const onBeforeElUpdated = (fromEl, toEl) =%3E !fromEl.isEqualNode(toEl)%0A%0A export d @@ -544,16 +544,37 @@ ild, elm +, %7BonBeforeElUpdated%7D )%0A
5102a03d48840794ad019701292cfd69b0321b90
Increase setScriptTimeout
index.js
index.js
'use strict'; var path = require('path'); var fs = require('fs-path'); var glob = require('glob'); var AxeBuilder = require('axe-webdriverjs'); var WebDriver = require('selenium-webdriver'); var Promise = require('promise'); var fileUrl = require('file-url'); var reporter = require('./lib/reporter'); var chalk = requir...
JavaScript
0.000001
@@ -1049,9 +1049,11 @@ out( -5 +600 00);
7388dd6d3523067b9b4ef55ea9db63194743024b
return response
index.js
index.js
var uuid = require('node-uuid'); module.exports = function () { return { available: function (callback) { callback(typeof Media !== 'undefined'); }, permission: function (callback) { callback(true); }, send: function (url, callback) { var transfer = new FileTransfer(); var...
JavaScript
0.999999
@@ -663,20 +663,16 @@ ull, res -.url );%0A
b9321233f210428d78e7738c928f12258b89f101
Use stringify.
index.js
index.js
'use strict'; var tty = require('tty'); var util = require('util'); var WritableStream = require('stream').Writable; var stash = { log: console.log, info: console.info, error: console.error, warn: console.warn } var definition = { colors: { white : 37, black : 30, blue ...
JavaScript
0.004189
@@ -3560,59 +3560,41 @@ v = -codes.open(list%5Bi%5D, this.a) + this.v + codes.close( +stringify(this.v, list%5Bi%5D, this.a );%0A
472850707bfcff30adb950479cf43248934e9f8c
Add comment for partial removal
index.js
index.js
'use strict'; var fs = require('fs'); var path = require('path'); var Readable = require('stream').Readable; var assign = require('object-assign'); var convert = require('convert-source-map'); var dargs = require('dargs'); var eachAsync = require('each-async'); var glob = require('glob'); var gutil = require('gulp-uti...
JavaScript
0
@@ -2401,16 +2401,39 @@ atch) %7B%0A +%09%09%09// remove _partials%0A %09%09%09retur
a8ea6f035aa25ab8c6f20402bb7744b4c61dec3b
Revert "changed regex expression to accept single quotes as well as double quotes"
index.js
index.js
var path = require('path'); var fs = require('fs'); var EOL = require('os').EOL; var through = require('through2'); var gutil = require('gulp-util'); var glob = require('glob'); module.exports = function(options) { options = options || {}; var startReg = /<!--\s*build:(\w+)(?:\(([^\)]+?)\))?\s+(\/?([^\s]+?))?\s*-...
JavaScript
0
@@ -410,30 +410,23 @@ %5Cs*( -?:'%7C%22 +%22%7C' )(%5B%5E -' %22 +' %5D+?) -(?:'%7C%22) +%5C1 .*?%3E @@ -495,29 +495,22 @@ %5Cs*( -?:'%7C%22 +%22%7C' )(%5B%5E -' %22 +' %5D+) -(?:'%7C%22) +%5C1 .*?%3E
8f47f148220bed53c3c4731a315bea55e0765edd
change to pug and update to render method.
index.js
index.js
const settings = require('./settings/settings.json') const express = require('express') const app = express() app.get('/', (req, res) => { res.send('<h1>Hello World!</h1>') }) app.get('/about', (req, res) => { res.send('<h3>Made with love by Paul</h3>') }) app.listen(settings.port, () => { console.log(`Expres...
JavaScript
0
@@ -92,22 +92,348 @@ nst -app = express( +colors = %5B%0A 'red',%0A 'orange',%0A 'yellow',%0A 'green',%0A 'blue',%0A 'purple'%0A%5D%0A%0Aconst names = %5B%0A %7Bfirst: 'Bill',%0A last: 'Gates'%7D,%0A %7Bfirst: 'Ted',%0A last: 'Bundy'%7D,%0A %7Bfirst: 'Bill',%0A last: 'Nye'%7D,%0A %7Bfirst: 'William...
a2e17c5c5a6eda1e1d121e3400384231390f6e2d
Remove unused callback
index.js
index.js
'use strict' var util = require('util') var os = require('os') var http = require('http') var EventEmitter = require('events').EventEmitter var bonjour = require('bonjour') var ipp = require('ipp-encoder') var utils = require('./lib/utils') var groups = require('./lib/groups') var operations = require('./lib/operation...
JavaScript
0.000016
@@ -3000,57 +3000,8 @@ ame -%7D, function (err) %7B%0A if (err) throw err%0A %7D)%0A
4b2f89c380d58e1ac2401335a18e564f183d13c0
Remove anonymous function
index.js
index.js
"use strict"; /** * @file logger-request main * @module logger-request * @package logger-request * @subpackage main * @version 1.1.5 * @author hex7c0 <hex7c0@gmail.com> * @copyright hex7c0 2014 * @license GPLv3 */ /* * initialize module */ // import try { var LOG = require('winston'); } catch (MODULE_NO...
JavaScript
0.000069
@@ -133,9 +133,9 @@ 1.1. -5 +6 %0A * @@ -1176,16 +1176,36 @@ req1.ip +%0A %7C%7C req1 @@ -1927,20 +1927,22 @@ exports -main +logger %0A * @fun @@ -1947,20 +1947,22 @@ unction -main +logger %0A * @par @@ -2074,16 +2074,23 @@ function + logger (options
20498bb40ed6e0eb466ecb9f7faa3482769b1acf
fix for toJSON support
index.js
index.js
var Q = require("q"); module.exports = deepResolve = function(val,toJSON){ var queue = []; toJSON = toJSON || false; if (val && Q.isPromise(val)){ queue.push(val.then(function(v){ val = v; return deepResolve(val); })); } else if (val && val.constructor == Arra...
JavaScript
0
@@ -120,16 +120,90 @@ false;%0A + %0A if (val && toJSON && val.toJSON)%0A val = val.toJSON();%0A %0A if
172452cc2c3fee5183ef3b83b85645cfb96ad706
remove lodash, use domElementType
index.js
index.js
/* Module dependencies */ var _ = require('lodash'); var utils = require('./utils'); var entities = require('entities'); /* Boolean Attributes */ var booleanAttributes = { __proto__: null, autofocus: true, autoplay: true, async: true, checked: true, controls: true, defer: true, disabled: true, hi...
JavaScript
0.000001
@@ -25,17 +25,27 @@ %0A*/%0Avar -_ +ElementType = requi @@ -52,46 +52,22 @@ re(' -lodash');%0Avar utils = require('./utils +domelementtype ');%0A @@ -1561,36 +1561,67 @@ %0A%0A -_.each(dom, function(elem) %7B +for(var i = 0; i %3C dom.length; i++)%7B%0A var elem = dom%5Bi%5D; %0A @@ -1637,13 +1637,19 @@...
3f9c3e06a24e7ad6f226067c226302bc0b6965f3
Replace $currentDate with new Date for now
index.js
index.js
'use strict'; var monk = require('monk'); var ObjectID = require('monk/node_modules/mongoskin').ObjectID; class Yajob { constructor (uri) { if (!(this instanceof Yajob)) { return new Yajob(uri); } this.id = new ObjectID(); this.tag = 'default'; this.db = monk(uri); this.de...
JavaScript
0.999999
@@ -1538,67 +1538,9 @@ ueId -%0A %7D,%0A $currentDate: %7B +, %0A @@ -1573,23 +1573,18 @@ At: -%7B$type: 'date'%7D +new Date() %0A
99102772b16d9033dcd058ce16ac1468111d0b47
add relative path to error object
index.js
index.js
'use strict'; var gutil = require('gulp-util'); var through = require('through2'); var assign = require('object-assign'); var path = require('path'); var applySourceMap = require('vinyl-sourcemaps-apply'); var PLUGIN_NAME = 'gulp-sass'; ////////////////////////////// // Main Gulp Sass function //////////////////////...
JavaScript
0.000001
@@ -3867,24 +3867,65 @@ (message);%0A%0A + error.relativePath = relativePath%0A%0A return
e87ba293a9f39ba3641fd09cfcdc3e09c19967e6
use mockConfig path as root for mock response files
index.js
index.js
const cwd = process.cwd(); const fs = require( 'fs' ); const argv = require( 'yargs' ); // @TODO remove lodash dependecy const _ = require( 'lodash' ); const WebpackDevServer = require( 'webpack-dev-server' ); const webpack = require( 'webpack' ); /** * Webpack super server */ function SuperServer( options ) { ...
JavaScript
0
@@ -44,24 +44,56 @@ re( 'fs' );%0A +const path = require( 'path' );%0A const argv = @@ -2218,24 +2218,76 @@ h, app ) %7B%0A%0A + const rootPath = path.dirname( mockFilePath );%0A%0A var mock @@ -2563,24 +2563,115 @@ eState ) %7B%0A%0A + const responseContentFilePath = path.join( rootPath, responseC...
efea8ed4c114c474408a060f0e4b8ab5cb3fc263
reverse order
index.js
index.js
// load modules const express = require('express'); const exphbs = require('express-handlebars'); const config = require('./config.js'); const app = express(); const compression = require('compression'); // middle-out compression const minify = require('express-minify'); const sensors = require('./sensors/index.js'); ...
JavaScript
0.999771
@@ -4732,17 +4732,16 @@ %7B time: -- 1 %7D).lim
e7359757b1e0a25e4cadac94347c6fcf8c780c5e
Check that res.statusCode in 200..299 range
index.js
index.js
'use strict'; var urlLib = require('url'); var http = require('http'); var https = require('https'); var zlib = require('zlib'); var assign = require('object-assign'); module.exports = function (url, opts, cb) { var redirectCount = 0; var get = function (url, opts, cb) { if (typeof opts === 'function') { cb = ...
JavaScript
0.000001
@@ -1049,15 +1049,37 @@ ode -!== +%3C 200 + %7C%7C res.statusCode %3E 299 ) %7B%0A
53e6de3ef8f4e397744a00ca6486817eed42305d
Fix some part to coordinate with other part
index.js
index.js
//Require Module var log4js = require('log4js'); var logger = log4js.getLogger('Logging'); var mysql = require('mysql'); var mailer = require('emailjs'); var promise = require('promised-io'); var moment = require('moment-timezone'); var when = promise.when; var fs = require('fs'); var settingPath = process.argv[2]; v...
JavaScript
0.000002
@@ -6104,45 +6104,8 @@ %7D;%0A%0A - logger.warn(lastAliveTime);%0A%0A @@ -6156,16 +6156,30 @@ veTimes, +lastAliveTime, result%5B' @@ -6184,30 +6184,16 @@ %5B'time'%5D -,lastAliveTime ,timeZon @@ -6234,17 +6234,8 @@ cess - === true )%7B%0A%0A @@ -6475,212 +6475,83 @@ -if(timeZoneOffset == '')%7...
2299d8cb2bf7db447301061d8a1cf81a017e25e5
remove console.log
index.js
index.js
/* eslint-env node */ let childProcess = require('child_process'); let Slack = require('node-slack'); let Promise = require('bluebird'); let mapReduce = require('./mapreduce'); Promise.promisifyAll(childProcess); let expireCount = process.env.EXPIRE_TICK || 4; let ticks = process.env.TICK_RATE || 15000; let blacklis...
JavaScript
0.000156
@@ -1670,30 +1670,8 @@ %3E %7B%0A -%09%09console.log(items);%0A %09%09re
c18902eae29079d0f6787b9a120511646b6103de
update repo
index.js
index.js
#!/usr/bin/env node var child_process = require('child_process'); var argv = process.argv; argv.shift(); var file_path = __dirname; var current_path = process.cwd(); var server_port = 3000; if ( argv.length > 1 ) { // console.log(argv) var first_arg = argv[1]; if ( first_arg == '-h' || first_arg == '--help' ...
JavaScript
0.000001
@@ -902,11 +902,8 @@ sed -in ' + @@ -964,16 +964,95 @@ %0A + %7Delse %7B%0A console.log('%5CnYeah%EF%BC%81No One used ' + server_port + '%5Cn');%0A %7D;
c9a2eb87d41cb0fccf9166087fae2f09276463ee
Remove debug log message
index.js
index.js
'use strict' var abs = Math.abs var round = Math.round function almostEq(a, b) { return abs(a - b) <= 9.5367432e-7 } //最大公约数 Greatest Common Divisor function GCD(a, b) { if (almostEq(b, 0)) return a return GCD(b, a % b) } function findPrecision(n) { var e = 1 while (!almostEq(round(n * e) / e, n)) { ...
JavaScript
0.000001
@@ -742,40 +742,8 @@ %0A%7D%0A%0A -console.log(num2fraction('0'))%0A%0A modu
e4e3349f572751876cdba7129f8d2d28877f3a22
add files
index.js
index.js
/** * Created by nuintun on 2015/10/19. */ 'use strict'; var util = require('./lib/uitl'); var postcss = require('postcss'); module.exports = function (src, replace, options){ options = options || {}; if (Buffer.isBuffer(src)) src = src.toString(); replace = util.fn(replace) ? replace : undefined; if (u...
JavaScript
0.000002
@@ -455,25 +455,16 @@ arse(src -, options );%0A %7D c
4fd824256e18f986f2cbd3c54cb1b9019cc1918e
Use __dirname instead of process.cwd
index.js
index.js
var pkg = require(process.cwd() + '/package.json'); var intrepidjsVersion = pkg.version; // Dummy index, only shows intrepidjs-cli version console.log(intrepidjsVersion);
JavaScript
0.000002
@@ -15,21 +15,17 @@ ire( -process.cwd() +__dirname + '
7a372272277d488cf7be7349d8c3d884f3e6806f
format json indent from 4 to 2
index.js
index.js
'use strict'; module.exports = generator; var fs = require('fs'); var fse = require('fs-extra'); var node_path = require('path'); var async = require('async'); var ejs = require('ejs'); // Use '{%' which is more friendly to README.md instead of '<%' ejs.open = '{%'; ejs.close = '%}'; var clone = require('clone'); ...
JavaScript
0.003014
@@ -1457,25 +1457,25 @@ fy(pkg,null, -4 +2 ); //format%0A @@ -1521,418 +1521,8 @@ e);%0A - %7D,%0A%0A // write package.json, build will fail if got no package.json%0A // for example:%0A // http://192.168.214.6/job/beta-quanhua.ma-openapp/2/console %0A function (done) %7B%0A var p = clone(pkg);%0A...
68921796cfadb6a501a14e55474aec235f4f53b6
we don't really need uppercase hex
index.js
index.js
module.exports = chromahash function djb2(str){ var hash = 5381; for (i = 0; i < str.length; i++) { char = str.charCodeAt(i); hash = ((hash << 5) + hash) + char; /* hash * 33 + c */ } return hash; } function to256ish(i) { return (Math.abs(i) % 47) * 5 // almost 256 } function toHex(...
JavaScript
0.944067
@@ -372,22 +372,8 @@ (-2) -.toUpperCase() %0A%7D%0A%0A
17ae4908044397e3e40fd163b5bd00e146829f0a
Update index.js
index.js
index.js
const ts = require("gulp-typescript") , sourcemaps = require("gulp-sourcemaps") , Writable = require("stream").Writable , path = require("path") , isObject = require("lodash.isobject") , isDate = require("lodash.isdate") , isArray = require("lodash.isarray") , isFunction = require("lodash.is...
JavaScript
0
@@ -1205,17 +1205,24 @@ ssignIn( -c +defaultC ompilerO @@ -1229,24 +1229,17 @@ ptions, -defaultC +c ompilerO @@ -6229,15 +6229,8 @@ sor%5D%0A%7D;%0A -%0A%0A%0A%0A%0A%0A%0A
b48d0617308561580bf8946701fcc019876d241a
Add missing properties, fix transition order
index.js
index.js
module.exports = { "heading": [ "content", "quotes" ], "box": [ [ "display", "visibility" ], [ "position", "z-index", "top", "right", "bottom", "left" ], [ "box-sizing" ], [ "flex", "flex-basis", "flex-dire...
JavaScript
0
@@ -1661,12 +1661,15 @@ ion- -dela +propert y%22,%0A @@ -1719,47 +1719,281 @@ ion- -property%22,%0A %22transition-timing-fun +timing-function%22,%0A %22transition-delay%22%0A %5D,%0A %5B%0A %22animation%22,%0A %22animation-name%22,%0A %22animation-duration%22,%0A %22animation-play...
4b09114cef73917a1b6b22a8762c323c6ce7689c
remove es6 style for node 0.12 compat
index.js
index.js
var stringify = require('json-stable-stringify'); module.exports = function(options) { function plugin(babel) { var types = babel.types; var callPathsToRemove = []; return new babel.Transformer('babel-plugin-remove-functions', { ImportDeclaration: function(node) { options.removals.forEach(...
JavaScript
0
@@ -417,19 +417,19 @@ -let +var firstNo @@ -574,16 +574,24 @@ ach( +function (method) =%3E @@ -590,11 +590,8 @@ hod) - =%3E %7B%0A @@ -628,19 +628,16 @@ ve.push( -%60$%7B firstNod @@ -652,20 +652,23 @@ name -%7D.$%7B + + '.' + method -%7D%60 );%0A @@ -835,19 +835,19 @@ -let +var ...
a4eb7dde7b87465ce2229b5654c01688ffccde94
refresh maxAge before save (#43)
index.js
index.js
var cookieparser = require('cookie-parser'); var debug = require('debug')('express-socket.io-session'); var hash = require('./lib/hash'); // The express session object will be set // in socket.handskake.session. /** * Returns a middleware function that acts on socket.handshake * * @param {Function} expressSessionMi...
JavaScript
0
@@ -2382,24 +2382,51 @@ ave(req)) %7B%0A +%09%09%09%09%09%09req.session.touch();%0A %09%09%09%09%09%09req.se
6bd05935f1d86cae432a4ac85e14600656465aa2
Remove unneeded method.
index.js
index.js
/* global browser */ /* global protractor */ 'use strict'; var enabled = false; function setup() { browser.addMockModule('protractorHttpInterceptorModule_', function() { var serviceId = 'mockedInterceptor'; angular.module('protractorHttpInterceptorModule_', []) .config([ '$httpProvider', configMock ]...
JavaScript
0.000001
@@ -1293,24 +1293,47 @@ %7D else %7B%0A + enabled = false;%0A export @@ -1372,62 +1372,15 @@ - enabled = false;%0A %7D%0A %7D;%0A%7D%0A%0Afunction teardown() %7B +%7D%0A %7D;%0A %7D%0A%0Af @@ -1824,37 +1824,8 @@ up;%0A -exports.teardown = teardown;%0A expo
07271d7b7633c379e5f35e0f023fc30fa4e142df
Add more options
index.js
index.js
(function() { var fs = require('fs'), path = require('path'), _ = require('underscore'); var SelfReloadJSON = function SelfReloadJSON(options) { switch(typeof options) { case 'string': options = { fileName: options }; break; case 'object': break; default: return; } var update...
JavaScript
0
@@ -261,16 +261,34 @@ object': + case 'undefined': break;%0A @@ -302,22 +302,56 @@ efault: -return +throw new Error('Invalid options type.') ;%0A %7D%0A @@ -511,16 +511,22 @@ (options + %7C%7C %7B%7D , %7B%0A @@ -632,16 +632,59 @@ al: 5000 +,%0A reviver: null,%0A replacer: null %0A %7D); @...
006735318157205e5e209d1e4731cba9bac5bcf9
Stringify the base URI once
index.js
index.js
"use strict"; var url = require("url"), util = require("util"); var lockingCache = require("locking-cache"); var enableCaching = function(uri, source, locker) { if (source._cached) { // already cached return source; } var makeKey = function(name, context) { // collect properties attached to t...
JavaScript
0.999999
@@ -232,16 +232,62 @@ e;%0A %7D%0A%0A + var uriKeyComponent = JSON.stringify(uri);%0A%0A var ma @@ -536,17 +536,17 @@ at(%22%25s:%25 -j +s @%25j%22, na @@ -552,16 +552,28 @@ ame, uri +KeyComponent , proper