commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
7b2b8101d99f60c6b60bd04c1a290e40b6357254
noita/javascript.js
noita/javascript.js
--- --- $(document).foundation(); {% for javascript in site.noita.javascripts %} {% include javascript %} {% endfor %}
--- --- {% for javascript in site.noita.javascripts %} {% include javascript %} {% endfor %} $(document).foundation();
Move foundation start to the end
Move foundation start to the end
JavaScript
mit
remy-actual/remy-actual.github.io,rootandflow/old.rootandflow.com,thehammar/thehammar.github.io,remy-actual/remy-actual.github.io,rootandflow/old.rootandflow.com,inlandsplash/inlandsplash.github.io,rootandflow/rootandflow.github.io,inlandsplash/inlandsplash.github.io,mariagwyn/jekyll-noita,inlandsplash/inlandsplash.git...
6dee47bf20ddcbcee0e757725f300ae3ca8f91db
src/quailBuild.js
src/quailBuild.js
#!/usr/bin/env node --harmony 'use strict'; const path = require('path'); const configUtil = require('./config'); const cwd = process.cwd(); const quailCore = require(path.join(cwd, 'node_modules', '@quailjs/quail-core')); module.exports = function quailBuild () { // Get a list of assessments. configUtil.getLoca...
#!/usr/bin/env node --harmony 'use strict'; const path = require('path'); const configUtil = require('./config'); const cwd = process.cwd(); module.exports = function quailBuild () { const quailCore = require( path.join(cwd, 'node_modules', '@quailjs/quail-core') ); // Get a list of assessments. configUt...
Move the quail-core require into the build method
Move the quail-core require into the build method
JavaScript
mit
quailjs/quail-cli
5ed795207a690f729c4fa04c5894adc17f2f7bc7
src/containers/App.js
src/containers/App.js
// This file bootstraps the app with the boilerplate necessary // to support hot reloading in Redux import React, {PropTypes} from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import FuelSavingsApp from '../components/FuelSavingsApp'; import * as FuelSavingsActions from '....
// This file bootstraps the app with the boilerplate necessary // to support hot reloading in Redux import React, {PropTypes} from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import FuelSavingsApp from '../components/FuelSavingsApp'; import * as FuelSavingsActions from '....
Fix no need to always import DevTools component.
Fix no need to always import DevTools component.
JavaScript
mit
barrystaes/react-trebuchet,barrystaes/react-trebuchet
d9bbd11b08973865e288102114de7523d5f78768
packages/truffle/lib/init.js
packages/truffle/lib/init.js
var copy = require("./copy"); var path = require("path"); var temp = require("temp").track(); var Config = require("./config"); var Init = function(destination, callback) { var example_directory = path.resolve(path.join(__dirname, "..", "example")); copy(example_directory, destination, callback); } Init.sandbox =...
var copy = require("./copy"); var path = require("path"); var temp = require("temp").track(); var Config = require("./config"); var Init = function(destination, callback) { var example_directory = path.resolve(path.join(__dirname, "..", "example")); copy(example_directory, destination, callback); } Init.sandbox =...
Make Init.sandbox() take an input configuration.
Make Init.sandbox() take an input configuration.
JavaScript
mit
ConsenSys/truffle
d13199ba65acdbf7f6e2bca4f37c71958cbf349c
test/runner-core.js
test/runner-core.js
var EventEmitter = require('events').EventEmitter; var nodeunit = require('nodeunit'); var assert = require('nodeunit/lib/assert'); assert.equal = function equal(actual, expected, message) { if (actual != expected) { if (actual && actual.nodeType) { actual = actual.toString(); } if (expected && e...
var EventEmitter = require('events').EventEmitter; var nodeunit = require('nodeunit'); module.exports = function runModules(toRun) { var emitter = new EventEmitter(); process.nextTick(function () { nodeunit.runModules(toRun, { moduleStart: function (name) { emitter.emit('moduleStart', name); ...
Remove monkey patches of the unit tester
Remove monkey patches of the unit tester
JavaScript
mit
nicolashenry/jsdom,Sebmaster/jsdom,zaucy/jsdom,danieljoppi/jsdom,kesla/jsdom,tmpvar/jsdom,evdevgit/jsdom,kesla/jsdom,mbostock/jsdom,medikoo/jsdom,aduyng/jsdom,szarouski/jsdom,susaing/jsdom,beni55/jsdom,Ye-Yong-Chi/jsdom,sirbrillig/jsdom,Zirro/jsdom,Sebmaster/jsdom,evdevgit/jsdom,AVGP/jsdom,lcstore/jsdom,zaucy/jsdom,mzg...
db407b1d236f05921ada01645f025921e9ec7614
adapters/generic.js
adapters/generic.js
/** * Basic engine support. */ require('../lib/setModuleDefaults'); var config = require('config'); var engineConfig = config.engines ? config.engines : undefined; /** * Return a function that creates a plugin: */ module.exports = function(language){ return { attach: function (/* options */){ /** ...
/** * Basic engine support. */ require('../lib/setModuleDefaults'); var config = require('config'); var engineConfig = config.engines || {}; /** * Return a function that creates a plugin: */ module.exports = function(language){ return { attach: function (/* options */){ var languageConfig = engineCo...
Allow module value in config to be optional.
Allow module value in config to be optional.
JavaScript
mit
markbirbeck/adapter-template
f1007ef66ef5ffcacbc5a2b0fbbb4725bc99099b
test/test-suites.js
test/test-suites.js
window.VaadinDatePickerSuites = [ 'basic.html', 'dropdown.html', 'overlay.html', 'month-calendar.html', 'scroller.html', 'form-input.html', 'custom-input.html', 'keyboard-navigation.html', 'keyboard-input.html', 'late-upgrade.html', 'wai-aria.html' ];
const isPolymer2 = document.querySelector('script[src*="wct-browser-legacy"]') === null; window.VaadinDatePickerSuites = [ 'basic.html', 'dropdown.html', 'overlay.html', 'month-calendar.html', 'scroller.html', 'form-input.html', 'custom-input.html', 'keyboard-navigation.html', 'keyboard-input.html', ...
Exclude tests usinig importHref from Polymer 3
Exclude tests usinig importHref from Polymer 3
JavaScript
apache-2.0
vaadin/vaadin-date-picker,vaadin/vaadin-date-picker
4c9e3a410418c864ea94b509d494893bd18393bb
test/testOffline.js
test/testOffline.js
var assert = require('assert'); var fs = require('fs'); var path = require('path'); var temp = require('temp').track(); var offline = require('../lib/offline'); describe('Offline', function() { it('should create offline-worker.js in the destination directory', function() { var dir = temp.mkdirSync('tmp'); r...
var assert = require('assert'); var fs = require('fs'); var path = require('path'); var temp = require('temp').track(); var offline = require('../lib/offline'); describe('Offline', function() { it('should create offline-worker.js in the destination directory', function() { var dir = temp.mkdirSync('tmp'); r...
Test that 'offline' overwrites an already existing offline-worker.js
Test that 'offline' overwrites an already existing offline-worker.js
JavaScript
apache-2.0
mykmelez/oghliner,mozilla/oghliner,mykmelez/oghliner,mozilla/oghliner,marco-c/oghliner,marco-c/oghliner
452636534735fb807f00d73c1608f97bf40b7025
parse/public/js/MapsService.js
parse/public/js/MapsService.js
angular.module('atlasApp').service('MapsService', function( $scope, $http, LocationProvider, BusInfoProvider ) { return { /** * Initializes the Google Maps canvas */ this.initMap = function () { console.log('Initializing'); var mapOptions = { zoom: 15, center:...
angular.module('atlasApp').service('MapsService', function( $scope, $http, LocationProvider, BusInfoProvider ) { return { /** * Initializes the Google Maps canvas */ initMap: function () { console.log('Initializing'); var mapOptions = { zoom: 15, center: $scop...
Fix object notation in service
Fix object notation in service
JavaScript
mit
rice-apps/atlas,rice-apps/atlas,rice-apps/atlas
3c0b367aab0d2574a42897f908a57f66a41398be
app/models/user.server.model.js
app/models/user.server.model.js
/** * Created by vinichenkosa on 05.03.15. */ var mongoose = require('mongoose'); var Schema = mongoose.Schema; var UserSchema = new Schema({ firstName: String, lastName: String, email: String, username: String, password: String }); mongoose.model('User', UserSchema);
/** * Created by vinichenkosa on 05.03.15. */ var mongoose = require('mongoose'); var Schema = mongoose.Schema; var UserSchema = new Schema({ firstName: String, lastName: String, email: { type: String, index: true }, username: { type: String, trim: true, un...
Add get and set modifiers Add virtual fields
Add get and set modifiers Add virtual fields
JavaScript
mit
winechess/MEAN
49370f227a106c43129c23a6a30a91b5a82e9ad6
src/server/gqlUpdateSchema.js
src/server/gqlUpdateSchema.js
import fs from 'fs-extra'; import path from 'path'; import { mainStory, chalk } from 'storyboard'; import Promise from 'bluebird'; import * as gqlServer from './gqlServer'; const outputPath = path.join(__dirname, '../common/'); gqlServer.init(); Promise.resolve() ....
import fs from 'fs-extra'; import path from 'path'; import { addListener, mainStory, chalk } from 'storyboard'; import consoleListener from 'storyboard/lib/listeners/console'; import Promise from 'bluebird'; import * as gqlServer from './gqlServer'; addListener...
Fix update-schema JSON for Storyboard 2
Fix update-schema JSON for Storyboard 2
JavaScript
mit
guigrpa/mady,guigrpa/mady,guigrpa/mady
95d0ef56ecf2aa03d11b957a75bf7fadbb60bc21
src/routes/ui.js
src/routes/ui.js
'use strict' const path = require('path') const sass = require('rosid-handler-sass') const js = require('rosid-handler-js') const preload = require('../preload') const html = require('../ui/index') const index = async () => { return html() } const styles = async () => { const filePath = path.resolve(__dirname,...
'use strict' const { resolve } = require('path') const sass = require('rosid-handler-sass') const js = require('rosid-handler-js') const preload = require('../preload') const html = require('../ui/index') const optimize = process.env.NODE_ENV !== 'development' const index = async () => { return html() } const s...
Optimize SASS and JS output
Optimize SASS and JS output
JavaScript
mit
electerious/Ackee
1fbf7513c94fa3f7466ecba2256a276455b7ab0b
src/plugins/system.js
src/plugins/system.js
export default function systemPlugin () { return (mp) => { function onMessage (text) { mp.emit('systemMessage', text) } mp.on('connected', () => { mp.ws.on('plugMessage', onMessage) }) } }
export default function systemPlugin () { return (mp) => { function onMessage (text) { mp.emit('systemMessage', text) } function onMaintenanceAlert (minutesLeft) { mp.emit('maintenanceAlert', minutesLeft) } function onMaintenance () { mp.emit('maintenance') } mp.on('co...
Implement `maintenance` and `maintenanceAlert` events.
Implement `maintenance` and `maintenanceAlert` events.
JavaScript
mit
goto-bus-stop/miniplug
d86ced6ac75cb6e71b6018d3761177cdf5bd892e
app/scripts/directives/block.js
app/scripts/directives/block.js
'use strict'; angular.module('confRegistrationWebApp') .directive('block', function () { return { templateUrl: 'views/blockDirective.html', restrict: 'E', controller: function ($scope, AnswerCache, RegistrationCache, uuid) { var currentRegistration = RegistrationCache.getCurrentRightNow...
'use strict'; angular.module('confRegistrationWebApp') .directive('block', function () { return { templateUrl: 'views/blockDirective.html', restrict: 'E', controller: function ($scope, AnswerCache, RegistrationCache, uuid) { var currentRegistration = RegistrationCache.getCurrentRightNow...
Tidy up for loop code
Tidy up for loop code
JavaScript
mit
CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web
f1a86242849a9e75fd555dfdc95322d563b26646
src/utils/parseUrl.js
src/utils/parseUrl.js
/** * Exports `parseUrl` for, well, parsing URLs! */ import urlParse from 'url-parse'; const schemeMatcher = /^([a-zA-Z]*\:)?\/\//; const hasScheme = url => { if (typeof url !== 'string') { return false; } return schemeMatcher.test(url); }; const parseUrl = (url = '', baseUrl) => { if (!hasScheme(url...
/** * Exports `parseUrl` for, well, parsing URLs! */ import urlParse from 'url-parse'; const schemeMatcher = /^([a-zA-Z]*\:)?\/\//; const hasScheme = url => { if (typeof url !== 'string') { return false; } return schemeMatcher.test(url); }; const parseUrl = (url = '', baseUrl) => { if (!hasScheme(url)...
Add url and baseUrl to error messages
Add url and baseUrl to error messages Add the url and baseUrl to the error messages inside `parseUrl`. This should help debug where these errors originated.
JavaScript
mit
zapier/redux-router-kit
75e10d72e55daf37d47e269b6b1cc5b774b69e22
stories/index.js
stories/index.js
import { MemoryRouter } from 'react-router'; if (typeof MemoryRouter !== 'undefined') { require('./V4/index'); } else { require('./V3/index'); }
require('./V4/index'); // replace with V3 to test with react-router v.3
Remove any kind of logic that tries to load the right version of react-router and simply does not work.
Remove any kind of logic that tries to load the right version of react-router and simply does not work.
JavaScript
mit
gvaldambrini/storybook-router
5ffcd271f7bccef678c377558ded06fadb5a234f
app/crash-herald.js
app/crash-herald.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ const appConfig = require('../js/constants/appConfig') const crashReporter = require('electron').crashReporter ex...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ const appConfig = require('../js/constants/appConfig') const crashReporter = require('electron').crashReporter con...
Send rev hash to crash reports
Send rev hash to crash reports Add rev. hash to the extra parameter send with crash reports. Auditors: 552486fed9a9ff3f07aa28f460daa63ab433892d@alexwykoff
JavaScript
mpl-2.0
diasdavid/browser-laptop,timborden/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,timborden/browser-laptop,diasdavid/browser-laptop,timborden/browser-laptop,timborden/browser-laptop,luixxiul/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,luixxiul/browser-laptop
3c46ee20228420ded9a6752e8b5fbf482d1ab9b4
scripts/tweet_release.js
scripts/tweet_release.js
var fetch = require('node-fetch') var execSync = require('child_process').execSync var zapierHookURL = 'https://zapier.com/hooks/catch/3petdc/' var tag = process.env.TRAVIS_TAG || execSync('git describe --abbrev=0 --tags').toString().trim() fetch(zapierHookURL, { method: 'POST', body: JSON.stringify({ tweet...
import fetch from 'node-fetch' import {execSync} from 'child_process' const zapierHookURL = `https://zapier.com/hooks/catch/${process.env.ZAPIER_TWEET_RELEASE_HOOK_ID}/` const tag = process.env.TRAVIS_TAG || execSync('git describe --abbrev=0 --tags').toString().trim() const changelogUrl = `https://github.com/top...
Secure the Zapier hook URL, use ES 2015 in the script
Secure the Zapier hook URL, use ES 2015 in the script
JavaScript
mit
js-fns/date-fns,date-fns/date-fns,js-fns/date-fns,date-fns/date-fns,date-fns/date-fns
05b9f0d821d0fda89b49cddd3823a74ccd8a17d8
lib/httpStatus.js
lib/httpStatus.js
/*jshint node:true */ "use strict"; var data = { created: { code: 201, body: "Created" }, noContent: { code: 204, body: "" }, notFound: { code: 404, body: "Not found" }, methodNotAllowed: { code: 405, body: "Method not allowed" }, notImplemented: { code: 501, body: "Not implemented"} }; function HTTPStatus(code,...
/*jshint node:true */ "use strict"; var data = { created: { code: 201, body: "Created" }, noContent: { code: 204, body: "" }, badRequest: { code: 400, body: "Bad request" }, notFound: { code: 404, body: "Not found" }, methodNotAllowed: { code: 405, body: "Method not allowed" }, notImplemented: { code: 501, body:...
Add 400 bad request status helper
Add 400 bad request status helper
JavaScript
mit
njoyard/yarm
75eee88ec94c6174761ddb6f121b1becb7b1b395
app/js/factories.js
app/js/factories.js
'use strict'; angular.module('ahoyApp.factories', []) .factory("smartBanner", function() { var argument = ""; if (document.location.hash.indexOf("#/link/") != -1) { argument = document.location.hash.substring("#/link/".length);; } return { appId: "973996885", appArgument: argument } ...
'use strict'; angular.module('ahoyApp.factories', []) .factory("smartBanner", function() { var argument = ""; if (document.location.hash.indexOf("#/link/") != -1) { argument = "ahoyconference://link/"+document.location.hash.substring("#/link/".length);; } return { appId: "973996885", app...
Use full URL as smartbanner argument.
Use full URL as smartbanner argument.
JavaScript
mit
ahoyconference/ahoy-ui,ahoyconference/ahoy-ui
8012441a16ecb34c7933a7edf7d3fd88470bdd19
test/transform.js
test/transform.js
var test = require('tap').test; var fs = require('fs'); var path = require('path'); var through = require('through'); var convert = require('convert-source-map'); var transform = require('..'); test('transform adds sourcemap comment', function (t) { t.plan(1); var data = ''; var...
var test = require('tap').test; var fs = require('fs'); var path = require('path'); var through = require('through'); var convert = require('convert-source-map'); var transform = require('..'); test('transform adds sourcemap comment', function (t) { t.plan(1); var data = ''; var...
Update source map test to correspond with CoffeeScript 1.7
Update source map test to correspond with CoffeeScript 1.7
JavaScript
mit
jsdf/coffee-reactify,jsdf/coffee-reactify,jnordberg/coffeeify,hafeez-syed/coffeeify
6055151b88734de9f3dec4bf0c2f6487caf602b1
jest-puppeteer.config.js
jest-puppeteer.config.js
module.exports = () => ({ browser: process.env.BROWSER || 'chromium', launch: { dumpio: true, headless: process.env.HEADLESS !== 'false', }, server: { command: 'yarn dev:serve', port: 5000, }, }());
module.exports = { browser: process.env.BROWSER || 'chromium', launch: { dumpio: true, headless: process.env.HEADLESS !== 'false', }, server: { command: 'yarn dev:serve', port: 5000, }, };
Revert "test: fix default browser value"
Revert "test: fix default browser value" This reverts commit a8f88984443a15616c9bdfba67ae7e42dd179ddd.
JavaScript
mit
FezVrasta/popper.js,FezVrasta/popper.js,FezVrasta/popper.js,floating-ui/floating-ui,floating-ui/floating-ui,floating-ui/floating-ui,FezVrasta/popper.js
16a03f73f99f7e6b0fc9c4ab60dc76579092d3ce
app/components/Docker/index.js
app/components/Docker/index.js
import React, { Component } from 'react' import { Icon } from 'antd' import Images from './Images' import styles from './Docker.scss' class Docker extends Component { render() { return ( <div> <h1><Icon type="hdd" /> Docker</h1> <Images /> </di...
import React, { Component } from 'react' import { Tabs, Icon } from 'antd' import Images from './Images' import styles from './Docker.scss' const TabPane = Tabs.TabPane class Docker extends Component { render() { return ( <div> <h1><Icon type="hdd" /> Docker</h1> ...
Add tab information to Docker window for various sub-interfaces
Add tab information to Docker window for various sub-interfaces
JavaScript
mit
baublet/lagniappe,baublet/lagniappe
a3d4149b667f00bc44401292b7ed95f705e1b2e2
source/class/test/Mammalian.js
source/class/test/Mammalian.js
/** * This is a generic Interface for Mammalian Animals * * Those class of Animals have different things in * common - compared to other animal classes like * {api.test.Fish}. */ core.Interface('api.test.Mammalian', { properties: { /** * All Mammalians have a fur! */ fur: { type: 'Object', fire...
/** * This is a generic Interface for Mammalian Animals * * Those class of Animals have different things in * common - compared to other animal classes like * {api.test.Fish}. */ core.Interface('api.test.Mammalian', { properties: { /** * All Mammalians have a fur! */ fur: { type: 'Object', fire...
Make no sense to have apply routines in interface as it is not visible from the outside
Make no sense to have apply routines in interface as it is not visible from the outside
JavaScript
mit
zynga/apibrowser,zynga/apibrowser
4b79570b45e609bf224347add37c5be95a432a62
app/libs/utils/color-string.js
app/libs/utils/color-string.js
'use strict'; // Load requirements const clk = require('chalk'), chalk = new clk.constructor({level: 1, enabled: true}); // Formats a string with ANSI styling module.exports = function(str) { // Variables const regex = /\{([a-z,]+)\:([\s\S]*?)\}/gmi; let m; // Check for a non-string if ( typeof str ...
'use strict'; // Load requirements const clk = require('chalk'), chalk = new clk.constructor({level: 1, enabled: true}); // Formats a string with ANSI styling module.exports = function(str) { // Variables const regex = /\{([a-z,]+)\:([\s\S]*?)\}/gmi; let m = null, args = Array.prototype.slice.call(argume...
Update utils color string with basic sprintf support
Update utils color string with basic sprintf support
JavaScript
apache-2.0
transmutejs/core
819016b9a70329ff1340ebcbdf149244fe60cd4c
client/app/components/b-portion.js
client/app/components/b-portion.js
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'li', classNames: ['b-portion'], click(e) { const target = Ember.$(e.target); if (target.hasClass('checkbox__text') || target.hasClass('checkbox__control')) { this.togglePaidStatus(this.get('portion')); } return fa...
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'li', classNames: ['b-portion'], click(e) { const target = Ember.$(e.target); if (target.hasClass('checkbox__text') || target.hasClass('checkbox__control')) { this.togglePaidStatus(this.get('portion')); } return fa...
Update order money available when portion status is changed
Update order money available when portion status is changed
JavaScript
mit
yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time
c8d8b9c215426ebef3d42c94498e1ddaa5718a64
public/js/calnav.js
public/js/calnav.js
'use strict'; var calnav = (function() { var nav = $('.nav-cals'); var renderCal = function(cal, level) { var input = document.createElement('input'); input.type = 'checkbox'; input.checked = 'checked'; $(input).on('change', function(e) { var active = $(this).is(":checked"); var l = $...
'use strict'; var calnav = (function() { var nav = $('.nav-cals'); var renderCal = function(cal, level) { var input = document.createElement('input'); input.type = 'checkbox'; input.checked = 'checked'; $(input).on('change', function(e) { var active = $(this).is(":checked"); var l = $...
Remove calendar nav generated by js
Remove calendar nav generated by js
JavaScript
mit
oSoc15/educal,tthoeye/educal,oSoc14/code9000,oSoc14/code9000,tthoeye/educal,oSoc15/educal
f7a29ef2c87f4f56ddb17dafa154c8775b1ba1c1
app.js
app.js
var gpio = require('onoff').Gpio; var red = new gpio(16, 'out'); var green = new gpio(12, 'out'); var blue = new gpio(21, 'out'); var button = new gpio(25, 'in', 'both'); var express = require('express'); var app = express(); app.get('/', function(req, res){ res.send('Hello World!'); }); app.listen(3000, function()...
var gpio = require('onoff').Gpio; var red = new gpio(16, 'out'); var green = new gpio(12, 'out'); var blue = new gpio(21, 'out'); var button = new gpio(25, 'in', 'both'); var express = require('express'); var app = express(); app.get('/', function(req, res){ res.send('Hi I changed this!'); }); app.listen(3000, func...
Update hello world text to text git push to remote server
Update hello world text to text git push to remote server
JavaScript
mit
davesroka/rpi-node-led,davesroka/rpi-node-led
7bfe479fbee18bc557cafc26986e01ad947abbda
src/app/index.run.js
src/app/index.run.js
export function runBlock($log, $state, $trace) { 'ngInject'; // Enable logging of state transition $trace.enable('TRANSITION'); // Add any logic for handling errors from state transitions $state.defaultErrorHandler(function() { // console.error('error:', error); }); }
export function runBlock($log, $state, $trace, $transitions) { 'ngInject'; // Enable logging of state transition $trace.enable('TRANSITION'); // Add any logic for handling errors from state transitions $state.defaultErrorHandler(function() { // console.error('error:', error); }); // Test when application is...
Add transition to test for 'app.start' and redirect if websocket is OPEN
Add transition to test for 'app.start' and redirect if websocket is OPEN
JavaScript
unlicense
ejwaibel/squarrels,ejwaibel/squarrels
c35fd81e9ec426c683317ce0687de91b6dda4e38
lib/cb.socket.io/main.js
lib/cb.socket.io/main.js
// Requires var socketio = require('socket.io'); function setup(options, imports, register) { var server = imports.server.http; var io = socketio.listen(server, { // Do not run a flash policy server // (requires root permissions) 'flash policy port': -1, 'destroy upgrade': fa...
// Requires var socketio = require('socket.io'); function setup(options, imports, register) { var server = imports.server.http; var io = socketio.listen(server, { // Do not run a flash policy server // (requires root permissions) 'flash policy port': -1, 'destroy upgrade': fa...
Switch socket.io's log level to warnings
Switch socket.io's log level to warnings
JavaScript
apache-2.0
CodeboxIDE/codebox,code-box/codebox,lcamilo15/codebox,CodeboxIDE/codebox,smallbal/codebox,blubrackets/codebox,ronoaldo/codebox,fly19890211/codebox,LogeshEswar/codebox,ahmadassaf/Codebox,etopian/codebox,blubrackets/codebox,quietdog/codebox,quietdog/codebox,kustomzone/codebox,nobutakaoshiro/codebox,Ckai1991/codebox,liste...
c79f0fa931512d00a0c76b7d067e3e80088aeb69
app/javascript/components/forms/login/actions.js
app/javascript/components/forms/login/actions.js
import { createThunkAction } from 'utils/redux'; import { FORM_ERROR } from 'final-form'; import { login, register, resetPassword } from 'services/user'; import { getUserProfile } from 'providers/mygfw-provider/actions'; export const loginUser = createThunkAction('logUserIn', data => dispatch => login(data) .th...
import { createThunkAction } from 'utils/redux'; import { FORM_ERROR } from 'final-form'; import { login, register, resetPassword } from 'services/user'; import { getUserProfile } from 'providers/mygfw-provider/actions'; export const loginUser = createThunkAction('logUserIn', data => dispatch => login(data) .th...
Fix reset password for MyGFW
Fix reset password for MyGFW
JavaScript
mit
Vizzuality/gfw,Vizzuality/gfw
6555da3374369edb9bcd03d006c1504010688268
javascripts/pong.js
javascripts/pong.js
(function() { 'use strict'; var canvas = document.getElementById('game'); var WIDTH = window.innerWidth; var HEIGHT = window.innerHeight; canvas.width = WIDTH; canvas.height = HEIGHT; var ctx = canvas.getContext('2d'); var FPS = 1000 / 60; var Paddle = function(x, y, width, height) { this.x = x; ...
(function() { 'use strict'; var canvas = document.getElementById('game'); var WIDTH = window.innerWidth; var HEIGHT = window.innerHeight; canvas.width = WIDTH; canvas.height = HEIGHT; var ctx = canvas.getContext('2d'); var FPS = 1000 / 60; // Define game objects, i.e paddle and ball var Paddle = fu...
Define and create human player and computer objects. Render them as well!
Define and create human player and computer objects. Render them as well!
JavaScript
mit
msanatan/pong,msanatan/pong,msanatan/pong
5b861da127b26493fa721cb65152edb8f06ab8bf
app/notes/notes.js
app/notes/notes.js
angular.module('marvelousnote.notes', [ 'ui.router' ]) .config(function($stateProvider) { $stateProvider .state('notes', { url: '/notes', templateUrl: 'notes/notes.html', controller: 'NotesController' }) .state('notes.form', { url: '/:noteId', templateUrl: 'notes/notes-...
(function() { angular .module('marvelousnote.notes', ['ui.router']) .congig(notesConfig) .controller('NotesController', NotesController); function notesConfig($stateProvider) { $stateProvider .state('notes', { url: '/notes', templateUrl: 'notes/notes.html', controller: 'NotesCon...
Move NotesController and config to named functions.
Move NotesController and config to named functions.
JavaScript
mit
patriciachunk/MarvelousNote,patriciachunk/MarvelousNote
03c84159702761c70ebc9a3e2abd56048f04ac56
src/containers/weather_list.js
src/containers/weather_list.js
// Container to render a list of cities and their data // Saturday, February 25, 2017 import React, { Component } from 'react'; import { connect } from 'react-redux'; class WeatherList extends Component { render() { return ( <table className = 'table table-hover'> <thead> <tr> <th>City</th> ...
// Container to render a list of cities and their data // Saturday, February 25, 2017 import React, { Component } from 'react'; import { connect } from 'react-redux'; class WeatherList extends Component { constructor(props) { super(props); } renderForecast() { // this.props.weather => [{ }, { }] console...
Create renderForecast() method to render each row of data in the weather table.
Create renderForecast() method to render each row of data in the weather table.
JavaScript
mit
jstowers/ReduxWeatherApp,jstowers/ReduxWeatherApp
8fcdcd00b8a9c97a31c605ec4286984849be0378
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var moment = require('moment'); var fs = require('fs'); var simpleGit = require('simple-git')(); var semver = require('semver'); gulp.task('build', function () { // VERSION var versionFile = fs.readFileSync('package.json').toString().split('\n'); var version = versionFil...
'use strict'; var gulp = require('gulp'); var moment = require('moment'); var fs = require('fs'); var simpleGit = require('simple-git')(); var semver = require('semver'); gulp.task('build', function () { var numberToIncrement = 'patch'; if (process.argv && process.argv[3]) { var option = process.argv[3].replac...
Build - Pass the major/minor/patch value as an option of the build command
Build - Pass the major/minor/patch value as an option of the build command
JavaScript
mit
SeyZ/forest-express-mongoose
f0015af6ec09fcadea4a0ac4daaf8a5635725952
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var gReact = require('gulp-react'); var del = require('del'); var shell = require('gulp-shell'); gulp.task('clean', function(cb) { del(['lib/', 'Flux.js'], cb); }); gulp.task('default', ['clean'], function() { return gulp.src('src/*.js') .pipe(gReact({harmony: true})) ...
var gulp = require('gulp'); var gReact = require('gulp-react'); var del = require('del'); var shell = require('gulp-shell'); gulp.task('clean', function(cb) { del(['lib/', 'Flux.js'], cb); }); gulp.task('default', ['clean'], function() { return gulp.src('src/*.js') .pipe(gReact({harmony: true})) ...
Update to work with directory outside of cwd
Update to work with directory outside of cwd
JavaScript
bsd-3-clause
benchling/react-art,toddw/react-art,Sirlon/react-art,scgilardi/react-art,micahlmartin/react-art,kidaa/react-art,kidaa/react-art,reactjs/react-art
f0131fe468efcca8fafdc020269e1eda52374f4c
client/common/event_actions.js
client/common/event_actions.js
/** * Assigns handlers/listeners for `[data-action]` links. * * Actions associated with a link will be invoked via Wire with the jQuery * event object as an argument. **/ 'use strict'; /*global NodecaLoader, N, window*/ var $ = window.jQuery; $(function () { ['click', 'submit', 'input'].forEach(functi...
/** * Assigns handlers/listeners for `[data-action]` links. * * Actions associated with a link will be invoked via Wire with the jQuery * event object as an argument. **/ 'use strict'; /*global NodecaLoader, N, window*/ var $ = window.jQuery; $(function () { ['click', 'submit', 'input'].forEach(functi...
Add `event.preventDefault()` call in UJS action handlers.
Add `event.preventDefault()` call in UJS action handlers.
JavaScript
mit
nodeca/nodeca.core,nodeca/nodeca.core
abe4633a8484bce38e188871d24facf909099b2f
server/routes/rootRoute.js
server/routes/rootRoute.js
/** * Created by Omnius on 6/25/16. */ 'use strict'; const security = { xframe: { rule: 'sameorigin' }, hsts: { maxAge: '31536000', includeSubdomains: true }, xss: true }; module.exports = [ { // Web login path: '/', method: 'GET', conf...
/** * Created by Omnius on 6/25/16. */ 'use strict'; const security = { xframe: { rule: 'sameorigin' }, hsts: { maxAge: '31536000', includeSubdomains: true }, xss: true }; module.exports = [ { // Web login path: '/', method: 'GET', conf...
Rearrange object codes - no significant change
Rearrange object codes - no significant change
JavaScript
mit
identityclash/hapi-login-test,identityclash/hapi-login-test
d1f84e072d74c50dd67be17bd448cbaf672e6d19
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var casperjs = require('gulp-casperjs'); var spawn = require('child_process').spawn; var gutil = require('gulp-util'); gulp.task('integrate', function(){ gulp.src('./spec/integration/**') .pipe(casperjs({command:'test'})); }); gulp.task('integrate:win', function () { ...
'use strict'; var gulp = require('gulp'); var casperjs = require('gulp-casperjs'); var spawn = require('child_process').spawn; gulp.task('integrate', function(){ gulp.src('./spec/integration/**') .pipe(casperjs({command:'test'})); });
Remove unused Windows integrate code
Remove unused Windows integrate code
JavaScript
mit
startersacademy/fullstack-project-01,startersacademy/fullstack-project-01
ce0da6d74e4103431422f120134ef8a43f700cc4
webpack.config.js
webpack.config.js
module.exports = { entry: "./index.jsx", output: { path: __dirname, filename: "./build/bundle.js" }, module: { loaders: [ {test: /\.(jsx|js)$/, loader: "babel-loader"}, {test: /\.md$/, loader: "raw-loader"}, {test: /\.json$/, loader: "json-lo...
module.exports = { entry: "./index.jsx", output: { path: __dirname, filename: "./build/bundle.js" }, resolve: { extensions: ['', '.js', '.jsx', '.json'] }, module: { loaders: [ {test: /\.(jsx|js)$/, loader: "babel-loader"}, {test: /\.md$...
Resolve the jsx in import-s
Resolve the jsx in import-s
JavaScript
mit
ikr/estimates-template,ikr/estimates-template
d497926e4a55d4b71c997cab7ebe6a00ee4e7ad9
client/new-paula.js
client/new-paula.js
import React from 'react'; import {connect} from 'react-redux'; import * as actions from './actions'; export default class NewPaula extends React.Component { update(e) { e.preventDefault(); this.props.dispatch(actions.replace_paula(this.refs.paula.value)); } render() { return <form onSubmit={this.update}> ...
import React from 'react'; import {connect} from 'react-redux'; import * as actions from './actions'; export default connect()(class NewPaula extends React.Component { update(e) { e.preventDefault(); this.props.dispatch(actions.replace_paula(this.refs.paula.value)); } render() { return <form onSubmit={this.u...
Debug Paula's bean for her
Debug Paula's bean for her
JavaScript
mit
Rosuav/monopoly-open-bid,oshirodk/dogMatch,alexpoe22/fuzzyFinder,oshirodk/dogMatch,jbenjaminy/fullstack-app-template,jbenjaminy/fullstack-app-template,alexpoe22/fuzzyFinder,Rosuav/monopoly-open-bid,Rosuav/monopoly-open-bid
62069a4d22832d7b53e24b1fb2b920898428b6b3
lib/command_push.js
lib/command_push.js
'use strict'; var async = require('grunt').util.async; var grunt = require('grunt'); var ArgUtil = require('flopmang'); module.exports = function (task, exec, done) { var argUtil = new ArgUtil(task, [ { option: 'all', defaultValue: false, useAsFlag: true, us...
'use strict'; var async = require('grunt').util.async; var grunt = require('grunt'); var ArgUtil = require('flopmang'); module.exports = function (task, exec, done) { var argUtil = new ArgUtil(task, [ { option: 'all', defaultValue: false, useAsFlag: true, us...
Add support for git push --no-verify
Add support for git push --no-verify
JavaScript
mit
rubenv/grunt-git
a15560670541d1837e3d94b28749c10d9193aba4
examples/peep-peep/js/peep-peep.js
examples/peep-peep/js/peep-peep.js
'use strict'; $('#message').keyup(function(e) { if ((e.keyCode || e.which) == 13) { if (!e.srcElement.value) return; // enter was pressed $state.at('chat').push({ from: $('#username').val(), message: e.srcElement.value }); $(e.srcElement).val(null); ...
'use strict'; $('#message').keyup(function(e) { if ((e.keyCode || e.which) == 13) { if (!e.srcElement.value) return; // enter was pressed $state.at('chat').push({ from: $('#username').val(), message: e.srcElement.value }); $(e.srcElement).val(null); } }) function addPost(m) { va...
Standardize indent to 2 characters rather than beautify-js's standard 4.
Standardize indent to 2 characters rather than beautify-js's standard 4.
JavaScript
mit
kustomzone/ShareJS,Nzaga/ShareJS,share/ShareJS,modulexcite/ShareJS,gdseller/ShareJS,dialoghq/ShareJS,dialoghq/ShareJS,dialoghq/ShareJS,rasata/ShareJS,rchrd2/ShareJS,playcanvas/ShareJS,igmcdowell/ShareJS,gdseller/ShareJS,mcanthony/ShareJS,igmcdowell/ShareJS,luto/ShareJS,kantele/k-share,matthewbauer/ShareJS,freewind/Shar...
818c6e9613f39b12452936a5879c08cbe4889bf1
js/agent.js
js/agent.js
(function() { // wait for polyfill to be loaded if (document.readyState == "complete") { init(); } else { window.addEventListener('load', init); } var loggedIn = false; function init() { if (!navigator.id) return; sendToContent({ type: "init" }); window.addEventListener('browser...
(function() { // wait for polyfill to be loaded if (document.readyState == "complete") { init(); } else { window.addEventListener('load', init); } var loggedIn = false; function init() { // just quit if no navigator observer API available if (!navigator.id || !navigator.id.watch) ret...
Check for navigator.id.watch when initializing
Check for navigator.id.watch when initializing
JavaScript
mit
sickill/chrome-browserid
a3f2cc9bcfe2bb04d60c7b94a1f1e9799d8f3d05
test/rules/enum_values_sorted_alphabetically.js
test/rules/enum_values_sorted_alphabetically.js
import assert from 'assert'; import { parse } from 'graphql'; import { validate } from 'graphql/validation'; import { buildASTSchema } from 'graphql/utilities/buildASTSchema'; import { EnumValuesSortedAlphabetically } from '../../src/rules/enum_values_sorted_alphabetically'; describe('EnumValuesSortedAlphabetically r...
import { EnumValuesSortedAlphabetically } from '../../src/rules/enum_values_sorted_alphabetically'; import { expectFailsRule, expectPassesRule } from '../assertions'; describe('EnumValuesSortedAlphabetically rule', () => { it('catches enums that are not sorted alphabetically', () => { expectFailsRule( Enum...
Use test helpers in EnumValuesSortedAlphabetically tests
Use test helpers in EnumValuesSortedAlphabetically tests
JavaScript
mit
cjoudrey/graphql-schema-linter
c7b9dad1e635a60ce0d866c7de295a55df050001
lib/range-finder.js
lib/range-finder.js
const {Range} = require('atom') module.exports = class RangeFinder { // Public static rangesFor (editor) { return new RangeFinder(editor).ranges() } // Public constructor (editor) { this.editor = editor } // Public ranges () { const selectionRanges = this.selectionRanges() if (selecti...
const {Range} = require('atom') module.exports = class RangeFinder { // Public static rangesFor (editor) { return new RangeFinder(editor).ranges() } // Public constructor (editor) { this.editor = editor } // Public ranges () { const selectionRanges = this.selectionRanges() if (selecti...
Move function outside of class
:art: Move function outside of class Since the endRowForSelectionRange method doesn't use any of the class's internal state, make it a function that lives outside the class.
JavaScript
mit
atom/sort-lines,garethbjohnson/sort-css
2d1227344a8452a64277290330e838220b5a2995
js/basic.js
js/basic.js
function sendRequest(action, data, callback) { $.ajax({ type: 'post', url: 'foler.php?action='+action, data: data, error: function() { alert('Connection lost'); }, success: function(response) { if(callback !=...
function sendRequest(action, data, callback) { $.ajax({ type: 'post', url: 'foler.php?action='+action, data: data, error: function() { alert('Connection lost'); }, success: function(response) { if(callback !=...
Fix response var for callback after ajax
Fix response var for callback after ajax
JavaScript
mit
serkin/foler,serkin/foler,serkin/foler
35ff337b8c6d97f8386ab020a28ae906688f2c40
lib/tumblr/theme.js
lib/tumblr/theme.js
var Request = require('./request') , Browser = require('./browser'); var Theme = function (session, blog, html) { this.session = session; this.blog = blog; this.html = html; } Theme.prototype = { save: function () { return this.session.create() .with(this) .then(this.get_customize_form) ...
var Request = require('./request') , Browser = require('./browser'); var Theme = function (session, blog, html) { this.session = session; this.blog = blog; this.html = html; } Theme.prototype = { save: function () { return this.session.create() .with(this) .then(this.get_customize_form) ...
Repair check for correct status code on deploy.
Repair check for correct status code on deploy.
JavaScript
mit
nporteschaikin/peak
7d0d2bda421730ed3512f839c5bb8dae6c7893b5
src/languages/applescript.js
src/languages/applescript.js
/* Language: AppleScript */ function(hljs) { return { defaultMode: { keywords: { keyword: 'about above after against and around as at back before beginning ' + 'behind below beneath beside between but by considering contain ' + 'contain contains continue copy div does ...
/* Language: AppleScript Authors: Nathan Grigg <nathan@nathanamy.org> Dr. Drang <drdrang@gmail.com> */ function(hljs) { var STRINGS = [ hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE ]; var TITLE = { className: 'title', begin: hljs.UNDERSCORE_IDENT_RE }; var PARAMS = { className: 'par...
Add strings and function definitions, attributions.
Add strings and function definitions, attributions.
JavaScript
bsd-3-clause
iominh/highlight.js,yxxme/highlight.js,adjohnson916/highlight.js,1st1/highlight.js,christoffer/highlight.js,Sannis/highlight.js,axter/highlight.js,iOctocat/highlight.js,J2TeaM/highlight.js,CausalityLtd/highlight.js,daimor/highlight.js,alex-zhang/highlight.js,STRML/highlight.js,axter/highlight.js,bogachev-pa/highlight.j...
939753530b37807f8106c66da9b958c8db65b648
lib/exec.js
lib/exec.js
const { exec } = require('child_process'); function run(fullCmd) { return new Promise((resolve, reject) => { console.log(`Executing command: ${ fullCmd }`); exec(fullCmd, (error, stdout, stderr) => { // eslint-disable-line no-unused-vars if (stderr || error) { reject(stderr || error); } ...
const { exec } = require('child_process'); function run(fullCmd) { return new Promise((resolve, reject) => { console.log(`Executing command: ${ fullCmd }`); exec(fullCmd, (error, stdout, stderr) => { // eslint-disable-line no-unused-vars if (stderr || error) { reject(stderr || error); } ...
Add validation to params object
Add validation to params object
JavaScript
mit
stetsmando/pi-camera
073dafd5af2af77e303981066b2e1339b5358948
core/ModelDAO.js
core/ModelDAO.js
/** * @license * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
/** * @license * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless requir...
Fix acalc not running when not build.
Fix acalc not running when not build.
JavaScript
apache-2.0
mdittmer/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,osric-the-knight/foam,osric-the-knight/foam,jlhughes/foam,foam-framework/foam,foam-framework/foam,jacksonic/foam,foam-framework/foam,jlhughes/foam,mdittmer/foam,mdittmer/foam,foam-framework/foam,jlhughes/foam,jlhughes/foam,mdittmer/foam,jacksonic/fo...
1190e7bd1dcbe1c943aa7ea3c7617291acc07f71
lib/create-store.js
lib/create-store.js
'use strict' var assign = require('object-assign') var EventEmitter = require('eventemitter3') var objEql = require('obj-eql') function createStore(obj) { return assign(Object.create(EventEmitter.prototype), { state: {}, setState: function(change) { this.replaceState(assign({}, this.state, change)) ...
'use strict' var assign = require('object-assign') var EventEmitter = require('eventemitter3') var objEql = require('obj-eql') function createStore(obj) { return assign(Object.create(EventEmitter.prototype), { state: {}, setState: function(change) { this.replaceState(assign({}, this.state, change)) ...
Add a circular reference from the store state back to the store.
Add a circular reference from the store state back to the store. Useful if store state is used as a prop, allows access back to store methods
JavaScript
mit
uniflow/uniflow
a489e41da4a5efe8e6770bdaaa4f5bcc66d94bfd
www/MBTilesPlugin.js
www/MBTilesPlugin.js
var MBTilesPlugin = function() { }; MBTilesPlugin.prototype.open = function(params, onSuccess, onError) { return cordova.exec(onSuccess, onError, "MBTilesPlugin", "open", [params]); }; MBTilesPlugin.prototype.getMetadata = function(onSuccess, onError) { return cordova.exec(onSuccess, onError, "MBTilesPlugin", "get_...
var MBTilesPlugin = function() { }; MBTilesPlugin.prototype.open = function(params, onSuccess, onError) { return cordova.exec(onSuccess, onError, "MBTilesPlugin", "open", [params]); }; MBTilesPlugin.prototype.getMetadata = function(onSuccess, onError) { return cordova.exec(onSuccess, onError, "MBTilesPlugin", "get_...
Add new function js execute_statment
Add new function js execute_statment
JavaScript
apache-2.0
andreacimino/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,andreacimino/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,andreacimino/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,andreacimino/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,andreacimin...
ec59c2f8017985005c1d36e1d857276a231ea220
lib/methods/save.js
lib/methods/save.js
const getModel = require( './model.js' ); module.exports = function ( modelName, item, cb ) { return new Promise( ( resolve ) => { getModel( modelName ) .then( ( model, b ) => { if ( ! item.id && item.id !== 0 ) return resolve( model.create( item, cb ) ); ...
const getModel = require( './model.js' ); module.exports = function ( modelName, item, cb ) { if (cb === undefined) cb = ()=>{}; return new Promise( ( resolve ) => { getModel( modelName ) .then( ( model, b ) => { if ( ! item.id && item.id !== 0 ) retu...
Add dummy cb when none given
Add dummy cb when none given
JavaScript
mit
Appliary/Poetry
02fc833bded2184b57625150307bd7740f5b4f61
Lesson9/http/js/app.js
Lesson9/http/js/app.js
angular.module('app', []).controller('AppCtrl', function ($scope, $http) { $scope.results = []; $scope.loadUsers = function() { $http.get('/elements') .success(function(data) { $scope.results = data; }) .error(function(err) { $scope.results = err; }); } $scope.clickElement = function (elemen...
angular.module('app', []).controller('AppCtrl', function ($scope, $http) { $scope.results = []; $scope.loadUsers = function() { $http.get('/elements') .success(function(data) { $scope.results = data; }) .error(function(err) { $scope.results = err; }); } $scope.clickElement = function (elemen...
Refactor put method for elements
Refactor put method for elements
JavaScript
mit
dajvido/NAJ-homework,dajvido/NAJ-homework
37971507cc9a5c9ad7c9bad59ecd7f2e4a7f0db1
test/defineFields.js
test/defineFields.js
var assert = require('assert') var ethUtil = require('../index.js') describe('define', function () { const fields = [{ word: true, default: new Buffer([]) }, { name: 'empty', allowZero: true, length: 20, default: new Buffer([]) }, { name: 'value', default: new Buffer([]) }, { ...
var assert = require('assert') var ethUtil = require('../index.js') describe('define', function () { const fields = [{ word: true, default: new Buffer([]) }, { name: 'empty', allowZero: true, length: 20, default: new Buffer([]) }, { name: 'cannotBeZero', allowZero: false, defa...
Add two more tests for defaultFields
Add two more tests for defaultFields
JavaScript
mpl-2.0
ethereum/ethereumjs-vm,ethereumjs/ethereumjs-util,ethereumjs/ethereumjs-util,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm
3507f961cd6921cbb54fa34589686074334064b1
model/contractor.js
model/contractor.js
module.exports = class Contractor { constructor(firstName, lastName, isResident, privateEmail) { this.firstName = firstName; this.lastName = lastName; this.isResident = isResident; this.privateEmail = privateEmail; } getFullName() { return this.firstName + ' ' + this.lastName; } getEma...
var crypto = require('crypto'); module.exports = class Contractor { constructor(firstName, lastName, isResident, privateEmail) { this.firstName = firstName; this.lastName = lastName; this.isResident = isResident; this.privateEmail = privateEmail; } getFullName() { return this.firstName + '...
Add getPassword to Contractor class for hashing temp password
Add getPassword to Contractor class for hashing temp password
JavaScript
mit
7hci/surfboard,7hci/surfboard,7hci/surfboard
7ca406952744a3e80ee11f200174c477512994d0
addon/utils/serialize-and-push.js
addon/utils/serialize-and-push.js
import { isArray } from '@ember/array'; export default function(options, response) { let modelName = this.constructor.modelName || this.constructor.typeKey; let modelClass = this.store.modelFor(modelName); let serializer = this.store.serializerFor(modelName); let normalized = isArray(response.data) ? serialize...
import { isArray } from '@ember/array'; import { _getModelClass, _getModelName, _getStoreFromRecord } from './build-url'; export default function serializeAndPush(options, response) { const recordClass = _getModelClass(this); const modelName = _getModelName(recordClass); const store = _getStoreFromRecord(this)...
Use buildUrl helpers in serializer-and-push
chore: Use buildUrl helpers in serializer-and-push
JavaScript
mit
truenorth/ember-api-actions,mike-north/ember-api-actions,truenorth/ember-api-actions,mike-north/ember-api-actions,mike-north/ember-api-actions,mike-north/ember-api-actions
3dd65a362a889027c208a43b69d093deeecfc3de
app/client/views/team/teamCtrl.js
app/client/views/team/teamCtrl.js
angular.module('reg') .controller('TeamCtrl', [ '$scope', 'currentUser', 'settings', 'Utils', 'UserService', 'TEAM', function($scope, currentUser, settings, Utils, UserService, TEAM){ // Get the current user's most recent data. var Settings = settings.data; $scope.regIsO...
angular.module('reg') .controller('TeamCtrl', [ '$scope', 'currentUser', 'settings', 'Utils', 'UserService', 'TEAM', function($scope, currentUser, settings, Utils, UserService, TEAM){ // Get the current user's most recent data. var Settings = settings.data; $scope.regIsO...
Update the team view when a team is joined
Update the team view when a team is joined
JavaScript
agpl-3.0
techx/quill,techx/quill
5ef3a7e995eb33eeee53b2fbb05f9e3836c52196
app/components/spendings-meter.js
app/components/spendings-meter.js
import Ember from 'ember'; export default Ember.Component.extend({ userSettings: Ember.inject.service('user-settings'), didReceiveAttrs () { const currency = this.get('userSettings').currency(); this.set('currency', currency); } });
import Ember from 'ember'; import moment from 'npm:moment'; export default Ember.Component.extend({ userSettings: Ember.inject.service('user-settings'), didReceiveAttrs () { const currency = this.get('userSettings').currency(); this.set('currency', currency); this.set('todaysDate', moment().format('DD...
Add today`s date to spendings summary part of the page
feat: Add today`s date to spendings summary part of the page
JavaScript
mit
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
812facbc2e46837896c4e6064f9d57eec358662c
webpack.config.app.js
webpack.config.app.js
/*--------------------------------------------------------------------------------------------- * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; const path = ...
/*--------------------------------------------------------------------------------------------- * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; const path = ...
Exclude docbook converter from webpack
Exclude docbook converter from webpack
JavaScript
mit
joaompinto/asciidoctor-vscode,joaompinto/asciidoctor-vscode,joaompinto/asciidoctor-vscode
dcccf28a67c44c4b864fbda6360b382a190f180f
src/components/Sidebar/index.js
src/components/Sidebar/index.js
import React from 'react'; import LazyLoad from 'react-lazyload'; import './index.scss'; const Sidebar = ({ post = false }) => ( <header className={` intro-header col-lg-2 col-xs-12 order-lg-1 ${post === true ? 'order-md-10 order-10' : 'order-1'} `} > <div className="site-heading text-...
import React from 'react'; import LazyLoad from 'react-lazyload'; import PropTypes from 'prop-types'; import './index.scss'; const Sidebar = ({ post }) => ( <header className={`intro-header col-lg-2 col-xs-12 order-lg-1 ${post === true ? 'order-md-10 order-10' : 'order-1'}`} > <div className="site-heading text...
Fix sidebar classname multi-line problem
Fix sidebar classname multi-line problem
JavaScript
mit
calpa/blog
a28398835f182b28f44e811a15cf25d28c7a316e
app/js/script.js
app/js/script.js
// Vanilla Javascript please document.addEventListener('DOMContentLoaded', function (event) { var canvas = document.querySelector('#canvas') // Canvas size var canvasHeight = 300 canvas.width = window.innerWidth canvas.height = canvasHeight // set context of the canvas 2d or webGL var c = canvas.getCont...
// Vanilla Javascript please document.addEventListener('DOMContentLoaded', function (event) { var canvas = document.querySelector('#canvas') // Canvas size var canvasHeight = 300 canvas.width = window.innerWidth canvas.height = canvasHeight // set context of the canvas 2d or webGL var c = canvas.getCont...
Create as much squares as possible within the canvas width
:skull: Create as much squares as possible within the canvas width
JavaScript
mit
SkullMasher/skullmasher.io-canvas,SkullMasher/skullmasher.io-canvas
b01940ff00cb9eec5e5e7da9caecba8940b851ec
frontend/modules/faq/js/faq.js
frontend/modules/faq/js/faq.js
/** * Interaction for the faq module * * @author Annelies Van Extergem <annelies@netlash.com> * @author Jelmer Snoeck <jelmer.snoeck@netlash.com> * @author Thomas Deceuninck <thomas@fronto.be> */ jsFrontend.faq = { // init, something like a constructor init: function() { if($('#faqFeedbackForm').length > 0) ...
/** * Interaction for the faq module * * @author Annelies Van Extergem <annelies@netlash.com> * @author Jelmer Snoeck <jelmer.snoeck@netlash.com> * @author Thomas Deceuninck <thomas@fronto.be> */ jsFrontend.faq = { // init, something like a constructor init: function() { if($('#faqFeedbackForm').length > 0) ...
Add the required-attribute when no is selected.
FAQ: Add the required-attribute when no is selected.
JavaScript
mit
bartdc/forkcms,jacob-v-dam/forkcms,matthiasmullie/forkcms,sumocoders/forkcms,vytenizs/forkcms,jessedobbelaere/forkcms,ocpyosep78/forkcms,jonasdekeukelaere/forkcms,jeroendesloovere/forkcms,sumocoders/forkcms,Thijzer/forkcms,vytsci/forkcms,ikoene/forkcms,Katrienvh/forkcms,WouterSioen/forkcms,jonasgoderis/jonaz,jeroendesl...
12eca6c52d32c42276be8b7ee6d4240e44d1a35c
lib/tests/dashboards/content.js
lib/tests/dashboards/content.js
var Mocha = require('mocha'), _ = require('underscore'); module.exports = function (browser, dashboard, suite /*, config*/) { var tests = { 'has a breadcrumb': function () { return browser .$('#global-breadcrumb ol').isDisplayed() .should.eventually.be.ok .$('#global-breadcrumb...
var Mocha = require('mocha'), _ = require('underscore'); module.exports = function (browser, dashboard, suite /*, config*/) { var tests = { 'has a breadcrumb': function () { return browser .$('#global-breadcrumb ol').isDisplayed() .should.eventually.be.ok .$('#global-breadcrumb...
Fix substringing of long breadcrumb items
Fix substringing of long breadcrumb items
JavaScript
mit
alphagov/cheapseats
c394eb191cd889cf96a0367cecfe02c7a2db2146
listProcessing/listProcessor.js
listProcessing/listProcessor.js
function listProcessor(input) { let string = input.shift(); console.log(string); for (let command of input) { let tokens = command.split(/\s+/g); let commandProperties = tokens.slice(1); processCommand(tokens[0], commandProperties); } function processCommand(command, token...
function listProcessor(input) { let list = input.shift().split(" "); console.log(list.join(" ")); for (let command of input) { let tokens = command.split(/\s+/g); processCommand(tokens[0], tokens); } function processCommand(command, tokens) { let index; switch (com...
Add insert, delete and roll left functions.
Add insert, delete and roll left functions.
JavaScript
mit
TeamWorkProject-ManagementBoards/List-Processing
def2531e1413f9efbd482e67df024abcae0848db
app.js
app.js
const express = require('express'), app = express(), bodyParser = require('body-parser'), methodOverride = require('method-override'), mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/mojibox'); app.set('view engine', 'pug'); app.use(express.static(__dirname + '/public')); ...
const express = require('express'), app = express(), bodyParser = require('body-parser'), methodOverride = require('method-override'), mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/mojibox'); app.set('view engine', 'pug'); app.use(express.static(__dirname + '/public')); ...
Modify schema to include a category for each emoticon
Modify schema to include a category for each emoticon
JavaScript
mit
tymeart/mojibox,tymeart/mojibox
6a46bdc932c69f90f5f2580d5ddda224d62a0bfa
app.js
app.js
const express = require('express'); const app = express(); const path = require('path'); const routes = require('./myRoutes.js'); app.get('/', function(req, res) { res.send('something'); }); app.get(routes.login, function(req, res) { res.send('Login page'); }); app.get(routes.register, function(req, res) { re...
const express = require('express'); const app = express(); const path = require('path'); const routes = require('./myRoutes.js'); app.get('/', function(req, res) { res.send('something'); }); app.get(routes.login, function(req, res) { res.send('Login page'); }); app.get(routes.register, function(req, res) { re...
Add feature to send task.html on get to \task\
Add feature to send task.html on get to \task\
JavaScript
mit
geekskool/taskMaster,geekskool/taskMaster
c3a3930a8a5efb073521063209ba8b5d9e6fb415
app/Config/routes.js
app/Config/routes.js
module.exports = function(Config, XIBLE, EXPRESS_APP) { EXPRESS_APP.get('/api/config', (req, res) => { res.json(Config.getAll()); }); EXPRESS_APP.put('/api/config/value', (req, res) => { let path = req.body.path; let value = req.body.value; if (typeof path !== 'string' || typeof value === 'undefined') { ...
module.exports = function(Config, XIBLE, EXPRESS_APP) { EXPRESS_APP.get('/api/config', (req, res) => { res.json(Config.getAll()); }); EXPRESS_APP.put('/api/config/value', (req, res) => { let path = req.body.path; let value = req.body.value; if (typeof path !== 'string' || typeof value === 'undefined') { ...
PUT and DELETE return altered config
PUT and DELETE return altered config
JavaScript
mit
SpectrumBroad/xible,SpectrumBroad/xible
2a351a8ea174e50448c6ea39cb1674a33710b08e
app/js/app/services.js
app/js/app/services.js
'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { owner: "ucam-cl-dtg", ...
'use strict'; define(["angular", "app/services/LoginChecker", "app/services/FileLoader", "app/services/FigureUploader", "app/services/SnippetLoader", "app/services/TagLoader", "app/services/IdLoader"], function() { /* Services */ angular.module('scooter.services', []) .constant('Repo', { owner: "isaacphysics",...
Migrate content repo to @isaacphysics
Migrate content repo to @isaacphysics
JavaScript
mit
ucam-cl-dtg/scooter,ucam-cl-dtg/scooter
1e69df3472ec6536599f0ee00b2cc3d2a0853efc
HelloCoreClrApp.Ui/karma.conf.js
HelloCoreClrApp.Ui/karma.conf.js
module.exports = function (config) { 'use strict' config.set({ frameworks: ['mocha', 'chai', 'sinon'], files: [ {pattern: 'bower_components/jquery/dist/jquery.js', instrument: false}, {pattern: 'bower_components/toastr/toastr.js', instrument: false}, {pattern: 'bower_components/angular/an...
module.exports = function (config) { 'use strict' config.set({ frameworks: ['mocha', 'chai', 'sinon'], files: [ {pattern: 'bower_components/jquery/dist/jquery.js', instrument: false}, {pattern: 'bower_components/toastr/toastr.js', instrument: false}, {pattern: 'bower_components/angular/an...
Increase the delay time to avoid failing tests due to removed javascript files when starting the build process.
Increase the delay time to avoid failing tests due to removed javascript files when starting the build process.
JavaScript
mit
jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr
fd9b688d1e416b53fb0a20b322d485f39c744d86
Resources/helpers/LoginHelper.js
Resources/helpers/LoginHelper.js
var LoginHelper = { loggedIn : function() { var cookie = Ti.App.Properties.getString('auth_cookie'); if (!cookie) return false; return true; }, logout : function() { var createConfirmDialog = function() { var confirmDialog = Ti.UI.createAlertDialog({ title : "Logout", ...
var LoginHelper = { loggedIn : function() { var cookie = Ti.App.Properties.getString('auth_cookie'); var cookieCreatedAt = Ti.App.Properties.getString('auth_cookie_created_at'); if (!cookie) return false; if(new Date() - new Date(cookieCreatedAt) > 3600000) { //Expire the cookie aft...
Expire the session (cookie) in one hour after login.
Expire the session (cookie) in one hour after login.
JavaScript
mit
nilenso/ashoka-survey-mobile,nilenso/ashoka-survey-mobile
68a8ab008a00a3dd062ae89d1b9aeef699686608
sb/partition_nisheviz.js
sb/partition_nisheviz.js
require.config({ paths: { 'd3': '../node_modules/d3/d3', 'nishe': '../node_modules/nishe/nishe', 'nisheviz': '../nisheviz' } }); require(['d3', 'nishe', 'nisheviz'], function(d3, nishe, nisheviz) { 'use strict'; var svg = d3.select('svg'); var group = svg.append('g'); var p = new nishe.Partition...
require.config({ paths: { 'd3': '../node_modules/d3/d3', 'nishe': '../node_modules/nishe/nishe', 'nisheviz': '../nisheviz' } }); require(['d3', 'nishe', 'nisheviz'], function(d3, nishe, nisheviz) { 'use strict'; var svg = d3.select('svg'); var group = svg.append('g'); var p = new nishe.Partition...
Add an example of how to change the partition on keydown
Add an example of how to change the partition on keydown
JavaScript
mit
b0ri5/nisheviz,b0ri5/nisheviz,b0ri5/nisheviz
e8081ee5d7ecafeb9ca34560fc0129bbf55efa6a
app/src/index.js
app/src/index.js
require('babelify/polyfill'); const config = require('./config'); const SculptureApp = require('./app'); const DEFAULT_CLIENT_CONNECTION_OPTIONS = { protocol: "ws", username: "anyware", password: "anyware", host: "broker.shiftr.io" }; const app = new SculptureApp(config); const connectionOptions = Object.a...
require('babelify/polyfill'); const config = require('./config'); const SculptureApp = require('./app'); const DEFAULT_CLIENT_CONNECTION_OPTIONS = { protocol: "ws", username: "sculpture0", password: "7f24a3e73b91dc9f51f15861d75c888b", host: "broker.shiftr.io" }; const app = new SculptureApp(config); const ...
Connect as sculpture0 for now, until we have config in local storage
Connect as sculpture0 for now, until we have config in local storage
JavaScript
mit
anyWareSculpture/sculpture-client,anyWareSculpture/sculpture-client,anyWareSculpture/sculpture-client
f37d79f6a9a90901a8cdfc11e5044750c3e0565d
SegmentedControl.ios.js
SegmentedControl.ios.js
'use strict'; var React = require('react-native'); var { Component, SegmentedControlIOS } = React; class SegmentedControl extends Component { render() { return ( <SegmentedControlIOS values={this.props.values} selectedIndex={this.props.selectedIndex} onChange={this.props.onChan...
'use strict'; var React = require('react-native'); var { Component, SegmentedControlIOS } = React; class SegmentedControl extends Component { render() { return ( <SegmentedControlIOS values={this.props.values} selectedIndex={this.props.selectedIndex} onChange={event => { ...
Fix iOS crash when switching performance filter selection by extracting index correctly
Fix iOS crash when switching performance filter selection by extracting index correctly
JavaScript
mit
richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native
d37dda981abad79d255c7d0584a1dd0cbbc374e9
database/queries.js
database/queries.js
'use strict'; const fs = require('fs'); const escape = require('pg-escape'); const hasDBAvailable = Boolean(process.env.DB); if (!hasDBAvailable) { module.exports = {}; return; } const pgConfig = { host: 'localhost', user: process.env.PGUSER || 'hmbserver', password: process.env.PGPASSWORD || fs.readFileS...
'use strict'; const fs = require('fs'); const path = require('path'); const escape = require('pg-escape'); const hasDBAvailable = Boolean(process.env.DB); if (!hasDBAvailable) { module.exports = {}; return; } const pgPass = fs.readFileSync(path.join(__dirname, 'db-password'), {encoding: 'utf8'}); const pgConfig...
Fix path handling for db-password
Fix path handling for db-password
JavaScript
mit
vampiman/Hold-My-Beer,vampiman/Hold-My-Beer
d79d2a1e458ea7b878085b053b9d06b1beb948bb
views/apps/index.js
views/apps/index.js
var xhr = require('xhr'); var storage = require('localforage'); module.exports = { id: 'apps', components: { tabBar: require('../../components/tabBar'), navigationBar: require('../../components/navigationBar'), appCell: require('../../components/appCell') }, template: require('....
var storage = require('localforage'); module.exports = { id: 'apps', components: { tabBar: require('../../components/tabBar'), navigationBar: require('../../components/navigationBar'), appCell: require('../../components/appCell') }, template: require('./index.html'), data: r...
Remove XHR require from views
Remove XHR require from views
JavaScript
mpl-2.0
j796160836/webmaker-android,mozilla/webmaker-android,alanmoo/webmaker-android,rodmoreno/webmaker-android,vazquez/webmaker-android,cadecairos/webmaker-android,rodmoreno/webmaker-android,k88hudson/webmaker-android,thejdeep/webmaker-app,gvn/webmaker-android,codex8/webmaker-app,alicoding/webmaker-android,vazquez/webmaker-a...
d202393c105989d1d6cab52c572ebd51479572d6
js/tests/Views_Attachments_Spec.js
js/tests/Views_Attachments_Spec.js
/** * Mail * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @copyright Christoph Wurst 2015 */ define(['views/attachments', 'handlebars'], function(AttachmentView, Handlebars) { describe(...
/** * Mail * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @copyright Christoph Wurst 2015 */ define(['views/attachments', 'views/helper'], function(AttachmentView) { describe('Attachmen...
Remove the Handlebars Helper for translaton and use the helper view
Remove the Handlebars Helper for translaton and use the helper view
JavaScript
agpl-3.0
ChristophWurst/mail,ChristophWurst/mail,kingjan1999/mail,kingjan1999/mail,kingjan1999/mail,ChristophWurst/mail
49f4aa9e57144c70f64184656fa8abb69ccf22bc
js/require_config.js
js/require_config.js
/* global requirejs */ /** * Mail * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @copyright Christoph Wurst 2015, 2016 */ (function() { 'use strict'; requirejs.config({ baseUrl: './...
/* global requirejs */ /** * Mail * * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * * @author Christoph Wurst <christoph@winzerhof-wurst.at> * @copyright Christoph Wurst 2015, 2016 */ (function() { 'use strict'; requirejs.config({ baseUrl: './...
Fix requirejs for other locations than apps/
Fix requirejs for other locations than apps/
JavaScript
agpl-3.0
ChristophWurst/mail,ChristophWurst/mail,kingjan1999/mail,ChristophWurst/mail,kingjan1999/mail,kingjan1999/mail
0e04a1cf050e6f34d5f19f489c7d0695b66d614c
add_aws_region_to_title.user.js
add_aws_region_to_title.user.js
// ==UserScript== // @name Add AWS region to title // @namespace curipha // @description Help to know where I am now // @include https://console.aws.amazon.com/* // @include https://*.console.aws.amazon.com/* // @version 0.0.2 // @grant none // @noframes // ==/UserScript== (function() { 'u...
// ==UserScript== // @name Add AWS region to title // @namespace curipha // @description Help to know where I am now // @match https://console.aws.amazon.com/* // @match https://*.console.aws.amazon.com/* // @version 0.0.2 // @grant none // @noframes // ==/UserScript== (function() { 'u...
Use @match directive for safely host pattern matching
Use @match directive for safely host pattern matching
JavaScript
unlicense
curipha/userscripts,curipha/userscripts
4fc5d2be8b17245533a250e370300174ba9f11f9
app/scripts/directives/block.js
app/scripts/directives/block.js
'use strict'; angular.module('confRegistrationWebApp') .directive('block', function () { return { templateUrl: 'views/blockDirective.html', restrict: 'E', scope: { 'block': '=', 'prefillAnswer': '=answer' }, controller: function ($scope) { $scope.answer = {};...
'use strict'; angular.module('confRegistrationWebApp') .directive('block', function () { return { templateUrl: 'views/blockDirective.html', restrict: 'E', scope: { 'block': '=', 'prefillAnswer': '=answer' }, controller: function ($scope) { $scope.answer = ang...
Load answers from directive parameters
Load answers from directive parameters
JavaScript
mit
CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web
dca82948f4cea4dc38d0f5da8ba75f062800ab4f
app/models/prescription.server.model.js
app/models/prescription.server.model.js
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Eye Schema */ var EyeSchema = new Schema({ cylinder: { type: Number }, sphere: { type: Number }, axis: { type: Number }, position: { type: St...
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Eye Schema */ var EyeSchema = new Schema({ cylinder: { type: Number }, sphere: { type: Number }, axis: { type: Number }, position: { type: St...
Add frame and lens fields
Add frame and lens fields
JavaScript
mit
CodeHubGit/HopeSearch,CodeHubGit/HopeSearch
10b0407de96ef5d40e97ec2db1a0a4ae6a9b72ba
src/app/reducers/main.js
src/app/reducers/main.js
'use strict'; import * as types from '../actions/actionTypes'; import config from '../config'; window.navigator.userAgent = "react-native"; const initialState = { isFetching: true, question: '', latest: '' }; export default function main(state = initialState, action = {}) { switch (action.type) { ...
'use strict'; import * as types from '../actions/actionTypes'; import config from '../config'; const initialState = { isFetching: true, question: '', latest: '' }; export default function main(state = initialState, action = {}) { switch (action.type) { case types.GET_LATEST: r...
Remove navigator user agent as it causes the app to break
Remove navigator user agent as it causes the app to break
JavaScript
mit
benox3/react-native-socket,benox3/react-native-socket
d59317c34ac8bb10c8d8d760089d68c01ebdeca4
src/analyse-file.js
src/analyse-file.js
"use strict"; const vscode = require("vscode"); const analyser = require("./complexity-analyzer"); const reporter = require("./report-builder.js"); const config = require("./config"); const Output = require("./output-channel"); function getFileRelativePath(document) { const fileUri = document.fileName; ...
"use strict"; const vscode = require("vscode"); const analyser = require("./complexity-analyzer"); const reporter = require("./report-builder.js"); const config = require("./config"); const Output = require("./output-channel"); function buildReport(document) { const channel = new Output(); const filePa...
Use build in relative path method
Use build in relative path method
JavaScript
mit
tomi/vscode-js-complexity-analysis
e97435408a8fa349ec68e82c1b1e53d1299e47f2
hw5/src/reducers.js
hw5/src/reducers.js
const Reducer = (state = { }, action) => { switch(action.type) { // case 'ADD_TODO': // return { ...state, nextId: state.nextId + 1, // todoItems: [ ...state.todoItems, // {id:state.nextId, text: action.text, done: false}] // } default: ...
const Reducer = (state = { nextPage: 'LandingPage' }, action) => { switch(action.type) { case 'navigate': return Object.assign({}, state, { nextPage: action.text }) default: return state } } export default Reducer
Add a reducer for navigation.
Add a reducer for navigation.
JavaScript
mit
yusong-shen/comp531-web-development,yusong-shen/comp531-web-development,yusong-shen/comp531-web-development,yusong-shen/comp531-web-development
c526ecb88ff5b0f545b13f4baa4d67a1b6eb580f
test/www/jxcore/UnitTest_app.js
test/www/jxcore/UnitTest_app.js
/* * This file needs to be renamed as app.js when we want to run unit tests * in order this to get loaded by the jxcore ready event. * This effectively acts as main entry point to the unit test app */ "use strict"; var test = require('tape'); //var express = require('express'); var net = require('net'); var testU...
/* * This file needs to be renamed as app.js when we want to run unit tests * in order this to get loaded by the jxcore ready event. * This effectively acts as main entry point to the unit test app */ "use strict"; var net = require('net'); var test = require('tape'); var testUtils = require("./lib/testUtils"); ...
Remove cruft from unit test app
Remove cruft from unit test app
JavaScript
mit
thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin
9bc79f3e6d50cf80b683864d3b86f812fda4904a
demo/js/demo.js
demo/js/demo.js
window.onload = function () { "use strict"; var undoManager, circleDrawer, btnUndo, btnRedo, btnClear; undoManager = new UndoManager(); circleDrawer = new CircleDrawer("view", undoManager); ctrlLimit = document.getElementById("ctrlLimit"); btnUndo = documen...
window.onload = function () { "use strict"; var undoManager, ctrlLimit, circleDrawer, btnUndo, btnRedo, btnClear; undoManager = new UndoManager(); circleDrawer = new CircleDrawer("view", undoManager); ctrlLimit = document.getElementById("ctrlLimit"); ...
Fix ctrlLimit undefined in Demo
Fix ctrlLimit undefined in Demo Probably been broken for months...
JavaScript
mit
squallyan/Javascript-Undo-Manager,ArthurClemens/Javascript-Undo-Manager,ArthurClemens/Javascript-Undo-Manager,squallyan/Javascript-Undo-Manager
556f8e7b7a81d25a5787ddc5d0e766876162e5da
workflows/createDeployment.js
workflows/createDeployment.js
'use strict'; // workflows/createDeployment var Joi = require('joi'); module.exports = { schema: Joi.object({ deployerId: Joi.string().required(), name: Joi.string().min(1).required(), }).required().unknown(true), version: '1.0', decider: function(args) { return { createDeploymentDo...
'use strict'; // workflows/createDeployment var Joi = require('joi'); module.exports = { schema: Joi.object({ deployerId: Joi.string().required(), name: Joi.string().min(1).required(), }).required().unknown(true), version: '1.0', decider: function(args) { return { createDeploymentDo...
Fix example test env reference
Fix example test env reference
JavaScript
mit
f5itc/swf-graph,f5itc/swf-graph,f5itc/swf-graph
6817d548fcc4c24196560fc478860d0383156908
scripts/generate.js
scripts/generate.js
/* * broccoli-replace * http://gruntjs.com/ * * Copyright (c) 2014 outaTiME * Licensed under the MIT license. * https://github.com/outaTiME/broccoli-replace/blob/master/LICENSE-MIT */ var fs = require('fs'); var filename = 'node_modules/pattern-replace/README.md'; var readme = fs.readFileSync(filename, 'utf8')...
/* * broccoli-replace * * Copyright (c) 2014 outaTiME * Licensed under the MIT license. * https://github.com/outaTiME/broccoli-replace/blob/master/LICENSE-MIT */ var fs = require('fs'); var filename = 'node_modules/pattern-replace/README.md'; var readme = fs.readFileSync(filename, 'utf8'); // initialize section...
Remove unused code from readme generator.
Remove unused code from readme generator.
JavaScript
mit
outaTiME/broccoli-replace,outaTiME/broccoli-replace,alexeagle/broccoli-replace,alexeagle/broccoli-replace
c9ef14a1d3346ac6d4db00cbab09df0d6a5a97c4
tests/setup/globals.js
tests/setup/globals.js
var chai = require('chai'), sinon = require('sinon'), sinonChai = require('sinon-chai'), path = require('path'), React = require('react'); global.expect = chai.expect; chai.use(sinonChai); beforeEach(function() { /** * Prepare a container to mount the component before each test. */ this...
var chai = require('chai'), sinon = require('sinon'), sinonChai = require('sinon-chai'), path = require('path'), React = require('react'); global.expect = chai.expect; chai.use(sinonChai); beforeEach(function() { /** * Prepare stuff that you might need in tests. * * Create a simple div ...
Create a sandbox before each test and clean it up afterwards
Create a sandbox before each test and clean it up afterwards
JavaScript
mit
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
e475c04eaa956c3a5910de4a332c113135c8b8c1
spec/suites/map/MapSpec.js
spec/suites/map/MapSpec.js
describe("Map", function () { describe("#whenReady", function () { describe("when the map has not yet been loaded", function () { it("calls the callback when the map is loaded", function () { var map = L.map(document.createElement('div')), spy = jasmine.createSpy(); map.whenReady(spy); expect(sp...
describe("Map", function () { describe("#whenReady", function () { describe("when the map has not yet been loaded", function () { it("calls the callback when the map is loaded", function () { var map = L.map(document.createElement('div')), spy = jasmine.createSpy(); map.whenReady(spy); expect(sp...
Add a missing semi colon and make one line < 80 chars
Add a missing semi colon and make one line < 80 chars
JavaScript
bsd-2-clause
Neorth/Leaflet,iOffice/Leaflet,Neorth/Leaflet,Fil/Leaflet,scaddenp/Leaflet,AP-whitehat/Leaflet,hyperknot/Leaflet,prashen/Leaflet,jasonoverland/Leaflet,Jakobud/Leaflet,twoubt/Leaflet,Andrey-Pavlov/Leaflet,hyperknot/Leaflet,gabrielpconceicao/frontend-asset-leaflet,srdavis/leaflet-template,pzdz/Leaflet,sisou/Leaflet,twoub...
579bf2cb2d6f894fed689b6ac87b7d8a9b00b162
src/sagasBuilder.js
src/sagasBuilder.js
import { takeEvery } from 'redux-saga'; import { call, put } from 'redux-saga/effects'; export default function sagasBuilder(request, REQUEST, actions) { function* makeRequest({ payload, meta }) { let data; let error; try { yield put(actions.pending()); data = yield call(request, payload, m...
import { takeEvery } from 'redux-saga'; import { call, put } from 'redux-saga/effects'; export default function sagasBuilder(request, REQUEST, actions, { throwErrors }) { function* makeRequest({ payload, meta }) { let data; let error; try { yield put(actions.pending()); data = yield call(re...
Add option to throw errors
sagaBuilder: Add option to throw errors
JavaScript
mit
rockingskier/redux-request-utils
a2ccd51b855487c5ea8bbee8a99e15668a715926
lib/create-store.js
lib/create-store.js
'use strict' var assign = require('object-assign') var EventEmitter = require('eventemitter3') var objEql = require('obj-eql') function createStore(obj) { var store = assign(Object.create(EventEmitter.prototype), { state: {}, setState: function(change) { var newState = Object.freeze(assign({}, this.st...
'use strict' var assign = require('object-assign') var EventEmitter = require('eventemitter3') var objEql = require('obj-eql') function createStore(obj) { var store = assign(Object.create(EventEmitter.prototype), { state: {}, setState: function(change) { this.replaceState(assign({}, this.state, change...
Refactor replaceState to handle all state updates
Refactor replaceState to handle all state updates
JavaScript
mit
uniflow/uniflow
ada17c157da83ec6d34552a47d7e4767289fd376
fixParagraphStructure.js
fixParagraphStructure.js
const fs = require('fs'); const flat = require('flat'); function fixParagraphStructure(originalJSONPath, translatedJSONPath) { const originalJSONFile = fs.readFileSync(originalJSONPath); const originalJSON = flat.flatten(JSON.parse(originalJSONFile)); const translJSONFile = fs.readFileSync(translatedJSONPath); ...
const fs = require('fs'); const flat = require('flat'); function fixParagraphStructure(originalJSONPath, translatedJSONPath) { const originalJSONFile = fs.readFileSync(originalJSONPath); const originalJSON = flat.flatten(JSON.parse(originalJSONFile), { delimiter: '/' }); const translJSONFile = fs.readFileS...
Change delimiter in flatten function
Change delimiter in flatten function
JavaScript
mit
processing/p5.js-website,processing/p5.js-website
567e1420eca9d0d64b9309ed9482c0842c8c7d2b
src/shared/prop-types.js
src/shared/prop-types.js
import { PropTypes } from 'react'; const CardPropTypes = { id: PropTypes.number, name: PropTypes.string, type: PropTypes.string, colour: PropTypes.string, manaCost: PropTypes.string, numberCopies: PropTypes.number, rarity: PropTypes.string, }; export { CardPropTypes, };
import { PropTypes } from 'react'; const CardPropTypes = { id: PropTypes.number, name: PropTypes.string, types: PropTypes.arrayOf(PropTypes.string), colour: PropTypes.string, manaCost: PropTypes.string, numberCopies: PropTypes.number, rarity: PropTypes.string, }; export { CardPropTypes, };
Change Card proptypes accordingly to backend data
Change Card proptypes accordingly to backend data
JavaScript
agpl-3.0
Narxem/crispy-magic-front,Narxem/crispy-magic-front
86fc28a1acd2bea5d731ac76311960422092749a
src/angular-knob.js
src/angular-knob.js
angular.module('ui.knob', []) .directive('knob', function () { return { restrict: 'EACM', template: function(elem, attrs){ return '<input value="{{ knob }}">'; }, replace: true, scope: true, link: function (scope, elem, attrs) { scope.knob = scope.$eval(attrs...
angular.module('ui.knob', []) .directive('knob', function () { return { restrict: 'EACM', template: function(elem, attrs){ return '<input value="{{ knob }}">'; }, replace: true, scope: true, link: function (scope, elem, attrs) { scope.knob = scope.$eval(attrs...
Fix for refreshing the max amount of the knob when the max value its bound to is changed
Fix for refreshing the max amount of the knob when the max value its bound to is changed
JavaScript
mit
Bunni/angular-knob,Bunni/angular-knob
d02264b0f96c31288ca3d2c1884f833986cee298
src/util/expand-group.js
src/util/expand-group.js
// Returns array with group states export default function expandGroup(groupState, entityMap) { return groupState.attributes.entity_id.map( entityId => entityMap.get(entityId)); }
// Returns Immutable list with group states. // Entities that can't be found will be skipped. import { toImmutable } from 'nuclear-js'; export default function expandGroup(groupState, entityMap) { return toImmutable(groupState.attributes.entity_id.map( entityId => entityMap.get(entityId)).filter(ent => !!ent)); ...
Expand group filters out not found states
Expand group filters out not found states
JavaScript
mit
balloob/home-assistant-js
c00c0347e6e795ecddc439eee4b3f20b8508d18b
client/app/components/App.js
client/app/components/App.js
import React from 'react'; import { Link } from 'react-router'; class App extends React.Component { render() { return ( <div className="app"> <h1>Welcome to KIM!</h1> <ul className="navbar"> <li><Link to={'/jewelry'}>Jewelry Products</Link></li> <li><Link to={'/materials...
import React from 'react'; import { Link, IndexLink } from 'react-router'; class App extends React.Component { render() { return ( <div className="app"> <div className="logo-wrapper"> <img className="logo" src="../../assets/WebsiteHeader.png" alt="Kristin Miller Jewelry"/> </div> ...
Add header logo, index route, and navbar classes
Add header logo, index route, and navbar classes
JavaScript
mit
jfanderson/KIM,jfanderson/KIM
3fd62d301884be561d47019ca8841af86093aedc
background.js
background.js
// Copyright (c) 2015 Narwhal Software s.r.l. // Use of this source code is governed by a MIT-style license that can be // found in the LICENSE file. // Global accessor that the popup uses. var pattern = /^(https?:\/\/)((doc-snapshots.qt.io)|(doc.qt.io))\/([^\/]+)\/(.*)/ chrome.runtime.onInstalled.addListener(functi...
// Copyright (c) 2015 Narwhal Software s.r.l. // Use of this source code is governed by a MIT-style license that can be // found in the LICENSE file. // Global accessor that the popup uses. var pattern = /^(https?:\/\/)((doc-snapshots.qt.io)|(doc.qt.io))\/([^\/]+)\/(.*)/ chrome.runtime.onInstalled.addListener(functi...
Make sure the new url filename is lower case
Make sure the new url filename is lower case Apparently doc.qt.io does case insensitive file matching, doc-snapshot.qt.io doesn't.
JavaScript
mit
narwhal/QtLatestDocs-chrome
766034fec7d671d4901b1258269e97ae3358d265
test/lib/prepare-spec.js
test/lib/prepare-spec.js
var expect = require('chai').expect; var sinon = require('sinon'); var prepare = require('../../lib/prepare'); var fs = require('fs'); describe('lib/prepare', function () { it('removes data.textPath and place the content of its file to data.text', function () { sinon.stub(fs, 'readFileSync'); prepare({textP...
var expect = require('chai').expect; var sinon = require('sinon'); var prepare = require('../../lib/prepare'); var fs = require('fs'); describe('lib/prepare', function () { it('removes data.textPath and place the content of its file to data.text', function () { var data = { textPath: 'textPath' }; ...
Update test: check lib/prepare's file reading
Update test: check lib/prepare's file reading
JavaScript
mit
arrowrowe/mailgun-util