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 |
|---|---|---|---|---|---|---|---|
b0e409bb598e58a841eee169e4eac62995c17167 | fix babel compile require more than 5 seconds | test/index.js | test/index.js | var path = require('path'),
assert = require('assert'),
moder = require('../');
require("babel-register");
describe('moder', function() {
this.timeout(5000) // babel compile time
var case1 = moder(__dirname + '/modules/case1');
it('should access all modules in directory', function () {
ass... | JavaScript | 0 | @@ -157,17 +157,18 @@
timeout(
-5
+10
000) //
|
b5f7cb1bced473e2a01d0c5315d1d3ce8cd4d967 | add consistent unit tests for .then and .catch | test/index.js | test/index.js | var expect = require("chai").expect
, http = require("http")
, Promise = require("bluebird")
, PromiseWhen = require("when").Promise
, supertest = require("supertest")
, supertestAsPromised = require("..");
var server = http.createServer(function (req, res) {
res.end("helo");
});
describe("supertestAsProm... | JavaScript | 0 | @@ -211,16 +211,301 @@
%22..%22);%0A%0A
+function PromiseMock() %7B%0A var self = this;%0A %5B%22then%22, %22catch%22%5D.forEach(function (fn) %7B%0A self%5Bfn%5D = function () %7B%0A this%5Bfn%5D.args.push(%5B%5D.slice.call(arguments));%0A return this;%0A %7D%0A self%5Bfn%5D.args = %5B%5D;%0A %7... |
19e17107c065846ec4f2aea7ea6c911945268778 | Increase test coverage to deal with default values. | test/index.js | test/index.js | /*
* tests for config class
*/
var assert = require('assert');
var config = require('../');
describe('config/index', function() {
describe('#set', function() {
it('should return "test" for key: myvar', function() {
config.set('myvar', 'test');
assert.equal('test', config.get('my... | JavaScript | 0 | @@ -785,32 +785,234 @@
%7D);%0A %7D);%0A%0A
+ describe('#get - without key and default value', function() %7B%0A it('should return an empty string', function() %7B%0A assert.equal('', config.get('notavariable'));%0A %7D);%0A %7D);%0A%0A
describe('#l
|
01425f6ba1ca9add6b182eeb5116a692bf9ea218 | Test emitting errors | test/index.js | test/index.js | import fs from "fs";
import path from "path";
import dox from "dox";
import originalDoxme from "doxme";
import test from "tape-catch";
import spigot from "stream-spigot";
import File from "vinyl";
import doxme from "../source/gulp-doxme";
var doxOutput = dox.parseComments(
fs.readFileSync(path.resolve(__dirname, ... | JavaScript | 0.000001 | @@ -1739,54 +1739,474 @@
is.
-skip(%22when given broken file.data%22);%0A is.skip
+plan(2);%0A%0A var brokenDataFile = doxOutputFile.clone();%0A brokenDataFile.data = %22that's not dox output%22;%0A%0A spigot(%7BobjectMode: true%7D, %5BbrokenDataFile%5D)%0A .pipe(doxme())%0A .on(%22error%22, () =%3E %7B%0A ... |
dd732b134fb80a930da572eec5fcc62aa20a1bea | remove unused import from placeholder remove method | src/instance/methods/remove.js | src/instance/methods/remove.js | import handler from '../functions/handler'
export default function remove () {
// this.initialized = false
//
// this.store.containers.forEach(container => {
// if (container === document.documentElement) {
// window.removeEventListener('scroll', handler)
// window.removeEventListener('resize', handle... | JavaScript | 0 | @@ -1,8 +1,11 @@
+//
import h
|
3b8d7baf13aef7f8a5e0699995bac6fc10b1bcb2 | add simple client secret sync test | test/index.js | test/index.js |
/**
* WPCONN module
*/
var WPCONN = require('../');
/**
* Package
*/
var pkg = require('../package.json');
/**
* Testing data
*/
var wpapp = require('./data');
/**
* WPCONN instance
*/
var wpconn = new WPCONN();
/**
* Sync tests
*/
describe('version', function(){
it('should have x.x.x format', fun... | JavaScript | 0.000001 | @@ -391,17 +391,14 @@
be('
-client id
+wp app
', f
@@ -410,24 +410,36 @@
on()%7B%0A it('
+%60client id%60
should be a
@@ -521,17 +521,131 @@
umber;%0A %7D);
+%0A%0A it('%60client secret%60 should be correct lenght', function()%7B%0A wpapp.client_secret.should.be.length(64);%0A %7D);
%0A%7D);%0A
|
523bf1943c97eca2a05d1195b14141fdfa730af3 | remove leftover tests | test/index.js | test/index.js | import { expect } from 'chai';
import blackburn from '../lib';
import Serializer from '../lib/serializer';
function noop() { return this; }
function createRes() {
return {
render: noop,
status: noop,
json: noop
};
}
describe('blackburn', function() {
it('should expose a middleware generating functi... | JavaScript | 0.000001 | @@ -3,30 +3,26 @@
port
- %7B
expect
- %7D
from '
-chai
+must
';%0Ai
@@ -63,171 +63,138 @@
ort
-Serializer from '../lib/serializer';%0A%0Afunction noop() %7B return this; %7D%0A%0Afunction createRes() %7B%0A return %7B%0A render: noop,%0A status: noop,%0A json: noop%0A %7D;%0A%7D
+noop from 'lodash-no... |
6a9cf937bede7baa5f90873a32cd8f9eaf40ad61 | fix test paths | test/index.js | test/index.js | import test from 'ava'
import branch from '../index.js'
test('subscribe returns init session', t => {
return new Promise((resolve, reject) => {
branch.subscribe((session) => {
resolve()
})
})
})
| JavaScript | 0.000004 | @@ -40,16 +40,20 @@
rom '../
+src/
index.js
|
53270dd27b7762a7a564fe4c8644c9548228fe02 | Add a test for #readFile(filename, encoding) | test/index.js | test/index.js | /*global console process require describe it beforeEach*/
var assert = require('assert');
var fs = require('fs');
var os = require('os');
var path = require('path');
var mocha = require('mocha');
var Deferred = require('../lib/orion-deferred/Deferred');
var DFS = '../index.js';
describe('dfs', function() {
var dfs;
... | JavaScript | 0.00009 | @@ -2,16 +2,23 @@
*global
+Buffer
console
@@ -291,16 +291,24 @@
cribe('d
+eferred-
fs', fun
@@ -451,22 +451,24 @@
it('
-exports Deferr
+#Deferred export
ed',
@@ -590,27 +590,16 @@
);%0A%09it('
-works with
#exists(
@@ -775,27 +775,16 @@
);%0A%09it('
-works with
#readFil
@@ -804,36 +804,36 @@
n(done) %7B%... |
7fd10360c86461e222e360e410f99514b48d5efc | Fix test | test/index.js | test/index.js | /* global describe, it */
'use strict'
var ndarray = require('ndarray')
var ndt = require('ndarray-tests')
var linspace = require('../')
var assert = require('chai').assert
var pool = require('ndarray-scratch')
describe('linspace', function () {
it('create a new linspace with and endpoint', function () {
var x ... | JavaScript | 0.000004 | @@ -1409,16 +1409,17 @@
eros(%5B2,
+
2%5D)%0A
|
d882b5ea440d3f11b6d216f2c1158f13f6b1fa1e | fix quotes | test/index.js | test/index.js | var test = require("tape");
test("remove me", function(t){
t.plan(1);
t.fail("replace sample test with real tests");
}); | JavaScript | 0.000001 | @@ -16,14 +16,14 @@
ire(
-%22
+'
tape
-%22
+'
);%0A%0A
@@ -27,17 +27,17 @@
;%0A%0Atest(
-%22
+'
remove m
@@ -37,17 +37,17 @@
emove me
-%22
+'
, functi
@@ -75,17 +75,17 @@
t.fail(
-%22
+'
replace
@@ -115,9 +115,9 @@
ests
-%22
+'
);%0A%7D
|
744e13f5373912641f8b002aa989e6c87c04de8e | add edge cases for path value | test/index.js | test/index.js | 'use strict';
/* globals describe, it */
var assert = require('assert');
var get = require('../');
var isPlainObject = require('lodash.isplainobject');
describe('get', function(){
var o = { a: 'a', b: 'b', c: { c1: 'c1', c2: 'c2' } };
it('returns given object if path lookup totally fails', function(){
asse... | JavaScript | 0.000003 | @@ -884,24 +884,185 @@
2');%0A %7D);%0A%0A
+ it('path as empty string', function()%7B%0A assert.equal(get('', o), o);%0A %7D);%0A%0A it('path as empty array', function()%7B%0A assert.equal(get(%5B%5D, o), o);%0A %7D);%0A%0A
it('is cur
|
c5a1b00d93b4e7609ddd0fe831516cd8f49de19b | Update index.js | test/index.js | test/index.js | const tap = require('tap');
const fastlylib = require('../lib/fastlyJS.js') ;
tap('fastly-lib', function(test) {
var fastly = new fastlylib('fastly-api-key');
test.type(fastly, 'object', 'Returns an Object');
test.end();
}); | JavaScript | 0.000002 | @@ -75,16 +75,21 @@
) ;%0A%0Atap
+.test
('fastly
@@ -227,8 +227,9 @@
d();%0A%7D);
+%0A
|
6c7a9331d2af887aed02a8853c43c380af58b3c4 | correct variable name | priv/public/ui/app/components/mn_permissions.js | priv/public/ui/app/components/mn_permissions.js | (function () {
"use strict";
angular
.module("mnPermissions", [])
.provider("mnPermissions", mnPermissionsProvider);
function mnPermissionsProvider() {
this.$get = ["$http", "$timeout", "$q", "$rootScope", "mnBucketsService", mnPermissionsFacatory];
this.set = set;
var interestedPermission... | JavaScript | 0.000084 | @@ -293,34 +293,35 @@
var interest
-ed
+ing
Permissions = %5B%0A
@@ -1285,34 +1285,35 @@
_.clone(interest
-ed
+ing
Permissions);%0A
@@ -1370,34 +1370,35 @@
ontains(interest
-ed
+ing
Permissions, per
@@ -1417,34 +1417,35 @@
interest
-ed
+ing
Permissions.push
@@ -4284,34 +4284,35 @@
doCheck(interes... |
7bdf8ba21483e5920f54d5fe699d85f63b1ffc9d | fix post | post.js | post.js | var ACCESS_TOKEN = localStorage.getItem('accessToken');
var Snoocore = window.Snoocore;
var hash = window.location.hash;
var reddit = new Snoocore({
userAgent: '',
throttle: 1000,
oauth: {
type: 'implicit',
consumerKey: 'wtf',
redirectUri: 'wtf',
scope: [ 'read', 'submit' ]
}
});
if (document.location.hr... | JavaScript | 0 | @@ -1024,16 +1024,64 @@
%5D.data;%0A
+%0A%09%09%09var youtubeId;%0A%0A%09%09%09if (c.replies !== '') %7B%0A%09
%09%09%09var c
@@ -1116,35 +1116,18 @@
ildren;%0A
-%09%09%09var youtubeId;%0A
%0A
+%09
%09%09%09for (
@@ -1169,24 +1169,25 @@
%3C k; j++) %7B%0A
+%09
%09%09%09%09var cc =
@@ -1201,24 +1201,25 @@
ts2%5B... |
639468bf4e910bddbc68844be99fffcd8763ecf3 | Correct variable declarations for yyyy and dd | read.js | read.js | /*jshint esversion: 6 */
'use strict';
// Load required libraries
const AWSXRay = require('aws-xray-sdk-core');
const AWS = AWSXRay.captureAWS(require('aws-sdk'));
const dynamodb = new AWS.DynamoDB.DocumentClient();
const moment = require('moment-timezone');
exports.handler = (event, context, callback) => {
// Set t... | JavaScript | 0.875246 | @@ -428,10 +428,12 @@
at('
-DD
+YYYY
')%0A
@@ -482,36 +482,34 @@
= today.format('
-YYYY
+DD
')%0A const today
|
7835308de3b00c104c5a7c73874eecc20c2b2e64 | fix row.value | rows.js | rows.js | var ViewList = require('view-list')
var extend = require('extend')
var inherits = require('inherits')
var fields = require('data-fields')
function RowsView (options) {
if (!(this instanceof RowsView)) return new RowsView(options)
var rowHeight = options.rowHeight || 30
var height = window.innerHeight - rowHeigh... | JavaScript | 0.000003 | @@ -571,24 +571,30 @@
w.properties
+ %7C%7C %7B%7D
%0A var p
|
e4ec14de9b39f7a32ba4c5cf2104eef5d58ab9b4 | Rename file, fix 404 | site.js | site.js | L.mapbox.accessToken = 'pk.eyJ1IjoiYWx1bHNoIiwiYSI6ImY0NDBjYTQ1NjU4OGJmMDFiMWQ1Y2RmYjRlMGI1ZjIzIn0.pngboKEPsfuC4j54XDT3VA';
var map = L.mapbox.map('map', 'mapbox.light', { zoomControl: false })
.setView([38.898, -77.043], 12);
new L.Control.Zoom({ position: 'bottomright' }).addTo(map);
var dcBufferLayer = L.mapb... | JavaScript | 0.000001 | @@ -1551,25 +1551,25 @@
omeryCounty_
-B
+b
ike.geojson'
|
fd6d23c9a9ca2d4ac979ec611c3cfc21817dabe7 | add test without pattern | test/input.js | test/input.js | /**
* Created by daisy on 15/7/18.
*/
var co = require('co');
var expect = require('chai').expect;
var request = require('supertest-koa-agent');
var koa = require('koa');
var bodyParser = require('koa-bodyparser');
var input = require('../lib/input');
var util = require('util');
var onError = function *(next) {
tr... | JavaScript | 0.000002 | @@ -5428,27 +5428,31 @@
('input
-valid value
+without pattern
', funct
@@ -5464,119 +5464,580 @@
) %7B%0A
-%0A%7D);%0A%0Adescrib
+ var app = koa();%0A app.use(onError);%0A app.us
e(
-'
input
- without pattern', function () %7B%0A%0A%7D);%0A%0Adescribe('input with regex pattern', function () %7B%0A
+('que... |
6884ce0761e322131c1a6147cca73e8f531740b0 | remove unnecessary check | site.js | site.js | var ejs = require('ejs');
var url = require('url');
var crypto = require('crypto');
var when = require('when');
var nodefn = require('when/node');
var debug = require('debug')('site');
var util = require('./util');
var microformat = require('./microformat');
function getPathForUrl(u) {
return url.parse(u).pathname... | JavaScript | 0.000001 | @@ -2619,66 +2619,8 @@
) %7B%0A
- if (entries.length == 0) return null;%0A
|
47fdd8e42af02708a28e68ba80cb5a460d46348a | Make test/jsdoc.js run in node and browsers | test/jsdoc.js | test/jsdoc.js | var jsdoc = require('../lib/ast-utils/jsdoc.js');
var expect = require('chai').expect;
describe('jsdoc', function() {
describe('.parseJsdoc', function() {
it('parses single-line', function() {
var parsed = jsdoc.parseJsdoc('* Just some text');
expect(parsed).to.deep.eq({
description: 'Just ... | JavaScript | 0.000008 | @@ -6,85 +6,320 @@
sdoc
- = require('../lib/ast-utils/jsdoc.js');%0Avar expect = require('chai').expect;
+;%0A%0Atry %7B%0A // in browserify%0A jsdoc = require('hydrolysis').jsdoc;%0A%7D catch (e) %7B%0A // in node%0A jsdoc = require('../lib/ast-utils/jsdoc.js');%0A%7D%0A%0Atry %7B%0A // we're in node, we need to... |
cdb309e5ee811b13064cabedb7c52160cc8d47a7 | Add a FIXME about draft comments | ui/model/issue.js | ui/model/issue.js |
// https://codereview.chromium.org/api/148223004/?messages=true
function Issue()
{
this.description = "";
this.cc = []; // Array<User>
this.reviewers = []; // Array<User>
this.messages = []; // Array<IssueMessage>
this.messageCount = 0;
this.draftCount = 0;
this.owner = null; // User
th... | JavaScript | 0 | @@ -58,16 +58,103 @@
es=true%0A
+// FIXME: There's no obvious way to get the draft comments, the API doesn't have them.%0A
function
|
7c1182f8b481a272c631acb9ec3dd813f0fcbbdf | allow local sauce testing | test/karma.js | test/karma.js | var _ = require('lodash');
var os = require('os');
var CHROME_VERSION = '34'
var FIREFOX_VERSION = '28'
var SAFARI_VERSION = '7'
var IOS_VERSION = '7.1'
var ANDROID_VERSION = '4.3'
var browsers = {
'mac-chrome' : ['Mac 10.9', 'chrome', CHROME_VERSION],
'mac-firefox' : ['Mac 10.9', 'firefox', FIREFOX_VERSION],
... | JavaScript | 0 | @@ -2364,16 +2364,18 @@
D_ID;%0A
+%7D%0A
if (pr
@@ -2461,26 +2461,24 @@
lse') %7B%0A
-
config.sauce
@@ -2502,18 +2502,16 @@
quill';%0A
-
conf
@@ -2575,20 +2575,14 @@
22c2e';%0A
- %7D%0A
%7D%0A%7D%0A
|
ced14b49827d636891a5e60132e894cbec7b44d2 | Add more limit tests | test/model.js | test/model.js | var async = require("async");
var bay6 = require("../lib/");
var expect = require("chai").expect;
var mongoose = require("mongoose");
var request = require("supertest");
describe("Model", function() {
var app;
var server;
var model;
beforeEach(function() {
app = bay6();
app.options.prefix = "";
mo... | JavaScript | 0 | @@ -432,24 +432,460 @@
unction() %7B%0A
+ it(%22should return all documents if too high%22, function(done) %7B%0A model.limit(10);%0A%0A populateAndGet(function(err, res) %7B%0A expect(res.body.length).to.equal(6);%0A done();%0A %7D);%0A %7D);%0A%0A it(%22should return all documen... |
f95fa0ced23a0b2b8ea2818f26fc5b0cff34b232 | Add quick test for triggering custom events. | test/model.js | test/model.js | module("Model");
test("attributes", function() {
var Post = Model("post");
var post;
post = new Post();
same({}, post.attributes);
post = new Post({ title: "Foo", body: "..." });
same({ title: "Foo", body: "..." }, post.attributes);
equals("Foo", post.attr("title"));
});
test("attr and changes", func... | JavaScript | 0 | @@ -1816,24 +1816,99 @@
aved%22;%0A %7D);
+%0A $(document).bind(%22post:custom%22, function() %7B%0A state = %22custom%22;%0A %7D);
%0A%0A var post
@@ -1951,17 +1951,16 @@
..%22 %7D);%0A
-%0A
equal(
@@ -1994,25 +1994,24 @@
ost.save();%0A
-%0A
equal(%22sav
@@ -2022,13 +2022,66 @@
state);
+%0A%0A post... |
ab263b8ba075f588dffa6e1816d8a265e3ffe0e4 | test room update events | test/rooms.js | test/rooms.js | const test = require('tape')
const miniplug = require('./mocks/mp')
const nock = require('nock')('https://plug.dj')
test('Getting rooms by the current user', async (t) => {
t.plan(2)
nock.get('/_/rooms/me').reply(200, require('./mocks/rooms/me.json'))
const rooms = await miniplug().getMyRooms()
t.equal(rooms... | JavaScript | 0 | @@ -1037,12 +1037,1166 @@
mState()%0A%7D)%0A
+%0Atest('Updates %60room()%60 properties when updates come in', async (t) =%3E %7B%0A t.plan(9)%0A nock.get('/_/rooms/state').reply(200, require('./mocks/rooms/state.json'))%0A%0A const mp = miniplug()%0A await mp.getRoomState()%0A%0A mp.on('roomDescriptionUpdate', t.... |
720174704133dbb63fe36ef11dc790083e86c2a3 | Implement first test case | test/suite.js | test/suite.js | Upload = require('../lib/');
client = null
beforeEach(function() {
client = new Upload();
});
describe('new Client()', function() {
it('should do this')
});
| JavaScript | 0.998991 | @@ -21,16 +21,72 @@
/lib/');
+%0Aassert = require('assert');%0AS3 = require('aws-sdk').S3;
%0A%0Aclient
@@ -140,16 +140,45 @@
Upload(
+'turadmin', %7Bpath: 'images/'%7D
);%0A%7D);%0A%0A
@@ -232,17 +232,86 @@
uld
-do this')
+instasiate correctly', function() %7B%0A assert(client.s3 instanceof S3);%0A %7D);
%... |
7efed7543f40c662339ed148ec4b746db98a781f | update test/testr -- additions to test runner | test/testr.js | test/testr.js | // use this file to automate the running of tests.
var runr = require('../src/util/runr')
var execa = require('../src/cli/execa-commands')
function arr () {
execa({
cmd1: {cmd: 'node', args: ['append.js']},
cmd2: {cmd: 'node', args: ['collect.js']},
cmd3: {cmd: 'node', args: ['combine.js']},
cmd4: {c... | JavaScript | 0 | @@ -516,16 +516,347 @@
y'%7D)%0A%7D%0A%0A
+function lang () %7B%0A execa(%7B%0A cmd1: %7Bcmd: 'node', args: %5B'clone.js'%5D%7D,%0A cmd2: %7Bcmd: 'node', args: %5B'kind.js'%5D%7D%0A %7D, %7Bcwd: 'lang'%7D)%0A%7D%0A%0Afunction obj () %7B%0A execa(%7B%0A cmd1: %7Bcmd: 'node', args: %5B'dotPath.js'%5D%7D,%0A ... |
376fc4d83cefc896c530e70db48cdddf608f8711 | Add hash check to test, clean up written files | test/tests.js | test/tests.js | /***************************************************************************
### Copyright (C) 2015 by Vaughn Iverson
### git-blob-stream is free software released under the MIT/X11 license.
### See included LICENSE file for details.
***************************************************************************/
var a... | JavaScript | 0 | @@ -4863,32 +4863,66 @@
-console.log(%22Hash%22, hash
+assert(hash === 'fc6f4a212a7ce72994a4efa8d8d5b82b2baed22b'
);%0A
@@ -5100,48 +5100,48 @@
h: '
-668e29c2db77e9dfe7c914700be7df724807c648
+327b85ca3f29975db856a0477278671456ff908b
' %7D%0A
@@ -5483,11 +5483,8 @@
%0A
- //
fs.
|
7d4e45f38d95653853d9fb238822addae7cde596 | Add missing semicolons | test/tests.js | test/tests.js | import assert from 'assert';
import {Server} from 'ws';
import {rethinkdb as r, Promise, connect, protodef} from '../dist/node';
const path = '/db';
const db = 'my_database_name';
const queryRequest = r.table('turtles');
const queryResults = [{id: '1'}, {id: '2'}];
describe('RethinkdbWebsocketClient', () => {
const... | JavaScript | 0.999999 | @@ -2521,16 +2521,17 @@
E(0), 0)
+;
// toke
@@ -2616,16 +2616,17 @@
E(4), 4)
+;
// toke
@@ -2714,16 +2714,17 @@
ngth, 8)
+;
%0A
|
b93e79ce803a658f307b8a7d85b919cf7a5a362b | add stubs for tests | test/tests.js | test/tests.js | JavaScript | 0.000001 | @@ -0,0 +1,535 @@
+/*global describe:false*/%0Adescribe('d3.byte.scale', function () %7B%0A describe('scale()', function () %7B%7D);%0A%0A describe('#invert()', function () %7B%7D);%0A%0A describe('#domain()', function () %7B%7D);%0A%0A describe('#range()', function () %7B%7D);%0A%0A describe('#rangeRound()', func... | |
fdfa93f6472079f99b7866ec118ea8bacd4b025d | add www.appledaily.com.tw | url-normalizer.js | url-normalizer.js | (function(exports){
exports.query = function(url){
var url_parts = this.parse_url(url);
var ret = {};
ret.query_url = url;
switch (url_parts['hostname']) {
}
return null;
};
exports.parse_url = function(url){
if ('undefined' !== typeof(document) && 'undefined' !== typeof(document.c... | JavaScript | 0.000001 | @@ -165,24 +165,781 @@
stname'%5D) %7B%0A
+ case 'www.appledaily.com.tw':%0A // Ex: http://www.appledaily.com.tw/realtimenews/article/finance/20131225/314703/%E3%80%90%E5%8F%B0%E8%82%A1%E9%96%8B%E7%9B%A4%E3%80%91%E9%96%8B%E9%AB%98%E4%B8%8A%E6%BC%B211%E9%BB%9E%0A // /%7Bappledaily%7Crealtimenews%7D %E4%B8%... |
26beaea6e6f32d6111662c936c0a042a027ad0ce | Fix tests on node.js 0.10.x | test/tests.js | test/tests.js | /***************************************************************************
### Copyright (C) 2015 by Vaughn Iverson
### git-blob-stream is free software released under the MIT/X11 license.
### See included LICENSE file for details.
***************************************************************************/
var a... | JavaScript | 0.000102 | @@ -1622,40 +1622,33 @@
ert(
-Buffer.compare(hash, new Buffer(
+hash.toString('hex') ===
'668
@@ -1681,38 +1681,24 @@
f724807c648'
-,'hex')) === 0
);%0A %7D;%0A
@@ -2571,40 +2571,33 @@
ert(
-Buffer.compare(hash, new Buffer(
+hash.toString('hex') ===
'668
@@ -2634,30 +2634,16 @@
807c648'
-,'hex')) === 0
)... |
c96bb42212eef4a2464d4bce3ca5bb8f724fa252 | Use window.location | dmd.js | dmd.js | var DMD = (function(){
var div_content;
var div_menu;
var div_status;
var pages_md = {};
var pages_url = {};
var default_page_name = null;
function init(){
// window.onload = onLoadListener;
// window.onhashchange = onHashChangeListener;
// or
if (window.addE... | JavaScript | 0.000001 | @@ -2310,24 +2310,16 @@
window.
-content.
location
|
f14ca61f291ffeabafd787894c61cb45290598d6 | Enable include in EJS templates | ejs.js | ejs.js | #!/usr/bin/node
/** @file
* Template rendering logic
*
* This file contains the functionality required to render a template from the filesystem
* into the output stream of an HTTP request. The relevant interface function to be used
* from the outside is render.
*/
var ejs = require('ejs')
, fs = require('fs')... | JavaScript | 0 | @@ -3097,35 +3097,64 @@
%7B%0A%09%09
-fs.readFile(__dirname + tpl
+var full_path = __dirname + tpl;%0A%09%09fs.readFile(full_path
, 'u
@@ -3242,24 +3242,47 @@
compile(data
+, %7Bfilename: full_path%7D
);%0A%09%09%7D);%0A%09%7D%0A
|
3d2529435479adb140d7169638df3bf72cf3d6a0 | prevent double join. fix affiliation typo | muc.js | muc.js | /* jshint -W117 */
/* a simple MUC connection plugin
* can only handle a single MUC room
*/
Strophe.addConnectionPlugin('emuc', {
connection: null,
roomjid: null,
myroomjid: null,
members: {},
isOwner: false,
init: function (conn) {
this.connection = conn;
},
doJoin: function ... | JavaScript | 0.999885 | @@ -205,16 +205,35 @@
rs: %7B%7D,%0A
+ joined: false,%0A
isOw
@@ -2227,17 +2227,16 @@
r.affili
-c
ation =
@@ -2256,24 +2256,24 @@
iliation');%0A
+
memb
@@ -2330,32 +2330,172 @@
is.myroomjid) %7B%0A
+ if (member.affiliation == 'owner') this.isOwner = true;%0A if (!this.joined... |
69d870d10d2c98716744e88c95f19dd373a24725 | Use documented API | test.js | test.js | 'use strict'
if (!process.env.TRAVIS) process.env.CI = 'true'
var assert = require('assert')
var isCI = require('./')
assert.ok(isCI)
| JavaScript | 0 | @@ -124,11 +124,8 @@
sert
-.ok
(isC
|
288ac88ccad7184f73192ef15926a34f84ee5c0a | clarify that this is y-down | test.js | test.js | var assert = require('chai').assert;
var Rayish = require('./');
// precision param when comparing non-integers
var ALLOWED_DELTA = 0.00001;
describe('Rayish', function() {
describe('constructor', function() {
it('sets start point', function() {
var start = {x: 1, y: 2};
var other = {x: 3, y: 4};
... | JavaScript | 0.999999 | @@ -1391,16 +1391,40 @@
t points
+ (y increases downwards)
', funct
|
88dc6a342cdf3e644da7475b69aee30c5e6f26d9 | add more cases | test.js | test.js | var assert = require('assert'),
reverse = require('./');
assert.equal(reverse('abcd'), 'dcba');
assert.equal(reverse('abc'), 'cba');
assert.equal(reverse('ab𝌄de'), 'ed𝌄ba');
assert.equal(reverse('abc𝌄e'), 'e𝌄cba');
assert.equal(reverse('𝌄d'), 'd𝌄');
assert.equal(reverse('a𝌄'), '𝌄a');
console.log('ok');
| JavaScript | 0 | @@ -79,20 +79,148 @@
se('
-abcd'), 'dcb
+'), '');%0Aassert.equal(reverse('a'), 'a');%0Aassert.equal(reverse('%F0%9D%8C%84'), '%F0%9D%8C%84');%0Aassert.equal(reverse('%F0%9D%8C%84d'), 'd%F0%9D%8C%84');%0Aassert.equal(reverse('a%F0%9D%8C%84'), '%F0%9D%8C%84
a');
@@ -285,59 +285,16 @@
('ab
-%F0%9D%8C%84de'), 'ed%F0%9D%... |
6d174409ddd12f56c225a55ac696204a1bdcb0f2 | include test for ./ at the beginning of globs | test.js | test.js | 'use strict';
require('mocha');
var path = require('path');
var assert = require('assert');
var resolve = require('./');
var sep = path.sep;
var fixture;
var actual;
function unixify(filepath) {
return filepath.replace(/\\/g, '/');
}
describe('resolve', function () {
describe('posix', function () {
it('shoul... | JavaScript | 0.000005 | @@ -1046,13 +1046,8 @@
it
-.skip
('sh
@@ -1062,21 +1062,37 @@
dle
-dots in
+./ at the beginnnig of a
glob
-?
', f
@@ -1271,51 +1271,8 @@
');%0A
- assert.equal(actual.slice(-1), '/');%0A
|
c9a05a3b2d8cfc60ff0d14bc380715257a95a889 | clean up code style (fixed #4) | test.js | test.js | /*
Name: openkvk - test.js
Description: Test script for openkvk.js
Source: https://github.com/fvdm/nodejs-openkvk
Feedback: https://github.com/fvdm/nodejs-openkvk/issues
License: Public Domain / Unlicense (see LICENSE file)
*/
var util = require ('util');
// Setup
var app = require ('./');
/... | JavaScript | 0 | @@ -342,16 +342,17 @@
rors = 0
+;
%0Aprocess
@@ -393,16 +393,17 @@
rrors ==
+=
0) %7B%0A
@@ -1521,16 +1521,17 @@
ength ==
+=
0) %7B%0A
@@ -1764,38 +1764,32 @@
l, function (err
-, data
) %7B%0A doTest (
@@ -2050,38 +2050,32 @@
function (err
-, data
) %7B%0A doTest
|
ec6a83a7c70f8dc460f8b725108f0f820f619c39 | Add non-lower case tests | test.js | test.js | /*!
* falsey <https://github.com/jonschlinkert/falsey>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
require('mocha');
var assert = require('assert');
var isFalsey = require('./');
describe('falsey', function() {
it('should return false when truthy', function(... | JavaScript | 0.99997 | @@ -1255,30 +1255,59 @@
ey('nil'));%0A
+ assert(isFalsey('NIL'));%0A
%7D);%0A
-
%0A it('shoul
@@ -1376,24 +1376,54 @@
y('none'));%0A
+ assert(isFalsey('None'));%0A
%7D);%0A%0A it(
@@ -1498,24 +1498,54 @@
y('nope'));%0A
+ assert(isFalsey('nOPe'));%0A
%7D);%0A%0A it(
@@ -1616,24 +1616,52 @@
sey(... |
a53d789b7707b2f4e6756a848f3de74dd7e8d2b0 | update tests | test.js | test.js | /*!
* always-callback <https://github.com/tunnckoCore/always-callback>
*
* Copyright (c) 2015 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)
* Released under the MIT license.
*/
/* jshint asi:true */
'use strict'
var fs = require('fs')
var test = require('assertit')
var alwaysCallback = requir... | JavaScript | 0.000001 | @@ -2133,46 +2133,8 @@
T')%0A
- test.equal(err.syscall, 'open')%0A
@@ -2208,32 +2208,105 @@
res, undefined)%0A
+ if (err.syscall) %7B%0A test.equal(err.syscall, 'open')%0A %7D%0A
done()%0A
@@ -2825,77 +2825,8 @@
T')%0A
- // test.equal(err.syscall, 'stat') fails on node 1.0 ... |
df78d9b15df38e1048a3af3682789f1a67a9ad04 | test for properties order | test.js | test.js | 'use strict';
var assert = require('assert');
Object.assign = undefined;
var objectAssign = require('./');
it('should have the correct length', function () {
assert.equal(objectAssign.length, 2);
});
it('should throw when target is not an object', function () {
assert.throws(function () { objectAssign(null); }, Typ... | JavaScript | 0 | @@ -2057,16 +2057,313 @@
);%0A%7D);%0A%0A
+it('should preserve right properties order', function () %7B%0A%09var letters = 'abcdefghijklmnopqrst';%0A%09var source = %7B%7D;%0A%09letters.split('').forEach(function (letter) %7B%0A%09 source%5Bletter%5D = letter;%0A%09%7D);%0A%09var target = objectAssign(%7B%7D, sourc... |
573e68252c868d450fee7764fbf1d49143b4e4c5 | Allow overriding previously set values | test.js | test.js | var set = require('./index.js');
var assert = require('assert');
describe('mocha-let', function() {
var object = {};
set('object', () => object);
it("allows accessing the return value of the given function as the specified property on `this`", function() {
assert.equal(this.object, object);
});
});
| JavaScript | 0.000001 | @@ -145,16 +145,275 @@
ject);%0A%0A
+ context(%22in a sub-context%22, function() %7B%0A var aDifferentObject = %7B%7D;%0A set('object', () =%3E aDifferentObject);%0A%0A it(%22allows overriding the value of an existing property%22, function() %7B%0A assert.equal(this.object, aDifferentObject);%0A %7D)... |
b66d48c0ff516ae3ea2cff31f322121810bb7c7a | update tests | test.js | test.js | /*!
* list-deps <https://github.com/jonschlinkert/list-deps>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var should = require('should');
var assert = require('assert');
var listDeps = require('./');
describe('list deps', function () {
it('should return depen... | JavaScript | 0.000001 | @@ -197,231 +197,202 @@
var
-assert = require('assert');%0Avar listDeps = require('./');%0A%0Adescribe('list deps', function () %7B%0A it('should return dependencies from package.json:', function () %7B%0A listDeps().should.eql(%7B%22load-pkg%22: %22%5E0.2.0%22%7D
+deps = require('./');%0A%0Ait('should return dep... |
2a06476e08b9c8c7dae2c303323419805170306c | add test for moji background setting | test.js | test.js | var page = require("webpage").create()
page.open("./index.html", function(status) {
var result = page.evaluate(function() {
var buildFailed = false
var messages = []
var firstCell = $(".cell").first()
var lastCell = $(".cell").last()
test("Pen works", function() {
firstCell.mousedo... | JavaScript | 0 | @@ -140,16 +140,52 @@
dFailed
+ = false%0A var thisBuildFailed
= false%0A
@@ -204,16 +204,20 @@
ages
+
= %5B%5D%0A
@@ -233,16 +233,20 @@
tCell
+
= $(%22.ce
@@ -274,24 +274,28 @@
lastCell
+
= $(%22.cell%22)
@@ -1521,24 +1521,296 @@
r%22)%0A %7D)%0A%0A
+ test(%22Emoji back... |
a3bfa90b74e02acab494daac325db5b39c94d7fc | update tests | test.js | test.js | /*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
var expect = require('chai').expect;
var isObject = require('./');
it('when null is passed it should return false.', function () {
expect(isObject(null)).to.eql(false);
}... | JavaScript | 0.000001 | @@ -144,21 +144,21 @@
*/%0A%0Avar
-expec
+asser
t = requ
@@ -166,21 +166,16 @@
re('
-chai').expect
+assert')
;%0Ava
@@ -211,261 +211,797 @@
it('
-when null is passed it should return false.', function () %7B%0A expect(isObject(null)).to.eql(false);%0A%7D);%0A%0Ait('when %5B%5D is passed it should return false.',... |
f75ef864399f93ba2af7e8d02bfc4ffc3f6d0856 | improve tests for get_element | test.js | test.js | var arcsavvy = require('./main.js');
var cp = require('child_process');
var fs = require('fs');
var _ = require('underscore');
var nb_states = 8;
if( process.argv[2]=='index1' || process.argv[2]==undefined || process.argv[2]=='all' ) {
// test indexing exploration functions
console.log('TEST explore_recursive');
explo... | JavaScript | 0.000001 | @@ -376,24 +376,57 @@
(t,n);%0A%7D);%0A%0A
+console.log('TEST get_element');%0A
console.log(
@@ -472,23 +472,16 @@
.txt', '
-state0/
descript
@@ -487,16 +487,211 @@
tion.txt
+'));%0Aconsole.log(get_element('./tests/state2/file2.txt', 'file2.txt'));%0Aconsole.log(get_element('./tests/state7/subdir', 'subdir'));%0Ac... |
a8de2a1a839a645f6dc475abc6ede0e992864276 | Add tests for JSON and Atomics (#15) | test.js | test.js | import test from 'ava';
import isPlainObject from './index.js';
import {runInNewContext} from 'vm';
function Foo(x) {
this.x = x;
}
function ObjectConstructor() {}
ObjectConstructor.prototype.constructor = Object;
test('main', t => {
t.true(isPlainObject({}));
t.true(isPlainObject({foo: true}));
t.true(isPlainO... | JavaScript | 0 | @@ -653,24 +653,89 @@
ect(Math));%0A
+%09t.false(isPlainObject(JSON));%0A%09t.false(isPlainObject(Atomics));%0A
%09t.false(isP
|
53b1818fadd2c3e69d70c099a00022aefde86369 | Fix incorrect executive rights on `test.js` | test.js | test.js | 'use strict';
/**
* Module dependencies (smogFormula, assert).
*/
var smogFormula = require('./'),
assert = require('assert');
/**
* Assert, but up to 6 digits.
*/
function roundAssert(a, b) {
assert(Math.round(a * 1000000) === Math.round(b * 1000000));
}
/**
* Unit tests.
*/
describe('smogFormula()... | JavaScript | 0.001299 | |
e7333c7e0d4b30e936fa0b7cef6c46b6e0cd0892 | Test file update | test.js | test.js | var stap_2 = new Validator(".stap_2_form", {
groep: "required|integer",
naam: "required|alphanum|min:3|max:64",
vraag: "required|min:3|max:25",
link: "required|min:7|max:255|url",
naam_link: "required|min:3|max:35",
tekst: "required|min:3|max:35",
actie: "required|min:3|max:35",
zoekwoor... | JavaScript | 0 | @@ -1,18 +1,21 @@
var
-stap_2
+test_form
= new V
@@ -25,22 +25,20 @@
dator(%22.
+te
st
-ap_2
_form%22,
@@ -47,43 +47,12 @@
-groep: %22required%7Cinteger%22,%0A na
+n
am
+e
: %22r
@@ -91,48 +91,15 @@
-vraag: %22required%7Cmin:3%7Cmax:25%22,%0A link
+ammount
: %22r
@@ -110,205 +110,111 @@
re... |
c923b9271f82577b15f702dcbd2c5656fd5d2ee6 | Make test messages clearer | test.js | test.js | var test = require('tape')
var d3Convention = require('.')
function reset () {
/**
* Minimal reset.css for reliable `elm.offset*`
*/
document.body.parentElement.style.margin = 0
document.body.parentElement.style.padding = 0
document.body.style.margin = 0
document.body.style.padding = 0
// Reset the ... | JavaScript | 0.016346 | @@ -2339,39 +2339,35 @@
lue, 0, 'c.x(0)
-maps to
+===
0')%0A assert.lo
@@ -2407,39 +2407,35 @@
lue, 0, 'c.y(1)
-maps to
+===
0')%0A%0A assert.e
|
a0517d1d8ab1df7be5f5cab92e498600320edd53 | Update tests | test.js | test.js | /**
* Created by matheus on 5/14/16.
*/
import test from 'ava';
import translate from './index';
test('translate from \'\' (auto) to \'\' (english)', async t => {
try {
const res = await translate('Ik spreek Engels');
t.falsy(res.text.corrected);
t.falsy(res.text.correction);
t.... | JavaScript | 0.000001 | @@ -114,42 +114,27 @@
ate
-from %5C'%5C' (auto) to %5C'%5C' (english)
+without any options
', a
@@ -196,24 +196,16 @@
te('
-Ik spreek Engels
+vertaler
');%0A
@@ -207,37 +207,34 @@
r');%0A%0A t.
-falsy
+is
(res.text.correc
@@ -222,34 +222,38 @@
.is(res.text
-.corrected
+, 'translator'
);%0A t
@@ -... |
4397b15e5791df5af2bbbb139d7884fc098c166c | remove eroneous conditionals | trie.js | trie.js | 'use strict';
/**
* Expose `Trie`
*/
module.exports = Trie;
/**
* Trie constructor
*/
function Trie() {
this.data = {};
};
/**
* Add (an) element(s) to the trie
*
* @param {String}
*/
Trie.prototype.add = function(el) {
;(function _add(el, i, node) {
if (i == el.length) return;
var e = el... | JavaScript | 0.998857 | @@ -644,55 +644,8 @@
ngth
- && !n) return '';%0A if (i+1 == v.length && n
) re
|
351af149b99a7f56b9ac141aa2414b7890def65f | Remove app.normandy.enabled pref | user.js | user.js | user_pref("app.normandy.enabled", false);
user_pref("beacon.enabled", false);
user_pref("browser.library.activity-stream.enabled", false);
user_pref("browser.safebrowsing.downloads.enabled", false);
user_pref("browser.safebrowsing.malware.enabled", false);
user_pref("browser.safebrowsing.phishing.enabled", false);
user... | JavaScript | 0.000001 | @@ -1,46 +1,4 @@
-user_pref(%22app.normandy.enabled%22, false);%0A
user
|
fdbbeb89e71da29e03e1073fa9569e6b3d64d079 | Allow wrapping of window - $(window) | util.js | util.js |
(function(){
'use strict';
window.$ = (function(array, document, undefined) {
function $(selector, scope) {
return $.type(selector, 'Function') ? document.readyState === 'complete' ? selector() : $(document).on('DOMContentLoaded', selector) : new _(selector, scope);
}
function _(selector, scope) {
... | JavaScript | 0.000004 | @@ -350,16 +350,17 @@
ctor &&
+(
selector
@@ -368,16 +368,36 @@
nodeType
+ %7C%7C selector.window)
? %5Bsele
|
c88951e4dfe73cf94d522c9a7298658b1ff246df | Fix exception in render() with Collection argument | view.js | view.js | /* Base view */
var dust = require('dustjs-linkedin'),
app = require('./ridge'),
Promise = require('./util/promise'),
tagPattern = /<(\w+)[^>]*>/,
attrPattern = /\s+(\S+)\s*=\s*("[^"]*"|'[^']*')/g;
/* Extract wrapping element, attributes and contents */
function parseElement(html, callback) {
var m = html.match... | JavaScript | 0.000001 | @@ -3119,258 +3119,69 @@
%0A%0A%09%09
-var args = arguments%5B0%5D === true ? _.rest(arguments) : null;%0A%0A%09%09if(app.user)%0A%09%09%09data.user = app.user.toJSON();%0A%0A%09%09if (_view.model) %7B%0A%09%09%09var modelData = _view.model.toJSON();%0A%0A%09%09%09if(args)%0A%09%09%09%09data%5B_view.model.name.toCamel... |
7f60c4fba167c75eddd43aa718dc4724c041ebea | Increase boat speed | wave.js | wave.js | var Wave = {};
Wave.Game = function(game) {};
Wave.Game.prototype = {
init: function(){
this.count = 0;
this.waveTotalLength = 1600;
this.numWaves = 10;
this.waves = null;
this.boat = null;
},
preload: function(){
this.game.load.spritesheet('wave', 'wave.png', 160, 160);
this.game.lo... | JavaScript | 0.00001 | @@ -1440,17 +1440,17 @@
ity.x =
-5
+9
0; // Co
@@ -1463,22 +1463,20 @@
ly move
-camera
+boat
to the
|
d8dfc66edc1573e742e5da52bde42bc443a42a9a | remove timeout because update image feature will have uncertain time to response | src/es6/core/bridge/Bridge.js | src/es6/core/bridge/Bridge.js | // Bridge wrapper
// Designed for wrapping both iOS & Android bridge
import {Channel} from "./Channel";
const uuid = require('uuid-v4');
export class Bridge {
static get instance(){
return Bridge._instance
}
static set instance(bridge){
Bridge._instance = bridge
}
static callHandler(channel, opt, c... | JavaScript | 0.000001 | @@ -3719,148 +3719,8 @@
cb)
-%0A%0A // timeout for native to reply, clear the handler to prevent memory leak%0A setTimeout(() =%3E handlers.delete(uid), 30000)
%0A
|
116e735f9e63ed9ab5057c06485d9cc9769b4948 | Add results from select() to cache in TTLCachingDAO. | src/foam/dao/TTLCachingDAO.js | src/foam/dao/TTLCachingDAO.js | /**
* @license
* Copyright 2018 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
/**
* Time To Live (TTL) Caching DAO only caches find() operations
* for a limited amount of time.
*/
foam.CLASS({
package: 'foam.dao',
name: 'TTLCachingDAO',
extends: 'foam.dao.ProxyDAO',... | JavaScript | 0 | @@ -2049,16 +2049,47 @@
(x, sink
+, skip, limit, order, predicate
) %7B%0A
@@ -2199,16 +2199,47 @@
(x, sink
+, skip, limit, order, predicate
).then(f
@@ -2513,24 +2513,36 @@
.id%5D = o;%0A
+ %7D%0A
@@ -2560,30 +2560,16 @@
ache();%0A
- %7D%0A
|
ef46d1a71c7f1611455adb7493e782a7f87f3c2c | Fix ArrayView remove action so size doesn't change when it has focus. | src/foam/u2/view/ArrayView.js | src/foam/u2/view/ArrayView.js | /**
* @license
* Copyright 2019 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.u2.view',
name: 'ArrayView',
extends: 'foam.u2.View',
requires: [
'foam.core.FObject',
'foam.u2.layout.Cols',
'foam.u2.layout.Rows'
],
exports... | JavaScript | 0 | @@ -2446,16 +2446,17 @@
%7D%0A%0A
+
%5E .foam-
@@ -2487,31 +2487,161 @@
-padding: 2 0
+ margin-left: 4px;%0A padding: 0;%0A %7D%0A%0A %5E .foam-u2-ActionView-remove:focus %7B%0A border-width:
1
-0
px
- 8px;%0A
+;%0A margin-left: 4px;%0A padding: 0;%0A
%7D
|
cc5de7a5340ab8eb590d2bcfebad67ff8012983c | Add indents in saved config | util.js | util.js | const fs = require("fs");
function evalTemplate(template, scope) {
with(scope) {
try {
return eval(`\`${template.replace(/`/g, '\\`')}\``);
} catch (error) {
console.log("Error encountered while evaluating a template:");
console.log(`Message: ${error.message}`);
... | JavaScript | 0.000001 | @@ -695,16 +695,25 @@
y(object
+, null, 4
));%0A%7D%0A%0Am
|
cb10fc030f5b035de490c06fa10464bd531436f8 | Update deprecated warning on serve task. | tasks/serve.js | tasks/serve.js | module.exports = function(grunt) {
/**
* Define tasks to quickly get Drupal running.
*
* grunt serve
* Run Drupal via the PHP webserver and activate watch tasks.
* grunt serve:demo
* Run Drupal via the PHP webserver without running watch tasks.
* grunt serve:test
* Run Drupal via the PH... | JavaScript | 0 | @@ -885,23 +885,23 @@
s. Use %60
-install
+project
.profile
|
e17879def005f197471bb6047cebbdd344a3d186 | Add error logging to watch task | tasks/watch.js | tasks/watch.js | const gulp = require('gulp');
const watch = require('gulp-watch');
const path = require('path');
const config = require('../config');
gulp.task('watch', ['liveReload'], () => {
const folders = ['css', 'images', 'svg', 'static', 'fonts', 'js'];
if (config.html.run) {
folders.push('html');
}
folders.forEa... | JavaScript | 0.000001 | @@ -29,20 +29,19 @@
;%0Aconst
-w
+p
at
-c
h = requ
@@ -49,17 +49,11 @@
re('
-gulp-w
+p
at
-c
h');
@@ -51,35 +51,36 @@
('path');%0Aconst
-p
+w
at
+c
h = require('pat
@@ -72,27 +72,33 @@
= require('
-p
+gulp-w
at
+c
h');%0A%0Aconst
@@ -129,16 +129,54 @@
fig');%0A%0A
+const Log = require('./lib/logger');%... |
801b127f1921e3d948890b05ec40f882d9b82b43 | Trim whitespace from the beginning of a file. | tasks/wpcss.js | tasks/wpcss.js | /*
* grunt-wp-css
* http://www.cedaro.com/
*
* Copyright (c) 2014 Cedaro
* Licensed under the MIT license.
*/
'use strict';
module.exports = function( grunt ) {
var _ = require( 'underscore' ),
Comb = require( 'csscomb' ),
cssbeautify = require( 'cssbeautify' ),
fs = require( 'fs' ),
path = require( '... | JavaScript | 0.000005 | @@ -2167,24 +2167,125 @@
'%5Cn%5Cn%5Cn' );
+%0A%0A%09%09%09%09// Trim whitespace at the beginning of the file.%0A%09%09%09%09contents = contents.replace( /%5E%5Cs*/, '' );
%0A%09%09%09%7D%0A%0A%09%09%09gr
|
12e07d69e005c996075c5f07ce9efc38d96ce6be | Remove unneeded parameters in runExportCommand() | tasks/xcode.js | tasks/xcode.js | /*
* grunt-xcode
* https://github.com/matiassingers/grunt-xcode
*
* Copyright (c) 2014 Matias Singers
* Licensed under the MIT license.
*/
'use strict';
var Promise = require('bluebird');
var exec = Promise.promisify(require('child_process').exec);
var temporary = require('temporary');
String.prototype.format =... | JavaScript | 0 | @@ -3360,111 +3360,8 @@
');%0A
- command.push('-exportFormat ipa');%0A command.push('-project %22%7B0%7D%22'.format(options.project));%0A
|
10d260b88a55ded0ab1cea6aa762edf461b55500 | Append graph to directive element | app/scripts/directives/radarDiagram.js | app/scripts/directives/radarDiagram.js | 'use strict';
angular.module('techRadarApp').directive('radarDiagram', [ 'radarService', function(radarService){
return {
restrict: 'E',
templateUrl: 'views/radar.html',
replace: true,
link: function(scope, element, attrs) {
var numCategories = radarService.categories.length, equalPortions = [... | JavaScript | 0.000001 | @@ -954,14 +954,18 @@
ect(
-%22body%22
+element%5B0%5D
).ap
|
507476b3d271dd6fe27fd3ea7002ff18e386a65d | Fix Pagination icon paths. | app/src/containers/Pagination/index.js | app/src/containers/Pagination/index.js | import React, { Component, PropTypes } from 'react';
import Anchor from 'grommet/components/Anchor';
import Box from 'grommet/components/Box';
import Button from 'grommet/components/Button';
import Next from 'grommet/components/Icons/base/Next';
import Previous from 'grommet/components/Icons/base/Previous';
export cla... | JavaScript | 0 | @@ -213,33 +213,33 @@
mmet/components/
-I
+i
cons/base/Next';
@@ -284,9 +284,9 @@
nts/
-I
+i
cons
|
f5d0ab8fed19b9f61f089c1cd7ff01d457e33e93 | Allow loading of external urls specified in the swagger resource location | springfox-swagger-ui/src/web/js/springfox.js | springfox-swagger-ui/src/web/js/springfox.js | $(function() {
var springfox = {
"baseUrl": function() {
var urlMatches = /(.*)\/swagger-ui.html.*/.exec(window.location.href);
return urlMatches[1];
},
"securityConfig": function(cb) {
$.getJSON(this.baseUrl() + "/configuration/security", function(data) {... | JavaScript | 0 | @@ -810,24 +810,238 @@
);%0A %7D);%0A%0A
+ function maybePrefix(location, withRelativePath) %7B%0A var pat = /%5Ehttps?:%5C/%5C//i;%0A if (pat.test(location)) %7B%0A return location;%0A %7D%0A return withRelativePath + location;%0A %7D%0A%0A
$(docume
@@ -1461,45 +14... |
733bc34d9873802b665a559f41f55ba7541a271a | test commit --skip-tests | src/06-components/atoms/lightbox/lightbox.js | src/06-components/atoms/lightbox/lightbox.js | import registerElement from '../../../07-utilities/helpers.js';
export default function (tagName) {
function attachedCallback() {
let lb = {
parent: this.parentElement,
container: this.querySelector('.sc-lightbox-container') /*remove*/ || this.querySelector('.sc-lightbox__container'... | JavaScript | 0 | @@ -124,24 +124,25 @@
allback() %7B%0A
+%0A
let
|
0508d18985131b0b75e3c4885a42ba9d09f7eafc | return false for receive request handle db put error | receive/handler.js | receive/handler.js | 'use strict'
const querystring = require('querystring')
const database = require('../lib/storage/database')
const log = require('../lib/utility/log')
const route = require('../lib/http/route')
const request = require('./request')
module.exports.handle = (event, context, callback) => {
let data = Object.assign({}, ... | JavaScript | 0.000001 | @@ -620,16 +620,35 @@
llback)%0A
+ return false%0A
%7D%0A
|
74c1272573954633371596b3a2a4f56af1077675 | Update 01-blink.js | 01-blink.js | 01-blink.js | var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
led = new five.Led(10);
led.strobe();
}
);
| JavaScript | 0 | @@ -59,16 +59,133 @@
ard();%0A%0A
+/*%0A This is the most basic, just to prove we can connect to firmata.%0A BOARD:%0A 1 LED connected at output pin #10%0A */%0A%0A
board.on
|
c2618f02b207a1c9a93638d2209532fd60d5805a | Set startConnect: false and tunnelIdentifier | karma.conf.ci.js | karma.conf.ci.js | module.exports = function(config) {
require("./karma.conf")(config);
config.set({
customLaunchers: {
SL_Chrome: {
base: 'SauceLabs',
browserName: 'chrome',
version: '35'
},
SL_Firefox: {
base: 'SauceLabs',
browserName: 'firefox',
version: '30'
... | JavaScript | 0 | @@ -1124,24 +1124,145 @@
auceLabs: %7B%0A
+ testName: 'Script Loader Tests',%0A tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,%0A startConnect: false,%0A
record
|
1574122ddab80e07301c293879e637c06c4f5f7b | add notes | Algorithms/JS/arrays/matrices/numberOfIslands.js | Algorithms/JS/arrays/matrices/numberOfIslands.js | // Given a 2d grid map of '1's (land) and '0's (water), count the number of islands.
// An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically.
// You may assume all four edges of the grid are all surrounded by water.
// Example 1:
// 11110
// 11010
// 11000
// 00000
//... | JavaScript | 0 | @@ -425,16 +425,34 @@
(grid) %7B
+ // 156 ms runtime
%0A var
@@ -1284,8 +1284,50 @@
%7D%0A%7D%0A
+%0A%0A// ------------------------------------%0A
|
9dd4e979caa34f2b7a443b8d109e226cdd3a4deb | Improve view | connect_four.js | connect_four.js | $(document).ready(function(){
$(".checker00").click(function(){
$(".checker00").animate({top: "+=240px"});
});
$(".checker01").click(function(){
$(".checker01").animate({top: "+=600px"});
});
$(".checker02").click(function(){
$(".checker02").animate({top: "+=120px"});
});
$(".checke... | JavaScript | 0.000001 | @@ -24,16 +24,18 @@
ion()%7B%0A%0A
+%0A%0A
%0A
|
b076e9f14a0972c06a5502dfcfc3669bd38f9267 | Use Underscore | Brocfile.js | Brocfile.js | /* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
/... | JavaScript | 0.000001 | @@ -2376,16 +2376,119 @@
.js');%0A%0A
+app.import('bower_components/underscore/underscore-min.js', %7B%0A 'underscore': %5B%0A 'default'%0A %5D%0A%7D);%0A%0A
module.e
|
3fad1a59300df010c5e73ad3aa38a9295d6a1476 | update collection/filter — coverage | src/collection/filter.js | src/collection/filter.js | var make = require('./_make')
var makeIterator = require('../function/makeIterator_')
function arrFilter (arr, fn, thisObj) {
fn = makeIterator(fn, thisObj)
var result = []
if (arr == null) return result
var val
var i = -1
var j = -1
var len = arr.length
while (++i < len) {
val = arr[i]
if (f... | JavaScript | 0 | @@ -78,16 +78,61 @@
rator_')
+%0Avar hasOwn = Object.prototype.hasOwnProperty
%0A%0Afuncti
@@ -216,16 +216,160 @@
lt = %5B%5D%0A
+ // istanbul ignore if%0A // due to the way %60_make%60 works at present, a null or undefined list%0A // will return undefined. may change in future%0A
if (ar
@@ -682,24 +682,52 @@
... |
d8c119558d16dd50685446adabe8a7604f0934b0 | make the generator example more readable | src/common/generators.js | src/common/generators.js | 'use strict';
var I = require('immutable');
var seq = require('./lazyseq');
var current = function current(spec, stack) {
return stack.last().first();
};
var result = function result(spec, stack) {
return spec.extract(current(spec, stack));
};
var step = function step(spec, stack) {
var children = I.List(spe... | JavaScript | 0.00002 | @@ -2163,110 +2163,102 @@
:
-%5B%5B%5D, 0, 1%5D,%0A extract : function(node) %7B%0A var xs = node%5B0%5D;%0A var sz = node%5B1%5D;%0A%0A if (
+%7B%0A xs: %5B%5D,%0A sz: 0,%0A mx: 1%0A %7D,%0A extract : function(node) %7B%0A if (node.
sz =
@@ -2277,16 +2277,21 @@
return... |
95d611e817bcfef613ae2b785167ac82ec6c309d | fix node-style-guide preset | test/data/options/preset/node-style-guide.js | test/data/options/preset/node-style-guide.js | // Use single quotes, unless you are writing JSON.
var foo = 'bar';
// Your opening braces go on the same line as the statement.
// Also, notice the use of whitespace
// before and after the condition statement.
if (true) {
console.log('winning');
}
// One method per line should be used if you want to chain methods... | JavaScript | 0.000002 | @@ -1941,17 +1941,17 @@
;%0A%7D%0A%0A//
-s
+S
hows els
|
5edf82378fbbceb8fef620e4294e1895882978b5 | fix syntax on Dialog.js | src/components/Dialog.js | src/components/Dialog.js | // @flow
import React, { Component } from 'react';
import {
View,
StyleSheet,
Animated,
Dimensions,
BackAndroid,
} from 'react-native';
import Overlay from './Overlay';
import DefaultAnimation from '../animations/DefaultAnimation';
import { type DialogType } from '../Type';
const { width: screenWidth, hei... | JavaScript | 0.000007 | @@ -248,15 +248,15 @@
port
- %7B
type
+ %7B
Dia
|
7191c43e49f302b1c3cd7a81bd866bc7a539f507 | add key and order for video | src/components/Player.js | src/components/Player.js | import React, { Component, PropTypes } from 'react';
import classNames from 'classnames';
import Manager from '../Manager';
import BigPlayButton from './BigPlayButton';
import LoadingSpinner from './LoadingSpinner';
import PosterImage from './PosterImage';
import Video from './Video';
import Bezel from './Bezel';
imp... | JavaScript | 0 | @@ -5310,32 +5310,72 @@
= c;%0A %7D%7D%0A
+ key=%22video%22%0A order=%7B0.0%7D%0A
%7B...prop
|
5f2696b294b4ebc4f3b9fd9daf314915755baf0f | refactor percentageData function | src/js/components/LangChart.js | src/js/components/LangChart.js | /**
* Programming language popularity chart based on Highcharts
* Please note that this file is dual licensed since Highcharts
* is licensed under CC BY-NC 3.0
* If Highcharts gets replaced in the future this class
* will be licensed under AGPL-3.0 only
* @author Fabian Beuke <mail@beuke.org>
* @license AGPL-3.0... | JavaScript | 0.000384 | @@ -1999,41 +1999,44 @@
l =
-map(sum)(
+data %7C map('data') %7C
unzip
-(
+ %7C
map(
-'data')(data))
+sum
)%0A
@@ -2052,31 +2052,32 @@
urn
-map(update('data')(d =%3E
+data %7C map((x =%3E total %7C
zip
@@ -2093,24 +2093,28 @@
de)(
-d)(total)))(
+x)) %7C update('
data
+')
)%0A
@@ -2521,19 +2521,17 @@
... |
444205f620a85eaabe3e51689043a1e3995ce1ac | Fix jobs status display | src/js/pages/jobs/JobsTable.js | src/js/pages/jobs/JobsTable.js | import classNames from "classnames";
import { Link } from "react-router";
import prettycron from "prettycron";
import React from "react";
import { Table, Tooltip } from "reactjs-components";
import Icon from "../../components/Icon";
import JobStates from "../../constants/JobStates";
import JobTableHeaderLabels from ".... | JavaScript | 0 | @@ -5668,74 +5668,8 @@
re%22)
-,%0A %22text-color-white%22: jobState.stateTypes.includes(%22active%22)
%0A
|
99770efeab9b767c4917a74c41eb93d180c7275b | Fix pagination error when rowCount is null | src/js/paginationController.js | src/js/paginationController.js | var TEMPLATE = [
'<span id="pageRowSummaryPanel" class="ag-paging-row-summary-panel">',
'<span id="firstRowOnPage"></span>',
' to ',
'<span id="lastRowOnPage"></span>',
' of ',
'<span id="recordCount"></span>',
'</span>',
'<span clas="ag-paging-page-summary-panel">',
'<button class="... | JavaScript | 0.001197 | @@ -1405,24 +1405,72 @@
ed'%0A if (
+typeof this.datasource.rowCount === 'number' &&
this.datasou
|
1660a267bad076f50f5591fd2498071df83e9bd8 | remove unnecessary div and props | client/src/templates/Guide/components/GuideFooter.js | client/src/templates/Guide/components/GuideFooter.js | import React from 'react';
import PropTypes from 'prop-types';
import { Link, Spacer } from '../../../components/helpers';
const propTypes = {
githubPath: PropTypes.string
};
const GuideFooter = props => {
const { githubPath } = props;
return (
<div>
<Spacer />
<hr />
<h4>Contributing to th... | JavaScript | 0.000002 | @@ -171,16 +171,17 @@
ring%0A%7D;%0A
+%0A
const Gu
@@ -196,27 +196,9 @@
r =
-props =%3E %7B%0A const
+(
%7B gi
@@ -211,41 +211,20 @@
th %7D
+)
=
- props;%0A return (%0A %3Cdiv%3E%0A
+%3E (%0A %3C%3E%0A
@@ -242,19 +242,15 @@
-
-
%3Chr /%3E%0A
-
@@ -288,18 +288,16 @@
h4%3E%0A
... |
7a80fb893cb0735b12d1a15606726081f5770193 | remove console log | src/js/scopes/scopes.header.js | src/js/scopes/scopes.header.js | import React from 'react';
import { Link, IndexLink } from 'react-router';
import { connect } from 'react-redux';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import config from '../config';
import actions from '../actions';
import { classNames } from '../utillities';
import NavMore from '.... | JavaScript | 0.000003 | @@ -406,85 +406,8 @@
) %7B%0A
- console.log('++++++++++++++++++++++++++++++ HEADER PROPS', this.props);%0A%0A
|
4fb7d63d46f68fbf0c593bffbb716b248bc89ccb | clean up store creation in notebook-on-next | applications/notebook-on-next/store.js | applications/notebook-on-next/store.js | /* @flow */
import { combineReducers, createStore, applyMiddleware, compose } from "redux";
import { createEpicMiddleware, combineEpics } from "redux-observable";
import { Map as ImmutableMap } from "immutable";
import { reducers, state, epics as coreEpics } from "@nteract/core";
// TODO: Bring desktop's wrapEpic ov... | JavaScript | 0 | @@ -530,17 +530,67 @@
s.config
+,%0A core: reducers.core,%0A modals: reducers.modals
%0A
-
%7D);%0A%0Acon
@@ -769,80 +769,71 @@
,%0A
-// TODO FIXME FIXME FIXME%0A core: ImmutableMap(),%0A modals: ImmutableMap
+core: state.makeStateRecord(),%0A modals: state.makeModalsRecord
()%0A%7D
@@ -1103,16 +1103,16 @@
... |
c235f0511e23886a1c33d6721fa02914952f48d9 | Remove extra test noise. | tests/acceptance/brocfile-smoke-test-slow.js | tests/acceptance/brocfile-smoke-test-slow.js | 'use strict';
var tmp = require('../helpers/tmp');
var conf = require('../helpers/conf');
var Promise = require('../../lib/ext/promise');
var path = require('path');
var rimraf = Promise.denodeify(require('rimraf'));
var fs = require('fs');
var ncp = Promise.denodeify(require('... | JavaScript | 0 | @@ -1935,26 +1935,8 @@
st')
-.then(console.log)
;%0A
|
11c1ea865bddbbfac9a6e93b79f8e80bff68a225 | Fix PROTOCOL logs that have intermediate \n chars (#1947) | logger.js | logger.js | 'use strict';
// Log class
var constants = require('haraka-constants');
var config = require('./config');
var plugins;
var connection;
var outbound;
var util = require('util');
var tty = require('tty');
var logger = exports;
logger.levels = {
DATA: 9,
PROTOCOL: 8,
DEBUG: 7,
INFO... | JavaScript | 0.000001 | @@ -1876,18 +1876,16 @@
/g, '%5C%5Cn
-%5Cn
');%0A
|
87675a7055bed667031dcec72bd54a6a34652b61 | round that score to nearest whole number | src/containers/Result.js | src/containers/Result.js | import { connect } from 'react-redux'
import Result from '../components/Result'
import find from 'lodash/find'
// Result box.
function mapStateToProps(state) {
const {
db: { contact, scores, resultBox, options, questions },
quiz: { score },
} = state
// Find the correct info based on the score vaue.
c... | JavaScript | 0.999977 | @@ -463,16 +463,27 @@
reStr =
+(Math.round
((score
@@ -501,16 +501,17 @@
) * 100)
+)
.toStrin
|
019c9e83f8a32e41e17ae73fd6c7f93c2b3b9876 | Fix hacker-news regression from graylist filter | src/feeds/hacker-news.js | src/feeds/hacker-news.js | var fetchFeed = require('../fetch-feed');
var filterFeed = require('../filter-feed');
var patterns = require('../util').patterns;
var url = require('url');
var rScorePrefix = /^\d+\s+\S+\s+/;
function createDomainSuffix(entry) {
var link = entry.find('link', 'href') || '';
return (!link.length ? '' : ' ('+link.ma... | JavaScript | 0.000025 | @@ -171,16 +171,28 @@
fix = /%5E
+(%5C%5B%5Cw+%5C%5D%5Cs)?
%5Cd+%5Cs+%5CS
@@ -586,16 +586,18 @@
refix, '
+$1
');%0A
|
ffb82fb38b1ce1f7bc5523165301f51c13b05a59 | add support to Select | lib/assets/javascripts/esphinx/ui/selectors/select.js | lib/assets/javascripts/esphinx/ui/selectors/select.js | var
esPhinx,
Constructor,
Extensor;
(function($, $module) {
"use strict";
const
CSS_CLASS = "esphinx ui",
CSS_CLASS_QUERY = "." + CSS_CLASS.replace(/ +/g, ".");
$module.extend({
selectors: {Select: {}}
});
Extensor.new($module.selectors.Select, true, {
... | JavaScript | 0 | @@ -3258,32 +3258,407 @@
%7D,%0A%0A
+ resolveParameters = function(options) %7B%0A if(!parameters) %7B%0A options = %7B%7D;%0A %7D%0A%0A if(!options.developmentMode %7C%7C%0A typeof options.... |
a1dce3fcbe7ef9b6fb72ea0256a2e4b045854b4c | Update to new css: style. | src/foam/u2/PopupView.js | src/foam/u2/PopupView.js | /**
* @license
* Copyright 2014 Google Inc. All Rights Reserved.
*
* 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 requir... | JavaScript | 0 | @@ -716,72 +716,15 @@
%0A%0A
-axioms: %5B%0A foam.u2.CSS.create(%7B%0A code: function() %7B/*%0A
+css: %60%0A
@@ -733,18 +733,16 @@
%7B%0A
-
-
backgrou
@@ -747,26 +747,24 @@
ound: #999;%0A
-
box-sh
@@ -795,18 +795,16 @@
;%0A
-
color: w
@@ -805,26 +805,24 @@
lor: white;%... |
2cc9a2d756a05a8f24390be4677321cb54caa7f9 | set up generic key for callbacks on search completion | armstrong/hatband/static/generickey.js | armstrong/hatband/static/generickey.js | var jQuery = jQuery || django.jQuery;
var armstrong = armstrong || {};
armstrong.widgets = armstrong.widgets || {};
armstrong.widgets.generickey = function($, options) {
var id = options.id,
object_id_name = options.object_id_name || "object_id",
content_type_name = options.content_type_name || "content_... | JavaScript | 0 | @@ -580,16 +580,65 @@
(%22tr%22),%0A
+ searchDone = options.searchDone %7C%7C $.noop,%0A
pa
@@ -642,24 +642,24 @@
params = %7B%0A
-
obje
@@ -858,43 +858,8 @@
) %7B%0A
- $(document).ready(function() %7B%0A
@@ -995,16 +995,26 @@
';%0A
+ var app =
VS.init
@@ -1786,24 +1786,53 @@
... |
d6911d105b65317fd9fe46c1b0e1591ff587a689 | clean up unused test code | tests/test.js | tests/test.js | //make "use strict" and nodejs happy
var window = this
//test reporting for saucelabs
if (typeof window != "undefined") {
window.global_test_results = {
tests: [],
duration: 0,
passed: 0,
failed: 0
};
}
if (!this.console) {
var log = function(value) {document.write("<pre>" + value + "</pre>")}
this.consol... | JavaScript | 0.000003 | @@ -1,219 +1,4 @@
-//make %22use strict%22 and nodejs happy%0Avar window = this%0A%0A//test reporting for saucelabs%0Aif (typeof window != %22undefined%22) %7B%0A%09window.global_test_results = %7B%0A%09%09tests: %5B%5D,%0A%09%09duration: 0,%0A%09%09passed: 0,%0A%09%09failed: 0%0A%09%7D;%0A%7D%0A%0A
if (
@@ -160,165 +... |
97a365316a3ec8eab4ab010c371613df61716553 | Rename "Product" tab to "Transcript". Resolves #102 | scripts/components/result/details/_inventory.js | scripts/components/result/details/_inventory.js | 'use strict';
module.exports = [
{
name: 'Location',
capability: 'location',
reactClass: require('./location.jsx')
},
{
name: 'Product', // for display
capability: 'domains',
reactClass: require('./domains.jsx')
},
{
name: 'Homology',
capability: 'homology',
reactClass:... | JavaScript | 0.000015 | @@ -149,14 +149,17 @@
e: '
-Produc
+Transcrip
t',
|
a87dfa91ebfe7816cfdd2770903a09719b7710d6 | Use resolveRule instead of resolveRules | biz/webui/cgi-bin/lookup-tunnel-dns.js | biz/webui/cgi-bin/lookup-tunnel-dns.js | var url = require('url');
var properties = require('../lib/properties');
var rules = require('../lib/proxy').rules;
var util = require('../lib/util');
module.exports = function(req, res) {
var tunnelUrl = properties.get('showHostIpInResHeaders') ? req.query.url : null;
if (typeof tunnelUrl != 'string') {
tunne... | JavaScript | 0.000002 | @@ -543,22 +543,20 @@
%7D%0A var
-_
rule
-s
= rules
@@ -567,17 +567,16 @@
olveRule
-s
(tunnelU
@@ -586,23 +586,16 @@
;%0A if (
-_rules.
rule) %7B%0A
@@ -651,15 +651,8 @@
her(
-_rules.
rule
|
0a1cceef5eb5e3474e03da818efce694630b4db3 | Update wallaby config | wallaby.config.js | wallaby.config.js | // const chai = require('chai');
module.exports = () => {
const config = {
files: [
{ pattern: 'lib/*.js' },
{ pattern: 'lib/**/*.js' },
{ pattern: 'test/tests-*.js', instrument: false }
],
tests: [
{ pattern: 'test/*.test.js' }
],
testFramework: 'mocha',
env: {
... | JavaScript | 0 | @@ -1,38 +1,4 @@
-// const chai = require('chai');%0A%0A
modu
@@ -320,56 +320,58 @@
ode'
+%0A
-// or full path to any node executable%0A %7D,%0A
+ %7D,%0A%0A // eslint-disable-next-line no-shadow
%0A
@@ -436,17 +436,16 @@
mework;%0A
-%0A
mo
@@ -463,32 +463,8 @@
');%0A
- // chai.should();%... |
14c81357bfd58fb1d48e9fa91745913a730bb7cf | Move requires closer to usage. | modules/core/widgets/services/widget-route-handler.js | modules/core/widgets/services/widget-route-handler.js | // DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details.
'use strict';
var evaluate = require('static-eval');
var parse = require('esprima').parse;
/**
* @description
* A route handler that determines what widgets to render for this request.
*/
function WidgetRouteHandler(scope) {
... | JavaScript | 0 | @@ -100,86 +100,8 @@
t';%0A
-var evaluate = require('static-eval');%0Avar parse = require('esprima').parse;%0A%0A
/**%0A
@@ -795,24 +795,26 @@
err) %7B%0A%0A
+
var layers =
@@ -839,24 +839,26 @@
layers;%0A
+
if (!layers)
@@ -856,24 +856,26 @@
(!layers) %7B%0A
+
next()
@@ -882,16 +882,18 @@
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.