commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
5b30c625b6d59e087341259174e78b97db07eb4a
lib/nb-slug.js
lib/nb-slug.js
'use strict'; var diacritics = require('./diacritics'); function nbSlug(name) { var diacriticsMap = {}; for (var i = 0; i < diacritics.length; i++) { var letters = diacritics[i].letters; for (var j = 0; j < letters.length ; j++) { diacriticsMap[letters[j]] = diacritics[i].base; } } functi...
'use strict'; var diacritics = require('./diacritics'); function nbSlug(name) { var diacriticsMap = {}; for (var i = 0; i < diacritics.length; i++) { var letters = diacritics[i].letters; for (var j = 0; j < letters.length ; j++) { diacriticsMap[letters[j]] = diacritics[i].base; } } functi...
Remove -, !, + and ~ from the slug too
Remove -, !, + and ~ from the slug too
JavaScript
unlicense
nurimba/nb-slug,nurimba/nb-slug
55ab768d9fd5adf4fbefa3db2d121fdbe6c840f4
resources/js/modules/accordion.js
resources/js/modules/accordion.js
import 'accordion/src/accordion.js'; (function() { "use strict"; document.querySelectorAll('.accordion').forEach(function(item) { new Accordion(item, { onToggle: function(target){ // Only allow one accordion item open at time target.accordion.folds.forEach(f...
import 'accordion/src/accordion.js'; (function() { "use strict"; document.querySelectorAll('.accordion').forEach(function(item) { new Accordion(item, { onToggle: function(target){ // Only allow one accordion item open at time target.accordion.folds.forEach(f...
Set the role to button instead of tab
Set the role to button instead of tab
JavaScript
mit
waynestate/base-site,waynestate/base-site
2a8170bd4f0ed6fad4dcd8441c2e8d162fbc4431
simple-todos.js
simple-todos.js
if (Meteor.isClient) { // This code only runs on the client Template.body.helpers({ tasks: [ { text: "This is task 1" }, { text: "This is task 2" }, { text: "This is task 3" } ] }); }
Tasks = new Mongo.Collection("tasks"); if (Meteor.isClient) { // This code only runs on the client Template.body.helpers({ tasks: function () { return Tasks.find({}); } }); }
Make tasks a MongoDB collection.
Make tasks a MongoDB collection.
JavaScript
mit
chooie/meteor-todo
c5ca7c86331bb349c4bd3ccd7d5c12cdce0fa924
utils/getOutputPath.js
utils/getOutputPath.js
const path = require('path'); const getOptions = require('./getOptions'); module.exports = (options, jestRootDir) => { // Override outputName and outputDirectory with outputFile if outputFile is defined let output = options.outputFile; if (!output) { // Set output to use new outputDirectory and fallback on ...
const path = require('path'); const getOptions = require('./getOptions'); module.exports = (options, jestRootDir) => { // Override outputName and outputDirectory with outputFile if outputFile is defined let output = options.outputFile; if (!output) { // Set output to use new outputDirectory and fallback on ...
Replace <rootDir> prior to path.join().
Replace <rootDir> prior to path.join(). This allows outputDirectory to be formatted like <rootDir>/../some/dir. In that case, path.join() assumes the .. cancels out the <rootDir>, which seems entirely reasonable. Unfortunately, it means the final value is some/dir, and that ends up rooted at process.cwd(), which doesn...
JavaScript
apache-2.0
palmerj3/jest-junit
c21d52d96ec21d9a43da3467ee66364619e1e3f4
app/containers/FlagView.js
app/containers/FlagView.js
import React from 'react'; import { connect } from 'react-redux'; import admin from '../utils/admin'; import Concept from '../components/Concept'; const FlagView = React.createClass({ componentWillMount() { this.props.fetchFlags(); }, render() { const { flags } = this.props; return ( <div c...
import React from 'react'; import { connect } from 'react-redux'; import admin from '../utils/admin'; import Concept from '../components/Concept'; const FlagView = React.createClass({ componentWillMount() { this.props.fetchFlags(); }, render() { const { flags } = this.props; return ( <div c...
Add missing key to flags view to remove warning
Add missing key to flags view to remove warning
JavaScript
mit
transparantnederland/relationizer,transparantnederland/relationizer,waagsociety/tnl-relationizer,transparantnederland/browser,transparantnederland/browser,waagsociety/tnl-relationizer
9730bfb3db49d210d496e2289bf90154ab497612
scripts/components/Footer.js
scripts/components/Footer.js
import { format } from 'date-fns'; import React from 'react' import { Navigation } from './blocks/Navigation' import styles from './Main.css' const socialLinks = [ { to: 'https://stackoverflow.com/story/usehotkey', title: 'StackOverflow' }, // { // to: 'https://yadi.sk/d/QzyQ04br3HX...
import { format } from 'date-fns'; import React from 'react' import { Navigation } from './blocks/Navigation' import styles from './Main.css' const socialLinks = [ { to: 'https://stackoverflow.com/story/usehotkey', title: 'StackOverflow' }, // { // to: 'https://yadi.sk/d/QzyQ04br3HX...
Remove first year from footer
[change] Remove first year from footer
JavaScript
mit
usehotkey/my-personal-page,usehotkey/my-personal-page,usehotkey/my-personal-page,usehotkey/my-personal-page
ad207a87639cef156201b8e2a208f38c51e93c50
src/js/math.js
src/js/math.js
import THREE from 'three'; export function randomPointOnSphere( vector = new THREE.Vector3() ) { const theta = 2 * Math.PI * Math.random(); const u = 2 * Math.random() - 1; const v = Math.sqrt( 1 - u * u ); return vector.set( v * Math.cos( theta ), v * Math.sin( theta ), u ); }
import THREE from 'three'; export function randomPointOnSphere( vector = new THREE.Vector3() ) { const theta = 2 * Math.PI * Math.random(); const u = 2 * Math.random() - 1; const v = Math.sqrt( 1 - u * u ); return vector.set( v * Math.cos( theta ), v * Math.sin( theta ), u ); } export function ...
Add 1D lerp(), inverseLerp(), and map().
Add 1D lerp(), inverseLerp(), and map().
JavaScript
mit
razh/flying-machines,razh/flying-machines
e057cdfb71ccd2f7d70157ccac728736fbcad450
tests/plugins/front-matter.js
tests/plugins/front-matter.js
import test from 'ava'; import {fromString, fromNull, fromStream} from '../helpers/pipe'; import fm from '../../lib/plugins/front-matter'; test('No Compile - null', t => { return fromNull(fm) .then(output => { t.is(output, '', 'No output'); }); }); test('Error - is stream', t => { t.throws(fromStrea...
import test from 'ava'; import {fromString} from '../helpers/pipe'; import plugin from '../helpers/plugin'; import fm from '../../lib/plugins/front-matter'; test('Extracts Front Matter', t => { const input = `--- foo: bar baz: - qux - where - waldo more: good: stuff: - lives: here - and: here...
Add tests for actual FM
:white_check_mark: Add tests for actual FM
JavaScript
mit
Snugug/gulp-armadillo,kellychurchill/gulp-armadillo
2aec558cb2518426284b0a6bca79ab87178a5ccb
TrackedViews.js
TrackedViews.js
/** * @flow */ import React, { Component, Text, View, } from 'react-native'; import {registerView, unregisterView} from './ViewTracker' /** * Higher-order component that turns a built-in View component into a component * that is tracked with the key specified in the viewKey prop. If the viewKey * pr...
/** * @flow */ import React, { Component, Text, View, } from 'react-native'; import {registerView, unregisterView} from './ViewTracker' /** * Higher-order component that turns a built-in View component into a component * that is tracked with the key specified in the viewKey prop. If the viewKey * pr...
Fix crash when dragging definitions
Fix crash when dragging definitions I was accidentally updating the view key for a view, and the tracked view code couldn't handle prop changes.
JavaScript
mit
alangpierce/LambdaCalculusPlayground,alangpierce/LambdaCalculusPlayground,alangpierce/LambdaCalculusPlayground
11215560382e5c0b4484019dbf8541351337f7fb
src/mixins/size.js
src/mixins/size.js
draft.mixins.size = { // Get/set the element's width & height size(width, height) { return this.prop({ width: draft.types.length(width), height: draft.types.length(height) // depth: draft.types.length(depth) }); } };
draft.mixins.size = { // Get/set the element's width & height size(width, height) { return this.prop({ width: draft.types.length(width), height: draft.types.length(height) // depth: draft.types.length(depth) }); }, scale(width, height) { return this.prop({ width: this.prop('...
Add scale() function for relative sizing
Add scale() function for relative sizing
JavaScript
mit
D1SC0tech/draft.js,D1SC0tech/draft.js
b24cd5018185dc2ef35598a7cae863322d89c8c7
app/scripts/fixBackground.js
app/scripts/fixBackground.js
'use strict'; var fixBackground = function(){ var backgroundImage = document.getElementById('page-background-img'); if(window.innerHeight >= backgroundImage.height) { backgroundImage.style.height = '100%'; backgroundImage.style.width = null; } if(window.innerWidth >= backgroundImage.wid...
'use strict'; var fixBackground = function(){ var backgroundImage = document.getElementById('page-background-img'); if(window.innerHeight >= backgroundImage.height) { backgroundImage.style.height = '100%'; backgroundImage.style.width = null; } if(window.innerWidth >= backgroundImage.wid...
Disable image grab event for background
Disable image grab event for background
JavaScript
mit
Pozo/elvira-redesign
31fe75787678465efcfd10dafbb9c368f72d9758
hbs-builder.js
hbs-builder.js
define(["handlebars-compiler"], function (Handlebars) { var buildMap = {}, templateExtension = ".hbs"; return { // http://requirejs.org/docs/plugins.html#apiload load: function (name, parentRequire, onload, config) { // Get the template extension. var ext = (config.hbs && config.hbs.tem...
define(["handlebars-compiler"], function (Handlebars) { var buildMap = {}, templateExtension = ".hbs"; return { // http://requirejs.org/docs/plugins.html#apiload load: function (name, parentRequire, onload, config) { // Get the template extension. var ext = (config.hbs && config.hbs.tem...
Include handlebars module in build process
Include handlebars module in build process
JavaScript
mit
designeng/requirejs-hbs,designeng/requirejs-hbs,designeng/requirejs-hbs
38080adc1302b88af2c5d19d70720b53d4f464a7
jest.config.js
jest.config.js
/* @flow */ module.exports = { coverageDirectory: 'reports/coverage', coveragePathIgnorePatterns: [ '/node_modules/', '/packages/mineral-ui-icons', '/website/' ], moduleNameMapper: { '.*react-docgen-loader.*': '<rootDir>/utils/emptyObject.js', '.(md|svg)$': '<rootDir>/utils/emptyString.js' ...
/* @flow */ module.exports = { coverageDirectory: 'reports/coverage', coveragePathIgnorePatterns: [ '/node_modules/', '/packages/mineral-ui-icons', '/website/' ], moduleNameMapper: { '.*react-docgen-loader.*': '<rootDir>/utils/emptyObject.js', '.(md|svg)$': '<rootDir>/utils/emptyString.js' ...
Update testURL to accommodate JSDOM update
chore(jest): Update testURL to accommodate JSDOM update - See https://github.com/jsdom/jsdom/issues/2304
JavaScript
apache-2.0
mineral-ui/mineral-ui,mineral-ui/mineral-ui
f9b3837c53bb0572c95f2f48b6855250870ea2f1
js/Landing.js
js/Landing.js
import React from 'react' const Landing = React.createClass({ render () { return ( <div className='landing'> <h1>svideo</h1> <input type='text' placeholder='Search' /> <a>or Browse All</a> </div> ) } }) export default Landing
import React from 'react' import { Link } from 'react-router' const Landing = React.createClass({ render () { return ( <div className='landing'> <h1>svideo</h1> <input type='text' placeholder='Search' /> <Link to='/search'>or Browse All</Link> </div> ) } }) export defau...
Make the "or Browse All" button a link that takes you to /search route
Make the "or Browse All" button a link that takes you to /search route
JavaScript
mit
galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka
24d6b502081b81eff9ce1775002015f59ee3ccba
blueprints/component/index.js
blueprints/component/index.js
'use strict' module.exports = { description: "A basic React component", generateReplacements(args) { let propTypes = ""; let defaultProps = ""; if(args.length) { propTypes = "__name__.propTypes = {"; defaultProps = "\n getDefaultProps: function() {"; ...
'use strict' module.exports = { description: "A basic React component", generateReplacements(args) { let propTypes = ""; let defaultProps = ""; if(args.length) { propTypes = "__name__.propTypes = {"; defaultProps = "\n getDefaultProps: function() {"; ...
Check for badly formatted props
Check for badly formatted props
JavaScript
mit
reactcli/react-cli,reactcli/react-cli
3063e971479ca50e3e7d96d89db26688f5f74375
hobbes/vava.js
hobbes/vava.js
var vavaClass = require('./vava/class'); var vavaMethod = require('./vava/method'); var vavaType = require('./vava/type'); exports.scope = require('./vava/scope'); // TODO automate env assembly exports.env = { VavaClass : vavaClass.VavaClass, VavaMethod : vavaMethod.VavaMethod, TypedVariable : vavaType.TypedVa...
var utils = (typeof hobbes !== 'undefined' && hobbes.utils) || require('./utils'); var vavaClass = require('./vava/class'); var vavaMethod = require('./vava/method'); var vavaType = require('./vava/type'); exports.scope = require('./vava/scope'); exports.env = utils.merge( vavaClass, vavaMethod, vavaType );
Add automatic assembly of env
Add automatic assembly of env
JavaScript
mit
knuton/hobbes,knuton/hobbes,knuton/hobbes,knuton/hobbes
2e99a372b401cdfb8ecaaccffd3f8546c83c7da5
api/question.js
api/question.js
var bodyParser = require('body-parser'); var express = require('express'); var database = require('../database'); var router = express.Router(); router.get('/', function(req, res) { database.Question.find({}, function(err, questions) { if (err) { res.sendStatus(500); } else { ...
var bodyParser = require('body-parser'); var express = require('express'); var database = require('../database'); var router = express.Router(); router.get('/', function(req, res) { database.Question.find({}, function(err, questions) { if (err) { res.status(500); } else { ...
Fix error with resending response.
Fix error with resending response.
JavaScript
apache-2.0
skalmadka/TierUp,skalmadka/TierUp
8d27f66f4b4c61ddeb95e5107a616b937eb06dff
app/core/app.js
app/core/app.js
'use strict'; var bowlingApp = angular.module('bowling', ['ngRoute']); bowlingApp.config(['$routeProvider', function($routeProvider) { $routeProvider.otherwise({ redirectTo: '/main' }); }]); bowlingApp.factory("dataProvider", ['$q', function ($q) { var dataLoaded = false; ...
'use strict'; var bowlingApp = angular.module('bowling', ['ngRoute']); bowlingApp.config(['$routeProvider', function($routeProvider) { $routeProvider.otherwise({ redirectTo: '/main' }); }]); bowlingApp.factory("dataProvider", ['$q', function ($q) { var dataLoaded = false; ...
Change data directory back to test data.
Change data directory back to test data.
JavaScript
mit
MeerkatLabs/bowling-visualization
4f429972826a4a1892969f11bef49f4bae147ac3
webpack.config.base.js
webpack.config.base.js
'use strict' var webpack = require('webpack') var reactExternal = { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' } module.exports = { externals: { 'react': reactExternal }, module: { loaders: [ { test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ } ...
'use strict' var webpack = require('webpack') var reactExternal = { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' } var reduxExternal = { root: 'Redux', commonjs2: 'redux', commonjs: 'redux', amd: 'redux' } var reactReduxExternal = { root: 'ReactRedux', commonjs2: 'react-redu...
Add Redux and React Redux as external dependencies
Add Redux and React Redux as external dependencies
JavaScript
mit
erikras/redux-form,erikras/redux-form
849ae9172c21704c61ae6a84affdef0a309fcb4b
app/controllers/application.js
app/controllers/application.js
import Ember from 'ember'; export default Ember.Controller.extend({ sitemap: { nodes: [ { link: 'index', title: 'Home', children: null }, { link: null, title: 'Admin panel', children: [ { link: 'suggestionTypes', ...
import Ember from "ember"; export default Ember.Controller.extend({ sitemap: { nodes: [ { link: "index", title: "Home" }, { title: "Admin panel", children: [ { link: "suggestionTypes", title: "Suggestion Types" }, { link: "users", title: "Application Users" } ...
Add link to geolocation example into sitemap
Add link to geolocation example into sitemap
JavaScript
mit
Flexberry/flexberry-ember-demo,Flexberry/flexberry-ember-demo,Flexberry/flexberry-ember-demo
421aba98815a8f3d99fa78daf1d6ec9315712966
zombie/proxy/server.js
zombie/proxy/server.js
var net = require('net'); var zombie = require('zombie'); // Defaults var ping = 'pong' var browser = null; var ELEMENTS = []; // // Store global client states indexed by ZombieProxyClient (memory address): // // { // 'CLIENTID': [X, Y] // } // // ...where X is some zombie.Browser instance... // // ...and Y is a pe...
var net = require('net'); var Browser = require('zombie'); // Defaults var ping = 'pong' var browser = null; var ELEMENTS = []; // // Store global client states indexed by ZombieProxyClient (memory address): // // { // 'CLIENTID': [X, Y] // } // // ...where X is some zombie.Browser instance... // // ...and Y is a p...
Make the sever.js work with zombie 2
Make the sever.js work with zombie 2
JavaScript
mit
ryanpetrello/python-zombie,ryanpetrello/python-zombie
fe6247d1ade209f1ebb6ba537652569810c4d77a
lib/adapter.js
lib/adapter.js
/** * Request adapter. * * @package cork * @author Andrew Sliwinski <andrew@diy.org> */ /** * Dependencies */ var _ = require('lodash'), async = require('async'), request = require('request'); /** * Executes a task from the adapter queue. * * @param {Object} Task * * @return {Object} */ v...
/** * Request adapter. * * @package cork * @author Andrew Sliwinski <andrew@diy.org> */ /** * Dependencies */ var _ = require('lodash'), async = require('async'), request = require('request'); /** * Executes a task from the adapter queue. * * @param {Object} Task * * @return {Object} */ v...
Remove queue object from the task
Remove queue object from the task
JavaScript
mit
thisandagain/cork
7b6d8f66fd1c2130d10ba7013136ecc3f25d6c3b
src/main/webapp/scripts/main.js
src/main/webapp/scripts/main.js
$().ready(() => { loadContentSection().then(() =>{ $("#loader").addClass("hide"); $("#real-body").removeClass("hide"); $("#real-body").addClass("body"); $(".keyword").click(function() { $(this).addClass("active"); $(".base").hide(200); $("#real-body").addClass("focus"); }); ...
$().ready(() => { loadContentSection().then(() =>{ $("#loader").addClass("hide"); $("#real-body").removeClass("hide"); $("#real-body").addClass("body"); $(".keyword").click(function() { $(this).addClass("active"); $(".base").hide(200); $("#real-body").addClass("focus"); }); ...
Add js to perform url replacement
Add js to perform url replacement
JavaScript
apache-2.0
googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020
2de06af9887b6941f73a6610a5485d98cf7f353f
lib/mongoat.js
lib/mongoat.js
'use strict'; var Mongoat = require('mongodb'); var utilsHelper = require('../helpers/utils-helper'); var connect = Mongoat.MongoClient.connect; var hooks = { before: {}, after: {} }; Mongoat.Collection.prototype.before = function(opName, callback) { hooks = utilsHelper.beforeAfter('before', opName, hooks, call...
'use strict'; var Mongoat = require('mongodb'); var utilsHelper = require('../helpers/utils-helper'); var connect = Mongoat.MongoClient.connect; var hooks = { before: {}, after: {} }; (function(){ var opArray = ['insert', 'update', 'remove']; var colPrototype = Mongoat.Collection.prototype; for (var i = 0;...
Update save methods strategy - Use anonymous function to save collection methods before overwrite
Update save methods strategy - Use anonymous function to save collection methods before overwrite
JavaScript
mit
dial-once/node-mongoat
c31d392e1972d6eaca952c21ba9349d30b31b012
js/defaults.js
js/defaults.js
/* exported defaults */ /* Magic Mirror * Config Defauls * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var defaults = { port: 8080, language: "en", timeFormat: 24, modules: [ { module: "helloworld", position: "upper_third", config: { text: "Magic Mirror V2", classes: "la...
/* exported defaults */ /* Magic Mirror * Config Defauls * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var defaults = { port: 8080, language: "en", timeFormat: 24, modules: [ { module: "helloworld", position: "upper_third", config: { text: "Magic Mirror<sup>2</sup>", cla...
Change branding on default config.
Change branding on default config.
JavaScript
mit
kthorri/MagicMirror,enith2478/spegel,aschulz90/MagicMirror,morozgrafix/MagicMirror,morozgrafix/MagicMirror,marcroga/sMirror,aghth/MagicMirror,ShivamShrivastava/Smart-Mirror,ConnorChristie/MagicMirror,berlincount/MagicMirror,wszgxa/magic-mirror,heyheyhexi/MagicMirror,gndimitro/MagicMirror,vyazadji/MagicMirror,ryanlawler...
85afadbe75bce0fd7069224c8065d99d6a663a2f
src/adapter.js
src/adapter.js
/* * Copyright 2014 Workiva, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
/* * Copyright 2014 Workiva, LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
Add error handler to System.import promises
Add error handler to System.import promises
JavaScript
apache-2.0
rich-nguyen/karma-jspm
4aa3e40ae4a9b998025a010749be69da428cb9bb
src/jupyter_contrib_nbextensions/nbextensions/hide_input_all/main.js
src/jupyter_contrib_nbextensions/nbextensions/hide_input_all/main.js
// toggle display of all code cells' inputs define([ 'jquery', 'base/js/namespace' ], function( $, IPython ) { "use strict"; function set_input_visible(show) { IPython.notebook.metadata.hide_input = !show; if (show) $('div.input').show('slow'); else $('div.input').hide...
// toggle display of all code cells' inputs define([ 'jquery', 'base/js/namespace', 'base/js/events' ], function( $, Jupyter, events ) { "use strict"; function set_input_visible(show) { Jupyter.notebook.metadata.hide_input = !show; if (show) $('div.input').show('slow')...
Fix loading for either before or after notebook loads.
[hide_input_all] Fix loading for either before or after notebook loads.
JavaScript
bsd-3-clause
ipython-contrib/IPython-notebook-extensions,ipython-contrib/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,ipython-contrib/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,juhasch/IPython-notebook-extensions,jcb91/IPython-notebook-extensions,jcb91/IPytho...
65294019c1d29baaa548e483e93c8c55bf4bbabb
static/site.js
static/site.js
jQuery( document ).ready( function( $ ) { // Your JavaScript goes here jQuery('#content').fitVids(); });
jQuery( document ).ready( function( $ ) { // Your JavaScript goes here jQuery('#content').fitVids({customSelector: ".fitvids-responsive-iframe"}); });
Add .fitvids-responsive-iframe class for making iframes responsive
Add .fitvids-responsive-iframe class for making iframes responsive
JavaScript
mit
CoderDojo/cd-theme,CoderDojo/cd-theme,CoderDojo/cd-theme,CoderDojo/cd-theme
9af98fed472b4dabeb7c713f44c0b5b80da8fe4a
website/src/app/project/experiments/experiment/experiment.model.js
website/src/app/project/experiments/experiment/experiment.model.js
export class ExperimentStep { constructor(title, _type) { this.id = ''; this.title = title; this._type = _type; this.steps = []; this.description = ''; this.flags = { important: false, review: false, error: false, done: ...
export class ExperimentStep { constructor(title, _type) { this.id = ''; this.title = title; this._type = _type; this.steps = []; this.description = ''; this.flags = { important: false, review: false, error: false, done: ...
Remove hard coded experiment description. Remove done field and add status field since that is what we get from the backend.
Remove hard coded experiment description. Remove done field and add status field since that is what we get from the backend.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
c316a0757defcde769be70b5d8af5c51ef0ccb75
task/import.js
task/import.js
var geonames = require('geonames-stream'); var peliasConfig = require( 'pelias-config' ).generate(); var peliasAdminLookup = require( 'pelias-admin-lookup' ); var dbclient = require('pelias-dbclient'); var model = require( 'pelias-model' ); var resolvers = require('./resolvers'); var adminLookupMetaStream = require('....
var geonames = require('geonames-stream'); var peliasConfig = require( 'pelias-config' ).generate(); var peliasAdminLookup = require( 'pelias-admin-lookup' ); var dbclient = require('pelias-dbclient'); var model = require( 'pelias-model' ); var resolvers = require('./resolvers'); var adminLookupMetaStream = require('....
Use new function name for doc generator
Use new function name for doc generator
JavaScript
mit
pelias/geonames,pelias/geonames
6bb0842748a92359d383445e1046bb622a6649e4
tasks/build.js
tasks/build.js
/* Copyright (c) 2013, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://yuilibrary.com/license/ */ module.exports = function(grunt) { // The `artifacts` directory will usually only ever in YUI's CI system. // If you're in CI, and `build-npm` exists (meaning YUI's already built), ski...
/* Copyright (c) 2013, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://yuilibrary.com/license/ */ module.exports = function(grunt) { // The `artifacts` directory will usually only ever in YUI's CI system. // If you're in CI, `build-npm` exists, and this task was called in // re...
Add more specificity to the CI "check."
Add more specificity to the CI "check."
JavaScript
bsd-3-clause
yui/grunt-yui-contrib
7c3f65c9492218d91d2213e9c5d5ae88d5ae2772
lib/node_modules/@stdlib/math/base/dist/betaprime/lib/index.js
lib/node_modules/@stdlib/math/base/dist/betaprime/lib/index.js
'use strict'; /* * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. */ // MODULES // var setReadOnly = require( '@stdlib/utils/define-read-only-property' ); // MAIN // /** * Top-level namespace. * * @namespace betaprime */ var betaprime = {}; /** * ...
'use strict'; /* * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. */ // MODULES // var setReadOnly = require( '@stdlib/utils/define-read-only-property' ); // MAIN // /** * Top-level namespace. * * @namespace betaprime */ var betaprime = {}; /** * ...
Add skewness to beta prime namespace
Add skewness to beta prime namespace
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
40a96dbb0681ff912a64f8fdc3f542256dab1fd4
src/main/js/components/views/builder/SponsorAffinities.js
src/main/js/components/views/builder/SponsorAffinities.js
import React from 'react'; import { List, ListSubHeader, ListCheckbox } from 'react-toolbox/lib/list'; const SponsorAffinities = () => { return ( <div> <List selectable ripple> <ListSubHeader caption='list_a' /> <ListCheckbox caption='affinity' ch...
import React from 'react'; import { List, ListSubHeader, ListCheckbox } from 'react-toolbox/lib/list'; const SponsorAffinities = () => { return ( <div className="horizontal"> <List selectable ripple className="horizontalChild"> <ListSubHeader caption='list_a' /> <ListCheckbox ...
Set classes for showing the lists horizontally
Set classes for showing the lists horizontally
JavaScript
apache-2.0
Bernardo-MG/dreadball-toolkit-webpage,Bernardo-MG/dreadball-toolkit-webpage,Bernardo-MG/dreadball-toolkit-webpage,Bernardo-MG/dreadball-toolkit-webpage
873e2e8a92b286e73375a0f3505615d63dde3d9e
server/graphql/queries/entries/multiple.js
server/graphql/queries/entries/multiple.js
const { GraphQLList, GraphQLString } = require('graphql'); const mongoose = require('mongoose'); const { outputType } = require('../../types/Entries'); const getProjection = require('../../get-projection'); const getUserPermissions = require('../../../utils/getUserPermissions'); const Entry = mongoose.model('Entry'); ...
const { GraphQLList, GraphQLString } = require('graphql'); const mongoose = require('mongoose'); const { outputType } = require('../../types/Entries'); const getProjection = require('../../get-projection'); const getUserPermissions = require('../../../utils/getUserPermissions'); const Entry = mongoose.model('Entry'); ...
Fix permissions check in Entries query
:lock: Fix permissions check in Entries query
JavaScript
mit
JasonEtco/flintcms,JasonEtco/flintcms
e67f17f3430c9509f4d1ff07ddefc6baf05780ff
client/actions/profile.js
client/actions/profile.js
import axios from 'axios'; import { FETCHING_PROFILE, PROFILE_SUCCESS, PROFILE_FAILURE } from './types'; import { apiURL } from './userSignUp'; import setHeader from '../helpers/setheader'; const fetchingProfile = () => ({ type: FETCHING_PROFILE, }); const profileSuccess = profile => ({ type: PROFILE_SUCCESS, p...
import axios from 'axios'; import { FETCHING_PROFILE, PROFILE_SUCCESS, PROFILE_FAILURE, RETURN_BOOK_SUCCESS, RETURN_BOOK_REQUEST, RETURN_BOOK_FAILURE, } from './types'; import { apiURL } from './userSignUp'; import setHeader from '../helpers/setheader'; const fetchingProfile = () => ({ type: FETCHING_PRO...
Add actions for returning a book
Add actions for returning a book
JavaScript
mit
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
8e8a784f1318f367f2a633395429abff30566c64
updates/0.1.0-fr-settings.js
updates/0.1.0-fr-settings.js
exports.create = { Settings: [{ "site": { "name": "EStore Demo" }, "payment.cod.active": true }] };
exports.create = { Settings: [{ "site": { "name": "EStore Demo" }, "payments.cod.active": true }] };
Fix no payment set by default error.
Fix no payment set by default error.
JavaScript
mit
stunjiturner/estorejs,quenktechnologies/estorejs,stunjiturner/estorejs
52fbbe3c5e4be1ad9be58fe862185a577a0e6c1f
packages/vega-parser/index.js
packages/vega-parser/index.js
// setup transform definition aliases import {definition} from 'vega-dataflow'; definition('Sort', definition('Collect')); definition('Formula', definition('Apply')); export {default as parse} from './src/parse'; export {default as selector} from './src/parsers/event-selector'; export {default as signal} from './src/...
// setup transform definition aliases import {definition} from 'vega-dataflow'; definition('Formula', definition('Apply')); export {default as parse} from './src/parse'; export {default as selector} from './src/parsers/event-selector'; export {default as signal} from './src/parsers/signal'; export {default as signalU...
Drop Sort alias for Collect.
Drop Sort alias for Collect.
JavaScript
bsd-3-clause
lgrammel/vega,vega/vega,vega/vega,vega/vega,vega/vega
e569c4f2081979947e7b948de870978e9bde719a
app/elements/sidebar.js
app/elements/sidebar.js
import * as React from 'react' import {State} from 'react-router' import SearchButton from 'elements/searchButton' import GraduationStatus from 'elements/graduationStatus' let Sidebar = React.createClass({ mixins: [State], render() { let isSearching = this.getQuery().search let sidebar = isSearching ? React....
import * as React from 'react' import {State} from 'react-router' import SearchButton from 'elements/searchButton' import GraduationStatus from 'elements/graduationStatus' let Sidebar = React.createClass({ mixins: [State], render() { let isSearching = 'search' in this.getQuery() let sidebar = isSearching ? R...
Use `in` to detect if the query param has "search"
Use `in` to detect if the query param has "search"
JavaScript
agpl-3.0
hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook
1c3042481b75e305e993316256dc19f51fd41cf6
SPAWithAngularJS/module2/customServices/js/app.shoppingListService.js
SPAWithAngularJS/module2/customServices/js/app.shoppingListService.js
// app.shoppingListService.js (function() { "use strict"; angular.module("MyApp") .service("ShoppingListService", ShoppingListService); function ShoppingListService() { let service = this; // List of Shopping items let items = []; service.addItem = addItem; function addItem(itemName,...
// app.shoppingListService.js (function() { "use strict"; angular.module("MyApp") .service("ShoppingListService", ShoppingListService); function ShoppingListService() { let service = this; // List of Shopping items let items = []; service.addItem = addItem; service.getItems = getItems...
Delete useless code. Added removeItem method
Delete useless code. Added removeItem method
JavaScript
mit
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
47b9aba68050230eeff0754f4076b7596cbe9eb9
api/throttle.js
api/throttle.js
"use strict" module.exports = function(callback) { //60fps translates to 16.6ms, round it down since setTimeout requires int var time = 16 var last = 0, pending = null var timeout = typeof requestAnimationFrame === "function" ? requestAnimationFrame : setTimeout return function(synchronous) { var now = new Date...
"use strict" var ts = Date.now || function() { return new Date().getTime() } module.exports = function(callback) { //60fps translates to 16.6ms, round it down since setTimeout requires int var time = 16 var last = 0, pending = null var timeout = typeof requestAnimationFrame === "function" ? requestAnimationFrame...
Use Date.now() if available since it's faster
Use Date.now() if available since it's faster
JavaScript
mit
pygy/mithril.js,impinball/mithril.js,tivac/mithril.js,MithrilJS/mithril.js,barneycarroll/mithril.js,barneycarroll/mithril.js,tivac/mithril.js,impinball/mithril.js,pygy/mithril.js,lhorie/mithril.js,lhorie/mithril.js,MithrilJS/mithril.js
18ac5c64a7da29e5bf25bc274c61ad6078bace86
config/environments.config.js
config/environments.config.js
// Here is where you can define configuration overrides based on the execution environment. // Supply a key to the default export matching the NODE_ENV that you wish to target, and // the base configuration will apply your overrides before exporting itself. module.exports = { // ======================================...
// Here is where you can define configuration overrides based on the execution environment. // Supply a key to the default export matching the NODE_ENV that you wish to target, and // the base configuration will apply your overrides before exporting itself. module.exports = { // ======================================...
Enable sourcemaps on production builds
Enable sourcemaps on production builds
JavaScript
mit
matthisk/es6console,matthisk/es6console
a095b3f6f17687fb769670f236f4224556254edd
js/game.js
js/game.js
// Game define([ 'stage', 'models/ui', 'utility' ], function(Stage, UI, Utility) { console.log("game.js loaded"); var Game = (function() { // Game canvas var stage; var gameUI; return { // Initialize the game init: function() { stage = new Stage('game-canvas'); gameUI = new UI(stage); ...
// Game define([ 'stage', 'models/ui', 'utility' ], function(Stage, UI, Utility) { console.log("game.js loaded"); var Game = (function() { // Game canvas var stage; var gameUI; return { // Initialize the game init: function() { try { stage = new Stage('game-canvas'); } catch(e) { ...
Add try-catch block for obtaining canvas context
Add try-catch block for obtaining canvas context
JavaScript
mit
vicksonzero/TyphoonTycoon,vicksonzero/TyphoonTycoon,ericksli/TyphoonTycoon,jasonycw/TyphoonTycoon,ericksli/TyphoonTycoon,jasonycw/TyphoonTycoon
1802e997a2d682ec3fc05d292e95fd64f3258b1b
src/components/fields/Text/index.js
src/components/fields/Text/index.js
import React from 'react' export default class Text extends React.Component { static propTypes = { onChange: React.PropTypes.func, value: React.PropTypes.string, fieldType: React.PropTypes.string, passProps: React.PropTypes.object, placeholder: React.PropTypes.node, errorMessage: React.PropT...
import React from 'react' export default class Text extends React.Component { static propTypes = { onChange: React.PropTypes.func, value: React.PropTypes.string, fieldType: React.PropTypes.string, passProps: React.PropTypes.object, placeholder: React.PropTypes.node, errorMessage: React.PropT...
Add disabled to text input
Add disabled to text input
JavaScript
mit
orionsoft/parts
82a4e6147a20b6583df43375e70b593a73cf0396
lib/transport/ssh.spec.js
lib/transport/ssh.spec.js
'use strict'; const { expect } = require('chai'); const SshTransport = require('./ssh'); describe('SshTransport', () => { it('should not use a private key if password is specified', () => { const options = getTransportOptions({ password: 'pass' }); expect(options.usePrivateKey).to.be.false; expect(opt...
'use strict'; const { expect } = require('chai'); const SshTransport = require('./ssh'); class NoExceptionSshTransport extends SshTransport { normalizeOptions() { try { super.normalizeOptions(); } catch (e) { this.error = e; } } } describe('SshTransport', () => { it('should not use a p...
Fix a test on travis
Fix a test on travis
JavaScript
mit
megahertz/electron-simple-publisher
a08a2e797d2783defdd2551bf2ca203e54a3702b
js/main.js
js/main.js
// Github API call according to their json-p dox function callGHAPI(url, callback) { var apiRoot = "https://api.github.com/"; var script = document.createElement("script"); script.src = apiRoot + url + "?callback=" + callback; document.getElementsByTagName("head")[0].appendChild(script); } // validate ...
// Github API call according to their json-p dox function callGHAPI(url, callback) { var apiRoot = "https://api.github.com/"; var script = document.createElement("script"); script.src = apiRoot + url + "?callback=" + callback; document.getElementsByTagName("head")[0].appendChild(script); } // validate ...
Update typeahead source when different user entered
Update typeahead source when different user entered
JavaScript
mit
Somsubhra/github-release-stats,Somsubhra/github-release-stats
a1b98bb9dad8a3a82fe750dc09d470e14fe233ec
js/main.js
js/main.js
--- layout: null --- $(document).ready(function () { $('a.events-button').click(function (e) { if ($('.panel-cover').hasClass('panel-cover--collapsed')) return currentWidth = $('.panel-cover').width() if (currentWidth < 960) { $('.panel-cover').addClass('panel-cover--collapsed') $('.content-wr...
--- layout: null --- $(document).ready(function () { $('a.events-button').click(function (e) { if ($('.panel-cover').hasClass('panel-cover--collapsed')) return currentWidth = $('.panel-cover').width() if (currentWidth < 960) { $('.panel-cover').addClass('panel-cover--collapsed') $('.content-wr...
Fix defaulting to events page, maybe....
Fix defaulting to events page, maybe....
JavaScript
mit
GRPosh/GRPosh.github.io,GRPosh/GRPosh.github.io,GRPosh/GRPosh.github.io
86773197f53aeb163de92fbd9f339d53903dd4c3
lib/viewer/DataSetView.js
lib/viewer/DataSetView.js
import React from 'react'; export default React.createClass({ displayName: 'DataSetViewer', propTypes: { base: React.PropTypes.string, item: React.PropTypes.object, }, openDataSet() { ArcticViewer.load('http://' + location.host + this.props.base + this.props.item.path, docume...
import React from 'react'; export default React.createClass({ displayName: 'DataSetViewer', propTypes: { base: React.PropTypes.string, item: React.PropTypes.object, }, openDataSet() { ArcticViewer.load('http://' + location.host + this.props.base + this.props.item.path, docume...
Update code formatting to comply with our ESLint specification
style(ESLint): Update code formatting to comply with our ESLint specification
JavaScript
bsd-3-clause
Kitware/arctic-viewer,Kitware/in-situ-data-viewer,Kitware/in-situ-data-viewer,Kitware/arctic-viewer,Kitware/arctic-viewer
97889608f3e80095e139d3da69be2b24df6eacd7
components/guestbookCapture.js
components/guestbookCapture.js
/** @jsxImportSource theme-ui */ import { Box, Button } from 'theme-ui' import Link from 'next/link' import Sparkle from './sparkle' import Spicy from './spicy' // email export default function GuestbookCapture({ props }) { return ( <Box sx={{ position: 'relative', p: [3, 3, 4], bg...
/** @jsxImportSource theme-ui */ import { Box, Button } from 'theme-ui' import Link from 'next/link' import Sparkle from './sparkle' import Spicy from './spicy' // email export default function GuestbookCapture({ props }) { return ( <Box sx={{ position: 'relative', p: [3, 3, 4], bg...
Remove max-width from guestbook capture
Remove max-width from guestbook capture
JavaScript
mit
iammatthias/.com,iammatthias/.com,iammatthias/.com
783a18b1ed4e3053861315eccfee5bf55a467c02
services/frontend/src/components/elements/account/follow.js
services/frontend/src/components/elements/account/follow.js
import React from 'react'; import steem from 'steem' import { Button } from 'semantic-ui-react' export default class AccountFollow extends React.Component { constructor(props) { super(props) this.state = { processing: false, following: props.account.following || [] } } componentWillRecei...
import React from 'react'; import steem from 'steem' import { Button } from 'semantic-ui-react' export default class AccountFollow extends React.Component { constructor(props) { super(props) this.state = { processing: false, following: props.account.following || [] } } componentWillRecei...
Hide for your own account.
Hide for your own account.
JavaScript
mit
aaroncox/chainbb,aaroncox/chainbb
908c305b901b73e92cd0e1ef4fd0f76d1aa2ea72
lib/config.js
lib/config.js
var fs = require('fs'); var mkdirp = require('mkdirp'); var existsSync = fs.existsSync || path.existsSync; // to support older nodes than 0.8 var CONFIG_FILE_NAME = 'config.json'; var Config = function(home) { this.home = home; this.load(); }; Config.prototype = { home: null, data: {}, configFilePath: funct...
var fs = require('fs'); var mkdirp = require('mkdirp'); var existsSync = fs.existsSync || require('path').existsSync; // to support older nodes than 0.8 var CONFIG_FILE_NAME = 'config.json'; var Config = function(home) { this.home = home; this.load(); }; Config.prototype = { home: null, data: {}, configFile...
Add the missing require for path module
Add the missing require for path module
JavaScript
mit
groonga/gcs-console
8262f90630783eb9329613aaf676b2b43c960dff
lib/CarbonClient.js
lib/CarbonClient.js
var RestClient = require('carbon-client') var util = require('util') var fibrous = require('fibrous'); /**************************************************************************************************** * monkey patch the endpoint class to support sync get/post/put/delete/head/patch */ var Endpoint = RestClient.s...
var RestClient = require('carbon-client') var util = require('util') var fibrous = require('fibrous'); /**************************************************************************************************** * monkey patch the endpoint class to support sync get/post/put/delete/head/patch */ var Endpoint = RestClient....
Move method list to node client
Move method list to node client
JavaScript
mit
carbon-io/carbon-client-node,carbon-io/carbon-client-node
370857a2c3d321b2fb1e7177de266b8422112425
app/assets/javascripts/alchemy/alchemy.jquery_loader.js
app/assets/javascripts/alchemy/alchemy.jquery_loader.js
if (typeof(Alchemy) === 'undefined') { var Alchemy = {}; } // Load jQuery on demand. Use this if jQuery is not present. // Found on http://css-tricks.com/snippets/jquery/load-jquery-only-if-not-present/ Alchemy.loadjQuery = function(callback) { var thisPageUsingOtherJSLibrary = false; if (typeof($) === 'functi...
if (typeof(Alchemy) === 'undefined') { var Alchemy = {}; } // Load jQuery on demand. Use this if jQuery is not present. // Found on http://css-tricks.com/snippets/jquery/load-jquery-only-if-not-present/ Alchemy.loadjQuery = function(callback) { var thisPageUsingOtherJSLibrary = false; if (typeof($) === 'functi...
Load jquery from cdn instead of locally for menubar.
Load jquery from cdn instead of locally for menubar.
JavaScript
bsd-3-clause
clst/alchemy_cms,mtomov/alchemy_cms,nielspetersen/alchemy_cms,mamhoff/alchemy_cms,thomasjachmann/alchemy_cms,heisam/alchemy_cms,Domenoth/alchemy_cms,kinsomicrote/alchemy_cms,mamhoff/alchemy_cms,thomasjachmann/alchemy_cms,cygnus6/alchemy_cms,IngoAlbers/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,cygnus6/...
63284bdb3177e678208650e0b738dc9876afa643
app/components/Todo.js
app/components/Todo.js
import React, { PropTypes } from 'react' import ListItem from 'material-ui/lib/lists/list-item' import Checkbox from 'material-ui/lib/checkbox' import ActionDelete from 'material-ui/lib/svg-icons/action/delete' const Todo = ({ onClick, onDelete, completed, text }) => ( <ListItem onClick={onClick} primaryText...
import React, { PropTypes } from 'react' import ListItem from 'material-ui/lib/lists/list-item' import Checkbox from 'material-ui/lib/checkbox' import ActionDelete from 'material-ui/lib/svg-icons/action/delete' const Todo = ({ onClick, onDelete, completed, text }) => ( <ListItem onClick={onClick} primaryText...
Add strike-through for completed tasks
Add strike-through for completed tasks
JavaScript
mit
rxlabs/tasty-todos,rxlabs/tasty-todos,rxlabs/tasty-todos
ad03ed2e56b56f22fc0f148dd6e6027eab718591
specs/server/ServerSpec.js
specs/server/ServerSpec.js
/* global require, describe, it */ 'use strict'; var expect = require('chai').expect; var request = require('request'); var url = function(path) { return 'http://localhost:8000' + path; }; describe('GET /', function() { it('responds', function(done){ request(url('/'), function(error, res) { expect(res....
/* global require, describe, it */ 'use strict'; var expect = require('chai').expect; var request = require('request'); var url = function(path) { return 'http://localhost:8000' + path; }; describe("MongoDB", function() { it("is there a server running", function(next) { var MongoClient = require('mongo...
Add test to ensure mongodb is running.
Add test to ensure mongodb is running.
JavaScript
mit
JulieMarie/Brainstorm,HRR2-Brainstorm/Brainstorm,JulieMarie/Brainstorm,ekeric13/Brainstorm,EJJ-Brainstorm/Brainstorm,EJJ-Brainstorm/Brainstorm,ekeric13/Brainstorm,plauer/Brainstorm,drabinowitz/Brainstorm
7f08b0b8950ee9e4123b2d5332f2fcfe8616d771
lib/daemon-setup.js
lib/daemon-setup.js
(function() { 'use strict'; exports.init = function(params) { var fs = require('fs'); var path = require('path'); var service = params['service']; var shell = require('shelljs'); if (!service) { throw new Error('missing required parameter "service"'); } createUser(); enableLo...
(function() { 'use strict'; exports.init = function(params) { var fs = require('fs'); var path = require('path'); var service = params['service']; var shell = require('shelljs'); if (!service) { throw new Error('missing required parameter "service"'); } createUser(); enableLo...
Verify that exception is raised if appropriate.
Verify that exception is raised if appropriate.
JavaScript
mit
optbot/daemon-setup,optbot/daemon-setup
788c0adabe8a1501e8032e5b9d90afcc5c4927ab
lib/delve-client.js
lib/delve-client.js
/** DelveClient @description creates a singleton Delve client **/ 'use babel'; const DelveClient = require('delvejs'); var delveClient; const connManager = { connect: function connect(host, port) { delveClient = new DelveClient(host, port); return delveClient.establishSocketConn(); }, endConnectio...
/** DelveClient @description creates a singleton Delve client **/ 'use babel'; const DelveClient = require('delvejs'); var delveClient; const connManager = { isConnected: false, connect: function connect(host, port) { delveClient = new DelveClient(host, port); return delveClient.establishSocketConn()...
Check for is connected before ending
Check for is connected before ending
JavaScript
mit
tylerFowler/atom-delve
4893fe0778f0e6a3876d0c634d5437c3f7e6911d
lib/controllers/api/v1/users.js
lib/controllers/api/v1/users.js
'use strict'; var mongoose = require('mongoose'), utils = require('../utils'), User = mongoose.model('User'), Application = mongoose.model('Application'), SimpleApiKey = mongoose.model('SimpleApiKey'), OauthConsumer = mongoose.model('OauthConsumer'), Event = mongoose.model('Event'), middleware = require('../../...
'use strict'; var mongoose = require('mongoose'), utils = require('../utils'), User = mongoose.model('User'), Application = mongoose.model('Application'), SimpleApiKey = mongoose.model('SimpleApiKey'), OauthConsumer = mongoose.model('OauthConsumer'), Event = mongoose.model('Event'), User = mongoose.model('User'...
Add organizer Endpoint to API
Add organizer Endpoint to API
JavaScript
apache-2.0
Splaktar/hub,gdg-x/hub,gdg-x/hub,nassor/hub,fchuks/hub,nassor/hub,fchuks/hub,Splaktar/hub
d4a57ac1e7516a75a3770e23a06241366a90dbcb
spec/lib/repository-mappers/figshare/parseL1ArticlePresenters-spec.js
spec/lib/repository-mappers/figshare/parseL1ArticlePresenters-spec.js
import parseL1ArticlePresenters from '../../../../lib/repository-mappers/figshare/parseL1ArticlePresenters'; const figshareL1Articles = require('./resources/figshareL1Articles.json'); const convertedArticles = parseL1ArticlePresenters(figshareL1Articles); it('parses all articles figshare returns', () => expect(con...
import parseL1ArticlePresenters from '../../../../lib/repository-mappers/figshare/parseL1ArticlePresenters'; const figshareL1Articles = require('./resources/figshareL1Articles.json'); const convertedArticles = parseL1ArticlePresenters(figshareL1Articles); it('parses all articles figshare returns', () => expect(con...
Add unit test for Figshare ID in L1 presenter
Add unit test for Figshare ID in L1 presenter
JavaScript
mit
mozillascience/software-discovery-dashboard,mozillascience/software-discovery-dashboard
5df003b17e805ea3c649330bd72fe3d0d7ad085d
app/src/store/index.js
app/src/store/index.js
import Vue from "vue"; import Vuex, {Store} from "vuex"; import state from "./state"; import * as mutations from "./mutations"; import * as getters from "./getters"; import * as actions from "./actions"; import {persistencePlugin, i18nPlugin} from "./plugins"; Vue.use(Vuex); export default new Store({ strict: pro...
import Vue from "vue"; import Vuex, {Store} from "vuex"; import state from "./state"; import * as mutations from "./mutations"; import * as getters from "./getters"; import * as actions from "./actions"; import {persistencePlugin, i18nPlugin} from "./plugins"; Vue.use(Vuex); export default new Store({ strict: pro...
Fix persistence issues not tracking the correct mutations
Fix persistence issues not tracking the correct mutations
JavaScript
mit
sulcata/sulcalc,sulcata/sulcalc,sulcata/sulcalc
1d894193ceebc30520ef2d18a6c15452f52a2e30
tests/dummy/app/controllers/collapsible.js
tests/dummy/app/controllers/collapsible.js
export default Ember.Controller.extend({ actions: { collapseLeft: function() { this.get('leftChild').collapse(); }, collapseRight: function() { this.get('rightChild').collapse(); } } });
import Ember from 'ember'; export default Ember.Controller.extend({ actions: { collapseLeft: function() { this.get('leftChild').collapse(); }, collapseRight: function() { this.get('rightChild').collapse(); } } });
Add missing import ember to dummy app
Add missing import ember to dummy app
JavaScript
mit
BryanCrotaz/ember-split-view,BryanHunt/ember-split-view,BryanCrotaz/ember-split-view,BryanHunt/ember-split-view
d0f443c0b9c32a72faa67de95da03a01025c2ad0
config/nconf.js
config/nconf.js
var nconf = require('nconf'); nconf .env(); nconf.defaults({ 'RIPPLE_REST_API': 'http://localhost:5990', 'DATABASE_URL': 'postgres://postgres:password@localhost:5432/ripple_gateway', 'RIPPLE_DATAMODEL_ADAPTER': 'ripple-gateway-data-sequelize-adapter', 'RIPPLE_EXPRESS_GATEWAY': 'ripple-gateway-express', 'S...
var nconf = require('nconf'); nconf .file({ file: './config/config.json' }) .env(); nconf.defaults({ 'RIPPLE_REST_API': 'http://localhost:5990', 'DATABASE_URL': 'postgres://postgres:password@localhost:5432/ripple_gateway', 'RIPPLE_DATAMODEL_ADAPTER': 'ripple-gateway-data-sequelize-adapter', 'RIPPLE_EXPRES...
Load base config from file.
[FEATURE] Load base config from file.
JavaScript
isc
zealord/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd
e9d0001580fcd7178334071d6ea9040da9df49a9
jest.setup.js
jest.setup.js
/* eslint-disable import/no-unassigned-import */ import 'raf/polyfill' import 'mock-local-storage' import {configure} from 'enzyme' import Adapter from 'enzyme-adapter-react-16' configure({adapter: new Adapter()})
/* eslint-disable import/no-unassigned-import */ import 'raf/polyfill' import 'mock-local-storage' import {configure} from 'enzyme' import Adapter from 'enzyme-adapter-react-16' import {setConfig} from 'next/config' configure({adapter: new Adapter()}) // Initialize Next.js configuration with empty values. setConfig...
Set default configuration for tests
Set default configuration for tests
JavaScript
mit
sgmap/inspire,sgmap/inspire
e6bfa9f7036d4ad51af84a9205616b4782a5db91
geoportal/geoportailv3_geoportal/static-ngeo/js/backgroundselector/BackgroundselectorDirective.js
geoportal/geoportailv3_geoportal/static-ngeo/js/backgroundselector/BackgroundselectorDirective.js
import appModule from '../module.js'; /** * @param {string} appBackgroundselectorTemplateUrl Url to backgroundselector template. * @return {angular.IDirective} * @ngInject */ const exports = function(appBackgroundselectorTemplateUrl) { return { restrict: 'E', scope: { 'map': '=appBa...
import appModule from '../module.js'; /** * @param {string} appBackgroundselectorTemplateUrl Url to backgroundselector template. * @return {angular.IDirective} * @ngInject */ const exports = function(appBackgroundselectorTemplateUrl) { return { restrict: 'E', scope: { 'map': '=appBa...
Add missing customOnChange directive for the new background selector component
Add missing customOnChange directive for the new background selector component
JavaScript
mit
Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3,Geoportail-Luxembourg/geoportailv3
067d0b0d647385559f5008aa62c89b18688431c0
karma.conf.js
karma.conf.js
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html const path = require('path'); process.env.CHROME_BIN = require('puppeteer').executablePath(); module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine...
// Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html const path = require('path'); process.env.CHROME_BIN = require('puppeteer').executablePath(); module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine...
Disable unit test console logging
Disable unit test console logging
JavaScript
mit
kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard
6cbd9e5ade62b19781fce3263aa8890242aa2804
contentcuration/contentcuration/frontend/shared/vuex/snackbar/index.js
contentcuration/contentcuration/frontend/shared/vuex/snackbar/index.js
export default { state: { isVisible: false, options: { text: '', autoDismiss: true, }, }, getters: { snackbarIsVisible(state) { return state.isVisible; }, snackbarOptions(state) { return state.options; }, }, mutations: { CORE_CREATE_SNACKBAR(state, snack...
export default { state: { isVisible: false, options: { text: '', // duration in ms, 0 indicates it should not automatically dismiss duration: 6000, actionText: '', actionCallback: null, }, }, getters: { snackbarIsVisible(state) { return state.isVisible; }, ...
Remove `autoDismiss` and add actions
Remove `autoDismiss` and add actions - `autoDismiss: false` can be done by making duration `null` in this case the snackbar won't dismiss until the button is clicked on the snackbar item - Now we can dispatch actions rather than commit mutations directly. Per Vue 'best practices'
JavaScript
mit
DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation
a003149c2d98a236c320bd84c0e484a6cf62f370
packages/rekit-studio/src/features/common/monaco/setupLinter.js
packages/rekit-studio/src/features/common/monaco/setupLinter.js
/* eslint no-use-before-define: 0 */ import _ from 'lodash'; import axios from 'axios'; let editor; let monaco; // Worker always run and will never terminate // There is only one global editor instance never disposed in Rekit Studio. function setupLintWorker(_editor, _monaco) { editor = _editor; monaco = _monaco;...
/* eslint no-use-before-define: 0 */ import _ from 'lodash'; import axios from 'axios'; let editor; let monaco; // Worker always run and will never terminate // There is only one global editor instance never disposed in Rekit Studio. function setupLintWorker(_editor, _monaco) { editor = _editor; monaco = _monaco;...
Clear eslint error for non-js files.
Clear eslint error for non-js files.
JavaScript
mit
supnate/rekit
06309a28546f22db3ada5c67a363e7062914c701
lib/loader.js
lib/loader.js
/*jshint node: true */ var Promise = require("bluebird"); var fs = require("fs"); /** * Maps file paths to their contents. Filled in by readTemplate() if the * disableCache argument is not set to true. */ var cache = {}; /** * Reads the template file at the given path and returns its contents as a * Promi...
/*jshint node: true */ var Promise = require("bluebird"); var fs = require("fs"); /** * Maps file paths to their contents */ var cache = {}; /** * Reads the template file at the given path and returns its contents as a * Promise. The second parameter is optional; if it is set to true, the string * that wa...
Fix 'cache' variable doc comment
Fix 'cache' variable doc comment The comment referenced a non-existing function from during the development; the affected sentence is removed.
JavaScript
mit
JangoBrick/teval,JangoBrick/teval
672d4b454e02fe0cb894fdca00f6a151f7e522e4
src/data/ui/breakpoints/reducers.js
src/data/ui/breakpoints/reducers.js
//@flow import { updateObject } from "../../reducers/utils"; export default ( state: { breakpoints: { main: string } }, action: { type: string, newLayout: string, component: string } ) => updateObject(state, { breakpoints: updateObject(state.breakpoints, { [action.component]: action.newLayout }) ...
//@flow import { updateObject } from "../../reducers/utils"; export default ( state: { breakpoints: { main: string } }, action: { type: string, component: string, query: { [string]: string } } ) => updateObject(state, { breakpoints: updateObject(state.breakpoints, { [action.component]: u...
Update breakpoint reducer to assign deeper queries object
Update breakpoint reducer to assign deeper queries object
JavaScript
mit
slightly-askew/portfolio-2017,slightly-askew/portfolio-2017
f070ba58f9d8fe367284a9c82fd9e8ec75829584
src/components/Projects.js
src/components/Projects.js
import React from 'react' import { Project } from './Project' const Projects = ({ projects = [], feature }) => { if (!projects.length) return null const featuredProjects = projects.filter((project) => project.feature) const nonFeaturedProjects = projects.filter((project) => !project.feature) return ( <>...
import React from 'react' import { Project } from './Project' const Projects = ({ projects = [], feature }) => { if (!projects.length) return null const featuredProjects = projects.filter((project) => project.feature) const nonFeaturedProjects = projects.filter((project) => !project.feature) return ( <>...
Add shadow to non-feature project container
Add shadow to non-feature project container
JavaScript
mit
dtjv/dtjv.github.io
42af1e835e8ffd80e6772a8dc7694ad81b425dc5
test/test-api-ping-plugins-route.js
test/test-api-ping-plugins-route.js
var request = require('supertest'); var assert = require('assert'); var storageFactory = require('../lib/storage/storage-factory'); var storage = storageFactory.getStorageInstance('test'); var app = require('../webserver/app')(storage); describe('ping plugins route', function () { var server; var PORT = 3355; ...
var request = require('supertest'); var assert = require('assert'); var storageFactory = require('../lib/storage/storage-factory'); var storage = storageFactory.getStorageInstance('test'); var app = require('../webserver/app')(storage); describe('ping plugins route', function () { var server; var PORT = 3355; ...
Sort to get determinist ordering
Sort to get determinist ordering
JavaScript
mit
corinis/watchmen,corinis/watchmen,ravi/watchmen,iloire/WatchMen,Cellington1/Status,iloire/WatchMen,Cellington1/Status,iloire/WatchMen,Cellington1/Status,NotyIm/WatchMen,ravi/watchmen,corinis/watchmen,NotyIm/WatchMen,NotyIm/WatchMen,plyo/watchmen,plyo/watchmen,labianchin/WatchMen,labianchin/WatchMen,ravi/watchmen,labian...
e1693cbc3e8f27a15109e128d17b675845f16166
assets/mathjaxhelper.js
assets/mathjaxhelper.js
MathJax.Hub.Config({ "tex2jax": { inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true } }); MathJax.Hub.Config({ config: ["MMLorHTML.js"], jax: ["input/TeX", "output/HTML-CSS", "output/NativeMML"], extensions: ["MathMenu.js", "MathZoom.js", "AMSmath.js", "AMSsymbols.js", "autobold.js", "autol...
MathJax.Hub.Config({ "tex2jax": { inlineMath: [['$','$'], ['\\(','\\)']], processEscapes: true } }); MathJax.Hub.Config({ config: ["MMLorHTML.js"], jax: [ "input/TeX", "output/HTML-CSS", "output/NativeMML" ], extensions: [ "MathMenu.js", "MathZoom.js", "TeX/AMSmath.js", "...
Fix paths for some mathjax extensions.
Fix paths for some mathjax extensions.
JavaScript
mit
mortenpi/Documenter.jl,MichaelHatherly/Documenter.jl,MichaelHatherly/Lapidary.jl,JuliaDocs/Documenter.jl
fdce895bbaa4c08431d173edd286cb9b6670f2c2
tools/cli/dev-bundle-bin-helpers.js
tools/cli/dev-bundle-bin-helpers.js
var path = require("path"); var devBundleDir = path.resolve(__dirname, "..", "..", "dev_bundle"); var binDir = path.join(devBundleDir, "bin"); exports.getCommandPath = function (command) { return path.join(binDir, command); }; exports.getEnv = function () { var env = Object.create(process.env); env.PATH = [ ...
var path = require("path"); var devBundleDir = path.resolve(__dirname, "..", "..", "dev_bundle"); var binDir = path.join(devBundleDir, "bin"); exports.getCommandPath = function (command) { return path.join(binDir, command); }; exports.getEnv = function () { var env = Object.create(process.env); var paths = [ ...
Make sure env.Path === env.PATH on Windows.
Make sure env.Path === env.PATH on Windows.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,4commerce-technologies-AG/meteor,jdivy/meteor,mjmasn/meteor,Hansoft/meteor,4commerce-technologies-AG/meteor,chasertech/meteor,chasertech/meteor,4commerce-technologies-AG/meteor,chasertech/meteor,chasertech/meteor,4commerce-technologies-AG/meteor,Hansoft/meteor,4commerce-technologies-AG/met...
7e6697514f6f2596ebcc9227c730effc72783c06
test/visual/cypress/specs/home-page-spec.js
test/visual/cypress/specs/home-page-spec.js
describe('home page', () => { before(() => { cy.visit('/') }) it('content', () => { cy.get('.dashboard-section__info-feed-date').hideElement() cy.get('.grid-row').compareSnapshot('homePageContent') }) it('header', () => { cy.get('.datahub-header').compareSnapshot('homePageHeader') }) it...
describe('home page', () => { before(() => { cy.visit('/') }) it('content', () => { cy.get('.dashboard-section__info-feed-date').hideElement() cy.get('[for="company-name"]').should('be.visible') cy.get('.grid-row').compareSnapshot('homePageContent') }) it('header', () => { cy.get('.datah...
Add assertion to test to wait for component to load
Add assertion to test to wait for component to load
JavaScript
mit
uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend
2c1660c07e516d96dbdf8000a766fd6b63f3ef73
packages/ember-data/lib/system/application_ext.js
packages/ember-data/lib/system/application_ext.js
var set = Ember.set; Ember.onLoad('Ember.Application', function(Application) { Application.registerInjection({ name: "store", before: "controllers", injection: function(app, stateManager, property) { if (!stateManager) { return; } if (property === 'Store') { set(stateManager, 'store'...
var set = Ember.set; /** This code registers an injection for Ember.Application. If an Ember.js developer defines a subclass of DS.Store on their application, this code will automatically instantiate it and make it available on the router. Additionally, after an application's controllers have been injected...
Add inline docs to injection code
Add inline docs to injection code
JavaScript
mit
BookingSync/data,EmberSherpa/data,Eric-Guo/data,funtusov/data,sebastianseilund/data,topaxi/data,courajs/data,tarzan/data,sammcgrail/data,Turbo87/ember-data,kimroen/data,courajs/data,greyhwndz/data,sebastianseilund/data,gniquil/data,hibariya/data,Robdel12/data,fpauser/data,lostinpatterns/data,yaymukund/data,gabriel-leta...
26d55a74b3f302f3803f8e87d05866bab81cb5ed
src/components/svg-icon/svg-icon.js
src/components/svg-icon/svg-icon.js
// Aurelia import { bindable, bindingMode } from 'aurelia-framework'; import icons from 'configs/icons'; export class SvgIcon { @bindable({ defaultBindingMode: bindingMode.oneWay }) iconId; attached () { const id = this.iconId.toUpperCase().replace('-', '_'); this.icon = icons[id] ? icons[id] : icons...
// Aurelia import { bindable, bindingMode } from 'aurelia-framework'; import icons from 'configs/icons'; export class SvgIcon { @bindable({ defaultBindingMode: bindingMode.oneWay }) iconId; constructor () { this.icon = { viewBox: '0 0 16 16', svg: '' }; } attached () { const id =...
Set default values to avoid initial binding errors.
Set default values to avoid initial binding errors.
JavaScript
mit
flekschas/hipiler,flekschas/hipiler,flekschas/hipiler
62b43e17c7f22f339b9d0e84792a63dbcaf6d83c
EPFL_People.user.js
EPFL_People.user.js
// ==UserScript== // @name EPFL People // @namespace none // @description A script to improve browsing on people.epfl.ch // @include http://people.epfl.ch/* // @version 1 // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js // @author EPFL-dojo // ==...
// ==UserScript== // @name EPFL People // @namespace none // @description A script to improve browsing on people.epfl.ch // @include http://people.epfl.ch/* // @version 1 // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js // @author EPFL-dojo // ==...
Save only one variable (dict)
Save only one variable (dict)
JavaScript
unlicense
epfl-dojo/EPFL_People_UserScript
c85b6344fcaaa605fb5aa58de659a0e5e042d1e3
src/js/controller/about.js
src/js/controller/about.js
'use strict'; var cfg = require('../app-config').config; // // Controller // var AboutCtrl = function($scope) { $scope.state.about = { toggle: function(to) { $scope.state.lightbox = (to) ? 'about' : undefined; } }; // // scope variables // $scope.version = cfg.a...
'use strict'; var cfg = require('../app-config').config; // // Controller // var AboutCtrl = function($scope) { $scope.state.about = { toggle: function(to) { $scope.state.lightbox = (to) ? 'about' : undefined; } }; // // scope variables // $scope.version = cfg.a...
Add beta ta to version
Add beta ta to version
JavaScript
mit
whiteout-io/mail-html5,kalatestimine/mail-html5,halitalf/mail-html5,sheafferusa/mail-html5,whiteout-io/mail,b-deng/mail-html5,dopry/mail-html5,dopry/mail-html5,kalatestimine/mail-html5,clochix/mail-html5,tanx/hoodiecrow,dopry/mail-html5,b-deng/mail-html5,whiteout-io/mail,dopry/mail-html5,halitalf/mail-html5,halitalf/ma...
b36005ed996391dbf9502aaffbed6e0fc1297d28
main.js
main.js
var app = require('app'); var BrowserWindow = require('browser-window'); var glob = require('glob'); var mainWindow = null; // Require and setup each JS file in the main-process dir glob('main-process/**/*.js', function (error, files) { files.forEach(function (file) { require('./' + file).setup(); }); }); ap...
var app = require('app'); var BrowserWindow = require('browser-window'); var glob = require('glob'); var mainWindow = null; // Require and setup each JS file in the main-process dir glob('main-process/**/*.js', function (error, files) { files.forEach(function (file) { require('./' + file).setup(); }); }); fu...
Handle OS X no window situation
Handle OS X no window situation Same setup as quick start guide
JavaScript
mit
PanCheng111/XDF_Personal_Analysis,electron/electron-api-demos,electron/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,PanCheng111/XDF_Personal_Analysis
9f5a15819d2f6503f33e5b27b0d30be239e5e72a
main.js
main.js
console.log("I'm ready");
// Init the app after page loaded. window.onload = initPage; // The entry function. function initPage() { if (!canvasSupport()) { // If Canvas is not supported on the browser, do nothing but tell the user. alert("Sorry, your browser does not support HTML5 Canvas"); return false; } drawScreen(); } functi...
Make sure Canvas is supported on the browser
Make sure Canvas is supported on the browser
JavaScript
mit
rainyjune/canvas-guesstheletter,rainyjune/canvas-guesstheletter
285c390eb811461d517f777a03167d9f44913af5
views/components/touch-feedback.android.js
views/components/touch-feedback.android.js
import React from "react-native"; const { TouchableNativeFeedback } = React; export default class TouchFeedback extends React.Component { render() { return ( <TouchableNativeFeedback {...this.props} background={TouchableNativeFeedback.Ripple(this.props.pressColor)}> {this.props.children} </TouchableNati...
import React from "react-native"; import VersionCodes from "../../modules/version-codes"; const { TouchableNativeFeedback, Platform } = React; export default class TouchFeedback extends React.Component { render() { return ( <TouchableNativeFeedback {...this.props} background={ Platform.Version >=...
Fix crash on Android 4.x
Fix crash on Android 4.x
JavaScript
unknown
wesley1001/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods
32c88d9541ed8b948d82c27e84d974d6340d3cb8
views/controllers/room-title-controller.js
views/controllers/room-title-controller.js
import React from "react-native"; import RoomTitle from "../components/room-title"; import controller from "./controller"; const { InteractionManager } = React; @controller export default class RoomTitleController extends React.Component { constructor(props) { super(props); const displayName = this.props.room....
import React from "react-native"; import RoomTitle from "../components/room-title"; import controller from "./controller"; const { InteractionManager } = React; @controller export default class RoomTitleController extends React.Component { constructor(props) { super(props); const displayName = this.props.room....
Update room title on store change
Update room title on store change
JavaScript
unknown
scrollback/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods
7d961ab16ca4db0bd91419cdfed8bb7f873ab36b
homeworks/dmitry.minchenko_wer1Kua/homework_2/script.js
homeworks/dmitry.minchenko_wer1Kua/homework_2/script.js
(function() { let height = 15, block = '#', space = ' '; if (height<2 || height>12) { return console.log('Error! Height must be >= 2 and <= 12'); } for (let i = 0; i < height; i++) { console.log(space.repeat(height-i) + block.repeat(i+1) + space.repeat(2) + block.repeat...
(function() { const HEIGHT = 15, BLOCK = '#', SPACE = ' '; if (HEIGHT<2 || HEIGHT>12) { return console.log('Error! Height must be >= 2 and <= 12'); } for (let i = 0; i < HEIGHT; i++) { console.log(SPACE.repeat(HEIGHT-i) + BLOCK.repeat(i+1) + SPACE.repeat(2) + BLOCK.repe...
Change to const instead of let
Change to const instead of let
JavaScript
mit
MastersAcademy/js-course-2017,MastersAcademy/js-course-2017,MastersAcademy/js-course-2017
0a4d8a5b194a5c636b0aa6225dadd2ab9ff7e150
parseFiles.js
parseFiles.js
var dir = require('node-dir'); dir.readFiles(__dirname, { exclude: ['LICENSE', '.gitignore', '.DS_Store'], excludeDir: ['node_modules', '.git'] }, function(err, content, next) { if (err) throw err; console.log('content:', content); next(); }, function(err, files) { ...
var dir = require('node-dir'); dir.readFiles(__dirname, { exclude: ['LICENSE', '.gitignore', '.DS_Store'], excludeDir: ['node_modules', '.git'] }, function(err, content, next) { if (err) throw err; var digitalOceanToken = findDigitalOceanToken(String(content)); var awsToken ...
Add functionality to check for keys in commmit
Add functionality to check for keys in commmit
JavaScript
mit
DevOps-HeadBangers/target-project-node
53fd5fdf4afa38fd732728c283e9bc2277b7a5cb
index.js
index.js
const jsonMask = require('json-mask') const badCode = code => code >= 300 || code < 200 module.exports = function (opt) { opt = opt || {} function partialResponse(obj, fields) { if (!fields) return obj return jsonMask(obj, fields) } function wrap(orig) { return function (obj) { const param...
const jsonMask = require('json-mask') const badCode = code => code >= 300 || code < 200 module.exports = function (opt) { opt = opt || {} function partialResponse(obj, fields) { if (!fields) return obj return jsonMask(obj, fields) } function wrap(orig) { return function (obj) { const param...
Move badCode to the wrapping function
Move badCode to the wrapping function This moves the badCode to the wrapping funciton as the status will not be correct in the function where the middleware first gets called.
JavaScript
mit
nemtsov/express-partial-response
4cfecfa2d4734c968ca6d3d1b65ec7e720f63081
index.js
index.js
/** * Created by tshen on 16/7/15. */ 'use strict' import {NativeModules} from 'react-native'; const NativeSimpleFetch = NativeModules.SimpleFetch; const fetch = function (url, options) { const params = { url: url, method: options.method ? options.method.toUpperCase() : 'GET', headers: o...
/** * Created by tshen on 16/7/15. */ 'use strict' import {NativeModules} from 'react-native'; const NativeSimpleFetch = NativeModules.SimpleFetch; const fetch = function (url, options) { const params = { url: url, method: options.method ? options.method.toUpperCase() : 'GET', headers: o...
Fix bug. Remove console logs.
Fix bug. Remove console logs.
JavaScript
mit
liaoyuan-io/react-native-simple-fetch
7b50be2427d450460b9b8c8ae8be6c81743bbf48
index.js
index.js
/* jshint node: true */ 'use strict'; // var path = require('path'); module.exports = { name: 'ember-power-select', contentFor: function(type, config) { if (config.environment !== 'test' && type === 'body-footer') { return '<div id="ember-power-select-wormhole"></div>'; } }, included: function(...
/* jshint node: true */ 'use strict'; // var path = require('path'); module.exports = { name: 'ember-power-select', contentFor: function(type, config) { if (config.environment !== 'test' && type === 'body-footer') { return '<div id="ember-power-select-wormhole"></div>'; } }, included: function(...
Include precompiled styles automatically for non-sass users
Include precompiled styles automatically for non-sass users
JavaScript
mit
cibernox/ember-power-select,esbanarango/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,chrisgame/ember-power-select,cibernox/ember-power-select,Dremora/ember-power-select,cibernox/ember-power-select,esbanarango/ember-power-select
429aa690a42e8f0f9282ca4a63bff052e45ea25e
packages/accounts-meetup/meetup_client.js
packages/accounts-meetup/meetup_client.js
(function () { Meteor.loginWithMeetup = function (options, callback) { // support both (options, callback) and (callback). if (!callback && typeof options === 'function') { callback = options; options = {}; } var config = Accounts.loginServiceConfiguration.findOne({service: 'meetup'}); ...
(function () { Meteor.loginWithMeetup = function (options, callback) { // support both (options, callback) and (callback). if (!callback && typeof options === 'function') { callback = options; options = {}; } var config = Accounts.loginServiceConfiguration.findOne({service: 'meetup'}); ...
Tweak the height of the popup box. Meetup varies the height of their box based on which permissions are requested.
Tweak the height of the popup box. Meetup varies the height of their box based on which permissions are requested.
JavaScript
mit
aldeed/meteor,sunny-g/meteor,pjump/meteor,shmiko/meteor,esteedqueen/meteor,wmkcc/meteor,framewr/meteor,Profab/meteor,ndarilek/meteor,steedos/meteor,allanalexandre/meteor,daltonrenaldo/meteor,Jonekee/meteor,vjau/meteor,Jeremy017/meteor,devgrok/meteor,jdivy/meteor,allanalexandre/meteor,Prithvi-A/meteor,joannekoong/meteor...
e5b7f40ea0e1751213048b3d50e49dc36438c3e3
website/src/app/project/experiments/experiment/components/notes/mc-experiment-notes.component.js
website/src/app/project/experiments/experiment/components/notes/mc-experiment-notes.component.js
angular.module('materialscommons').component('mcExperimentNotes', { templateUrl: 'app/project/experiments/experiment/components/notes/mc-experiment-notes.html', bindings: { experiment: '=' } });
angular.module('materialscommons').component('mcExperimentNotes', { templateUrl: 'app/project/experiments/experiment/components/notes/mc-experiment-notes.html', controller: MCExperimentNotesComponentController, bindings: { experiment: '=' } }); class MCExperimentNotesComponentController { /...
Add controller (to be filled out).
Add controller (to be filled out).
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
a91e08c79733eac0ff55f16840bbefc39adb6aa8
index.js
index.js
const vm = require('vm') module.exports = class Guards { constructor () { this.guardRegex = /[^=<>!']=[^=]/ this.templateRegex = /[^|]\|[^|]/ this.optionsVM = { displayErrors: true, filename: 'guards' } } getStack () { const origin = Error.prepareStackTrace const error = ne...
class Guards { constructor () { this.guardRegex = /[^=<>!']=[^=]/ this.templateRegex = /[^|]\|[^|]/ } buildPredicate (constants, guard) { return new Function( '', [ `const { ${this.destructureProps(constants)} } = ${JSON.stringify(constants)}`, `return ${guard}` ].j...
Drop v8 vm for native implementation, update tests accordingly :rocket:.
Drop v8 vm for native implementation, update tests accordingly :rocket:. - Implements and closes #1 by @edmulraney. - Better performance & browser support.
JavaScript
mit
yamafaktory/pattern-guard
e3a2c979b160201b53cb38660733f495be2b449a
index.js
index.js
'use strict'; var extend = require('extend'); var express = require('express'); var bodyParser = require('body-parser'); var router = express.Router(); var defaults = { loginEndpoint: '/login', logoutEndpoint: '/logout', idField: 'email', passwordField: 'password' }; module.exports = function (options) { o...
'use strict'; var extend = require('extend'); var express = require('express'); var bodyParser = require('body-parser'); var bcrypt = require('bcrypt'); var router = express.Router(); var defaults = { loginEndpoint: '/login', logoutEndpoint: '/logout', idField: 'email', passwordField: 'password', passwordHa...
Add getUser and validatePassword to login
Add getUser and validatePassword to login
JavaScript
isc
knownasilya/just-auth
a3fd89525c5eb04e8bdcc5289fbe1e907d038821
src/plugins/plugin-shim.js
src/plugins/plugin-shim.js
/** * Add shim config for configuring the dependencies and exports for * older, traditional "browser globals" scripts that do not use define() * to declare the dependencies and set a module value. */ (function(seajs, global) { // seajs.config({ // alias: { // "jquery": { // src: "lib/jquery.js", //...
/** * Add shim config for configuring the dependencies and exports for * older, traditional "browser globals" scripts that do not use define() * to declare the dependencies and set a module value. */ (function(seajs, global) { // seajs.config({ // alias: { // "jquery": { // src: "lib/jquery.js", //...
Fix the bug when src key is undefined,the shim plugin do not work.
Fix the bug when src key is undefined,the shim plugin do not work. When an alias item, the 'src' key is not defined, the code do not work well with the exports value.
JavaScript
mit
moccen/seajs,Lyfme/seajs,coolyhx/seajs,zaoli/seajs,baiduoduo/seajs,twoubt/seajs,tonny-zhang/seajs,mosoft521/seajs,wenber/seajs,miusuncle/seajs,yern/seajs,Gatsbyy/seajs,imcys/seajs,angelLYK/seajs,kuier/seajs,MrZhengliang/seajs,twoubt/seajs,JeffLi1993/seajs,lianggaolin/seajs,yern/seajs,uestcNaldo/seajs,121595113/seajs,ue...
d54150b9a86c3cc0a08376e3b1cf9c223a7c0096
index.js
index.js
;(_ => { 'use strict'; var tagContent = 'router2-content'; function matchHash() { var containers = document.querySelectorAll(`${tagContent}:not([hidden])`); var container; for (var i = 0; i < containers.length; i++) { containers[i].hidden = true; } var hash = window.location.hash.slice...
;(_ => { 'use strict'; var tagContent = 'router2-content'; function matchHash(parent, hash) { var containers; var container; var _hash = hash || window.location.hash; if (!parent) { containers = document.querySelectorAll(`${tagContent}:not([hidden])`); for (var i = 0; i < containers....
Complete the test for case 3
Complete the test for case 3
JavaScript
isc
m3co/router3,m3co/router3
4840f0296869dc9e78856cf577d766e3ce3ccabe
index.js
index.js
'use strict'; var server = require('./lib/server/')(); var config = require('config'); function ngrokIsAvailable() { try { require.resolve('ngrok'); return true; } catch (e) { return false; } } if (config.isValid()) { var port = config.get("port") || 8080; server.listen(port, function () { c...
'use strict'; var server = require('./lib/server/')(); var config = require('config'); function ngrokIsAvailable() { try { require.resolve('ngrok'); return true; } catch (e) { return false; } } /** * Make sure to configuration is valid before attempting to start the server. */ if (!config.isValid(...
Rearrange code to reduce nesting as requested by PR comment.
Rearrange code to reduce nesting as requested by PR comment.
JavaScript
mit
syjulian/Frontier,codeforhuntsville/Frontier
8aca8785d53d7c0568020a128df8e4fcb7865d2b
index.js
index.js
'use strict'; require('whatwg-fetch'); const path = require('path'), querystring = require('querystring').parse; const registry = 'http://npm-registry.herokuapp.com'; const query = querystring(window.location.search.slice(1)).q; if (query) { window.fetch(path.join(registry, query)) .then((response) => ...
'use strict'; require('whatwg-fetch'); const url = require('url'), querystring = require('querystring').parse; const registry = 'http://npm-registry.herokuapp.com'; const query = querystring(window.location.search.slice(1)).q; if (query) { window.fetch(url.resolve(registry, query)) .then((response) => ...
Use url.resolve to get the url
Use url.resolve to get the url
JavaScript
mit
npmdocs/www
349a44df9340accdccbf829317dce9e359442e8c
service.js
service.js
var find = require('reactor/find'), serializer = require('./serializer'), url = require('url'); function say () { var all = [].slice.call(arguments), filtered = all.filter(function (argument) { return argument !== say }); console.log.apply(console, filtered); if (filtered.length != all.length) proc...
var find = require('reactor/find'), serializer = require('./serializer'), url = require('url'); function say () { var all = [].slice.call(arguments), filtered = all.filter(function (argument) { return argument !== say }); console.log.apply(console, filtered); if (filtered.length != all.length) proc...
Add `request` and `response` to context.
Add `request` and `response` to context. Add `request` and `response` to context in the service. Closes #106.
JavaScript
mit
bigeasy/stencil,bigeasy/stencil,bigeasy/stencil
5afa8d8796312b693964d133e626f23f3ba3a67c
src/main.js
src/main.js
import React from 'react'; import App from './App'; import config from './config'; var mountNode = document.getElementById('main'); React.render(<App config={config.params} />, mountNode);
import React from 'react'; import App from './App'; var mountNode = document.getElementById('main'); const config = { name: window.GROUP_NAME, description: window.GROUP_DESCRIPTION, rootUrl: window.ROOT_URL, formContact: window.FORM_CONTACT, headerMenuLinks: window.HEADER_MENU_LINKS, twitterUsername: ...
Use global variables instead of configuration file (no need to recompile the JS code to see the changes)
Use global variables instead of configuration file (no need to recompile the JS code to see the changes)
JavaScript
apache-2.0
naltaki/naltaki-front,naltaki/naltaki-front
5570a14c93b71af910e89fc4f2a6f8d7435451ed
src/main.js
src/main.js
import electron from 'electron'; import path from 'path'; import Menu from './remote/Menu'; import config from './config'; const app = electron.app; // Report crashes to our server. // electron.CrashReporter.start(); // Keep a global reference of the window object, if you don't, the window will // be closed automa...
import electron from 'electron'; import path from 'path'; import process from 'process'; import Menu from './remote/Menu'; import config from './config'; const app = electron.app; // Report crashes to our server. // electron.CrashReporter.start(); // Keep a global reference of the window object, if you don't, the ...
Call process.exit() when all windows are closed
[XDE] Call process.exit() when all windows are closed
JavaScript
mit
exponentjs/xde,exponentjs/xde
1d0bbe6b09e8c2beeb4cf4cb9c9c20944f194275
index.js
index.js
var Promise = require('bluebird'); var mapObj = require('map-obj'); var assign = require('object-assign'); function FileWebpackPlugin(files) { this.files = files || {}; } FileWebpackPlugin.prototype.apply = function(compiler) { var self = this; compiler.plugin('emit', function(compiler, done) { var data = {...
var Promise = require('bluebird'); var mapObj = require('map-obj'); var assign = require('object-assign'); function FileWebpackPlugin(files) { this.files = files || {}; } FileWebpackPlugin.prototype.apply = function(compiler) { var self = this; compiler.plugin('emit', function(compiler, done) { var data = {...
Use Bluebird's nodeify to handle resulting promise
Use Bluebird's nodeify to handle resulting promise
JavaScript
mit
markdalgleish/file-webpack-plugin
a84c9a76cbb4b65bf6c8a4f3483025a509bfab76
src/api/mqttPublishMessage.js
src/api/mqttPublishMessage.js
const apiPutMqttMessage = { schema: { summary: 'Retrieve a list of all keys present in the specified namespace.', description: '', body: { type: 'object', properties: { topic: { type: 'string', description: 'Name...
const apiPutMqttMessage = { schema: { summary: 'Publish a message to a MQTT topic.', description: '', body: { type: 'object', properties: { topic: { type: 'string', description: 'Topic to which message should be ...
Fix incorrect text for MQTT publish
docs: Fix incorrect text for MQTT publish Fixes #262
JavaScript
mit
mountaindude/butler
42f0f66acdef27a58599d59f72c6b8ae784975ab
src/blocks/scratch3_motion.js
src/blocks/scratch3_motion.js
function Scratch3MotionBlocks(runtime) { /** * The runtime instantiating this block package. * @type {Runtime} */ this.runtime = runtime; } /** * Retrieve the block primitives implemented by this package. * @return {Object.<string, Function>} Mapping of opcode to Function. */ Scratch3MotionBl...
var MathUtil = require('../util/math-util'); function Scratch3MotionBlocks(runtime) { /** * The runtime instantiating this block package. * @type {Runtime} */ this.runtime = runtime; } /** * Retrieve the block primitives implemented by this package. * @return {Object.<string, Function>} Mappi...
Implement move steps, turn right, turn left, point in direction
Implement move steps, turn right, turn left, point in direction
JavaScript
bsd-3-clause
TheBrokenRail/scratch-vm,LLK/scratch-vm,LLK/scratch-vm,LLK/scratch-vm,TheBrokenRail/scratch-vm