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 |
|---|---|---|---|---|---|---|---|
82c6713cb8f0331eb14291f909f53b1ca06456d3 | simplify once, and do not wait a tick before firing | once.js | once.js | module.exports = function once(fn) {
var timeout
var args
return function() {
args = arguments
if (timeout) { return }
timeout = setTimeout(function() {
fn.apply(this, args)
timeout = null
args = null
}, 0)
}
}
| JavaScript | 0.000001 | @@ -39,25 +39,21 @@
var
-timeout%0A%09var args
+fired = false
%0A%09re
@@ -76,150 +76,71 @@
%7B%0A%09%09
-args = arguments%0A%09%09if (timeout) %7B return %7D%0A%09%09timeout = setTimeout(function() %7B%0A%09%09%09fn.apply(this, args)%0A%09%09%09timeout = null%0A%09%09%09args = null%0A%09%09%7D, 0
+if (fired) %7B r... |
fc684bdac62e3dafbf86c61b149219105314177b | Fix syntax error in fibers.js | fibers.js | fibers.js | var fs = require('fs');
if (fs.statSync(process.execPath).mtime >
fs.statSync(__dirname + '/src/fibers')).mtime) {
throw new Error(
'`node` has a newer mtime than `fiber`; it is possible your build is out of date. This ' +
'could happen if you upgrade node. Try `npm rebuild fibers` to rebuild. If that do... | JavaScript | 0 | @@ -102,17 +102,16 @@
fibers')
-)
.mtime)
|
4b36aac3d2d7fd86a7751ca9d767cba5f55ebd7a | convert to es6: scan | lib/provider/scan.js | lib/provider/scan.js | {Point, Range} = require 'atom'
{cloneRegExp} = require '../utils'
ProviderBase = require './provider-base'
module.exports =
class Scan extends ProviderBase
boundToSingleFile: true
supportDirectEdit: true
showColumnOnLineHeader: true
itemHaveRange: true
showSearchOption: true
supportCacheItems: true
useF... | JavaScript | 0.999999 | @@ -1,9 +1,16 @@
-%7B
+const %7B
Point, R
@@ -13,16 +13,17 @@
t, Range
+
%7D = requ
@@ -29,17 +29,25 @@
uire
- '
+(%22
atom
-'%0A%7B
+%22)%0Aconst %7B
clon
@@ -53,16 +53,17 @@
neRegExp
+
%7D = requ
@@ -69,18 +69,18 @@
uire
- '
+(%22
../utils
'%0APr
@@ -75,18 +75,25 @@
../utils
-'%0A
+%22)%0Aconst
Prov... |
3cfc6a306eb764a7408eca16fdb45fe8eb45cbd6 | Update global.js | res/js/back/global.js | res/js/back/global.js | /**
Copyright 2018 LNFWebsite
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | JavaScript | 0.000001 | @@ -876,9 +876,13 @@
drag
-&
+ and
drop
|
bb5e4232bc71ea1d063293db2fecf35138824f4c | disable sentry on electron | webpack.electron.config.js | webpack.electron.config.js | const config = require('./config');
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const baseConfig = require('./webpack.base.config.js');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { DefinePlugin, ProvidePlugin } = require('webpack');
cons... | JavaScript | 0.000001 | @@ -450,71 +450,8 @@
r');
-%0Aconst SentryWebpackPlugin = require('@sentry/webpack-plugin');
%0A%0Aco
@@ -615,76 +615,8 @@
nt';
-%0Aconst hasSentryToken = process.env.SENTRY_AUTH_TOKEN !== undefined;
%0A%0Aco
@@ -2388,16 +2388,19 @@
%7D),%0A%5D;%0A%0A
+//
if (hasS
@@ -2413,16 +2413,19 @@
oken) %7B%0A
+//
pl... |
3bade080c272be5f56a703147f7b1913f156374a | Update startServer.js (#18) | cli/startServer.js | cli/startServer.js | var net = require('net');
var fs = require('fs');
var path = require('path');
var EventTransmitter = require('event-transmitter');
// Main Constructor
function startServer(main, channel) {
var socketPath = path.join(__dirname, '/' + channel + '.sock');
var server = net.createServer();
server.on('error', func... | JavaScript | 0 | @@ -539,16 +539,45 @@
+ fs.existsSync(socketPath) &&
fs.unli
|
4289537361c82167ab870a12e94cc935f26a7ac9 | add chicken | pack.js | pack.js | 'use strict'
var tar = require('tar');
var zlib = require('zlib');
var path = require('path');
var fstream = require('fstream');
var packageJSON = require(path.resolve(process.cwd(), 'package.json'));
var options =
path: path.resolve(process.cwd(), 'node_modules')
type: "Directory"
filename = [
packageJSON.name... | JavaScript | 0.999525 | @@ -1,8 +1,136 @@
+// __//%0A// /.__.%5C%0A// %5C %5C/ /%0A// '__/ %5C%0A// %5C- )%0A// %5C_____/%0A// _____%7C_%7C____%0A// %22 %22%0A// crossy.io%0A%0A
'use str
|
10dbdf41b6ca3dd69502041d6cfd53b8afa09a2b | Remove double semicolon | index.js | index.js | var Q = require('q');
module.exports = Qedis;
function Qedis(redisClient) {
this.redisClient = redisClient;
}
Qedis.prototype.exists = function(cacheKey) {
return Q.ninvoke(this.redisClient, 'exists', cacheKey)
.fail(failureHandler);
};
Qedis.prototype.fetch = function(cacheKey) {
var self = this;
return ... | JavaScript | 0.999993 | @@ -1794,17 +1794,16 @@
andler);
-;
%0A%7D;%0A%0Afun
|
a80b32ac09633c78a73e33782d8d4b8233abebed | Add tests to verify CheckboxList is included in Formulario | src/__tests__/components/Formulario.test.js | src/__tests__/components/Formulario.test.js | import React from 'react';
import { shallow } from 'enzyme';
import Formulario from '../../components/Formulario';
describe('Formulario component', () => {
let component;
beforeEach(() => {
component = shallow(<Formulario />);
});
test('deve iniciar o estado do componente com o nome vazio', () => {
... | JavaScript | 0 | @@ -1877,13 +1877,1903 @@
);%0A %7D);
+%0A%0A test('deve incluir um CheckboxList pro campo de frutas%5B%5D', () =%3E %7B%0A const checkbox = component.findWhere((node) =%3E node.prop('name') === 'frutas%5B%5D');%0A%0A expect(checkbox.length).toBe(1);%0A %7D);%0A%0A test('deve incluir um CheckboxList com o la... |
eb79ee4d1f7aa7ea4b80aa4e61b4e2d55c773276 | Remove unneeded require | client/app/app.js | client/app/app.js | //
// Copyright 2009-2014 Ilkka Oksanen <iao@iki.fi>
//
// 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 b... | JavaScript | 0.000008 | @@ -1943,43 +1943,8 @@
);%0A%0A
-//require('./helpers/handlebars');%0A
//re
|
dcbda2318fc48f9798e2028de6180cd208b9079c | Remove debuggging util logs. | commands/mutations.js | commands/mutations.js | 'use strict';
const Feats = require('../src/feats').Feats;
const CommandUtil = require('../src/command_util').CommandUtil;
const util = require('util');
exports.command = (rooms, items, players, npcs, Commands) => {
return (args, player) => {
const playerFeats = player.getFeats() || {};
util.log(Object.keys(... | JavaScript | 0 | @@ -292,48 +292,8 @@
%7B%7D;%0A
- util.log(Object.keys(playerFeats));%0A
@@ -375,50 +375,8 @@
) %7B%0A
- util.log(availableFeats, ownFeats);%0A
|
b3583f9d6db827b9e3eaa15bd0a395d97d975e21 | Fix reference to File model. | tests/files/models/file.model.spec.js | tests/files/models/file.model.spec.js | 'use strict';
/*
Module dependencies
*/
var mongoose = require('mongoose');
var config = require('./../config/config')();
// Connect to MongoDB
var db = mongoose.connect(config.db.test.uri, config.db.test.options, function (err) {
if (err) {
console.error('Could not connect to MongoDB.');
}
});
var FileMode... | JavaScript | 0 | @@ -98,16 +98,22 @@
e('./../
+../../
config/c
|
2fe1e96a099c26c4ffe6077aecff34b3978cbae3 | Fix site blog page order | site/antwar.config.js | site/antwar.config.js | const _ = require("lodash");
const moment = require("moment");
const rssPlugin = require("antwar-rss-plugin");
const generateAdjacent = require("./utils/generate-adjacent");
module.exports = {
template: {
rss: {
title: "Antwar",
href: "/atom.xml"
}
},
output: "build",
layout: () => require(... | JavaScript | 0 | @@ -1231,16 +1231,17 @@
%22date%22)
+)
.reverse
@@ -1242,17 +1242,16 @@
everse()
-)
,%0A
|
e52ae41f1676ffc570dea4d27ea86a493a56faa2 | remove showcase from home page (#646) | website/src/pages/index.js | website/src/pages/index.js | import React, { useState, useEffect, useLayoutEffect } from "react";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import useThemeContext from '@theme/hooks/useThemeContext';
import HeroSection from "./sections/heroSection";
import Architecture from "./section... | JavaScript | 0 | @@ -22,19 +22,8 @@
ate,
- useEffect,
use
@@ -62,164 +62,35 @@
ort
-useDocusaurusContext from %22@docusaurus/useDocusaurusContext%22;%0Aimport Layout from %22@theme/Layout%22;%0Aimport useThemeContext from '@theme/hooks/useThemeContext'
+Layout from %22@theme/Layout%22
;%0A%0Ai
@@ -902,1872 +902,8 @@
%0A%7D%0A%0A... |
cda7fb1f9ddb70c161a1eae2672dfa4c33ec1b5a | Update delay effect. | src/components/effects_editor/effects/delay.js | src/components/effects_editor/effects/delay.js | import $ from 'jquery';
import 'jquery-ui/widgets/slider';
import { EffectUIBase, EffectParameterObjectBase, EffectNodeBase } from './base';
import template from './templates/delay.marko';
import Signal from '../../../utils/signal';
class DelayEffectUI extends EffectUIBase {
constructor(target, effect, location) ... | JavaScript | 0 | @@ -230,16 +230,75 @@
gnal';%0A%0A
+export const NAME = %22Delay%22;%0Aexport const TYPE = %22delay%22;%0A%0A
class De
@@ -1217,23 +1217,20 @@
.type =
-%22delay%22
+TYPE
,%0A th
@@ -2100,66 +2100,8 @@
%0A%7D%0A%0A
-export const NAME = %22Delay%22;%0Aexport const TYPE = %22delay%22;%0A
expo
|
dd447a1a7b0ca5c5806191ea36f324e5fa40fc2e | include feature patch key. | bench/index.loadDoc.js | bench/index.loadDoc.js | var Benchmark = require('benchmark');
var suite = new Benchmark.Suite();
var assert = require('assert');
var index = require('../lib/index');
var docs = index.assignParts(require('../test/fixtures/docs.json'));
var freq = index.generateFrequency(docs);
var patch = { grid: {}, term: {}, phrase: {}, degen: {} };
var deg... | JavaScript | 0 | @@ -299,16 +299,29 @@
, degen:
+ %7B%7D, feature:
%7B%7D %7D;%0Av
|
daeaed646f390044dc4c90869aebb6ec9bde2faa | update index.js | client/src/index.js | client/src/index.js | import './index.html';
import './index.less';
import 'todomvc-app-css/index.css';
import dva from 'dva';
import {onReacteor,createModels,listen} from './common/reacteor';
// 1. Initialize
const app = dva();
// 2. Plugins
// app.use();
// 3. Model
createModels(app, 'todo');
// 4. Router
app.router(require('./router'... | JavaScript | 0.000001 | @@ -110,19 +110,8 @@
rt %7B
-onReacteor,
crea
@@ -122,15 +122,8 @@
dels
-,listen
%7D fr
|
e649a7896f2b1951d6085ad0f94e17542bcabd87 | Use custom remove flag for filter instead of undefined | filter.js | filter.js | import when from 'when';
let
openFiles = ['a.js', 'b.js', 'c.js'],
exists = (file) => {
console.log('exits', file);
return when.promise((resolve, reject) => {
setTimeout(
() => {
console.log('timeout', file);
resolve(file == 'b... | JavaScript | 0 | @@ -538,25 +538,28 @@
file :
-undefined
+'__remove__'
)%0A
@@ -594,17 +594,20 @@
!=
-undefined
+'__remove__'
);%0A
|
8f85cdb47242be8b0725e3b9d4c4869235fc9410 | Change let to var for mobile | client/app/app.js | client/app/app.js | angular
.module('app', [
])
.controller('ChatBoxController', ['msgService', '$timeout', function(msgService, $timeout) {
const chat = this;
console.log('in controller');
chat.msgs = msgService.msgs;
chat.recordResponse = function() {
msgService.submitMessage(chat.msg, false);
chat.msg... | JavaScript | 0 | @@ -790,11 +790,11 @@
-let
+var
cur
|
5e5fdb9b9697d039198f63c59254ef9c0b44ebc1 | fix vector-im/vector-web#921 | src/components/views/elements/TruncatedList.js | src/components/views/elements/TruncatedList.js | /*
Copyright 2016 OpenMarket Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
... | JavaScript | 0.000002 | @@ -1805,17 +1805,17 @@
Count %3E
-0
+1
) %7B%0A
|
c37e0d4b195cf2654586b69f7c59758d16fbfae7 | fix requiring subtitles for video submissions | packages/canvas-media/src/index.js | packages/canvas-media/src/index.js | /*
* Copyright (C) 2019 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas 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, version 3 of the License.
*
* Canvas is distribut... | JavaScript | 0.000002 | @@ -2042,16 +2042,75 @@
ll%0A %7D%0A%0A
+ constructor() %7B%0A super()%0A this.subtitles = %5B%5D%0A %7D%0A%0A
handle
@@ -2676,16 +2676,58 @@
try %7B%0A
+ if (this.subtitles.lenth %3E 0) %7B%0A
@@ -2795,16 +2795,26 @@
titles)%0A
+ %7D%0A
@@ -2834,16 +2834,22 @@
Dism... |
2f16df08f76f3fb15b4de2645f341c3efb431e9c | Correct options extending | index.js | index.js | var _ = require('lodash-node'),
zlib = require('zlib'),
spawn = require('child_process').spawn;
exports.record = function (options, callback) {
var recording = '';
var defaults = {
sampleRate : 16000,
compress : false,
threshold : 0.1
};
if (_.isFunction(options))
callback... | JavaScript | 0.000059 | @@ -344,30 +344,31 @@
= _.
-merge(options, default
+extend(defaults, option
s);%0A
|
e2fabe404afaf66a755ec8f1be009285b3378446 | Improve time command. | commands/time/time.js | commands/time/time.js | const { Command } = require('discord.js-commando')
const moment = require('moment-timezone')
module.exports = class EmojiCommand extends Command {
constructor (client) {
super(client, {
name: 'time',
memberName: 'time',
group: 'time',
description: 'Get the time of a user.',
details:... | JavaScript | 0.012912 | @@ -44,16 +44,59 @@
mando')%0A
+const %7B oneLine %7D = require('common-tags')%0A
const mo
@@ -753,16 +753,96 @@
er.user%0A
+ if (user.bot === true) return message.reply('bots can%5C't have a timezone.')%0A
var
@@ -963,17 +963,33 @@
e.reply(
-%60
+oneLine%60%0A
$%7Buser.t
@@ -1024,16 +1024,92 @@
... |
13f7f9cd01c541c404e012b2a6244e4412260039 | Remove dist | dist/plugin.js | dist/plugin.js | 'use strict';
/**
* carte blanche implementation for angular2
*/
var path = require('path');
var isString = require('lodash/isString');
var isNaN = require('lodash/isNaN');
var defaults = require('lodash/defaults');
var type_doc_parser = require('./typedocparser.js').getComponentData;
/**
* Initial plugin functio... | JavaScript | 0.000373 | @@ -3298,55 +3298,8 @@
lly%0A
- // render something in the client area%0A
@@ -3413,16 +3413,158 @@
lient(%7B%0A
+ // TODO the name is used in the iframe & playground list%0A // best to pass it in there instead of hardcoding it%0A
@@ -3716,28 +3716,16 @@
dex.js')
-... |
b335c2f9230020a957acd0656d497678d9b3dc8e | Fix PolygonLayer issue with Data Accessors | src/core-layers/polygon-layer/polygon-layer.js | src/core-layers/polygon-layer/polygon-layer.js | // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... | JavaScript | 0 | @@ -5118,32 +5118,37 @@
getColor:
+ x =%3E
getLineColor,%0A
@@ -5136,32 +5136,42 @@
=%3E getLineColor
+(x.object)
,%0A getWid
@@ -5173,16 +5173,21 @@
etWidth:
+ x =%3E
getLine
@@ -5183,32 +5183,42 @@
=%3E getLineWidth
+(x.object)
,%0A update
|
182af181ad54bfda5c5e1269eb1716e6d89ccb6d | Fix creation of operation | client/backend.js | client/backend.js | // Creates a function taking the "reject" argument of a new Promise and that
// can handle jquery ajax errors.
function xhrReject(reject) {
return (xhr, textStatus, xhrError) => {
let xhrText = xhr.responseText;
let error = {};
try {
error = JSON.parse(xhrText);
} catch ... | JavaScript | 0.000005 | @@ -3955,17 +3955,17 @@
$.post(
-%60
+'
operatio
@@ -3967,18 +3967,19 @@
rations/
-$%7B
+',
operatio
@@ -3979,18 +3979,16 @@
peration
-%7D%60
, accept
|
400f236268d0dd6ec810f0f6ca0e48648336d440 | Remove unused propType | index.js | index.js | 'use strict';
var moment = require('moment');
var React = require('react');
var Time = React.createClass({
propTypes: {
value: React.PropTypes.oneOfType([
React.PropTypes.instanceOf(moment.fn.constructor),
React.PropTypes.instanceOf(Date),
React.PropTypes.number,
React.PropTypes.string
... | JavaScript | 0.000001 | @@ -431,48 +431,8 @@
ring
-,%0A globalLocale: React.PropTypes.bool
%0A %7D
|
77a3aa9a14675cab4bee82dff226be7a050b0b19 | Remove checkmark | index.js | index.js | const path = require('path')
const assert = require('assert')
const commonDir = require('common-dir')
const error = require('sergeant/error')
const chalk = require('chalk')
const pkg = require(path.join(process.cwd(), 'package.json'))
module.exports = function (deps) {
assert.equal(typeof deps.out, 'object')
asse... | JavaScript | 0.000091 | @@ -2460,33 +2460,8 @@
%5D')%7D
- $%7Bchalk.green('%5Cu2714')%7D
sav
@@ -2665,33 +2665,8 @@
%5D')%7D
- $%7Bchalk.green('%5Cu2714')%7D
sav
|
2008d5222ac327ab4f6ce70a047d886a3b35f231 | Fix decompte script | decompte.user.js | decompte.user.js | // @name Decompte
// @namespace fatmonkeys
// @include https://[url]/index.html
// @version 1
// @grant none
// ==/UserScript==
function eventFire(el, etype){
if (el.fireEvent) {
el.fireEvent('on' + etype);
} else {
var evObj;
if(etype == 'click') {
evObj = document.createE... | JavaScript | 0 | @@ -648,16 +648,44 @@
lick');%0A
+ setTimeout(function() %7B%0A
tbody
@@ -725,24 +725,26 @@
tbody')%5B0%5D;%0A
+
if (tbody)
@@ -749,16 +749,18 @@
y)%7B%0A
+
trs = tb
@@ -773,16 +773,18 @@
ildren;%0A
+
for
@@ -819,16 +819,18 @@
%7B%0A
+
+
motif =
@@ -873,24 +873,26 @@
HTML;%0A ... |
30854e8f4d325952dc424dbd987a710e92c7cc6d | add route splite component | src/client/views/app.js | src/client/views/app.js | /**
* Created by lwc on 2017/5/3.
*/
import React from 'react';
import ReactDOM from 'react-dom';
import { Route, Switch,BrowserRouter } from 'react-router-dom';
import LoginView from './login/index';
import RegisterView from './register/index';
import CustomerSuccessView from './customerSuccess/index';
import '.... | JavaScript | 0 | @@ -159,16 +159,66 @@
-dom';%0A%0A
+import AsyncComponent from './asyncComponent.js';%0A
%0Aimport
@@ -253,178 +253,344 @@
x';%0A
+%0A
import
-RegisterView from './register/index';%0Aimport CustomerSuccessView from './customerSuccess/index';%0A%0Aimport '../static/css/common.css';%0Aimport '../static/css/app.css'... |
36c89028c3a3a542a2bb767e335c340dc79df5a9 | Fixed the problem with list genre movies | lib/routes/movies.js | lib/routes/movies.js | var path = require('path');
var debug = require('debug')('MyFlix-API:Movies');
var utils = require('../utils');
var movies = {};
movies.index = function(req, res) {
debug('Movies Index');
res.send('[]');
};
movies.genres = function(req, res, db, cache) {
debug('Movies Genres');
var cacheKey = utils.md5('/movies/g... | JavaScript | 0.998658 | @@ -1471,20 +1471,17 @@
E genre
-LIKE
+=
$genre
@@ -1529,25 +1529,25 @@
%7B $genre : '
-%25
+
' + req.para
@@ -1558,17 +1558,17 @@
enre + '
-%25
+
', $isne
|
8f23d5b5904701f524dd7600b62b8e99a7681c04 | Fix Issues #62 - Fix handleAuth method | client/src/sync.js | client/src/sync.js | var SyncMessage = require( '../../lib/syncmessage' ),
messageHandler = require('./message-handler'),
socket,
_sync,
_fs,
syncCallback,
states = require('./sync-states'),
steps = require('./sync-steps');
var syncSession = {
state: states.CLOSED,
step: steps.SYNCED,
path: '/',
is: Obj... | JavaScript | 0 | @@ -1590,10 +1590,10 @@
espo
-s
n
+s
e &&
@@ -1864,17 +1864,21 @@
flags,
-c
+syncC
allback)
|
ca7bf41490297aad2108b265310b3a5bb8e53764 | Use new MUI Button | web/src/js/components/MoneyRaised/MoneyRaisedComponent.js | web/src/js/components/MoneyRaised/MoneyRaisedComponent.js | import React, { Suspense, lazy } from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
import { commaFormatted, currencyFormatted } from 'js/utils/utils'
import DashboardPopover from 'js/components/Dashboard/DashboardP... | JavaScript | 0 | @@ -182,16 +182,62 @@
graphy'%0A
+import Button from '@material-ui/core/Button'%0A
import %7B
@@ -378,112 +378,105 @@
ort
-RaisedButton from 'material-ui/RaisedButton'%0Aimport %7B goToInviteFriends %7D from 'js/navigation/navigation
+%7B inviteFriendsURL %7D from 'js/navigation/navigation'%0Aimport Link from 'js/c... |
b8c96ee75d28261561a57d4ac46fb09494aca28e | Add dir watch with file created/removed events | na-client/js/index.js | na-client/js/index.js | import dir from 'node-dir';
import path from 'path';
import commandLineArgs from 'command-line-args';
const cli = commandLineArgs([
{
name: 'dir',
alias: 'd',
type: String
}
]);
const options = cli.parse();
dir.files(options.dir, function(err, files) {
if (err) {
console.lo... | JavaScript | 0 | @@ -21,16 +21,43 @@
e-dir';%0A
+import watch from 'watch';%0A
import p
@@ -261,16 +261,279 @@
rse();%0A%0A
+function processFile(file) %7B%0A console.log('file:', file);%0A const %5Bartist, album, songFile%5D = path.relative(options.dir, file).split(path.sep);%0A console.log('artist:', artist);%0A consol... |
e78c5f520c552bc2d8be1c48ea2011c156f2af4d | Make progress indication lower case for consistency | windows/lib/WinPlatform.js | windows/lib/WinPlatform.js | // Copyright © 2014 Intel Corporation. All rights reserved.
// Use of this source code is governed by an Apache v2
// license that can be found in the LICENSE-APACHE-V2 file.
var Path = require("path");
var ShellJS = require("shelljs");
var WixSDK = require("./WixSDK");
/**
* Interface for project implementat... | JavaScript | 0.000377 | @@ -4638,16 +4638,102 @@
%5D;%0A
+ // If a line begins with a key, then update the%0A // indicator with it.%0A
@@ -5025,16 +5025,30 @@
date(tag
+.toLowerCase()
);%0A
|
39721b176309d72ebed630fd5cb932095bc0ebe4 | Fix an issue for child_added without priority | knockoutFire.js | knockoutFire.js | /*
KnockoutFire.js
(c) Hiroshi Saito <hiroshi3110@gmail.com>
CC BY 2.0
Basic Usage Example:
var firebaseRef = new Firebase("https://yourdb.firebaseio.com/items");
var viewModel = {
"items": ko.observableArray().extend{firebaseArray:{firebaase: firebaseRef}})
};
ko.applyBindings(viewModel,... | JavaScript | 0.000008 | @@ -2763,24 +2763,67 @@
(childMap);%0A
+ if (childSnap.getPriority()) %7B%0A
chil
@@ -2858,32 +2858,42 @@
.getPriority();%0A
+ %7D%0A
child.ex
@@ -2959,24 +2959,105 @@
hildMap%7D%7D);%0A
+ //console.log(childSnap.ref().path.toString() + %22:%22 + child().firebase);%0A
... |
eec5cb4fcba489b06601e1c8c1947efe4a9d1064 | Return original Sink. | src/foam/nanos/auth/ServiceProviderAwareDAO.js | src/foam/nanos/auth/ServiceProviderAwareDAO.js | /**
* @license
* Copyright 2019 The FOAM Authors. All Rights Reserved.
* http://www.apache.org/licenses/LICENSE-2.0
*/
foam.CLASS({
package: 'foam.nanos.auth',
name: 'ServiceProviderAwareDAO',
extends: 'foam.dao.ProxyDAO',
documentation: 'Enforce Spid to that of context user or AppConfig default.',
jav... | JavaScript | 0.000085 | @@ -350,16 +350,63 @@
bject',%0A
+ 'foam.dao.ProxySink',%0A 'foam.dao.Sink',%0A
'foa
@@ -2212,30 +2212,53 @@
Code: %60%0A
-return
+ProxySink proxy = (ProxySink)
super.selec
@@ -2375,16 +2375,48 @@
e%0A );%0A
+ return proxy.getDelegate();%0A
%60%0A
|
93a7e05140e948bfd1491d4fb2809fa75e9d179a | fix .arguments is undefined | index.js | index.js | var typeforce = require('typeforce')
module.exports = function middlewareConstructor (type, strict) {
let cType = typeforce.compile(type.arguments)
return function middleware (req, res, next) {
try {
typeforce(cType, req.body, strict)
next()
} catch (e) {
next(e)
}
}
}
| JavaScript | 0.999999 | @@ -103,20 +103,23 @@
%0A let c
-Type
+ompiled
= typef
@@ -139,18 +139,8 @@
type
-.arguments
)%0A%0A
@@ -217,12 +217,15 @@
ce(c
-Type
+ompiled
, re
|
e7072fd0ad833fe8cbd457b6fed22fc4925eb076 | Fix Nightwatch test | tests/nightwatch/specs/income-page.js | tests/nightwatch/specs/income-page.js | 'use strict';
var util = require('util');
var common = require('../modules/common-functions');
var constants = require('../modules/constants');
var EMPLOYMENT_QUESTIONS = constants.EMPLOYMENT_QUESTIONS;
EMPLOYMENT_QUESTIONS.EMPLOYED = EMPLOYMENT_QUESTIONS.EMPLOYED_MANDATORY.concat(EMPLOYMENT_QUESTIONS.EMPLOYED_OPTION... | JavaScript | 0.000007 | @@ -5305,24 +5305,358 @@
)%0A ;%0A
+%0A // Fields contain two different versions of error message%0A var errorTexts = %5B%0A 'Please provide an amount',%0A 'Enter 0 if this doesn%E2%80%99t apply to you'%0A %5D;%0A //Fields that contain 'enter 0' error message%0A ... |
c1d46b61e2b48e084122ba301a181499dc64206e | add remove history | src/editor/mode/shapes.js | src/editor/mode/shapes.js | /**
* @file shapes.js
* @author mengke01
* @date
* @description
* 轮廓模式处理事件
*/
define(
function(require) {
var ShapesGroup = require('../group/ShapesGroup');
var lang = require('common/lang');
var selectShape = require('render/util/selectShape');
var commandList = require('.... | JavaScript | 0.000003 | @@ -6744,32 +6744,73 @@
this.setMode();%0A
+ this.fire('change');%0A
|
2ad9ec0e191f91e0b459e1e1b9ee46d818af16d2 | remove dir | index.js | index.js | fs = require('fs');
http = require('http');
url = require('url');
util = require('util');
function getFiles (dir, files_){
files_ = files_ || [];
var files = fs.readdirSync(dir);
for (var i in files){
var name = dir + '/' + files[i];
if (fs.statSync(name).isDirectory()){
getFile... | JavaScript | 0.999649 | @@ -602,45 +602,14 @@
= %22/
-Users/roulachidiac/Desktop/iFoundry_I
+temp/i
mage
|
c7e6760eb2908bfc4ecd591065b88d2457031a26 | Use query string instead of hash. | static/js/index.js | static/js/index.js | // Detects whether or not the user is using the "Chrome autocomplete" feature.
// If they are, automatically download the video for them.
// We're also going to assume that they only want audio, because who actually
// uses my site for video downloads. >_>
function tryAutoDownload() {
// If quick is not the path, we ... | JavaScript | 0.000002 | @@ -461,20 +461,29 @@
e is no
-hash
+query string
, we can
@@ -511,32 +511,37 @@
at the user does
+%0A //
not want%0A // t
@@ -525,37 +525,32 @@
es%0A // not want
-%0A //
this feature.%0A
@@ -538,32 +538,129 @@
ant this feature
+.%0A // We are using the query string instead of the hash to ensure that t... |
6805eba259d0fe77acfd9a30cf0cb0ccd69ddacc | Fix typo | index.js | index.js | module.exports = formatter;
function formatter(options) {
options = options || {};
options.negative = options.negative === 'R' ? 'R' : 'L';
options.negativeOut = options.negativeOut === false ? false : true;
options.prefix = options.prefix || '';
options.postfix = options.postfix || '';
options.separator =... | JavaScript | 0.999999 | @@ -1346,10 +1346,10 @@
) nu
-b
m
+b
er%5B1
|
2b6189bb7465ae4543051ef32f82c18378150d7c | Add count method | lib/services/crud.js | lib/services/crud.js | /*!
* qwebs-mongo
* Copyright(c) 2017 Benoît Claveau <benoit.claveau@gmail.com> / CABASI
* MIT Licensed
*/
"use strict";
const DataError = require("qwebs").DataError;
const ObjectID = require('mongodb').ObjectID;
const ToArray = require("qwebs").ToArray;
const MongoService = require("../qwebs-mongo");
const plural... | JavaScript | 0.000005 | @@ -4625,32 +4625,196 @@
%7D);%0A %7D;%0A%0A
+ mongoCount(query) %7B%0A query = query %7C%7C %7B%7D;%0A%0A return this.collection.then(collection =%3E %7B%0A return this.count(query);%0A %7D);%0A %7D;%0A%0A
mongoSave(ob
|
ede3e53bea3b5b46cfef50c1135a86925680701a | Add "active" class to checked labels in ColumnPicker. | slick.columnpicker.js | slick.columnpicker.js | (function($) {
function SlickColumnPicker(columns,grid,options)
{
var $menu;
var defaults = {
fadeSpeed: 250
};
function init() {
grid.onHeaderContextMenu = displayContextMenu;
options = $.extend({}, defaults, options);
$menu = $("<span class='slick-columnpicker' style='display:none;position:ab... | JavaScript | 0 | @@ -1683,24 +1683,289 @@
checked%22);%0A%0A
+%09%09%09// Toggle active class%0A%09%09%09$('li', $menu).each(function() %7B%0A%09%09%09%09if ($('input:checked', this).length) %7B%0A%09%09%09%09 $('label', this).addClass('active');%0A%09%09%09%09%7D%0A%09%09%09%09$('input', this).click(function() %7B%0A%09%09%09%09 ... |
29b853fcbfc5a5b52dc4c112d3302363c2f45188 | initialize config and plugins together | index.js | index.js | const { app, BrowserWindow, shell, Menu } = require('electron');
const createRPC = require('./rpc');
const createMenu = require('./menu');
const Session = require('./session');
const genUid = require('uid2');
const { resolve } = require('path');
const isDev = require('electron-is-dev');
const AutoUpdater = require('./a... | JavaScript | 0.000001 | @@ -327,16 +327,34 @@
dater');
+%0A%0A// set up config
%0Aconst c
@@ -381,16 +381,69 @@
onfig');
+%0Aconfig.init();%0Aconst plugins = require('./plugins');
%0A%0Aif (is
@@ -829,54 +829,8 @@
);%0A%0A
-// initializate configuration%0Aconfig.init();%0A%0A
app.
@@ -1516,17 +1516,16 @@
Map();%0A
-%0A
cons
|
8cbdd27b904e078983b9e4f6b2529e8c398eb963 | update release type logic | index.js | index.js | const semver = require('semver');
const parser = require('./lib/parser');
const priority = {
'break': 1,
'feat': 2,
'docs': 3,
'fix': 4,
'test': 5,
'': 6
};
const changeReleaseMap = {
'break': 'major',
'feat': 'minor',
'fix': 'patch',
'docs': 'patch',
'test': 'patch',
... | JavaScript | 0 | @@ -128,56 +128,12 @@
'
-docs': 3,%0A 'fix': 4,%0A 'test': 5,%0A '': 6
+': 3
%0A%7D;%0A
@@ -212,11 +212,8 @@
'
-fix
': '
@@ -222,62 +222,8 @@
tch'
-,%0A 'docs': 'patch',%0A 'test': 'patch',%0A '': ''
%0A%7D;%0A
@@ -549,16 +549,41 @@
it.type%5D
+ && priority%5Bcommit.type%5D
%3C= prio
|
fefaa410842600c42968ffefd7d26472b626d9c2 | fix direction calculation for negative trending (#885) | bin/oref0-mdt-trend.js | bin/oref0-mdt-trend.js | #!/usr/bin/env node
function findRecord(arr, tell, date) {
for (var i = 0; i < arr.length; ++i)
{
if (arr[i]._tell == tell && arr[i].date == date)
{
return i;
}
}
return -1;
}
function usage ( ) {
console.log('usage: ', process.argv.slice(0, 2), '<glucose.json>');
}
if (!module.parent) {
var gluc... | JavaScript | 0.000002 | @@ -2354,17 +2354,17 @@
elta %3C -
-1
+3
)%0A%09%09%7B%0A%09%09
@@ -2393,18 +2393,22 @@
rrow = %22
-45
+DOUBLE
_DOWN%22;%0A
@@ -2437,24 +2437,21 @@
tion = %22
-FortyFiv
+Doubl
eDown%22;%0A
@@ -2586,33 +2586,33 @@
se if (delta %3C -
-3
+1
)%0A%09%09%7B%0A%09%09%09output_
@@ -2625,38 +2625,34 @@
.trend_arrow = %... |
213def6afced7b930c799bc88cb1e4a2cf2d09c9 | Set title to current track | static/mainpage.js | static/mainpage.js | function playAlbum(index) {
$.get("/api/play/" + index, function() {
$("#overlay").html('<div style="font-size: 32px">Playing...</div>');
});
}
function enqueueAlbum(index) {
$.get("/api/enqueue/" + index, function() {
$("#overlay").html('<div style="font-size: 32px">Enqueued!</div>');
... | JavaScript | 0.000001 | @@ -1767,32 +1767,86 @@
fa-fw%22%3E%3C/i%3E');%0A
+ document.title = %22XUB (Not playing)%22;%0A
%7D el
@@ -2573,32 +2573,148 @@
btn + '%22%3E%3C/i%3E');
+%0A%0A document.title = escapeHtml(np.title) + %22 (%22 + Math.round(np.playtime / np.duration * 100) + %22%25)%22;
%0... |
10d6f403261f280a639b422ae9ad4cc7951a63a0 | Do not include the full request body in errors | index.js | index.js | "use strict";
/*
* Cassandra-backed table storage service
*/
// global includes
var spec = require('restbase-mod-table-spec').spec;
function RBCassandra(options) {
this.options = options;
this.conf = options.conf;
this.log = options.log;
this.setup = this.setup.bind(this);
this.store = null;
... | JavaScript | 0.998834 | @@ -2464,35 +2464,203 @@
req:
-req
+%7B%0A uri: req.uri,%0A headers: req.headers,%0A body: req.body && JSON.stringify(req.body).slice(0,200)%0A %7D
%0A %7D%0A
@@ -3248,35 +3248,203 @@
req:
-req
+%7B%0A ... |
0b3125d691d072a74159347f88b42358c6ae2af6 | Read storage file rather than requiring it | lib/storages/json.js | lib/storages/json.js | 'use strict';
var _ = require('lodash');
var Bluebird = require('bluebird');
var fs = require('fs');
var Migration = require('../migration');
var path = require('path');
var redefine = require('redefine');
module.exports = redefine.Class({
constructor: function (options) {
this.options = o... | JavaScript | 0.000001 | @@ -1521,52 +1521,19 @@
var
-storage;%0A%0A try %7B%0A storage = require(
+filePath =
this
@@ -1564,91 +1564,206 @@
path
-)
;%0A
-%7D catch (e) %7B%0A storage = %5B%5D;%0A %7D%0A%0A return Bluebird.resolve(storage
+var readfile = Bluebird.promisify(fs.readFile);%0A%0A return readfile(fil... |
6b0c0ac5767a0b65a193fc2cefa77a6e3703da1c | fix migration message | bin/profile/migrate.js | bin/profile/migrate.js | var Chalk = require('chalk');
var Cli = require('structured-cli');
var ConfigFile = require('../../lib/config');
var PrintProfile = require('../../lib/printProfile');
var _ = require('lodash');
var node4Migration = require('../../lib/node4Migration');
var Async = require('async');
var Sandbox = require('sandboxjs');
... | JavaScript | 0.000002 | @@ -3952,16 +3952,24 @@
%7D%5Cn* $%7Bw
+.message
%7D%60 : %60*
@@ -3971,16 +3971,24 @@
: %60* $%7Bw
+.message
%7D%60);%0A
|
fc6a945ea768e1ddec8c9e5703adb78480f50b32 | Send Redis Password on Default Connection | bin/redis-commander.js | bin/redis-commander.js | #!/usr/bin/env node
var optimist = require('optimist');
var redis = require('redis');
var app = require('../lib/app');
var fs = require('fs');
var myUtils = require('../lib/util');
var redisConnections = [];
redisConnections.getLast = myUtils.getLast;
var args = optimist
.alias('h', 'help')
.alias('h', '?')
.o... | JavaScript | 0 | @@ -2071,16 +2071,42 @@
socket'%5D
+ %7C%7C args%5B'redis-password'%5D
) %7B%0A
|
743e63c274f541b623013d6f7812608127aec83e | fix invalid token | index.js | index.js | exports.data = {,
HS16: require('./data/HS16'),
FS16: require('./data/FS16'),
HS15: require('./data/HS15'),
FS15: require('./data/FS15'),
HS14: require('./data/HS14'),
FS14: require('./data/FS14'),
HS13: require('./data/HS13'),
FS13: require('./data/FS13'),
HS12: require('./data/HS12'),
FS12: require('./data/... | JavaScript | 0.001067 | @@ -9,17 +9,16 @@
data = %7B
-,
%0A%09HS16:
|
9ca95ec7219daface8a6fc2674000653de0922c0 | Use .from | index.js | index.js | 'use strict'
var net = require('net')
, tls = require('tls')
, http = require('http')
, https = require('https')
, events = require('events')
, assert = require('assert')
, util = require('util')
, Buffer = require('safe-buffer').Buffer
;
exports.httpOverHttp = httpOverHttp
exports.httpsOverHttp = htt... | JavaScript | 0 | @@ -3541,18 +3541,19 @@
-new
Buffer
+.from
(con
|
947ea9d67d778222bdd6a72c6594cbc727ea4df5 | Update index.js | index.js | index.js | var spawn = require('child_process').spawn;
var pandocRenderer = function(data, options, callback){
var config = hexo.config.pandoc;
var extensions = '', filters = [], extra = [], meta = [], math = '--mathjax';
if(config) {
if(config.extensions) {
config.extensions.forEach(function(extension) {
... | JavaScript | 0 | @@ -1826,18 +1826,23 @@
emove th
-is
+ese two
harmles
@@ -1858,16 +1858,17 @@
message
+s
%0A%09%09// to
@@ -2103,16 +2103,16 @@
%5Cn%22%0A
-
%09%09,'');%0A
%09%09if
@@ -2107,16 +2107,293 @@
%09%09,'');%0A
+%09%09error = error.replace(%0A%09%09%09%22%5BWARNING%5D This document format requires a nonempty %3Ctit... |
cf655a7a6ccf16f6e69ce8cc93ac6f84fb9a2dea | Tidy up for 1.0.0 | index.js | index.js | var qconf = require('qconf');
var path = require('path');
module.exports = function (config) {
var env, configFile, baseConfig, overrides;
if(arguments.length ===0) {
env = process.env.NODE_ENV || 'development';
} else {
if(typeof config ==='string'){
env = config
} else { //config is believed to be an obj... | JavaScript | 0.000789 | @@ -137,16 +137,17 @@
des;%0A%09if
+
(argumen
@@ -159,16 +159,17 @@
ngth ===
+
0) %7B%0A%09%09e
@@ -226,16 +226,17 @@
e %7B%0A%09%09if
+
(typeof
|
91f4287648f669207533891ad50704c79c42ba4b | Call done callback in failOnError flush function | index.js | index.js | //////////////////////////////
// Sass Lint
// - A Gulp Plugin
//
// Lints Sass files
//////////////////////////////
'use strict';
//////////////////////////////
// Variables
//////////////////////////////
var through = require('through2'),
gutil = require('gulp-util'),
lint = require('sass-lint'),
path =... | JavaScript | 0.000001 | @@ -1883,24 +1883,26 @@
, function (
+cb
) %7B%0A var
@@ -2194,16 +2194,27 @@
);%0A %7D
+%0A%0A cb();
%0A %7D);%0A%0A
|
bcac26cb5ee421a72dea67d1f803685395eac5ae | Print version at startup | index.js | index.js | /*
* Breach: index.js
*
* Copyright (c) 2014, Stanislas Polu. All rights reserved.
*
* @author: spolu
*
* @log:
* - 2014-05-14 spolu [GiG.fs 0.2.x] local only
* - 2014-04-17 spolu Removed monolithic session
* - 2014-04-15 spolu Try outs with session_manager
* - 2014-01-17 spolu Removed express, expos... | JavaScript | 0 | @@ -1029,24 +1029,94 @@
on.log.out('
+%5BBreach v' + require('./package.json').version + %0A '%5D
Starting...'
|
798628937b2c224bcaa009e42a6f05f19acbb4c3 | encode periods | index.js | index.js | /* globals process */
'use strict'
// other
const bigInt = require('big-integer')
// twitter api
const twitterParse = require('twitter-url-parser')
const twitterAPI = require('node-twitter-api')
const twitter = new twitterAPI({
consumerKey: process.env.TWITTER_CONSUMER_KEY,
consumerSecret: process.env.TWITTER_CON... | JavaScript | 0.999999 | @@ -1591,16 +1591,36 @@
eplace('
+.', '%252E').replace('
(', '%2528
|
48bb43a18b4a59cbbd02044b7e7172626a725c3c | add open() and close() brace helpers | index.js | index.js |
/**
* Module dependencies.
*/
var debug = require('debug')('css-parse');
module.exports = function(css){
/**
* Parse stylesheet.
*/
function stylesheet() {
return { stylesheet: { rules: rules() }};
}
/**
* Parse ruleset.
*/
function rules() {
var node;
var rules = [];
whit... | JavaScript | 0.000001 | @@ -209,32 +209,203 @@
ules() %7D%7D;%0A %7D%0A%0A
+ /**%0A * Opening brace.%0A */%0A%0A function open() %7B%0A return match(/%5E%7B%5Cs*/);%0A %7D%0A%0A /**%0A * Closing brace.%0A */%0A%0A function close() %7B%0A return match(/%5E%7D%5Cs*/);%0A %7D%0A%0A
/**%0A * Parse
@@ -2313,37 +2313,29 @... |
e9769f0a95964b4adae5ba460f4cf262acde2c3b | Deal with present but undefined options.size | index.js | index.js | "use strict";
var url = require("url"),
util = require("util");
var lockingCache = require("locking-cache");
var enableCaching = function(uri, source, locker) {
if (source._cached) {
// already cached
return source;
}
if (typeof(uri) === "string") {
uri = url.parse(uri, true);
}
var make... | JavaScript | 0.000001 | @@ -1885,24 +1885,79 @@
ons
-? options.size :
+&& options.size ? options.size : null;%0A options.size = options.size %7C%7C
10;
|
55f2eea6b35dadb85c01eddea7232227e7ee74bb | Fix guild add message | index.js | index.js | const Discord = require('discord.js');
const client = new Discord.Client();
const config = require('./config.js');
const utils = require('./utils.js');
var betaMode = false;
if (config.tokens.discord_beta) betaMode = true;
client.on('ready', () => {
client.user.setGame('d!help');
if (betaMode) client.user.setGame... | JavaScript | 0 | @@ -1242,22 +1242,50 @@
ild.
-defaultChannel
+channels.filter(c=%3Ec.type=='text').first()
.sen
|
0ead169a41158c2551ef5085d1ff1739fe19157e | Add check if options is undefined | index.js | index.js | /* global Buffer */
var pocoGen = require('typescript-cs-poco');
var through = require('through2');
var gutil = require('gulp-util');
var PluginError = gutil.PluginError;
var PLUGIN_NAME = 'gulp-typescript-cs-poco';
module.exports = function(options) {
var stream = through.obj(function(file, enc, cb) {
if (file.is... | JavaScript | 0.0001 | @@ -651,16 +651,27 @@
suffix =
+ options &&
options
|
def6e148daf936b45a4ad166e16ed1c703b310a5 | Fix file type regexps | index.js | index.js | /*
* gult-stubby-server
* https://github.com/felixzapata/gulp-stubby-server
*
* Copyright (c) 2014 Félix Zapata
* Licensed under the MIT license.
*/
'use strict';
var _ = require('lodash'),
fs = require('fs'),
glob = require('glob'),
gutil = require('gulp-util'),
Stubby = require('stubby').Stubb... | JavaScript | 0 | @@ -4928,11 +4928,13 @@
f (/
+%5C
.ya
+?
ml$/
@@ -5029,16 +5029,17 @@
se if (/
+%5C
.js$/g.t
|
1158f685ef6b91ab65862c709af35fd444dd8e67 | fix issue with deeply nested stacks where relative paths would not resolve correctly | index.js | index.js | var _ = require('lodash'),
url = require('url'),
path = require('path'),
Promise = require('bluebird'),
readFile = Promise.promisify(require('fs').readFile),
pathParse = require('path-parse'),
request = Promise.promisify(require('request')),
AWS = require('aws-sdk-proxy'),
s3 = new AWS.S3(),
jsonlint ... | JavaScript | 0 | @@ -6171,147 +6171,48 @@
urn
-module.exports(%7B%0A template: _.isUndefined(template) ? null : template,%0A url: absolute,%0A scope: scope,%0A %7D).return(
+recurse(parseLocation(absolute), scope,
temp
|
bc13711de56587603503832603680ff77d24d896 | allow user_agent to be queried | index.js | index.js | #! /usr/bin/env node
var fs = require('fs')
, _ = require('underscore')
, argv = require('optimist').argv
, async = require('async')
, glob = require('glob')
, colors = require('colors/safe')
, usefulColors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan']
, OUTPUT_LIMIT = 10
, VERSION = 'v0.2.0'... | JavaScript | 0.000002 | @@ -2439,16 +2439,164 @@
t(' ');%0A
+ %0A var user_agent = '';%0A for(var i = 14; i %3C attributes.length - 2; i++) %7B %0A user_agent = user_agent + attributes%5Bi%5D + %22 %22%0A %7D%0A %0A
retu
@@ -3160,24 +3160,56 @@
ibutes%5B12%5D,%0A
+ 'user_agent': user_agent,%0A
'total
|
c99ed0d53545b29a37f065cb3e2adff439d70131 | Allow alternative hash algorithm | index.js | index.js | // Xiongxiong
// Bearer token generator and validator
// AGPLv3 or later
// Copyright (c) 2014 Genome Research Limited
var util = require('util'),
crypto = require('crypto');
module.exports = function(privateKey, lifetime) {
lifetime = parseInt(lifetime || 3600, 10);
var getHMAC = function() { return crypt... | JavaScript | 0.000123 | @@ -88,16 +88,22 @@
(c) 2014
+, 2015
Genome
@@ -119,16 +119,16 @@
Limited%0A
-
%0Avar uti
@@ -229,16 +229,27 @@
lifetime
+, algorithm
) %7B%0A li
@@ -278,16 +278,21 @@
time
+, 10)
%7C%7C 3600
, 10
@@ -291,14 +291,10 @@
3600
-, 10)
;
+%0A
%0A v
@@ -306,16 +306,17 @@
tHMAC =
+(
function
@@ -319,16 +31... |
2c1f1f84e5d4f6124c158b8b0b5c8088663f3513 | Add a fake prices endpoint | index.js | index.js | "use strict";
var express = require("express");
module.exports = function () {
var app = express();
// Allow all domains to request data (see CORS for more details)
app.use(function (req, res, next) {
res.set("Access-Control-Allow-Origin", "*");
next();
});
// fake handler for the books endpoin... | JavaScript | 0.000619 | @@ -514,24 +514,258 @@
%7D);%0A %7D);%0A%0A
+ // fake handler for the books endpoints%0A app.get(%22/books/:isbn/prices%22, function (req, res) %7B%0A var isbn = req.param(%22isbn%22);%0A res.jsonp(%5B%0A %7B price: 56.78 %7D,%0A %7B price: 12.34 %7D,%0A %7B price: 34.56 %7D,%0A %5D);%0A %... |
ac894c493612e973df3f02f91fd3a270c020e09f | Revert "BREAKING: improve how moment/moment-timezone are resolved" | index.js | index.js | /* globals require, module, process */
/* eslint no-fallthrough: 0, no-duplicate-case: 0 */
'use strict';
const UnwatchedDir = require('broccoli-source').UnwatchedDir;
const mergeTrees = require('broccoli-merge-trees');
const defaults = require('lodash.defaults');
const funnel = require('broccoli-funnel');
const exis... | JavaScript | 0 | @@ -745,553 +745,8 @@
%7D,
-%0A %0A findModulePath(moduleName) %7B%0A let basedir = this.project.root;%0A%0A try %7B%0A let resolve = require('resolve');%0A%0A return path.dirname(resolve.sync(moduleName, %7B basedir: basedir %7D));%0A %7D catch(_) %7B%0A try %7B%0A return path.dirna... |
43db2073ac5cbb4fae59b9c3cfeecfbca531dc21 | Make the tests pass. | index.js | index.js | var _ = require('lodash');
/**
* defaultsDeep
*
* Implement a deep version of `_.defaults`.
*
* This method is hopefully temporary, until lodash has something
* similar that can be called in a single method. For now, it's
* worth it to use a temporary module for readability.
* (i.e. I know what `_.defaults` m... | JavaScript | 0.000008 | @@ -471,84 +471,175 @@
ge,
-_.defaults);%0A%0A// module.exports = _.partialRight(_.merge, function () %7B%0A//
+function () %7B%0A%0A // Ensure dates and arrays are not recursively merged%0A if (_.isArray(arguments%5B0%5D) %7C%7C _.isDate(arguments%5B0%5D)) %7B%0A return arguments%5B0%5D;%0A %7D%0A return
... |
73ea9c5edbf5e190bfdb2b7f1f8b695d2cd36fad | Remove wrong state setting after negotiation | lib/telnet-client.js | lib/telnet-client.js | // Node.js Telnet client
// TODO: * login (username/password)
// * raise and emit errors
var util = require('util');
var events = require('events');
var net = require('net');
var socket = new net.Socket();
// define a constructor (object) and inherit EventEmitter functions
function Telnet() {
events.EventEmi... | JavaScript | 0 | @@ -3013,49 +3013,8 @@
) %7B%0A
- telnetObj.telnetState = 'negotiate';%0A
@@ -3040,17 +3040,16 @@
a = '';%0A
-%0A
var
@@ -3143,59 +3143,8 @@
lse
-%7B%0A telnetObj.telnetState = 'getprompt';%0A
chun
@@ -3158,22 +3158,16 @@
Return;%0A
- %7D%0A
%7D%0A el
|
8262b4b11d2b01f163a2b2c96c42414ae5d994c9 | Fix the template | lib/test_template.js | lib/test_template.js | /*global describe, it */
// Automatically generated mocha test case
// File {{{ filename }}}
(function (context, module, require) {
describe('Wrapper for {{{ filename }}}', function () {
it('should be properly wrapped', function () {
module.call(context, require);
});
});
}(this,
function (require)... | JavaScript | 0.001075 | @@ -482,108 +482,32 @@
-declaredModules = Object.create(null),%0A M = Object.create(null),%0A T = Object.create(null);
+M = Object.create(null),
%0A%0A
@@ -725,23 +725,9 @@
all(
-declaredModules
+M
, mo
|
2e37aa9b4f1fc5fdc063173598d5cdf730e32f3b | add missing .close() function (noop) | lib/tilelive-file.js | lib/tilelive-file.js | module.exports = FileBackend;
var fs = require('fs');
var url = require('url');
var path = require('path');
var qs = require('querystring');
var mkdirp = require('mkdirp');
function FileBackend(uri, callback) {
if (typeof uri === 'string') uri = url.parse(uri, true);
else if (typeof uri.query === 'string') ur... | JavaScript | 0.000037 | @@ -3019,28 +3019,103 @@
data, callback);%0A %7D);%0A%7D;%0A
+%0AFileBackend.prototype.close = function(callback) %7B%0A callback(null);%0A%7D;%0A
|
73186804f50221282d04bf25f7e2d3c387a4eb18 | remove big comment name from top | _map.js | _map.js | // MAP
var fs = require('fs')
var asyncMap = require('slide').asyncMap
var through = require('through')
var browserify = require('browserify')
var uglify = require('uglify-js')
module.exports = function Map (opts) {
// add an option to watch dir and recompile
var s = through(function write (d) {
this.queue... | JavaScript | 0 | @@ -1,13 +1,4 @@
-// MAP %0A%0A
var
|
a6aeec3910794a7e3ca56a3e46b2bba9c2c71961 | fix case on requires... isnt using a mac fun... | index.js | index.js | var constructors = {
BaseError: require('./baseError'),
BadRequest: require('./badRequest'),
Unauthorised: require('./unauthorised'),
Forbidden: require('./forbidden'),
NotFound: require('./notFound'),
MethodNotAllowed: require('./methodNotAllowed'),
NotAcceptable: require('./notAcceptable')... | JavaScript | 0 | @@ -690,18 +690,18 @@
ire('./u
-RI
+ri
TooLong'
@@ -1543,19 +1543,19 @@
ire('./h
-TTP
+ttp
VersionN
|
8467caf84a566d4b8f868dd32c4e539027f6159b | Add result formatters | index.js | index.js | /**
* Module dependencies
*/
var request = require('request')
, _ = require('underscore');
// Endpoint template
var endpoint = _.template('http://<%=service%>/service/<%=method%>/lomadee/<%=id%>/<%=country%>/');
var Buscape = function Buscape(opts) {
// Use production by default
this._service = 'bws.buscape.c... | JavaScript | 0.000003 | @@ -1911,12 +1911,798 @@
%0A %7D);
+%0A%0Avar format = function (products) %7B%0A return products.map(function (product) %7B%0A var p = product.product%0A , name = p.productname %7C%7C p.productshortname%0A , price = p.pricemin %7C%7C p.pricemax%0A , offers = p.numoffers%0A , currency = p.cu... |
deaeb1d16d48863ed7c56e65a58b50365c9b56e7 | secure random implemented on node | index.js | index.js | module.exports = function (options) {
function randomChar(chars) {
return chars[Math.round(Math.random() * (chars.length - 1))];
}
//defaults
options = options || {};
options.length = options.length || 16;
options.chars = options.chars || '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJK... | JavaScript | 0 | @@ -27,24 +27,25 @@
(options) %7B%0A
+%0A
function
@@ -49,96 +49,609 @@
ion
-randomChar(chars) %7B%0A return chars%5BMath.round(Math.random() * (chars.length - 1))%5D
+secureRandom(length, chars) %7B%0A var crypto = require('crypto');%0A var result = %22%22;%0A var randomBytes = cryp... |
a940374a1eefa3e6cf286e284f1e0ef8c95d7e55 | handle OPTIONS request in a better way | index.js | index.js | #! /usr/bin/env node
const express = require('express');
const app = express();
const fs = require('fs');
const path = require('path');
const bodyParser = require('body-parser');
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(function(req, res, next) {
// Website you wish... | JavaScript | 0.000003 | @@ -172,16 +172,56 @@
arser');
+%0Aconst allowedMethods = %5B'GET', 'POST'%5D;
%0A%0Aapp.us
@@ -519,48 +519,33 @@
s',
-'GET, POST, OPTIONS, PUT, PATCH, DELETE'
+allowedMethods.join(', ')
);%0A%0A
@@ -2684,166 +2684,440 @@
%0A%0A
-// OPTIONS calls don't check for a valid JSON file to load: they always return%0A ... |
48b7f215da3d6608e6b010fa6135e19c537cbb0c | Modify grunt-contrib-watch config | dev/Gruntfile.js | dev/Gruntfile.js | // Обязательная обёртка
module.exports = function(grunt) {
// Задачи
grunt.initConfig({
// Пути к файлам и папкам JS
js_files: 'js/main.js',
js_plugins_files: 'js/plugins/**/*.js',
js_result_file: '../js/scripts.js',
// SASS + Compass
compass: {
main: {
options: {
s... | JavaScript | 0.000001 | @@ -1816,19 +1816,20 @@
%7B%0A
-css
+main
: %7B%0A
@@ -1958,305 +1958,99 @@
%25%3E'
-%0A %5D,%0A tasks: %5B'compass', 'clean', 'csslint', 'autoprefixer', 'cssmin'%5D%0A %7D,%0A js: %7B%0A files: %5B%0A '%3C%25= concat.main.src %25%3E',%0A '%3C%25= jshint.op... |
dc8d9451f8451d946cba9cfd3cddbf2ad8374e67 | Reformat so it looks pretty on Github | index.js | index.js | module.exports = {
normalize: function extract(phoneNumber) {
return phoneNumber.replace(
/^[\+\d{1,3}\-\s]*\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/,
"$1$2$3"
);
},
format: function format(phoneNumber, formatString, options) {
// Normalize the phone number first if asked to do s... | JavaScript | 0 | @@ -59,25 +59,26 @@
umber) %7B%0A%0A
-%09
+
return phone
@@ -95,18 +95,20 @@
lace(%0A
-%09%09
+
/%5E%5B%5C+%5Cd%7B
@@ -175,10 +175,12 @@
,%0A
-%09%09
+
%22$1$
@@ -186,17 +186,18 @@
$2$3%22%0A
-%09
+
);%0A%0A %7D,
@@ -575,12 +575,15 @@
%7D%0A
-%0A %09
+ %0A
retu
|
e9a34955863bff84679a78b9920940db2d6e3266 | Add removal warning message | index.js | index.js | /*jslint node: true */
'use strict';
var map = require('map-stream'),
lodash = require('lodash');
module.exports = function (options) {
function postMortem() {
var stdin = process.stdin;
if (stdin && stdin.isTTY) {
stdin.setRawMode(true);
stdin.on('data', function catc... | JavaScript | 0 | @@ -97,16 +97,169 @@
ash');%0A%0A
+console.log('%5Cx1b%5B31m', '='.repeat(80))%0Aconsole.log('%5Cx1b%5B31m', 'WARNING! gulp-postmortem to be removed soon!')%0Aconsole.log('%5Cx1b%5B31m', '='.repeat(80))%0A%0A
module.e
|
472bb84b833377f080495a1700de42355053e62a | Set the JSHint environment to NodeJS to make tests pass | lib/PngQuant.js | lib/PngQuant.js | var childProcess = require('child_process'),
Stream = require('stream').Stream,
util = require('util'),
which = require('which'),
memoizeAsync = require('memoizeasync');
function PngQuant(pngQuantArgs) {
Stream.call(this);
this.pngQuantArgs = pngQuantArgs;
if (!this.pngQuantArgs || this.p... | JavaScript | 0 | @@ -1,8 +1,31 @@
+/*jshint node: true */%0A
var chil
|
8534444b3a68708933bf9675c4f6bb2a4606dc2e | add layerPriority | dev/src/Scene.js | dev/src/Scene.js | enchant.Scene = enchant.Class.create(enchant.Group, {
initialize: function() {
var game = enchant.Game.instance;
enchant.Group.call(this);
this.width = game.width;
this.height = game.height;
this.scene = this;
this._element = document.createElement('div');
... | JavaScript | 0.000001 | @@ -746,16 +746,50 @@
s = %7B%7D;%0A
+ this._layerPriority = %5B%5D;%0A
@@ -1674,16 +1674,68 @@
bling);%0A
+ this._layerPriority.splice(i, 0, type);%0A
@@ -1791,33 +1791,105 @@
ement);%0A
-%7D
+ this._layerPriority.push(type);%0A %7D%0A layer.scene = thi... |
3d0736d39b5e14f4e978874429994a3acbfcd368 | update project | auto.js | auto.js | const git = require('simple-git')
const fb = require('./fb')
var ref = fb.child("servers")
ref.child(process.env.DEVICE).on('value', autoPull)
// process.on('SIGINT', function() {
// process.exit()
// });
var running = false
setInterval(function() {
if (running == true) return false
running = true
autoPull... | JavaScript | 0 | @@ -225,16 +225,19 @@
false%0A%0A
+//
setInter
@@ -253,16 +253,19 @@
ion() %7B%0A
+//
if (ru
@@ -292,18 +292,21 @@
n false%0A
+//
+
running
@@ -312,16 +312,19 @@
= true%0A
+//
autoPu
@@ -328,16 +328,19 @@
oPull()%0A
+//
%7D, confi
@@ -563,18 +563,35 @@
%0A
- //
.pull(
+'origin', 'master'... |
cb60bf7e4994a2d21b616dc2fcf298dd765e47f6 | update project | auto.js | auto.js | const git = require('simple-git');
const firebase = require('firebase')
const config = require('./config')
// const path = __dirname + '/iotos';
// git(path).then etc..
firebase.initializeApp(config);
var ref = firebase.database().ref().child("servers")
ref.child(config.device).on('value', deploy)
// ref.child(con... | JavaScript | 0 | @@ -479,16 +479,12 @@
...
- !!
');%0A
-%0A
%09git
@@ -535,26 +535,24 @@
ng pull ...
-!!
');%0A%09%7D)%0A%09.pu
@@ -668,14 +668,12 @@
app
+
...
- !!
');%0A
@@ -729,11 +729,8 @@
one.
- !!
');%0A
|
18d0a1daa21aab1cbc1d0f7ff3690b91c1e0291d | assert that name exists | index.js | index.js |
var queue = require('level-queue')
var hooks = require('level-hooks')
var uuid = require('node-uuid')
var iterate = require('iterate')
function between(key, range) {
return (
(!range.start || range.start <= key) &&
(!range.end || key <= range.end)
)
}
module.exports = function (db) {
if(db.trig... | JavaScript | 0.999999 | @@ -463,24 +463,28 @@
job%0A%0A
+if(!
range.name
@@ -485,33 +485,105 @@
name
- = range.name %7C%7C uuid()
+)%0A throw new Error('expects trigger to have name')%0A%0A //TODO allow range to be string.
%0A
@@ -617,16 +617,16 @@
t %7C%7C ''%0A
-
ra
@@ -651,16 +651,17 @@
end %7C%7C
+... |
3dea10f08b93e1dfaacb14f555acec38f0baced1 | Add options for fill and strokeRect functions | base.js | base.js | var SCREEN_WIDTH = 0;
var SCREEN_HEIGHT = 0;
var PLAYER_RADIUS = 12;
var PLAYER_SPEED = 4;
var THRUSTER_SPEED = 8;
var CAMERA_SPEED = 64;
var FRICTION = 0.8;
var LEVELS = [
{ l: 0, t: 0, r: 704, b: 552 },
{ l: 0, t: 0, r: 2000, b: 2000 }
];
var round = function(num, place) {
if (isNaN(num)) return n... | JavaScript | 0 | @@ -1195,34 +1195,32 @@
t.fill();%0D%0A %7D%0D%0A
-%0D%0A
stroke = funct
@@ -1461,38 +1461,36 @@
l;%0D%0A context.
-stroke
+fill
Rect(x, y, w, h)
@@ -1497,18 +1497,16 @@
;%0D%0A %7D%0D%0A
-%0D%0A
stroke
@@ -1737,20 +1737,23 @@
, fill,
-font
+options
) %7B%0D%0A
@@ -1802,34 +1802,145 @@
if (
-font)... |
275bbf0aba077ea05f23455fcff2d7e929c6e71e | set context and remove arrow methods | index.js | index.js | 'use strict'
var vm = require('vm')
var path = require('path')
var flattenDeep = require('lodash.flattendeep')
var MemoryFileSystem = require('memory-fs')
var createRoutes = require('react-router').createRoutes
var webpack = require('webpack')
function extractPathFromRoute (route, prefix = '') {
if (!route) {
r... | JavaScript | 0.000007 | @@ -34,35 +34,8 @@
m')%0A
-var path = require('path')%0A
var
@@ -1003,16 +1003,34 @@
iler) %7B%0A
+ var self = this%0A
compil
@@ -1046,16 +1046,25 @@
('make',
+ function
(compil
@@ -1079,19 +1079,16 @@
allback)
- =%3E
%7B%0A n
@@ -1172,68 +1172,75 @@
-entry: %7B%0A routes: %5Bpath.join(c... |
224810c7747b46dbcf99861db730d18db722ebbd | tweak base rules | base.js | base.js | 'use strict'
module.exports = {
rules: {
/**
* Possible Errors
*/
'no-cond-assign': 2,
'no-constant-condition': 2,
'no-control-regex': 2,
'no-debugger': 2,
'no-dupe-args': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty': 2,
'no-empty-character-class': 2,
... | JavaScript | 0.000001 | @@ -1559,25 +1559,25 @@
alid-this':
-0
+1
,%0A 'no-it
@@ -2597,21 +2597,57 @@
1, %7B
- args: 'none'
+%0A vars: 'all',%0A args: 'after-used',%0A
%7D%5D,
|
affa093142a3937d74d27ca699100e924c54e41a | fix #1 | index.js | index.js | #! /usr/bin/env node
const Validator = require('lintspaces');
const types = require('lintspaces/lib/constants/types');
const path = require('path');
const fs = require('fs');
const program = require('commander');
const glob = require('glob-fs')({gitignore: true});
const util = require('util');
//Iterate over object pr... | JavaScript | 0.000002 | @@ -733,26 +733,16 @@
sage.red
-, filename
);%0A p
@@ -1182,21 +1182,20 @@
%0A%0A log.
-debug
+info
(%60Using
@@ -1218,16 +1218,17 @@
' from:
+%22
$%7BfilePa
@@ -1230,16 +1230,17 @@
ilePath%7D
+%22
%60);%0A%0A i
@@ -1269,17 +1269,17 @@
g.fatal(
-'
+%60
Error: S
@@ -1302,18 +1302,27 @@
config %22
-%25s... |
9b2a98c1db365e13bee893f01b419956497eeab3 | optimize a bit | index.js | index.js | var path = require('path')
, util = require('util')
, fs = require('fs')
var select = require('cssauron-falafel')
, escape = require('quotemeta')
, through = require('through')
, falafel = require('falafel')
var CWD = process.cwd()
, relative = /^\./
module.exports = jut
function jut(modules, _aliases) ... | JavaScript | 0.000071 | @@ -331,16 +331,17 @@
iases =
+(
_aliases
@@ -355,16 +355,33 @@
equire'%5D
+).map(toSelector)
%0A%0A var
@@ -517,16 +517,132 @@
stream%0A%0A
+ function toSelector(alias) %7B%0A return select(util.format('call id%5Bname=%25s%5D:first-child + literal', alias))%0A %7D%0A%0A
functi
@@ -820,45 +820,14 @@
va... |
776212c87f16de4eeec5717477408b7b1157f2a5 | use textContent to set element text | index.js | index.js | 'use strict';
/**
* A fake reporter that acts as our test environment and exposes
* a custom test container for each test case.
*/
function JasmineTestContainerSupport(parent, options) {
parent.call(this, options);
var currentSpec;
this.specStarted = function(result) {
currentSpec = result;
var c... | JavaScript | 0.000004 | @@ -831,24 +831,26 @@
derLink.
-innerTex
+textConten
t = resu
@@ -1492,16 +1492,18 @@
tor.
-innerTex
+textConten
t =
|
e876170ab423e2307622f2744713f5d41487ce55 | Change startsWith param test method to be use with all version of nodejs | index.js | index.js | /**
* Homemade gulp options manager
*/
module.exports = {
options: null,
read: function(argv) {
var optionsClean = [];
argv.slice(2, argv.length).forEach(function(p) {
if (p.startsWith('--') && p.length !== 2) {
optionsClean.push(p.replace('--', ''));
}
... | JavaScript | 0 | @@ -209,24 +209,27 @@
(p.
-startsWith('--')
+indexOf('--') === 0
&&
|
6fdb40e276baa81ac4708a31a4d3ae3ca101ebcf | support 0.8 | index.js | index.js | var Stream = require("stream")
module.exports = WriteStream
WriteStream.toArray = require("./array")
function WriteStream(write, end) {
var stream = new Stream()
, ended = false
end = end || defaultEnd
stream.write = handleWrite
stream.end = handleEnd
return stream
function handle... | JavaScript | 0.000016 | @@ -271,24 +271,85 @@
handleEnd%0A%0A
+ // Support 0.8 pipe %5BLEGACY%5D%0A stream.writable = true%0A%0A
return s
|
3ab915c0f7aa8a9df388192ba649a7caf3a6b7f4 | remove polyfill | index.js | index.js | 'use strict'
module.exports = {
name: 'ember-prop-types',
init () {
this.options = this.options || {}
this.options.babel = this.options.babel || {}
this.options.babel.optional = this.options.babel.optional || []
if (this.options.babel.optional.indexOf('es6.spec.symbols') === -1) {
this.opti... | JavaScript | 0.000003 | @@ -56,433 +56,7 @@
pes'
-,%0A%0A init () %7B%0A this.options = this.options %7C%7C %7B%7D%0A this.options.babel = this.options.babel %7C%7C %7B%7D%0A this.options.babel.optional = this.options.babel.optional %7C%7C %5B%5D%0A%0A if (this.options.babel.optional.indexOf('es6.spec.symbols') === -1) %7B%0A ... |
08cba7f8c067bb4da87feab5949b7b132c1ef6db | check first | index.js | index.js | // # Ghost bootloader
// Orchestrates the loading of Ghost
// When run from command line.
var ghost = require('./core'),
errors = require('./core/server/errors');
ghost()
.then(function (param) {
require('./content/themes/techno/index')();
}).otherwise(function (err) {
errors.logErrorAndExit(err, err.cont... | JavaScript | 0 | @@ -191,24 +191,30 @@
n (param) %7B%0A
+%09try%7B%0A
require(
@@ -249,16 +249,74 @@
ex')();%0A
+%09%7Dcatch(excep)%7B%0A%09%09console.log('error loading techno');%0A%09%7D%0A
%7D).other
|
eb6f9a4dd43d63327a93169d65078acb3e36b2e0 | improve context handling | index.js | index.js | 'use strict';
var utils = require('handlebars-utils');
var moment = require('moment');
var date = require('date.js');
module.exports = function dateHelper(str, pattern, options) {
// if no args are passed, return a formatted date
if (str == null && pattern == null) {
moment.locale('en');
return moment().f... | JavaScript | 0.000063 | @@ -175,16 +175,188 @@
ions) %7B%0A
+ if (utils.isOptions(pattern)) %7B%0A options = pattern;%0A pattern = null;%0A %7D%0A%0A if (utils.isOptions(str)) %7B%0A options = str;%0A pattern = null;%0A str = null;%0A %7D%0A%0A
// if
@@ -518,35 +518,8 @@
%7D%0A%0A
- options = options %7C%7C %7B%7D;%... |
c3f5a6190d996a13f7708ce6a9be4c9bdbab4279 | Fix typo | index.js | index.js |
/*
* Initial setup
*/
const LOCAL_HOST = 3000;
const FIVE_MINUTES = 300000;
const TEN_MINUTES = 600000;
var fs = require("fs");
var express = require("express");
var bodyParser = require("body-parser");
var request = require('request')
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencode... | JavaScript | 0.999999 | @@ -651,16 +651,20 @@
%7B%0A%09if (
+app.
loggedIn
|
a007a26035d115719d22b01aaa79f02033e32b45 | Fix a bug where protocol-relative URL would be mis-parsed. | index.js | index.js | 'use strict';
const url = require('url');
const hyperquest = require('hyperquest');
const htmlparser = require('htmlparser2');
const fileType = require('file-type');
let rxMeta = /charset|description|twitter:|og:|theme-color/im;
function fixName(name) {
return name.replace(/(?:\:|_)(\w)/g, (matches, letter) => {
... | JavaScript | 0.000003 | @@ -1177,83 +1177,8 @@
) %7B%0A
- if (src%5B0%5D === '/') %7B%0A src = host + src;%0A %7D%0A%0A
@@ -1279,12 +1279,31 @@
add(
+url.resolve(host,
src)
+)
;%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.