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 |
|---|---|---|---|---|---|---|---|
1ac90c42e91c7810a17734a24beedf763bf947b2 | Update collisiondetection.js | physics/minilibs/collisiondetection.js | physics/minilibs/collisiondetection.js | var intersection = function(a, b, c, d) {
var X = (Equation.B(c, d) - Equation.B(a, b))/(Equation.M(a, b) - Equation.M(c, d));
return [X, Equation.M(a, b) * X + Equation.BEquation.(a, b)];
};
var intersecting = function(a, b, c, d) {
var p = intersection(a, b, c, d);
return (p.x >= Math.min(a.x, b.x) && p.x <= ... | JavaScript | 0 | @@ -168,25 +168,16 @@
uation.B
-Equation.
(a, b)%5D;
|
e905a9f29683aa69c245692df4806ab6d6230f36 | add a little robustness to prop methods | app/assets/js/doc.prop.js | app/assets/js/doc.prop.js | //TODO: make this something like APP.edit.prop
APP.doc.prop.getType = function (elm) {
var type = elm.className.split(' ');
type = type.find(function(item) {
return item.match(/^type-/);
});
return type.substring(5);
}
APP.doc.prop.new = function (sel, type) {
var template = APP.config.templates.prop.re... | JavaScript | 0 | @@ -78,24 +78,39 @@
ion (elm) %7B%0A
+ if (elm) %7B%0A
var type =
@@ -136,16 +136,18 @@
t(' ');%0A
+
type =
@@ -174,24 +174,26 @@
item) %7B%0A
+
+
return item.
@@ -213,14 +213,18 @@
/);%0A
+
%7D);%0A
+
re
@@ -247,16 +247,41 @@
ing(5);%0A
+ %7D else %7B%0A null;%0A %7D%0A
%7D%0AAPP... |
b862e58dd0639c0b5488d9a735b020852b757677 | Remove unnecessary code | assets/src/edit-story/components/canvas/framesLayer.js | assets/src/edit-story/components/canvas/framesLayer.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 ... | JavaScript | 0.001341 | @@ -1226,86 +1226,8 @@
s(%7B%0A
- className: 'container web-stories-content',%0A pointerEvents: 'initial',%0A
|
b0a80a810dfc8381be3d1290e61283e8461ca2ac | Make all Scala snippets highlighted | src/main/resources/dotty_res/scripts/ux.js | src/main/resources/dotty_res/scripts/ux.js | window.addEventListener("DOMContentLoaded", () => {
document.getElementById("leftToggler").onclick = function() {
document.getElementById("leftColumn").classList.toggle("open");
}
hljs.registerLanguage('scala', highlightDotty);
hljs.registerAliases(['dotty', 'scala3'], 'scala');
hljs.initHig... | JavaScript | 0 | @@ -48,16 +48,24 @@
=%3E %7B%0A
+ var e =
documen
@@ -95,16 +95,40 @@
oggler%22)
+;%0A if (e) %7B%0A e
.onclick
@@ -139,24 +139,28 @@
unction() %7B%0A
+
docu
@@ -215,24 +215,35 @@
le(%22open%22);%0A
+ %7D;%0A
%7D%0A hl
|
90a1b5f22e2d4c726e5186491ada658b7517177a | Fix Description | src/components/home/Description.js | src/components/home/Description.js | import React from 'react'
import { Container, Text, Link as A } from '@hackclub/design-system'
import Link from 'gatsby-link'
A.link = A.withComponent(Link)
export default () => (
<Container maxWidth={46} p={3} pb={5} align="center">
<Text color="slate" fontSize={[2, 3]}>
Hack Club is a nonprofit network ... | JavaScript | 0.000003 | @@ -573,32 +573,37 @@
vities%0A %3C/A
+.link
%3E%0A ,%7B' '%7D%0A
|
2a760cf388560eaba94e440aa02d2f47cf21e1c7 | Update FeatureTest failure case | test/model/FeatureTest.js | test/model/FeatureTest.js | var promises = require('q');
var Watai = require('../helpers/subject'),
my = require('../helpers/driver').getDriverHolder(),
expectedOutputs = require('../helpers/testWidget').expectedOutputs,
WidgetTest;
/** Timeout value of the test's config.
*/
var GLOBAL_TIMEOUT = 500;
/** This test suite is redacted with [M... | JavaScript | 0 | @@ -4488,151 +4488,8 @@
) %7B%0A
-%09%09%09%09var message = 'No failure report. See code';%0A%0A%09%09%09%09if (report && report.failures && report.failures%5B0%5D)%0A%09%09%09%09%09message = report.failures%5B0%5D;%0A%0A
%09%09%09%09
@@ -4507,15 +4507,14 @@
ror(
-message
+report
));%0A
|
c8f616a162eb1db7657bca6bc94b9da49415ff58 | Add data loaing support to NineSliceSprite | src/engine/core/scene/sprites/NineSliceSprite.js | src/engine/core/scene/sprites/NineSliceSprite.js | import Node2D from '../Node2D';
import Sprite from './Sprite';
import Texture from '../../textures/Texture';
import { Rectangle } from '../../math';
import { TextureCache } from '../../utils';
export default class NineSliceSprite extends Node2D {
/**
* @param {Texture|string} texture
* @param {number} to... | JavaScript | 0 | @@ -2789,24 +2789,594 @@
ual();%0A %7D
+%0A _load_data(data) %7B%0A super._load_data(data);%0A%0A for (let k in data) %7B%0A switch (k) %7B%0A // Directly set%0A // - Sprite%0A case 'texture':%0A case 'tint':%0A c... |
045455fcc578045ecd3799fecccd24a4d66f344f | add print statements for debugging | docs/pongish/sketch.js | docs/pongish/sketch.js | var x;
var y;
var dx;
var dy;
var r;
var px;
var py;
var cx;
var cy;
var speed = 5;
function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();
x = width/2;
y = height/2;
dx = random(-10, 10);
dy = random(-10, 10);
r = height/25;
rectMode(CENTER);
px = 15;
py = height/2;
cx = width-px;
cy = py;... | JavaScript | 0.000002 | @@ -378,16 +378,40 @@
dle2();%0A
+%09console.log(%22TEST 1%22);%0A
%09checkKe
@@ -1320,24 +1320,48 @@
eckKeys() %7B%0A
+%09console.log(%22TEST 2%22);%0A
%09if(keyIsPre
|
b247da3fdf56d44f59eb40ea0473ce1e6163e1f7 | update label style | src/components/typography/Label.js | src/components/typography/Label.js | // โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// import
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
import styled from 'styled-components';
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// component
// โโโโโโโโโ... | JavaScript | 0 | @@ -517,16 +517,17 @@
ext), 0.
+7
5);%0A%0A p
|
4e8fc7e4b11c426b1ddc8feacee33266e7eba0ea | Update identification.js | mainRPi/sockets/serverSocket/identification.js | mainRPi/sockets/serverSocket/identification.js |
module.exports=function(socket){
socket.emit('identification', {mainRPiID: constants.MAIN_ID}, function(err,res){
if(err){
throw err;
}
if(res.status){
if(res.new){
fs.writeFile(constants.MAIN_ID_PATH, res.mainRPiID, 'utf8', function(err){
if(err){
throw err;
... | JavaScript | 0.000001 | @@ -1,8 +1,227 @@
+var fs=require('fs');%0Avar async=require('../../../async');%0Avar constants= require('../../../constants.js');%0Avar envVariables=require('../../../envVariables.js');%0Avar Reading=require('../../../server/models/reading.js');
%0A%0Amodule
|
fc8c3dd247a230f4eda5f46f54dc826c7f3d7247 | Correct applyCommandQueue test | test/index.js | test/index.js | import sinon from 'sinon'
import { expect } from 'chai'
import { notify, subscribe, cmd, reset, applyCommandQueue } from '../src'
describe('preload-json.js', function() {
describe('#notify', function() {
afterEach(function() {
reset()
})
it('calls the callback with a valid name', function() {
... | JavaScript | 0.990844 | @@ -2351,18 +2351,14 @@
ow.p
-reloadJSON
+jQueue
= %5B
|
5ea871343f63cffe532d0c9ba4ccf72aefcc1398 | Make sure the parent container re-layouts when after the splitter is relocated | src/js/layout/plugins/Splitter.js | src/js/layout/plugins/Splitter.js | Blend.defineClass('Blend.layout.plugins.Splitter', {
layout: null,
init: function () {
var me = this;
me.callParent.apply(me, arguments);
me.view = me.layout.view;
// override the render function
var layoutRenderFn = me.layout.render;
me.layout.render = function ... | JavaScript | 0 | @@ -6795,32 +6795,152 @@
pl);%0A %7D%0A%0A
+ /*%0A * This will force the parent/view to re-layout %0A */%0A me.layout.view._sizeSig = null;%0A
me.layou
|
764003ae8f65ffc3c3e80419d6f5092ceecc05ac | Add thing for test | test/reducers/gui_test.js | test/reducers/gui_test.js | /* eslint-disable max-len */
import { LOCATION_CHANGE } from 'react-router-redux'
import { expect } from '../spec_helper'
import * as subject from '../../src/reducers/gui'
describe('gui reducer', () => {
describe('initial state', () => {
it('sets up a default initialState', () => {
expect(
subject.... | JavaScript | 0.000001 | @@ -353,16 +353,46 @@
ve.keys(
+'activeNotificationsTabType',
'modes',
|
bb5dec22477455235c853c1d739be941d5d1a809 | update otp comment (#755) | scripts/generate-otp.js | scripts/generate-otp.js | const EOL = require("os").EOL;
const path = require("path");
const fs = require("fs");
// we want to generate a TOTP in the _future_, and the `notp`
// library doesn't let us do that unless we set `NODE_ENV = "test"`
process.env.NODE_ENV = "test";
const b32 = require("thirty-two");
const notp = require("notp");
const ... | JavaScript | 0 | @@ -375,17 +375,17 @@
a code
-5
+1
seconds
@@ -406,9 +406,9 @@
%0A//
-5
+1
sec
|
d16d80840d5bcd6eb84a8373fab2f58422fdc25a | scale up to larger gaps | test/index.js | test/index.js | var assert = require('assert')
var bip32utils = require('../index.js')
var bitcoinjs = require('bitcoinjs-lib')
var request = require('request')
var Helloblock = require('cb-helloblock')
// helper functions for tests
function fund(hdNode, n, done) {
var k = 0
;(function cycle() {
if (k === n) return done()
... | JavaScript | 0.000105 | @@ -180,16 +180,59 @@
oblock')
+%0Avar blockchain = new Helloblock('testnet')
%0A%0A// hel
@@ -269,18 +269,17 @@
on fund(
-hd
+i
Node, n,
@@ -297,183 +297,88 @@
var
-k = 0%0A%0A ;(function cycle() %7B%0A if (k === n) return don
+sourceNode = iNode.deriv
e(
+0
)%0A
-%0A
-
var
-address = hdNode.derive... |
3f41842a1337c4fe6cafb705a126586acac58b62 | add $rootScope.GuestMode in mainController | src/main/webapp/portal/main/controllers.js | src/main/webapp/portal/main/controllers.js | 'use strict';
define(['angular','require'], function(angular, require) {
var app = angular.module('portal.main.controllers', []);
app.controller('PortalMainController', ['$localStorage', '$sessionStorage','$scope', '$document', 'NAMES', 'MISC_URLS', 'APP_FLAGS', function($localStorage, $sessionStorage, $scope, $d... | JavaScript | 0.000001 | @@ -1570,32 +1570,46 @@
e', 'MISC_URLS',
+ '$rootScope',
function(mainSe
@@ -1616,32 +1616,44 @@
rvice, MISC_URLS
+, $rootScope
) %7B%0A var that
@@ -1828,16 +1828,77 @@
ewURL;%0A%0A
+ //initialize GuestMode%0A $rootScope.GuestMode = false;%0A
main
@@ -1960,24 +1960,133 @@
r = result;%0A
+ //c... |
1f1bc8e87ea382683b5b8122afb64fa1c797fa29 | remove some debug output | lib/ServiceProviderMixin.js | lib/ServiceProviderMixin.js | /* jslint node: true, esnext: true */
"use strict";
const rgm = require('registry-mixin');
const ServiceLogger = require('./ServiceLogger');
const ServiceConfig = require('./ServiceConfig');
const endpoint = require('kronos-endpoint');
//let seq = 0;
/**
* provide services and hold service configuration
*/
module.... | JavaScript | 0.000088 | @@ -3535,24 +3535,26 @@
nfig ?%0A%09%09%09%09%09
+//
console.log(
@@ -4497,16 +4497,22 @@
rvice) %7B
+%0A%0A%09%09/*
%0A%09%09const
@@ -4545,22 +4545,16 @@
s%5Bname%5D;
-%0A%0A%09%09/*
%0A%09%09%09%09if
|
b2fbefa30ba8f5480b56226f0a4284220bfbe049 | Fix reports handling in basic console script | test/reporters/console.js | test/reporters/console.js | 'use strict';
var deferred = require('deferred');
module.exports = function (t, a) {
var report = [{ message: 'Lorem ipsum', at: 1, line: 1 }], invoked;
report.src = 'Lorem ipsum';
report.options = {};
t([deferred({ 'foo': report })], { log: function (str) {
a(typeof str, 'string', "Log string");
invoked = tr... | JavaScript | 0 | @@ -203,17 +203,16 @@
%7B%7D;%0A%09t(
-%5B
deferred
@@ -230,17 +230,16 @@
eport %7D)
-%5D
, %7B log:
|
da54c5af645e15d51ef06cb25156a44e2b4e057d | Implementa rota padrรฃo | src/js/routes/home/home.routes.js | src/js/routes/home/home.routes.js | (function() {
angular.module('imperium').config(['$stateProvider', HomeRoutes]);
function HomeRoutes($stateProvider) {
$stateProvider.state('home', {
url: '/home',
templateUrl: "home.html"
});
};
})();
| JavaScript | 0.000001 | @@ -61,16 +61,38 @@
ovider',
+ '$urlRouterProvider',
HomeRou
@@ -135,19 +135,84 @@
Provider
-) %7B
+, $urlRouterProvider) %7B%0A%0A $urlRouterProvider.otherwise('/home');%0A
%0A $st
|
89d44dbc1ee70fd2e1a87561b3d6c06e5a275dfc | Fix linting errors | test/index.js | test/index.js | 'use strict';
var assert = require('assert');
var eql = require('deep-eql');
var values = require('../');
describe('values', function() {
it('should be a function', function() {
assert(typeof values === 'function');
});
it('should have an arity of 1', function() {
assert(values.length === 1);
});
... | JavaScript | 0.000075 | @@ -1,8 +1,73 @@
+/* globals describe, it */%0A/* eslint-disable no-new-wrappers */%0A%0A
'use str
|
5a18671d3619e821613f2b12e6497eeaa48ecd6c | add test | test/index.js | test/index.js | var program = require('../lib');
var path = require('path');
var name = 'test';
program.setConfig({
main: path.join(__dirname, 'test.js'),
log: path.resolve('../../error.log'),
running: path.resolve('../../.test-running'),
name: name,
runCallback: function() {
console.log('[i] Press [Ctrl+C] to stop ' + name + ... | JavaScript | 0.000002 | @@ -233,16 +233,35 @@
: name,%0A
+%09version: '0.1.0',%0A
%09runCall
|
311cfa36aed52cf6d38dbb8a0d4577af2d777f0b | test coverage for aborting an stalled source | test/index.js | test/index.js |
var pull = require('pull-stream')
var cat = require('../')
var test = require('tape')
test('cat', function (t) {
pull(
cat([pull.values([1,2,3]), pull.values([4,5,6])]),
pull.collect(function (err, ary) {
console.log(err, ary)
t.notOk(err)
t.deepEqual(ary, [1,2,3,4,5,6])
t.end()
... | JavaScript | 0 | @@ -81,16 +81,97 @@
'tape')%0A
+var Pushable = require('pull-pushable')%0Avar Abortable = require('pull-abortable')
%0Atest('c
@@ -1494,28 +1494,563 @@
t.end()%0A %7D)%0A )%0A%7D)%0A
+%0Atest('abort stalled', function (t) %7B%0A var err = new Error('intentional'), n = 2%0A var abortable = Abortable()%0A ... |
6c5ab388cf123d771db754ffd8075304495c503b | fix lua comment folding | lib/ace/mode/folding/lua.js | lib/ace/mode/folding/lua.js | /* ***** BEGIN LICENSE BLOCK *****
* Distributed under the BSD license:
*
* Copyright (c) 2012, Ajax.org B.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of sou... | JavaScript | 0 | @@ -2836,65 +2836,65 @@
type
-.indexOf(%22comment%22) != -1 %7C%7C type.indexOf(%22string%22) != -1
+%5B0%5D == %22bracketedComment%22 %7C%7C type%5B0%5D == %22bracketedString%22
)%0A
@@ -3430,65 +3430,65 @@
type
-.indexOf(%22comment%22) != -1 %7C%7C type.indexOf(%22string%22) != -1
+%5B0%5D == %22bracketedComment... |
a4f76892662d18b9f931da3219f02135ae0ef6ef | Update modeling bar chart titles. | src/mmw/js/src/modeling/tr55/runoff/views.js | src/mmw/js/src/modeling/tr55/runoff/views.js | "use strict";
var $ = require('jquery'),
Marionette = require('../../../../shim/backbone.marionette'),
chart = require('../../../core/chart.js'),
barChartTmpl = require('../../../core/templates/barChart.html');
var ResultView = Marionette.ItemView.extend({
template: barChartTmpl,
className: 'char... | JavaScript | 0 | @@ -1975,16 +1975,39 @@
olumbian
+ (a.k.a. %22100%25 Forest%22)
results
@@ -2133,29 +2133,27 @@
arData('
-Pre-Columbian
+100%25 Forest
', 'pc_u
@@ -2357,16 +2357,26 @@
ta('
-Original
+Current Conditions
', '
|
2a5555b85fa55dd632ddb91d1e2a8cbe97bb2b77 | allow empty protos | src/core/component-2-clzz-1-api.js | src/core/component-2-clzz-1-api.js | /*
** ComponentJS -- Component System for JavaScript <http://componentjs.com>
** Copyright (c) 2009-2014 Ralf S. Engelschall <http://engelschall.com>
**
** This Source Code Form is subject to the terms of the Mozilla Public
** License (MPL), version 2.0. If a copy of the MPL was not distributed
** with this file, ... | JavaScript | 0.000012 | @@ -589,32 +589,33 @@
tring%22
+
%7D,%0A exten
@@ -654,16 +654,17 @@
%22clazz%22
+
@@ -725,32 +725,33 @@
trait* %5D%22
+
%7D,%0A cons:
@@ -785,32 +785,33 @@
alid: %22function%22
+
%7D,%0A
@@ -861,32 +861,33 @@
bject%22
+
%7D,%0A dynam... |
716a726ed527ff9ae18ba82ca533be883ca53c61 | Add missing cleanup after final test | test/index.js | test/index.js | var test = require("tape")
var Screen = require("../screen.js")
test("errors", function (t) {
t.throws(Screen)
t.throws(function () {
Screen(10)
})
t.throws(function () {
Screen("cat", 20)
})
t.throws(function () {
var s = Screen({width: 21, height: 8})
s.output(21, 8, "NOPE")
})
t.thr... | JavaScript | 0.000001 | @@ -2883,24 +2883,38 @@
9, 0, %220%22))%0A
+ s.cleanup()%0A
t.end()%0A%7D)
|
6ff4eded0389c8f45dfdd635a2360f881473f4ad | Add optional chaining to formatBytes (#6480) | src/js/components/FileInput/utils/formatBytes.js | src/js/components/FileInput/utils/formatBytes.js | const SI_CONVERSION_FACTOR = 1000;
const IEC_CONVERSION_FACTOR = 1024;
const getCurrentOS = () => {
const currentOS = ['Win', 'Linux', 'Mac'].find(
(v) => window.navigator.userAgent.indexOf(v) >= 0,
);
return currentOS;
};
const defaultFormat = (size) => {
const units = ['B', 'KB', 'MB', 'GB', 'TB'];
c... | JavaScript | 0 | @@ -161,16 +161,17 @@
%3E window
+?
.navigat
@@ -172,16 +172,17 @@
avigator
+?
.userAge
@@ -183,16 +183,17 @@
serAgent
+?
.indexOf
|
861a9b55cc9341b7edad5451384864a850e0bfd7 | Add safeApply after load from storage | src/modules/ui/directives/footer/Footer.js | src/modules/ui/directives/footer/Footer.js | (function () {
'use strict';
const controller = function (Base, $element, storage) {
class FooterCtrl extends Base {
/**
* @public
* @type {string}
*/
mobileAppLink;
/**
* @public
* @type {string}
... | JavaScript | 0 | @@ -67,23 +67,38 @@
(Base, $
-element
+scope, $element, utils
, storag
@@ -1539,16 +1539,61 @@
Hidden;%0A
+ utils.safeApply($scope);%0A
@@ -1952,23 +1952,42 @@
ase', '$
-element
+scope', '$element', 'utils
', 'stor
|
828d53c57cc086c19abe4163b2d520e821344d91 | Save students | app/flux/studentStore.es6 | app/flux/studentStore.es6 | import * as Reflux from 'reflux'
import * as Immutable from 'immutable'
import studentActions from 'flux/studentActions'
import Student from 'models/student'
let studentStore = Reflux.createStore({
listenables: studentActions,
init() {
this.students = Immutable.Map()
this.history = Immutable.Stack()
this.futu... | JavaScript | 0 | @@ -1227,57 +1227,8 @@
nt%0A%0A
-%09%09student.save()%0A%0A%09%09console.log(student.toJS())%0A%0A
%09%09th
@@ -1457,16 +1457,82 @@
tChange'
+, this.students)%0A%09%09this.students.forEach(student =%3E student.save()
)%0A%09%09this
|
999d57720e9c03bd85eb244e31eeb296494d319f | remove errant console.log | lib/auth/adapters/trello.js | lib/auth/adapters/trello.js | var OAuth1Strategy = require('passport-oauth1');
var request = require('request');
function TrelloStrategy(options, verify) {
OAuth1Strategy.call(this, Object.assign({
requestTokenURL: 'https://trello.com/1/OAuthGetRequestToken',
accessTokenURL: 'https://trello.com/1/OAuthGetAccessToken',
userAuthorizationURL: ... | JavaScript | 0.000003 | @@ -793,37 +793,8 @@
');%0A
-%09%09%09%09console.log(profile.id);%0A
%09%09%09%09
|
01638a15a0f2e73cc1f0d3e66a3aed41ff664feb | Add adapter find returns a promise test. | test/index.js | test/index.js | import _ from 'underscore';
import test from 'blue-tape';
import createAdapter from '../src';
import {ADAPTABLE_METHODS} from '../src';
const DEFAULTS = {
storage: [
{key: 'x', value: 1},
{key: 'x', value: 2},
{key: 'x', value: 3},
{key: 'y', value: 4},
{key: 'z', value: 5},
{key: 'w', value... | JavaScript | 0 | @@ -21,16 +21,37 @@
score';%0A
+import co from 'co';%0A
import t
@@ -1142,32 +1142,475 @@
ert.end();%0A%7D);%0A%0A
+test('adapter find returns a promise resolving to a array',%0Aco.wrap((assert) =%3E %7B%0A const sut = createAdapter(DEFAULTS);%0A const result = sut.find();%0A%0A // assert is promise%0A assert.ok... |
d44c51f2ab474bfeb1240917c9dac09c3e7a4427 | fix for tournament options navigating to players. ref #48 | src/js/controllers/tournaments/notStartedCtrl.js | src/js/controllers/tournaments/notStartedCtrl.js | import site from '../../app';
site.controller('notStartedController', ($scope, EnsureLoggedIn, UserStatus, ShareToken, TournamentStatus, FirebaseURL, $firebaseObject, CurrentPlayerBucket, CurrentTournament, $state, $stateParams) => {
const authData = EnsureLoggedIn.check();
$scope.bucket = CurrentPlayerBucket.ge... | JavaScript | 0 | @@ -966,114 +966,10 @@
%5D);%0A
-%0A
-if($scope.bucket.length === 0) return $state.go('userManage'); // don't refresh the page here, I guess%0A
%0A $
|
33b1654f60bb8f6129fe64f868917b7fb94b1f10 | remove console.log on test | test/index.js | test/index.js | 'use strict'
var _ = require('lodash')
var assert = require('assert')
var cls = require('../lib')
describe('indonesian-news-category-classifier', function () {
it('should return text prediction', function () {
var text = 'Southampton - Liverpool menang besar kala bertandang ke Southampton di babak kelima Pia... | JavaScript | 0.000001 | @@ -855,48 +855,8 @@
xt)%0A
- console.log(JSON.stringify(result))%0A
|
7ec4f1602c6f9657817c650f575c4659acde7c8c | Update test entry | test/index.js | test/index.js | import { configure } from "enzyme"
import Adapter from "enzyme-adapter-react-16"
configure({ adapter: new Adapter() })
export function createTestRoot() {
if (!window.document.body) {
window.document.body = document.createElement("body")
}
const testRoot = document.createElement("div")
document... | JavaScript | 0 | @@ -73,16 +73,75 @@
eact-16%22
+%0Aimport React from %22react%22%0Aimport ReactDOM from %22react-dom%22
%0A%0Aconfig
@@ -536,9 +536,160 @@
%7D)%0A%7D%0A%0A
+export function asyncReactDOMRender(Component,root)%7B%0A return new Promise((resolve)=%3E%7B%0A ReactDOM.render(%3CComponent /%3E, root, resolve)%0... |
f5708f70fb54c6a184b37d865439a02cafd24a77 | test index | test/index.js | test/index.js | function test(name, path) {
describe(name, function () {
require(path);
});
}
describe('#dl-module', function (done) {
this.timeout(2 * 60000);
// Auth
test('@AUTH/ACCOUNT', './auth/account');
test('@AUTH/ROLE', './auth/role');
test('@AUTH/API-ENDPOINT', './auth/api-endpoint');
... | JavaScript | 0.000002 | @@ -4162,27 +4162,20 @@
uction-order
-/create
');%0A%7D);%0A
|
f4f77d6025b643cf6ec9c9f962f32e99df5d291e | use namespace for tests | test/index.js | test/index.js | var fs = require('fs')
, path = require('path')
, expect = require('chai').expect
, async = require('async')
, checksum = require('checksum')
, server = require('socket.io')
, _client = require('socket.io-client')
, ss = require('../')
, port = 8888;
function client(path, options) {
path = path || '... | JavaScript | 0.000001 | @@ -1330,39 +1330,42 @@
%7B%0A this.io.
-sockets
+of('/foo')
.on('connection'
@@ -1401,34 +1401,35 @@
ss(socket).on('f
-oo
+ile
', function(stre
@@ -1760,32 +1760,38 @@
ss(client(
+'/foo'
)).emit('foo', s
@@ -1776,34 +1776,35 @@
'/foo')).emit('f
-oo
+ile
', stream, %7Bname
@@ -2169,39 +2169,42 @@
%7... |
51ea7f6306163ddc7ad04ca50e2ef64fe4567de9 | add deterministic attachment order test | test/index.js | test/index.js |
var test = require('tape');
var Builder = require('../builder');
var Parser = require('../parser');
var fs = require('fs');
var IMG_PATH = '/Users/tenaciousmv/Code/craigslist-app/src/app/images/icon.png';
var bufferEqual = require('buffer-equal');
var streamEqual = require('stream-equal');
var concat = require('concat... | JavaScript | 0.000001 | @@ -138,66 +138,19 @@
= '
-/Users/tenaciousmv/Code/craigslist-app/src/app/images/icon
+./test/logo
.png
@@ -582,35 +582,14 @@
-var p = new Parser();%0A p
+Parser
.par
@@ -1121,35 +1121,14 @@
-var p = new Parser();%0A p
+Parser
.par
@@ -1169,36 +1169,18 @@
d);%0A
-%0A
-p = new Parser();%0A ... |
08896a29895eb2a6507ae38a8e2a70572ca66c10 | Document api generator | test/index.js | test/index.js | /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
/* eslint-env node, mocha */
import test from 'ava';
import endpoint from '../src/endpoint';
test('endpoint returns correctly partially applied function', (t) => {
const endpointConfig = {
uri: 'http://example.com',
};
const... | JavaScript | 0.000001 | @@ -138,24 +138,19 @@
%0Aimport
-endpoint
+api
from '.
@@ -155,24 +155,19 @@
'../src/
-endpoint
+api
';%0A%0Atest
@@ -172,105 +172,176 @@
st('
-endpoint returns correctly partially applied function', (t) =%3E %7B%0A const endpointConfig =
+Collates single endpoint into generated wrapper keys', (t) =%3E %7B%0A ... |
4794de18eca439e2f0b2c615d63263a80efa21fe | Add unmount test | test/index.js | test/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import simulant from 'simulant';
import focusOnKeyDown from '../src';
chai.should();
describe('react-focus-onkeydown', () => {
const EnhancedInput = focusOnKeyDown('input');
it('should render single input', () => {
const container = document.creat... | JavaScript | 0 | @@ -2886,13 +2886,568 @@
);%0A %7D);
+%0A%0A it('should toggle focus off when component unmounts', () =%3E %7B%0A const spy = sinon.spy();%0A%0A const container = document.createElement('div');%0A document.body.appendChild(container);%0A ReactDOM.render(%3CEnhancedInput onFocus=%7Bspy%7D /%3E, container)... |
c173cc7a8bd057b9ebbbbd39cb4321bfce1a5fe4 | Fix usage of Nock in unit tests - much cleaner now | test/index.js | test/index.js | var config = require('./config');
var should = require('should');
var nock = require('nock');
var up = require('../index')(config);
var baseApi = nock('https://jawbone.com:443');
describe('up', function(){
describe('.moves', function(){
describe('.get()', function(){
it('should call correct url', function... | JavaScript | 0 | @@ -126,16 +126,42 @@
nfig);%0A%0A
+nock.disableNetConnect();%0A
var base
@@ -641,77 +641,14 @@
api.
-isD
+d
one()
-.should.be.true;%0A api.pendingMocks().should.be.empty
;%0A%0A
@@ -1093,77 +1093,14 @@
api.
-isD
+d
one()
-.should.be.true;%0A api.pendingMocks().should.be.empty
;%0A%0A
@@ -11... |
31ae8dcb7130747809868328f8361d67553939bf | Fix tests | test/index.js | test/index.js | import File from 'vinyl';
import { PassThrough } from 'stream';
import path from 'path';
import es from 'event-stream';
import { readFileSync } from 'fs';
import { expect } from 'chai';
import html2pug from '../src';
const convertedPug = `
meta
title
| gulp-html2pug test
| gulp html2pug test`;
describe('gulp-htm... | JavaScript | 0.000003 | @@ -240,22 +240,79 @@
= %60%0A
-meta%0A
+doctype html%0Ahtml(lang='en')%0A head%0A meta(charset='UTF-8')%0A
title
-%0A %7C
gul
@@ -331,10 +331,14 @@
est%0A
-%7C
+ body
gul
|
e1f42f98241454d4257d75f15ba45aa8e156a03e | Remove unused function | test/index.js | test/index.js | var Q = require('q');
var supertest = require("supertest-as-promised")(Q.Promise);
var HttpStatus = require('http-status-codes');
var utils = require('./utils');
process.env.MONGOHQ_URL = 'mongodb://localhost:27017/jsonresume-tests';
process.env.POSTMARK_API_KEY = 'POSTMARK_API_TEST'; // http://blog.postmarkapp.com/po... | JavaScript | 0.000004 | @@ -3999,170 +3999,8 @@
his)
-,%0A hasSessionObject = function(res) %7B%0A if (!('session' in res.body)) return %22Body is missing session property%22%0A %7D
;%0A%0A
|
992c859a40e50eed3bb5fc8da10cf13047edbcdb | Remove done() calls from unit tests | test/index.js | test/index.js | const Chai = require("chai");
const should = Chai.should();
const expect = Chai.expect;
const Sinon = require("sinon");
const Randomly = require("../index");
describe("Randomly", function() {
describe("select()", () => {
it("should throw an error when called with no arguments", (done) => {
(()... | JavaScript | 0 | @@ -283,28 +283,24 @@
rguments%22, (
-done
) =%3E %7B%0A
@@ -422,36 +422,16 @@
rray/);%0A
- done();%0A
@@ -494,36 +494,32 @@
not an array%22, (
-done
) =%3E %7B%0A
@@ -639,36 +639,16 @@
rray/);%0A
- done();%0A
@@ -713,36 +713,32 @@
empty array%22, (
-done
... |
7d9f46b64c4a1c15fabd98807d185aeb25a0657c | Add resource object specification | test/index.js | test/index.js | 'use strict'
// setup
import test from 'ava'
// test something
test.todo('testSomething')
/*
const pattyOpts = {port: 8081}
const patty = require('paternity')
const handleIt = require('./some-other-resource')
await patty.init(pattyOpts)
await patty.register('some-resource')
await patty.register('some-other-resource... | JavaScript | 0.000001 | @@ -88,17 +88,21 @@
ng')%0A%0A/*
+ API
%0A
-
const pa
@@ -238,16 +238,37 @@
tyOpts)%0A
+const someResource =
await pa
@@ -297,16 +297,42 @@
ource')%0A
+const someOtherResource =
await pa
@@ -400,8 +400,132 @@
rt()%0A*/%0A
+%0A/* RESOURCE OBJECT%0A%7B%0A search: () =%3E %7B%7D,%0A create: () =%3E %7B%7D,%0A ... |
71570cb2f82c6d9bb08c481e95f42057ed6f8165 | test first + after on non-unique field | test/index.js | test/index.js | import 'babel-polyfill'
import assert from 'assert'
import { graphql } from 'graphql'
import {
sortBy,
pick
} from 'lodash'
import { expect } from 'chai'
import Starship from './models/starship'
import schema from './schema/schema'
import starshipsJSON from './starships.json'
describe('mongo data', () => {
it('s... | JavaScript | 0.000004 | @@ -275,16 +275,102 @@
.json'%0A%0A
+const ref = sortBy(starshipsJSON.data.allStarships.edges, x =%3E x.node.starshipClass)%0A%0A
describe
@@ -3146,97 +3146,8 @@
ips%0A
- const ref = sortBy(starshipsJSON.data.allStarships.edges, x =%3E x.node.starshipClass)%0A
@@ -3303,97 +3303,8 @@
= 3
-%0A const ref ... |
56d1872d237cbc7c00a877bcf16e3369a5e87d6f | fix test | test/index.js | test/index.js | var fs = require('fs');
var chai = require('chai');
var expect = chai.expect;
// Count all of the links from the io.js build page
var jsdom = require('jsdom');
var TEST_DATA = require('./data/json-data.js')();
var TEST_HTML = fs.readFileSync('./test/data/rendered.html').toString();
var GLOBAL = {
window: {}
};
func... | JavaScript | 0.000002 | @@ -4827,16 +4827,17 @@
%5Cs+%5C%3C/g,
+
'%3E%3C'); /
@@ -4886,16 +4886,33 @@
expect(
+html).to.contain(
tocEl.in
@@ -4923,21 +4923,8 @@
TML)
-.to.eql(html)
;%0A
|
9144cb43171f1b8dae4bacb275272f86053bec6d | fix label tool | test/label.js | test/label.js |
var spawn = require('child_process').spawn;
var inspector = require('inspector');
var readline = require('readline');
var async = require('async');
var path = require('path');
var fs = require('fs');
var datamap = require('./reallife/datamap.json');
var unlabled = datamap.map(function (item, index) {
return {
l... | JavaScript | 0.000003 | @@ -315,16 +315,17 @@
%0A lab
+e
led: ite
@@ -329,16 +329,17 @@
item.lab
+e
led,%0A
@@ -462,16 +462,17 @@
item.lab
+e
led;%0A%7D);
@@ -1327,33 +1327,33 @@
atamap, null, '%5C
-n
+t
') + '%5Cn',%0A
@@ -1598,17 +1598,17 @@
null, '%5C
-n
+t
') + '%5Cn
|
5184c31746cfcee8eda432787c7b9f15fb59e595 | Add failing test for group bounds when the group contains a group with no children. | test/tests/Item_Bounds.js | test/tests/Item_Bounds.js | /*
* Paper.js
*
* This file is part of Paper.js, a JavaScript Vector Graphics Library,
* based on Scriptographer.org and designed to be largely API compatible.
* http://paperjs.org/
* http://scriptographer.org/
*
* Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
* http://lehni.org/ & http://jonathanpuckey.co... | JavaScript | 0 | @@ -1527,8 +1527,462 @@
');%0A%7D);%0A
+%0Atest('group.bounds when group contains empty group', function() %7B%0A%09var group = new Group();%0A%09var rectangle = new Path.Rectangle(new Point(75, 75), new Point(175, 175));%0A%09group.addChild(rectangle);%0A%09compareRectangles(group.bounds, %7B x: 75, y: 75, width: 100... |
6a4ed34ea6140ac3c6a4bcf9d773f59e5fb8ff6d | Fix simple proxy | plugins/publish-to-udata/udataProxy.js | plugins/publish-to-udata/udataProxy.js | const express = require('express');
const request = require('supergent');
const rootUrl = process.env.DATAGOUV_URL + '/api';
const ALLOWED_METHODS = ['POST', 'GET', 'PUT', 'DELETE'];
module.exports = function () {
const router = express.Router({ strict: true });
router.use('*', function (req, res, next) {
... | JavaScript | 0.000016 | @@ -63,16 +63,17 @@
uper
+a
gent');%0A
%0Acon
@@ -68,16 +68,16 @@
gent');%0A
-
%0Aconst r
@@ -151,18 +151,26 @@
= %5B'
-POS
+GE
T', '
-GE
+HEAD', 'POS
T',
@@ -281,19 +281,19 @@
router.
-use
+all
('*', fu
@@ -331,23 +331,8 @@
f (!
-(req.method in
ALLO
@@ -342,16 +342,36 @@
_METHODS
+.includes(req.method
... |
7bc31a581fd40e90f91e7ce85df0f5a47e1a61e9 | test model#save() and model#toJSON() | test/model.js | test/model.js | var assert = require( 'assert' );
var Collection = require( '../src/collection' );
describe( 'model api', function () {
var Players;
var model;
beforeEach(function () {
Players = Collection({ name: 'players', dataDir: __dirname + '/fixtures' });
Players
.add({
id: 1,
name: "Peyton... | JavaScript | 0.000001 | @@ -1,12 +1,68 @@
+var fs = require( 'fs' );%0Avar path = require( 'path' );%0A
var assert =
@@ -2388,114 +2388,731 @@
) %7B%0A
-%0A %7D);%0A %7D);%0A%0A describe( 'save()', function () %7B%0A it( 'updates the JSON file on disk', function() %7B%0A
+ var obj = model.toJSON();%0A%0A assert.equal( obj.... |
cdfd4eb132917ab408a08573288d05e6981daa9d | Allow logging via proxy | test/proxy.js | test/proxy.js | var http = require('http'),
https = require('https'),
url = require('url');
var port = 1234;
http.createServer(function(request, response) {
console.log(request.headers);
console.log("Got request: " + request.url);
console.log("Forwarding request to " + request.headers['host']);
var remote = url.par... | JavaScript | 0 | @@ -77,16 +77,17 @@
'url');%0A
+%0A
var port
@@ -94,16 +94,33 @@
= 1234;
+%0Avar log = true;
%0A%0Ahttp.c
@@ -732,24 +732,70 @@
on(chunk) %7B%0A
+ if (log) console.log(chunk.toString());%0A
respon
@@ -821,16 +821,16 @@
nary');%0A
-
%7D);%0A
@@ -1019,24 +1019,68 @@
on(chunk) %7B%0A
+ if (log... |
cdefde571873efb0d9f8921ff0c5c8bb5eafa72f | Make NODE_CHILDREN a property of ASTVisitor | lib/compiler/ast-visitor.js | lib/compiler/ast-visitor.js | 'use strict';
var _ = require('underscore');
/*
* Debug mode flag. Set to "true" if you want to enable AST structure checks in
* the traversing methods. This is useful when debugging visitor blowups
* resulting from AST vs. visitor implementation inconsistencies.
*/
var DEBUG = false;
/*
* Maps AST node types t... | JavaScript | 0.000171 | @@ -4133,16 +4133,59 @@
%7D%0A%7D%0A%0A
+ASTVisitor.NODE_CHILDREN = NODE_CHILDREN;%0A%0A
// BEGIN
|
cfc441cdeeb6713c34fab6f018104eecaeaaa0cd | fix http image | src/es6/core/model/general-html.js | src/es6/core/model/general-html.js | /**
* Created by Gaplo917 on 10/1/2016.
*/
import * as URLUtils from '../../utils/url'
const uuid = require('uuid-v4');
const DEFAULT_IMAGE_PLACEHOLDER = "img/default-placeholder.png"
const DEFAULT_AVATAR_PLACEHOLDER = "img/default-avatar.png"
const DEFAULT_DEAD_IMAGE_PLACEHOLDER = "img/default-dead-placeholder.png"... | JavaScript | 0.001213 | @@ -1638,16 +1638,17 @@
c',%60http
+s
:$%7BimgSr
|
df7e80db9f790a26e4f5eb4b61404778c0d652a0 | Add tests for query Buffer value matching | test/query.js | test/query.js | /*global describe, it*/
var expect = require('./unexpected-with-plugins'),
query = require('../lib').query;
describe('query', function () {
it('should throw on error conditions', function (done) {
expect(function andUndefined() { query.and(); }, 'to throw');
expect(function andSingle() { query.... | JavaScript | 0 | @@ -6182,32 +6182,1184 @@
);%0A %7D);%0A%0A
+ done();%0A %7D);%0A%0A it('should implement Buffer matching', function (done) %7B%0A var buf = new Buffer('Lorem Ipsum is simply dummy text of the printing and typesetting industry.');%0A%0A var matcher = query.createValueMatcher(buf);%0A%... |
33d6f71d119a7b2bdc16009ee1922b4cd66be917 | bump setup timeout | test/setup.js | test/setup.js | const DynamoDbLocal = require('dynamodb-local');
const DYNAMO_DB_PORT = 8000;
/**
* This functions looks for any running db instance on our desired port, kills it, and starts a new one
* @return {child_process} dynamoLocal - a child process instance attached to our running db instance
*/
const startUpAndReturnDynam... | JavaScript | 0.000002 | @@ -451,23 +451,51 @@
e(async
-() =%3E %7B
+function() %7B%0A this.timeout(30000);
%0A dynam
|
a76a9fb9f822c0b6f29c8cecb02cba28016823cb | Modify set mock to return errors | test/setup.js | test/setup.js | // From https://github.com/airbnb/enzyme/blob/master/docs/guides/jsdom.md
var jsdom = require('jsdom').jsdom;
var exposedProperties = ['window', 'navigator', 'document'];
global.document = jsdom('<html><body><div id="app"></div></html>');
global.window = document.defaultView;
Object.keys(document.defaultView).forEac... | JavaScript | 0.000009 | @@ -1140,24 +1140,112 @@
callback) %7B%0A
+ if (!json && !key) %7B%0A callback(new Error('Must provide JSON and key'));%0A %7D%0A%0A
callback
|
0f331ddb40c752f4af1e0ea854a3bdac691e66fb | add is number conditaion + casting | src/filter/collection/filter-by.js | src/filter/collection/filter-by.js | /**
* @ngdoc filter
* @name filterBy
* @kind function
*
* @description
* filter by specific properties, avoid the rest
*/
angular.module('a8m.filter-by', [])
.filter('filterBy', ['$parse', function( $parse ) {
return function(collection, properties, search) {
var comparator;
search = (isStri... | JavaScript | 0.000089 | @@ -327,18 +327,54 @@
rch)
-) ?
+ %7C%7C isNumber(search)) ?%0A String(
search
+)
.toL
@@ -1342,16 +1342,40 @@
parator)
+ %7C%7C isNumber(comparator)
) ?%0A
@@ -1383,16 +1383,23 @@
!
+String(
comparat
@@ -1400,16 +1400,17 @@
mparator
+)
.toLower
@@ -1488,8 +1488,9 @@
%7D%0A %7D%5D);
+%0A
|
d4cce8ec53a21768bb5c4dc1ff3d2d565dd6fe3b | make comment more readable to what method does | src/stages/main/patchers/YieldFromPatcher.js | src/stages/main/patchers/YieldFromPatcher.js | import NodePatcher from './../../../patchers/NodePatcher.js';
import type { Node, ParseContext, Editor } from './../../../patchers/types.js';
export default class YieldFromPatcher extends NodePatcher {
expression: NodePatcher;
constructor(node: Node, context: ParseContext, editor: Editor, expression: NodePatche... | JavaScript | 0.000001 | @@ -406,18 +406,22 @@
*
-YIELD FROM
+'yield' 'from'
EXP
|
77e536e18aa6bc69c8951afbfdcd5bf879c96955 | use dynamic _type for events | lib/dockerEventForwarder.js | lib/dockerEventForwarder.js | var DockerEvents = require('docker-events')
var SPM = require('spm-metrics-js')
var SpmAgent = require('spm-agent')
var os = require('os')
function DockerEventForwarder (docker) {
var Docker = require('dockerode')
try {
this.docker = docker || new Docker()
this.dockerEvents = new DockerEvents({docker: this... | JavaScript | 0.000001 | @@ -743,24 +743,27 @@
, msg) %7B%0A
+ //
msg.type =
@@ -850,15 +850,12 @@
ent(
-'event'
+type
, ms
|
5f3454ebdd469d1c0208e6c792977a6914029e6a | fix wrong containerName in network event | lib/dockerEventForwarder.js | lib/dockerEventForwarder.js | var DockerEvents = require('docker-events')
var SPM = require('spm-metrics-js')
var SpmAgent = require('spm-agent')
var os = require('os')
function DockerEventForwarder (docker) {
var Docker = require('dockerode')
try {
this.docker = docker || new Docker()
this.dockerEvents = new DockerEvents({docker: this... | JavaScript | 0.000024 | @@ -2024,16 +2024,50 @@
tes.name
+ && dockerEvent.Type !== 'network'
) %7B%0A
|
6dd3abd2e3e14b00d1992a7f88e285954abf3dc9 | remove _type field from events, adjustments of fields/content | lib/dockerEventForwarder.js | lib/dockerEventForwarder.js | var DockerEvents = require('docker-events')
var SPM = require('spm-metrics-js')
var SpmAgent = require('spm-agent')
var os = require('os')
function DockerEventForwarder (docker) {
var Docker = require('dockerode')
try {
this.docker = docker || new Docker()
this.dockerEvents = new DockerEvents({docker: this... | JavaScript | 0 | @@ -426,17 +426,16 @@
or)%0A %7D%0A
-%0A
this.s
@@ -617,20 +617,28 @@
catch (
-err2
+loggingError
) %7B%0A
@@ -655,12 +655,20 @@
log(
-err2
+loggingError
)%0A
@@ -699,16 +699,163 @@
%7D%0A %7D)%0A
+ /*%0A this.spm.on('send event', function (result) %7B%0A SpmAgent.Logger.log('debug', 'send event... |
b167fdd50986cad376a67dc32061323c4ce5f399 | Handle rollback failures | src/middleware/action/rollback.js | src/middleware/action/rollback.js | 'use strict';
const { omit } = require('../../utilities');
const { isError, rethrowError } = require('../../error');
// Rollback write actions if any of them failed
const rollback = function ({ results, inputs }, nextLayer) {
const failedActions = results.filter(result => isError({ error: result }));
if (failedAc... | JavaScript | 0.000001 | @@ -60,16 +60,18 @@
%0Aconst %7B
+%0A
isError
@@ -75,22 +75,60 @@
ror,
- rethrowError
+%0A normalizeError,%0A throwError,%0A addErrorHandler,%0A
%7D =
@@ -605,17 +605,18 @@
nput =%3E
-f
+eF
ireRespo
@@ -684,16 +684,32 @@
to end%0A
+ const results =
await P
@@ -737,75 +737,49 @@
%0A%0A
-const %5Bori... |
6d98037bb5be1d4097cc7c4fc3c4c54ac6bdfc29 | Add same locking technique as in http fallback renderer | lib/windshaft/renderers/plain/renderer.js | lib/windshaft/renderers/plain/renderer.js | var mapnik = require('mapnik');
function Renderer(color, options) {
this.color = color || '#ffffff';
this.options = options || {};
this.options.tileSize = this.options.tileSize || 256;
this.options.format = this.options.format || 'png8:m=h';
this.cachedTile = null;
}
module.exports = Renderer;
... | JavaScript | 0.000001 | @@ -282,16 +282,43 @@
= null;%0A
+ this.callbacks = null;%0A
%7D%0A%0Amodul
@@ -509,24 +509,305 @@
le);%0A %7D%0A%0A
+ function done(err, buffer) %7B%0A self.cachedTile = buffer;%0A self.callbacks.forEach(function(callback) %7B%0A callback(err, buffer);%0A %7D);%0A %7D%0A%... |
a8192b6d88b12d71517efab038067d6fa7c0a5d2 | Fix commas | test/tests.js | test/tests.js | /* jshint expr: true */
chai.should();
describe('Schema form', function() {
describe('directive', function() {
beforeEach(module('templates'));
beforeEach(module('schemaForm'));
beforeEach(module('schemaForm-strapselect'));
beforeEach(
//We don't need no sanitation. We don't need no though con... | JavaScript | 0.999999 | @@ -665,33 +665,32 @@
type: %22string%22
-,
%0A %7D%0A
@@ -1366,33 +1366,32 @@
type: %22string%22
-,
%0A %7D%0A
|
fd9dfdbbc32c0e83ef1a57f848aabc706ae23c60 | Fix tests failing on old node version | test/tests.js | test/tests.js | var chai = require('chai'),
filesExist = require('../lib/files-exist');
describe("filesExist", function() {
it('should return an empty array when called with an empty array', function() {
var fileArray = [],
resultArray = filesExist(fileArray);
chai.expect(fileArray).to.deep.equal(resultArray);
});
... | JavaScript | 0.000001 | @@ -2830,40 +2830,180 @@
-class TestError extends Error %7B%7D
+function TestError(message) %7B%0A this.name = 'TestError';%0A this.message = message;%0A this.stack = (new Error()).stack;%0A %7D%0A TestError.prototype = new Error
;%0A
|
5ab848471a67b8821730229f51ed16a929d7d99b | Improve Length Of Last Word | 058_LengthOfLastWord.js | 058_LengthOfLastWord.js | // https://leetcode.com/problems/length-of-last-word/#/description
/**
* @param {string} s
* @return {number}
*/
var lengthOfLastWord = function (s) {
if (!s) return 0;
s = s.trimRight();
var arr = s.split(' ');
return arr[arr.length - 1].length;
};
var s = "Hello World";
console.log(lengthOfLastWord(s));
... | JavaScript | 0.000041 | @@ -110,16 +110,26 @@
er%7D%0A */%0A
+// Simple%0A
var leng
@@ -140,16 +140,17 @@
LastWord
+2
= funct
@@ -267,16 +267,356 @@
th;%0A%7D;%0A%0A
+%0A// Improve%0Avar lengthOfLastWord = function (s) %7B%0A if (!s) return 0;%0A var started = false;%0A var length = 0;%0A for (var i = s.length - 1; i %3E= 0; i--) %7... |
977674bab4f720db36f040d85a568e18e1799932 | Update tests.js | test/tests.js | test/tests.js | /* Node.js official modules */
var fs = require('fs')
/* 3rd party modules */
, mongoose = require('mongoose')
, Schema = mongoose.Schema
, assert = require('chai').assert
, Query = require('../');
var ObjectId = Schema.ObjectId;
var OrigSchema = new mongoose.Schema({
value: {type: String, default: 'ori... | JavaScript | 0.000001 | @@ -3456,32 +3456,71 @@
r, undefined );%0A
+ assert.typeOf( data, 'object' );%0A
assert.equ
@@ -3527,16 +3527,22 @@
al( data
+.count
, 2 );%0A
@@ -3784,12 +3784,13 @@
);%0A %7D);%0A%7D);
+%0A
|
872cd90dc66b230a77de853d8e491347ba2de045 | Fix missing promisify in file picker model | lib/gui/app/models/files.js | lib/gui/app/models/files.js | /*
* Copyright 2018 resin.io
*
* 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 w... | JavaScript | 0.000001 | @@ -609,13 +609,72 @@
nst
-fs =
+Bluebird = require('bluebird')%0Aconst fs = Bluebird.promisifyAll(
requ
@@ -682,16 +682,17 @@
re('fs')
+)
%0Aconst p
|
2631e83669615f551bd88b4b20a58f6984501fec | complete animations immediately unless the animation asks for time | src/scripts/services/game/updateDelayer.js | src/scripts/services/game/updateDelayer.js | angular.module('futurism')
.factory('updateDelayer', function($rootScope, $timeout) {
'use strict';
var queue = [];
var running = false;
var playbackRate = 500;
var self = {
/**
* add an update to the queue
* @param {String} name
... | JavaScript | 0 | @@ -175,26 +175,220 @@
var
-playbackRate = 500
+delay = 0;%0A%0A%0A /**%0A * listen for animations that request more time%0A */%0A $rootScope.$on('animDelay', function(srcScope, requestedDelay) %7B%0A delay = requestedDelay;%0A %7D)
;%0A%0A%0A
@@ -1057,16 +1057,47 @@
... |
07b1b8764181751bb2a90649d3bcd58c65a9106a | add logging for mongo error and disconnection | lib/handler/mongoHandler.js | lib/handler/mongoHandler.js | /*
== BSD2 LICENSE ==
Copyright (c) 2014, Tidepool Project
This program is free software; you can redistribute it and/or modify it under
the terms of the associated License, which is identical to the BSD 2-Clause
License as published by the Open Source Initiative at opensource.org.
This program is distributed i... | JavaScript | 0 | @@ -1163,232 +1163,331 @@
atus
-.deps.up = _.without(dependencyStatus.deps.up, 'mongo');%0A dependencyStatus.deps.down = _.union(dependencyStatus.deps.down, %5B'mongo'%5D);%0A %7D);%0A%0A dependencyStatus.deps.down = _.without(dependencyStatus.deps.down, 'mongo
+ = isDown(dependencyStatus);%0A %7D);%0A%0A depen... |
dce597e25b5c24fa5b950db83c1eccecc528db91 | Fix wrong propType on ArrayOfStrings | src/inputs/Array/ArrayOfStrings.js | src/inputs/Array/ArrayOfStrings.js | /* eslint-disable import/no-extraneous-dependencies */
import Arr from './Array'
import React, {PropTypes} from 'react'
import TagInput from 'part:@sanity/components/tags/textfield'
export default class ArrayOfStrings extends React.Component {
static propTypes = Arr.propTypes
constructor(...args) {
super(...a... | JavaScript | 0.000005 | @@ -52,34 +52,8 @@
*/%0A
-import Arr from './Array'%0A
impo
@@ -148,16 +148,78 @@
xtfield'
+%0Aimport FormBuilderPropTypes from '../../FormBuilderPropTypes'
%0A%0Aexport
@@ -299,191 +299,231 @@
s =
-Arr.propTypes%0A%0A constructor(...args) %7B%0A super(...args)%0A%0A this.handleRemoveItem = this.handleRem... |
902a1d9946864c11da8e982d626e4d6393e6fb21 | Add more tests cases and sleeps to view tests slowly | e2e-tests/scenarios.js | e2e-tests/scenarios.js | 'use strict';
describe('My App', function() {
it('should automatically redirect to /home when location hash/fragment is empty', function() {
browser.get('index.html');
expect(browser.getLocationAbsUrl()).toMatch("/home");
});
describe('Home', function() {
beforeEach(function() {
browser.get('i... | JavaScript | 0 | @@ -40,16 +40,18 @@
ion() %7B%0A
+
it('sh
@@ -135,24 +135,28 @@
unction() %7B%0A
+
browser.
@@ -170,24 +170,57 @@
dex.html');%0A
+ browser.sleep(3000);%0A
expect(b
@@ -265,23 +265,27 @@
home%22);%0A
+
%7D);%0A%0A
+
descri
@@ -316,81 +316,8 @@
-beforeEach(function() %7B%... |
2637fd40e226b1c651ad40dbd47386bc3ee5f0b8 | Replace string concatenations with template literals (#2251) | tests/smtp_client/auth.js | tests/smtp_client/auth.js | const MessageStream = require('./messagestream');
test.expect(22);
const server = {notes: {}};
exports.get_pool(server);
const pool_name = '25:localhost:300';
test.equals(1, Object.keys(server.notes.pool).length);
test.equals(pool_name, Object.keys(server.notes.pool)[0]);
test.equals(0, server.notes.pool[pool_name].g... | JavaScript | 0 | @@ -2973,16 +2973,19 @@
.equals(
+%60$%7B
data.shi
@@ -2988,25 +2988,22 @@
.shift()
- + '
+%7D
%5Cr%5Cn
-'
+%60
, line);
@@ -3321,22 +3321,22 @@
e',
+%60$%7B
line2
- + '
+%7D
%5Cr%5Cn
-'
+%60
);%0A
|
02608a2c25ef50c89ad710c32755fc47d038c544 | Set tabIndex and focus if el exists (#6621) | src/js/claims-status/utils/page.js | src/js/claims-status/utils/page.js | import Scroll from 'react-scroll';
const scroller = Scroll.animateScroll;
export const basename = '/track-claims';
import { getScrollOptions } from '../../common/utils/helpers';
export function scrollToTop() {
scroller.scrollToTop(getScrollOptions());
}
export function setFocus(selector) {
const el = typeof sel... | JavaScript | 0 | @@ -379,16 +379,30 @@
lector;%0A
+ if (el) %7B%0A
el.set
@@ -428,16 +428,18 @@
', -1);%0A
+
el.foc
@@ -444,16 +444,20 @@
ocus();%0A
+ %7D%0A
%7D%0A%0Aexpor
|
8c670b920f113aeede09181b382f25e8d05a79e0 | Update reveal to hide embedded videos better. | javascripts/jquery.reveal.js | javascripts/jquery.reveal.js | /*
* jQuery Reveal Plugin 1.0
* www.ZURB.com
* Copyright 2010, ZURB
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
/*globals jQuery */
(function ($) {
$('a[data-reveal-id]').live('click', function (event) {
event.preventDefault();
var modalLocation = $(th... | JavaScript | 0 | @@ -1727,20 +1727,41 @@
visible'
+, 'display': 'block'
%7D);%0A
-
@@ -2190,32 +2190,52 @@
ity': 'visible',
+ 'display': 'block',
'top': $(docume
@@ -2632,16 +2632,36 @@
isible',
+ 'display': 'block',
'top':
@@ -3267,16 +3267,36 @@
'hidden'
+, 'display': 'none',
%7D);%0A
@@ -3686,32 +3686,51 @@... |
a915518b49a878da657b0f7a7d76fa7cf82dfbb9 | Update protocol method names | lib/jobs/bootstrap-linux.js | lib/jobs/bootstrap-linux.js | // Copyright 2014, Renasar Technologies Inc.
/* jshint: node:true */
'use strict';
var di = require('di'),
events = require('events');
module.exports = bootstrapLinuxJobFactory;
di.annotate(bootstrapLinuxJobFactory, new di.Provide('Job.Linux.Bootstrap'));
di.annotate(bootstrapLinuxJobFactory,
new di.Inje... | JavaScript | 0.000001 | @@ -2244,22 +2244,23 @@
ribe
-Command
Request
+Commands
(sel
@@ -2609,23 +2609,23 @@
ribe
-CommandResponse
+RespondCommands
(sel
|
ce44c0e50e50e883547a63abafe22152ec3f7f45 | Update memory-form.connected.js | src/memories/components/memory-form.connected.js | src/memories/components/memory-form.connected.js | import { connect } from 'preact-redux'
import { graphql, compose } from 'react-apollo'
import { reduxForm, formValueSelector, SubmissionError } from 'redux-form'
import loaderHOC from '../../loader'
import { memoryCreate, memoryUpdate, memoryAssetCreate, memoryAssetDelete } from '../queries'
import MemoryForm from './m... | JavaScript | 0.000001 | @@ -589,28 +589,8 @@
te',
- 'authorizedToSite',
%0A%5D%0A%0A
|
922a6e3a033a0042309d76851cc84acee8f42939 | Convert title unicode when sharing headline #753 | ReactComponents/NewsFeedPost.js | ReactComponents/NewsFeedPost.js | 'use strict';
import React, {
StyleSheet,
Text,
Image,
TouchableHighlight,
View
} from 'react-native';
var Helpers = require('./Helpers.js');
var Style = require('./Style.js');
var Bridge = require('react-native').NativeModules.LDTReactBridge;
var NetworkImage = require('./NetworkImage.js');
var NewsFeedPo... | JavaScript | 0.999166 | @@ -1252,16 +1252,39 @@
ost.id,
+Helpers.convertUnicode(
post.tit
@@ -1286,16 +1286,17 @@
t.title)
+)
%7D%3E%0A
|
a96d0f312bb9d9df511d95a8bba16a1b21be09fd | check removeNext() too | lib/mochaInterceptorTest.js | lib/mochaInterceptorTest.js | /* global describe, it, xit */
/* jslint node: true, esnext: true */
"use strict";
const chai = require('chai'),
assert = chai.assert,
expect = chai.expect,
should = chai.should(),
Interceptor = require('kronos-interceptor').Interceptor;
/**
* @param {Class} factory interceptor Class
* @param {Endpoint} ep... | JavaScript | 0 | @@ -1530,24 +1530,254 @@
nd, itc2);%0A%0A
+ const itc3 = new Interceptor(inst.endpoint);%0A itc2.connected = itc3;%0A assert.equal(itc2.connected, itc3);%0A inst.removeNext();%0A assert.equal(inst.connected, itc3);%0A%0A
|
8c37bbb0d5998baf2d71db40f1b3955b6fa36353 | fix tests return value | js/common/modules/jsunity.js | js/common/modules/jsunity.js | /*jshint strict: false */
/*global require, exports */
////////////////////////////////////////////////////////////////////////////////
/// @brief JSUnity wrapper
///
/// @file
///
/// DISCLAIMER
///
/// Copyright 2010-2012 triagens GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "Lic... | JavaScript | 0.000001 | @@ -5202,25 +5202,16 @@
return
-COMPLETE.
RESULTS;
|
cb512286e68b36608861956fbcd44c170b0d8f88 | Add support for SVG to Interchange. | js/foundation.interchange.js | js/foundation.interchange.js | 'use strict';
!function($) {
/**
* Interchange module.
* @module foundation.interchange
* @requires foundation.util.mediaQuery
* @requires foundation.util.timerAndImageLoader
*/
class Interchange {
/**
* Creates a new instance of Interchange.
* @class
* @fires Interchange#init
* @param {Object} el... | JavaScript | 0 | @@ -3445,16 +3445,20 @@
peg%7C
+png%7Csvg%7C
tiff
-%7Cpng
)(%5B?
|
15b278202685a3327b72456fa24df02f217e9aa6 | Remove response check โ it's always defined. | lib/policies/proxy/proxy.js | lib/policies/proxy/proxy.js | const httpProxy = require('http-proxy');
const fs = require('fs');
const ProxyAgent = require('proxy-agent');
const logger = require('../../logger').policy;
const strategies = require('./strategies');
const createStrategy = (strategy, proxyOptions, endpointUrls) => {
const Strategy = strategies[strategy];
return n... | JavaScript | 0 | @@ -998,48 +998,8 @@
);%0A%0A
- if (!res) %7B%0A throw err;%0A %7D%0A%0A
|
5fbfa7a814decc9e5dfd980e696985bef49bbab9 | Load meta library before orientation. | js/load-image-orientation.js | js/load-image-orientation.js | /*
* JavaScript Load Image Orientation
* https://github.com/blueimp/JavaScript-Load-Image
*
* Copyright 2013, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
*/
/* global define */
;(function (factory) {
'use strict'
if (typeof define === '... | JavaScript | 0 | @@ -432,16 +432,37 @@
e-scale'
+, './load-image-meta'
%5D, facto
@@ -465,16 +465,16 @@
actory)%0A
-
%7D else
@@ -538,16 +538,23 @@
factory(
+%0A
require(
@@ -569,16 +569,22 @@
image'),
+%0A
require
@@ -605,16 +605,57 @@
-scale')
+,%0A require('./load-image-meta')%0A
)%0A %7D el
|
f636973e6729b2f70fb18d49ae844dbf9c20c535 | Initialize property value of circuit-element-member | js/models/circuit-element.js | js/models/circuit-element.js | (function(app) {
'use strict';
var circuit = require('circuit');
var helper = app.helper || require('../helper.js');
var Wrapper = function(obj, self) {
obj.unwrap = Wrapper.unwrap.bind(self);
return obj;
};
Wrapper.unwrap = function(key) {
if (key === Wrapper.KEY) {
return this;
}
... | JavaScript | 0.000001 | @@ -1337,25 +1337,18 @@
+var
member
-Table%5Bname%5D
= n
@@ -1375,24 +1375,212 @@
ber(props);%0A
+ if (props.type === 'prop' && typeof props.arg === 'function') %7B%0A // initialize property value%0A member(props.arg());%0A %7D%0A memberTable%5Bname%5D = member;%0A
... |
46cc35ebaa9df2ad008691862646d67261631a81 | Fix tc fail case due to wrong merge | js/test/date/testcalendar.js | js/test/date/testcalendar.js | /*
* testcalendar.js - test the calendar support per locale
*
* Copyright ยฉ 2019-2022, JEDLSoft
*
* 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/license... | JavaScript | 0.000001 | @@ -874,17 +874,17 @@
xpect(21
-2
+3
);%0A%0A
|
f38ab411a600468a870a69eec657216091e8a046 | Fix left & top edges for tooltips. | src/shared/components/tooltip/util/checkEdges.js | src/shared/components/tooltip/util/checkEdges.js | export default function checkEdges(tooltipEl) {
const tooltipBounds = tooltipEl.getBoundingClientRect();
const bodyBounds = document.body.getBoundingClientRect();
if (tooltipBounds.left === 0) {
tooltipEl.style.left = `${parseInt(tooltipEl.style.left, 10) + 10}px`;
} else if (tooltipBounds.left... | JavaScript | 0 | @@ -192,20 +192,19 @@
ds.left
-===
+%3C 1
0) %7B%0A
@@ -478,12 +478,11 @@
top
-===
+%3C 1
0) %7B
|
49c607659d0277488c7e821ffdc52b4f4146c1f0 | fix title for ie | src/util/dispatcher/platform/dispatcher.js | src/util/dispatcher/platform/dispatcher.js | /*
* ------------------------------------------
* ้่ฆๅนณๅฐ้้
็ๆฅๅฃๅฎ็ฐๆไปถ
* @version 1.0
* @author
* ------------------------------------------
*/
NEJ.define([
'base/platform'
],function(_m,_p,_o,_f,_r){
/**
* ไฟฎๆญฃๆ ้ข
* @param {String} ไธๆฌกๆ ้ข
* @return {String} ไฟฎๆญฃๅ็ๆ ้ข
*/
_p.__doFixTitle = (f... | JavaScript | 0.002176 | @@ -493,16 +493,37 @@
if (
+(!_odttl&&!!_title)%7C%7C
_odttl!=
|
f807a659ee48b9eebc2e6ba63119ba7478cf505e | add new prop to ElementsPanel view | src/views/whiteBoardRoom/WhiteBoardRoom.js | src/views/whiteBoardRoom/WhiteBoardRoom.js | import React from 'react';
import compose from 'recompose/compose';
import { connect } from 'react-redux';
import styles from './WhiteBoardRoom.css';
import ElementsPanel from './ElementsPanel/ElementsPanel';
import WhiteBoard from './WhiteBoard/WhiteBoard';
const enhance = compose(
connect(state => console.log(st... | JavaScript | 0 | @@ -975,16 +975,26 @@
ntsPanel
+%0A
dispatc
@@ -1005,16 +1005,26 @@
ispatch%7D
+%0A
onClick
@@ -1048,16 +1048,66 @@
ureType%7D
+%0A nextFigureType=%7BnextFigureType%7D%0A
/%3E%0A
|
67505c5a1c6b6363d9b6864afa96e9fa6967dd8a | Fix test library path. | tests/main.js | tests/main.js | var allTestFiles = [];
var TEST_REGEXP = /(spec|test)\.js$/i;
var pathToModule = function(path) {
return path.replace(/^\/base\//, '').replace(/\.js$/, '');
};
Object.keys(window.__karma__.files).forEach(function(file) {
if (TEST_REGEXP.test(file)) {
allTestFiles.push(pathToModule(file));
}
});
require.con... | JavaScript | 0 | @@ -379,30 +379,24 @@
%22jquery%22: %22
-../../
libraries/jq
@@ -418,30 +418,24 @@
%22hljs%22: %22
-../../
libraries/hi
@@ -471,30 +471,24 @@
%22voxel%22: %22
-../../
libraries/vo
@@ -531,14 +531,8 @@
%22: %22
-../../
libr
|
ebf6dcbc6753132dbb5cf0b46df8815dd08a0def | Restore missing semver mangle | jupyterlab/webpack.config.js | jupyterlab/webpack.config.js | // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
// Support for Node 0.10
// See https://github.com/webpack/css-loader/issues/144
require('es6-promise').polyfill();
var webpack = require('webpack');
var path = require('path');
var ExtractTextPlugin = require('extr... | JavaScript | 0.998403 | @@ -4191,16 +4191,40 @@
on;%0A %7D%0A
+ name += ':' + semver;%0A
if (mo
|
9b543976eabaa768de782b5d9fc3ab94ed5e79c5 | add circleci | tests/nep5.js | tests/nep5.js | import * as NEP5 from '../src/nep5.js'
describe('NEP5', function () {
this.timeout(10000)
it('get basic info', () => {
return NEP5.getTokenInfo('http://localhost:20332', '5b7074e873973a6ed3708862f219a6fbf4d1c411')
.then(result => {
result.name.should.equal('Red Pulse Token 3.1.4')
... | JavaScript | 0.999998 | @@ -43,16 +43,21 @@
describe
+.skip
('NEP5',
|
e3415ef9dee1fb6ba7f488d75c873896a0236481 | test that we don't return prototype methods | tests/test.js | tests/test.js | /*jshint node:true es5:true laxcomma:true laxbreak:true*/
(function () {
"use strict";
var assert = require('assert')
, fs = require('fs')
, Storage = require('dom-storage')
, dbPath = './db.json'
;
function runTest(storage) {
assert.strictEqual(0, Object.keys(storage).length);
assert.st... | JavaScript | 0.000001 | @@ -240,24 +240,128 @@
(storage) %7B%0A
+ // should not return prototype properties%0A assert.strictEqual(null, Object.getItem('key'));%0A %0A
assert.s
|
d11af8d768e3e4369f22c37796bab4f012b31c69 | Fix indent for loader | webpack.base.config.js | webpack.base.config.js | module.exports = {
module: {
loaders: [{
test: /\.json$/,
loader: 'json-loader'
}, {
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['babel-loader']
}, { test: /\.coffee$/,
exclude: /node_modules/,
loader: 'coffee-loader'
}, { test: /\.cjsx$/,
exclud... | JavaScript | 0.000003 | @@ -186,32 +186,38 @@
oader'%5D%0A %7D, %7B
+%0A
test: /%5C.coffee
@@ -289,16 +289,22 @@
%7D, %7B
+%0A
test: /
|
45e5f61e7da8d3d68157dd2981dee1f060042787 | fix config | webpack.config.prod.js | webpack.config.prod.js | var path = require('path');
var fs = require('fs');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var cssnano = require('cssnano');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var sassLoaderBuild = 'css!postcss!sass?includePaths[]=' + encodeURIComponent(p... | JavaScript | 0.000882 | @@ -1998,19 +1998,18 @@
: '%22
-development
+production
%22',%0A
|
07f022f809ab1cfbb0758ef4a26a055d423549fb | Use import/export in status-bar file | lib/status-bar-tile-view.js | lib/status-bar-tile-view.js | /*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const {Disposable} = require('atom');
const path = require('path');
c... | JavaScript | 0.000001 | @@ -1,8 +1,20 @@
+'use babel'%0A
/*%0A * de
@@ -255,20 +255,21 @@
.md%0A */%0A
-cons
+impor
t %7BDispo
@@ -279,55 +279,44 @@
le%7D
-= require(
+from
'atom'
-)
;%0A
-cons
+impor
t path
-= require(
+from
'path'
-)
;%0A%0Ac
@@ -3171,22 +3171,35 @@
%0A%7D%0A%0A
-module.exports
+export default statusBarElm
=... |
5addc3a8411cc6e8816bf1a121d3f2c8a2f903a4 | Use console log for printing. | engines/node/logger.js | engines/node/logger.js | "use strict";
var font = require("./ansi-font/index")
var toSource = require("../../utils").source
var INDENT = " "
function passed(message) {
return font.green("โ " + message)
}
function failed(message) {
return font.red("โ " + message)
}
function errored(message) {
return font.magenta("โก " + message)
}
fu... | JavaScript | 0 | @@ -113,16 +113,55 @@
= %22 %22%0A%0A
+var report = console.log.bind(console)%0A
%0Afunctio
@@ -533,77 +533,8 @@
%0A%7D%0A%0A
-function report(message) %7B%0A process.stdout.write(message + '%5Cn')%0A%7D%0A%0A
func
|
354e99ddac8993e479abb6852d8a0cdcf0f7d582 | use bower_components directory | lib/templates/karma.conf.js | lib/templates/karma.conf.js | // Karma configuration
// base path, that will be used to resolve files and exclude
basePath = '';
// list of files / patterns to load in the browser
files = [
<%= testFramework.toUpperCase() %>,
<%= testFramework.toUpperCase() %>_ADAPTER,
'app/components/angular/angular.js',
'app/components/angular-mocks/ang... | JavaScript | 0 | @@ -238,32 +238,38 @@
ADAPTER,%0A 'app/
+bower_
components/angul
@@ -291,16 +291,22 @@
%0A 'app/
+bower_
componen
|
2cd8e276a757cb134b24ed94a6714d9698ca2c57 | Fix navigatorMultiPanels | reaks-material/navigatorMultiPanels.js | reaks-material/navigatorMultiPanels.js | const castArray = require("lodash/castArray")
const isString = require("lodash/isString")
const memoize = require("lodash/memoize")
const range = require("lodash/range")
const withResponsiveSize = require("../reaks/withResponsiveSize")
const menuIcon = require("./icons/navigation/menu")
const label = require("../reaks/... | JavaScript | 0 | @@ -3375,16 +3375,99 @@
ction()%0A
+ if (!rootAction) return null // arrive dans le cas d'un panneau masqu%C3%A9%0A
|
2f8e205533a17164793baa87bfbd5dad02732348 | Print errors | thermostat.js | thermostat.js | import cli from 'cli';
import {Gpio} from 'chip-gpio';
import sensor from 'ds18x20';
var options = cli.parse();
var interval = 2000;
var threshold = 25;
var heater = new Gpio(0, 'out');
function setHeater(on) {
console.log('Heater:', on ? 'on' : 'off');
heater.write(on ? 0 : 1);
}
function setHeaterOn() {
set... | JavaScript | 0.00007 | @@ -421,16 +421,36 @@
d) =%3E %7B%0A
+ console.log(err);%0A
if (!i
|
0b0ac16835d2d9fc262fb5d8309c518e3dd2b408 | Update usage of `drains:remove` to remove by logplex token (#113) | packages/heroku-apps/commands/drains/remove.js | packages/heroku-apps/commands/drains/remove.js | 'use strict'
let cli = require('heroku-cli-util')
let co = require('co')
function * run (context, heroku) {
let drain = yield heroku.request({
method: 'delete',
path: `/apps/${context.app}/log-drains/${encodeURIComponent(context.args.url)}`
})
cli.log(`Successfully removed drain ${cli.color.cyan(drain.u... | JavaScript | 0 | @@ -489,16 +489,54 @@
url'%7D%5D,%0A
+ usage: 'drains:remove %5BURL%7CTOKEN%5D',%0A
run: c
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.