commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
e47584cb25cf75311e368a4ad87ba61b68d906ae
src/selection/join.js
src/selection/join.js
function(onenter, onupdate, onexit) { var enter = this.enter(), update = this, exit = this.exit(); if (typeof onenter === "function") { enter = onenter(enter); if (enter) enter = enter.selection(); } else { enter = enter.append(onenter + ""); } if (onupdate != null) { update = onupdate(update)...
function(onenter, onupdate, onexit) { var enter = this.enter(), update = this, exit = this.exit(); if (typeof onenter === "function") { enter = onenter(enter); if (enter) enter = enter.selection(); } else { enter = enter.append(onenter + ""); } if (onupdate != null) update = onupdate(update); if...
Revert update logic as it is handled by .merge.
Revert update logic as it is handled by .merge.
JavaScript
isc
d3/d3-selection
62756a7e5ed5297cc2084644ac82d678179a3362
src/components/page.js
src/components/page.js
import React from 'react' import GoogleAnalyticsScript from './scripts/google-analytics' export default Page function Page({ children, title = 'JavaScript Air', description = 'The live JavaScript podcast all about JavaScript and the web platform. Available on YouTube, iTunes, and an RSS audio feed', } = {}) { ...
import React from 'react' import GoogleAnalyticsScript from './scripts/google-analytics' export default Page function Page({ children, title = 'JavaScript Air', description = 'The live JavaScript podcast all about JavaScript and the web platform. Available on YouTube, iTunes, and an RSS audio feed', } = {}) { ...
Remove now-deleted font reference from Page component
Remove now-deleted font reference from Page component
JavaScript
mit
javascriptair/site,javascriptair/site,javascriptair/site
5337b3add954120583cbee1610ca2d8f188d9322
src/js/home-page.js
src/js/home-page.js
import React from 'react'; import { Link } from 'react-router'; import HomepageTile from './homepage-tile.js'; import chaptersData from './chapter-data.js'; // Clone the chapters since sort mutates the array const chapters = [...chaptersData] .filter(chapter => !chapter.hidden) .sort((chapterA, chapterB) => chapte...
import React from 'react'; import { Link } from 'react-router'; import HomepageTile from './homepage-tile.js'; import chaptersData from './chapter-data.js'; // Clone the chapters since sort mutates the array const chapters = [...chaptersData] .filter(chapter => !chapter.hidden) .sort((chapterA, chapterB) => chapte...
Add key to homepage tile items to satisfy react
Add key to homepage tile items to satisfy react
JavaScript
mit
nicolasartman/learning-prototype,nicolasartman/learning-prototype,nicolasartman/chalees-min,nicolasartman/chalees-min
d92c8ce875ce3da991ebce9222c200489da0b18f
test/index.js
test/index.js
var Couleurs = require ("../index"); console.log("Red".rgb([255, 0, 0])); console.log("Yellow".rgb(255, 255, 0)); console.log("Blue".rgb("#2980b9")); console.log("Bold".bold()) console.log("Italic".italic()) console.log("Underline".underline()) console.log("Inverse".inverse()) console.log("Strikethrough".strikethroug...
// Dependency var Couleurs = require("../index")(); // No prototype modify console.log(Couleurs.rgb("Red", [255, 0, 0])); console.log(Couleurs.rgb("Yellow", 255, 255, 0)); console.log(Couleurs.rgb("Blue", "#2980b9")); console.log(Couleurs.bold("Bold")); console.log(Couleurs.italic("Italic")); // Modify prototype req...
Call couleurs in different ways.
Call couleurs in different ways.
JavaScript
mit
IonicaBizau/node-couleurs
d43f60a6bbc181c0f08fa5dcfdbd1ab19709afef
lib/modules/fields/class_static_methods/get_list_fields.js
lib/modules/fields/class_static_methods/get_list_fields.js
import _ from 'lodash'; import ListField from '../list_field.js'; function getListFields() { return _.filter(this.getFields(), function(field) { return field instanceof ListField; }); }; export default getListFields;
import _ from 'lodash'; import ListField from '../list_field.js'; function getListFields(classOnly = false) { return _.filter(this.getFields(), function(field) { if (classOnly) { return field instanceof ListField && field.isClass; } return field instanceof ListField; }); }; export default getListFie...
Allow getting only class fields in the getListFields method
Allow getting only class fields in the getListFields method
JavaScript
mit
jagi/meteor-astronomy
f824ff500dd30c7375a1b30981aa3b3ce223a28a
core/js/integritycheck-failed-notification.js
core/js/integritycheck-failed-notification.js
/** * @author Lukas Reschke * * @copyright Copyright (c) 2015, ownCloud, Inc. * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the ho...
/** * @author Lukas Reschke * * @copyright Copyright (c) 2015, ownCloud, Inc. * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the ho...
Fix code integrity check-warning link
Fix code integrity check-warning link Signed-off-by: Marius Blüm <38edb439dbcce85f0f597d90d338db16e5438073@lineone.io>
JavaScript
agpl-3.0
nextcloud/server,nextcloud/server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,nextcloud/server,nextcloud/server
c042b19ee5414afe1ab206ebebace8675d55c096
test/sites.js
test/sites.js
var inspector = require('..'); var expect = require('expect.js'); describe("url-inspector", function sites() { it("should get title from http://www.lavieenbois.com/", function(done) { this.timeout(5000); inspector('http://www.lavieenbois.com/', function(err, meta) { expect(err).to.not.be.ok(); expect(meta.t...
var inspector = require('..'); var expect = require('expect.js'); describe("url-inspector", function sites() { it("should get title from http://www.lavieenbois.com/", function(done) { this.timeout(5000); inspector('http://www.lavieenbois.com/', function(err, meta) { expect(err).to.not.be.ok(); expect(meta.t...
Add a test to ensure html objects are embeds
Add a test to ensure html objects are embeds
JavaScript
mit
kapouer/url-inspector
9ccba19417e58ecd619ceb036ea2f3cc48eb64c4
addon/components/banner-with-close-button.js
addon/components/banner-with-close-button.js
import Component from '@ember/component'; import layout from '../templates/components/banner-with-close-button'; import {inject as service} from '@ember/service'; import {computed} from '@ember/object'; export default Component.extend({ layout, cookies: service(), classNames: ['banner-with-close-button'], isB...
import Component from '@ember/component'; import layout from '../templates/components/banner-with-close-button'; import {inject as service} from '@ember/service'; import {computed} from '@ember/object'; export default Component.extend({ layout, cookies: service(), classNames: ['banner-with-close-button'], isB...
Add 30 day expiration to cookie on gdpr banner
Add 30 day expiration to cookie on gdpr banner
JavaScript
mit
nypublicradio/nypr-ui,nypublicradio/nypr-ui
deb70b4a47e2a8aa800c80fb79da50f841d85adf
packages/@sanity/desk-tool/src/components/DraftStatus.js
packages/@sanity/desk-tool/src/components/DraftStatus.js
import EditIcon from 'part:@sanity/base/edit-icon' import React from 'react' import {Tooltip} from 'react-tippy' import styles from './ItemStatus.css' const DraftStatus = () => ( <Tooltip tabIndex={-1} className={styles.itemStatus} html={ <div className={styles.tooltipWrapper}> <span>Unpub...
import EditIcon from 'part:@sanity/base/edit-icon' import React from 'react' // import {Tooltip} from 'react-tippy' import styles from './ItemStatus.css' const DraftStatus = () => ( // NOTE: We're experiencing a bug with `react-tippy` here // @todo: Replace react-tippy with `react-popper` or something // <Toolt...
Disable react-tippy because of a bug
[desk-tool] Disable react-tippy because of a bug
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
b8d022270a10d59cc895acafad4742ad61e3460c
server/routes/authRouter.js
server/routes/authRouter.js
var authRouter = require('express').Router(); var jwt = require('jwt-simple'); var auth = require('../lib/auth'); var User = require('../../db/models/User'); var Promise = require('bluebird'); var bcrypt = require('bcryptjs'); bcrypt.compare = Promise.promisify(bcrypt.compare); authRouter.post('/login', function(req,...
var authRouter = require('express').Router(); var jwt = require('jwt-simple'); var auth = require('../lib/auth'); var User = require('../../db/models/User'); var Promise = require('bluebird'); var bcrypt = require('bcryptjs'); bcrypt.compare = Promise.promisify(bcrypt.compare); authRouter.post('/login', function(req,...
Set JWT expiration date to 30 days
Set JWT expiration date to 30 days
JavaScript
mit
SillySalamanders/Reactivity,SillySalamanders/Reactivity
949254b178c540d98783e3efe3c2df82cd138ce4
src/components/CryptoDropdown.js
src/components/CryptoDropdown.js
import React from 'react' const CryptoDropdown = ({ label, cryptos, action }) => ( <div className="form-group form-group-sm"> <label className="col-sm-2 control-label">{label}</label> <div className="col-sm-10"> <select className="form-control" onChange={ (e) => action(e.target.value)}> ...
import React from 'react' const CryptoDropdown = ({ label, cryptos, action }) => ( <div className="form-group form-group-sm"> <label className="col-sm-2 control-label">{label}</label> <div className="col-sm-10"> <select className="form-control" onChange={ (e) => action(e.target.value)}> ...
Revert "updated image for documentation"
Revert "updated image for documentation" This reverts commit de6b2b26414dfd46069d170761e457d95c67b589.
JavaScript
mit
davidoevans/react-redux-dapp,davidoevans/react-redux-dapp
d232a4d61f6de338916a15744e925f5ff8e3ca9a
test/types.js
test/types.js
import test from 'ava'; import domLoaded from '../'; test('domLoaded is a function', t => { t.is(typeof domLoaded, 'function'); });
import test from 'ava'; import domLoaded from '../'; test('domLoaded is a function', t => { t.is(typeof domLoaded, 'function'); }); test('domLoaded returns a Promise', t => { t.true(domLoaded() instanceof Promise); });
Test domLoaded returns a Promise
Test domLoaded returns a Promise
JavaScript
mit
lukechilds/when-dom-ready
17ce6c41c8e7b43f1e9f12fe66e4e65ec9f7a487
index.js
index.js
var dust try { dust = require('dustjs-linkedin') try { require('dustjs-helpers') } catch (ex) {} } catch (ex) { try { dust = require('dust') } catch (ex) {} } if (!dust) throw new Error('"dustjs-linkedin" or "dust" module not found') module.exports = { module: { compile: function(template, options, c...
var dust var fs = require('fs') var Path = require('path') try { dust = require('dustjs-linkedin') try { require('dustjs-helpers') } catch (ex) {} } catch (ex) { try { dust = require('dust') } catch (ex) {} } if (!dust) throw new Error('"dustjs-linkedin" or "dust" module not found') module.exports = { mo...
Use dust.onLoad to compile templates
Use dust.onLoad to compile templates
JavaScript
mit
mikefrey/hapi-dust
e7afd02eb05683909c88ef0531963f4badf9d351
Multiselect.js
Multiselect.js
Template.Multiselect.onRendered(function multiselectOnRendered() { let template = this; let config = {}; if(template.data.configOptions) { config = template.data.configOptions; } // autorun waits until after the dependent data has been updated template.autorun(function multiselectAutorun() { Templa...
Template.Multiselect.onRendered(function multiselectOnRendered() { let template = this; let config = {}; if(template.data.configOptions) { config = template.data.configOptions; } // autorun waits until after the dependent data has been updated template.autorun(function multiselectAutorun() { Templa...
Handle reinitialize case, clean up variable declarations
Handle reinitialize case, clean up variable declarations
JavaScript
mit
brucejo75/meteor-bootstrap-multiselect,brucejo75/meteor-bootstrap-multiselect
1f79b26808612ec1879394fad9ddc0ace5bbe1e6
lib/assets/javascripts/builder/data/backbone/network-interceptors/interceptors/forbidden-403.js
lib/assets/javascripts/builder/data/backbone/network-interceptors/interceptors/forbidden-403.js
/** * 403 Forbidden Network Error Interceptor * * This interceptor redirects to login page when * any 403 session expired error is returned in any of the * network requests */ var LOGIN_ROUTE = '/login'; var SESSION_EXPIRED = 'session_expired'; var subdomainMatch = /https?:\/\/([^.]+)/; module.exports = functi...
/** * 403 Forbidden Network Error Interceptor * * This interceptor redirects to login page when * any 403 session expired error is returned in any of the * network requests */ var LOGIN_ROUTE = '/login?error=session_expired'; var SESSION_EXPIRED = 'session_expired'; var subdomainMatch = /https?:\/\/([^.]+)/; m...
Add error parameter to forbidden interceptor
Add error parameter to forbidden interceptor
JavaScript
bsd-3-clause
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
53317d97c5862ab96161066546fd3a744939ca2e
src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js
src/Orchard.Web/Modules/TinyMce/Scripts/orchard-tinymce.js
var mediaPlugins = ""; if (mediaPickerEnabled) { mediaPlugins += " mediapicker"; } if (mediaLibraryEnabled) { mediaPlugins += " medialibrary"; } tinyMCE.init({ selector: "textarea.tinymce", theme: "modern", schema: "html5", entity_encoding : "raw", plugins: [ "advl...
var mediaPlugins = ""; if (mediaPickerEnabled) { mediaPlugins += " mediapicker"; } if (mediaLibraryEnabled) { mediaPlugins += " medialibrary"; } tinyMCE.init({ selector: "textarea.tinymce", theme: "modern", schema: "html5", plugins: [ "advlist autolink lists link image...
Revert "Fixing that TinyMCE is encoding special chars"
Revert "Fixing that TinyMCE is encoding special chars" This reverts commit 188fabe233c3c9ebef04ccd29c1a07e8a520e882.
JavaScript
bsd-3-clause
armanforghani/Orchard,LaserSrl/Orchard,Serlead/Orchard,AdvantageCS/Orchard,tobydodds/folklife,geertdoornbos/Orchard,hannan-azam/Orchard,rtpHarry/Orchard,brownjordaninternational/OrchardCMS,jagraz/Orchard,gcsuk/Orchard,JRKelso/Orchard,TalaveraTechnologySolutions/Orchard,jimasp/Orchard,sfmskywalker/Orchard,rtpHarry/Orcha...
8feed977590b87f7936992c58235b99b91b2028a
src/js/controllers/navbar_top.js
src/js/controllers/navbar_top.js
'use strict'; /** * @ngdoc function * @name Pear2Pear.controller:NavbarTopCtrl * @description * # NavbarTop Ctrl */ angular.module('Pear2Pear') .controller( 'NavbarTopCtrl', [ 'SwellRTSession', '$scope', function(SwellRTSession, $scope){ var getSharedMode = function(){ if ($s...
'use strict'; /** * @ngdoc function * @name Pear2Pear.controller:NavbarTopCtrl * @description * # NavbarTop Ctrl */ angular.module('Pear2Pear') .controller( 'NavbarTopCtrl', [ 'SwellRTSession', '$scope', function(SwellRTSession, $scope){ var getSharedMode = function(){ if ($s...
Revert "avoid unnecesary call to onLoad"
Revert "avoid unnecesary call to onLoad" This reverts commit 5a81300cb8a99c7428d9aeea26276d4415efcf64.
JavaScript
agpl-3.0
Grasia/teem,P2Pvalue/teem,P2Pvalue/teem,Grasia/teem,P2Pvalue/teem,Grasia/teem,P2Pvalue/pear2pear,P2Pvalue/pear2pear
4d398ea4ccecad68c5938c266506f8a4a30acc2d
src/javascript/binary/websocket_pages/user/telegram_bot.js
src/javascript/binary/websocket_pages/user/telegram_bot.js
const TelegramBot = (() => { 'use strict'; const form = '#frm_telegram_bot'; const onLoad = () => { const bot_name = 'binary_test_bot'; $(form).on('submit', (e) => { e.preventDefault(); const token = $('#token').val(); const url = `https://t.me/${bot_nam...
const FormManager = require('../../common_functions/form_manager'); const TelegramBot = (() => { 'use strict'; const form = '#frm_telegram_bot'; const onLoad = () => { const bot_name = 'binary_test_bot'; FormManager.init(form, [ { selector: '#token', validations: ['req'], exc...
Rewrite code to use formManager
Rewrite code to use formManager
JavaScript
apache-2.0
raunakkathuria/binary-static,ashkanx/binary-static,negar-binary/binary-static,4p00rv/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,4p00rv/binary-static,binary-com/binary-static,kellybinary/binary-static,raunakkathuria/binary-static...
979b21e574ab78debf0bc247f94acac0c33f3ca3
components/map/components/legend/components/layer-statement/config.js
components/map/components/legend/components/layer-statement/config.js
export default { lossLayer: { // if we want to add this disclaimer (with the hover) to a widget in the legend, // - type must be 'lossLayer' in the 'legend' section of the layer, OR // - the layer has to have 'isLossLayer=true' in the metadata. // For the second case (isLossLayer), type is being overw...
export default { lossLayer: { // if we want to add this disclaimer (with the hover) to a widget in the legend, // - type must be 'lossLayer' in the 'legend' section of the layer, OR // - the layer has to have 'isLossLayer=true' in the metadata. // For the second case (isLossLayer), type is being overw...
Add space to legend text
Add space to legend text
JavaScript
mit
Vizzuality/gfw,Vizzuality/gfw
d6593eeea21a624ff0bb1b1d43f433f77ae55e47
src/reducers/reducer_workload.js
src/reducers/reducer_workload.js
export default function(state={}, action) { switch(action.type) { case 'example_data': return 'The action controller worked properly' default: return state; } }
import { FETCH_OPPS } from '../actions'; export default function(state={}, action) { switch(action.type) { case FETCH_OPPS: return action.payload default: return state; } }
Modify switch statement in WorkloadReducer
Modify switch statement in WorkloadReducer
JavaScript
mit
danshapiro-optimizely/bandwidth,danshapiro-optimizely/bandwidth
caf0a2289145c699a853aa75449bbaebacb0b7e9
webpack.production.config.js
webpack.production.config.js
'use strict' const webpack = require('webpack') const path = require('path') const configuration = { entry: path.resolve(__dirname, 'app'), output: { path: path.resolve(__dirname, 'public'), filename: '[name].js' }, module: { loaders: [ { test: /\.js?$/, loader: 'react-hot-loader', include: ...
'use strict' const webpack = require('webpack') const path = require('path') var HtmlWebpackPlugin = require('html-webpack-plugin') const configuration = { entry: [ path.resolve(__dirname, 'app') ], output: { path: path.resolve(__dirname, 'public/build/'), filename: '[hash].js' }, module: { ...
Add a new build process for the production environment.
Add a new build process for the production environment.
JavaScript
mit
rhberro/the-react-client,rhberro/the-react-client
048cc348d0bd0b614e05913cc5619b54b174463e
src/server/services/discovery.js
src/server/services/discovery.js
import Promise from 'bluebird'; import { lookupServiceAsync } from '../utils/lookup-service'; function findService(fullyQualifiedName) { // Get just the service name from the fully qualified name let nameParts = fullyQualifiedName.split('.'); let serviceName = nameParts[nameParts.length - 1]; // Insert a da...
import Promise from 'bluebird'; import { lookupServiceAsync } from '../utils/lookup-service'; function findService(fullyQualifiedName) { // Get just the service name from the fully qualified name let nameParts = fullyQualifiedName.split('.'); let serviceName = nameParts[nameParts.length - 1]; // We should h...
Use the short service name when resolving Grpc services
Use the short service name when resolving Grpc services
JavaScript
apache-2.0
KillrVideo/killrvideo-web,KillrVideo/killrvideo-web,KillrVideo/killrvideo-web
fb8473d0e16f20b8828dd1692206e86497bcf507
client/MobiApp.js
client/MobiApp.js
Geolocation.latLng() Template.newIssue.events({ 'submit form': function(){ event.preventDefault(); var title = event.target.title.value; var description = event.target.description.value; var imageURL = Session.get('imageURL'); console.log(title, description); if (title && description && Geolo...
Geolocation.latLng() Template.newIssue.events({ 'submit form': function(){ event.preventDefault(); var title = event.target.title.value; var description = event.target.description.value; var imageURL = Session.get('imageURL'); console.log(title, description); if (title && description && Geolo...
Fix issue list after change of authentication package
Fix issue list after change of authentication package
JavaScript
agpl-3.0
kennyzlei/MobiApp,kennyzlei/MobiApp
dee7c234c5a6e98a7d21a99ae5539fe978ca2d4e
src/Logger.js
src/Logger.js
/** * @flow */ import bunyan from 'bunyan'; import path from 'path'; import UserSettings from './UserSettings'; class ConsoleRawStream { write(rec) { if (rec.level < bunyan.INFO) { console.log(rec); } else if (rec.level < bunyan.WARN) { console.info(rec); } else if (rec.level < bunyan.ERR...
/** * @flow */ import bunyan from 'bunyan'; import path from 'path'; import UserSettings from './UserSettings'; class ConsoleRawStream { write(rec) { if (rec.level < bunyan.INFO) { console.log(rec); } else if (rec.level < bunyan.WARN) { console.info(rec); } else if (rec.level < bunyan.ERR...
Remove stray unused redux notif function.
Remove stray unused redux notif function. fbshipit-source-id: bdf73a4
JavaScript
mit
exponentjs/xdl,exponentjs/xdl,exponentjs/xdl
593ec57633fbef471f09501e0c886899e51bd467
code/geosearch.js
code/geosearch.js
// GEOSEARCH ///////////////////////////////////////////////////////// window.setupGeosearch = function() { $('#geosearch').keypress(function(e) { if((e.keyCode ? e.keyCode : e.which) != 13) return; var search = $(this).val(); if (!runHooks('geoSearch', search)) { return; } ...
// GEOSEARCH ///////////////////////////////////////////////////////// window.setupGeosearch = function() { $('#geosearch').keypress(function(e) { if((e.keyCode ? e.keyCode : e.which) != 13) return; var search = $(this).val(); if (!runHooks('geoSearch', search)) { return; } ...
Set maxZoom = 13 for desktop locate button too.
Set maxZoom = 13 for desktop locate button too.
JavaScript
isc
tony2001/ingress-intel-total-conversion,3ch01c/ingress-intel-total-conversion,pfsmorigo/ingress-intel-total-conversion,manierim/ingress-intel-total-conversion,FLamparski/ingress-intel-total-conversion,SpamapS/ingress-intel-total-conversion,tony2001/ingress-intel-total-conversion,tony2001/ingress-intel-total-conversion,...
b9399f212ba6744374a0a54d4b06b21200865bb4
src/server/pages.js
src/server/pages.js
import nextRoutes from 'next-routes'; const pages = nextRoutes(); pages .add('signin', '/signin/:token?') .add('createEvent', '/:parentCollectiveSlug/events/(new|create)') .add('events-iframe', '/:collectiveSlug/events/iframe') .add('event', '/:parentCollectiveSlug/events/:eventSlug') .add('editEvent', '/:p...
import nextRoutes from 'next-routes'; const pages = nextRoutes(); pages .add('widgets', '/widgets') .add('tos', '/tos') .add('privacypolicy', '/privacypolicy') .add('signin', '/signin/:token?') .add('button', '/:collectiveSlug/:verb(contribute|donate)/button') .add('createEvent', '/:parentCollectiveSlug/e...
Fix for /widgets, /tos, /privacypolicy, /:slug/:verb/button
Fix for /widgets, /tos, /privacypolicy, /:slug/:verb/button
JavaScript
mit
OpenCollective/frontend
b27471e3ae289e4b3e97302ff7a5e9cc4ace59e8
src/Result.js
src/Result.js
'use strict' var chalk = require('chalk') var deepEqual = require('deep-equal') var indent = require('./indent') var os = require('os') const CHECK = '\u2713' const CROSS = '\u2717' const PASS_COLOR = 'green' const FAIL_COLOR = 'red' module.exports = class Result { constructor (runnable, options) { options = o...
'use strict' var chalk = require('chalk') var deepEqual = require('deep-equal') var indent = require('./indent') var os = require('os') const CHECK = '✓' const CROSS = '✗' const PASS_COLOR = 'green' const FAIL_COLOR = 'red' module.exports = class Result { constructor (runnable, options) { options = options || ...
Use unicode special characters directly in source
Use unicode special characters directly in source
JavaScript
isc
nickmccurdy/purespec
1f8b40ecfe9a2c7d7c31a0f71a72049dc413749d
src/issue-strategies/bug-maintenance.js
src/issue-strategies/bug-maintenance.js
export function apply(issue, jiraClientAPI) { if(issue === null || issue.fields.status.statusCategory.colorName !== 'yellow') { return Promise.reject(new Error(`Cannot commit against this issue ${issue.key}`)); } return Promise.resolve(true); }
export function apply(issue, jiraClientAPI) { if(issue === null || issue.fields.status.statusCategory.colorName !== 'yellow') { return Promise.reject(new Error(`Cannot commit against this issue ${issue.key}. Make sure the issue exists and has a yellow status`)); } return Promise.resolve(true); }
Add additional issue status error info
Add additional issue status error info Closes #23
JavaScript
mit
DarriusWrightGD/jira-precommit-hook,TWExchangeSolutions/jira-precommit-hook
21edc4ec471a55a0dce9dd2c7d3e84a5576aaf84
src/js/graphic/background/background.js
src/js/graphic/background/background.js
import Geometric from './geometric/geometric.js' export default class Background { static draw(p) { Background.changeColor(p) Background.translateCamera(p) Background.translateCameraByMouse(p) Geometric.draw(p) } static changeColor(p) { const hexColorMax = 255 const radianX...
import Geometric from './geometric/geometric.js' export default class Background { static draw(p) { Background.changeColor(p) Background.translateCamera(p) Background.translateCameraByMouse(p) Geometric.draw(p) } static changeColor(p) { const hexColorMax = 255 const radianX...
Fix main camera zTranslation responsive issue
Fix main camera zTranslation responsive issue
JavaScript
mit
yuki-nit2a/yuki.nit2a.com,yuki-nit2a/yuki.nit2a.com
44ddb35699ed2a7cff9e5dc2f4b36823931a57b6
app/process_request.js
app/process_request.js
var requirejs = require('requirejs'); var PageConfig = requirejs('page_config'); var get_dashboard_and_render = require('./server/mixins/get_dashboard_and_render'); var renderContent = function (req, res, model) { model.set(PageConfig.commonConfig(req)); var ControllerClass = model.get('controller'); var cont...
var requirejs = require('requirejs'); var PageConfig = requirejs('page_config'); var get_dashboard_and_render = require('./server/mixins/get_dashboard_and_render'); var renderContent = function (req, res, model) { model.set(PageConfig.commonConfig(req)); var ControllerClass = model.get('controller'); var cont...
Remove comment about client_instance script
Remove comment about client_instance script The script attribute of a client_instance is tested in the view, for example in body-end.html: <% if (model.get('script')) { %> It can be set to false to disable including of our rather large JavaScript assets.
JavaScript
mit
alphagov/spotlight,tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight
8bd45a62113fa47b03217887e027afe0bfdd04dc
lib/util/parse.js
lib/util/parse.js
// Code based largely on this module: // https://www.npmjs.org/package/git-credential function parseOutput(data, callback) { var output = {}; if (data) { output = data.toString('utf-8') .split('\n') .map(function (line) { return line.split('='); }) ...
// Code based largely on this module: // https://www.npmjs.org/package/git-credential function parseOutput(data, callback) { var output = {}; if (data) { output = data.toString('utf-8') .split('\n') .map(function (line) { var index = line.indexOf('='); ...
Return password when it contains =
Return password when it contains = Fixes #3
JavaScript
mit
nwinkler/git-credential-helper
8671f86ecc9ece19dd1739edfb9f3a6cc92af12e
reducer/stationboards.js
reducer/stationboards.js
const initState = {}; export default (state = initState, action) => { switch (action.type) { case "GET_STATIONBOARD_REQUESTED": const { stationId } = action.payload; return { ...state, [stationId]: { data: [], p...
const initState = {}; export default (state = initState, action) => { switch (action.type) { case "GET_STATIONBOARD_REQUESTED": const { stationId } = action.payload; return { ...state, [stationId]: { data: [], p...
Add checkpoints to the stationboard objects
Add checkpoints to the stationboard objects
JavaScript
mit
rafaelkallis/hackzurich2017
3bf6e52f7955fd688de4c90e6f1d5fda241b45d2
builder-bob.js
builder-bob.js
/** * 12-22-2016 * ~~ Scott Johnson */ /** List jshint ignore directives here. **/ /* jslint node: true */ /* jshint esversion: 6 */ /*eslint-env es6*/ // Stop jshint from complaining about the promise.catch() syntax. /* jslint -W024 */ var util = require( './lib/bob-util.js' ); var Batch = require( './lib/bob-...
/** * 12-22-2016 * ~~ Scott Johnson */ /** List jshint ignore directives here. **/ /* jslint node: true */ /* jshint esversion: 6 */ /*eslint-env es6*/ // Stop jshint from complaining about the promise.catch() syntax. /* jslint -W024 */ var util = require( './lib/bob-util.js' ); var Batch = require( './lib/bob-...
Create jobs directly through bob.
Create jobs directly through bob.
JavaScript
mit
lucentminds/builder-bob
3fba858b12cd7d3d36fdc8618e2e6c1f11a83263
challengers.js
challengers.js
// Welcome! // Add your github user if you accepted the challenge! var players = [ 'raphamorim', 'israelst', 'afonsopacifer', 'rafaelfragosom', 'brunokinoshita', 'paulinhoerry', 'enieber', 'alanrsoares' ]; module.exports = players;
// Welcome! // Add your github user if you accepted the challenge! var players = [ 'raphamorim', 'israelst', 'afonsopacifer', 'rafaelfragosom', 'brunokinoshita', 'paulinhoerry', 'enieber', 'alanrsoares', 'brunodsgn' ]; module.exports = players;
Add brunodsgn as new challenger
Add brunodsgn as new challenger
JavaScript
mit
joselitojunior/write-code-every-day,vitorleal/write-code-every-day,raphamorim/write-code-every-day,mabrasil/write-code-every-day,Gcampes/write-code-every-day,arthurvasconcelos/write-code-every-day,cesardeazevedo/write-code-every-day,hocraveiro/write-code-every-day,mauriciojunior/write-code-every-day,rtancman/write-code...
86bd1cf69106768f9a576278f569700b4a48ee1c
src/components/BodyAttributes.js
src/components/BodyAttributes.js
import { Component, Children, PropTypes } from "react"; import withSideEffect from "react-side-effect"; const supportedHTML4Attributes = { "bgColor": "bgcolor" }; class BodyAttributes extends Component { render() { return Children.only(this.props.children); } } BodyAttributes.propTypes = { children: Pro...
import { Component, Children, PropTypes } from "react"; import withSideEffect from "react-side-effect"; const supportedHTML4Attributes = { "bgColor": "bgcolor" }; class BodyAttributes extends Component { render() { return Children.only(this.props.children); } } BodyAttributes.propTypes = { children: Pro...
Improve comment around transformed attributes
Improve comment around transformed attributes
JavaScript
mit
TrueCar/gluestick-shared,TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick
0e4cebad2acb269667b14ddc58cb3bb172809234
katas/es6/language/block-scoping/let.js
katas/es6/language/block-scoping/let.js
// block scope - let // To do: make all tests pass, leave the asserts unchanged! describe('`let` restricts the scope of the variable to the current block', () => { describe('`let` vs. `var`', () => { it('`var` works as usual', () => { if (true) { var varX = true; } assert.equal(varX, ...
// block scope - let // To do: make all tests pass, leave the asserts unchanged! describe('`let` restricts the scope of the variable to the current block', () => { describe('`let` vs. `var`', () => { it('`var` works as usual', () => { if (true) { let varX = true; } assert.equal(varX, ...
Make it nicer and break it, to be a kata :).
Make it nicer and break it, to be a kata :).
JavaScript
mit
cmisenas/katas,JonathanPrince/katas,cmisenas/katas,rafaelrocha/katas,JonathanPrince/katas,ehpc/katas,cmisenas/katas,rafaelrocha/katas,JonathanPrince/katas,Semigradsky/katas,tddbin/katas,ehpc/katas,tddbin/katas,Semigradsky/katas,Semigradsky/katas,rafaelrocha/katas,tddbin/katas,ehpc/katas
713377318286d72bc7836c0a79d4060f95d163ef
server/_config.js
server/_config.js
let selectENV = (env) => { if (env === 'development') { return 'postgres://localhost:5432/todos'; } else if (env === 'test') { return 'postgres://localhost:5432/todos_test_db'; } } module.exports = { selectENV };
let selectENV = (env) => { if (env === 'development') { return 'postgres://localhost:5432/todos'; } else if (env === 'test') { return 'postgres://localhost:5432/todos_test'; } } module.exports = { selectENV };
Fix typo in setDev func
Fix typo in setDev func
JavaScript
mit
spencerdezartsmith/to-do-list-app,spencerdezartsmith/to-do-list-app
9fd827df81a400df1577c3405a646e26a1b17c51
src/exampleApp.js
src/exampleApp.js
"use strict"; // For conditions of distribution and use, see copyright notice in LICENSE /* * @author Tapani Jamsa * @author Erno Kuusela * @author Toni Alatalo * Date: 2013 */ var app = new Application(); app.host = "localhost"; // IP to the Tundra server app.port = 2345; // and port to the...
"use strict"; // For conditions of distribution and use, see copyright notice in LICENSE /* * @author Tapani Jamsa * @author Erno Kuusela * @author Toni Alatalo * Date: 2013 */ var app = new Application(); var host = "localhost"; // IP to the Tundra server var port = 2345; // and port to the...
Make host and port standard variables
Make host and port standard variables
JavaScript
apache-2.0
playsign/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra,AlphaStaxLLC/WebTundra,playsign/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra
7dcb583e7425bff4964b1e3ce52c745c512b1489
src/game/index.js
src/game/index.js
import Phaser from 'phaser-ce'; import { getConfig } from './config'; import TutorialState from './TutorialState'; export default class WreckSam { constructor() { const config = getConfig(); this.game = new Phaser.Game(config); this.game.state.add('tutorial', new TutorialState()); } ...
import Phaser from 'phaser-ce'; import { getConfig } from './config'; import TutorialState from './TutorialState'; export default class WreckSam { constructor() { const config = getConfig(); this.game = new Phaser.Game(config); this.game.state.add('tutorial', new TutorialState()); } ...
Use game paused property instead of lockRender
Use game paused property instead of lockRender
JavaScript
mit
marc1404/WreckSam,marc1404/WreckSam
ec679a27b227877a5e383af2bf9deabf0a3c2072
loader.js
loader.js
// Loader to create the Ember.js application /*global require */ window.App = require('ghost/app')['default'].create();
// Loader to create the Ember.js application /*global require */ if (!window.disableBoot) { window.App = require('ghost/app')['default'].create(); }
Add initial client unit test.
Add initial client unit test.
JavaScript
mit
kevinansfield/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,TryGhost/Ghost-Admin,dbalders/Ghost-Admin,acburdine/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin
1df9443cf4567a4deef6f708d5f0ed0f8e3858da
lib/less/functions/function-registry.js
lib/less/functions/function-registry.js
function makeRegistry( base ) { return { _data: {}, add: function(name, func) { // precautionary case conversion, as later querying of // the registry by function-caller uses lower case as well. name = name.toLowerCase(); if (this._data.hasOwnProperty...
function makeRegistry( base ) { return { _data: {}, add: function(name, func) { // precautionary case conversion, as later querying of // the registry by function-caller uses lower case as well. name = name.toLowerCase(); if (this._data.hasOwnProperty...
Add create() and getLocalFunctions() to function registry so it can be used for plugins
Add create() and getLocalFunctions() to function registry so it can be used for plugins
JavaScript
apache-2.0
foresthz/less.js,foresthz/less.js,less/less.js,less/less.js,less/less.js
e8a8fed47acf2a7bb9a72720e7c92fbfa6c94952
src/lintStream.js
src/lintStream.js
import postcss from "postcss" import fs from "fs" import gs from "glob-stream" import rcLoader from "rc-loader" import { Transform } from "stream" import plugin from "./plugin" export default function ({ files, config } = {}) { const stylelintConfig = config || rcLoader("stylelint") if (!stylelintConfig) { thr...
import postcss from "postcss" import fs from "fs" import gs from "glob-stream" import { Transform } from "stream" import plugin from "./plugin" export default function ({ files, config } = {}) { const linter = new Transform({ objectMode: true }) linter._transform = function (chunk, enc, callback) { if (files)...
Add bin to package.json and move rc-loading to plugin.js
Add bin to package.json and move rc-loading to plugin.js
JavaScript
mit
gaidarenko/stylelint,stylelint/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,stylelint/stylelint,hudochenkov/stylelint,gucong3000/stylelint,heatwaveo8/stylelint,stylelint/stylelint,gaidarenko/stylelint,stylelint/stylelint,hudochenkov/stylelint,gaidarenko/stylelint,evilebottnawi/stylelint,gucong3000/stylelint,hea...
bf04e2c0a7637b0486562167c6046cb8c2a74a26
src/database/DataTypes/TemperatureBreachConfiguration.js
src/database/DataTypes/TemperatureBreachConfiguration.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2020 */ import Realm from 'realm'; export class TemperatureBreachConfiguration extends Realm.Object {} TemperatureBreachConfiguration.schema = { name: 'TemperatureBreachConfiguration', primaryKey: 'id', properties: { id: 'string', minimumTempera...
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2020 */ import Realm from 'realm'; export class TemperatureBreachConfiguration extends Realm.Object { toJSON() { return { id: this.id, minimumTemperature: this.minimumTemperature, maximumTemperature: this.maximumTemperature, durat...
Add breach config adapter method
Add breach config adapter method
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
f068173deb8aefb9ff0ac55c5fe5e57fd4363288
server/src/app.js
server/src/app.js
const express = require('express') const bodyParser = require('body-parser') const cors = require('cors') const morgan = require('morgan') const {sequelize} = require('./models') const config = require('./config/config') const app = express() // Seting up middleware app.use(morgan('combined')) app.use(bodyParser.json(...
const express = require('express') const bodyParser = require('body-parser') const cors = require('cors') const morgan = require('morgan') const {sequelize} = require('./models') const config = require('./config/config') const app = express() // Seting up middleware app.use(morgan('combined')) app.use(bodyParser.json(...
Disable migration on start server
Disable migration on start server
JavaScript
mit
rahman541/tab-tracker,rahman541/tab-tracker
b2987678c06e7527491984a11e86a63da1d17cb4
src/_fixMobile/EventPath.js
src/_fixMobile/EventPath.js
(function(global){ // For Android 4.3- (included) document.body.addEventListener('click', function(e) { if (!e.path) { e.path = []; var t = e.target; while (t !== document) { e.path.push(t); t = t.parentNode; } e.path.push(document); e.path.push(window); ...
(function(global){ // For Android 4.3- (included) var pathFill = function() { var e = arguments[0]; if (!e.path) { e.path = []; var t = e.target; while (t !== document) { e.path.push(t); t = t.parentNode; } e.path.push(document); e.path.push(window); ...
Handle event when bubbles event and catch event.
Handle event when bubbles event and catch event.
JavaScript
mit
zhoukekestar/web-modules,zhoukekestar/modules,zhoukekestar/web-modules,zhoukekestar/modules,zhoukekestar/modules,zhoukekestar/web-modules
aceeb92a1c71a2bdae0f1ebfce50c2391a20bbe2
models.js
models.js
var orm = require('orm'); var db = orm.connect('sqlite://db.sqlite'); function init(callback) { db.sync(callback); } module.exports = { init: init };
var orm = require('orm'); var db = orm.connect('sqlite://' + __dirname + '/db.sqlite'); function init(callback) { db.sync(callback); } module.exports = { init: init };
Use correct directory for sqlite database
Use correct directory for sqlite database
JavaScript
mit
dashersw/cote-workshop,dashersw/cote-workshop
16162985c41a9cd78e17a76b66de27fe2b7bc31d
src/components/NewEngagementForm.js
src/components/NewEngagementForm.js
import 'react-datepicker/dist/react-datepicker.css' import '../App.css' import React, { Component } from 'react' import { Field, reduxForm } from 'redux-form' import { Form } from 'semantic-ui-react' import DatePicker from 'react-datepicker' import moment from 'moment' import styled from 'styled-components' const Styl...
import 'react-datepicker/dist/react-datepicker.css' import '../App.css' import React, { Component } from 'react' import { Field, reduxForm } from 'redux-form' import { Form } from 'semantic-ui-react' import DatePicker from 'react-datepicker' import moment from 'moment' import styled from 'styled-components' const Styl...
Remove unneeded input form from new engagement form
Remove unneeded input form from new engagement form
JavaScript
mit
cernanb/personal-chef-react-app,cernanb/personal-chef-react-app
e518509d82651340e881a638e5279ed6a1be7af1
test/resources/unsubscribe_test.js
test/resources/unsubscribe_test.js
var expect = require('chai').expect; var Unsubscribe = require('../../lib/resources/unsubscribe'); var helper = require('../test_helper'); describe('Unsubscribe', function() { var server; beforeEach(function() { server = helper.server(helper.port, helper.requests); }); afterEach(function() { ...
var expect = require('chai').expect; var Unsubscribe = require('../../lib/resources/Unsubscribe'); var helper = require('../test_helper'); describe('Unsubscribe', function() { var server; beforeEach(function() { server = helper.server(helper.port, helper.requests); }); afterEach(function() { ...
Fix case sensitive require for unsubscribes
Fix case sensitive require for unsubscribes
JavaScript
mit
delighted/delighted-node,callemall/delighted-node
92978a1a24c2b2df4dba8f622c40f34c4fa7ca12
modules/signin.js
modules/signin.js
'use strict'; const builder = require('botbuilder'); const timesheet = require('./timesheet'); module.exports = exports = [(session) => { builder.Prompts.text(session, 'Please tell me your domain user?'); }, (session, results, next) => { session.send('Ok. Searching for your stuff...'); session.sendTypi...
'use strict'; const builder = require('botbuilder'); const timesheet = require('./timesheet'); module.exports = exports = [(session) => { builder.Prompts.text(session, 'Please tell me your domain user?'); }, (session, results, next) => { session.send('Ok. Searching for your stuff...'); session.sendTypi...
Fix impersonated user check issue.
Fix impersonated user check issue.
JavaScript
mit
99xt/jira-journal,99xt/jira-journal
6dc8a96b20179bd04a2e24fa4c3b0106d35ebaba
src/main.js
src/main.js
(function(){ "use strict"; xtag.register("sam-tabbar", { lifecycle: { created: function() { if (!this.role) { this.role = "tablist"; } }, inserted: function() { this.activeTabId = this.querySelector("[role='tab'][data-start-active]").id; }, remov...
(function(){ "use strict"; xtag.register("sam-tabbar", { lifecycle: { created: function() { if (!this.role) { this.role = "tablist"; } }, inserted: function() { this.activeTabId = this.querySelector("[role='tab'][data-start-active]").id; }, remov...
Add handler for when setTab is given a non-exsitant tab id
Add handler for when setTab is given a non-exsitant tab id
JavaScript
apache-2.0
Swissnetizen/sam-tabbar
0715d2b60dd1ebd851d4e5ea9ec9073424211012
src/function/lazyLoading.js
src/function/lazyLoading.js
define([ 'jquery' ], function($) { return function() { var self = this; if (!self.sprite && self.lasyEmoji[0]) { var pickerTop = self.picker.offset().top, pickerBottom = pickerTop + self.picker.height() + 20; self.lasyEmoji.each(function() { ...
define([ 'jquery' ], function($) { return function() { var self = this; if (!self.sprite && self.lasyEmoji[0] && self.lasyEmoji.eq(0).is(".lazy-emoji")) { var pickerTop = self.picker.offset().top, pickerBottom = pickerTop + self.picker.height() + 20; self....
Fix 'disconnected from the document' error
Fix 'disconnected from the document' error ref https://github.com/mervick/emojionearea/pull/240
JavaScript
mit
mervick/emojionearea
7a328c49ea155df7ff2ae55825aa299c541bf31e
test/index.js
test/index.js
var nocache = require('..') var assert = require('assert') var connect = require('connect') var request = require('supertest') describe('nocache', function () { it('sets headers properly', function (done) { var app = connect() app.use(function (req, res, next) { res.setHeader('ETag', 'abc123') n...
var nocache = require('..') var assert = require('assert') var connect = require('connect') var request = require('supertest') describe('nocache', function () { it('sets headers properly', function (done) { var app = connect() app.use(function (req, res, next) { res.setHeader('ETag', 'abc123') n...
Add missing test for `Surrogate-Control` header
Add missing test for `Surrogate-Control` header Fixes #13.
JavaScript
mit
helmetjs/nocache
5ac0fccde96dd50007767263c19b1432bb4e41d8
test/index.js
test/index.js
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ /* eslint-env node, mocha */ import test from 'ava'; import endpoint from '../src/endpoint'; test('happy ponies', () => { const fetch = () => null; api(null, null, { baseUri: 'http://api.example.com/v1', endpoints: [ ...
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ /* eslint-env node, mocha */ import test from 'ava'; import endpoint from '../src/endpoint'; test('endpoint returns correctly partially applied function', (t) => { const endpointConfig = { uri: 'http://example.com', }; const...
Add spec for endpoints function
Add spec for endpoints function
JavaScript
mit
hughrawlinson/api-client-helper
684d9d693b19bc4d09c26627bb16ddcfa6230c63
src/main.js
src/main.js
import './main.sass' import 'babel-core/polyfill' import React from 'react' import thunk from 'redux-thunk' import createLogger from 'redux-logger' import { Router } from 'react-router' import createBrowserHistory from 'history/lib/createBrowserHistory' import { createStore, applyMiddleware, combineReducers } from 're...
import './main.sass' import 'babel-core/polyfill' import React from 'react' import thunk from 'redux-thunk' import createLogger from 'redux-logger' import { Router } from 'react-router' import createBrowserHistory from 'history/lib/createBrowserHistory' import { createStore, applyMiddleware, combineReducers } from 're...
Fix an issue with redirects
Fix an issue with redirects
JavaScript
mit
ello/webapp,ello/webapp,ello/webapp
18c94b0fcf2fdab6dea4ee0f3c0de11ba6e368f6
test/index.js
test/index.js
var ienoopen = require('..') var assert = require('assert') var connect = require('connect') var request = require('supertest') describe('ienoopen', function () { beforeEach(function () { this.app = connect() this.app.use(ienoopen()) this.app.use(function (req, res) { res.setHeader('Content-Dispos...
var ienoopen = require('..') var assert = require('assert') var connect = require('connect') var request = require('supertest') describe('ienoopen', function () { beforeEach(function () { this.app = connect() this.app.use(ienoopen()) this.app.use(function (req, res) { res.setHeader('Content-Dispos...
Use promises instead of callbacks in test
Use promises instead of callbacks in test
JavaScript
mit
helmetjs/ienoopen
5bd8d02a8073fc55560fbc534f840627e81683de
src/main.js
src/main.js
'use strict'; const electron = require('electron'); const { app, BrowserWindow } = electron; let mainWindow; // Ensures garbage collection does not remove the window app.on('ready', () => { // Creates the application window and sets its dimensions to fill the screen const { width, height } = electron.screen.getP...
'use strict'; const electron = require('electron'); const { app, BrowserWindow } = electron; const path = require('path'); const url = require('url'); let mainWindow; // Ensures garbage collection does not remove the window app.on('ready', () => { // Creates the application window and sets its dimensions to fill t...
Change method of loading index.html
Change method of loading index.html
JavaScript
mit
joyceky/interactive-periodic-table,joyceky/interactive-periodic-table,joyceky/interactive-periodic-table
d650050d72d0272a350d26c1f03b2e4534e99b33
test/index.js
test/index.js
'use strict'; var expect = require('chai').expect; var rm = require('../'); describe('1rm', function () { // 400# x 4 var expectations = { brzycki: 436, epley: 453, lander: 441, lombardi: 459, mayhew: 466, oconner: 440, wathan: 451 }; Object.keys(expectations).forEach(functi...
'use strict'; var expect = require('chai').expect; var rm = require('../'); describe('1rm', function () { // 400# x 4 var expectations = { epley: 453, brzycki: 436, lander: 441, lombardi: 459, mayhew: 466, oconner: 440, wathan: 451 }; Object.keys(expectations).forEach(functi...
Order tests to match source
Order tests to match source
JavaScript
mit
bendrucker/1rm.js
10bfd8221e3264d12e6f12470a0d24debc855bd8
test/index.js
test/index.js
var expect = require('chai').expect, hh = require('../index'); describe('#method', function () { it('hh.method is a function', function () { expect(hh.method).a('function'); }); });
var assert = require('chai').assert, hh = require('../index'); describe('#hh.method()', function () { it('should be a function', function () { assert.typeOf(hh.method, 'function', 'hh.method is a function'); }); });
Change tests to assert style
Change tests to assert style
JavaScript
mit
rsp/node-hapi-helpers
3c83c85662300646972a2561db80e26e80432f48
server.js
server.js
const express = require('express') const app = express() const path = require('path') var cors = require('cors') var bodyParser = require('body-parser') // var pg = require('pg') // var format = require('pg-format') // var client = new pg.Client() // var getTimeStamp = require('./get-timestamp.js') // var timestamp = g...
const express = require('express') const app = express() const path = require('path') var cors = require('cors') var bodyParser = require('body-parser') // var pg = require('pg') // var format = require('pg-format') // var client = new pg.Client() // var getTimeStamp = require('./get-timestamp.js') // var timestamp = g...
Add res.end() to end the POST request
Add res.end() to end the POST request @chinedufn Line 24 is where I get the contents of `req.body` in order to get the text from the textbox the problem is I believe it should be `req.body.text` like the example on the 'body-parser' page shows.
JavaScript
mit
acucciniello/notebook-sessions,acucciniello/notebook-sessions
4cf7eb019de9b51505dbf1ba8e2b5f9bc77e0b20
recruit/client/applications.js
recruit/client/applications.js
Meteor.subscribe('regions'); Meteor.subscribe('applications'); Template.applications.helpers({ applications: function() { return Applications.find({}, {limit: 10}); }, formatDate: function(date) { return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear(); }, regionName: functio...
Meteor.subscribe('regions'); Meteor.subscribe('applications'); Template.applications.helpers({ applications: function() { return Applications.find({}, {limit: 10}); }, formatDate: function(date) { if (typeof date === 'undefined') { return null; } return date.getDate() + '/' + (date.getMon...
Fix exceptions when application region or date is undefined
Fix exceptions when application region or date is undefined
JavaScript
apache-2.0
IngloriousCoderz/GetReel,IngloriousCoderz/GetReel
b7ea9dc3f4e5bc7b028cf6aa4a5c7529b7d34160
troposphere/static/js/components/providers/Name.react.js
troposphere/static/js/components/providers/Name.react.js
import React from 'react/addons'; import Backbone from 'backbone'; import Router from 'react-router'; export default React.createClass({ displayName: "Name", propTypes: { provider: React.PropTypes.instanceOf(Backbone.Model).isRequired }, render: function () { let provider = this.props...
import React from 'react/addons'; import Backbone from 'backbone'; import Router from 'react-router'; export default React.createClass({ displayName: "Name", propTypes: { provider: React.PropTypes.instanceOf(Backbone.Model).isRequired }, render: function () { let provider = this.props...
Correct CSS class name typo
Correct CSS class name typo
JavaScript
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
df11a29999a30f430162e2a6742903879f4608c4
web/webpack.common.js
web/webpack.common.js
const path = require('path'); const webpack = require('webpack'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { entry: { app: './src/app/app.js' }, ...
const path = require('path'); const webpack = require('webpack'); const { CleanWebpackPlugin } = require('clean-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { entry: { app: './src/app/app.js' }, ...
Update webpack copy plugin configuration
Update webpack copy plugin configuration
JavaScript
mit
ddugovic/RelayChess,ddugovic/RelayChess,ddugovic/RelayChess
b9eccecc4a5574ec05e29c55b16e19814b7d2c19
Kinect2Scratch.js
Kinect2Scratch.js
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; ext.my_first_block =...
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; ext.my_first_block = fun...
Stop terrible idea; make reporter block do something
Stop terrible idea; make reporter block do something
JavaScript
bsd-3-clause
visor841/SkelScratch,Calvin-CS/SkelScratch
46f2f3e86783a0b1eeed9be1ac35cd50a3ce1939
src/pkjs/index.js
src/pkjs/index.js
/* global Pebble navigator */ function pebbleSuccess(e) { // do nothing } function pebbleFailure(e) { console.error(e); } var reportPhoneBatt; Pebble.addEventListener('ready', function(e) { if (navigator.getBattery) { navigator.getBattery().then(function (battery) { reportPhoneBatt = function () { ...
/* global Pebble navigator */ function pebbleSuccess(e) { // do nothing } function pebbleFailure(e) { console.error(e); } var reportPhoneBatt; Pebble.addEventListener('ready', function(e) { if (navigator.getBattery) { navigator.getBattery().then(function (battery) { reportPhoneBatt = function () { ...
Add log message about starting in the emulator
Add log message about starting in the emulator
JavaScript
mit
stuartpb/rainpower-watchface,stuartpb/rainpower-watchface,stuartpb/rainpower-watchface
ce1c9f69ab4aec5e1d2a1c15faaeb0a00a954f04
src/Native/Now.js
src/Native/Now.js
Elm.Native.Now = {}; Elm.Native.Now.make = function(localRuntime) { localRuntime.Native = localRuntime.Native || {}; localRuntime.Native.Now = localRuntime.Native.Now || {}; if (localRuntime.Native.Now.values) { return localRuntime.Native.Now.values; } var Result = Elm.Result.make(localRuntime); ...
Elm.Native.Now = {}; Elm.Native.Now.make = function(localRuntime) { localRuntime.Native = localRuntime.Native || {}; localRuntime.Native.Now = localRuntime.Native.Now || {}; if (localRuntime.Native.Now.values) { return localRuntime.Native.Now.values; } var Result = Elm.Result.make(localRuntime); ...
Use native Date() instead of window date
Use native Date() instead of window date
JavaScript
mit
chendrix/elm-rogue,chendrix/elm-rogue,chendrix/elm-rogue
a9d67c9f29270b56be21cb71073020f8957374d4
test/client/scripts/arcademode/store/configureStore.spec.js
test/client/scripts/arcademode/store/configureStore.spec.js
'use strict'; /* Unit tests for file client/scripts/arcademode/store/configureStore.js. */ import { expect } from 'chai'; import configureStore from '../../../../../client/scripts/arcademode/store/configureStore'; describe('configureStore()', () => { it('should do return an object', () => { const store = confi...
'use strict'; /* Unit tests for file client/scripts/arcademode/store/configureStore.js. */ import { expect } from 'chai'; import configureStore from '../../../../../client/scripts/arcademode/store/configureStore'; describe('Store: configureStore()', () => { it('should return an object representing the store', () =...
Test store, dispatch, and state
Test store, dispatch, and state
JavaScript
bsd-3-clause
freeCodeCamp/arcade-mode,kevinnorris/arcade-mode,kevinnorris/arcade-mode,kevinnorris/arcade-mode,freeCodeCamp/arcade-mode,freeCodeCamp/arcade-mode,kevinnorris/arcade-mode,freeCodeCamp/arcade-mode
be4104b7fa5e985da4970d733231ba2f9f4d1c24
lib/async-to-promise.js
lib/async-to-promise.js
// Return promise for given async function 'use strict'; var f = require('es5-ext/lib/Function/functionalize') , concat = require('es5-ext/lib/List/concat').call , slice = require('es5-ext/lib/List/slice/call') , deferred = require('./deferred') , apply; apply = function (fn, scope, args, resolve) {...
// Return promise for given async function 'use strict'; var f = require('es5-ext/lib/Function/functionalize') , slice = require('es5-ext/lib/List/slice/call') , toArray = require('es5-ext/lib/List/to-array').call , deferred = require('./deferred') , apply; apply = function (fn, scope, args, resol...
Update up to changes in es5-ext
Update up to changes in es5-ext
JavaScript
isc
medikoo/deferred
97b8f1d793341c20acf7eabb9395ee575b7bcb59
app/routes/interestgroups/components/InterestGroupList.js
app/routes/interestgroups/components/InterestGroupList.js
import styles from './InterestGroup.css'; import React from 'react'; import InterestGroup from './InterestGroup'; import Button from 'app/components/Button'; import { Link } from 'react-router'; export type Props = { interestGroups: Array }; const InterestGroupList = (props: Props) => { const groups = props.inter...
import styles from './InterestGroup.css'; import React from 'react'; import InterestGroup from './InterestGroup'; import Button from 'app/components/Button'; import { Link } from 'react-router'; import NavigationTab, { NavigationLink } from 'app/components/NavigationTab'; export type Props = { interestGroups: Array ...
Use NavigationTab in InterestGroup list
Use NavigationTab in InterestGroup list
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
64ae5257caf51aa470249561184b7b8c7a4d614c
stylefmt.js
stylefmt.js
'use strict'; var stylefmt = require('stylefmt'); var data = ''; // Get options if needed if (process.argv.length > 2) { var opts = JSON.parse(process.argv[2]); process.chdir(opts.file_path); } process.stdin.on('data', function(css) { data += css; }); process.stdin.on('end', function() { try { process.s...
'use strict'; var stylefmt = require('stylefmt'); var data = ''; // Get options if needed if (process.argv.length > 2) { var opts = JSON.parse(process.argv[2]); process.chdir(opts.file_path); } process.stdin.on('data', function(css) { data += css; }); process.stdin.on('end', function() { stylefmt.process(da...
Update for new postcss promises
Update for new postcss promises
JavaScript
isc
dmnsgn/sublime-cssfmt,dmnsgn/sublime-cssfmt,dmnsgn/sublime-stylefmt
47eb145d096e569254fcc96d1b71925cf0ff631f
src/background.js
src/background.js
'use strict'; /** * Returns a BlockingResponse object with a redirect URL if the request URL * matches a file type extension. * * @param {object} request * @return {object|undefined} the blocking response */ function requestInterceptor(request) { var url = request.url; var hasParamTs = /\?.*ts=/; var hasEx...
'use strict'; var tabSize = 2; /** * Returns a BlockingResponse object with a redirect URL if the request URL * matches a file type extension. * * @param {object} request * @return {object|undefined} the blocking response */ function requestInterceptor(request) { var url = request.url; var hasParamTs = /\?....
Use tab size from Chrome storage
Use tab size from Chrome storage
JavaScript
mit
nysa/github-tab-sizer
6653fcba245b25adc7c20bf982a3d119f2659711
.prettierrc.js
.prettierrc.js
module.exports = { printWidth: 100, tabWidth: 2, useTabs: false, semi: true, singleQuote: true, quoteProps: 'consistent', trailingComma: 'all', bracketSpacing: true, arrowParens: 'always', };
module.exports = { printWidth: 100, tabWidth: 2, useTabs: false, semi: true, singleQuote: true, quoteProps: 'consistent', trailingComma: 'all', bracketSpacing: true, arrowParens: 'always', endOfLine: 'lf', };
Set endOfLine to "lf" in prettier-config
:wrench: Set endOfLine to "lf" in prettier-config
JavaScript
apache-2.0
jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs
1b2d9602dade5c599390645bd02e9b066f4f0ef5
cla_frontend/assets-src/javascripts/app/test/protractor.conf.local.js
cla_frontend/assets-src/javascripts/app/test/protractor.conf.local.js
(function () { 'use strict'; var extend = require('extend'), defaults = require('./protractor.conf'); exports.config = extend(defaults.config, { // --- uncomment to use mac mini's --- // seleniumAddress: 'http://clas-mac-mini.local:4444/wd/hub', // baseUrl: 'http://Marcos-MacBook-Pro-2.local:80...
(function () { 'use strict'; var extend = require('extend'), defaults = require('./protractor.conf'); exports.config = extend(defaults.config, { // --- uncomment to use mac mini's --- // seleniumAddress: 'http://clas-mac-mini.local:4444/wd/hub', // baseUrl: 'http://Marcos-MacBook-Pro-2.local:80...
Remove chrome warnings during e2e tests
Remove chrome warnings during e2e tests
JavaScript
mit
ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend
276492033ce2a3048b453d75c0e361bf4ebfd5d7
tests/spec/QueueTwoStacksSpec.js
tests/spec/QueueTwoStacksSpec.js
describe("Implement queue with two stacks", function() { const Queue = new QueueTwoStacks(); Queue.enqueue(1); Queue.enqueue(2); Queue.enqueue(3); describe("enqueue()", function() { it("appends an element to tail", function() { Queue.enqueue(4); const expected = [1,2,3,4]; expect(Queue...
describe("Implement queue with two stacks", function() { const Queue = new QueueTwoStacks(); Queue.enqueue(1); Queue.enqueue(2); Queue.enqueue(3); describe("enqueue()", function() { it("appends an element to tail", function() { Queue.enqueue(4); const expected = [1,2,3,4]; expect(Queue...
Move code to correct semantics in spec
Move code to correct semantics in spec
JavaScript
mit
ThuyNT13/algorithm-practice,ThuyNT13/algorithm-practice
009e3a12d21aa5b04acd1f17616a6af2458046b1
src/projects/TicTacToe/TicTacToe.js
src/projects/TicTacToe/TicTacToe.js
import React from 'react'; import './TicTacToe.scss'; import { connect } from 'react-redux'; import ticTacToeActions from 'actions/tictactoe'; import GameBoard from './components/GameBoard'; const mapStateToProps = (state) => { return { playerTurn: state.tictactoe.playerTurn }; }; class TicTacToe...
import React from 'react'; import './TicTacToe.scss'; import { connect } from 'react-redux'; import ticTacToeActions from 'actions/tictactoe'; import GameBoard from './components/GameBoard'; const mapStateToProps = (state) => { return { playerTurn: state.tictactoe.playerTurn, winner: state.tictac...
Add console statements for initial notification
Add console statements for initial notification
JavaScript
mit
terakilobyte/terakilobyte.github.io,terakilobyte/terakilobyte.github.io
520a7ecf81d37df70aefe39efe2e9e1092f25a52
tests/unit/models/canvas-test.js
tests/unit/models/canvas-test.js
import { moduleForModel, test } from 'ember-qunit'; moduleForModel('canvas', 'Unit | Model | canvas', { // Specify the other units that are required for this test. needs: 'model:op model:pulseEvent model:team model:user'.w() }); test('it exists', function(assert) { const model = this.subject(); assert.ok(Bool...
import { moduleForModel, test } from 'ember-qunit'; moduleForModel('canvas', 'Unit | Model | canvas', { // Specify the other units that are required for this test. needs: 'model:comment model:op model:pulseEvent model:team model:user'.w() }); test('it exists', function(assert) { const model = this.subject(); ...
Add missing model dependency for canvas model test
Add missing model dependency for canvas model test
JavaScript
apache-2.0
usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2
7d8ef029b25f4869bf046e6e28fc4bd801614944
src/atom/index.js
src/atom/index.js
class Atom { constructor(state) { this.state = state; this.watches = {}; } reset(state) { return this._change(state); } swap(f, ...args) { return this._change(f(this.state, ...args)); } deref() { return this.state; } addWatch(k, f) { // if (this.watches[key]) { // con...
class Atom { constructor(state) { this.state = state; this.watches = {}; } reset(state) { return this._change(state); } swap(f, ...args) { return this._change(f(this.state, ...args)); } deref() { return this.state; } addWatch(k, f) { // if (this.watches[key]) { // con...
Update atom state before calling watches
Update atom state before calling watches
JavaScript
mit
mike-casas/lock,mike-casas/lock,auth0/lock-passwordless,mike-casas/lock,auth0/lock-passwordless,auth0/lock-passwordless
fc4428b965c58dda423f8bd100ccbb0760d44893
spec/case-sensitive/program.js
spec/case-sensitive/program.js
var test = require("test"); require("a"); try { require("A"); test.assert(false, "should fail to require alternate spelling"); } catch (error) { } test.print("DONE", "info");
var test = require("test"); try { require("a"); require("A"); test.assert(false, "should fail to require alternate spelling"); } catch (error) { } test.print("DONE", "info");
Update case sensitivity test to capture errors on first require
Update case sensitivity test to capture errors on first require as this throws on case sensitive systems.
JavaScript
bsd-3-clause
kriskowal/mr,kriskowal/mr
ec343008e4db8688acfb383a3b254a86ecfeac29
shared/reducers/favorite.js
shared/reducers/favorite.js
/* @flow */ import * as Constants from '../constants/favorite' import {logoutDone} from '../constants/login' import type {FavoriteAction} from '../constants/favorite' import type {Folder} from '../constants/types/flow-types' type State = { folders: ?Array<Folder> } const initialState = { folders: null } export ...
/* @flow */ import * as Constants from '../constants/favorite' import {logoutDone} from '../constants/login' import type {FavoriteAction} from '../constants/favorite' import type {Folder} from '../constants/types/flow-types' type State = { folders: ?Array<Folder> } const initialState = { folders: null } export ...
Use initial state instead of setting folder manually
Use initial state instead of setting folder manually
JavaScript
bsd-3-clause
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
42be88e329535f7777e0c33da7194d21bf81c6b4
gulp/tasks/html.js
gulp/tasks/html.js
var gulp = require ('gulp'); gulp.task ( 'html', ['css'], function() { gulp.src('src/main/resources/html/**') .pipe ( gulp.dest( './build/') ); gulp.src('src/test/resources/**') .pipe ( gulp.dest('./build/data/')); gulp.src(['node_modules/dat-gui/vendor/dat*.js']) .pipe ( gulp.dest('./build/js/')); /...
var gulp = require ('gulp'); gulp.task ( 'html', ['css'], function() { gulp.src('src/main/resources/html/**') .pipe ( gulp.dest( './build/') ); gulp.src('src/main/resources/js/**') .pipe ( gulp.dest( './build/js/') ); gulp.src('src/main/resources/images/**') .pipe ( gulp.dest( './build/images/') ); g...
Include JS and XTK in build
Include JS and XTK in build
JavaScript
bsd-3-clause
dblezek/webapp-skeleton,dblezek/webapp-skeleton
06a9a7400aedc0985657874c3aba35af6ab6b1fb
app/components/Settings/components/colors-panel.js
app/components/Settings/components/colors-panel.js
import React from 'react'; import PropTypes from 'prop-types'; import { Switch } from '@blueprintjs/core'; import { Themes } from '../../../containers/enums'; const ColorsPanel = ({ theme, setTheme }) => <div className="mt-1"> <h3 className="mb-3">Themes</h3> <Switch label="Dark Theme" checked={t...
import React from 'react'; import PropTypes from 'prop-types'; import { RadioGroup, Radio } from '@blueprintjs/core'; import { Themes } from '../../../containers/enums'; const ColorsPanel = ({ theme, setTheme }) => <div className="mt-1"> <RadioGroup label="Themes" selectedValue={theme} onChange...
Select themes as radio buttons
enhancement: Select themes as radio buttons
JavaScript
mit
builtwithluv/ZenFocus,builtwithluv/ZenFocus
d286a3d9d171b77651e6c81fad3970baa5584fdc
src/javascript/binary/common_functions/check_new_release.js
src/javascript/binary/common_functions/check_new_release.js
const url_for_static = require('../base/url').url_for_static; const moment = require('moment'); const check_new_release = function() { // calling this method is handled by GTM tags const last_reload = localStorage.getItem('new_release_reload_time'); // prevent reload in less than 10 minutes if (las...
const url_for_static = require('../base/url').url_for_static; const moment = require('moment'); const check_new_release = function() { // calling this method is handled by GTM tags const last_reload = localStorage.getItem('new_release_reload_time'); // prevent reload in less than 10 minutes if (las...
Check for new release in 10 minutes intervals
Check for new release in 10 minutes intervals
JavaScript
apache-2.0
binary-com/binary-static,negar-binary/binary-static,4p00rv/binary-static,ashkanx/binary-static,raunakkathuria/binary-static,raunakkathuria/binary-static,binary-static-deployed/binary-static,binary-static-deployed/binary-static,raunakkathuria/binary-static,binary-com/binary-static,kellybinary/binary-static,ashkanx/binar...
45731fa369103e32b6b02d6ed5e99997def24e08
app/client/components/Sidebar/Sidebar.js
app/client/components/Sidebar/Sidebar.js
// @flow import React, { Component } from 'react' import { Link } from 'react-router' import s from './Sidebar.scss' export default class Sidebar extends Component { constructor (props) { super(props) this.state = { links: [ { text: 'Dashboard', to: '/admin/dashboard' }, { text: 'Entr...
// @flow import React, { Component } from 'react' import { Link } from 'react-router' import s from './Sidebar.scss' export default class Sidebar extends Component { constructor (props) { super(props) this.state = { links: [ { text: 'Dashboard', to: '/admin/dashboard' }, { text: 'Entr...
Add key to sidebar links
Add key to sidebar links
JavaScript
mit
jmdesiderio/swan-cms,jmdesiderio/swan-cms
11c4c935d9bb1ab5967a8eba97cd73d6ee9df684
packages/internal-test-helpers/lib/ember-dev/setup-qunit.js
packages/internal-test-helpers/lib/ember-dev/setup-qunit.js
/* globals QUnit */ export default function setupQUnit(assertion, _qunitGlobal) { var qunitGlobal = QUnit; if (_qunitGlobal) { qunitGlobal = _qunitGlobal; } var originalModule = qunitGlobal.module; qunitGlobal.module = function(name, _options) { var options = _options || {}; var originalSetup ...
/* globals QUnit */ export default function setupQUnit(assertion, _qunitGlobal) { var qunitGlobal = QUnit; if (_qunitGlobal) { qunitGlobal = _qunitGlobal; } var originalModule = qunitGlobal.module; qunitGlobal.module = function(name, _options) { var options = _options || {}; var originalSetup ...
Add support for beforeEach / afterEach to ember-dev assertions.
Add support for beforeEach / afterEach to ember-dev assertions.
JavaScript
mit
kellyselden/ember.js,fpauser/ember.js,thoov/ember.js,kanongil/ember.js,Gaurav0/ember.js,mixonic/ember.js,csantero/ember.js,Gaurav0/ember.js,Turbo87/ember.js,kennethdavidbuck/ember.js,gfvcastro/ember.js,sandstrom/ember.js,csantero/ember.js,xiujunma/ember.js,asakusuma/ember.js,qaiken/ember.js,jasonmit/ember.js,givanse/em...
7dbdff31b9c97fb7eed2420e1e46508dee1797a2
ember-cli-build.js
ember-cli-build.js
/* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function (defaults) { var app = new EmberAddon(defaults, { 'ember-cli-babel': { includePolyfill: true }, 'ember-cli-qunit': { useLintTree: false // we use standard instead } });...
/* global require, module */ var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); const cdnUrl = process.env.CDN_URL || '/'; module.exports = function (defaults) { var app = new EmberAddon(defaults, { 'ember-cli-babel': { includePolyfill: true }, 'ember-cli-qunit': { useLintTree: ...
Add fingerprinting for troubleshooter deployed app
Add fingerprinting for troubleshooter deployed app
JavaScript
mit
MyPureCloud/ember-webrtc-troubleshoot,MyPureCloud/ember-webrtc-troubleshoot,MyPureCloud/ember-webrtc-troubleshoot
294aafacd298a013881f92f7a866a8b07f5a25f5
examples/simple.js
examples/simple.js
"use strict"; const Rectangle = require('../lib/Rectangle'); const cursor = require('kittik-cursor').create().resetTTY(); Rectangle.create({text: 'Text here!', x: 'center', width: 20, background: 'green', foreground: 'black'}).render(cursor); Rectangle.create({x: 'center', y: 'middle', width: '50%', height: '20%', ba...
"use strict"; const Rectangle = require('../lib/Rectangle'); const cursor = require('kittik-cursor').create().resetTTY(); Rectangle.create({ text: 'Text here!', x: 'center', y: 2, width: 40, background: 'green', foreground: 'black' }).render(cursor); Rectangle.create({ text: 'Text here', x: 'center',...
Update shape-basic to the latest version
fix(shape): Update shape-basic to the latest version
JavaScript
mit
kittikjs/shape-rectangle
68943423f789993e2ca91cd5f76e94d524a127c8
addon/authenticators/token.js
addon/authenticators/token.js
import Ember from 'ember'; import Base from 'ember-simple-auth/authenticators/base'; import Configuration from '../configuration'; const { get, isEmpty, inject: { service }, RSVP: { resolve, reject } } = Ember; export default Base.extend({ ajax: service(), init() { this._super(...arguments); this.serverT...
import Ember from 'ember'; import Base from 'ember-simple-auth/authenticators/base'; import Configuration from '../configuration'; const { get, isEmpty, inject: { service }, RSVP: { resolve, reject } } = Ember; export default Base.extend({ ajax: service(), init() { this._super(...arguments); this.serverT...
Add JSON content type to authenticate headers
Add JSON content type to authenticate headers
JavaScript
mit
datajohnny/ember-simple-token,datajohnny/ember-simple-token
836cf5d5caf8a0cde92a6e018f3ea28aa77eb42e
app/javascript/application.js
app/javascript/application.js
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails import "@hotwired/turbo-rails" import './controllers'
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails import "@hotwired/turbo-rails" import 'controllers'
Fix importmap loading on production
Fix importmap loading on production
JavaScript
mit
dncrht/mical,dncrht/mical,dncrht/mical,dncrht/mical
99fe3b420e9bc14a2d01fd0f3c61bb94ce970a2c
hooks/src/index.js
hooks/src/index.js
import { options } from 'preact'; let currentIndex; let component; options.beforeRender = function (vnode) { component = vnode._component; currentIndex = 0; } const createHook = (create) => (...args) => { if (component == null) return; const list = component.__hooks || (component.__hooks = []); let index = cur...
import { options } from 'preact'; let currentIndex; let component; let oldBeforeRender = options.beforeRender; options.beforeRender = vnode => { component = vnode._component; currentIndex = 0; if (oldBeforeRender) oldBeforeRender(vnode) } const createHook = (create) => (...args) => { if (component == null) retur...
Call any previous beforeRender() once we're done with ours
Call any previous beforeRender() once we're done with ours
JavaScript
mit
developit/preact,developit/preact
79788a69daa951d85f4600926c464d6fbff9fe5b
assets/javascripts/global.js
assets/javascripts/global.js
$(function () { $('input[type="file"]').on('change', function (e) { if ($(this).val()) { $('input[type="submit"]').prop('disabled', false); } else { $('input[type="submit"]').prop('disabled', true); } }); $('input[name="format"]').on('change', function (e) { var action = $('form')....
$(function () { $('input[type="file"]').on('change', function (e) { if ($(this).val()) { $('input[type="submit"]').prop('disabled', false); } else { $('input[type="submit"]').prop('disabled', true); } }); $('input[name="format"]:checked').on('change', function (e) { var action = $(...
Fix ARCSPC-45: Handle radio button form action setting correctly
Fix ARCSPC-45: Handle radio button form action setting correctly
JavaScript
apache-2.0
harvard-library/archivesspace-checker,harvard-library/archivesspace-checker
30dd01f64e5e7dc98a517c8ff2353ab2cdde0583
lib/assets/javascripts/cartodb3/components/form-components/editors/node-dataset/node-dataset-item-view.js
lib/assets/javascripts/cartodb3/components/form-components/editors/node-dataset/node-dataset-item-view.js
var CustomListItemView = require('cartodb3/components/custom-list/custom-list-item-view'); var _ = require('underscore'); module.exports = CustomListItemView.extend({ render: function () { this.$el.empty(); this.clearSubViews(); this.$el.append( this.options.template( _.extend( ...
var CustomListItemView = require('cartodb3/components/custom-list/custom-list-item-view'); var _ = require('underscore'); module.exports = CustomListItemView.extend({ render: function () { this.$el.empty(); this.clearSubViews(); this.$el.append( this.options.template( _.extend( ...
Add isSourceType to base template object
Add isSourceType to base template object
JavaScript
bsd-3-clause
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
36a53309e022f1ad6351756568bcc4d9e0df6940
app/src/common/base-styles.js
app/src/common/base-styles.js
export default function() { return ` html { height: 100%; overflow-y: scroll; } body { font-family: 'Lato', sans-serif; font-size: 14px; color: #000; background: #f6f6f6; } `; }
export default function() { return ` *, *:before, *:after { box-sizing: inherit; } html { height: 100%; overflow-y: scroll; box-sizing: border-box; } body { font-family: 'Lato', sans-serif; font-size: 14px; color: #000; background: #f6f6f6; } `; }
Use 'border-box' as default box sizing
:lipstick: Use 'border-box' as default box sizing
JavaScript
mit
vvasilev-/weatheros,vvasilev-/weatheros
b3b18edfa2e964fe76125eb53189d92c48b867d1
src/is-defined.js
src/is-defined.js
define([ ], function () { /** * @exports is-defined * * Helper which checks whether a variable is defined or not. * * @param {*} check The variable to check that is defined * @param {String} type The type your expecting the variable to be defined as. * * @retu...
define([ ], function () { /** * @exports is-defined * * Helper which checks whether a variable is defined or not. * * @param {*} check The variable to check that is defined * @param {String} type The type your expecting the variable to be defined as. * * @retu...
Fix bug in IE8 undefined returns as object
Fix bug in IE8 undefined returns as object
JavaScript
mit
rockabox/Auxilium.js
7f3804a1da20276ad309fa6554cca329f296ff64
app/assets/javascripts/districts/controllers/sister_modal_controller.js
app/assets/javascripts/districts/controllers/sister_modal_controller.js
VtTracker.SisterModalController = Ember.ObjectController.extend({ needs: ['districtSistersIndex', 'application'], districts: Ember.computed.alias('controllers.application.model'), modalTitle: function() { if (this.get('isNew')) { return 'New Sister'; } else { return 'Edit Sister'; } }....
VtTracker.SisterModalController = Ember.ObjectController.extend({ needs: ['districtSistersIndex', 'application'], districts: Ember.computed.alias('controllers.application.model'), modalTitle: function() { if (this.get('isNew')) { return 'New Sister'; } else { return 'Edit Sister'; } }....
Rollback model when modal is closed
Rollback model when modal is closed
JavaScript
mit
bfcoder/vt-ht-tracker,bfcoder/vt-ht-tracker,bfcoder/vt-ht-tracker
eb0f5fd8a337ace145c40e9b624738619542033a
Rightmove_Enhancement_Suite.user.js
Rightmove_Enhancement_Suite.user.js
// ==UserScript== // @name Rightmove Enhancement Suite // @namespace https://github.com/chigley/ // @description Keyboard shortcuts // @include http://www.rightmove.co.uk/* // @version 1 // @grant GM_addStyle // @grant GM_getResourceText // @resource style style.css // ==/UserScript== v...
// ==UserScript== // @name Rightmove Enhancement Suite // @namespace https://github.com/chigley/ // @description Keyboard shortcuts // @include http://www.rightmove.co.uk/* // @version 1 // @grant GM_addStyle // @grant GM_getResourceText // @resource style style.css // ==/UserScript== v...
Select next item with j key
Select next item with j key
JavaScript
mit
chigley/rightmove-enhancement-suite
f13ecda8d2a69f455b175d013a2609197f495bb0
src/components/outline/Link.js
src/components/outline/Link.js
// @flow import styled, { css } from 'styled-components' import * as vars from 'settings/styles' import * as colors from 'settings/colors' type Props = { depth: '1' | '2' | '3' | '4' | '5' | '6', } const fn = ({ depth: depthStr }: Props) => { const depth = parseInt(depthStr) return css` padding-left: ${(2...
// @flow import styled, { css } from 'styled-components' import * as vars from 'settings/styles' import * as colors from 'settings/colors' type Props = { depth: '1' | '2' | '3' | '4' | '5' | '6', } const fn = ({ depth: depthStr }: Props) => { const depth = parseInt(depthStr) return css` padding-left: ${(2...
Disable pointer-events of outline items
Disable pointer-events of outline items
JavaScript
mit
izumin5210/OHP,izumin5210/OHP
248b0e54a3bda3271f5735dedf61eda8395d882d
src/helpers/find-root.js
src/helpers/find-root.js
'use babel' /* @flow */ import Path from 'path' import {findCached} from './common' import {CONFIG_FILE_NAME} from '../defaults' export async function findRoot(directory: string): Promise<string> { const configFile = await findCached(directory, CONFIG_FILE_NAME) if (configFile) { return Path.dirname(configFi...
'use babel' /* @flow */ import Path from 'path' import {findCached} from './common' import {CONFIG_FILE_NAME} from '../defaults' export async function findRoot(directory: string): Promise<string> { const configFile = await findCached(directory, CONFIG_FILE_NAME) if (configFile) { return Path.dirname(configFi...
Throw error if no config is found
:no_entry: Throw error if no config is found
JavaScript
mit
steelbrain/UCompiler
e78af7ead579d2c91f461734d2bdff5910cf3a5c
server.js
server.js
// Load required modules var http = require('http'), // http server core module port = 8080, timeNow = new Date().toLocaleString('en-US', {hour12: false, timeZone: 'Europe/Kiev'}), express = require('express'), // web framework external module fs = require('fs'), httpApp = expres...
// Load required modules var http = require('http'), // http server core module port = 8080, timeNow = new Date().toLocaleString('en-US', {hour12: false, timeZone: 'Europe/Kiev'}), express = require('express'), // web framework external module fs = require('fs'), httpApp = expres...
Set reroute to index.html for /search/*, /profile/*, /repo/*
Set reroute to index.html for /search/*, /profile/*, /repo/*
JavaScript
mit
SteveBidenko/github-angular,SteveBidenko/github-angular,SteveBidenko/github-angular
cfa1a5e3a4f3e988d3c844c84874a8dabd852822
src/engines/json/validation.js
src/engines/json/validation.js
/** * Validation * * @constructor * @param {object} options */ var Validation = function(options) { // Save a reference to the ‘this’ var self = this; var defaultOptions = { singleError: true, errorMessages: errorMessages, cache: false }; each(defaultOptions, function(key, value) { if...
/** * Validation * * @constructor * @param {object} options */ var Validation = function(options) { // Save a reference to the ‘this’ var self = this; var defaultOptions = { singleError: true, errorMessages: errorMessages, cache: false }; each(defaultOptions, function(key, value) { if...
Initialize the ‘ValidationError’ class as a subclass of the ‘Validation’ class
Initialize the ‘ValidationError’ class as a subclass of the ‘Validation’ class
JavaScript
mit
apiaryio/Amanda,Baggz/Amanda,apiaryio/Amanda
5d309087a7e4cd2931a1c8e29096f9eadb5de188
src/lb.js
src/lb.js
/* * Namespace: lb * Root of Legal Box Scalable JavaScript Application * * Authors: * o Eric Bréchemier <legalbox@eric.brechemier.name> * o Marc Delhommeau <marc.delhommeau@legalbox.com> * * Copyright: * Legal-Box SAS (c) 2010-2011, All Rights Reserved * * License: * BSD License * http://creativecommon...
/* * Namespace: lb * Root of Legal Box Scalable JavaScript Application * * Authors: * o Eric Bréchemier <legalbox@eric.brechemier.name> * o Marc Delhommeau <marc.delhommeau@legalbox.com> * * Copyright: * Legal-Box SAS (c) 2010-2011, All Rights Reserved * * License: * BSD License * http://creativecommon...
Declare undefined as parameter to make sure it is actually undefined
Declare undefined as parameter to make sure it is actually undefined Since undefined is a property of the global object, its value may be replaced, e.g. due to programming mistakes: if (undefined = myobject){ // programming mistake which assigns undefined // ... }
JavaScript
bsd-3-clause
eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp
a8d2e74163cf71bb811150143089f83aca2c55a0
src/lightbox/LightboxFooter.js
src/lightbox/LightboxFooter.js
/* @flow */ import React, { PureComponent } from 'react'; import { Text, StyleSheet, View } from 'react-native'; import type { Style } from '../types'; import NavButton from '../nav/NavButton'; const styles = StyleSheet.create({ wrapper: { height: 44, flexDirection: 'row', justifyContent: 'space-between...
/* @flow */ import React, { PureComponent } from 'react'; import { Text, StyleSheet, View } from 'react-native'; import type { Style } from '../types'; import Icon from '../common/Icons'; const styles = StyleSheet.create({ wrapper: { height: 44, flexDirection: 'row', justifyContent: 'space-between', ...
Align option icon in Lightbox screen
layout: Align option icon in Lightbox screen Icon was not properly aligned due to overlay of unreadCount. As there is no need of unreadCount here, Instead of using NavButton, use Icon component directly. Fixes #3003.
JavaScript
apache-2.0
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile