commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
96e5f4266391ae5487414e0e8814a95af0100c34
lib/evaluator.js
lib/evaluator.js
'use strict'; var evalInScope = require('./helpers/eval-in-scope'); /*eslint-disable*/ function evalBEST(source, builder) { evalInScope(source, { component: builder }); } function evalSources(sources, proc, cb) { var sourcesLength = sources.length; var sourcesLoaded = 0; if (sourcesLength === source...
'use strict'; var evalInScope = require('./helpers/eval-in-scope'); var HelperFunctions = require('./helper-functions'); var ObjUtils = require('framework-utilities/object'); /*eslint-disable*/ function evalBEST(source, builder) { var bestNamespace = ObjUtils.merge(HelperFunctions, { component: builder }); e...
Attach helpers to instead of
Attach helpers to instead of
JavaScript
mit
jeremykenedy/framework,colllin/famous-framework,infamous/famous-framework,infamous/framework,jeremykenedy/framework,colllin/famous-framework,Famous/framework,KraigWalker/framework,SvitlanaShepitsena/remax-banner,SvitlanaShepitsena/framework-1,infamous/framework,woltemade/framework,infamous/famous-framework,tbossert/fra...
--- +++ @@ -1,11 +1,14 @@ 'use strict'; var evalInScope = require('./helpers/eval-in-scope'); +var HelperFunctions = require('./helper-functions'); +var ObjUtils = require('framework-utilities/object'); /*eslint-disable*/ function evalBEST(source, builder) { - evalInScope(source, { component: builder });...
3cdfcdaaedd63d2c7c388a3de6b29fa9c95322c4
addon/components/sl-tooltip.js
addon/components/sl-tooltip.js
import Ember from 'ember'; import TooltipEnabled from '../mixins/sl-tooltip-enabled'; /** * @module components * @class sl-tooltip */ export default Ember.Component.extend( TooltipEnabled, { // ------------------------------------------------------------------------- // Dependencies // --------------...
import Ember from 'ember'; import TooltipEnabled from '../mixins/sl-tooltip-enabled'; /** * @module components * @class sl-tooltip */ export default Ember.Component.extend( TooltipEnabled, { // ------------------------------------------------------------------------- // Dependencies // --------------...
Refactor to follow style guidelines
Refactor to follow style guidelines
JavaScript
mit
erangeles/sl-ember-components,theoshu/sl-ember-components,alxyuu/sl-ember-components,softlayer/sl-ember-components,alxyuu/sl-ember-components,Suven/sl-ember-components,theoshu/sl-ember-components,erangeles/sl-ember-components,Suven/sl-ember-components,azizpunjani/sl-ember-components,softlayer/sl-ember-components,azizpu...
--- +++ @@ -16,7 +16,7 @@ /** * The tag type of the root element * - * @property {string} tagName + * @property {Ember.String} tagName * @default "span" */ tagName: 'span'
84aa293b304a55458c556d4406e24cba458ace0a
injected.js
injected.js
// Entire frame is insecure? if ((document.location.protocol == "http:") || (document.location.protocol == "ftp:")) { document.body.style.backgroundColor="#E04343"; } var lnks = document.getElementsByTagName("a"); var arrUnsecure = []; for(var i = 0; i < lnks.length; i++) { var thisLink = ...
// Entire frame is insecure? if ((document.location.protocol == "http:") || (document.location.protocol == "ftp:")) { document.body.style.backgroundColor="#E04343"; } var lnks = document.querySelectorAll("a[href]"); var arrUnsecure = []; for (var i = 0; i < lnks.length; i++) { var thisLink = lnks[i]; var ...
Use QuerySelectorAll to find links
Use QuerySelectorAll to find links Faster, and avoid <A> that lack hrefs.
JavaScript
mit
ericlaw1979/moartls,Lloth/moartls,ericlaw1979/moartls,Lloth/moartls
--- +++ @@ -5,21 +5,21 @@ document.body.style.backgroundColor="#E04343"; } - var lnks = document.getElementsByTagName("a"); - var arrUnsecure = []; - for(var i = 0; i < lnks.length; i++) { - var thisLink = lnks[i]; - var sProtocol = thisLink.protocol.toLowerCase(); - if ((sProtoc...
8bc4f4d164c6eb5caa96698ddcbfce30743c3a30
website/gulpfile.js
website/gulpfile.js
var gulp = require("gulp"); var usemin = require("gulp-usemin"); var ngmin = require("gulp-ngmin"); var uglify = require("gulp-uglify"); var minifyHtml = require("gulp-minify-html"); var minifyCss = require("gulp-minify-css"); var rev = require("gulp-rev"); gulp.task('partials', function() { var stream = gulp.src(...
var gulp = require("gulp"); var usemin = require("gulp-usemin"); var ngmin = require("gulp-ngmin"); var uglify = require("gulp-uglify"); var minifyHtml = require("gulp-minify-html"); var minifyCss = require("gulp-minify-css"); var rev = require("gulp-rev"); var clean = require("gulp-clean"); var gulpSequence = require(...
Update gulp file to build a clean version of prod. Sequence the tasks and update them to include needed assets.
Update gulp file to build a clean version of prod. Sequence the tasks and update them to include needed assets.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -5,21 +5,40 @@ var minifyHtml = require("gulp-minify-html"); var minifyCss = require("gulp-minify-css"); var rev = require("gulp-rev"); +var clean = require("gulp-clean"); +var gulpSequence = require("gulp-sequence"); +// Brings over the angular html partials. gulp.task('partials', function() { ...
4a6e5be03eec92df7a19e56fb3f97035fa516734
spec/lib/services/lookup-spec.js
spec/lib/services/lookup-spec.js
// Copyright 2014, Renasar Technologies Inc. /* jshint node:true */ 'use strict'; describe(__filename, function () { it('needs specs'); });
// Copyright 2014, Renasar Technologies Inc. /* jshint node:true */ 'use strict'; describe("Lookup Service", function() { var injector; var lookupService; var dhcpProtocol; var dhcpSubcription; beforeEach(function() { injector = helper.baseInjector.createChild(_.flatten([ help...
Add lookup service tests for ip to mac
Add lookup service tests for ip to mac
JavaScript
apache-2.0
YoussB/on-core,YoussB/on-core
--- +++ @@ -3,6 +3,77 @@ 'use strict'; -describe(__filename, function () { - it('needs specs'); +describe("Lookup Service", function() { + var injector; + var lookupService; + var dhcpProtocol; + var dhcpSubcription; + + beforeEach(function() { + injector = helper.baseInjector.createChil...
392d4e2c4a4abbcf4aa05ad2554b163a821f7d9a
js/agent.js
js/agent.js
(function() { // wait for polyfill to be loaded if (document.readyState == "complete") { init(); } else { window.onload = init; } var loggedIn = false; function init() { if (!navigator.id) return; sendToContent({ type: "init" }); window.addEventListener('browserid-exec', onMessa...
(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...
Use addEventListener instead of onload
Use addEventListener instead of onload
JavaScript
mit
sickill/chrome-browserid
--- +++ @@ -3,7 +3,7 @@ if (document.readyState == "complete") { init(); } else { - window.onload = init; + window.addEventListener('load', init); } var loggedIn = false;
d09838f37b7fbf7fc31fb662353a98233157ffd7
js/index.js
js/index.js
(function( $ ) { function setHeaderHeight() { $( '#screen-fill' ).css( 'height', $( window ).height() - 50 ); } $( document ).ready( setHeaderHeight ); $( window ).resize( setHeaderHeight ); $( window ).scroll( function() { var currentY = window.scrollY; $( '.fading' ).each( function(i, el) { var elemY =...
(function( $ ) { function setHeaderHeight() { $( '#screen-fill' ).css( 'height', $( window ).height() - 50 ); } $( document ).ready( setHeaderHeight ); $( window ).resize( setHeaderHeight ); $( window ).scroll( function() { var currentY = window.scrollY; $( '.fading' ).each( function(i, el) { var elemY ...
Reduce precision for fade out
Reduce precision for fade out
JavaScript
mit
Automattic/socket.io-website,davidcelis/socket.io-website,davidcelis/socket.io-website,Automattic/socket.io-website,Automattic/socket.io-website
--- +++ @@ -5,6 +5,7 @@ $( document ).ready( setHeaderHeight ); $( window ).resize( setHeaderHeight ); + $( window ).scroll( function() { var currentY = window.scrollY; $( '.fading' ).each( function(i, el) { @@ -13,7 +14,8 @@ if ( currentY <= 0 ) { $( el ).css( 'opacity', 1 ); } else if ( o...
1455be74c9839c3da35a54793babbe84140e2250
src/game/TutorialState.js
src/game/TutorialState.js
import Phaser from 'phaser-ce'; import { tissueColor, bacteriaColor } from './constants'; export default class TutorialState extends Phaser.State { bacteria = null; preload() { this.game.load.image('bacteria', 'assets/sprites/bacteria.png'); } create() { console.log(this); t...
import Phaser from 'phaser-ce'; import { tissueColor, bacteriaColor } from './constants'; export default class TutorialState extends Phaser.State { bacteria = null; tissue = { bacteria: null, macrophage: null, neutrophil: null }; boneMarrow = { macrophage: null, ...
Add tissue and boneMarrow objects to tutorial state
Add tissue and boneMarrow objects to tutorial state
JavaScript
mit
marc1404/WreckSam,marc1404/WreckSam
--- +++ @@ -5,8 +5,22 @@ bacteria = null; + tissue = { + bacteria: null, + macrophage: null, + neutrophil: null + }; + + boneMarrow = { + macrophage: null, + neutrophil: null + }; + preload() { this.game.load.image('bacteria', 'assets/sprites/bacte...
6fcdedcfce8460b174bb7b3c44282998cb867c7c
lib/consolify.js
lib/consolify.js
'use strict'; var fs = require('fs'); var through = require('through2'); var consolify = require('consolify'); module.exports = function (b, opts) { consolify(b, { bundle: opts.bundle }); function apply() { var file = ''; b.pipeline.get('wrap').push(through(function (chunk, enc, next) { ...
/* * mochify.js * * Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de> * * @license MIT */ 'use strict'; var fs = require('fs'); var through = require('through2'); var consolify = require('consolify'); module.exports = function (b, opts) { consolify(b, { bundle: opts.bundle }); functi...
Add missing copyright and license header
Add missing copyright and license header
JavaScript
mit
mantoni/mochify.js,boneskull/mochify.js,jhytonen/mochify.js,jhytonen/mochify.js,Swaagie/mochify.js,mantoni/mochify.js,boneskull/mochify.js,mantoni/mochify.js,Swaagie/mochify.js
--- +++ @@ -1,3 +1,10 @@ +/* + * mochify.js + * + * Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de> + * + * @license MIT + */ 'use strict'; var fs = require('fs');
113c43942cca2535079e6041d4b625676b8b2a66
lib/markybars.js
lib/markybars.js
module.exports.compile = compile var hb = require('handlebars') var marky = require('marky-markdown') var fs = require('fs') function compile (page, partials) { var markybars = hb.create() var pageContent = fs.readFileSync(page, 'utf8') Object.keys(partials).forEach(function (p) { var partialContent = fs.r...
module.exports.compile = compile var hb = require('handlebars') var marky = require('marky-markdown') var fs = require('fs') function compile (page, partials) { var markybars = hb.create() var pageContent = fs.readFileSync(page, 'utf8') Object.keys(partials).forEach(function (p) { var partialContent = fs.r...
Fix for new version of marky-markdown
Fix for new version of marky-markdown
JavaScript
isc
feross/standard-www,feross/standard-www
--- +++ @@ -14,7 +14,7 @@ }) markybars.registerHelper('markdown', function (data) { - return new hb.SafeString(marky(data).html()) + return new hb.SafeString(marky(data)) }) return markybars.compile(pageContent)
7bdd7b1475ce5bf53711f688fe027f555a60f129
Utilities/ExampleRunner/template-config.js
Utilities/ExampleRunner/template-config.js
module.exports = function buildConfig(name, relPath, destPath, root) { return ` var loaders = require('../config/webpack.loaders.js'); var HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { plugins: [ new HtmlWebpackPlugin({ inject: 'body', }), ], entry: '${relPath}', output...
module.exports = function buildConfig(name, relPath, destPath, root) { return ` var loaders = require('../config/webpack.loaders.js'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var webpack = require('webpack'); module.exports = { plugins: [ new HtmlWebpackPlugin({ inject: 'body', }), ...
Fix example runner to support __BASE_PATH__ and serve the full vtk-js repo
fix(ExampleBuilder): Fix example runner to support __BASE_PATH__ and serve the full vtk-js repo
JavaScript
bsd-3-clause
Kitware/vtk-js,Kitware/vtk-js,Kitware/vtk-js,Kitware/vtk-js
--- +++ @@ -2,11 +2,15 @@ return ` var loaders = require('../config/webpack.loaders.js'); var HtmlWebpackPlugin = require('html-webpack-plugin'); +var webpack = require('webpack'); module.exports = { plugins: [ new HtmlWebpackPlugin({ inject: 'body', + }), + new webpack.DefinePlugin({ + ...
33bcb755e5b68e97f65cd63664a82219c2297015
diaeresis.js
diaeresis.js
/* Diaeresis.js | Copyright (C) 2016 Curiositry (http://curiositry.com) | MIT Licensed */
/* Diaeresis.js | Copyright (C) 2016 Curiositry (http://curiositry.com) | MIT Licensed */ (function(){ })();
Add self-executing anonymous function to put it all in.
:construction: Add self-executing anonymous function to put it all in.
JavaScript
mit
curiositry/diaeresis,curiositry/diaeresis
--- +++ @@ -1 +1,4 @@ /* Diaeresis.js | Copyright (C) 2016 Curiositry (http://curiositry.com) | MIT Licensed */ +(function(){ + +})();
7bebf6268b47c2520daa41327ddd268f133404d0
examples/all.js
examples/all.js
import React from 'react'; import ReactDOM from 'react-dom'; import DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib'; import allContentState from './utils/allContentState'; const mount = document.querySelector('[data-mount-all]'); const onSave = contentState => { sessionStorage.setItem('all:contentSta...
import React from 'react'; import ReactDOM from 'react-dom'; import DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib'; import allContentState from './utils/allContentState'; const mount = document.querySelector('[data-mount-all]'); const onSave = contentState => { sessionStorage.setItem('all:contentSta...
Stop showing atomic block in "All" example
Stop showing atomic block in "All" example
JavaScript
mit
springload/draftail,springload/draftail,springload/draftail,springload/draftail
--- +++ @@ -11,13 +11,15 @@ sessionStorage.setItem('all:contentState', JSON.stringify(contentState)); }; -const allBlockTypes = Object.keys(BLOCK_TYPE).map(type => ({ - label: `${type.charAt(0).toUpperCase()}${type - .slice(1) - .toLowerCase() - .replace(/_/g, ' ')}`, - type: BLOCK_...
44a2826d08a44f0494e86469cd6632e7f9ff071f
app/controllers/sell/successTransaction.js
app/controllers/sell/successTransaction.js
////////////////////////////////////// // User buys one ticket for himself // ////////////////////////////////////// 'use strict'; var Promise = require('bluebird'); module.exports = function (db, config) { var logger = require('../../lib/log')(config); var rest = require('../../lib/rest'...
////////////////////////////////////// // User buys one ticket for himself // ////////////////////////////////////// 'use strict'; var Promise = require('bluebird'); module.exports = function (db, config) { var logger = require('../../lib/log')(config); var rest = require('../../lib/rest'...
Use token and not data
Use token and not data
JavaScript
mit
buckutt/BuckUTT-pay,buckutt/BuckUTT-pay,buckutt/BuckUTT-pay
--- +++ @@ -12,7 +12,7 @@ return function (req, res, next) { db.Token.find({ - sherlocksToken: req.body.data + sherlocksToken: req.body.token }).then(function (token) { return new Promise(function (resolve, reject) { if (!token) { @@ -27,6 +...
bcc70e0d4ed383c3731a65db4fbd5ae67d95c845
Resources/Private/Javascripts/Main.js
Resources/Private/Javascripts/Main.js
/** * RequireJS configuration * @description Pass in options for RequireJS like paths, shims or the baseUrl */ require.config({ paths: { "mainModule" : "Modules/Main" }, // Append a date on each requested script to prevent caching issues. urlArgs: "bust=" + Date.now() }); /** * RequireJS calls * @descript...
/** * RequireJS configuration * @description Pass in options for RequireJS like paths, shims or the baseUrl */ require.config({ paths: { "mainModule" : "Modules/Main" }, // Append a date on each requested script to prevent caching issues. urlArgs: "bust=" + Date.now() }); /** * RequireJS calls * @descript...
Revert 60f69b3 as the var based syntax isn't working with the r.js optimizer
[BUGFIX] Revert 60f69b3 as the var based syntax isn't working with the r.js optimizer
JavaScript
mit
t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template
--- +++ @@ -16,10 +16,8 @@ * RequireJS calls * @description Require and fire off the main/initial file of the application. */ -require(function(require) { +require(["mainModule"], function(MainFn) { "use strict"; - - var MainFn = require("mainModule"); new MainFn(); });
f78fb6622ecc2204573326790eb5bdd254206580
app/assets/javascripts/application.js
app/assets/javascripts/application.js
//= require vendor //= require app //= require_tree ./lib //= require_tree ./app/controllers //= require_tree ./app/helpers //= require_tree ./app/models //= require sponsors //= require_tree ./sponsors
//= require vendor //= require app //= require_tree ./lib //= require_tree ./app //= require sponsors //= require_tree ./sponsors
Bring back ALL THE ASSETS!
Bring back ALL THE ASSETS!
JavaScript
mit
0xCCD/travis-ci,0xCCD/travis-ci
--- +++ @@ -1,9 +1,7 @@ //= require vendor //= require app //= require_tree ./lib -//= require_tree ./app/controllers -//= require_tree ./app/helpers -//= require_tree ./app/models +//= require_tree ./app //= require sponsors //= require_tree ./sponsors
573253b7f5fca0a4e19111a07044bdb1caa59f45
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Fix off-canvas menu with Turbolinks
Fix off-canvas menu with Turbolinks Solution from Gian Marco Prazzoli's post in http://foundation.zurb.com/forum/posts/2348-foundation-5-topbar-menu-not-responding-on-rails4
JavaScript
mit
hackedu/website,zachlatta/website,zachlatta/website,zachlatta/website,hackedu/website,hackedu/website
--- +++ @@ -18,4 +18,6 @@ //= require gmaps/google //= require_tree . -$(function(){ $(document).foundation(); }); +window.onload = function() { + $(document).foundation(); +};
dd96f8db06a1b3303336fb963993a5b0657c3700
routes/index.js
routes/index.js
const express = require('express'), router = express.Router(), passport = require('passport'), User = require('../models/user'); router.get('/', function(req, res, next) { res.redirect('/user'); }); // AUTH ROUTES // sign up router.get('/new', function(req, res, next) { res.render('users/new'); ...
const express = require('express'), router = express.Router(), passport = require('passport'), User = require('../models/user'); router.get('/', function(req, res, next) { res.redirect('/user'); }); // AUTH ROUTES // sign up router.get('/new', function(req, res, next) { res.render('users/new'); ...
Set currentUser to req.user before redirecting after login
Set currentUser to req.user before redirecting after login
JavaScript
mit
tymeart/mojibox,tymeart/mojibox
--- +++ @@ -35,7 +35,7 @@ { failureRedirect: '/login' }), (req, res) => { - // res.locals.currentUser = req.user; + res.locals.currentUser = req.user; res.redirect(`/user/${req.user.username}/collection`); } );
2c45fb05fae5aed1e2f11b8ed3fe91056b88cbf9
app/components/select-or-typeahead.js
app/components/select-or-typeahead.js
import Ember from 'ember'; import SelectValues from 'hospitalrun/utils/select-values'; export default Ember.Component.extend({ name: 'select-or-typeahead', className: null, hint: true, label: null, list: null, optionLabelPath: 'value', optionValuePath: 'id', property: null, prompt: ' ', selection: n...
import Ember from 'ember'; import SelectValues from 'hospitalrun/utils/select-values'; export default Ember.Component.extend({ name: 'select-or-typeahead', className: null, hint: true, label: null, list: null, optionLabelPath: 'value', optionValuePath: 'id', property: null, prompt: ' ', selection: n...
Make sure lookup list isn't modified
Make sure lookup list isn't modified
JavaScript
mit
HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend
--- +++ @@ -27,9 +27,10 @@ } if (!userCanAdd && optionLabelPath === 'value' && optionValuePath === 'id') { - contentList = contentList.map(SelectValues.selectValuesMap); + return contentList.map(SelectValues.selectValuesMap); + } else { + return contentList; } - r...
2e15ab28e8ae50fc53ef71cc0283ac2f8e9b22fc
lib/exec.js
lib/exec.js
var spawn = require('child_process').spawn; var dotenv = require('./dot-env'); var objectAssign = require('object-assign'); module.exports = function exec(script) { // Grab the command section of the entered command var command = script.command.split(' ')[0]; // Anything else is options var options = script.comma...
var spawn = require('child_process').spawn; var dotenv = require('./dot-env'); var objectAssign = require('object-assign'); module.exports = function exec(script) { var argv = process.argv.splice(3); var command = script.command + ' ' + argv.join(' '); script.env = script.env || {}; var env = objectAssign(proce...
Add unix (sh -c) and win32 (cmd /c) to command head
Add unix (sh -c) and win32 (cmd /c) to command head
JavaScript
mit
mr47/run-on
--- +++ @@ -4,21 +4,21 @@ module.exports = function exec(script) { - // Grab the command section of the entered command - var command = script.command.split(' ')[0]; - // Anything else is options - var options = script.command.split(' ').slice(1); - var argv = process.argv.splice(3); - - options = options.conc...
be73ae321a6449596acc75e8d7987abdf659bc99
lib/pipe.js
lib/pipe.js
'use strict'; var value = require('es5-ext/lib/Object/valid-value') , emit = require('./core').methods.emit; module.exports = function (emitter1, emitter2) { value(emitter1) && value(emitter2); emitter1.emit = function () { emit.apply(this, arguments); emit.apply(emitter2, arguments); }; };
'use strict'; var defineProperty = Object.defineProperty , d = require('es5-ext/lib/Object/descriptor') , value = require('es5-ext/lib/Object/valid-value') , emit = require('./core').methods.emit; module.exports = function (emitter1, emitter2) { var desc; value(emitter1) && va...
Use descriptor to override emit method
Use descriptor to override emit method
JavaScript
mit
snowyu/events-ex.js,icebob/event-emitter,medikoo/event-emitter
--- +++ @@ -1,13 +1,20 @@ 'use strict'; -var value = require('es5-ext/lib/Object/valid-value') - , emit = require('./core').methods.emit; +var defineProperty = Object.defineProperty + , d = require('es5-ext/lib/Object/descriptor') + , value = require('es5-ext/lib/Object/valid-value') + ,...
79e238a34ccaf320ac339c7c9812cc1f006c7155
lib/save.js
lib/save.js
var thenify = require('thenify') var fs = require('fs') var writeFile = thenify(fs.writeFile) module.exports = function save (pkg, installedPackages, saveType, useExactVersion) { var packageJson = pkg.pkg packageJson[saveType] = packageJson[saveType] || {} installedPackages.forEach(function (dependency) { va...
var writeFile = require('mz/fs').writeFile module.exports = function save (pkg, installedPackages, saveType, useExactVersion) { var packageJson = pkg.pkg packageJson[saveType] = packageJson[saveType] || {} installedPackages.forEach(function (dependency) { var semverCharacter = useExactVersion ? '' : '^' ...
Use mz/fs instad of thenify
Use mz/fs instad of thenify
JavaScript
mit
andreypopp/pnpm,pnpm/supi,pnpm/supi,pnpm/pnpm,andreypopp/pnpm,rstacruz/pnpm,rstacruz/pnpm,rstacruz/pnpm,pnpm/pnpm,pnpm/pnpm,pnpm/supi,andreypopp/pnpm
--- +++ @@ -1,6 +1,4 @@ -var thenify = require('thenify') -var fs = require('fs') -var writeFile = thenify(fs.writeFile) +var writeFile = require('mz/fs').writeFile module.exports = function save (pkg, installedPackages, saveType, useExactVersion) { var packageJson = pkg.pkg
876760cb0761d0b3954d24cbb1d7c0838a49ff9c
platform/mds/mds-web/src/main/resources/webapp/js/app.js
platform/mds/mds-web/src/main/resources/webapp/js/app.js
(function () { 'use strict'; var mds = angular.module('mds', [ 'motech-dashboard', 'mds.services', 'mds.controllers', 'mds.directives', 'mds.utils', 'ui.directives']); $.ajax({ url: '../mds/available/mdsTabs', success: function(data) { mds.constant('AVAILABLE_TABS...
(function () { 'use strict'; var mds = angular.module('mds', [ 'motech-dashboard', 'mds.services', 'webSecurity.services', 'mds.controllers', 'mds.directives', 'mds.utils', 'ui.directives']); $.ajax({ url: '../mds/available/mdsTabs', success: function(data) { mds....
Bring back dependency for web-security services to MDS schema browser
Bring back dependency for web-security services to MDS schema browser Change-Id: I71f289f9201bfad22d67e7d77d6b7065b53436a3
JavaScript
bsd-3-clause
pgesek/motech,wstrzelczyk/motech,sebbrudzinski/motech,wstrzelczyk/motech,ngraczewski/motech,koshalt/motech,jefeweisen/motech,smalecki/motech,justin-hayes/motech,adamkalmus/motech,shubhambeehyv/motech,ngraczewski/motech,LukSkarDev/motech,tstalka/motech,smalecki/motech,justin-hayes/motech,tectronics/motech,kmadej/motech,...
--- +++ @@ -1,7 +1,7 @@ (function () { 'use strict'; - var mds = angular.module('mds', [ 'motech-dashboard', 'mds.services', + var mds = angular.module('mds', [ 'motech-dashboard', 'mds.services', 'webSecurity.services', 'mds.controllers', 'mds.directives', 'mds.utils', 'ui.directives']); ...
d81289bdc0a32305fb339c78bc0e191edd86bfcb
workshop/www/js/recipe.js
workshop/www/js/recipe.js
var Recipe = function(data){ this.title = data.Title; this.stars = data.StarRating; this.imageUrl = data.ImageURL } function BigOvenRecipeSearchJson(query) { var allRecipes = []; var noImageLink = "http://redirect.bigoven.com/pics/recipe-no-image.jpg" var apiKey = APIKEY; var titleKeyword = query; var ...
var Recipe = function(data){ this.title = data.Title; this.stars = data.StarRating; this.imageUrl = data.ImageURL } function BigOvenRecipeSearchJson(query) { var allRecipes = []; var noImageLink = "http://redirect.bigoven.com/pics/recipe-no-image.jpg" var apiKey = "dvx7zJ0x53M8X5U4nOh6CMGpB3d0PEhH"; var ...
Add then callback to render search-results template
Add then callback to render search-results template
JavaScript
mit
danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danas...
--- +++ @@ -7,7 +7,7 @@ function BigOvenRecipeSearchJson(query) { var allRecipes = []; var noImageLink = "http://redirect.bigoven.com/pics/recipe-no-image.jpg" - var apiKey = APIKEY; + var apiKey = "dvx7zJ0x53M8X5U4nOh6CMGpB3d0PEhH"; var titleKeyword = query; var url = "https://api.bigoven.com/recipes?...
8b9b539bae31a49442361ae3f69a8be15f44882e
lib/exit.js
lib/exit.js
/* * exit * https://github.com/cowboy/node-exit * * Copyright (c) 2013 "Cowboy" Ben Alman * Licensed under the MIT license. */ 'use strict'; module.exports = function exit(exitCode, streams) { if (!streams) { streams = [process.stdout, process.stderr]; } var drainCount = 0; // Actually exit if all streams...
/* * exit * https://github.com/cowboy/node-exit * * Copyright (c) 2013 "Cowboy" Ben Alman * Licensed under the MIT license. */ 'use strict'; module.exports = function exit(exitCode, streams) { if (!streams) { streams = [process.stdout, process.stderr]; } var drainCount = 0; // Actually exit if all streams...
Use an empty write instead of drain event. Closes gh-5, gh-4.
Use an empty write instead of drain event. Closes gh-5, gh-4.
JavaScript
mit
cowboy/node-exit
--- +++ @@ -18,17 +18,17 @@ } } streams.forEach(function(stream) { - // Prevent further writing. - stream.write = function() {}; // Count drained streams now, but monitor non-drained streams. if (stream.bufferSize === 0) { drainCount++; } else { - stream.once('drain', funct...
f7bb7dff415e0652a0e8b95b0f311bacfd5b481c
src/database/DataTypes/Report.js
src/database/DataTypes/Report.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import Realm from 'realm'; /** * A Report. * * @property {string} id * @property {string} type * @property {string} title * @property {string} _data */ export class Report extends Realm.Object { ...
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import Realm from 'realm'; import checkIsObject from '../utilities'; /** * A Report. * * @property {string} id * @property {string} type * @property {string} title * @property {string} _data */ ex...
Add checkIsObject in set data()
Add checkIsObject in set data()
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
--- +++ @@ -5,6 +5,7 @@ import Realm from 'realm'; +import checkIsObject from '../utilities'; /** * A Report. * @@ -30,7 +31,7 @@ * @param {dataObject} dataObject */ set data(dataObject) { - this._data = JSON.stringify(dataObject); + this._data = checkIsObject(dataObject) ? JSON.stringify...
a8609d63bb4ad116904be74aa9f1b66f676ae294
public/modules/core/controllers/home.client.controller.js
public/modules/core/controllers/home.client.controller.js
'use strict'; angular.module('core').controller('HomeController', ['$scope', '$http', 'Authentication', 'Users', function($scope, $http, Authentication, Users) { // This provides Authentication context. $scope.authentication = Authentication; if (Authentication.user !== '') { $scope.helloMessage = 'Привет, ...
'use strict'; angular.module('core').controller('HomeController', ['$scope', '$http', '$location', 'Authentication', 'Users', function($scope, $http, $location, Authentication, Users) { // This provides Authentication context. $scope.authentication = Authentication; if (Authentication.user !== '') { $scope....
Add redirecting to sing in page if user not authorizated'
Add redirecting to sing in page if user not authorizated'
JavaScript
mit
sevazhidkov/angular-test-app,sevazhidkov/angular-test-app,sevazhidkov/angular-test-app
--- +++ @@ -1,15 +1,14 @@ 'use strict'; -angular.module('core').controller('HomeController', ['$scope', '$http', 'Authentication', 'Users', - function($scope, $http, Authentication, Users) { +angular.module('core').controller('HomeController', ['$scope', '$http', '$location', 'Authentication', 'Users', + functio...
129a40482844c3968d6d387b4648d70944732b9d
src/entities.js
src/entities.js
;(function(exports) { function Entities(coquette, game) { this.c = coquette; this.game = game; this._entities = []; }; Entities.prototype = { update: function(interval) { var entities = this.all(); for (var i = 0, len = entities.length; i < len; i++) { if (entities[i].update !...
;(function(exports) { function Entities(coquette, game) { this.c = coquette; this.game = game; this._entities = []; }; Entities.prototype = { update: function(interval) { var entities = this.all(); for (var i = 0, len = entities.length; i < len; i++) { if (entities[i].update !...
Remove unused callback params from create() destroy()
Remove unused callback params from create() destroy()
JavaScript
mit
maryrosecook/coquette,maryrosecook/coquette,matthewsimo/coquette,matthewsimo/coquette,cdosborn/coquette,cdosborn/coquette
--- +++ @@ -30,14 +30,14 @@ } }, - create: function(Constructor, settings, callback) { + create: function(Constructor, settings) { var entity = new Constructor(this.game, settings || {}); this.c.collider.createEntity(entity); this._entities.push(entity); return entity; ...
61c9d6ed8df1a57a53406492989829f7bf8feca3
lib/mime.js
lib/mime.js
/*! * YUI Mocha * Copyright 2011 Yahoo! Inc. * Licensed under the BSD license. */ /** * File extension to MIME type map. * * Used by `serve.js` when streaming files from disk. */ this.contentTypes = { "css": "text/css", "html": "text/html", "ico": "image/vnd.microsoft.icon", "jpeg": "image/jpeg", "jp...
/*! * YUI Mocha * Copyright 2011 Yahoo! Inc. * Licensed under the BSD license. */ /** * @module mime */ /** * File extension to MIME type map. * * Used by `serve.js` when streaming files from disk. * * @property contentTypes * @type object */ this.contentTypes = { "css": "text/css", "html": "text/htm...
Add YUI Doc tags to documentation blocks.
Add YUI Doc tags to documentation blocks.
JavaScript
bsd-3-clause
reid/onyx,reid/onyx
--- +++ @@ -5,9 +5,16 @@ */ /** + * @module mime + */ + +/** * File extension to MIME type map. * * Used by `serve.js` when streaming files from disk. + * + * @property contentTypes + * @type object */ this.contentTypes = { "css": "text/css",
a1875e57a2da90534d43819f3e05fbcf79b0dfa6
plugins/instagram.js
plugins/instagram.js
var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Instagram', prepareImgLinks:function (callback) { $('body').on('mouseenter', 'a[href*="?taken-by"]', function () { var link = $(this); if (link.hasClass('hoverZoomLink')) return; ...
var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Instagram', prepareImgLinks:function (callback) { $('body').on('mouseenter', 'a[href*="?taken-by"]', function () { var link = $(this); if (link.hasClass('hoverZoomLink')) return; ...
Use full-size image instead of the default one.
Use full-size image instead of the default one.
JavaScript
mit
superlime/hoverzoomgold,extesy/hoverzoom,extesy/hoverzoom,superlime/hoverzoomgold
--- +++ @@ -7,7 +7,7 @@ if (link.hasClass('hoverZoomLink')) return; if (link.find('span.coreSpriteSidecarIconLarge').length === 0) { - link.data().hoverZoomSrc = [link.find('img').attr('src')]; + link.data().hoverZoomSrc = [link.prop('href').rep...
a307404e7c4772fa2ba65830fa857e1508056ac7
lib/util.js
lib/util.js
'use strict' const childProcess = require('child_process') const fs = require('fs') function exec (command, options) { return new Promise(function (resolve, reject) { childProcess.exec(command, options, function (err, stdout, stderr) { if (err) { reject(err) } else { resolve({command...
'use strict' const childProcess = require('child_process') const fs = require('fs') function exec (command, options) { return new Promise(function (resolve, reject) { childProcess.exec(command, options, function (err, stdout, stderr) { if (err) { reject(err) } else { resolve({command...
Add promisify function to reduce redundancy
Add promisify function to reduce redundancy
JavaScript
isc
jcollado/multitest
--- +++ @@ -15,18 +15,6 @@ }) } -function mkdir (path) { - return new Promise(function (resolve, reject) { - fs.mkdir(path, function (err) { - if (err) { - reject(err) - } else { - resolve() - } - }) - }) -} - function exists (path) { return new Promise(function (resolve...
91c922ac32d68db8965f335f13882c51f73bb522
public/robot-kata.js
public/robot-kata.js
console.log("Hello Robot Kata!"); var floorContext = document.getElementById('floor').getContext('2d'); var floorImage = new Image(); var floorOffset = $('#floor').offset(); floorImage.src = 'roomba-dock.png'; floorImage.onload = function () { floorContext.drawImage(floorImage, 0, 0); }; $('#floor').mousemove(func...
loadFloorImage(function () { console.log("Hello Robot Kata!"); }); var floor = { context: $('#floor')[0].getContext('2d'), offset: $('#floor').offset(), getPosition: function (e) { return { x: Math.floor(e.pageX - this.offset.left), y: Math.floor(e.pageY - this.offset.top) } } } function...
Refactor and add function to determine color
Refactor and add function to determine color
JavaScript
mit
ideal-knee/robot-kata-js,ideal-knee/robot-kata-js,ideal-knee/robot-kata-js
--- +++ @@ -1,16 +1,49 @@ -console.log("Hello Robot Kata!"); +loadFloorImage(function () { + console.log("Hello Robot Kata!"); +}); -var floorContext = document.getElementById('floor').getContext('2d'); -var floorImage = new Image(); -var floorOffset = $('#floor').offset(); +var floor = { + context: $('#floor')[0...
dae1278238e40b79f5bc08f72e7040ef4291f920
examples/js-config.js
examples/js-config.js
// Configure client Opbeat.config({ orgId: 'b3eba3d11f6e4c3a9db52f477caa4fa2', appId: 'e9797db8c7', token: '6451721d51b6d95cf6c6b09498feafd865f1f976' }).install() // Set optional user data Opbeat.setUserContext({ email: 'vanja@opbeat.com', id: 1 }) // Test functions function multiply (a, b) { return a * b...
// Configure client Opbeat.config({ debug: true, orgId: 'b3eba3d11f6e4c3a9db52f477caa4fa2', appId: 'e9797db8c7', token: '6451721d51b6d95cf6c6b09498feafd865f1f976' }).install() // Set optional user data Opbeat.setUserContext({ email: 'vanja@opbeat.com', id: 1 }) // Test functions function multiply (a, b) {...
Enable debug mode for JS config example
Enable debug mode for JS config example
JavaScript
mit
jahtalab/opbeat-js,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-js-core,opbeat/opbeat-js-core,opbeat/opbeat-angular,opbeat/opbeat-angular,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-react
--- +++ @@ -1,5 +1,6 @@ // Configure client Opbeat.config({ + debug: true, orgId: 'b3eba3d11f6e4c3a9db52f477caa4fa2', appId: 'e9797db8c7', token: '6451721d51b6d95cf6c6b09498feafd865f1f976'
fc81c225801101221d308f300d2491a39d2db22e
frontend/reducers/promoteModal.js
frontend/reducers/promoteModal.js
import * as CONST from '../constants/actionTypes'; const initialState = { open: false }; export default function promoteModal(state = initialState, action) { switch (action.type) { case CONST.SHOW_PROMOTE_MODAL: return { open: true }; case CONST.HIDE_PROMOTE_MODAL: return { open: false }; default: ...
import * as CONST from '../constants/actionTypes'; const initialState = { open: false, piece: undefined }; export default function promoteModal(state = initialState, action) { switch (action.type) { case CONST.SHOW_PROMOTE_MODAL: return { open: true, piece: action.piece }; case CONST.HIDE_PROMOTE_MODAL: ...
Update reducer properties, allow `piece` key.
Update reducer properties, allow `piece` key. * the `piece` is the target promote or not.
JavaScript
mit
mgi166/usi-front,mgi166/usi-front
--- +++ @@ -1,13 +1,13 @@ import * as CONST from '../constants/actionTypes'; -const initialState = { open: false }; +const initialState = { open: false, piece: undefined }; export default function promoteModal(state = initialState, action) { switch (action.type) { case CONST.SHOW_PROMOTE_MODAL: - retur...
91e8cbf86807bef4636f38d8157557af8901f39c
gateways/paypal_express/script.js
gateways/paypal_express/script.js
(function() { /***********************************************************/ /* Handle Proceed to Payment /***********************************************************/ jQuery(function() { jQuery(document).on('proceedToPayment', function(event, ShoppingCart) { if (ShoppingCart.gateway...
(function() { /***********************************************************/ /* Handle Proceed to Payment /***********************************************************/ jQuery(function() { jQuery(document).on('proceedToPayment', function(event, ShoppingCart) { if (ShoppingCart.gateway...
Store the correct payment method
Store the correct payment method
JavaScript
mit
flaviocopes/grav-plugin-shoppingcart-paypal,flaviocopes/grav-plugin-shoppingcart-paypal
--- +++ @@ -13,7 +13,7 @@ products: storejs.get('grav-shoppingcart-basket-data'), address: storejs.get('grav-shoppingcart-person-address'), shipping: storejs.get('grav-shoppingcart-shipping-method'), - payment: storejs.get('grav-shoppingcart-payment-me...
77144a91f28c5801951861c9e7ebc3df8d12097f
server/config/resources.js
server/config/resources.js
module.exports = { user: { type: 'document', schema: { attributes: { name: String } }, user: true }, project: { type: 'document', schema: { attributes: { name: String, description:...
module.exports = { user: { type: 'document', schema: { attributes: { name: String } }, user: true }, project: { type: 'document', schema: { attributes: { name: String, description:...
Use Date type for history on server side
Use Date type for history on server side
JavaScript
mit
pmsipilot/pmsiplan,pmsipilot/pmsiplan,pmsipilot/pmsiplan
--- +++ @@ -65,7 +65,7 @@ primaryKey: String, action: String, content: String, - date: String, + date: Date, username: String } }
0888954bb9641cf7b5fe5cf4dc30d89f77f6d953
server/lib/load-dot-env.js
server/lib/load-dot-env.js
if (!process.env.NODE_ENV) { process.env.NODE_ENV = 'development'; } if (process.env.NODE_ENV === 'development') { const dotenv = require('dotenv'); dotenv.config(); // this loads .env with real values. It needs to be first because dotenv doesn't overwrite any values dotenv.config({path: 'default.env'}); // th...
if (!process.env.NODE_ENV) { process.env.NODE_ENV = 'development'; } if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'docker') { const dotenv = require('dotenv'); dotenv.config(); // this loads .env with real values. It needs to be first because dotenv doesn't overwrite any values dotenv...
Load '.env' files under docker
Load '.env' files under docker
JavaScript
mit
OpenCollective/opencollective-api,OpenCollective/opencollective-api,OpenCollective/opencollective-api
--- +++ @@ -2,7 +2,7 @@ process.env.NODE_ENV = 'development'; } -if (process.env.NODE_ENV === 'development') { +if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'docker') { const dotenv = require('dotenv'); dotenv.config(); // this loads .env with real values. It needs to be first be...
1c91214da859ceaa3d44d6e0be87d02a1e49a039
lib/index.js
lib/index.js
/* * gulp-hub * https://github.com/frankwallis/gulp-hub * * Copyright (c) 2014 Frank Wallis * Licensed under the MIT license. */ var gulp = require('gulp'); var path = require('path'); var util = require('gulp-util'); var runSequence = require('run-sequence'); var resolveGlob = require('./resolve-glob'); var getS...
/* * gulp-hub * https://github.com/frankwallis/gulp-hub * * Copyright (c) 2014 Frank Wallis * Licensed under the MIT license. */ var gulp = require('gulp'); var path = require('path'); var util = require('gulp-util'); var runSequence = require('run-sequence'); var resolveGlob = require('./resolve-glob'); var getS...
Attach main function directly to exports, linting
Attach main function directly to exports, linting
JavaScript
mit
frankwallis/gulp-hub,stevemao/gulp-hub,phated/gulp-hub
--- +++ @@ -16,7 +16,7 @@ var tasks = {}; -function hub(pattern) { +module.exports = function(pattern) { // assert `pattern` is a valid glob (non-empty string) or array of globs var isString = typeof pattern === 'string'; var isArray = Array.isArray(pattern); @@ -40,6 +40,4 @@ addTask...
2ccf293d75528d21e97e22a6a7ba95d0305370bf
lib/index.js
lib/index.js
'use babel' /* @flow */ import {Disposable} from 'atom' import {Main} from './main' import type {Provider} from './types' module.exports = { config: { }, activate() { this.instance = new Main() }, deactivate() { this.instance.dispose() }, provideIntentions(): Main { return this.instance ...
'use babel' /* @flow */ import {Disposable} from 'atom' import {Main} from './main' import type {Provider} from './types' module.exports = { config: { }, activate() { this.instance = new Main() }, deactivate() { this.instance.dispose() }, provideIntentions(): Main { return this.instance ...
Add return type to consumer method
:art: Add return type to consumer method
JavaScript
mit
steelbrain/declarations
--- +++ @@ -19,7 +19,7 @@ provideIntentions(): Main { return this.instance }, - consumeProvider(provider: Provider) { + consumeProvider(provider: Provider): Disposable { const providers = [].concat(provider) providers.forEach(provider => { this.instance.addProvider(provider)
fe751015ca6bdeec416c266868c43f67a3ca19f7
lib/local.js
lib/local.js
"use strict"; var fakeNullFiber = Object.create(null); var localKey = "_optimism_local"; function getCurrentFiber() { return fakeNullFiber; } try { var fiberPath = require.resolve("fibers"); } catch (e) {} if (fiberPath) { var Fiber = require(fiberPath); // If we were able to require("fibers"), redefine th...
"use strict"; var fakeNullFiber = function Fiber(){}; var localKey = "_optimism_local"; function getCurrentFiber() { return fakeNullFiber; } try { var fiberPath = require.resolve("fibers"); } catch (e) {} if (fiberPath) { var Fiber = require(fiberPath); // If we were able to require("fibers"), redefine the...
Make fakeNullFiber look a little less fake.
Make fakeNullFiber look a little less fake.
JavaScript
mit
benjamn/optimism,benjamn/optimism
--- +++ @@ -1,6 +1,6 @@ "use strict"; -var fakeNullFiber = Object.create(null); +var fakeNullFiber = function Fiber(){}; var localKey = "_optimism_local"; function getCurrentFiber() {
bb7162a886b4ed17caab08228e504cf09fdb5da2
src/js/index.js
src/js/index.js
require('../css/main.scss'); import grindy from "./grindy.js" (function() { let game = grindy(); game.start(); })()
import '../css/main.scss' import 'file?name=[name].html!../index.html' import Grindy from './grindy.js' (function() { let game = grindy(); game.start(); })()
Use of already installed file-loader :) ... we can use import also for "special webpack imports"
Use of already installed file-loader :) ... we can use import also for "special webpack imports"
JavaScript
mit
Vorgnr/Grindy,Vorgnr/Grindy
--- +++ @@ -1,6 +1,6 @@ -require('../css/main.scss'); - -import grindy from "./grindy.js" +import '../css/main.scss' +import 'file?name=[name].html!../index.html' +import Grindy from './grindy.js' (function() {
f4dd36946e54b9ba6d037275b4dd184621729de8
test/test-harness-test.js
test/test-harness-test.js
describe('test-harness', function() { describe('globals', function() { it('should expose should as a global', function() { should.exist(should); }); it('should expose sinon as a global', function() { should.exist(sinon); }); }); describe('should-sinon plugin', function() { it...
describe('test/test-harness-test.js', function() { describe('globals', function() { it('should expose should as a global', function() { should.exist(should); }); it('should expose sinon as a global', function() { should.exist(sinon); }); }); describe('should-sinon plugin', functio...
Fix linter issue with test describe path
Fix linter issue with test describe path
JavaScript
mit
Springworks/node-test-harness
--- +++ @@ -1,4 +1,4 @@ -describe('test-harness', function() { +describe('test/test-harness-test.js', function() { describe('globals', function() {
e7eddd8e4f13e556fa5c07071cec9911a689187b
liphte.ts.js
liphte.ts.js
var fs = require('fs'); var vm = require('vm'); var includeInThisContext = function(path) { var code = fs.readFileSync(path); vm.runInThisContext(code, path); }.bind(this); includeInThisContext(__dirname+"/dist/liphte.min.js"); exports.liphte = liphte; exports.liphte.tag = liphte.tag;
var fs = require('fs'); var vm = require('vm'); var includeInThisContext = function(path) { var code = fs.readFileSync(path); vm.runInThisContext(code, path); }.bind(this); includeInThisContext(__dirname+"/dist/liphte.min.js"); exports.liphte = liphte; exports.tag = liphte.tag;
Fix module for NodeJS - apped_dir_name
Fix module for NodeJS - apped_dir_name
JavaScript
mit
maveius/liphte.ts,maveius/liphte.ts
--- +++ @@ -6,4 +6,4 @@ }.bind(this); includeInThisContext(__dirname+"/dist/liphte.min.js"); exports.liphte = liphte; -exports.liphte.tag = liphte.tag; +exports.tag = liphte.tag;
d664f7aff910b8ccf46f45f341a0776d4498124b
electron/menus/win-linux.js
electron/menus/win-linux.js
export const winLinuxMenu = (app, window, openAbout) => ( [{ label: 'Daedalus', submenu: [{ label: 'About', click() { openAbout(); } }, { label: 'Close', accelerator: 'Ctrl+W', click() { app.quit(); } }] }, { label: 'Edit', submenu: [...
export default (app, window, openAbout) => ( [{ label: 'Daedalus', submenu: [{ label: 'About', click() { openAbout(); } }, { label: 'Close', accelerator: 'Ctrl+W', click() { app.quit(); } }] }, { label: 'Edit', submenu: [{ label...
Fix missing application menu on Windows build
[DDW-212] Fix missing application menu on Windows build
JavaScript
apache-2.0
input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus
--- +++ @@ -1,4 +1,4 @@ -export const winLinuxMenu = (app, window, openAbout) => ( +export default (app, window, openAbout) => ( [{ label: 'Daedalus', submenu: [{
7e6c11f37053a33e0ad4b6ee90b6b2b4317960a7
src/components/floating-button/FloatingButtonItemLabel.js
src/components/floating-button/FloatingButtonItemLabel.js
'use strict' import React, { Component } from 'react' import ReactCSS from 'reactcss' import colors from '../../styles/variables/colors' import { spacing, sizing } from '../../styles/variables/utils' class FloatingButtonItemLabel extends Component { classes() { return { 'default': { wrap: { ...
'use strict' import React, { Component } from 'react' import ReactCSS from 'reactcss' import colors from '../../styles/variables/colors' import { spacing, sizing } from '../../styles/variables/utils' class FloatingButtonItemLabel extends Component { classes() { return { 'default': { wrap: { ...
Improve floating button item label styles
Improve floating button item label styles
JavaScript
mit
tobycyanide/felony,henryboldi/felony,henryboldi/felony,tobycyanide/felony
--- +++ @@ -19,12 +19,19 @@ right: '0' }, label: { - backgroundColor: 'rgba(255,255,255,0.59)', + backgroundColor: 'rgba(255,255,255,0.4)', borderRadius: '3px', - padding: '3px', + padding: '4px', color: colors.bgDark, w...
eec077fa040d29767acae307ae74e97c8d511fba
src/containers/shared-assets/form-assets/form-tooltips.js
src/containers/shared-assets/form-assets/form-tooltips.js
import React from 'react'; const requirementsObj = { list_symbol: "◇", username: ["start with letter", "be between 3-10 characters", "contain only [a-zA-Z] characters"], ['e-mail']: ["look like: example@example.com"], ['confirm_e-mail']: ["be the same as e-mail address written above"], password: ["be K"] }; ...
import React from 'react'; const requirementsObj = { list_symbol: "◇", username: ["start with letter", "be between 3-10 characters", "contain only [a-zA-Z] characters"], ['e-mail']: ["look like: example@example.com"], ['confirm_e-mail']: ["be the same as e-mail address written above"], password: ["be K"], ...
Change switch statement to dynamic
Change switch statement to dynamic
JavaScript
bsd-3-clause
vFujin/HearthLounge,vFujin/HearthLounge
--- +++ @@ -5,7 +5,9 @@ username: ["start with letter", "be between 3-10 characters", "contain only [a-zA-Z] characters"], ['e-mail']: ["look like: example@example.com"], ['confirm_e-mail']: ["be the same as e-mail address written above"], - password: ["be K"] + password: ["be K"], + confirm_password: ["b...
f017a1d21145668d0182339bb195e98e2da21992
server/recalls.controller.js
server/recalls.controller.js
'use strict'; var _ = require('lodash'), Promise = require('bluebird'); module.exports = ['data', function (data) { var filters = function (query) { var where = data.utils.rangeFilter('Year', query.start, query.end); return _.assign(where, data.utils.inFilter('Make', query.makes)); }; return { '...
'use strict'; var _ = require('lodash'), Promise = require('bluebird'); module.exports = ['data', function (data) { var filters = function (query) { var where = data.utils.rangeFilter('Year', query.start, query.end); return _.assign(where, data.utils.inFilter('Make', query.makes)); }; return { '...
Add operation parameter to recalls route
Add operation parameter to recalls route Instead of having the operation parameter in the query string it optimizes for Restangular to have it as an action on the route.
JavaScript
mit
justinsa/maine-coone,justinsa/maine-coone
--- +++ @@ -9,10 +9,10 @@ }; return { - '/': { + '/:operation?': { get: function (req) { return new Promise(function (resolve, reject) { - var op = data.utils.operation(req.query), + var op = data.utils.operation(req.params), pagination = data.utils.pagin...
29548e72dced63c277f16a33a5a4e44be668473b
shared/util/feature-flags.js
shared/util/feature-flags.js
/* @flow */ import getenv from 'getenv' // To enable a feature, include it in the environment variable KEYBASE_FEATURES. // For example, KEYBASE_FEATURES=tracker2,login,awesomefeature const tracker2Key = 'tracker2' const loginKey = 'login' const mobileAppsExistKey = 'mobileAppsExist' type FeatureFlags = { 'tracke...
/* @flow */ import getenv from 'getenv' // To enable a feature, include it in the environment variable KEYBASE_FEATURES. // For example, KEYBASE_FEATURES=tracker2,login,awesomefeature const tracker2Key = 'tracker2' const loginKey = 'login' const mobileAppsExistKey = 'mobileAppsExist' const adminKey = 'admin' type F...
Add adminKey, will be for early access to dz2
Add adminKey, will be for early access to dz2 Can be turned on with `launchctl setenv KEYBASE_FEATURES admin`
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
--- +++ @@ -8,23 +8,27 @@ const tracker2Key = 'tracker2' const loginKey = 'login' const mobileAppsExistKey = 'mobileAppsExist' +const adminKey = 'admin' type FeatureFlags = { 'tracker2': boolean, 'login': boolean, - 'mobileAppsExist': boolean + 'mobileAppsExist': boolean, + 'admin': boolean } let f...
0f775d0cea33f6525b3875db69f8830859c83b8d
tests/unit/looper-test.js
tests/unit/looper-test.js
import Ember from 'ember'; import { csp, channel, looper } from 'ember-processes'; module('Unit: Loopers'); test('loopers take a channel name', function(assert) { QUnit.stop(); assert.expect(3); let outch = csp.chan(); let MyObject = Ember.Object.extend({ myChannel: channel(), doStuff: looper('myCha...
import Ember from 'ember'; import { csp, channel, looper } from 'ember-processes'; module('Unit: Loopers'); function testLooper(testName, makeHandler) { test('loopers take a channel name (' + testName + ')', function(assert) { QUnit.stop(); assert.expect(3); let outch = csp.chan(); let MyObject = ...
Add test for regular function loopers
Add test for regular function loopers
JavaScript
mit
machty/ember-concurrency,jeradg/ember-concurrency,jeradg/ember-concurrency,machty/ember-concurrency,jeradg/ember-concurrency,machty/ember-concurrency,machty/ember-concurrency,jeradg/ember-concurrency
--- +++ @@ -3,36 +3,48 @@ module('Unit: Loopers'); -test('loopers take a channel name', function(assert) { - QUnit.stop(); - assert.expect(3); +function testLooper(testName, makeHandler) { + test('loopers take a channel name (' + testName + ')', function(assert) { + QUnit.stop(); + assert.expect(3); -...
d3e18b83b2093637adfce4ccaa8c1cec4aee7e2c
public/app/services/toasterutils.service.js
public/app/services/toasterutils.service.js
(function () { 'use strict'; angular .module('PLMApp') .factory('toasterUtils', toasterUtils); toasterUtils.$inject = ['toaster', '$timeout']; function toasterUtils(toaster, $timeout) { var service = { info: info, success: success, warning: warning, error: erro...
(function () { 'use strict'; angular .module('PLMApp') .factory('toasterUtils', toasterUtils); toasterUtils.$inject = ['toaster', '$timeout']; function toasterUtils(toaster, $timeout) { var service = { info: info, success: success, warning: warning, error: erro...
Add parameter setting toaster's duration
Add parameter setting toaster's duration
JavaScript
agpl-3.0
BuggleInc/webPLM,BuggleInc/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,polux/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,MatthieuNICOLAS/webPLM,polux/webPLM
--- +++ @@ -17,28 +17,30 @@ }; return service; - function info(message) { - $timeout(function () { - toaster.pop('info', '', message); + function pop(type, title, message, duration) { + $timeout(function () { + toaster.pop(type, title, messag...
5b630ad5fe4719659bdc8fe4276f4fb013336cad
src/registry.js
src/registry.js
'use strict' /** * @module registry */ module.exports.isListed = isListed module.exports.isUnlisted = isUnlisted var vocab = require('solid-namespace') /** * Returns true if the parsed graph is a `solid:UnlistedDocument` document. * @method isUnlisted * @param graph {Graph} Parsed graph (loaded from a registry-...
'use strict' /** * @module registry */ module.exports.isListed = isListed module.exports.isUnlisted = isUnlisted var vocab = require('solid-namespace') /** * Returns true if the parsed graph is a `solid:UnlistedDocument` document. * @method isUnlisted * @param graph {Graph} Parsed graph (loaded from a registry-...
Make isListed / isUnlisted query more specific
Make isListed / isUnlisted query more specific Address issue #141.
JavaScript
mit
solid/solid-client,solid/solid-client,solid/solid.js,solid/solid-client,solid/solid.js,solid/solid.js
--- +++ @@ -16,7 +16,7 @@ */ function isUnlisted (graph, rdf) { var ns = vocab(rdf) - return graph.any(null, null, ns.solid('UnlistedDocument'), graph.uri) + return graph.any(graph.uri, ns.rdf('type'), ns.solid('UnlistedDocument'), graph.uri) } /** @@ -27,5 +27,5 @@ */ function isListed (graph, rdf) { ...
10cc6b06dedfd1a90bc45d1eb5d2f469b876e70b
config/env/all.js
config/env/all.js
// default app configuration var defaultConfig = { port: process.env.PORT || 4000, db: "mongodb://nodegoat:owasp@widmore.mongohq.com:10000/nodegoat", cookieSecret: "session_cookie_secret_key_here", cryptoKey: "a_secure_key_for_crypto_here", cryptoAlgo: "aes256" }; module.exports = defaultConfig;
// default app configuration var defaultConfig = { port: process.env.PORT || 4000, db: process.env.MONGODB_URL || "mongodb://nodegoat:owasp@widmore.mongohq.com:10000/nodegoat", cookieSecret: "session_cookie_secret_key_here", cryptoKey: "a_secure_key_for_crypto_here", cryptoAlgo: "aes256" }; module....
Use MONGODB_URL from env variable if provided
Use MONGODB_URL from env variable if provided
JavaScript
apache-2.0
codiscope/NodeGoatExample,panstav/NodeGoat,samheadrick/NodeGoat,diegochavezcarro/nodegoatsecure,zkovalenko/NodeGoatTEST,nearform/NodeGoat,bertonjulian/NodeGoat,OWASP/NodeGoat,abaldock/cs132_security_lab_group_24,zkovalenko/NodeGoatTEST,isp1r0/NodeGoat,GMNetto/NodeSecurity,OWASP/NodeGoat,syzer/NodeGoat,GMNetto/NodeSecur...
--- +++ @@ -1,7 +1,7 @@ // default app configuration var defaultConfig = { port: process.env.PORT || 4000, - db: "mongodb://nodegoat:owasp@widmore.mongohq.com:10000/nodegoat", + db: process.env.MONGODB_URL || "mongodb://nodegoat:owasp@widmore.mongohq.com:10000/nodegoat", cookieSecret: "session_cooki...
b82572880ad9c3a5960ba56b2603006546d29aa7
src/client/react/admin/AdminNavbar/MainNavigation.js
src/client/react/admin/AdminNavbar/MainNavigation.js
import React from 'react'; import { Link } from 'react-router-dom'; const linkStyle = 'pt-button pt-minimal'; class MainNavigation extends React.Component { render() { return ( <div> <a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/'>Visit site</a> </div> ); } } export default MainN...
import React from 'react'; import { Link } from 'react-router-dom'; const linkStyle = 'pt-button pt-minimal'; class MainNavigation extends React.Component { render() { return ( <div> <a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/' target='_blank'>Visit site</a> </div> ); } } expo...
Make Visit Site link in the navbar open a new window
[FIX] Make Visit Site link in the navbar open a new window
JavaScript
mit
bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race
--- +++ @@ -9,7 +9,7 @@ render() { return ( <div> - <a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/'>Visit site</a> + <a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/' target='_blank'>Visit site</a> </div> ); }
d2482daf863450d2ae2470ceba86b341574d7ba8
examples/simple-done-app.js
examples/simple-done-app.js
// Simple "Done" application let doneItems = [] let text function input(event) { text = event.target.value } function done(event) { doneItems.push(text) Twirlip7.WorkspaceView.toast("did " + text) text = "" } Twirlip7.show(() => { return m("div", [ doneItems.map(item => m("div", item)), ...
// Simple "Done" application let doneItems = [] let text function input(event) { text = event.target.value } function done(event) { doneItems.push(text) // Toast will not show up running standalone as it depends on the editor Twirlip7.WorkspaceView.toast("did " + text) text = "" } Twirlip7.show(...
Add comment to simple done app example about toast
Add comment to simple done app example about toast
JavaScript
mit
pdfernhout/Twirlip7,pdfernhout/Twirlip7,pdfernhout/Twirlip7
--- +++ @@ -9,6 +9,7 @@ function done(event) { doneItems.push(text) + // Toast will not show up running standalone as it depends on the editor Twirlip7.WorkspaceView.toast("did " + text) text = "" }
2ffec5ba86e05618c2ea809aa24f28386bce4c8f
src/data/examples/zh-Hans/05_Image/10_Copy_Method.js
src/data/examples/zh-Hans/05_Image/10_Copy_Method.js
/* * @name Copy() method * @frame 600,400 * @description 一个如何使用copy()方法模拟为图像着色的示例。 */ let draft, ready; function preload() { ready = loadImage("assets/parrot-color.png"); draft = loadImage("assets/parrot-bw.png"); } function setup() { createCanvas(600, 400); noCursor(); cursor("assets/brush.p...
/* * @name Copy() 函数 * @frame 600,400 * @description 一个如何使用 copy() 函数模拟为图像着色的范例。 */ let draft, ready; function preload() { ready = loadImage("assets/parrot-color.png"); draft = loadImage("assets/parrot-bw.png"); } function setup() { createCanvas(600, 400); noCursor(); cursor("assets/brush.png...
Edit Chinese translation of example
Edit Chinese translation of example
JavaScript
mit
processing/p5.js-website,processing/p5.js-website
--- +++ @@ -1,7 +1,7 @@ /* - * @name Copy() method + * @name Copy() 函数 * @frame 600,400 - * @description 一个如何使用copy()方法模拟为图像着色的示例。 + * @description 一个如何使用 copy() 函数模拟为图像着色的范例。 */ let draft, ready; function preload() {
afc92c86d9c8199283dcd028ae6f09de3fda052e
lib/plugin/example/handler/alwaysProcessHandler.js
lib/plugin/example/handler/alwaysProcessHandler.js
"use strict"; const Handler = require('../../router/handler'); class AlwaysProcessHandler extends Handler { init(context) { console.log(this.constructor.id, context.request.urlTokenized.join('/')); return Promise.resolve(); } } AlwaysProcessHandler.alwaysProcess = true; AlwaysProcessHandler.id = 'Example...
"use strict"; const Handler = require('../../router/handler'); class AlwaysProcessHandler extends Handler { init(context) { console.log(this.constructor.id, '/' + context.request.urlTokenized.join('/')); return Promise.resolve(); } } AlwaysProcessHandler.alwaysProcess = true; AlwaysProcessHandler.id = 'E...
Prepend / to AlwaysProcessHandler log output
Prepend / to AlwaysProcessHandler log output
JavaScript
mit
coreyp1/defiant,coreyp1/defiant
--- +++ @@ -4,7 +4,7 @@ class AlwaysProcessHandler extends Handler { init(context) { - console.log(this.constructor.id, context.request.urlTokenized.join('/')); + console.log(this.constructor.id, '/' + context.request.urlTokenized.join('/')); return Promise.resolve(); } }
abf494d31e5704b89875940aa9aed5e2f1bbd0cd
scripts/index.js
scripts/index.js
/*global module, require, process */ (function () { 'use strict'; var required = { util: require('./util'), testsUtil: require('./testsUtil'), assert: require('./assert'), test: require('tape-compact'), json: typeof JSON === 'object' && null !== JSON ? JSON : requir...
/*global module, require, process */ (function () { 'use strict'; var required = { util: require('./util'), testsUtil: require('./testsUtil'), assert: require('assert'), test: require('tape-compact'), json: typeof JSON === 'object' && null !== JSON ? JSON : require(...
Revert back to nodes assert module
Revert back to nodes assert module
JavaScript
mit
Xotic750/astrodate
--- +++ @@ -8,7 +8,7 @@ testsUtil: require('./testsUtil'), - assert: require('./assert'), + assert: require('assert'), test: require('tape-compact'),
3b02bcafaec47660344803f66baff351b44f2619
server/routes/recipes/index.js
server/routes/recipes/index.js
import express from 'express'; import * as userController from '../../controllers/recipes.js'; const user = express.Router(); // define route controllers for creating sign up, login and sign out user.post('/', userController.addRecipe); export default user;
import express from 'express'; import * as userController from '../../controllers/recipes.js'; const user = express.Router(); user.use('*', (req, res, next) => { // check for authentication here if (!req.session.user) { return res.status(401).send({ error: 'You do not have the permission to perform thi...
Add user authentication to route
Add user authentication to route
JavaScript
apache-2.0
larrystone/BC-26-More-Recipes,larrystone/BC-26-More-Recipes
--- +++ @@ -4,7 +4,17 @@ const user = express.Router(); -// define route controllers for creating sign up, login and sign out +user.use('*', (req, res, next) => { + // check for authentication here + if (!req.session.user) { + return res.status(401).send({ + error: 'You do not have the permission to pe...
2b1f5c27fd8cfbc06c23a76b5942bec589e553c8
stryker.conf.js
stryker.conf.js
module.exports = function(config) { config.set({ coverageAnalysis: 'off', logLevel: 'info', mutate: [ 'src/**/*.ts?', '!src/**/__tests__/*.ts?' ], mutator: 'typescript', reporter: ['html', 'clear-text', 'progress', 'dashboard'], testRunner: 'jest', transpilers: ['typescript...
module.exports = function(config) { config.set({ coverageAnalysis: 'off', files: [ { pattern: 'node_modules/react-scripts-ts/**/*.js' }, { pattern: 'node_modules/ts-jest/**/*.js' }, ], logLevel: 'info', mutate: [ 'src/**/*.ts?', '!src/**/__tests__/*.ts?' ], mutator:...
Add some files that are needed for mutation testing
Add some files that are needed for mutation testing
JavaScript
mit
mthmulders/hyperion-web,mthmulders/hyperion-web,mthmulders/hyperion-web
--- +++ @@ -1,6 +1,10 @@ module.exports = function(config) { config.set({ coverageAnalysis: 'off', + files: [ + { pattern: 'node_modules/react-scripts-ts/**/*.js' }, + { pattern: 'node_modules/ts-jest/**/*.js' }, + ], logLevel: 'info', mutate: [ 'src/**/*.ts?',
47ea8fb0e20024d9a5531ec2addc3d459e535a09
js/events.js
js/events.js
function Events() { var listeners = {} $.extend(this, { on: function(type, cb) { if (!$.isArray(listeners[type])) listeners[type] = [] if (listeners[type].indexOf(cb) < 0) listeners[type].push(cb) }, once: function(type, cb) { this.o...
function Events() { var listeners = {} $.extend(this, { on: function(type, cb) { if (!$.isArray(listeners[type])) listeners[type] = [] if (listeners[type].indexOf(cb) < 0) listeners[type].push(cb) return this; }, once: function(type, cb) ...
Return the event object when you call on, once or off
Return the event object when you call on, once or off
JavaScript
artistic-2.0
atrodo/fission_engine,atrodo/fission_engine
--- +++ @@ -9,6 +9,7 @@ listeners[type] = [] if (listeners[type].indexOf(cb) < 0) listeners[type].push(cb) + return this; }, once: function(type, cb) { @@ -17,6 +18,7 @@ this.off(type, observer) cb.apply(this, arguments) }) + ...
d073fe7d70675e9f51dde9737fe04136917b4799
public/js/app.js
public/js/app.js
angular.module('specialBlogApp', [ 'ngRoute', 'ngResource' ]) .config(function ($routeProvider, $locationProvider) { $routeProvider .when('/', { templateUrl: 'views/index.html', controller: 'HomeCtrl' }) .when('/article/:articleId', { ...
angular.module('specialBlogApp', [ 'ngRoute', 'ngResource' ]) .config(function ($routeProvider, $locationProvider) { $routeProvider .when('/', { templateUrl: '/views/index.html', controller: 'HomeCtrl' }) .when('/article/:articleId', { ...
Fix the bug of **Tried to load angular more than once.**.
Fix the bug of **Tried to load angular more than once.**.
JavaScript
mit
SpecialCyCi/specialblog-node-js,SpecialCyCi/specialblog-node-js,SpecialCyCi/specialblog-node-js
--- +++ @@ -5,15 +5,15 @@ .config(function ($routeProvider, $locationProvider) { $routeProvider .when('/', { - templateUrl: 'views/index.html', + templateUrl: '/views/index.html', controller: 'HomeCtrl' }) .when('/article/:artic...
ef7a42074a5f3521ace7a453395b6e8896a0c0ef
services/ui/src/components/Favicon/index.js
services/ui/src/components/Favicon/index.js
import React from 'react'; import Head from 'next/head'; import { color } from 'lib/variables'; /** * Adds the Lagoon icon as the favicon for the website. */ const Favicon = () => ( <Head> <link rel="apple-touch-icon" sizes="180x180" href="/static/images/favicons/apple-touch-icon.png" /> <link rel="icon" t...
import React from 'react'; import Head from 'next/head'; import { color } from 'lib/variables'; /** * Adds the Lagoon icon as the favicon for the website. */ const Favicon = () => ( <Head> <link rel="apple-touch-icon" sizes="180x180" href="/static/images/favicons/apple-touch-icon.png" /> <link rel="icon" t...
Remove trailing single quote typo in favicon URL
Remove trailing single quote typo in favicon URL
JavaScript
apache-2.0
amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon
--- +++ @@ -8,7 +8,7 @@ const Favicon = () => ( <Head> <link rel="apple-touch-icon" sizes="180x180" href="/static/images/favicons/apple-touch-icon.png" /> - <link rel="icon" type="image/png" sizes="32x32" href="/static/images/favicons/favicon-32x32.png'" /> + <link rel="icon" type="image/png" sizes="32...
83f708e666d6186b681195a674d8b90a39e60a21
jQuery.animateOnce.js
jQuery.animateOnce.js
/** * Utility function for triggering animate.css animations */ $.fn.animateOnce = function( className ) { var animEndEvent = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', animClass = 'animated ' + className; this .addClass( animClass ) .off( animEndEvent ) .one( animEn...
/* global jQuery */ /** * Utility function for triggering animate.css animations */ (function ( $ ) { 'use strict'; $.fn.animateOnce = function( className, cb ) { var animEndEvent = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', animClass = 'animated ' + className, cal...
Add callback function. Use Strict. noConflict support
Add callback function. Use Strict. noConflict support
JavaScript
mit
NicolajKN/jQuery.animateOnce
--- +++ @@ -1,16 +1,25 @@ +/* global jQuery */ + /** * Utility function for triggering animate.css animations */ -$.fn.animateOnce = function( className ) { - var animEndEvent = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', - animClass = 'animated ' + className; - this - ...
793d224e509715f48e576717a249672bd81f46dc
scripts/create_sequence.js
scripts/create_sequence.js
db.counters.insert( { _id: "cemetery", seq: 0, } ) db.counters.insert( { _id: "geolocation", seq: 0, } ) db.counters.insert( { ...
// Create (or recreate) ID counters for our various entities db.counters.insert( { _id: "cemetery", seq: 0, } ) db.counters.insert( { _id: "geolocation", seq: 0, ...
Create or recreate sequence counters for Monogo database objects
Create or recreate sequence counters for Monogo database objects
JavaScript
mit
sjccs/cemetery-reader
--- +++ @@ -1,3 +1,4 @@ +// Create (or recreate) ID counters for our various entities db.counters.insert( { _id: "cemetery",
bd8e7a0f7330cc4ba0f1728ee60db76a37ef76d0
app/assets/javascripts/application.js
app/assets/javascripts/application.js
//= require modernizr-2.8.3.custom //= require turbolinks //= require local_time //= require init //= require pages document.addEventListener("turbolinks:load", atthemovies.init()); if (document.readyState != 'loading') { atthemovies.init(); } else { document.addEventListener('DOMContentLoaded', atthemovies.init...
//= require modernizr-2.8.3.custom //= require turbolinks //= require local_time //= require init //= require pages document.addEventListener("turbolinks:load", function() { atthemovies.init(); }); if (document.readyState != 'loading') { atthemovies.init(); } else { document.addEventListener('DOMContentLoaded'...
Fix double JS on first page load
Fix double JS on first page load
JavaScript
agpl-3.0
andycroll/atthemovies,andycroll/atthemovies,andycroll/atthemovies,andycroll/atthemovies
--- +++ @@ -5,7 +5,9 @@ //= require init //= require pages -document.addEventListener("turbolinks:load", atthemovies.init()); +document.addEventListener("turbolinks:load", function() { + atthemovies.init(); +}); if (document.readyState != 'loading') { atthemovies.init();
97be40abed9993dae673799fbc002fa3cad4f77a
server/server.js
server/server.js
'use strict'; require('newrelic'); const common = require('../common/common'); const db = require('./db'); const logger = require('./logger'); const httpServer = require('./staticHttpServer'); const createWsServer = require('./createWsServer'); const PORT = Number(process.env.PORT || common.PORT); process.title = 'jc...
'use strict'; const common = require('../common/common'); const db = require('./db'); const logger = require('./logger'); const httpServer = require('./staticHttpServer'); const createWsServer = require('./createWsServer'); const PORT = Number(process.env.PORT || common.PORT); process.title = 'jcm2018-server'; db.co...
Remove newrelic from the project.
Remove newrelic from the project.
JavaScript
mit
ivosh/jcm2018,ivosh/jcm2018,ivosh/jcm2018
--- +++ @@ -1,6 +1,5 @@ 'use strict'; -require('newrelic'); const common = require('../common/common'); const db = require('./db'); const logger = require('./logger');
bd25f30c0bed4a02a165f6741e338f552af23cb0
js/router.js
js/router.js
define(['jquery', 'underscore', 'backbone', 'views'], function($ , _ , Backbone , View ) { var AppRouter = Backbone.Router.extend({ routes: { '': 'showHome', 'about': 'showAbout', 'projects': 'showProjects', 'resume': 'showResume', ...
define(['jquery', 'underscore', 'backbone', 'views'], function($ , _ , Backbone , View ) { var AppRouter = Backbone.Router.extend({ routes: { '': 'showHome', 'about': 'showAbout', 'projects': 'showProjects', 'resume': 'showResume', ...
Add trigger to navigate() calls
Add trigger to navigate() calls
JavaScript
mit
jonlai/personal-website,jonlai/personal-website,jonlai/personal-website
--- +++ @@ -48,7 +48,7 @@ evt.preventDefault(); var href = $(this).attr('href'); $('.navbar-content').removeClass('animate expanded'); - Backbone.history.navigate(href, true); + Backbone.history.navigate(href, { trigger: true }); ...
e0181d13dd3e42ee3bbda2aa270848e06f50fe4e
app/js/controllers/data-controller.js
app/js/controllers/data-controller.js
'use strict'; module.exports = function(app) { app.controller('dataController', [ '$scope', 'HttpService', '$http', '$cookies', function($scope, HttpService, $http, $cookies) { $http.defaults.headers.common.jwt = $cookies.jwt; $scope.selectedDomain = false; var domainService = new HttpService('d...
'use strict'; module.exports = function(app) { app.controller('dataController', [ '$scope', 'HttpService', '$http', '$cookies', function($scope, HttpService, $http, $cookies) { $http.defaults.headers.common.jwt = $cookies.jwt; $scope.selectedDomain = false; var domainService = new HttpService('d...
Add function for adding domains
Add function for adding domains
JavaScript
mit
Sextant-WDB/sextant-ng
--- +++ @@ -17,13 +17,13 @@ $scope.domains = domains; }); }; - + $scope.getDomains(); // run on view load var visitService = new HttpService('visits'); $scope.getVisits = function(domain_id){ - + $scope.selectedDomain = domain_id; ...
f1f4f9e1afbb331ed3eb679d4b2cebf930a21824
js/script.js
js/script.js
(function () { 'use strict'; var worker = null, $output = null; $output = $('#worker-output'); /** worker = new Worker('/js/example-worker.js'); worker.addEventListener('message', function (event) { $output.text(event.data); return; }) //worker.postMessage()...
(function () { 'use strict'; var worker = null, $output = null; $output = $('#worker-output'); /** worker = new Worker('/js/example-worker.js'); worker.addEventListener('message', function (event) { $output.text(event.data); return; }) //worker.postMessage()...
Add temporary console.log for debugging.
Add temporary console.log for debugging.
JavaScript
mit
tanzeelkazi/web-worker,tanzeelkazi/webworker,tanzeelkazi/webworker,tanzeelkazi/web-worker,tanzeelkazi/web-worker,tanzeelkazi/webworker
--- +++ @@ -25,6 +25,7 @@ }); worker.load().on(WebWorker.Event.WORKER_LOADED, function () { + console.log('has loaded'); worker.start(); return; });
b555d4c3922ed5ccb2a2affa58c566cce7b9b1f6
handlers/users.js
handlers/users.js
'use strict'; const Boom = require('boom'); const Errors = require('../lib/errors'); const Formatters = require('../lib/formatters'); const EXISTING_USER = Boom.conflict('User already exist'); exports.listUsers = function({ headers }, reply) { let authParts = []; if (headers.authorization) { authParts = h...
'use strict'; const Boom = require('boom'); const Errors = require('../lib/errors'); const Formatters = require('../lib/formatters'); exports.listUsers = function({ headers }, reply) { let authParts = []; if (headers.authorization) { authParts = headers.authorization.split(' '); } const token = (authP...
Replace Boom variable in createUser()
Replace Boom variable in createUser()
JavaScript
mit
cjduncana/adevav-back-end,cjduncana/adevav-back-end,creativo-pty/adevav-back-end,creativo-pty/adevav-back-end
--- +++ @@ -4,8 +4,6 @@ const Errors = require('../lib/errors'); const Formatters = require('../lib/formatters'); - -const EXISTING_USER = Boom.conflict('User already exist'); exports.listUsers = function({ headers }, reply) { @@ -46,6 +44,8 @@ return reply(Formatters.user(user)).code(201); }) - ....
46cf5c9a5c56c6abcf0ee50c9492a96588b925dc
app/renderer/js/utils/config-util.js
app/renderer/js/utils/config-util.js
'use strict'; const {app} = require('electron').remote; const JsonDB = require('node-json-db'); let instance = null; class ConfigUtil { constructor() { if (instance) { return instance; } else { instance = this; } this.db = new JsonDB(app.getPath('userData') + '/config.json', true, true); return ins...
'use strict'; const process = require('process'); const JsonDB = require('node-json-db'); let instance = null; let app = null; /* To make the util runnable in both main and renderer process */ if (process.type === 'renderer') { app = require('electron').remote.app; } else { app = require('electron').app; } class ...
Make ConfigUtil runnable in both processes.
Make ConfigUtil runnable in both processes.
JavaScript
apache-2.0
zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-electron
--- +++ @@ -1,9 +1,17 @@ 'use strict'; -const {app} = require('electron').remote; +const process = require('process'); const JsonDB = require('node-json-db'); let instance = null; +let app = null; + +/* To make the util runnable in both main and renderer process */ +if (process.type === 'renderer') { + app = r...
9c117026f141ef68e06571afb5bffc90a29d22ee
app/scripts/services/eventservice.js
app/scripts/services/eventservice.js
'use strict'; /** * @ngdoc service * @name barteguidenMarkedsWebApp.eventService * @description * # eventService * Factory in the barteguidenMarkedsWebApp. */ angular.module('barteguidenMarkedsWebApp.services') .factory('Event', function ($resource) { return $resource('http://barteguiden.no/v2/events/:id',...
'use strict'; /** * @ngdoc service * @name barteguidenMarkedsWebApp.eventService * @description * # eventService * Factory in the barteguidenMarkedsWebApp. */ angular.module('barteguidenMarkedsWebApp.services') .factory('Event', function ($resource) { return $resource('http://localhost:4004/api/events/:id'...
Update the EventService to use the local server. The event response is now an array
Update the EventService to use the local server. The event response is now an array
JavaScript
apache-2.0
Studentmediene/Barteguiden,Studentmediene/Barteguiden
--- +++ @@ -9,13 +9,13 @@ */ angular.module('barteguidenMarkedsWebApp.services') .factory('Event', function ($resource) { - return $resource('http://barteguiden.no/v2/events/:id', { id: '@_id' }, { + return $resource('http://localhost:4004/api/events/:id', { id: '@_id' }, { update: { metho...
e418a810e6b20efceb472c3165a750894afc75f0
src/__tests__/server.device.js
src/__tests__/server.device.js
/** * Copyright 2018-present Facebook. * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * @format */ import Server from '../server.js'; import LogManager from '../fb-stubs/Logger'; import reducers from '../reducers/index.js'; import config...
/** * Copyright 2018-present Facebook. * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * @format */ import Server from '../server.js'; import LogManager from '../fb-stubs/Logger'; import reducers from '../reducers/index.js'; import config...
Apply oneworld-fix patch before testing connectivity
Apply oneworld-fix patch before testing connectivity Summary: Making the runner apply the necessary oneworld fix patch before running the tests. This can't be a long term solution, but at least means not getting that breaking change landed doesn't stop our tests from running. Since that change is only necessary for ...
JavaScript
mit
facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper
--- +++ @@ -27,7 +27,7 @@ return server.init(); }); -test.skip( +test( 'Device can connect successfully', done => { var testFinished = false;
fe59cb4ecf7371f775f793f72bb64e5fc7203c8a
transformers/engine.io/server.js
transformers/engine.io/server.js
'use strict'; /** * Minimum viable WebSocket server for Node.js that works through the primus * interface. * * @runat server * @api private */ module.exports = function server() { var Engine = require('engine.io').Server , Spark = this.Spark , primus = this.primus; this.service = new Engine(); //...
'use strict'; /** * Minimum viable WebSocket server for Node.js that works through the primus * interface. * * @runat server * @api private */ module.exports = function server() { var Engine = require('engine.io').Server , Spark = this.Spark , primus = this.primus; this.service = new Engine(); //...
Make sure we're listing to the right event
[minor] Make sure we're listing to the right event
JavaScript
mit
modulexcite/primus,primus/primus,primus/primus,basarat/primus,clanwqq/primus,STRML/primus,colinbate/primus,dercodebearer/primus,colinbate/primus,dercodebearer/primus,primus/primus,clanwqq/primus,dercodebearer/primus,colinbate/primus,modulexcite/primus,basarat/primus,STRML/primus,modulexcite/primus,beni55/primus,STRML/p...
--- +++ @@ -32,7 +32,7 @@ socket.write(data); }); - socket.on('end', spark.emits('end')); + socket.on('close', spark.emits('end')); socket.on('data', spark.emits('data')); });
18a8ea8eaac3b0ec2f1868d1b9961f3befd6df78
v3/buildUtils/webpack.plugins.js
v3/buildUtils/webpack.plugins.js
// webpack.plugins.js "use strict"; const ExtractTextPlugin = require("extract-text-webpack-plugin"); const UglifyJsWebpackPlugin = require("uglifyjs-webpack-plugin"); const config = { plugins: [ new ExtractTextPlugin({ filename: "[name].css" }), new UglifyJsWebpackPlugin({ uglifyOptions: {...
// webpack.plugins.js "use strict"; const ExtractTextPlugin = require("extract-text-webpack-plugin"); const UglifyJsWebpackPlugin = require("uglifyjs-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const CleanWebpackPlugin = require("clean-webpack-plugin"); const commonPaths = require("./...
Edit filename for ExtractTextPlugin. Added HtmlWebpackPlugin, CleanWebpackPlugin
Edit filename for ExtractTextPlugin. Added HtmlWebpackPlugin, CleanWebpackPlugin
JavaScript
mit
var-bin/webpack-training,var-bin/webpack-training,var-bin/webpack-training,var-bin/webpack-training
--- +++ @@ -4,13 +4,18 @@ const ExtractTextPlugin = require("extract-text-webpack-plugin"); const UglifyJsWebpackPlugin = require("uglifyjs-webpack-plugin"); +const HtmlWebpackPlugin = require("html-webpack-plugin"); +const CleanWebpackPlugin = require("clean-webpack-plugin"); + +const commonPaths = require("./co...
9130da003fb1623b8fc1eb6eeb8bb1573ac8dece
lib/World.js
lib/World.js
let path = require('path'), utils = require('./utils'), Region = require('./Region'); module.exports = class World { constructor(worldPath) { this.worldPath = worldPath; this.regionPath = path.join(worldPath, "region"); this.playerPath = path.join(worldPath, "playerdata"); t...
let fs = require('fs'), path = require('path'), utils = require('./utils'), Region = require('./Region'); module.exports = class World { constructor(worldPath) { this.worldPath = worldPath; this.regionPath = path.join(worldPath, "region"); this.playerPath = path.join(worldPath, ...
Add ability to return all regions
Add ability to return all regions This walks the region’s directory and returns a Region instance for each .mca file in that directory.
JavaScript
bsd-3-clause
thelonious/kld-mc-world
--- +++ @@ -1,4 +1,5 @@ -let path = require('path'), +let fs = require('fs'), + path = require('path'), utils = require('./utils'), Region = require('./Region'); @@ -21,4 +22,18 @@ return this.regions[regionFilename]; } + + getRegions() { + return fs.readdirSync(this.regionPat...
722bd5f6636d448c7b95d636e99726a4c21d9c9f
src/components/datagrid.js
src/components/datagrid.js
var fs = require('fs'); module.exports = function (app) { app.config([ 'formioComponentsProvider', function(formioComponentsProvider) { formioComponentsProvider.register('datagrid', { title: 'Data Grid', template: 'formio/components/datagrid.html', settings: { input: t...
var fs = require('fs'); module.exports = function (app) { app.config([ 'formioComponentsProvider', function(formioComponentsProvider) { formioComponentsProvider.register('datagrid', { title: 'Data Grid', template: 'formio/components/datagrid.html', settings: { input: t...
Add tree to fix formio-util dependency.
Add tree to fix formio-util dependency.
JavaScript
mit
formio/ngFormio,Kelsus/ngFormio,Kelsus/ngFormio
--- +++ @@ -9,6 +9,7 @@ template: 'formio/components/datagrid.html', settings: { input: true, + tree: true, components: [], tableView: true, label: '',
12eede4a14e74957d1ad86a9a83807442f90fdd4
lib/measure-avenir.js
lib/measure-avenir.js
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-typography/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-typography/tachyons-typography.min.css', 'utf8') var mod...
var _ = require('lodash') var fs = require('fs') var gzip = require('gzip-size') var filesize = require('filesize') var cssstats = require('cssstats') var module = require('tachyons-typography/package.json') var moduleCss = fs.readFileSync('node_modules/tachyons-typography/tachyons-typography.min.css', 'utf8') var mod...
Add site footer to each documentation generator
Add site footer to each documentation generator
JavaScript
mit
fenderdigital/css-utilities,fenderdigital/css-utilities,pietgeursen/pietgeursen.github.io,tachyons-css/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,getfrank/tachyons,topherauyeung/portfolio,cwonrails/tachyons,matyikriszta/moonlit-landing-page
--- +++ @@ -11,6 +11,7 @@ var srcCSS = fs.readFileSync('./src/_typography.css', 'utf8') var navDocs = fs.readFileSync('./templates/nav_docs.html', 'utf8') +var siteFooter = fs.readFileSync('./templates/footer.html', 'utf8') var template = fs.readFileSync('./templates/docs/measure/avenir-next/index.html', 'ut...
501491a520c617e3a9f759f31cdfc479f7e5fe96
hardware/index.js
hardware/index.js
var EventEmitter = require('events').EventEmitter; var hardware = module.exports = new EventEmitter(); //var e = nobleEmitter.connect(peripheralUuid, serviceUuid, characteristicUuid); var e = (process.env.DEVICE) ? require('./serial')(process.env.DEVICE) : require('./stdin-mock'); var commands = ...
var EventEmitter = require('events').EventEmitter; var hardware = module.exports = new EventEmitter(); var e = (process.env.DEVICE) ? require('./serial')(process.env.DEVICE) : require('./stdin-mock'); var commands = { 0: function () { emitScore('a'); // single click }, 1: function () { ...
Remove unused noble emitter code
Remove unused noble emitter code
JavaScript
mit
bekk/bekkboard,bekk/bekkboard,bekk/bekkboard,bekk/bekkboard
--- +++ @@ -1,7 +1,6 @@ var EventEmitter = require('events').EventEmitter; var hardware = module.exports = new EventEmitter(); -//var e = nobleEmitter.connect(peripheralUuid, serviceUuid, characteristicUuid); var e = (process.env.DEVICE) ? require('./serial')(process.env.DEVICE) :
9d5975acddb3dcf1851ea2c5bb2fc38ce7e42a5b
src/PublicApi.js
src/PublicApi.js
'use strict'; const Engine = require('./Engine'); const PublicSelect = require('./public/PublicSelect'); const PublicApiOptions = require('./PublicApiOptions'); const Explainer = require('./Explainer'); class PublicApi { /** * * @param {PublicApiOptions} options */ constructor(options = new PublicApiOptions) ...
'use strict'; const Engine = require('./Engine'); const PublicSelect = require('./public/PublicSelect'); const PublicApiOptions = require('./PublicApiOptions'); const Explainer = require('./Explainer'); class PublicApi { /** * * @param {PublicApiOptions} options */ constructor(options = new PublicApiOptions) ...
Add `version` field in exports
Add `version` field in exports
JavaScript
mit
avz/node-jl-sql-api
--- +++ @@ -51,4 +51,6 @@ DataSourceNotFound: require('./error/DataSourceNotFound') }; +PublicApi.version = require('../package.json').version; + module.exports = PublicApi;
30aa7fc0d67a049d0ce3c14856226a1c25d376e9
lib/http/endpoints/announce.js
lib/http/endpoints/announce.js
/** * Based on specs at: http://wiki.theory.org/BitTorrent_Tracker_Protocol */ function announceHandler(req, res) { console.log(req); res.end('stub'); } function register(server) { server.get('/announce', announceHandler); } exports.register = register;
/** * Based on specs at: http://wiki.theory.org/BitTorrent_Tracker_Protocol */ var async = require('async'); var httpUtil = require('util/http'); var flowCtrl = require('util/flow-ctrl'); var log = require('logmagic').local('bittorrent-tracker.lib.http.endpoints.announce'); function announceHandler(req, res) { i...
Return error if the method is not GET.
Return error if the method is not GET.
JavaScript
bsd-3-clause
Kami/node-bittorrent-tracker,Kami/node-bittorrent-tracker
--- +++ @@ -2,13 +2,23 @@ * Based on specs at: http://wiki.theory.org/BitTorrent_Tracker_Protocol */ +var async = require('async'); + +var httpUtil = require('util/http'); +var flowCtrl = require('util/flow-ctrl'); +var log = require('logmagic').local('bittorrent-tracker.lib.http.endpoints.announce'); + functi...
1623531764f7b044f9593f74e0c344c833ceac99
src/credit-card.js
src/credit-card.js
const { GraphQLScalarType } = require('graphql') const cc = require('credit-card') function parse (value) { const { card, validCardNumber, validCvv: validCVV, validExpiryMonth, validExpiryYear, isExpired } = cc.validate(getPayload()) if (validCardNumber) { return Object.assign(card, {...
const { GraphQLScalarType } = require('graphql') const cc = require('credit-card') function parse (value) { const { card, validCardNumber, validCvv: validCVV, validExpiryMonth, validExpiryYear, isExpired } = cc.validate(getPayload()) if (validCardNumber) { return Object.assign(card, {...
Remove spaces from credit card
Remove spaces from credit card
JavaScript
mit
mfix22/gnt
--- +++ @@ -23,13 +23,17 @@ switch (typeof value) { case 'string': case 'number': { - const cardType = cc.determineCardType(value.toString()) + const number = value.toString().replace(/\D/g, '') + const cardType = cc.determineCardType(number) return { - number...
cd998cac866f0e0e820099534f2ecfaf1038468c
app/assets/javascripts/nail_polish/utils/subview_manager.js
app/assets/javascripts/nail_polish/utils/subview_manager.js
NailPolish.SubviewManager = { renderEach: function (subviews) { this._subviews = subviews; _.each(subviews, function (view) { view.parent = view.parent || this.defaultParent(); view.repository = view.repository || this.repository; view.render(); }.bind(this)); }, remove: function() ...
NailPolish.SubviewManager = { renderEach: function (subviews) { this._subviews = subviews; _.each(subviews, function (view) { if(view) { view.parent = view.parent || this.defaultParent(); view.repository = view.repository || this.repository; view.render(); } }.bind(thi...
Add a gaurd clause for IE8 compatibility in subview rendering
Add a gaurd clause for IE8 compatibility in subview rendering
JavaScript
mit
socialchorus/nail_polish,socialchorus/nail_polish,socialchorus/nail_polish
--- +++ @@ -1,10 +1,13 @@ NailPolish.SubviewManager = { renderEach: function (subviews) { this._subviews = subviews; + _.each(subviews, function (view) { - view.parent = view.parent || this.defaultParent(); - view.repository = view.repository || this.repository; - view.render(); + if...
587386215a25ebd49761d336f97ab9b04b8dd1dc
lib/node_modules/@stdlib/math/base/special/dirchlet-eta/lib/index.js
lib/node_modules/@stdlib/math/base/special/dirchlet-eta/lib/index.js
'use strict'; // MODULES // var powm1 = require( '@stdlib/math/base/special/powm1' ); var zeta = require( '@stdlib/math/base/special/riemann-zeta' ); var LN2 = require( '@stdlib/math/constants/float64-ln2' ); // ETA // /** * FUNCTION: eta( s ) * Evaluates the Dirichlet eta function. * * @param {Number} s - input v...
'use strict'; // MODULES // var isnan = require( '@stdlib/math/base/utils/is-nan' ); var powm1 = require( '@stdlib/math/base/special/powm1' ); var zeta = require( '@stdlib/math/base/special/riemann-zeta' ); var LN2 = require( '@stdlib/math/constants/float64-ln2' ); // ETA // /** * FUNCTION: eta( s ) * Evaluates th...
Use base util is-nan to check for NaN value
Use base util is-nan to check for NaN value
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
--- +++ @@ -2,6 +2,7 @@ // MODULES // +var isnan = require( '@stdlib/math/base/utils/is-nan' ); var powm1 = require( '@stdlib/math/base/special/powm1' ); var zeta = require( '@stdlib/math/base/special/riemann-zeta' ); var LN2 = require( '@stdlib/math/constants/float64-ln2' ); @@ -17,7 +18,7 @@ * @returns {Nu...
858675611a4bffd130eea17cba35a698a093cb43
src/app/index.js
src/app/index.js
import { Base } from 'yeoman-generator'; import generatorArguments from './arguments'; import generatorOptions from './options'; import generatorSteps from './steps'; export default class ServicesGenerator extends Base { constructor(...args) { super(...args); Object.keys(generatorArguments).forEach(key => t...
import { Base } from 'yeoman-generator'; import generatorArguments from './arguments'; import generatorOptions from './options'; import generatorSteps from './steps'; export default class AppGenerator extends Base { constructor(...args) { super(...args); Object.keys(generatorArguments).forEach(key => this.a...
Rename export class for app generator
Rename export class for app generator
JavaScript
mit
italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,konstantinzolotarev/generator-trails,IncoCode/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,tnunes/generator-trails,jaumard/generator-trails
--- +++ @@ -3,7 +3,7 @@ import generatorOptions from './options'; import generatorSteps from './steps'; -export default class ServicesGenerator extends Base { +export default class AppGenerator extends Base { constructor(...args) { super(...args);
9ab94feb518c518816bd64a4e0e811dfedb3c428
katas/libraries/hamjest/assertThat.js
katas/libraries/hamjest/assertThat.js
// 1: assertThat // To do: make all tests pass, leave the assert lines unchanged! import { assertThat, equalTo, containsString, throws, returns, } from 'hamjest'; describe('The core function, `assertThat()`', () => { it('is a function', () => { const typeOfAssertThat = typeof assertThat; assertThat(type...
// 1: assertThat // To do: make all tests pass, leave the assert lines unchanged! import { assertThat, equalTo, containsString, throws, returns, } from 'hamjest'; describe('The core function, `assertThat()`', () => { it('is a function', () => { const typeOfAssertThat = typeof assertThat; assertThat(type...
Prepare for making it a kata.
Prepare for making it a kata.
JavaScript
mit
tddbin/katas,tddbin/katas,tddbin/katas
--- +++ @@ -13,8 +13,9 @@ }); describe('requires at least two params', () => { it('1st: the actual value', () => { + const actual = 'actual'; const expected = equalTo('actual'); - assertThat('actual', expected); + assertThat(actual, expected); }); it('2nd: a matcher for the ...
9e01d0685c4299920360389c255c14c3a59477ce
public/javascripts/application.js
public/javascripts/application.js
// Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults
// Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults if (!Date.now) { Date.now = function() { return (new Date()).getTime(); }; } function updateClock() { var el = $("uhr"); var time = new Date(); va...
Make the clock on the frontpage work.
Make the clock on the frontpage work.
JavaScript
mit
bt4y/bulletin_board,bt4y/bulletin_board
--- +++ @@ -1,2 +1,34 @@ // Place your application-specific JavaScript functions and classes here // This file is automatically included by javascript_include_tag :defaults +if (!Date.now) { + Date.now = function() { + return (new Date()).getTime(); + }; +} + +function updateClock() { + var el = $("uh...
7cd25460f396d904fecb0c877f8ea06619994c38
blueprints/ember-websockets/index.js
blueprints/ember-websockets/index.js
module.exports = { normalizeEntityName: function() {}, afterInstall: function() { return this.addBowerPackageToProject('uri.js'); } };
module.exports = { normalizeEntityName: function() {}, afterInstall: function() { var installContext = this; return this.addPackageToProject('mock-socket').then(function() { return installContext.addBowerPackageToProject('urijs'); }); } };
Fix install issue with ember install ember-websockets
Fix install issue with ember install ember-websockets
JavaScript
mit
thoov/ember-websockets,thoov/ember-websockets
--- +++ @@ -2,6 +2,10 @@ normalizeEntityName: function() {}, afterInstall: function() { - return this.addBowerPackageToProject('uri.js'); + var installContext = this; + + return this.addPackageToProject('mock-socket').then(function() { + return installContext.addBowerPackageToProject('urijs'); +...
21ec0674ea25ea1d3df33fec7b825644162f1b58
src/components/EditActivityForm.js
src/components/EditActivityForm.js
import React, { Component, PropTypes } from 'react'; class EditActivityForm extends Component { componentDidMount() { this.description.focus(); } updateActivity(e) { e.preventDefault(); const activity = { description: this.description.value, timestamp: this.props.timestamp, } ...
import React, { Component, PropTypes } from 'react'; import { getDescriptionAndTags, buildDescriptionAndTags } from '../helpers'; class EditActivityForm extends Component { componentDidMount() { this.description.focus(); } updateActivity(e) { e.preventDefault(); const { description, tags } = getDes...
Edit tags in edit form input
Edit tags in edit form input
JavaScript
mit
mknudsen01/today,mknudsen01/today
--- +++ @@ -1,4 +1,5 @@ import React, { Component, PropTypes } from 'react'; +import { getDescriptionAndTags, buildDescriptionAndTags } from '../helpers'; class EditActivityForm extends Component { componentDidMount() { @@ -7,8 +8,12 @@ updateActivity(e) { e.preventDefault(); + + const { descripti...
cb33b14464bf23b36f0d1499c7a4cfde95f85f80
src/actions/Placeholder.js
src/actions/Placeholder.js
import { Action } from './../lib/Action'; import { Util } from '@aegis-framework/artemis'; export class Placeholder extends Action { static matchString ([ action ]) { return action === '$'; } constructor ([action, name]) { super (); this.name = name; this.action = this.engine.$ (name); } willApply () ...
import { Action } from './../lib/Action'; import { Util } from '@aegis-framework/artemis'; export class Placeholder extends Action { static matchString ([ action ]) { return action === '$'; } constructor ([action, name, ...args]) { super (); this.name = name; this.action = this.engine.$ (name); this.ar...
Allow passing arguments to dynamic placeholders
Allow passing arguments to dynamic placeholders
JavaScript
mit
MonogatariVN/Monogatari,MonogatariVN/Monogatari,Monogatari/Monogatari
--- +++ @@ -7,16 +7,17 @@ return action === '$'; } - constructor ([action, name]) { + constructor ([action, name, ...args]) { super (); this.name = name; this.action = this.engine.$ (name); + this.arguments = args; } willApply () { if (this.name.indexOf ('_') === 0) { - return Util.callA...
e3c1f2162caf735f6ba8324d698445929ecac248
js/application.js
js/application.js
/*global document, Reveal, carousel*/ (function(document, Reveal, carousel){ 'use strict'; Reveal.addEventListener('carousel', function(){ var container = document.getElementById('carousel'); carousel.show(['aap', 'noot', 'mies'], container); }); })(document, Reveal, carousel);
/*global document, Reveal, carousel*/ (function(document, Reveal, carousel){ 'use strict'; Reveal.addEventListener('carousel', function(){ var container = document.getElementById('carousel'); var languages = [ 'Ada', 'BBx', 'C', 'CFML', ...
Use JVM languages for carousel
Use JVM languages for carousel
JavaScript
mit
dvberkel/polyglot-programming-on-jvm,dvberkel/polyglot-programming-on-jvm
--- +++ @@ -4,7 +4,28 @@ Reveal.addEventListener('carousel', function(){ var container = document.getElementById('carousel'); + var languages = [ + 'Ada', + 'BBx', + 'C', + 'CFML', + 'Clojure', + 'Common Lisp', + 'Groo...
d30faa1e9f1e76715fec1f026d712ea11576af58
src/component.js
src/component.js
import { select, local } from "d3-selection"; var componentLocal = local(), noop = function (){}; export default function (tagName, className){ var create, render = noop, destroy = noop, selector = className ? "." + className : tagName; function component(selection, props){ var update =...
import { select, local } from "d3-selection"; var componentLocal = local(), noop = function (){}; export default function (tagName, className){ var create, render = noop, destroy = noop, selector = className ? "." + className : tagName; function component(selection, props){ var update =...
Unify cases of create and no create
Unify cases of create and no create
JavaScript
bsd-3-clause
curran/d3-component
--- +++ @@ -16,39 +16,31 @@ enter = update.enter().append(tagName).attr("class", className); enter.each(function (){ - componentLocal.set(this, { - selection: select(this) + var local = componentLocal.set(this, { + selection: select(this), + state: {}, + render: n...
f49a0fb3b6271061be2808495cbbb180770fff60
app/renderer/components/libraries/channel-request.js
app/renderer/components/libraries/channel-request.js
var ChannelRequest, Promise, refreshProviderObject, stopLongPolling, timeoutID; Promise = require('bluebird'); refreshProviderObject = null; ChannelRequest = (function() { function ChannelRequest(channelName1, callback1) { this.channelName = channelName1; this.callback = callback1; this.stopLongPollin...
var ChannelRequest, Promise, refreshProviderObject, stopLongPolling, timeoutID; Promise = require('bluebird'); refreshProviderObject = null; ChannelRequest = (function() { function ChannelRequest(channelName1, callback1) { this.channelName = channelName1; this.callback = callback1; this.stopLongPollin...
Return an error in ChannelRequest library
Return an error in ChannelRequest library
JavaScript
mit
willmendesneto/build-checker-app,willmendesneto/build-checker-app
--- +++ @@ -22,7 +22,7 @@ return new Promise(function(resolve, reject) { return callback(channelName, function(err) { if (err) { - reject(err); + reject(new Error(err)); } return resolve(); }); @@ -45,7 +45,7 @@ return; } }).catch(fu...
62bf3607a8191925a2eb3b4a71693234dcaf5646
src/Oro/Bundle/UserBundle/Resources/public/js/models/role/access-levels-collection.js
src/Oro/Bundle/UserBundle/Resources/public/js/models/role/access-levels-collection.js
define(function(require) { 'use strict'; var AccessLevelsCollection; var _ = require('underscore'); var RoutingCollection = require('oroui/js/app/models/base/routing-collection'); AccessLevelsCollection = RoutingCollection.extend({ routeDefaults: { routeName: 'oro_security_acce...
define(function(require) { 'use strict'; var AccessLevelsCollection; var _ = require('underscore'); var RoutingCollection = require('oroui/js/app/models/base/routing-collection'); AccessLevelsCollection = RoutingCollection.extend({ routeDefaults: { routeName: 'oro_security_acce...
Fix issues found on demo
BAP-10897: Fix issues found on demo
JavaScript
mit
geoffroycochard/platform,orocrm/platform,trustify/oroplatform,geoffroycochard/platform,trustify/oroplatform,orocrm/platform,Djamy/platform,orocrm/platform,trustify/oroplatform,geoffroycochard/platform,Djamy/platform,Djamy/platform
--- +++ @@ -12,7 +12,7 @@ parse: function(resp, options) { return _.map(_.pairs(resp), function(item) { - return {access_level: item[0], access_level_label: item[1]}; + return {access_level: parseInt(item[0], 10), access_level_label: item[1]}; }); ...
07279ef62b8c745f7d6d5e57f6166cd6125ee1c1
server/discord/cogs/ping/index.js
server/discord/cogs/ping/index.js
const client = require('./../../'); module.exports.info = { aliases: [ 'ping', 'pong' ] }; module.exports.command = message => message.channel.createMessage(`\`\`\`\n${client.shards.map(shard => `Shard ${shard.id} | ${shard.latency}ms`).join('\n')}\n\`\`\``);
const client = require('./../../'); module.exports.info = { aliases: [ 'ping', 'pong' ] }; module.exports.command = (message) => { let s = 0; if (message.channel.guild) { s = client.guildShardMap[message.channel.guild.id]; } message.channel.createMessage(`\`\`\`\n${client.shards.map(shard => `${s === sh...
Add an arrow next to what shard the bot is on
Add an arrow next to what shard the bot is on
JavaScript
mit
moustacheminer/discordmail,moustacheminer/discordmail
--- +++ @@ -7,5 +7,12 @@ ] }; -module.exports.command = message => - message.channel.createMessage(`\`\`\`\n${client.shards.map(shard => `Shard ${shard.id} | ${shard.latency}ms`).join('\n')}\n\`\`\``); +module.exports.command = (message) => { + let s = 0; + + if (message.channel.guild) { + s = client.guildShard...
56b40b666ecedb2c4df37e67b8216682582e77e7
src/components/Resource.js
src/components/Resource.js
import React, { PropTypes } from 'react' import SVG from 'svg-inline-react' const Resource = ({ icon, value }) => <li> <SVG src={icon}/> <span>{value}</span> </li> Resource.propTypes = { icon: PropTypes.object.isRequired, value: PropTypes.string.isRequired, } export default Resource
import React, { PropTypes } from 'react' import SVG from 'svg-inline-react' const Resource = ({ icon, value }) => <li> <SVG src={icon}/> <span>{value}</span> </li> Resource.propTypes = { icon: PropTypes.string.isRequired, value: PropTypes.number.isRequired, } export default Resource
Fix warnings with wrong PropTypes
Fix warnings with wrong PropTypes
JavaScript
mit
albertoblaz/lord-commander,albertoblaz/lord-commander
--- +++ @@ -8,8 +8,8 @@ </li> Resource.propTypes = { - icon: PropTypes.object.isRequired, - value: PropTypes.string.isRequired, + icon: PropTypes.string.isRequired, + value: PropTypes.number.isRequired, } export default Resource
08bdcfbbb82e1c6dd0fc6e41d17f6211a2adc1bf
app/components/browser/Browser.js
app/components/browser/Browser.js
import React from 'react' import ErrorMessage from './ErrorMessage' import Header from './Header' import BrowserStack from './BrowserStack' import BrowserTabs from './BrowserTabs' import CorpusStatusWatcher from '../CorpusStatusWatcher' class Browser extends React.Component { render () { return ( <CorpusSt...
import React from 'react' import { connect } from 'react-redux' import ErrorMessage from './ErrorMessage' import Header from './Header' import BrowserStack from './BrowserStack' import BrowserTabs from './BrowserTabs' import CorpusStatusWatcher from '../CorpusStatusWatcher' import Spinner from '../Spinner' class Brows...
Fix proptypes error when rendering too soon after corpus is selected
fix(browser): Fix proptypes error when rendering too soon after corpus is selected
JavaScript
agpl-3.0
medialab/hyphe-browser,medialab/hyphe-browser
--- +++ @@ -1,12 +1,19 @@ import React from 'react' +import { connect } from 'react-redux' import ErrorMessage from './ErrorMessage' import Header from './Header' import BrowserStack from './BrowserStack' import BrowserTabs from './BrowserTabs' import CorpusStatusWatcher from '../CorpusStatusWatcher' +import Sp...
667625bff0a81ee0d420f9ada44d7d95bfbffa10
lib/directives.js
lib/directives.js
var directives = { TOC: function(text) { var toc = require('markdown-toc'); return toc(text).content; } }; module.exports = { directiveMap: directives };
var directives = { TOC: function(text) { var toc = require('markdown-toc'); text = text.split('\n').slice(1).join('\n'); return toc(text, {slugify: function(str) { return str.toLowerCase().replace(/[^\w]+/g, '-'); }}).content; } }; module.exports = { directiveMap: directives };
Fix TOC anchor tags bug
Fix TOC anchor tags bug
JavaScript
mit
claudioc/jingo,claudioc/jingo
--- +++ @@ -1,7 +1,10 @@ var directives = { TOC: function(text) { var toc = require('markdown-toc'); - return toc(text).content; + text = text.split('\n').slice(1).join('\n'); + return toc(text, {slugify: function(str) { + return str.toLowerCase().replace(/[^\w]+/g, '-'); + }}).content; }...
87b3e5b3a0ac04537237208a7535a937109e1d13
src/hmac.js
src/hmac.js
// HMAC - keyed-Hash Message Authentication Code function hmac(hash, size, digest, data, hkey, block) { var i, akey, ipad, opad; data = self.Encoder(data).trunc(); hkey = self.Encoder(hkey).trunc(); if (hkey.length > block) { akey = hash(digest, hkey).trunc(); } else { akey = self.Encoder(hkey)....
// HMAC - keyed-Hash Message Authentication Code function hmac(hash, size, digest, data, hkey, block) { var i, akey, ipad, opad; if (hkey.length > block) { akey = hash(digest, hkey).trunc(); } else { akey = self.Encoder(hkey).trunc(); } for (i = 0, ipad = [], opad = []; i < block; i += 1) { ...
Remove excessive Encoder calls in HMAC -- 'ready' should already have been applied.
Remove excessive Encoder calls in HMAC -- 'ready' should already have been applied.
JavaScript
mit
coiscir/jsdigest,coiscir/jsdigest
--- +++ @@ -1,9 +1,6 @@ // HMAC - keyed-Hash Message Authentication Code function hmac(hash, size, digest, data, hkey, block) { var i, akey, ipad, opad; - - data = self.Encoder(data).trunc(); - hkey = self.Encoder(hkey).trunc(); if (hkey.length > block) { akey = hash(digest, hkey).trunc();
a832aeea3b219b2e40cfa6065c0a94dc19b76a3b
js/components/layouts/Header.react.js
js/components/layouts/Header.react.js
var React = require('react'); var title = "Orion's Belt BattleGrounds"; var Router = require('react-router'); var Route = Router.Route, DefaultRoute = Router.DefaultRoute, Link=Router.Link, RouteHandler = Router.RouteHandler; var CurrentUserMenu = require('../users/CurrentUserMenu.react.js'); var Header =...
var React = require('react'); var title = "Orion's Belt BattleGrounds"; var Router = require('react-router'); var Route = Router.Route, DefaultRoute = Router.DefaultRoute, Link=Router.Link, RouteHandler = Router.RouteHandler; var CurrentUserMenu = require('../users/CurrentUserMenu.react.js'); var Header =...
Make brand link a router link
Make brand link a router link
JavaScript
mit
orionsbelt-battlegrounds/frontend,orionsbelt-battlegrounds/frontend,orionsbelt-battlegrounds/frontend
--- +++ @@ -12,7 +12,7 @@ <div className="navbar navbar-default navbar-fixed-top"> <div className="container"> <div className="navbar-header"> - <a href="/" className="navbar-brand">{title}</a> + <Link to="root" className="navbar-brand">{title}</Link> <but...