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
0b4ec045c2b050aed49cdba4b5036121e2981de5
Remove 'ecmaVersion' override in eslint config
.eslintrc.js
.eslintrc.js
module.exports = { root: true, parserOptions: { ecmaVersion: 2018, sourceType: 'module' }, plugins: [ 'ember' ], extends: [ 'eslint:recommended', 'plugin:ember/recommended' ], env: { browser: true }, rules: { }, overrides: [ // node files { files: [ ...
JavaScript
0.000001
@@ -723,35 +723,8 @@ ipt' -,%0A ecmaVersion: 2015 %0A
fe15a9ea22703517ed35e02d5346ada26ff7e954
Fix a typo
src/action-creators/index.js
src/action-creators/index.js
const { ACTION_TYPES, BOARD_TYPES, FACTION_TYPES, PARAMETERS } = require('../immutable/constants'); const { JOB_IDS } = require('../immutable/jobs'); const { findOneSquareFromBoardsByPlacement } = require('../state-models/complex-apis'); const { areSamePlace, isPlacedOnBoard } = require('../state-models/placement'); co...
JavaScript
1
@@ -3908,24 +3908,25 @@ const tick +s PerSecond = @@ -3966,24 +3966,25 @@ (1000 / tick +s PerSecond);%0A @@ -4096,16 +4096,17 @@ d %25 tick +s PerSecon
88936031bb6ab7c4ea9718ba3f73b1d28c52d819
add spacing to code
public/js/eventsum.js
public/js/eventsum.js
function selectElementContents(el) { var range = document.createRange(); range.selectNodeContents(el); var sel = window.getSelection(); sel.removeAllRanges(); sel.addRange(range); } var editableContent = document.querySelectorAll('.editable') editableContent.forEach(function(val,index) { edita...
JavaScript
0.000058
@@ -26,24 +26,25 @@ tents(el) %7B%0A +%0A var rang @@ -105,16 +105,17 @@ ts(el);%0A +%0A var @@ -117,16 +117,22 @@ var sel +ection = windo @@ -156,16 +156,22 @@ %0A sel +ection .removeA @@ -189,16 +189,22 @@ %0A sel +ection .addRang @@ -213,16 +213,17 @@ range);%0A +%0A %7D%0A%0Avar e @@ -3...
f0e6665fbb4e90b66b45a28c5755846c40acffb4
Revert "Switching to real data (untested because of AJAX)"
js/traintable.js
js/traintable.js
var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']; var daysShort = days.map(function(s) { return s.substring(0,3); }); var data = []; for (var i=0; i<7; i++) { data[i] = []; } getData(function(info) { parseData(info); displayData(); }); //A test function that doesn't rely on ...
JavaScript
0
@@ -471,102 +471,225 @@ -$.ajax('data.txt', %7B%0A success: callback,%0A error: function(e) %7B throw e; %7D%0A %7D) +var info = '';%0A for (i = 0; i %3C 100; i++) %7B%0A info += daysShort%5B(Math.random()*7)%7C0%5D + ' '%0A + ((Math.random()*24)%7C0) + ':' + ((Math.random(...
ff0dfb8c5d2b91761931bfa77362b9004efd041a
fix (unit): broken test fix
client/components/button.js
client/components/button.js
import React from "react"; import PropTypes from "prop-types"; import "./button.scss"; export class Button extends React.Component { constructor(props){ super(props); } render() { let props = Object.assign({}, this.props); delete props.theme; return ( <button {...
JavaScript
0.000129
@@ -287,104 +287,171 @@ -return (%0A %3Cbutton %7B...props%7D className=%7B(this.props.theme %7C%7C %22%22) + %22 %22 + (this +let className = this.props.theme %7C%7C %22%22%0A if(this.props.className)%7B className += %22 %22 + this.props.className %7D%0A return (%0A %3Cbutton ...
a8fcceb60b6a1096191f290f8486c555975c2fb2
use babel parser
.eslintrc.js
.eslintrc.js
module.exports = { "env": { "browser": true, "es6": true }, "extends": "eslint:recommended", "parserOptions": { "ecmaFeatures": { "experimentalObjectRestSpread": true, "jsx": true }, "sourceType": "module" }, "plugins": [ "react" ], "rules": { "comma-dangle": ["er...
JavaScript
0.000001
@@ -65,16 +65,44 @@ ue%0A %7D,%0A + %22parser%22: %22babel-eslint%22,%0A %22exten
1cd4d8ede53c74c43c1a7540b1465f29b1048e72
Update chatfilter.js
chat-plugins/chatfilter.js
chat-plugins/chatfilter.js
'use strict'; const fs = require('fs'); let adWhitelist = (Config.adWhitelist ? Config.adWhitelist : []); let bannedMessages = (Config.bannedMessages ? Config.bannedMessages : []); let adRegex = new RegExp("(play.pokemonshowdown.com\\/~~)(?!(" + adWhitelist.join('|') + "))", "g"); Config.chatfilter = function (messa...
JavaScript
0
@@ -1187,35 +1187,1775 @@ ;%0A%09%09 -%09%0A%09%09%7D%0A%09%09return message;%0A%09%09%0A%09 +%7D%0A%09%7D%0A%09let pre_matches = (message.match(/psim%7Cpsim.us%7Cpsim us%7Cpsm.us%7Cpsm us/g) %7C%7C %5B%5D).length;%0A%09let final_check = (pre_matches %3E= 1 ? adWhitelist.filter(server =%3E %7B return ~message.indexOf(...
25feb1f16f0251f445a177767f713a5feb167847
Add client descriptions for update create_subtraction job
client/src/js/jobs/utils.js
client/src/js/jobs/utils.js
import { get, startCase } from "lodash-es"; const importResultsDescription = { title: "Save Results", description: "Annotate the results and save them in the database." }; const makeAnalysisDirDescription = { title: "Create Directory", description: "Create a directory where the job will run and analys...
JavaScript
0
@@ -2013,24 +2013,136 @@ on.%22%0A %7D,%0A + unpack: %7B%0A title: %22Unpack%22,%0A description: %22Decompress the sequence file if necessary.%22%0A %7D,%0A set_stat @@ -2413,16 +2413,142 @@ user.%22%0A + %7D,%0A compress: %7B%0A title: %22Compress FASTA%22,%0A descrip...
e136fb0701d5468403bbdba9882ce7b150be4d47
Include path with img data
img-data.js
img-data.js
'use strict'; var gm = require('gm'); class Methods { /** * * @param path {String} * @returns {Promise} */ static size (path) { let promise = new Promise(function (resolve, reject) { gm(path).size(function (err, val) { console.log(err); if (err) { reject(err); ...
JavaScript
0
@@ -244,34 +244,8 @@ ) %7B%0A - console.log(err);%0A @@ -299,16 +299,46 @@ else %7B%0A + val%5B%22path%22%5D = path;%0A
6b09b585495b2c14bff833b8a0627863262e074c
Fix session test
test/spec/janus/session.js
test/spec/janus/session.js
var _ = require('underscore'); var chai = require('chai'); var assert = chai.assert; var expect = chai.expect; var chaiAsPromised = require("chai-as-promised"); chai.use(chaiAsPromised); var sinon = require('sinon'); var Promise = require('bluebird'); require('../../helpers/global-error-handler'); var JanusConnection ...
JavaScript
0.000001
@@ -1915,32 +1915,36 @@ ject', function( +done ) %7B%0A sess
b6c01ac6b12dc439042f2e22089d7d55d9cd2366
fix token in install
src/methods/install.js
src/methods/install.js
// INSTALL SUB TASK // install is called at the create task time, but you can also call it in an already // created project if you want to reinstall things. // - installScript method looks if there are no such global bin/install.sh script to be executed // - installKubernetes checks if your keubernetes config is okay f...
JavaScript
0.000001
@@ -955,18 +955,16 @@ project -: %7D = thi
9b884c848070827adb5456add4a6f98f0e2e0c55
allow null koru.config.mailUrl
app/startup-server.js
app/startup-server.js
define((require, exports, module)=>{ const koru = require('koru'); require('koru/server'); const StackErrorConvert = require('koru/stack-error-convert'); const UserAccount = require('koru/user-account'); const ClimberRanking = require('models/climber-ranking'); const Ranking = requir...
JavaScript
0.000002
@@ -1222,16 +1222,26 @@ .mailUrl + ?? void 0 );%0A U
5740e67a70648ae3b2cd0db95f327b6932d08a3c
Add "scale=nnn" param to debug scaling
static/main.js
static/main.js
// Allow user to change style via the ?s=xxx URL parameter // Uses "osm-intl" as the default style var match = location.search.match(/s=([^&\/]*)/); var style = (match && match[1]) || 'osm-intl'; // Create a map var map = L.map('map').setView([40.75, -73.96], 4); map.attributionControl.setPrefix(''); function bracket...
JavaScript
0.000001
@@ -101,16 +101,21 @@ ar match +Style = locat @@ -165,16 +165,21 @@ = (match +Style && matc @@ -179,16 +179,21 @@ && match +Style %5B1%5D) %7C%7C @@ -675,31 +675,135 @@ 1%5D;%0A%7D%0A%0Avar -scale = +matchScale = location.search.match(/scale=(%5B.0-9%5D*)/);%0Avar scale = (matchScale && parseFloat(matchScal...
903a9ca418630cdc477695734c7eace87662d2d0
add block-spacing rule (avoid `if () {foo()}`)
.eslintrc.js
.eslintrc.js
module.exports = { "env": { "browser": true, "commonjs": true, "es6": true, }, "globals": { "_gaq": false, "process": false, "ActiveXObject": false, "VERSION": false, // Build globals "__dirname": false, // Test globals ...
JavaScript
0.000002
@@ -980,32 +980,66 @@ -var%22: %22error%22,%0A + %22block-spacing%22: %22error%22,%0A %22curly%22:
d475fcff2856a36cf181fd3f48315a3df105c43d
Remove extra logging
js/chosen/chosen-search.js
js/chosen/chosen-search.js
function markupClass(cls) { // Wrap the class prefLabel in a span, indicating that the class is obsolete if necessary. var max_word_length = 60; var label_text = (cls.prefLabel.length > max_word_length) ? cls.prefLabel.substring(0, max_word_length) + "..." : cls.prefLabel; var label_html = jQuery("<span/>").add...
JavaScript
0
@@ -2035,32 +2035,8 @@ a)%7B%0A - console.log(data)%0A @@ -2214,33 +2214,8 @@ ) %7B%0A - console.log(cls)%0A @@ -2933,35 +2933,8 @@ %7D);%0A - console.log(classes)%0A
9a0c4cc0bd17f638237a0bf676fe9d53a3919790
allow passing arbitrary args into embedder init
src/mods/index.js
src/mods/index.js
'use strict'; const DEFAULT_EMBEDDER = require('./default-embedder'); const { genIpcPrefix, genIpcProxy } = require('./utils'); module.exports.initializeModComponents = function(type, args) { if (type === 'main-process') { initMain.apply(this, args) } else if (type === 'embedder') { initEmbedder.apply(this...
JavaScript
0
@@ -1545,23 +1545,23 @@ ccount, -webview +...args ) %7B%0A if @@ -1768,15 +1768,15 @@ ix, -webview +...args );%0A
161df31cc8a83800e7b4c73e044205fa2ad2eb7b
Add presenter names to meeting minutes per Andy's request.
public/js/app.js
public/js/app.js
// Angular JS var app = angular.module('talksApp', []); function getTalks($scope, $http) { // send the GET request $http.get("/api/talks").success(data => { $scope.talks = data; // Set the scope's talks to be the output of the api call }); } function postTalk($scope, $http, socket) { // Set th...
JavaScript
0.000001
@@ -5329,16 +5329,36 @@ ic.desc%7D +%5Cn%5Cn$%7Btopic.name%7D - %5Cn%5Cn%60;%0A
5198b56d82344d94d455ad1b76a3b25b04b3296e
Fix callings to displaced ab2str function
app/driver.js
app/driver.js
var Nano = function(device, connection) { this.device = device; this.connection = connection; this.in_buffer = []; this.out_buffer = []; this.BUFFER_SIZE = 32; }; Nano.prototype.push_data = function(data) { var pkgs = []; var cnt = Math.ceil(data.byteLength / 33); for (var idx = 1; idx < cnt + 1; idx++) { pk...
JavaScript
0.000001
@@ -2377,34 +2377,16 @@ (pkg) %7B%0A -%09var nano = this;%0A %09chrome. @@ -2437,32 +2437,32 @@ g, function() %7B%0A + %09%09if (chrome.run @@ -2578,38 +2578,32 @@ %22, DEBUG_STYLE, -nano._ ab2str(pkg));%0A%09%7D @@ -2656,34 +2656,16 @@ back) %7B%0A -%09var nano = this;%0A %09chrome. @@ -2817,32 +2817,32 @@ %...
d631dfac25cc01e6a622fa324dbe778236148e8a
Use mongoose custom promise avoid deprecation
categorize.js
categorize.js
"use strict"; const config = require('./config/database'); const mongoose = require('mongoose'); mongoose.connect(config.db.uri); const path = require('path'); const Torrent = require('./models/Torrent.js'); const bunyan = require("bunyan"); const logger = bunyan.createLogger({name: "categorize"}); const filter =...
JavaScript
0.000005
@@ -50,24 +50,62 @@ atabase');%0A%0A +const Promise = require(%22bluebird%22);%0A%0A const mongoo @@ -130,16 +130,44 @@ oose');%0A +mongoose.Promise = Promise;%0A mongoose @@ -2314,16 +2314,32 @@ n(() =%3E +Promise.resolve( logger.i @@ -2366,16 +2366,17 @@ eated%60)) +) %0A.then((
fbf6e08a1fe3531b660bda4572001be8909cfcb3
convert stripe seconds to miliseconds
app/events.js
app/events.js
"use strict"; var Item = require('./transactions').item, List = require('./transactions').list, moment = require('moment'), _ = require('lodash'), when = require('when'), stripe = require('stripe')(process.env.STRIPE_KEY); // Model interactions module.exports = { save: function (trans) { var promise,...
JavaScript
0.00031
@@ -707,32 +707,39 @@ ion.available_on + * 1000 ).format('YYYY.M @@ -805,16 +805,23 @@ lable_on + * 1000 ).format
8a7aadda7a3927ec755ef5612f3ae9cf1bb9e47f
Change wrong endpoint, TODO for configuration
WebClient/app/util/Persist.js
WebClient/app/util/Persist.js
import {Figure, FigureStyle} from './../model/Figure' import fetch from 'isomorphic-fetch' import Grid from './../model/Grid' import Pen from './../model/tools/Pen' import Eraser from './../model/tools/Eraser' export class Persist { // todo: check if it's necessary all parameters constructor (persistType: PersistT...
JavaScript
0
@@ -544,24 +544,74 @@ (boardId) %7B%0A + // TODO(peddavid): Configuration of endpoints%0A const sc @@ -770,37 +770,17 @@ %7D:// -$%7Bdocument.location.hostname%7D +localhost :$%7Bp
0fee022c509ff8fc48ece10982a6d7d0e1adcbc3
Fix bug introduced with hasty commit
main.js
main.js
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ /*global define, $, brackets, window */ /** Extension that starts/stops Recode and saves when appropriate */ define(function (require, exports, module) { "use strict"; var CommandManager = brackets.getModule(...
JavaScript
0
@@ -800,16 +800,83 @@ ialogs') +,%0A ProjectModel = brackets.getModule('project/ProjectModel') ;%0A%0A v @@ -1456,32 +1456,79 @@ rentDocument) %7B%0A + console.log(this.currentDocument);%0A this @@ -2838,17 +2838,16 @@ e, true) -; %0A @@ -3228,16 +3228,28 @@ if + ((!...
86a2c84fa1e15ece6a71e0efde956140d494cdec
Delete debug code
cgf/loader.js
cgf/loader.js
//Loads Image and Audio assets that have been added. function Loader() { 'use strict'; var assets = []; var loaded = 0; var files = []; var add = function(asset) { assets.push(asset); }; /* parse Parses text to supported file type based on given file path. ...
JavaScript
0.000006
@@ -696,160 +696,24 @@ -console.log(ext + %22 %22 + typeof -t.length);%0D%0A console.log(t);%0D%0A if (ext === t) %7B%0D%0A console.log(%22Boom. %22 + types%5Bt%5D); +if (ext === t) %7B %0D%0A
e6f0bcd161dd9ea69da0343b2367d2141c53a1c3
Add monitoring-station-specific defaults to main
main.js
main.js
if (require('electron-squirrel-startup')) return; /** Setup Globals */ const electron = require('electron') const app = electron.app // Module to control application life. const BrowserWindow = electron.BrowserWindow // Module to create native browser window. const Menu = electron.Menu /** Set the current directory *...
JavaScript
0
@@ -937,15 +937,118 @@ %7B%0A -' +shared_secret: 'demo',%0A mapLayer: null,%0A mapZoom: null,%0A mapCenterLat: null,%0A mapCenterLong: null,%0A tiles -' : se @@ -1088,16 +1088,14 @@ ,%0A -' tracks -' : se
6115f4ca45a931c6bd5256487d1a4e056c515e57
Remove more unused functions.
feincms/media/feincms/toolbox.js
feincms/media/feincms/toolbox.js
/* Contains universally useful functions */ /* Extract an object id (numeric) from a DOM id. Assumes that a "-" is used as delimiter. Returns either the id found or 0 if something went wrong. extract_item_id('foo_bar_baz-327') -> 327 */ var extract_item_id = function(elem_id) { var i = elem_id.indexOf(...
JavaScript
0
@@ -1411,450 +1411,5 @@ %0A%7D%0A%0A -/* ChangeList keydown handler for navigating in CL */%0Avar changelist_itemid = function(elem) %7B%0A return extract_item_id($('span', elem).attr('id'));%0A%7D%0A%0Avar changelist_tab = function(elem, event, direction) %7B%0A event.preventDefault();%0A var ne = ((directio...
07e9f2db8a2e97a3f2cb2f8692fcad2812aa200b
disable test that's timing out
chrome/browser/ui/webui/options2/options2_browsertest.js
chrome/browser/ui/webui/options2/options2_browsertest.js
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * TestFixture for OptionsPage WebUI testing. * @extends {testing.Test} * @constructor */ function OptionsWebUITest() {} OptionsWebUITest.prot...
JavaScript
0.000001
@@ -2302,24 +2302,33 @@ ebUITest', ' +DISABLED_ testRefreshS
f49e406b2a104be0359851cdaa2d2d8e5430bcd9
test to use without brfs
test/folderify_test.js
test/folderify_test.js
'use strict'; var expect = require('expect.js'), concat = require('concat-stream'), fs = require('fs'), folderify = require('../lib/folderify'); var browserify = require('browserify'); var expectedBundle = fs.readFileSync(__dirname +'/fixtures/expected-bundle.js','utf8'); describe('folderify', functio...
JavaScript
0
@@ -3634,36 +3634,392 @@ it(' -can be used programmatically +doesn%5C't require brfs', function(done)%7B%0A%0A var b = browserify(__dirname +'/fixtures/source.js');%0A b.transform(folderify);%0A%0A b%0A .bundle()%0A .on('error', done)%0A .pipe(concat(function(data)%7B%0A...
31ee911bfb074bbbdaa5e678148e0754b3185160
remove unneeded $scope reference
client/app/components/_joinGroup/joinGroup.controller.js
client/app/components/_joinGroup/joinGroup.controller.js
class JoinGroupController { constructor($mdDialog, Group, Authentication, $scope) { "ngInject"; Object.assign(this, { $mdDialog, Group, Authentication, $scope, groups: [], active: null, check: false, password: "" }); } $onInit() { this.Group.list()....
JavaScript
0.000028
@@ -71,16 +71,8 @@ tion -, $scope ) %7B%0A @@ -169,22 +169,8 @@ on,%0A - $scope,%0A
3855bb7c4a1ff83405547304c26211c96a1fa8da
Move ipc methods to inside the popup
main.js
main.js
var app = require('app'); // Module to control application life. var BrowserWindow = require('browser-window'); // Module to create native browser window. var Menu = require('menu'); var Dialog = require('dialog'); var Fs = require('fs'); var XLSX = require('xlsx'); var ipc = require('ipc'); // Report crashes to our...
JavaScript
0
@@ -6198,36 +6198,8 @@ l'); -%0A popup.openDevTools(); %0A%0A @@ -6322,27 +6322,19 @@ Names);%0A +%0A - %7D);%0A%0A ip @@ -6381,24 +6381,26 @@ eet_name) %7B%0A + data @@ -6456,16 +6456,43 @@ name%5D);%0A + popup.close();%0A @@ -6513,37 +6513,16 @@ ata);%0A - ...
065b929f14520b95640903959e6bd00ea266ae1a
Add tests for Docker
test/job-installers.js
test/job-installers.js
import './support'; import SystemdInstaller from '../src/job-installers/systemd'; import {installJob} from '../src/job-installer-api'; const d = require('debug')('surf-test:job-installers'); describe('systemd job installer', function() { beforeEach(function() { this.fixture = new SystemdInstaller(); this.sa...
JavaScript
0
@@ -13,16 +13,17 @@ pport';%0A +%0A import S @@ -76,16 +76,76 @@ stemd';%0A +import DockerInstaller from '../src/job-installers/docker';%0A import %7B @@ -525,53 +525,8 @@ );%0A%0A - if (process.platform !== 'linux') return;%0A%0A it @@ -594,111 +594,8 @@ ) %7B%0A - expect((await this.fixture.getAffinityFo...
e26d797d57964b2bd41941428f757200cc1a781b
Fix JS error.
public/js/reports.js
public/js/reports.js
/* globals google, picker:true, minDate, expenseRestShow:true, incomeRestShow:true, year, shared, month, hideTheRest, showTheRest, showTheRestExpense, hideTheRestExpense, columnChart, lineChart, stackedColumnChart */ $(function () { "use strict"; drawChart(); picker = $('#inputDateRange').daterangepicker...
JavaScript
0
@@ -260,24 +260,72 @@ awChart();%0A%0A + if ($('#inputDateRange').length %3E 0) %7B%0A%0A picker = @@ -371,18 +371,26 @@ -%7B%0A + %7B%0A @@ -419,16 +419,20 @@ + + format: @@ -461,16 +461,20 @@ + firstDay @@ -478,16 +478,20 @@ Day: 1,%0A + ...
0f2cc622c94ba9083afc4d3181fc6171a84ea26a
Remove duplicate assignments
main.js
main.js
/* jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ /* global define, brackets, $, require, Mustache */ /* HTML Skeleton Created 2014 Triangle717 <http://Triangle717.WordPress.com/> Licensed under The MIT License */ /* ------- Begin Module Importing ------- *...
JavaScript
0.000011
@@ -261,16 +261,58 @@ License%0A + %3Chttp://opensource.org/licenses/MIT/%3E%0A */%0A%0A%0A @@ -4984,137 +4984,8 @@ %7B%0A%0A - // Set values to zero in case either field is not filled out%0A $imgWidth = 0;%0A $imgHeight = 0;%0A%0A
24a9d1400cc71d2778c861fe37f3f88bdd378cc3
fix runtime error in has() when value is null
public/js/storage.js
public/js/storage.js
/** public/js/storage.js * Ensures that all values written to localStorage are in a namespace identified by the current study id * @author Victor Petrov <victor.petrov@gmail.com> * @copyright (c) 2012, The Neuroinformatics Research Group at Harvard University. * @copyright (c) 2012, The President and Fellows of Har...
JavaScript
0.000009
@@ -1786,16 +1786,36 @@ ined) && + (value !== null) && value.l
658bd0a4de1027d96303bc044ed582b545f8a753
fix sidebar - content float issue
load.js
load.js
import React from 'react'; import ReactDOM from 'react-dom'; import ReadBox from 'redbox-react'; import {PaperControls} from './paper_controls'; import * as ud from 'ud'; const rootEl = document.getElementById('root'); const data = ud.defonce(module, () => ({})); const Area = ({main, error}) => ( <div style={{}}> ...
JavaScript
0
@@ -584,28 +584,34 @@ style=%7B%7B -float: 'left +marginLeft: '250px '%7D%7D%3E%0A
a3e393d43c1752420360f71c319d2d6ea2300712
Fix objects options with component label.
components/dash-core-components/src/utils/optionTypes.js
components/dash-core-components/src/utils/optionTypes.js
import {type} from 'ramda'; export const sanitizeOptions = options => { if (type(options) === 'Object') { return Object.entries(options).map(([value, label]) => ({ label: String(label), value, })); } if (type(options) === 'Array') { if ( options....
JavaScript
0
@@ -1,8 +1,35 @@ +import React from 'react';%0A import %7B @@ -207,32 +207,70 @@ label: + React.isValidElement(label) ? label : String(label),%0A
1dc21a911253f9485a71963701355a226b8a71e5
Use ES6 in the tests.
test/load-json-spec.js
test/load-json-spec.js
/* global require, describe, it */ import assert from 'assert'; var urlPrefix = 'http://katas.tddbin.com/katas/es6/language/'; var katasUrl = urlPrefix + '__grouped__.json'; var GroupedKata = require('../src/grouped-kata.js'); describe('load ES6 kata data', function() { it('loaded data are as expected', function(d...
JavaScript
0
@@ -6,17 +6,8 @@ obal - require, des @@ -49,19 +49,21 @@ ssert';%0A -var +const urlPref @@ -114,15 +114,16 @@ uage -/ ';%0A -var +const kat @@ -126,24 +126,27 @@ katasUrl = +%60$%7B urlPrefix + @@ -142,20 +142,18 @@ rlPrefix - + ' +%7D/ __groupe @@ -164,15 +164,18 @@ json -';%0A%0Avar +%60;%0A%0Aimpor...
3a5c0a0e2f59588adc9937dd7e484f8adc1ee36a
Read token from ENV fixes #3
main.js
main.js
import Bot from 'telegram-api/build'; import Message from 'telegram-api/types/Message'; import subscribe from './commands/subscribe'; import doc from './commands/doc'; import npm from './commands/npm'; import github from './commands/github'; let bot = new Bot({ token: '121143906:AAFJz_-Bjwq_8KQqTmyY2MtlcPb-bX_1O7M' ...
JavaScript
0
@@ -269,55 +269,39 @@ en: -'121143906:AAFJz_-Bjwq_8KQqTmyY2MtlcPb-bX_1O7M' +process.env.JAVASCRIPTBOT_TOKEN %0A%7D);
97ef3c98b8c7a51176410190d6f2211bced640e7
add noscroll url option
main.js
main.js
/*jslint browser: true*/ /*global Tangram, gui */ map = (function () { 'use strict'; var locations = { 'Oakland': [37.8044, -122.2708, 15], 'New York': [40.7238, -73.9881, 14], 'Seattle': [47.5937, -122.3215, 15] }; var map_start_location = locations['New York']; /*** URL...
JavaScript
0.000001
@@ -731,16 +731,18 @@ p('map', + %7B %0A @@ -742,17 +742,16 @@ -%7B %22keyboar @@ -772,260 +772,48 @@ .05 -%7D +, %0A -);%0A%0A var url_search = window.location.search.slice(1);%0A if (url_search.length %3E 0) %7B%0A if (url_search.lastIndexOf('noscroll') %3E -1) %7B%0A ...
a261c5352cf25884a95ec95cfc770e23151e231b
Add Tom
app/people.js
app/people.js
module.exports = [ { name: 'Dan', avatar: 'https://d389zggrogs7qo.cloudfront.net/images/team/dan.jpg', city: 'San Antonio, TX', tz: 'America/Chicago' }, { name: 'Niel', avatar: 'https://d389zggrogs7qo.cloudfront.net/images/team/niel.jpg', city: 'Cape Town', tz: 'Africa/Johannesburg...
JavaScript
0.000013
@@ -3718,14 +3718,181 @@ ckholm'%0A + %7D,%0A %7B%0A name: 'Tom',%0A avatar: 'https://pbs.twimg.com/profile_images/453520542453084160/HdqtD5Zm_400x400.jpeg',%0A city: 'Toronto',%0A tz: 'America/New_York'%0A %7D%0A%5D;
68a5692eaf2e641d51b88207d15dad9ccd077d74
fix pubsub exception in tests
app/pubsub.js
app/pubsub.js
var Promise = require('bluebird') , models = require('./models') , async = require('async') , redis = require('redis').createClient , PostSerializer = models.PostSerializer , CommentSerializer = models.CommentSerializer , LikeSerializer = models.LikeSerializer exports.listen = function(server, app) { var...
JavaScript
0.000002
@@ -3979,16 +3979,100 @@ (post) %7B +%0A if (!post) %7B%0A return Promise.resolve(%5B%5D)%0A %7D%0A return @@ -4092,16 +4092,24 @@ ineIds() +%0A %7D)%0A
9f08831d953ab2d5d6074e5673463480de517258
Fix initialization of default repo
app/quotes.js
app/quotes.js
'use strict'; const quotes = this; const _ = require('underscore'); this.localDb = []; const defaultDataSource = []; this.repo = require('./quotesMemoryRepository')(defaultDataSource); const getLeastOccurrenceRandom = collection => { collection = _.sortBy(collection, quote => quote.occurrences); const first = ...
JavaScript
0.000001
@@ -86,40 +86,8 @@ %5B%5D;%0A -%0Aconst defaultDataSource = %5B%5D;%0A%0A this @@ -134,25 +134,10 @@ y')( -defaultDataSource +%5B%5D );%0A%0A
9b9f6f41b1cdced512806e6d3a3ce8c6efe49e81
add zeroPadding
main.js
main.js
document.addEventListener('DOMContentLoaded', function(e){ var DAYS = ['日', '月', '火', '水', '木', '金', '土']; var clock = function(){ var now = new Date(); var current = { 'year': now.getFullYear(), 'month': (now.getMonth() + 1 < 10) ? '0' + (now.getMonth() + 1) : now.getMonth() + 1, 'date': ...
JavaScript
0.956305
@@ -166,143 +166,175 @@ var -current = %7B%0A 'year': now.getFullYear(),%0A 'month': (now.getMonth() + 1 %3C 10) ? '0' + (now.getMonth() + 1) : now.getMonth() + 1 +zeroPadding = function(val) %7Breturn (val %3C 10) ? '0' + val : val;%7D;%0A var current = %7B%0A 'year': now.getFullYear(),%0A 'mo...
33afa5699718ca8afcf7ffcda01e17af214da5bd
Fix up route for single list
app/router.js
app/router.js
import Ember from 'ember'; import config from './config/environment'; var Router = Ember.Router.extend({ location: config.locationType }); Router.map(function() { this.route('lists', function() { this.route('show', {path: 'list/:id'}); }); this.route('top50'); this.route('movies', {path: '/'}, functio...
JavaScript
0.002605
@@ -230,13 +230,8 @@ h: ' -list/ :id'
52325f56000dc3b82132d32b450a963aca555243
Add about projects route
app/routes.js
app/routes.js
// These are the pages you can go to. // They are all wrapped in the App component, which should contain the navbar etc // See http://blog.mxstbr.com/2016/01/react-apps-with-pages for more information // about the code splitting business import { getAsyncInjectors } from 'utils/asyncInjectors'; const errorLoading = (e...
JavaScript
0
@@ -1047,24 +1047,1178 @@ %7D);%0A%0A + importModules.catch(errorLoading);%0A %7D,%0A %7D, %7B%0A path: '/projects',%0A name: 'projects',%0A getComponent(nextState, cb) %7B%0A const importModules = Promise.all(%5B%0A import('containers/Projects/reducer'),%0A ...
cfc6cf5962c3843f95d9679a58b8329040529d1f
Remove icon from the dock. Closes #8
main.js
main.js
'use strict'; const electron = require('electron'); const app = electron.app; const BrowserWindow = electron.BrowserWindow; const globalShortcut = electron.globalShortcut; const ipc = electron.ipcMain; const Tray = electron.Tray; const Menu = electron.Menu; const path = require('path'); const dataStore = require('./src...
JavaScript
0
@@ -2273,16 +2273,33 @@ %5D));%0A%7D%0A%0A +app.dock.hide();%0A app.on('
299b528721d5ea053b2143b81878015f085ad830
Use `allowUrls` option to filter out errors in injected scripts
app/sentry.js
app/sentry.js
import * as Sentry from '@sentry/browser'; import { Ember } from '@sentry/integrations/esm/ember'; import config from './config/environment'; export function init() { let integrations = []; if (config.environment === 'production') { integrations.push(new Ember()); } let isProd = location.hostname === 'cr...
JavaScript
0
@@ -538,16 +538,130 @@ tions,%0A%0A + allowUrls: %5B'crates.io', 'crates-io.herokuapp.com', 'staging.crates-io', 'staging-crates-io.herokuapp.com'%5D,%0A%0A befo
8a463a98e331b76d27ce397e1c0ee2bd2ae5df43
add the inset to the window. phresh
main.js
main.js
// Require some modules const electron = require('electron') const app = electron.app const BrowserWindow = electron.BrowserWindow // global ref. of mainWindow [garbage coll. reasons] let mainWindow function createWindow () { mainWindow = new BrowserWindow({ // window settings title: 'lettera', width: 500, ...
JavaScript
0.999619
@@ -356,16 +356,22 @@ 'hidden +-inset ',%0A d
17b359f71e1e135381f6b031d067b12f224fac1f
refactor Link tests with Enzyme
test/src/link/index.js
test/src/link/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import { expect } from 'chai'; import { renderOnce } from 'test/helpers/render'; import Link from '#link'; describe.skip('link', () => { describe('basic', () => { it('exists', () => { ...
JavaScript
0.000001
@@ -1,65 +1,4 @@ -import React from 'react';%0Aimport ReactDOM from 'react-dom';%0A impo @@ -86,46 +86,30 @@ t %7B -renderOnce %7D from 'test/helpers/render +shallow %7D from 'enzyme ';%0A%0A @@ -147,27 +147,24 @@ ribe -.skip('link', () =%3E +('a', function() %7B%0A @@ -184,21 +184,26 @@ basic', -() =%3E +fun...
121d514d0b67dd7d6f1874c5a33f24dfb25013ba
Fix linter
test/system/_server.js
test/system/_server.js
"use strict"; const express = require("express"); const router = require("../../app/http/router"); const server = express(); const mongodb = require("mongodb"); const odm = require("../../app/odm"); const credentials = require("./_credentials"); const runtime = require("../../app/cli_args...
JavaScript
0.000002
@@ -380,40 +380,14 @@ ect( -%22mongodb://192.168.99.100:32768%22 +db_url ).th @@ -662,16 +662,35 @@ () =%3E %7B%0A + /* global run */%0A run();
40daf9d3c1fe3c008bb702a7922e3a697fe4e0b4
factor out key_grab
main.js
main.js
/* wim -- modal text editor */ 'use strict'; const ctx=document.getElementById('c').getContext('2d'); /* TODO keyboard input - escape sequences: Ctrl+], 'fd' in rapid sequence, and <ESC> - quit-anything: Ctrl+g - motions aren't recorded - edits are saved to a fixed-length queue for undo purposes */ const...
JavaScript
0.999586
@@ -129,186 +129,143 @@ - -escape sequences: Ctrl+%5D, 'fd' in rapid sequence, and %3CESC%3E%0A - quit-anything: Ctrl+g%0A - motions aren't recorded%0A - edi +inputs accumulate until they can be recognized as 'operations', then are pushed to history stack%0A - 'insert mode' inpu ts are +n't saved - to a ...
43cf789b2c3e434273d047dfa756b183b6b33f46
Fix nextToken lint error
main.js
main.js
/* * stupid-regex-parser * https://github.com/tJener/stupid-regex-parser * * Copyright (c) 2013 Eric Li * Licensed under the MIT license. */ 'use strict'; var requirejs = require('requirejs'); requirejs.config({ baseUrl: 'lib', nodeRequire: require }); requirejs([ 'lexer' ], function( Lexer ) { var lexe...
JavaScript
0.000008
@@ -1432,24 +1432,35 @@ %7B%0A var + nextToken, token = tok @@ -1570,36 +1570,32 @@ + ' ';%0A -var nextToken = toke @@ -1846,28 +1846,24 @@ ue;%0A -var nextToken =
797b40a72e8a8bafd741a3e3c7f9686a3bfe723c
change using test model
main.js
main.js
tm.main(function() { var app = tm.hybrid.Application("#canvas2d", "#canvas3d"); app.resize(640, 960).fitWindow().run(); app.replaceScene(tm.game.LoadingScene({ width: 640, height: 960, assets: { // 拡張子による判別がきかないため、typeパラメータをつける kirara: { type: "th...
JavaScript
0.000001
@@ -465,21 +465,11 @@ ets/ -gradriel_pose +cri .mqo
81dd27c517470b80e4817d80e09ed45993be16b6
add some thanking
main.js
main.js
// load config const config = require('config'); const { login } = require('libfb'); // load module definitions const commandDescriptions = require('./modules.json'); const prefixLen = 1; // return module that handles a command const commands = commandDescriptions.map(function(cmd) { return require('./' + cmd['pat...
JavaScript
0.0001
@@ -302,31 +302,220 @@ ire( -'./' + cmd%5B'path +%60./$%7Bcmd.path%7D%60);%0A%7D);%0A%0Aconst freeformTriggers = %5B'thanks robby', 'thanks sadbot', 'thanks bot '%5D -) ;%0A -%7D) +const thanks = %5B%0A 'you got it!',%0A %22you're welcome friendo%22,%0A '_beep boop_',%0A '_%3C3_',%0A 'cheers %F0%9F%8D%BB',%0A ...
08b0f2604942a6b48eedf05a0f1a7e1573ad4699
Add support for lodash 4.x (Found in Grunt 1.x) * Changed lodash `rest` usage to tail. * Note this still supports lodash 3.x as tail was an alias for the original rest. Both 3.x and 4.x tail do the same thing.
main.js
main.js
/* * grunt-util-options * https://github.com/mikaelkaron/grunt-util-process * * Copyright (c) 2013 Mikael Karon * Licensed under the MIT license. */ module.exports = function(grunt) { "use strict"; var _ = grunt.util._; var _property = require("grunt-util-property")(grunt); return function (properties) { ...
JavaScript
0
@@ -393,12 +393,12 @@ h(_. -rest +tail (arg
d65e371f71dd0448095bd2525a6089b2c2214f02
Write tests.
test/textnodes_test.js
test/textnodes_test.js
(function($) { /* ======== A Handy Little QUnit Reference ======== http://api.qunitjs.com/ Test methods: module(name, {[setup][ ,teardown]}) test(name, callback) expect(numberOfAssertions) stop(increment) start(decrement) Test assertions: ok(value, [message]) ...
JavaScript
0.000001
@@ -632,16 +632,38 @@ )%0A */%0A%0A + var TEXT_NODE = 3;%0A%0A module @@ -765,34 +765,35 @@ n() %7B%0A -this.elems +var fixture = $('#qunit @@ -806,238 +806,208 @@ re') -.children();%0A %7D%0A %7D);%0A%0A test('is chainable', function() %7B%0A expect(1);%0A // Not a bad test to run on collect...
ef94e3d9e60a80177482e752c794904c91c03fe2
Update transform tests.
test/transform-test.js
test/transform-test.js
var tape = require('tape'), util = require('vega-util'), vega = require('vega-dataflow'), parse = require('../').parse; util.extend(vega.transforms, require('vega-transforms')); tape('Parser parses Vega specs with data transforms', function(test) { var spec = { "signals": [ { "name": "ufield",...
JavaScript
0
@@ -1327,17 +1327,17 @@ ength, 3 -3 +1 );%0A%0A te
36c12bb1553945c115f400727153e195de3b8459
Disable bigCityEvent
main.js
main.js
/** * Main file which distributes tasks. */ 'use strict' const fs = require('fs-extra') const yandex = require('yandex-translate')(process.env.YANDEX_TRANSLATE_KEY) const path = require('path') const parse = require('./data/parse') const inBlackList = require('./data/blackList').inBlackList const dataIO = require(...
JavaScript
0.000006
@@ -511,28 +511,8 @@ ')%0A%0A -const priceTo = 200%0A Prom @@ -858,434 +858,8 @@ %5D),%0A - run(%5B'bigCityEvent', 'VOLUNTEERING', 'http://bigcityevent.com/api/v1/events/?tag=VOLUNTEERING'%5D),%0A run(%5B'bigCityEvent', 'CONFERENCE_EVENT', 'http://bigcityevent.com/api/v1/events/?tag=CONFERENCE_EVENT'%5D),%0A run(...
e811073c186be8cf34c757c042278601570b049b
Remove unneeded code
main.js
main.js
/* jshint esnext: true */ "use strict"; var menubar = require('menubar'); var Docker = require('dockerode'); var fs = require('fs'); var docker = new Docker(); var mb = menubar({ dir: __dirname + "/src", preloadWindow: true, icon: __dirname + "/IconTemplate@2x.png" }); var lastConnectionStatus = null; ...
JavaScript
0.000018
@@ -1096,64 +1096,8 @@ age%0A - // mb.window.webContents.send('ping', 'whoooooooh!');%0A if
42cad90ea3146c72143cae6e1bfc2115757a7d33
fix minor typo in comment
main.js
main.js
'use strict'; var fs = require('fs'); var ohm = require('ohm-js'); //Read in the grammar & create the parser etc. var flGrammar = ohm.grammar(fs.readFileSync('flujo.ohm')); //Read in the source file and attempt to parse //The first two are node itself and the js script being run - //so should be ignored var args =...
JavaScript
0.000718
@@ -233,16 +233,21 @@ rst two +args are node
8a85ce06da7abdd1a9b4f851dc8c4204f2150631
improve unit test
tests/doh/lifecycle.js
tests/doh/lifecycle.js
define(["doh", "dojox/app/main", "dojox/json/ref", "dojo/text!./config.json", "dojo/_base/connect"], function(doh, Application, json, config, connect){ doh.register("dojox.app.tests.doh.config", [ function testConfig(t){ var dohDeferred = new doh.Deferred(); Application(json.fromJson(config)); connect.subs...
JavaScript
0.000002
@@ -81,21 +81,13 @@ ojo/ -_base/connect +topic %22%5D,%0A @@ -128,23 +128,21 @@ config, -connect +topic )%7B%0A%09doh. @@ -175,45 +175,91 @@ doh. -config%22, %5B%0A%09%09function testConfig +lifecycle%22, %5B%0A%09%09%7B%0A%09%09%09timeout: 2000,%0A%09%09%09name: %22lifecyle%22,%0A%09%09%09runTest: function (t)%...
9c0f6780c5de9980700e174da2dbfb45c54524ab
Fix for IE--trailing comma in object literal
_workbench/pcre/preg_split.js
_workbench/pcre/preg_split.js
function preg_split (pattern, subject, limit, flags) { // http://kevin.vanzonneveld.net // + original by: Marco Marchiò // * example 1: preg_split(/[\s,]+/, 'hypertext language, programming'); // * returns 1: ['hypertext', 'language', 'programming'] // * example 2: preg_split('//', 'string', -1, 'PR...
JavaScript
0.000019
@@ -1718,17 +1718,16 @@ TURE': 4 -, %0A %7D;%0A
8a6a3afeb61ec2793bef5b891572aa346f7c4042
Change the variable name from 'form' to 'div'
add_google_sitesearch.user.js
add_google_sitesearch.user.js
// ==UserScript== // @name Add Google sitesearch // @namespace curipha // @description Add a site search form to all pages // @include http://* // @include https://* // @exclude https://*.google.tld/* // @exclude https://*.amazon.tld/* // @version 0.3.0 // @grant ...
JavaScript
0.999999
@@ -1342,20 +1342,19 @@ const -form +div = docum @@ -1381,20 +1381,19 @@ iv');%0A -form +div .id = 'u @@ -1413,20 +1413,19 @@ gle';%0A -form +div .innerHT @@ -1870,20 +1870,19 @@ ndChild( -form +div );%0A%0A co @@ -2110,20 +2110,19 @@ veChild( -form +div ); %7D;%0A
12de32b6543b942054ee3f5d7567a7241354318d
Fix uni-modal overflow logic (#285)
addon/components/uni-modal.js
addon/components/uni-modal.js
import Component from '@ember/component'; import { observer } from '@ember/object'; import $ from 'jquery'; import layout from '../templates/components/uni-modal'; export default Component.extend({ tagName: '', layout, baseCssClass: 'uni-modal', modifierCssClass: '', customCssComponentClass: '', bodyOverfl...
JavaScript
0.00001
@@ -88,22 +88,42 @@ ort -$ +%7B on %7D from ' -jquery +@ember/object/evented ';%0Ai @@ -461,16 +461,35 @@ n: null, +%0A firstLoad: true, %0A%0A onCl @@ -606,16 +606,27 @@ bserver: + on('init', observe @@ -650,24 +650,54 @@ ion() %7B%0A +if (this.get('firstLoad') && ! this.get('is @@ -706,35 +706,166 @...
a0acca7d34c6d42d9d1321582f308c59ffa02eb1
Add helpers
meta.js
meta.js
const os = require('os') const githubAccountDefault = os.userInfo().username module.exports = { prompts: { name: { type: 'string', required: true, message: 'Plugin name' }, description: { type: 'string', required: false, message: 'Plugin description', default: 'A...
JavaScript
0.000001
@@ -667,20 +667,22 @@ lt%0A %7D -, %0A +%7D,%0A helper @@ -690,18 +690,16 @@ : %7B%0A - - nowYear: @@ -709,26 +709,24 @@ nction () %7B%0A - return @@ -751,31 +751,27 @@ lYear()%0A - - %7D,%0A - authorFu @@ -800,34 +800,32 @@ author) %7B%0A - - const startPosit @@ -84...
68805bb72ccef487e742078610dc84cc0b164710
improve rename after complete
meta.js
meta.js
const fs = require('fs'); module.exports = { "prompts": { "name": { "type": "string", "required": true, "label": "Component name in kebab-case format", "default": "v-awesome-component" }, "description": { "type": "string", "required": true, "label": "Project desc...
JavaScript
0.000016
@@ -18,16 +18,46 @@ e('fs'); +%0Aconst path = require('path'); %0A%0Amodule @@ -583,71 +583,162 @@ -fs.renameSync('src/Component/Component.vue', 'src/Component/' + +const cmpDir = path.resolve(data.destDirName, 'src/Component');%0A fs.renameSync(%0A path.resolve(cmpDir, 'Component.vue'),%0A path.re...
6b3417ddda89b0c73f7ddce40b36cd1a7ff36e5b
Fix Mock registration timing.
olio.js
olio.js
// Node.js API. var assert = require('assert') var events = require('events') // Contextualized callbacks and event handlers. var Operation = require('operation') // An evented semaphore. var Signal = require('signal') // Return the first not null-like value. var coalesce = require('extant') // Asynchronous control...
JavaScript
0
@@ -1629,16 +1629,55 @@ byhole%0A%0A + this._factory = new SocketFactory%0A%0A // A @@ -2026,47 +2026,8 @@ %7B%7D) -%0A%0A this._factory = new SocketFactory %0A%7D%0A%0A
770cd59f7f392aeb053b5a986bb77006429d6d06
add inputs and outputs to Node
packages/larissa/src/Node.js
packages/larissa/src/Node.js
// @flow import uuid from 'uuid/v4'; import Input from './Input'; import Output from './Output'; export default class Node { id: string; status: NodeStatus; constructor() { this.id = uuid(); } output(name: string = 'default'): Output { return new Output({name}); } input(...
JavaScript
0.000003
@@ -164,53 +164,172 @@ us;%0A -%0A constructor() %7B%0A this.id = uuid() + inputs: Map%3CString, Input%3E;%0A outputs: Map%3CString, Output%3E;%0A%0A constructor() %7B%0A this.id = uuid();%0A this.inputs = %5B%5D;%0A this.outputs = %5B%5D ;%0A @@ -399,25 +399,29 @@ urn -new...
31badad4b9b2290cc3ab10e79738c50110a64e29
Use `push` instead of `replace` so we can use the `back` functionality
samples/app/app-with-router-pages.js
samples/app/app-with-router-pages.js
const Vue = require('nativescript-vue/dist/index') const VueRouter = require('vue-router') Vue.use(VueRouter) global.process = { env: {} } // hack! a build process should replace process.env's with static strings. const Foo = { template: ` <page> <action-bar :title="$route.path"></action-bar> <...
JavaScript
0.000004
@@ -462,79 +462,12 @@ ter. -replace('/foo')%22%3EFoo%3C/button%3E%0A %3Cbutton @tap=%22$router.replace +push ('/b @@ -511,39 +511,36 @@ n @tap=%22$router. -replace +push ('/baz')%22%3EBaz%3C/b @@ -660,32 +660,162 @@ e=%22$route.path%22%3E +%0A %3Cnavigation-button text=%22Back!%22 android.sys...
22a653f33c28062701953c846bb710884befe91e
add extended option to body-parser
client-app.js
client-app.js
var // load config from file bodyParser = require('body-parser'), googleSpreadsheet = require('google-spreadsheet'), config = require('./helpers/config'), createServer = require("auto-sni"), express = require('express'), fs = require('fs'), httpLogging = require('./helpers/http-logging'), querystrin...
JavaScript
0.000001
@@ -696,16 +696,34 @@ encoded( +%7B extended: true %7D ));%0Aapp.
481434b805b853ef5f5d71982b76ece58cdbdd09
Add link to source
client/App.js
client/App.js
import React, { Component, PropTypes } from 'react' import UrlInput from './UrlInput' import Command from './Command' import { connect } from 'react-redux' import bookmarklet from './bookmarklet' require('./App.scss') class App extends Component { static get propTypes () { return { programCard: PropTypes...
JavaScript
0
@@ -2073,24 +2073,143 @@ %3C/ul%3E%0A + %3Ch3%3ESource%3C/h3%3E%0A %3Cp%3EThis tool is %3Ca href='http://github.com/mikker/dldr.brnbw.com'%3Eopen source%3C/a%3E.%3C/p%3E%0A %3C/div%3E
28ce3612cf60f4ed9014b273c37f12806639a62d
Update weatherunderground_new.js
api/weatherunderground_new.js
api/weatherunderground_new.js
/*jshint esversion: 6,node: true,-W041: false */ "use strict"; const converter = require('../util/converter'); class WundergroundAPI_new { constructor(apiKey, location, l, d) { this.attribution = 'Powered by Weather Underground'; this.reportCharacteristics = [ 'ObservationStation', ...
JavaScript
0.000021
@@ -1174,63 +1174,8 @@ d;%0A%0A - this.wunderground = new Wunderground(apiKey);%0A%0A
e5d7112885427d05b14ad8fe236986e7c9ac6e55
Remove latest commits area in homepage
docs/assets/home.js
docs/assets/home.js
/** * init module for seajs.org */ seajs.config({ base: './assets/', alias: { 'jquery': 'https://a.alipayobjects.com/static/arale/jquery/1.7.2/jquery.js' } }) define('home', [], function(require) { var navs = document.getElementById('nav').getElementsByTagName('a') var pages = getElementsByClassName(...
JavaScript
0
@@ -2077,16 +2077,18 @@ issues() +// .commits
05c3f2e2988f855bae3153959f03de1a3468d171
Fix themes demo to work with new `offline-ui-down-5s` behavior
docs/welcome/app.js
docs/welcome/app.js
$(function(){ var themes = [{ name: 'default', title: 'Default' }, { name: 'slide', title: 'Slide' }, { name: 'dark', title: 'Dark' }, { name: 'chrome', title: 'Chrome' }]; var indicatorThemes = [{ name: 'default-indicator'...
JavaScript
0
@@ -1529,16 +1529,35 @@ -ui-down + offline-ui-down-5s %22%3E%3Cdiv c @@ -1731,16 +1731,35 @@ -ui-down + offline-ui-down-5s ', '', '
27e9c67826cc53d348d2b28225c1520203a442d7
fix typo
main.js
main.js
// JP pref list // TODO: more plain format (using DB?) const pref_hokkaido = ["北海道"]; const pref_tohoku = ["青森県", "岩手県", "秋田県", "宮城県", "山形県", "福島県"]; const pref_kanto = ["茨城県", "栃木県", "群馬県", "埼玉県", "千葉県", "東京都", "神奈川県"]; const pref_chubu = ["山梨県", "長野県", "新潟県", "富山県", "石川県", "福井県", "静岡県", "愛知県", "岐阜県"]; const pref_kink...
JavaScript
0.999991
@@ -745,16 +745,17 @@ primary' +; %0Aconst b
01704ebd0b18982f969811449133bf08f1824c31
Update upload timeout ms.
main.js
main.js
const utils = require('./utils'); const Environment = require('./environment'); const requestPromise = require('request-promise'); const JSON_API_CONTENT_TYPE = 'application/vnd.api+json'; const USER_AGENT = 'percy-js/1.0'; const DEFAULT_TIMEOUT_MS = 30000; const DEFAULT_UPLOAD_TIMEOUT_MS = DEFAULT_TIMEOUT_MS * 4; c...
JavaScript
0
@@ -290,31 +290,57 @@ S = -DEFAULT_TIMEOUT_MS * 4; +90000; // Less than the 100s CloudFlare timeout. %0A%0A%0Ac
3366a4cb3d9787aadaaa7e0bbb2e83a1a646650d
Read environment variables
main.js
main.js
var deferred = require('simply-deferred'); var satelliteUrl = "https://sattest1.herokuapp.com"; var url = satelliteUrl+'/broadcast'; var EventEmitter = require('events').EventEmitter; var util = require('util'); var EventSource = require('EventSource'); var request = require('request'); var maxClientCount = 100; clas...
JavaScript
0.000017
@@ -307,12 +307,118 @@ t = -100; +process.env.CLIENT_COUNT;%0Avar token = process.env.TOKEN;%0Avar url = process.env.SATELLITE_URL + '/broadcast/';%0A %0A%0Acl @@ -1002,16 +1002,17 @@ ;%0A %7D%0A%7D%0A +%0A var rand @@ -2152,18 +2152,13 @@ en': -'abcd1234' +token ,'me
503a00465b05745e86f5a2a1b20952783a1823c1
Fix the webhook
main.js
main.js
import path from 'path'; import crypto from 'crypto'; import _ from 'lodash'; import Promise from 'bluebird'; import express from 'express'; import bodyParser from 'body-parser'; import config from './config'; import log from './lib/log'; let fs = Promise.promisifyAll(require('fs-extra')); let taskUpdating = {}; ex...
JavaScript
0.999892
@@ -1279,24 +1279,25 @@ r update%60);%0A +%0A %09%09%09%09runTask( @@ -1297,16 +1297,19 @@ unTask(' +v2/ jsdelivr @@ -1310,16 +1310,72 @@ delivr') +.then(() =%3E %7B%0A%09%09%09%09%09return runTask('v1/jsdelivr');%0A%09%09%09%09%7D) ;%0A%09%09%09%7D e
ff40954ea23fb0b4cdc9501265460df7b43411aa
move it move it!
main.js
main.js
var Cylon = require('cylon'); var sys = require('sys') var exec = require('child_process').exec; function puts(error, stdout, stderr) { sys.puts(stdout); sys.puts(error); sys.puts(stderr); }; Cylon.api...
JavaScript
0.000418
@@ -2594,16 +2594,56 @@ else +if (actionsObject%5Bi%5D.command === 'move') %7B%0A @@ -2656,32 +2656,34 @@ +// console.log(acti @@ -2689,32 +2689,514 @@ ionsObject%5Bi%5D);%0A + switch(actionsObject%5Bi%5D.part) %7B%0A case 'left_h...
9f2b18a05927ee6761f9cdea1340f17f4d42c73f
trim code
main.js
main.js
/*jslint browser: true*/ /*global Tangram, gui */ (function () { 'use strict'; /*** Config ***/ var tile_source = { source: { type: 'GeoJSONTileSource', url: window.location.protocol+'//vector.mapzen.com/osm/all/{z}/{x}/{y}.json' }, layers: 'layers.yaml', ...
JavaScript
0.000001
@@ -91,14 +91,11 @@ *** -Config +Map *** @@ -109,1375 +109,361 @@ var -tile_source = %7B%0A source: %7B%0A type: 'GeoJSONTileSource',%0A url: window.location.protocol+'//vector.mapzen.com/osm/all/%7Bz%7D/%7Bx%7D/%7By%7D.json'%0A %7D,%0A layers: 'layers.yaml',%0A ...
5fe2779319180071a53236fc67328e9d3ac026cb
remove old comments
main.js
main.js
// For any third party dependencies, like jQuery, place them in the lib folder. // Configure loading modules from the lib directory, // except for 'app' ones, which are in a sibling // directory. requirejs.config({ baseUrl: 'src', paths: { app: './src' } }); requirejs(["ReverseGeocoderCache", "Ti...
JavaScript
0
@@ -967,122 +967,4 @@ );%0A%0A -%0A// Start loading the main app file. Put all of%0A// your application logic in there.%0A//requirejs(%5B'src/regeca-main'%5D);%0A
cb3ce84b76b4c412a2e4c55e1b2d3ab6c47633e7
Fix typo
main.js
main.js
const _ = require('lodash'); const Discord = require('discord.js'); const AsyncPolling = require('async-polling'); const cheerio = require('cheerio'); const axios = require('axios'); const http = require('http'); const math = require('mathjs'); const moment = require('moment-timezone'); const command = require(...
JavaScript
0.999999
@@ -564,9 +564,10 @@ t = -5 +10 000; @@ -1836,59 +1836,8 @@ l;%0D%0A - console.log(res);%0D%0A
ef865c2e25c931de9a064796853837d67d691e2b
Read .js files
main.js
main.js
/*globals define, console*/ define(function (require, exports, module) { 'use strict'; var ExtensionUtils = brackets.getModule('utils/ExtensionUtils'), LiveDevelopment = brackets.getModule('LiveDevelopment/LiveDevelopment'), Inspector = brackets.getModule('LiveDevelopment/Inspector/Insp...
JavaScript
0.000002
@@ -521,32 +521,175 @@ ditorManager'),%0A + ProjectManager = brackets.getModule('project/ProjectManager'),%0A FileSystem = brackets.getModule('filesystem/FileSystem'),%0A DebugInl @@ -750,16 +750,16 @@ Widget,%0A - @@ -1105,25 +1105,24 @@ ome.css');%0A%0A -%0A var host @@ ...
b574f608da0b3fe750dd431ede5dfd4be4af7b69
Use an existing RSS feed to grab the URL for today. This code works, slowly...
main.js
main.js
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ /*global define, $, brackets, window */ define(function (require, exports, module) { "use strict"; var CommandManager = brackets.getModule("command/CommandManager"), Menus = brackets.getModul...
JavaScript
0
@@ -395,16 +395,87 @@ ialogs%22) +,%0A DefaultDialogs = brackets.getModule(%22widgets/DefaultDialogs%22) ;%0A%0A%0A @@ -567,20 +567,20 @@ var -base +feed Url = %22h @@ -589,163 +589,35 @@ p:// -www.dilbert.com/%22;%0A var comicBaseUrl = baseUrl + %22strips/comic/%22;%0A var today = gr...
cf2f5f00dc867deb1d4dd379fcec5ec31997a554
update header
main.js
main.js
/* * System Designer * https://system-designer.github.io * @ecarriou * * Copyright 2017 Erwan Carriou * * 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/...
JavaScript
0.000001
@@ -1,11 +1,10 @@ /* - %0A * Syst @@ -15,16 +15,19 @@ esigner%0A + *%0A * https @@ -29,31 +29,45 @@ https:// +designfirst.io/ system -- designer .github. @@ -62,31 +62,9 @@ gner -.github.io%0A * @ecarriou +/ %0A *%0A
fd3e37f287d48df7185f8655dab37894ffafaae6
Introduce read-only but extensible mount points file
main.js
main.js
import ExamplePluginComponent from "./components/ExamplePluginComponent"; var PluginHelper = global.MarathonUIPluginAPI.PluginHelper; PluginHelper.registerMe("examplePlugin-0.0.1"); PluginHelper.injectComponent(ExamplePluginComponent, "SIDEBAR_BOTTOM");
JavaScript
0
@@ -72,28 +72,35 @@ %22;%0A%0Avar -PluginHelper +MarathonUIPluginAPI = globa @@ -124,21 +124,124 @@ nAPI -.PluginHelper +;%0Avar PluginHelper = MarathonUIPluginAPI.PluginHelper;%0Avar PluginMountPoints = MarathonUIPluginAPI.PluginMountPoints ;%0A%0AP @@ -340,18 +340,37 @@ mponent, - %22 +%0A PluginMountPoints. ...
0e145b86a63b0294c74e64825273cb208986f5a1
Fix Squirrel.Windows initialization
main.js
main.js
/* eslint strict: 0 */ 'use strict'; process.env.NODE_ENV = process.env.NODE_ENV || 'production'; const electron = require('electron'); const remote = electron.remote; const app = electron.app; const BrowserWindow = electron.BrowserWindow; const Menu = electron.Menu; const crashReporter = electron.crashReporter; cons...
JavaScript
0.000004
@@ -442,50 +442,731 @@ e;%0A%0A -%0Aif (re +// handle Squirrel.Windows events%0Avar path = require('path');%0Avar spawn = require('child_process').spawn;%0Avar run = function(args, done) %7B%0A var updateExe = path.resolve(path.dirname(process.execPath), '..', 'Update.exe');%0A spawn(updateExe, args, %7B%0A detac...
e3148d146e3092c6f4bb9173474b6f6fba7c8a22
remove logs
main.js
main.js
import React from 'react'; import ReactDOM from 'react-dom'; import NotificationBell from './src/js/NotificationBell'; import NotificationApi from './src/js/NotificationApi'; import './main.scss'; import NotificationContainer from './src/js/NotificationContainer'; import Drawer from '@pearson-components/drawer/main'; ...
JavaScript
0.000001
@@ -1305,32 +1305,8 @@ %3E %7B%0A -%09%09%09console.log(result);%0A %09%09%09/
47943717174b1eb529d3e40f9cfc8da4a0e97014
extract all prompts
main.js
main.js
var UglifyJS = require('uglify-js'); var fs = require('fs'); // Input file var filename = "./jhipster-config/index.js"//process.argv[1]; // Parse Javascript var ast = UglifyJS.parse(String(fs.readFileSync(filename))); // Export AST to Javascript var code = ast.print_to_string({ beautify: true }); // Extract pro...
JavaScript
0.999999
@@ -1371,16 +1371,604 @@ %7D%0A + %7D else if (node instanceof UglifyJS.AST_Call) %7B%0A if (node.expression.print_to_string() === %22this.prompt%22) %7B%0A%0A node.args.forEach(function(arg) %7B%0A%0A if (arg instanceof UglifyJS.AST_Object) %7B%0A ...
d44b60fc72f061a938f3141c03bc9b00a84109f1
fix typo in logLevel addition
main.js
main.js
#!/usr/bin/env node /* * Copyright 2012 Joyent, Inc. All rights reserved. * * Main entry-point for the Image API (IMGAPI) for SmartDataCenter (SDC). */ var util = require('util'); var path = require('path'); var fs = require('fs'); var nopt = require('nopt'); var restify = require('restify'); var bunyan = requir...
JavaScript
0.000008
@@ -3946,17 +3946,16 @@ Argv();%0A -%0A theC @@ -4054,17 +4054,17 @@ level(th -s +e Config.l @@ -4071,23 +4071,25 @@ ogLevel) +; %0A %7D%0A +%0A // L
f7c5dcb02ee096445fe5a15ecf06ccc858f2ba95
fullscreen and size false
main.js
main.js
var electron = require('electron'); // Module to control application life. var app = electron.app; // Module to create native browser window. var BrowserWindow = electron.BrowserWindow; // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object ...
JavaScript
0.999732
@@ -451,17 +451,29 @@ rWindow( -%7B +%0A %7B%0A maxWidth @@ -479,16 +479,23 @@ h: 800, +%0A maxHeigh @@ -502,16 +502,23 @@ t: 600, +%0A resizabl @@ -525,17 +525,54 @@ e: false -%7D +,%0A fullscreenable: false%0A %7D%0A );%0A%0A //
ca8a0fbbfb2588b4c466cf107f05e79c581bb241
Fix args
main.js
main.js
'use strict'; const path = require('path'); const electron = require('electron'); const chokidar = require('chokidar'); const shuffle = require('lodash.shuffle'); const storage = require('electron-json-storage'); const commandInstaller = require('command-installer'); const parseArgs = require('minimist'); const app = e...
JavaScript
0.016411
@@ -2032,17 +2032,17 @@ v.slice( -2 +1 ));%0A%0A%09if @@ -2285,16 +2285,103 @@ ine%0A%09%7D%0A%0A +%09const executedFrom = input%5B'executed-from'%5D ? input%5B'executed-from'%5D : process.cwd();%0A %09if (inp @@ -2600,16 +2600,16 @@ else %7B%0A - %09%09setupW @@ -2628,16 +2628,30 @@ resolve( +executedFrom, i...
6ac73ab13f93245fe2c60b68e29822c365b1af59
fix getblock
main.js
main.js
/** * * Created by shouhewu on 6/8/17. * */ var express = require("express"); var path = require('path'); var app = express(); var http= require('http').Server(app); var bodyParser = require('body-parser'); require('./socket/websocketserver.js')(http) var timer=require('./timer/timer.js') timer.start() var quer...
JavaScript
0.000002
@@ -627,16 +627,56 @@ ery.js') +%0Avar sql=require('./db/mysqlservice.js') %0A%0A// === @@ -2883,32 +2883,34 @@ %7D)%0A %7D)%0A%7D);%0A%0A +/* app.post(%22/api/b @@ -3188,24 +3188,408 @@ %7D)%0A %7D)%0A +%7D);*/%0Aapp.post(%22/api/block/get%22, function(req, res) %7B%0A let number=req.body.number%0A ...
623ad180a0840040c6fed766aec2685720e1452a
Clean up main.js
main.js
main.js
var express = require("express"), http = require("http"), swig = require("swig"), radiodanClient = require("radiodan-client"), Settings = require("./lib/settings").create(), logger = radiodanClient.utils.logger(__filename), radiodan = radiodanClient...
JavaScript
0.000061
@@ -1616,32 +1616,37 @@ /radio/routes%22)( +%0A express.Router() @@ -1699,24 +1699,27 @@ vices, power +%0A )%0A);%0Aapp.use @@ -1755,32 +1755,37 @@ events/routes%22)( +%0A express.Router() @@ -1807,16 +1807,19 @@ Services +%0A )%0A);%0Aapp @@ -1857,16 +1857,21 @@ outes%22)( +%0A express. @@ -1...
d655532c2372cff646fde31ca3278bcc7fbf68ed
add defaultType and assetType for meta
main.js
main.js
var Fs = require('fire-fs'); var Path = require('fire-path'); var Url = require('fire-url'); function _updateTitile () { var url = Editor.assetdb.uuidToUrl(Editor.currentSceneUuid); if ( !url ) { url = 'Untitled'; } Editor.mainWindow.nativeWin.setTitle( 'Fireball Editor - ' + url ); } module.e...
JavaScript
0
@@ -1212,38 +1212,36 @@ type: meta -%5B' +. asset --type'%5D +Type() ,%0A @@ -2430,38 +2430,36 @@ type: meta -%5B' +. asset --type'%5D +Type() ,%0A @@ -3526,30 +3526,28 @@ pe: meta -%5B' +. asset --type'%5D +Type() ,%0A @@ -4372,22 +4372,20 @@ aObj -%5B' +. asset --type'%5D +Typ...
6ee30571fc8fcd3d19ee3ef875b9658d4979ec1a
Add postcss-reporter to build to catch error messages
packages/utils-size/build.js
packages/utils-size/build.js
const postcss = require('postcss'); const bemLinter = require('postcss-bem-linter'); const reporter = require('postcss-reporter'); module.exports = { use: [ "postcss-import", "postcss-calc", "postcss-custom-media", "autoprefixer" ], "postcss-import": { transform(css) { return postcss([b...
JavaScript
0
@@ -241,16 +241,40 @@ refixer%22 +,%0A %22postcss-reporter%22 %0A %5D,%0A @@ -382,15 +382,68 @@ ;%0A %7D%0A + %7D,%0A %22postcss-reporter%22: %7B%0A clearMessages: true%0A %7D%0A%7D;%0A
336681b6ce1f23ded34664c926be8d13504d840e
Build substance for tests.
make.js
make.js
var b = require('substance-bundler'); b.task('clean', function() { b.rm('./dist') }) // copy assets b.task('assets', function() { b.copy('examples/index.html', './dist/') b.copy('texture.css', './dist/') b.copy('packages/**/*.css', './dist/') b.copy('examples/data', './dist/data') b.copy('node_modules/fon...
JavaScript
0.000002
@@ -562,16 +562,79 @@ e')%0A%7D)%0A%0A +b.task('substance:all', function() %7B%0A b.make('substance')%0A%7D)%0A%0A function @@ -2455,16 +2455,33 @@ test', %5B +'substance:all', 'test:cl
8d63becc7501e77f3cce81e2bf13279f2c0c7dcd
throw errors
mask.js
mask.js
var mask = (function () { function Mask () { this.translation = {}; this.translation.x = 0; this.translation.y = 0; this.size = {}; this.size.x = 0; this.size.y = 0; this.data = null; }; /* Translate this Mask in two dimensions. */ Mask.__proto__.translate = function (x, y) { thi...
JavaScript
0.000006
@@ -959,108 +959,287 @@ -%7D;%0A %7D else %7B%0A /* Unknown signature. */%0A %7D;%0A %7D else %7B%0A /* File two short. */ + throw new Error(%22Unknown or unsupported PBM signature.%22);%0A %7D;%0A %7D else %7B%0A /* Unknown signature. */%0A throw new Error(%22U...
3cfff26d64586730fb63d76b2983e22dab272d35
Change port
node.js
node.js
// Configure port const port = 7989; //3000; const fs = require('fs') const path = require('path') const express = require('express'); const app = express(); var compiling = false; var http = require('http').Server(app); // Create server var server = app.listen(port, function(err) { if (err) { return co...
JavaScript
0.000001
@@ -30,19 +30,11 @@ t = -7989; //300 +808 0;%0A%0A
87cb50db1913fccaee9e06f4eef8ab16d8564488
Change name to match new service instance object
popup.js
popup.js
document.addEventListener('DOMContentLoaded', function () { display('Searching...'); }); function display(msg) { var el = document.body; el.innerHTML = msg; } chrome.runtime.getBackgroundPage(displayMessages); function displayMessages(backgroundPage) { var html = '<ul>'; html += backgroundPage.services.map...
JavaScript
0.000001
@@ -395,12 +395,12 @@ ice. -name +host %0A @@ -454,20 +454,23 @@ service. -host +address + ':' +
9af9ea66a29b27fcc1b770a60904b2d5be4d6899
Simplify domFor logic
render/domFor.js
render/domFor.js
"use strict" var delayedRemoval = new WeakMap module.exports.delayedRemoval = delayedRemoval module.exports.domFor = function *domFor(vnode, {generation} = {generation: undefined}) { let {dom, domSize} = vnode if (dom != null) { if (domSize == null) { if (delayedRemoval.get(dom) === generation) { yield dom...
JavaScript
0.02713
@@ -129,21 +129,30 @@ *domFor( -vnode +%7Bdom, domSize%7D , %7Bgener @@ -165,259 +165,67 @@ = %7B -generation: undefined%7D) %7B%0A%09let %7Bdom, domSize%7D = vnode%0A%09if (dom != null) %7B%0A%09%09if (domSize == null) %7B%0A%09%09%09if (delayedRemoval.get(dom) === generation) %7B%0A%09%09%09%09yield dom%0A%09%09%...