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 |
|---|---|---|---|---|---|---|---|
4245104242a2cca07d6d03c3b26a1b5b48f49f94 | debug typeof in string.if | lib/output-engine/string.js | lib/output-engine/string.js | var utils = require('../utils'),
openTags = require('../parsers/open-tags'),
strictTags = /span|script|meta/,
Context = require('../context'),
Template = require('../template'),
View = require('../view');
// String Output Descriptor
function SOD() {
this.attributes = '';
this.classes = '';
this.children = '';
... | JavaScript | 0.000053 | @@ -2214,16 +2214,28 @@
if (type
+of condition
=== 'fu
|
06a2972cdbd019201aad84d4ce3975a637aa8cf7 | Exit code should return 1 when there are errors | lib/package/bundleLinter.js | lib/package/bundleLinter.js | //bundleLinter.js
var fs = require("fs"),
path = require("path"),
Bundle = require("./Bundle.js"),
request = require("request"),
async = require("async"),
debug = require("debug")("bundlelinter:");
function contains(a, obj, f) {
if (!a || !a.length) {
return false;
}
f =
f ||
function(lh, r... | JavaScript | 0.000011 | @@ -3444,32 +3444,259 @@
null);%0A %7D%0A
+ %0A // Exit code should return 1 when there are errors%0A bundle.getReport().some(function(value)%7B%0A if (value.errorCount %3E 0) %7B%0A process.exitCode = 1;%0A return;%0A %7D%0A %7D);%0A
%7D%0A %7D... |
f6345efce653ef6ec49dd51b66e3b95d3f99601d | Add honorCount to test config to prevent timeout being sent | test/www/jxcore/meta_tests/testPerfTestFramework.js | test/www/jxcore/meta_tests/testPerfTestFramework.js | 'use strict';
var PerfTestFramework = require('../../../TestServer/PerfTestFramework.js');
var TestDevice = require('../../../TestServer/TestDevice.js');
var tape = require('../lib/thali-tape');
var test = tape({
setup: function(t) {
t.end();
},
teardown: function(t) {
t.end();
}
});
test('#should be... | JavaScript | 0 | @@ -419,16 +419,35 @@
%22ios%22:2%7D
+, %22honorCount%22:true
%7D');%0A v
|
0aa8a8de0396212642102dfeb2dd712e7dea8505 | Remove warning on mapInteractor test. | testing/test-cases/phantomjs-tests/mapInteractor.js | testing/test-cases/phantomjs-tests/mapInteractor.js | /* global describe, it, beforeEach, afterEach, expect, $, geo */
describe('mapInteractor', function () {
'use strict';
// An event object template that will work with the interactor
// handlers.
var evtObj = function (type, args) {
args = $.extend({}, {
pageX: 0,
pageY: 0,
type: type,
... | JavaScript | 0 | @@ -2330,32 +2330,66 @@
map: map,%0A
+ momentum: %7Benabled: false%7D,%0A
panMoveBut
@@ -4009,32 +4009,66 @@
map: map,%0A
+ momentum: %7Benabled: false%7D,%0A
panMoveBut
|
fa0bbd7bd7e54522b27565145c3d64f6f20bfdc8 | Fix bug trying to sign up with Google or Facebook | api/controllers/UserController.js | api/controllers/UserController.js | module.exports = {
create: function (req, res) {
const { name, email, password } = req.allParams()
return User.create({name, email: email.toLowerCase(), account: {type: 'password', password}})
.tap(user => Analytics.trackSignup(user.id, req))
.tap(user => req.param('login') && UserSession.login(req, ... | JavaScript | 0 | @@ -135,16 +135,24 @@
, email:
+ email ?
email.t
@@ -163,16 +163,23 @@
erCase()
+ : null
, accoun
|
726338d333aaa6cdb0010a6abf42ab434d48d9b2 | Update Browser.js license to WTFPL | browser-extensions/Browser.js | browser-extensions/Browser.js | /*============================================================================
Simple Browser Detection Script
Author: Michael J. Ryan (http://tracker1.info)
Public Domain
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABI... | JavaScript | 0 | @@ -158,210 +158,459 @@
o)%0D%0A
-%0D%0APublic Domain%0D%0A%0D%0AThis library is distributed in the hope that it will be useful,%0D%0Abut WITHOUT ANY WARRANTY; without even the implied warranty of%0D%0AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+-------------------------------------------------------------... |
6411e5206bc55f1044031115f3c06f627bf9a8a8 | Improve get method to get user with all events | api/controllers/UserController.js | api/controllers/UserController.js | /**
* UserController
*
* @description :: Server-side logic for managing users
* @help :: See http://links.sailsjs.org/docs/controllers
*/
var Q = require('q');
module.exports = {
/**
* Basic CRUD
*/
create: function(req, res) {
sails.controllers['user'].add(req.params.all()).then(function(... | JavaScript | 0 | @@ -1437,32 +1437,57 @@
ser.find(scope).
+populate('participated').
exec(function(er
|
ee7d0b7b3110b89b87d344d6f742b7c01d38ef5a | fix path resolving when basisjs-tools and app located on different drives (fixes #12) | lib/server/modules/utils.js | lib/server/modules/utils.js | var path = require('path');
var chalk = require('chalk');
var toolsPath = path.resolve(__dirname + '/../../..');
function ralign(str, len){
while (str.length < len)
str = ' ' + str;
return str;
}
function logMsg(topic, message, verbose){
if (!verbose || module.exports.verbose)
console.log(chalk.cyan(ral... | JavaScript | 0 | @@ -640,17 +640,29 @@
%5D;%0A%0A
-f
+var resolvedF
ilename
@@ -693,25 +693,44 @@
ename);%0A
-%0A
-if (
+var toolsRelativePath =
path.rel
@@ -750,27 +750,110 @@
th,
-filename)%5B0%5D != '.'
+resolvedFilename);%0A%0A if (toolsRelativePath.charAt(0) != '.' && toolsRelativePath.indexOf(':') == -1
)%0A... |
a6e47a89cfae7a6326c446527b5b476c94c22094 | Fix typo | tests/destructuring-string/destructuring-string.es6 | tests/destructuring-string/destructuring-string.es6 | var data = 'hello';
function fn() {
var [a] = data;
return a;
}
assertEqual(fn(), 'h');
test(fn);
//
// function fn(a) {
// var [b] = a;
// }
//
// fn('a');
// fn('a');
// %OptimizeFunctionOnNextCall(fn)
// fn('a');
// --trace-escape | JavaScript | 0.999999 | @@ -101,144 +101,4 @@
n);%0A
-%0A%0A//%0A// function fn(a) %7B%0A// var %5Bb%5D = a;%0A// %7D%0A//%0A// fn('a');%0A// fn('a');%0A// %25OptimizeFunctionOnNextCall(fn)%0A// fn('a');%0A%0A// --trace-escape
|
433e4b2b907f4521a679e455ca961517042c9553 | Remove the dubagger from the file | app/assets/javascripts/company.js | app/assets/javascripts/company.js | $( document ).on('turbolinks:load', function() {
$('.modal-trigger').on('click',function(){
debugger
$('#modal1').modal();
})
}) | JavaScript | 0.000001 | @@ -91,21 +91,8 @@
()%7B%0A
- debugger%0A
|
fe60f9d5006e9b9f0412337a2400a6593bd416d1 | use regex for test in babel overrides | build/webpack/_development.js | build/webpack/_development.js | /* eslint key-spacing:0 */
import webpack from 'webpack'
import config from '../../config'
import _debug from 'debug'
const debug = _debug('app:webpack:development')
export default (webpackConfig) => {
debug('Create configuration.')
debug('Override devtool with cheap-module-eval-source-map.')
webpackConfig.dev... | JavaScript | 0.000001 | @@ -1206,32 +1206,45 @@
r =%3E %7B%0A if
+(/babel/.test
(loader.loader =
@@ -1245,20 +1245,9 @@
ader
- === 'babel'
+)
) %7B%0A
|
1b5aa6b1e338d7472ea41e591a03652f3b549025 | Fix animation frame | svenv/blog/static/blog/js/blog.js | svenv/blog/static/blog/js/blog.js | /**
* Blog javascript file
* Provides dynamic interaction on frontend
*/
/**
* Logic common for all views
*/
function View() {
'use strict';
/**
* Finds the current view
* @returns {string} The current view
*/
this.getView = function () {
if ($('body').hasClass('categoryview'))... | JavaScript | 0.000001 | @@ -4694,39 +4694,8 @@
s();
-%0A this.parallaxHeader();
%0A%0A
@@ -5095,24 +5095,55 @@
%7D)();%0A%0A
+ this.parallaxHeader();%0A
retu
@@ -5961,17 +5961,26 @@
axHeader
-(
+.bind(self
));%0A
|
40378e3b8ad8249d475a139f57f97e95f763c196 | Fix cloud signout path | app/assets/javascripts/signOut.js | app/assets/javascripts/signOut.js | var Fiware = Fiware || {};
Fiware.signOut = (function($, undefined) {
var portals = {
cloud: {
name: 'Cloud',
verb: 'GET',
protocol: 'http',
subdomain: 'cloud',
path: '/#auth/logout'
},
account: {
name: 'Account',
verb: 'GET',
prot... | JavaScript | 0.000001 | @@ -219,14 +219,8 @@
'/
-#auth/
logo
|
26cde6be23223126120519b24e0e10ba49660f23 | remove extraneous require | lib/utils/read-installed.js | lib/utils/read-installed.js |
// Walk through the file-system "database" of installed
// packages, and create a data object related to the
// installed/active versions of each package.
var npm = require("../../npm")
, fs = require("./graceful-fs")
, path = require("path")
, mkdir = require("./mkdir-p")
, asyncMap = require("./async-map")
... | JavaScript | 0.02835 | @@ -246,41 +246,8 @@
h%22)%0A
- , mkdir = require(%22./mkdir-p%22)%0A
,
|
8e3d46de4d6d99c685c2debb4855c8dae29c8f1c | update setitmeout | models/bookmark.js | models/bookmark.js | var mongoose = require('mongoose'),
Schema = mongoose.Schema,
ValidationError = require('mongoose/lib/error/validation'),
utils = require('../utils/function'),
http = require('http'),
url = require('url'),
phantom = require('phantom'),
fs = require('fs'),
request = require('request'),
... | JavaScript | 0.000001 | @@ -7250,17 +7250,17 @@
%7D,
-2
+9
00);%0A
|
7c71b461548eb49c8bf32db67896ad60c0541ba4 | add body.invalid_request to error checking during auth | wunderline-auth.js | wunderline-auth.js | var app = require('commander')
var inquirer = require('inquirer')
var request = require('request')
var Configstore = require('configstore')
var conf = new Configstore('wunderline')
var wrap = require('wordwrap')(80)
app
.description('Authenticate Wunderline')
.parse(process.argv)
var questions = [
{
name: '... | JavaScript | 0.000001 | @@ -1072,16 +1072,40 @@
dy.error
+ %7C%7C body.invalid_request
) %7B%0A
|
bdb77700d452c479bdbcfdbac4a1f8cdfdaa2ccc | handle empty db. | models/employee.js | models/employee.js | 'use strict';
const keyMirror = require('keymirror');
const _ = require('lodash');
const db = require('./db');
const Base = require('./base');
var internals = {};
const TYPE = 'Employee';
//uppercase to match usage on client and email sender.
const statuses = keyMirror({
InOffice: null,
OutOfOffice: null,
Sic... | JavaScript | 0.000001 | @@ -914,24 +914,76 @@
oyees) =%3E %7B%0A
+ if (!employees) %7B%0A return %5B%5D;%0A %7D%0A%0A
return
|
d5ef4ea487536f5e73378b8bd8efa0dc4b4b8ea8 | append user with feedback | models/feedback.js | models/feedback.js | var syBookshelf = require('./base'),
tbFeedback = 'feedback',
Feedback, Feedbacks;
Feedback = module.exports = syBookshelf.Model.extend({
tableName: tbFeedback,
fields: [
'id', 'userid', 'type', 'title', 'body', 'versioncode', 'device', 'posttime'
],
defaults: function () {
return {
posttime: new Date()
... | JavaScript | 0.00001 | @@ -252,16 +252,63 @@
me'%0A%09%5D,%0A
+%09omitInJSON: %5B'userid'%5D,%0A%09appended: %5B'user'%5D,%0A%0A
%09default
@@ -364,16 +364,95 @@
()%0A%09%09%7D;%0A
+%09%7D,%0A%09user: function () %7B%0A%09%09return this.belongsTo(require('./user'), 'userid');%0A
%09%7D%0A%7D);%0A%0A
|
4213028dbc286f43ae5fd28d9dbfa4786680d52f | Add Spinner | app/components/audit_log/Index.js | app/components/audit_log/Index.js | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
import DocumentTitle from 'react-document-title';
import Dropdown from '../shared/Dropdown';
import Icon from '../shared/Icon';
import Panel from '../shared/Panel';
import PageHeader from '../shared/PageHeader';
imp... | JavaScript | 0.000003 | @@ -364,16 +364,57 @@
Footer';
+%0Aimport Spinner from '../shared/Spinner';
%0A%0Aimport
|
31cf3ee0d74a0eba53fe0daeb88a914bdbccde89 | Fix process name | src/tasks.js | src/tasks.js | import nodemailer from 'nodemailer'
import { exec } from 'child_process'
function notifyViaEmail(
subject = 'Message',
text = 'This is a mail.',
to,
from
) {
let sender = from || process.env.NOTIFICATION_FROM || 'foo@bar.com'
let receiver = to || process.env.NOTIFICATION_TO || 'foo@bar.com'
... | JavaScript | 0.00152 | @@ -1345,11 +1345,18 @@
art
-npm
+xiayang.me
'%0D%0A%0D
|
a283345cfd54ad7ce77734814c57019d1b653880 | Fix for silly default in Station name field | models/stations.js | models/stations.js | var keystone = require('keystone'),
Types = keystone.Field.Types;
var Station = new keystone.List('Station', {
autokey: { from: 'name', path: 'key' }
});
Station.add({
name: { type: String, default: Date.now },
location: { type: Types.Location }
});
Station.register();
| JavaScript | 0 | @@ -190,27 +190,8 @@
ring
-, default: Date.now
%7D,%0A
|
e60575baf846e7e3013a36b2b46d837ae0da831f | Keep the default state of loading as false | app/components/audit_log/Index.js | app/components/audit_log/Index.js | // @flow
import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
import Panel from '../shared/Panel';
import ShowMoreFooter from '../shared/ShowMoreFooter';
import Spinner from '../shared/Spinner';
import AuditLogRow from './row';
const PAGE_SIZE = 30;
type Props = {... | JavaScript | 0.999691 | @@ -806,19 +806,20 @@
oading:
-tru
+fals
e%0A %7D;%0A%0A
|
a24cf796ce43fdc50caa4944d4f6da6479ba8120 | Fix token upload | src/token.js | src/token.js | import uuid from "uuid/v4";
import log from "./log";
import database from './databases';
const shouldRunCleanup = () => Math.floor(Math.random() * 10) === 0;
export default {
createToken: async (id) => {
try {
const newToken = await database.createToken(id, uuid());
if (newToken) {
log('inf... | JavaScript | 0.000018 | @@ -218,20 +218,18 @@
%7B%0A
-cons
+le
t newTok
@@ -232,16 +232,45 @@
wToken =
+ uuid();%0A const result =
await d
@@ -293,22 +293,24 @@
ken(id,
-uuid()
+newToken
);%0A
@@ -314,24 +314,37 @@
if (
-newToken
+result.rowCount === 1
) %7B%0A
@@ -386,24 +386,69 @@
essfully');%0A
+ %7D... |
a668f76dfa13fa20e33eaa6773896366926479ed | Allow retrieval of non saved values | www/js/services.js | www/js/services.js | angular.module('app.services', [])
.factory("settings", [function () {
// Central settings object containing the settings. Its initialized by querying the settings
// if settings found in local storage have a version smaller
// minCompatibleSettingsVersion they will be cleared.
// R... | JavaScript | 0.000001 | @@ -3408,24 +3408,105 @@
a(type)%0A %7B%0A
+ if(dataStorage%5Btype%5D == undefined)%0A %7B%0A dataStorage%5Btype%5D = %5B%5D;%0A %7D%0A
return d
|
ceef99d0ba426866f6a9e6ad2e3e3887148840fb | Swap add / remove order for program year stewards | app/components/detail-stewards.js | app/components/detail-stewards.js | import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
const { Component, RSVP, computed, inject, isEmpty, isPresent } = Ember;
const { map, all } = RSVP;
const { service } = inject;
export default Component.extend({
store: service(),
programYear: null,
isManaging: false,
bufferStewards... | JavaScript | 0 | @@ -2379,22 +2379,19 @@
ewardsTo
-Remove
+Add
.invoke(
@@ -2395,21 +2395,12 @@
ke('
-destroyRecord
+save
'));
@@ -2416,35 +2416,38 @@
d all(stewardsTo
-Add
+Remove
.invoke('save'))
@@ -2431,36 +2431,45 @@
oRemove.invoke('
-save
+destroyRecord
'));%0A this.se
|
32941ad0dc28bc31e392ecba152c252954120a7b | Update moves.js | mods/nuv2/moves.js | mods/nuv2/moves.js | exports.BattleMovedex = {
"waterpulse": {
inherit: true,
basePower: 80
},
"submission": {
inherit: true,
accuracy: 100,
basePower: 120,
category: "Physical",
secondary: {
... | JavaScript | 0.000001 | @@ -1091,15 +1091,436 @@
%0A %7D,%0A
+ %22psyshock%22: %7B%0A%09%09num: 473,%0A%09%09accuracy: 100,%0A%09%09basePower: 90,%0A%09%09category: %22Special%22,%0A%09%09defensiveCategory: %22Physical%22,%0A%09%09desc: %22Deals damage to one adjacent target based on its Defense instead of Special Defense.%22,%0A%09%09... |
5f31902f99ecb9729ddea428734ebaae703c8a62 | Remove extra new line from log | util.js | util.js | "use strict";
const fs = require("fs");
const prettyDate = function(date) {
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
return months[date.getUTCMonth()] + " " + date.getUTCDate() + ", " + date.getUTCFullYear();
};
const log = function(text) {
const messa... | JavaScript | 0.000001 | @@ -368,15 +368,8 @@
text
- + %22%5Cn%22
;%0A%0A%09
|
9f1c9793c04f2163fcb0fb00b7c6d250ef26e185 | Update utils.js | src/utils.js | src/utils.js | /*
MagJS v0.27.1
http://github.com/magnumjs/mag.js
(c) Michael Glazer
License: MIT
*/
(function(mag) {
'use strict';
var utils = {};
utils.isObject = function(obj) {
//For Safari
return Object.prototype.toString.call(obj).substr(-7) == 'Object]';
}
utils.isHTMLEle = function(item) {
return it... | JavaScript | 0.000001 | @@ -10,11 +10,11 @@
v0.2
-7.1
+6.9
%0Ahtt
@@ -800,20 +800,16 @@
ue = %5B%5D,
-%0A
schedul
@@ -814,15 +814,11 @@
uled
- = 0;%0A%0A
+=0;
%0A%0A
@@ -995,19 +995,16 @@
unction(
-now
) %7B%0A
@@ -1062,182 +1062,15 @@
())
-%7B%0A task();%0A // calculate how many millisends we have%0A... |
14dd74ae27b03eaedc518e53663472938d6f6861 | fix json path | www/js/services.js | www/js/services.js | angular.module('jsconfuy.services', [])
.service('Speakers', function ($http, $q){
this.get = function() {
var dfd = $q.defer();
$http.get('https://jsconfuy2015.herokuapp.com/speakers.json')
.success(function(data) {
dfd.resolve(data);
})
.error(function(data) {
dfd.reject(data);
... | JavaScript | 0.000252 | @@ -150,43 +150,8 @@
et('
-https://jsconfuy2015.herokuapp.com/
spea
@@ -432,43 +432,8 @@
et('
-https://jsconfuy2015.herokuapp.com/
agen
@@ -888,43 +888,8 @@
et('
-https://jsconfuy2015.herokuapp.com/
agen
|
7e8d5bb7c5d596278ad44a68d2983919b92ae047 | fix markdown image uploading. | app/components/markdown-editor.js | app/components/markdown-editor.js | export default Ember.Component.extend({
classNames: ['wh-markdown-editor'],
classNameBindings: ['whMarkdownEditorFullscreen'],
wyMarkdownEditorFullscreen: false,
selectionStart: 0,
didInsertElement: function () {
this.$('.fullscreen-toggle').on('click', this.toggleFullscreen.bind(this));
this.$('t... | JavaScript | 0 | @@ -1388,19 +1388,24 @@
nction (
-url
+response
) %7B%0A%0A
@@ -1412,16 +1412,38 @@
if (!
+response %7C%7C !response.
url) %7B%0A
@@ -1462,24 +1462,55 @@
n;%0A %7D%0A%0A
+ var url = response.url;%0A%0A
// hid
|
5e31f74de3be06ae64b1673d4e2c92aea7a7a492 | add support for lucene-style search queries | app/containers/SearchPage/saga.js | app/containers/SearchPage/saga.js | /**
* Gets the repositories of the user from Github
*/
import _ from 'lodash';
import { call, put, takeEvery, select } from 'redux-saga/effects';
import client from 'utils/client';
import makeSelectAuthHeader from '../AuthHeader/selectors';
import {
SEARCH_CHANGED,
AGG_VIEWED,
DATA_FETCHED,
AGG_SELECTED,
AG... | JavaScript | 0 | @@ -1916,17 +1916,17 @@
url =
-%60
+'
/studies
@@ -1936,24 +1936,9 @@
arch
-/$%7BsearchQuery%7D%60
+'
;%0A
|
8024f47ca6c5221d459365185d44b7027fd2b086 | clear ha timeout before adding a new one | mw/awareness/ha.js | mw/awareness/ha.js | 'use strict';
var async = require('async');
var drivers = require('soajs.core.drivers');
var coreModules = require("soajs.core.modules");
var core = coreModules.core;
var param = null;
var regEnvironment = (process.env.SOAJS_ENV || "dev");
regEnvironment = regEnvironment.toLowerCase();
var awarenessCache = {};
var ... | JavaScript | 0 | @@ -305,24 +305,45 @@
ache = %7B%7D;%0A%0A
+let timeout = null;%0A%0A
var lib = %7B%0A
@@ -3951,24 +3951,80 @@
cacheTTL) %7B%0A
+%09%09%09%09%09if (timeout) %7B%0A%09%09%09%09%09%09clearTimeout(timeout);%0A%09%09%09%09%09%7D%0A
%09%09%09%09%09param.l
@@ -4074,16 +4074,26 @@
);%0A%09%09%09%09%09
+timeout =
setTim... |
cf69aa55786ac5368e1d526a05668a34754f1bec | Add linkOpacity to conf | d3/test/helpers/defaultConf.js | d3/test/helpers/defaultConf.js | var defaultConf = {
linear: {
startLineColor: "#49006a",
endLineColor: "#1d91c0",
hideHalfVisibleLinks: false
},
circular: {
tickSize: 5
},
graphicalParameters: {
canvasWidth: 1000,
canvasHeight: 1000,
karyoHeight: 30,
karyoDistance: 10,
linkKaryoDistance: 20,
tickLabelFrequency... | JavaScript | 0 | @@ -400,16 +400,37 @@
e: 0.1,%0A
+%09%09%09linkOpacity: 0.9,%0A
%09%09%09butto
|
eaeda45d9c2249903c10e9bcdf39df6317a54801 | remove `.gitignore` placeholder file. | tools/lib/tools/create_app.js | tools/lib/tools/create_app.js | var fs = require('fs');
var path = require('path');
var globals = require("../core/globals");
var param = require("../core/params_analyze.js");
var file = require('../core/file.js');
var CREATE_APP = "create_app.json";
var PREFERENCES = "egretProperties.json";
function run(dir, args, opts) {
var app_name = args[0]... | JavaScript | 0 | @@ -3048,19 +3048,8 @@
t, %22
-egret-game/
.git
|
b62b1f8c4b16c3ea99cf114d8b1a8a1b44223f28 | Change to jade helpers. fixes #14 | modules/helpers.js | modules/helpers.js | /**
* Various helpers to be made available
*/
exports = module.exports = function(grunt){
// Modules
var path = require('path'),
_ = require('lodash'),
imageSize = require('image-size');
_.str = require('underscore.string');
_.mixin(_.str.exports());
// Variables
var projectData = grunt.config('project'... | JavaScript | 0 | @@ -1977,16 +1977,33 @@
indexOf(
+projectData.nav,
page);%0A%0A
|
1799b5b804101414330bc3881acd0d835657a4e9 | make vary macro output more verbose - absolutely zero help with debugging | vary.js | vary.js | //
// In C, it's difficult to have code that is variadic based on run time
// parameters. For instance you can't make C easily create a long as variable
// "a" in some cases and a byte as variable "a" in other cases based on some
// runtime variable's contents. You have to switch based on the type, often
// allocate m... | JavaScript | 0 | @@ -1336,16 +1336,29 @@
%7B%7Bx2%7D%7D*/
+%5C%5C%5Cn%22+%0A%09%22%5Ct%5Ct
%7B%7Bx3%7D%7D _
@@ -1374,17 +1374,29 @@
%7D%7D(x,i);
-
+%5C%5C%5Cn%22+%0A%09%22%5Ct%5Ct
stmt;%7D%5C%5C
|
3194b8b4637e12be4d276ee82a2b3f3ec0017df4 | Fix typo | tests/client/core/middleware/test_cspMiddleware.js | tests/client/core/middleware/test_cspMiddleware.js | import fs from 'fs';
import MockExpressRequest from 'mock-express-request';
import MockExpressResponse from 'mock-express-response';
import parse from 'content-security-policy-parser';
import log from 'core/logger';
import { csp, getNoScriptStyles } from 'core/middleware';
describe('CSP Middleware', () => {
const... | JavaScript | 0.999999 | @@ -314,25 +314,24 @@
const exis
-i
tingNodeEnv
@@ -406,17 +406,16 @@
V = exis
-i
tingNode
|
dbd365670a903807387a67e2ef57a101dc9cd8b1 | Remove console.log | tools/prefix-css-requirejs.js | tools/prefix-css-requirejs.js | var packageJson = require('json!package.json');
var prefix = require('./prefix-css');
module.exports = prefix.bind({}, packageJson, prefixCss);
function prefixCss(prefix, cssText) {
var match, results = [],
cssPattern = new RegExp("([^\\s][\\s\\S]*?)(\\{[\\s\\S]*?\\})", "g"),
selectors, prefixedSe... | JavaScript | 0.000004 | @@ -736,52 +736,8 @@
%5D);%0A
- console.log('skipping', match);%0A
|
d2a0b3c445fb5950d8669bb1cc4dd97edc5bb952 | update demo | docs/_gulpfile.js | docs/_gulpfile.js | // balm config demo
var balm = require('balm');
balm.config = {
roots: {
source: 'app'
},
paths: {
source: {
css: 'styles',
js: 'scripts',
img: 'images',
font: 'fonts'
}
},
styles: {
ext: 'scss'
},
scripts: {
entry: {
common: ['jquery'],
main: './a... | JavaScript | 0.000001 | @@ -372,16 +372,18 @@
%7D%0A //
+ ,
sprites
@@ -578,17 +578,17 @@
/to/your
--
+_
project'
@@ -728,77 +728,8 @@
) %7B%0A
- // manual delete %60assets%60 folder%0A // mix.remove('./assets');%0A%0A
@@ -779,32 +779,45 @@
,fonts) to %60
-./assets
+/path/to/your_project
/public%60%0A
@@ -869,73 +869... |
c2fde8351e700a9594f0b542d87d6c4f51dc2e22 | Fix for #311 | modules/numbers.js | modules/numbers.js | var writeInt = require('write-int')
module.exports = {
commands: {
num: {
help: 'Asks the bot to greet the channel',
usage: ['lang', 'number'],
command: function (bot, msg) {
if (msg.args.lang === 'jbo') {
msg.args.lang = 'jb'
}
var attempt = writeInt(msg.args.n... | JavaScript | 0 | @@ -90,41 +90,44 @@
p: '
-Asks the bot to greet the channel
+Outputs a number in a given language
',%0A
|
a73f2160d0483d028300abad31b4db6946f6f727 | Make Youtube module not freak out if no videos are found. | modules/youtube.js | modules/youtube.js | /*
Youtube module
@author Mikk Kiilaspää <mikk36@mikk36.eu>
*/
var https = require("https");
class Youtube {
constructor(moo) {
this.moo = moo;
this.moo.parser.on("privMsg", this.messageHandler.bind(this));
}
messageHandler(lineVars) {
var self = this;
var regExp = /http(s?):\/\/(?:youtu\.b... | JavaScript | 0 | @@ -1455,32 +1455,88 @@
%7D else %7B%0A
+ if (result.pageInfo.totalResults %3E 0) %7B%0A
me
@@ -1603,16 +1603,18 @@
+ %22%5C%22%22%0A
+
@@ -1713,24 +1713,26 @@
+
+ %22 by: %22 +
@@ -1769,16 +1769,109 @@
lTitle;%0A
+ %7D else %7B%0A ... |
3fa3482b3c02221ae6380980630b35729fc763f9 | Add test to make sure an error is triggered when ID is missing | test/test.js | test/test.js | test(".once('test1-2') properly executed", function() {
// Create one once('test1-2') call.
$('#test1 span').once('test1-2').data('test1-2', 'foo');
// Create another once('test1-2') call.
$('#test1 span').once('test1-2').data('test1-2', 'bar');
// The data should result to the first once() call.
var data... | JavaScript | 0 | @@ -1,12 +1,175 @@
+test(%22ID required%22, function() %7B%0A expect(1);%0A try %7B%0A $(%22#test1 span%22).once();%0A %7D%0A catch (e) %7B%0A ok(e, %22Error is triggered when ID is missing.%22);%0A %7D%0A%7D);%0A%0A
test(%22.once(
|
41e319b1ea5a821acca67d2f6018ec685ec9bece | Add JWT auth token when calling the import service to upload a deck | services/import.js | services/import.js | import {Microservices} from '../configs/microservices';
import formdata from 'form-data';
const util = require('util');
const log = require('../configs/log').log;
export default {
name: 'import',
create: (req, resource, params, body, config, callback) => {
req.reqId = req.reqId ? req.reqId : -1;
... | JavaScript | 0 | @@ -795,90 +795,8 @@
');%0A
- form.append('user', params.user);%0A form.append('jwt', params.jwt);%0A
@@ -1725,24 +1725,77 @@
body.timeout
+,%0A headers: %7B '----jwt----': params.jwt %7D,
%0A %7D,
|
62ed8e7d01f84c8da20caee14b3d9f2622b4862e | Make sure to init chrome extension in all cases. | static/js/services/chromeextension.js | static/js/services/chromeextension.js | /*
* Spreed WebRTC.
* Copyright (C) 2013-2014 struktur AG
*
* This file is part of Spreed WebRTC.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License... | JavaScript | 0 | @@ -1222,27 +1222,8 @@
rker
- && !this.available
) %7B%0A
|
611f34328e030cc799894b87c9ae4426f5b76856 | remove validation logic that wasn't finished | services/schema.js | services/schema.js | 'use strict';
var fs = require('fs'),
path = require('path'),
yaml = require('js-yaml'),
_ = require('lodash'),
db = require('./db'),
bluebird = require('bluebird');
/**
*
*
* Duck-typing
*/
function isComponent(obj) {
return _.isString(obj._type);
}
/**
* @param obj
* @param filter
*
* NOTE: Sho... | JavaScript | 0.000008 | @@ -1187,168 +1187,8 @@
%0A%7D%0A%0A
-/**%0A *%0A * @param %7B%7B%7D%7D data%0A * @param %7Bstring%7D schema%0A * @returns %7Bnull%7C%7C%5BError%5D%7D%0A */%0Afunction validateData(data, schema) %7B%0A var schema = getSchema(schema);%0A%7D%0A%0A
/**%0A
@@ -1928,52 +1928,8 @@
ts;%0A
-module.exports.validateData = va... |
8e5195c7473adb741195f3979a61cdeddb45bec9 | Fix bug | eln/Nmr1dManager.js | eln/Nmr1dManager.js | 'use strict'
define([
'file-saver',
'src/util/api',
'src/util/ui',
] , function (fileSaver, API, UI) {
class Nmr1dManager {
constructor() {
}
handleAction(action) {
switch (action.name) {
case 'downloadSVG':
var ... | JavaScript | 0.000001 | @@ -536,32 +536,58 @@
+ var advancedOptions1H = !
API.cache('nmr1
@@ -573,33 +573,33 @@
H = ! API.cache(
-'
+%22
nmr1hAdvancedOpt
@@ -606,12 +606,31 @@
ions
-', !
+%22);%0A
API
@@ -636,17 +636,17 @@
I.cache(
-'
+%22
nmr1hAdv
@@ -661,12 +661,330 @@
ions
-'));
+%22, advanced... |
55ab17d1bc5d11439e7c6a931165ef289b720aff | remove obsolete code from file-manager.js, | public/js/src/module/file-manager.js | public/js/src/module/file-manager.js | /**
* Simple file manager with cross-browser support. That uses the FileReader
* to create previews. Can be replaced with a more advanced version that
* obtains files from storage.
*
* The replacement should support the same public methods and return the same
* types.
*/
'use strict';
var store = require( './s... | JavaScript | 0 | @@ -484,95 +484,8 @@
);%0A
-%0Avar supported = typeof FileReader !== 'undefined';%0Avar notSupportedAdvisoryMsg = '';%0A%0A
var
@@ -625,17 +625,16 @@
nit() %7B%0A
-%0A
retu
@@ -640,331 +640,31 @@
urn
-new
Promise
-( function( resolve, reject ) %7B%0A if ( supported ) %7B%0A resolve( true... |
ed7de25c2763b36b0bc0460bc977ebbd8af7001a | Clear the overriden permissions if the role is changed | public/js/views/admin-permissions.js | public/js/views/admin-permissions.js | define(function (require) {
// Dependencies
var $ = require('jquery')
, _ = require('lodash')
, Backbone = require('backbone')
;
/**
* Setup view
*/
var View = {};
View.initialize = function() {
_.bindAll(this);
// Cache
this.$customize = this.$('[name="_custom_permissions"]');
this.$permiss... | JavaScript | 0.000001 | @@ -238,16 +238,51 @@
/ Cache%0A
+%09%09this.$role = $('%5Bname=%22role%22%5D');%0A
%09%09this.$
@@ -329,24 +329,24 @@
ssions%22%5D');%0A
-
%09%09this.$perm
@@ -507,16 +507,18 @@
oller');
+%09%09
%0A%0A%09%09// L
@@ -623,16 +623,140 @@
ions);%0A%0A
+%09%09// Check for the role to change and clear the custom perm... |
8ce262a90920724d29a47c6b5dedb52f72f8cf24 | Test coverage for poznamkyReducer. | ui/src/registrator/Poznamky/poznamkyReducer.test.js | ui/src/registrator/Poznamky/poznamkyReducer.test.js | import deepFreeze from 'deep-freeze';
import ucastniciTestData, {
AKTUALNI_DATUM_KONANI
} from '../../entities/ucastnici/ucastniciTestData';
import { getPoznamky } from './poznamkyReducer';
it('getPoznamky()', () => {
const state = ucastniciTestData;
const selected = [
{ datum: new Date(AKTUALNI_DATUM_KONANI... | JavaScript | 0 | @@ -1,42 +1,4 @@
-import deepFreeze from 'deep-freeze';%0A
impo
@@ -21,16 +21,16 @@
Data, %7B%0A
+
AKTUAL
@@ -165,16 +165,23 @@
znamky()
+ - n%C4%9Bco
', () =%3E
@@ -634,29 +634,8 @@
%5D;
-%0A deepFreeze(state);
%0A%0A
@@ -662,16 +662,16 @@
state;%0A
-
expect
@@ -755,8 +755,414 @@
d);%0A%7D);%0A
+%0... |
742c0d531fa59bb4444208fec2185ff0e643d6b5 | Add nonfunctional search bar | web/src/js/components/Search/SearchPageComponent.js | web/src/js/components/Search/SearchPageComponent.js | import React from 'react'
import PropTypes from 'prop-types'
import { isSearchPageEnabled } from 'js/utils/feature-flags'
import {
goTo,
dashboardURL
} from 'js/navigation/navigation'
import LogoWithText from 'js/components/Logo/LogoWithText'
class SearchPage extends React.Component {
constructor (props) {
s... | JavaScript | 0.000003 | @@ -54,16 +54,122 @@
-types'%0A
+import %7B withStyles %7D from '@material-ui/core/styles'%0Aimport TextField from '@material-ui/core/TextField'%0A
import %7B
@@ -347,16 +347,735 @@
hText'%0A%0A
+const styles = theme =%3E (%7B%0A bootstrapRoot: %7B%0A padding: 0,%0A 'label + &': %7B%0A marginTop: theme.s... |
5506aaea97de889c3bb9077c378ab8245fd19429 | Improve readability of test | test/event-component-factory-mocha.js | test/event-component-factory-mocha.js | // event-component-factory-mocha.js
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.should();
chai.use(chaiAsPromised);
var _ = require('underscore');
var noflo = require('noflo');
var componentFactory = require('../src/event-component-factory.js');
var test = require('./common-test... | JavaScript | 0.000248 | @@ -600,38 +600,69 @@
-return Promise.resolve
+var component = test.createComponent(componentFactory
(%7B%0A
@@ -862,84 +862,10 @@
%7D)
-.then(componentFactory).then(test.createComponent).then(function(component)%7B
+);
%0A
@@ -869,20 +869,16 @@
-
// have
@@ -924,20 +924,16 @@
ti... |
9a353d599c792ff529cf591bbef17792a624fc1f | Add tests for processJWTIfExists | test/middleware/processJWTIfExists.js | test/middleware/processJWTIfExists.js | const processJWTIfExists = require('middleware/auth/processJWTIfExists.js');
const {createValidTestJWT} = require('test/helpers.js');
const config = require('config.js');
describe('processJWTIfExists Middleware', function () {
describe('when there is a JWT in the header', function () {
describe('when the JWT i... | JavaScript | 0.000001 | @@ -66,24 +66,68 @@
xists.js');%0A
+const appFactory = require('appFactory.js')%0A
const %7Bcreat
@@ -266,16 +266,770 @@
n () %7B%0A%0A
+ beforeEach(function () %7B%0A this.app = appFactory();%0A%0A this.app%0A .get('/test-jwt', function (req, res) %7B%0A if (req.feathers.userId === undefined) %7B... |
f602727ab07f08dc3d829fa8383feb2b5226dd6f | Add tests to resultatService | test/spec/services/resultatService.js | test/spec/services/resultatService.js | 'use strict';
describe('ResultatService', function () {
describe('processOpenfiscaResult', function() {
var DROITS_DESCRIPTION = {
prestationsNationales : {
caf: {
label: 'CAF',
imgSrc: 'img',
prestations: {
... | JavaScript | 0 | @@ -350,24 +350,80 @@
l: 'ACS' %7D,%0A
+ missing: %7B shortLabel: 'TBD' %7D,%0A
@@ -763,16 +763,55 @@
ocaux: %7B
+%0A paris: %7B%7D%0A
%7D,%0A
@@ -2646,32 +2646,195 @@
);%0A %7D);%0A%0A
+ it('should not contain irrelevant result', fu... |
9b87e11c2527689ffe8b319acc48519a7b984b37 | use ipv4 | Crawler.js | Crawler.js | const JOIN_URL = 'https://join.gov.tw';
const JOIN_COMPLETED_URL = JOIN_URL + '/idea/index/search/COMPLETED?size=2';
const JOIN_ENDORSING_URL = JOIN_URL + '/idea/index/search/ENDORSING?size=2&status=FirstSigned';
const ARCHIVE_FOLDER = 'archive/';
const COMPLETED_ARCHIVE_FOLDER = ARCHIVE_FOLDER + 'completed/';
const ... | JavaScript | 0.000013 | @@ -3756,16 +3756,21 @@
%22-XGET%22,
+%22-4%22,
JOIN_SU
|
e129100f6d284fe64c32b02529f265b28f282af9 | check for non-existence of #init-data and handle gracefully | public/javascripts/main.js | public/javascripts/main.js | requirejs.config({
baseUrl: '',
paths: {
'flight': '/assets/bower_components/flight',
'component': '/assets/javascripts/component',
'page': '/assets/javascripts/page'
}
});
require(
[
'flight/lib/compose',
'flight/lib/registry',
'flight/lib/advice',
'flight/lib/logger',
'flight/... | JavaScript | 0 | @@ -386,24 +386,62 @@
g, debug) %7B%0A
+ var $initData;%0A var initData;%0A%0A
debug.
@@ -450,24 +450,24 @@
able(true);%0A
-
compos
@@ -577,27 +577,94 @@
t'%5D;%0A%0A
-var
+$initData = $('#init-data');%0A if ($initData.length %3E 0) %7B%0A
initData =
@@ -679,22 +679,16 @@
se... |
7c2ab02f41730eb3d9ce073893affb945e276c06 | add support gravatar | app/scripts/controllers/signup.js | app/scripts/controllers/signup.js | 'use strict';
angular.module('chatApp')
.controller('SignupCtrl', function ($scope, Auth, $location, mySocket) {
$scope.user = {};
$scope.errors = {};
$scope.register = function(form) {
$scope.submitted = true;
if(form.$valid) {
Auth.createUser({
name: $scope.user.name,
... | JavaScript | 0 | @@ -389,16 +389,134 @@
ssword,%0A
+ profileImg: %22http://www.gravatar.com/avatar/%22 + md5($scope.user.email.toLowerCase()) + %22?s=200&d=identicon%22%0A
|
7f28254fed423097e9b96e43340d28db3d8f610c | Fix CSP compatibility | webservice/src/main/resources/static/preferences.js | webservice/src/main/resources/static/preferences.js | var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
render(JSON.parse(this.responseText));
}
};
xhttp.open("GET", "./api/v1/preferences", true);
xhttp.send();
function render(preferences) {
for(var i = 0; i < preferences.length; ++i) {
rend... | JavaScript | 0.000005 | @@ -588,27 +588,100 @@
ked + %22
-onchange=%5C%22
+type=%5C%22checkbox%5C%22%3E%22 + pref.name;%0A%09%09div.firstElementChild.onchange = function() %7B%0A%09%09%09
updatedB
@@ -687,29 +687,24 @@
Boolean(
-'%22 +
pref.key
+ %22', t
@@ -691,29 +691,24 @@
ean(pref.key
- + %22'
, this.check
@@ -714,42 +714,13 @@
... |
65e259ccdef32c9e7049d31cbd4ca17068a77e2e | Set cli working dir to null if not defined in cli task take 3 | plugins/kalabox-cli/lib/tasks.js | plugins/kalabox-cli/lib/tasks.js | 'use strict';
/**
* This is a wrapper to build cli commands when an app has a cli.yml file
*/
module.exports = function(kbox) {
// Node
var fs = require('fs');
var path = require('path');
// Npm
var _ = require('lodash');
kbox.whenAppRegistered(function(app) {
// Load the tasks
if (_.get(app... | JavaScript | 0.00012 | @@ -3083,17 +3083,16 @@
%7D%0A%0A
-%0A
|
42c19e54aef5c3cc2e221e96d1bb590dca4dc704 | Tweak to zero pad times. Closes #31. | http/public/javascripts/application.js | http/public/javascripts/application.js | var Display = {
add_message: function(text) {
$('messages').insert({ bottom: '<li>' + text + '</li>' });
$('messages').scrollTop = $('messages').scrollHeight;
},
message: function(message) {
var text = '<span class="time">\#{time}</span> <span class="user">\#{user}</span> <span class="message">\#{... | JavaScript | 0 | @@ -353,16 +353,122 @@
w Date;%0A
+ var minutes = d.getMinutes().toString();%0A minutes = minutes.length == 1 ? '0' + minutes : minutes;%0A
var
@@ -504,23 +504,17 @@
' +
-d.getM
+m
inutes
-()
;
+
%0A
|
69813b0722e6b58ed2a063318e7f3551511ca8e9 | Remove uglify from EmbedBlock. | entry/EmbedBlock.js | entry/EmbedBlock.js | const BlockCaption = require('./BlockCaption')
const React = require('react')
const shiny = require('shiny')
const UglifyJS = require('uglify-es')
const url = require('url')
const r = React.createElement
function parseVideoURL (_url) {
const parsed_url = url.parse(_url, true)
... | JavaScript | 0 | @@ -123,51 +123,8 @@
y')%0A
-const UglifyJS = require('uglify-es')%0A
cons
@@ -1863,46 +1863,9 @@
ml:
-UglifyJS.minify(%60%0A
+%60
;(fu
@@ -1880,36 +1880,16 @@
indow)%7B%0A
-
wind
@@ -1928,36 +1928,16 @@
tion()%7B%0A
-
@@ -2003,62 +2... |
f91c602d43efc122016fc53db5f44a163ed3b74e | move to latest atom-shell | shell/Gruntfile.js | shell/Gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
"download-atom-shell": {
version: "0.20.4",
outputDir: "./atom-shell",
rebuild: true
}
});
grunt.loadNpmTasks('grunt-download-atom-shell');
};
| JavaScript | 0 | @@ -176,11 +176,11 @@
%220.2
-0.4
+1.2
%22,%0A
|
e8c477b1a5e420b606c161ee336a3fdaa8b40df3 | Update uiselect.js | ngapp/app/directives/uiselect.js | ngapp/app/directives/uiselect.js | function uiselect() {
return {
restrict: 'EA',
replace: true,
transclude: true,
controller: 'UISelectController',
scope: {
list: '=',
value: '=ngModel',
valuefield: '=?valuefield',
change: '=?change'
},
templateUrl: './ngapp/app/view/directives/uiselect.html',
... | JavaScript | 0.000001 | @@ -270,16 +270,20 @@
Url: './
+jfc/
ngapp/ap
|
2c5701a7651548d9b3aaf3864ebc2f65e3e58cb1 | Add aria key-value pairs so that a bunch of magic strings can be removed. | rocketbelt/base/rocketbelt.js | rocketbelt/base/rocketbelt.js | (function rocketbelt(window, document) {
window.rb = window.rb || {};
window.rb.getShortId = function getShortId() {
// Break the id into 2 parts to provide enough bits to the random number.
// This should be unique up to 1:2.2 bn.
var firstPart = (Math.random() * 46656) | 0;
var secondPart = (Math... | JavaScript | 0 | @@ -794,16 +794,423 @@
%7D%0A %7D;
+%0A%0A window.rb.aria = %7B%0A 'current': 'aria-current',%0A 'describedby': 'aria-describedby',%0A 'disabled': 'aria-disabled',%0A 'expanded': 'aria-expanded',%0A 'haspopup': 'aria-haspopup',%0A 'hidden': 'aria-hidden',%0A 'invalid': 'a... |
fa09a307b047aef177a10bb207d9f1cccc56d499 | Make ApplicationRoute Classy | tests/dummy/app/routes/application.js | tests/dummy/app/routes/application.js | import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default Route.extend({
storage: service(),
setupController() {
this._super(...arguments);
this.get('storage').write('test', 'it works');
},
});
| JavaScript | 0 | @@ -108,44 +108,66 @@
ult
+class Application
Route
-.
+
extend
-(%7B%0A storage: service(),
+s Route %7B%0A @service storage;
%0A%0A
@@ -194,17 +194,27 @@
-this._sup
+super.setupControll
er(.
@@ -241,22 +241,15 @@
his.
-get('
storage
-')
.wri
@@ -279,10 +279,7 @@
%0A %7D
-,
%0A%7D
-);
%0A
|
3c4d8f9e5378ba12e0e7bbd966c21f6b70bad158 | Improve debug logging in reqOpt decorator. (#367) | app/steps/decorateProxyReqOpts.js | app/steps/decorateProxyReqOpts.js | 'use strict';
function defaultDecorator(proxyReqOptBuilder /*, userReq */) {
return proxyReqOptBuilder;
}
function decorateProxyReqOpt(container) {
var resolverFn = container.options.proxyReqOptDecorator || defaultDecorator;
return Promise
.resolve(resolverFn(container.proxy.reqBuilder, container.user.req)... | JavaScript | 0 | @@ -8,16 +8,69 @@
rict';%0A%0A
+var debug = require('debug')('express-http-proxy');%0A%0A
function
@@ -386,16 +386,17 @@
function
+
(process
@@ -408,18 +408,16 @@
Opts) %7B%0A
-
de
@@ -452,18 +452,16 @@
;%0A
-
containe
@@ -497,24 +497,108 @@
dReqOpts;%0A
+
+ debug('Request options (after ... |
94f60ccc0a9440555da176d4a6f809c00ed87a9e | Complete string tests to pass | topics/about_strings.js | topics/about_strings.js |
module("About Strings (topics/about_strings.js)");
test("delimiters", function() {
var singleQuotedString = 'apple';
var doubleQuotedString = "apple";
equal(__, singleQuotedString === doubleQuotedString, 'are the two strings equal?');
});
test("concatenation", function() {
var fruit = "apple";
va... | JavaScript | 0.000003 | @@ -164,18 +164,20 @@
equal(
-__
+true
, single
@@ -337,26 +337,35 @@
;%0A equal(
-__
+%22apple pie%22
, fruit + %22
@@ -569,18 +569,24 @@
equal(
-__
+'string'
, charac
@@ -738,18 +738,23 @@
equal(
-__
+%22Apple%22
, string
@@ -900,34 +900,33 @@
ple%22;%0A equal(
-__
+5
, fruit.length,
@@ -1039,... |
cac2368d201eca584f2b5c54afb10b3b30e3cbe9 | Fix CoffeeScript error reporting. | packages/coffeescript/package.js | packages/coffeescript/package.js | Package.describe({
summary: "Javascript dialect with fewer braces and semicolons"
});
Npm.depends({"coffee-script": "1.6.2"});
var coffeescript_handler = function(bundle, source_path, serve_path, where) {
var fs = Npm.require('fs');
var path = Npm.require('path');
var coffee = Npm.require('coffee-script');
... | JavaScript | 0 | @@ -616,16 +616,109 @@
e.error(
+%0A source_path + ':' +%0A (e.location ? (e.location.first_line + ': ') : ' ') +%0A
e.messag
@@ -718,16 +718,21 @@
.message
+%0A
);%0A %7D%0A%0A
|
f1015a4f8c888e740d699e7f5fec08eec1e0fceb | Allow more flexible matching and remove default ordering | public/assets/js/app.js | public/assets/js/app.js | /*!
* Author: Abdullah A Almsaeed
* Date: 4 Jan 2014
* Description:
* This file should be included in all pages
!**/
$(function() {
"use strict";
//Enable sidebar toggle
$("[data-toggle='offcanvas']").click(function(e) {
e.preventDefault();
//If window is small enough, enable si... | JavaScript | 0 | @@ -6992,14 +6992,13 @@
$(%22
-table#
+%5Bid%5E=
data
@@ -7002,16 +7002,17 @@
atatable
+%5D
%22).dataT
@@ -7030,16 +7030,26 @@
ng:false
+, order:%5B%5D
%7D);%0A%7D(j
|
1bba3ddd1dbab2370970f8b71e57ac9fb2bd9ead | fix inbetween party | app/views/countries/search-map.js | app/views/countries/search-map.js | define(['text!./search-map.html',
'app',
'jquery',
'lodash',
'text!./pin-popup-abs.html',
'scbd-map/ammap3',
'scbd-map/ammap3-service', '/app/js/common.js', '/app/services/search-service.js',
'../directives/block-region-directive.js'
], function(template, app, $, _, popoverTemplate) {
'use strict';
a... | JavaScript | 0.000001 | @@ -2440,32 +2440,33 @@
+
if(countryDetail
@@ -2615,32 +2615,37 @@
+else
if(countryDetail
@@ -2750,32 +2750,33 @@
olor=%22#5F4586%22;%0A
+
|
4140af4c776aa8cb2dbd52ed7a05c44268094ec8 | normalize backup title | packages/docs/src/mixins/meta.js | packages/docs/src/mixins/meta.js | export default {
data: () => ({
meta: {},
_description: {},
_keywords: {},
}),
computed: {
title () {
return this.meta.title || 'Material Component Framework'
},
description () {
return this.meta.description
},
keywords () {
return this.meta.keywords
},
},
... | JavaScript | 0.000002 | @@ -151,16 +151,20 @@
tle %7C%7C '
+Vue
Material
|
91b5a4800392322263e2f891c0521bf7988c7989 | Check when browser is open | public/js/background.js | public/js/background.js | chrome.browserAction.setBadgeText({text: "0"});
//localStorage.removeItem('azubu_extension');
if (!localStorage.getItem('azubu_extension')) {
localStorage.setItem('azubu_extension', '{"usernames": [], "online": []}');
}
setInterval(function () {
var extData = JSON.parse(localStorage.getItem('azubu_extension'))... | JavaScript | 0.000001 | @@ -1,770 +1,24 @@
-chrome.browserAction.setBadgeText(%7Btext: %220%22%7D);%0A//localStorage.removeItem('azubu_extension');%0Aif (!localStorage.getItem('azubu_extension')) %7B%0A localStorage.setItem('azubu_extension', '%7B%22usernames%22: %5B%5D, %22online%22: %5B%5D%7D');%0A%7D%0A%0AsetInterval(function () %7B%0A ... |
0b5e0df1c1635e2b9e206fe32515093702ce5cde | Fix the handling of the new osmOwners attribute | public/js/core/theme.js | public/js/core/theme.js | import Diacritics from 'diacritic';
export default class Theme {
/**
* Returns a URL-friendly name of the theme.
*
* @author Guillaume AMAT
* @static
* @access public
* @param {string} nameArg
* @return {string}
*/
static buildWebLinkName(nameArg) {
let name = nameArg ||... | JavaScript | 0.000128 | @@ -1942,32 +1942,61 @@
rn true;%0A %7D%0A%0A
+ if (theme.osmOwners) %7B%0A
if (theme.os
@@ -2026,32 +2026,34 @@
!== -1) %7B%0A
+
return true;%0A
@@ -2045,39 +2045,43 @@
eturn true;%0A
+
%7D%0A%0A
+
+
if (theme.osmOwn
@@ -2105,32 +2105,34 @@
!== -1) %7B%0A
+
return tr... |
762a3800a5b8b6cac5f50ce96515e3f670197831 | Add 5-10 minute estimate before anticipation questions | public/js/experiment.js | public/js/experiment.js | /**
* Experiment view blocks for jsSART
*/
var experiment = [];
var participant_id = getParticipantId();
var conditions = generateConditions();
// prospective survey notice and questions
var prospective_survey_text = "<p>Before we begin, we would like to know what you <strong>expect to experience</strong> on this <s... | JavaScript | 0 | @@ -503,16 +503,44 @@
e longer
+, approximately 5-10 minutes
.%3C/p%3E%22;%0A
|
5210a66069d18c880b7fc67f959b55fe17e63a9f | Add instructions for custom titles | app/views/private-beta-01/data.js | app/views/private-beta-01/data.js | var data = require('../../../data/titles');
var search = require('../../../data/search');
// Use this space to insert any prototype specific entries onto the available
// set of data.
// For example:
data.push({
data: {},
title_number: 'FAKE123123',
address: [
'Seaton Court',
'2',
'William Prance Rd'... | JavaScript | 0.000003 | @@ -185,181 +185,243 @@
%0A//
-For example:%0Adata.push(%7B%0A data: %7B%7D,%0A title_number: 'FAKE123123',%0A address: %5B%0A 'Seaton Court',%0A '2',%0A 'William Prance Rd',%0A 'Plymouth',%0A 'PL6 5WS'%0A %5D%0A%7D
+To inspect the structure of the data, uncomment the following line. This will%0A//... |
d4dc1b56c648f0a6edd0f5880e009d9b9b8c50a4 | Copy files from public dir to output path (#70) | packages/pack/webpack/plugins.js | packages/pack/webpack/plugins.js | const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const WriteWebpackPlugin = require('write-webpack-plugin');
const ImageminPlugin = require('imagemin-webpack-plugin').default;
const imageminMozjpeg = require('imagemin-mozjpeg');
const MiniCssExt... | JavaScript | 0 | @@ -173,24 +173,82 @@
k-plugin');%0A
+const CopyWebpackPlugin = require('copy-webpack-plugin');%0A
const Imagem
@@ -944,24 +944,25 @@
onstants');%0A
+%0A
const %7B logo
@@ -2914,24 +2914,136 @@
),%0A%0A
+ new CopyWebpackPlugin(%7B%0A patterns: %5B%7B from: 'public', noErrorOnMissing: true... |
343dc864a84c712277af37ac2e59bf8b3a72e9ec | make symbol.tree getter immutable | packages/svg-baker/lib/symbol.js | packages/svg-baker/lib/symbol.js | const { renderer } = require('posthtml-svg-mode');
const { getRoot, getHash } = require('./utils');
const defaultFactory = require('./symbol-factory');
const FileRequest = require('./request');
class SpriteSymbol {
constructor({ id, tree, request }) {
this.id = id;
this.tree = tree;
this.request = reques... | JavaScript | 0.000029 | @@ -186,16 +186,48 @@
quest');
+%0Aconst clone = require('clone');
%0A%0Aclass
@@ -303,24 +303,25 @@
d;%0A this.
+_
tree = tree;
@@ -1191,24 +1191,74 @@
null;%0A %7D%0A%0A
+ get tree() %7B%0A return clone(this._tree);%0A %7D%0A%0A
/**%0A * @
|
25c86969ee0ae5a197e2377ae9d44c2ffa508ed8 | disable log assertions when the user is customizing logging | packages/test-support/prepare.js | packages/test-support/prepare.js | const util = require('util');
const chai = require('chai');
global.expect = chai.expect;
chai.use(require('chai-things'));
chai.use(require('./collection-contains'));
chai.use(require('./has-status'));
// Without this, we can't see stack traces for certain failures within
// promises during the test suite.
process.on... | JavaScript | 0.000001 | @@ -1228,217 +1228,10 @@
%7D;%0A
-%7D%0A%0Aif (!process.env%5B'ELASTICSEARCH_PREFIX'%5D) %7B%0A // Avoid stomping on any existing content in elasticsearch by%0A // namespacing the test indices differently.%0A process.env%5B'ELASTICSEARCH_PREFIX'%5D = 'test';%0A%7D%0A%0A
+
let
@@ -1249,24 +1249,26 @@
new Map()... |
c8f65709b4b451038fa360a87b4cfbaa772e0aac | Allow configuring layer attribution and tile extension. | public_html/groupxiv.js | public_html/groupxiv.js | /*
Options:
viewport: DOM id of the viewport
scale: image scale (nm/px)
layers: array of:
URL: URL of the original image
width: original image width
height: original image height
tileSize: tile dimension
imageSize: smallest square image size that fits all tiles a... | JavaScript | 0 | @@ -2203,24 +2203,358 @@
ileSize));%0A%0A
+ var attribution = %22Layer %22;%0A if(layer.name) %7B%0A attribution += layer.name + %22 (%22 + layer.URL + %22)%22;%0A %7D else %7B%0A attribution += layer.URL;%0A %7D%0A if(layer.copyright) %7B%0A attribution += %22 %5Cu00a9 %22 + layer.copyri... |
4fb0cd4d6da192473220bdfc73e35506c3eb9c4c | Fix bug in kafka lib | oada/libs/oada-lib-kafka/base.js | oada/libs/oada-lib-kafka/base.js | /* Copyright 2017 Open Ag Data Alliance
*
* 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 agr... | JavaScript | 0.000001 | @@ -3005,32 +3005,38 @@
+await
this.consumer.su
@@ -3086,32 +3086,38 @@
+await
this.consumer.ru
|
41b847b212b7c9b92de8ce2271b1f38110dea107 | Make the pillar clickthrough work in all cases | texcavator/static/js/uva/metagraph.js | texcavator/static/js/uva/metagraph.js | // Create metadata graphics for a query
function metadataGraphics(query) {
console.log("metadataGraphics()");
// TODO: it's better not to pass the search parameters here. See also TODO in backend.
var params = getSearchParameters();
params.query = query;
dojo.xhrGet({
url: "services/metada... | JavaScript | 0.000002 | @@ -3260,32 +3260,97 @@
(segmentData) %7B%0A
+ getToolbarConfig(); // ensure that the checkboxes exist%0A
var sele
@@ -3353,18 +3353,35 @@
selected
+ID
=
+ 'cb-pillar-' +
segment
@@ -3410,17 +3410,16 @@
'.pillar
-s
input')
@@ -3505,31 +3505,16 @@
id') ===
- 'cb-pillar-' +
selecte
@@ -3506,3... |
a816f7795e74711bb14829ef36c585250b44391a | Use global directive to avoid jslint errors | pic2map/server/static/js/main.js | pic2map/server/static/js/main.js | var LocationMap = {
'initialize': function initialize() {
// Map centered in NowSecure HQ by default
this.map = L.map('map').setView([40.2001925,-89.0876265], 3);
this.markerCluster = L.markerClusterGroup();
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href... | JavaScript | 0 | @@ -1,12 +1,66 @@
+// Avoid jslint errors for known globals%0A/*global L*/%0A
var Location
|
94a96c0adf1adea66f3a7f6d2887daf2a8822264 | Fix permalinks | openbas/client/plot.js | openbas/client/plot.js | function parsePixelsToInt(q) {
return parseFloat(q.slice(0, q.length - 2));
}
instances = [];
if (Meteor.isClient) {
var localtest = false;
Template.plot.plot_data = [
{
tagsURL: localtest ? 'http://localhost:7856' : (Meteor.settings.public.archiverUrl + "/api/query?"),
dataU... | JavaScript | 0.000001 | @@ -499,748 +499,153 @@
- width: function () %7B%0A var $parent = $(instances%5Binstances.length-1%5D.find('.chartContainer')) /* hack */%0A var width = $parent.css(%22width%22);%0A var leftpadding = $parent.css(%22padding-left%22);%0A ... |
76035eed658d9353625e8ffeeb5d828ac1e19742 | Use Cadence for `Coordinator.listen`. | reconfigure/coordinator.js | reconfigure/coordinator.js | function Coordinator (consensus) {
this._consensus = consensus
}
Coordinator.prototype.listen = function (url, callback) { // <- listen, POST, -> get them started
this._consensus.addListener(url, function (error, act) {
if (!act) {
callback(null, false)
} else {
callback... | JavaScript | 0 | @@ -1,16 +1,50 @@
+var cadence = require('cadence')%0A%0A
function Coordin
@@ -120,32 +120,40 @@
totype.listen =
+cadence(
function (url, c
@@ -146,29 +146,26 @@
nction (
-url, callback
+async, url
) %7B // %3C
@@ -200,16 +200,44 @@
started%0A
+ async(function () %7B%0A
this
@@ -256,32 +256,48 @@
ad... |
834d24b6463f91b8f5c7cec9e3cd1286ab03aa51 | improve latest transactions listing | scripts/account_trx_recent.js | scripts/account_trx_recent.js | /**
* Part of the evias/nem-utils package.
*
* NOTICE OF LICENSE
*
* Licensed under MIT License.
*
* This source file is subject to the MIT License that is
* bundled with this package in the LICENSE file.
*
* @package evias/nem-utils
* @author Grégory Saive <greg@evias.be> (https://github.com/evias)
... | JavaScript | 0 | @@ -1037,44 +1037,341 @@
var
-globalCnt = 0;%0A var hasTrxs = %7B%7D;
+nemEpoch = Date.UTC(2015, 2, 29, 0, 6, 25, 0);%0A var globalCnt = 0;%0A var hasTrxs = %7B%7D;%0A var byDate = %5B%5D;%0A%0A var nemTrxDateCompare_ = function(a, b) %7B%0A if (a.transaction.timeStamp %3C b.transaction.timeStam... |
3b68a80addf8e20d9bb30356eaaf919a4e36cb55 | change surface-datas-2-ts code | scripts/surface-datas-2-ts.js | scripts/surface-datas-2-ts.js | // Usage:
// node ./scripts/surface-datas-2-ts.js [path to the folder contains surface datas]
let input = process.argv[2];
if (!input) {
console.error("Usage");
console.error(" node ./scripts/surface-datas-2-ts.js [path to the folder contains surface datas]");
process.exit();
}
let glob = require("glob");
let ... | JavaScript | 0 | @@ -800,87 +800,52 @@
-const fixedData = %5B%5D;%0A let numEmpty = 0;%0A for (const d of layer.data)
+layer.data = layer.data.reduce((ans, cur) =%3E
%7B%0A
@@ -859,10 +859,11 @@
if (
-!d
+cur
.len
@@ -871,122 +871,137 @@
th)
-%7B%0A ++numEmpty;%0A continue;%0A %7D%0A ... |
948e883f8833a3c6b8182fcde4783a4c7186f2b8 | update trello-integration | scripts/trello-integration.js | scripts/trello-integration.js | module.exports = function(robot) {
'use strict'
var slackmsg = require("./slackMsgs.js");
var trello = require("./trello-api.js");
var request = require('request');
function sendMessageToSlackResponseURL(responseURL, JSONmessage){
var postOptions = {
uri: responseURL,
met... | JavaScript | 0 | @@ -4214,16 +4214,33 @@
nse_url;
+%0A let msg;
%0A%0A
@@ -4552,36 +4552,32 @@
th;%0A
-let
msg = slackmsg.m
@@ -5038,36 +5038,32 @@
tus%0A
-let
msg = slackmsg.p
|
eab5f9ad205fcbcb2c0be1c39c58bf4ccb3d7beb | Remove default output of all env vars | packages/info/index.js | packages/info/index.js | const _ = {
pick: require('lodash.pick'),
};
const express = require('express');
const fs = require('fs');
const path = require('path');
module.exports = () => {
const router = new express.Router();
const version = require('@maxdome/version')();
router.get('/version', (req, res) => {
res.send(version);
}... | JavaScript | 0.000001 | @@ -197,16 +197,17 @@
uter();%0A
+%0A
const
@@ -317,16 +317,17 @@
;%0A %7D);%0A
+%0A
let en
@@ -334,19 +334,10 @@
v =
-process.env
+%7B%7D
;%0A
@@ -647,16 +647,24 @@
_.pick(
+process.
env, key
@@ -739,16 +739,19 @@
%7D%0A %7D%0A
+ %0A
router
@@ -804,16 +804,17 @@
;%0A %7D);%0A
+%0A
return... |
de13a1eb804d288cd88b17c30090a560947437fd | update end dialog | server/controllers/newsbot.js | server/controllers/newsbot.js | const fetch = require('node-fetch');
const builder = require('botbuilder');
const newsSource = require('../resources/newsapi');
const db = require('./db');
const env = process.env;
function init(app) {
// Create chat bot and binding
const connector = new builder.ChatConnector({
appId: env.BOT_APP_ID,
appP... | JavaScript | 0.000001 | @@ -5398,25 +5398,20 @@
session.
+s
end
-Dialog
('Sorry,
@@ -5471,24 +5471,53 @@
ry again');%0A
+ session.endDialog();%0A
%7D%0A
@@ -5626,25 +5626,20 @@
session.
+s
end
-Dialog
(%60Done!
@@ -5759,24 +5759,53 @@
t works.%60);%0A
+ session.endDialog();%0A
%7D).cat
@@ -5860,25 +586... |
48459bf968f57d115d82cfc885a2183a53a0cb1a | Make haproxy file more compact | server/lib/HAProxyTemplate.js | server/lib/HAProxyTemplate.js | var fs = require('fs');
module.exports = function () {
return new HAProxyTemplate();
}
//function constructor for making HAProxy conf files
function HAProxyTemplate () {
this.mainPort;
this.webAppAddress;
this.tcpMaps = [];
this.httpMaps = [];
this.file = getTemplate();
}
//the port used to redirect all ... | JavaScript | 0.000012 | @@ -1991,17 +1991,19 @@
app%0A%60;%0A
+/*
%0A
-
%09//now a
@@ -2209,17 +2209,19 @@
%7D%0A%60;%0A%09%7D%0A
+*/
%0A
-
%09//next,
@@ -2535,17 +2535,19 @@
%0A%60;%09%0A%09%7D%0A
+/*
%0A
-
%09//tcp b
@@ -2715,22 +2715,285 @@
map.to%7D%0A
-
%60;%09%0A%09%7D
+%0A*/%0A%09//tcp proxying, from front to back, using th... |
4cc5faafc36b0e85c10f50dff5c9e5d7364b18e5 | Clean up output from wmic | server/lib/getDriveLetters.js | server/lib/getDriveLetters.js | const childProcess = require('child_process')
const command = 'wmic logicaldisk get caption'
module.exports = function () {
return new Promise((resolve, reject) => {
childProcess.exec(command, (err, stdout) => {
if (err) {
return reject(err)
}
const rows = stdout.split(/\r?\n/)
r... | JavaScript | 0.99997 | @@ -309,27 +309,86 @@
%5Cn/)
-%0A resolve(rows
+.filter(row =%3E row.trim().endsWith(':'))%0A resolve(rows.map(r =%3E r.trim())
)%0A
|
2dd44cecf1ae06e8febf33cf036794adee46a090 | Fix typo in function name | server/models/favorite_tag.js | server/models/favorite_tag.js | import cozydb from 'cozydb';
import invariant from 'invariant';
import logger from 'debug';
import hasValue from '../hasValue';
const debug = logger('app:model:favorite_tag');
const FavoriteTag = cozydb.getModel('FavoriteTag', {
'label': String,
'application': String,
});
export default FavoriteTag;
Favorit... | JavaScript | 0.999921 | @@ -870,17 +870,17 @@
riteTag.
-B
+b
yLabelFo
|
725abf4ea9bd41c929f67686fa3efd51c7ea6d19 | Add navy available-services command | packages/navy/src/cli/program.js | packages/navy/src/cli/program.js | import program from 'commander'
import {NavyError} from '../errors'
import {getConfig} from '../config'
import {startDriverLogging, stopDriverLogging} from '../driver-logging'
const loadingLabelMap = {
destroy: 'Destroying services...',
start: 'Starting services...',
stop: 'Stopping services...',
restart: 'Res... | JavaScript | 0.000155 | @@ -1383,16 +1383,106 @@
ging()%0A%0A
+ if (Array.isArray(returnVal)) %7B%0A return console.log(returnVal.join('%5Cn'))%0A %7D%0A%0A
if (
@@ -5059,32 +5059,335 @@
35821%0A %60))%0A%0A
+program%0A .command('available-services')%0A .option('-e, --navy %5Benv%5D', %60set the navy name to be used %5... |
88599a0bd4ada01e14f274376c76265739819e8f | add curry2 and curry3 implementations | packages/prelude/src/function.js | packages/prelude/src/function.js | /** @license MIT License (c) copyright 2010-2016 original author or authors */
// id :: a -> a
export const id = x => x;
// compose :: (b -> c) -> (a -> b) -> (a -> c)
export const compose = (f, g) => x => f(g(x));
// apply :: (a -> b) -> a -> b
export const apply = (f, x) => f(x);
| JavaScript | 0.000234 | @@ -279,8 +279,658 @@
%3E f(x);%0A
+%0A// curry2 :: (a -%3E b -%3E c) -%3E a -%3E b -%3E c%0Aexport function curry2(f) %7B%0A function curried(a, b) %7B%0A switch (arguments.length) %7B%0A case 0: return curried;%0A case 1: return b =%3E f(a, b);%0A default:return f(a, b);%0A... |
afff9c9431cc74c17eb2149466bbe343b02bb6a4 | remove style none value filter (#1461) | packages/stylesheet/src/index.js | packages/stylesheet/src/index.js | import * as R from 'ramda';
import expandStyles from './expand';
import flattenStyles from './flatten';
import transformStyles from './transform';
import resolveMediaQueries from './mediaQueries';
/**
* Filter styles with `none` value
*
* @param {Object} style object
* @returns {Object} style without none values
... | JavaScript | 0 | @@ -196,187 +196,8 @@
';%0A%0A
-/**%0A * Filter styles with %60none%60 value%0A *%0A * @param %7BObject%7D style object%0A * @returns %7BObject%7D style without none values%0A */%0Aconst filterNoneValues = R.reject(R.equals('none'));%0A%0A
/**%0A
@@ -473,30 +473,8 @@
r),%0A
- filterNoneValues,%0A
|
02540e4cb05c2f4bdee056f9ebb4eb0c32033a5b | fix failing test that used old selected rows key format (integer) | packages/table/src/Table.test.js | packages/table/src/Table.test.js | import React from "react";
import Adapter from "enzyme-adapter-react-16";
import { mount, configure } from "enzyme";
import Table from "./Table";
import Column from "./Column";
const dataFixture = [{ name: "foo" }, { name: "bar" }];
describe("Table", function() {
configure({ adapter: new Adapter() });
test("Che... | JavaScript | 0.000003 | @@ -2129,17 +2129,20 @@
dRows: %5B
-0
+%220,%22
%5D %7D);%0A
|
9c299907c8253f5e6647937970c6adb24325e123 | fix tests | packages/zent/__tests__/affix.js | packages/zent/__tests__/affix.js | import Affix from 'affix';
import React from 'react';
import { mount } from 'enzyme';
describe('Affix component', () => {
it('Affix has props', () => {
const wrapper = mount(<Affix />);
expect(wrapper.find('.zent-affix').length).toBe(1);
const props = wrapper.find('Affix').props();
expect(props.offse... | JavaScript | 0.000001 | @@ -1354,18 +1354,17 @@
ode.
-checkFixed
+updatePin
();%0A
|
d0c0b814e31d19d5eaf06d4c079272f2793a671c | change color | src/map-generator/object/room.js | src/map-generator/object/room.js | const Color ='#ff00ff';
class Room extends Phaser.Sprite {
constructor(game, width, height) {
let bmd = game.add.bitmapData(width,height);
// draw to the canvas context like normal
bmd.ctx.beginPath();
bmd.ctx.rect(0,0,width,height);
bmd.ctx.fillStyle = '#ff0000';
bmd.ctx.fill();
super(... | JavaScript | 0.000018 | @@ -10,17 +10,17 @@
or =
-'#ff00ff'
+ %22473B3B%22
;%0A%0Ac
@@ -275,17 +275,13 @@
e =
-'#ff0000'
+Color
;%0A
|
513cd683e0590095ae3ddb0b1d9a726cb2dc3d3d | Simplify futureTimeout code | src/middleware/authentication.js | src/middleware/authentication.js | import _ from 'lodash/fp'
import { REHYDRATE } from 'redux-persist/constants'
import {
refreshAuthenticationToken,
scheduleAuthRefresh,
} from '../actions/authentication'
import { AUTHENTICATION } from '../constants/action_types'
const toMilliseconds = seconds => seconds * 1000
const fromNow = (time) => time - ne... | JavaScript | 0.00134 | @@ -1,30 +1,4 @@
-import _ from 'lodash/fp'%0A
impo
@@ -256,420 +256,332 @@
00%0A%0A
-const fromNow = (time) =%3E time - new Date()%0Aconst atLeastFifty = _.partial(Math.max, 50)%0A// Reverse arity, curried version of https://lodash.com/docs#subtract%0Aconst subtract = subtrahend =%3E minuend =%3E minuend - subtrahen... |
f64ed61876e544768522a86e09cf2725283cf733 | update test | test-workspace/config/spa/test.js | test-workspace/config/spa/test.js | // import '../task';
import jsConfig from './main-sync';
// import jsConfig from './main-async';
// import jsConfig from './vendor-all';
// import jsConfig from './vendor-custom';
// import jsConfig from './cdn';
// import jsConfig from './extract-css';
export default jsConfig;
| JavaScript | 0.000001 | @@ -247,16 +247,49 @@
ct-css';
+%0A// import jsConfig from './vue';
%0A%0Aexport
|
40b9bfeef5afd27a9a393fe35f013cf0a771fde5 | Fix bug in jsonParse that misses values which are equivalent to false (like 0). | src/models/internal/jsonParse.js | src/models/internal/jsonParse.js |
var mapValueToType = function(rawValue, type) {
var initialValue = null;
if (typeof type === 'object') {
if (type) {
if (type instanceof Array) {
var innerType = type[0];
if (rawValue !== null && rawValue !== undefined) {
initialValue = rawValue.map( v => {
try {
... | JavaScript | 0 | @@ -2071,32 +2071,46 @@
(convertedValue
+ !== undefined
) %7B%0A if (me
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.