commit stringlengths 40 40 | old_file stringlengths 4 236 | new_file stringlengths 4 236 | old_contents stringlengths 1 3.26k | new_contents stringlengths 16 4.43k | subject stringlengths 16 624 | message stringlengths 17 3.29k | lang stringclasses 5
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
3d2e011bc3efd28f6ddaa2dde04a76abeabf3574 | website/src/app/models/api/public-comments-api.service.js | website/src/app/models/api/public-comments-api.service.js | class PublicCommentsAPIService {
constructor(publicAPIRoute) {
this.publicAPIRoute = publicAPIRoute;
}
getCommentsListFor(targetId) {
return this.publicAPIRoute('comments').get({target: targetId}).then(
(rv) => {
rv = rv.plain();
return rv.val;
... | class PublicCommentsAPIService {
constructor(Restangular) {
this.Restangular = Restangular;
}
getCommentsListFor(datasetId) {
return this.Restangular.one('v3').one('getCommentsForPublishedDataset').customPOST({dataset_id: datasetId}).then(
(ds) => ds.plain().data
);
... | Switch to actionhero based API | Switch to actionhero based API
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
1274571cbf950f85158974cd575b717753a1db3e | index.js | index.js | var yarn = require('yarn/lib/lockfile/wrapper.js')
var express = require('express')
var bodyParser = require('body-parser')
var app = express()
var port = process.env.PORT || 5000;
app.use(bodyParser.text());
app.disable('x-powered-by');
app.use(function(req, res, next) {
res.set('Access-Control-Allow-Origin', '*'... | var yarn = require('yarn/lib/lockfile/wrapper.js')
var express = require('express')
var bodyParser = require('body-parser')
var app = express()
var port = process.env.PORT || 5000;
app.use(bodyParser.text());
app.disable('x-powered-by');
app.use(function(req, res, next) {
res.set('Access-Control-Allow-Origin', '*'... | Allow up to 5mb uploads | Allow up to 5mb uploads
| JavaScript | agpl-3.0 | librariesio/yarn-parser |
ffa9d2d83ac39ffbff46036c1c53045f6de488a0 | services/api/src/routes/index.js | services/api/src/routes/index.js | // @flow
const express = require('express');
const statusRoute = require('./status');
const keysRoute = require('./keys');
const graphqlRoute = require('./graphql');
/* ::
import type { $Request, $Response } from 'express';
*/
function createRouter() {
const router = new express.Router();
// Redirect GET reques... | // @flow
const express = require('express');
const statusRoute = require('./status');
const keysRoute = require('./keys');
const graphqlRoute = require('./graphql');
/* ::
import type { $Request, $Response } from 'express';
*/
function createRouter() {
const router = new express.Router();
// Redirect GET reques... | Update `clients` to `customer` in API routes | Update `clients` to `customer` in API routes
| JavaScript | apache-2.0 | amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon |
115438d4ea6dde1eeaf68054b8f7606a28e13009 | challenges-completed.js | challenges-completed.js | var ipc = require('ipc')
var userData = require('./user-data.js')
document.addEventListener('DOMContentLoaded', function (event) {
var data = userData.getData()
updateIndex(data.contents)
ipc.on('confirm-clear-response', function (response) {
if (response === 1) return
else clearAllChallenges()
})
... | var ipc = require('ipc')
var fs = require('fs')
var userData = require('./user-data.js')
document.addEventListener('DOMContentLoaded', function (event) {
var data = userData.getData()
var clearAllButton = document.getElementById('clear-all-challenges')
updateIndex(data.contents)
ipc.on('confirm-clear-respon... | Fix all the bugs in writing data and confirming clear | Fix all the bugs in writing data and confirming clear
| JavaScript | bsd-2-clause | dice/git-it-electron,countryoven/git-it-electron,countryoven/git-it-electron,dice/git-it-electron,rets5s/git-it-electron,IonicaBizauKitchen/git-it-electron,jlord/git-it-electron,IonicaBizauKitchen/git-it-electron,countryoven/git-it-electron,shiftkey/git-it-electron,rets5s/git-it-electron,countryoven/git-it-electron,cou... |
1009736eb9141fec58a34584b6b8764e92a3967e | config/app.json.js | config/app.json.js | module.exports = {
"allow_create_new_accounts" : true,
"send_emails" : false,
"application_sender_email" : process.env.SENDER_EMAIL || "email@test.com",
// transports email via SMTP
"email_smtp_transporter" : {
"host" : process.env.MAILGUN_SMTP_SERVER || "localhost",
"port" : process.env... | module.exports = {
"allow_create_new_accounts" : true,
"send_emails" : false,
"application_sender_email" : process.env.SENDER_EMAIL || "email@test.com",
// transports email via SMTP
"email_smtp_transporter" : {
"host" : process.env.SMTP_SERVER || "localhost",
"port" : process.env.SMTP_PO... | Use generic names for SMTP env variables | Use generic names for SMTP env variables | JavaScript | mit | YulioTech/timeoff,YulioTech/timeoff |
513507afcb36ad4d56bcc89596bd9252774fca2b | src/replace_country_code.js | src/replace_country_code.js | export default function replaceCountryCode(
currentSelectedCountry,
nextSelectedCountry,
number,
) {
const dialCodeRegex = RegExp(`^(${currentSelectedCountry.dialCode})`)
const newNumber = number.replace(dialCodeRegex, nextSelectedCountry.dialCode)
// if we couldn't find any replacement, just attach the ne... | export default function replaceCountryCode(
currentSelectedCountry,
nextSelectedCountry,
number,
) {
const dialCodeRegex = RegExp(`^(${currentSelectedCountry.dialCode})`)
const newNumber = number.replace(dialCodeRegex, nextSelectedCountry.dialCode)
return newNumber
}
| Remove automatic country code appending | Remove automatic country code appending
| JavaScript | mit | mukeshsoni/react-telephone-input,mukeshsoni/react-telephone-input |
900ef0236d288e29ff715030f53db78c13afa6c1 | src/cli/cli.js | src/cli/cli.js | #! /usr/bin/env node
import yargs from 'yargs'
import { init, change, add, deploy } from './cmds'
const argv = yargs.usage("$0 command")
.command("init", "create a new generic website")
.command("change <field>", "update any field with a new value")
.command("add <field>", "add a new key and value")
.command("... | #! /usr/bin/env node
import yargs from 'yargs'
import { init, change, add, deploy } from './cmds'
const argv = yargs.usage("$0 command")
.command("init", "create a new generic website")
.command("change <field>", "update any field with a new value")
.command("add", "add a new key and value", (yargs) => (
yar... | Add section options for add cmd | Add section options for add cmd
| JavaScript | mpl-2.0 | Quite-nice/generic-website |
1a8b13fd53e23cd069e792476854e5b9af20f19a | site/gulpfile.js | site/gulpfile.js | var gulp = require('gulp');
var watch = require('gulp-watch');
var uglify = require('gulp-uglify');
var print = require('gulp-print');
var tsc = require('gulp-typescript-compiler');
gulp.task('typescript', function() {
return gulp.src( [ '*.ts', '**/*.ts' ] )
.pipe( print() )
.pipe( tsc(... | var gulp = require('gulp');
var watch = require('gulp-watch');
var uglify = require('gulp-uglify');
var print = require('gulp-print');
var tsc = require('gulp-typescript-compiler');
gulp.task('ts_server', function() {
return gulp.src( [ '*.ts', '**/*.ts', '!./public/**/*.ts', '!./node_modules/**/*.ts' ] )
... | Split tasks for client-side and server-side typescript files. | Split tasks for client-side and server-side typescript files.
Signed-off-by: Michele Ursino <0d7cbec952c33d7c21e19d50988899883a4c91e0@amilink.com>
| JavaScript | mit | micurs/relax.js,micurs/relax.js,micurs/relax.js |
7f148da89b0048bf05acbfa8c64a39d0927a4e79 | scripts/plugins/markdown-markup.js | scripts/plugins/markdown-markup.js | var minimatch = require('minimatch');
var cheerio = require('cheerio');
var extend = require('extend');
var marked = require('marked');
var config = require('../config/marked');
marked.setOptions(config);
function plugin(opts) {
return function(files, metalsmith, done) {
// Get global metadata.
var metadata... | var minimatch = require('minimatch');
var cheerio = require('cheerio');
var marked = require('marked');
var config = require('../config/marked');
marked.setOptions(config);
function plugin(opts) {
return function(files, metalsmith, done) {
// Get global metadata.
var metadata = metalsmith.metadata();
//... | Remove unused variable and import | Update: Remove unused variable and import
| JavaScript | mit | basham/v4.bash.am,basham/v4.bash.am |
35748918436e557248c659c837635daf0af2e7bd | src/store/index.js | src/store/index.js | // Main vuex store
import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import * as getters from './getters'
import intro from './modules/intro'
import weeks from './modules/weeks'
import switches from './modules/switches'
import models from './modules/models'
import * as types from './mu... | // Main vuex store
import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import * as getters from './getters'
import intro from './modules/intro'
import weeks from './modules/weeks'
import switches from './modules/switches'
import models from './modules/models'
import * as types from './mu... | Fix issue with branding icon by pre allocating logo slot | Fix issue with branding icon by pre allocating logo slot
| JavaScript | mit | reichlab/flusight,reichlab/flusight,reichlab/flusight |
71130ab567994962d9083c9dbd8bd69ea4a35d52 | src/time-travel.js | src/time-travel.js | require('es6-shim');
const intent = require('./intent');
const makeTime$ = require('./time');
const record = require('./record-streams');
const timeTravelStreams = require('./time-travel-streams');
const timeTravelBarView = require('./view');
const scopedDOM = require('./scoped-dom');
function logStreams (DOM, stream... | require('es6-shim');
const intent = require('./intent');
const makeTime$ = require('./time');
const record = require('./record-streams');
const timeTravelStreams = require('./time-travel-streams');
const timeTravelBarView = require('./view');
const scopedDOM = require('./scoped-dom');
function TimeTravel (DOM, stream... | Rename main function form logStreams to TimeTravel | Rename main function form logStreams to TimeTravel
| JavaScript | mit | cyclejs/cycle-time-travel |
1fc05c7aeba8dc6fa7217ad438980bd99e5a325b | src/subgenerators/errors.js | src/subgenerators/errors.js | // try block handler
exports.TryStatement = (node, anscestors, generator) => {
generator.advance("try");
// node.block will always be a BlockStatement
generator.generate(node.block, anscestors);
node.handler && generator.generate(node.handler, anscestors);
node.finalizer && generator.generate(node.finalizer, ... | // try block handler
exports.TryStatement = (node, anscestors, generator) => {
generator.advance("try");
// node.block will always be a BlockStatement
generator.generate(node.block, anscestors);
node.handler && generator.generate(node.handler, anscestors);
node.finalizer && generator.generate(node.finalizer, ... | Throw statement should end in a `;`. | Throw statement should end in a `;`.
| JavaScript | mit | interlockjs/intergenerator |
479f229198bdfcfd3a63d02babdddaa8b2209ccb | server/helpers/customValidators.js | server/helpers/customValidators.js | 'use strict'
const validator = require('validator')
const constants = require('../initializers/constants')
const customValidators = {
eachIsRemoteVideosAddValid: eachIsRemoteVideosAddValid,
eachIsRemoteVideosRemoveValid: eachIsRemoteVideosRemoveValid,
isArray: isArray
}
function eachIsRemoteVideosAddValid (va... | 'use strict'
const validator = require('validator')
const constants = require('../initializers/constants')
const customValidators = {
eachIsRemoteVideosAddValid: eachIsRemoteVideosAddValid,
eachIsRemoteVideosRemoveValid: eachIsRemoteVideosRemoveValid,
isArray: isArray
}
function eachIsRemoteVideosAddValid (va... | Add check for the thumbnail in base64 (requests inter pods) | Add check for the thumbnail in base64 (requests inter pods)
| JavaScript | agpl-3.0 | Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Green-Star/PeerTube,Green-Star/PeerTube,Green-Star/PeerTube,Green-Star/PeerTube |
7eae22dc3a4a35bdd568a559b569964378196ba9 | app/core/forms.js | app/core/forms.js | import includes from 'lodash/includes';
import map from 'lodash/map';
import reduce from 'lodash/reduce';
import keys from 'lodash/keys';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
export const getFieldsMeta = (schema, getFieldMeta) => {
const fieldKeys = keys(schema.fields);
const reduce... | import includes from 'lodash/includes';
import map from 'lodash/map';
import reduce from 'lodash/reduce';
import keys from 'lodash/keys';
import get from 'lodash/get';
import isEmpty from 'lodash/isEmpty';
export const getFieldsMeta = (schema, getFieldMeta) => {
const fieldKeys = keys(schema.fields);
const reduce... | Add getFieldError convenience form util | [WEB-819] Add getFieldError convenience form util
| JavaScript | bsd-2-clause | tidepool-org/blip,tidepool-org/blip,tidepool-org/blip |
af0106c1e90dba0a66c7f162a23f1060b28beaa1 | main.js | main.js | const menubar = require('menubar')
const { ipcMain } = require('electron')
const configure = require('./src/helpers/configure')
const mb = menubar({
alwaysOnTop: true,
resizable: false,
width: 292,
height: 344,
icon: `${__dirname}/img/iconTemplate.png`
})
mb.on('ready', () => {
console.log('App started i... | const menubar = require('menubar')
const { ipcMain } = require('electron')
const configure = require('./src/helpers/configure')
const mb = menubar({
alwaysOnTop: true,
resizable: false,
width: 292,
height: 344,
icon: `${__dirname}/img/iconTemplate.png`
})
mb.on('ready', () => {
console.log('App started i... | Add ability to drag files into Tray to open Alchemy | Add ability to drag files into Tray to open Alchemy
* On window blur Alchemy is minimized
| JavaScript | mit | dawnlabs/alchemy,dawnlabs/alchemy,dawnlabs/alchemy |
945a41728236981a1d5f5884763cbd9793ba42f8 | generatorTests/test/fileStructureSpec.js | generatorTests/test/fileStructureSpec.js | var path = require('path');
var chai = require('chai');
chai.use(require('chai-fs'));
chai.should();
const ROOT_DIR = path.join(process.cwd(), '..');
describe('As a dev', function() {
describe('when testing cartridge file structure', function() {
it('then _config files should exist', function() {
... | var path = require('path');
var chai = require('chai');
chai.use(require('chai-fs'));
chai.should();
const ROOT_DIR = path.join(process.cwd(), '..');
describe('As a dev', function() {
describe('when testing cartridge file structure', function() {
it('then _config files should exist', function() {
... | Remove reference to deleted file | tests: Remove reference to deleted file
| JavaScript | mit | cartridge/cartridge,code-computerlove/slate,code-computerlove/slate |
fb1497b7195af0ed76e00d670d07f7472c1a3fb0 | static/main.js | static/main.js | function setCurrentMonthInInput() {
console.log("Tried to set month in input. Disabled right now");
}
$('#form-submit-button').click(function (a, c) {
console.log("Form being submitted", a, c);
return false;
});
| function setCurrentMonthInInput() {
console.log("Tried to set month in input. Disabled right now");
}
function failureAlert() {
return `<div class="alert alert-danger" role="alert" id="failure-alert">
<!-- <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&tim... | Add JS to handle submission of dates | Add JS to handle submission of dates
| JavaScript | mit | ayushgoel/flock-message-reporter,ayushgoel/flock-message-reporter,ayushgoel/flock-message-reporter,ayushgoel/flock-message-reporter |
f246bb8163d663ca173ae3be386a9f7bb82fd66c | src/mapHelper.js | src/mapHelper.js | /**
* We need to map identifiers between TestSwarm and BrowserStack.
*
* Sources:
* - TestSwarm: https://github.com/jquery/testswarm/blob/master/inc/BrowserInfo.php
* - ua-parser: https://github.com/ua-parser/uap-core
* - BrowserStack:
* https://github.com/browserstack/api
* http://api.browserstack.com/3/br... | /**
* We need to map identifiers between TestSwarm and BrowserStack.
*
* Sources:
* - TestSwarm: https://github.com/jquery/testswarm/blob/master/inc/BrowserInfo.php
* - ua-parser: https://github.com/ua-parser/uap-core
* - BrowserStack:
* https://github.com/browserstack/api
* http://api.browserstack.com/3/br... | Add mapping for 'Chrome Mobile' -> 'Android Browser' | map: Add mapping for 'Chrome Mobile' -> 'Android Browser'
BrowserStack v4 has back-compat mapping that is actually working
against us in this case..
| JavaScript | mit | clarkbox/testswarm-browserstack,clarkbox/testswarm-browserstack,mzgol/testswarm-browserstack,mzgol/testswarm-browserstack |
78c5eab8d563b44269a591b9249439b55d31d72b | test/pages-test.js | test/pages-test.js | const { expect } = require('chai');
const request = require('supertest');
const app = require('../app');
describe('Pages', function() {
describe('/', function() {
let req;
beforeEach(function() {
req = request(app).get('/');
});
it('returns 200 OK', function(done) {
req.expect(200, don... | const { expect } = require('chai');
const request = require('supertest');
const app = require('../app');
describe('Pages', function() {
let req;
describe('/', function() {
beforeEach(function() {
req = request(app).get('/')
});
it('returns 200 OK', function(done) {
req.expect(200, done);... | Add tests for /contact page | Add tests for /contact page
| JavaScript | mit | slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node |
7361aa3e36272dfe8a138df011894d79e79b4448 | tasks/docco.js | tasks/docco.js | // grunt-docco
// https://github.com/DavidSouther/grunt-docco
//
// Copyright (c) 2012 David Souther
// Licensed under the MIT license.
"use strict"
var docco = require('docco');
module.exports = function(grunt) {
grunt.registerMultiTask('docco', 'Docco processor.', function() {
var options = this.options({ out... | // grunt-docco
// https://github.com/DavidSouther/grunt-docco
//
// Copyright (c) 2012 David Souther
// Licensed under the MIT license.
"use strict"
var docco = require('docco');
module.exports = function(grunt) {
grunt.registerMultiTask('docco', 'Docco processor.', function() {
var fdone = 0;
var flength =... | Update to be compatible with grunt 0.4rc6 | Update to be compatible with grunt 0.4rc6
| JavaScript | mit | joseph-jja/grunt-docco-dir,DavidSouther/grunt-docco,joseph-jja/grunt-docco-dir,neocotic/grunt-docco |
25cdc352467d9302aa6c09cd0124295f4e3b8814 | src/swap-case.js | src/swap-case.js | import R from 'ramda';
import compose from './util/compose.js';
import join from './util/join.js';
import not from './util/not.js';
import upperCase from './util/upper-case.js';
import lowerCase from './util/lower-case.js';
import isUpperCase from '../src/is-upper-case.js';
// a -> a
const swapCase = compose(
join('... | import R from 'ramda';
import compose from './util/compose.js';
import either from './util/either.js';
import join from './util/join.js';
import not from './util/not.js';
import upperCase from './util/upper-case.js';
import lowerCase from './util/lower-case.js';
import isUpperCase from '../src/is-upper-case.js';
// a ... | Refactor swapCase function to use custom either function | Refactor swapCase function to use custom either function
| JavaScript | mit | restrung/restrung-js |
e950c031b3b80ada5110a286e8966d8dce7f2241 | src/JBrowse/main.js | src/JBrowse/main.js | // saves some loading time by loading most of the commonly-used
// JBrowse modules at the outset
require([
'JBrowse/Browser',
'JBrowse/ConfigAdaptor/JB_json_v1',
// default tracklist view
'JBrowse/View/TrackList/Hierarchical',
// common stores
'J... | // saves some loading time by loading most of the commonly-used
// JBrowse modules at the outset
require([
'JBrowse/Browser',
'JBrowse/ConfigAdaptor/JB_json_v1',
// default tracklist view
'JBrowse/View/TrackList/Hierarchical',
// common stores
'J... | Add back the xstyle and dojox svg modules correctly | Add back the xstyle and dojox svg modules correctly
| JavaScript | lgpl-2.1 | GMOD/jbrowse,erasche/jbrowse,GMOD/jbrowse,Arabidopsis-Information-Portal/jbrowse,Arabidopsis-Information-Portal/jbrowse,nathandunn/jbrowse,erasche/jbrowse,erasche/jbrowse,nathandunn/jbrowse,nathandunn/jbrowse,Arabidopsis-Information-Portal/jbrowse,erasche/jbrowse,GMOD/jbrowse,GMOD/jbrowse,nathandunn/jbrowse,Arabidopsis... |
7edcb97899f0812c280bb73326b6041d734656d1 | src/core/GraoModel.js | src/core/GraoModel.js | var GraoModel = function(di) {
di.event.newSuccess('Database Connection....');
di.mongoose.connect(di.config.db);
di.event.newSuccess('Instance created');
di.models = this;
di.models = di.loader.tryLoad(di.loader.loading('model'), di, 'models');
};
module.exports = exports = GraoModel;
| var GraoModel = function(di) {
di.event.newSuccess('Database Connection....');
//di.mongoose.connect(di.config.db);
di.mongoose.connect(di.config.db, {useMongoClient: true});
di.event.newSuccess('Instance created');
di.models = this;
di.models = di.loader.tryLoad(di.loader.loading('model'), di, 'models');
}... | Add new param to mongoose connection | Add new param to mongoose connection
| JavaScript | mit | marcelomf/graojs,marcelomf/graojs,marcelomf/graojs,synackbr/graojs,synackbr/graojs,synackbr/graojs |
c1dca6018d44c0090e1b5bbf16eb4df12882ece5 | src/player.js | src/player.js | function Player() {
this.strength = statRoll();
this.dexterity = statRoll();
this.mind = statRoll();
this.init(arguments);
}
Mextend(Player, {
player: true,
name: '<sV|Bvs>(.exe)',
experience: 0
});
Player.prototype.act = function(callback) {
controls.act();
};
Player.prototype.addExpe... | function Player() {
this.strength = statRoll();
this.dexterity = statRoll();
this.mind = statRoll();
this.init(arguments);
}
Mextend(Player, {
player: true,
name: '<sV|Bvs>(.exe)',
experience: 0
});
Player.prototype.act = function(callback) {
controls.act();
};
Player.prototype.addExpe... | Make leveling a bit stronger. | Make leveling a bit stronger.
| JavaScript | unlicense | skeeto/disc-rl |
7f7eae887362b117cca1f567fbd2ea8677082e0c | examples/index.js | examples/index.js | var Gravatar = require('../dist/index.js');
var React = require('react');
React.renderComponent(
React.DOM.div(null,
[
React.DOM.h2(null, "<Gravatar email='mathews.kyle@gmail.com' />"),
Gravatar({email: 'mathews.kyle@gmail.com'}),
React.DOM.h2(nul... | var React = require('react');
var Gravatar = React.createFactory(require('../dist/index.js'));
React.render(
React.DOM.div(null,
[
React.DOM.h2(null, "<Gravatar email='mathews.kyle@gmail.com' />"),
Gravatar({email: 'mathews.kyle@gmail.com'}),
Reac... | Fix example for React 0.13 | Fix example for React 0.13
| JavaScript | mit | KyleAMathews/react-gravatar |
e3c41cb206d1c36622c41cf0ec45e61501bababa | config/config-sample.js | config/config-sample.js | module.exports =
{
home: '/home', // the path to users home directory (absolute!)
tmp: process.env.HOME + '/.ezseed/tmp', //the tmp folder path - default to HOME/.ezseed/tmp (absolute!)
watcher: 'unix:///usr/local/opt/ezseed/watcher.sock',
watcher_rpc: 'unix:///usr/local/opt/ezseed/watcher_rpc.sock',
... | module.exports =
{
home: '/home', // the path to users home directory (absolute!)
tmp: process.env.HOME + '/.ezseed/tmp', //the tmp folder path - default to HOME/.ezseed/tmp (absolute!)
watcher: 'unix:///usr/local/opt/ezseed/watcher.sock',
watcher_rpc: 'unix:///usr/local/opt/ezseed/watcher_rpc.sock',
... | Add base path to config | feat(config): Add base path to config
| JavaScript | bsd-3-clause | ezseed/ezseed,ezseed/ezseed |
3b346545f373a2d52db9dc4d8774b75c4cf46246 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var streamify = require('gulp-streamify');
var uglify = require('gulp-uglify');
var sass = require('gulp-sass');
var prefix = require('gulp-autoprefixer');
var rename = require('gulp-rename');
gulp.task('sc... | var gulp = require('gulp');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var streamify = require('gulp-streamify');
var uglify = require('gulp-uglify');
var sass = require('gulp-sass');
var prefix = require('gulp-autoprefixer');
var rename = require('gulp-rename');
var gutil = re... | Add in webpack in there. | Add in webpack in there.
| JavaScript | mit | eiriksm/sqr,eiriksm/sqr |
1726c021482bff178832cb4e3c0816cf560416f0 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var babel = require('gulp-babel');
var concat = require('gulp-concat');
var jasmine = require('gulp-jasmine');
gulp.task('jasmine', function () {
return gulp.src('spec/**/*.js')
.pipe(jasmine({
verbose: true
}));
});
gulp.task('b... | var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var babel = require('gulp-babel');
var concat = require('gulp-concat');
var jasmine = require('gulp-jasmine');
gulp.task('jasmine', function () {
return gulp.src('spec/**/*.js')
.pipe(jasmine({
verbose: true
}));
});
gulp.task('b... | Add error handling to make babel not exit on error | Add error handling to make babel not exit on error
| JavaScript | mit | trapridge/es67-fun |
b10940e31c2a218574f9a5babbf2b782bc7baecd | lib/buster-util/jstestdriver-shim.js | lib/buster-util/jstestdriver-shim.js | function testCase(name, tests) {
var testCase = TestCase(name);
for (var test in tests) {
if (test != "setUp" && test != "tearDown") {
testCase.prototype["test " + test] = tests[test];
} else {
testCase.prototype[test] = tests[test];
}
}
return testCase;... | function testCase(name, tests) {
var testCase = TestCase(name);
for (var test in tests) {
if (test != "setUp" && test != "tearDown") {
testCase.prototype["test " + test] = tests[test];
} else {
testCase.prototype[test] = tests[test];
}
}
return testCase;... | Add buster.assert hook when it's available | Add buster.assert hook when it's available
| JavaScript | bsd-3-clause | busterjs/buster-core,geddski/buster-core,busterjs/buster-core |
602fe72de7d59a80ff3a50c011bce5c4f820a905 | config/environment.js | config/environment.js | /* eslint-env node */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'noise',
environment: environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-control... | /* eslint-env node */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'noise',
environment: environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-control... | Use the proxied endpoint for production | Use the proxied endpoint for production
| JavaScript | apache-2.0 | pipedown/try_out_noise,pipedown/try_out_noise,pipedown/try_out_noise |
ce8ce0520c7cf64fe954b55fb8e90e6e21b0909d | src/methodCreators.js | src/methodCreators.js | const takeNoArgs = (method) => function() {
return method(this.props);
};
const takeFirstArg = (method) => function(nextProps) {
return method(this.props, nextProps);
};
const methodCreators = {
componentWillMount: takeNoArgs,
componentDidMount: takeNoArgs,
componentWillReceiveProps: takeFirstArg,
shouldC... | const takeNoArgs = (method) => function() {
return method(this.props);
};
const takeFirstArg = (method) => function(arg1) {
return method(this.props, arg1);
};
const methodCreators = {
componentWillMount: takeNoArgs,
componentDidMount: takeNoArgs,
componentWillReceiveProps: takeFirstArg,
shouldComponentUp... | Use more generic param name | Use more generic param name
| JavaScript | mit | jfairbank/react-classify,jfairbank/react-classify |
3cc85e098b44c54683820526998e341dd0a184e1 | test/bindings.js | test/bindings.js | /*jshint -W030 */
var gremlin = require('../');
describe('Bindings', function() {
it('should support bindings with client.execute()', function(done) {
var client = gremlin.createClient();
client.execute('g.v(x)', { x: 1 }, function(err, result) {
(err === null).should.be.true;
result.length.shou... | /*jshint -W030 */
var gremlin = require('../');
describe('Bindings', function() {
it('should support bindings with client.execute()', function(done) {
var client = gremlin.createClient();
client.execute('g.v(x)', { x: 1 }, function(err, result) {
(err === null).should.be.true;
result.length.shou... | Add explicit comments in test using reserved binding name | Add explicit comments in test using reserved binding name
| JavaScript | mit | jbmusso/gremlin-client,hiddenmoo/gremlin-client,CosmosDB/gremlin-javascript,CosmosDB/gremlin-javascript,hiddenmoo/gremlin-client,jbmusso/gremlin-javascript,jbmusso/gremlin-javascript |
c8fc979080729361180ab6a04df63c0140a1ffd2 | packages/@sanity/server/src/configs/webpack.config.prod.js | packages/@sanity/server/src/configs/webpack.config.prod.js | import webpack from 'webpack'
import getBaseConfig from './webpack.config'
export default config => {
const baseConfig = getBaseConfig(Object.assign({}, config, {env: 'production'}))
const skipMinify = config.skipMinify
return Object.assign({}, baseConfig, {
devtool: config.sourceMaps ? 'source-map' : undef... | import webpack from 'webpack'
import getBaseConfig from './webpack.config'
export default config => {
const baseConfig = getBaseConfig(Object.assign({}, config, {env: 'production'}))
return Object.assign({}, baseConfig, {
devtool: config.sourceMaps ? 'source-map' : undefined,
plugins: (baseConfig.plugins ... | Move minification out of webpack | Move minification out of webpack
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
e47584cb25cf75311e368a4ad87ba61b68d906ae | src/selection/join.js | src/selection/join.js | function(onenter, onupdate, onexit) {
var enter = this.enter(), update = this, exit = this.exit();
if (typeof onenter === "function") {
enter = onenter(enter);
if (enter) enter = enter.selection();
} else {
enter = enter.append(onenter + "");
}
if (onupdate != null) {
update = onupdate(update)... | function(onenter, onupdate, onexit) {
var enter = this.enter(), update = this, exit = this.exit();
if (typeof onenter === "function") {
enter = onenter(enter);
if (enter) enter = enter.selection();
} else {
enter = enter.append(onenter + "");
}
if (onupdate != null) update = onupdate(update);
if... | Revert update logic as it is handled by .merge. | Revert update logic as it is handled by .merge. | JavaScript | isc | d3/d3-selection |
62756a7e5ed5297cc2084644ac82d678179a3362 | src/components/page.js | src/components/page.js | import React from 'react'
import GoogleAnalyticsScript from './scripts/google-analytics'
export default Page
function Page({
children,
title = 'JavaScript Air',
description = 'The live JavaScript podcast all about JavaScript and the web platform. Available on YouTube, iTunes, and an RSS audio feed',
} = {}) {
... | import React from 'react'
import GoogleAnalyticsScript from './scripts/google-analytics'
export default Page
function Page({
children,
title = 'JavaScript Air',
description = 'The live JavaScript podcast all about JavaScript and the web platform. Available on YouTube, iTunes, and an RSS audio feed',
} = {}) {
... | Remove now-deleted font reference from Page component | Remove now-deleted font reference from Page component
| JavaScript | mit | javascriptair/site,javascriptair/site,javascriptair/site |
5337b3add954120583cbee1610ca2d8f188d9322 | src/js/home-page.js | src/js/home-page.js | import React from 'react';
import { Link } from 'react-router';
import HomepageTile from './homepage-tile.js';
import chaptersData from './chapter-data.js';
// Clone the chapters since sort mutates the array
const chapters = [...chaptersData]
.filter(chapter => !chapter.hidden)
.sort((chapterA, chapterB) => chapte... | import React from 'react';
import { Link } from 'react-router';
import HomepageTile from './homepage-tile.js';
import chaptersData from './chapter-data.js';
// Clone the chapters since sort mutates the array
const chapters = [...chaptersData]
.filter(chapter => !chapter.hidden)
.sort((chapterA, chapterB) => chapte... | Add key to homepage tile items to satisfy react | Add key to homepage tile items to satisfy react
| JavaScript | mit | nicolasartman/learning-prototype,nicolasartman/learning-prototype,nicolasartman/chalees-min,nicolasartman/chalees-min |
d92c8ce875ce3da991ebce9222c200489da0b18f | test/index.js | test/index.js | var Couleurs = require ("../index");
console.log("Red".rgb([255, 0, 0]));
console.log("Yellow".rgb(255, 255, 0));
console.log("Blue".rgb("#2980b9"));
console.log("Bold".bold())
console.log("Italic".italic())
console.log("Underline".underline())
console.log("Inverse".inverse())
console.log("Strikethrough".strikethroug... | // Dependency
var Couleurs = require("../index")();
// No prototype modify
console.log(Couleurs.rgb("Red", [255, 0, 0]));
console.log(Couleurs.rgb("Yellow", 255, 255, 0));
console.log(Couleurs.rgb("Blue", "#2980b9"));
console.log(Couleurs.bold("Bold"));
console.log(Couleurs.italic("Italic"));
// Modify prototype
req... | Call couleurs in different ways. | Call couleurs in different ways.
| JavaScript | mit | IonicaBizau/node-couleurs |
d43f60a6bbc181c0f08fa5dcfdbd1ab19709afef | lib/modules/fields/class_static_methods/get_list_fields.js | lib/modules/fields/class_static_methods/get_list_fields.js | import _ from 'lodash';
import ListField from '../list_field.js';
function getListFields() {
return _.filter(this.getFields(), function(field) {
return field instanceof ListField;
});
};
export default getListFields; | import _ from 'lodash';
import ListField from '../list_field.js';
function getListFields(classOnly = false) {
return _.filter(this.getFields(), function(field) {
if (classOnly) {
return field instanceof ListField && field.isClass;
}
return field instanceof ListField;
});
};
export default getListFie... | Allow getting only class fields in the getListFields method | Allow getting only class fields in the getListFields method
| JavaScript | mit | jagi/meteor-astronomy |
c042b19ee5414afe1ab206ebebace8675d55c096 | test/sites.js | test/sites.js | var inspector = require('..');
var expect = require('expect.js');
describe("url-inspector", function sites() {
it("should get title from http://www.lavieenbois.com/", function(done) {
this.timeout(5000);
inspector('http://www.lavieenbois.com/', function(err, meta) {
expect(err).to.not.be.ok();
expect(meta.t... | var inspector = require('..');
var expect = require('expect.js');
describe("url-inspector", function sites() {
it("should get title from http://www.lavieenbois.com/", function(done) {
this.timeout(5000);
inspector('http://www.lavieenbois.com/', function(err, meta) {
expect(err).to.not.be.ok();
expect(meta.t... | Add a test to ensure html objects are embeds | Add a test to ensure html objects are embeds
| JavaScript | mit | kapouer/url-inspector |
9ccba19417e58ecd619ceb036ea2f3cc48eb64c4 | addon/components/banner-with-close-button.js | addon/components/banner-with-close-button.js | import Component from '@ember/component';
import layout from '../templates/components/banner-with-close-button';
import {inject as service} from '@ember/service';
import {computed} from '@ember/object';
export default Component.extend({
layout,
cookies: service(),
classNames: ['banner-with-close-button'],
isB... | import Component from '@ember/component';
import layout from '../templates/components/banner-with-close-button';
import {inject as service} from '@ember/service';
import {computed} from '@ember/object';
export default Component.extend({
layout,
cookies: service(),
classNames: ['banner-with-close-button'],
isB... | Add 30 day expiration to cookie on gdpr banner | Add 30 day expiration to cookie on gdpr banner
| JavaScript | mit | nypublicradio/nypr-ui,nypublicradio/nypr-ui |
b8d022270a10d59cc895acafad4742ad61e3460c | server/routes/authRouter.js | server/routes/authRouter.js | var authRouter = require('express').Router();
var jwt = require('jwt-simple');
var auth = require('../lib/auth');
var User = require('../../db/models/User');
var Promise = require('bluebird');
var bcrypt = require('bcryptjs');
bcrypt.compare = Promise.promisify(bcrypt.compare);
authRouter.post('/login', function(req,... | var authRouter = require('express').Router();
var jwt = require('jwt-simple');
var auth = require('../lib/auth');
var User = require('../../db/models/User');
var Promise = require('bluebird');
var bcrypt = require('bcryptjs');
bcrypt.compare = Promise.promisify(bcrypt.compare);
authRouter.post('/login', function(req,... | Set JWT expiration date to 30 days | Set JWT expiration date to 30 days
| JavaScript | mit | SillySalamanders/Reactivity,SillySalamanders/Reactivity |
949254b178c540d98783e3efe3c2df82cd138ce4 | src/components/CryptoDropdown.js | src/components/CryptoDropdown.js | import React from 'react'
const CryptoDropdown = ({ label, cryptos, action }) => (
<div className="form-group form-group-sm">
<label className="col-sm-2 control-label">{label}</label>
<div className="col-sm-10">
<select className="form-control" onChange={
(e) => action(e.target.value)}>
... | import React from 'react'
const CryptoDropdown = ({ label, cryptos, action }) => (
<div className="form-group form-group-sm">
<label className="col-sm-2 control-label">{label}</label>
<div className="col-sm-10">
<select className="form-control" onChange={
(e) => action(e.target.value)}>
... | Revert "updated image for documentation" | Revert "updated image for documentation"
This reverts commit de6b2b26414dfd46069d170761e457d95c67b589.
| JavaScript | mit | davidoevans/react-redux-dapp,davidoevans/react-redux-dapp |
d232a4d61f6de338916a15744e925f5ff8e3ca9a | test/types.js | test/types.js | import test from 'ava';
import domLoaded from '../';
test('domLoaded is a function', t => {
t.is(typeof domLoaded, 'function');
});
| import test from 'ava';
import domLoaded from '../';
test('domLoaded is a function', t => {
t.is(typeof domLoaded, 'function');
});
test('domLoaded returns a Promise', t => {
t.true(domLoaded() instanceof Promise);
});
| Test domLoaded returns a Promise | Test domLoaded returns a Promise
| JavaScript | mit | lukechilds/when-dom-ready |
17ce6c41c8e7b43f1e9f12fe66e4e65ec9f7a487 | index.js | index.js | var dust
try {
dust = require('dustjs-linkedin')
try { require('dustjs-helpers') }
catch (ex) {}
}
catch (ex) {
try { dust = require('dust') }
catch (ex) {}
}
if (!dust) throw new Error('"dustjs-linkedin" or "dust" module not found')
module.exports = {
module: {
compile: function(template, options, c... | var dust
var fs = require('fs')
var Path = require('path')
try {
dust = require('dustjs-linkedin')
try { require('dustjs-helpers') }
catch (ex) {}
}
catch (ex) {
try { dust = require('dust') }
catch (ex) {}
}
if (!dust) throw new Error('"dustjs-linkedin" or "dust" module not found')
module.exports = {
mo... | Use dust.onLoad to compile templates | Use dust.onLoad to compile templates
| JavaScript | mit | mikefrey/hapi-dust |
e7afd02eb05683909c88ef0531963f4badf9d351 | Multiselect.js | Multiselect.js | Template.Multiselect.onRendered(function multiselectOnRendered() {
let template = this;
let config = {};
if(template.data.configOptions) {
config = template.data.configOptions;
}
// autorun waits until after the dependent data has been updated
template.autorun(function multiselectAutorun() {
Templa... | Template.Multiselect.onRendered(function multiselectOnRendered() {
let template = this;
let config = {};
if(template.data.configOptions) {
config = template.data.configOptions;
}
// autorun waits until after the dependent data has been updated
template.autorun(function multiselectAutorun() {
Templa... | Handle reinitialize case, clean up variable declarations | Handle reinitialize case, clean up variable declarations
| JavaScript | mit | brucejo75/meteor-bootstrap-multiselect,brucejo75/meteor-bootstrap-multiselect |
1f79b26808612ec1879394fad9ddc0ace5bbe1e6 | lib/assets/javascripts/builder/data/backbone/network-interceptors/interceptors/forbidden-403.js | lib/assets/javascripts/builder/data/backbone/network-interceptors/interceptors/forbidden-403.js | /**
* 403 Forbidden Network Error Interceptor
*
* This interceptor redirects to login page when
* any 403 session expired error is returned in any of the
* network requests
*/
var LOGIN_ROUTE = '/login';
var SESSION_EXPIRED = 'session_expired';
var subdomainMatch = /https?:\/\/([^.]+)/;
module.exports = functi... | /**
* 403 Forbidden Network Error Interceptor
*
* This interceptor redirects to login page when
* any 403 session expired error is returned in any of the
* network requests
*/
var LOGIN_ROUTE = '/login?error=session_expired';
var SESSION_EXPIRED = 'session_expired';
var subdomainMatch = /https?:\/\/([^.]+)/;
m... | Add error parameter to forbidden interceptor | Add error parameter to forbidden interceptor
| JavaScript | bsd-3-clause | CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb |
53317d97c5862ab96161066546fd3a744939ca2e | src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js | src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js | var mediaPlugins = "";
if (mediaPickerEnabled) {
mediaPlugins += " mediapicker";
}
if (mediaLibraryEnabled) {
mediaPlugins += " medialibrary";
}
tinyMCE.init({
selector: "textarea.tinymce",
theme: "modern",
schema: "html5",
entity_encoding : "raw",
plugins: [
"advl... | var mediaPlugins = "";
if (mediaPickerEnabled) {
mediaPlugins += " mediapicker";
}
if (mediaLibraryEnabled) {
mediaPlugins += " medialibrary";
}
tinyMCE.init({
selector: "textarea.tinymce",
theme: "modern",
schema: "html5",
plugins: [
"advlist autolink lists link image... | Revert "Fixing that TinyMCE is encoding special chars" | Revert "Fixing that TinyMCE is encoding special chars"
This reverts commit 188fabe233c3c9ebef04ccd29c1a07e8a520e882.
| JavaScript | bsd-3-clause | armanforghani/Orchard,LaserSrl/Orchard,Serlead/Orchard,AdvantageCS/Orchard,tobydodds/folklife,geertdoornbos/Orchard,hannan-azam/Orchard,rtpHarry/Orchard,brownjordaninternational/OrchardCMS,jagraz/Orchard,gcsuk/Orchard,JRKelso/Orchard,TalaveraTechnologySolutions/Orchard,jimasp/Orchard,sfmskywalker/Orchard,rtpHarry/Orcha... |
8feed977590b87f7936992c58235b99b91b2028a | src/js/controllers/navbar_top.js | src/js/controllers/navbar_top.js | 'use strict';
/**
* @ngdoc function
* @name Pear2Pear.controller:NavbarTopCtrl
* @description
* # NavbarTop Ctrl
*/
angular.module('Pear2Pear')
.controller(
'NavbarTopCtrl', [
'SwellRTSession', '$scope',
function(SwellRTSession, $scope){
var getSharedMode = function(){
if ($s... | 'use strict';
/**
* @ngdoc function
* @name Pear2Pear.controller:NavbarTopCtrl
* @description
* # NavbarTop Ctrl
*/
angular.module('Pear2Pear')
.controller(
'NavbarTopCtrl', [
'SwellRTSession', '$scope',
function(SwellRTSession, $scope){
var getSharedMode = function(){
if ($s... | Revert "avoid unnecesary call to onLoad" | Revert "avoid unnecesary call to onLoad"
This reverts commit 5a81300cb8a99c7428d9aeea26276d4415efcf64.
| JavaScript | agpl-3.0 | Grasia/teem,P2Pvalue/teem,P2Pvalue/teem,Grasia/teem,P2Pvalue/teem,Grasia/teem,P2Pvalue/pear2pear,P2Pvalue/pear2pear |
4d398ea4ccecad68c5938c266506f8a4a30acc2d | src/javascript/binary/websocket_pages/user/telegram_bot.js | src/javascript/binary/websocket_pages/user/telegram_bot.js | const TelegramBot = (() => {
'use strict';
const form = '#frm_telegram_bot';
const onLoad = () => {
const bot_name = 'binary_test_bot';
$(form).on('submit', (e) => {
e.preventDefault();
const token = $('#token').val();
const url = `https://t.me/${bot_nam... | const FormManager = require('../../common_functions/form_manager');
const TelegramBot = (() => {
'use strict';
const form = '#frm_telegram_bot';
const onLoad = () => {
const bot_name = 'binary_test_bot';
FormManager.init(form, [
{ selector: '#token', validations: ['req'], exc... | Rewrite code to use formManager | Rewrite code to use formManager
| JavaScript | apache-2.0 | raunakkathuria/binary-static,ashkanx/binary-static,negar-binary/binary-static,4p00rv/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,4p00rv/binary-static,binary-com/binary-static,kellybinary/binary-static,raunakkathuria/binary-static... |
d6593eeea21a624ff0bb1b1d43f433f77ae55e47 | src/reducers/reducer_workload.js | src/reducers/reducer_workload.js | export default function(state={}, action) {
switch(action.type) {
case 'example_data':
return 'The action controller worked properly'
default:
return state;
}
}
| import { FETCH_OPPS } from '../actions';
export default function(state={}, action) {
switch(action.type) {
case FETCH_OPPS:
return action.payload
default:
return state;
}
}
| Modify switch statement in WorkloadReducer | Modify switch statement in WorkloadReducer
| JavaScript | mit | danshapiro-optimizely/bandwidth,danshapiro-optimizely/bandwidth |
caf0a2289145c699a853aa75449bbaebacb0b7e9 | webpack.production.config.js | webpack.production.config.js | 'use strict'
const webpack = require('webpack')
const path = require('path')
const configuration = {
entry: path.resolve(__dirname, 'app'),
output: {
path: path.resolve(__dirname, 'public'),
filename: '[name].js'
},
module: {
loaders: [
{ test: /\.js?$/, loader: 'react-hot-loader', include: ... | 'use strict'
const webpack = require('webpack')
const path = require('path')
var HtmlWebpackPlugin = require('html-webpack-plugin')
const configuration = {
entry: [
path.resolve(__dirname, 'app')
],
output: {
path: path.resolve(__dirname, 'public/build/'),
filename: '[hash].js'
},
module: {
... | Add a new build process for the production environment. | Add a new build process for the production environment.
| JavaScript | mit | rhberro/the-react-client,rhberro/the-react-client |
048cc348d0bd0b614e05913cc5619b54b174463e | src/server/services/discovery.js | src/server/services/discovery.js | import Promise from 'bluebird';
import { lookupServiceAsync } from '../utils/lookup-service';
function findService(fullyQualifiedName) {
// Get just the service name from the fully qualified name
let nameParts = fullyQualifiedName.split('.');
let serviceName = nameParts[nameParts.length - 1];
// Insert a da... | import Promise from 'bluebird';
import { lookupServiceAsync } from '../utils/lookup-service';
function findService(fullyQualifiedName) {
// Get just the service name from the fully qualified name
let nameParts = fullyQualifiedName.split('.');
let serviceName = nameParts[nameParts.length - 1];
// We should h... | Use the short service name when resolving Grpc services | Use the short service name when resolving Grpc services
| JavaScript | apache-2.0 | KillrVideo/killrvideo-web,KillrVideo/killrvideo-web,KillrVideo/killrvideo-web |
fb8473d0e16f20b8828dd1692206e86497bcf507 | client/MobiApp.js | client/MobiApp.js | Geolocation.latLng()
Template.newIssue.events({
'submit form': function(){
event.preventDefault();
var title = event.target.title.value;
var description = event.target.description.value;
var imageURL = Session.get('imageURL');
console.log(title, description);
if (title && description && Geolo... | Geolocation.latLng()
Template.newIssue.events({
'submit form': function(){
event.preventDefault();
var title = event.target.title.value;
var description = event.target.description.value;
var imageURL = Session.get('imageURL');
console.log(title, description);
if (title && description && Geolo... | Fix issue list after change of authentication package | Fix issue list after change of authentication package
| JavaScript | agpl-3.0 | kennyzlei/MobiApp,kennyzlei/MobiApp |
593ec57633fbef471f09501e0c886899e51bd467 | code/geosearch.js | code/geosearch.js |
// GEOSEARCH /////////////////////////////////////////////////////////
window.setupGeosearch = function() {
$('#geosearch').keypress(function(e) {
if((e.keyCode ? e.keyCode : e.which) != 13) return;
var search = $(this).val();
if (!runHooks('geoSearch', search)) {
return;
}
... |
// GEOSEARCH /////////////////////////////////////////////////////////
window.setupGeosearch = function() {
$('#geosearch').keypress(function(e) {
if((e.keyCode ? e.keyCode : e.which) != 13) return;
var search = $(this).val();
if (!runHooks('geoSearch', search)) {
return;
}
... | Set maxZoom = 13 for desktop locate button too. | Set maxZoom = 13 for desktop locate button too.
| JavaScript | isc | tony2001/ingress-intel-total-conversion,3ch01c/ingress-intel-total-conversion,pfsmorigo/ingress-intel-total-conversion,manierim/ingress-intel-total-conversion,FLamparski/ingress-intel-total-conversion,SpamapS/ingress-intel-total-conversion,tony2001/ingress-intel-total-conversion,tony2001/ingress-intel-total-conversion,... |
b9399f212ba6744374a0a54d4b06b21200865bb4 | src/server/pages.js | src/server/pages.js | import nextRoutes from 'next-routes';
const pages = nextRoutes();
pages
.add('signin', '/signin/:token?')
.add('createEvent', '/:parentCollectiveSlug/events/(new|create)')
.add('events-iframe', '/:collectiveSlug/events/iframe')
.add('event', '/:parentCollectiveSlug/events/:eventSlug')
.add('editEvent', '/:p... | import nextRoutes from 'next-routes';
const pages = nextRoutes();
pages
.add('widgets', '/widgets')
.add('tos', '/tos')
.add('privacypolicy', '/privacypolicy')
.add('signin', '/signin/:token?')
.add('button', '/:collectiveSlug/:verb(contribute|donate)/button')
.add('createEvent', '/:parentCollectiveSlug/e... | Fix for /widgets, /tos, /privacypolicy, /:slug/:verb/button | Fix for /widgets, /tos, /privacypolicy, /:slug/:verb/button
| JavaScript | mit | OpenCollective/frontend |
b27471e3ae289e4b3e97302ff7a5e9cc4ace59e8 | src/Result.js | src/Result.js | 'use strict'
var chalk = require('chalk')
var deepEqual = require('deep-equal')
var indent = require('./indent')
var os = require('os')
const CHECK = '\u2713'
const CROSS = '\u2717'
const PASS_COLOR = 'green'
const FAIL_COLOR = 'red'
module.exports = class Result {
constructor (runnable, options) {
options = o... | 'use strict'
var chalk = require('chalk')
var deepEqual = require('deep-equal')
var indent = require('./indent')
var os = require('os')
const CHECK = '✓'
const CROSS = '✗'
const PASS_COLOR = 'green'
const FAIL_COLOR = 'red'
module.exports = class Result {
constructor (runnable, options) {
options = options || ... | Use unicode special characters directly in source | Use unicode special characters directly in source
| JavaScript | isc | nickmccurdy/purespec |
1f8b40ecfe9a2c7d7c31a0f71a72049dc413749d | src/issue-strategies/bug-maintenance.js | src/issue-strategies/bug-maintenance.js | export function apply(issue, jiraClientAPI) {
if(issue === null || issue.fields.status.statusCategory.colorName !== 'yellow') {
return Promise.reject(new Error(`Cannot commit against this issue ${issue.key}`));
}
return Promise.resolve(true);
}
| export function apply(issue, jiraClientAPI) {
if(issue === null || issue.fields.status.statusCategory.colorName !== 'yellow') {
return Promise.reject(new Error(`Cannot commit against this issue ${issue.key}. Make sure the issue exists and has a yellow status`));
}
return Promise.resolve(true);
}
| Add additional issue status error info | Add additional issue status error info
Closes #23
| JavaScript | mit | DarriusWrightGD/jira-precommit-hook,TWExchangeSolutions/jira-precommit-hook |
21edc4ec471a55a0dce9dd2c7d3e84a5576aaf84 | src/js/graphic/background/background.js | src/js/graphic/background/background.js | import Geometric from './geometric/geometric.js'
export default class Background
{
static draw(p)
{
Background.changeColor(p)
Background.translateCamera(p)
Background.translateCameraByMouse(p)
Geometric.draw(p)
}
static changeColor(p)
{
const hexColorMax = 255
const radianX... | import Geometric from './geometric/geometric.js'
export default class Background
{
static draw(p)
{
Background.changeColor(p)
Background.translateCamera(p)
Background.translateCameraByMouse(p)
Geometric.draw(p)
}
static changeColor(p)
{
const hexColorMax = 255
const radianX... | Fix main camera zTranslation responsive issue | Fix main camera zTranslation responsive issue
| JavaScript | mit | yuki-nit2a/yuki.nit2a.com,yuki-nit2a/yuki.nit2a.com |
44ddb35699ed2a7cff9e5dc2f4b36823931a57b6 | app/process_request.js | app/process_request.js | var requirejs = require('requirejs');
var PageConfig = requirejs('page_config');
var get_dashboard_and_render = require('./server/mixins/get_dashboard_and_render');
var renderContent = function (req, res, model) {
model.set(PageConfig.commonConfig(req));
var ControllerClass = model.get('controller');
var cont... | var requirejs = require('requirejs');
var PageConfig = requirejs('page_config');
var get_dashboard_and_render = require('./server/mixins/get_dashboard_and_render');
var renderContent = function (req, res, model) {
model.set(PageConfig.commonConfig(req));
var ControllerClass = model.get('controller');
var cont... | Remove comment about client_instance script | Remove comment about client_instance script
The script attribute of a client_instance is tested in the view,
for example in body-end.html:
<% if (model.get('script')) { %>
It can be set to false to disable including of our rather large
JavaScript assets.
| JavaScript | mit | alphagov/spotlight,tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight |
8bd45a62113fa47b03217887e027afe0bfdd04dc | lib/util/parse.js | lib/util/parse.js |
// Code based largely on this module:
// https://www.npmjs.org/package/git-credential
function parseOutput(data, callback) {
var output = {};
if (data) {
output = data.toString('utf-8')
.split('\n')
.map(function (line) {
return line.split('=');
})
... |
// Code based largely on this module:
// https://www.npmjs.org/package/git-credential
function parseOutput(data, callback) {
var output = {};
if (data) {
output = data.toString('utf-8')
.split('\n')
.map(function (line) {
var index = line.indexOf('=');
... | Return password when it contains = | Return password when it contains =
Fixes #3
| JavaScript | mit | nwinkler/git-credential-helper |
8671f86ecc9ece19dd1739edfb9f3a6cc92af12e | reducer/stationboards.js | reducer/stationboards.js | const initState = {};
export default (state = initState, action) => {
switch (action.type) {
case "GET_STATIONBOARD_REQUESTED":
const { stationId } = action.payload;
return {
...state,
[stationId]: {
data: [],
p... | const initState = {};
export default (state = initState, action) => {
switch (action.type) {
case "GET_STATIONBOARD_REQUESTED":
const { stationId } = action.payload;
return {
...state,
[stationId]: {
data: [],
p... | Add checkpoints to the stationboard objects | Add checkpoints to the stationboard objects
| JavaScript | mit | rafaelkallis/hackzurich2017 |
3bf6e52f7955fd688de4c90e6f1d5fda241b45d2 | builder-bob.js | builder-bob.js | /**
* 12-22-2016
* ~~ Scott Johnson
*/
/** List jshint ignore directives here. **/
/* jslint node: true */
/* jshint esversion: 6 */
/*eslint-env es6*/
// Stop jshint from complaining about the promise.catch() syntax.
/* jslint -W024 */
var util = require( './lib/bob-util.js' );
var Batch = require( './lib/bob-... | /**
* 12-22-2016
* ~~ Scott Johnson
*/
/** List jshint ignore directives here. **/
/* jslint node: true */
/* jshint esversion: 6 */
/*eslint-env es6*/
// Stop jshint from complaining about the promise.catch() syntax.
/* jslint -W024 */
var util = require( './lib/bob-util.js' );
var Batch = require( './lib/bob-... | Create jobs directly through bob. | Create jobs directly through bob.
| JavaScript | mit | lucentminds/builder-bob |
3fba858b12cd7d3d36fdc8618e2e6c1f11a83263 | challengers.js | challengers.js | // Welcome!
// Add your github user if you accepted the challenge!
var players = [
'raphamorim',
'israelst',
'afonsopacifer',
'rafaelfragosom',
'brunokinoshita',
'paulinhoerry',
'enieber',
'alanrsoares'
];
module.exports = players;
| // Welcome!
// Add your github user if you accepted the challenge!
var players = [
'raphamorim',
'israelst',
'afonsopacifer',
'rafaelfragosom',
'brunokinoshita',
'paulinhoerry',
'enieber',
'alanrsoares',
'brunodsgn'
];
module.exports = players;
| Add brunodsgn as new challenger | Add brunodsgn as new challenger
| JavaScript | mit | joselitojunior/write-code-every-day,vitorleal/write-code-every-day,raphamorim/write-code-every-day,mabrasil/write-code-every-day,Gcampes/write-code-every-day,arthurvasconcelos/write-code-every-day,cesardeazevedo/write-code-every-day,hocraveiro/write-code-every-day,mauriciojunior/write-code-every-day,rtancman/write-code... |
86bd1cf69106768f9a576278f569700b4a48ee1c | src/components/BodyAttributes.js | src/components/BodyAttributes.js | import { Component, Children, PropTypes } from "react";
import withSideEffect from "react-side-effect";
const supportedHTML4Attributes = {
"bgColor": "bgcolor"
};
class BodyAttributes extends Component {
render() {
return Children.only(this.props.children);
}
}
BodyAttributes.propTypes = {
children: Pro... | import { Component, Children, PropTypes } from "react";
import withSideEffect from "react-side-effect";
const supportedHTML4Attributes = {
"bgColor": "bgcolor"
};
class BodyAttributes extends Component {
render() {
return Children.only(this.props.children);
}
}
BodyAttributes.propTypes = {
children: Pro... | Improve comment around transformed attributes | Improve comment around transformed attributes
| JavaScript | mit | TrueCar/gluestick-shared,TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick |
0e4cebad2acb269667b14ddc58cb3bb172809234 | katas/es6/language/block-scoping/let.js | katas/es6/language/block-scoping/let.js | // block scope - let
// To do: make all tests pass, leave the asserts unchanged!
describe('`let` restricts the scope of the variable to the current block', () => {
describe('`let` vs. `var`', () => {
it('`var` works as usual', () => {
if (true) {
var varX = true;
}
assert.equal(varX, ... | // block scope - let
// To do: make all tests pass, leave the asserts unchanged!
describe('`let` restricts the scope of the variable to the current block', () => {
describe('`let` vs. `var`', () => {
it('`var` works as usual', () => {
if (true) {
let varX = true;
}
assert.equal(varX, ... | Make it nicer and break it, to be a kata :). | Make it nicer and break it, to be a kata :). | JavaScript | mit | cmisenas/katas,JonathanPrince/katas,cmisenas/katas,rafaelrocha/katas,JonathanPrince/katas,ehpc/katas,cmisenas/katas,rafaelrocha/katas,JonathanPrince/katas,Semigradsky/katas,tddbin/katas,ehpc/katas,tddbin/katas,Semigradsky/katas,Semigradsky/katas,rafaelrocha/katas,tddbin/katas,ehpc/katas |
9fd827df81a400df1577c3405a646e26a1b17c51 | src/exampleApp.js | src/exampleApp.js | "use strict";
// For conditions of distribution and use, see copyright notice in LICENSE
/*
* @author Tapani Jamsa
* @author Erno Kuusela
* @author Toni Alatalo
* Date: 2013
*/
var app = new Application();
app.host = "localhost"; // IP to the Tundra server
app.port = 2345; // and port to the... | "use strict";
// For conditions of distribution and use, see copyright notice in LICENSE
/*
* @author Tapani Jamsa
* @author Erno Kuusela
* @author Toni Alatalo
* Date: 2013
*/
var app = new Application();
var host = "localhost"; // IP to the Tundra server
var port = 2345; // and port to the... | Make host and port standard variables | Make host and port standard variables
| JavaScript | apache-2.0 | playsign/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra,AlphaStaxLLC/WebTundra,playsign/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra |
7dcb583e7425bff4964b1e3ce52c745c512b1489 | src/game/index.js | src/game/index.js | import Phaser from 'phaser-ce';
import { getConfig } from './config';
import TutorialState from './TutorialState';
export default class WreckSam {
constructor() {
const config = getConfig();
this.game = new Phaser.Game(config);
this.game.state.add('tutorial', new TutorialState());
}
... | import Phaser from 'phaser-ce';
import { getConfig } from './config';
import TutorialState from './TutorialState';
export default class WreckSam {
constructor() {
const config = getConfig();
this.game = new Phaser.Game(config);
this.game.state.add('tutorial', new TutorialState());
}
... | Use game paused property instead of lockRender | Use game paused property instead of lockRender
| JavaScript | mit | marc1404/WreckSam,marc1404/WreckSam |
ec679a27b227877a5e383af2bf9deabf0a3c2072 | loader.js | loader.js | // Loader to create the Ember.js application
/*global require */
window.App = require('ghost/app')['default'].create();
| // Loader to create the Ember.js application
/*global require */
if (!window.disableBoot) {
window.App = require('ghost/app')['default'].create();
}
| Add initial client unit test. | Add initial client unit test.
| JavaScript | mit | kevinansfield/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,TryGhost/Ghost-Admin,dbalders/Ghost-Admin,acburdine/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin |
e8a8fed47acf2a7bb9a72720e7c92fbfa6c94952 | src/lintStream.js | src/lintStream.js | import postcss from "postcss"
import fs from "fs"
import gs from "glob-stream"
import rcLoader from "rc-loader"
import { Transform } from "stream"
import plugin from "./plugin"
export default function ({ files, config } = {}) {
const stylelintConfig = config || rcLoader("stylelint")
if (!stylelintConfig) {
thr... | import postcss from "postcss"
import fs from "fs"
import gs from "glob-stream"
import { Transform } from "stream"
import plugin from "./plugin"
export default function ({ files, config } = {}) {
const linter = new Transform({ objectMode: true })
linter._transform = function (chunk, enc, callback) {
if (files)... | Add bin to package.json and move rc-loading to plugin.js | Add bin to package.json and move rc-loading to plugin.js
| JavaScript | mit | gaidarenko/stylelint,stylelint/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,stylelint/stylelint,hudochenkov/stylelint,gucong3000/stylelint,heatwaveo8/stylelint,stylelint/stylelint,gaidarenko/stylelint,stylelint/stylelint,hudochenkov/stylelint,gaidarenko/stylelint,evilebottnawi/stylelint,gucong3000/stylelint,hea... |
bf04e2c0a7637b0486562167c6046cb8c2a74a26 | src/database/DataTypes/TemperatureBreachConfiguration.js | src/database/DataTypes/TemperatureBreachConfiguration.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2020
*/
import Realm from 'realm';
export class TemperatureBreachConfiguration extends Realm.Object {}
TemperatureBreachConfiguration.schema = {
name: 'TemperatureBreachConfiguration',
primaryKey: 'id',
properties: {
id: 'string',
minimumTempera... | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2020
*/
import Realm from 'realm';
export class TemperatureBreachConfiguration extends Realm.Object {
toJSON() {
return {
id: this.id,
minimumTemperature: this.minimumTemperature,
maximumTemperature: this.maximumTemperature,
durat... | Add breach config adapter method | Add breach config adapter method
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
b2987678c06e7527491984a11e86a63da1d17cb4 | src/_fixMobile/EventPath.js | src/_fixMobile/EventPath.js | (function(global){
// For Android 4.3- (included)
document.body.addEventListener('click', function(e) {
if (!e.path) {
e.path = [];
var t = e.target;
while (t !== document) {
e.path.push(t);
t = t.parentNode;
}
e.path.push(document);
e.path.push(window);
... | (function(global){
// For Android 4.3- (included)
var pathFill = function() {
var e = arguments[0];
if (!e.path) {
e.path = [];
var t = e.target;
while (t !== document) {
e.path.push(t);
t = t.parentNode;
}
e.path.push(document);
e.path.push(window);
... | Handle event when bubbles event and catch event. | Handle event when bubbles event and catch event.
| JavaScript | mit | zhoukekestar/web-modules,zhoukekestar/modules,zhoukekestar/web-modules,zhoukekestar/modules,zhoukekestar/modules,zhoukekestar/web-modules |
aceeb92a1c71a2bdae0f1ebfce50c2391a20bbe2 | models.js | models.js | var orm = require('orm');
var db = orm.connect('sqlite://db.sqlite');
function init(callback) {
db.sync(callback);
}
module.exports = {
init: init
};
| var orm = require('orm');
var db = orm.connect('sqlite://' + __dirname + '/db.sqlite');
function init(callback) {
db.sync(callback);
}
module.exports = {
init: init
};
| Use correct directory for sqlite database | Use correct directory for sqlite database
| JavaScript | mit | dashersw/cote-workshop,dashersw/cote-workshop |
16162985c41a9cd78e17a76b66de27fe2b7bc31d | src/components/NewEngagementForm.js | src/components/NewEngagementForm.js | import 'react-datepicker/dist/react-datepicker.css'
import '../App.css'
import React, { Component } from 'react'
import { Field, reduxForm } from 'redux-form'
import { Form } from 'semantic-ui-react'
import DatePicker from 'react-datepicker'
import moment from 'moment'
import styled from 'styled-components'
const Styl... | import 'react-datepicker/dist/react-datepicker.css'
import '../App.css'
import React, { Component } from 'react'
import { Field, reduxForm } from 'redux-form'
import { Form } from 'semantic-ui-react'
import DatePicker from 'react-datepicker'
import moment from 'moment'
import styled from 'styled-components'
const Styl... | Remove unneeded input form from new engagement form | Remove unneeded input form from new engagement form
| JavaScript | mit | cernanb/personal-chef-react-app,cernanb/personal-chef-react-app |
92978a1a24c2b2df4dba8f622c40f34c4fa7ca12 | modules/signin.js | modules/signin.js | 'use strict';
const builder = require('botbuilder');
const timesheet = require('./timesheet');
module.exports = exports = [(session) => {
builder.Prompts.text(session, 'Please tell me your domain user?');
}, (session, results, next) => {
session.send('Ok. Searching for your stuff...');
session.sendTypi... | 'use strict';
const builder = require('botbuilder');
const timesheet = require('./timesheet');
module.exports = exports = [(session) => {
builder.Prompts.text(session, 'Please tell me your domain user?');
}, (session, results, next) => {
session.send('Ok. Searching for your stuff...');
session.sendTypi... | Fix impersonated user check issue. | Fix impersonated user check issue.
| JavaScript | mit | 99xt/jira-journal,99xt/jira-journal |
6dc8a96b20179bd04a2e24fa4c3b0106d35ebaba | src/main.js | src/main.js | (function(){
"use strict";
xtag.register("sam-tabbar", {
lifecycle: {
created: function() {
if (!this.role) {
this.role = "tablist";
}
},
inserted: function() {
this.activeTabId = this.querySelector("[role='tab'][data-start-active]").id;
},
remov... | (function(){
"use strict";
xtag.register("sam-tabbar", {
lifecycle: {
created: function() {
if (!this.role) {
this.role = "tablist";
}
},
inserted: function() {
this.activeTabId = this.querySelector("[role='tab'][data-start-active]").id;
},
remov... | Add handler for when setTab is given a non-exsitant tab id | Add handler for when setTab is given a non-exsitant tab id
| JavaScript | apache-2.0 | Swissnetizen/sam-tabbar |
0715d2b60dd1ebd851d4e5ea9ec9073424211012 | src/function/lazyLoading.js | src/function/lazyLoading.js | define([
'jquery'
],
function($) {
return function() {
var self = this;
if (!self.sprite && self.lasyEmoji[0]) {
var pickerTop = self.picker.offset().top,
pickerBottom = pickerTop + self.picker.height() + 20;
self.lasyEmoji.each(function() {
... | define([
'jquery'
],
function($) {
return function() {
var self = this;
if (!self.sprite && self.lasyEmoji[0] && self.lasyEmoji.eq(0).is(".lazy-emoji")) {
var pickerTop = self.picker.offset().top,
pickerBottom = pickerTop + self.picker.height() + 20;
self.... | Fix 'disconnected from the document' error | Fix 'disconnected from the document' error
ref https://github.com/mervick/emojionearea/pull/240
| JavaScript | mit | mervick/emojionearea |
7a328c49ea155df7ff2ae55825aa299c541bf31e | test/index.js | test/index.js | var nocache = require('..')
var assert = require('assert')
var connect = require('connect')
var request = require('supertest')
describe('nocache', function () {
it('sets headers properly', function (done) {
var app = connect()
app.use(function (req, res, next) {
res.setHeader('ETag', 'abc123')
n... | var nocache = require('..')
var assert = require('assert')
var connect = require('connect')
var request = require('supertest')
describe('nocache', function () {
it('sets headers properly', function (done) {
var app = connect()
app.use(function (req, res, next) {
res.setHeader('ETag', 'abc123')
n... | Add missing test for `Surrogate-Control` header | Add missing test for `Surrogate-Control` header
Fixes #13.
| JavaScript | mit | helmetjs/nocache |
5ac0fccde96dd50007767263c19b1432bb4e41d8 | test/index.js | test/index.js | /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
/* eslint-env node, mocha */
import test from 'ava';
import endpoint from '../src/endpoint';
test('happy ponies', () => {
const fetch = () => null;
api(null, null, {
baseUri: 'http://api.example.com/v1',
endpoints: [
... | /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
/* eslint-env node, mocha */
import test from 'ava';
import endpoint from '../src/endpoint';
test('endpoint returns correctly partially applied function', (t) => {
const endpointConfig = {
uri: 'http://example.com',
};
const... | Add spec for endpoints function | Add spec for endpoints function
| JavaScript | mit | hughrawlinson/api-client-helper |
684d9d693b19bc4d09c26627bb16ddcfa6230c63 | src/main.js | src/main.js | import './main.sass'
import 'babel-core/polyfill'
import React from 'react'
import thunk from 'redux-thunk'
import createLogger from 'redux-logger'
import { Router } from 'react-router'
import createBrowserHistory from 'history/lib/createBrowserHistory'
import { createStore, applyMiddleware, combineReducers } from 're... | import './main.sass'
import 'babel-core/polyfill'
import React from 'react'
import thunk from 'redux-thunk'
import createLogger from 'redux-logger'
import { Router } from 'react-router'
import createBrowserHistory from 'history/lib/createBrowserHistory'
import { createStore, applyMiddleware, combineReducers } from 're... | Fix an issue with redirects | Fix an issue with redirects | JavaScript | mit | ello/webapp,ello/webapp,ello/webapp |
18c94b0fcf2fdab6dea4ee0f3c0de11ba6e368f6 | test/index.js | test/index.js | var ienoopen = require('..')
var assert = require('assert')
var connect = require('connect')
var request = require('supertest')
describe('ienoopen', function () {
beforeEach(function () {
this.app = connect()
this.app.use(ienoopen())
this.app.use(function (req, res) {
res.setHeader('Content-Dispos... | var ienoopen = require('..')
var assert = require('assert')
var connect = require('connect')
var request = require('supertest')
describe('ienoopen', function () {
beforeEach(function () {
this.app = connect()
this.app.use(ienoopen())
this.app.use(function (req, res) {
res.setHeader('Content-Dispos... | Use promises instead of callbacks in test | Use promises instead of callbacks in test
| JavaScript | mit | helmetjs/ienoopen |
5bd8d02a8073fc55560fbc534f840627e81683de | src/main.js | src/main.js | 'use strict';
const electron = require('electron');
const { app, BrowserWindow } = electron;
let mainWindow; // Ensures garbage collection does not remove the window
app.on('ready', () => {
// Creates the application window and sets its dimensions to fill the screen
const { width, height } = electron.screen.getP... | 'use strict';
const electron = require('electron');
const { app, BrowserWindow } = electron;
const path = require('path');
const url = require('url');
let mainWindow; // Ensures garbage collection does not remove the window
app.on('ready', () => {
// Creates the application window and sets its dimensions to fill t... | Change method of loading index.html | Change method of loading index.html
| JavaScript | mit | joyceky/interactive-periodic-table,joyceky/interactive-periodic-table,joyceky/interactive-periodic-table |
d650050d72d0272a350d26c1f03b2e4534e99b33 | test/index.js | test/index.js | 'use strict';
var expect = require('chai').expect;
var rm = require('../');
describe('1rm', function () {
// 400# x 4
var expectations = {
brzycki: 436,
epley: 453,
lander: 441,
lombardi: 459,
mayhew: 466,
oconner: 440,
wathan: 451
};
Object.keys(expectations).forEach(functi... | 'use strict';
var expect = require('chai').expect;
var rm = require('../');
describe('1rm', function () {
// 400# x 4
var expectations = {
epley: 453,
brzycki: 436,
lander: 441,
lombardi: 459,
mayhew: 466,
oconner: 440,
wathan: 451
};
Object.keys(expectations).forEach(functi... | Order tests to match source | Order tests to match source
| JavaScript | mit | bendrucker/1rm.js |
10bfd8221e3264d12e6f12470a0d24debc855bd8 | test/index.js | test/index.js | var expect = require('chai').expect,
hh = require('../index');
describe('#method', function () {
it('hh.method is a function', function () {
expect(hh.method).a('function');
});
});
| var assert = require('chai').assert,
hh = require('../index');
describe('#hh.method()', function () {
it('should be a function', function () {
assert.typeOf(hh.method, 'function', 'hh.method is a function');
});
});
| Change tests to assert style | Change tests to assert style
| JavaScript | mit | rsp/node-hapi-helpers |
3c83c85662300646972a2561db80e26e80432f48 | server.js | server.js | const express = require('express')
const app = express()
const path = require('path')
var cors = require('cors')
var bodyParser = require('body-parser')
// var pg = require('pg')
// var format = require('pg-format')
// var client = new pg.Client()
// var getTimeStamp = require('./get-timestamp.js')
// var timestamp = g... | const express = require('express')
const app = express()
const path = require('path')
var cors = require('cors')
var bodyParser = require('body-parser')
// var pg = require('pg')
// var format = require('pg-format')
// var client = new pg.Client()
// var getTimeStamp = require('./get-timestamp.js')
// var timestamp = g... | Add res.end() to end the POST request | Add res.end() to end the POST request
@chinedufn Line 24 is where I get the contents of `req.body` in order to get the text from the textbox
the problem is I believe it should be `req.body.text` like the example
on the 'body-parser' page shows.
| JavaScript | mit | acucciniello/notebook-sessions,acucciniello/notebook-sessions |
4cf7eb019de9b51505dbf1ba8e2b5f9bc77e0b20 | recruit/client/applications.js | recruit/client/applications.js | Meteor.subscribe('regions');
Meteor.subscribe('applications');
Template.applications.helpers({
applications: function() {
return Applications.find({}, {limit: 10});
},
formatDate: function(date) {
return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear();
},
regionName: functio... | Meteor.subscribe('regions');
Meteor.subscribe('applications');
Template.applications.helpers({
applications: function() {
return Applications.find({}, {limit: 10});
},
formatDate: function(date) {
if (typeof date === 'undefined') {
return null;
}
return date.getDate() + '/' + (date.getMon... | Fix exceptions when application region or date is undefined | Fix exceptions when application region or date is undefined
| JavaScript | apache-2.0 | IngloriousCoderz/GetReel,IngloriousCoderz/GetReel |
df11a29999a30f430162e2a6742903879f4608c4 | web/webpack.common.js | web/webpack.common.js | const path = require('path');
const webpack = require('webpack');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
app: './src/app/app.js'
},
... | const path = require('path');
const webpack = require('webpack');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
app: './src/app/app.js'
},
... | Update webpack copy plugin configuration | Update webpack copy plugin configuration
| JavaScript | mit | ddugovic/RelayChess,ddugovic/RelayChess,ddugovic/RelayChess |
b9eccecc4a5574ec05e29c55b16e19814b7d2c19 | Kinect2Scratch.js | Kinect2Scratch.js | (function(ext) {
// Cleanup function when the extension is unloaded
ext._shutdown = function() {};
// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.my_first_block =... | (function(ext) {
// Cleanup function when the extension is unloaded
ext._shutdown = function() {};
// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.my_first_block = fun... | Stop terrible idea; make reporter block do something | Stop terrible idea; make reporter block do something
| JavaScript | bsd-3-clause | visor841/SkelScratch,Calvin-CS/SkelScratch |
46f2f3e86783a0b1eeed9be1ac35cd50a3ce1939 | src/pkjs/index.js | src/pkjs/index.js | /* global Pebble navigator */
function pebbleSuccess(e) {
// do nothing
}
function pebbleFailure(e) {
console.error(e);
}
var reportPhoneBatt;
Pebble.addEventListener('ready', function(e) {
if (navigator.getBattery) {
navigator.getBattery().then(function (battery) {
reportPhoneBatt = function () {
... | /* global Pebble navigator */
function pebbleSuccess(e) {
// do nothing
}
function pebbleFailure(e) {
console.error(e);
}
var reportPhoneBatt;
Pebble.addEventListener('ready', function(e) {
if (navigator.getBattery) {
navigator.getBattery().then(function (battery) {
reportPhoneBatt = function () {
... | Add log message about starting in the emulator | Add log message about starting in the emulator
| JavaScript | mit | stuartpb/rainpower-watchface,stuartpb/rainpower-watchface,stuartpb/rainpower-watchface |
a9d67c9f29270b56be21cb71073020f8957374d4 | test/client/scripts/arcademode/store/configureStore.spec.js | test/client/scripts/arcademode/store/configureStore.spec.js |
'use strict';
/* Unit tests for file client/scripts/arcademode/store/configureStore.js. */
import { expect } from 'chai';
import configureStore from '../../../../../client/scripts/arcademode/store/configureStore';
describe('configureStore()', () => {
it('should do return an object', () => {
const store = confi... |
'use strict';
/* Unit tests for file client/scripts/arcademode/store/configureStore.js. */
import { expect } from 'chai';
import configureStore from '../../../../../client/scripts/arcademode/store/configureStore';
describe('Store: configureStore()', () => {
it('should return an object representing the store', () =... | Test store, dispatch, and state | Test store, dispatch, and state
| JavaScript | bsd-3-clause | freeCodeCamp/arcade-mode,kevinnorris/arcade-mode,kevinnorris/arcade-mode,kevinnorris/arcade-mode,freeCodeCamp/arcade-mode,freeCodeCamp/arcade-mode,kevinnorris/arcade-mode,freeCodeCamp/arcade-mode |
be4104b7fa5e985da4970d733231ba2f9f4d1c24 | lib/async-to-promise.js | lib/async-to-promise.js | // Return promise for given async function
'use strict';
var f = require('es5-ext/lib/Function/functionalize')
, concat = require('es5-ext/lib/List/concat').call
, slice = require('es5-ext/lib/List/slice/call')
, deferred = require('./deferred')
, apply;
apply = function (fn, scope, args, resolve) {... | // Return promise for given async function
'use strict';
var f = require('es5-ext/lib/Function/functionalize')
, slice = require('es5-ext/lib/List/slice/call')
, toArray = require('es5-ext/lib/List/to-array').call
, deferred = require('./deferred')
, apply;
apply = function (fn, scope, args, resol... | Update up to changes in es5-ext | Update up to changes in es5-ext
| JavaScript | isc | medikoo/deferred |
97b8f1d793341c20acf7eabb9395ee575b7bcb59 | app/routes/interestgroups/components/InterestGroupList.js | app/routes/interestgroups/components/InterestGroupList.js | import styles from './InterestGroup.css';
import React from 'react';
import InterestGroup from './InterestGroup';
import Button from 'app/components/Button';
import { Link } from 'react-router';
export type Props = {
interestGroups: Array
};
const InterestGroupList = (props: Props) => {
const groups = props.inter... | import styles from './InterestGroup.css';
import React from 'react';
import InterestGroup from './InterestGroup';
import Button from 'app/components/Button';
import { Link } from 'react-router';
import NavigationTab, { NavigationLink } from 'app/components/NavigationTab';
export type Props = {
interestGroups: Array
... | Use NavigationTab in InterestGroup list | Use NavigationTab in InterestGroup list
| JavaScript | mit | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp |
64ae5257caf51aa470249561184b7b8c7a4d614c | stylefmt.js | stylefmt.js | 'use strict';
var stylefmt = require('stylefmt');
var data = '';
// Get options if needed
if (process.argv.length > 2) {
var opts = JSON.parse(process.argv[2]);
process.chdir(opts.file_path);
}
process.stdin.on('data', function(css) {
data += css;
});
process.stdin.on('end', function() {
try {
process.s... | 'use strict';
var stylefmt = require('stylefmt');
var data = '';
// Get options if needed
if (process.argv.length > 2) {
var opts = JSON.parse(process.argv[2]);
process.chdir(opts.file_path);
}
process.stdin.on('data', function(css) {
data += css;
});
process.stdin.on('end', function() {
stylefmt.process(da... | Update for new postcss promises | Update for new postcss promises
| JavaScript | isc | dmnsgn/sublime-cssfmt,dmnsgn/sublime-cssfmt,dmnsgn/sublime-stylefmt |
47eb145d096e569254fcc96d1b71925cf0ff631f | src/background.js | src/background.js | 'use strict';
/**
* Returns a BlockingResponse object with a redirect URL if the request URL
* matches a file type extension.
*
* @param {object} request
* @return {object|undefined} the blocking response
*/
function requestInterceptor(request) {
var url = request.url;
var hasParamTs = /\?.*ts=/;
var hasEx... | 'use strict';
var tabSize = 2;
/**
* Returns a BlockingResponse object with a redirect URL if the request URL
* matches a file type extension.
*
* @param {object} request
* @return {object|undefined} the blocking response
*/
function requestInterceptor(request) {
var url = request.url;
var hasParamTs = /\?.... | Use tab size from Chrome storage | Use tab size from Chrome storage
| JavaScript | mit | nysa/github-tab-sizer |
6653fcba245b25adc7c20bf982a3d119f2659711 | .prettierrc.js | .prettierrc.js | module.exports = {
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'consistent',
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'always',
};
| module.exports = {
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: 'consistent',
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'always',
endOfLine: 'lf',
};
| Set endOfLine to "lf" in prettier-config | :wrench: Set endOfLine to "lf" in prettier-config
| JavaScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs |
1b2d9602dade5c599390645bd02e9b066f4f0ef5 | cla_frontend/assets-src/javascripts/app/test/protractor.conf.local.js | cla_frontend/assets-src/javascripts/app/test/protractor.conf.local.js | (function () {
'use strict';
var extend = require('extend'),
defaults = require('./protractor.conf');
exports.config = extend(defaults.config, {
// --- uncomment to use mac mini's ---
// seleniumAddress: 'http://clas-mac-mini.local:4444/wd/hub',
// baseUrl: 'http://Marcos-MacBook-Pro-2.local:80... | (function () {
'use strict';
var extend = require('extend'),
defaults = require('./protractor.conf');
exports.config = extend(defaults.config, {
// --- uncomment to use mac mini's ---
// seleniumAddress: 'http://clas-mac-mini.local:4444/wd/hub',
// baseUrl: 'http://Marcos-MacBook-Pro-2.local:80... | Remove chrome warnings during e2e tests | Remove chrome warnings during e2e tests
| JavaScript | mit | ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend |
276492033ce2a3048b453d75c0e361bf4ebfd5d7 | tests/spec/QueueTwoStacksSpec.js | tests/spec/QueueTwoStacksSpec.js | describe("Implement queue with two stacks", function() {
const Queue = new QueueTwoStacks();
Queue.enqueue(1);
Queue.enqueue(2);
Queue.enqueue(3);
describe("enqueue()", function() {
it("appends an element to tail", function() {
Queue.enqueue(4);
const expected = [1,2,3,4];
expect(Queue... | describe("Implement queue with two stacks", function() {
const Queue = new QueueTwoStacks();
Queue.enqueue(1);
Queue.enqueue(2);
Queue.enqueue(3);
describe("enqueue()", function() {
it("appends an element to tail", function() {
Queue.enqueue(4);
const expected = [1,2,3,4];
expect(Queue... | Move code to correct semantics in spec | Move code to correct semantics in spec
| JavaScript | mit | ThuyNT13/algorithm-practice,ThuyNT13/algorithm-practice |
009e3a12d21aa5b04acd1f17616a6af2458046b1 | src/projects/TicTacToe/TicTacToe.js | src/projects/TicTacToe/TicTacToe.js | import React from 'react';
import './TicTacToe.scss';
import { connect } from 'react-redux';
import ticTacToeActions from 'actions/tictactoe';
import GameBoard from './components/GameBoard';
const mapStateToProps = (state) => {
return {
playerTurn: state.tictactoe.playerTurn
};
};
class TicTacToe... | import React from 'react';
import './TicTacToe.scss';
import { connect } from 'react-redux';
import ticTacToeActions from 'actions/tictactoe';
import GameBoard from './components/GameBoard';
const mapStateToProps = (state) => {
return {
playerTurn: state.tictactoe.playerTurn,
winner: state.tictac... | Add console statements for initial notification | Add console statements for initial notification
| JavaScript | mit | terakilobyte/terakilobyte.github.io,terakilobyte/terakilobyte.github.io |
520a7ecf81d37df70aefe39efe2e9e1092f25a52 | tests/unit/models/canvas-test.js | tests/unit/models/canvas-test.js | import { moduleForModel, test } from 'ember-qunit';
moduleForModel('canvas', 'Unit | Model | canvas', {
// Specify the other units that are required for this test.
needs: 'model:op model:pulseEvent model:team model:user'.w()
});
test('it exists', function(assert) {
const model = this.subject();
assert.ok(Bool... | import { moduleForModel, test } from 'ember-qunit';
moduleForModel('canvas', 'Unit | Model | canvas', {
// Specify the other units that are required for this test.
needs: 'model:comment model:op model:pulseEvent model:team model:user'.w()
});
test('it exists', function(assert) {
const model = this.subject();
... | Add missing model dependency for canvas model test | Add missing model dependency for canvas model test
| JavaScript | apache-2.0 | usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2 |
7d8ef029b25f4869bf046e6e28fc4bd801614944 | src/atom/index.js | src/atom/index.js | class Atom {
constructor(state) {
this.state = state;
this.watches = {};
}
reset(state) {
return this._change(state);
}
swap(f, ...args) {
return this._change(f(this.state, ...args));
}
deref() {
return this.state;
}
addWatch(k, f) {
// if (this.watches[key]) {
// con... | class Atom {
constructor(state) {
this.state = state;
this.watches = {};
}
reset(state) {
return this._change(state);
}
swap(f, ...args) {
return this._change(f(this.state, ...args));
}
deref() {
return this.state;
}
addWatch(k, f) {
// if (this.watches[key]) {
// con... | Update atom state before calling watches | Update atom state before calling watches
| JavaScript | mit | mike-casas/lock,mike-casas/lock,auth0/lock-passwordless,mike-casas/lock,auth0/lock-passwordless,auth0/lock-passwordless |
fc4428b965c58dda423f8bd100ccbb0760d44893 | spec/case-sensitive/program.js | spec/case-sensitive/program.js | var test = require("test");
require("a");
try {
require("A");
test.assert(false, "should fail to require alternate spelling");
} catch (error) {
}
test.print("DONE", "info");
| var test = require("test");
try {
require("a");
require("A");
test.assert(false, "should fail to require alternate spelling");
} catch (error) {
}
test.print("DONE", "info");
| Update case sensitivity test to capture errors on first require | Update case sensitivity test to capture errors on first require
as this throws on case sensitive systems.
| JavaScript | bsd-3-clause | kriskowal/mr,kriskowal/mr |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.