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 |
|---|---|---|---|---|---|---|---|
558914654b01d820ed59466adb3c065b6d66e8f6 | test info | router.js | router.js | var express = require('express')
var router = express.Router()
var path = require('path')
var helper = require('./modules/helper')
// import controllers
var binding = require("./controllers/binding.js")
// getBaseInfo
router.use(express.query())
router.get('/info', function(req, res) {
helper.getBaseInfo(req.query.... | JavaScript | 0.000001 | @@ -440,16 +440,31 @@
penId =
+JSON.stringify(
baseInfo
@@ -472,15 +472,9 @@
uery
-.openid
+)
%0A
|
52c4c44b89325a7261a6736131d67e530192fe6f | change import to use Module Alias | src/helpers/store.js | src/helpers/store.js | import { createStore, applyMiddleware } from 'redux';
import { routerMiddleware } from 'react-router-redux';
import thunk from 'redux-thunk';
import { createLogger } from 'redux-logger';
import { composeWithDevTools } from 'redux-devtools-extension';
import rootReducer from 'Reducers/index';
import browserHistory from ... | JavaScript | 0.000001 | @@ -169,15 +169,14 @@
om '
-r
+R
edux
--l
+L
ogge
@@ -220,24 +220,22 @@
om '
-r
+R
edux
--d
+D
evtools
--e
+E
xten
|
393df3f16e42ca590e2665409380f46be805d78e | Update behaviors for facebook theater | umbra/behaviors.d/facebook.js | umbra/behaviors.d/facebook.js | //.*facebook.com.*
var isOnScreen = function(e) {
var eTop = e.getBoundingClientRect().top;
return eTop > window.scrollY && eTop < window.scrollY + window.innerHeight;
};
var THINGS_TO_CLICK_SELECTOR = 'a.UFIPagerLink > span, a.UFIPagerLink, a[href^="/browse/likes"], span.UFIReplySocialSentenceLinkTe... | JavaScript | 0 | @@ -315,16 +315,25 @@
LinkText
+, a.photo
';%0Avar a
@@ -648,16 +648,319 @@
+var closeTheaterButton = document.querySelector('a.closeTheater');%0A if (closeTheaterButton && closeTheaterButton.offsetWidth %3E 0) %7B %0A console.log(%22clicking close button %22 + closeTheaterButton);%0A ... |
2bd42d93aae6e3a665d96762cba6ff5ce8948854 | Use settings.port for server | server.js | server.js | var THUMBNAILS_DIR = "thumbnails/";
var BUFFER_DIR = "buffer/";
var fs = require('fs')
, async = require('async')
, express = require('express')
, spawn = require('child_process').spawn
, exec = require('child_process').exec
, humanize = require('humanize')
, utils = require('./lib/utils')
, mw = require... | JavaScript | 0.000001 | @@ -601,49 +601,21 @@
t =
-process.env.PORT %7C%7C process.env.NODE_PORT
+settings.port
%7C%7C
@@ -2504,17 +2504,16 @@
rting%22);
-
%0A %7D%0A%0A
@@ -2565,17 +2565,16 @@
hannel);
-
%0A var s
@@ -3402,33 +3402,32 @@
ation/2), done);
-
%0A %7D,%0A
@@ -3529,17 +3529,16 @@
, done);
-
%0A ... |
f4967312161118cc41fd3cf3c21404b7e32df5c4 | Use process.env.CI if available | lib/core/src/server/cli/dev.js | lib/core/src/server/cli/dev.js | import program from 'commander';
import chalk from 'chalk';
import detectFreePort from 'detect-port';
import inquirer from 'inquirer';
import { logger } from '@storybook/node-logger';
import { parseList, getEnvConfig } from './utils';
const getFreePort = port =>
detectFreePort(port).catch(error => {
logger.error... | JavaScript | 0 | @@ -2283,16 +2283,30 @@
G_DIR',%0A
+ ci: 'CI',%0A
%7D);%0A%0A
|
04a2143326dd3eb2a9ebecd45e87edd35230db6c | make base case insensitive | src/history/html5.js | src/history/html5.js | /* @flow */
import type Router from '../index'
import { History } from './base'
import { cleanPath } from '../util/path'
import { START } from '../util/route'
import { setupScroll, handleScroll } from '../util/scroll'
import { pushState, replaceState, supportsPushState } from '../util/push-state'
export class HTML5Hi... | JavaScript | 0 | @@ -2295,20 +2295,48 @@
ath.
-indexOf(base
+toLowerCase().indexOf(base.toLowerCase()
) ==
|
4628ca1f8bfc1bdf040dce883bfc301f0e548806 | add legacy-widget embedType | packages/core/tocco-util/src/env/env.js | packages/core/tocco-util/src/env/env.js | import consoleLogger from '../consoleLogger'
export const NULL_BUSINESS_UNIT = '__n-u-l-l__'
export const ALLOWED_EMBED_TYPES = ['admin', 'widget']
const env = {
backendUrl: undefined,
businessUnit: undefined,
embedType: 'admin'
}
export const getBackendUrl = () => env.backendUrl || __BACKEND_URL__
export co... | JavaScript | 0.000001 | @@ -141,16 +141,33 @@
'widget'
+, 'legacy-widget'
%5D%0A%0Aconst
|
defd8d4215d37084dd8c56ef307d90684ed3d62e | Remove duplicate code | src/rm.js | src/rm.js | var common = require('./common');
var fs = require('fs');
// Recursively removes 'dir'
// Adapted from https://github.com/ryanmcgrath/wrench-js
//
// Copyright (c) 2010 Ryan McGrath
// Copyright (c) 2012 Artur Adib
//
// Licensed under the MIT License
// http://www.opensource.org/licenses/mit-license.php
function rmdi... | JavaScript | 0.000045 | @@ -706,69 +706,73 @@
%7D
-%0A%0A else if(currFile.isSymbolicLink()) %7B // Unlink symlinks
+ else %7B // Assume it's a file - perhaps a try/catch belongs here?
%0A
@@ -988,287 +988,8 @@
%7D
-%0A%0A else // Assume it's a file - perhaps a try/catch belongs here?%0A if (force %7C%7C isWriteable(fil... |
31b4110fca45f0fe6c607b37088a13e3e05500ea | Move syntaxHighlight function to here. | nodes/tilib.js | nodes/tilib.js | /**
* General utility library for Node.JS
*
* Copyright (c) 2019 Julian Knight (Totally Information)
* https://it.knightnet.org.uk
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
... | JavaScript | 0 | @@ -3331,16 +3331,1412 @@
%5D;%0A %7D
+,%0A%0A /** Utility function to html pretty-print JSON */%0A syntaxHighlight: function(json) %7B%0A /*%0A pre .string %7B color: orange; %7D%0A .number %7B color: white; %7D%0A .boolean %7B color: rgb(20, 99, 163); %7D%0A ... |
e7c7edde0f4c5351cbd62e6b00c009f2e436c8e7 | Add html title to guide list | routes.js | routes.js | /* globals MarkdownFilePaths: false */
// MarkdownFilePaths are created in run.js and passed through webpack
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import Landing from './pages/home/index';
import Guide from './pages/guide/index';
import GuideList from './pages/guideList/index';
i... | JavaScript | 0 | @@ -949,16 +949,31 @@
guides/%22
+ title=%22Guides%22
compone
|
e97ee2a15241e39b12062f93d627f5b0e0c29f3c | remove console log from test | test/choropleth.test.js | test/choropleth.test.js | /* global describe, it, before */
var fs = require('fs')
require('should')
var jsdom = require('mocha-jsdom')
var geojson = JSON.parse(fs.readFileSync('./examples/basic/crimes_by_district.geojson'))
describe('basic usage', function () {
jsdom()
before(function () {
this.choropleth = require('../src/choroplet... | JavaScript | 0.000001 | @@ -396,32 +396,35 @@
ents'%0A %7D)%0A
+ //
console.log(req
@@ -1402,16 +1402,19 @@
%7D)%0A
+ //
console
|
a94c35b5bd08d62f2d026f6fa718acdc091ed9e9 | add missing merge requirement | website/static/js/pages/project-dashboard-page.js | website/static/js/pages/project-dashboard-page.js | /** Initialization code for the project overview page. */
'use strict';
var $ = require('jquery');
require('../../vendor/bower_components/jquery.tagsinput/jquery.tagsinput.css');
require('jquery-tagsinput');
require('bootstrap-editable');
var m = require('mithril');
var Fangorn = require('js/fangorn');
var Raven = re... | JavaScript | 0.000001 | @@ -350,24 +350,61 @@
runcate');%0A%0A
+var $osf = require('js/osfHelpers');%0A
var LogFeed
|
da9ecaa4d7f4c5053e4b6f57cab131f73231bbab | Fix a test case | test/components/Unit.js | test/components/Unit.js | const { mount } = require('enzyme');
const jsdom = require('jsdom').jsdom;
const assert = require('power-assert');
const React = require('react');
const Unit = require('../../src/components/Unit');
const { UNIT_STATE_CHANGE_LOG_TYPES } = require('../../src/immutable/constants');
const { createNewUnitStateChangeLogStat... | JavaScript | 0.999999 | @@ -1913,32 +1913,36 @@
uid%60', function(
+done
) %7B%0A const
|
675d2bfb5488390344a500742f2de745f161e36d | Use res.json | server.js | server.js | require('dotenv').config();
const endpointId = process.env.ENDPOINT_ID;
const clientId = process.env.CLIENT_ID;
const clientSecret = process.env.CLIENT_SECRET;
const express = require('express');
const app = express();
const compression = require('compression');
const port = process.env.port || 8081;
const rp = requ... | JavaScript | 0.000001 | @@ -2506,67 +2506,12 @@
res.
-setHeader('Content-Type', 'application/json');%0A res.send
+json
(dir
|
f36fad425eee83b479bb0745b8308fa957ff4c5b | Use black skybox for default web translator | scripts/translators/blank.js | scripts/translators/blank.js | elation.require([], function() {
elation.component.add('janusweb.translators.blank', function() {
this.exec = function(args) {
return new Promise(function(resolve, reject) {
var roomdata = {
room: {
use_local_asset: 'room_plane',
pos: [0, 0, 0],
orientat... | JavaScript | 0 | @@ -377,16 +377,239 @@
(0,0,0))
+,%0A skybox_left_id: 'black',%0A skybox_right_id: 'black',%0A skybox_back_id: 'black',%0A skybox_front_id: 'black',%0A skybox_up_id: 'black',%0A skybox_down_id: 'black',
%0A
|
03d2450d55847463f5bc063965cec2e48ebce2bc | Move to new messages api | fetchMessages.js | fetchMessages.js | chrome.runtime.onMessage.addListener(function(req, sender, reply) {
if(req.getCookies) {
chrome.cookies.get({url: "https://scratch.mit.edu", name: "scratchsessionsid"}, sid => {
reply(sid.value);
});
return true;
} else if (req.setCookies) {
chrome.cookies.set({url: "https://scratch.mit.edu", name: "scratc... | JavaScript | 0 | @@ -774,16 +774,22 @@
mit.edu/
+proxy/
users/%22
@@ -802,16 +802,16 @@
+ %22/
-messages
+activity
/cou
@@ -1053,24 +1053,28 @@
%09%09%09%09if(data.
+msg_
count !== us
@@ -1173,24 +1173,28 @@
ount = data.
+msg_
count;%0A%09%09%09%09%09
@@ -1364,24 +1364,28 @@
le.log(data.
+msg_
count);%0A%09%09%09%09
@@ -1445... |
2f91df035acf35839a18345a5aca6b4a60a52afd | Update ng-bs-animated-button.js | ng-bs-animated-button.js | ng-bs-animated-button.js | angular.module('jeremy-peters.ng-bs-animated-button', []).
directive('jpNgBsAnimatedButton', function($timeout) {
return {
restrict: 'AE',
replace: true,
scope: {
progressIsSubmit: '=',
progressIsComplete: '=',
formIsInvalid: '=',
animationCompleteTime: '@',
... | JavaScript | 0 | @@ -1098,32 +1098,56 @@
ass('is-active')
+.attr('disabled', false)
;%0A icon
@@ -1211,46 +1211,8 @@
se;%0A
- el.attr('disabled', false);%0A
@@ -1351,26 +1351,8 @@
rue)
-;%0A el
.add
@@ -1795,8 +1795,9 @@
%7D;%0A %7D);
+%0A
|
156afb99e1ed9f47da10da3327c8c8ddd73d531e | Add beta version | ng2-compilers/package.js | ng2-compilers/package.js | Package.describe({
name: 'barbatus:ng2-compilers',
version: '0.1.2',
summary: 'Angular2 template, HTML, JSX, TypeScript Compilers for Meteor',
git: 'https://github.com/barbatus/ng2-compilers',
documentation: null
});
Package.registerBuildPlugin({
name: 'Compilers',
sources: [
'utils/file_mixin.js',
... | JavaScript | 0 | @@ -60,19 +60,26 @@
ion: '0.
-1.2
+2.0-beta.0
',%0A sum
@@ -532,16 +532,22 @@
:cheerio
+@0.3.2
',%0A '
|
c3503ae30a571d21ba8f497b1aa143a7061a787c | add span to mails | server.js | server.js | var express = require('express');
var bodyParser = require('body-parser');
var app = express();
var nodemailer = require('nodemailer');
var mg = require('nodemailer-mailgun-transport');
var sanitizeHtml = require('sanitize-html');
var EmailTemplate = require('email-templates').EmailTemplate
var path = require('path');
... | JavaScript | 0.00012 | @@ -679,16 +679,24 @@
v', 'br'
+, 'span'
%5D,%0A%09allo
|
f67a027de0188558c6566f17417d1d2768c12872 | Fix custom selector to fetch story point data | src/js/jira/application.js | src/js/jira/application.js | Namespace.create('xing.jira');
/**
* @constructor
* @module xing.jira
* @class Application
* @requires AJS
* @requires jQuery
* @requires xing.core.Observer
* @requires xing.core.ticketCache
* @requires xing.core.Presenter
* @requires xing.core.I18n
* @requires xing.jira.TableMapCell
* @type Object
* @para... | JavaScript | 0 | @@ -6905,11 +6905,11 @@
ld_1
-008
+247
0-va
|
47c6121ca98d0f44ecad69ebcb0cdc97a39bb784 | options.headers test | test/fetch-http.test.js | test/fetch-http.test.js | 'use strict';
var assert = require('assertive');
var Bluebird = require('bluebird');
var fetch = require('../').fetch;
var options = require('./mock-service');
describe('fetch: the basics', function () {
it('can load using just a url string', function () {
return fetch(options.baseUrl)
.then(function (re... | JavaScript | 0.999609 | @@ -3401,32 +3401,358 @@
%7D);%0A %7D);%0A%0A
+ it('allows passing headers', function () %7B%0A return fetch('/echo', %7B%0A baseUrl: options.baseUrl,%0A method: 'POST',%0A headers: %7B 'Content-Type': 'text/x-pizza' %7D,%0A body: '%F0%9F%8D%95%F0%9F%8D%95%F0%9F%8D%95',%0A %7D).json()%... |
7e71b98d0cca27516040a84bbd4011e5e05bc941 | Remove temporary console.log. | src/js/server/socket-io.js | src/js/server/socket-io.js | module.exports = function(server) {
var io = require('socket.io')(server);
var room = require('./model/room');
var rooms = [];
io.on('connection', function(socket) {
socket.on('new room', function(data) {
rooms.push(new room(socket, data.key));
console.log('New room: ... | JavaScript | 0 | @@ -1924,80 +1924,8 @@
ame;
-%0A%0A console.log(rooms%5Bsocket.roomIndex%5D.players%5BplayerIndex%5D);
%0A
|
c716f7d2b42c71c789cb0e3798912a474aa9443c | remove useless constructor | utils/Signal.js | utils/Signal.js | export default class Signal extends Set {
constructor() {
super();
}
dispatch(value) {
for (let callback of this) {
callback(value);
}
}
}
| JavaScript | 0.000051 | @@ -39,44 +39,8 @@
t %7B%0A
- constructor() %7B%0A super();%0A %7D%0A%0A
di
|
8f7d2f2c78a85daea7d2e21a89aed36dd15b39ca | Change server startup message | hacked.js | hacked.js | 'use strict';
// Import server modules
var express = require('express');
var bodyParser = require('body-parser');
var logger = require('morgan');
var path = require('path');
var debug = require('debug')('express');
var jwt = require('jwt-simple');
var session = require('express-session');
// Import database models
va... | JavaScript | 0 | @@ -3756,22 +3756,27 @@
-debug('Express
+console.log('Hacked
ser
|
85fed452fd139f451c48cd8ce4124ba10ed666f0 | Fix black bars showing on resize | firefox/index.js | firefox/index.js | const { PageMod } = require('sdk/page-mod');
const { open } = require('sdk/window/utils');
const { window: { screen } } = require('sdk/addon/window');
const resizeFactor = 1.1;
function getVideoHTML(videoId, time) {
time = Math.round(time);
return `<iframe id="ytplayer" type="text/html"\
src="https://www.yout... | JavaScript | 0 | @@ -2325,18 +2325,16 @@
ragging)
- %7B
%0A
@@ -2399,22 +2399,8 @@
Y);%0A
- %7D%0A
@@ -2490,32 +2490,76 @@
;%0A %7D;%0A%0A
+ let aspectRatio = $%7BaspectRatio%7D;%0A
let re
@@ -2588,16 +2588,17 @@
actor%7D;%0A
+%0A
@@ -2643,32 +2643,28 @@
-win... |
8adb02d934d31af666173b8c169882c5f01d9458 | Add MessageDialog constructor | utils/dialog.js | utils/dialog.js | /*
* dialog.js: functions for creating, modifying and deleting message dialog
*/
import { getScrollOffsets } from './utils';
const MSG_DIALOG = 'a11yMessageDialog';
/*
* setBoxGeometry: Set the width and position of message dialog based on
* the width of the browser window. Called by functions resizeMessage and... | JavaScript | 0 | @@ -1,171 +1,194 @@
-/*%0A* dialog.js: functions for creating, modifying and deleting message dialog%0A*/%0A%0Aimport %7B getScrollOffsets %7D from './utils';%0Aconst MSG_DIALOG = 'a11yMessageDialog';
+var getScrollOffsets = require('./utils').getScrollOffsets;%0A%0Amodule.exports.MessageDialog = MessageDialog;%0A%0A... |
1587fc516c443ca1a1d5f60e63944cb130987107 | Simplify stockItem persistence | src/js/stockListDemoApp.js | src/js/stockListDemoApp.js | /*
Copyright 2014 Weswit Srl
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 writing, s... | JavaScript | 0.00007 | @@ -2516,16 +2516,17 @@
%09%09 if (
+!
store.ha
@@ -2563,401 +2563,145 @@
%7B%0A%09%09
- var self = this;%0A%09%09%09store.find('stockItem', i).then(function(stockItem) %7B%0A%09%09%09 self.populate(info, stockItem);%0A%09%09%09%7D);%09%0A%09%09 %7D else %7B%0A%09%09 // Create an empty record, with only the... |
0b9e22cff13773898a9edeb126d4880f6ea212e7 | delete unused function call | js/components/GeoPickerComponent.js | js/components/GeoPickerComponent.js | angular.module('chronontology.components')
.controller('GeoPickerModalController', function($uibModalInstance) {
this.loadPlaces = function(bbox) {
$http.get("/spi/place?bbox=50.082665;8.161050;50.082665;8.371850;49.903887;8.161050;49.903887;8.371850&type=getty", {
headers: { 'Autho... | JavaScript | 0.000002 | @@ -846,19 +846,72 @@
item) %7B%0A
-%09%09%09
+ // TODO: set URI in textfield%0A //
_this.on
|
0e9461195eb873eb507087b0457f82ab1db2ea50 | use port 80 if defined as environment variable (see https://github.com/DevMountain/deployment-digitalocean) | server.js | server.js | var http = require("http");
var express = require("express");
var session = require("express-session");
var cookies = require("cookie-parser");
var bodyParser = require("body-parser");
var flash = require("connect-flash");
var controllers = require('./controllers');
var app = express();
// Opt into servic... | JavaScript | 0 | @@ -1372,14 +1372,42 @@
.listen(
+process.env.EXPRESS_PORT %7C%7C
3000);
|
d01a264e7d7b3e8f09d5de3f0d5dfb78b96b87f9 | Fix test | test/helloworld.spec.js | test/helloworld.spec.js | import React from 'react';
import { shallow } from 'enzyme';
import assert from 'power-assert';
import Hello from '../src/index';
describe('Hello', () => {
it('Should render as a <h1>', () => {
const wrapper = shallow(<Hello />);
assert.equal(wrapper.type(), 'h1');
});
it('Shoud have style with color re... | JavaScript | 0.000004 | @@ -96,21 +96,22 @@
%0Aimport
-Hello
+Slider
from '.
@@ -135,21 +135,26 @@
scribe('
-Hello
+%3CSlider /%3E
', () =%3E
@@ -174,158 +174,42 @@
ld r
-ender as a %3Ch1%3E', () =%3E %7B%0A cons
+oo
t w
+a
rapper
-= shallow(%3CHello /%3E);%0A assert.equal(wrapper.type(), 'h1');%0A %7D);%0A%0A it('Shoud have... |
f4e971e28bdb6ffa86c4493fb7bb45312eacfc7d | Remove alternativeValidator option. https://github.com/phetsims/scenery-phet/issues/283 | js/keypad/AbstractKeyAccumulator.js | js/keypad/AbstractKeyAccumulator.js | // Copyright 2016-2017, University of Colorado Boulder
/**
* base type for an object that accumulates key presses, works in conjunction with the common-code keypad
*
* @author John Blanco
* @author Aadish Gupta
*/
define( function( require ) {
'use strict';
// modules
var inherit = require( 'PHET_CORE/inhe... | JavaScript | 0.000008 | @@ -811,631 +811,204 @@
d in
-stead of the default validation function to validate the user input%0A // type spec: alternativeValidator(Array.%3CKeyID%3E) %7B return true/false %7D%0A alternativeValidator: null,%0A%0A // a function that, if non-null, is used in addition to the default validation functio... |
4d14551c68106f23f64e10a640236bf636bb2c87 | Set server socket timeout to 60 sec as in Selenium Hub | server.js | server.js | var q = require('q'),
http = require('q-io/http'),
enableDestroy = require('server-destroy'),
apps = require('./lib/http-apps'),
log = require('./lib/log');
Error.stackTraceLimit = Infinity;
// servlets
var notImplementedServlet = require('./lib/servlets/notImplemented'),
welcomeServlet = require(... | JavaScript | 0 | @@ -2015,16 +2015,108 @@
%7D;%0A%0A
+ // set socket timeout for 60 sec as in Selenium Hub%0A server.node.setTimeout(60000);%0A%0A
serv
|
91ba7311f555c7e7fc3a972d893654654893fc95 | Update index test case 1 | test/index/core.spec.js | test/index/core.spec.js | /**
* util/core.spec.js
*
* @author Rock Hu <rockia@mac.com>
* @license MIT
*/
import Endpoints from '../../src/config/endpoints.json';
import API from '../../src/config/api.json';
var Sinon = require('sinon');
var Chai = require('chai');
var Path = require('path');... | JavaScript | 0.000003 | @@ -478,16 +478,75 @@
ion() %7B%0A
+ it('should return APIDriver Object', function()%7B%0A
var op
@@ -555,16 +555,24 @@
ons = %7B%0A
+
api_
@@ -584,16 +584,24 @@
'1234',%0A
+
plat
@@ -620,16 +620,24 @@
ction',%0A
+
regi
@@ -649,13 +649,25 @@
NA'%0A
+
%7D;... |
faedd919b62d41af78f2809b6f93bc6c863a0f5f | Check permissionLevel against permission constants | server/auth/providers/ow4.js | server/auth/providers/ow4.js | const fetch = require('node-fetch');
const logger = require('../../logging');
const passport = require('passport');
const OAuth2Strategy = require('passport-oauth2');
const OW4AuthConfig = require('../conf.js').ids;
const OW4API = require('../conf.js').api;
const addUser = require('../../managers/user').addUser;
cons... | JavaScript | 0 | @@ -1478,37 +1478,33 @@
vel %3C permission
-Level
+s
.IS_SUPERUSER) %7B
@@ -1604,21 +1604,17 @@
rmission
-Level
+s
.IS_SUPE
|
313d19eb030e7ca2d14bf312afaa8c511530edbf | add header to disable response caching | server.js | server.js | var express = require("express");
var app = express();
var router = express.Router();
var port = 8080;
var color = "red";
router.use(function (req,res,next) {
next();
console.log("%s %s => %i", req.method, req.originalUrl, res.statusCode);
});
router.get("/",function(req,res){
res.sendFile(__dirname + '/views/... | JavaScript | 0 | @@ -514,16 +514,159 @@
close%22)%0A
+ .header('Cache-Control', 'private, no-cache, no-store, must-revalidate')%0A .header('Expires', '-1')%0A .header('Pragma', 'no-cache')%0A
.se
|
cbe490aee150d18361fb00f63c9dd04a18ec5c5a | add logic larissa plugin | src/larissa/environment.js | src/larissa/environment.js | import {Environment} from 'larissa';
import imagePlugin from 'larissa-plugin-nodes-image-js';
const env = new Environment();
env.loadPlugin(imagePlugin());
export default env;
| JavaScript | 0 | @@ -86,16 +86,70 @@
age-js';
+%0Aimport logicPlugin from 'larissa-plugin-nodes-logic';
%0A%0Aconst
@@ -203,16 +203,47 @@
ugin());
+%0Aenv.loadPlugin(logicPlugin());
%0A%0Aexport
|
75c3cdf9a5d318a0436798f06ffbb0cacc74bf49 | edit app.use in server.js | server.js | server.js | var express = require('express');
var app = express();
app.use(express.static(__dirname + '/../'));
app.listen(8080);
| JavaScript | 0.000002 | @@ -85,17 +85,8 @@
name
- + '/../'
));%0A
|
f230579506561dd2b6f256b4b634cb76588809e4 | remove deprecated get all handler | server/handlers/locations.js | server/handlers/locations.js |
var jwt = require('jsonwebtoken');
var mime = require('mime');
var local = require('../../config/local');
var errors = require('../errors');
var clustering = require('../services/clustering');
var attachments = require('../services/attachments');
exports.getOne = function (db, data, response) {
// Parameters
// ... | JavaScript | 0 | @@ -1752,801 +1752,8 @@
%7D;%0A%0A
-exports.get = function (db, data, response) %7B%0A // Parameters%0A // db%0A // Monk db instance%0A // data%0A // JWT token and query filters%0A // response%0A // Socket.io response%0A%0A throw new Error('deprecated');%0A%0A jwt.verify(data.token, local.se... |
83570e9c4e121c340ea320cada64d9b642380b92 | remove unused return jsdoc statement | lib/api-client/resources/group.js | lib/api-client/resources/group.js | 'use strict';
var AbstractClientResource = require('./../abstract-client-resource');
/**
* Group Resource
* @class
* @memberof CamSDK.client.resource
* @augments CamSDK.client.AbstractClientResource
*/
var Group = AbstractClientResource.extend();
/**
* Path used by the resource to perform HTTP queries
* @type... | JavaScript | 0.000015 | @@ -706,17 +706,16 @@
count%0A *
-
%0A * @par
@@ -1439,25 +1439,24 @@
gle group%0A *
-
%0A * @param
@@ -1531,28 +1531,8 @@
one%0A
- * @return %7B%5Btype%5D%7D%0A
*/%0A
@@ -1803,17 +1803,16 @@
ameters.
-
%0A * The
@@ -2414,17 +2414,16 @@
iterion.
-
%0A *
@@ -2492,17 +2492,16 @@
nd type.
-
%0A *... |
927d5c398939676fee0ee4d17522d028bf4ff0cd | upgrade web initialization | server.js | server.js | #!/bin/env node
var express = require('express');
var bodyParser = require('body-parser');
var errorHandler = require('errorhandler');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var cookieSession = require('cookie-session');
var basicAuth = require('basic-auth');
var fs = require('fs')... | JavaScript | 0.000001 | @@ -319,146 +319,8 @@
');%0A
-%0A//var un = 'node';//change this to something private for testing %0A//var pw = 'password';//change this to something private for testing %0A%0A
var
@@ -453,25 +453,24 @@
tializer');%0A
-%0A
var db = req
@@ -486,17 +486,16 @@
b/db');%0A
-%0A
var refr
@@ -512,17 +512,16 @@
false;... |
cca1a211454542e97f742a29b7c585a781ae1d6a | use obs | test/performance/npm.js | test/performance/npm.js | 'use strict'
const amount = 1e5
console.log('¯\\_(ツ)_/¯ lets make npm great again! --->', amount/ 1000 + 'k')
global.cnt = 0
// only store dynamic deps rest is bullshit anyways dont care, only to see if we can handle some load
const s = require('../../s')
const state = s({
child: {
properties: {
deps: tr... | JavaScript | 0.000034 | @@ -121,16 +121,58 @@
nt = 0%0A%0A
+const Obs = require('vigour-observable')%0A%0A
// only
@@ -269,37 +269,8 @@
oad%0A
-const s = require('../../s')%0A
cons
@@ -279,16 +279,22 @@
state =
+new Ob
s(%7B%0A ch
@@ -354,24 +354,25 @@
ndants: true
+,
%0A %7D,%0A
@@ -371,16 +371,21 @@
%7D,%0A
+versi
o... |
1e5925b7f09dc51c69bf0a005fbe90f1ff2bcbcf | Update where test2 comes from after rebase. | test/piggyback-tests.js | test/piggyback-tests.js | var events = require('./events');
var test2 = require('./it-tests').test2;
var dsl = require('./ringpop-assert');
test2('ringpop sends piggyback info in ping request', 7, 20000, function(t, tc, n) {
return [
dsl.waitForJoins(t, tc, n),
dsl.assertStats(t, tc, n+1, 0, 0),
// TODO clear the di... | JavaScript | 0 | @@ -54,16 +54,17 @@
('./
-it-
test
-s
+-util
').t
|
d24721fcd6a7cccc9c6098f256fb5fc9bbe11f56 | Remove the console.log from the user pub | server/posts/publishPosts.js | server/posts/publishPosts.js | Meteor.publish('allPosts', function () {
"use strict";
var result = Posts.find({}, {
limit: 50,
fields: {
oldChildren: false
}
});
return result;
});
Meteor.publish('comments', function (id) {
"use strict";
return Posts.find({
_id: id
});
});
Meteor.publish('user', function (usern... | JavaScript | 0.000001 | @@ -341,44 +341,8 @@
%22;%0A%0A
- console.log(Posts.find().fetch())%0A
re
|
cbf2e4324965f81121fab61c8450d687a929274d | add address | test/protractor.conf.js | test/protractor.conf.js | exports.config = {
chromeDriver: '../node_modules/chromedriver/bin/chromedriver',
seleniumServerJar: '../node_modules/selenium-standalone-jar/bin/selenium-server-standalone-2.45.0.jar',
capabilities: {
'browserName': 'firefox'
},
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000... | JavaScript | 0.000002 | @@ -12,16 +12,70 @@
fig = %7B%0A
+ %0A seleniumAddress: 'http://localhost:4444/wd/hub',%0A
chrome
|
2897b9b011e258fa7042b2d708c216e46773acfa | disable color-constrast check for axe (#2226) | test/protractor.conf.js | test/protractor.conf.js | const fs = require('fs');
const path = require('path');
// Load ts-node to be able to execute TypeScript files with protractor.
require('ts-node').register({
project: path.join(__dirname, '../e2e/')
});
const E2E_BASE_URL = process.env['E2E_BASE_URL'] || 'http://localhost:4200';
const config = {
useAllAngular2Ap... | JavaScript | 0 | @@ -873,16 +873,162 @@
enu)' %7D,
+%0A%0A // Disable color constrast checks since the final colors will vary based on the theme.%0A %7B id: 'color-contrast', enabled: false %7D,
%0A %5D
|
cf8b3321705cd88eb3540de53f73cab9adbcf76a | Fix production builds | lib/component-css-preprocessor.js | lib/component-css-preprocessor.js | /* jshint node: true */
'use strict';
var Funnel = require('broccoli-funnel');
var mergeTrees = require('broccoli-merge-trees');
var BrocComponentCssPreprocessor = require('./broc-component-css-preprocessor');
function ComponentCssPreprocessor(options) {
this.name = 'component-css';
this.options = options || {};... | JavaScript | 0.000001 | @@ -374,20 +374,31 @@
ion(tree
+, inputPath
) %7B%0A
-
var ad
@@ -475,24 +475,25 @@
s%0A var
-filtered
+podStyles
Tree = n
@@ -706,16 +706,17 @@
sor(
-filtered
+podStyles
Tree
@@ -735,24 +735,298 @@
on.pod %7D);%0A%0A
+ // Looks weird, but essentially we funnel the files from 'app/styles'%0A // to 'app/st... |
6795e0be87de82fb8b7c41e72fc62b976015000a | Make JSCS happy. | packages/ember/tests/controller_test.js | packages/ember/tests/controller_test.js | import "ember";
import EmberHandlebars from "ember-htmlbars/compat";
/*
In Ember 1.x, controllers subtly affect things like template scope
and action targets in exciting and often inscrutable ways. This test
file contains integration tests that verify the correct behavior of
the many parts of the system that chang... | JavaScript | 0 | @@ -2524,24 +2524,25 @@
(%5B%0A %7B
+
name: 'red'%7D
@@ -2540,16 +2540,17 @@
e: 'red'
+
%7D,%0A
@@ -2549,24 +2549,25 @@
%7D,%0A %7B
+
name: 'yello
@@ -2568,16 +2568,17 @@
'yellow'
+
%7D,%0A
@@ -2581,16 +2581,17 @@
%7B
+
name: 'b
@@ -2594,16 +2594,17 @@
: 'blue'
+
%7D%0A ... |
49697cd2d5eb9f4f71be019ce887b38c829ddc56 | fix prompt | packages/idyll-cli/bin/cmds/create-project.js | packages/idyll-cli/bin/cmds/create-project.js | #! /usr/bin/env node
const fs = require('fs-extra');
const p = require('path');
const spawn = require('cross-spawn');
const yargs = require('yargs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const ora = require('ora');
const TEMPLATES_DIR = p.join(p.dirname(require.resolve('idyll-templat... | JavaScript | 0.000002 | @@ -1057,25 +1057,28 @@
message: '
-W
+In w
hich directo
@@ -1115,19 +1115,16 @@
our post
- in
?',%0A
|
91760833c21a20a0cae3e856a0cdce23f949db83 | fix for non-string options | packages/idyll-cli/bin/cmds/create-project.js | packages/idyll-cli/bin/cmds/create-project.js | #! /usr/bin/env node
const fs = require('fs-extra');
const p = require('path');
const spawn = require('cross-spawn');
const yargs = require('yargs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const ora = require('ora');
const TEMPLATES_DIR = p.join(
p.dirname(require.resolve('idyll-tem... | JavaScript | 0.001105 | @@ -5237,80 +5237,186 @@
-packageJson.idyll%5Bkey%5D = packageJson.idyll%5Bkey%5D.replace('%5Bslug%5D', slug);
+if (typeof packageJson.idyll%5Bkey%5D === 'string') %7B%0A packageJson.idyll%5Bkey%5D = packageJson.idyll%5Bkey%5D.replace(%0A '%5Bslug%5D',%0A slug%0A );%0A ... |
8eaddef888414075501c6b54a9645d590b49fb49 | Add ability to pass in options in getTestElement (#15743) | packages/gatsby-cypress/src/commands.js | packages/gatsby-cypress/src/commands.js | /* global Cypress cy */
import apiHandler, { waitForAPI } from "./api-handler"
Cypress.Commands.add(`getTestElement`, selector =>
cy.get(`[data-testid="${selector}"]`)
)
const TIMEOUT = 9999
Cypress.Commands.add(
`waitForAPI`,
{ prevSubject: `optional` },
(subject, api, { timeout = TIMEOUT } = {}) => {
... | JavaScript | 0 | @@ -113,24 +113,25 @@
ement%60,
+(
selector
=%3E%0A cy
@@ -122,16 +122,31 @@
selector
+, options = %7B%7D)
=%3E%0A cy
@@ -179,16 +179,25 @@
ctor%7D%22%5D%60
+, options
)%0A)%0A%0Acon
|
b7910a637e834e71e9f01e215c30ac320cc76cd2 | Update alignement | heeere.js | heeere.js | /*!
* Heeere.js 1.0.0
* MIT licensed
*
* Copyright (C) 2014 Vincent De Oliveira, http://iamvdo.me
*/
(function () {
'use strict';
var heeere;
function refresh () {
requestAnimFrame(refresh);
heeere.update();
}
function goHeeere (method, options) {
method.call(null, options);
}
function add (o... | JavaScript | 0 | @@ -2885,25 +2885,24 @@
%7C%7C%0A%09%09%09
-%09
window.webki
@@ -2923,25 +2923,24 @@
ionFrame %7C%7C%0A
-%09
%09%09%09window.mo
@@ -2967,25 +2967,24 @@
me %7C%7C%0A%09%09%09
-%09
window.oRequ
@@ -3009,17 +3009,16 @@
%7C%7C%0A
-%09
%09%09%09windo
@@ -3053,17 +3053,16 @@
%7C%7C%0A%09%09%09
-%09
... |
3d119c30b57bbc61df6811d557c7b022ec727c5a | 更新 matman-mock 生成版本 | packages/matman-cli/lib/internal/init/init.js | packages/matman-cli/lib/internal/init/init.js | 'use strict';
const path = require('path');
const yeoman = require('yeoman-environment');
const yeomanEnv = yeoman.createEnv();
const Promise = require('bluebird');
const { pkgJson } = require('../../utils/index');
const registryMap = {
npm: 'http://registry.npmjs.org',
cnpm: 'http://r.cnpmjs.org',
tnpm: 'http... | JavaScript | 0 | @@ -747,17 +747,17 @@
: '3.0.1
-1
+4
'%0A %7D;%0A%0A
|
838a3a21512c168270bafdfdd3e3a13c9fc9ea36 | Update yo.js | src/yo.js | src/yo.js | #! /usr/bin/env node
'use strict';
// Load API Keys
var keys = [
process.env.KEY_ONE,
process.env.KEY_TWO,
process.env.KEY_THREE,
process.env.KEY_FIVE,
process.env.KEY_SIX,
process.env.KEY_SEVEN,
process.env.KEY_EIGHT,
process.env.KEY_NINE,
process.env.KEY_TEN,
process.env.KEY_ELEVEN,
process.en... | JavaScript | 0.000001 | @@ -46,16 +46,52 @@
API Keys
+... probably better to use keys.json
%0Avar key
|
91c7927a5ec2ec1a2e62f4af5eea813c5dc8306e | rename internal property constructor to klass | sandal.js | sandal.js |
var getArgumentNames = function(func) {
var functionString = func.toString().replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg, '');
var argumentList = functionString.slice(functionString.indexOf('(')+1, functionString.indexOf(')')).match(/([^\s,]+)/g);
if(argumentList === null) {
argumentList = [];
}
return argumentL... | JavaScript | 0.000003 | @@ -1040,27 +1040,21 @@
s%5Bname%5D.
-constructor
+klass
) %7B%0A%0A%09%09v
@@ -1104,27 +1104,21 @@
s%5Bname%5D.
-constructor
+klass
);%0A%09%09var
@@ -1381,35 +1381,29 @@
vices%5Bname%5D.
-constructor
+klass
.prototype);
@@ -1422,27 +1422,21 @@
s%5Bname%5D.
-constructor
+klass
.prototy
@@ -1732,27 +1732,21 @@
... |
5a9286b3556f0db8e00afda41c67334184199f3e | remove test GET request | services/thumbnails/index.js | services/thumbnails/index.js | // Copyright 2020 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | JavaScript | 0.000001 | @@ -902,112 +902,8 @@
);%0A%0A
-app.get('/', async (req, res) =%3E %7B%0A console.log(%22It works%22);%0A res.status(200).send(%22Works%22);%0A%7D);%0A%0A
app.
|
ab2edff9965f9a0bbbf3653bb2add483d7fc986a | fix tests for new router | test/spec/router/new.js | test/spec/router/new.js | module.exports = {
name: 'new router',
test: [
{
name: 'parse',
init: function(){
var router = basis.require('basis.router');
var type = basis.require('basis.type');
var params = {
bar: type.string.nullable,
baz: type.string.nullable,
spam: type... | JavaScript | 0.000001 | @@ -629,24 +629,26 @@
:baz
-/
(
+/
:spam)
-/
(
+/
:end)
-/
+(/)
', %7B
|
5030346257e5904d333000edde17a6d8d93bdc3b | Update data layers test | test/spec/svg/layers.js | test/spec/svg/layers.js | describe('iD.svgLayers', function () {
var context, container;
var projection = d3.geoProjection(function(x, y) { return [x, -y]; })
.translate([0, 0])
.scale(iD.geoZoomToScale(17))
.clipExtent([[0, 0], [Infinity, Infinity]]);
beforeEach(function () {
context = iD.coreContex... | JavaScript | 0 | @@ -1076,17 +1076,17 @@
to.eql(1
-1
+2
);%0A
@@ -1385,16 +1385,86 @@
lassed('
+improveOSM')).to.be.true;%0A expect(d3.select(nodes%5B5%5D).classed('
streetsi
@@ -1504,33 +1504,33 @@
d3.select(nodes%5B
-5
+6
%5D).classed('mapi
@@ -1580,33 +1580,33 @@
d3.select(nodes%5B
-6
+7
%5D).classed('mapi
@@ -16... |
b8ec01518129afdc94cfddeb188addcc52f3bbcf | fix test beforeAll create the elements | test/specs/test.spec.js | test/specs/test.spec.js | /*
* General specifications GridGallery
* 1- creates a grid using elements that will be in different heights and widths
* 2- will enable gallery view on click to an element of the grid (dialog)
* 3- the dialog will trigger custom events to control data in dialog
* 4- nav of items in grid (disable/enable) depending... | JavaScript | 0.000001 | @@ -466,16 +466,35 @@
true %7D;
+%0A var container;
%0A%0A be
@@ -513,28 +513,24 @@
n() %7B%0A
-var
container =
@@ -560,16 +560,99 @@
'div');%0A
+ container.className = 'grid-gallery';%0A%0A for (var i = 0; i %3C 5; i++) %7B%0A
va
@@ -698,53 +698,10 @@
');%0A
-%0A
- contai... |
4eefe01509a1c065d5518044aa4083f41449384c | add file directory to import logs (#283) | src/import/import.js | src/import/import.js | 'use strict';
const { getImportConfig } = require('../config/config');
const debug = require('../util/debug')('import');
const BaseImport = require('./ImportContext');
const ImportResult = require('./ImportResult');
const saveResult = require('./saveResult');
exports.import = async function importFile(
database,
... | JavaScript | 0 | @@ -635,16 +635,25 @@
filename
+, fileDir
%7D = bas
@@ -795,32 +795,49 @@
filename,%0A
+ fileDir,%0A
status:
@@ -1449,24 +1449,39 @@
filename,%0A
+ fileDir,%0A
status
|
91512a867254c84873b778a00806d5e4705d37a0 | Use a counter instead of a flag for the number of brackets encountered. Now double nested structs should be supported, if the ever happens... | struct.js | struct.js | var Struct = require('./core').Struct
, structs = {}
, test = /^\{.*?\}$/
/**
* Tests if the given arg is a Struct constructor or a string type describing
* a struct (then true), otherwise false.
*/
exports.isStruct = function isStruct (type) {
return !!type.__isStructType__ || test.test(type)
}
/**
* Retur... | JavaScript | 0 | @@ -1392,34 +1392,31 @@
l%0A ,
-has
+num
Bracket
+s
=
-false
+0
%0A , e
@@ -1542,26 +1542,31 @@
if (
-has
+num
Bracket
+s %3E 0
)%0A
@@ -1663,25 +1663,21 @@
-has
+num
Bracket
- = true
+s++
%0A
@@ -1738,34 +1738,29 @@
-has
+num
Bracket
- = false
+s--
%0A
@@ -1974,2... |
c73915ff24ce6be609388980a5a34856227598e2 | Fix pretty start date virtual using dateTime field. | models/Event.js | models/Event.js | 'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Image = require('./Image');
var moment = require('moment');
var _ = require('underscore');
var path = require('path');
var eventSchema = new mongoose.Schema({
name: { type: String, required: true },
author: { type: Schema.Type... | JavaScript | 0 | @@ -1082,16 +1082,20 @@
art.date
+Time
).format
|
8497611fa3ba9631c97a09e9a06042d07cde75c4 | change db url back | models/index.js | models/index.js | if (!global.hasOwnProperty('db')) {
var Sequelize = require('sequelize')
, sequelize = null;
sequelize = new Sequelize(process.env.DATABASE_URL || "postgres://localhost:5432/meme_test");
global.db = {
Sequelize: Sequelize,
sequelize: sequelize,
memes: sequelize.import(__dirname + '/memes'... | JavaScript | 0.000001 | @@ -165,32 +165,42 @@
s://
-localhost:5432/meme_test
+username:password@host:port/dbname
%22);%0A
|
f063c16b7ae6392fc0fdb16adb98fdff89d9a84e | add dark variation to react router example | packages/searchbox/tests/react/index.js | packages/searchbox/tests/react/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import AUsearchbox from './searchbox.js';
import { AUlabel } from '../../../form/src/js/react';
import { Route, BrowserRouter } from 'react-router-dom';
ReactDOM.render(
<div className="au-grid">
<div className="split-wrapper">
<div className="split"... | JavaScript | 0 | @@ -1557,32 +1557,37 @@
%09%09%09%3CAUsearchbox
+dark
label=%22Search%22 b
|
c1910410ab59a426ada6c86354334bcca6737715 | Return updated Trend from findByIdAndUpdate | models/trend.js | models/trend.js | // Represents a frequency analysis of reports matching a single query.
// Stores the number of reports matching a single query for each five minute increment.
// The actual querying is handled by the analytics module.
var database = require('../lib/database');
var mongoose = database.mongoose;
var Query = require('./q... | JavaScript | 0 | @@ -3896,24 +3896,37 @@
-1 %7D %7D %7D %7D,
+ %7Bnew: true%7D,
%0A f
|
d0dcc92e30e2c74e9b6b807f0a55f8e8de82bcdf | Put square at target | sketch.js | sketch.js | const WIDTH = 800;
const HEIGHT = 600;
const SPACING = 25;
const RECT_SIZE_X = 15;
const RECT_SIZE_Y = 2;
var setup = function() {
createCanvas(WIDTH, HEIGHT);
background(0);
fill(255);
angleMode(RADIANS);
stroke(255);
strokeWeight(1);
strokeCap(SQUARE);
}
var drawRectangle = (posX, posY, angle) => ... | JavaScript | 0.000032 | @@ -102,16 +102,40 @@
Y = 2;%0A%0A
+const SQUARE_SIZE = 4;%0A%0A
var setu
@@ -290,24 +290,176 @@
SQUARE);%0A%7D%0A%0A
+var drawSquare = (posX, posY) =%3E %7B%0A push();%0A translate(posX, posY);%0A rect(-(SQUARE_SIZE/2), -(SQUARE_SIZE/2), SQUARE_SIZE, SQUARE_SIZE);%0A pop();%0A%7D%0A%0A
var drawRect
@@ -761,17 ... |
4d042e217b3cfd8a55c9a1315c5039a91c5c4652 | Update mReading.js | mainRPi/sockets/serverSocket/mReading.js | mainRPi/sockets/serverSocket/mReading.js | var constants= require('../../../constants.js')
var envVariables=require('../../../envVariables.js')
module.exports = function(socket){
socket.on('mReading',function(data,fn){
if(data.resMonitorID){
if(envVariables.resMonitorsIDs.indexOf(data.resMonitorID)!=-1){
envVariables.resMonitors[resMonitors... | JavaScript | 0 | @@ -40,16 +40,60 @@
nts.js')
+;%0Avar errors= require('../../../errors.js');
%0Avar env
@@ -137,16 +137,17 @@
les.js')
+;
%0A%0Amodule
@@ -465,47 +465,15 @@
-console.log(err);%0A throw err
+fn(err)
;%0A
@@ -545,86 +545,24 @@
-//Error: The requested monitor has lost connection, please verif... |
285fae9497e540a7f2bdfa1ec5b6716ff7ba3701 | Set a number of iterations to be compatible with Jukka's code | mandelbrot-iterated/mandelbrot-worker.js | mandelbrot-iterated/mandelbrot-worker.js | importScripts("../util/asymmetric-barrier.js",
"../util/parinvoke-worker.js",
"mandelbrot-parameters.js");
Multicore.addFunction("mandelbrot", mandelbrot);
// Maximum iterations per pixel.
const MAXIT = 1000;
// Colors are ABGR with A=255.
const colors = [0xFFFF0700, 0xFF2a2aa5, 0xFFFFff00, 0xFFa19eff,... | JavaScript | 0 | @@ -216,10 +216,9 @@
T =
-10
+2
00;%0A
|
0cade6dc6164b14aa4cde286d67caf40f2291e1b | Add test to verify event leaking and collision | test/unit/event_test.js | test/unit/event_test.js | module('Events');
test('trigger the update event', function() {
var callback = sinon.spy();
$dom.countdown('2020/10/20').on('update.countdown', callback);
$clock.tick(500);
ok(callback.callCount > 0);
});
test('trigger the finish event', function() {
var now = new Date();
var callback = sinon.spy();
$do... | JavaScript | 0 | @@ -1760,28 +1760,740 @@
%7D);%0A $clock.tick(500);%0A%7D);%0A
+%0Atest('event leaking and collision', function() %7B%0A var future = new Date().getTime() + 5000;%0A var clickHandler = sinon.spy();%0A var updateHandler = sinon.spy();%0A%0A $dom.countdown(future)%0A .on('click', clickHandler)%0A .on('update.... |
bbe5238ada1f73ef953a9fb7f8b2dbc047231855 | Enforce subcomponent selection on new fault | templates/js/pages/fault_new.js | templates/js/pages/fault_new.js | $(function() {
$('input[name=start]').datetimepicker({ dateFormat: "dd-mm-yy" });
$('input[name=end]').datetimepicker({ dateFormat: "dd-mm-yy" });
$('input[name=blstart]').datetimepicker({ dateFormat: "dd-mm-yy" });
$('input[name=blend]').datetimepicker({ dateFormat: "dd-mm-yy" });
$('.beamtime_lost').h... | JavaScript | 0 | @@ -4295,32 +4295,34 @@
%0A
+//
$('select%5Bname=s
@@ -4425,29 +4425,16 @@
).hide()
-
%0A
|
f379951a76d293f62e8ac7bdfdd370b50120218e | add frequency analysis and horizontal word detection | solver.js | solver.js | (function() {
var _ = require('underscore'),
fs = require('fs'),
args = process.argv.slice(2),
spellcheck = require('./lib/spellcheck.js')('./dict/en_GB.aff', './dict/en_GB.dic');
if (args.length !== 1) {
console.log("Usage: node solver.js grid_file.txt");
}
fs.readFile(args[0], 'utf-8', func... | JavaScript | 0.00001 | @@ -409,16 +409,932 @@
%0A %7D);%0A%0A
+ function frequency_analysis(arr) %7B%0A return _(arr).reduce(function(acc, letter) %7B%0A if (!isNaN(letter)) %7B%0A if (typeof acc%5Bletter%5D == %22undefined%22) %7B%0A acc%5Bletter%5D = 0;%0A %7D%0A acc%5Bletter%5D ++;%0A %7D%0A ... |
4c5f6cda40c67ee3a8b9c96b9cb45c9c5e7ab58f | Fix a typo | src/lib/personalization.js | src/lib/personalization.js | var Personalization = function() {
/**
* Manage api calls for personalization
* The collection object contains convenience functions such as get, post, delete
* @class Personalization
*/
this.initialize.apply(this, arguments);
};
Personalization.prototype = {
/**
* Initialize the Personalization ... | JavaScript | 1 | @@ -2751,16 +2751,17 @@
activit
+i
es%0A
|
cf602be7dec4bcf1ef7dcbd5e5f535add21845e0 | reorder fields in returned trackinfo dict | src/tracks_control.js | src/tracks_control.js | 'use strict';
var tableControl = require('./table_control.js');
module.exports = function(container, directions) {
var control = {}, map;
var origChange = false, destChange = false;
var TRACKINFO_API_URL = "http://luliu.me/tracks/api/v1/trackinfo";
var TRACK_API_URL = "http://luliu.me/tracks/api/v1/tr... | JavaScript | 0 | @@ -746,18 +746,259 @@
var
-keys = %5B%5D,
+trackinfoKeys = %5B%0A 'ID', 'Segments', '2D length', '3D length', 'Moving time', 'Stopped time', %0A 'Max speed', 'Uphill', 'Downhill', 'Started at', 'Ended at', 'Points', %0A 'Start lon', 'Start lat', 'End lon', 'End lat'%0A %5D,%0A
val
@@... |
2dda87d60139f447821db19cf6737937a9885f21 | save chat only if sync is on | src/reducers/account.js | src/reducers/account.js | import Immutable from 'immutable'
function getDefault () {
const defaultData = {
avatarName: '',
loggedIn: false,
avatarIdentifier: '',
sync: false,
agentId: '',
viewerAccount: {
loggedIn: false,
username: '',
signInPopup: ''
},
savedAvatars: [],
savedAvatarsLoad... | JavaScript | 0.000002 | @@ -1628,32 +1628,95 @@
%7D%0A %7D)%0A%0A
+ case 'SavingAvatar':%0A return state.set('sync', true)%0A%0A
case 'Avatar
|
51b3794036b23686b365be60517763773ef11938 | Set error code on exceptions | lib/fs.js | lib/fs.js | // TODO(vojta): allow relative paths
var util = require('util');
var predictableNextTick = require('./util.js').predictableNextTick;
/**
* @constructor
* @param {boolean} isDirectory
*/
var Stats = function(isFile, mtime) {
this.mtime = mtime;
this.isDirectory = function() {
return !isFile;
};
this.isFi... | JavaScript | 0.00001 | @@ -2300,16 +2300,31 @@
ucture);
+%0A var error;
%0A%0A if
@@ -2335,37 +2335,39 @@
ointer) %7B%0A
-throw
+error =
new Error(util.
@@ -2415,16 +2415,65 @@
path));%0A
+ error.code = 'ENOENT';%0A%0A throw error;%0A
%7D%0A%0A
@@ -2584,37 +2584,39 @@
bject') %7B%0A
-throw
+error =
... |
8859baedebaf78d17745d72b289762825da40f06 | Use var to support earlier node versions | test/validationTests.js | test/validationTests.js | const postalCodes = require('../postal-codes.js');
const expect = require('chai').expect;
describe('Postal codes validation: ', function () {
const countriesData = require('../generated/postal-codes-alpha2');
Object.keys(countriesData).map(function (alpha2Code) {
let formatFileName = countriesData[al... | JavaScript | 0 | @@ -280,11 +280,11 @@
-let
+var
for
|
9ecaebf39703c26e678dd4a71466354366d0361e | remove testing console.log | assertions/visualRegression.js | assertions/visualRegression.js | var util = require('util');
var fse = require('fs-extra');
var path = require('path');
var fs = require('fs');
var resemble = require('node-resemble-js');
/**
* Crops the screenshot to the bounding box of the given element
* Note: This uses gm, which requires that you install graphicsMagick or imageMa... | JavaScript | 0.000001 | @@ -3448,30 +3448,8 @@
e;%0A%0A
-%09%09%09%09console.log('1');%0A
%09%09%09%09
|
a7274f655d528b75f425916eadd6658b067028f6 | Tweak webpack logging | lib/js.js | lib/js.js | 'use strict';
var merge = require('lodash').merge;
var gutil = require('gulp-util');
var webpack = require('webpack');
var defaults = {
name: 'js',
optimize: false,
plugins: {
webpack: {
entry: './src/main.js',
output: {
path: './dist',
filename: 'main.js'
},
plugins:... | JavaScript | 0 | @@ -351,17 +351,169 @@
ns:
-'minimal'
+%7B%0A assets: true,%0A chunks: false,%0A chunkModules: false,%0A colors: true,%0A hash: false,%0A timings: false,%0A version: false,%0A modules: false%0A %7D
%0A%7D;%0A
@@ -1021,14 +1021,8 @@
log(
-'%5B' +
guti
@@ -1034,12 +1034,12 @@
ors.
-cyan
+b... |
15fcfc276e94f50d0d4594cfb206abd482d199b0 | Avoid unnecessary reload of view | static/src/js/view.js | static/src/js/view.js | odoo.define('oomusic.View', function(require) {
"use strict";
var core = require('web.core');
var ListView = require('web.ListView');
ListView.List.include(/** @lends instance.web.ListView.List# */{
init: function () {
this._super.apply(this, arguments);
// Listen on 'oomusic_reload' only in spe... | JavaScript | 0.999984 | @@ -892,32 +892,34 @@
core.bus.on
+ce
('oomusic_reload
@@ -1851,381 +1851,9 @@
er;%0A
- if (view %7C%7C (active_view && active_view.fields_view.arch.attrs.playlist)) %7B%0A prev_id && this.records.get(prev_id) && this.reload_record(this.records.get(prev_id));%0A curr_id && this.reco... |
2600306f9bbd1cb2d23df5a92ff5a5c9a1b07e9e | Use the proper default domain name for the server | src/js/chatchacha.js | src/js/chatchacha.js | 'use strict';
// wait for the document to load
var name;
var smileys = [
[/[:=]-?@/g, 'angry_smile'],
[/[:=]-?[sS]/g, 'confused_smile'],
[/[:=]'\(/g, 'cry_smile'],
[/8-?\)/g, 'shades_smile'],
[/[:=]-?[dD]/g, 'teeth_smile'],
[/[:=]-?\(/g, 'sad_smile'],
[/[:=]-?\$/g, 'red_smile'],
[/[:=]... | JavaScript | 0.000001 | @@ -2660,22 +2660,26 @@
p://
-localhost:8080
+chatchacha.fr:8181
');%0A
|
a7a5b61f95d7239f9e4bd1ddd10564696dbc58b3 | Add comment and logger | atmessager/lib/vaildMessage.js | atmessager/lib/vaildMessage.js | var nconf = require('nconf');
nconf.file('bots', __dirname + '/../config/bots.json')
.file('receviers', __dirname + '/../config/receivers.json')
.file('senders', __dirname + '/../config/senders.json');
function vaildMessage(receiver,message,botname,username,password){
if(message === undefined){
retur... | JavaScript | 0 | @@ -1,8 +1,67 @@
+var logger = require('log4js').getLogger('vaildMessage');%0A%0A
var ncon
@@ -82,16 +82,16 @@
conf');%0A
-
nconf.fi
@@ -333,16 +333,60 @@
word)%7B%0A%0A
+ //If miss message, return error code 369%0A%0A
if(mes
@@ -428,32 +428,82 @@
rror:369%7D;%0A %7D%0A%0A
+ //If receiver not found, return e... |
ed2a3d57649f07d35c645ee3415f43d5bf3b0c0a | Remove double new lines ;) | name-creator.js | name-creator.js | 'use strict';
/**
* name-creator.js
* Copyright © 2015 Johnie Hjelm Crip™
*
* @return {String}
*/
var _ = require('lodash');
var uniqueRandomArray = require('unique-random-array');
var cripNames = require('./crip-names.json');
var naughtyness = require('./naughtyness.json');
/**
*... | JavaScript | 0.000016 | @@ -302,25 +302,24 @@
ss.json');%0A%0A
-%0A
/**%0A * Retur
@@ -546,25 +546,24 @@
) + min;%0A%7D%0A%0A
-%0A
/**%0A * Retur
@@ -1004,25 +1004,24 @@
OrLast%5D;%0A%7D%0A%0A
-%0A
/**%0A * Retur
@@ -1113,17 +1113,16 @@
ness);%0A%0A
-%0A
/**%0A * R
@@ -1299,12 +1299,11 @@
');%0A
+
%7D%0A%0A
-%0A
/**%0A
|
193a9a53ac4e5e85af333c94a6c53d7601a18cd4 | Use previously parsed line parts to calculate colum widths | src/scout/testreader.js | src/scout/testreader.js | 'use strict';
var _test_files = [];
var _fs = require('fs');
var _cli = require('../utils/arguments');
// This regular expression is used to separate arguments on a line.
// Current match: at least 2 spaces or at least 1 tab (surrounded by any number
// of spaces).
var separator_rx = / {2,}| *\t+ */g;
function pars... | JavaScript | 0 | @@ -2750,20 +2750,22 @@
st_file.
-line
+action
s.length
@@ -2785,20 +2785,21 @@
var
-line
+parts
= test_
@@ -2807,62 +2807,24 @@
ile.
-lines%5Bi%5D;%0A var parts = line.split(separator_rx)
+actions%5Bi%5D.parts
;%0A
|
4723e81a11c4b8a715f60787fe7e53f1c7fcb7da | Add Channel#setImplicitSubscription method | lib/Channel.js | lib/Channel.js | /*jslint node: true, indent: 2, unused: true, maxlen: 80, camelcase: true */
/*
* stompit.Channel
* Copyright (c) 2014 Graham Daws <graham.daws@gmail.com>
* MIT licensed
*/
var Transaction = require('./channel/Transaction');
var util = require('util');
var assign = require('object-assign');
var createReadableStrea... | JavaScript | 0 | @@ -4627,16 +4627,17 @@
ototype.
+_
subscrib
@@ -4649,23 +4649,27 @@
unction(
-headers
+constructor
, onMess
@@ -5342,31 +5342,25 @@
= c
-lient.subscribe(headers
+onstructor(client
, fu
@@ -5642,32 +5642,32 @@
tion);%0A %7D);%0A %0A
-
return channel
@@ -5676,32 +5676,472 @@
bscription;%0A%7D;%0A%0A
+Chann... |
3baad422229bd7e65e9963e774db51ee50fdc533 | Clean up Sentry breadcrumbs | native/index.js | native/index.js | // crypto shim loaded before anything else
import './shim.js'
// setup crash tracking
import { Sentry } from 'react-native-sentry';
// TODO: change this to prod vars later on
const SENTRY_DSN = require('./config').SENTRY_DSN;
if (SENTRY_DSN) {
Sentry.config(SENTRY_DSN).install();
}
import React from 'react';
import... | JavaScript | 0.000116 | @@ -219,17 +219,16 @@
RY_DSN;%0A
-%0A
if (SENT
@@ -263,16 +263,324 @@
NTRY_DSN
+, %7B%0A maxBreadcrumbs: 5,%0A autoBreadcrumbs: %7B%0A 'xhr': false, // XMLHttpRequest%0A 'console': false, // console logging%0A 'dom': false, // DOM interactions, i.e. clicks/typing%0A 'location': false, // ur... |
6c5418f3b9d3b5bc58ebeb42623c343079e51d9b | update cv | src/Components/Resume.js | src/Components/Resume.js | import React, {Component} from "react";
import Skill from "./Skill";
class Resume extends Component {
render() {
if (!this.props.data) return null;
const education = this.props.data.education.map(function (education) {
return (
<div key={education.degree}>
... | JavaScript | 0.000001 | @@ -1462,17 +1462,11 @@
con-
-typescrip
+jes
t-pl
|
b2e78dfec407c6b4a5b904d0fd31cd09dc70bbe3 | kill audio processing on stop | src/Components/Sample.js | src/Components/Sample.js | const SAMPLE_BUFFER_SIZE = 1024;
export const RECORD_MODE = {
USER_MEDIA: "USER_MEDIA",
STREAM: "STREAM"
}
export default class Sample {
constructor (context, recordMode = RECORD_MODE.USER_MEDIA) {
this.recordMode = recordMode
this.recordInput = context.createMediaStreamDestination();
this.context = context;... | JavaScript | 0.000001 | @@ -227,16 +227,123 @@
ordMode%0A
+%09%09if(this.recordMode === RECORD_MODE.USER_MEDIA) %7B%0A%09%09%09this.recordInput = context.createGain();%0A%09%09%7D else %7B%0A%09
%09%09this.r
@@ -391,24 +391,28 @@
tination();%0A
+%09%09%7D%0A
%09%09this.conte
@@ -3055,24 +3055,25 @@
cording() %7B%0A
+%0A
%09%09this._reco... |
af1043997cb1e211f7d4ec2a5b05d416bf33ad3b | Update app.js | assets/js/app.js | assets/js/app.js | $( document ).ready(function() {
/* Sidebar height set */
$('.sidebar').css('min-height',$(document).height());
/* Secondary contact links */
var scontacts = $('#contact-list-secondary');
var contact_list = $('#contact-list');
scontacts.hide();
contact_list.mouseenter(function(){ scontacts.fadeIn(); });
... | JavaScript | 0.000002 | @@ -1,8 +1,34 @@
+window.client = 'Zenika';%0A
$( docum
|
0ac0a50923dda6dacb09129cfb0f87cfdc20071e | Update Message.js | lib/Message.js | lib/Message.js | Message = function() {
this.raw ='';
this.imei = 0;
this.command = '';
this.event = '';
this.data = '';
}
Position = function() {
this.raw = ''; // full GPS location message as received from GPS tracker
this.lat = -1.0; // GPS latitude in Degree
this.lng = -1.0; // GPS long... | JavaScript | 0.000001 | @@ -4,32 +4,39 @@
sage = function(
+options
) %7B%0A this.raw =
@@ -113,16 +113,239 @@
ta = '';
+%0A%0A // Fill in properties%0A if (typeof options === 'object') %7B%0A for (var key in options) %7B%0A if (typeof this%5Bkey%5D !== 'undefined') %7B%0A this%5Bkey%5D = options%5Bkey... |
5b5e893f8c9605aa58d571cbc63040d669a34e65 | Update app.js | assets/js/app.js | assets/js/app.js | $( document ).ready(function() {
/* Sidebar height set */
$('.sidebar').css('min-height',$(document).height());
/* Secondary contact links */
var scontacts = $('#contact-list-secondary');
var contact_list = $('#contact-list');
scontacts.hide();
contact_list.mouseenter(function(){ scontacts.fadeIn(); });
... | JavaScript | 0.000002 | @@ -374,14 +374,47 @@
t(); %7D);
+%0A%09%0A%09$(%22table%22).addClass(%22table%22);
%0A%0A%7D);%0A
|
cde08e1e97c515db69edbba53a2f54403b3a5689 | Fix code style | lib/Message.js | lib/Message.js | 'use strict';
const Joi = require('joi');
const ValidationError = require('../errors/ValidationError');
// TODO: toBuffer method
class Message {
constructor({ data, meta }) {
this.data = data;
this.meta = meta;
}
validate() {
const {error, value} = Joi.validate(this.data, this.schema || {});
... | JavaScript | 0.000169 | @@ -253,20 +253,15 @@
st %7B
+
error
-, value
+
%7D =
|
e284067b2cbeec5fd313dcafe8e17d187e3067c4 | Remove fancy quotations, thanks Gmail | secret.js | secret.js | exports.TOKEN = ‘TOKEN HERE’;
exports.SESSION_SECRET = ‘SESSION SECRET HERE’;
exports.CLIENT_ID = ‘CLIENT ID HERE’;
exports.CLIENT_SECRET = ‘CLIENT SECRET HERE’;
| JavaScript | 0 | @@ -9,17 +9,17 @@
TOKEN =
-%E2%80%98
+'
TOKEN HE
@@ -16,25 +16,25 @@
'TOKEN HERE
-%E2%80%99
+'
;%0Aexports.SE
@@ -48,17 +48,17 @@
ECRET =
-%E2%80%98
+'
SESSION
@@ -64,25 +64,25 @@
SECRET HERE
-%E2%80%99
+'
;%0Aexports.CL
@@ -91,17 +91,17 @@
NT_ID =
-%E2%80%98
+'
CLIENT I
@@ -106,17 +106,17 @@
ID HERE
... |
01faef88eff08ac2a7526ed2f637e5091d3f8f3b | add the exclusiveWeapon field to missions | lib/Mission.js | lib/Mission.js | 'use strict';
/**
* Represents an in-game mission
*/
class Mission {
/**
* @param {Object} data The mission data
* @param {Object} deps The dependencies object
* @param {MarkdownSettings} deps.mdConfig The markdown settings
* @param {Translator}... | JavaScript | 0 | @@ -3973,16 +3973,182 @@
ocale));
+%0A%0A /**%0A * Only weapon allowed for the mission%0A * @type %7Bstring%7D%0A */%0A this.exclusiveWeapon = translator.languageString(data.exclusiveWeapon, locale);
%0A %7D%0A%0A
|
0dc80fc6af1bba9bc9adaf778cd1e3386b04ca09 | Update keyFor.js | katas/es6/language/symbol/keyFor.js | katas/es6/language/symbol/keyFor.js | // 36: Symbol.keyFor - retrieves a shared symbol key from the global symbol registry
// To do: make all tests pass, leave the assert lines unchanged!
describe('`Symbol.keyFor()` gets the symbol key for a given symbol', function() {
const sym = Symbol.for('foo');
it('pass the symbol to `keyFor()` and you get ... | JavaScript | 0.000001 | @@ -663,24 +663,198 @@
);%0A %7D);%0A %0A
+ it('predefined symbols are not in the runtime-wide registry either', function() %7B%0A const key = Symbol.keyFor(Symbol.iteraTor);%0A %0A assert.equal(key, void 0);%0A %7D);%0A %0A
it('for no
|
4655836ee8313bb2d582af46921986af06a449f0 | remove outdated unittest | test/NullDependency.unittest.js | test/NullDependency.unittest.js | "use strict";
require("should");
const sinon = require("sinon");
const NullDependency = require("../lib/dependencies/NullDependency");
describe("NullDependency", () => {
let env;
beforeEach(() => env = {});
it("is a function", () => NullDependency.should.be.a.Function());
describe("when created", () => {
bef... | JavaScript | 0.000015 | @@ -459,105 +459,8 @@
);%0A%0A
-%09%09it(%22is not an equal resource%22, () =%3E env.nullDependency.isEqualResource().should.be.False());%0A%0A
%09%09it
|
83b7cd72ad1816732c2d803feb91d60eaa717cd8 | fix misplaced back button | Pioneer/index.ios.js | Pioneer/index.ios.js | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image,
Navigator,
TouchableOpacity,
} from 'react-native';
import Main from './Main.js';
import CardContainer from './CardConta... | JavaScript | 0.000013 | @@ -958,14 +958,22 @@
if(
+route.
title=
+==
'Det
@@ -1094,17 +1094,30 @@
if (
-index %3E 0
+route.title==='Detail'
) %7B
|
9222a0af308d4b3702293a77c3300fa8cd22d83b | set editor content on datasource onCurrentElementChange | widget.js | widget.js | WAF.define('CKEditor', ['waf-core/widget'], function(widget) {
var _this;
var CKEditor = widget.create('CKEditor', {
init: function() {
_this = this;
// create editor with CKEditor plugin
_this.editor = CKEDITOR.appendTo(_this.node, {
customConfig: ... | JavaScript | 0 | @@ -68,18 +68,43 @@
ar _this
+,%0A%09 ckEditorDatasource
;%0A
-
%09%0A va
@@ -399,21 +399,33 @@
//
-editor events
+add content to datasource
%0A
@@ -453,14 +453,15 @@
.on(
- 'blur
+'change
', f
@@ -474,16 +474,17 @@
n( e ) %7B
+%0A
@@ -491,13 +491,243 @@
+%09// clear timer%0A ... |
38926833c625c481a578304eba71bf3f316c46a5 | Fix jest watch reloading all the time 🕰 | jest.config.js | jest.config.js | module.exports = {
testEnvironment: 'node',
}
| JavaScript | 0 | @@ -39,10 +39,57 @@
'node',%0A
+ watchPathIgnorePatterns: %5B'%3CrootDir%3E/tmp/'%5D,%0A
%7D%0A
|
6c60d25e20265086d6cd9c4da9230f0e965cd99d | fix err | src/ExtensionsManager.js | src/ExtensionsManager.js | /**
* @author : gherardo varando (gherardo.varando@gmail.com)
*
* @license: GPL v3
* This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your op... | JavaScript | 0.000006 | @@ -878,40 +878,8 @@
');%0A
-const async = require('async');%0A
cons
@@ -904,16 +904,18 @@
equire('
+./
GuiExten
@@ -947,23 +947,28 @@
equire('
+./
Sidebar
+.js
');%0Acons
@@ -994,16 +994,18 @@
equire('
+./
ToggleEl
@@ -1009,16 +1009,19 @@
eElement
+.js
');%0Alet
|
a8081899ec265904f3eb49bc72df213dab64ad08 | Use where instead of which on windows to properly detect watchman | src/FileWatcher/index.js | src/FileWatcher/index.js | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict... | JavaScript | 0.000001 | @@ -575,20 +575,8 @@
%0A
- const out =
exe
@@ -586,22 +586,16 @@
nc('
-which
watchman
');%0A
@@ -594,42 +594,39 @@
hman
-');%0A if (out.length !== 0) %7B%0A
+ version', %7Bstdio: 'ignore'%7D);%0A
@@ -654,22 +654,16 @@
atcher;%0A
- %7D%0A
%7D catc
|
2bcf0c29807f61545c239adbacd4faebeae840f2 | fix test cases for node 16 | test/cases/parsing/bom/index.js | test/cases/parsing/bom/index.js | it("should load a utf-8 file with BOM", function () {
var result = require("./bomfile");
expect(result).toEqual("ok");
});
it("should load a css file with BOM", function () {
var css = require("!css-loader!./bomfile.css").default + "";
expect(css).toBe("body{color:#abc}");
});
it("should load a json file with BOM... | JavaScript | 0 | @@ -202,16 +202,32 @@
s-loader
+?sourceMap=false
!./bomfi
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.