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
c93f312bbffc4fa499789121b36ea16ebf0acb60
add className test
index.js
index.js
import TestUtils from 'react-addons-test-utils'; export default function pluginAssumeReact(assume, util) { const a = assume().a; /** * Is the value allowed for the React Component.propTypes. * * @param {String} propName Propety name * @param {String} prop Value to test against * @param {String} msg...
JavaScript
0.000011
@@ -1,8 +1,40 @@ +/* eslint no-invalid-this: 0 */%0A import T @@ -247,36 +247,32 @@ am %7BString%7D prop -Name Propety name%0A @@ -282,36 +282,37 @@ @param %7BString%7D -prop +value Value to test a @@ -350,32 +350,73 @@ Custom message%0A + * @returns %7BAssert%7D reference to self%0A * @api public @@ ...
f5ee0cd3d94bf8a51b752d40d0d67dccf7e3524b
Make front page redirect to wiki
sandcats/sandcats.js
sandcats/sandcats.js
if (Meteor.isServer) { Meteor.startup(function () { // Validate that the config file contains the data we need. validateSettings(); // Create our DNS zone for PowerDNS, if necessary. mysqlQuery = createWrappedQuery(); createDomainIfNeeded(mysqlQuery); // Bind handlers for UDP-based client pi...
JavaScript
0.000056
@@ -501,25 +501,20 @@ // -Provide a trivial +Redirect the fro @@ -524,42 +524,30 @@ page -, to -avoid the Iron Router default +the Sandstorm wiki .%0A @@ -580,16 +580,233 @@ ath: '/' +,%0A where: 'server',%0A action: function() %7B%0A this.response.writeHead(302, %7B%0A 'Location': 'https...
c666013ca38766fc1d1fb2e3d149a820c406df63
Add REST call for files.
backend/server/resources/projects-routes.js
backend/server/resources/projects-routes.js
module.exports = function(model) { 'use strict'; let validateProjectAccess = require('./project-access')(model.access); let schema = require('.././schema')(model); let router = require('koa-router')(); let projects = require('./projects')(model.projects); let samples = require('./samples')(mode...
JavaScript
0
@@ -333,16 +333,65 @@ chema);%0A + let files = require('./files')(model.files);%0A let @@ -492,24 +492,126 @@ jects.all);%0A + router.get('/projects2/:project_id/dir/:directory_id', validateProjectAccess, projects.dirTree);%0A%0A router.p @@ -684,32 +684,33 @@ cesses.create);%0A +%0A router.pos...
30955c76583408fcf7d8ab91bc0817b04d873828
Fix the wrapped button issue. (#315)
client/jsx/actions/search_actions.js
client/jsx/actions/search_actions.js
require('isomorphic-fetch'); import { createPath } from '../lib/search_helpers'; import _ from 'underscore'; const queryString = require('query-string'); const RESULTS_URL = '/backend/get_search_results'; const WRAPPED_PAGE_SIZE = 250; // helper methods function fetchFromApi(url) { return fetch(url) .then(functi...
JavaScript
0
@@ -2054,16 +2054,33 @@ st qp = +queryString.parse (state.r @@ -2082,19 +2082,18 @@ ate.rout -ing +er .locatio @@ -2094,21 +2094,22 @@ ocation. -query +search );%0A f @@ -3755,24 +3755,50 @@ response) %7B%0A + console.log(_response);%0A return %7B%0A
684a16e64b08f01248ef39b9ae4d519d375259d7
convert to async
Start.js
Start.js
module.exports = function(RED) { var child_process=require("child_process"); var StringDecoder = require('string_decoder').StringDecoder; var decoder = new StringDecoder('utf8'); function StartNode(config) { RED.nodes.createNode(this,config); var node = this; this.on('input', fun...
JavaScript
0.999999
@@ -528,20 +528,8 @@ -var outcome= chil @@ -546,19 +546,203 @@ exec -Sync(cmd);%0A +(cmd,function(error,stdout,stderr)%7B%0A if(error!=null)%7B%0A msg.payload.container=%22Error%22;%0A%09%09 msg.payload.error=stderr;%0A%09%09 node.send(msg);%0A%09%09 return;%0A %7D%0A...
45072c299ee811a58052068e3a583f33697f2b46
remove invalid this.send calls
source/application/routes/demo.js
source/application/routes/demo.js
import path from 'path'; import urlQuery from '../utils/url-query'; const getPatternDemo = require('patternplate-server/library/get-pattern-demo'); const getPatternFile = require('patternplate-server/library/get-pattern-file'); function withErrorHandling(fn) { return async function(...args) { try { const resul...
JavaScript
0.000018
@@ -1664,97 +1664,43 @@ %09%09%09%09 -console.log(error.message);%0A%09%09%09%09if (error.stack) %7B%0A%09%09%09%09%09console.trace(error.stack);%0A%09%09%09%09%7D +this.throw(500, error);%0A%09%09%09%09return; %0A%09%09%09 @@ -1840,16 +1840,28 @@ , err);%0A +%09%09%09%09return;%0A %09%09%09%7D%0A%0A%09%09 @@ -2089...
396e61256f716ccc112f8ef60ea12b6adc2d54f4
add get route
routes/trade-router.js
routes/trade-router.js
'use strict'; const { Router } = require('express'); const jsonParser = require('body-parser').json(); const bearerAuth = require('../lib/bearer-auth'); const User = require('../model/user'); const Trade = require('../model/trade'); const tradeRouter = module.exports = new Router(); tradeRouter.post('/api/profile/t...
JavaScript
0
@@ -1383,36 +1383,41 @@ d(serial -, (err, +)%0A .then( trade -) =%3E %7B%0A + trad @@ -1437,24 +1437,26 @@ orSale;%0A + trade.asking @@ -1472,24 +1472,26 @@ skingPrice;%0A + trade.sa @@ -1523,54 +1523,332 @@ 00)) +; %0A -%7D);%0A%7D);%0A%0AtradeRouter.get('/api/profile/trade') + %7D)...
7d7ab9fabb96002e8a0cb7e0797f457c7a415fb5
update colission algo
src/map-generator/object/dungeon.js
src/map-generator/object/dungeon.js
import Room from './room'; import Corridor from './corridor'; import {isInside, modGrid} from "./utils"; const CorridorHeight = 64; const CorridorWidth = 64; const MaxRoom = 2; const MinRoomSize = 6 * 16; const MaxRoomSize = 20 * 16; const MapWidth = 1500; const MapHeight = 800; class Dungeon extends Phaser.Group { ...
JavaScript
0
@@ -223,10 +223,9 @@ e = -20 +8 * 1 @@ -3871,20 +3871,30 @@ l, this. -wall +corridorSprite s(), des @@ -3978,32 +3978,34 @@ unction);%0A +// game.physics.arc @@ -4023,38 +4023,28 @@ (wall, this. -corridorSprite +wall s(), destroy
7122ea0b6b81e8888d0e00f80dfe0c768c0fe105
Update GetTilesWithinShape.js
src/tilemaps/components/GetTilesWithinShape.js
src/tilemaps/components/GetTilesWithinShape.js
/** * @author Richard Davey <rich@photonstorm.com> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Geom = require('../../geom/'); var GetTilesWithin = require('./GetTilesWithin'); var Intersects = require('../../geom/intersects/'); var NOO...
JavaScript
0
@@ -1789,17 +1789,16 @@ upon.%0A * - %0A * @ret
95357ae58e2efb3b34dbb787e5916f233f8495fb
Update crooz.js
public/js/crooz.js
public/js/crooz.js
"use strict"; var socket; var mapper; function main() { socket = io(); mapper = Mapper.init(document.getElementById('mapCard')); socket.on('connected', function (users) { socket.emit('subscribe', users.sort(compare((new Date(a.lastActive)).getTime(), (new Date(b.lastActive)).getTime()))); co...
JavaScript
0
@@ -218,94 +218,11 @@ sers -.sort(compare((new Date(a.lastActive)).getTime(), (new Date(b.lastActive)).getTime())) +%5B0%5D );%0A @@ -1223,149 +1223,4 @@ ;%0A%7D%0A -%0Afunction compare(a,b) %7B%0A if (a %3E b) %7B%0A return 1;%0A %7D else if (a %3C b) %7B%0A return -1;%0A %7D else %7B%0A ...
efc4e93f452f0e5c48deb7e841f553904fa985a3
Add console log code help samples and tips
feature/index.js
feature/index.js
'use strict'; var generators = require('yeoman-generator'), _ = require('lodash'); module.exports = generators.Base.extend({ constructor: function () { generators.Base.apply(this, arguments); this.argument('featureName', { type: String, required: true }); this.featureTitle = _.startCase(this.feature...
JavaScript
0
@@ -1364,16 +1364,771 @@ s.js%60);%0A + %7D,%0A end: function() %7B%0A console.log(%60%5Cn==%3E Code help samples and tips %3C==%60);%0A console.log(%60==================================%60);%0A%0A console.log(%60%5Cn==%3E Javascript code snippet for index.js to load the '$%7Bthis.featureTitle%7D' feature:%...
32a8a75fe50f49c3952cd2743e3ca72e62e95fac
Update DepMap links
database/essentiality/get-data.js
database/essentiality/get-data.js
/* eslint-disable max-len */ const { cwd } = require('process'); const { exec } = require('child_process'); const createFolder = require('../helpers/create-folder'); const downloadHttps = require('../helpers/download-https'); const OUT_FOLDER = './files/essentiality'; const fsConfig = { celldata: { file: `${OU...
JavaScript
0
@@ -406,15 +406,15 @@ es/3 -1316011 +4008503 ',%0A @@ -613,15 +613,15 @@ es/3 -1315996 +4008491 ',%0A
8be1e06198d84b6fe9c2864f25cb055c1782daa4
Fix placeholder carousel margins
src/ItemsCarousel/PlaceholderCarousel.js
src/ItemsCarousel/PlaceholderCarousel.js
import React from 'react'; import PropTypes from 'prop-types'; import { Motion, spring, presets } from 'react-motion'; import Measure from 'react-measure'; import styled from 'styled-components'; import range from 'lodash/range'; import { calculateItemWidth, calculateItemLeftGutter, calculateItemRightGutter, } fr...
JavaScript
0.000001
@@ -537,23 +537,22 @@ k: 0;%0A -padd +marg in -g -right: @@ -592,15 +592,14 @@ ;%0A -padd +marg in -g -lef @@ -1044,16 +1044,46 @@ Measure%0A + includeMargin=%7Bfalse%7D%0A
1b462e953b4317b513940b3e2aff5704a3c71342
update test with new value
e2e/cypress/integration/tests/actions.spec.js
e2e/cypress/integration/tests/actions.spec.js
/// <reference types="cypress" /> context('Actions', () => { beforeEach(() => { cy.visit('http://localhost:8000') }) it('All + elements are clickable', () => { cy.get('.step-up').click( { multiple: true } ) cy.get('input.st-al') .should('has.value', '5') }) })
JavaScript
0
@@ -275,9 +275,9 @@ ', ' -5 +7 ')%0A
05a856dc96d8e06161f7632e27765b5b65980d9a
Fix success notification
map/src/editors/editorActions.js
map/src/editors/editorActions.js
import Alert from 'react-s-alert' import { SubmissionError } from 'redux-form' import { history, MY_ENTRIES, MAP } from '../AppRouter' import { requestAllPlaces } from '../map/mapActions' import { client } from '../App' export const INIT_CREATE_PLACE = 'INIT_CREATE_PLACE' export const INIT_EDIT_PLACE_SUCCESS = 'INIT_...
JavaScript
0
@@ -1453,29 +1453,46 @@ ceSuccess = -place +(%7Bproperties: %7Bname%7D%7D) =%3E dispatch @@ -1546,14 +1546,8 @@ g%3E$%7B -place. name
7257d38d4e36697d816b56e56731624b1ef9e7ce
add REPL reducer and update initial state
src/redux/reducer.js
src/redux/reducer.js
import * as actType from './action-types'; import * as constants from './constants'; import { combineReducers } from 'redux'; const initialState = { loadApi: { stage: null, runtime: null, error: null, }, runCode: { stage: null, ast: null, bytecode: null, result: null, error: null,...
JavaScript
0
@@ -488,10 +488,521 @@ %7D,%0A + REPL: %7B%0A code: '',%0A history: %5B%5D,%0A %7D,%0A%7D;%0A%0Afunction REPL(state = initialState.REPL, action) %7B%0A switch (action.type) %7B%0A case actType.CHANGE_REPL_CODE:%0A return Object.assign(%7B%7D, state, %7Bcode: action.payload%7D);%0A case actType.REC...
9e867f60c5195d2e3e3f5e151062e32f488daf4e
Build link to Channel
client/src/containers/ChannelCard.js
client/src/containers/ChannelCard.js
import React, {Component} from 'react' import Card from '../components/Card' import {connect} from 'react-redux'; import {bindActionCreators} from 'redux' import * as channelsActions from '../actions/channelsActions' class ChannelCard extends Component { constructor(props) { super(); this.state = { a...
JavaScript
0
@@ -33,16 +33,54 @@ 'react'%0A +import %7BLink%7D from 'react-router-dom'%0A import C @@ -983,16 +983,123 @@ %7D)%0A%0A + const title = (%0A %3CLink to=%7B%60/newsfeed/$%7Bthis.props.channel.source_id%7D%60%7D%3E%7Bthis.name%7D%3C/Link%3E%0A )%0A%0A %0A ret @@ -1124,23 +1124,19 @@ title=%7Bt -his...
23d2f4090b3c4ade5b7866a2b56e84e3f637a75d
Update app.js
frontend/app/scripts/app.js
frontend/app/scripts/app.js
'use strict'; /** * @ngdoc overview * @name frontendApp * @description * # frontendApp * * Main module of the application. */ angular .module('frontendApp', [ 'oitozero.ngSweetAlert', 'angular.filter', 'colorpicker.module', 'picardy.fontawesome', 'mm.foundation', 'angulartics', '...
JavaScript
0.000002
@@ -670,13 +670,8 @@ /aff -inity '%0A
2f61222bc46c1f6cdb1d5b094701308ec19c6481
add removeNonScalars
index.js
index.js
var pad = require('pad'); exports.padTime = function padTime (time) { return pad(16, time, '0'); }; exports.cb = function cb () { var args = Array.prototype.slice.call(arguments); var fn = args.shift(); if (typeof fn !== 'function') { return; } fn.apply(null, args); }; // season-independent episode number // > ...
JavaScript
0.000001
@@ -409,12 +409,244 @@ episode;%0A%7D;%0A +%0Aexports.removeNonScalars = function (obj) %7B%0A function replacer (key, value) %7B%0A if (key && typeof value === 'object') %7B return undefined; %7D%0A return value;%0A %7D%0A%0A return JSON.parse(JSON.stringify(obj, replacer));%0A%7D;%0A
b2452bc81158a0e8afa65a1cb975ea92821cf557
Fix gamepad graphic url
dawn/js/components/GamepadItem.js
dawn/js/components/GamepadItem.js
import React from 'react'; import { Panel, Modal, Button, ListGroupItem, Table, Grid, Row, Col } from 'react-bootstrap'; import _ from 'lodash'; import numeral from 'numeral'; export default React.createClass({ displayName: 'GamepadItem', propTypes: { gamepad: React.PropTypes.object, index:...
JavaScript
0.000008
@@ -1522,17 +1522,16 @@ g src=%7B' -/ graphics
876c0a97f6561e2c4f6d50cec6b85daf2d79808f
Establish database
client/templates/food_scores_maps.js
client/templates/food_scores_maps.js
Template.foodScoresMaps.onRendered(function () { GoogleMaps.load(); }); Template.foodScoresMaps.helpers({ foodScoresMapOptions: function () { var findClientLatitude = function() { return Geolocation.currentLocation().coords.latitude }; var findClientLongitude = function() { return Geolocati...
JavaScript
0.000168
@@ -42,16 +42,52 @@ on () %7B%0A + Meteor.call('getFoodScoresData');%0A Google
70eb3560ab7d6f2096efbca31711c3fd1d976611
Rename artwork module fields.
schema/home/index.js
schema/home/index.js
import HomePageModules from './home_page_modules'; import HomePageModule from './home_page_module'; import HomePageArtistModule from './home_page_artist_module'; import HomePageArtistModules from './home_page_artist_modules'; import { GraphQLObjectType, } from 'graphql'; const HomePageType = new GraphQLObjectType({...
JavaScript
0
@@ -350,23 +350,30 @@ : %7B%0A +artwork_ module -s : HomePa @@ -384,21 +384,29 @@ dule -s ,%0A +artwork_ module +s : Ho @@ -409,32 +409,33 @@ : HomePageModule +s ,%0A artist_mod
7ecde597acc32e89058031b90ad1d96bb1fd3263
Make LAST UPDATED field in projects table sortable
awx/ui/client/src/projects/projects.list.js
awx/ui/client/src/projects/projects.list.js
/************************************************* * Copyright (c) 2015 Ansible, Inc. * * All Rights Reserved *************************************************/ export default ['i18n', function(i18n) { return { name: 'projects', iterator: 'project', basePath: 'projects', select...
JavaScript
0
@@ -2357,37 +2357,8 @@ ue,%0A - nosort: true%0A
adb79e9fca0c9be1eb4b3250b51c1fab9abc3e24
add missing 'new' (caught by different node version)
bin/console_server.js
bin/console_server.js
/* * Copyright 2016 Red Hat Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
JavaScript
0
@@ -1212,16 +1212,20 @@ server = + new WebSock
6ed4f8fa279b4da25d831701a189e8a4d59d521c
disable carousel logic when itis not main page
frontend/web/js/carousel.js
frontend/web/js/carousel.js
/** * Created by ruslan on 8/6/15. */ var carousel = { additionalImages:[], countItems:0, beforeLoad :function(){ this._detectAdditionalImages(); this._countItems(); this._initDefaultImages(); }, catchChangeImage :function(){ $('.carousel').on('slide.bs.carousel',...
JavaScript
0
@@ -115,32 +115,71 @@ ad :function()%7B%0A + if($('.carousel').length)%7B%0A this._de @@ -198,24 +198,28 @@ alImages();%0A + this @@ -238,24 +238,28 @@ ();%0A + this._initDe @@ -269,24 +269,34 @@ ltImages();%0A + %7D%0A %7D,%0A c
c94179ab5b98b55aeb97587c6faa88f3875e3145
Remove console logs
public/js/index.js
public/js/index.js
// redirect people to rocket.chat/docs if they try and browse the github pages version if(location.hostname == "rocketchat.github.io" && location.href.indexOf('?noredirect') == -1) { location="https://rocket.chat" + location.pathname } function scroll_toc(path) { // remove base either '/docs/' or '/' var base =...
JavaScript
0.000002
@@ -811,31 +811,8 @@ h) %7B -%0A console.log('ding'); %0A%0A @@ -1300,29 +1300,8 @@ '/'; -%0A console.log(path); %0A%0A
8bb821077ab5a185973deda6fbce1cdea7a75f8d
resolve terry comment
index.js
index.js
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
JavaScript
0
@@ -4517,48 +4517,8 @@ %3E %7B%0A - // console.log('Starting handler')%0A%0A
935b23d4d148d798efb2810111936bba0c4a7292
Remove loadApp();
public/js/index.js
public/js/index.js
var app = { initialize: function() { this.bind(); this.run(); }, bind: function() { document.getElementById("address").addEventListener("submit", function () { var address = document.getElementById("address"); netherworld.goto(address.value); }); }...
JavaScript
0.000001
@@ -2024,344 +2024,8 @@ %7D,%0A - loadApp: function() %7B%0A if (!this.hasDependencies()) %7B%0A return false;%0A %7D%0A%0A if (window.location.search) %7B%0A var uri = decodeURI(window.location.search.split(%22=%22)%5B1%5D);%0A this.goto(uri);%0A %7D%0A...
c841b6b6f89f251709710e1219a059ba83ce8fbd
Simplify returned promise
lib/Email.js
lib/Email.js
'use strict' const fs = require('fs') const juice = require('juice') const Inky = require('inky').Inky const cheerio = require('cheerio') const nunjucks = require('nunjucks') const htmlMinify = require('html-minifier').minify const sass = require('node-sass') const htmlToText = require('html-to-text') class Email { ...
JavaScript
0.000002
@@ -718,79 +718,8 @@ urn -new Promise((resolve, reject) =%3E %7B%0A // get the raw template%0A this @@ -1496,22 +1496,21 @@ re -solve( +turn %7B html: @@ -1533,17 +1533,16 @@ Output %7D -) %0A @@ -1549,38 +1549,8 @@ %7D)%0A - .catch(reject)%0A %7D)%0A %7D%0A
3ed96fb58ea8fb8e7b4274d7970500ffbdc4f542
store the trackable urls
lib/api.js
lib/api.js
/* * benc2json * https://github.com/pwmckenna/benc2json * * Copyright (c) 2013 Patrick Williams * Licensed under the MIT license. */ var Firebase = require('./firebase-node'); var http = require('http'); var URL = require('url'); var q = require('q'); var request = require('request'); var URL = require('url'); ...
JavaScript
0.000046
@@ -1168,17 +1168,10 @@ cker -.name() ;%0A + %7D%0A%0Av @@ -1848,36 +1848,39 @@ 0);%0A var -name +tracker = addFirebaseTr @@ -1938,39 +1938,35 @@ s);%0A var -tracker +url = 'http://track @@ -1975,36 +1975,46 @@ .todium.com/' + +tracker. name +() + '/announce'%0A @@ -2011,16 +2011,17 @@ n...
d46e876e273f7b11ca092d519ec5d0e82839638d
update modify request body eg
examples/middleware/bodyDecoder-middleware.js
examples/middleware/bodyDecoder-middleware.js
/* bodyDecoder-middleware.js: Basic example of `connect.bodyParser()` middleware in node-http-proxy Copyright (c) Nodejitsu 2013 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without ...
JavaScript
0
@@ -1691,45 +1691,8 @@ ) %7B%0A - rawBody = new Buffer(req.body)%0A
09800e0198bcc5b08fc75758e398c58323da6c56
Update blacklist_MOD.js (#427)
actions/blacklist_MOD.js
actions/blacklist_MOD.js
module.exports = { name: 'Blacklist Users', section: 'Other Stuff', subtitle (data) { const info = ['', 'Blacklist User', 'Un-Blacklist User'] const vars = ['', 'Temp Variable', 'Server Variable', 'Global Variable'] return `${vars[parseInt(data.storage)]}: ${data.varName} | ${info[parseInt(data.type)...
JavaScript
0
@@ -2706,21 +2706,21 @@ des(msg. -membe +autho r.id)) %7B
16496b80646dae80b7ef1339b57e40fdc329953a
switch to ssh
bin/projects-clone.js
bin/projects-clone.js
#!/usr/bin/env node exports.command = { description: '`git clone` a project', arguments: '<project>' }; if (require.main !== module) { return; } var async = require('async'); var chalk = require('chalk'); var fs = require('fs'); var path = require('path'); var spawn = require('child_process').spawn; var confi...
JavaScript
0.000005
@@ -255,24 +255,60 @@ re('path');%0A +var program = require('commander');%0A var spawn = @@ -339,16 +339,16 @@ .spawn;%0A - %0Avar con @@ -519,72 +519,8 @@ );%0A%0A -var program = utilities.programDefaults('clone', '%3Cproject%3E');%0A%0A prog @@ -647,24 +647,77 @@ ne into');%0A%0A +program._name = 'clone';%0Ap...
00642cb34569c9ca324b11637b83ea53f5c34216
Create node in binary search tree program
binary-search-tree.js
binary-search-tree.js
// Program that creates a binary search tree: each node has up to two children, and all left descendants of a node is less than or equal to the node and all right descendants are greater than the node
JavaScript
0.000001
@@ -194,8 +194,105 @@ he node%0A +%0A// create node%0Afunction Node(val) %7B%0A%09this.value = val;%0A%09this.left = null;%0A%09this.right = null;%0A%7D%0A
08088786aa624b03d23a04a6796f37a56110f68c
allow external access to webpack dev server
webpack.config.babel.js
webpack.config.babel.js
import process from 'process'; import path from 'path'; import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import CopyPlugin from 'copy-webpack-plugin'; const stats = { modules: false, children: false, colors: true, excludeAssets : [/media\/.*/], }; module.exports = { entry: { app: './app/app.e...
JavaScript
0
@@ -422,24 +422,45 @@ ress: true,%0A + host: '0.0.0.0',%0A port: 30
8e16259eba55ea833b1fbeb3cb38948ef6add638
Remove gratuitous parens
webpack.config.babel.js
webpack.config.babel.js
import {resolve} from 'path'; import { DefinePlugin, HotModuleReplacementPlugin, NamedModulesPlugin, NoEmitOnErrorsPlugin, } from 'webpack'; import HTMLPlugin from 'html-webpack-plugin'; import CopyPlugin from 'copy-webpack-plugin'; import CleanPlugin from 'clean-webpack-plugin'; import BabiliPlugin from 'babil...
JavaScript
0.000001
@@ -2110,33 +2110,32 @@ %7D),%0A ... -( dev ? %5B%0A @@ -2448,17 +2448,16 @@ %0A %5D -) ,%0A %5D,
c8e340a623d3b7170184bb7fe879e05f8c1dd1ac
Rename variables now that trackpads are not special any more
src/ol/interaction/MouseWheelZoom.js
src/ol/interaction/MouseWheelZoom.js
/** * @module ol/interaction/MouseWheelZoom */ import {always, focus} from '../events/condition.js'; import EventType from '../events/EventType.js'; import {DEVICE_PIXEL_RATIO, FIREFOX} from '../has.js'; import Interaction from './Interaction.js'; /** * @typedef {Object} Options * @property {import("../events/con...
JavaScript
0
@@ -2452,89 +2452,9 @@ * -@private%0A * @type %7B?%7D%0A */%0A this.timeoutId_;%0A%0A /**%0A * Trackpad e +E vent @@ -2563,33 +2563,25 @@ */%0A this. -trackpadE +e ventGap_ = 4 @@ -2624,32 +2624,24 @@ /%0A this.t -rackpadT imeoutId_;%0A%0A @@ -2748,33 +2748,25 @@ */%0A this. -trackp...
ca5db2ac8e4d3740d380b4918d3fec4f7eece078
Fix logWrite
index.js
index.js
var util = require("util"); function cim(prefix, parent, patch) { var ob; patch = Array.prototype.slice.call(arguments, -1)[0]; if (typeof patch !== "boolean") { patch = false; } if (typeof prefix === "object" && prefix !== null) { parent = prefix; prefix = undefined; } // Patch given ob...
JavaScript
0.000002
@@ -1022,16 +1022,19 @@ r.write( +msg + %22%5Cn%22)
8da523d65f2a628710f109d403aa378d20d65c81
Use ES6 Map in ToggleBranch
extension/content/firebug/dom/toggleBranch.js
extension/content/firebug/dom/toggleBranch.js
/* See license.txt for terms of usage */ define([ "firebug/lib/trace", ], function(FBTrace) { // ********************************************************************************************* // // Constants var metaNames = [ "prototype", "constructor", "__proto__", "toString", "toSource", ...
JavaScript
0
@@ -33,16 +33,36 @@ usage */ +%0A/*global define:1*/ %0A%0Adefine @@ -231,427 +231,8 @@ ts%0A%0A -var metaNames =%0A%5B%0A %22prototype%22,%0A %22constructor%22,%0A %22__proto__%22,%0A %22toString%22,%0A %22toSource%22,%0A %22hasOwnProperty%22,%0A %22getPrototypeOf%22,%0A %22__defineGetter__%...
28bb18078e356c99a08969a1d31e6af74e690639
Tweak Queue internals
lib/Queue.js
lib/Queue.js
module.exports = Queue; function Queue(capacity) { this.head = this.tail = this.length = 0; this.buffer = new Array(capacity || 256); } Queue.prototype.push = function(x) { if(this.length === this.buffer.length) { this.ensureCapacity(this.length * 2); } this.buffer[this.tail] = x; this.tail = (this.tail + 1)...
JavaScript
0
@@ -687,19 +687,8 @@ ad;%0A -%09var tail;%0A %09var @@ -719,32 +719,8 @@ var -c = buffer.length;%0A%09var newB @@ -750,23 +750,179 @@ ity) +;%0A%0A%09var i = 0;%0A%09if(head === 0) %7B%0A%09%09len = this.length;%0A%09%09for(; i%3Clen; ++i) %7B%0A%09%09%09newBuffer%5Bi%5D = buffer%5Bi%5D;%0A%09%09%7D%0A%09%7D els...
3eff7ebdddbaf030dfbb051a38e9fa5bf46fed57
add clone, one can create empty Stacks
lib/Stack.js
lib/Stack.js
'use strict'; var util = require('./util'); exports = module.exports = Stack; /** Missing docs */ function Stack(sites, props){ if(!(this instanceof Stack)){ return new Stack(sites, props); } util.merge(this, util.clone(props, true)); this.tree = function(){ return util.reduce(sites, function(tr...
JavaScript
0.000001
@@ -206,48 +206,56 @@ %0A%0A -util.merge(this, util.clone(props, true) +props = props %7C%7C sites;%0A util.merge(this, props );%0A%0A @@ -339,16 +339,60 @@ index)%7B%0A + if(!site %7C%7C !site.fn)%7B return tree; %7D%0A va @@ -401,24 +401,27 @@ node = site. +fn. stack instan @@ -439,16 +439,19 @@ ...
5bcf44c245453231adb0f75c99e22be6e91ef1b5
Add path object
index.js
index.js
'use strict'; var gutil = require('gulp-util'); var through = require('through2'); var Checker = require('jscs'); var loadConfigFile = require('jscs/lib/cli-config'); var assign = require('object-assign'); module.exports = function (options) { options = options || '.jscsrc'; if (typeof options === 'string') { opt...
JavaScript
0.000081
@@ -37,24 +37,52 @@ ulp-util');%0A +var path = require('path');%0A var through
6ec204059afece7e8bafdcbc17716ce467d7ab24
Make existing source read only(Fix #36)
dev/_/components/js/sourceView.js
dev/_/components/js/sourceView.js
//Create a view for the source AV.SourceView = Backbone.View.extend({ el: '#view_container', initialize: function(){}, render: function(){ //compile the template using underscore var template = _.template( $("#view_template").html(), { source: this.model }); //Load the compiled HTML in...
JavaScript
0
@@ -363,16 +363,61 @@ late );%0A + console.log(this.model.get('name'));%0A @@ -641,16 +641,66 @@ Infinity +,%0A readOnly: this.model.get('name') %0A @@ -1415,8 +1415,16 @@ %09%7D%0A%7D);%0A%0A +%0A%0A%0A%0A%0A%0A%0A%0A
3c8367d37efa07a2bfb72a5511581bdf4db34925
make Utils methods public
lib/Utils.js
lib/Utils.js
'use strict'; var fs = require('fs'); /** * * @class Utils * @namespace node-mock-server * @constructor * * Swagger importer */ function Utils() { this.init(); } Utils.prototype = { constructor : Utils, /** * * @method init * called by constructor * @returns void * @public */ init: function ...
JavaScript
0
@@ -425,32 +425,29 @@ void%0A%09 * @p -rotected +ublic %0A%09 */%0A%09forIn @@ -687,32 +687,29 @@ void%0A%09 * @p -rotected +ublic %0A%09 */%0A%09for: @@ -940,32 +940,29 @@ tring%0A%09 * @p -rotected +ublic %0A%09 */%0A%09isFil @@ -1145,32 +1145,29 @@ Stats%0A%09 * @p -rotected +ublic %0A%09 */%0A%09getSt @@...
cc2dfb90a3341a285d7a2d902cdba8b859aa7975
Fix typo
lib/admin.js
lib/admin.js
var async = require('async'), childProcess = require('child_process'), config = require('./config'); var log = '', error = ''; module.exports = function(app) { app.get('/ms_admin', function(req, res, next) { var branches, currentBranch; async.parallel([ function(callback) { ...
JavaScript
0.999999
@@ -3041,9 +3041,9 @@ lbac -K +k (err
43e2de5bf55c4fb63f4f0f1800409e4e696ec682
Fix strict statement in bus.js
lib/bus.js
lib/bus.js
"usr strict"; var util = require('util'); var events = require('events'); var Interface = require('./interface'); var Bus = module.exports = function(dbus, busName) { var self = this; self.dbus = dbus; self.name = busName; self.signalHandlers = {}; self.signalEnable = false; self.interfaces = {}; switch(busN...
JavaScript
0.000011
@@ -1,12 +1,12 @@ %22us -r +e strict%22
35116de9a487bb618be9479788cfa61a5c66b874
fix test
sp-file-list/sp-file-list.test.js
sp-file-list/sp-file-list.test.js
import ViewModel, {FileMap} from './ViewModel'; let vm, file; beforeEach (() => { vm = new ViewModel(); }); afterEach (() => { vm = null; }); test('file.isImage()', () => { const images = [ 'file.jpg', 'file.JPG', 'file.JPEG', 'file.Gif', 'file.PnG...
JavaScript
0.000002
@@ -109,16 +109,43 @@ del();%0D%0A + file = new FileMap();%0D%0A %7D);%0D%0Aaft @@ -177,16 +177,34 @@ null;%0D%0A + file = null;%0D%0A %7D);%0D%0A%0D%0At
e52efccc3ba1ae8d3f2525413484d3589b5abffb
Update index.js
index.js
index.js
'use strict'; /** * WordPress MVC gulp development file. * Enables predefined (standarized) tasks, such as minify or sass compilation. * * @link http://gulpjs.com/ * @author Alejandro Mostajo <info@10quality.com> * @copyright 10 Quality * @license MIT * @version 1.2.1 */ /** * Export module. * @since 1.0.0...
JavaScript
0
@@ -269,17 +269,17 @@ ion 1.2. -1 +3 %0A */%0A%0A/*
8fa4bb842de279acdb4267d57ba6a69347e150c2
Add path property.
lib/cl2.js
lib/cl2.js
var Cel = require('./cel'), cel_decode = require('./cel_decode'), cl2Config = require('./config/cl2_info'); function Cl2File(celFiles) { this.celFiles = celFiles; } var ARCHIVE_IMAGE_COUNT = 8; function getFrameWidth(path) { // TODO: return 96; } function getFrameHeight(path) { // TODO: ...
JavaScript
0
@@ -135,16 +135,22 @@ celFiles +, path ) %7B%0A @@ -175,16 +175,38 @@ lFiles;%0A + this.path = path;%0A %7D%0A%0Avar A @@ -1934,16 +1934,25 @@ celFiles +, cl2Path );%0A%7D%0A%0Amo
a678353cdb982fa91e61c15b926a88e0e954c6ec
support missing publicOnly option
index.js
index.js
/*! * gh-user-events | MIT (c) Shinnosuke Watanabe * https://github.com/shinnn/gh-user-events */ 'use strict'; const arrFilter = require('arr-filter'); const arrReduce = require('arr-reduce'); const fettuccine = require('fettuccine'); const filledArray = require('filled-array'); const ghifyRequestOptions = require('...
JavaScript
0.000002
@@ -2379,16 +2379,54 @@ %7D/events +$%7Boptions.publicOnly ? '/public' : ''%7D %60;%0A%0A op
7c340109a1668ebdcc2c6c257212d1f28f8deeab
Add vorpal.logTask() utility function for DRY uniform logging
index.js
index.js
var fs = require('fs'); var rtmpdump = require('rtmpdump'); var schedule = require('node-schedule'); var config = require('./config.json'); var vorpal = require('vorpal')(); var videoURL = config.videoURL; //TODO: Utility function for log formatting function streamError(err, callback) { vorpal.log(new Date().toLo...
JavaScript
0.000001
@@ -203,52 +203,8 @@ URL; -%0A//TODO: Utility function for log formatting %0A%0Afu @@ -257,122 +257,54 @@ .log -(new Date().toLocaleString() + ' %3E ' + 'Connection error.');%0A vorpal.log(new Date().toLocaleString() + ' %3E ' + +Task('Connection error.');%0A vorpal.logTask( '*** @@ -1177,47 +1177,13 @@ .lo...
0b923f1b342cbab15ec71c93c9e7f0818898731d
fix comment parsing
lib/agent.js
lib/agent.js
var Socket = require('net').Socket; var REQUEST_IDENTITIES = 11, IDENTITIES_ANSWER = 12, SIGN_REQUEST = 13, SIGN_RESPONSE = 14, FAILURE = 5; var OLD_SIGNATURE = 1; // for ssh-dss keys module.exports = function(sockPath, key, keyType, data, cb) { var sock = new Socket(), error, sig, keylen = 0...
JavaScript
0.000093
@@ -3592,34 +3592,8 @@ 0;%0A - comlen = 0;%0A @@ -3747,32 +3747,58 @@ %7D%0A + comlen = 0;%0A %7D%0A
434c31e039a3a4e3120ddb7ded01710859af3bed
make replace() method more generic (i.e. don't pass in or modify the file)
index.js
index.js
'use strict'; var concat = require('concat-stream'); var es = require('event-stream'); var PluginError = require('gulp-util').PluginError; module.exports = function(options) { //gutil.log(JSON.stringify(options); options = injectDefaultOptions(options); function tokenReplace(file) { var self = this; if...
JavaScript
0
@@ -458,19 +458,43 @@ -var text = +file.contents = new Buffer(replace( Stri @@ -501,16 +501,27 @@ ng(data) +, options)) ;%0A @@ -544,36 +544,12 @@ a', -replace(file, text, options) +file );%0A @@ -616,34 +616,43 @@ -self.emit('data', +file.contents = new Buffer( replace( file @@ -647,22 +64...
b6e5f3539bdef87b626022a1fc927641fb4807c7
handle undefined options hash
index.js
index.js
'use strict'; var URI = require('uri-js'); module.exports = { normalizeOptions: function (options, env) { var host = options.host || env.DOCKER_IP; var port = options.port || env.DOCKER_PORT; var fullHost = options.docker_host || env.DOCKER_HOST; var certsPath = options.certsPath || env.DOCKER_CERT_...
JavaScript
0.000009
@@ -99,24 +99,56 @@ ons, env) %7B%0A + if (!options) options = %7B%7D;%0A var host
1a42be2ea1d337fd56818364025141b1bbf9f719
Handle unix or windows line endings in the same code. I had unix files that need running via a windows script without converting first.
index.js
index.js
var parser = require('yaml-js') module.exports = function(string){ var body = string , attributes = {} , match = matcher(string, '= yaml =') || matcher(string, '---') if (match){ attributes = parser.load(match[2].replace(/^\s+|\s+$/g, '')) || {} body = string.replace(match[0], '') } return { ...
JavaScript
0
@@ -394,46 +394,9 @@ r)%7B%0A - if (process.platform === 'win32')%0A +%0A va @@ -523,231 +523,60 @@ r+'$ -%5C%5Cr%5C%5Cn)'%0A , regex = new RegExp(pattern, 'm')%0A , match = regex.exec(string)%0A%0A else%0A var seper +' + (process.pl at +f or +m = - seperator %7C%7C '---'%0A , pattern = '...
3ad35cb86eb876d353b40dda4fa1d2aa6e7e49d4
fix setting drag class
index.js
index.js
module.exports = dragDrop var flatten = require('flatten') var parallel = require('run-parallel') function dragDrop (elem, ondrop) { if (typeof elem === 'string') elem = window.document.querySelector(elem) var onDragOver = makeOnDragOver(elem) var onDragLeave = makeOnDragLeave(elem) var onDrop = makeOnDrop(e...
JavaScript
0
@@ -1062,32 +1062,66 @@ function (e) %7B%0A + if (e.target !== elem) return%0A e.stopPropag @@ -1331,32 +1331,66 @@ function (e) %7B%0A + if (e.target !== elem) return%0A e.stopPropag
98e410fbf7ac99172671f1c67e962bc5d24f1b1a
add command for generating pdfs
lib/cli.js
lib/cli.js
var chalk = require('chalk'), log = require('./log'), parseArgs = require('minimist'), pkg = require('../package.json'), version = pkg.version; var bannerText = [ '================================================================================', '== ===================== === =====...
JavaScript
0
@@ -1685,24 +1685,137 @@ late file',%0A + '-p --pdf Generates PDFs, by defined viewports, based on screenshots created via Siteshooter',%0A '-s --sc @@ -1856,16 +1856,24 @@ ots, by +defined viewport @@ -2336,24 +2336,38 @@ i: 'init',%0A + p: 'pdf',%0A s: 'scre
a9626e8226b8b4a65619ff47059159f4a9acb538
Fix typo.
addon/models/preprint.js
addon/models/preprint.js
import DS from 'ember-data'; import OsfModel from './osf-model'; /** * @module ember-preprints * @submodule models */ /** * Model for OSF APIv2 preprints. This model may be used with one of several API endpoints. It may be queried directly, * or accessed via relationship fields. * For field and usage informati...
JavaScript
0.001604
@@ -752,16 +752,17 @@ ateModif +i ed: DS.a
fff493559cd841c07152b3015c1780e70c8888ed
Add escape Date type
index.js
index.js
'use strict'; class SQLString { constructor(query, ...args) { this.query = query == null ? '' : query.toString(); this.args = args; } escape(obj, quote, name, format='$&') { let type = typeof obj; if (obj == null) { return 'NULL'; } if (type === 'number' || type === 'boolean') { ...
JavaScript
0.000031
@@ -586,32 +586,104 @@ turn res;%0A %7D%0A + if (obj instanceof Date) %7B%0A return this.escapeDate(obj);%0A %7D%0A if (Array.is @@ -1739,16 +1739,578 @@ );%0A %7D%0A%0A + escapeDate(d) %7B%0A let year = ('000' + d.getFullYear()).slice(-4);%0A let month = ('0' + (d.getMonth() + 1)).slice(-2...
271e5139523f94586b76be643b4d419870cf0f48
fix some things around how we export to env
index.js
index.js
'use strict'; var BaseXHR = require('./src/base-xhr'); var objectMirrors = require('./src/object-mirrors'); var XMLHttpRequestShim = require('./src/shim'); // Export all our stuff via module if we are one if (typeof module !== 'undefined') { module.exports = { BaseXHR: BaseXHR, XMLHttpRequest: XML...
JavaScript
0
@@ -155,264 +155,8 @@ );%0A%0A -// Export all our stuff via module if we are one%0Aif (typeof module !== 'undefined') %7B%0A module.exports = %7B%0A BaseXHR: BaseXHR,%0A XMLHttpRequest: XMLHttpRequestShim,%0A useGlobal: useGlobal,%0A objectMirrors: objectMirrors%0A %7D;%0A%7D%0A%0A f...
2d690eb86f8a5f4c9acd21658142116f1acc5205
Fix source mapping for es version
scripts/build-min.js
scripts/build-min.js
const uglifyEs = require('uglify-es'); const fs = require('fs').promises; const path = require('path'); const rollup = require('rollup'); const pkg = require('../package.json'); const args = process.argv.slice(2); const [srcPath, destFolder] = args; const srcName = path.basename(srcPath); const esUnminName = srcNam...
JavaScript
0.000001
@@ -1703,35 +1703,39 @@ = minify(%7B%0A %5B -src +esUnmin Name%5D: esModule. @@ -2013,27 +2013,31 @@ nify(%7B%0A %5B -src +esUnmin Name%5D: esUnm @@ -2522,35 +2522,40 @@ = minify(%7B%0A %5B -src +umdUnmin Name%5D: umdModule @@ -2839,19 +2839,24 @@ (%7B%0A %5B -src +umdUnmin Name%5D: u
62040f3c9bdbd138db106fb47bcb1392b93a91ce
index default response
index.js
index.js
var express, mongoose, nconf, bodyParser, app, auth; express = require('express'); mongoose = require('mongoose'); nconf = require('nconf'); bodyParser = require('body-parser'); nconf.argv(); nconf.env(); nconf.defaults(require('./config')); auth = require('./auth'); mongoose.connect(nconf.get('MONGOHQ_URL')); app ...
JavaScript
0.000001
@@ -477,18 +477,16 @@ next) %7B%0A - 'use s @@ -494,18 +494,16 @@ rict';%0A%0A - respon @@ -545,26 +545,24 @@ ion/json');%0A - response.h @@ -593,26 +593,24 @@ , 'UTF-8');%0A - response.h @@ -638,26 +638,24 @@ ge', 'en');%0A - response.h @@ -715,26 +715,24 @@ lidate');%0A - - respons...
8abfa2698d3dec7be96620c195f3e9419ab842e2
Add license
index.js
index.js
var VNode = require("virtual-dom/vtree/vnode") , VText = require("virtual-dom/vtree/vtext") exports.virtualize = createVNode function createVNode(domNode, key) { key = key || null // XXX: Leave out `key` for now... merely used for (re-)ordering if(domNode.nodeType == 1) return createFromElement(domNode, key) ...
JavaScript
0
@@ -1,12 +1,1160 @@ +/*!%0A* vdom-virtualize%0A* Copyright 2014 by Marcel Klehr %3Cmklehr@gmx.net%3E%0A*%0A* (MIT LICENSE)%0A* Permission is hereby granted, free of charge, to any person obtaining a copy%0A* of this software and associated documentation files (the %22Software%22), to deal%0A* in the Software without re...
2d59568329e26083b249e8c1d0e2eecbe5091dd7
Handle undefined JIRA ticket assignee
lib/cmd.js
lib/cmd.js
'use strict'; const url = require('url').parse(process.env.JIRA_URL); const user = process.env.JIRA_USER; const pass = process.env.JIRA_PASS; const Jira = require('jira').JiraApi; const jira = new Jira(url.protocol, url.hostname, url.port, user, pass, '2'); const parse = require('shell-quote').parse; const jsonist =...
JavaScript
0.000001
@@ -1205,24 +1205,25 @@ assignee = +( issue.fields @@ -1231,16 +1231,23 @@ assignee + %7C%7C %7B%7D) .display
5f7d75e8c22d3c3c6b4a5b9210ab90216e213433
add license header
index.js
index.js
'use strict'; var PositionDetector = require('./lib/position-detector'); var SourceAdjuster = require('./lib/source-adjuster'); function EspowerLocationDetector (options) { this.positionDetector = new PositionDetector(options.sourceMap); this.sourceAdjuster = new SourceAdjuster(options.sourceRoot, options.pat...
JavaScript
0.000001
@@ -1,8 +1,319 @@ +/**%0A * espower-location-detector:%0A * AST source location detection helper for power-assert%0A * %0A * https://github.com/twada/espower-location-detector%0A *%0A * Copyright (c) 2015 Takuto Wada%0A * Licensed under the MIT license.%0A * https://github.com/twada/espower-location-detector/blob/m...
bfdfa93e076f0121266b02313db72b0b80429ee0
Fix wrong name of variable
index.js
index.js
//Import dependencies var ejs = require('ejs'); var electron = require('electron'); var fs = require('fs'); var mime = require('mime'); var path = require('path'); var url = require('url'); var util = require('util'); var EventEmitter = require('events').EventEmitter; //Import app var app = electron.app; //Main func...
JavaScript
0
@@ -1122,35 +1122,49 @@ f.emit(%22error%22, -err +%22File not found!%22 );%0A //F
dd6e478d912da2fe6cba386ad52f90eb4dcc7d0d
fix whitespace (for checking travis CI)
scripts/findSpecs.js
scripts/findSpecs.js
var wrench = require('wrench') var _ = require('lodash') module.exports = function(prefix, base) { var testFolderContents = wrench.readdirSyncRecursive(base); var testFolderJSContents = _.map(testFolderContents, function(currItem) { var tsToJs = currItem.replace(".ts", ".js") var toLinuxSlas...
JavaScript
0.000037
@@ -52,17 +52,16 @@ ash')%0A%0A%0A -%0A module.e
397836570354391affaaee1dd222dd3e5caaa14f
Improve the compatibility with older versions of node
index.js
index.js
'use strict'; const buble = require('buble'); class BrunchBuble { constructor({ plugins: { buble } }) { this.config = buble || {}; } compile({ data }) { try { const { code } = buble.transform(data, this.config); return Promise.resolve(code); } catch (error) { return Promise.reject...
JavaScript
0.000001
@@ -79,52 +79,79 @@ tor( -%7B plugins: %7B buble %7D %7D) %7B%0A this.config = +config) %7B%0A this.config = config && config.plugins && config.plugins. bubl @@ -178,16 +178,12 @@ ile( -%7B data %7D +file ) %7B%0A @@ -208,16 +208,17 @@ nst -%7B code %7D +transform = b @@ -232,16 +232,21 @@ ansform( +fil...
a09a8ffcae7fccc632b9ffa98d0d1f30d8f3bd53
fix reopening main window on macOS
index.js
index.js
var defaultMenu = require('electron-default-menu') var WindowState = require('electron-window-state') var electron = require('electron') var Menu = electron.Menu var Path = require('path') var windows = {} var quitting = false console.log('STARTING electron') electron.app.on('ready', () => { startMenus() startBa...
JavaScript
0.000001
@@ -559,16 +559,177 @@ e%0A %7D)%0A%0A + electron.app.on('activate', function (e) %7B%0A // reopen the app when dock icon clicked on macOS%0A if (windows.main) %7B%0A windows.main.show()%0A %7D%0A %7D)%0A%0A // all
1321312679f1824748538595bdd461a7c168cbf1
delete brackets
index.js
index.js
'use strict'; class Stack { constructor() { const stack = []; } push(value) { (this.stack).push(value); } pop() { if (stack.length === 0) { console.error('The stack is empty'); } else return (this.stack).remove(0); } peek() { if ((this.stack).length === 0) { consol...
JavaScript
0.000006
@@ -88,17 +88,16 @@ ) %7B%0A -( this.sta @@ -98,17 +98,16 @@ is.stack -) .push(va @@ -214,33 +214,32 @@ else return -( this.stack).remo @@ -232,17 +232,16 @@ is.stack -) .remove( @@ -267,17 +267,16 @@ %0A if -( (this.st @@ -270,33 +270,32 @@ if (this.stack -) .length === 0) %7B @@ -352,33 +35...
7f08967b94c8bcaa391d6cb0010693137727c7e7
change const to let
index.js
index.js
var Service, Characteristic; const http_request = require('http').request; const https_request = require('https').request; const CELSIUS_UNITS = 'C', FAHRENHEIT_UNITS = 'F'; const DEF_MIN_TEMPERATURE = -100, DEF_MAX_TEMPERATURE = 130, DEF_UNITS = CELSIUS_UNITS, DEF_TIMEOUT = 5000, DEF_INT...
JavaScript
0
@@ -3154,20 +3154,18 @@ -cons +le t value_
8b66ffa69470d4546f5920863403a15bc545877c
fix siteselector
lib/gui.js
lib/gui.js
define([ "chroma-js", "map", "sidebar", "tabs", "container", "meshstats", "legend", "linklist", "nodelist", "simplenodelist", "infobox/main", "proportions", "forcegraph", "title", "about", "datadistributor", "filters/filtergui", "filters/hostname", "siteselector" ], function (chroma, Map, Sid...
JavaScript
0
@@ -2724,47 +2724,8 @@ st)%0A - fanoutUnfiltered.add(siteselector)%0A @@ -2794,24 +2794,52 @@ tatistics)%0A%0A + siteselector.setData()%0A%0A sidebar.
fd931871b5073de30d263b578a8ec380836b85f3
Fix mongo URI
index.js
index.js
const http = require('http') const port = 3000 const MongoClient = require('mongodb').MongoClient // Connection URL const mongoUrl = process.env.MONGO_URL || 'mongodb://localhost:27017/test'; http.createServer((req, res) => { // Use connect method to connect to the Server MongoClient.connect(mongoUrl, (err, db) ...
JavaScript
0.999961
@@ -168,17 +168,10 @@ b:// -localhost +db :270
259b2a42d5dfe88ae4510d4b1e461e0e2d61fde4
add fileType option to sox command on OSX
lib/mic.js
lib/mic.js
var spawn = require('child_process').spawn; var isMac = require('os').type() == 'Darwin' || require('os').type().indexOf('Windows') > -1; var IsSilence = require('./silenceTransform.js'); var PassThrough = require('stream').PassThrough; var mic = function mic(options) { options = options || {}; var that = {}; ...
JavaScript
0.999963
@@ -645,16 +645,62 @@ e %7C%7C 0;%0A + var fileType = options.fileType %7C%7C 'raw';%0A var @@ -1687,21 +1687,24 @@ , '-t', -'raw' +fileType , '-'%5D,
8a6f371fa452e6e0a80f9cf87054e1d29f7be871
Fix failed attempt to update components not listed in bower.json. Fix #9.
index.js
index.js
/** * Updates Bower components to the really latest versions. * * @author Artem Sapegin (http://sapegin.me) */ 'use strict'; var chalk = require('chalk'); var bower = require('bower'); var _ = require('lodash'); var async = require('async'); var readlineSync = require('readline-sync'); module.exports = function(...
JavaScript
0
@@ -1063,16 +1063,75 @@ a.name;%0A +%09%09%09%09%09var deps = data.dependencies%5Bname%5D;%0A%09%09%09%09%09if (deps) %7B%0A%09 %09%09%09%09%09ret @@ -1136,16 +1136,17 @@ eturn %7B%0A +%09 %09%09%09%09%09%09na @@ -1155,16 +1155,17 @@ : name,%0A +%09 %09%09%09%09%09%09no @@ -1204,37 +1204,19 @@ %09%09%09%09 +%09 ...
9adaf190c1a826d58ea1f4d455319fd21edd5f7c
Add remove() method
index.js
index.js
/** * @author Takahiro / https://github.com/takahirox */ if (typeof AFRAME === 'undefined') { throw new Error('Component attempted to register before' + 'AFRAME was available.'); } require('three/examples/js/effects/OutlineEffect'); AFRAME.registerComponent('outline', { schema: { thicknes...
JavaScript
0.000071
@@ -553,16 +553,79 @@ ;%0A %7D,%0A%0A + remove: function () %7B%0A this.disableOutlineEffect();%0A %7D,%0A%0A setupO @@ -683,24 +683,64 @@ null) %7B +%0A this.effect.enabled = true;%0A return; %7D%0A%0A @@ -723,32 +723,36 @@ e;%0A return; +%0A %7D%0A%0A var data @@ -1650,16 +...
c912b32caf5e5d01c51931e3546fa278ce1ac2bb
make findPkg sync
index.js
index.js
/*! * cwd <https://github.com/jonschlinkert/cwd> * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ var path = require('path'); var findPkg = require('find-pkg'); /** * Expose `cwd` */ module.exports = cwd; /** * Cache filepaths to prevent hitting the file system * for multip...
JavaScript
0.000004
@@ -992,18 +992,16 @@ dPkg -(%7Bcwd: +.sync( fp -%7D );%0A
66b288cd4aa7c114cadafd5f83587370365076f3
add request timeout, continue try the next url.
index.js
index.js
'use strict'; var Bloom = require('bloom-lite'); var showmemory = require('showmemory'); var jschardet = require('jschardet'); var iconv = require('iconv-lite'); var htmlparser = require('htmlparser2'); var http = require('http'); var url = require('url'); // showmemory(10000); var PORTAL = "http://www.jd.com"; var b...
JavaScript
0
@@ -1807,24 +1807,139 @@ %09%09%7D);%0A%09%7D);%0A%0A +%09req.setTimeout(10000, function()%7B%0A%09%09console.log(new Date(), 'request timeout, skip.');%0A%09%09crawl(urls.pop());%0A%09%7D);%0A%0A %09req.on('err
3fbd428824d28e90495b2fe7503f6364dc5e5b1d
update styles to fix spacing
index.js
index.js
import React, {PropTypes, Component} from 'react' import { View, Text, TextInput, StyleSheet, TouchableOpacity, Dimensions, TouchableWithoutFeedback } from 'react-native' import _ from 'lodash' class EmailInput extends Component { constructor(props) { super(props); let {height, width} = Dimensio...
JavaScript
0
@@ -3896,16 +3896,17 @@ putWidth +, %0A @@ -4843,38 +4843,8 @@ p',%0A - alignItems: 'flex-start',%0A @@ -4875,17 +4875,47 @@ Bottom: -8 +2,%0A alignItems: 'flex-start' %0A %7D,%0A @@ -4954,26 +4954,26 @@ height: -24 +36 ,%0A width: @@ -5031,26 +5031,26 @@ height: -24 +36 ,%0...
219a125b7df0efc650a4965e189e72af7884ce83
remove end of a line space.
lib/pia.js
lib/pia.js
var stun = require('vs-stun'); var url = require('url'); var opts = require('optimist') . usage([ 'Display public and private IP address. (use STUN server)', '', 'Usage:', ' $0', ' $0 -j -g -i -t', ' $0 --display-stun --specify-stun "stun.l....
JavaScript
0.000033
@@ -3497,18 +3497,16 @@ stun'%5D); - %0A serve
fbaf8ba335e8f78e8c462744db8496430a7bc88a
Add space after if
lib/pip.js
lib/pip.js
const fse = require('fs-extra'); const path = require('path'); const {spawnSync} = require('child_process'); const {quote} = require('shell-quote'); const {buildImage, getBindPath} = require('./docker'); /** * pip install the requirements to the .serverless/requirements directory */ function installRequirements() { ...
JavaScript
0.000032
@@ -2411,16 +2411,17 @@ ;%0A if + (this.op
099870d8dda7f863f5776f2727607f89d1516665
handle an array on streams
index.js
index.js
function isUndef(a) { return a == null } function isOkay(a) { return a != null } function cmp (a, b) { return a < b ? -1 : a > b ? 1 : 0 } var k = 0 function singly(fun) { var called = false, id = k++, c = 0 return function (value, cb) { if(called) throw new Error('called twice') var n = 0 cal...
JavaScript
0.000002
@@ -1009,16 +1009,28 @@ %0A%7D%0A%0A*/%0A%0A +var merge = module.e @@ -1072,16 +1072,269 @@ pare) %7B%0A + if(Array.isArray(left)) %7B%0A compare = right%0A if(left.length == 1)%0A return left%0A else if(left.length == 2)%0A return merge(left.shift(), left.shift(), compare)%0A else%0A re...
61ce8a65ce6af8ffa657797522f096b2bc1888a6
Add bind function.
index.js
index.js
'use strict'; var Materialize = module.exports = { inject: function() { window.jQuery = require('./node_modules/jquery/dist/jquery.min.js'); window.$ = window.jQuery; require('hammerjs'); require('./bin/materialize.js'); } }
JavaScript
0
@@ -8,16 +8,47 @@ rict';%0A%0A +require('fs');%0Arequire('vm');%0A%0A var Mate @@ -264,14 +264,211 @@ e.js');%0A + %7D,%0A bind: function(jQuery) %7B%0A var context = %7B'$': jQuery%7D;%0A var src = fs.readFileSync(__dirname + '/bin/materialize.js', 'utf8');%0A vm.runInNewContext(src, context);%0A retu...
e15fcacf656b0e5aef50c87d0672b835a891befa
Add `pkgin`
lib/pma.js
lib/pma.js
module.exports = function (manager, op, packages) { if (['install', 'remove'].indexOf(op) === -1) { throw new Error('Operation ' + op + ' not supported'); } if (manager === 'quill') { return ['quill', op === 'install' ? 'install' : 'uninstall'].concat(packages); } else if (manager === 'apt') { re...
JavaScript
0
@@ -819,11 +819,98 @@ s);%0A %7D%0A + else if (manager === 'pkgin') %7B%0A return %5B'pkgin', '-y', op%5D.concat(packages);%0A %7D%0A %7D;%0A
0a9277979ce7b729275059bb0a89c1244b921939
add options check for dummy app
index.js
index.js
var LESSCompiler = require('broccoli-less-single'); var path = require('path'); var merge = require('lodash-node/modern/objects/merge'); var mergeTrees = require('broccoli-merge-trees'); var checker = require('ember-cli-version-checker'); function LESSPlugin(optionsFn) { this.name = 'ember-cli-...
JavaScript
0.000001
@@ -1128,37 +1128,65 @@ var -options = (this.app && this. +app = this.app;%0A var options = (app && app.options && app.
7c3aba6bbbf1e2df1b23d2141dde9337b1648bcf
fix warning
index.js
index.js
; (function () { var vueScrollspy = {}; vueScrollspy.install = function (Vue) { Vue.scrollPos = 0 Vue.directive('scrollspy', { params: ["steps","time"], scrollSections: [], scroll: function(){ var pos = this.el.scrollTop ...
JavaScript
0.000004
@@ -91,37 +91,8 @@ %0D%0A%0D%0A - Vue.scrollPos = 0%0D%0A%0D%0A @@ -383,32 +383,33 @@ this.vm.$set(%22 +$ scrollPos%22,i ? i @@ -1686,16 +1686,17 @@ m.$set(%22 +$ scrollPo @@ -1779,24 +1779,70 @@ d(this))%0D%0A%0D%0A + Vue.prototype.$scrollPos = 0%0D%0A
69cc6763e2812e8ea766d5b85c77876e05f6523e
Make region optional for sc2 profile
lib/sc2.js
lib/sc2.js
/** * @file Exports the Starcraft 2 API methods. * @module lib/sc2 */ 'use strict'; /** * Starcraft 2 class constructor. * * @constructor * @param {Object} blizzard A Blizzard.js instance * @return {Function} SC2 constructor function */ const SC2 = function SC2 (blizzard) { this.blizzard = blizzard;...
JavaScript
0
@@ -1580,32 +1580,34 @@ %7D key + The profile requ @@ -1602,33 +1602,19 @@ profile -request arguments +key %0A * @par @@ -1632,32 +1632,34 @@ %7D args + The profile requ @@ -1702,24 +1702,26 @@ gs.id + + The profile @@ -1752,17 +1752,19 @@ rgs. -region +name + The ...
92b1e2d1272d541173a288ded98a46868a44692b
add about 2B
index.js
index.js
var request = require("request"); var cheerio = require("cheerio"); var express = require('express'); const app = express(); var linebot = require('linebot'); var server = require('http').Server(app); // 取得LINE貼圖資訊 function getStickerInfo(packageId, event) { console.log("getStickerInfo", packageId, even...
JavaScript
0.99911
@@ -204,16 +204,55 @@ pp);%0D%0A%0D%0A +var about2B = require('./about2B');%0D%0A%0D%0A // %E5%8F%96%E5%BE%97LIN @@ -2139,24 +2139,185 @@ g = %22%E9%80%A0%E7%89%A9%E4%B8%BB%22;%0D%0A + %7D else if (event.message.text.includes(%222B%22) %7C%7C event.message.text.includes(%222b%22)) %7B%0D%0A ...
9a05643c9f00531d17cb6a76cce92588ff70ce9f
remove stream param
index.js
index.js
const { stdin, stdout } = process; function Iterator(min, max) { let idx = 0; return { jump(i) { return idx = Math.max(min, Math.min(max, i)) }, next() { return this.jump(++idx) }, prev() { return this.jump(--idx) }, over() { return idx == max }, curr() { return idx } } } function Scanne...
JavaScript
0.000001
@@ -722,14 +722,8 @@ ter( -stream ) %7B%0A
e7cd805d3c4455b3bd729b53e338e01cffa072d9
Comment unused variables for now
js/energy-systems/model/FaucetAndWater.js
js/energy-systems/model/FaucetAndWater.js
// Copyright 2016, University of Colorado Boulder /** * Class that represents a faucet that can be turned on to provide mechanical * energy to other energy system elements. * * @author John Blanco * @author Andrew Adare */ define( function( require ) { 'use strict'; // Modules // Replace with correct path...
JavaScript
0
@@ -560,24 +560,27 @@ eArray' );%0A + // var Random @@ -603,24 +603,27 @@ Random' );%0A + // var Range = @@ -1401,16 +1401,19 @@ ffect.%0A + // var ACC
ad36eae660ac79f63fd3da014eeee7b5b33a9aa8
fix hashValue
index.js
index.js
var path = require('path'); var fs = require('fs'); var regex = /(\n?)([ \t]*)(<!--\s*replace:(\w+(?:-\w+)*)\s*-->)\n?([\s\S]*?)\n?(<!--\s*endreplace\s*-->)\n?/ig; function regexMatchAll(string, regexp) { var matches = []; string.replace(regexp, function () { var arr = Array.prototype.slice.call(arguments); ...
JavaScript
0.00042
@@ -1227,16 +1227,23 @@ geWith = + typeof self.ha @@ -1249,16 +1249,29 @@ ashValue + === 'string' ? self.
efa51056d5fcb4b739b7e941ee622845bc0177a3
Update sql.js
lib/sql.js
lib/sql.js
/* ======================================================================== * DBH-PG: utilities for creating SQL chunks. * ======================================================================== * Copyright 2014 Sapienlab, Rodrigo González and Contributors. * Licensed under MIT LICENSE (See LICENSE) * ===========...
JavaScript
0.000002
@@ -889,24 +889,68 @@ , offset) %7B%0A + if (!limit) %7B%0A return ' ';%0A %7D%0A if (type @@ -970,24 +970,53 @@ 'object') %7B%0A + limit = limit.limit;%0A offs @@ -1034,24 +1034,26 @@ offset;%0A +%7D%0A limit = @@ -1056,108 +1056,84 @@ t = -limit.limit;%0A %7D%0A ...
d7e55b4a541142c56d38f036b6b617c606507428
Add `-noreduce` flag if `reduce: false` (#4)
index.js
index.js
'use strict'; const execBuffer = require('exec-buffer'); const isPng = require('is-png'); const pngcrush = require('pngcrush-bin'); module.exports = opts => buf => { opts = Object.assign({}, opts); if (!Buffer.isBuffer(buf)) { return Promise.reject(new TypeError('Expected a buffer')); } if (!isPng(buf)) { re...
JavaScript
0.000004
@@ -442,16 +442,52 @@ ce');%0A%09%7D + else %7B%0A%09%09args.push('-noreduce');%0A%09%7D %0A%0A%09args.
af915cf72e6270dcd59cedf594745b7a56bf5956
check with linter
public/toServer.js
public/toServer.js
(function () { 'use strict'; function sendToServer(params) { const fetch = window.fetch; return fetch('https://morning-hamlet-29496.herokuapp.com/' + params.url, { method: params.method, body: JSON.stringify(params.body), mode: 'cors', headers: { 'Content-type': 'application/json; charset=UTF-8...
JavaScript
0
@@ -478,12 +478,9 @@ ) %7B%0A -%09%09%09 %0A + %09%09%09c @@ -503,21 +503,8 @@ r);%0A -%09%09%09debugger;%0A %09%09%09p @@ -612,16 +612,17 @@ );%0A%09%09%09if + (params. @@ -645,18 +645,20 @@ ) %7B%0A%09%09%09%09 -le +cons t newPar @@ -827,16 +827,15 @@ %09%09%09%7D -%0A%09%09%09 + else + %7B %0A%09%09%09...
1a22d0d65cb39dcbe413e867c9dc369221998e81
fix regular expresion and added debug method
lib/tuc.js
lib/tuc.js
'use strict'; var request = require('request'); var S = require('string'); var captcha = 'captcha'; /** * Create class */ var Tuc = function() { this.number = ''; }; /** * Base url */ Tuc.prototype.url = 'https://mpeso.net/datos/consulta.php'; /** * Create a object error */ Tuc.prototype.error = function(m...
JavaScript
0
@@ -163,16 +163,209 @@ r = '';%0A + this.debug = false;%0A%7D;%0A%0A/**%0A * Enable or disable show debug%0A * @debug %7Bboolean%7D%0A */%0ATuc.prototype.setDebug = function(debug) %7B%0A if (typeof debug === 'boolean') %7B%0A this.debug = debug;%0A %7D%0A %7D;%0A%0A/**%0A @@ -1383,24 +1383,83 @@ se, body) %7B...
c0c15fa9d0332a304d355632cbcbfa1908ea82db
Handle overflow and divide by zero errors better.
index.js
index.js
let addEventsToButtons = () => { addDigitsListener(); addOperationsListener(); } // TODO make AC functional, don't disable AC here, instruct user to press AC in validateNumber() let disableButtons = () => { let buttons = document.getElementsByTagName('button'); for (let button of buttons) { button.disabled...
JavaScript
0
@@ -325,24 +325,62 @@ rue;%0A %7D%0A%7D%0A%0A +let errors = %5B'Error', 'Undefined'%5D;%0A%0A let validate @@ -402,16 +402,16 @@ r) =%3E %7B%0A - if (nu @@ -477,23 +477,25 @@ return -'E +e rror -' +s%5B0%5D ;%0A %7D el @@ -557,27 +557,25 @@ return -'Undefined' +errors%5B1%5D ;%0A %7D%0A @@ -1147,16 ...
8bc715e003fd8527a0b5e8e51e9248e5b4e47acb
rename MyLabeledButton to LabeledButton Fix LabeledButton to access name compatibility with recent Template & Control changes
pubnub/src/main.js
pubnub/src/main.js
//@program /* Copyright 2011-2014 Marvell Semiconductor, Inc. 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 applica...
JavaScript
0
@@ -787,17 +787,21 @@ k.html.%0A + %0A - A la @@ -1300,18 +1300,16 @@ %22;%0A%0Avar -My LabeledB @@ -1896,20 +1896,17 @@ %7Bname: -this +$ .name, w @@ -3166,34 +3166,32 @@ ication.add(new -My LabeledButton(%7B @@ -3251,34 +3251,32 @@ ication.add(new -My LabeledButton(%7B @@ -3337,34 +3337,32 @...
aa629879595f9acfd98cadfda9237267cf29219d
fix <React.Fragment> in changelog
src/parser/druid/feral/CHANGELOG.js
src/parser/druid/feral/CHANGELOG.js
import React from 'react'; import { Anatta336 } from 'CONTRIBUTORS'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; export default [ { date: new Date('2018-10-10'), changes: <React.Fragment>Added tracking to Feral for the <SpellLink id={SPELLS.WILD_FLESHRENDING.id} /> Azerite ...
JavaScript
0
@@ -207,38 +207,24 @@ changes: %3C -React.Fragment %3EAdded track @@ -307,30 +307,16 @@ trait.%3C/ -React.Fragment %3E,%0A c
e61430e396794c0814ee9354bb9d795d3e86c2ff
remove nick from tracking and track full message
index.js
index.js
'use strict'; require('dotenv').config({silent: true}); const irc = require('irc'); const moment = require('moment'); const crypto = require('crypto'); const euro2016commands = require('./commands/euro2016'); const alert = require('./util/alert'); const ircUtil = require('./util/irc'); const track = require('./util/...
JavaScript
0
@@ -2627,16 +2627,93 @@ %0A %7D%0A%0A + const userHash = crypto.createHash('sha256').update(from).digest('hex');%0A if ( @@ -2796,62 +2796,16 @@ d', -crypto.createHash('sha256').update(from).digest('hex') +userHash , %7B @@ -2813,36 +2813,39 @@ ommand, server, -nick +message %7D);%0A %7D else @@...
69705109becfed7b3713e4f3da60f26ac286bed6
assume the record is json, not a string
index.js
index.js
var Dnsd = require("dnsd"); var Client = require("ssb-client"); var Pull = require("pull-stream"); var Paramap = require("pull-paramap"); var Config; try { Config = require("./config.js"); } catch (err) { console.error("\nCouldn't find './config.js'. Using defaults"); Config = { port: 53053...
JavaScript
0.999999
@@ -132,24 +132,16 @@ map%22);%0A%0A -%0A%0A%0A%0A%0A%0A%0A%0A var Conf @@ -288,181 +288,35 @@ g = -%7B%0A port: 53053,%0A host: '127.0.0.1',%0A ready: function () %7B%0A console.log('Server running at %25s:%25s', Config.host, Config.port);%0A %7D,%0A %7D +require(%22./conf...