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 |
|---|---|---|---|---|---|---|---|---|---|
280934c9c513cba3be83fb7478a0d2c349281d26 | srv/api.js | srv/api.js | /**
* API endpoints for backend
*/
const api = require('express').Router();
api.use((req, res, next) => {
// redirect requests like ?t=foo/bar to foo/bar
if (req.query.t) {
return res.redirect(req.query.t);
}
next();
});
api.use((req, res) => {
res.status(400).send('Unknown API endpoint');
});
modu... | /**
* API endpoints for backend
*/
const api = require('express').Router();
api.use((req, res, next) => {
// redirect requests like ?t=foo/bar to foo/bar
if (req.query.t) {
return res.redirect(`${req.query.t}?old=true`);
}
next();
});
api.use((req, res) => {
res.status(400).send('Unknown API endpoin... | Add old flag to old-style requests (ready for new database system) | Add old flag to old-style requests (ready for new database system)
| JavaScript | mit | felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget |
ee776c085d9c4f064f87a1e5a093a7482ded4b57 | public/js/controllers/SignIn.js | public/js/controllers/SignIn.js | define(['jquery', 'app', 'services/User'], function ($, app) {
var services = [
{ name: 'Facebook' },
{ name: 'Github' },
{ name: 'Google' }
];
return app.controller('SignInController', ['$scope', '$window', 'userService', function (scope, win, User) {
scope.services = services;
scope.userAva... | define(['jquery', 'app', 'services/User'], function ($, app) {
var services = [
{ name: 'Facebook' },
{ name: 'Github' },
{ name: 'Google' }
];
return app.controller('SignInController', ['$scope', '$window', 'userService', 'historyService', 'settingsService',
function (scope, win, User, historySe... | Clear local storage on log out | Clear local storage on log out
| JavaScript | mit | BrettBukowski/tomatar |
e3e3cb7b768a6d0f2e4e64cd265f088d1713c90b | src/shared/components/idme/idme.js | src/shared/components/idme/idme.js | import React, { Component } from 'react';
import config from 'config/environment';
import troopImage from 'images/Troop.png';
import styles from './idme.css';
class Idme extends Component {
onKeyUp = (event) => {
if (event.key === 'Enter') {
this.idMe();
}
};
onClick = () => {
window.open(`${c... | import React, { Component } from 'react';
import config from 'config/environment';
import troopImage from 'images/Troop.png';
import styles from './idme.css';
class Idme extends Component {
openIDME = () => {
window.open(`${config.idmeOAuthUrl}?client_id=${config.idmeClientId}&redirect_uri=${
config.host
... | Revert refactor to keep PR scoped well | Revert refactor to keep PR scoped well
| JavaScript | mit | NestorSegura/operationcode_frontend,sethbergman/operationcode_frontend,hollomancer/operationcode_frontend,NestorSegura/operationcode_frontend,OperationCode/operationcode_frontend,sethbergman/operationcode_frontend,OperationCode/operationcode_frontend,hollomancer/operationcode_frontend,sethbergman/operationcode_frontend... |
8bcf3a1c8a8aa3d1a95f6731a277f4c27b292e37 | test/can_test.js | test/can_test.js | steal('can/util/mvc.js')
.then('funcunit/qunit',
'can/test/fixture.js')
.then(function() {
// Set the test timeout to five minutes
QUnit.config.testTimeout = 300000;
})
.then('./mvc_test.js',
'can/construct/construct_test.js',
'can/observe/observe_test.js',
'can/view/view_test.js',
'can/control/contro... | steal('can/util/mvc.js')
.then('funcunit/qunit',
'can/test/fixture.js')
.then(function() {
var oldmodule = window.module,
library = 'jQuery';
// Set the test timeout to five minutes
QUnit.config.testTimeout = 300000;
if (window.STEALDOJO){
library = 'Dojo';
} else if( window.STEALMOO) {
library = 'Mooto... | Add library name to QUnit modules | Add library name to QUnit modules
| JavaScript | mit | yusufsafak/canjs,Psykoral/canjs,rasjani/canjs,whitecolor/canjs,tracer99/canjs,bitovi/canjs,bitovi/canjs,airhadoken/canjs,schmod/canjs,asavoy/canjs,jebaird/canjs,thecountofzero/canjs,beno/canjs,WearyMonkey/canjs,Psykoral/canjs,UXsree/canjs,gsmeets/canjs,juristr/canjs,cohuman/canjs,cohuman/canjs,bitovi/canjs,patrick-stee... |
c454f86695e6360e31d7539967979185e4732655 | src/Sprite.js | src/Sprite.js | /**
* Creates an utility to manage sprites.
*
* @param Image The image data of the sprite
*/
var Sprite = function(img) {
this.img = img;
this.descriptors = [];
};
Sprite.prototype = {
registerId: function(id, position, width, height) {
this.descriptors.push({
id: id,
po... | /**
* Creates an utility to manage sprites.
*
* @param Image The image data of the sprite
*/
var Sprite = function(img) {
this.img = img;
this.descriptors = [];
};
Sprite.prototype = {
registerIds: function(array) {
for(var i = array.length - 1; i >= 0; i--) {
this.registerId(
... | Add ability to register multiple sprite ids at once | Add ability to register multiple sprite ids at once
| JavaScript | mit | bendem/JsGameLib |
49f7f0e3a2c4f00d38c5ad807c38f94a447e1376 | lib/exec/source-map.js | lib/exec/source-map.js | var fs = require('fs'),
sourceMap = require('source-map');
module.exports.create = function() {
var cache = {};
function loadSourceMap(file) {
try {
var body = fs.readFileSync(file + '.map');
return new sourceMap.SourceMapConsumer(body.toString());
} catch (err) {
/* NOP */
}
}... | var fs = require('fs'),
sourceMap = require('source-map');
module.exports.create = function() {
var cache = {};
function loadSourceMap(file) {
try {
var body = fs.readFileSync(file + '.map');
return new sourceMap.SourceMapConsumer(body.toString());
} catch (err) {
/* NOP */
}
}... | Drop unused sourcemap reset API | Drop unused sourcemap reset API | JavaScript | mit | walmartlabs/fruit-loops,walmartlabs/fruit-loops |
8fd27f37f55e3c8105fc15698d10575839cbe213 | catson/static/catson.js | catson/static/catson.js | function handleFileSelect(evt) {
evt.stopPropagation();
evt.preventDefault();
$('#drop_zone').remove();
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var img = new Image;
img.src = URL.createObjectURL(evt.dataTransfer.files[0]);
img.onload = function() {
canvas... | function handleFileSelect(evt) {
evt.stopPropagation();
evt.preventDefault();
$('#drop_zone').remove();
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var img = new Image;
img.src = URL.createObjectURL(evt.dataTransfer.files[0]);
img.onload = function() {
canvas... | Work out how many cats to draw | Work out how many cats to draw
| JavaScript | mit | richo/catson.me,richo/catson.me |
8eb18fbf907a7612c3928eeb598edf7830b8094b | lib/model/arrayList.js | lib/model/arrayList.js | var createClass = require('../utilities/createClass');
var Lang = require('../utilities/lang');
var ArrayList = createClass({
instance: {
constructor: function() {
debugger;
},
_backing: [],
add: function(el, index) {
if (!Lang.isNumber(index)) {
index = this._backing.length;
... | var createClass = require('../utilities/createClass');
var Lang = require('../utilities/lang');
var ArrayList = createClass({
constructor: function() {
this._backing = [];
},
instance: {
add: function(el, index) {
if (!Lang.isNumber(index)) {
index = this._backing.length;
}
if... | Fix bug: all arraylists were the same | Fix bug: all arraylists were the same
| JavaScript | apache-2.0 | twosigma/goll-e,RobertWarrenGilmore/goll-e,RobertWarrenGilmore/goll-e,twosigma/goll-e |
83ba65a17c8af9782681cb99a1fa1fdcd99c296c | src/server.js | src/server.js | var http = require('http');
var handler = require('./handler.js');
var dictionaryFile = require('./readDictionary.js');
var server = http.createServer(handler);
function startServer() {
dictionaryFile.readDictionary(null,null, function() {
server.listen(3000, function(){
console.log("Dictionary loaded, server... | var http = require('http');
var handler = require('./handler.js');
var dictionaryFile = require('./readDictionary.js');
var server = http.createServer(handler);
var port = process.env.PORT || 3000;
function startServer() {
dictionaryFile.readDictionary(null,null, function() {
server.listen(port, function(){
c... | Change port variable to process.env.PORT for heroku deployment | Change port variable to process.env.PORT for heroku deployment
| JavaScript | mit | NodeGroup2/autocomplete-project,NodeGroup2/autocomplete-project |
19de825c36cb0b53fbfb92500507b9eb13d63f68 | backend/servers/mcapid/initializers/apikey.js | backend/servers/mcapid/initializers/apikey.js | const {Initializer, api} = require('actionhero');
const apikeyCache = require('../lib/apikey-cache');
module.exports = class APIKeyInitializer extends Initializer {
constructor() {
super();
this.name = 'apikey';
this.startPriority = 1000;
}
initialize() {
// ***************... | const {Initializer, api} = require('actionhero');
const apikeyCache = require('../lib/apikey-cache');
module.exports = class APIKeyInitializer extends Initializer {
constructor() {
super();
this.name = 'apikey';
this.startPriority = 1000;
}
initialize() {
const middleware =... | Reformat and remove commented out code | Reformat and remove commented out code
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
ac6962630953b3387f95422049b0b1c01b981966 | server/commands/redux/reduxDispatchPrompt.js | server/commands/redux/reduxDispatchPrompt.js | import RS from 'ramdasauce'
const COMMAND = 'redux.dispatch.prompt'
/**
Prompts for a path to grab some redux keys from.
*/
const process = (context, action) => {
context.prompt('Action to dispatch', (value) => {
let action = null
// try not to blow up the frame
try {
eval('action = ' + value) //... | import RS from 'ramdasauce'
const COMMAND = 'redux.dispatch.prompt'
/**
Prompts for a path to grab some redux keys from.
*/
const process = (context, action) => {
context.prompt('Action to dispatch (e.g. {type: \'MY_ACTION\'})', (value) => {
let action = null
// try not to blow up the frame
try {
... | Add a more detailed prompt for dispatching an action | Add a more detailed prompt for dispatching an action
| JavaScript | mit | infinitered/reactotron,reactotron/reactotron,rmevans9/reactotron,reactotron/reactotron,rmevans9/reactotron,infinitered/reactotron,reactotron/reactotron,rmevans9/reactotron,rmevans9/reactotron,infinitered/reactotron,reactotron/reactotron,infinitered/reactotron,reactotron/reactotron,rmevans9/reactotron |
d9b11cd20e08cd9b71052c9141f3f9f9bcca57fb | client/utils/fetcher.js | client/utils/fetcher.js | import fetch from 'isomorphic-fetch';
import _ from 'lodash';
import { push } from 'react-router-redux';
async function request(url, userOptions, dispatch) {
const defaultOptions = {
credentials: 'same-origin',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Co... | import fetch from 'isomorphic-fetch';
import _ from 'lodash';
import { push } from 'react-router-redux';
// grab the CSRF token from the cookie
const csrfToken = document.cookie.replace(/(?:(?:^|.*;\s*)csrftoken\s*=s*([^;]*).*$)|^.*$/, '$1');
async function request(url, userOptions, dispatch) {
const defaultOptions... | Add CSRF token to all requests | Add CSRF token to all requests
| JavaScript | apache-2.0 | ctcusc/django-react-boilerplate,ctcusc/django-react-boilerplate,ctcusc/django-react-boilerplate,ctcusc/django-react-boilerplate |
47da0f80a936649d64c53c522e30ea2386276455 | themes/default/config.js | themes/default/config.js | (function(c) {
/*
* !!! CHANGE THIS !!!
*/
c["general"].rootUrl = '//localhost/resto2/';
/*
* !! DO NOT EDIT UNDER THIS LINE !!
*/
c["general"].serverRootUrl = null;
c["general"].proxyUrl = null;
c["general"].confirmDeletion = false;
c["general"].themePath = "/js/li... | (function(c) {
/*
* !!! CHANGE THIS !!!
*/
c["general"].rootUrl = '//localhost/resto2/';
/*
* !! DO NOT EDIT UNDER THIS LINE !!
*/
c["general"].serverRootUrl = null;
c["general"].proxyUrl = null;
c["general"].confirmDeletion = false;
c["general"].themePath = "/js/li... | Replace Bing maps by OpenStreetMap to avoid licensing issue | [THEIA] Replace Bing maps by OpenStreetMap to avoid licensing issue | JavaScript | apache-2.0 | atospeps/resto,Baresse/resto2,RailwayMan/resto,RailwayMan/resto,Baresse/resto2,atospeps/resto,jjrom/resto,jjrom/resto |
b607a3c6157948aab36b056c02d0d126450f56a8 | amaranth-chrome-ext/src/background.js | amaranth-chrome-ext/src/background.js | chrome.webNavigation.onHistoryStateUpdated.addListener(function({url}) {
// Code should only be injected if on a restaurant's page
if (url.includes('restaurant')) {
const scriptsToInject = [
'lib/tf.min.js',
'src/CalorieLabel.js',
'src/AmaranthUtil.js',
's... | chrome.webNavigation.onHistoryStateUpdated.addListener(function({url}) {
// Code should only be injected if on grubhub.com/restaurant/...
if (url.includes('restaurant')) {
const scriptsToInject = [
'lib/tf.min.js',
'src/CalorieLabel.js',
'src/AmaranthUtil.js',
... | Insert CSS along with JS on statePush | Insert CSS along with JS on statePush
| JavaScript | apache-2.0 | googleinterns/amaranth,googleinterns/amaranth |
ae0cdf06604abb68774e8e36f873df3b65de0cf3 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Add missing menu collapse functionality | Add missing menu collapse functionality
| JavaScript | mit | user890104/fauna,user890104/fauna,user890104/fauna,initLab/fauna,initLab/fauna,initLab/fauna |
47d86fff8bc283772af80dc241169ee32972085b | src/parsers/guides/legend-title.js | src/parsers/guides/legend-title.js | import {GuideTitleStyle} from './constants';
import guideMark from './guide-mark';
import {lookup} from './guide-util';
import {TextMark} from '../marks/marktypes';
import {LegendTitleRole} from '../marks/roles';
import {addEncode, encoder} from '../encode/encode-util';
export default function(spec, config, userEncode... | import {GuideTitleStyle} from './constants';
import guideMark from './guide-mark';
import {lookup} from './guide-util';
import {TextMark} from '../marks/marktypes';
import {LegendTitleRole} from '../marks/roles';
import {addEncode, encoder} from '../encode/encode-util';
export default function(spec, config, userEncode... | Fix legend title to respond to legend padding changes. | Fix legend title to respond to legend padding changes.
| JavaScript | bsd-3-clause | vega/vega-parser |
1dab7f5cd24b0995a28ab4bab3884e313dbda0cb | server/models/borrowrequests.js | server/models/borrowrequests.js | import * as Sequelize from 'sequelize';
import { v4 as uuidv4 } from 'uuid';
const borrowRequestSchema = (sequelize) => {
const BorrowRequests = sequelize.define('BorrowRequests', {
id: {
type: Sequelize.UUID,
allowNull: false,
primaryKey: true,
defaultValue: uuidv4(),
},
reason: ... | import * as Sequelize from 'sequelize';
import { v4 as uuidv4 } from 'uuid';
const borrowRequestSchema = (sequelize) => {
const BorrowRequests = sequelize.define('BorrowRequests', {
id: {
type: Sequelize.UUID,
allowNull: false,
primaryKey: true,
defaultValue: uuidv4(),
},
reason: ... | Add model for borrow requests | Add model for borrow requests
| JavaScript | mit | amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books |
a42809d946e00e5542531f06ad52c11d7481c95d | server/votes/votesController.js | server/votes/votesController.js | var Vote = require( './votes' );
module.exports = {
getAllVotes: function() {},
addVote: function() {}
};
| var Vote = require( './votes' );
module.exports = {
getAllVotes: function() {},
addVote: function( req, res, next ) {
console.log( 'TESTING: addVote', req.body );
res.send( 'TESTING: vote added' );
}
};
| Add placeholder functionality to votes controller on server side | Add placeholder functionality to votes controller on server side
| JavaScript | mpl-2.0 | RubiginousChanticleer/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer |
b2c5d65ef0ad3d86f76616805eff5f548a1168a4 | test/index.js | test/index.js | import 'es5-shim';
beforeEach(() => {
sinon.stub(console, 'error');
});
afterEach(() => {
if (typeof console.error.restore === 'function') {
assert(!console.error.called, () => {
return `${console.error.getCall(0).args[0]} \nIn '${this.currentTest.fullTitle()}'`;
});
console.error.restore();
}... | import 'es5-shim';
beforeEach(() => {
sinon.stub(console, 'error');
});
afterEach(function checkNoUnexpectedWarnings() {
if (typeof console.error.restore === 'function') {
assert(!console.error.called, () => {
return `${console.error.getCall(0).args[0]} \nIn '${this.currentTest.fullTitle()}'`;
});
... | Fix logging from afterEach hook in tests | Fix logging from afterEach hook in tests
| JavaScript | mit | react-bootstrap/react-bootstrap,apkiernan/react-bootstrap,dozoisch/react-bootstrap,react-bootstrap/react-bootstrap,egauci/react-bootstrap,jesenko/react-bootstrap,mmarcant/react-bootstrap,Lucifier129/react-bootstrap,Sipree/react-bootstrap,Lucifier129/react-bootstrap,glenjamin/react-bootstrap,HPate-Riptide/react-bootstra... |
d613bc2e1c500df22978b9ca8f70058f00ac3d4b | src/system-extension-contextual.js | src/system-extension-contextual.js | addStealExtension(function (loader) {
loader._contextualModules = {};
loader.setContextual = function(moduleName, definer){
this._contextualModules[moduleName] = definer;
};
var normalize = loader.normalize;
loader.normalize = function(name, parentName){
var loader = this;
if (parentName) {
... | addStealExtension(function (loader) {
loader._contextualModules = {};
loader.setContextual = function(moduleName, definer){
this._contextualModules[moduleName] = definer;
};
var normalize = loader.normalize;
loader.normalize = function(name, parentName){
var loader = this;
var pluginLoader = loader... | Use pluginLoader in contextual extension | Use pluginLoader in contextual extension
If a contextual module is defined passing a string as the `definer`
parameter, the `pluginLoader` needs to be used to dynamically load the
`definer` function; otherwise steal-tools won't build the app.
Closes #952
| JavaScript | mit | stealjs/steal,stealjs/steal |
c4e09637aa700ad08cea7948b6156acaaaf17157 | 404/main.js | 404/main.js | // 404 page using mapbox to show cities around the world.
// Helper to generate the kind of coordinate pairs I'm using to store cities
function bounds() {
var center = map.getCenter();
return {lat: center.lat, lng: center.lng, zoom: map.getZoom()};
}
L.mapbox.accessToken = "pk.eyJ1IjoiY29udHJvdmVyc2lhbCIsImEiOiJ... | // 404 page using mapbox to show cities around the world.
// Helper to generate the kind of coordinate pairs I'm using to store cities
function bounds() {
var center = map.getCenter();
return {lat: center.lat, lng: center.lng, zoom: map.getZoom()};
}
L.mapbox.accessToken = "pk.eyJ1IjoiY29udHJvdmVyc2lhbCIsImEiOiJ... | Simplify 'go' for string identifiers | Simplify 'go' for string identifiers
| JavaScript | mit | controversial/controversial.io,controversial/controversial.io,controversial/controversial.io |
2c604630deb0c5f5a4befd08735c7795ad2480b3 | examples/ice-configuration.js | examples/ice-configuration.js | var quickconnect = require('../');
var opts = {
ns: 'dctest',
iceServers: [
{ url: 'stun:stun.l.google.com:19302' }
]
};
quickconnect('http://rtc.io/switchboard/', opts)
// tell quickconnect we want a datachannel called test
.createDataChannel('test')
// when the test channel is open, let us know
.on... | var quickconnect = require('../');
var opts = {
ns: 'dctest',
iceServers: [
{ url: 'stun:stun.l.google.com:19302' }
]
};
quickconnect('http://rtc.io/switchboard/', opts)
// tell quickconnect we want a datachannel called test
.createDataChannel('iceconfig')
// when the test channel is open, let us know
... | Tweak example to use a configured channel name | Tweak example to use a configured channel name
| JavaScript | apache-2.0 | rtc-io/rtc-quickconnect,rtc-io/rtc-quickconnect |
d1078188378529d084c059b06fe2e1157adc034c | webclient/app/common/ec-as-date.js | webclient/app/common/ec-as-date.js |
(function(){
'use strict';
angular
.module('everycent.common')
.directive('ecAsDate', ecAsDate);
ecAsDate.$inject = [];
function ecAsDate(){
var directive = {
restrict:'A',
require:'ngModel',
link: link
};
return directive;
function link(scope, element, attrs, ngMod... |
(function(){
'use strict';
angular
.module('everycent.common')
.directive('ecAsDate', ecAsDate);
ecAsDate.$inject = [];
function ecAsDate(){
var directive = {
restrict:'A',
require:'ngModel',
link: link
};
return directive;
function link(scope, element, attrs, ngMod... | Fix the issue with dates not being in the correct timezone | Fix the issue with dates not being in the correct timezone
| JavaScript | mit | snorkpete/everycent,snorkpete/everycent,snorkpete/everycent,snorkpete/everycent,snorkpete/everycent |
fe48398d485afe58415688a50479c6fe0ace33c0 | examples/minimal-formatter.js | examples/minimal-formatter.js | var example = require("washington")
var assert = require("assert")
var color = require("cli-color")
example.use({
success: function (success, report) {
process.stdout.write(color.green("."))
},
pending: function (pending, report) {
process.stdout.write(color.yellow("-"))
},
failure: function (fa... | var example = require("washington")
var assert = require("assert")
var RED = "\u001b[31m"
var GREEN = "\u001b[32m"
var YELLOW = "\u001b[33m"
var CLEAR = "\u001b[0m"
example.use({
success: function (success, report) {
process.stdout.write(GREEN + "." + CLEAR)
},
pending: function (pend... | Drop dependency on cli-color in example | Drop dependency on cli-color in example
[skip ci]
| JavaScript | bsd-2-clause | xaviervia/washington,xaviervia/washington |
10c444078b93f8ac179235584fb43a02b314f3f0 | desktop/app/dockIcon.js | desktop/app/dockIcon.js | import app from 'app'
var visibleCount = 0
export default function () {
if (++visibleCount === 1) {
app.dock.show()
}
let alreadyHidden = false
return () => {
if (alreadyHidden) {
throw new Error('Tried to hide the dock icon twice')
}
alreadyHidden = true
if (--visibleCount === 0) {
... | import app from 'app'
var visibleCount = 0
export default (() => {
if (!app.dock) {
return () => () => {}
}
return function () {
if (++visibleCount === 1) {
app.dock.show()
}
let alreadyHidden = false
return () => {
if (alreadyHidden) {
throw new Error('Tried to hide the ... | Make dock management a noop when dock doesn't exist | Make dock management a noop when dock doesn't exist
| JavaScript | bsd-3-clause | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client |
cf5178d1f603a4c029f5cb70250f002543195eea | test/document_update_spec.js | test/document_update_spec.js | var assert = require("assert");
var helpers = require("./helpers");
describe('Document updates,', function(){
var db;
before(function(done){
helpers.resetDb(function(err, res){
db = res;
done();
});
});
// update objects set body=jsonb_set(body, '{name,last}', '', true) where id=3;
desc... | var assert = require("assert");
var helpers = require("./helpers");
describe('Document updates,', function(){
var db;
before(function(done){
helpers.resetDb(function(err, res){
db = res;
done();
});
});
// update objects set body=jsonb_set(body, '{name,last}', '', true) where id=3;
desc... | Add example error check to tests | Add example error check to tests
| JavaScript | bsd-3-clause | ludvigsen/massive-js,robconery/massive-js |
0c89717bfca88ae7a345450da3d922bddb59507e | test/html/js/minify/index.js | test/html/js/minify/index.js | import sinon from 'sinon';
import chai from 'chai';
const expect = chai.expect;
import * as fetch from '../../../../src/functions/fetch.js';
import checkMinifiedJs from '../../../../src/html/js/minify';
describe('html', function() {
describe('test minify promise', function() {
let sandbox;
beforeEach(functi... | import sinon from 'sinon';
import chai from 'chai';
const expect = chai.expect;
import * as fetch from '../../../../src/functions/fetch.js';
import checkMinifiedJs from '../../../../src/html/js/minify';
describe('html', function() {
describe('test minify promise', function() {
let sandbox;
beforeEach(functi... | Fix js minify promise test | Fix js minify promise test
| JavaScript | mit | juffalow/pentest-tool-lite,juffalow/pentest-tool-lite |
5c149bc0399bd39675ee02dd3c2f03fed9b7d850 | src/index.js | src/index.js | 'use strict';
const React = require('react');
const icon = require('./GitHub-Mark-64px.png');
const Preview = require('./preview');
const githubPlugin = ({term, display, actions}) => {
display({
id: 'github',
icon,
title: `Search github for ${term}`,
subtitle: `You entered ${term}`,
getPreview: (... | 'use strict';
const React = require('react');
const icon = require('./GitHub-Mark-64px.png');
const Preview = require('./preview');
const githubPlugin = ({term, display, actions}) => {
display({
id: 'github',
icon,
order: 11,
title: `Search github for ${term}`,
subtitle: `You entered ${term}`,
... | Update to ensure plugin searches on full user input | Update to ensure plugin searches on full user input
| JavaScript | mit | tenorz007/cerebro-github,tenorz007/cerebro-github |
bd9bd8137c46112a83209a6890c37bd0bdf45fd8 | src/index.js | src/index.js | var Alexa = require('alexa-sdk');
var APP_ID = 'amzn1.ask.skill.85ae7ea2-b727-4d2a-9765-5c563a5ec379';
var SKILL_NAME = 'Snack Overflow';
var POSSIBLE_RECIPIES = [ 'Chicken Parmesan', 'Spaghetti', 'Turkey Sandwich' ];
exports.handler = function(event, context, callback) {
var alexa = Alexa.handler(event, context,... | var Alexa = require('alexa-sdk');
var APP_ID = 'amzn1.ask.skill.85ae7ea2-b727-4d2a-9765-5c563a5ec379';
var SKILL_NAME = 'Snack Overflow';
var POSSIBLE_RECIPES = ['Chicken Parmesan', 'Spaghetti', 'Turkey Sandwich'];
var WORKFLOW_STATES = {
START : 1,
RECIPE_GIVEN : 2
};
var currentWorkflowState = WORKFLOW_ST... | Add in state-based logic for switching between Alexa commands. | Add in state-based logic for switching between Alexa commands.
| JavaScript | mit | cwboden/amazon-hackathon-alexa |
db68227c3a02dcc059839592de9076abe52d3bfe | js/server.js | js/server.js | var http = require('http');
var util = require('./util');
var counter = 0;
var port = 1337;
http.createServer(function (req, res) {
var answer = util.helloWorld();
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(answer + '\nYou are user number ' + counter + '.');
counter = counter + 1;
... | var http = require('http');
var util = require('./util');
var counter = 0;
var port = 1337;
http.createServer(function (req, res) {
var answer = util.helloWorld();
counter = counter + 1;
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(answer + '\nYou are user number ' + counter + '.');
... | FIX Increase counter before printing it | FIX Increase counter before printing it
| JavaScript | mit | fhinkel/SimpleChatServer,fhinkel/SimpleChatServer |
d130e6373de4b79cd414d6b02e37eecce1aee97d | public/javascripts/app/views/gameController.js | public/javascripts/app/views/gameController.js | define([
'Backbone',
//Templates
'text!templates/project-page/closeGameTemplate.html'
], function(
Backbone,
//Template
closeGameTemplate
){
var GameController = Backbone.View.extend({
template: _.template(closeGameTemplate),
close: function(event){
var task = this.selectedTask.get('id... | define([
'Backbone',
//Templates
'text!templates/project-page/closeGameTemplate.html'
], function(
Backbone,
//Template
closeGameTemplate
){
var GameController = Backbone.View.extend({
template: _.template(closeGameTemplate),
close: function(event){
var task = this.selectedTask.get('id... | Remove the task only once | Remove the task only once
| JavaScript | mit | tangosource/pokerestimate,tangosource/pokerestimate |
2daacc00b849da8a3e86c089fe1768938486bd2b | draft-js-dnd-plugin/src/modifiers/onDropFile.js | draft-js-dnd-plugin/src/modifiers/onDropFile.js | import AddBlock from './addBlock';
export default function(config) {
return function(e){
const {props, selection, files, editorState, onChange} = e;
// Get upload function from config or editor props
const upload = config.upload || props.upload;
if (upload) {
//this.setS... | import AddBlock from './addBlock';
export default function(config) {
return function(e){
const {props, selection, files, editorState, onChange} = e;
// Get upload function from config or editor props
const upload = config.upload || props.upload;
if (upload) {
//this.setS... | Allow the upload function to acces not only formData, but also the raw files | Allow the upload function to acces not only formData, but also the raw files
| JavaScript | mit | dagopert/draft-js-plugins,nikgraf/draft-js-plugin-editor,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins-v1,draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins,koaninc/draft-js-plugins,dagopert/draft-js-plugins,dagopert/draft-js-plugins,koaninc/draft-js-plugins,draft-js-plugins/draft-js... |
1853e1519030caaeeb7f31017d98823aa5696daf | flow-github/metro.js | flow-github/metro.js | /**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
declare module 'metro' {
declare module.exports: any;
}
declare module 'metro/src/lib/TerminalReporter' {
de... | /**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
declare module 'metro' {
declare module.exports: any;
}
declare module 'metro/src/HmrServer' {
declare modul... | Add open source Flow declaration for Metro module | Add open source Flow declaration for Metro module
Summary:
Fix Flow failure by adding a declaration to the Flow config used in open source. This did not get caught internally because we use a different Flow config.
Release Notes
-------------
[INTERNAL] [MINOR] [Flow] - Fix Flow config.
Reviewed By: rafeca
Differen... | JavaScript | bsd-3-clause | hammerandchisel/react-native,hoangpham95/react-native,javache/react-native,exponent/react-native,facebook/react-native,hammerandchisel/react-native,javache/react-native,arthuralee/react-native,hammerandchisel/react-native,javache/react-native,exponentjs/react-native,exponent/react-native,pandiaraj44/react-native,pandia... |
2ca2a8144d19b46da40a24932471f8ea5f6c9c72 | signature.js | signature.js | // source:
var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
var SIGNATURE = '__signature_' + require('hat')();
exports.parse = parse;
function parse (fn) {
if (typeof fn !== 'function') {
thr... | var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
var SIGNATURE = '__signature_' + require('hat')();
exports.parse = parse;
function parse (fn) {
if (typeof fn !== 'function') {
throw new TypeE... | Remove noisy & pointless comment | Remove noisy & pointless comment
| JavaScript | mit | grncdr/js-pockets |
196e3fded155835c52ac56a1847a1dfb21fbdd1c | api/models/index.js | api/models/index.js | const Sequelize = require('sequelize');
const env = process.env.NODE_ENV || 'development';
const config = require('../config/config.json')[env];
const sequelize = new Sequelize(config.database, config.username, config.password, config);
module.exports = sequelize;
| const Sequelize = require('sequelize');
const env = process.env.NODE_ENV || 'development';
const config = require('../config/config.json')[env];
const sequelize = (() => {
if (config.use_env_variable) {
return new Sequelize(process.env[config.use_env_variable], config);
}
return new Sequelize(config.database, co... | Implement use_env_variable in main app logic | Implement use_env_variable in main app logic
| JavaScript | mit | tsg-ut/mnemo,tsg-ut/mnemo |
5f848210657e1a10260e277c49d584ea5a10fc2d | client/app/scripts/services/action.js | client/app/scripts/services/action.js | angular
.module('app')
.factory('actionService', [
'$http',
'$resource',
function($http, $resource) {
var Action = $resource('/api/actions/:id',
{ id: '@id' }
);
Action.hasUserActed = function(project_id, user_id) {
return $http.get('/api/actions/hasUserActe... | angular
.module('app')
.factory('actionService', [
'$http',
'$resource',
function($http, $resource) {
var Action = $resource('/api/actions/:id',
{ id: '@id' }
);
Action.hasUserActed = function(project_id, user_id) {
return $http.get('/api/actions/hasUserActe... | Add service function to get all activity | Add service function to get all activity
| JavaScript | mit | brettshollenberger/rootstrikers,brettshollenberger/rootstrikers |
3a765c088255b7c2b5485d6566efc736519b2372 | devServer.js | devServer.js | var webpack = require('webpack');
var webpackDevMiddleware = require('webpack-dev-middleware');
var webpackHotMiddleware = require('webpack-hot-middleware');
var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var config = require('./webpack.config');
var po... | var webpack = require('webpack');
var webpackDevMiddleware = require('webpack-dev-middleware');
var webpackHotMiddleware = require('webpack-hot-middleware');
var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var config = require('./webpack.config');
var po... | Update to use env port | Update to use env port
| JavaScript | mit | Irraquated/gryph,Irraquated/gryph,FakeSloth/gryph,FakeSloth/gryph |
4b0dfc61b9d837724df287b7a9d86eedb35f4060 | website/src/app/global.services/store/mcstore.js | website/src/app/global.services/store/mcstore.js | import MCStoreBus from './mcstorebus';
export const EVTYPE = {
EVUPDATE: 'EVUPDATE',
EVREMOVE: 'EVREMOVE',
EVADD: 'EVADD'
};
const _KNOWN_EVENTS = _.values(EVTYPE);
function isKnownEvent(event) {
return _.findIndex(_KNOWN_EVENTS, event) !== -1;
}
export class MCStore {
constructor(initialState) ... | import MCStoreBus from './mcstorebus';
export const EVTYPE = {
EVUPDATE: 'EVUPDATE',
EVREMOVE: 'EVREMOVE',
EVADD: 'EVADD'
};
const _KNOWN_EVENTS = _.values(EVTYPE);
function isKnownEvent(event) {
return _KNOWN_EVENTS.indexOf(event) !== -1;
}
export class MCStore {
constructor(initialState) {
... | Switch Array.indexOf to determine if event string exists | Switch Array.indexOf to determine if event string exists
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
197e6eeeed36e81b5b87375ea7e2446455ca112c | jquery.initialize.js | jquery.initialize.js | // Complete rewrite of adampietrasiak/jquery.initialize
// @link https://github.com/adampietrasiak/jquery.initialize
// @link https://github.com/dbezborodovrp/jquery.initialize
;(function($) {
var MutationSelectorObserver = function(selector, callback) {
this.selector = selector;
this.callback = callback;
}
var ... | // Complete rewrite of adampietrasiak/jquery.initialize
// @link https://github.com/adampietrasiak/jquery.initialize
// @link https://github.com/dbezborodovrp/jquery.initialize
;(function($) {
var MutationSelectorObserver = function(selector, callback) {
this.selector = selector;
this.callback = callback;
}
var ... | Add support for observing attributes. | Add support for observing attributes.
| JavaScript | mit | AdamPietrasiak/jquery.initialize,timpler/jquery.initialize,AdamPietrasiak/jquery.initialize,timpler/jquery.initialize |
321b5b9b916d5afd386de72da882873e7e67e70c | src/admin/dumb_components/preview_custom_email.js | src/admin/dumb_components/preview_custom_email.js | import React from 'react'
export default ({members, preview, props: { submit_custom_email, edit_custom }}) =>
<div className='custom-email-preview'>
<div className='email-recipients'>
<h2>Email Recipients</h2>
<ul>
{members.map((member, i) =>
<li
key={member.... | import React from 'react'
export default ({members, preview, props: { submit_custom_email, edit_custom }}) =>
<div className='custom-email-preview'>
<div className='email-recipients'>
<h2>Email Recipients</h2>
<ul>
{members.map((member, i) =>
<li
key={member.... | Add 'Friends of Chichester Harbour' to preview custom email | Add 'Friends of Chichester Harbour' to preview custom email
| JavaScript | mit | foundersandcoders/sail-back,foundersandcoders/sail-back |
61c34e2ca7eeea7bf7393ea1a227a16e4355a921 | tasks/copy.js | tasks/copy.js | 'use strict';
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
return {
target: {
files: [
{
expand: true,
cwd: 'src/',
src: [
'**/*.html',
... | 'use strict';
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
return {
target: {
files: [
{
expand: true,
cwd: 'src/',
src: [
'**/*.html',
... | Add .dmg and .sig to copied file extensions | Add .dmg and .sig to copied file extensions
| JavaScript | mit | sinahab/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,thofmann/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,sinahab/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,thofmann/BitcoinUnlimitedWeb |
64fa9848ca66290a1e84bc50069a83705753f248 | gruntfile.js | gruntfile.js | var Path = require('path');
module.exports = function (grunt) {
require('time-grunt')(grunt);
require('jit-grunt')(grunt);
grunt.initConfig({
exec: {
update_nimble_submodules: {
command: 'git submodule update --init --recursive',
stdout: true,
stderr: true
}
},
js... | var Path = require('path');
module.exports = function (grunt) {
require('time-grunt')(grunt);
require('jit-grunt')(grunt);
grunt.initConfig({
exec: {
update_nimble_submodules: {
command: 'git submodule update --init --recursive && npm install',
stdout: true,
stderr: true
... | Add npm install to grunt init | Add npm install to grunt init
| JavaScript | mpl-2.0 | mozilla/nimble.webmaker.org |
161b09e250f0e5f822907994488a39ec6a16e607 | src/Disposable.js | src/Disposable.js | class Disposable{
constructor(callback){
this.disposed = false
this.callback = callback
}
dispose(){
if(this.disposed) return
this.callback()
this.callback = null
}
}
module.exports = Disposable
| class Disposable{
constructor(callback){
this.disposed = false
this.callback = callback
}
dispose(){
if(this.disposed) return
if(this.callback){
this.callback()
this.callback = null
}
}
}
module.exports = Disposable
| Allow null callback in DIsposable | :bug: Allow null callback in DIsposable
| JavaScript | mit | ZoomPK/event-kit,steelbrain/event-kit |
8dcc55af2eb7c286565351909134bded508b3d98 | test/rank.js | test/rank.js | var should = require("should");
var rank = require("../index.js").rank;
describe("Rank calculation", function() {
var points = 72;
var hours = 36;
var gravity = 1.8;
describe("Calulate the rank for an element", function() {
var score;
before(function(done) {
score = r... | var should = require("should");
var rank = require("../index.js").rank;
describe("Rank calculation", function() {
var points = 72;
var hours = 36;
var gravity = 1.8;
describe("Calulate the rank for an element", function() {
var score;
before(function(done) {
score = r... | Fix tests according to the defaults | Fix tests according to the defaults
| JavaScript | mit | tlksio/librank |
b3ca504604f8fd25ef428042909a4bad75736967 | app/js/arethusa.core/directives/root_token.js | app/js/arethusa.core/directives/root_token.js | "use strict";
angular.module('arethusa.core').directive('rootToken', [
'state',
'depTree',
function(state, depTree) {
return {
restrict: 'A',
scope: {},
link: function(scope, element, attrs) {
function apply(fn) {
scope.$apply(fn());
}
var changeHeads = de... | "use strict";
angular.module('arethusa.core').directive('rootToken', [
'state',
'depTree',
function(state, depTree) {
return {
restrict: 'A',
scope: {},
link: function(scope, element, attrs) {
function apply(fn) {
scope.$apply(fn());
}
var changeHeads = de... | Change cursor on rootToken as well | Change cursor on rootToken as well
| JavaScript | mit | PonteIneptique/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa |
c7f38e0b6f91a920c6d9e38ee7cceaced50cdf49 | app/models/trip.js | app/models/trip.js | import mongoose from 'mongoose';
import { Promise } from 'es6-promise';
mongoose.Promise = Promise;
import findOrCreate from 'mongoose-findorcreate';
const Schema = mongoose.Schema;
const TripSchema = new Schema( {
userId: { type: String, required: true },
lastUpdated: { type: Date, default: Date.now, required: t... | import mongoose from 'mongoose';
import { Promise } from 'es6-promise';
mongoose.Promise = Promise;
import findOrCreate from 'mongoose-findorcreate';
const Schema = mongoose.Schema;
const getDefaultDate = () => new Date( ( new Date() ).valueOf() - 1000 * 60 * 60 ).getTime();
const TripSchema = new Schema( {
userId:... | Make default date older to allow pretty much any updates | Make default date older to allow pretty much any updates
| JavaScript | mit | sirbrillig/voyageur-js-server |
a40324a5b03ab497822a4e2287b9d6ef37d5848b | src/World.js | src/World.js | /**
World functions
*/
import _ from 'underscore';
export const create = () => {
return {
tripods: [],
food: []
};
};
export const addTripod = (world, tripod) => {
world.tripods.push(tripod);
};
export const addFood = (world, food) => {
world.food.push(food);
};
export const eatFood = (world, f... | /**
World functions
*/
import _ from 'underscore';
export const create = () => {
return {
tripods: [],
food: []
};
};
export const addTripod = (world, tripod) => {
world.tripods.push(tripod);
};
export const addFood = (world, food) => {
world.food.push(food);
};
export const eatFood = (world, f... | Add getClosestFood function to world | Add getClosestFood function to world
| JavaScript | bsd-2-clause | rumblesan/tripods,rumblesan/tripods |
638a38a53544f1ed1854b2215125ef224ef085b2 | app/src/js/bolt.js | app/src/js/bolt.js | /**
* Instance of the Bolt module.
*
* @namespace Bolt
*
* @mixes Bolt.actions
* @mixes Bolt.activity
* @mixes Bolt.app
* @mixes Bolt.ckeditor
* @mixes Bolt.conf
* @mixes Bolt.data
* @mixes Bolt.datetime
* @mixes Bolt.files
* @mixes Bolt.stack
* @mixes Bolt.secmenu
* @mixes Bolt.video
*
* @mixes Bolt.f... | /**
* Instance of the Bolt module.
*
* @namespace Bolt
*
* @mixes Bolt.actions
* @mixes Bolt.activity
* @mixes Bolt.app
* @mixes Bolt.ckeditor
* @mixes Bolt.conf
* @mixes Bolt.data
* @mixes Bolt.datetime
* @mixes Bolt.files
* @mixes Bolt.stack
* @mixes Bolt.secmenu
* @mixes Bolt.video
*
* @mixes Bolt.f... | Add doc block for templateselect mixin | Add doc block for templateselect mixin | JavaScript | mit | Eiskis/bolt-base,tekjava/bolt,HonzaMikula/masivnipostele,pygillier/bolt,Intendit/bolt,pygillier/bolt,richardhinkamp/bolt,hugin2005/bolt,cdowdy/bolt,HonzaMikula/masivnipostele,nantunes/bolt,romulo1984/bolt,GawainLynch/bolt,codesman/bolt,GawainLynch/bolt,CarsonF/bolt,richardhinkamp/bolt,bolt/bolt,Intendit/bolt,nikgo/bolt... |
ba2bfd1d5711ad48da8f16faa59948e91a88318e | modules/mds/src/main/resources/webapp/js/app.js | modules/mds/src/main/resources/webapp/js/app.js | (function () {
'use strict';
var mds = angular.module('mds', [
'motech-dashboard', 'entityService','instanceService', 'mdsSettingsService', 'ngCookies', 'ui.directives',
'ngRoute', 'ui.directives'
]);
$.get('../mds/available/mdsTabs').done(function(data) {
mds.constant('AVAILA... | (function () {
'use strict';
var mds = angular.module('mds', [
'motech-dashboard', 'entityService','instanceService', 'mdsSettingsService', 'ngCookies', 'ui.directives',
'ngRoute', 'ui.directives'
]);
$.ajax({
url: '../mds/available/mdsTabs',
success: function(dat... | Fix ajax error while checking available tabs | MDS: Fix ajax error while checking available tabs
Change-Id: I4f8a4d538e59dcdb03659c7f5405c40abcdafed8
| JavaScript | bsd-3-clause | koshalt/motech,kmadej/motech,shubhambeehyv/motech,smalecki/motech,justin-hayes/motech,ngraczewski/motech,kmadej/motech,adamkalmus/motech,koshalt/motech,frankhuster/motech,smalecki/motech,wstrzelczyk/motech,justin-hayes/motech,justin-hayes/motech,ngraczewski/motech,frankhuster/motech,tectronics/motech,adamkalmus/motech,... |
d85193139375a5e907bb90bf9dc1fc01b5e4e732 | src/fleet.js | src/fleet.js | /**
* @package admiral
* @author Andrew Munsell <andrew@wizardapps.net>
* @copyright 2015 WizardApps
*/
var Fleetctl = require('fleetctl'),
Promise = require('bluebird');
exports = module.exports = function(nconf) {
var options = {};
if(nconf.get('t')) {
options.tunnel = nconf.get('t');
... | /**
* @package admiral
* @author Andrew Munsell <andrew@wizardapps.net>
* @copyright 2015 WizardApps
*/
var Fleetctl = require('fleetctl'),
Promise = require('bluebird');
exports = module.exports = function(nconf) {
var options = {};
if(nconf.get('t')) {
options.tunnel = nconf.get('t');
... | Set the endpoint if the tunnel is not specified | Set the endpoint if the tunnel is not specified
| JavaScript | mit | andrewmunsell/admiral |
8091723fda06b99d76fd59946602835c7e8d8689 | lib/index.js | lib/index.js | /**
* Module dependencies
*/
var autoprefixer = require('autoprefixer');
var postcss = require('postcss');
var atImport = require('postcss-import');
var calc = require('postcss-calc');
var customMedia = require('postcss-custom-media');
var customProperties = require('postcss-custom-properties');
var reporter = requi... | /**
* Module dependencies
*/
var autoprefixer = require('autoprefixer');
var postcss = require('postcss');
var atImport = require('postcss-import');
var calc = require('postcss-calc');
var customMedia = require('postcss-custom-media');
var customProperties = require('postcss-custom-properties');
var reporter = requi... | Use correct order of postcss plugins | Use correct order of postcss plugins
| JavaScript | mit | travco/preprocessor,suitcss/preprocessor |
a5f7c7977f91fd490a8f48bd259d5007591a97da | lib/index.js | lib/index.js |
/**
* Library version.
*/
exports.version = '0.0.1';
/**
* Constructors.
*/
exports.Batch = require('./batch');
exports.Parser = require('./parser');
exports.Socket = require('./sockets/sock');
exports.Queue = require('./sockets/queue');
exports.PubSocket = require('./sockets/pub');
exports.SubSocket = require(... |
/**
* Library version.
*/
exports.version = '0.0.1';
/**
* Constructors.
*/
exports.Batch = require('./batch');
exports.Decoder = require('./decoder');
exports.Encoder = require('./encoder');
exports.Socket = require('./sockets/sock');
exports.Queue = require('./sockets/queue');
exports.PubSocket = require('./s... | Remove Parser, export Encoder and Decoder | Remove Parser, export Encoder and Decoder
| JavaScript | mit | Unitech/pm2-axon,Unitech/axon,DavidCai1993/axon,Unitech/axon,DavidCai1993/axon,tj/axon,tj/axon,Unitech/pm2-axon |
936c009c1887b4f45690f9265c48aabc19c0cb4c | lib/index.js | lib/index.js | var StubGenerator = require('./stub-generator');
var CachingBrowserify = require('./caching-browserify');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'ember-browserify',
included: function(app){
this.app = app;
this.options = {
root: this.app.project.root,
browse... | var StubGenerator = require('./stub-generator');
var CachingBrowserify = require('./caching-browserify');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'ember-browserify',
included: function(app){
this.app = app;
this.options = {
root: this.app.project.root,
browse... | Fix undefined error if sourcemaps option not defined | Fix undefined error if sourcemaps option not defined | JavaScript | mit | chadhietala/ember-browserify,ef4/ember-browserify,stefanpenner/ember-browserify,asakusuma/ember-browserify |
9bbd4b0e9dc448e9461df0ba11a4198b03693f66 | src/index.js | src/index.js | module.exports = require('./ServerlessOffline.js');
// Serverless exits with code 1 when a promise rejection is unhandled. Not AWS.
// Users can still use their own unhandledRejection event though.
process.removeAllListeners('unhandledRejection');
| 'use strict';
module.exports = require('./ServerlessOffline.js');
// Serverless exits with code 1 when a promise rejection is unhandled. Not AWS.
// Users can still use their own unhandledRejection event though.
process.removeAllListeners('unhandledRejection');
| Add missing strict mode directive | Add missing strict mode directive
| JavaScript | mit | dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline |
8be34454952c75759258c463206855a39bfc1dde | lib/index.js | lib/index.js | 'use strict';
const url = require('url');
module.exports = function(env, callback) {
class CNAME extends env.plugins.Page {
getFilename() {
return 'CNAME';
}
getView() {
return (env, locals, contents, templates, callback) => {
if (locals.url) {
callback(null, new Buffer(ur... | 'use strict';
const url = require('url');
module.exports = function(env, callback) {
class CNAME extends env.plugins.Page {
getFilename() {
return 'CNAME';
}
getView() {
return (env, locals, contents, templates, callback) => {
if (locals.url) {
callback(null, new Buffer(ur... | Raise error when plugin is not configured | Raise error when plugin is not configured
| JavaScript | mit | xavierdutreilh/wintersmith-cname |
43d99e445612c68b56861c6c456096468e19ccd1 | src/index.js | src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import { AutoSizer } from 'react-virtualized';
import Kanban from './Kanban';
import Perf from 'react-addons-perf';
import 'react-virtualized/styles.css';
import './index.css';
window.Perf = Perf;
ReactDOM.render(
<div className='KanbanWrapper'>
<A... | import React from 'react';
import ReactDOM from 'react-dom';
import { AutoSizer } from 'react-virtualized';
import Perf from 'react-addons-perf';
import Kanban from './Kanban';
import { generateLists } from './utils/generate_lists';
import 'react-virtualized/styles.css';
import './index.css';
window.Perf = Perf;
c... | Move lists generation outside Kanban | Move lists generation outside Kanban
| JavaScript | mit | edulan/react-virtual-kanban,edulan/react-virtual-kanban |
7e5b2f723ec07571d987f176083694396b6f4098 | src/index.js | src/index.js | import { GRAPHQL_URL } from 'constants';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import withScroll from 'scroll-behavior';
import ApolloClient, { createNetworkInterface } from 'apoll... | import { GRAPHQL_URL } from 'constants';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import withScroll from 'scroll-behavior';
import ApolloClient, { createNetworkInterface } from 'apoll... | Add idToken to graphql requests | Add idToken to graphql requests
| JavaScript | mit | garden-aid/web-client,garden-aid/web-client,garden-aid/web-client |
974cb4efbbabcad2cf93eb4938c5414ccb92eb41 | src/index.js | src/index.js | import React, { Component, PropTypes } from 'react';
import SVGInjector from 'svg-injector';
export default class ReactSVG extends Component {
static defaultProps = {
evalScripts: 'never',
callback: () => {}
}
static propTypes = {
path: PropTypes.string.isRequired,
className: PropTypes.string,
... | import React, { PureComponent, PropTypes } from 'react'
import SVGInjector from 'svg-injector'
export default class ReactSVG extends PureComponent {
static defaultProps = {
callback: () => {},
className: '',
evalScripts: 'once'
}
static propTypes = {
callback: PropTypes.func,
className: Pro... | Make pure, ditch fallback png option | Make pure, ditch fallback png option
| JavaScript | mit | atomic-app/react-svg |
36e75858d0c6b10d11d998d2d205be7d237c7bb8 | src/index.js | src/index.js |
import {Video} from '@thiagopnts/kaleidoscope';
import {ContainerPlugin, Mediator, Events} from 'clappr';
export default class Video360 extends ContainerPlugin {
constructor(container) {
super(container);
Mediator.on(`${this.options.playerId}:${Events.PLAYER_RESIZE}`, this.updateSize, this);
let {height... |
import {Video} from '@thiagopnts/kaleidoscope';
import {ContainerPlugin, Mediator, Events} from 'clappr';
export default class Video360 extends ContainerPlugin {
constructor(container) {
super(container);
Mediator.on(`${this.options.playerId}:${Events.PLAYER_RESIZE}`, this.updateSize, this);
let {height... | Fix video jumping to fullscreen on iPhones | Fix video jumping to fullscreen on iPhones
| JavaScript | mit | thiagopnts/video-360,thiagopnts/video-360 |
52e91f6eadb2d6577bd67e525d851fc4e3213187 | src/index.js | src/index.js | import path from 'path';
import fs from 'fs';
import collect from './collect';
let runOnAllFiles;
function hasFlowPragma(source) {
return source
.getAllComments()
.some(comment => /@flow/.test(comment.value));
}
export default {
rules: {
'show-errors': function showErrors(context) {
return {
... | import path from 'path';
import fs from 'fs';
import collect from './collect';
let runOnAllFiles;
function hasFlowPragma(source) {
return source
.getAllComments()
.some(comment => /@flow/.test(comment.value));
}
export default {
rules: {
'show-errors': function showErrors(context) {
return {
... | Add eslint setting 'flowDir' to specify location of .flowconfig | Add eslint setting 'flowDir' to specify location of .flowconfig
| JavaScript | mit | namjul/eslint-plugin-flowtype-errors |
aeaafbdeaf6d4f13cc38d5ba9bc05b9508550bad | src/index.js | src/index.js | import '../vendor/gridforms.css'
import React, {cloneElement, Children, PropTypes} from 'react'
let classNames = (...args) => args.filter(cn => !!cn).join(' ')
export let GridForm = ({children, className, component: Component, ...props}) =>
<Component {...props} className={classNames('grid-form', className)}>
... | import '../vendor/gridforms.css'
import React, {cloneElement, Children, PropTypes} from 'react'
let classNames = (...args) => args.filter(cn => !!cn).join(' ')
export let GridForm = React.createClass({
getDefaultProps() {
return {
component: 'form'
}
},
render() {
let {children, className, co... | Use a regular React component impl until hot reloading issues are resolved | Use a regular React component impl until hot reloading issues are resolved
Hot reloading a function component curently blows any state within it away
| JavaScript | mit | insin/react-gridforms |
53bf7d8625644477eb9d5fc6c5a5070979b573c4 | src/index.js | src/index.js | import arrayBufferToImage from './arrayBufferToImage.js';
import createImage from './createImage.js';
import { loadImage, configure } from './loadImage.js';
import { external } from './externalModules.js';
export {
arrayBufferToImage,
createImage,
loadImage,
configure,
external
};
| import arrayBufferToImage from './arrayBufferToImage.js';
import createImage from './createImage.js';
import { loadImage, configure } from './loadImage.js';
import { external } from './externalModules.js';
const cornerstoneWebImageLoader = {
arrayBufferToImage,
createImage,
loadImage,
configure,
external
};
... | Add a (default) export named cornerstoneWebImageLoader | chore(exports): Add a (default) export named cornerstoneWebImageLoader
| JavaScript | mit | cornerstonejs/cornerstoneWebImageLoader,chafey/cornerstoneWebImageLoader |
b4c7d9e420f19ce8c30411288bdcdbe32c329d5d | tests/unit.js | tests/unit.js | // Listing of all the infrastructure unit tests
define([
"./Destroyable",
"./register",
"./Widget-attr",
"./handlebars",
"./Widget-lifecycle",
"./Widget-placeAt",
"./Widget-utility",
"./HasDropDown",
"./CssState",
"./Container",
"./a11y",
"./Widget-on",
"./Stateful",
"./Selection"
]);
| // Listing of all the infrastructure unit tests
define([
"./Destroyable",
"./register",
"./Widget-attr",
"./handlebars",
"./Widget-lifecycle",
"./Widget-placeAt",
"./Widget-utility",
"./HasDropDown",
"./CssState",
"./Container",
"./a11y",
"./Widget-on",
"./Stateful",
"./Selection",
"./StoreMap",
"./Stor... | Store and StoreMap intern tests added | Store and StoreMap intern tests added
| JavaScript | bsd-3-clause | EAlexRojas/deliteful,brunano21/deliteful,brunano21/deliteful,EAlexRojas/deliteful,cjolif/deliteful,tkrugg/deliteful,kitsonk/deliteful,tkrugg/deliteful,harbalk/deliteful,harbalk/deliteful,kitsonk/deliteful,cjolif/deliteful |
e3e7b721228250a7dc4c899f1e4e4d7841a71b0b | utils/analytics.js | utils/analytics.js | 'use strict';
const _ = require('underscore');
const app = require('express')();
const Analytics = require('analytics-node');
const { secrets } = require('app/config/config');
const { guid } = require('./users');
const segmentKey = process.env.SEGMENT_WRITE_KEY || secrets.segmentKey;
const env = app.get('env');
let ... | 'use strict';
const _ = require('underscore');
const app = require('express')();
const Analytics = require('analytics-node');
const { secrets } = require('app/config/config');
const { guid } = require('./users');
const segmentKey = process.env.SEGMENT_WRITE_KEY || secrets.segmentKey;
const env = app.get('env');
let ... | Implement support for page() event tracking | Implement support for page() event tracking
We won't begin logging page() calls until we implement the client API
endpoint. [Finishes #131391691]
| JavaScript | mit | heymanhn/journey-backend |
2825d4a0991fb7d2db5ab72f4e6cba84ef0b552b | src/utils/__tests__/getComponentName.test.js | src/utils/__tests__/getComponentName.test.js | import React, { Component } from 'react';
import getComponentName from '../getComponentName';
/* eslint-disable */
class Foo extends Component {
render() {
return <div />;
}
}
function Bar() {
return <div />;
}
const OldComp = React.createClass({
render: function() {
return <div />;
... | import React, { Component } from 'react';
import getComponentName from '../getComponentName';
/* eslint-disable */
class Foo extends Component {
render() {
return <div />;
}
}
function Bar() {
return <div />;
}
const OldComp = React.createClass({
render: function() {
return <div />;
... | Test getComponentName() should throw when nothing passed in | Test getComponentName() should throw when nothing passed in
| JavaScript | apache-2.0 | iCHEF/gypcrete,iCHEF/gypcrete |
42c9b6b124955a68f37517f72a20203eaaa3eb6c | src/store.js | src/store.js | import { compose, createStore } from 'redux';
import middleware from './middleware';
import reducers from './reducers';
function configureStore() {
return compose(middleware)(createStore)(reducers);
}
export var store = configureStore();
| import { compose, createStore } from 'redux';
import middleware from './middleware';
import reducers from './reducers';
// Poor man's hot reloader.
var lastState = JSON.parse(localStorage["farmbot"] || "{auth: {}}");
export var store = compose(middleware)(createStore)(reducers, lastState);
if (lastState.auth.authen... | Add improvised localstorage saving mechanism | [STABLE] Add improvised localstorage saving mechanism
| JavaScript | mit | roryaronson/farmbot-web-frontend,FarmBot/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,RickCarlino/farmbot-web-frontend,roryaronson/farmbot-web-frontend,roryaronson/farmbot-web-frontend,MrChristofferson/farmbot-web-frontend,FarmBot/farmbot-web-frontend |
f03f47aa8653bcf91169eb1364d9f7198da9f435 | src/utils.js | src/utils.js | define(function () {
"use strict";
var noNew = function (Constructor) {
return function () {
var instance = Object.create(Constructor.prototype);
Constructor.apply(instance, arguments);
return instance;
};
};
return {
noNew: noNew,
};
});... | define(function () {
"use strict";
// Allows constructors to be called without using `new`
var noNew = function (Constructor) {
return function () {
var instance = Object.create(Constructor.prototype);
Constructor.apply(instance, arguments);
return instance;
... | Add comment for noNew utility | Add comment for noNew utility
| JavaScript | mpl-2.0 | frewsxcv/graphosaurus |
633a10075f7c1feab809526cf64b07e7ce8d1832 | src/utils.js | src/utils.js | /**
* @module utils
*/
var utils = module.exports = {};
/**
* Given a JSON string, convert it to its base64 representation.
*
* @method
* @memberOf utils
*/
utils.jsonToBase64 = function (json) {
var bytes = new Buffer(JSON.stringify(json));
return bytes
.toString('base64')
.replace(/\+/g, '-')
... | var Promise = require('bluebird');
var request = require('superagent');
/**
* @module utils
*/
var utils = module.exports = {};
/**
* Given a JSON string, convert it to its base64 representation.
*
* @method
* @memberOf utils
*/
utils.jsonToBase64 = function (json) {
var bytes = new Buffer(JSON.stringify(j... | Add utility function that abstracts the request process | Add utility function that abstracts the request process
| JavaScript | mit | auth0/node-auth0,Annyv2/node-auth0 |
8bf28e5dd3a48791426944ad6044c9a5db1ba08c | src/igTruncate.js | src/igTruncate.js | angular.module('igTruncate', []).filter('truncate', function (){
return function (text, length, end){
if (text !== undefined){
if (isNaN(length)){
length = 10;
}
if (end === undefined){
end = "...";
}
if (text.length <= length || text.length - end.length <= length){... | angular.module('igTruncate', []).filter('truncate', function (){
return function (text, length, end){
if (text !== undefined){
if (isNaN(length)){
length = 10;
}
end = end || "...";
if (text.length <= length || text.length - end.length <= length){
return text;
}else... | Simplify default for end variable. | Simplify default for end variable. | JavaScript | mit | OpenCST/angular-truncate,igreulich/angular-truncate |
771de23463c5cb631aaee43df25f497741fab5e8 | src/action.js | src/action.js | var parser = require('./parser');
var Interpreter = require('./interpreter');
function TileAction(tile, tileX, tileY, key, data, renderer, callback) {
this.tile = tile;
this.key = key;
this.data = data;
this.tileX = tileX;
this.tileY = tileY;
this.renderer = renderer;
this.callback = callback;
}
TileAct... | var parser = require('./parser');
var Interpreter = require('./interpreter');
function TileAction(tile, tileX, tileY, key, data, renderer, callback) {
this.tile = tile;
this.key = key;
this.data = data;
this.tileX = tileX;
this.tileY = tileY;
this.renderer = renderer;
this.callback = callback;
}
TileAct... | Fix tile data for push command bug | Fix tile data for push command bug
| JavaScript | mit | tnRaro/AheuiChem,tnRaro/AheuiChem,yoo2001818/AheuiChem,yoo2001818/AheuiChem |
4faef2bde754588c884b3488071f1592d5c17611 | lib/js.js | lib/js.js | 'use strict';
var assign = require('lodash').assign;
var utils = require('gulp-util');
var webpack = require('webpack');
var PluginError = utils.PluginError;
var defaults = {
optimize: false,
plugins: {
webpack: {
entry: './src/main.js',
output: {
path: './dist'
},
plugins: []
... | 'use strict';
var assign = require('lodash').assign;
var utils = require('gulp-util');
var webpack = require('webpack');
var PluginError = utils.PluginError;
var defaults = {
optimize: false,
plugins: {
webpack: {
entry: './src/main.js',
output: {
path: './dist',
filename: 'main.js... | Add default setting for Webpack output.filename | Add default setting for Webpack output.filename
| JavaScript | mit | cloudfour/core-gulp-tasks |
552909944462a4c541a00af5b7508dbf391f41fc | bin/gear.js | bin/gear.js | #!/usr/bin/env node
/* Gear task runner. Executes Gearfile using a tasks workflow.
* See http://gearjs.org/#tasks.tasks
*
* Usage:
* > gear
*/
var gear = require('../index'),
vm = require('vm'),
path = require('path'),
fs = require('fs'),
filename = 'Gearfile',
existsSync = fs.existsSync || p... | #!/usr/bin/env node
'use strict';
/* Gear task runner. Executes Gearfile using a tasks workflow.
* See http://gearjs.org/#tasks.tasks
*
* Usage:
* > gear [options]
*
* Available options:
* --cwd <dir> change working directory
* --Gearfile <path> execute a specific gearfile
*/
var Liftoff = require('li... | Use node-liftoff to improve CLI mode. | Use node-liftoff to improve CLI mode.
| JavaScript | bsd-3-clause | twobit/gear |
639e97117d9651f6cee03474686b787f5e59c9a8 | src/setupTests.js | src/setupTests.js | // jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom/extend-expect";
// need this for async/await in tests
import "core-js/stable";
i... | // jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import "@testing-library/jest-dom/extend-expect";
// need this for async/await in tests
import "core-js/stable";
i... | Add URL mock for Jest tests. Only supporting protocol attribute yet. | Add URL mock for Jest tests. Only supporting protocol attribute yet.
| JavaScript | bsd-3-clause | plone/mockup,plone/mockup,plone/mockup |
9484f3cb37841c988a1e1893645ba99693d9d896 | karma.conf.js | karma.conf.js | // Karma configuration
//
// For all available config options and default values, see:
// http://karma-runner.github.io/0.10/config/configuration-file.html
module.exports = function (config) {
'use strict';
config.set({
autoWatch: true,
basePath: '',
browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome... | // Karma configuration
//
// For all available config options and default values, see:
// http://karma-runner.github.io/0.10/config/configuration-file.html
module.exports = function (config) {
'use strict';
config.set({
autoWatch: true,
basePath: '',
browsers: [process.env.TRAVIS ? 'Firefox' : 'Chrome... | Add underscore.js to test require | Add underscore.js to test require
| JavaScript | apache-2.0 | giovaneliberato/tablero,giovaneliberato/tablero,TWtablero/tablero,giovaneliberato/tablero,TWtablero/tablero,TWtablero/tablero,giovaneliberato/tablero,TWtablero/tablero |
32dc1fe382cda7b53c2bfacc02811849dc0a616b | test/node.js | test/node.js | var browserRequire = require('../require')
console.log(browserRequire.toString())
| var compiler = require('../compiler')
compiler.compileJS('require("socket.io/support/socket.io-client/socket.io")')
| Add test case for new npm/module-aware compiler | Add test case for new npm/module-aware compiler
| JavaScript | mit | marcuswestin/require,marcuswestin/require |
9491446d1b1d91e5c148fd6f943148c08de8de76 | spec/api_browser/filters/attribute_name_spec.js | spec/api_browser/filters/attribute_name_spec.js | describe('attributeName filter', function() {
var filter;
beforeEach(angular.mock.module('PraxisDocBrowser'));
beforeEach(inject(function(attributeNameFilter, $sce) {
filter = function(input) {
return $sce.getTrusted('html', attributeNameFilter(input));
};
}));
it('only modifies input with one... | describe('attributeName filter', function() {
var filter;
beforeEach(angular.mock.module('PraxisDocBrowser'));
beforeEach(inject(function(attributeNameFilter, $sce) {
filter = function(input) {
return $sce.getTrusted('html', attributeNameFilter(input));
};
}));
it('only modifies input with one... | Fix the broken js spec that started failing when sub-attributes were properly grayed out. | Fix the broken js spec that started failing when sub-attributes were properly grayed out.
Signed-off-by: Josep M. Blanquer <843d9a062ab1c6792ebebca5589f22ce86ac85ce@gmail.com> | JavaScript | mit | rightscale/praxis,praxis/praxis,rightscale/praxis,gampleman/praxis,gampleman/praxis,rightscale/praxis,gampleman/praxis |
cfea5e5c4a7a8f78382930a2445299f8ca9da50a | src/helper.js | src/helper.js | export function extend(obj) {
var arg, i, k;
for (i = 1; i < arguments.length; i++) {
arg = arguments[i];
for (k in arg) {
if (arg.hasOwnProperty(k)) {
obj[k] = arg[k];
}
}
}
return obj;
};
| export function extend(obj) {
var arg, i, k;
for (i = 1; i < arguments.length; i++) {
arg = arguments[i];
for (k in arg) {
if (arg.hasOwnProperty(k) && arg[k] !== undefined) {
obj[k] = arg[k];
}
}
}
return obj;
}
| Update extend to not carry over undefined values. | feat(extend): Update extend to not carry over undefined values.
| JavaScript | mit | chemoish/videojs-chapter-thumbnails,chemoish/videojs-chapter-thumbnails |
c3c8ec9ed9f153cc77fd5ae82b889c1b5bd1cf36 | js/foundation/foundation.offcanvas.js | js/foundation/foundation.offcanvas.js | ;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.offcanvas = {
name : 'offcanvas',
version : '5.0.3',
settings : {},
init : function (scope, method, options) {
this.events();
},
events : function () {
$(this.scope).off('.offcanvas')
.on('cl... | ;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.offcanvas = {
name : 'offcanvas',
version : '5.1.0',
settings : {},
init : function (scope, method, options) {
this.events();
},
events : function () {
var S = this.S;
S(this.scope).off('.offc... | Update Offcanvas to use S selector | Update Offcanvas to use S selector
| JavaScript | mit | mbarlock/foundation,aoimedia/foundation,dragthor/foundation-sites,dragthor/foundation-sites,jaylensoeur/foundation-sites-6,gnepal7/foundation,dimamedia/foundation-6-sites-simple-scss-and-js,karland/foundation-sites,joe-watkins/foundation,atmmarketing/foundation-sites,walbo/foundation,ysalmin/foundation,oller/foundation... |
cbe9f82b34c63c8ffdcb7f117fdb5ab3a268b575 | js/locales/bootstrap-datepicker.bg.js | js/locales/bootstrap-datepicker.bg.js | /**
* Bulgarian translation for bootstrap-datepicker
* Apostol Apostolov <apostol.s.apostolov@gmail.com>
*/
;(function($){
$.fn.datepicker.dates['bg'] = {
days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"],
daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "С... | /**
* Bulgarian translation for bootstrap-datepicker
* Apostol Apostolov <apostol.s.apostolov@gmail.com>
*/
;(function($){
$.fn.datepicker.dates['bg'] = {
days: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота", "Неделя"],
daysShort: ["Нед", "Пон", "Вто", "Сря", "Чет", "Пет", "С... | Add 'today' to bulgarian locale | Add 'today' to bulgarian locale
| JavaScript | apache-2.0 | kiwiupover/bootstrap-datepicker,dswitzer/bootstrap-datepicker,vsn4ik/bootstrap-datepicker,i-am-kenny/bootstrap-datepicker,champierre/bootstrap-datepicker,nilbus/bootstrap-datepicker,dswitzer/bootstrap-datepicker,Youraiseme/bootstrap-datepicker,yangyichen/bootstrap-datepicker,Habitissimo/bootstrap-datepicker,hebbet/boot... |
dfea4618f46b69c37df36a27de3e4d1327c7203f | app/components/ConceptList/index.js | app/components/ConceptList/index.js | import './index.css';
import React, { PropTypes } from 'react';
import HashLink from './../HashLink';
import ConceptTile from './../ConceptTile';
import ConceptDragSource from '../ConceptDragSource';
import Padding from '../Padding';
const ConceptList = ({ concepts, concept, dispatch }) =>
<ul className="List">
... | import './index.css';
import React, { PropTypes } from 'react';
import HashLink from './../HashLink';
import ConceptTile from './../ConceptTile';
import ConceptDragSource from '../ConceptDragSource';
import Padding from '../Padding';
const ConceptList = ({ concepts, concept, dispatch }) =>
<ul className="List">
... | Remove link wrapper around drag source - Fixes drag-drop bug in FF | Remove link wrapper around drag source - Fixes drag-drop bug in FF
https://github.com/gaearon/react-dnd/issues/120#issuecomment-81602875
| JavaScript | mit | transparantnederland/relationizer,waagsociety/tnl-relationizer,transparantnederland/browser,waagsociety/tnl-relationizer,transparantnederland/browser,transparantnederland/relationizer |
8199d30354e83690343e4c779073de7dee523842 | app/scripts/directives/login-box.js | app/scripts/directives/login-box.js | 'use strict';
(function() {
angular.module('ncsaas')
.directive('loginbox', function($window) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
var winHeight = $window.innerHeight;
element.css('height', winHeight - 100 + 'px');
}
};
})
... | 'use strict';
(function() {
angular.module('ncsaas')
.directive('loginboxcontext', function($window) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
var elHeight = element[0].offsetHeight;
element.css('margin-top', -elHeight / 2 + 'px');
}
... | Change directive loginboxcontext for vertical aligne login blovk. Remove directive loginbox. | Change directive loginboxcontext for vertical aligne login blovk. Remove directive loginbox.
– saas-239
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport |
4c38d0fcc5f7eb620ca052f02e0db98ed81b0724 | lib/filter/mappingAssignee.js | lib/filter/mappingAssignee.js | // MRのassignee_nameが既知の場合には、チャットワークの通知先IDを設定します。
export default function(req, res, next) {
if (req.objectKind === 'merge_request') {
if (req.body.object_attributes.assignee_name === 'shigeru.nakajima') {
req.body.object_attributes.assignee_chatwark_id = '903097'
}
}
next()
}
| const map = new Map([
['ai.yuichi', '903099'],
['kurubushionline', '933045'],
['masaomi.tsuge', '903098'],
['shigeru.nakajima', '903097'],
['yusuke.matsuda', '903099']
])
// MRのassignee_nameが既知の場合には、チャットワークの通知先IDを設定します。
export default function(req, res, next) {
if (req.objectKind === 'merge_request') {
... | Add target members to ask review | Add target members to ask review
| JavaScript | mit | luxiar/syamo,ledsun/syamo,luxiar/syamo,ledsun/syamo |
db403e516d5583f9cd5dbe9e3921f1c369f25d2b | test/event.js | test/event.js | var Chrome = require('../');
var assert = require('assert');
describe('registering event', function () {
describe('"event"', function () {
it('should give the raw message', function (done) {
Chrome(function (chrome) {
chrome.once('event', function (message) {
... | var Chrome = require('../');
var assert = require('assert');
describe('registering event', function () {
describe('"event"', function () {
it('should give the raw message', function (done) {
Chrome(function (chrome) {
chrome.once('event', function (message) {
... | Fix race condition in test | Fix race condition in test
Registering an event with the shorthand syntax behaves like `.on` and not like
`.once` so in this case, if more than one request *will be sent* by the "New
Tab" of Chrome then the Mocha's `done()` function gets called twice causing an
error.
This has been hidden until 85409d3a4633ddb928c64f... | JavaScript | mit | cyrus-and/chrome-remote-interface,cyrus-and/chrome-remote-interface |
7ac46ed8e33285064d1a96989e55ceb365928542 | lib/controllers/actions/login.js | lib/controllers/actions/login.js | 'use strict';
var method = require('../../waterlock-ldap-auth');
var ldap = method.ldap;
var connection = method.connection;
/**
* Login action
*/
module.exports = function(req, res) {
var params = req.params.all();
if (typeof params.username === 'undefined' || typeof params.password === 'undefined') {
... | 'use strict';
var method = require('../../waterlock-ldap-auth');
var ldap = method.ldap;
var connection = method.connection;
/**
* Login action
*/
module.exports = function(req, res) {
var params = req.params.all();
if (typeof params.username === 'undefined' || typeof params.password === 'undefined') {
... | Fix creation of Auth instance and pass entryUUID to it. | Fix creation of Auth instance and pass entryUUID to it.
| JavaScript | mit | OpenServicesEU/waterlock-ldap-auth,waterlock/waterlock-ldap-auth,OpenServicesEU/waterlock-ldap-auth,waterlock/waterlock-ldap-auth,fladi/waterlock-ldap-auth,fladi/waterlock-ldap-auth,corycollier/waterlock-multiple-ldap-auth,corycollier/waterlock-multiple-ldap-auth |
b0888069daf80486d38944063e4661a362d29d7c | tests/test.js | tests/test.js | //I hear you like to run node in your node, so I'm testing node using node
var spawn = require('spawn-cmd').spawn,
testProcess = spawn('node ./src/index.js < ./tests/eval.js'),
assert = require('assert');
testProcess.stdout.on('data', function (data) {
assert.equal(data, 'This is only a test');
});
... | //I hear you like to run node in your node, so I'm testing node using node
var spawn = require('spawn-cmd').spawn,
testProcess = spawn('node ./src/index.js < ./tests/eval.js'),
assert = require('assert');
console.log("Modules required and process spawned");
testProcess.stdout.on('data', function (data)... | Test still failing on TravisCI | Test still failing on TravisCI
| JavaScript | mit | chad-autry/stdin-eval-stdout |
9ef7d006c9c882043d2c6f6e27a62d6d26198dac | tests/png.js | tests/png.js | QUnit.module("png");
QUnit.test("png-image-element format returns an image", function(assert) {
var done = assert.async();
var image = Viz("digraph { a -> b; }", { format: "png-image-element" });
assert.ok(image instanceof Image, "image should be an Image");
image.onload = function() {
done();
}
... | QUnit.module("png");
QUnit.test("png-image-element format returns an image", function(assert) {
var done = assert.async();
var image = Viz("digraph { a -> b; }", { format: "png-image-element" });
assert.ok(image instanceof Image, "image should be an Image");
image.onload = function() {
done();
}
... | Add test for scale option. | Add test for scale option.
| JavaScript | mit | mdaines/viz.js,mdaines/viz.js,mdaines/viz.js,mdaines/viz.js |
1282f064f119e2d1b27dc5ec84dd952cb2201ae5 | js/agency.js | js/agency.js | /*!
* Start Bootstrap - Agency Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
// jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {
$('a.page-scroll').bind('click', functi... | /*!
* Start Bootstrap - Agency Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
function hideOnRefresh() {
console.log($(".navbar").offset().top);
if ($(".navbar").offset().top > 50) {
$(".na... | Fix to collapse navbar on page reloads | Fix to collapse navbar on page reloads
| JavaScript | apache-2.0 | jamlamberti/startbootstrap-agency,jamlamberti/startbootstrap-agency,jamlamberti/startbootstrap-agency |
f0ab55e742304db3f1e23a30d73108cd2ac88aee | src/app/lib/ipc_handler.js | src/app/lib/ipc_handler.js | const { ipcMain } = require('electron');
function isPromise(object) {
return object.then && typeof(object.then) === 'function';
}
function isGenerator(object) {
return object.next && typeof(object.next) === 'function';
}
class IPCHandler {
handle(event, funct, binding = this) {
const localFunc = ... | const { ipcMain } = require('electron');
function isPromise(object) {
return object.then && typeof(object.then) === 'function';
}
function isGenerator(object) {
return object[Symbol.iterator] && typeof(object[Symbol.iterator]) === 'function';
}
class IPCHandler {
handle(event, funct, binding = this) {
... | Fix check for generator ipc response | Fix check for generator ipc response
Since we're actually using an for..of loop it doesn't matter that there's a 'next()' function on the object. What really matters is a function for the iterator symbol. | JavaScript | mit | kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop,kumpelblase2/proxtop |
6834d216400f61c3682ee3974977e73f2d0da0b7 | src/withStyles.js | src/withStyles.js | /**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { Component, PropTypes } from 'react';
function withStyles(Co... | /**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { Component, PropTypes } from 'react';
function withStyles(Co... | Fix warning in console, to display ComposedComponent name, rather `Styles` name. | Fix warning in console, to display ComposedComponent name, rather `Styles` name. | JavaScript | mit | 5punk/isomorphic-style-loader,kriasoft/isomorphic-style-loader |
dceb11ea80ca2464ea4907737fa91123857d5eb6 | js/script.js | js/script.js | $(function() {
/* Vars */
var TIME = 500;
var pics = $('.ref-pic');
var refs = $('.ref-block');
/* Handlers */
var refHandler = function(event) {
var $this = $(this);
var ACT = 'active';
var i = $this.index();
if (! $this.hasClass( ACT )) {
pics.removeClass( ACT );
$this.addClass( ACT );
... | $(function() {
/* Vars */
var TIME = 500;
var pics = $('.ref-pic');
var refs = $('.ref-block');
var navItem = $('.nav-item');
/* Handlers */
var menuItemHandler = function(event) {
event.preventDefault();
hash = $(this).children('a')[0].hash;
$('html').animate(function() {
offsetY = $(hash).posit... | Add temporary scroll animation function | Add temporary scroll animation function
| JavaScript | mit | albertoblaz/albertoblaz.github.io,albertoblaz/albertoblaz.github.io |
b2c454861de9dbada3ee60ea041637165538488a | src/components/NotFound.js | src/components/NotFound.js | //@flow
/*******************************************************************************
* Imports
*******************************************************************************/
import React from 'react'
import { Markdown, Cr } from 'tldr/components/Markdown'
import Link from 'tldr/components/Link'
import Tldr f... | //@flow
/*******************************************************************************
* Imports
*******************************************************************************/
import React from 'react'
import { Markdown, Cr } from 'tldr/components/Markdown'
import Link from 'tldr/components/Link'
import Tldr f... | Update not found page to fix command request link. | Update not found page to fix command request link.
The new command label seems to have changed recently. This commit fixes the broken link. | JavaScript | mit | ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx |
07b7bdfcff71eee89363e0e8b67ef080148a204f | public/audio.js | public/audio.js | var audio = new AudioContext || new webkitAudioContext;
| var audio = new AudioContext || new webkitAudioContext;
function playRadarPing() {
var osc = audio.createOscillator();
var gain = audio.createGain();
var time = audio.currentTime;
gain.connect(audio.destination);
osc.connect(gain);
osc.type = 'triangle';
gain.gain.setValueAtTime(0.2, time);
gain.gain... | Add function to play radar ping sound | Add function to play radar ping sound
| JavaScript | mit | peternatewood/socket-battle,peternatewood/socket-battle |
1fe6e0891a6b50cea9df5399812cdbf3daa88604 | modules/recognizer/recognizer.js | modules/recognizer/recognizer.js | Module.register("recognizer",{
start() {
this.display = false;
this.image = "";
console.log("Recognizer started");
this.sendSocketNotification("RECOGNIZER_STARTUP");
return;
},
socketNotificationReceived: function(notification) {
console.log("Recognizer recieved a notification: " + notif... | Module.register("recognizer",{
start() {
this.display = false;
this.image = "";
console.log("Recognizer started");
this.sendSocketNotification("RECOGNIZER_STARTUP");
return;
},
socketNotificationReceived: function(notification) {
console.log("Recognizer recieved a notification: " + notif... | Add picture display after taken on mirror, need to set a timer for that | Add picture display after taken on mirror, need to set a timer for that
| JavaScript | mit | OniDotun123/MirrorMirror,OniDotun123/MirrorMirror,OniDotun123/MirrorMirror |
3bc3c822a7aff47e57423a9ce36e8b5d6b6eeacd | static/js/main.js | static/js/main.js | $(document).ready(() => {
const restaurants = ['taste', 'variantti', 'kanttiini', 'blancco', 'factory']
const days = [
{name: "Maanantai"},
{name: "Tiistai"},
{name: "Keskiviikko"},
{name: "Torstai"},
{name: "Perjantai"},
]
restaurants.forEach((r) => {
$.ajax({
url: `/crawled/${r}.ht... | $(document).ready(() => {
const restaurants = ['taste', 'variantti', 'kanttiini', 'blancco', 'factory']
const days = [
{name: "Maanantai"},
{name: "Tiistai"},
{name: "Keskiviikko"},
{name: "Torstai"},
{name: "Perjantai"},
]
restaurants.forEach((r) => {
$.ajax({
url: `/crawled/${r}.ht... | Put inspirational images on the bottom on xs devices | [Dev] Put inspirational images on the bottom on xs devices
| JavaScript | mit | sampohaavisto/pitskulounas,sampohaavisto/pitskulounas,sampohaavisto/pitskulounas |
65160150bb563a5db8757c7bc2966dd38eff4dfb | src/e2e-tests/basic.e2e.js | src/e2e-tests/basic.e2e.js | var assert = require('assert');
describe("Basic Test", function(){
it("Loads the basic demo page and sends values to server", function(){
browser.url('http://localhost:7888/src/e2e-tests/basic-demo-page?auto-activate-glasswing')
browser.waitUntil(function () {
var a = browser.execute(fu... | var assert = require('assert');
describe("Basic Test", function(){
it("Loads the basic demo page and sends values to server", function(){
browser.url('http://localhost:7888/src/e2e-tests/basic-demo-page?auto-activate-glasswing')
browser.waitUntil(function () {
var a = browser.execute(fu... | Check file listing loads in E2E test. | Check file listing loads in E2E test.
| JavaScript | mit | mattzeunert/glasswing,mattzeunert/glasswing,mattzeunert/glasswing |
bdef84e429a948ac336438a20d539a10de19b030 | config/policies.js | config/policies.js | /**
* Policies are simply Express middleware functions which run before your controllers.
* You can apply one or more policies for a given controller or action.
*
* Any policy file (e.g. `authenticated.js`) can be dropped into the `/policies` folder,
* at which point it can be accessed below by its filename, minus... | /**
* Policies are simply Express middleware functions which run before your controllers.
* You can apply one or more policies for a given controller or action.
*
* Any policy file (e.g. `authenticated.js`) can be dropped into the `/policies` folder,
* at which point it can be accessed below by its filename, minus... | Add 'authenticated' policy to dashboard action. | Add 'authenticated' policy to dashboard action.
Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com> | JavaScript | mit | maxfierke/WaterCooler |
f6ad51415098d625893243fbb9bc4dea65127124 | cli/src/utils/fs.js | cli/src/utils/fs.js | import Promise from 'bluebird'
import childProcess from 'child_process'
import logger from '../logger'
Promise.promisifyAll(childProcess)
const log = logger({
component: 'FS'
})
// Hides a directory on Windows.
// Errors are logged, not thrown.
export async function hideOnWindows (path: string): Promise<void> {
... | import Promise from 'bluebird'
import childProcess from 'child_process'
import logger from '../logger'
Promise.promisifyAll(childProcess)
const log = logger({
component: 'FS'
})
// Hides a directory on Windows.
// Errors are logged, not thrown.
export async function hideOnWindows (path: string): Promise<void> {
... | Hide dirs on Windows only | Hide dirs on Windows only
| JavaScript | agpl-3.0 | cozy-labs/cozy-desktop,nono/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,cozy-labs/cozy-desktop,nono/cozy-desktop,nono/cozy-desktop,nono/cozy-desktop |
470fbbe32934834e8b5cc983e021fc3e7f7c9594 | test/core_spec.js | test/core_spec.js | import {List} from 'immutable';
import {expect} from 'chai';
import {createPlayer} from '../src/core';
describe('createPlayer', () => {
it('sets name properly', () => {
const name = 'someName';
const player = createPlayer(name);
expect(player.name).to.equal(name);
... | import {List} from 'immutable';
import {expect} from 'chai';
import {createPlayer} from '../src/core';
describe('createPlayer', () => {
it('sets name properly', () => {
const name = 'someName';
const player = createPlayer(name);
expect(player.name).to.equal(name);
... | Simplify assertion from to.not.be.empty to to.exist | Simplify assertion from to.not.be.empty to to.exist
| JavaScript | apache-2.0 | evanepio/NodejsWarOServer |
9ecbd6caa7a51141fa790ef7ab8a94b94f6e6492 | app/utils/compare-last-opened.js | app/utils/compare-last-opened.js | export default function(a, b) {
const alast = a.lastOpened;
const blast = b.lastOpened;
if (alast < blast) {
return 1;
} else if (alast > blast) {
return -1;
}
return 0;
}
| export default function(a, b) {
const alast = a.lastOpened || a.id;
const blast = b.lastOpened || b.id;
if (alast < blast) {
return 1;
} else if (alast > blast) {
return -1;
}
return 0;
}
| Fix bug with sort albums | Fix bug with sort albums
| JavaScript | mit | DenQ/electron-react-lex,DenQ/electron-react-lex |
53ade6629935c05653eb9dc35237597602ef061d | gulp/tasks/browserSync.js | gulp/tasks/browserSync.js | 'use strict';
import config from '../config';
import url from 'url';
import browserSync from 'browser-sync';
import gulp from 'gulp';
gulp.task('browserSync', function() {
const DEFAULT_FILE = 'index.html';
const ASSET_EXTENSIONS = ['js', 'css', 'png', 'jpg', 'jpeg', 'gif'];
browserSync.in... | 'use strict';
import config from '../config';
import url from 'url';
import browserSync from 'browser-sync';
import gulp from 'gulp';
gulp.task('browserSync', function() {
const DEFAULT_FILE = 'index.html';
const ASSET_EXTENSION_REGEX = /\b(?!\?)\.(js|css|png|jpe?g|gif|svg|eot|otf|ttc|ttf|wof... | Fix not being able to serve fonts and other assets using query string cache busters. | Fix not being able to serve fonts and other assets using query string cache busters.
| JavaScript | mit | StrikeForceZero/angularjs-ionic-gulp-browserify-boilerplate,tungptvn/tungpts-ng-blog,adamcolejenkins/dotcom,henrymyers/quotes,cshaver/angularjs-gulp-browserify-boilerplate,dnaloco/digitala,cshaver/angularjs-gulp-browserify-boilerplate,dnaloco/digitala,Deftunk/TestCircleCi,StrikeForceZero/angularjs-ionic-gulp-browserify... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.