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
b3bbb6af0195464c10d7ec6c019c0b6bb911a244
lib/cartodb/backends/analysis-status.js
lib/cartodb/backends/analysis-status.js
var PSQL = require('cartodb-psql'); function AnalysisStatusBackend() { } module.exports = AnalysisStatusBackend; AnalysisStatusBackend.prototype.getNodeStatus = function (params, callback) { var nodeId = params.nodeId; var statusQuery = 'SELECT node_id, status, updated_at FROM cdb_analysis_catalog where no...
var PSQL = require('cartodb-psql'); function AnalysisStatusBackend() { } module.exports = AnalysisStatusBackend; AnalysisStatusBackend.prototype.getNodeStatus = function (params, callback) { var nodeId = params.nodeId; var statusQuery = [ 'SELECT node_id, status, updated_at, last_error_message as e...
Include error message in node status endpoint
Include error message in node status endpoint
JavaScript
bsd-3-clause
CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb
101037229d5648ea91e17202043bdf7748157967
app/routes/categories.server.routes.js
app/routes/categories.server.routes.js
'use strict'; module.exports = function(app) { app.route('/categories') .get(function (request, response) { response.json([ { name: 'Beverages' }, { name: 'Condiments' } ]); }); };
'use strict'; module.exports = function(app) { var categories = require('../../app/controllers/categories.server.controller'); // route for GET categories app.route('/categories') .get(categories.list); };
Modify route for Categories GET command.
Modify route for Categories GET command.
JavaScript
mit
michalzagrodzki/MEAN-exercise-second,michalzagrodzki/MEAN-exercise-second,michalzagrodzki/MEAN-exercise-second
af73654be358b0395f4250c999d74eaedd0b2118
public/js/collections/c_orders.js
public/js/collections/c_orders.js
var OrderModel = require('../models/m_order'); var OrderCollection = Backbone.Collection.extend({ model: OrderModel, url: "/api/users/self/orders" }); module.exports = OrderCollection;
var OrderModel = require('../models/m_order'); var OrderCollection = Backbone.Collection.extend({ model: OrderModel, url: "/api/orders" }); module.exports = OrderCollection;
Change URL so it matches json-server
Change URL so it matches json-server
JavaScript
apache-2.0
neich/nodebb,neich/nodebb,neich/nodebb
15bf5b183c43ec13a192acce19104860c1549914
karma.conf.js
karma.conf.js
var webpack = require('webpack'); module.exports = function (config) { config.set({ browsers: [ 'PhantomJS' ], // use PhantomJS for now (@gordyd - I'm using a VM) singleRun: true, frameworks: [ 'mocha', 'sinon' ], // Mocha is our testing framework of choice files: [ 'tests.webpack.js' //just lo...
var webpack = require('webpack'); module.exports = function (config) { config.set({ browsers: [ 'PhantomJS' ], // Use PhantomJS for now (@gordyd - I'm using a VM) singleRun: true, frameworks: [ 'mocha', 'sinon' ], // Mocha is our testing framework of choice files: [ 'tests.webpack.js' // We're ...
Speed up webpack process by removing sourcemap from test process - needs more work here
Speed up webpack process by removing sourcemap from test process - needs more work here
JavaScript
bsd-2-clause
hichameyessou/blip,tidepool-org/blip,hichameyessou/blip,hichameyessou/blip,tidepool-org/blip,tidepool-org/blip
2e95a2fa7d30d2a23ae3c7119e6250ec3733fd38
src/pusher-licence.js
src/pusher-licence.js
/*! * Pusher JavaScript Library v<%= VERSION %> * http://pusherapp.com/ * * Copyright 2010, New Bamboo * Released under the MIT licence. */
/*! * Pusher JavaScript Library v<%= VERSION %> * http://pusherapp.com/ * * Copyright 2010, New Bamboo * Released under the MIT licence. */ /* * This library contains code with the following licences: * * web_socket.js: * * Copyright: Hiroshi Ichikawa <http://gimite.net/en/> * License: New BSD License ...
Include licences from included libraries in final minified file.
Include licences from included libraries in final minified file.
JavaScript
mit
araneo/rocket,araneo/rocket
d2359630a19c851921d513feae71fd6fefbc3160
runtime.js
runtime.js
require("meteor-babel-helpers"); var Module = module.constructor; require("reify/lib/runtime").enable(Module.prototype); require("meteor-promise").makeCompatible( global.Promise = global.Promise || require("promise/lib/es6-extensions"), require("fibers") ); // If Promise.asyncApply is defined, use it to wrap...
require("meteor-babel-helpers"); var Module = module.constructor; // The Reify runtime now requires a working implementation of // module.resolve, which should return a canonical absolute module // identifier string, like require.resolve(id). Module.prototype.resolve = function (id) { return Module._resolveFilename...
Implement Module.prototype.resolve for Reify's new module.link API.
Implement Module.prototype.resolve for Reify's new module.link API.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
914ada8b755f1f97998ea2027814f5a50a4cb504
rollup.config.js
rollup.config.js
import resolve from "rollup-plugin-node-resolve"; import commonjs from "rollup-plugin-commonjs"; export default { input: "src/index.js", output: { file: "dist/milsymbol.development.js", format: "umd" }, name: "ms", plugins: [resolve(), commonjs()] };
import resolve from "rollup-plugin-node-resolve"; import commonjs from "rollup-plugin-commonjs"; export default { input: "src/index.js", output: { file: "dist/milsymbol.development.js", format: "umd", amd: { id: "milsymbol" } }, name: "ms", plugins: [resolve(), commonjs()] };
Make sure the AMD module is named "milsymbol"
Make sure the AMD module is named "milsymbol" For backward compability
JavaScript
mit
spatialillusions/milsymbol
b5488589f7e67273b967358e9ecabda647a1f5ee
scripts/build.js
scripts/build.js
#!/usr/bin/env node var fs = require('fs-extra'); var async = require('async'); var exec = require('child_process').exec; var colors = require('colors'); function doExec(text) { return function (done) { exec(text, function (err, stdout, stderr) { if (stdout) console.log(stdout.grey); ...
#!/usr/bin/env node var fs = require('fs-extra'); var async = require('async'); var exec = require('child_process').exec; var colors = require('colors'); function doExec(text) { return function (done) { exec(text, function (err, stdout, stderr) { if (stdout) console.log(stdout.grey); ...
Add social sharing plugin and remove contacts and SMS plugins
Add social sharing plugin and remove contacts and SMS plugins
JavaScript
mpl-2.0
mozilla/webmaker-app-cordova,mozilla/webmaker-app-cordova
8b0c358d7f79348837f2b118b03383f484e4d27a
web/src/main/javascript/expression-atlas-differential-expression/src/differentialRenderer.js
web/src/main/javascript/expression-atlas-differential-expression/src/differentialRenderer.js
const React = require('react'); const ReactDOM = require('react-dom'); //*------------------------------------------------------------------* const DifferentialRouter = require('./DifferentialRouter.jsx'); //*------------------------------------------------------------------* module.exports = function ({atlasHostUr...
const React = require('react'); const ReactDOM = require('react-dom'); //*------------------------------------------------------------------* const DifferentialRouter = require('./DifferentialRouter.jsx'); //*------------------------------------------------------------------* module.exports = function ({atlasHostUr...
Use the current protocol and host if none is specified
Use the current protocol and host if none is specified
JavaScript
apache-2.0
gxa/atlas,gxa/atlas,gxa/atlas,gxa/atlas,gxa/atlas
31fc439c5df65318caa60ee9a65e13a98fbe72fa
website/src/app/project/processes/process/create/components/processing-settings.directive.js
website/src/app/project/processes/process/create/components/processing-settings.directive.js
angular.module('materialscommons').directive('processSettings', processSettingsDirective); function processSettingsDirective() { return { restrict: 'E', scope: { settings: '=', taskId: '=', templateId: '=', attribute: '=' }, controller:...
angular.module('materialscommons').directive('processSettings', processSettingsDirective); function processSettingsDirective() { return { restrict: 'E', scope: { settings: '=', taskId: '=', templateId: '=', attribute: '=' }, controller:...
Add debug to handle date case (need to test).
Add debug to handle date case (need to test).
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
d00110150fe5e1944d24485ca704bee4659eb846
test/e2e/home-page.js
test/e2e/home-page.js
var po = require('./page-objects'); var ptor = protractor.getInstance(); describe('lean coffee', function() { var global = new po.GlobalFunction(); describe('home page', function(){ var homePage = new po.HomePage(); it('should display the home page', function() { homePage.get(); expect($('.we...
var po = require('./page-objects'); var ptor = protractor.getInstance(); describe('lean coffee', function() { var global = new po.GlobalFunction(); describe('home page', function(){ var homePage = new po.HomePage(); it('should display the home page', function() { homePage.get(); expect($('.we...
Update expects for home page
Update expects for home page
JavaScript
mit
Ellisande/kanbonsai,Ellisande/kanbonsai
77601870e0b12d04cfd0b9fcddf409b408d201cb
js/forum/src/components/terminal-post.js
js/forum/src/components/terminal-post.js
import Component from 'flarum/component'; import humanTime from 'flarum/utils/human-time'; import username from 'flarum/helpers/username'; /** Displays information about a the first or last post in a discussion. @prop discussion {Discussion} The discussion to display the post for @prop lastPost {Boolean} Whethe...
import Component from 'flarum/component'; import humanTime from 'flarum/helpers/human-time'; import username from 'flarum/helpers/username'; /** Displays information about a the first or last post in a discussion. @prop discussion {Discussion} The discussion to display the post for @prop lastPost {Boolean} Whet...
Clean up, use time helper rather than util
Clean up, use time helper rather than util
JavaScript
mit
Albert221/core,kirkbushell/core,datitisev/core,malayladu/core,dungphanxuan/core,datitisev/core,Luceos/core,Onyx47/core,datitisev/core,dungphanxuan/core,kirkbushell/core,flarum/core,malayladu/core,flarum/core,liukaijv/core,Onyx47/core,zaksoup/core,renyuneyun/core,dungphanxuan/core,kirkbushell/core,jubianchi/core,utkarsh...
575efba21d7f4078cda0f3817af5689ca542b909
template/build/webpack.test.conf.js
template/build/webpack.test.conf.js
// This is the webpack config used for unit tests. var utils = require('./utils') var webpack = require('webpack') var merge = require('webpack-merge') var baseConfig = require('./webpack.base.conf') var webpackConfig = merge(baseConfig, { // use inline sourcemap for karma-sourcemap-loader module: { rules: ut...
// This is the webpack config used for unit tests. var utils = require('./utils') var webpack = require('webpack') var merge = require('webpack-merge') var baseConfig = require('./webpack.base.conf') var webpackConfig = merge(baseConfig, { // use inline sourcemap for karma-sourcemap-loader module: { rules: ut...
Fix typescript stacktraces using webpack sourcemaps
Fix typescript stacktraces using webpack sourcemaps
JavaScript
mit
Toilal/vue-webpack-template,Toilal/vue-webpack-template,Toilal/vue-webpack-template,Toilal/vue-webpack-template
1cd24173f8c7262a93cc8bbbe91a679229b8b516
server/server.js
server/server.js
var env = require('./../env/env-config'); var util = require('./lib/utility.js') var express = require('express'); var passport = require('passport'); var app = express(); // Initial Configuration, Static Assets, & View Engine Configuration require('./config/initialize.js')(app, express); // Authentication Middlewar...
var env = require('./../env/env-config'); var util = require('./lib/utility.js') var express = require('express'); var passport = require('passport'); var app = express(); // Initial Configuration, Static Assets, & View Engine Configuration require('./config/initialize.js')(app, express); // Authentication Middlewar...
Add hint that authentication check is currently commented out
Add hint that authentication check is currently commented out
JavaScript
mit
chkakaja/sentimize,formidable-coffee/masterfully,chkakaja/sentimize,formidable-coffee/masterfully
c47afc38ef86ae00a1f46ce08bbfa6f18f3ab9b2
utils.js
utils.js
/* * Copyright 2011 Intel Corporation. * * This program is licensed under the terms and conditions of the * Apache License, version 2.0. The full text of the Apache License is at * http://www.apache.org/licenses/LICENSE-2.0 */ function getCallStatusText (agent) { switch(agent.callStatus) { case CallAge...
/* * Copyright 2011 Intel Corporation. * * This program is licensed under the terms and conditions of the * Apache License, version 2.0. The full text of the Apache License is at * http://www.apache.org/licenses/LICENSE-2.0 */ function getCallStatusText (agent) { if (agent == undefined) { return ""...
Remove warning when a call agent is not present
Remove warning when a call agent is not present
JavaScript
apache-2.0
meego-tablet-ux/meego-app-im,meego-tablet-ux/meego-app-im
e0490ccd8de93deb1af0a410dcf89190f5b609f9
js/explore.js
js/explore.js
// take input string // create empty output string // remove last letter of input string // add that letter to empty string // keep doing this until the input string is empty // return output string function reverse(str) { var newString = "" for (var i = str.length; i > 0, i--) newString += str[i] }
// take input string // create empty output string // get the last letter of the input string // add that letter to empty string // keep doing this until we've gone through the entire input string // return output string function reverse(str) { var newString = ""; for (var i = str.length-1; i >= 0; i--) { n...
Add driver code to test function
Add driver code to test function
JavaScript
mit
elliedori/phase-0-tracks,elliedori/phase-0-tracks,elliedori/phase-0-tracks
466e2bc2a8defac8a75bab7c1c65854ff480c551
packages/vulcan-lib/lib/modules/intl.js
packages/vulcan-lib/lib/modules/intl.js
import SimpleSchema from 'simpl-schema'; /* Look for type name in a few different places Note: look into simplifying this */ export const isIntlField = fieldSchema => { const typeProperty = fieldSchema.type; let type; if (Array.isArray(typeProperty)) { type = typeProperty[0].type; } else { type = typ...
import SimpleSchema from 'simpl-schema'; import { Strings } from './strings'; /* Look for type name in a few different places Note: look into simplifying this */ export const isIntlField = fieldSchema => { const typeProperty = fieldSchema.type; let type; if (Array.isArray(typeProperty)) { type = typeProper...
Use function to get IntlString type
Use function to get IntlString type
JavaScript
mit
Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2
e9211409bec3ff15041f048bf2a00bfa2742a9ff
addon/lib/serializer.js
addon/lib/serializer.js
import DS from 'ember-data'; import { recordKey } from 'ember-gdrive/lib/util'; function serializeId(record, relationship) { if (!record) { return null; } if (relationship.options.polymorphic) { return { id: record.get('id'), type: recordKey(record) }; } else { return record.get('...
import DS from 'ember-data'; import { recordKey } from 'ember-gdrive/lib/util'; function serializeId(record, relationship) { if (!record) { return null; } if (relationship.options.polymorphic) { return { id: record.get('id'), type: recordKey(record) }; } else { return record.get('...
Remove superfluous fix in favor of the remaining better one
Remove superfluous fix in favor of the remaining better one
JavaScript
mit
coderly/ember-gdrive,coderly/ember-gdrive
c8728e67698b49d3ead29d1d09824af5a218df79
server/sessions_users/sessions_users.js
server/sessions_users/sessions_users.js
var db = require( '../config/db' ); var helpers = require( '../config/helpers' ); var Sequelize = require( 'sequelize' ); var User = require( '../users/users' ); var Session = require( '../sessions/sessions' ); var Session_User = db.define( 'sessions_users', { user_id: { type: Sequelize.INTEGER, unique: 'sess...
var db = require( '../config/db' ); var helpers = require( '../config/helpers' ); var Sequelize = require( 'sequelize' ); var User = require( '../users/users' ); var Session = require( '../sessions/sessions' ); var Session_User = db.define( 'sessions_users', { user_id: { type: Sequelize.INTEGER, unique: 'sess...
Refactor stub into real query
Refactor stub into real query
JavaScript
mpl-2.0
RubiginousChanticleer/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,CantillatingZygote/rubiginouschanticleer,RubiginousChanticleer/rubiginouschanticleer
e233237b23b5c76d8f36fbc4abeed35539307575
karma.conf.js
karma.conf.js
var webpack = require('webpack'); module.exports = function (config) { config.set({ browsers: [ 'PhantomJS' ], // use PhantomJS for now (@gordyd - I'm using a VM) singleRun: true, frameworks: [ 'mocha', 'sinon' ], // Mocha is our testing framework of choice files: [ 'tests.webpack.js' //just lo...
var webpack = require('webpack'); module.exports = function (config) { config.set({ browsers: [ 'PhantomJS' ], // use PhantomJS for now (@gordyd - I'm using a VM) singleRun: true, frameworks: [ 'mocha', 'sinon' ], // Mocha is our testing framework of choice files: [ 'tests.webpack.js' //just lo...
Use mocha style reporting for tests
Use mocha style reporting for tests
JavaScript
bsd-2-clause
hichameyessou/blip,tidepool-org/blip,hichameyessou/blip,tidepool-org/blip,hichameyessou/blip,tidepool-org/blip
c29048a94caf001b14d4a7bfe10c9f75a9eff45b
lib/Action.js
lib/Action.js
import App from "./App"; export default class Action { dispatchAction(...args) { return App.dispatchAction(...args); } get logger() { return App.logger(this.ns); } get events() { return App.events; } publish(ev, ...args) { return App.events.publish(`${this...
import App from "./App"; export default class Action { dispatchAction(...args) { return App.dispatchAction(...args); } get logger() { return App.logger(this.ns); } get events() { return App.events; } publish(ev, ...args) { return App.events.publish(`${this...
Fix `ns` decorator. Don't return a value.
Fix `ns` decorator. Don't return a value.
JavaScript
mit
pbouzakis/spak
afa9dea9fff71c7e81b824b28b1ad503ab4067b9
server/config/environment/test.js
server/config/environment/test.js
'use strict'; // Test specific configuration // =========================== module.exports = { // MongoDB connection options mongo: { uri: 'mongodb://localhost/workspace-test' } };
'use strict'; // Test specific configuration // =========================== module.exports = { // MongoDB connection options mongo: { uri: 'mongodb://deals:offers@staff.mongohq.com:10020/deals' } };
Configure mongodb uri to compose.io service
Configure mongodb uri to compose.io service
JavaScript
mit
santail/diilid.ee-public,santail/diilid.ee-public,santail/diilid.ee-public
fae83bb29e85ccbe9806d767ea6a40eed3bc24f0
extension/content.js
extension/content.js
var latitude = null; var longitude = null; var demo = document.getElementById("demo"); function setDestinationCordinates() { var metas = document.getElementsByTagName('meta'); for (i=0; i<metas.length; i++) { if (metas[i].getAttribute("property") == "zomatocom:location:latitude") { ...
var latitude = null; var longitude = null; function getUserLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function showPosition(position) { var myLat = positi...
Revert "For getCurrentPosition(), use chrome.runtime.sendMessage() as the callback function; this avoids the problem of undefined lat/longitude because getCurrentPosition did not fetch values before chrome.runtime.sendMessage() fires"
Revert "For getCurrentPosition(), use chrome.runtime.sendMessage() as the callback function; this avoids the problem of undefined lat/longitude because getCurrentPosition did not fetch values before chrome.runtime.sendMessage() fires" This reverts commit b893f4cb3b4c1665e2f4b0d7b92ca6e7ec299a24.
JavaScript
mit
Ola-Now/Ola-Now,Ola-Now/Ola-Now,Ola-Now/Ola-Now
523f880c97722ed412dcbd8e7e6816c4be1939f1
lib/bucket.js
lib/bucket.js
'use strict' var sorted = require('sorted-array-functions') var match = require('./match') var onlyRegex = require('./onlyRegex') function Bucket (parent) { this.data = [] this._algo = parent._algo this._isDeep = parent._isDeep this.magic = this._isDeep ? 0 : Number.MAX_SAFE_INTEGER } Bucket.prototype.add = ...
'use strict' var sorted = require('sorted-array-functions') var match = require('./match') var onlyRegex = require('./onlyRegex') function Bucket (parent) { this.data = [] this._algo = parent._algo this._isDeep = parent._isDeep this.magic = this._isDeep ? 0 : Number.MAX_SAFE_INTEGER } Bucket.prototype.add = ...
Call onlyRegex just once when removing
Call onlyRegex just once when removing
JavaScript
mit
mcollina/bloomrun
8a0ab7f3231c95567a690d0b0324c1bd38535242
packages/@sanity/cli/src/versionRanges.js
packages/@sanity/cli/src/versionRanges.js
export default { // Dependencies for a default Sanity installation core: { '@sanity/base': '^0.0.23', '@sanity/components': '^0.0.27', '@sanity/default-layout': '^0.0.4', '@sanity/default-login': '^0.0.2', '@sanity/desk-tool': '^0.1.9', 'react': '^15.3.0', 'react-dom': '^15.3.0' }, ...
export default { // Dependencies for a default Sanity installation core: { '@sanity/base': '^0.0.23', '@sanity/components': '^0.0.27', '@sanity/core': '^0.0.1', '@sanity/default-layout': '^0.0.4', '@sanity/default-login': '^0.0.2', '@sanity/desk-tool': '^0.1.9', 'react': '^15.3.0', '...
Include @sanity/core in bootstrapped packages
Include @sanity/core in bootstrapped packages
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
dd17a18c270b76e3bde6e8a704c0e4c08267685e
lib/server.js
lib/server.js
'use strict'; var moment = require('moment'); var restify = require('restify'); var mongoose = require('mongoose'); var Match = mongoose.model('match'); var server = restify.createServer(); server.get('/matches/:year', function(req, res) { }); server.get('/matches/:year/:week', function(req, res) { var year ...
'use strict'; var moment = require('moment'); var restify = require('restify'); var mongoose = require('mongoose'); var Match = mongoose.model('match'); var server = restify.createServer(); server.get('/matches/:year/:week', function(req, res) { var year = req.params.year; var week = req.params.w...
Remove unused '/matches/:year' API for now
Remove unused '/matches/:year' API for now
JavaScript
mit
tanelih/tgi-stats
d42fc4724480c281b65a21393e01d088fadc1bc3
src/isValid.js
src/isValid.js
export default function isValid(error) { }
export default function isValid(error) { if ( !Array.isArray(error) ) { return !error; } return error.reduce(( valid, errorValue ) => valid && !errorValue, true); }
Add functionality to allow for arrays of error values
Add functionality to allow for arrays of error values
JavaScript
mit
grahamlyus/redux-form,erikras/redux-form,holly-juan/redux-form,asaf/redux-form,erikras/redux-form,jimpick/redux-form,latentflip/redux-form,geminiyellow/redux-form,vincentfretin/redux-form,thomasguillory/redux-form,BBB/redux-form,mikekidder/redux-form,yoo2001818/redux-form
57d19db1675906a6569ef9ffa1d30bd2fccf1493
src/livereload-script-tag-injector.js
src/livereload-script-tag-injector.js
(() => { const isURLAvailable = url => { const req = new Request(url, { method: "HEAD", redirect: "follow" }); return fetch(req).then(resp => resp.ok).catch(() => false); }; const getHostname = () => { const u = new URL(document.URL); return `${u.protocol}//${u.hostname}`; }; ...
const isURLAvailable = url => { const req = new Request(url, { method: "HEAD", redirect: "follow" }); return fetch(req).then(resp => resp.ok).catch(() => false); }; const getHostname = () => { const u = new URL(document.URL); return `${u.protocol}//${u.hostname}`; }; const reportCouldNotConnect = u...
Remove closure wrapping around script injector
Remove closure wrapping around script injector It turns out that content scripts and JS in the document cannot affect each others state.
JavaScript
mit
orva/livereloaded,orva/livereloaded
b37209745e9a26ac7a8c5870fcfb4445a1630321
bin/messages/message.js
bin/messages/message.js
var message_states = Object.freeze( { MESSAGE_FAILED: -1, MESSAGE_SENT: 1, MESSAGE_DELIVERED_SERVICE: 2, MESSAGE_DELIVERED_USER: 3, MESSAGE_READ: 4, MESSAGE_REPLIED: 5 } ) var Message = { body: null, servicechain: null } module.exports = {message_states, message}
var message_states = Object.freeze( { MESSAGE_FAILED: -1, MESSAGE_SENT: 1, MESSAGE_DELIVERED_SERVICE: 2, MESSAGE_DELIVERED_USER: 3, MESSAGE_READ: 4, MESSAGE_REPLIED: 5 } ) var Message = { body: null, servicechain: null } exports.message_states = message_states exports.Message = Message
Set up module exports differently
Set up module exports differently
JavaScript
mit
calmcl1/voluble,calmcl1/voluble
8ef7cb57c0473a2f383a7139993e9a839d835652
src/cf-tables/src/cf-table-row-links.js
src/cf-tables/src/cf-table-row-links.js
/* ========================================================================== Table Row Links Mixin for adding row link click functionality to table organism. ========================================================================== */ 'use strict'; var closest = require( 'atomic-component/src/utilities/...
/* ========================================================================== Table Row Links Mixin for adding row link click functionality to table organism. ========================================================================== */ 'use strict'; var closest = require( 'atomic-component/src/utilities/...
Remove table row links init method
Remove table row links init method
JavaScript
cc0-1.0
cfpb/capital-framework,contolini/capital-framework,cfpb/capital-framework,contolini/capital-framework
b8418b5da8ef053b9083f291f63d155567b3a22e
i18n/right-ui-i18n-de.js
i18n/right-ui-i18n-de.js
/** * RightJS UI Internationalization: German module * * Copyright (C) Nikolay V. Nemshilov aka St. */ if (self.Calendar) { $ext(Calendar.i18n, { Done: 'Getan', Now: 'Jetzt', Next: 'Nächste Monat', Prev: 'Vorhergehende Monat', NextYear: 'Nächste J...
/** * RightJS UI Internationalization: German module * * Copyright (C) Nikolay V. Nemshilov aka St. */ if (self.Calendar) { $ext(Calendar.i18n, { Done: 'Erledigt', Now: 'Jetzt', Next: 'Nächster Monat', Prev: 'Vorhergehender Monat', NextYear: 'Näch...
Fix some typos in the German locale. Three letter day shorts are not really used in German, it's better to use two letters for dayNamesShort, too.
Fix some typos in the German locale. Three letter day shorts are not really used in German, it's better to use two letters for dayNamesShort, too.
JavaScript
mit
rightjs/rightjs-ui
064d0462f6cb392e274d0b598320fa24dbb07bae
src/component/archive/view-container.js
src/component/archive/view-container.js
import { connect } from 'react-redux'; import { fetchArchive, revive } from './../../store/archive/actions'; import ViewToggleComponent from './../feature/view/view-component'; import { hasPermission } from '../../permissions'; export default connect( (state, props) => ({ features: state.archive.get('list'...
import { connect } from 'react-redux'; import { fetchArchive, revive } from './../../store/archive/actions'; import ViewToggleComponent from './../feature/view/view-component'; import { hasPermission } from '../../permissions'; import { fetchTags } from '../../store/feature-tags/actions'; export default connect( (...
Fix missing methods for displaying tags on archived toggles
Fix missing methods for displaying tags on archived toggles Fixes #233
JavaScript
apache-2.0
Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend,Unleash/unleash-frontend
ac3ddb3b89b3a8c5ce8035c4bb06f8dcba99e85b
portal/js/models/InvestigationModel.js
portal/js/models/InvestigationModel.js
App.Investigation = DS.Model.extend({ name: DS.attr('string', {defaultValue: 'New investigation'}), queryDefinition: DS.attr('string'), xAxisLabel: DS.attr('string'), yAxisLabel: DS.attr('string'), project: DS.belongsTo('project') });
App.Investigation = DS.Model.extend({ name: DS.attr('string', {defaultValue: 'New investigation'}), queryDefinition: DS.attr('string'), xAxisLabel: DS.attr('string'), yAxisLabel: DS.attr('string'), organization: DS.attr('string'), product: DS.attr('string'), project: DS.belongsTo('project') });
Add new fields to investigation
Add new fields to investigation
JavaScript
apache-2.0
with-regard/regard-website
12b24a5b514f63abf9dedb5f6604fac4a8cb59bc
app/CardComponent.js
app/CardComponent.js
'use strict'; // import './CardComponent.css!'; import React from 'react'; import ReactDOM from 'react-dom'; export default class CardComponent extends React.Component { render() { return ( <div className="card-component"> <h3 className="card-component__title">{this.props.title}</h3> <div...
'use strict'; System.import('./app/CardComponent.css!'); import React from 'react'; import ReactDOM from 'react-dom'; export default class CardComponent extends React.Component { render() { return ( <div className="card-component"> <h3 className="card-component__title">{this.props.title}</h3> ...
Use System.import syntax for CSS
Use System.import syntax for CSS
JavaScript
mit
akikoo/systemjs-jspm-boilerplate,akikoo/systemjs-jspm-boilerplate,akikoo/systemjs-jspm-sass-setup,akikoo/systemjs-jspm-sass-setup
25b4c1f3110f2079b7c8e8664776165523694686
header/dependent-js/header-brand.js
header/dependent-js/header-brand.js
/* Tooling /* ========================================================================== */ import { $assign as $, $dispatch, $replaceAll } from 'esri-global-shared'; /* Brand /* ========================================================================== */ const prefix = 'esri-header-brand'; export default () => { ...
/* Tooling /* ========================================================================== */ import { $assign as $, $dispatch, $replaceAll } from 'esri-global-shared'; /* Brand /* ========================================================================== */ const prefix = 'esri-header-brand'; export default () => { ...
Include width and height in brand image
Include width and height in brand image
JavaScript
apache-2.0
gschnall/global-nav,gschnall/global-nav
d37f36d5cec97e17d0daa69929e7a63c7c7a909c
src/components/posts_index.js
src/components/posts_index.js
import React from 'react'; class PostsIndex extends React.Component { render() { return ( <div className='posts-index'> Posts Index </div> ) } } export default PostsIndex;
import React from 'react'; import { connect } from 'react-redux'; import { fetchPosts } from '../actions'; class PostsIndex extends React.Component { componentDidMount() { this.props.fetchPosts(); } render() { return ( <div className='posts-index'> Posts Index </div> ) } } ex...
Call fetchPosts when PostsIndex components mounts
Call fetchPosts when PostsIndex components mounts
JavaScript
mit
monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog
4d668230f87ad4ca81c8b1664d61fbcd92e798d3
lib/util/initial-deps.js
lib/util/initial-deps.js
var definition = require('./definition'); function initialDeps(req, res, next, err) { var deps = [ definition.initial('ALL', /.*/, 'req', req), definition.initial('ALL', /.*/, 'res', res), ]; if (next) { deps.push(definition.initial('ALL', /.*/, 'next', next)); } if (err) { ...
var definition = require('./definition'); function initialDeps(req, res, next, err) { var deps = [ definition.initial('ALL', /.*/, 'req', req), definition.initial('ALL', /.*/, 'res', res), ]; deps.push(definition.initial('ALL', /.*/, 'next', next)); if (err) { deps.push(definiti...
Remove if check for 'next' in initialDeps utility
Remove if check for 'next' in initialDeps utility
JavaScript
mit
itsananderson/molded
de50ca7233167afbbdf0c6d01fab90b2d771e4f4
test/ui.js
test/ui.js
const { expect } = require("chai") const path = require("path") const Application = require("spectron").Application describe("ui", function () { this.timeout(10000) console.log(require("electron"), __dirname, path.join(__dirname, "..", "main.js")) beforeEach(function () { this.app = new Application({ ...
const { expect } = require("chai") const path = require("path") const Application = require("spectron").Application describe("ui", function() { this.timeout(10000) console.log(require("electron"), __dirname, path.join(__dirname, "..", "main.js")) beforeEach(function() { this.app = new Application({ ...
Make the tab nav test actually test something
Make the tab nav test actually test something
JavaScript
apache-2.0
z-------------/cumulonimbus,z-------------/cumulonimbus,z-------------/cumulonimbus
4e37d3380c05b24b1931dafcd13f1420b44ac264
src/createDisposableWorker.js
src/createDisposableWorker.js
export const createDisposableWorker = response => { const URL = window.URL || window.webkitURL const blob = new Blob([response], { type: 'application/javascript' }) // eslint-disable-line const worker = new Worker(URL.createObjectURL(blob)) // eslint-disable-line worker.post = message => new Promise((resolv...
export const createDisposableWorker = response => { const URL = window.URL || window.webkitURL const blob = new Blob([response], { type: 'application/javascript' }) // eslint-disable-line const worker = new Worker(URL.createObjectURL(blob)) // eslint-disable-line worker.post = message => new Promise((resolv...
Fix blob file not being destroyed after worker use.
Fix blob file not being destroyed after worker use.
JavaScript
mit
israelss/simple-web-worker,israelss/simple-web-worker
f0cb550486f44b2a06e0acf91f83fe1fd9b15b58
topcube.js
topcube.js
var spawn = require('child_process').spawn; var path = require('path'); module.exports = function (options) { options = options || {}; options.url = options.url || 'http://nodejs.org'; options.name = options.name || 'nodejs'; var client; switch (process.platform) { case 'win32': client...
var spawn = require('child_process').spawn; var path = require('path'); module.exports = function (options) { options = options || {}; options.url = options.url || 'http://nodejs.org'; options.name = options.name || 'nodejs'; var client; var keys = []; switch (process.platform) { case 'win...
Define valid keys per platform and filter out invalid options.
Define valid keys per platform and filter out invalid options.
JavaScript
mit
creationix/topcube,creationix/topcube,creationix/topcube
178c68ddab058153610e6cf382ee860d86ca0edf
src/services/video-catalog/get-video.js
src/services/video-catalog/get-video.js
import Promise from 'bluebird'; import { GetVideoResponse, VideoLocationType } from './protos'; import { toCassandraUuid, toProtobufTimestamp, toProtobufUuid } from '../common/protobuf-conversions'; import { NotFoundError } from '../common/grpc-errors'; import { getCassandraClient } from '../../common/cassandra'; /** ...
import Promise from 'bluebird'; import { GetVideoResponse, VideoLocationType } from './protos'; import { toCassandraUuid, toProtobufTimestamp, toProtobufUuid } from '../common/protobuf-conversions'; import { NotFoundError } from '../common/grpc-errors'; import { getCassandraClient } from '../../common/cassandra'; /** ...
Fix location type in get video
Fix location type in get video - Can just use raw int from C*
JavaScript
apache-2.0
KillrVideo/killrvideo-nodejs,KillrVideo/killrvideo-nodejs
216c290c4b05353f976ce8fc72fe5afcff528671
src/Logger.js
src/Logger.js
/* @flow */ 'use strict'; export default class Logger { start: number; constructor() { this.start = Date.now(); } // eslint-disable-next-line flowtype/no-weak-types log(...args: any) { Function.prototype.bind .call(window.console.log, window.console) .apply...
/* @flow */ 'use strict'; export default class Logger { start: number; constructor() { this.start = Date.now(); } // eslint-disable-next-line flowtype/no-weak-types log(...args: any) { if (window.console && window.console.log) { Function.prototype.bind ...
Check availability of console before using it (Fix IE9)
Check availability of console before using it (Fix IE9)
JavaScript
mit
niklasvh/html2canvas,niklasvh/html2canvas,niklasvh/html2canvas
417fcafb9f91bc04d6c3d12bcf0d54ec4316892f
lib/install/void-step.js
lib/install/void-step.js
'use strict'; const BaseStep = require('./base-step'); module.exports = class VoidStep extends BaseStep { constructor(options, action) { super(options); this.action = action; } start() { this.action && this.action(); return new Promise(() => {}); } };
'use strict'; const BaseStep = require('./base-step'); module.exports = class VoidStep extends BaseStep { constructor(options, action) { super(options); this.action = action; } start() { this.action && this.action(); return Promise.resolve(); } };
Return a resolved promise so promise chains waiting on step and flow resolution can end.
Return a resolved promise so promise chains waiting on step and flow resolution can end.
JavaScript
bsd-3-clause
kiteco/kite-installer
c076f59d347f2c8f562cc7562818fc2af27dfc13
lib/playbook/platform.js
lib/playbook/platform.js
module.exports = { id: "playbook", initialize:function() {}, objects: { navigator: { children: { device: { path: "cordova/plugin/playbook/device" } } }, device: { path: "cordova/plugin/playbook/de...
module.exports = { id: "playbook", initialize:function() {}, objects: { device: { path: "cordova/plugin/playbook/device" } }, merges: { navigator: { children: { device: { path: "cordova/plugin/playbook/device" ...
Move navigator.device to merges object for PlayBook.
Move navigator.device to merges object for PlayBook.
JavaScript
apache-2.0
corimf/cordova-js,modulexcite/incubator-cordova-js,Adilmar/cordova-js,gitterHQ/cordova-js,revolunet/cordova-js,the1sky/cordova-js,lvrookie/cordova-js,the1sky/cordova-js,lvrookie/cordova-js,andfaulkner/cordovajs-cms-one,yedeveloper/cordova-js,revolunet/cordova-js,Adilmar/cordova-js,corimf/cordova-js,Adilmar/cordova-js,c...
03760a474cb2487595eab6cf52e83b4891f27ab9
server/boot/teamMember-role.js
server/boot/teamMember-role.js
module.exports = function(app) { var Role = app.models.Role; Role.registerResolver('teamMember', function(role, context, cb) { function reject(msg) { console.log(msg); process.nextTick(function() { cb(null, false); }); } var userId = context.accessToken.userId; ...
module.exports = function(app) { var Role = app.models.Role; Role.registerResolver('teamMember', function(role, context, cb) { function reject(msg) { console.log(msg); process.nextTick(function() { cb(null, false); }); } var userId = context.accessToken.userId; if (!use...
Implement basic role for accounts
Implement basic role for accounts
JavaScript
agpl-3.0
asm-products/prudio-app,dethos/prudio-app,PrudioHQ/prudio-app,asm-products/prudio-app,dethos/prudio-app,PrudioHQ/prudio-app
aaaa79a12ba519541487aa20df5f37d876ab6a0d
lib/mock/duration.js
lib/mock/duration.js
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. module.exports = function(landscape) { let actions = new Map(); let tickCount = 0; return { "tick": () => new Promise(function(...
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. module.exports = function(landscape) { let actions = new Map(); let tickCount = 0; return { "tick": () => new Promise(function(...
Store a mapping to lists instead of single actions
:muscle: Store a mapping to lists instead of single actions
JavaScript
bsd-3-clause
daaang/awful-mess
13cab0edbbbd37796daec9cafd16de4af50a326a
shared/reducers/AuthReducer.js
shared/reducers/AuthReducer.js
import Immutable from 'immutable'; const defaultState = Immutable.Map({loaded: false}); export default function authReducer(state = defaultState, action = {}) { switch (action.type) { case 'LOAD': return state.merge({loaded: true, user: action.res.data}); case 'LOGIN_REQUEST': return state.set(...
import Immutable from 'immutable'; const defaultState = Immutable.Map({loaded: false, user: null}); export default function authReducer(state = defaultState, action = {}) { switch (action.type) { case 'LOAD': return state.merge({loaded: true, user: action.res.data || null}); case 'LOGIN_REQUEST': ...
Set another default value for `user`
Set another default value for `user`
JavaScript
mit
Dattaya/isomorphic-redux-plus,terribleplan/isomorphic-redux-plus,isogon/isomorphic-redux-plus
f6612b97b9f4fe3f596e82a2edc07018486695fc
test/rpc-spec.js
test/rpc-spec.js
var assert = require('assert'); var producer = require('../index')().producer; var consumer = require('../index')().consumer; var uuid = require('node-uuid'); var fixtures = { queues: ['rpc-queue-0'] }; describe('Producer/Consumer RPC messaging:', function() { before(function (done) { return consumer.connect(...
var assert = require('assert'); var producer = require('../index')().producer; var consumer = require('../index')().consumer; var uuid = require('node-uuid'); var fixtures = { queues: ['rpc-queue-0'] }; describe('Producer/Consumer RPC messaging:', function() { before(function (done) { return consumer.connect(...
Simplify rpc tests using return promise instead of done callback
Simplify rpc tests using return promise instead of done callback
JavaScript
mit
dial-once/node-bunnymq
094bc6a61779abff7325e0b2294322af274c56a5
src/kinvey.js
src/kinvey.js
import HTML5Kinvey from 'kinvey-html5-sdk'; import Device from './device'; import Popup from './popup'; import Push from './push'; import assign from 'lodash/assign'; export default class Kinvey extends HTML5Kinvey { static init(options = {}) { options = assign({ deviceClass: Device, popupClass: Popu...
import HTML5Kinvey from 'kinvey-html5-sdk'; import Device from './device'; import Popup from './popup'; import Push from './push'; import assign from 'lodash/assign'; class Kinvey extends HTML5Kinvey { static init(options = {}) { options = assign({ deviceClass: Device, popupClass: Popup }, option...
Make push module a singleton
Make push module a singleton
JavaScript
apache-2.0
Kinvey/kinvey-phonegap-lib
1e9c73beb228e004e655cd0cac38872e02cc73b3
package/array-methods.js
package/array-methods.js
function newArray () { return []; }; var mutatorOpt = { check: function (v, path) { if (!_.isArray(v)) throw new Meteor.Error(JSON.stringify(path) + ' is not an array'); return true; } }; var mutators = ['copyWithin', 'fill', 'pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift']; Array...
function newArray () { return []; }; var mutatorOpt = { check: function (v, path) { if (!_.isArray(v)) throw new Meteor.Error(JSON.stringify(path) + ' is not an array'); return true; } }; var mutators = ['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift']; ArrayMethods = _.reduce(mutat...
Remove copyWithin and fill array methods
Remove copyWithin and fill array methods
JavaScript
mit
xamfoo/reactive-obj,xamfoo/reactive-obj
99b210fe1855c31b496c8e2941aba5e5427ea0a9
src/lib/phantom-script.js
src/lib/phantom-script.js
/* eslint-disable */ 'use strict'; var system = require('system'); var webpage = require('webpage'); var page; var methods = { exit: function(callback) { callback(true); }, open: function(url, callback) { page = webpage.create(); page.open(url, function(status) { callback(status === 'success')...
/* eslint-disable */ 'use strict'; var system = require('system'); var webpage = require('webpage'); var page; var methods = { exit: function(callback) { callback(true); }, open: function(url, callback) { page = webpage.create(); page.open(url, function(status) { callback(status === 'success')...
Allow PhantomJS process to free stack frames
Allow PhantomJS process to free stack frames
JavaScript
mit
vinsonchuong/phantomjs-promise-es6
9e0c94adeed288ca18c54e64b4e0a6b8d8307551
contactmps/static/javascript/embed.js
contactmps/static/javascript/embed.js
if (document.location.hostname == "localhost") { var baseurl = ""; } else { var baseurl = "https://noconfidencevote.openup.org.za"; } var initContactMPsPymParent = function() { var pymParent = new pym.Parent('contactmps-embed-parent', baseurl + '/campaign/newsmedia/', {}); }; document.write('<div id="conta...
if (document.location.hostname == "localhost") { var baseurl = ""; } else { var baseurl = "https://noconfidencevote.openup.org.za"; } var initContactMPsPymParent = function() { var pymParent = new pym.Parent('contactmps-embed-parent', baseurl + '/campaign/newsmedia/', {}); }; var agent = navigator.userAgent...
Revert "Remove hack for news24 android app since loading pym async fixes it"
Revert "Remove hack for news24 android app since loading pym async fixes it" This reverts commit 1c3a52fb9ec977f22bfd14244ae3b1a3712d96bc.
JavaScript
mit
OpenUpSA/contact-mps,OpenUpSA/contact-mps,OpenUpSA/contact-mps,OpenUpSA/contact-mps
8e135f37a101cdce6ce3c2d01e2d695eca4f06f5
grunt/connect.js
grunt/connect.js
module.exports = { app: { options: { port: 3000 } } }
module.exports = { app: { options: { port: process.env.PORT || 3000 } } }
Use environment variable for port if it's set
Use environment variable for port if it's set
JavaScript
mit
trezy/Narjillos.js,trezy/Narjillos.js
d0c3e27e42e85334283c6b861e2ad0cbb8ebf0d1
tests/unit.js
tests/unit.js
define([ './aspect', './async', './compose', '../has!host-browser?./dom', './global', './has', './lang', './on', './request', './Deferred', './Evented', './Promise', './Registry', './SideTable' ], 1);
define([ './aspect', './async', './compose', '../has!host-browser?./dom', './global', './has', './lang', './on', './request', // './Deferred', // remove temporarily './Evented', './Promise', './Registry', './SideTable' ], 1);
Remove tests for core/Deferred for now.
Remove tests for core/Deferred for now.
JavaScript
bsd-3-clause
kitsonk/core-js,kitsonk/core-js
20613169eeb4126c1f1d5aa7c142e1461a410fd6
js/hal/http/client.js
js/hal/http/client.js
HAL.Http.Client = function(opts) { this.vent = opts.vent; $.ajaxSetup({ headers: { 'Accept': 'application/hal+json, application/json, */*; q=0.01' } }); }; HAL.Http.Client.prototype.get = function(url) { var self = this; this.vent.trigger('location-change', { url: url }); var jqxhr = $.ajax({ url: url, ...
HAL.Http.Client = function(opts) { this.vent = opts.vent; this.defaultHeaders = { 'Accept': 'application/hal+json, application/json, */*; q=0.01' }; }; HAL.Http.Client.prototype.get = function(url) { var self = this; this.vent.trigger('location-change', { url: url }); var jqxhr = $.ajax({ url: url, d...
Fix for $.ajaxSetup not working in Chrome. Usage is not recommended. This caused changes to custom request headers to be ignored. Calling ajaxSetup wasn't updating the headers used by the next AJAX call. The jQuery docs recommend not using ajaxSetup.
Fix for $.ajaxSetup not working in Chrome. Usage is not recommended. This caused changes to custom request headers to be ignored. Calling ajaxSetup wasn't updating the headers used by the next AJAX call. The jQuery docs recommend not using ajaxSetup.
JavaScript
mit
FoxyCart/hal-browser,FoxyCart/hal-browser,FoxyCart/hal-browser
acbd1a7b82d756ffd553d8ec23c402e8e6a42571
server/api.js
server/api.js
'use strict'; const express = require('express'); const routeBuilder = require('express-routebuilder'); const Resource = require('./resource'); const loadResources = require('./util/load-resources'); module.exports = function() { const router = express.Router(); // This version needs to be externalized var api...
'use strict'; const express = require('express'); const routeBuilder = require('express-routebuilder'); const Resource = require('./resource'); const serverErrors = require('./util/server-errors'); const loadResources = require('./util/load-resources'); module.exports = function() { const router = express.Router();...
Add 404 handler to unhandled requests
Add 404 handler to unhandled requests
JavaScript
mit
jmeas/api-pls
f5486e5ec6c1c6e282e05d80c91209c2bd45c5d8
www/smsplugin.js
www/smsplugin.js
var SmsPlugin = function () {}; SmsPlugin.prototype.send = function (phone, message, method, successCallback, failureCallback) { return PhoneGap.exec(successCallback, failureCallback, 'SmsPlugin', "SendSMS", [phone, message, method]); }; PhoneGap.addConstructor(function() { PhoneGap.addPlugin("sms", new S...
var exec = require("cordova/exec"); var SmsPlugin = function () {}; SmsPlugin.prototype.send = function (phone, message, method, successCallback, failureCallback) { return cordova.exec(successCallback, failureCallback, 'SmsPlugin', "SendSMS", [phone, message, method]); }; window.sms = new SmsPlugin(); /*SmsPlugi...
Change js file to use cordova.exec
Change js file to use cordova.exec
JavaScript
mit
blocktrail/cordova-sms-plugin,aharris88/phonegap-sms-plugin,Telerik-Verified-Plugins/SMS,kentmw/cordova-sms-plugin,DispatchMe/cordova-sms-plugin,DispatchMe/cordova-sms-plugin,aharris88/phonegap-sms-plugin,blocktrail/cordova-sms-plugin,sportstech/cordova-sms-plugin,vkeepe/cordova-sms-plugin,pyxweb/cordova-plugin-mms,blo...
f5135f4e1dacc369b89c6d85ad91c143f0e9a903
examples/async/reducers/postsByReddit.js
examples/async/reducers/postsByReddit.js
import * as posts from './posts'; export function getInitialState() { return {}; } export function PostsActions(state, { isAction, isIntrospection, actionID, payload, forwardTo }) { if (isAction) { return Object.assign({}, state, { [payload.reddit]: forwardTo(posts, state[payload.reddit]) }); } ...
import * as posts from './posts'; export function getInitialState() { return {}; } export function PostsActions(state, { isAction, isIntrospection, actionID, payload, forwardTo }) { if (isAction) { return Object.assign({}, state, { [payload.reddit]: forwardTo(posts, state[payload.reddit] || posts.getIn...
Fix issue in async example with initial posts’ state
Fix issue in async example with initial posts’ state
JavaScript
apache-2.0
BurntCaramel/flambeau
4652e39824702c89188dd548c0c47bbad7c266be
stories/loadingSpinner.js
stories/loadingSpinner.js
import React from 'react'; import { storiesOf } from '@storybook/react'; import { select } from '@storybook/addon-knobs/react'; import { LoadingSpinner } from '../components'; const colors = ['teal', 'white']; const sizes = ['small', 'medium']; storiesOf('Loading spinners', module).add('Basic', () => ( <LoadingSpin...
import React from 'react'; import { storiesOf } from '@storybook/react'; import { select } from '@storybook/addon-knobs/react'; import { LoadingSpinner } from '../components'; const colors = ['neutral', 'mint', 'violet', 'ruby', 'gold', 'aqua', 'teal']; const sizes = ['small', 'medium']; const tints = ['lightest', 'li...
Update story so it reflects the prop changes
Update story so it reflects the prop changes
JavaScript
mit
teamleadercrm/teamleader-ui
83efc04efcb0ca664cedbc3cb81c51df0ab64d72
src/article/shared/createDemoVfs.js
src/article/shared/createDemoVfs.js
import { Vfs } from '../../dar' import { EMPTY_JATS } from '../ArticleConstants' export default function createDemoVfs (seedXML) { let data = { 'demo/manifest.xml': "<dar>\n <documents>\n <document id=\"manuscript\" type=\"article\" path=\"manuscript.xml\" />\n </documents>\n <assets>\n </assets>\n</dar>\...
import { DefaultDOMElement } from 'substance' import { Vfs } from '../../dar' import { EMPTY_JATS } from '../ArticleConstants' export default function createDemoVfs () { let dom = DefaultDOMElement.parseXML(EMPTY_JATS) // add an empty paragraph into the empty body let $$ = dom.createElement.bind(dom) let bodyE...
Add empty paragraph for demo article.
Add empty paragraph for demo article.
JavaScript
mit
substance/texture,substance/texture
109313f5d80365430bdd6cdb964d94e83edb29b4
js/locales/bootstrap-datepicker.uk.js
js/locales/bootstrap-datepicker.uk.js
/** * Ukrainian translation for bootstrap-datepicker * Igor Polynets */ ;(function($){ $.fn.datepicker.dates['uk'] = { days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота", "Неділя"], daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"], daysMin: ["Нд", "Пн", "Вт",...
/** * Ukrainian translation for bootstrap-datepicker * Igor Polynets */ ;(function($){ $.fn.datepicker.dates['uk'] = { days: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота", "Неділя"], daysShort: ["Нед", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Суб", "Нед"], daysMin: ["Нд", "Пн", "Вт",...
Add 'clear' and 'format' to Ukrainian locale
Add 'clear' and 'format' to Ukrainian locale
JavaScript
apache-2.0
darluc/bootstrap-datepicker,parkeugene/bootstrap-datepicker,dswitzer/bootstrap-datepicker,uxsolutions/bootstrap-datepicker,hebbet/bootstrap-datepicker,Doublemedia/bootstrap-datepicker,bitzesty/bootstrap-datepicker,Invulner/bootstrap-datepicker,wetet2/bootstrap-datepicker,cherylyan/bootstrap-datepicker,janusnic/bootstra...
6b0000ea08dbd1137d0ea55b84f681895203fefd
authenticate.js
authenticate.js
(function () { "use strict"; const Promise = require('bluebird'); const request = Promise.promisify(require('request')); const apiUsername = require('./apiKeys.js').username; const apiSecretKey = require('./apiKeys.js').key; const authenticateNeverBounce = function () { request({ ...
(function () { "use strict"; const Promise = require('bluebird'); const request = Promise.promisify(require('request')); const neverBounceApiKeys = require('./apiKeys.js').neverbounce; const apiUsername = neverBounceApiKeys.username; const apiSecretKey = neverBounceApiKeys.key; const authen...
Update authentication file for neverbounce authentiction
Update authentication file for neverbounce authentiction
JavaScript
mit
Rastalamm/email-verify-cli
1e195fbc57e311d622fc1bc9cd5efbf04610eb5b
apps/onboarding/index.js
apps/onboarding/index.js
import express from 'express'; import SearchBlocks from '../../collections/search_blocks'; import { extend } from 'underscore'; import apolloMiddleware from 'react/apollo/middleware'; import setOnboardingComponentMiddleware from 'apps/onboarding/middleware/setOnboardingComponent'; const app = express(); app.set('view...
import express from 'express'; import SearchBlocks from '../../collections/search_blocks'; import { extend } from 'underscore'; import apolloMiddleware from 'react/apollo/middleware'; import ensureLoggedInMiddleware from 'lib/middleware/ensure_logged_in.coffee'; import setOnboardingComponentMiddleware from 'apps/onboar...
Add ensure_logged_in to onboarding middleware stack
Add ensure_logged_in to onboarding middleware stack
JavaScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
0b7092bd93e0b6022043f9239b6a9e571d915fdd
test/require-name-test.js
test/require-name-test.js
// Test for examples included in README.md var helpers = require('./global-setup') var path = require('path') var describe = global.describe var it = global.it var beforeEach = global.beforeEach var afterEach = global.afterEach describe('requireName option to Application', function () { helpers.setupTimeout(this) ...
// Test for examples included in README.md var helpers = require('./global-setup') var path = require('path') var describe = global.describe var it = global.it var beforeEach = global.beforeEach var afterEach = global.afterEach describe('requireName option to Application', function () { helpers.setupTimeout(this) ...
Add assert for main process API call
Add assert for main process API call
JavaScript
mit
electron/spectron,electron/spectron
8f4f2f122547653d9e47a4742b513c62166305bf
lib/dialects/mssql/query-generator.js
lib/dialects/mssql/query-generator.js
'use strict'; var Utils = require('../../utils'); module.exports = (function() { var QueryGenerator = { dialect: 'mssql', showTablesQuery: function () { return 'SELECT * FROM sys.Tables'; }, dropTableQuery: function(tableName, options) { options = options || {}; var query = "IF ...
'use strict'; var Utils = require('../../utils'); module.exports = (function() { var QueryGenerator = { dialect: 'mssql', quoteIdentifier: function(identifier, force) { if (identifier === '*') return identifier; return Utils.addTicks(identifier, '"'); }, showTablesQuery: function () { ...
Add first steps for createTableQuery
Add first steps for createTableQuery
JavaScript
mit
keik/sequelize,bangbang93/sequelize,seegno-forks/sequelize,abegines/sequelize,skv-headless/sequelize,darwinserrano/sequelize,3032441712/sequelize,chriszs/sequelize,inDream/sequelize,rodrigoapereira/sequelize,MagicIndustries/sequelize,briandamaged/sequelize,pimterry/sequelize,chauthai/sequelize,JYzor/sequelize,cbauerme/...
029ab951c8ee5cb3e7973dd8f7d6278777e0cc47
spec/accumulator_spec.js
spec/accumulator_spec.js
'use strict'; var accumulator = require('../lib/accumulator.js'), nock = require('nock'); describe('accumulator', function() { afterEach(function() { nock.cleanAll(); }); it('resolves successfully when all urls are successful', function(done) { var url = "http://localhost:32768/", ...
'use strict'; var accumulator = require('../lib/accumulator.js'), nock = require('nock'), successCode = 200; describe('accumulator', function() { afterEach(function() { nock.cleanAll(); }); it('resolves successfully when all URLs are successful', function(done) { var urls = ['http...
Add test for failure case to accumulator
Add test for failure case to accumulator
JavaScript
mit
cymen/url-ok
d6340b41acec7f2c3059b2b5625a3948a036a4e8
lib/environments/meteorEnvironment.js
lib/environments/meteorEnvironment.js
export default { coreModules: [ 'meteor/accounts-base', 'meteor/blaze', 'meteor/check', 'meteor/ddp-client', 'meteor/ddp-rate-limiter', 'meteor/ejson', 'meteor/email', 'meteor/http', 'meteor/check', 'meteor/meteor', 'meteor/mongo', 'meteor/random', 'meteor/reactive-...
export default { coreModules: [ 'meteor/accounts-base', 'meteor/blaze', 'meteor/check', 'meteor/ddp-client', 'meteor/ddp-rate-limiter', 'meteor/ejson', 'meteor/email', 'meteor/http', 'meteor/check', 'meteor/meteor', 'meteor/mongo', 'meteor/random', 'meteor/reactive-...
Add namedExports to meteor environment
Add namedExports to meteor environment Now that environments are specified with configuration objects, we can start making them even richer. This list of namedExports for the meteor environment was provided by @rhettlivingston.
JavaScript
mit
trotzig/import-js,trotzig/import-js,Galooshi/import-js,trotzig/import-js
1599c0e3132771a716b1c1b219fef03b7e72b15c
lib/jsdom/level2/languages/javascript.js
lib/jsdom/level2/languages/javascript.js
var vm = require('vm'); exports.javascript = function(element, code, filename) { var document = element.ownerDocument, window = document.parentWindow; if (window) { var tracelimitbak = Error.stackTraceLimit; Error.stackTraceLimit = 100; try { vm.Script.runInNewContext(code, window, filenam...
var vm = require('vm'); exports.javascript = function(element, code, filename) { var document = element.ownerDocument, window = document.parentWindow; if (window) { var ctx = window.__scriptContext; if (!ctx) { window.__scriptContext = ctx = vm.createContext({}); ctx.__proto__ = window; ...
Revert "Patch to allow Ender packages to work with jsdom.env"
Revert "Patch to allow Ender packages to work with jsdom.env" This reverts commit 55ba79071087ffa8a7a9bb3212afc1a571aedefd.
JavaScript
mit
beni55/jsdom,Joris-van-der-Wel/jsdom,Ye-Yong-Chi/jsdom,fiftin/jsdom,kesla/jsdom,lcstore/jsdom,darobin/jsdom,darobin/jsdom,zaucy/jsdom,robertknight/jsdom,iizukanao/jsdom,sirbrillig/jsdom,Ye-Yong-Chi/jsdom,danieljoppi/jsdom,sirbrillig/jsdom,vestineo/jsdom,mbostock/jsdom,sebmck/jsdom,aduyng/jsdom,jeffcarp/jsdom,evanlucas/...
76f685fce2052e203cbd7c87942218811ab33640
src/assets/js/main.js
src/assets/js/main.js
(function() { "use strict"; var h1 = document.getElementsByTagName("h1")[0]; h1.style.backgroundColor = "lightblue"; })();
(function() { "use strict"; document.getElementsByTagName("html")[0].className = "js"; var h1 = document.getElementsByTagName("h1")[0]; h1.style.backgroundColor = "lightblue"; })();
Change html element class when javascript is available
Change html element class when javascript is available
JavaScript
bsd-2-clause
ebargtuo/react-webpack-boilerplate,ebargtuo/gulp-webpack-boilerplate,ebargtuo/react-webpack-boilerplate,ebargtuo/gulp-webpack-boilerplate
12f4708b6df62ca35b3804878e9c290174ab114a
test/feature/api_spec.js
test/feature/api_spec.js
var frisby = require('frisby'); var root = "http://localhost:3000"; var gamesPath = "/games" frisby.create('Game starts when a user POSTs a new game') .post(root + gamesPath) .expectStatus(200) .expectHeaderContains('content-type', 'application/json') // .inspectJSON() .expectJSON({ status: "setup" }) .exp...
var frisby = require('frisby'); var root = "http://localhost:3000"; var gamesPath = "/games"; var id = 2; frisby.create('Game starts when a user POSTs a new game') .post(root + gamesPath) .expectStatus(200) .expectHeaderContains('content-type', 'application/json') // .inspectJSON() .expectJSON({ status: "set...
Create skipped features to flesh out API
Create skipped features to flesh out API See #4
JavaScript
mit
theotherzach/testdrivennode,theotherzach/testdrivennode,DarthStrom/testdrivennode,testdouble/testdrivennode
9a14b383b57760ac53baa846f0d0b6677a198b6b
src/router.js
src/router.js
import React from 'react' import { merge } from 'lodash' import { Router as ReactRouter, RouterContext, browserHistory, createMemoryHistory, match } from 'react-router' import { syncHistoryWithStore, routerReducer } from 'react-router-redux' export { Route, IndexRoute, Redirect, IndexR...
import React from 'react' import { merge } from 'lodash' import { Router as ReactRouter, RouterContext, browserHistory, createMemoryHistory, match } from 'react-router' import { syncHistoryWithStore, routerReducer } from 'react-router-redux' export { Route, IndexRoute, Redirect, IndexR...
Fix issue with not using upgraded history object
Fix issue with not using upgraded history object
JavaScript
mit
3five/protium,3five/protium
efdd775255e6fb5305a3a5c1a789c461d7077eda
Src/Credits.js
Src/Credits.js
CubeGame.Credits = function() {}; CubeGame.Credits.prototype = { create: function() { this.credits = "Avoid the obstacles with the Cube!\nCreated with the Phaser Game Engine\n\nImages created in Inkscape\nSounds created in Audacity"; this.creditsText = CubeGame.factory.addText(100, 50, this.credits,...
CubeGame.Credits = function() {}; CubeGame.Credits.prototype = { create: function() { this.credits = "Avoid the obstacles with the Cube!\nA Javascript/HTML5 Game\nCreated with the Phaser Game Engine\n\nImages created in Inkscape\nSounds created in Audacity"; this.creditsText = CubeGame.factory.addTe...
Add note in credits about Javascript/HTML5
Add note in credits about Javascript/HTML5
JavaScript
mit
InsaneAboutTNT/RushOfTheCube,InsaneAboutTNT/RushOfTheCube
388c801a19181812879815789855328a804f1e78
phileo/static/phileo/js/jquery.phileo.js
phileo/static/phileo/js/jquery.phileo.js
jQuery(function($) { var PhileoLikes = function(form, options) { this.options = $.extend({}, $.fn.phileo.defaults, options); this.$form = $(form); this.$count = $(this.options.count); var self = this; this.$form.submit(function(event) { event.preventDefault(); ...
!function($){ "use strict"; var PhileoLikes = function(form, options) { this.options = $.extend({}, $.fn.phileo.defaults, options); this.$form = $(form); this.$count = $(this.options.count); var self = this; this.$form.submit(function(event) { event.prevent...
Add jQuery plugin on page load, not domready
Add jQuery plugin on page load, not domready The phileo plugin was added to jQuery in the domready event callback. As this plugin could be loaded at the bottom of a page - AFTER phileo widget scripts - it was possible for the phileo plugin to not be loaded when the widgets were initialized in the domready event. As th...
JavaScript
mit
jacobwegner/phileo,pinax/phileo,rizumu/pinax-likes,jacobwegner/phileo,pinax/phileo,rizumu/pinax-likes,pinax/pinax-likes
7e1a2e51a7e23677478739bb8f66d17599e84b79
safari/ReSource.safariextension/start.js
safari/ReSource.safariextension/start.js
document.addEventListener('beforeload', onBeforeLoad, true); var config = [ { source: 'source.js', reSource: 'reSource.js' } ]; function onBeforeLoad(event) { if (event.srcElement.tagName == 'SCRIPT') { console.error(event.url); for(var i = 0; i < config.length; i++) { ...
document.addEventListener('beforeload', onBeforeLoad, true); var config = [ { source: 'source.js', reSource: 'reSource.js' } ]; function onBeforeLoad(event) { if (event.srcElement.tagName == 'SCRIPT') { for(var i = 0; i < config.length; i++) { var regexp = new RegExp(co...
Replace strings comparison with regexp
Replace strings comparison with regexp
JavaScript
mit
Sundrique/resource
1cf89dca6a8c0b4b6d9f213bb35d845c7f1c44c6
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var autoprefixer = require('gulp-autoprefixer'); var filesize = require('gulp-filesize'); var minifyCss = require('gulp-minify-css'); var plumber = require('gulp-plumber'); var jslint = require('gulp-jslint'); gulp.task('sass', function () { ...
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var autoprefixer = require('gulp-autoprefixer'); var filesize = require('gulp-filesize'); var minifyCss = require('gulp-minify-css'); var plumber = require('gulp-plumber'); var jslint = require('gulp-jslint'); gulp.task('sass', function () { ...
Remove sass:watch task and replace by default
Remove sass:watch task and replace by default
JavaScript
mit
WebRobotCh/FreelanceBoard,WebRobotCh/FreelanceBoard,WebRobotCh/FreelanceBoard
c3cff4e9d2b06ba41b31eeec50d782bb30ad5424
packages/gdl-frontend/components/NotFound/index.js
packages/gdl-frontend/components/NotFound/index.js
// @flow /** * Part of GDL gdl-frontend. * Copyright (C) 2018 GDL * * See LICENSE */ import * as React from 'react'; import Taken from './Taken'; import { Trans } from '@lingui/react'; import Link from 'next/link'; import { Typography } from '@material-ui/core'; import Container from '../../elements/Container'; ...
// @flow /** * Part of GDL gdl-frontend. * Copyright (C) 2018 GDL * * See LICENSE */ import * as React from 'react'; import Taken from './Taken'; import { Trans } from '@lingui/react'; import Link from 'next/link'; import { Typography } from '@material-ui/core'; import Container from '../../elements/Container'; ...
Add container spacing to 404 page
Add container spacing to 404 page
JavaScript
apache-2.0
GlobalDigitalLibraryio/gdl-frontend,GlobalDigitalLibraryio/gdl-frontend
88aa0edd8fa7c9ed28598310a7db31b38615018b
packages/rekit-studio/src/features/common/utils.js
packages/rekit-studio/src/features/common/utils.js
const setItem = type => (key, item) => { const obj = window[`${type}Storage`]; return obj.setItem(key, JSON.stringify(item)); }; const getItem = type => (key, defaultValue, saveIfNotExist) => { const obj = window[`${type}Storage`]; const savedItem = obj.getItem(key); if (!savedItem && saveIfNotExist) { se...
const setItem = type => (key, item) => { const obj = window[`${type}Storage`]; return obj.setItem(key, JSON.stringify(item)); }; const getItem = type => (key, defaultValue, saveIfNotExist) => { const obj = window[`${type}Storage`]; const savedItem = obj.getItem(key); if (!savedItem && saveIfNotExist) { se...
Fix a bug that failed to show Rekit Studio.
Fix a bug that failed to show Rekit Studio.
JavaScript
mit
supnate/rekit
80d2e22684383009069d3e8d88d2b592b3b57582
lib/Entrypoint.js
lib/Entrypoint.js
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const ChunkGroup = require("./ChunkGroup"); class Entrypoint extends ChunkGroup { constructor(name) { super(name); this.runtimeChunk = undefined; } isInitial() { return true; } getFiles() { ...
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const ChunkGroup = require("./ChunkGroup"); class Entrypoint extends ChunkGroup { constructor(name) { super(name); this.runtimeChunk = undefined; } isInitial() { return true; } getFiles() { ...
Simplify for loop in EntryPoint.getFiles
Simplify for loop in EntryPoint.getFiles
JavaScript
mit
NekR/webpack,webpack/webpack,webpack/webpack,webpack/webpack,EliteScientist/webpack,NekR/webpack,SimenB/webpack,webpack/webpack,EliteScientist/webpack,SimenB/webpack,SimenB/webpack,SimenB/webpack
6d60612979d1880102f02798a4963d9dd24f6e0d
app/initialize.js
app/initialize.js
var Application = require('application'); module.exports = (function() { function prepareDOM() { document.body.innerHTML = ''; document.body.appendChild(document.createElement('gelato-application')); document.body.appendChild(document.createElement('gelato-dialogs')); document.body...
var Application = require('application'); module.exports = (function() { function prepareDOM() { document.body.appendChild(document.createElement('gelato-application')); document.body.appendChild(document.createElement('gelato-dialogs')); document.body.appendChild(document.createElement('g...
Stop force clearing the dom when gelato is preparing it.
Stop force clearing the dom when gelato is preparing it.
JavaScript
mit
mcfarljw/gelato-framework,jernung/gelato,jernung/gelato,mcfarljw/backbone-gelato,mcfarljw/gelato-framework,mcfarljw/backbone-gelato
2a96b727c4ee83a6332e30753c6c9aec1e9d411d
src/interface/Reticle.js
src/interface/Reticle.js
(function(){ /** * Reticle 3D Sprite * @param {THREE.Color} [color=0xfffff] - Color of the reticle sprite * @param {string} [url=PANOLENS.DataImage.Reticle] - Image asset url */ PANOLENS.Reticle = function ( color, url ) { var map, material; color = color || 0xffffff; url = url || PANOLENS.DataImage...
(function(){ /** * Reticle 3D Sprite * @param {THREE.Color} [color=0xfffff] - Color of the reticle sprite * @param {string} [url=PANOLENS.DataImage.Reticle] - Image asset url */ PANOLENS.Reticle = function ( color, url ) { var map, material; color = color || 0xffffff; url = url || PANOLENS.DataImage...
Fix reticle render order and depthTest
Fix reticle render order and depthTest
JavaScript
mit
pchen66/panolens.js,pchen66/panolens.js
b0e02f106f2aa343d951d0af728515fa61e9a6d4
components/layermanager/layer-editor.spec.js
components/layermanager/layer-editor.spec.js
'use strict'; import VectorLayer from 'ol/layer/Vector'; import { Vector as VectorSource } from 'ol/source'; describe('layermanager', function () { var scope; var $componentController, scope; var layerForCluster = new VectorLayer({ title: 'Bookmarks', source: new VectorSource({}) }) ...
'use strict'; import VectorLayer from 'ol/layer/Vector'; import { Vector as VectorSource } from 'ol/source'; describe('layermanager', function () { var scope; var $componentController, scope; var layerForCluster = new VectorLayer({ title: 'Bookmarks', source: new VectorSource({}) }) ...
Test for clusterization distance and turning off
Test for clusterization distance and turning off
JavaScript
mit
hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng
c684a626fd2a3f049ddc3a8cd91a1d6860bd351a
docs/src/code-samples/examples/input-custom-overlay.js
docs/src/code-samples/examples/input-custom-overlay.js
import React from 'react'; import PropTypes from 'prop-types'; import DayPickerInput from 'react-day-picker/DayPickerInput'; import 'react-day-picker/lib/style.css'; function CustomOverlay({ classNames, selectedDay, children }) { return ( <div className={classNames.overlayWrapper} style={{ marginLeft: -100 }}> ...
import React from 'react'; import PropTypes from 'prop-types'; import DayPickerInput from 'react-day-picker/DayPickerInput'; import 'react-day-picker/lib/style.css'; function CustomOverlay({ classNames, selectedDay, children, ...props }) { return ( <div className={classNames.overlayWrapper} style={{...
Make sure we pass the correct props to the overlay
Make sure we pass the correct props to the overlay
JavaScript
mit
gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker
3de0664621d9be41a63205277d8ec08d41f08ed0
book/plugin.js
book/plugin.js
require(["gitbook"], function(gitbook) { });
require(["gitbook", "core/navigation"], function(gitbook, navigation) { gitbook.events.bind("page.change", function() { var prev = 0; $(".book-body .body-inner").scroll(function(e) { var y = $(e.target).scrollTop(); // offset of scroll var vH = $(e.target).height(); // si...
Add base for infinite scrolling
Add base for infinite scrolling
JavaScript
apache-2.0
GitbookIO/plugin-infinitescroll
0f2aec1b07e3deb6df7c1d4b1f379f3797645511
packages/archetype/src/__demo__/index.js
packages/archetype/src/__demo__/index.js
/** * Copyright 2017 CA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writin...
/** * Copyright 2017 CA * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writin...
Add 'slug' property to demo object
fix(archetype): Add 'slug' property to demo object
JavaScript
apache-2.0
mineral-ui/mineral-ui,mineral-ui/mineral-ui
56e016f29c88258b152bdf869d8d03dee6188533
src/server/actions/sendCycleLaunchAnnouncements.js
src/server/actions/sendCycleLaunchAnnouncements.js
import Promise from 'bluebird' import {Cycle, Phase, Project} from 'src/server/services/dataService' export default async function sendCycleLaunchAnnouncements(cycleId) { const [cycle, phases] = await Promise.all([ await Cycle.get(cycleId), await Phase.filter({hasVoting: true}), ]) await Promise.each(pha...
import Promise from 'bluebird' import {Cycle, Phase, Project} from 'src/server/services/dataService' export default async function sendCycleLaunchAnnouncements(cycleId) { const [cycle, phases] = await Promise.all([ await Cycle.get(cycleId), await Phase.filter({hasVoting: true}), ]) await Promise.each(pha...
Remove list of project names from slack announcement for cycle launch.
Remove list of project names from slack announcement for cycle launch.
JavaScript
mit
ian-deans/echo,LearnersGuild/echo,sdweber422/echo
f3bece0e459f758add38ecb253860b371f448e03
src/test/fixtures/mocks/request-animation-frame.js
src/test/fixtures/mocks/request-animation-frame.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // @flow /** * Tests don't have access to the requestionAnimationFrame API, so this function * provides a mock ...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ // @flow /** * Tests don't have access to the requestionAnimationFrame API, so this function * provides a mock ...
Clean up and document the return value of mockRaf
Clean up and document the return value of mockRaf
JavaScript
mpl-2.0
devtools-html/perf.html,mstange/cleopatra,devtools-html/perf.html,mstange/cleopatra
8eb474479390920aeb70e84fb4c4c6460470c11b
Lesson9/http/js/app.js
Lesson9/http/js/app.js
angular.module('app', []).controller('AppCtrl', function ($scope, $http) { $scope.results = []; $scope.loadUsers = function() { $http.get('/elements') .success(function(data) { $scope.results = data; }) .error(function(err) { $scope.results = err; }); } $scope.clickElement = function (elemen...
angular.module('app', []).controller('AppCtrl', function ($scope, $http) { $scope.results = []; $scope.loadUsers = function() { $http.get('/elements') .success(function(data) { $scope.results = data; }) .error(function(err) { $scope.results = err; }); } $scope.clickElement = function (elemen...
Correct put method to work correctly
Correct put method to work correctly
JavaScript
mit
dajvido/NAJ-homework,dajvido/NAJ-homework
ae4c6f0e5b4933568f576c7e339ee30fb700d240
routes/get_shuttles.js
routes/get_shuttles.js
const express = require('express'); const router = express.Router(); const cms = require('../cms.js'); const mongoose = require('mongoose'); const Shuttle = require("../schema/shuttle.js"); const helperLib = require("../helper.js").helpers; const helper = new helperLib(); module.exports = router; router.get('/', functi...
const express = require('express'); const router = express.Router(); const cms = require('../cms.js'); const mongoose = require('mongoose'); const Shuttle = require("../schema/shuttle.js"); const helperLib = require("../helper.js").helpers; const helper = new helperLib(); module.exports = router; router.get('/', functi...
Make get shuttles api route more secure by encapsulating array in data key
Make get shuttles api route more secure by encapsulating array in data key This is better as per this article: https://www.owasp.org/index.php/AJAX_Security_Cheat_Sheet#Always_return_JSON_with_an_Object_on_the_outside
JavaScript
bsd-2-clause
wtg/shuttle-signups,wtg/shuttle-signups,wtg/shuttle-signups
1ff0261882cfa8e5c1ce577007391a9fb4f5a37b
app/lib/github_adapter.js
app/lib/github_adapter.js
require('dashboard/core'); require('dashboard/model'); Dashboard.GitHubAdpater = DS.Adapter.extend({ PREFIX: 'https://api.github.com', ajax: function(url, target, callback) { Ember.$.ajax({ url: this.PREFIX + url, dataType: 'jsonp', context: this, success: function(data) { th...
require('dashboard/core'); require('dashboard/model'); Dashboard.GitHubAdpater = DS.Adapter.extend({ PREFIX: 'https://api.github.com', ajax: function(url, target, callback) { Ember.$.ajax({ url: this.PREFIX + url, dataType: 'jsonp', context: this, success: function(data) { th...
Implement find for Repository on GitHubAdpater
Implement find for Repository on GitHubAdpater
JavaScript
isc
greyhwndz/dashboard,pangratz/dashboard,pangratz/dashboard,greyhwndz/dashboard,greyhwndz/dashboard
4e3ae42dfa735bc55500da5187e658c58ddf8090
app/routes/stories/new.js
app/routes/stories/new.js
import Ember from 'ember'; export default Ember.Route.extend({ actions: { submit: function () { var self = this, content = this.controller.get('firstSnippet'), snippet = this.store.createRecord('snippet', { content: content, }); snippet.save().then(function ()...
import Ember from 'ember'; export default Ember.Route.extend({ actions: { submit: function () { var self = this, content = this.controller.get('firstSnippet'), snippet = this.store.createRecord('snippet', { content: content, }); snippet.save().then(function ()...
Create the Draft server-side instead.
Create the Draft server-side instead.
JavaScript
mit
smashwilson/collab.fict.io
7ce831ae1d2557217b5cb84cf0db84700f247931
test/pipes/screenshot.js
test/pipes/screenshot.js
"use strict"; var screenshot = require('../../lib/pipes/screenshot.js'); var testcases = require('../files/hash.json'); var restbase = require('../../lib/pipes/restbase'); var pipe = require('../..'); describe('screenshot', function () { testcases.forEach(function (tc) { it('should take screenshot of svg f...
"use strict"; var screenshot = require('../../lib/pipes/screenshot.js'); var testcases = require('../files/hash.json'); var restbase = require('../../lib/pipes/restbase'); var pipe = require('../..'); describe('screenshot', function () { testcases.forEach(function (tc) { it('should take screenshot of svg f...
Increase timeout to allow travis tests to pass
Increase timeout to allow travis tests to pass
JavaScript
apache-2.0
physikerwelt/mathpipe,physikerwelt/mathpipe,physikerwelt/mathpipe
30c21764723ca0878cea9f41977f756227edd51b
gulpfile.js
gulpfile.js
var gulp = require('gulp'), browserSync = require('browser-sync'), sass = require('gulp-sass'), bower = require('gulp-bower'), notify = require('gulp-notify'), reload = browserSync.reload, bs = require("browser-sync").create(), Hexo = require('hexo'), ...
var gulp = require('gulp'), browserSync = require('browser-sync'), sass = require('gulp-sass'), bower = require('gulp-bower'), notify = require('gulp-notify'), reload = browserSync.reload, bs = require("browser-sync").create(), Hexo = require('hexo'), ...
Update and fix sass gulp path
Update and fix sass gulp path
JavaScript
mit
wakermahmud/Moretaza,chrisjlee/hexo-theme-zurb-foundation
5f583fbf8a799d5643d524c8220bd785860eaac7
gulpfile.js
gulpfile.js
//Gulp and plugins var gulp = require('gulp'), mocha = require('gulp-mocha'), plumber = require('gulp-plumber'), watch = require('gulp-watch'); gulp.task('exercises:language:runner', function() { gulp.src('exercises/language/*.js', {read: false}) .pipe(plumber()) .pipe(...
//Gulp and plugins var gulp = require('gulp'), concat = require('gulp-concat'), plumber = require('gulp-plumber'), watch = require('gulp-watch'), runner = require('gulp-mocha-phantomjs'); gulp.task('exercises:language:watcher', function() { gulp.watch('exercises/langua...
Update gulp tasks to use mocha-phantom
Update gulp tasks to use mocha-phantom
JavaScript
mit
elijahik/ih-js-katas,eth0lo/ironhack-js-katas
e7fbfb5c09b3713be92324b3a1ac4d4f9dbe5885
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var sass = require('gulp-sass'); var bower = require('gulp-bower'); var minifyCSS = require('gulp-minify-css'); var paths = { css: 'src/styles/**/*.scss', fonts: 'bower_components/font-awesome/fonts/**/*' }; gulp.task('bower', function() { return bower(); }); gulp.task('css', ['bowe...
var gulp = require('gulp'); var sass = require('gulp-sass'); var bower = require('gulp-bower'); var minifyCSS = require('gulp-minify-css'); var paths = { css: 'src/styles/**/*.scss', fonts: 'bower_components/font-awesome/fonts/**/*' }; gulp.task('bower', function() { return bower(); }); gulp.task('css', ['bowe...
Build the full project before gulp watch.
Build the full project before gulp watch.
JavaScript
mit
nubs/overthemonkey.com,nubs/overthemonkey.com,nubs/overthemonkey.com
14fd2c4be7af5c247ec829eaab4bbe7b35027775
test/e2e/scenarios.js
test/e2e/scenarios.js
'use strict'; describe('my angular musicbrainz app', function () { beforeEach(function () { browser().navigateTo('app/index.html'); }); it('should automatically redirect to /search when location hash/fragment is empty', function () { expect(browser().location().url()).toBe('/search'); ...
'use strict'; describe('my angular musicbrainz app', function () { beforeEach(function () { browser().navigateTo('app/index.html'); }); describe('search', function () { beforeEach(function () { browser().navigateTo('#/search'); }); it('should render search wh...
Fix assertion into info e2e-test
Fix assertion into info e2e-test
JavaScript
mit
arey/angular-musicbrainz,arey/angular-musicbrainz,arey/angular-musicbrainz,arey/angular-musicbrainz,arey/angular-musicbrainz
bd01f1778dc3fd1a3bee86f058b03066a195b08d
test/special/index.js
test/special/index.js
'use strict'; var fs = require('fs'); var hljs = require('../../build'); var jsdom = require('jsdom').jsdom; var utility = require('../utility'); var filename = utility.buildPath('index.html'), page = fs.readFileSync(filename, 'utf-8'); // Allows hljs to use document global.document = jsdom(page); ...
'use strict'; var _ = require('lodash'); var fs = require('fs'); var hljs = require('../../build'); var jsdom = require('jsdom').jsdom; var utility = require('../utility'); var blocks, filename = utility.buildPath('index.html'), page = fs.readFileSync(filename, 'utf-8'); // Allows hljs to...
Add br tests to special test group
Add br tests to special test group
JavaScript
bsd-3-clause
xing-zhi/highlight.js,isagalaev/highlight.js,taoger/highlight.js,teambition/highlight.js,bluepichu/highlight.js,palmin/highlight.js,STRML/highlight.js,dbkaplun/highlight.js,xing-zhi/highlight.js,VoldemarLeGrand/highlight.js,ehornbostel/highlight.js,dublebuble/highlight.js,ehornbostel/highlight.js,dx285/highlight.js,Del...
6b119b2c83ba835b8cda54f77538d87c7bed2dfd
build/config.js
build/config.js
module.exports = { htmlLang: '{{htmlLang}}', assetPath: '{{govukAssetPath}}', afterHeader: '{{$afterHeader}}{{/afterHeader}}', bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}', bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}', content: '{{$main}}{{/main}}', cookieMessage: '{{$cookieMessage}}{{/cookieMessage}}', foote...
module.exports = { htmlLang: '{{htmlLang}}', assetPath: '{{govukAssetPath}}', afterHeader: '{{$afterHeader}}{{/afterHeader}}', bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}', bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}', content: '{{$main}}{{/main}}', cookieMessage: '{{$cookieMessage}}{{/cookieMessage}}', foote...
Add default govuk link and logo title
Add default govuk link and logo title
JavaScript
mit
UKHomeOffice/govuk-template-compiler,UKHomeOffice/govuk-template-compiler
b4a4aaf0412bea56e610f50d64ea1ef2f55b4eb4
tests/test-bundler.js
tests/test-bundler.js
// --------------------------------------- // Test Environment Setup // --------------------------------------- import sinon from 'sinon' import chai from 'chai' import sinonChai from 'sinon-chai' import chaiAsPromised from 'chai-as-promised' import chaiEnzyme from 'chai-enzyme' chai.use(sinonChai) chai.use(chaiAsProm...
// --------------------------------------- // Test Environment Setup // --------------------------------------- import sinon from 'sinon' import chai from 'chai' import sinonChai from 'sinon-chai' import chaiAsPromised from 'chai-as-promised' import chaiEnzyme from 'chai-enzyme' chai.use(sinonChai) chai.use(chaiAsProm...
Remove unneeded coverage lines from tests bundler
Remove unneeded coverage lines from tests bundler
JavaScript
mit
ismaelgt/english-accents-map,ismaelgt/english-accents-map
505ec49d1b340733a85294cd722314bb4b183748
gen/fixture/site/scripts/plan/index.js
gen/fixture/site/scripts/plan/index.js
var _plan={ title:"simple plan", template_engine:"go", dependency:[ "markdown", "yaml_front_matter", ], strategies:[ { title:"markdown", patterns:["*md"], exec:["markdown"], }, ] }; Wu.setCustomPlan(_plan);
var _plan={ title:"simple plan", template_engine:"go", dependencies:[ "markdown", ], strategies:[ { title:"markdown", patterns:["*md"], exec:["markdown"], }, ] }; Wu.setCustomPlan(_plan);
Fix typo on object field
gen: Fix typo on object field
JavaScript
mit
gernest/wuxia,gernest/wuxia,gernest/wuxia,gernest/wuxia
90812f144dc3e1323a0cdbb2576be2ecb12746d2
src/commands/output.js
src/commands/output.js
import moment from 'moment' import chalk from 'chalk' import format from '../time' import pad from 'pad' import { hashPattern } from '../entry' export {write as write} export {getOutputs as getOutputs} function write(entry) { const {detailed} = getOutputs(entry) console.log(detailed) } function getOutputs(entry...
import moment from 'moment' import chalk from 'chalk' import format from '../time' import pad from 'pad' import { hashPattern } from '../entry' export {write as write} export {getOutputs as getOutputs} function write(entry) { const {detailed} = getOutputs(entry) console.log(detailed) } function getOutputs(entry...
Fix time extraction taking away needed spaces
Fix time extraction taking away needed spaces
JavaScript
agpl-3.0
chadfawcett/tickbin,jonotron/tickbin,tickbin/tickbin