commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
0f3a4183d62b62f288cc9614fe52bc03ba33d01b
test/directory.js
test/directory.js
/* global beforeEach, describe, it */ var watch = require('..'); var join = require('path').join; var fs = require('fs'); var rimraf = require('rimraf'); require('should'); function fixtures(glob) { return join(__dirname, 'fixtures', glob); } describe.skip('directories', function () { beforeEach(function () ...
/* global beforeEach, describe, it */ var watch = require('..'); var join = require('path').join; var fs = require('fs'); var rimraf = require('rimraf'); require('should'); function fixtures(glob) { return join(__dirname, 'fixtures', glob); } describe.skip('directories', function () { beforeEach(function () ...
Add comment in directories test
Add comment in directories test
JavaScript
mit
devm33/gulp-watch,UltCombo/gulp-watch,operatino/gulp-watch,moander/gulp-watch,floatdrop/gulp-watch
--- +++ @@ -15,6 +15,7 @@ rimraf.sync(fixtures('test')); }); + // This test is not responding on directories creation it('should directory on creation', function (done) { var w = watch(fixtures('**')); w.on('ready', function () {
cd70ccc9aeb8cb3e26315cd627863ff67e5759f5
rules/inject-local-id.js
rules/inject-local-id.js
/** * Adds the ID of the user object stored on our database * to the token returned from Auth0 */ function (user, context, callback) { var namespace = 'https://techbikers.com/'; context.idToken[namespace + 'user_id'] = user.app_metadata.id; callback(null, user, context); }
/** * Adds the ID of the user object stored on our database * to the token returned from Auth0 */ function (user, context, callback) { var namespace = 'https://techbikers.com/'; // If the user has app_metadata then inject the ID into the token if (user.app_metadata) { context.idToken[namespace + 'user_id'...
Check to make sure app_metadata exists
Check to make sure app_metadata exists There shouldn’t be cases where app_metadata doesn’t exist but if it doesn’t then it will cause an error that prevents the user from being logged in. Signed-off-by: Michael Willmott <4063ad43ea4e0ae77bf35022808393a246bdfa61@gmail.com>
JavaScript
mit
Techbikers/authentication
--- +++ @@ -4,6 +4,11 @@ */ function (user, context, callback) { var namespace = 'https://techbikers.com/'; - context.idToken[namespace + 'user_id'] = user.app_metadata.id; + + // If the user has app_metadata then inject the ID into the token + if (user.app_metadata) { + context.idToken[namespace + 'user_...
e4b0d2b5ef01904c7206e855f730a5f3b31a0988
examples/01-add-user.js
examples/01-add-user.js
// use level-dyno and open a new datastore var dyno = require('../level-dyno.js'); var flake = require('flake')('eth0'); // open a new database var db = dyno('/tmp/users'); // do the above sequence db.putItem('chilts', { nick : 'chilts', email : 'me@example.com' }, flake(), function(err) { console.log('putItem():...
// use level-dyno and open a new datastore var dyno = require('../level-dyno.js'); var flake = require('flake')('eth0'); // open a new database var db = dyno('/tmp/users'); var user = 'chilts'; // do the above sequence db.putItem(user, { nick : 'chilts', email : 'me@example.com' }, flake(), function(err) { conso...
Make the example a bit nicer
Make the example a bit nicer
JavaScript
mit
chilts/modb-dyno-leveldb
--- +++ @@ -5,23 +5,25 @@ // open a new database var db = dyno('/tmp/users'); +var user = 'chilts'; + // do the above sequence -db.putItem('chilts', { nick : 'chilts', email : 'me@example.com' }, flake(), function(err) { +db.putItem(user, { nick : 'chilts', email : 'me@example.com' }, flake(), function(err) { ...
6bbea72f596cfa83b8cf50d3f546fff1bb3ff900
src/nls/de/urls.js
src/nls/de/urls.js
/* * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the ri...
/* * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the ri...
Add third-party and CC-BY license URLs for 'de' locale
Add third-party and CC-BY license URLs for 'de' locale
JavaScript
mit
Cartman0/brackets,ralic/brackets,MantisWare/brackets,y12uc231/brackets,Mosoc/brackets,iamchathu/brackets,nucliweb/brackets,flukeout/brackets,sophiacaspar/brackets,fronzec/brackets,pkdevbox/brackets,riselabs-ufba/RiPLE-HC-ExperimentalData,zaggino/brackets-electron,mjurczyk/brackets,82488059/brackets,2youyouo2/cocoslite,...
--- +++ @@ -26,5 +26,7 @@ define({ // Relative to the samples folder - "GETTING_STARTED" : "de/Erste Schritte" + "GETTING_STARTED" : "de/Erste Schritte", + "ADOBE_THIRD_PARTY" : "http://www.adobe.com/go/thirdparty_de/", + "WEB_PLATFORM_DOCS_LICENSE" : "http://creativecommons.or...
7e84c0227dd793591188454e9cc1e3b63d6b8b9f
examples/example.tls.js
examples/example.tls.js
'use strict'; var spdyPush = require('..') , spdy = require('spdy') , express = require('express') , path = require('path') , fs = require('fs'); var app = express(); app.use(spdyPush.referrer()); app.use(express.static(path.join(__dirname, '../test/site'))); var options = { key: fs.readFileSync(path.join(_...
'use strict'; var spdyPush = require('..') , spdy = require('spdy') , express = require('express') , path = require('path') , fs = require('fs'); var app = express(); app.use(spdyPush.referrer()); app.use(express.static(path.join(__dirname, '../test/site'))); var options = { key: fs.readFileSync(path.join(_...
Fix location of SSL key and certificate
Fix location of SSL key and certificate
JavaScript
mit
halvards/spdy-referrer-push
--- +++ @@ -13,10 +13,5 @@ key: fs.readFileSync(path.join(__dirname, '../test/keys/spdy-key.pem')), cert: fs.readFileSync(path.join(__dirname, '../test/keys/spdy-cert.pem')) }; -options = { - key: fs.readFileSync(process.env.HOME + '/.ssh/localhost.key'), - cert: fs.readFileSync(process.env.HOME + '/.ssh/loc...
54315706195e9280beccdaa7e7cffadef1cecdee
website/static/js/filerenderer.js
website/static/js/filerenderer.js
/* * Refresh rendered file through mfr */ 'use strict'; var $ = require('jquery'); var $osf = require('js/osfHelpers'); var FileRenderer = { start: function(url, selector){ this.url = url; this.tries = 0; this.ALLOWED_RETRIES = 10; this.element = $(selector); this.getCac...
/* * Refresh rendered file through mfr */ var $ = require('jquery'); var $osf = require('js/osfHelpers'); function FileRenderer(url, selector) { var self = this; self.url = url; self.tries = 0; self.selector = selector; self.ALLOWED_RETRIES = 10; self.element = $(selector); self.start...
Refactor to OOP ish design
Refactor to OOP ish design
JavaScript
apache-2.0
wearpants/osf.io,monikagrabowska/osf.io,KAsante95/osf.io,cosenal/osf.io,doublebits/osf.io,abought/osf.io,mluo613/osf.io,ticklemepierce/osf.io,GageGaskins/osf.io,billyhunt/osf.io,KAsante95/osf.io,chennan47/osf.io,ZobairAlijan/osf.io,GageGaskins/osf.io,acshi/osf.io,ticklemepierce/osf.io,ckc6cz/osf.io,mluo613/osf.io,bayle...
--- +++ @@ -2,37 +2,43 @@ * Refresh rendered file through mfr */ -'use strict'; - var $ = require('jquery'); var $osf = require('js/osfHelpers'); -var FileRenderer = { - start: function(url, selector){ - this.url = url; - this.tries = 0; - this.ALLOWED_RETRIES = 10; - this.ele...
fb8ff704821e18be2a8aef117f69e32f408cfc5b
models/index.js
models/index.js
/* * Copyright (c) 2014-2020 Bjoern Kimminich. * SPDX-License-Identifier: MIT */ /* jslint node: true */ const fs = require('fs') const path = require('path') const sequelizeNoUpdateAttributes = require('sequelize-noupdate-attributes') const Sequelize = require('sequelize') const sequelize = new Sequelize('database...
/* * Copyright (c) 2014-2020 Bjoern Kimminich. * SPDX-License-Identifier: MIT */ /* jslint node: true */ const fs = require('fs') const path = require('path') const sequelizeNoUpdateAttributes = require('sequelize-noupdate-attributes') const Sequelize = require('sequelize') const sequelize = new Sequelize('database...
Revert SQLite to file-based instead of in-memory
Revert SQLite to file-based instead of in-memory
JavaScript
mit
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
--- +++ @@ -10,7 +10,7 @@ const Sequelize = require('sequelize') const sequelize = new Sequelize('database', 'username', 'password', { dialect: 'sqlite', - storage: ':memory:', // replace with 'data/juiceshop.sqlite' for debugging + storage: 'data/juiceshop.sqlite', logging: false }) sequelizeNoUpdateAttr...
2b37f7f163fa4eec831e72e1f876ffad3894e1df
pipeline/app/assets/javascripts/app.js
pipeline/app/assets/javascripts/app.js
'use strict'; var pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']); pathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) { //Default route $urlRouterProvider.otherwise('/'); $locationProvider.html5Mode(true); $stateProvider .state('home', { url: '/', ...
'use strict'; var pathwayApp = angular.module('pathwayApp', ['ui.router', 'templates']); pathwayApp.config(function($stateProvider, $urlRouterProvider, $locationProvider) { //Default route $urlRouterProvider.otherwise('/'); $locationProvider.html5Mode(true); $stateProvider .state('home', { url: '/', ...
Add logout and register state, remove incorrect templateUrl
Add logout and register state, remove incorrect templateUrl
JavaScript
mit
aattsai/Pathway,aattsai/Pathway,aattsai/Pathway
--- +++ @@ -10,12 +10,20 @@ .state('home', { url: '/', templateUrl: 'index.html', - // templateUrl: '../app/assets/templates/index.html', controller: 'HomeController' + }) + .state('logout', { + url: '/', + controller: 'UserController' }) .state('login', { url: '/user/login', ...
884def1c71c748655bc294e2b3084c627973a848
test/db-helpers.js
test/db-helpers.js
const fs = require('fs'); const { promisify } = require('util'); const mongodb = require('mongodb'); const request = require('request'); async function readMongoDocuments(file) { const ISODate = (d) => new Date(d); const ObjectId = (id) => mongodb.ObjectID.createFromHexString(id); return eval(await fs.promises.r...
const fs = require('fs'); const { promisify } = require('util'); const mongodb = require('mongodb'); const request = require('request'); async function readMongoDocuments(file) { const ISODate = (d) => new Date(d); const ObjectId = (id) => mongodb.ObjectID.createFromHexString(id); return eval(await fs.promises.r...
Allow importing test data for any db collection
fix(tests): Allow importing test data for any db collection
JavaScript
mit
openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd,openwhyd/openwhyd
--- +++ @@ -9,13 +9,15 @@ return eval(await fs.promises.readFile(file, 'utf-8')); } -async function insertTestData(url, users, posts) { +async function insertTestData(url, docsPerCollection) { const mongoClient = await mongodb.MongoClient.connect(url); const db = mongoClient.db(); - await db.collection('...
4a9a3246f633c3ddb358d3e79a38b39bb2a61bb1
src/fetch-error.js
src/fetch-error.js
/** * fetch-error.js * * FetchError interface for operational errors */ /** * Create FetchError instance * * @param String message Error message for human * @param String type Error type for machine * @param String systemError For Node.js system error * @return FetchError...
/** * fetch-error.js * * FetchError interface for operational errors */ /** * Create FetchError instance * * @param String message Error message for human * @param String type Error type for machine * @param String systemError For Node.js system error * @return FetchError...
Remove dependency on Node.js' util module
Remove dependency on Node.js' util module Closes #194.
JavaScript
mit
jkantr/node-fetch,bitinn/node-fetch
--- +++ @@ -14,11 +14,11 @@ * @return FetchError */ export default function FetchError(message, type, systemError) { + Error.call(this, message); // hide custom error implementation details from end-users Error.captureStackTrace(this, this.constructor); - this.name = this.constructor.name; this.messag...
8114331a8425621e2eb98f39045289ed08bb2e0d
test/e2e/config/delays.js
test/e2e/config/delays.js
/* * In order to prevent errors caused by e2e tests running too fast you can slow them down by calling the following * function. Use higher values for slower tests. * * utils.delayPromises(30); * */ var promisesDelay = 50; function delayPromises(milliseconds) { var executeFunction = browser.driver.controlFl...
/* * In order to prevent errors caused by e2e tests running too fast you can slow them down by calling the following * function. Use higher values for slower tests. * * utils.delayPromises(30); * */ var promisesDelay = 0; function delayPromises(milliseconds) { var executeFunction = browser.driver.controlFlo...
Set delay to zero for local development.
Set delay to zero for local development.
JavaScript
apache-2.0
codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client
--- +++ @@ -5,7 +5,7 @@ * utils.delayPromises(30); * */ -var promisesDelay = 50; +var promisesDelay = 0; function delayPromises(milliseconds) {
d761c33ce8effc9640fccfb4e409bf6a6ee33a91
util/subtitles.js
util/subtitles.js
const parseTime = (s) => { const re = /(\d{2}):(\d{2}):(\d{2}),(\d{3})/; const [, hours, mins, seconds, ms] = re.exec(s); return 3600*(+hours) + 60*(+mins) + (+seconds) + 0.001*(+ms); }; export const parseSRT = (text) => { const normText = text.replace(/\r\n/g, '\n'); // normalize newlines const re = /(\d+)...
const parseTime = (s) => { const re = /(\d{2}):(\d{2}):(\d{2}),(\d{3})/; const [, hours, mins, seconds, ms] = re.exec(s); return 3600*(+hours) + 60*(+mins) + (+seconds) + 0.001*(+ms); }; export const parseSRT = (text) => { const normText = text.replace(/\r\n/g, '\n'); // normalize newlines const re = /(\d+)...
Trim whitespace on subtitle import
Trim whitespace on subtitle import
JavaScript
mit
rsimmons/voracious,rsimmons/immersion-player,rsimmons/immersion-player,rsimmons/voracious,rsimmons/voracious
--- +++ @@ -24,7 +24,7 @@ subs.push({ begin, end, - lines, + lines: lines.trim(), }); re.lastIndex = found.index + full.length; }
de74589c0323ad7d0323345fd9e214fb42498e8c
config/env/production.js
config/env/production.js
/** * Production environment settings * * This file can include shared settings for a production environment, * such as API keys or remote database passwords. If you're using * a version control solution for your Sails app, this file will * be committed to your repository unless you add it to your .gitignore * ...
/** * Production environment settings * * This file can include shared settings for a production environment, * such as API keys or remote database passwords. If you're using * a version control solution for your Sails app, this file will * be committed to your repository unless you add it to your .gitignore * ...
Set port to environment variable.
Set port to environment variable.
JavaScript
mit
aug70/redrum-js-client,aug70/redrum-js-client
--- +++ @@ -11,6 +11,8 @@ */ module.exports = { + + port: process.env.PORT || 1337, facebookConfig: { apiKey: '175967239248590',
e5c01d6b96b1aec411017bf20069d6706623ff60
test/markup-frame-test.js
test/markup-frame-test.js
import React from 'react'; import { expect } from 'chai'; import { mount } from 'enzyme'; import MarkupFrame from '../src'; describe( '<MarkupFrame />', () => { it( 'renders an iframe', () => { const wrapper = mount( <MarkupFrame markup="" /> ); expect( wrapper.some( 'iframe' ) ).to.equal( true ); } ); it( 'in...
import React from 'react'; import { expect } from 'chai'; import { mount } from 'enzyme'; import MarkupFrame from '../src'; describe( '<MarkupFrame />', function() { it( 'renders an iframe', function() { const wrapper = mount( <MarkupFrame markup="" /> ); expect( wrapper.find( 'iframe' ) ).to.have.length( 1 ); }...
Update tests to cover most common cases
Update tests to cover most common cases They don't work, of course, because (I think) some mix of React, jsdom, and iframes don't work correctly together.
JavaScript
mit
sirbrillig/markup-frame
--- +++ @@ -3,13 +3,20 @@ import { mount } from 'enzyme'; import MarkupFrame from '../src'; -describe( '<MarkupFrame />', () => { - it( 'renders an iframe', () => { +describe( '<MarkupFrame />', function() { + it( 'renders an iframe', function() { const wrapper = mount( <MarkupFrame markup="" /> ); - expect( ...
9578954c6b1817ff7a8e8bfa0a4532835c8040e9
client/js/app.js
client/js/app.js
console.log('Tokimeki Memorial');
console.log('Tokimeki Memorial'); var host = window.document.location.host.replace(/:.*/, ''); var ws = new WebSocket('ws://' + host + ':8000'); ws.onmessage = function (event) { //console.log(event); //console.log(JSON.parse(event.data)); };
Make WS connection in index page for testing purposes.
Make WS connection in index page for testing purposes.
JavaScript
apache-2.0
AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers,AI-comp/AILovers
--- +++ @@ -1 +1,9 @@ console.log('Tokimeki Memorial'); + +var host = window.document.location.host.replace(/:.*/, ''); +var ws = new WebSocket('ws://' + host + ':8000'); + +ws.onmessage = function (event) { + //console.log(event); + //console.log(JSON.parse(event.data)); +};
b8cf678c13325df71135b3e7cc5fc521a3a98b1b
polyfill/fetch.js
polyfill/fetch.js
import "mojave/polyfill/Promise"; import "unfetch/polyfill"; export default window.fetch;
import "mojave/polyfill/promise"; import "unfetch/polyfill"; export default window.fetch;
Fix case of promise polyfill
Fix case of promise polyfill
JavaScript
bsd-3-clause
Becklyn/mojave,Becklyn/mojave,Becklyn/mojave
--- +++ @@ -1,4 +1,4 @@ -import "mojave/polyfill/Promise"; +import "mojave/polyfill/promise"; import "unfetch/polyfill"; export default window.fetch;
cc0a3c204f59e1039cad5b592d969fac30c40fbf
src/components/Members/MemberDetail.js
src/components/Members/MemberDetail.js
import React, { Component, PropTypes } from 'react'; class MembersDetail extends Component { render() { const {displayName} = this.props; return ( <div> <h1>{displayName}</h1> </div> ); } } MembersDetail.propTypes = { displayName: PropTypes.string.isRequired, }; export default ...
import React, { Component, PropTypes } from 'react'; class MembersDetail extends Component { render() { const {displayName, image} = this.props; return ( <div> <h1>{displayName}</h1> <img src={image.uri} style={{ display: 'inline-block', paddingRight: '10px', ...
Add image and proptypes for member detail page
Add image and proptypes for member detail page
JavaScript
cc0-1.0
cape-io/acf-client,cape-io/acf-client
--- +++ @@ -3,10 +3,14 @@ class MembersDetail extends Component { render() { - const {displayName} = this.props; + const {displayName, image} = this.props; return ( <div> <h1>{displayName}</h1> + <img src={image.uri} style={{ + display: 'inline-block', + paddi...
d794502bfcc0204aa7fdbe6d9f103a1099919718
kolibri/core/assets/src/state/modules/snackbar.js
kolibri/core/assets/src/state/modules/snackbar.js
export default { state: { isVisible: false, options: { text: '', autoDismiss: true, }, }, getters: { snackbarIsVisible(state) { return state.isVisible; }, snackbarOptions(state) { return state.options; }, }, mutations: { CORE_CREATE_SNACKBAR(state, snack...
export default { state: { isVisible: false, options: { text: '', autoDismiss: true, }, }, getters: { snackbarIsVisible(state) { return state.isVisible; }, snackbarOptions(state) { return state.options; }, }, mutations: { CORE_CREATE_SNACKBAR(state, snack...
Add comment about autodismiss options
Add comment about autodismiss options
JavaScript
mit
lyw07/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,lyw07/kolibri,mrpau/kolibri,lyw07/kolibri,indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri,lyw07/kolibri
--- +++ @@ -21,6 +21,8 @@ state.options = {}; // set new options state.isVisible = true; + // options include text, autoDismiss, duration, actionText, actionCallback, + // hideCallback state.options = snackbarOptions; }, CORE_CLEAR_SNACKBAR(state) {
23010015c762a1274597e2754d190fabad078cfe
src/components/SearchResultListItem.js
src/components/SearchResultListItem.js
import React from 'react'; import { connect } from 'react-redux'; const DocumentListItem = ({ title, collection, schema }) => ( <tr className={`result result--${schema}`}> <td>{ title }</td> <td className="result__collection">{ collection && collection.label }</td> <td></td> </tr> ); const PersonListI...
import React from 'react'; import { connect } from 'react-redux'; const DocumentListItem = ({ title, collection, schema }) => ( <tr className={`result result--${schema}`}> <td>{ title }</td> <td className="result__collection">{ collection && collection.label }</td> <td></td> </tr> ); const PersonListI...
Add placeholder for loading collection names
Add placeholder for loading collection names
JavaScript
mit
alephdata/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph
--- +++ @@ -12,7 +12,12 @@ const PersonListItem = ({ name, collection, schema }) => ( <tr className={`result result--${schema}`}> <td className="result__name">{ name }</td> - <td className="result__collection">{ collection && collection.label }</td> + <td className="result__collection"> + { coll...
be3331f24e7693c41e012a2eb935d474de224f1f
frontend/web/js/main.js
frontend/web/js/main.js
$(document).ready(function() { $('#global-modal-container').on('show.bs.modal', function (event) { sourceUrl = $(event.relatedTarget).attr('href'); getGlobalModalHtml(sourceUrl); }); }); function getGlobalModalHtml(url) { $.ajax({ url: url, type: "post", success: fu...
$(document).ready(function() { $('#global-modal-container').on('show.bs.modal', function (event) { sourceUrl = $(event.relatedTarget).attr('href'); getGlobalModalHtml(sourceUrl); $('.tooltip').hide(); }); }); function getGlobalModalHtml(url) { $.ajax({ url: url, type...
Hide all tooltips when showing a modal window
Hide all tooltips when showing a modal window
JavaScript
bsd-3-clause
gooGooGaJoob/banthecan,gooGooGaJoob/banthecan,gooGooGaJoob/banthecan
--- +++ @@ -2,6 +2,7 @@ $('#global-modal-container').on('show.bs.modal', function (event) { sourceUrl = $(event.relatedTarget).attr('href'); getGlobalModalHtml(sourceUrl); + $('.tooltip').hide(); }); });
1faf99e332f94ab27fcef68f05ef8760c219bf4c
static-routes/stylesheets.js
static-routes/stylesheets.js
const sass = require('node-sass'); const path = require('path'); const config = require('../config'); const fs = require('fs'); const imdino = require('imdi-no'); const development = config.env === 'development'; module.exports = { "/stylesheets/main.css": function (callback) { const opts = { file: ...
const sass = require('node-sass'); const path = require('path'); const config = require('../config'); const fs = require('fs'); const imdino = require('imdi-no'); const development = config.env === 'development'; module.exports = { "/stylesheets/main.css": function (callback) { const opts = { file: ...
Use require.resolve to locate main.scss
Use require.resolve to locate main.scss
JavaScript
mit
bengler/imdikator,bengler/imdikator
--- +++ @@ -10,7 +10,7 @@ "/stylesheets/main.css": function (callback) { const opts = { - file: path.join(__dirname, "/../stylesheets/main.scss"), + file: require.resolve("../stylesheets/main.scss"), outFile: '/stylesheets/main.css', includePath...
dc50cc1124f8c39b4000eba4d0914191ddd4245a
libs/oada-lib-arangodb/libs/exampledocs/tokens.js
libs/oada-lib-arangodb/libs/exampledocs/tokens.js
module.exports = [ { "_key": "default:token-123", "token": "xyz", "scope": ["oada-rocks:all"], "createTime": 1413831649937, "expiresIn": 60, "user": { "_id": "default:users-frank-123" }, "clientId": "jf93caauf3uzud7f308faesf3@provider.oada-dev.com" } ];
module.exports = [ { "_key": "default:token-123", "token": "xyz", "scope": ["oada.rocks:all"], "createTime": 1413831649937, "expiresIn": 60, "user": { "_id": "default:users-frank-123" }, "clientId": "jf93caauf3uzud7f308faesf3@provider.oada-dev.com" } ];
Add scope to token xyz.
Add scope to token xyz.
JavaScript
apache-2.0
OADA/oada-srvc-docker,OADA/oada-srvc-docker,OADA/oada-srvc-docker,OADA/oada-srvc-docker
--- +++ @@ -2,7 +2,7 @@ { "_key": "default:token-123", "token": "xyz", - "scope": ["oada-rocks:all"], + "scope": ["oada.rocks:all"], "createTime": 1413831649937, "expiresIn": 60, "user": { "_id": "default:users-frank-123" },
ccd35fed533ac20783ccf70a09a81c1aaf611341
templates/javascript/FluxAction.js
templates/javascript/FluxAction.js
'use strict'; var <%= classedName %> = { } <% if (es6) { %> export default <%= classedName %>; <% } else { %>module.exports = <%= classedName %>; <% } %>
'use strict'; var <%= classedName %> = { }; <% if (es6) { %> export default <%= classedName %>; <% } else { %>module.exports = <%= classedName %>; <% } %>
Add missing semicolon to avoid warnings
Add missing semicolon to avoid warnings
JavaScript
mit
mattludwigs/generator-react-redux-kit,mattludwigs/generator-react-redux-kit,react-webpack-generators/generator-react-webpack,newtriks/generator-react-webpack
--- +++ @@ -2,7 +2,7 @@ var <%= classedName %> = { -} +}; <% if (es6) { %> export default <%= classedName %>; <% } else { %>module.exports = <%= classedName %>; <% } %>
bd5644d859ccb3639666afe46fda03d3610bb374
public/modules/slideshows/services/slideshows.client.service.js
public/modules/slideshows/services/slideshows.client.service.js
/*global angular*/ (function () { 'use strict'; //Slideshows service used to communicate Slideshows REST endpoints angular.module('slideshows').factory('Slideshows', ['$resource', function ($resource) { return $resource('slideshows/:slideshowId', { slideshow...
/*global angular*/ (function () { 'use strict'; //Slideshows service used to communicate Slideshows REST endpoints angular.module('slideshows').factory('Slideshows', ['$resource', function ($resource) { return $resource('slideshows/:slideshowId', { slideshowId: '@_id' ...
Add name as parameter when geting devices for a slideshow
Add name as parameter when geting devices for a slideshow
JavaScript
mit
tmol/iQSlideShow,tmol/iQSlideShow,tmol/iQSlideShow
--- +++ @@ -5,10 +5,22 @@ //Slideshows service used to communicate Slideshows REST endpoints angular.module('slideshows').factory('Slideshows', ['$resource', function ($resource) { - return $resource('slideshows/:slideshowId', - { slideshowId: '@_id' }, - ...
dbee31c17ab6f6376683e97cb1904820d37fcd65
website/src/html.js
website/src/html.js
import React from 'react' import PropTypes from 'prop-types' export default function HTML(props) { return ( <html {...props.htmlAttributes}> <head> <meta charSet="utf-8" /> <meta httpEquiv="x-ua-compatible" content="ie=edge" /> <meta ...
import React from 'react' import PropTypes from 'prop-types' export default function HTML(props) { return ( <html {...props.htmlAttributes}> <head> <meta charSet="utf-8" /> <meta httpEquiv="x-ua-compatible" content="ie=edge" /> <meta ...
Revert "Move DocSearch styles before headComponents"
Revert "Move DocSearch styles before headComponents" This reverts commit 1232ccbc0ff6c5d9e80de65cefb352c404973e2f.
JavaScript
mit
spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy
--- +++ @@ -11,11 +11,11 @@ name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> + {props.headComponents} <link rel="stylesheet" href="https://cdn.jsdelivr...
b8f6446ee6a1eb0a149a4f69182f2004b09500ea
app/angular/controllers/games_controller.js
app/angular/controllers/games_controller.js
'use strict'; module.exports = function(app) { app.controller('GamesController', ['$scope', 'UserService', 'FriendService', 'GameService', 'SearchService', function($scope, UserService, FriendService, GameService, SearchService) { let ctrl = this; $scope.FriendService = FriendService; $scope.allFriends ...
'use strict'; module.exports = function(app) { app.controller('GamesController', ['$scope', 'UserService', 'FriendService', 'GameService', 'SearchService', function($scope, UserService, FriendService, GameService, SearchService) { let ctrl = this; $scope.FriendService = FriendService; $scope.allFriends ...
Remove catch from createGame method. Errors are handled by service layer of app.
Remove catch from createGame method. Errors are handled by service layer of app.
JavaScript
mit
sendjmoon/GolfFourFriends,sendjmoon/GolfFourFriends
--- +++ @@ -14,10 +14,7 @@ ctrl.createGame = function(gameData) { gameData.players = ctrl.players; - GameService.createGame(gameData) - .catch((err) => { - console.log('Error creating game.'); - }); + GameService.createGame(gameData); }; ctrl.addUserToGame = ...
2acffe782320c79648816c3a181138b71babb60c
config/webpack.common.js
config/webpack.common.js
const webpack = require('webpack'); const helpers = require('./helpers'); module.exports = { entry: { 'index': './src/index.js', // 'test': './src/test.js' }, output: { path: helpers.root('dist'), filename: '[name].js', chunkFilename: '[id].chunk.js', libraryTar...
const webpack = require('webpack'); const helpers = require('./helpers'); module.exports = { entry: { 'index': './src/index.js', // 'test': './src/test.js' }, output: { path: helpers.root('dist'), filename: '[name].js', chunkFilename: '[id].chunk.js', libraryTar...
Update UMD Named define to true
Update UMD Named define to true
JavaScript
mit
maniator/servable,maniator/servable
--- +++ @@ -13,6 +13,7 @@ chunkFilename: '[id].chunk.js', libraryTarget: 'umd', library: 'Servable', + umdNamedDefine: true, }, performance: {
fc2c58045d1015187ab6c9cad4532238e6c90736
next-migrations/src/migrations/20180605215102_users.js
next-migrations/src/migrations/20180605215102_users.js
exports.up = function(knex, Promise) { return Promise.all([ knex.schema.createTable('next_users', table => { table.bigIncrements() table.string('email') table.string('name') table.string('password') table.string('origin') table.string('baseurl') table.string('phone') ...
exports.up = function(knex, Promise) { return Promise.all([ knex.schema.createTable('next_users', table => { table.bigIncrements() table.string('email') table.string('name') table.string('password') table.string('origin') table.string('baseurl') table.string('phone') ...
Revert to using timestamps in database.
TeikeiNext: Revert to using timestamps in database.
JavaScript
agpl-3.0
teikei/teikei,teikei/teikei,teikei/teikei
--- +++ @@ -11,11 +11,11 @@ table.boolean('isVerified') table.string('verifyToken') table.string('verifyShortToken') - table.bigint('verifyExpires') + table.timestamp('verifyExpires') table.json('verifyChanges') table.string('resetToken') table.string('resetShortTok...
aecf231cb6310fba9af5a07ffbcced2e084a799d
config/ember-try.js
config/ember-try.js
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#release' }, resolutions: { 'ember': 'release' } }, { name: 'ember-beta', dependencies: {...
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember 1.13', dependencies: { 'ember': '1.13.8' }, resolutions: { 'ember': '1.13.8' } }, { name: 'ember-release', dependencies: { 'ember': '...
Add 1.13 to the test matrix
Add 1.13 to the test matrix
JavaScript
mit
cibernox/ember-power-select,chrisgame/ember-power-select,cibernox/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select,Dremora/ember-power-select,esbanarango/ember-power-select
--- +++ @@ -3,6 +3,15 @@ { name: 'default', dependencies: { } + }, + { + name: 'ember 1.13', + dependencies: { + 'ember': '1.13.8' + }, + resolutions: { + 'ember': '1.13.8' + } }, { name: 'ember-release',
38aa4dc763e6903cce4ee66c4cbdfdd104b05cd7
config/processes.js
config/processes.js
'use strict'; const config = {}; /** * Heroku makes it available to help calculate correct concurrency * @see https://devcenter.heroku.com/articles/node-concurrency#tuning-the-concurrency-level */ config.memoryAvailable = parseInt(process.env.MEMORY_AVAILABLE, 10); /** * Expected MAX memory footprint of a single c...
'use strict'; const config = {}; /** * Heroku makes it available to help calculate correct concurrency * @see https://devcenter.heroku.com/articles/node-concurrency#tuning-the-concurrency-level */ config.memoryAvailable = parseInt(process.env.MEMORY_AVAILABLE, 10); /** * Expected MAX memory footprint of a single c...
Load test 170 per process
Load test 170 per process
JavaScript
mit
DoSomething/gambit,DoSomething/gambit
--- +++ @@ -13,7 +13,7 @@ * The value in the Procfile is 90% of the estimated processMemory here. * Based on a Heroku recommendation. @see https://blog.heroku.com/node-habits-2016#7-avoid-garbage */ -config.processMemory = 200; +config.processMemory = 170; /** * Calculate total amount of concurre...
405acc213c0861d4aab21a568c5419d4a48a2b57
test/testHelper.js
test/testHelper.js
require("babel/register")({ stage: 1, ignore: /node_modules/ }); global.Promise = require('bluebird') global.Promise.onPossiblyUnhandledRejection((e) => { throw e; }); global.Promise.config({ // Enable warnings. warnings: false, // Enable long stack traces. longStackTraces: true, // Enable cancellation....
require("babel/register")({ stage: 1, ignore: /node_modules/ }); global.Promise = require('bluebird') global.Promise.onPossiblyUnhandledRejection((e) => { throw e; }); global.Promise.config({ // Enable warnings. warnings: false, // Enable long stack traces. longStackTraces: true, // Enable cancellation....
Add postgres connection and knex to global test variables.
Add postgres connection and knex to global test variables.
JavaScript
mit
golozubov/freefeed-server,golozubov/freefeed-server,SiTLar/freefeed-server,FreeFeed/freefeed-server,FreeFeed/freefeed-server,SiTLar/freefeed-server
--- +++ @@ -18,3 +18,5 @@ GLOBAL.$redis = require('../config/database') , GLOBAL.$database = $redis.connect() , GLOBAL.$should = require('chai').should() + , GLOBAL.$postgres = require('../config/postgres') + , GLOBAL.$pg_database = $postgres.connect()
79865e36fa70a52d04f586b24da14a216b883432
test/media-test.js
test/media-test.js
/* Global Includes */ var testCase = require('mocha').describe; var pre = require('mocha').before; var preEach = require('mocha').beforeEach; var post = require('mocha').after; var postEach = require('mocha').afterEach; var assertions = require('mocha').it; var assert = require('chai').assert; v...
/* Global Includes */ var testCase = require('mocha').describe; var pre = require('mocha').before; var preEach = require('mocha').beforeEach; var post = require('mocha').after; var postEach = require('mocha').afterEach; var assertions = require('mocha').it; var assert = require('chai').assert; v...
Use time duration of test to measure the success
Media: Use time duration of test to measure the success Signed-off-by: Vaibhav Singh <c267fbcdc94c01eb807238c388b92f321583d99b@samsung.com>
JavaScript
mit
hoondol/artik-sdk,hoondol/artik-sdk
--- +++ @@ -14,6 +14,7 @@ /* Test Specific Includes */ var media = artik.media(); var sound_file = '/usr/share/sounds/alsa/Front_Center.wav'; +var start, end; /* Test Case Module */ testCase('Media', function() { @@ -22,10 +23,17 @@ }); testCase('#play_sound_file', function() { + this.timeout(5000); + ...
a16b17307bd5658f6ce9eaea4002e7860cea908b
webpack.config.js
webpack.config.js
// Copyright 2018 Google LLC // // 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 // // <https://www.apache.org/licenses/LICENSE-2.0> // // Unless required by applicable law or agreed to i...
// Copyright 2018 Google LLC // // 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 // // <https://www.apache.org/licenses/LICENSE-2.0> // // Unless required by applicable law or agreed to i...
Support older JavaScript engine shells.
Support older JavaScript engine shells.
JavaScript
apache-2.0
v8/promise-performance-tests
--- +++ @@ -14,6 +14,7 @@ const fs = require("fs"); const path = require("path"); +const webpack = require("webpack"); module.exports = fs .readdirSync("src") @@ -27,5 +28,15 @@ }, optimization: { minimize: false - } + }, + plugins: [ + new webpack.BannerPlugin({ + bann...
d251916fa362ce6064bbcef28eaa009294e2271a
app/components/summer-note.js
app/components/summer-note.js
/* This is just a proxy file requiring the component from the /addon folder and making it available to the dummy application! */ import SummerNoteComponent from 'ember-cli-bootstrap3-wysiwyg/components/bs-wysihtml5'; export default SummerNoteComponent;
/* This is just a proxy file requiring the component from the /addon folder and making it available to the dummy application! */ import SummerNoteComponent from 'ember-cli-summernote/components/summer-note'; export default SummerNoteComponent;
Fix the import path error.
Fix the import path error.
JavaScript
mit
Flightlogger/ember-cli-summernote,brett-anderson/ember-cli-summernote,vsymguysung/ember-cli-summernote,Flightlogger/ember-cli-summernote,wzowee/ember-cli-summernote,wzowee/ember-cli-summernote,emoryy/ember-cli-summernote,vsymguysung/ember-cli-summernote,emoryy/ember-cli-summernote,brett-anderson/ember-cli-summernote
--- +++ @@ -2,6 +2,6 @@ This is just a proxy file requiring the component from the /addon folder and making it available to the dummy application! */ -import SummerNoteComponent from 'ember-cli-bootstrap3-wysiwyg/components/bs-wysihtml5'; +import SummerNoteComponent from 'ember-cli-summernote/components/summer-...
9a521faa76fd26b762f7b45096d5dc8ec1608429
assets/js/vendor/sb-admin-2.js
assets/js/vendor/sb-admin-2.js
$(function() { $('#side-menu').metisMenu(); }); //Loads the correct sidebar on window load, //collapses the sidebar on window resize. // Sets the min-height of #page-wrapper to window size $(function() { $(window).bind("load resize", function() { topOffset = 50; width = (this.window.innerWidt...
$(function() { $('#side-menu').metisMenu(); }); //Loads the correct sidebar on window load, //collapses the sidebar on window resize. // Sets the min-height of #page-wrapper to window size $(function() { $(window).bind("load resize", function() { topOffset = 50; width = (this.window.innerWidt...
Fix highlighting of menu points for sub-routes.
Fix highlighting of menu points for sub-routes.
JavaScript
mit
kumpelblase2/modlab,kumpelblase2/modlab
--- +++ @@ -28,7 +28,7 @@ var url = window.location; var element = $('ul.nav a').filter(function() { - return this.href == url; + return this.href == url || url.href.indexOf(this.href) == 0; }).addClass('active').parent().parent().addClass('in').parent(); if (element.is('li')) { ...
3ba0a0fd6bacacb7328fbab9ef335d7697ebb1cb
js/lowlight.js
js/lowlight.js
"use strict"; /* NOT a general purpose escaper! Only valid when *content* of a tag, not within an attribute. */ function escape(code) { return code .replace("&", "&amp;", "g") .replace("<", "&lt;", "g") .replace(">", "&gt;", "g"); } function lowlight(lang, lexer, code) { var ret = "...
"use strict"; /* NOT a general purpose escaper! Only valid when *content* of a tag, not within an attribute. */ function escape(code) { return code .replace("&", "&amp;", "g") .replace("<", "&lt;", "g") .replace(">", "&gt;", "g"); } function lowlight(lang, lexer, code) { var ret = "...
Add span content as content attribute
Add span content as content attribute This allows styles to use it in CSS `.foo[content*=bar]` selectors.
JavaScript
apache-2.0
lucaswerkmeister/ColorTrompon,lucaswerkmeister/ColorTrompon
--- +++ @@ -31,8 +31,11 @@ if (type == "ceylon.lexer.core::TokenType") break; ret += " "; } + var escaped = escape(cur.text); + ret += "\" content=\""; + ret += escaped; ret += "\">"; - ret += escape(cur.text); + ...
707e854d6213dd9580c22a08a7e694f3923c723d
src/url_handler.js
src/url_handler.js
import { flashURLHandler } from './urlhandlers/flash_url_handler'; import { nodeURLHandler } from './urlhandlers/mock_node_url_handler'; import { XHRURLHandler } from './urlhandlers/xhr_url_handler'; function get(url, options, cb) { // Allow skip of the options param if (!cb) { if (typeof options === 'function...
import { flashURLHandler } from './urlhandlers/flash_url_handler'; import { nodeURLHandler } from './urlhandlers/mock_node_url_handler'; import { XHRURLHandler } from './urlhandlers/xhr_url_handler'; function get(url, options, cb) { // Allow skip of the options param if (!cb) { if (typeof options === 'function...
Remove useless check from default urlhandler
[util] Remove useless check from default urlhandler
JavaScript
mit
dailymotion/vast-client-js
--- +++ @@ -11,10 +11,7 @@ options = {}; } - if (options.urlhandler && options.urlhandler.supported()) { - // explicitly supply your own URLHandler object - return options.urlhandler.get(url, options, cb); - } else if (typeof window === 'undefined' || window === null) { + if (typeof window === 'und...
f5078515f9eea811adb79def7748350c37306c0a
packages/react-hot-boilerplate/webpack.config.js
packages/react-hot-boilerplate/webpack.config.js
var webpack = require('webpack'); module.exports = { devtool: 'eval', entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './scripts/index' ], output: { path: __dirname + '/scripts/', filename: 'bundle.js', publicPath: '/scripts/' }, plugins: [...
var path = require('path'); var webpack = require('webpack'); module.exports = { devtool: 'eval', entry: [ 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './scripts/index' ], output: { path: path.join(__dirname, 'build'), filename: 'bundle.js', publicP...
Use include over exclude so npm link works
Use include over exclude so npm link works
JavaScript
mit
gaearon/react-hot-loader,gaearon/react-hot-loader
--- +++ @@ -1,3 +1,4 @@ +var path = require('path'); var webpack = require('webpack'); module.exports = { @@ -8,7 +9,7 @@ './scripts/index' ], output: { - path: __dirname + '/scripts/', + path: path.join(__dirname, 'build'), filename: 'bundle.js', publicPath: '/scripts/' }, @@ -20,8 ...
fa03a474f29e26078d0a9cd8700eca18c3107e50
js/stopwatch.js
js/stopwatch.js
(function(stopwatch){ var Game = stopwatch.Game = function(seconds){ this.target = 1000 * seconds; // in milliseconds }; Game.prototype.current = function(){ return 0; }; }; var GameView = stopwatch.GameView = function(game, container){ this.game = game; this.con...
(function(stopwatch){ var Game = stopwatch.Game = function(seconds){ this.target = 1000 * seconds; // in milliseconds this.started = false; this.stopped = false; }; Game.prototype.current = function(){ if (this.started) { return (this.stopped ? this.stopTime: this...
Create a start and stop method
Create a start and stop method
JavaScript
mit
dvberkel/StopWatch,dvberkel/StopWatch
--- +++ @@ -1,10 +1,27 @@ (function(stopwatch){ var Game = stopwatch.Game = function(seconds){ this.target = 1000 * seconds; // in milliseconds + this.started = false; + this.stopped = false; }; Game.prototype.current = function(){ + if (this.started) { + retur...
3c9cf063b0578c85362a81d76b5e84bb6faae9b2
const_and_let.js
const_and_let.js
#!/usr/bin/env node const constMessage = "Hello, World!"; console.log(constMessage); let letMessage = "Hello, World!"; console.log(letMessage); letMessage = "Goodbye, World!"; console.log(letMessage);
#!/usr/bin/env node const constMessage = "Hello, World!"; console.log(constMessage); let letMessage = "Hello, World!"; console.log(letMessage); letMessage = "Goodbye, World!"; console.log(letMessage); const é = "Accented"; console.log(é); const 学习 = "Learn"; console.log(学习); // const ∃ = "There exists"; CRASH // con...
Add weird variable names to let and const example
Add weird variable names to let and const example
JavaScript
apache-2.0
peopleware/js-training-node-scripting,peopleware/js-training-node-scripting
--- +++ @@ -7,3 +7,11 @@ console.log(letMessage); letMessage = "Goodbye, World!"; console.log(letMessage); + +const é = "Accented"; +console.log(é); +const 学习 = "Learn"; +console.log(学习); +// const ∃ = "There exists"; CRASH +// const 💹 = "Market"; CRASH +// const 😱 = "Eep!"; CRASH
06f6f2ff1dc60897f707e8a482a8ff1084ae8f7a
src/components/user/repo/trashbin.repo.js
src/components/user/repo/trashbin.repo.js
const { model: trashbinModel } = require('./db/trashbin.schema'); const createUserTrashbin = (userId) => { // access trashbin model const trashbin = trashbinModel({ userId, }); return trashbin.save(); }; const updateUserTrashbin = (userId, data = {}) => { // access trashbin model return trashbinModel.updateOn...
const { model: trashbinModel } = require('./db/trashbin.schema'); const createUserTrashbin = (userId) => { // access trashbin model const trashbin = trashbinModel({ userId, }); return trashbin.save(); }; const updateUserTrashbin = async (id, data = {}) => { // access trashbin model const trashbin = await tras...
Use Mongoose functions for updating
Use Mongoose functions for updating
JavaScript
agpl-3.0
schul-cloud/schulcloud-server,schul-cloud/schulcloud-server,schul-cloud/schulcloud-server
--- +++ @@ -8,9 +8,11 @@ return trashbin.save(); }; -const updateUserTrashbin = (userId, data = {}) => { +const updateUserTrashbin = async (id, data = {}) => { // access trashbin model - return trashbinModel.updateOne({ userId }, data, { upsert: true }); + const trashbin = await trashbinModel.findById(id).exec...
2f5b013afcc40bd90ba26aed33c9c5c142237016
packages/soya-next/src/pages/createBasePage.js
packages/soya-next/src/pages/createBasePage.js
import React from "react"; import { compose } from "react-apollo"; import hoistStatics from "hoist-non-react-statics"; import BaseProvider from "../components/BaseProvider"; import applyRedirect from "../router/applyRedirect"; import withCookies from "../cookies/withCookiesPage"; import withLocale from "../i18n/withLoc...
import React from "react"; import { compose } from "redux"; import hoistStatics from "hoist-non-react-statics"; import BaseProvider from "../components/BaseProvider"; import applyRedirect from "../router/applyRedirect"; import withCookies from "../cookies/withCookiesPage"; import withLocale from "../i18n/withLocalePage...
Replace react-apollo with redux compose
Replace react-apollo with redux compose
JavaScript
mit
traveloka/soya-next
--- +++ @@ -1,5 +1,5 @@ import React from "react"; -import { compose } from "react-apollo"; +import { compose } from "redux"; import hoistStatics from "hoist-non-react-statics"; import BaseProvider from "../components/BaseProvider"; import applyRedirect from "../router/applyRedirect";
015f85622b33df01971ffc784f0f7594da30c889
app/controllers/name.controller.js
app/controllers/name.controller.js
'use strict'; angular.module('houseBand') .controller('NameCtrl', function($state){ this.roomCheck = function(room){ if(room){ return $state.go('home', {room: room}) } alert('Please name your band') return false } });
'use strict'; angular.module('houseBand') .controller('NameCtrl', function($state){ this.roomCheck = function(room){ if(room){ return $state.go('home', {room: room.toLowerCase()}) } alert('Please name your band'); return false } });
Make room name lower case
Make room name lower case
JavaScript
mit
HouseBand/client,HouseBand/client
--- +++ @@ -5,9 +5,9 @@ .controller('NameCtrl', function($state){ this.roomCheck = function(room){ if(room){ - return $state.go('home', {room: room}) + return $state.go('home', {room: room.toLowerCase()}) } - alert('Please name your band') + alert('Please name your band'); return fa...
55e138a77becada80430cc7795bbb6bd23a66843
lib/index.js
lib/index.js
'use strict'; module.exports = (...trackers) => { const tracker = {}; tracker.createEvent = (eventName, eventData) => { trackers.forEach((tk) => { tk.createEvent(eventName, eventData); }); return tracker; }; return tracker; };
'use strict'; module.exports = function eventTracker() { const tracker = {}; const trackers = Array.prototype.slice.call(arguments); tracker.createEvent = (eventName, eventData) => { trackers.forEach((tk) => { tk.createEvent(eventName, eventData); }); return tracker; }; return tracker; };
Remove destructuring and add arguments
Remove destructuring and add arguments
JavaScript
mit
ZimpFidelidade/universal-event-tracker
--- +++ @@ -1,7 +1,8 @@ 'use strict'; -module.exports = (...trackers) => { +module.exports = function eventTracker() { const tracker = {}; + const trackers = Array.prototype.slice.call(arguments); tracker.createEvent = (eventName, eventData) => { trackers.forEach((tk) => {
9f8fa2f067e7b91cac796268dbabacdce5a3fc6c
test/boost-field-test.js
test/boost-field-test.js
var mongoose = require('mongoose') , elastical = require('elastical') , esClient = new(require('elastical').Client) , should = require('should') , config = require('./config') , Schema = mongoose.Schema , ObjectId = Schema.ObjectId , mongoosastic = require('../lib/mongoosastic'); var TweetSc...
var mongoose = require('mongoose') , elastical = require('elastical') , esClient = new(require('elastical').Client) , should = require('should') , config = require('./config') , Schema = mongoose.Schema , ObjectId = Schema.ObjectId , mongoosastic = require('../lib/mongoosastic'); var TweetSc...
Correct boost test field (support ES 0.9 and 1.0).
Correct boost test field (support ES 0.9 and 1.0). In my tests, the mapping format returned by the getMapping function is not the same between 0.90.11 and 1.0
JavaScript
mit
mongoosastic/mongoosastic,teambition/mongoosastic,ennosol/mongoosastic,francesconero/mongoosastic,ennosol/mongoosastic,guumaster/mongoosastic,francesconero/mongoosastic,mongoosastic/mongoosastic,avastms/mongoosastic,guumaster/mongoosastic,teambition/mongoosastic,mallzee/mongoosastic,guumaster/mongoosastic,mallzee/mongo...
--- +++ @@ -30,7 +30,11 @@ it('should create a mapping with boost field added', function(done){ BlogPost.createMapping(function(err, mapping){ esClient.getMapping('blogposts', 'blogpost', function(err, mapping){ - var props = mapping.blogposts.mappings.blogpost.properties; + /* elasticsea...
1569457c708195ea017fb047beab7ade7ed918ab
common/components/constants/ProjectConstants.js
common/components/constants/ProjectConstants.js
export const Locations = { OTHER: "Other", PRESET_LOCATIONS: [ "Seattle, WA", "Redmond, WA", "Kirkland, WA", "Bellevue, WA", "Tacoma, WA", "Olympia, WA", "Bay Area, CA", "Baltimore, MD", "Other" ] };
export const Locations = { OTHER: "Other", PRESET_LOCATIONS: [ "Seattle, WA", "Redmond, WA", "Kirkland, WA", "Bellevue, WA", "Tacoma, WA", "Olympia, WA", "Portland, OR", "Bay Area, CA", "Baltimore, MD", "Other" ] };
Add Portland, OR to location list
Add Portland, OR to location list
JavaScript
mit
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
--- +++ @@ -7,6 +7,7 @@ "Bellevue, WA", "Tacoma, WA", "Olympia, WA", + "Portland, OR", "Bay Area, CA", "Baltimore, MD", "Other"
38eb816b54300fec9ccf2ed3978f0dc66624981a
lib/index.js
lib/index.js
module.exports = { 'Unit': require('./unit'), 'Lexer': require('./lexer'), };
module.exports = { // Objects 'Unit': require('./unit'), 'Lexer': require('./lexer'), // Methods 'math': require('./math'), };
Add math & clean up.
Add math & clean up.
JavaScript
mit
jamen/craze
--- +++ @@ -1,4 +1,8 @@ module.exports = { + // Objects 'Unit': require('./unit'), 'Lexer': require('./lexer'), + + // Methods + 'math': require('./math'), };
51ca67b91d6256ce48171b912e649a08ec7638c1
cosmoz-bottom-bar-view.js
cosmoz-bottom-bar-view.js
/*global Polymer, Cosmoz*/ (function () { 'use strict'; Polymer({ is: 'cosmoz-bottom-bar-view', behaviors: [ Cosmoz.ViewInfoBehavior, Polymer.IronResizableBehavior ], properties: { overflowing: { type: Boolean, value: false, reflectToAttribute: true }, scroller: { type: ...
/*global Polymer, Cosmoz*/ (function () { 'use strict'; Polymer({ is: 'cosmoz-bottom-bar-view', behaviors: [ Cosmoz.ViewInfoBehavior, Polymer.IronResizableBehavior ], properties: { overflowing: { type: Boolean, value: false, reflectToAttribute: true }, scroller: { type: ...
Fix bug where the placeholder would flex out
Fix bug where the placeholder would flex out Might be related to shady DOM or <slot> hybrid mode.
JavaScript
apache-2.0
Neovici/cosmoz-bottom-bar,Neovici/cosmoz-bottom-bar
--- +++ @@ -55,7 +55,11 @@ }, _getBarHeight: function (desktop) { - return 'min-height: ' + this.$.bar.barHeight + 'px'; + var height = this.$.bar.barHeight; + return [ + 'max-height: ' + height + 'px', + 'min-height: ' + height + 'px' + ].join(';'); } }); }());
aea77bd5b10e00005b0df08bd59ac427e19c4f89
karma.conf.js
karma.conf.js
module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['jasmine'], // list of files / patterns to...
module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: './', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ['jasmine'], // list of files / patterns to...
Use Phantom JS alone for speed and ease.
Use Phantom JS alone for speed and ease.
JavaScript
mit
blinkboxbooks/marvin-frontend.js
--- +++ @@ -52,7 +52,7 @@ // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['Chrome', 'PhantomJS', 'Safari', 'Firefox'], + browsers: ['PhantomJS'], // Continuous Integration mode
d1c78416c722a0cf8e1107c8b3a640129f19197a
js/lib/get-absolute-url.js
js/lib/get-absolute-url.js
export function getAbsoluteUrl({ path, getSassFileGlobPattern, glob }, url, includePaths = []) { const { dir, base } = path.parse(url); const baseGlobPattern = getSassFileGlobPattern(base); includePaths.some((includePath) => { glob.sync(path.resolve(includePath, dir, baseGlobPattern)); return false; });...
import globModule from 'glob'; import pathModule from 'path'; import getSassFileGlobPatternModule from './get-sass-file-glob-pattern'; export function getAbsoluteUrl({ path, getSassFileGlobPattern, glob }, url, includePaths = []) { const { dir, base } = path.parse(url); const baseGlobPattern = getSassFileGlobPatt...
Implement the simplified testable module pattern.
Implement the simplified testable module pattern. Read more about the pattern here: https://markus.oberlehner.net/blog/2017/02/the-testable-module-pattern/
JavaScript
mit
maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer
--- +++ @@ -1,3 +1,8 @@ +import globModule from 'glob'; +import pathModule from 'path'; + +import getSassFileGlobPatternModule from './get-sass-file-glob-pattern'; + export function getAbsoluteUrl({ path, getSassFileGlobPattern, glob }, url, includePaths = []) { const { dir, base } = path.parse(url); const bas...
72b517762e82d421e989f5c30b30c8f7ce18f013
test/test.js
test/test.js
'use strict'; var grunt = require('grunt'); /** * Constructs a test case. * * @param {string} file The `package.json` file to be tested. * @param {boolean} valid Flag indicating whether the test is * expected to pass. * @param {Array} [args] ...
'use strict'; var grunt = require('grunt'); /** * Constructs a test case. * * @param {string} file The `package.json` file to be tested. * @param {boolean} valid Flag indicating whether the test is * expected to pass. * @param {Array} [args] ...
Use `ifError` assertion instead of `equal`.
Use `ifError` assertion instead of `equal`.
JavaScript
mit
joshuaspence/grunt-npm-validate
--- +++ @@ -23,7 +23,7 @@ ].concat(args || []).concat('npm-validate') }, function(error, result, code) { if (valid) { - test.equal(error, null); + test.ifError(error); test.equal(code, 0); } else { test.not...
dda90c0bcf7f32e70d9143327bd8e0d91e5a6f00
lib/index.js
lib/index.js
/** * dubdrop compatible task for reading an image file and creating a thumbnail. * * @package thumbdrop * @author drk <drk@diy.org> */ // readAsDataURL /** * Constructor */ function createThumbdrop (_callback) { return function thumbdrop (file, callback) { var reader = new FileReader(); r...
/** * dubdrop compatible task for reading an image file and creating a thumbnail. * * @package thumbdrop * @author drk <drk@diy.org> */ // readAsDataURL /** * Constructor */ function createThumbdrop (callback) { return function thumbdrop (file) { var reader = new FileReader(); reader.onloa...
Remove async handling to comply w/ dubdrop 0.0.3
Remove async handling to comply w/ dubdrop 0.0.3
JavaScript
mit
derekr/thumbdrop
--- +++ @@ -10,16 +10,15 @@ /** * Constructor */ -function createThumbdrop (_callback) { - return function thumbdrop (file, callback) { +function createThumbdrop (callback) { + return function thumbdrop (file) { var reader = new FileReader(); reader.onload = function (e) { ...
eaef0b0012eacbb4994345fd0f45e6e54e58e583
lib/index.js
lib/index.js
'use strict' let consistentEnv module.exports = function() { if (!consistentEnv) { consistentEnv = require('consistent-env') } return consistentEnv().PATH || '' } module.exports.async = function() { if (!consistentEnv) { consistentEnv = require('consistent-env') } return consistentEnv.async().the...
'use strict' let consistentEnv module.exports = function() { if (process.platform === 'win32') { return process.env.PATH || process.env.Path } if (!consistentEnv) { consistentEnv = require('consistent-env') } return consistentEnv().PATH || '' } module.exports.async = function() { if (process.plat...
Handle different names of PATH on windows
:bug: Handle different names of PATH on windows
JavaScript
mit
steelbrain/consistent-path
--- +++ @@ -3,6 +3,9 @@ let consistentEnv module.exports = function() { + if (process.platform === 'win32') { + return process.env.PATH || process.env.Path + } if (!consistentEnv) { consistentEnv = require('consistent-env') } @@ -10,6 +13,9 @@ } module.exports.async = function() { + if (proce...
51ffd24a0035fe03157ad34e4a0c014e2a4fda04
lib/index.js
lib/index.js
'use strict'; var rump = module.exports = require('rump'); var configs = require('./configs'); var originalAddGulpTasks = rump.addGulpTasks; rump.addGulpTasks = function(options) { originalAddGulpTasks(options); require('./gulp'); return rump; }; rump.on('update:main', function() { configs.rebuild(); rump....
'use strict'; var rump = module.exports = require('rump'); var configs = require('./configs'); var originalAddGulpTasks = rump.addGulpTasks; // TODO remove on next major core update rump.addGulpTasks = function(options) { originalAddGulpTasks(options); require('./gulp'); return rump; }; rump.on('update:main', ...
Handle future event emit for gulp tasks
Handle future event emit for gulp tasks
JavaScript
mit
rumps/rump-less
--- +++ @@ -4,6 +4,7 @@ var configs = require('./configs'); var originalAddGulpTasks = rump.addGulpTasks; +// TODO remove on next major core update rump.addGulpTasks = function(options) { originalAddGulpTasks(options); require('./gulp'); @@ -15,6 +16,11 @@ rump.emit('update:less'); }); +rump.on('gulp...
3e96edbd86dc6f233d34edfcf3d57de693a202ac
lib/index.js
lib/index.js
var mongoose = require('mongoose'); var ShortId = require('./shortid'); var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { for (fieldName in this.schema.tree) { if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tree[fieldName]; ...
var mongoose = require('mongoose'); var ShortId = require('./shortid'); var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { for (key in this.schema.tree) { var fieldName = key if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tree[...
Create a variable in scope to avoid being override
Create a variable in scope to avoid being override
JavaScript
mit
jjwchoy/mongoose-shortid,dashersw/mongoose-shortid,jouke/mongoose-shortid,hoist/mongoose-shortid
--- +++ @@ -3,7 +3,8 @@ var defaultSave = mongoose.Model.prototype.save; mongoose.Model.prototype.save = function(cb) { - for (fieldName in this.schema.tree) { + for (key in this.schema.tree) { + var fieldName = key if (this.isNew && this[fieldName] === undefined) { var idType = this.schema.tre...
43fbb8eddf92a3e6b0fd7125b8e91537f6d21445
lib/index.js
lib/index.js
var createJob = require('./createJob'); module.exports = function (sails) { return { jobs: {}, defaults: {cron: {}}, initialize: function (cb) { var config = sails.config.cron; var tasks = Object.keys(config); tasks.forEach(function (time) { this.jobs[time] = createJob({ ...
var createJob = require('./createJob'); module.exports = function (sails) { return { jobs: {}, defaults: {cron: {}}, initialize: function (cb) { var config = sails.config.cron; var tasks = Object.keys(config); tasks.forEach(function (name) { this.jobs[name] = createJob({ ...
Replace schedule as a key with named job
Replace schedule as a key with named job
JavaScript
mit
ghaiklor/sails-hook-cron
--- +++ @@ -9,14 +9,14 @@ initialize: function (cb) { var config = sails.config.cron; var tasks = Object.keys(config); - tasks.forEach(function (time) { - this.jobs[time] = createJob({ - cronTime: time, - onTick: config[time] instanceof Function ? config[time] : config...
5056f8a50db6d6d17d1b29428fdc90f3abe92a1e
karma.conf.js
karma.conf.js
module.exports = function(config) { config.set({ frameworks: ['jasmine', 'browserify'], files: [ 'test/**/*.js' ], preprocessors: { 'test/**/*.js': ['browserify'] }, browsers: ['PhantomJS'], browserify: { debug: true ...
module.exports = function(config) { config.set({ frameworks: ['jasmine', 'browserify'], files: [ 'test/**/*.js' ], preprocessors: { 'test/**/*.js': ['browserify'] }, browsers: ['PhantomJS'], browserify: { debug: true ...
Update karma, it will run once with npm test
Update karma, it will run once with npm test
JavaScript
mit
vudduu/key-enum
--- +++ @@ -10,6 +10,7 @@ browsers: ['PhantomJS'], browserify: { debug: true - } + }, + singleRun: true }); };
98add101bfda0dd235f2675cfd9ffff04e56b9ba
test/acceptance/global.nightwatch.js
test/acceptance/global.nightwatch.js
module.exports = { waitForConditionPollInterval: 1000, waitForConditionTimeout: 6000, pauseDuration: 5000, retryAssertionTimeout: 2500, }
module.exports = { waitForConditionPollInterval: 2000, waitForConditionTimeout: 12000, pauseDuration: 7500, retryAssertionTimeout: 5000, }
Increase timeouts to improve test runs
Increase timeouts to improve test runs Attempts to address issue with a high perecentage of acceptance test runs failing.
JavaScript
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
--- +++ @@ -1,6 +1,6 @@ module.exports = { - waitForConditionPollInterval: 1000, - waitForConditionTimeout: 6000, - pauseDuration: 5000, - retryAssertionTimeout: 2500, + waitForConditionPollInterval: 2000, + waitForConditionTimeout: 12000, + pauseDuration: 7500, + retryAssertionTimeout: 5000, }
ba17d882e72582d5396fa3a3dfb6292656f63b30
lib/index.js
lib/index.js
'use strict'; // VARIABLES // var FLOAT32_VIEW = new Float32Array( 1 ); var UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer ); // 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000 var PINF = 0x7f800000; // Set the ArrayBuffer bit sequence: UINT32_VIEW[ 0 ] = PINF; // EXPORTS // module.exports = F...
'use strict'; // VARIABLES // var FLOAT32_VIEW = new Float32Array( 1 ); var UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer ); // 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000 (see IEEE 754-2008) var PINF = 0x7f800000; // Set the ArrayBuffer bit sequence: UINT32_VIEW[ 0 ] = PINF; // EXPORTS //...
Add code comment re: IEEE 754-2008
Add code comment re: IEEE 754-2008
JavaScript
mit
const-io/pinf-float32
--- +++ @@ -5,7 +5,7 @@ var FLOAT32_VIEW = new Float32Array( 1 ); var UINT32_VIEW = new Uint32Array( FLOAT32_VIEW.buffer ); -// 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000 +// 0 11111111 00000000000000000000000 => 2139095040 => 0x7f800000 (see IEEE 754-2008) var PINF = 0x7f800000; // Set th...
edca7f5559e256606c7bc4ece9ffcf1f845c8ee7
src/c/big-input-card.js
src/c/big-input-card.js
import m from 'mithril'; const bigInputCard = { view(ctrl, args) { const cardClass = '.w-row.u-marginbottom-30.card.card-terciary.padding-redactor-description.text.optional.project_about_html.field_with_hint'; return m(cardClass, [ m('div', [ m('label.field-label.fontwe...
import m from 'mithril'; const bigInputCard = { view(ctrl, args) { const cardClass = args.cardClass || '.w-row.u-marginbottom-30.card.card-terciary.padding-redactor-description.text.optional.project_about_html.field_with_hint'; return m(cardClass, {style: (args.cardStyle||{})}, [ m('di...
Adjust bigInputCard to receive a cardStyle and cardClass args
Adjust bigInputCard to receive a cardStyle and cardClass args
JavaScript
mit
catarse/catarse_admin,vicnicius/catarse_admin,vicnicius/catarse.js,mikesmayer/cs2.js,catarse/catarse.js,sushant12/catarse.js
--- +++ @@ -2,9 +2,9 @@ const bigInputCard = { view(ctrl, args) { - const cardClass = '.w-row.u-marginbottom-30.card.card-terciary.padding-redactor-description.text.optional.project_about_html.field_with_hint'; + const cardClass = args.cardClass || '.w-row.u-marginbottom-30.card.card-terciary.pa...
8cdbc23c71c69d628b9f034c11727423c218cf87
db/migrations/20131216232955-external-transactions.js
db/migrations/20131216232955-external-transactions.js
var dbm = require('db-migrate'); var type = dbm.dataType; exports.up = function(db, callback) { db.createTable('bank_transactions', { id: { type: 'int', primaryKey: true, autoIncrement: true }, deposit: { type: 'boolean', notNull: true }, currency: { type: 'string', notNull: true }, cashAmount: { type...
var dbm = require('db-migrate'); var type = dbm.dataType; exports.up = function(db, callback) { db.createTable('external_transactions', { id: { type: 'int', primaryKey: true, autoIncrement: true }, deposit: { type: 'boolean', notNull: true }, currency: { type: 'string', notNull: true }, cashAmount: { ...
Change accountId to externalAccountId in external transactions migration
[FEATURE] Change accountId to externalAccountId in external transactions migration
JavaScript
isc
whotooktwarden/gatewayd,zealord/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd
--- +++ @@ -2,12 +2,12 @@ var type = dbm.dataType; exports.up = function(db, callback) { - db.createTable('bank_transactions', { + db.createTable('external_transactions', { id: { type: 'int', primaryKey: true, autoIncrement: true }, deposit: { type: 'boolean', notNull: true }, currency: { type: '...
04182efe223fb18e3678615c024ed3ecd806afb9
packages/nova-core/lib/containers/withMutation.js
packages/nova-core/lib/containers/withMutation.js
/* HoC that provides a simple mutation that expects a single JSON object in return Example usage: export default withMutation({ name: 'getEmbedlyData', args: {url: 'String'}, })(EmbedlyURL); */ import { graphql } from 'react-apollo'; import gql from 'graphql-tag'; export default function withMutation({name, a...
/* HoC that provides a simple mutation that expects a single JSON object in return Example usage: export default withMutation({ name: 'getEmbedlyData', args: {url: 'String'}, })(EmbedlyURL); */ import { graphql } from 'react-apollo'; import gql from 'graphql-tag'; export default function withMutation({name, a...
Make mutation hoc accept mutations without arguments
Make mutation hoc accept mutations without arguments
JavaScript
mit
manriquef/Vulcan,SachaG/Zensroom,SachaG/Gamba,bshenk/projectIterate,manriquef/Vulcan,rtluu/immersive,HelloMeets/HelloMakers,dominictracey/Telescope,bshenk/projectIterate,Discordius/Telescope,acidsound/Telescope,dominictracey/Telescope,SachaG/Gamba,VulcanJS/Vulcan,Discordius/Lesswrong2,acidsound/Telescope,Discordius/Les...
--- +++ @@ -16,14 +16,25 @@ export default function withMutation({name, args}) { - const args1 = _.map(args, (type, name) => `$${name}: ${type}`); // e.g. $url: String - const args2 = _.map(args, (type, name) => `${name}: $${name}`); // e.g. $url: url + let mutation; - return graphql(gql` - mutation ${n...
23737870dcc77538cf7a094d4f5521c8580f965b
lib/models/UserInstance.js
lib/models/UserInstance.js
/* WePay API for Node.js * (c)2012 Matt Farmer * Release without warranty under the terms of the * Apache License. For more details, see the LICENSE * file at the root of this project. */ var UserInstance = function(params) { //TODO } module.exports = UserInstance;
/* WePay API for Node.js * (c)2012 Matt Farmer * Release without warranty under the terms of the * Apache License. For more details, see the LICENSE * file at the root of this project. */ var UserInstance = function(params) { // Populate any params passed in. if (params && ! params instanceof Object) throw ...
Implement the User instance constructor.
Implement the User instance constructor.
JavaScript
apache-2.0
farmdawgnation/wepay-api-node
--- +++ @@ -5,7 +5,15 @@ * file at the root of this project. */ var UserInstance = function(params) { - //TODO + // Populate any params passed in. + if (params && ! params instanceof Object) + throw "Parameters passed to an instance constructor must be an object or undefined."; + + if (params){ + for (k...
b27452b32f6be2bb6544833b422b60a9f1d00e0c
generators/app/templates/gulp_tasks/systemjs.js
generators/app/templates/gulp_tasks/systemjs.js
const gulp = require('gulp'); const replace = require('gulp-replace'); const Builder = require('jspm').Builder; const conf = require('../conf/gulp.conf'); gulp.task('systemjs', systemjs); gulp.task('systemjs:html', updateIndexHtml); function systemjs(done) { const builder = new Builder('./', 'jspm.config.js'); ...
const gulp = require('gulp'); const replace = require('gulp-replace'); const Builder = require('jspm').Builder; const conf = require('../conf/gulp.conf'); gulp.task('systemjs', systemjs); gulp.task('systemjs:html', updateIndexHtml); function systemjs(done) { const builder = new Builder('./', 'jspm.config.js'); ...
Remove jspm scripts on build
Remove jspm scripts on build
JavaScript
mit
FountainJS/generator-fountain-systemjs,FountainJS/generator-fountain-systemjs
--- +++ @@ -30,7 +30,7 @@ function updateIndexHtml() { return gulp.src(conf.path.src('index.html')) .pipe(replace( - /<script>\n\s*System.import.*\n\s*<\/script>/, + /<script src="jspm_packages\/system.js">[\s\S]*System.import.*\n\s*<\/script>/, `<script src="index.js"></script>` )) ...
827eb5533a6e7f967a40f82871647902dc6b833b
karma.conf.js
karma.conf.js
const base = require('skatejs-build/karma.conf'); module.exports = function (config) { base(config); // Remove all explicit IE definitions. config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name)); // Only test IE latest. config.browsers.push('internet_explorer_11'); // Shims fo...
const base = require('skatejs-build/karma.conf'); module.exports = function (config) { base(config); // Setup IE if testing in SauceLabs. if (config.sauceLabs) { // Remove all explicit IE definitions. config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name)); // Only test IE...
Fix tests so that it only tries to run IE11 if running in Sauce Labs.
chore(test): Fix tests so that it only tries to run IE11 if running in Sauce Labs. For some reason it just started happening that it would try to run IE11 outside of Sauce Labs.
JavaScript
mit
chrisdarroch/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs
--- +++ @@ -2,15 +2,18 @@ module.exports = function (config) { base(config); - // Remove all explicit IE definitions. - config.browsers = config.browsers.filter(name => !/^internet_explorer/.test(name)); + // Setup IE if testing in SauceLabs. + if (config.sauceLabs) { + // Remove all explicit IE definiti...
665337b8ea125f179f58e9ffd4cee4e1f5272743
test/svg-test-helper.js
test/svg-test-helper.js
import $ from "cheerio"; const RECTANGULAR_SEQUENCE = ["M", "L", "L", "L", "L"]; const CIRCULAR_SEQUENCE = ["M", "m", "a", "a"]; const SvgTestHelper = { expectIsRectangular(wrapper) { expect(exhibitsShapeSequence(wrapper, RECTANGULAR_SEQUENCE)).to.be.true; }, expectIsCircular(wrapper) { expect(exhibits...
import $ from "cheerio"; const RECTANGULAR_SEQUENCE = ["M", "L", "L", "L", "L"]; const CIRCULAR_SEQUENCE = ["M", "m", "a", "a"]; const expectations = { expectIsRectangular(wrapper) { expect(exhibitsShapeSequence(wrapper, RECTANGULAR_SEQUENCE)).to.be.true; }, expectIsCircular(wrapper) { expect(exhibitsS...
Split helpers into expectations and helpers
Split helpers into expectations and helpers
JavaScript
mit
FormidableLabs/victory-chart,FormidableLabs/victory-chart,GreenGremlin/victory-chart,GreenGremlin/victory-chart
--- +++ @@ -3,7 +3,7 @@ const RECTANGULAR_SEQUENCE = ["M", "L", "L", "L", "L"]; const CIRCULAR_SEQUENCE = ["M", "m", "a", "a"]; -const SvgTestHelper = { +const expectations = { expectIsRectangular(wrapper) { expect(exhibitsShapeSequence(wrapper, RECTANGULAR_SEQUENCE)).to.be.true; }, @@ -12,6 +12,16 @@ ...
7ac6ead3693b4a26dedfff678d55d11512fe1b76
tests/integration/components/ember-webcam-test.js
tests/integration/components/ember-webcam-test.js
import { describeComponent, it } from 'ember-mocha'; import { beforeEach, afterEach } from 'mocha'; import { expect } from 'chai'; import hbs from 'htmlbars-inline-precompile'; import page from './page'; describeComponent('ember-webcam', 'Integration: EmberWebcamComponent', { integration: true }, () => { beforeEac...
import { describeComponent, it } from 'ember-mocha'; import { beforeEach, afterEach } from 'mocha'; import { expect } from 'chai'; import hbs from 'htmlbars-inline-precompile'; import page from './page'; describeComponent('ember-webcam', 'Integration: EmberWebcamComponent', { integration: true }, () => { beforeEac...
Improve component test when fails to take snapshot
Improve component test when fails to take snapshot
JavaScript
mit
leizhao4/ember-webcam,forge512/ember-webcam,leizhao4/ember-webcam,forge512/ember-webcam
--- +++ @@ -23,8 +23,9 @@ it('takes a snapshot', done => { let isDone = false; page.context.setProperties({ - didError(errorMessage) { - expect(errorMessage).to.be.ok; + didError(error) { + // Should fail because camera is not available in test environment. + expect(error.n...
f8a42180a7b9b1a145ddc76164fd3299468771b4
lib/index.js
lib/index.js
'use strict'; module.exports = {};
'use strict'; var assert = require('assert'); module.exports = function() { var privacy = {}; var tags = { in: {}, out: {} }; privacy.wrap = function(asset) { return { _unwrap: function(tag) { assert(tag === tags.in); return { tag: tags.out, asset: asset ...
Add actual code from jellyscript project
Add actual code from jellyscript project
JavaScript
mit
voltrevo/voltrevo-privacy,leahciMic/voltrevo-privacy
--- +++ @@ -1,3 +1,31 @@ 'use strict'; -module.exports = {}; +var assert = require('assert'); + +module.exports = function() { + var privacy = {}; + + var tags = { in: {}, out: {} }; + + privacy.wrap = function(asset) { + return { + _unwrap: function(tag) { + assert(tag === tags.in); + + r...
ad1a69d6bfc62473c322af56aea49da3efa46a75
karma.conf.js
karma.conf.js
"use strict"; /** * Karma configuration. */ module.exports = function (config) { config.set({ frameworks: ["mocha", "sinon"], files: [ "test/**_test.js" ], preprocessors: { "test/**_test.js": ["webpack"] }, reporters: ["progress"], browsers: ["Chrome"], webpack: r...
"use strict"; /** * Karma configuration. */ module.exports = function (config) { config.set({ frameworks: ["mocha", "sinon"], files: [ "test/**_test.js" ], preprocessors: { "test/**_test.js": ["webpack"] }, reporters: ["progress"], browsers: ["Chrome"], webpack: r...
Add Karma Firefox Runner for TravisCI
[Fixed] Add Karma Firefox Runner for TravisCI
JavaScript
apache-2.0
mikepb/clerk
--- +++ @@ -25,6 +25,7 @@ plugins: [ "karma-chrome-launcher", + "karma-firefox-launcher", "karma-mocha", "karma-sinon", "karma-webpack"
f92aa1631ecb7504d21931002dd0dfda01316af7
lib/client.js
lib/client.js
var api = require('@request/api') module.exports = (client, provider, methods, config, transform) => { return api(methods, { api: function (options, name) { options.api = name return this }, auth: function (options, arg1, arg2) { var alias = (options.api || provider.api || '__default'...
var api = require('@request/api') module.exports = (client, provider, methods, config, transform) => { return api(methods, { api: function (name) { this._options.api = name return this }, auth: function (arg1, arg2) { var alias = (this._options.api || provider.api || '__default') ...
Fix custom method options + Allow callback to be passed to the submit method
Fix custom method options + Allow callback to be passed to the submit method
JavaScript
apache-2.0
simov/purest
--- +++ @@ -4,16 +4,22 @@ module.exports = (client, provider, methods, config, transform) => { return api(methods, { - api: function (options, name) { - options.api = name + api: function (name) { + this._options.api = name return this }, - auth: function (options, arg1, arg2) { -...
6d22f9733610999ca48d912a125c3bde3e37b285
lib/utils.js
lib/utils.js
var Person = require('./person'); function incomingMessage(botId, message) { return message.type === 'message' // check it's a message && Boolean(message.text) // check message has some content && Boolean(message.user) // check there is a user set && message.user !== botId; // check mes...
var Person = require('./person'); function incomingMessage(botId, message) { return message.type === 'message' // check it's a message && Boolean(message.text) // check message has some content && Boolean(message.user) // check there is a user set && message.user !== botId; // check mes...
Stop double-calling the callback function
Stop double-calling the callback function
JavaScript
apache-2.0
tomnatt/tombot
--- +++ @@ -20,13 +20,13 @@ function createResponse(message, callback) { - var response = 'Echo: ' + message.text; if (message.text.startsWith('person')) { var person = new Person(message.text.substring(7)); person.getDetails(callback); + } else { + // if nothing else, just echo back the messag...
2f5a1f4bd5754f895efa4f218d1a7dd8712525ee
src/store/modules/fcm.js
src/store/modules/fcm.js
import Vue from 'vue' import axios from '@/services/axios' export default { namespaced: true, state: { token: null, tokens: {}, }, getters: { token: state => state.token, tokenExists: state => token => Boolean(state.tokens[token]), }, actions: { updateToken ({ commit, rootGetters }, tok...
import Vue from 'vue' import axios from '@/services/axios' export default { namespaced: true, state: { token: null, tokens: {}, }, getters: { token: state => state.token, tokenExists: state => token => Boolean(state.tokens[token]), }, actions: { updateToken ({ commit, rootGetters }, tok...
Clear subscription tokens before updating
Clear subscription tokens before updating
JavaScript
mit
yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend
--- +++ @@ -24,6 +24,7 @@ state.token = token }, receiveTokens (state, tokens) { + state.tokens = {} for (let token of tokens) { Vue.set(state.tokens, token, true) }
5e9118abc8aeb801bc51e4f3230b12ae116fed5e
lib/crouch.js
lib/crouch.js
"use strict"; ;(function ( root, name, definition ) { /* * Exports */ if ( typeof define === 'function' && define.amd ) { define( [], definition ); } else if ( typeof module === 'object' && module.exports ) { module.exports = definition(); } else { root[ name ...
"use strict"; ;(function ( root, name, definition ) { /* * Exports */ if ( typeof define === 'function' && define.amd ) { define( [], definition ); } else if ( typeof module === 'object' && module.exports ) { module.exports = definition(); } else { root[ name ...
Update regex to match underscore and be case insensitive;
Update regex to match underscore and be case insensitive;
JavaScript
mit
hendrysadrak/crouch
--- +++ @@ -18,10 +18,10 @@ /** * RegExp to find placeholders in the template * - * http://regexr.com/3e1o7 + * http://regexr.com/3eveu * @type {RegExp} */ - var _re = /{([0-9a-zA-Z]+?)}/g; + var _re = /{([0-9a-z_]+?)}/ig; /**
5a3e8af0505b8777358db1984b5020fd5a4dfb48
lib/util/generalRequest.js
lib/util/generalRequest.js
// Includes var http = require('./http.js').func; var getVerification = require('./getVerification.js').func; var promise = require('./promise.js'); // Args exports.required = ['url', 'events']; exports.optional = ['customOpt', 'getBody', 'jar']; function general (jar, url, inputs, events, customOpt, body) { return...
// Includes var http = require('./http.js').func; var getVerification = require('./getVerification.js').func; var promise = require('./promise.js'); // Args exports.required = ['url', 'events']; exports.optional = ['http', 'ignoreCache', 'getBody', 'jar']; function general (jar, url, inputs, events, customOpt, body) ...
Add ignoreCache option and http option
Add ignoreCache option and http option
JavaScript
mit
FroastJ/roblox-js,OnlyTwentyCharacters/roblox-js,sentanos/roblox-js
--- +++ @@ -5,7 +5,7 @@ // Args exports.required = ['url', 'events']; -exports.optional = ['customOpt', 'getBody', 'jar']; +exports.optional = ['http', 'ignoreCache', 'getBody', 'jar']; function general (jar, url, inputs, events, customOpt, body) { return function (resolve, reject) { @@ -22,6 +22,9 @@ ...
9af35bf97daa2a3b81d3984f7047a0c893b7b983
lib/helper.js
lib/helper.js
'use babel' import {BufferedProcess} from 'atom' export function exec(command, args = [], options = {}) { if (!arguments.length) throw new Error('Nothing to execute') return new Promise(function(resolve, reject) { const data = {stdout: [], stderr: []} const spawnedProcess = new BufferedProcess({ co...
'use babel' import {BufferedProcess} from 'atom' export function installPackages(packageNames, callback) { const APMPath = atom.packages.getApmPath() const Promises = [] return Promise.all(Promise) } export function exec(command, args = [], options = {}) { if (!arguments.length) throw new Error('Nothing to e...
Create a dummy installPackages function
:art: Create a dummy installPackages function
JavaScript
mit
steelbrain/package-deps,openlawlibrary/package-deps,steelbrain/package-deps
--- +++ @@ -2,6 +2,12 @@ import {BufferedProcess} from 'atom' +export function installPackages(packageNames, callback) { + const APMPath = atom.packages.getApmPath() + const Promises = [] + + return Promise.all(Promise) +} export function exec(command, args = [], options = {}) { if (!arguments.length) thr...
6c1222bfbd64be37e64e4b5142c7c92555664e81
polymerjs/gulpfile.js
polymerjs/gulpfile.js
var gulp = require('gulp'); var browserSync = require('browser-sync'); var vulcanize = require('gulp-vulcanize'); var uglify = require('gulp-uglify'); var concat = require('gulp-concat'); gulp.task('copy', function () { return gulp.src('./app/index.html', {base: './app/'}) .pipe(gulp.dest('./dist/')); }); gulp....
var gulp = require('gulp'); var browserSync = require('browser-sync'); var vulcanize = require('gulp-vulcanize'); var uglify = require('gulp-uglify'); var concat = require('gulp-concat'); gulp.task('copy', function () { return gulp.src('./app/index.html', {base: './app/'}) .pipe(gulp.dest('./dist/')); }); gulp....
Change browserSync to use port 4200
[Polymer] Change browserSync to use port 4200
JavaScript
mit
hawkup/github-stars,hawkup/github-stars
--- +++ @@ -31,7 +31,8 @@ gulp.task('serve', ['build'], function () { browserSync.init({ - server: './dist' + server: './dist', + port: 4200 }); gulp.watch('app/elements/**/*.html', ['vulcanize']);
1888b71a627455c051ad26932eabb8ca36cd578d
messenger.js
messenger.js
/*jshint strict: true, esnext: true, node: true*/ "use strict"; const Wreck = require("wreck"); const qs = require("querystring"); class FBMessenger { constructor(token) { this._fbBase = "https://graph.facebook.com/v2.6/me/"; this._token = token; this._q = qs.stringify({access_token: token}...
/*jshint strict: true, esnext: true, node: true*/ "use strict"; const Wreck = require("wreck"); const qs = require("querystring"); class FBMessenger { constructor(token) { this._fbBase = "https://graph.facebook.com/v2.6/"; this._token = token; this._q = qs.stringify({access_token: token}); ...
Add function to get profile. Refactor.
Add function to get profile. Refactor.
JavaScript
mit
dapuck/fbmsgr-game
--- +++ @@ -5,7 +5,7 @@ class FBMessenger { constructor(token) { - this._fbBase = "https://graph.facebook.com/v2.6/me/"; + this._fbBase = "https://graph.facebook.com/v2.6/"; this._token = token; this._q = qs.stringify({access_token: token}); this._wreck = Wreck.default...
48052b56b145a4fc7b1370db7e1764b3397c15b5
js/mobiscroll.treelist.js
js/mobiscroll.treelist.js
(function ($) { var ms = $.mobiscroll, presets = ms.presets.scroller; presets.treelist = presets.list; ms.presetShort('treelist'); })(jQuery);
(function ($) { var ms = $.mobiscroll, presets = ms.presets.scroller; presets.treelist = presets.list; ms.presetShort('list'); ms.presetShort('treelist'); })(jQuery);
Add missing list shorthand init
Add missing list shorthand init
JavaScript
mit
jeancroy/mobiscroll,xuyansong1991/mobiscroll,loki315zx/mobiscroll,mrzzcn/mobiscroll,mrzzcn/mobiscroll,Julienedies/mobiscroll,xuyansong1991/mobiscroll,Julienedies/mobiscroll,loki315zx/mobiscroll,jeancroy/mobiscroll
--- +++ @@ -3,6 +3,8 @@ presets = ms.presets.scroller; presets.treelist = presets.list; + + ms.presetShort('list'); ms.presetShort('treelist'); })(jQuery);
c732b7edc490137446df41d7d85cb58fc8d8fc7a
lib/white-space.js
lib/white-space.js
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-white-space/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-white-space/tachyons-white-space.min.css', 'utf8') var ...
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-white-space/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-white-space/tachyons-white-space.min.css', 'utf8') var ...
Update with reference to global nav partial
Update with reference to global nav partial
JavaScript
mit
topherauyeung/portfolio,fenderdigital/css-utilities,topherauyeung/portfolio,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio,cwonrails/tachyons,matyikriszta/moonlit-landing-page,fenderdigital/css-utilities,tachyons-css/tachyons,getfrank/tachyons
--- +++ @@ -10,6 +10,8 @@ var moduleSize = filesize(moduleObj.gzipSize) var srcCSS = fs.readFileSync('./src/_white-space.css', 'utf8') +var navDocs = fs.readFileSync('./templates/nav_docs.html', 'utf8') + var template = fs.readFileSync('./templates/docs/white-space/index.html', 'utf8') var tpl = _.template(te...
2f1b73dd12c57e8b64f34d7218c07ecd1f05996e
src/middleware/command/system_defaults/handler.js
src/middleware/command/system_defaults/handler.js
'use strict'; const { mapValues, omitBy } = require('../../../utilities'); const { defaults } = require('./defaults'); // Apply system-defined defaults to input, including input arguments const systemDefaults = async function (nextFunc, input) { const { serverOpts } = input; const argsA = getDefaultArgs({ serve...
'use strict'; const { mapValues, omitBy } = require('../../../utilities'); const { defaults } = require('./defaults'); // Apply system-defined defaults to input, including input arguments const systemDefaults = async function (nextFunc, input) { const { serverOpts } = input; const argsA = getDefaultArgs({ serve...
Fix system defaults overriding all args
Fix system defaults overriding all args
JavaScript
apache-2.0
autoserver-org/autoserver,autoserver-org/autoserver
--- +++ @@ -37,7 +37,7 @@ (typeof value === 'function' ? value({ serverOpts, input }) : value) ); - return defaultArgs; + return Object.assign({}, args, defaultArgs); }; module.exports = {
cea5f4bf13f5b3359aea957b35cf52965fa40c37
app/places/places-service.js
app/places/places-service.js
'use strict'; angular .module('webClient.places') .factory('PlacesService', PlacesService); function PlacesService($resource, envService) { console.log('Hello :)'); return $resource( envService.read('baseBackendUrl') + '/places', {}, {query: {method:'GET', isArray:true}} ); }
'use strict'; angular .module('webClient.places') .factory('PlacesService', PlacesService); function PlacesService($resource, envService) { return $resource( envService.read('baseBackendUrl') + '/places', {}, {query: {method:'GET', isArray:true}} ); }
Revert "Story-52 [Marcela, Felipe] Just testing if the new versions are being correctly deployed to Heroku from Snap - this commit will be reverted in the next push"
Revert "Story-52 [Marcela, Felipe] Just testing if the new versions are being correctly deployed to Heroku from Snap - this commit will be reverted in the next push" This reverts commit 926c0f09dc56c1fa9ffb91c548d644c771b08046.
JavaScript
mit
simpatize/webclient,simpatize/webclient,simpatize/webclient
--- +++ @@ -5,7 +5,6 @@ .factory('PlacesService', PlacesService); function PlacesService($resource, envService) { - console.log('Hello :)'); return $resource( envService.read('baseBackendUrl') + '/places', {},
9d73d1e23c2bce43ee87d150905ec2623277185f
src/js/dom-utils.js
src/js/dom-utils.js
// DOM Library Utilites $.parseUrlQuery = function (url) { var query = {}, i, params, param; if (url.indexOf('?') >= 0) url = url.split('?')[1]; params = url.split('&'); for (i = 0; i < params.length; i++) { param = params[i].split('='); query[param[0]] = param[1]; } return query...
// DOM Library Utilites $.parseUrlQuery = function (url) { var query = {}, i, params, param; if (url.indexOf('?') >= 0) url = url.split('?')[1]; params = url.split('&'); for (i = 0; i < params.length; i++) { param = params[i].split('='); query[param[0]] = param[1]; } return query...
Remove supportTouch, add new serializeObject util
Remove supportTouch, add new serializeObject util
JavaScript
mit
thdoan/Framework7,akio46/Framework7,luistapajos/Lista7,Iamlars/Framework7,Janusorz/Framework7,JustAMisterE/Framework7,Dr1ks/Framework7,Liu-Young/Framework7,dingxin/Framework7,yangfeiloveG/Framework7,pandoraui/Framework7,lilien1010/Framework7,youprofit/Framework7,framework7io/Framework7,quannt/Framework7,xuyuanxiang/Fra...
--- +++ @@ -23,7 +23,24 @@ $.trim = function (str) { return str.trim(); }; -$.supportTouch = (function () { - return !!(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch); -})(); +$.serializeObject = function (obj) { + if (typeof obj === 'string') return obj; + va...
a667210d417520082ea946342a64f16f18d1a2e3
src/js/notifications.js
src/js/notifications.js
const push = require('push.js'); angular.module('opentok-meet').factory('Push', () => push); angular.module('opentok-meet').factory('NotificationService', ['$window', 'OTSession', 'Push', function NotificationService($window, OTSession, Push) { let focused = true; $window.addEventListener('blur', () => { ...
const push = require('push.js'); angular.module('opentok-meet').factory('Push', () => push); angular.module('opentok-meet').factory('NotificationService', ['$window', 'OTSession', 'Push', function NotificationService($window, OTSession, Push) { let focused = true; $window.addEventListener('blur', () => { ...
Add extra condition to show "user joined" notification
Add extra condition to show "user joined" notification If you open the page and without clicking anything you go to other app, then you won't get the notification => I don't know how to solve this. If you open the page and without clicking anything you go to other tab, then you won't get the notification => It should...
JavaScript
mit
opentok/opentok-meet,aullman/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,aullman/opentok-meet
--- +++ @@ -19,7 +19,8 @@ OTSession.on('init', notifyOnConnectionCreated); } else { OTSession.session.on('connectionCreated', (event) => { - if (!focused && + const visible = $window.document.visibilityState === 'visible'; + if ((!focused || !visible) && ...
7bf21890f9b24b6afde0d5ff83ffa70ecf7163e2
src/database/json-file-manager.js
src/database/json-file-manager.js
import fileSystem from 'fs'; const JsonFileManager = { load(fileName) { console.log(`[INFO] Loading data from ${__dirname}/${fileName} file`); return JSON.parse(fileSystem.readFileSync(`${__dirname}/${fileName}`)); }, save(fileName, json) { console.log(`[INFO] Saving data in ${__dirnam...
import fileSystem from 'fs'; const JsonFileManager = { load(path) { console.log(`[INFO] Loading data from ${path} file`); return JSON.parse(fileSystem.readFileSync(`${path}`)); }, save(path, json) { console.log(`[INFO] Saving data in ${path} file`); fileSystem.writeFileSync(`${...
Add some changes in path settings for JsonFIleManager
Add some changes in path settings for JsonFIleManager
JavaScript
mit
adrianobrito/vaporwave
--- +++ @@ -1,13 +1,13 @@ import fileSystem from 'fs'; const JsonFileManager = { - load(fileName) { - console.log(`[INFO] Loading data from ${__dirname}/${fileName} file`); - return JSON.parse(fileSystem.readFileSync(`${__dirname}/${fileName}`)); + load(path) { + console.log(`[INFO] Loa...
914b86f5c0351599a9a168c5f0dc65b9bfa942d5
src/runner/typecheck.js
src/runner/typecheck.js
import { execFile } from 'child_process' import flow from 'flow-bin' import { logError, log } from '../util/log' const errorCodes = { TYPECHECK_ERROR: 2 } export default (saguiOptions) => new Promise((resolve, reject) => { const commandArgs = ['check', '--color=always'] if (saguiOptions.javaScript && saguiOpti...
import { execFile } from 'child_process' import flow from 'flow-bin' import { logError, logWarning, log } from '../util/log' const errorCodes = { TYPECHECK_ERROR: 2 } export default (saguiOptions) => new Promise((resolve, reject) => { // Currently Facebook does not provide Windows builds. // https://github.com/...
Disable type checking in Windows 😞
Disable type checking in Windows 😞
JavaScript
mit
saguijs/sagui,saguijs/sagui
--- +++ @@ -1,12 +1,26 @@ import { execFile } from 'child_process' import flow from 'flow-bin' -import { logError, log } from '../util/log' +import { logError, logWarning, log } from '../util/log' const errorCodes = { TYPECHECK_ERROR: 2 } export default (saguiOptions) => new Promise((resolve, reject) => {...
b6c7749859a6bba20301d5b0ad01754624964829
coeus-webapp/src/main/webapp/scripts/common/global.js
coeus-webapp/src/main/webapp/scripts/common/global.js
var Kc = Kc || {}; Kc.Global = Kc.Global || {}; (function (namespace, $) { // set all modals to static behavior (clicking out does not close) $.fn.modal.Constructor.DEFAULTS.backdrop = "static"; })(Kc.Global, jQuery);
var Kc = Kc || {}; Kc.Global = Kc.Global || {}; (function (namespace, $) { // set all modals to static behavior (clicking out does not close) $.fn.modal.Constructor.DEFAULTS.backdrop = "static"; $(document).on("ready", function(){ // date conversion for date fields to full leading 0 - for days and ...
Convert non-full date to full date on loss of focus in js
[KRACOEUS-8479] Convert non-full date to full date on loss of focus in js
JavaScript
agpl-3.0
geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit,geothomasp/kcmit
--- +++ @@ -3,4 +3,46 @@ (function (namespace, $) { // set all modals to static behavior (clicking out does not close) $.fn.modal.Constructor.DEFAULTS.backdrop = "static"; + + $(document).on("ready", function(){ + // date conversion for date fields to full leading 0 - for days and months and to f...
e041a79fdfa455939b44436677b6ee40d3534e24
app/scripts/pipelineDirectives/droprowsfunction.js
app/scripts/pipelineDirectives/droprowsfunction.js
'use strict'; /** * @ngdoc directive * @name grafterizerApp.directive:dropRowsFunction * @description * # dropRowsFunction */ angular.module('grafterizerApp') .directive('dropRowsFunction', function(transformationDataModel) { return { templateUrl: 'views/pipelineFunctions/dropRowsFunction.html', ...
'use strict'; /** * @ngdoc directive * @name grafterizerApp.directive:dropRowsFunction * @description * # dropRowsFunction */ angular.module('grafterizerApp') .directive('dropRowsFunction', function(transformationDataModel) { return { templateUrl: 'views/pipelineFunctions/dropRowsFunction.html', ...
Use drop row by default
Use drop row by default
JavaScript
epl-1.0
dapaas/grafterizer,dapaas/grafterizer,datagraft/grafterizer,datagraft/grafterizer
--- +++ @@ -15,7 +15,7 @@ if (!scope.function) { scope.function = { numberOfRows: 1, - take: true, + take: false, docstring: null }; }
387fe28bf03d894ea37483455067c43edb7ef947
public/app/scripts/controllers/users.js
public/app/scripts/controllers/users.js
'use strict'; angular.module('publicApp') .controller('UsersCtrl', ['$scope', '$http', '$location', '$routeParams', 'UserService', function ($scope, $http, $location, $user, $routeParams) { console.log('user id', $routeParams.id); if ($user) { console.log('user is logged in'); if (($user.id == $r...
'use strict'; angular.module('publicApp') .controller('UsersCtrl', ['$scope', '$http', '$location', '$route', '$routeParams', 'UserService', function ($scope, $http, $location, $route, $routeParams, $user) { $scope.user = $user; if ($user.isLogged) { if (($user.id == $routeParams.id) || $user.admin) { ...
Add user data variables to scope
[FEATURE] Add user data variables to scope
JavaScript
isc
Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd,zealord/gatewayd,crazyquark/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd
--- +++ @@ -1,17 +1,26 @@ 'use strict'; angular.module('publicApp') - .controller('UsersCtrl', ['$scope', '$http', '$location', '$routeParams', 'UserService', function ($scope, $http, $location, $user, $routeParams) { - console.log('user id', $routeParams.id); - if ($user) { - console.log('user is log...
a005ed629f02f7f61ac2719ad7286693935fbfab
tut5/script.js
tut5/script.js
$(document).ready(function () { })
$(document).ready(function main() { $("#add").click(function addRow() { var name = $("<td></td>").text($("#name").val()); var up = $("<button></button>").text("Move up").click(moveUp); var down = $("<button></button>").text("Move down").click(moveDown); var operations = $("<td></td>"...
Implement adding rows to the table
Implement adding rows to the table
JavaScript
mit
benediktg/DDS-tutorial,benediktg/DDS-tutorial,benediktg/DDS-tutorial
--- +++ @@ -1,3 +1,20 @@ -$(document).ready(function () { +$(document).ready(function main() { + $("#add").click(function addRow() { + var name = $("<td></td>").text($("#name").val()); + var up = $("<button></button>").text("Move up").click(moveUp); + var down = $("<button></button>").text("Mo...
66297d71ac6675625201c20ef3a24c0156839469
src/javascripts/frigging_bootstrap/components/text.js
src/javascripts/frigging_bootstrap/components/text.js
let React = require("react") let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js") let {div, textarea} = React.DOM let cx = require("classnames") export default class extends React.Component { static displayName = "Frig.friggingBootstrap.Text" static defaultProps = Object.assign(require(".....
let React = require("react") let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js") let {div, textarea} = React.DOM let cx = require("classnames") export default class extends React.Component { static displayName = "Frig.friggingBootstrap.Text" static defaultProps = Object.assign(require(".....
Remove Textarea Label, Use Frig Version Instead
Remove Textarea Label, Use Frig Version Instead
JavaScript
mit
TouchBistro/frig,frig-js/frig,frig-js/frig,TouchBistro/frig
--- +++ @@ -24,19 +24,14 @@ }) } - _label() { - if (this.props.label == null) return "" - return label(this.props.labelHtml, this.props.label) - } - render() { return div({className: cx(sizeClassNames(this.props))}, div({className: this._cx()}, - this._label(), + label(t...
9e5ab890d8ca61ee5d86b2bc4ae29a5ddada60f7
website/app/application/core/projects/project/home/home.js
website/app/application/core/projects/project/home/home.js
(function (module) { module.controller('ProjectHomeController', ProjectHomeController); ProjectHomeController.$inject = ["project", "mcmodal", "templates", "$state", "Restangular"]; function ProjectHomeController(project, mcmodal, templates, $state, Restangular) { var ctrl = this; ctrl.pro...
(function (module) { module.controller('ProjectHomeController', ProjectHomeController); ProjectHomeController.$inject = ["project", "mcmodal", "templates", "$state", "Restangular"]; function ProjectHomeController(project, mcmodal, templates, $state, Restangular) { var ctrl = this; ctrl.pro...
Remove the hard coded process name now that the process name has been set.
Remove the hard coded process name now that the process name has been set.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -22,8 +22,8 @@ function chooseExistingProcess() { Restangular.one('v2').one("projects", project.id).one("processes").getList().then(function(processes) { mcmodal.chooseExistingProcess(processes).then(function (existingProcess) { - var processName = ...
aff1582fbd5163dcf299897751bff0c21f99a408
app/services/report-results.js
app/services/report-results.js
import Ember from 'ember'; const { inject } = Ember; const { service } = inject; export default Ember.Service.extend({ store: service(), getResults(subject, object, objectId){ return this.get('store').query( this.getModel(subject), this.getQuery(object, objectId) ).then(results => { retu...
import Ember from 'ember'; const { inject } = Ember; const { service } = inject; export default Ember.Service.extend({ store: service(), getResults(subject, object, objectId){ return this.get('store').query( this.getModel(subject), this.getQuery(object, objectId) ).then(results => { retu...
Fix report query to actually query
Fix report query to actually query
JavaScript
mit
dartajax/frontend,jrjohnson/frontend,gboushey/frontend,thecoolestguy/frontend,dartajax/frontend,gabycampagna/frontend,thecoolestguy/frontend,stopfstedt/frontend,jrjohnson/frontend,stopfstedt/frontend,ilios/frontend,gboushey/frontend,gabycampagna/frontend,ilios/frontend,djvoa12/frontend,djvoa12/frontend
--- +++ @@ -31,8 +31,8 @@ limit: 1000 }; if(object && objectId){ - query.filter = {}; - query.filter[object] = objectId; + query.filters = {}; + query.filters[object] = objectId; } return query;
8d20035df56fcc1d40c6d28ad8e7a4ff30900636
script.js
script.js
var ctx = document.getElementById("chart").getContext("2d"); var myLineChart = new Chart(ctx).Line(data, { tooltipTemplate = function(valuesObject){ var label = valuesObject.label; var idx = data.labels.indexOf(label); var result = data.datasets[0].time[idx]; if (data.datasets[0].languages[i...
var data = {"labels": ["12 December", "13 December", "14 December", "15 December", "16 December", "17 December", "18 December"], "datasets": [{"languages": [[], [], [], [], [], ["Python", "Other"], ["Python", "JavaScript", "Bash"]], "pointHighlightFill": "#fff", "fillColor": "rgba(151,187,205,0.2)", "pointHighlightStro...
Update dashboard at Fri Dec 18 02:17:47 NPT 2015
Update dashboard at Fri Dec 18 02:17:47 NPT 2015
JavaScript
mit
switchkiller/HaloTracker,switchkiller/HaloTracker,switchkiller/HaloTracker
--- +++ @@ -1,3 +1,6 @@ +var data = {"labels": ["12 December", "13 December", "14 December", "15 December", "16 December", "17 December", "18 December"], "datasets": [{"languages": [[], [], [], [], [], ["Python", "Other"], ["Python", "JavaScript", "Bash"]], "pointHighlightFill": "#fff", "fillColor": "rgba(151,187,205...
6af74e45b203a159b1401c7815c68b476b8835e0
src/test/helper/database/index.js
src/test/helper/database/index.js
import mongoose from "mongoose" async function createConnection() { mongoose.Promise = Promise // Don't forget to add a user for this connection const connection = await mongoose.connect("mongodb://localhost/twi-test", { useMongoClient: true, promiseLibrary: Promise }) return connection } async fu...
import mongoose from "mongoose" async function createConnection() { mongoose.Promise = Promise // Don't forget to add a user for this connection const connection = await mongoose.connect("mongodb://localhost/twi-test", { promiseLibrary: Promise }) return connection } async function closeConnection() {...
Fix db connection in tests helper
Fix db connection in tests helper
JavaScript
mit
octet-stream/ponyfiction-js,octet-stream/twi,octet-stream/ponyfiction-js,twi-project/twi-server
--- +++ @@ -5,7 +5,6 @@ // Don't forget to add a user for this connection const connection = await mongoose.connect("mongodb://localhost/twi-test", { - useMongoClient: true, promiseLibrary: Promise })
45d8406eea3afee7049c26d5449e5b86e46eef61
migrations/20170310124040_add_event_id_for_actions.js
migrations/20170310124040_add_event_id_for_actions.js
exports.up = function(knex, Promise) { return knex.schema.table('actions', function(table) { table.string('event_id').index(); table.foreign('event_id') .references('id') .inTable('events') .onDelete('RESTRICT') .onUpdate('CASCADE'); }) .raw(` CREATE UNIQUE INDEX only_on...
exports.up = function(knex, Promise) { return knex.schema.table('actions', function(table) { table.string('event_id').index(); table.foreign('event_id') .references('id') .inTable('events') .onDelete('RESTRICT') .onUpdate('CASCADE'); }) .raw(` CREATE UNIQUE INDEX only_on...
Comment to explain the magic number
Comment to explain the magic number
JavaScript
mit
futurice/wappuapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,kaupunki-apina/prahapp-backend
--- +++ @@ -13,10 +13,11 @@ only_one_check_in_per_event ON actions(user_id, event_id) + -- Magic number 9 is CHECK_IN_EVENT action type ID. WHERE action_type_id = 9; `); }; -// ALTER TABLE actions ADD CONSTRAINT actions_user_event_uniq UNIQUE (user_id, event_id) + exports.down = functi...
9e0376684a68efedbfa5a4c43dedb1de966ec15f
lib/lookup-reopen/main.js
lib/lookup-reopen/main.js
Ember.ComponentLookup.reopen({ lookupFactory: function(name) { var Component = this._super.apply(this, arguments); if (!Component) { return; } name = name.replace(".","/"); if (Component.prototype.classNames.indexOf(Ember.COMPONENT_CSS_LOOKUP[name]) > -1){ return Component; } return C...
(function() { function componentHasBeenReopened(Component, className) { return Component.prototype.classNames.indexOf(className) > -1; } function reopenComponent(_Component, className) { var Component = _Component.reopen({ classNames: [className] }); return Component; } function ensur...
Refactor monkey-patch to include less duplication.
Refactor monkey-patch to include less duplication.
JavaScript
mit
samselikoff/ember-component-css,samselikoff/ember-component-css,webark/ember-component-css,ebryn/ember-component-css,ebryn/ember-component-css,webark/ember-component-css
--- +++ @@ -1,32 +1,43 @@ -Ember.ComponentLookup.reopen({ - lookupFactory: function(name) { - var Component = this._super.apply(this, arguments); +(function() { + function componentHasBeenReopened(Component, className) { + return Component.prototype.classNames.indexOf(className) > -1; + } - if (!Compone...
a7bf2991eb9c5d093cc2f90ca5491bf0d7ee3433
frontend/src/karma.conf.js
frontend/src/karma.conf.js
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), requir...
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), requir...
Use headless Chrome for Angular tests again.
Fix: Use headless Chrome for Angular tests again.
JavaScript
apache-2.0
iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,IteraSpeed/OpenSpeedMonitor
--- +++ @@ -38,6 +38,6 @@ displayName: 'Chrome Headless for docker' } }, - browsers: ['Chrome'] + browsers: ['ChromeHeadlessForDocker'] }); };
4393047a5ca961d06eedb3501b8d1e0b0a68b279
player.js
player.js
var game = require('socket.io-client')('http://192.168.0.24:3000'), lobby = require('socket.io-client')('http://192.168.0.24:3030'), Chess = require('chess.js').Chess, name = 'RndJesus_' + Math.floor(Math.random() * 100);; lobby.on('connect', function () { console.log('Player ' + name + ' is connected...
var game = require('socket.io-client')('http://localhost:3000'), lobby = require('socket.io-client')('http://localhost:3030'), Chess = require('chess.js').Chess, name = 'RndJesus_' + Math.floor(Math.random() * 100);; lobby.on('connect', function () { console.log('Player ' + name + ' is connected to lo...
Use localhost when running locally
Use localhost when running locally
JavaScript
mit
cheslie-team/cheslie-player,cheslie-team/cheslie-player
--- +++ @@ -1,5 +1,5 @@ -var game = require('socket.io-client')('http://192.168.0.24:3000'), - lobby = require('socket.io-client')('http://192.168.0.24:3030'), +var game = require('socket.io-client')('http://localhost:3000'), + lobby = require('socket.io-client')('http://localhost:3030'), Chess = require('...
542a5dc9cb71b9bcb402620b82d4c5c8c8c98109
lib/node_modules/@stdlib/utils/timeit/lib/min_time.js
lib/node_modules/@stdlib/utils/timeit/lib/min_time.js
'use strict'; // MAIN // /** * Computes the minimum time. * * @private * @param {ArrayArray} times - times * @returns {NonNegativeIntegerArray} minimum time */ function min( times ) { var out; var t; var i; out = times[ 0 ]; for ( i = 1; i < times.length; i++ ) { t = times[ i ]; if ( t[ 0 ] <= out[ 0 ] &...
'use strict'; // MAIN // /** * Computes the minimum time. * * @private * @param {ArrayArray} times - times * @returns {NonNegativeIntegerArray} minimum time */ function min( times ) { var out; var t; var i; out = times[ 0 ]; for ( i = 1; i < times.length; i++ ) { t = times[ i ]; if ( t[ 0 ] < out[ 0 ] ||...
Fix bug when calculating minimum time
Fix bug when calculating minimum time
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
--- +++ @@ -18,8 +18,11 @@ for ( i = 1; i < times.length; i++ ) { t = times[ i ]; if ( - t[ 0 ] <= out[ 0 ] && - t[ 1 ] < out[ 1 ] + t[ 0 ] < out[ 0 ] || + ( + t[ 0 ] === out[ 0 ] && + t[ 1 ] < out[ 1 ] + ) ) { out = t; }
a48d5a1ae957db81aa464d463a4aab0b15ff29a2
lib/server.js
lib/server.js
var st = require('st') , http = require('http') , js = require('atomify-js') , css = require('atomify-css') , open = require('open') module.exports = function (args) { var mount = st(args.server.st || process.cwd()) , port = args.server.port || 1337 , launch = args.server.open , path = args.serv...
var st = require('st') , http = require('http') , js = require('atomify-js') , css = require('atomify-css') , open = require('open') module.exports = function (args) { var mount = st(args.server.st || process.cwd()) , port = args.server.port || 1337 , launch = args.server.open , path = args.serv...
Add leading slash to path if not provided
Add leading slash to path if not provided
JavaScript
mit
atomify/atomify
--- +++ @@ -9,10 +9,14 @@ var mount = st(args.server.st || process.cwd()) , port = args.server.port || 1337 , launch = args.server.open - , path = args.server.path || '' - , url = args.server.url || 'http://localhost:' + port + path + , path = args.server.path || '/' + , url - http.createS...