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
646532f753338a2b5f4f869b3453db5d520f5e76
Add Remove All labels prompt
prompts/mainMenu.js
prompts/mainMenu.js
/** * The "Initial"/"Main" prompts */ "use strict"; module.exports = [ { type: "list", name: "main", message: "Welcome to git-labelmaker!\nWhat would you like to do?", choices: [ "Add Custom Labels", "Add Labels From Package", "Remove Labels", "Reset Token" ] } ];
JavaScript
0.000001
@@ -269,16 +269,37 @@ Labels%22, + %22Remove All Labels%22, %22Reset
3f3ad6a7eda8b2afad2a819b8ca6c35d1284d168
FIX Javascript “Cannot read property 'length' of undefined” when checking a variable's length
www/public/adm/js/listener.js
www/public/adm/js/listener.js
$(function() { var body = $('body'); /** * Загрузка данных слушателя */ $('#listeners').on('click', 'input:checkbox', function() { if ($(this).is(":checked")) { var group = "input:checkbox[name='" + $(this).attr("name") + "']"; $(group).prop("checked", false); ...
JavaScript
0
@@ -4251,24 +4251,144 @@ +//FIX Javascript %E2%80%9CCannot read property 'length' of undefined%E2%80%9D when checking a variable's length%0A if (active_c @@ -4394,28 +4394,16 @@ checkbox -.length == 0 )%0A
fafe4280614d5b8eff2f28da9651f734b5d05229
revert scanner
public/js/video.js
public/js/video.js
(function () { var inputCanvas = document.createElement('canvas'); var inputContext = inputCanvas.getContext('2d'); var outputCanvas = document.getElementById('output'); var outputContext = outputCanvas.getContext('2d'); var video = document.getElementById('video'); var constraints = { video: true }; var...
JavaScript
0
@@ -376,17 +376,14 @@ lInd -ices = %5B%5D +ex = 0 ;%0A%0A @@ -1858,216 +1858,34 @@ t);%0A -%0A var numPix = width * height;%0A var bufferLength = numPix / 4;%0A pixelIndices = %5B0, 1*bufferLength, 2*bufferLength, 3*bufferLength%5D;%0A %7D;%0A%0A function draw () %7B%0A inputContext.drawImage(video, 0...
e70f999ff7ea98504c67404af22f9647226c9041
refactor flowlet output code addressing comments
cdap-ui/app/features/flows/controllers/tabs/runs/flowlets/output-ctrl.js
cdap-ui/app/features/flows/controllers/tabs/runs/flowlets/output-ctrl.js
angular.module(PKG.name + '.feature.flows') .controller('FlowletDetailOutputController', function($state, $scope, MyDataSource, MyMetricsQueryHelper, myFlowsApi) { var dataSrc = new MyDataSource($scope); var flowletid = $scope.$parent.activeFlowlet.name; var runid = $scope.runs.selected.runid; $scope...
JavaScript
0.000001
@@ -1307,609 +1307,26 @@ -if (res.series%5B0%5D) %7B%0A updateOutput(res.series%5B0%5D.data);%0A %7D else %7B%0A var val = %5B%5D;%0A%0A for (var i = 60; i %3E 0; i--) %7B%0A val.push(%7B%0A time: Math.floor((new Date())...
e0b1d23bf1911bc4134d6a4958b929780c74a661
Remove trailing whitespace
scripts/create_pages.js
scripts/create_pages.js
#!/usr/bin/env node var fs = require('fs'), marked = require('marked'); process.chdir(__dirname); marked.setOptions({ renderer: new marked.Renderer(), gfm: true, tables: true, breaks: false, pedantic: false, sanitize: true, smartLists: true, smartypants: false }); var scripts = [ 'session'...
JavaScript
0.999999
@@ -645,17 +645,16 @@ f-8%22%3E' + - %0A
1163c7daefa9882a3989ef812d799e0caced24be
Update project1-chart1.js
project1/project1-chart1.js
project1/project1-chart1.js
(function() { var margin = { top: 30, left: 100, right: 30, bottom: 30}, height = 500 - margin.top - margin.bottom, width = 780 - margin.left - margin.right; console.log("Building chart 1"); // Create a time parser var parse = d3.timeParse("%m/%d/%y") // Create your scales, but ONLY give them a range ...
JavaScript
0.000012
@@ -4270,32 +4270,35 @@ %22axis x-axis%22)%0A +// .attr(%22t
f156c6450ac38c63e6df9f97dbd510a49f287ce3
disable safari ios for indexedDB test. @rev tbliss@ @bug W-2747747@
aura-components/src/test/components/auraStorageTest/noGetApplicationCache/noGetApplicationCacheTest.js
aura-components/src/test/components/auraStorageTest/noGetApplicationCache/noGetApplicationCacheTest.js
({ tearDown: function() { $A.storageService.getStorage('actions').remove('aura://ComponentController/ACTION$getApplication:{"name":"auraStorageTest:noGetApplicationCache"}'); }, testOfflineLaunch: { // TODO(W-2701964): Flapping in autobuilds, needs to be revisited labels: ["flapper"...
JavaScript
0
@@ -1,11 +1,202 @@ (%7B%0A +%09// IndexedDb not supported in IE %3C 10%0A // Disable IndexedDB for Safari because it doesn't work reliably in iframe.%0A browsers:%5B%22-IE7%22, %22-IE8%22, %22-IE9%22, %22-SAFARI%22, %22-IPAD%22, %22-IPHONE%22%5D,%0A%09%0A tear
e1c59b8337344f158dd2348bea1991699ef86fcc
Add Page#getPrevious() and Page#getNext().
lib/Page.js
lib/Page.js
var path = require('path'), fs = require('fs'), parsers = require('./parsers'), woods = require('./woods'), Site = require('./Site'), Showdown = require('showdown'), converter = new Showdown.converter(), express = require('express'); var Page = function(site, parent, directory) { var that = this; this.site = ...
JavaScript
0
@@ -2491,24 +2491,458 @@ false;%0A%7D;%0A%0A +Page.prototype.hasPrevious = function() %7B%0A%09return this.visible && this.index %3E 0;%0A%7D;%0A%0APage.prototype.hasNext = function() %7B%0A%09return this.visible && this.index + 1 %3C this.parent.children.length;%0A%7D;%0A%0APage.prototype.getPrevious = function() %7...
26e70b865e2f8a1d8a3916c72529d6fc96caa155
fix wrong function method used to execute with context
web/static/js/modules/modalService.js
web/static/js/modules/modalService.js
/* global angular, console, $ */ /* jshint multistr: true */ (function() { 'use strict'; angular.module('modalService', []). factory("$modalService", [ "$rootScope", "$templateCache", "$http", "$interpolate", "$compile", "$translate", "$notification", function($rootScope, $templateCache, $h...
JavaScript
0.000006
@@ -8732,20 +8732,20 @@ .onShow. -bind +call (modal);
48b597b80b5a5bde9b4693c7991039b7e740b480
Update jsPerf_Operation.js
CNN/jsPerf/jsPerf_Operation.js
CNN/jsPerf/jsPerf_Operation.js
export { testCorrectness }; //import * as RandTools from "../util/RandTools.js"; import * as TensorPlaceholder from "../Conv/TensorPlaceholder.js"; import * as Operation from "../Conv/Operation.js"; /** * For testing Operation.Base. * */ class Case { /** * @param {number} caseId The id of this test case. ...
JavaScript
0.000001
@@ -2313,24 +2313,296 @@ .%60%0A );%0A +%0A//!!! ...unfinished... (2022/06/04)%0A// aTensorPlaceholder.height, aTensorPlaceholder.width,%0A// aTensorPlaceholder.channelCount, aTensorPlaceholder.channelCount_lowerHalf, aTensorPlaceholder.channelCount_higherHalf,%0A// aTensorPlaceholder.scaleBoundsA...
2be799f6cdc2c9812ace9a48e67e33139d2eba49
Refactor users_by_id
web/static/js/reducers/users_by_id.js
web/static/js/reducers/users_by_id.js
import keyBy from "lodash/keyBy" export default (state = {}, action) => { switch (action.type) { case "SET_INITIAL_STATE": return keyBy(action.initialState.users, "id") case "SET_USERS": return Object.assign(state, keyBy(action.users, "id")) case "SYNC_PRESENCE_DIFF": { const presencesR...
JavaScript
0.000001
@@ -25,16 +25,82 @@ h/keyBy%22 +%0Aimport values from %22lodash/values%22%0A%0Aconst USER_PRIMARY_KEY = %22id%22 %0A%0Aexport @@ -235,20 +235,32 @@ .users, -%22id%22 +USER_PRIMARY_KEY )%0A ca @@ -288,37 +288,31 @@ return -Object.assign( +%7B ... state, +... keyBy(ac @@ -319,30 +319,43 @@ tion.users, -%2...
789a18e3f251bee5f1fad3b72f96a6a866ab40db
resolve conflict to make it build
web_app/vis_comm/routes/cis_karate.js
web_app/vis_comm/routes/cis_karate.js
var express = require('express'); var router = express.Router(); // change `/cis_karate` into `/`, here root directory is `/cis_karate` router.get('/', function (req, res, next) { res.render('cis_karate', {title: 'Express'}); }); // change `/comm_result/cis1` into `/comm_result` to make it more readable router...
JavaScript
0.000001
@@ -419,186 +419,8 @@ nc;%0A -%3C%3C%3C%3C%3C%3C%3C HEAD%0A%0A exec('cd ../../community_detection_algos; python exec_docker.py demo_cis karate_edges_input.csv; echo done %3E done', function (error, stdout, stderr) %7B%0A%0A=======%0A @@ -556,57 +556,8 @@ ) %7B%0A -%3E%3E%3E%3E%3E%3E%3E 5f3baead56f4eff08e7650...
ac6dca421aca4c6ab649b3decb73ba0eee278775
support --foo bar parameters in CLI
lib/args.js
lib/args.js
/** * Simple phantom.args parser */ exports.parse = function(args) { var res = {}; args = args || []; args.forEach(function(item) { var idx = item.indexOf('='), key, val; // --foo if (idx < 0) { key = item.substring(2); val = true; } // --foo=bar else { key = item.substring(2, idx); va...
JavaScript
0.000001
@@ -77,17 +77,37 @@ res = %7B%7D -; +,%0A%09%09lastKey = false;%0A %0A%09args = @@ -126,16 +126,25 @@ %0A%0A%09args. +slice(1). forEach( @@ -166,17 +166,61 @@ %7B%0A%09%09var -i +hasDash = item.indexOf('--') === 0,%0A%09%09%09equalI dx = ite @@ -258,21 +258,156 @@ %09// -- -foo -%0A%09%09if (i + test%0A%09%09...
a05d00143c97bfddd1f3f0101986d0d543741e01
update file /lib/auth.js
lib/auth.js
lib/auth.js
'use strict'; var express = require('express'); var bodyParser = require('body-parser'); var cors = require('cors'); var queryString = require('querystring'); function auth() { var router = express.Router(); router.all('/init', function(req, res) { var params = req.body; // params.userId params.password ...
JavaScript
0.000002
@@ -919,32 +919,46 @@ %7D);%0A + %7D%0A %7D);%0A
285cb8b8b52b09c55372c4f1fc3275d9bb2b8951
Add docu for Auth
lib/auth.js
lib/auth.js
var _ = require('underscore'); var Promise = require('bluebird'); function Auth() { this._validConnections = []; } /** * @param {BrowserConnection} connection */ Auth.prototype.isValidConnection = function(connection) { return _.some(this._validConnections, connection); }; /** * @param {BrowserConnection} con...
JavaScript
0
@@ -751,108 +751,133 @@ %7B%0A -// do rpc call to CM app and return boolean depending if user exists%0A +return Promise.resolve();%0A%7D;%0A%0A/**%0A * @param %7BString%7D sessionId%0A * @param %7BString%7D streamChannelName%0A * @ return - +s %7B Promise -.resolve();%0A%7D;%0A +%7D%0A */ %0AAut @@ -974,16 +97...
987b3116e99cff342466eff60147138c6e6400e8
Add better error reporting for child process
bin/cli.js
bin/cli.js
#!/usr/bin/env node var program = require('commander') , path = require('path') , fs = require('fs') , exec = require('child_process').exec program.version(require('../package').version) .usage('[options] <command> to run before reloading the browser') .option('-d, --directory <path>', 'absolute or relative...
JavaScript
0.000001
@@ -3291,24 +3291,40 @@ unction (err +, stdout, stderr ) %7B%0A%09%09if (er @@ -3336,16 +3336,52 @@ row err%0A +%09%09if (stderr) console.error(stderr)%0A %09%09var fi
ab72eeb35a728172681079b16ea51b626942ed44
comment out debug console.log line
bin/iob.js
bin/iob.js
#!/usr/bin/env node function iobCalc(treatment, time) { var dia = profile_data.dia; var diaratio = dia / 3; var peak = 75 * diaratio; var sens = profile_data.sens; if (typeof time === 'undefined') { var time = new Date(); } if (treatment.insulin) { ...
JavaScript
0
@@ -2430,24 +2430,26 @@ +// console.log(
42d02d64ef550492cab6f46407791727949f0f34
add png to mappable content types
lib/blob.js
lib/blob.js
var AuthRequest = require('./authRequest') , fs = require('fs'); function Blob() { this.id = null; } Blob.fromFile = function blobFromFile(path, callback) { var suffix_mappings = [ { suffix: 'jpg', content_type: "image/jpeg", message_type: "image" }, { suffix: 'jpeg', content_type: "image/jpeg", message_ty...
JavaScript
0
@@ -324,16 +324,93 @@ %22image%22 + %7D,%0A %7B suffix: 'png', content_type: %22image/png%22, message_type: %22image%22 %7D%0A%09%5D;%0A%0A @@ -646,16 +646,169 @@ %7D%0A%09%7D);%0A%0A + if (!blob.content_type %7C%7C !blob.message_type) %7B%0A console.log('WARNING: message_type not assigned in Blob...
69a277e147c113ff330539103c377254cbf8ccf2
use data.url instead of localhost
gatsby-browser.js
gatsby-browser.js
import React from 'react'; import ReactGA from 'react-ga'; import { Router } from 'react-router-dom'; import { Provider } from 'react-redux'; import createStore from './src/state/createStore'; const { ga_track_id } = require('./data/config'); const isLocalDevelopment = () => window && window.location.hostname.inde...
JavaScript
0.000004
@@ -195,16 +195,21 @@ %0Aconst %7B + url, ga_trac @@ -308,45 +308,42 @@ tion -.hostname.indexOf('localhost') + && window.location.origin !== --1 +url ;%0A%0Ai
467741cb179c7e80e13c9c126f4877cc2e45b74c
Trim the input to deal with accidental spaces
quiz.js
quiz.js
/** * quiz.js - The quiz engine * * Author: Steve Kerrison <forename.surname@bristol.ac.uk> * Copyright: Steve Kerrison 2015 * License: MIT, see bundled LICENSE file * **/ function NBQuiz() { "use strict"; this.configs = { 'simple': { 'questions': 20, 'bases': ...
JavaScript
0.0003
@@ -1753,16 +1753,23 @@ ').val() +.trim() ;%0A
d69924d5125bd92547ee801a85402e33131308da
Support using lusca.csrf() without a body
lib/csrf.js
lib/csrf.js
'use strict'; var token = require('./token'); /** * CSRF * https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF) * @param {Object} options * key {String} The name of the CSRF token in the model. Default "_csrf". * impl {Object} An object with create/validate methods for custom tokens. Optiona...
JavaScript
0
@@ -1220,24 +1220,37 @@ _token = + (req.body && req.body%5Bke @@ -1251,16 +1251,17 @@ ody%5Bkey%5D +) %7C%7C req. @@ -1457,8 +1457,9 @@ %7D;%0A%7D; +%0A
887d430a49a130fe849a0952ffa519028af06c96
Handle 'wrong credentials' case
bin/sub.js
bin/sub.js
#!/usr/bin/env node var mqtt = require('../') , path = require('path') , fs = require('fs') , concat = require('concat-stream') , helpMe = require('help-me')({ dir: path.join(__dirname, '..', 'doc') }) , minimist = require('minimist'); function start(args) { args = minimi...
JavaScript
0
@@ -2228,16 +2228,215 @@ %7D%0A %7D);%0A + %0A client.on('error', function(err)%7B%0A // Handle 'No Authentication'%0A console.warn(err);%0A client.end();%0A %7D);%0A // TODO: alert impossibility to subscribe to a topic, 'No authorization'.%0A %0A %7D%0A%0Amodul
c466b2c7156da88d948ffb68b043dc38d972d072
Send body with 204 for /update
bin/web.js
bin/web.js
var _ = require('lodash'); var Q = require('q'); var url = require('url'); var express = require('express'); var useragent = require('express-useragent'); var basicAuth = require('basic-auth'); var config = require('../lib/config'); var versions = require('../lib/versions'); var platforms = require('../lib/platforms')...
JavaScript
0
@@ -2619,16 +2619,35 @@ tus(204) +.send('No updates') ;%0A %7D)
47bc35cb84ba903ca604697f3004baf2a3f8f5a2
fix wrong jsDoc for render method
src/sap.m/src/sap/m/DynamicPageHeaderRenderer.js
src/sap.m/src/sap/m/DynamicPageHeaderRenderer.js
/*! * ${copyright} */ sap.ui.define([], function () { "use strict"; /** * oDynamicPage Header renderer. * @namespace */ var DynamicPageHeaderRenderer = {}; /** * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}. * * @param {sap.ui.core.RenderManager} oRm...
JavaScript
0.000001
@@ -423,20 +423,33 @@ ntrol%7D o -Page +DynamicPageHeader An obje
fd55a5beec84a9d789972767c29fea07a8c76b30
Check if the node has already been added
src/server/graph-generation/interaction/index.js
src/server/graph-generation/interaction/index.js
const _ = require('lodash'); const pc = require('../../pathway-commons'); const logger = require('./../../logger'); const LRUCache = require('lru-cache'); const cache = require('../../cache'); const { PC_CACHE_MAX_SIZE, MAX_SIF_NODES } = require('../../../config'); let interactionType2Label = type => { switch( type ...
JavaScript
0
@@ -2647,24 +2647,25 @@ orEach( part +i cipant =%3E no @@ -2661,16 +2661,73 @@ ipant =%3E + %7B%0A if ( !_.has(nodeId2Json, participant.data.id ) ) nodeId2 @@ -2731,24 +2731,25 @@ Id2Json%5Bpart +i cipant.data. @@ -2758,23 +2758,30 @@ %5D = part +i cipant - +;%0A %7D );%0A%0A
5daf897b097a35e4c9f074fe817e458d762b3ac1
set this.hash to null by default
lib/file.js
lib/file.js
if (global.GENTLY) require = GENTLY.hijack(require); var util = require('./util'), WriteStream = require('fs').WriteStream, EventEmitter = require('events').EventEmitter, crypto = require('crypto'); function File(properties) { EventEmitter.call(this); this.size = 0; this.path = null; this.name = ...
JavaScript
0.000002
@@ -335,24 +335,44 @@ ype = null;%0A + this.hash = null;%0A this.lastM @@ -427,49 +427,8 @@ %0A %0A - if(typeof properties === 'object') %7B%0A fo @@ -459,18 +459,16 @@ ) %7B%0A - this%5Bkey @@ -488,22 +488,16 @@ s%5Bkey%5D;%0A - %7D%0A %7D%0A%0A i
020f4257fa14d7df6b1e0fe88141c0515f0d3844
Update script.js
public/js/script.js
public/js/script.js
$(document).ready(function() { var modal = $('#upload-area'); modal.css('margin-top', (window.innerHeight/2) - $('#upload').height()); $('#file-dialog').on('change', function () { var files = $(this).get(0).files; if (files.length === 0){ return 0; } var ...
JavaScript
0.000002
@@ -1754,16 +1754,23 @@ response +.images );%0A %7D
64751c3deaccb4203a25bc38b54e5c5823f69bd3
Update the little layout of BugTracking.js (space <br/>) <br/>)
Team4of5/src/Team4of5_App/BugTracking/BugTracking.js
Team4of5/src/Team4of5_App/BugTracking/BugTracking.js
import React from 'react'; import ReactDOM from 'react-dom'; import Navbar from '../Navbar/Nav.js'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; import BugTypeTable from './BugTypes.js'; import BugNotification from './BugNotification.js'; import BugTrackTableSearch from './BugTrackingTool...
JavaScript
0
@@ -505,33 +505,60 @@ %0A %3C/div%3E%0A + %3Cbr/%3E%0A %3Cbr/%3E %0A - %3Cdiv%3E%0A @@ -595,25 +595,52 @@ %3C/div%3E%0A + %3Cbr/%3E%0A %3Cbr/%3E %0A - %3Cdiv @@ -673,24 +673,24 @@ leSearch /%3E%0A - %3C/di @@ -688,24 +688,52 @@ %3C/div%3E%0...
6fc33c73d72df1b39f2f8b3c321324bf709a857d
Use hasOwnProperty to detect lastevaluatedkey
read.js
read.js
/*jshint esversion: 6 */ /* globals console, require, exports*/ 'use strict'; // Load required libraries const AWSXRay = require('aws-xray-sdk-core'); const AWS = AWSXRay.captureAWS(require('aws-sdk')); const dynamodb = new AWS.DynamoDB.DocumentClient(); const moment = require('moment-timezone'); exports.handler = (ev...
JavaScript
0
@@ -1512,24 +1512,40 @@ if (event. +hasOwnProperty(' exclusivesta @@ -1553,19 +1553,44 @@ tkey -.length %3E 1 +') && event.exclusivestartkey !== '' ) %7B%0A
2d4beb72de35c63200e12616f130eb10b1b9fef9
bump version
Better_Paylocity.user.js
Better_Paylocity.user.js
// ==UserScript== // @name Better Paylocity // @namespace betterui // @description Improvements to the Paylocity UI // @include https://webtime2.paylocity.com/webtime/Employee/Timesheet // @include https://webtime2.paylocity.com/webtime/Employee/Timesheet# // @downloadURL https://raw.githubusercontent....
JavaScript
0
@@ -401,17 +401,17 @@ 0.1. -1 +2 %0A// @gra
d5c15e9995004dc26c2d0713c3bde95b62fddc94
Remove traces of jshint config
lib/assert/imgLoaded_client.js
lib/assert/imgLoaded_client.js
/* jshint browser: true */ 'use strict'; // returns true if the image is loaded and decoded, // or a number, if it didn't find one single image, // or a helpful error if it wasn't an image, // or the path, if it found some non-loaded image module.exports = function imgLoaded(selector) { function describe(elem) { ...
JavaScript
0.000001
@@ -1,31 +1,4 @@ -/* jshint browser: true */%0A 'use
d59e52f96ad70d13f35070d70ee29b7fe8954cc9
store hier by type
nodejs/lib/annotators/gateAnnotator.js
nodejs/lib/annotators/gateAnnotator.js
// GATE annotator // extracts instance annotations from markup // relative location of sensebase for libs FIXME var sensebase = '../../../node_modules/sensebase/'; var querystring = require('querystring'), http = require('http'), cheerio = require('cheerio'); var annoLib = require(sensebase + 'lib/annotators/annota...
JavaScript
0
@@ -1967,27 +1967,31 @@ %7D);%0A%0A -console.log + GLOBAL.info ('found'
f0bb198d7d70a421d0b31dcdf3c67978e4887a5c
Remove list of possible values for platformName cap (#233)
lib/basedriver/desired-caps.js
lib/basedriver/desired-caps.js
import log from './logger'; import validator from 'validate.js'; import B from 'bluebird'; let desiredCapabilityConstraints = { platformName: { presence: true, isString: true, inclusionCaseInsensitive: [ 'iOS', 'Android', 'FirefoxOS', 'Windows', 'Mac', 'Tizen', ...
JavaScript
0.000008
@@ -185,153 +185,8 @@ ue,%0A - inclusionCaseInsensitive: %5B%0A 'iOS',%0A 'Android',%0A 'FirefoxOS',%0A 'Windows',%0A 'Mac',%0A 'Tizen',%0A 'Fake'%0A %5D%0A %7D,
afdb9ae0073b0a28b7f430e263ff2b6bfe3ee295
Update chat.js
lib/clients/web/facets/chat.js
lib/clients/web/facets/chat.js
/** * API Facet to make calls to methods in the chat namespace. * * This provides functions to call: * - delete: {@link https://api.slack.com/methods/chat.delete|chat.delete} * - meMessage: {@link https://api.slack.com/methods/chat.meMessage|chat.meMessage} * - postMessage: {@link https://api.slack.com/meth...
JavaScript
0
@@ -5675,35 +5675,37 @@ red, optCb) %7B%0A -var +const requiredArgs = @@ -5695,32 +5695,53 @@ t requiredArgs = + !!userAuthRequired ? %7B%0A ts: ts,%0A @@ -5807,32 +5807,85 @@ quired: -userAuthRequired +true,%0A %7D : %7B%0A ts: ts,%0A channel: channel,%0A unfurls: unfurls, %0A %7D;%0A%0A
dffec1da4e10738a46a30db608e3dcda2c62af44
update chat.js
lib/clients/web/facets/chat.js
lib/clients/web/facets/chat.js
/** * API Facet to make calls to methods in the chat namespace. * * This provides functions to call: * - delete: {@link https://api.slack.com/methods/chat.delete|chat.delete} * - meMessage: {@link https://api.slack.com/methods/chat.meMessage|chat.meMessage} * - postMessage: {@link https://api.slack.com/meth...
JavaScript
0
@@ -5447,34 +5447,60 @@ am %7B -Boolean%7D +Object=%7D opts%0A * @param %7B?%7D opts. user -AuthR +_auth_r equired - P @@ -5495,17 +5495,16 @@ equired - - Pass t @@ -5679,32 +5679,20 @@ nfurls, -userAuthRequired +opts , optCb) @@ -5698,15 +5698,14 @@ ) %7B%0A +%0A -const +var req @@ -5719,29 +5719,...
dd0aa532e07e6d4d2b7c2ae7362a20fa89379393
Fix refactor fail
lib/components/views/SignUp.js
lib/components/views/SignUp.js
import React, {Component, PropTypes} from 'react'; import {Link} from 'react-router'; import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import { Card, FlatButton, RaisedButton, Snackbar, TextField } from 'material-ui'; import * as authActions from '../../actions/authActions'; imp...
JavaScript
0.000006
@@ -2168,16 +2168,17 @@ .signup( +%7B email, p @@ -2184,16 +2184,17 @@ password +%7D );%0A %7D
e7e7dc32fcf5c08260f4a27315f117b93629e0f5
Remove useless mp3s
scripts/root.js
scripts/root.js
var root = angular.module('root', ["ngResource", "mediaPlayer"]) .controller("index", ["$scope", "$resource", function ($scope, $resource) { var artists = $resource("http://localhost:9000/api/artists"); var years = $resource('http://localhost:9000/api/artists/:artist_slug/years'); var shows = $resource('http://l...
JavaScript
0.000011
@@ -165,38 +165,56 @@ rce(%22http:// -localhost:9000 +iguana-staging.app.alecgorge.com /api/artists
8f60fee09bac9db95f44a9fedc2a5be955786495
The vendor’s name should be unique
server/app/models/food-vendor.js
server/app/models/food-vendor.js
'use strict'; const mongoose = require('mongoose'); const Schema = mongoose.Schema; const foodVendorSchema = new Schema({ title: { type: String, required: true }, url: { type: String, required: true }, minOrderCost: { type: Number } }); module.exports = mongoose.model('FoodVendor', foodVendorSchema);
JavaScript
0.999999
@@ -239,16 +239,360 @@ %7D%0A%7D);%0A%0A +foodVendorSchema.path('title').validate(function(title, callback) %7B%0A const Vendor = mongoose.model('FoodVendor');%0A%0A if (this.isNew %7C%7C this.isModified('title')) %7B%0A Vendor.find(%7B title %7D).exec(function(err, vendors) %7B%0A callback(!err && vendors....
d613efbae1abfb14ce95539594039d184932dde7
Fix issue-1: Keep waiting if the same user joins
server/controllers/Matchmaker.js
server/controllers/Matchmaker.js
var OngoingGames = require("../models/OngoingGames"); var playerQueue = []; exports.startGame = function(req, res) { var player1 = req.body.username; var game = OngoingGames.findGame(player1); // player has ongoing game if (game != null) { res.json(game); } // Start a new game if opponent exists. ...
JavaScript
0.000001
@@ -311,16 +311,52 @@ t exists + and opponent is not the same player . Pops t @@ -414,16 +414,55 @@ ngth %3E 0 + && playerQueue.indexOf(player1) === -1 ) %7B%0A
832efe479e68868c4da13b4e30cdd0f7beaea084
Use correct key for accessing issueId for a vote
server/channels/vote.js
server/channels/vote.js
const { broadcastAndEmit, emit, emitError } = require('../utils'); const logger = require('../logging'); const { addVote, generatePublicVote } = require('../managers/vote'); const { getActiveGenfors } = require('../models/meeting.accessors'); const { getAnonymousUser } = require('../models/user.accessors'); const { is...
JavaScript
0
@@ -1373,32 +1373,31 @@ sueId: vote. -question +issueId ,%0A %7D);%0A @@ -2179,16 +2179,15 @@ ote. -question +issueId ,%0A
e8438ddde0bb5ae0e40adb53f6907404c475aecb
Add comments
server/config/routes.js
server/config/routes.js
module.exports = function(app, express) { app.get('/auth/facebook', function(req, res) { res.send('Facebook OAuth'); }); app.get('/auth/facebook/callback', function(req, res) { res.send('Callback for Facebook OAuth'); }); app.route('/api/users') .post(function(req, res) { res.send('Create...
JavaScript
0
@@ -36,16 +36,36 @@ ess) %7B%0A%0A + // Facebook OAuth%0A app.ge @@ -97,32 +97,32 @@ ion(req, res) %7B%0A - res.send('Fa @@ -139,25 +139,24 @@ th');%0A %7D);%0A -%0A app.get('/ @@ -253,16 +253,35 @@ %0A %7D);%0A%0A + // User Creation%0A app.ro
8af1afb539597dab3674bd036d19ad20983abaa1
add status route
server/config/routes.js
server/config/routes.js
var email = require('../components/messages/middleware').email , messages = require('../components/messages/controllers') , projects = require('../components/projects/controllers'); module.exports = function (app) { // messages app.post('/api/messages', email, messages.create); // projects app.get('/api/...
JavaScript
0.000001
@@ -177,16 +177,73 @@ ollers') +%0A , status = require('../components/status/controllers') ;%0A%0Amodul @@ -449,12 +449,64 @@ s.show); +%0A%0A // status%0A app.get('/api/status', status.show); %0A%7D;%0A
6fb62ed76a50629c064a2efd31974326e7bfdfd3
update static files
server/src/controller/recipes.js
server/src/controller/recipes.js
import db from '../models'; // import Sequelize from 'sequelize'; const recipes = db.recipes; const reviews = db.reviews; // const Op = Sequelize.Op; /** * * * @class Recipes */ class Recipes { /** * * * @param {any} req * @param {any} res * @returns * @memberof Recipes */ add(req, ...
JavaScript
0.000001
@@ -3078,16 +3078,21 @@ eq.query +.sort ) %7B%0A @@ -3264,22 +3264,16 @@ 'DESC';%0A - %0A %7D e @@ -3300,24 +3300,53 @@ limitValue = + (req.query.limit %3C= 0) ? 12: req.query.l @@ -3861,16 +3861,62 @@ tValue); +%0A const recipes = getAllRecipes.rows; %0A%0A @@ -3994,29 +3994,24 @@ ...
c119c54cd53be39f6016e716f5056783d6392117
Fix a bit of linting
chatanyara.js
chatanyara.js
/** * Navigation and Resource Timing results. * * @author Juga Paazmaya <paazmaya@yahoo.com> * @license Licensed under the MIT license * @version 0.2.0 * @see https://github.com/paazmaya/chatanyara.js */ var Chatanyara = (function main() { // eslint-disable-line no-unused-vars 'use strict'; var Kushanku = ...
JavaScript
0.001647
@@ -683,15 +683,28 @@ ion -navTime +getNavigationTimings () %7B @@ -2487,15 +2487,26 @@ ion -resTime +getResourceTimings () %7B @@ -2938,19 +2938,25 @@ unction -mem +getMemory Info() %7B @@ -3242,12 +3242,9 @@ ion -saiP +p arse
a13fadb527e38ea41ddd7974995012fa13277ced
add mock response for getAllActions event
server/index.js
server/index.js
var io = require("socket.io").listen(31415); io.sockets.on("connection", function (socket) { console.log('A Client has Connected to this Server'); socket.on("message", function (data) { console.log('Message!', data); }); socket.on("disconnect", function (data) { console.log("disconnec...
JavaScript
0
@@ -165,15 +165,21 @@ on(%22 -message +getAllActions %22, f @@ -220,23 +220,699 @@ og(' -Message!', data +Asking all actions!', data);%0A socket.emit('defineAllActions',%0A %7B actions:%0A %5B%0A %7B%0A name: 'lights',%0A ...
db0659cba597ffc1802fcc34db421ba7a38added
fix profile issue
server/index.js
server/index.js
var express = require('express'); var router = express.Router(); var passport = require('passport'); var models = require('../models/'); router.get('/', function (req, res) { 'use strict'; res.render('index', { title: 'Welcome to Lan' }); }); router.get('/login', function (req, res) { 'use strict'; if(!...
JavaScript
0.000001
@@ -1943,40 +1943,8 @@ )$/, - passport.authenticate('local'), fun @@ -1984,42 +1984,92 @@ ;%0A -console.log(req.session.messages); +if(!req.isAuthenticated())%7B%0A res.render('login/index', %7Btitle: 'Lan Login'%7D);%0A %7D %0A m
422c36d3be7f1b65f5e6c31cf2c20c730b44cc0c
Fix server --test message
cli/server.js
cli/server.js
"use strict"; /*global N*/ // 3rd-party var async = require('async'); module.exports.parserParameters = { version: N.runtime.version, addHelp: true, help: 'start fontello server', description: 'Start fontello server' }; module.exports.commandLineArguments = [ { args: ['--test'], ...
JavaScript
0
@@ -247,16 +247,17 @@ er'%0A%7D;%0A%0A +%0A module.e @@ -380,16 +380,35 @@ mmed -e +i ately, +' +%0A ' with @@ -1018,17 +1018,17 @@ te('%5CnSe -t +r ver exec @@ -1035,16 +1035,18 @@ test OK +%5Cn ');%0A
1e41a7179381e4725c543e8a0d3602f0efb6abce
allow url prefix/subdirectory set w cmd line arg
server/index.js
server/index.js
#!/usr/bin/env node "use strict"; const https = require('https'); const fs = require("fs"); const path = require("path"); const express = require("express"); const parseArgs = require("minimist"); const bodyParser = require("body-parser"); const promiseUtil = require("./promiseUtil"); const Keys = require("./Keys"); c...
JavaScript
0.000009
@@ -4896,16 +4896,36 @@ app.use( +args.urlpre %7C%7C %22/%22, express. @@ -4979,16 +4979,38 @@ app.use( +(args.urlpre %7C%7C %22%22) + %22/api%22, @@ -5418,16 +5418,30 @@ ss.port%7D +$%7Bargs.urlpre%7D %60;%0A %7D); @@ -5586,16 +5586,37 @@ t: %5B %22c%22 + %5D,%0A urlpre: %5B %22u%22 %5D%0A %7D,%0A
a2bcfb5537f053cd516e8b7bbb09c364d4c60789
build bump
sites/newspring/mobile-config.js
sites/newspring/mobile-config.js
App.info({ id: 'cc.newspring.newspringapp', name: 'NewSpring', description: 'App for NewSpring Church', author: 'NewSpring Church', email: 'web@newspring.cc', website: 'https://newspring.cc', version: '0.0.3', buildNumber: '92' }); App.icons({ // iOS 'iphone_2x': 'assets/icons/ios/icon-60x60@2x.png...
JavaScript
0
@@ -234,17 +234,17 @@ mber: '9 -2 +3 '%0A%7D);%0A%0AA
ceb8f6cc92fa90ed12ee79ff12d5a82b165ba0f5
add new cluster to seed
seed.js
seed.js
var User = require('./models/user_model'); var Cluster = require('./models/cluster_model'); var ApiCache = require('./models/api_cache_model'); var ListingCache = require('./models/listing_cache_model'); var async = require('async'); var db = require('./database'); console.log('First, removing everything'); async.e...
JavaScript
0.000001
@@ -1279,32 +1279,155 @@ ublic: true %7D),%0A + new Cluster(%7Bname: 'random', subreddits: %5B'mufc'%5D, owner: users.oj206, admins: %5B%5D, subscribers: %5B%5D, public: true %7D),%0A new Cluste
871629e79ea3de25a66a99271b29e8f7e1c4ea6e
missing s
services/wit.js
services/wit.js
'use strict' var Config = require('../config') var FB = require('../connectors/facebook') var Wit = require('node-wit').Wit var request = require('request') var firstEntityValue = function (entities, entity) { var val = entities && entities[entity] && Array.isArray(entities[entity]) && entities[entity].length >...
JavaScript
0.999823
@@ -651,16 +651,17 @@ %09%09if (re +s ponse.qu
ea3182e9de3d830fd77121b0bd559960bfc209a9
improve messaging
GameOfLife/gameoflife.js
GameOfLife/gameoflife.js
"use strict"; var assert = require('assert'); var LIVE = 1; var DEAD = 0; var cellState = function(currentCellState, numberOfAliveNeighbours) { var twoOrThreeNeighbours = numberOfAliveNeighbours === 2 || numberOfAliveNeighbours === 3; if (numberOfAliveNeighbours < 2 || numberOfAlive...
JavaScript
0.00039
@@ -1242,16 +1242,49 @@ (DEAD,i) +, 'dead with ' + i + 'neighbours' );%0A @@ -1324,16 +1324,49 @@ (LIVE,i) +, 'live with ' + i + 'neighbours' );%0A
2b4617a754635ae5e5a294eac16368d903901393
Fix indentation
GitHubSourceTree.user.js
GitHubSourceTree.user.js
// ==UserScript== // @name GitHubSourceTree // @namespace http://really-serious.biz/ // @version 1.0.1 // @description Adds a "Clone in SourceTree" button to github pages // @respository https://github.com/jamesgarfield/GitHubSourceTree // @match https://*github.com/* // @copyright 2014+, James Garfield //...
JavaScript
0.017244
@@ -104,17 +104,17 @@ 1.0. -1 +2 %0A// @des @@ -344,17 +344,20 @@ tion()%7B%0A -%09 + const $
a05570d6416279d4324b41797dcc015dff11ec50
test spelling
test.js
test.js
var assert = require('assert'); var five = require('./'); assert.equal(5, five(), 'Five should give you five'); assert.notEqual(6, five(), 'Five should not give you not five'); assert.equal('⁵', five.upHigh(), 'An up high five should be a superscripted 5'); assert.equal('₅', five.downLow(), 'A down low five should be...
JavaScript
0.000134
@@ -2029,16 +2029,17 @@ Weber%22%5D, + five.fab @@ -2041,16 +2041,17 @@ e.fab(), + 'A fab f
858be8428637a6541bd498d972a712bbc34ea4a1
test coverage
test.js
test.js
const test = require('tape') const reduce = require('./') const Promise = require('any-promise') test('promise-reduce should assert input types', function (t) { t.plan(1) t.throws(reduce.bind(null, 123)) }) test('promise-reduce should accept a single val', function (t) { t.plan(1) const res = Promise....
JavaScript
0.000201
@@ -1825,24 +1825,29 @@ (reduce( -reduceFn +function() %7B%7D , undefi @@ -1876,170 +1876,8 @@ n)%0A%0A - function reduceFn(prev, next) %7B%0A return new Promise(function (resolve) %7B%0A setTimeout(function () %7B%0A resolve(prev + next)%0A %7D, 1)%0A %7D)%0A %7D%0A%0A fu @@ -2098,24 +20...
323a5651003984c8f2cb7da1b6f6c8e9d6b38f84
update tests
test.js
test.js
import test from 'ava'; import mvg from '.'; test('Load station', async t => { const station = await mvg.getStation(953); const expectedStationInfo = { type: 'station', latitude: 48.108379, longitude: 11.663822, id: 953, place: 'München', name: 'Feldbergstraße', hasLiveData: true, ...
JavaScript
0.000001
@@ -353,11 +353,30 @@ : %5B' -b'%5D +BUS'%5D,%0A link: 'FBE' ,%0A
93bfd985a6a552de9340ee2937589ce1833ba784
Remove del dependency.
test.js
test.js
'use strict'; var del = require('del'); var path = require('path'); var helpers = require('yeoman-generator').test; describe(require('./package.json').name, function () { beforeEach(function (cb) { helpers.testDirectory(path.join(__dirname, 'temp'), function (err) { if (err) { ...
JavaScript
0
@@ -12,34 +12,8 @@ ';%0A%0A -var del = require('del');%0A var
c7f893203d72da300bc58b726e59da78534c7a97
fix hints in test
test.js
test.js
var assert = require('assert'); var expect = require('chai').expect; var nodePkg = require('./package.json'); var bowerPkg = require('./bower.json'); var frpc = require('./frpc'); var testDate = "1987-12-22T16:20:29.000Z"; var method = "method"; var params = [ 123, // int true, ...
JavaScript
0.00002
@@ -409,25 +409,25 @@ -( 100 -).toFixed(2), +, @@ -564,16 +564,16 @@ -101 %3E%3E 1 +%5B69, 96%5D , @@ -1001,45 +1001,49 @@ HsRE -CAGMTAwLjAwIAROYW1lKADNm84h6ihoeTA4Mj +BgAAAAAAABZQCAETmFtZSj8zZvOIeqoaHkwMAJFYD zImB @@ -1101,26 +1101,26 @@ XRlK -AD +Pz Nm84h6 -i +q hoeTBYA -0A +z...
738341e8e8e7777693ab6b400d13c40da46a1f33
order for arguments of assert.equals
test.js
test.js
var sanitize = require('./index.js'); var assert = require('assert'); var express = require('express'); var superagent = require('superagent'); describe('sanitize', function() { it('should remove fields that start with $ from objects', function() { assert.equal(0, Object.keys(sanitize({ $gt: 5 })).length); ...
JavaScript
0.000001
@@ -237,32 +237,56 @@ ', function() %7B%0A + // %7B $gt: 5 %7D -%3E %7B%7D%0A assert.equal @@ -278,35 +278,32 @@ assert.equal( -0, Object.keys(sani @@ -330,161 +330,183 @@ ngth +, 0 );%0A -%0A -var o = sanitize(%7B $gt: 5, a: 1 %7D);%0A assert.equal(1, Object.keys(o).length);%0A assert.equa...
1c35b46cb7612bce06264a470aa022b8eb8ea0ab
test for xo binary since eslint is not used anymore
test.js
test.js
import {join} from 'path'; import test from 'ava'; import concat from 'stream-string'; import spawnShell from './'; test('Use shell to run commands', async t => { const p = spawnShell('echo "it works"', { stdio: [0, 'pipe', 2] }); const output = await concat(p.stdout); t.is(output, 'it works\n'); }); test('Ret...
JavaScript
0
@@ -818,22 +818,18 @@ ('which -eslint +xo ', %7B%0A%09%09s @@ -964,14 +964,10 @@ bin/ -eslint +xo %5Cn')
cfd9cb4c7ef2e63f268c475cfd99120a1a4ddf53
make test run
test.js
test.js
var Transform = require('stream').Transform , test = require('tape') , bufferedTransform = require('./stream') , collectData = function (stream, callback) { var data = [] stream.on('data', function (chunk) { data.push(chunk) }) stream.once('end', function () { callback(n...
JavaScript
0.999597
@@ -100,21 +100,33 @@ uire('./ -strea +buffered-transfor m')%0A%0A ,
657ef147ea6b1b59d6c24481a8bc6801a7fdf922
test now computes hashes in prepare stage
test.js
test.js
/** * DiscordForge - a plugin system for Discord. * Copyright (C) 2017 DiscordForge Development * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your ...
JavaScript
0
@@ -1662,16 +1662,42 @@ () =%3E %7B%0A +%09let sumCurrent, sumCopy;%0A %09before( @@ -1809,16 +1809,48 @@ ed first +, and file hashes to be computed . We wil @@ -2115,41 +2115,278 @@ ng. -We will now continue with testing +Now creating hashes.%5Cn');%0A%09%09%09checksum.file(path.join(dforgeDir, 'modloader', 'mod...
deefc10ea7e401ec3d7892c377c29062d8ca47da
update `emit end` test
test.js
test.js
'use strict'; /* deps: mocha */ var assert = require('assert'); var minimist = require('minimist'); var plugins = require('./'); var cli; describe('minimist', function () { beforeEach(function () { cli = plugins(minimist); }); it('should throw if `minimist` not function', function (done) { function fi...
JavaScript
0
@@ -2005,24 +2005,135 @@ on (argv) %7B%0A + assert.equal(argv.aaa, 'bbb');%0A assert.equal(argv.ccc, 'ddd');%0A assert.equal(argv.eee, 'fff');%0A i++;%0A
eff00849e440da2c9498c1e7f71073cb48657e33
fix tests :white_check_mark:
test.js
test.js
'use strict' const test = require('tape') const sortBy = require('lodash.sortby') const autocomplete = require('.') test('autocomplete returns an array', (t) => { t.plan(2) t.ok(Array.isArray(autocomplete('', 3))) t.ok(Array.isArray(autocomplete('foo', 3))) }) test('autocomplete returns an empty array for an emp...
JavaScript
0
@@ -675,16 +675,17 @@ ('statio +n ', 1).le
134fcb59ea74c618f3cdd3ae21afe9629433caf5
Add test for missing id, closes #13
test.js
test.js
'use strict' // setup import test from 'ava' import scrud from './index' import axios from 'axios' import getScrud from 'get-scrud' const allowOrigins = ['localhost'] const postBody = { first: 'andrew', last: 'carpenter', zip: 37601, email: 'andrew@audioinhd.com' } const basePath = '/api' const port = 8092 con...
JavaScript
0
@@ -1714,24 +1714,277 @@ ', id))%0A%7D)%0A%0A +test.serial('missing resource id returns 404', async (assert) =%3E %7B%0A let url = %60http://localhost:$%7Bport%7D$%7BbasePath%7D/member/%60%0A let headers = %7BAuthorization: %60Bearer $%7Bjwt%7D%60%7D%0A await assert.throws(axios(%7Bmethod: 'PUT', url, data: putBody...
e3a50604d310d4907d11f6d59b157fdd785a14cb
rename test description, oops
test.js
test.js
import test from 'ava'; import linkExtractor from './index'; test('linkExtractor function exists', t => { t.is(typeof linkExtractor, 'function'); }); test('takeScreenshot takes 1 arguments', t => { t.is(linkExtractor.length, 1); });
JavaScript
0.000003
@@ -157,22 +157,21 @@ st(' -takeScreenshot +linkExtractor tak
8c1f13bf6bd5a78c9b07f9aebac43507272c56f2
fix test case for nvm in node v0.10
test.js
test.js
'use strict'; /* deps: mocha */ var assert = require('assert'); var paths = require('./'); var path = require('path'); describe('order', function() { var testCase1 = paths(__dirname); it('should return an array of directories:', function() { assert.ok(testCase1.length > 1); assert.ok(Array.isArray(testCa...
JavaScript
0.000001
@@ -1284,48 +1284,19 @@ i -f(process.env.NVM_BIN) %7B%0A it('nvm +t('bin path ', f @@ -1319,144 +1319,77 @@ - var +b in -dexNvm;%0A for(var i = indexRootNpm + 1; i %3C testCase1.length; i++) %7B%0A if(/nvm%5C/versions%5C/node%5C/v%5B%5Cd%5C.%5D+%5C +Nvm = testCase1.indexOf(pat...
c1d24b39f0585c3bc0c7a1d8acaa0a9b22e9e1c0
Reformat complex functions in tests
test.js
test.js
/* global describe */ /* global it */ /* global expect */ var λ = require('./lambada'); var numbers = [[-1], [0], [1], [Math.PI], [0.1], [142857], [Infinity]]; var pairs = [[0, 0], [Math.PI, -Math.SQRT2], [1, 1], [-1, 0], [100/7, -200/13]]; var triplets = [[0, 0, 0], [Math.PI, -Math.SQRT2, 100], [1, 3, 2], [100/7, -2...
JavaScript
0
@@ -3666,32 +3666,44 @@ = function () %7B +%0A return Math.max @@ -3760,16 +3760,24 @@ ) / 100; +%0A %7D;%0A @@ -4624,16 +4624,28 @@ ion () %7B +%0A return @@ -4716,16 +4716,24 @@ ents))); +%0A %7D;%0A
c4079082ff58da4361141fa182412aaea6bf54e5
rename key
test.js
test.js
try { var dotenv = require('dotenv'); dotenv.load({silent: true}); } catch (error) { console.log(error); } var webdriver = require('selenium-webdriver'), username = process.env.SAUCE_NAME, accessKey = process.env.SAUCE_KEY, driver; //TODO - Test on more plaforms ... driver = new webdriver.Builder(). ...
JavaScript
0.000027
@@ -184,16 +184,20 @@ v.SAUCE_ +USER NAME,%0A @@ -228,16 +228,23 @@ v.SAUCE_ +ACCESS_ KEY,%0A
7dd2a51b24cdf08accf2b02bcaffe562a36fc735
fix tests
test.js
test.js
'use strict'; var test = require('ava'); var childProcess = require('child_process'); test(function (t) { t.plan(2); childProcess.execFile('./cli.js', ['--cwd=fixture'], { cwd: __dirname }, function (err, stdout) { t.error(err); t.is(stdout.trim(), __dirname); }); });
JavaScript
0.000001
@@ -84,16 +84,19 @@ );%0A%0Atest +.cb (functio @@ -222,17 +222,19 @@ ) %7B%0A%09%09t. -e +ifE rror(err @@ -270,16 +270,27 @@ rname);%0A +%09%09t.end();%0A %09%7D);%0A%7D);
da5b66d30a8455099673afb8dd97d8ddb063074f
Add failing test for #36
test.js
test.js
import test from 'ava'; import m from '.'; test('replace comments with whitespace', t => { t.is(m('//comment\n{"a":"b"}'), ' \n{"a":"b"}'); t.is(m('/*//comment*/{"a":"b"}'), ' {"a":"b"}'); t.is(m('{"a":"b"//comment\n}'), '{"a":"b" \n}'); t.is(m('{"a":"b"/*comment*/}'), '{"a":"b" ...
JavaScript
0.000001
@@ -2360,16 +2360,284 @@ b%22%5Cr%5Cn%7D ');%0A%7D);%0A +%0Atest.failing('handles weird escaping', t =%3E %7B%0A%09// eslint-disable-next-line no-useless-escape%0A%09t.is(m('%7B%22x%22:%22x %5C%22sed -e %5C%5C%5C%22s/%5E.%5C%5C%5C%5C%7B46%5C%5C%5C%5C%7DT//%5C%5C%5C%22 -e %5C%5C%5C%22s/#033/%5C%5C%5C%5Cx1b/g%5C%5C%5C%2...
a7e9f46061093e0a789c3be8069264f596ab2416
Add simple cyclic test
test.js
test.js
var vows = require('vows') , toposort = require('./index') , assert = require('assert') var suite = vows.describe('toposort') suite.addBatch( { 'acyclic graphs': { topic: function() { return toposort( [ ["3", '2'] , ["2", "1"] , ["6", "5"] , ["5", "2"] , ["5", "4"] ]) ...
JavaScript
0.000016
@@ -1030,16 +1030,275 @@ %0A %7D%0A, ' +simple cyclic graphs':%0A %7B topic: function() %7B%0A return toposort(%0A %5B %5B%22foo%22, 'bar'%5D%0A , %5B%22bar%22, %22foo%22%5D// cyclic dependecy%0A %5D)%0A %7D%0A , 'should throw an exception': function(_, val) %7B%0A assert.instanceOf(val,...
c3647550a89cdc0db7b1429186ff2b6333fdce62
add test data
test.js
test.js
console.log("Package Script Test...."); function test() { require('./pkgscript.js').spawn([ { command: "npm", args: ["--version"] } ]); } test();
JavaScript
0.000006
@@ -160,16 +160,97 @@ rsion%22%5D%0A + %7D,%0A %7B%0A command: %22npm%22,%0A args: %5B%22--version%22%5D%0A
906af157d40b7be8d87a7d817c8609dc92e363d7
add some tests
test.js
test.js
import test from 'ava'; import shell from 'shelljs'; import m from './'; shell.config.silent = true; test('mock and unmock git bla', async t => { const log = 'mocking git bla!'; const unmock = await m(`console.log('${log}')`, 'bla'); let actual = shell.exec('git bla').stdout; t.is(log + '\n', actual); actual = s...
JavaScript
0.000001
@@ -1050,22 +1050,97 @@ ar');%0A%0A%09 -const +let barActual = shell.exec('git bar').stdout;%0A%09t.is(barLog + '%5Cn', barActual);%0A%0A%09 barActua @@ -1151,32 +1151,43 @@ shell.exec('git +--no-pager bar').stdout;%0A%09t @@ -1219,22 +1219,97 @@ ual);%0A%0A%09 -const +let fooActual = shell.exec('git foo').std...
1e91686162543586a66eb6ebc2b70f0d476004fd
update test
test.js
test.js
'use strict'; var assert = require('assert'); var gutil = require('gulp-util'); var markdown = require('./'); it('should compile Markdown to HTML', function (cb) { var stream = markdown(); stream.once('data', function (file) { assert.equal(file.relative, 'fixture.html'); assert.equal(file.contents.toString(), '...
JavaScript
0.000001
@@ -273,16 +273,19 @@ ml');%0A%09%09 +// assert.e
04f2b5467967bac49caeb9847729ce62705444f4
Update points in test.js to 2.0.0
test.js
test.js
var aggregate = require('./'); var test = require('tape'); var polygon = require('turf-polygon'); var point = require('turf-point'); var featurecollection = require('turf-featurecollection'); test('aggregate', function(t){ var poly1 = polygon([[[0,0],[10,0],[10,10],[0,10],[0,0]]]); var poly2 = polygon([[[10,0],[2...
JavaScript
0
@@ -417,11 +417,13 @@ int( +%5B 5,5 +%5D , %7Bp @@ -462,11 +462,13 @@ int( +%5B 1,3 +%5D , %7Bp @@ -507,12 +507,14 @@ int( +%5B 14,2 +%5D , %7Bp @@ -553,12 +553,14 @@ int( +%5B 13,1 +%5D , %7Bp @@ -599,12 +599,14 @@ int( +%5B 19,7 +%5D , %7Bp
e9e07ab54c814ec390dc4680a654cca370942dff
fix undefined check so that we can hash the string 'undefined' (#31)
test.js
test.js
var md5 = require('./md5.js'); var assert = require('assert'); describe('md5', function () { it('should throw an error for `undefined`', function() { assert.throws(function() { md5(undefined); }); }); it('should throw an error for `null`', function() { assert.throws(function() { md5(nul...
JavaScript
0.00257
@@ -120,17 +120,19 @@ ror for -%60 +an undefine @@ -132,17 +132,22 @@ ndefined -%60 + value ', funct @@ -214,32 +214,183 @@ %0A %7D);%0A %7D);%0A%0A + it('should allow the hashing of the string %60undefined%60', function() %7B%0A assert.equal('5e543256c480ac577d30f76f9120eb74', md5('undefined'));%0A %7D...
2c96e579dc1b4e52a5a09b65377872c93c05b7b4
fix issue 32
vein.js
vein.js
/** * vein.js - version 0.3 * * by Danny Povolotski (dannypovolotski@gmail.com) **/ !function (name, definition) { if (typeof module != 'undefined') module.exports = definition() else if (typeof define == 'function' && define.amd) define(name, definition) else this[name] = definition() }('vein', func...
JavaScript
0.000001
@@ -831,16 +831,46 @@ s = %5B%5D,%0A + rulesDelete = %5B%5D,%0A @@ -1672,29 +1672,24 @@ -stylesheet.deleteRule +rulesDelete.push (ri) @@ -1880,32 +1880,158 @@ %7D%0A %7D%0A%0A + for (ri = 0, rl = rulesDelete.length; ri %3C rl; ri++) %7B%0A stylesheet.deleteRule(...
531c90747ca2ec66030bbfec68802598dca68816
remove Div from config.js
.storybook/config.js
.storybook/config.js
import React from 'react'; import {configure, addDecorator, getStorybook, setAddon} from '@storybook/react'; import {Div} from 'glamorous'; import createPercyAddon from '@percy-io/percy-storybook'; import {fontFamily, fontSize} from '../src/styles'; global.__PATH_PREFIX__ = ''; ...
JavaScript
0.000003
@@ -106,39 +106,8 @@ t';%0A -import %7BDiv%7D from 'glamorous';%0A impo @@ -439,17 +439,17 @@ =%3E (%0A %3C -D +d iv css=%7B @@ -491,17 +491,17 @@ ()%7D%0A %3C/ -D +d iv%3E%0A));%0A
3f2ec113c84f1fe18157e6fd6376c967214f3775
initialize compose in storybook config
.storybook/config.js
.storybook/config.js
/* global __STORYBOOK_CLIENT_API__ */ /** * External dependencies */ import React from 'react'; import { addDecorator, configure } from '@storybook/react'; /** * WordPress dependencies */ import { createHigherOrderComponent } from '@wordpress/compose'; import { Component, createRef, Fragment, createElement, c...
JavaScript
0.000002
@@ -1427,16 +1427,33 @@ rgs,%0A%7D;%0A +wp.compose = %7B%7D;%0A wp.compo
a4e24f17619d4e643a328b2cb6afdd6720706a14
fix lint errors
.storybook/config.js
.storybook/config.js
import { configure } from '@storybook/react'; function loadStories() { require('../stories'); } configure(loadStories, module);
JavaScript
0.000037
@@ -1,17 +1,16 @@ import %7B - configur @@ -10,17 +10,16 @@ onfigure - %7D from ' @@ -62,13 +62,16 @@ ries + () %7B%0A + re
3b2502932af664fe376a7268b1ca99ead4e947df
move clear screen function into game.js
shared/Utils.js
shared/Utils.js
var Utils = { // returns a random integer between min and max // via: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random?redirectlocale=en-US&redirectslug=JavaScript%2FReference%2FGlobal_Objects%2FMath%2Frandom randBetween: function(min, max, floating) { if (floating)...
JavaScript
0.000001
@@ -1026,107 +1026,8 @@ %7D,%0A%0A - clearCanvas: function() %7B%0A return context.clearRect(0, 0, canvas.width, canvas.height);%0A %7D,%0A%0A cr
467887bdad2e0a7d84da1a265afd5d095be41e07
Increase number of visible birthdays
homedisplay/info_birthdays/static/js/birthdays.js
homedisplay/info_birthdays/static/js/birthdays.js
var Birthdays = function(elem, use_date, options) { options = options || {}; options.interval = options.interval || SLOW_UPDATE; options.showdate = options.showdate || false; options.maxitems = options.maxitems || 100000; var parent_elem = $(elem), this_date = use_date, update_interval, wait_sync, current_ite...
JavaScript
0.000035
@@ -3929,10 +3929,10 @@ ms: -38 +45 %7D);%0A
f568a100920e256a1571b048bfbe393702755157
fix calculation of an indicator
hsph/_design/views/cati_performance_report/map.js
hsph/_design/views/cati_performance_report/map.js
function(doc) { //!code util/emit_array.js //!code util/hsph.js if (!isHSPHBirthCase(doc)) { return; } function datePlusDays(string, daysToAdd) { var newDate = new Date(string); newDate.setDate(newDate.getDate() + daysToAdd); return newDate; } funct...
JavaScript
0.000004
@@ -2198,16 +2198,52 @@ +(!lastFollowUpTime %7C%7C %0A ( !(doc.cl @@ -2306,16 +2306,69 @@ ToField) + %7C%7C%0A filterDatePlus13 %3C lastFollowUpTime)) &&%0A
c9d9f886a37d24efe9cdabe2818f81fac30fbe0a
build algorithm update
build.js
build.js
var fs = require('fs') var path = require('path') var gulp = require('gulp') var concat = require('gulp-concat') path.delimiter = "/" var javascriptSource = []; var cssSource = []; (function lookIntoFolder(dir){ var folderContent = fs.readdirSync( path.resolve(__dirname, dir) ) folderContent.forEach(function( filen...
JavaScript
0.000001
@@ -132,86 +132,74 @@ /%22%0A%0A -var javascriptSource = %5B%5D;%0Avar cssSource = %5B%5D;%0A(function lookIntoFolder(dir)%7B%0A +function lookIntoFolder(dir, intendedExtension)%7B%0A%09var sources = %5B%5D %0A%09va @@ -516,97 +516,39 @@ == -%22js%22)%7B%0A%09%09%09%09javascriptSource.push(filepath)%0A%09%09%09%7D...
ca30dbe5c02599cc4c1cbee4c85e74e4fa32f9b8
Fix spec.
src/app/battle/character.srv.spec.js
src/app/battle/character.srv.spec.js
describe('factory: Character', function () { beforeEach(module('marvel.app')); beforeEach(inject(function () { })); describe('On initialization', function () { it('should load the character data', inject(function ($rootScope, $q, Character, BattleApi) { function getSuccessfulProm...
JavaScript
0
@@ -1036,16 +1036,54 @@ cter(0); +%0A character.loadByOffset(); %0A%0A
158ae45cebfb1f711c52c0effe788771ec1a3e4d
change scr
App/js/services/graphics-engine.js
App/js/services/graphics-engine.js
/*Original Game File - functions to help with displaying the game*/ angular.module("gameApp") .factory("graphicsEngineService", ["globalSettings", "coordinateSystem", function (globalSettings, coordinateSystem) { "use strict"; return { initialise: function (canvasContext, graphicsFi...
JavaScript
0.000001
@@ -1030,10 +1030,8 @@ p:// -i. imgu @@ -1040,19 +1040,15 @@ com/ -tRbwjj7.png +QThBTyI %22;%0D%0A @@ -2100,32 +2100,52 @@ llStyle = pat;%0D%0A + */%0D%0A @@ -2171,14 +2171,8 @@ %0D%0A%0D%0A -*/%0D%0A%0D%0A
e54522895d266cc305088e39958840f71d46e5ae
Add mobile signaling support + debugging
signal/index.js
signal/index.js
var _ = require('lodash-node') var users = [] var sessions = {} exports.register = function (server, options, next) { var io = require('socket.io')(server.select('signal').listener) io.on('connection', function (socket) { socket.on('register', function (data) { if (_.findIndex(users, { socket: socket....
JavaScript
0
@@ -221,16 +221,69 @@ ocket) %7B +%0A console.log('- ' + socket.id + ' has connected') %0A%0A so @@ -570,24 +570,122 @@ n%0A %7D)%0A%0A + // For mobile%0A if (!sessions%5Bdata.session%5D) %7B%0A data.isInitiator = true%0A %7D%0A%0A if (da @@ -803,24 +803,25 @@ %7D%0A %...
9bac8da85ab224ad8ee03c1e01e11ab7f39ea3d3
Simplify code with _.result
core/src/main/web/app/utils/basic/commonui.js
core/src/main/web/app/utils/basic/commonui.js
/* * Copyright 2014 TWO SIGMA OPEN SOURCE, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appl...
JavaScript
0.999998
@@ -4529,130 +4529,33 @@ -if (_.isFunction($scope.menuItems)) %7B%0A return $scope.menuItems();%0A %7D else %7B%0A return +return _.result( $scope -. +, ' menu @@ -4559,29 +4559,19 @@ enuItems -;%0A %7D +'); %0A
9f9cfe11ee274aadd749b0acbb951fbd4519eb7d
fix to support flac in firefox
scripts/app/app.js
scripts/app/app.js
"use strict"; // Create the AudioContext to use in the app var audioCtx = new window.AudioContext(); // Load app when everything else has loaded window.onload = function() { var app = new App(); app.loadDefault(); }; /** * Audio visualiser. Uses Web Audio API and Three.js * Initializes values and starts li...
JavaScript
0
@@ -1384,16 +1384,43 @@ decode%0A + console.log(file);%0A @@ -1449,16 +1449,49 @@ io/flac%22 + %7C%7C file.type === 'audio/x-flac' ) %7B%0A
c4ea61c303a3e9b554f1bc7e6cda7ee927b05c2b
Remove more content from the wikipedia article, that we dont want.
webtasks/wikipedia-article-extract.js
webtasks/wikipedia-article-extract.js
const jsdom = require('jsdom'); const f = (context, cb) => { const wikipediaUrl = context.data['article-url']; jsdom.env({ url: `${ wikipediaUrl }?printable=yes`, scripts: ['http://code.jquery.com/jquery.js'], done: (err, window) => { const $ = window.$; $('script').remove(); // remove all...
JavaScript
0
@@ -594,16 +594,169 @@ seless%0A%0A + // remove content at the bottom which we dont need%0A $('.printfooter').remove();%0A $('#catlinks').remove();%0A $('noscript').remove();%0A%0A cb
10cd6b1318af66b17fb08e6fec05c3b54a793211
version 1.0.0
better-prettydate.js
better-prettydate.js
/** * @file better-prettydate.js * @version 1.0.0 2013-07-10T21:26:33 * @overview Enhances time element to update text in realtime * @copyright Maksim Chemerisuk 2013 * @license MIT * @see https://github.com/chemerisuk/better-prettydate */ (function(DOM, undefined) { "use strict"; // Inspired by jquery-...
JavaScript
0.000002
@@ -64,12 +64,12 @@ 21:2 -6:33 +7:44 %0A *
634b1df62ae5456c540e179b376253b684e483af
enhance removeLine func
generators/utils.js
generators/utils.js
'use strict'; const path = require('path'); const fs = require('fs-extra'); const chalk = require('chalk'); const _ = require('lodash') const beautify = require('js-beautify').js_beautify; const jsBeautifyOptions = { indent_size: 2, preserve_newlines: false, end_with_newline: true }; // Defining Markers exports.COMPON...
JavaScript
0.000004
@@ -2690,23 +2690,34 @@ +let topHalf +IndexOf = topHa @@ -2723,21 +2723,30 @@ alf. -substring(0, +lastIndexOf('%5Cn')!=-1? topH @@ -2766,17 +2766,88 @@ Of('%5Cn') -) +:topHalf.length;%0A topHalf = topHalf.substring(0, topHalfIndexOf); %0A
749ed249336b9aa1eae655516aee5d5ffbcfc0c8
Return the parsed message from command.
plugins/command.js
plugins/command.js
/* Description: * Generic command parsing and dispatch. * * Dependencies: * None * * Configuration: * None * * Author: * mythmon * * Takes messages that look like "foo bar=baz qux" and converts them to * `sendMessage('foo', {bar: baz, _args: ['qux']})` * * Special processing: if the first space-...
JavaScript
0.000858
@@ -579,20 +579,19 @@ unction( -args +msg ) %7B%0A%0A @@ -611,20 +611,19 @@ parser( -args +msg .raw);%0A @@ -701,63 +701,22 @@ -var msg = %7B%0A raw: args.raw,%0A +msg. _args -: + = %5B%5D -,%0A %7D ;%0A @@ -1106,34 +1106,19 @@ -return corsica.sendMessage +console.log (msg @@ -...
cf6cc3461dbe98486e08ddc41d4c0eb6aab713b0
Fix gender definition not exists in zh-Hant-TW.
src/types/person/definitions/zh-Hant-TW/index.js
src/types/person/definitions/zh-Hant-TW/index.js
export {default as name} from './name'; export {default as firstName} from './firstName'; export {default as lastName} from './lastName';
JavaScript
0.998692
@@ -29,24 +29,68 @@ m './name';%0A +export %7Bdefault as gender%7D from './gender';%0A export %7Bdefa
37a93c26e472d2692edb76dd078ce6ca08dcfdef
comment the current line, if no selection
plugins/comment.js
plugins/comment.js
//do something else here to inject script for the language of the file. //for example... // js is // // bash is # // ini is ; // I spend most of my time editing js, though. // so I'll leave that for when it's more important. function comment (line) { return '//' + line } function uncomment (line) { retu...
JavaScript
0
@@ -228,16 +228,50 @@ portant. +%0A// don't comment out empty lines? %0A%0Afuncti @@ -469,43 +469,25 @@ ine) -%0A console.error('COMMENTED?', r, + %7C%7C /%5E%5Cs*$/.test( line @@ -649,79 +649,282 @@ ctrl - && doc.marks) %7B%0A var m = doc.marks%5B0%5D%0A var M = doc.marks%5B1%5D%0A +) %7B%0A if(...
b4d67860dcecdaea849ea85855bd4a50e683f5ae
replace local file with /dev/stdin, comment out unneeded variables
scripts/cleanup.js
scripts/cleanup.js
// cleanup.js /* * MIT license http://opensource.org/licenses/MIT * * Copyright (c) 2015 Eric Elliott * Original author of this script: rsperberg@gmail.com */ var fs = require("fs"); var doclistPath = '/Users/sperberx/dev/essential-javascript-links/misc/'; var doclistName = 'README-short1'; var doclistAddon = '...
JavaScript
0
@@ -184,16 +184,19 @@ (%22fs%22);%0A +// var docl @@ -261,16 +261,19 @@ misc/';%0A +// var docl @@ -299,16 +299,19 @@ hort1';%0A +// var docl @@ -329,16 +329,19 @@ '-new';%0A +// var docl @@ -1945,16 +1945,19 @@ ath */%0A +// var path @@ -2076,16 +2076,19 @@ ADME.md%0A +// var path @@ -2253,27 +2253,...
5cd9a51f7faa4b7f8d1f8cf0cd4cdafb63366929
support null or undefined
get-constructors.js
get-constructors.js
// get-constructors.js this.constructors = function () { 'use strict'; try { names('Object', Object); names('Array', Array); names('Error', Error); names('RegExp', RegExp); names('String', String); names('Number', Number); names('Boolean', Boolean); names('Function', Function); ...
JavaScript
0.000002
@@ -1821,32 +1821,39 @@ pe%5D;%0A if (obj + && obj .constructor === @@ -1887,32 +1887,39 @@ ct%5D;%0A if (obj + && obj .constructor === @@ -1953,32 +1953,39 @@ ct%5D;%0A if (obj + && obj .constructor === @@ -2021,32 +2021,39 @@ ct%5D;%0A if (obj + && obj .constructor === @@ -2081,32 +2081,39 @@ ct%...
a9429b40a209d3648b3b2a19d10456174f05a7ef
Allow for (slow) translation between languages
src/common/i18n.js
src/common/i18n.js
import sha1 from 'sha1'; import zhTw from './translations/zh_TW/i10n.json'; import de from './translations/de_DE/i10n.json'; import id from './translations/id_ID/i10n.json'; import zhCn from './translations/zh_CN/i10n.json'; import it from './translations/it_IT/i10n.json'; import vi from './translations/vi_VN/i10n.json...
JavaScript
0.000031
@@ -1090,16 +1090,541 @@ %7C str;%0A%0A +export const translateLangToLang = (str, fromLang, toLang) =%3E %7B%0A if (supportedLanguages%5BfromLang%5D) %7B%0A const hashIndex = Object.values(supportedLanguages%5BfromLang%5D).findIndex(translatedStr =%3E str === translatedStr);%0A if (hashIndex !== -1) %...
6b2961676a206999fe15296d732b951eaaeb9cca
enhance logging on DOM querying
src/common/init.js
src/common/init.js
/** * Initialize the plugin and respond with a promise */ export function ui5Initialize(debug) { if(debug) jQuery.sap.log.setLevel(jQuery.sap.log.Level.DEBUG); new Promise(resolve => sap.ui.getCore().attachInit(() => { new sap.m.BusyIndicator().placeAt("indicator"); resolve(); })); } export function ...
JavaScript
0.000001
@@ -430,17 +430,67 @@ ame)%7B%0A +console.log(%60querying %5Bui5-dialog-id=%22$%7Bname%7D%22%5D%60); %0A - return @@ -603,16 +603,71 @@ try %7B%0A + console.log(%60querying %5Bui5-dialog-id=%22$%7Bname%7D%22%5D%60);%0A retu @@ -765,16 +765,16 @@ nt;%0A %7D%0A - catch @@ -781,16 +781,38 @@ (exc)...