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
162a37b07e9770fb2c5b8893541843495bcdd1df
index.js
index.js
(function() { var Dependument = require('dependument').Dependument; var d = new Dependument({ source: 'package.json', output: 'DEPENDENCIES.md' }); d.process(); })();
#!/usr/bin/env node (function() { var Dependument = require('dependument').Dependument; var d = new Dependument({ source: 'package.json', output: 'DEPENDENCIES.md' }); d.process(); })();
Add declaration to top of script
Add declaration to top of script
JavaScript
unlicense
dependument/dependument-cli
aab3854d6cfee4ee909cb79fc333cda60da850af
index.js
index.js
const RunPluginScriptCommand = require('./src/commands/runPluginScript') const CreateProjectCommand = require('./src/commands/createProject') const AddPluginsCommand = require('./src/commands/addPlugins') const RemovePluginsCommand = require('./src/commands/removePlugins') const UpdatePluginsCommand = require('./src/co...
const RunPluginScriptCommand = require('./src/commands/runPluginScript') const CreateProjectCommand = require('./src/commands/createProject') const AddPluginsCommand = require('./src/commands/addPlugins') const RemovePluginsCommand = require('./src/commands/removePlugins') const UpdatePluginsCommand = require('./src/co...
Remove init in public api
Remove init in public api
JavaScript
mit
rispa-io/rispa-cli
8adef8bff6e8a192a0a06388f3f4213bbf0e13a0
index.js
index.js
'use strict' const http = require('http') const express = require('express') const bodyParser = require('body-parser') const Bot = require('messenger-bot') let bot = new Bot({ token: process.env.PAGE_TOKEN, verify: 'VERIFY_TOKEN', app_secret: 'APP_SECRET' }) bot.on('error', (err) => { console.log(err.message)...
'use strict' const http = require('http') const express = require('express') const bodyParser = require('body-parser') const Bot = require('messenger-bot') let bot = new Bot({ token: process.env.PAGE_TOKEN, verify: 'VERIFY_TOKEN', app_secret: 'APP_SECRET' }) bot.on('error', (err) => { console.log(err.message)...
Add message for starting the server
Add message for starting the server
JavaScript
mit
nikolay-radkov/ebudgie-server,nikolay-radkov/ebudgie-server
d0643b62badc45f85a358a6bdec4a2408325fe27
index.js
index.js
var once = require('once'); module.exports = function () { var collections = [].slice.call(arguments); if(!Array.isArray(collections[0])) { collections = [ collections ]; } return Promise.all( collections.map(function(plugins) { var i = -1; return new Promise...
var once = require('once'); module.exports = function () { var collections = [].slice.call(arguments); if(!Array.isArray(collections[0])) { collections = [ collections ]; } return Promise.all( collections.map(function(plugins) { var i = -1; return new Promise...
Fix can not read property of undefined error
Fix can not read property of undefined error
JavaScript
mit
erickmerchant/static-engine
b411f030dd296756fb77cd50b64ae1a7649dadb7
index.js
index.js
/*jslint indent: 2, vars: true */ var es = require('event-stream'); var gutil = require('gulp-util'); var Buffer = require('buffer').Buffer; var cheerio = require('cheerio'); function modify(elem, attr, modifier) { "use strict"; var val = elem.attr(attr); if (val) { elem.attr(attr, modifier(val)); } } module....
/*jslint indent: 2, vars: true */ var es = require('event-stream'); var gutil = require('gulp-util'); var Buffer = require('buffer').Buffer; var cheerio = require('cheerio'); function modify(file, elem, attr, modifier) { "use strict"; var val = elem.attr(attr); if (val) { elem.attr(attr, modifier(val, file)); ...
Add file as second param
Add file as second param
JavaScript
mit
othree/gulp-path-modifier
475a2c1ed04a08a93196a9d809da3f3181d9d04e
index.js
index.js
'use strict' var visit = require('unist-util-visit') var toString = require('nlcst-to-string') var posjs = require('pos') module.exports = pos var tagger = new posjs.Tagger() function pos() { return transformer } function transformer(tree) { var queue = [] visit(tree, 'WordNode', visitor) /* Gather a par...
'use strict' var visit = require('unist-util-visit') var toString = require('nlcst-to-string') var posjs = require('pos') module.exports = pos var tagger = new posjs.Tagger() function pos() { return transformer } function transformer(tree) { visit(tree, 'SentenceNode', visitor) // Patch all words in `parent...
Refactor algorithm to perform better
Refactor algorithm to perform better
JavaScript
mit
wooorm/retext-pos
b75755f3de66305458831e283e65bfc7edaac088
app/assets/javascripts/project-gallery.js
app/assets/javascripts/project-gallery.js
/* Launches project gallery lightbox from button on project show pages */ $("#launch-gallery").on("click", function(event) { event.preventDefault(); $("#project-gallery .image:first-child > img").trigger("click"); });
/* Launches project gallery lightbox from button on project show pages */ $("#launch-gallery").on("click", function(event) { event.preventDefault(); document.getElementById('project-gallery').querySelector('.image').click(); });
Fix ordering issue when launching lightgallery from the button
Fix ordering issue when launching lightgallery from the button
JavaScript
agpl-3.0
awesomefoundation/awesomebits,awesomefoundation/awesomebits,awesomefoundation/awesomebits,awesomefoundation/awesomebits,awesomefoundation/awesomebits
c246eff923c49175bda78b217e86d76371041cf2
imports/ldap/transformUser.js
imports/ldap/transformUser.js
let _ = require('underscore'); module.exports = function (ldapSettings, userData) { let searchDn = ldapSettings.searchDn || 'cn'; // userData.mail may be a string with one mail address or an array. // Nevertheless we are only interested in the first mail address here - if there should be more... let t...
let _ = require('underscore'); module.exports = function (ldapSettings, userData) { let searchDn = ldapSettings.searchDn || 'cn'; // userData.mail may be a string with one mail address or an array. // Nevertheless we are only interested in the first mail address here - if there should be more... let t...
Make sure the username is lower case when imported from ldap
Make sure the username is lower case when imported from ldap Otherwise the meteor accounts package cannot find the user document which leads to errors when logging in with an username that has upper case letters
JavaScript
mit
RobNeXX/4minitz,RobNeXX/4minitz,4minitz/4minitz,4minitz/4minitz,Huggle77/4minitz,Huggle77/4minitz,RobNeXX/4minitz,4minitz/4minitz,Huggle77/4minitz
223d7bfa811075c03ec196e4e14302048ad3919b
test/specs/test-utils.js
test/specs/test-utils.js
/*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */ 'use strict'; var _ = require('lodash'); var Q = require('q'); var testUtils = { performAsyncTest: function(done, callback) { return Q.fcall(callback).then(function() { done(); }).fail(function(reason) { ...
/*! resol-vbus | Copyright (c) 2013-2014, Daniel Wippermann | MIT license */ 'use strict'; var _ = require('lodash'); var Q = require('q'); var testUtils = { performAsyncTest: function(done, callback) { return Q.fcall(callback).then(function() { done(); }).fail(function(reason) { ...
Add `adaptTimeout` helper that changes timeouts during Travis test.
Add `adaptTimeout` helper that changes timeouts during Travis test.
JavaScript
mit
danielwippermann/resol-vbus,Thorsten71/resol-vbus
684daa5fcc92e8347374678fe008faf3a4744763
public/javascripts/forum-post.js
public/javascripts/forum-post.js
var oldContents = null; var editForumPost = function(postId, postNumber) { var postSelector = $("#" + postNumber); // We grab the text element of the post and turn it into a textarea to make it editable oldContents = postSelector.find(".message") var postContents = oldContents.text(); var editF...
// Map of old post contents by post number in case the user clicks 'edit' on multiple posts // on the same page (although rare.) var oldContents = {}; var editForumPost = function(postId, postNumber) { var postSelector = $("#" + postNumber); // We grab the text element of the post and turn it into a textarea...
Fix issue when edit is clicked on more than one post and then cancelled on both.
Fix issue when edit is clicked on more than one post and then cancelled on both.
JavaScript
agpl-3.0
clarkerubber/lila,arex1337/lila,arex1337/lila,clarkerubber/lila,arex1337/lila,arex1337/lila,arex1337/lila,clarkerubber/lila,luanlv/lila,luanlv/lila,luanlv/lila,clarkerubber/lila,luanlv/lila,arex1337/lila,luanlv/lila,luanlv/lila,luanlv/lila,arex1337/lila,clarkerubber/lila,clarkerubber/lila,clarkerubber/lila
a84b191d71cef5d4a5f68c2da3dcc32c33e10351
js/yt-player.js
js/yt-player.js
$('.close-modal').click(function () { $('#yt-player').hide(); $('#yt-player iframe').attr("src", jQuery("#yt-player iframe").attr("src")); });
jQuery(document).bind('hidden.bs.modal', function() { var vid = jQuery('#monologueForThree iframe[src*="youtube"]'); if ( vid.length > 0 ){ var src = vid.attr('src'); vid.attr('src', ''); vid.attr('src', src); } });
Fix issue with 2 embed modals interferring with YouTube close
fix: Fix issue with 2 embed modals interferring with YouTube close
JavaScript
mit
DeltaSpark/deltaspark.github.io,DeltaSpark/deltaspark.github.io
bc21e2861d12c0c4174a68610a1b94bcfb2c0f7d
config/routes.js
config/routes.js
module.exports.routes = { 'post /register': 'UserController.create', 'post /logout': 'AuthController.logout', 'post /auth/local': 'AuthController.callback', 'post /auth/local/:action': 'AuthController.callback', 'post /auth/:provider/:action': 'AuthController.callback', 'get /auth/:provider': 'AuthContro...
module.exports.routes = { 'post /register': 'UserController.create', 'post /logout': 'AuthController.logout', 'post /auth/local': 'AuthController.callback', 'post /auth/local/:action': 'AuthController.callback', 'post /auth/:provider': 'AuthController.callback', 'post /auth/:provider/:action': 'AuthContro...
Add new Delegated Authentication Protocol
Add new Delegated Authentication Protocol Add new simpler POST route to support delegated authentication, which utilises a default action.
JavaScript
mit
tjwebb/sails-auth,danielsharvey/sails-auth,onlyurei/sails-auth,langateam/sails-auth
d6d356c9382b2bc2efe5e278fc831892f5312983
examples/babel/destructuring-assignment/index.js
examples/babel/destructuring-assignment/index.js
#!/usr/bin/env babel-node import assert from 'assert'; function getObj() { return { x: 2, y: 3 }; } let { x, y, z = 6 } = getObj(); assert.strictEqual(x, 2); assert.strictEqual(y, 3); assert.strictEqual(z, 6);
#!/usr/bin/env babel-node import assert from 'assert'; // // 分割代入内で代入ができる // function getObj() { return { x: 2, y: 3 }; } let { x, y, z = 6 } = getObj(); assert.strictEqual(x, 2); assert.strictEqual(y, 3); assert.strictEqual(z, 6); // // 別変数名で展開できる // function stringifyObj({ x: xVar, y: yVar })...
Update a sample of ES6
Update a sample of ES6
JavaScript
mit
kjirou/nodejs-codes
382b2099940ec2bf42646ff1f01a9f5005e5d52a
route-styles.js
route-styles.js
/** * Created by Zack Boman on 1/31/14. * http://www.zackboman.com or tennisgent@gmail.com */ (function(){ var mod = angular.module('routeStyles', ['ngRoute']); mod.directive('head', ['$rootScope','$compile', function($rootScope, $compile){ return { restrict: 'E', ...
/** * Created by Zack Boman on 1/31/14. * http://www.zackboman.com or tennisgent@gmail.com */ 'use strict'; (function(){ var mod = angular.module('routeStyles', ['ngRoute']); mod.directive('head', ['$rootScope','$compile', function($rootScope, $compile){ return { restr...
Switch to use two separate events instead of the single event to prevent the CSS transition problem.
Switch to use two separate events instead of the single event to prevent the CSS transition problem.
JavaScript
mit
freedomdebug/angular-route-styles,elantion/angular-route-styles,freedomdebug/angular-route-styles,elantion/angular-route-styles,tennisgent/angular-route-styles
2995bcb5fa948204d2382c2fba1275cdffbff2c9
generate.js
generate.js
const fs = require('fs'); const glob = require('glob'); const yaml = require('js-yaml'); const extendify = require('extendify'); glob("templates/*.yml", function (er, files) { const contents = files.map(f => { return yaml.safeLoad(fs.readFileSync(f, 'utf8')); }); const extend = extendify({ inPlace: false...
const fs = require('fs'); const glob = require('glob'); const yaml = require('js-yaml'); const extendify = require('extendify'); const proc = require('child_process'); const sortOrder = [ 'AWSTemplateFormatVersion', 'Description', 'Parameters', 'Mappings', 'Conditions', 'Resources', 'Metadata', 'Output...
Sort output in build files
Sort output in build files
JavaScript
mit
buildkite/elastic-ci-stack-for-aws,holmesjr/elastic-ci-stack-for-aws,holmesjr/elastic-ci-stack-for-aws
b7886cf31b0bdcd61bd96540f425a8a2aa8161aa
nails.js
nails.js
var Server = require("./server.js").Server; var Config = require("./config.js").Config; exports.nails = appRoot => { var cfg = new Config(appRoot + "/config.json"); cfg.set('appRoot', appRoot); new Server(cfg).run(); };
var path = require("path"); var Server = require("./server.js").Server; var Config = require("./config.js").Config; exports.nails = (appRoot = path.dirname(require.main.filename)) => { var cfg = new Config(appRoot + "/config.json"); cfg.set('appRoot', appRoot); new Server(cfg).run(); };
Make the appRoot param optional
Make the appRoot param optional
JavaScript
mit
ArtOfCode-/nails,ArtOfCode-/nails
8a2de05444524ba913052a1bd838fbb4aa4fbf1d
app/stores/FlashesStore.js
app/stores/FlashesStore.js
import EventEmitter from 'eventemitter3'; class FlashesStore extends EventEmitter { constructor() { super(...arguments); this.ERROR = "error"; } flash(type, message) { // See if the message is actually a GraphQL exception if(message.source && message.message) { if(message.source.errors[0] ...
import EventEmitter from 'eventemitter3'; class FlashesStore extends EventEmitter { constructor() { super(...arguments); this.ERROR = "error"; } flash(type, message) { // See if the message is actually a GraphQL exception if(message.source && message.message) { if(message.source.errors[0] ...
Use a different message if GraphQL errors and we show a flash
Use a different message if GraphQL errors and we show a flash
JavaScript
mit
fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend
afcbfb968f872b2f1462926bcb1956d43cd9cb05
lib/util/media_ready_state_utils.js
lib/util/media_ready_state_utils.js
/** @license * Copyright 2016 Google LLC * SPDX-License-Identifier: Apache-2.0 */ goog.provide('shaka.util.MediaReadyState'); shaka.util.MediaReadyState = class { /* * @param {!HTMLMediaElement} mediaElement * @param {HTMLMediaElement.ReadyState} readyState * @param {!function()} callback */ static wa...
/** @license * Copyright 2016 Google LLC * SPDX-License-Identifier: Apache-2.0 */ goog.provide('shaka.util.MediaReadyState'); goog.require('shaka.util.EventManager'); shaka.util.MediaReadyState = class { /** * @param {!HTMLMediaElement} mediaElement * @param {number} readyState * @param {shaka.util.Ev...
Fix annotations in MediaReadyState util
Fix annotations in MediaReadyState util For some reason, the new compiler in the master branch let this by, but the old compiler in the v2.5.x branch complained when I cherry-picked the utility. Change-Id: I1e688f72594b74ed7d2a7c2801eb179b8ec13e8c
JavaScript
apache-2.0
shaka-project/shaka-player,tvoli/shaka-player,shaka-project/shaka-player,tvoli/shaka-player,tvoli/shaka-player,tvoli/shaka-player,shaka-project/shaka-player,shaka-project/shaka-player
563f1a51ca73c8c50d12c8420542965770c6a28f
shared/oae/js/jquery-plugins/jquery.jeditable-focus.js
shared/oae/js/jquery-plugins/jquery.jeditable-focus.js
/*! * Copyright 2012 Sakai Foundation (SF) Licensed under the * Educational Community 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.osedu.org/licenses/ECL-2.0 * * Unless required by applicable...
/*! * Copyright 2012 Sakai Foundation (SF) Licensed under the * Educational Community 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.osedu.org/licenses/ECL-2.0 * * Unless required by applicable...
Make the spacebar usable for inline edit
Make the spacebar usable for inline edit
JavaScript
apache-2.0
Orodan/3akai-ux-jitsi-fork,Orodan/3akai-ux-jitsi-fork,nicolaasmatthijs/3akai-ux,timdegroote/3akai-ux,jfederico/3akai-ux,timdegroote/3akai-ux,nicolaasmatthijs/3akai-ux,stuartf/3akai-ux,mrvisser/3akai-ux,Coenego/avocet-ui,stuartf/3akai-ux,stuartf/3akai-ux,jfederico/3akai-ux,Orodan/3akai-ux-jitsi-fork,jfederico/3akai-ux,s...
5b231c4177876cc25ed503a30c94afd7babc390d
lib/calendar.js
lib/calendar.js
var icalendar = require('icalendar'); exports.generateIcal = function(boards) { var ical = new icalendar.iCalendar(); boards.each(function(board) { board.cards().each(function(card) { // no arm, no chocolate if (!card.get('badges').due) return; var event = new icalen...
var icalendar = require('icalendar'); exports.generateIcal = function(boards) { var ical = new icalendar.iCalendar(); boards.each(function(board) { board.cards().each(function(card) { // no arm, no chocolate if (!card.get('badges').due) return; var event = new icalen...
Attach the URL to the event.
Attach the URL to the event. Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me>
JavaScript
agpl-3.0
francois2metz/trello-calendar,francois2metz/trello-calendar
418df71223c33559cea3dc822cd16fab8c912dba
src/commands/IDBanCommand.js
src/commands/IDBanCommand.js
import BaseCommand from './BaseCommand'; /** * Simple command to ban a uaer by their ID. */ class IDBanCommand extends BaseCommand { constructor(bot) { super(bot); } /** * This event method we should listen for. * * @type {string} */ method = 'message'; /** * Th...
import BaseCommand from './BaseCommand'; /** * Simple command to ban a uaer by their ID. */ class IDBanCommand extends BaseCommand { constructor(bot) { super(bot); } /** * This event method we should listen for. * * @type {string} */ method = 'message'; /** * Th...
Upgrade IDBan command to do some more checking
Upgrade IDBan command to do some more checking
JavaScript
mit
ATLauncher/Discord-Bot
f3f7541d46624e65ff90022c8ff0e66c5da4e786
client/src/actions.js
client/src/actions.js
export const FETCH_QUEUE = 'FETCH_QUEUE' export const FETCH_QUEUE_DONE = 'FETCH_QUEUE_DONE' export const FETCH_ACCOUNTS = 'FETCH_ACCOUNTS' export const FETCH_TAGS = 'FETCH_TAGS' export const ADD_TAG = 'ADD_TAG' export const REMOVE_TAG = 'REMOVE_TAG' export function fetchQueue() { return { type: FETCH_QUEUE } }...
export const FETCH_QUEUE = 'FETCH_QUEUE' export const FETCH_QUEUE_DONE = 'FETCH_QUEUE_DONE' export const FETCH_ACCOUNTS = 'FETCH_ACCOUNTS' export const FETCH_TAGS = 'FETCH_TAGS' export const ADD_TAG = 'ADD_TAG' export const REMOVE_TAG = 'REMOVE_TAG' export const SET_ACTIVE_DONATION = 'SET_ACTIVE_DONATION' export funct...
Add action to set active donation
Add action to set active donation
JavaScript
mit
rymdkraftverk/q,rymdkraftverk/q,rymdkraftverk/q
1e4a3cf9a1db9c124f3b44aaf9e55f40e9073ee5
ui/server/proxies/api.js
ui/server/proxies/api.js
'use strict'; // Issue to improve: https://github.com/hashicorp/nomad/issues/7465 const proxyPath = '/v1'; module.exports = function(app, options) { // For options, see: // https://github.com/nodejitsu/node-http-proxy let proxyAddress = options.proxy; let server = options.httpServer; let proxy = require('...
'use strict'; // Issue to improve: https://github.com/hashicorp/nomad/issues/7465 const proxyPath = '/v1'; module.exports = function(app, options) { // For options, see: // https://github.com/nodejitsu/node-http-proxy // This is probably not safe to do, but it works for now. let cacheKey = `${options.project...
Disable the proxy when Mirage is enabled
Disable the proxy when Mirage is enabled This is to prevent max socket connection errors that can stop the live reload server from responding.
JavaScript
mpl-2.0
dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,hashicorp/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,hashicorp/nomad
e53197be96bbbad51af8ad91dae000e607076f6d
github/index.js
github/index.js
const fetch = require("node-fetch"); const qs = require("qs"); const { load } = require("js-yaml"); const { getInstallationToken } = require("./installation-token"); module.exports.GitHub = class GitHub { constructor (installationId) { this.installationId = installationId; } get (urlSegment) { return ...
const fetch = require("node-fetch"); const qs = require("qs"); const { load } = require("js-yaml"); const { getInstallationToken } = require("./installation-token"); module.exports.GitHub = class GitHub { constructor (installationId) { this.installationId = installationId; } get (urlSegment) { return ...
Add GH method for retrieving maintainerd config file.
Add GH method for retrieving maintainerd config file.
JavaScript
mit
divmain/maintainerd,divmain/maintainerd
0a256cc090a1577dc9af7574351c1bf76f802c5d
build/responsive.js
build/responsive.js
const paths = require('./paths'); const fs = require('fs-extra'); const glob = require('glob'); /** * Build the breakpoint * * @param {*} breakpoint * @param {*} count */ function buildBreakpoint(breakpoint, count) { let html = `html { font-family: '${count}'; }`; return `@${breakpoint} { ${html} }\n`; } modu...
const paths = require('./paths'); const fs = require('fs-extra'); const glob = require('glob'); /** * Build the breakpoint * * @param {*} breakpoint * @param {*} count */ function buildBreakpoint(breakpoint, count) { let html = `html { font-family: '${count}'; }`; return `@${breakpoint} { ${html} }\n`; } modu...
Disable linting for generated file
Disable linting for generated file
JavaScript
apache-2.0
weepower/wee,weepower/wee
f0bc01603b491f14e593cc24329c18efc2beaf40
lib/amazon/metadata-config.js
lib/amazon/metadata-config.js
// -------------------------------------------------------------------------------------------------------------------- // // metadata-config.js - config for AWS Instance Metadata // // Copyright (c) 2011, 2012 AppsAttic Ltd - http://www.appsattic.com/ // Written by Andrew Chilton <chilts@appsattic.com> // // License: ...
// -------------------------------------------------------------------------------------------------------------------- // // metadata-config.js - config for AWS Instance Metadata // // Copyright (c) 2011, 2012 AppsAttic Ltd - http://www.appsattic.com/ // Written by Andrew Chilton <chilts@appsattic.com> // // License: ...
Make sure the extractBody is set (not just body)
Make sure the extractBody is set (not just body)
JavaScript
mit
chilts/awssum
e40c302a81525957b523d07f287dab6bad0d4381
src/components/search_bar.js
src/components/search_bar.js
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { render() { //method definition in ES6 return <input onChange={event => console.log(event.target.value)} />; } } export default SearchBar;
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { constructor(props) { super(props); this.state = { term: '' } } render() { //method definition in ES6 return <input onChange={event => console.log(event.target.value)} />; } } export defaul...
Initialize state in class-based component
Initialize state in class-based component
JavaScript
mit
phirefly/react-redux-starter,phirefly/react-redux-starter
b870cb035827f13be864ba7efd4cc7a3476130c5
grunt/yuidoc.js
grunt/yuidoc.js
module.exports = { js: { lintNatives: true, name: '<%= pkg.name %>', url: '<%= pkg.homepage %>', version: '<%= pkg.version %>', description: '<%= pkg.description %>', options: { nocode: true, paths: './src/', outdir: './build/docume...
module.exports = { js: { lintNatives: true, name: '<%= pkg.name %> by <%= pkg.author.name %>', url: '<%= pkg.homepage %>', version: '<%= pkg.version %>', description: '<%= pkg.description %>', options: { nocode: true, paths: './src/', ...
Add author information for SEO purposes
Add author information for SEO purposes
JavaScript
mit
Skelware/node-file-parser,Skelware/node-file-parser
43e31be248938a974944553c0152781f068f5122
public/app/accounts/accounts.js
public/app/accounts/accounts.js
angular.module('shortly.shorten', []) .controller('AccountsController', function ($scope, $window, $location, $http, Links) { // $scope.hasStripeConnectAccount = function() { // var currentUser = sessionStorage.getItem('user'); // console.log('user',currentUser); // }; $scope.authorize = function() {...
angular.module('shortly.shorten', []) .controller('AccountsController', function ($scope, $window, $location, $http, Links) { /** * Handles Stripe 'Connect' button submit. * Gets Connect account creation redirect url from server and manually sets href. */ $scope.authorize = function() { var currentU...
Add comments for functions that handle user account info submission
Add comments for functions that handle user account info submission
JavaScript
mit
arosenberg01/headcount,kyleshockey/headcount,Illustrious-Dirigble/headcount,kyleshockey/headcount,rockytang/headcount,rockytang/headcount,arosenberg01/headcount,henrymollman/headcount,Za1batsu/FinIt,Za1batsu/FinIt,henrymollman/headcount,Illustrious-Dirigble/headcount
bd7ff400fa44892019ec97cfda1c93f8e0e33d02
bin/fileTemplater.js
bin/fileTemplater.js
"use strict"; var fs = require('fs'); var path = require('path'); var extend = require('extend'); var template = require('lodash/template'); var errorHandler = require('./errorHandler'); var _fileNumber = 1; var _config = { onEachFile: function() {}, onCompleted: function() {} }; var fileTemplaterApi = {}; ...
"use strict"; var fs = require('fs'); var path = require('path'); var extend = require('extend'); var template = require('lodash/template'); var errorHandler = require('./errorHandler'); var _fileNumber = 1; var _config = { onEachFile: function() {}, onCompleted: function() {} }; var fileTemplaterApi = {}; ...
Add doc comments for file templater
docs: Add doc comments for file templater
JavaScript
mit
cartridge/cartridge-cli,code-computerlove/quarry,code-computerlove/slate-cli
dddef42d59dc3af1cd2a43b311774dc286251d15
app/instance-initializers/active-model-adapter.js
app/instance-initializers/active-model-adapter.js
import ActiveModelAdapter from 'active-model-adapter'; import ActiveModelSerializer from 'active-model-adapter/active-model-serializer'; export default { name: 'active-model-adapter', initialize: function(applicationOrRegistry) { var registry, container; if (applicationOrRegistry.registry && applicationOrR...
import ActiveModelAdapter from 'active-model-adapter'; import ActiveModelSerializer from 'active-model-adapter/active-model-serializer'; export default { name: 'active-model-adapter', initialize: function(applicationOrRegistry) { var registry; if (applicationOrRegistry.registry) { // initializeStoreS...
Remove unused container in instance initializer
Remove unused container in instance initializer
JavaScript
mit
bmac/active-model-adapter,ember-data/active-model-adapter,fivetanley/active-model-adapter,ember-data/active-model-adapter,jcope2013/active-model-adapter,ember-data/active-model-adapter,jcope2013/active-model-adapter,fivetanley/active-model-adapter,fivetanley/active-model-adapter,fivetanley/active-model-adapter,bmac/act...
1c528dd7dbe806411b0f2efcdf0e219b6c8c6e21
example/example/App.js
example/example/App.js
/** * Sample React Native Calendar Strip * https://github.com/BugiDev/react-native-calendar-strip * @flow */ import React, { Component } from 'react'; import CalendarStrip from "react-native-calendar-strip"; export default class App extends Component<{}> { render() { return ( <CalendarStrip ...
/** * Sample React Native Calendar Strip * https://github.com/BugiDev/react-native-calendar-strip * @flow */ import React, { Component } from 'react'; import CalendarStrip from "react-native-calendar-strip"; import moment from 'moment'; export default class App extends Component<{}> { render() { let customD...
Update example with customDatesStyles and markedDates.
Update example with customDatesStyles and markedDates.
JavaScript
mit
BugiDev/react-native-calendar-strip,BugiDev/react-native-calendar-strip,BugiDev/react-native-calendar-strip
e58cd331e4c5a21d42592d4b48333789ef1cfd50
replace-values.js
replace-values.js
module.exports = { "replace": { "_i18n/template.en-US.json": { "author": /docprofsky/g, "info-name": "info.name", "info-use": "info.use", "info-detail": "info.detail" }, "package.json": { "author": /docprofsky/g, "name": /template(?!_)/g }, "template.js": { ...
module.exports = { "replace": { "_i18n/template.en-US.json": { "author": /docprofsky/g, "info-name": "info.name", "info-use": "info.use", "info-detail": "info.detail" }, "package.json": { "author": /docprofsky/g, "name": /template(?!_)/g }, "template.js": { ...
Remove template file when done configuring
Remove template file when done configuring
JavaScript
mit
docprofsky/robopaint-mode-template,docprofsky/robopaint-mode-template
2ccca7dca1b4c6bbdcc5bf3faf408c6f14d388bf
gulpfile.js
gulpfile.js
var gulp = require('gulp') , gutil = require('gulp-util') , help = require('gulp-help') , path = require('path') , packageJson = require(path.resolve(__dirname, 'package.json')) , noop = function(){} help(gulp, { aliases: ['h'] }) gulp.task('version', 'Prints the version nu...
var gulp = require('gulp') , path = require('path') , fs = require('fs') , helpers = require(path.resolve(__dirname, 'lib', 'helpers')) require('gulp-help')(gulp, { aliases: ['h'] }) fs .readdirSync(path.resolve(__dirname, 'lib', 'tasks')) .filter(function(file) { return file.inde...
Load the tasks from lib/tasks
Load the tasks from lib/tasks
JavaScript
mit
my-archives/cli,martinLE/cli,cogpie/cli,itslenny/cli,sequelize/cli,ataube/cli,martinLE/cli,Americas/cli,timrourke/cli,brad-decker/cli,sequelize/cli,Americas/cli,skv-headless/cli,jteplitz602/cli,xpepermint/cli,brad-decker/cli,brad-decker/cli,martinLE/cli,Americas/cli,sequelize/cli,fundon/cli,cusspvz/sequelize-cli
a701b0fb2bd2008aef1fdb0a56ddccb8f7331f91
src/objects/isNumber/isNumber.js
src/objects/isNumber/isNumber.js
/** * Checks if 'value' is a number. * Note: NaN is considered a number. * @param {*} value The value to check. * @returns {Boolean} Returns true if 'value' is a number, else false. */ function isNumber(value) { 'use strict'; return value && Object.prototype.toString.call(value) === '[obje...
/** * Checks if 'value' is a number. * Note: NaN is considered a number. * @param {*} value The value to check. * @return {Boolean} Returns true if 'value' is a number, else false. */ function isNumber(value) { 'use strict'; return value != null && // NOTE: Using non strict equality to check against null ...
Fix to return true for NaN
Fix to return true for NaN
JavaScript
mit
georapbox/smallsJS,georapbox/jsEssentials,georapbox/smallsJS
5a695d9e91ba8783e6fe9cbe48ed7544f6642a94
lib/lint_css.js
lib/lint_css.js
var _ = require('lodash'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context.customRules || {}; _.merge...
var _ = require('lodash'); var path = require('path'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context....
Add configBasedir to properly look up the plugins
Add configBasedir to properly look up the plugins
JavaScript
mit
natecavanaugh/check-source-formatting,natecavanaugh/check-source-formatting,natecavanaugh/check-source-formatting
13ca3b76cb5d8b9ff6818b13308f979f82f2a4b2
gulpfile.js
gulpfile.js
var gulp = require('gulp'), sass = require('gulp-sass'), rename = require('gulp-rename'), minifyCss = require('gulp-minify-css'), autoprefixer = require('gulp-autoprefixer'), browserSync = require('browser-sync').create(); gulp.task('dependencies', function() { gulp.src('bower_components/normali...
var gulp = require('gulp'), sass = require('gulp-sass'), rename = require('gulp-rename'), minifyCss = require('gulp-minify-css'), autoprefixer = require('gulp-autoprefixer'), browserSync = require('browser-sync').create(); gulp.task('dependencies', function() { gulp.src('bower_components/normali...
Update to gulp watch js folder
Update to gulp watch js folder
JavaScript
cc0-1.0
FatecSorocaba/semana-da-tecnologia,FatecSorocaba/semana-da-tecnologia
31269953529541f7c0d65dd6a9d2107867c190d2
src/reducers/compiledProjects.js
src/reducers/compiledProjects.js
import {List} from 'immutable'; import {CompiledProject} from '../records'; const initialState = new List(); function trimRight(list, maxLength) { if (list.size <= maxLength) { return list; } return list.splice(0, list.size - maxLength); } export default function compiledProjects(stateIn, action) { let ...
import {List} from 'immutable'; import {CompiledProject} from '../records'; const initialState = new List(); function trimRight(list, maxLength) { if (list.size <= maxLength) { return list; } return list.splice(0, list.size - maxLength); } export default function compiledProjects(stateIn, action) { let ...
Clear compiled projects when a project is created or switched to
Clear compiled projects when a project is created or switched to If you create a new project, or start the process of switching to an existing project, we want to clear the preview state. Otherwise: * When you create a new project, the old project sticks around * When switching projects, the preview is unpleasantly f...
JavaScript
mit
jwang1919/popcode,outoftime/learnpad,popcodeorg/popcode,outoftime/learnpad,popcodeorg/popcode,popcodeorg/popcode,jwang1919/popcode,jwang1919/popcode,jwang1919/popcode,popcodeorg/popcode
492b9d78a6a16daa3a9059b7bd24769c97d0443b
src/bin/commit-link-dependencies.js
src/bin/commit-link-dependencies.js
import {exec} from 'node-promise-es6/child-process'; import fs from 'node-promise-es6/fs'; async function run() { const {linkDependencies = {}} = await fs.readJson('package.json'); for (const dependencyName of Object.keys(linkDependencies)) { const dependencyPath = linkDependencies[dependencyName]; const ...
import {exec} from 'node-promise-es6/child-process'; import fs from 'node-promise-es6/fs'; async function run() { const {linkDependencies = {}} = await fs.readJson('package.json'); for (const dependencyName of Object.keys(linkDependencies)) { const dependencyPath = linkDependencies[dependencyName]; const ...
Use alternate way of setting git author
Use alternate way of setting git author
JavaScript
mit
vinsonchuong/npm-integration
5304671a6aff5a08b33464e8ff181766d00f6acd
src/layouts/column-layout.js
src/layouts/column-layout.js
export default class ColumnLayout { constructor (options) { this._options = { columns: 5 }; Object.assign(this._options, options); this._tileWidth = 0; this.height = 0; } layout (layoutParams) { const row = Math.floor(layoutParams.position / this...
export default class ColumnLayout { constructor (options) { this._options = { columns: 5, margin: 8, outerMargin: true }; Object.assign(this._options, options); this._tileWidth = 0; this.height = 0; } layout (layoutParams) { ...
Add support for margins in column layout.
Add support for margins in column layout.
JavaScript
mit
frigus02/silky-tiles
c29d2f92456d35b5f92e521f551e089c7f8c94f8
src/Paths.js
src/Paths.js
let argv = require('yargs').argv; class Paths { /** * Create a new Paths instance. */ constructor() { if (argv['$0'].includes('ava')) { this.rootPath = path.resolve(__dirname, '../'); } else { this.rootPath = process.cwd(); } } /** * Set t...
let argv = require('yargs').argv; class Paths { /** * Create a new Paths instance. */ constructor() { if (argv['$0'].includes('ava')) { this.rootPath = path.resolve(__dirname, '../'); } else { this.rootPath = process.cwd(); } } /** * Set t...
Use real env var for custom mix file
Use real env var for custom mix file The previous approach doesn’t work with current webpack cli now.
JavaScript
mit
JeffreyWay/laravel-mix
415925e578d732aa584d84282fbf62edd873d164
gulpfile.js
gulpfile.js
'use strict'; var gulp = require( 'gulp' ); var g = require( 'gulp-load-plugins' )(); var allTestFiles = './tests/**/*.js'; gulp.task( 'assets', function() { gulp.src([ 'node_modules/gulp-mocha/node_modules/mocha/mocha.{js,css}', 'node_modules/chai/chai.js' ]) .pipe( gulp.dest( 'public' ) ); }); gulp....
'use strict'; var gulp = require( 'gulp' ); var g = require( 'gulp-load-plugins' )(); var exec = require( 'child_process' ).exec; var allTestFiles = './tests/**/*.js'; gulp.task( 'assets', function() { gulp.src([ 'node_modules/gulp-mocha/node_modules/mocha/mocha.{js,css}', 'node_modules/chai/chai.js' ]) ...
Add Python server to localhost
Add Python server to localhost
JavaScript
mit
Ibanheiz/ajax,negherbon/ajax,denis-itskovich/ajax,ggviana/ajax,felipegtx/ajax,caiocutrim/ajax,afgoulart/ajax
485cb7a0aff21ab4f8dd28db86935774a1fbf1b7
lib/main.js
lib/main.js
/* @flow */ const useLSP = atom.config.get('flow-ide.useLSP') // possible improvement: check if flow really supports lsp if (useLSP === true) { // eslint-disable-next-line global-require const { FlowLanguageClient } = require('./language-client') module.exports = new FlowLanguageClient() } else { // eslint-d...
/* @flow */ const useLSP = atom.config.get('flow-ide.useLSP') // notify to restart if the value changes atom.config.onDidChange('flow-ide.useLSP', () => { const buttons = [{ text: 'Restart', onDidClick () { return atom.restartApplication() }, }] atom.notifications.addInfo('Changing this value requires a...
Add notification to restart atom when switching to/from LSP
Add notification to restart atom when switching to/from LSP
JavaScript
mit
steelbrain/flow-ide
c0f7f3373ed393ea22f44ee65c39ba411300db1e
lib/main.js
lib/main.js
var NwBuilder = require("node-webkit-builder"); var asap = require("pdenodeify"); var path = require("path"); var rimraf = require("rimraf"); module.exports = function(options, buildResult){ var nwOptions = {}; // Convert the options to camelcase Object.keys(options).forEach(function(optName){ nwOptions[toCamelc...
var NwBuilder = require("node-webkit-builder"); var asap = require("pdenodeify"); var path = require("path"); var rimraf = require("rimraf"); module.exports = function(options, buildResult){ var nwOptions = {}; // Convert the options to camelcase Object.keys(options).forEach(function(optName){ nwOptions[toCamelc...
Use path.relative to create the bundles glob
Use path.relative to create the bundles glob
JavaScript
mit
stealjs/steal-nw,stealjs/steal-nw
44458bfb9a8c3f191336e6afc2a245eed4773afa
src/services/user/services/UserLinkImportService.js
src/services/user/services/UserLinkImportService.js
const { BadRequest } = require('@feathersjs/errors'); const userDataFilter = user => ({ userId: user._id, email: user.email, firstName: user.firstName, lastName: user.lastName, importHash: user.importHash, schoolId: user.schoolId, birthday: user.birthday, }); class UserLinkImportService { constructor(userServ...
const { BadRequest } = require('@feathersjs/errors'); const userDataFilter = user => ({ userId: user._id, email: user.email, firstName: user.firstName, lastName: user.lastName, importHash: user.importHash, schoolId: user.schoolId, birthday: user.birthday, }); class UserLinkImportService { constructor(userServ...
Add missing setup in class.
Add missing setup in class.
JavaScript
agpl-3.0
schul-cloud/schulcloud-server,schul-cloud/schulcloud-server,schul-cloud/schulcloud-server
f43e339602f096e781d5a9c82e3befc94c73bcf3
src/KillrVideo/scripts/requirejs-config.js
src/KillrVideo/scripts/requirejs-config.js
// Common configuration for RequireJS var require = { baseUrl: "/scripts", paths: { "jquery": "bower_components/jquery/dist/jquery.min", "knockout": "bower_components/knockout/dist/knockout", "bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min", "text": "bower_compone...
// Common configuration for RequireJS var require = { baseUrl: "/scripts", paths: { "jquery": "bower_components/jquery/dist/jquery.min", "knockout": "bower_components/knockout/dist/knockout", "bootstrap": "bower_components/bootstrap/dist/js/bootstrap.min", "text": "bower_compone...
Fix javascript dependencies for a couple other plugins that aren't AMD modules
Fix javascript dependencies for a couple other plugins that aren't AMD modules
JavaScript
apache-2.0
LukeTillman/killrvideo-csharp,LukeTillman/killrvideo-csharp,rustyrazorblade/killrvideo-csharp,LukeTillman/killrvideo-csharp,rustyrazorblade/killrvideo-csharp,rustyrazorblade/killrvideo-csharp
568d969199234703fd987407f5ba438abd8e0eba
web/src/containers/page/overview/table/cell-inner.js
web/src/containers/page/overview/table/cell-inner.js
import { Map as map } from 'immutable'; import React from 'react'; import PropTypes from 'prop-types'; import Editable from '../../../editable'; import { formatCurrency } from '../../../../misc/format'; export default function OverviewTableCellInner({ cell, cellKey, rowKey, editable }) { if (editable) { //...
import { Map as map } from 'immutable'; import React from 'react'; import PropTypes from 'prop-types'; import Editable from '../../../editable'; import { formatCurrency } from '../../../../misc/format'; export default function OverviewTableCellInner({ cell, cellKey, rowKey, editable }) { if (editable) { //...
Use brackets to indicate negative values on overview table
Use brackets to indicate negative values on overview table
JavaScript
mit
felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget
b7613e8983281c1549a3c69e8c75698a45f00309
app/scripts/queryparser.js
app/scripts/queryparser.js
/* jshint devel:true */ /* global exports, require, URI */ exports.parser = function(url, callbacks) { if (url) { var queryMap = new URI(url).search(true); if (queryMap.CFTemplateURL && callbacks.onTemplate) { callbacks.onTemplate(queryMap.CFTemplateURL); } } };
/* jshint devel:true */ /* global exports, URI */ exports.parser = function(url, callbacks) { 'use strict'; if (url) { var queryMap = new URI(url).search(true); if (queryMap.CFTemplateURL && callbacks.onTemplate) { callbacks.onTemplate(queryMap.CFTemplateURL); } } };
Fix JSHint errors & warnings
Fix JSHint errors & warnings
JavaScript
mit
dmgress/cloudgrapher,dmgress/cloudgrapher
5ce651027d342ada2e4162f0f1d1f9e6bbcf51b3
scripts/routes/route-handler.js
scripts/routes/route-handler.js
import { genKey } from './key'; export default class RouteHandler { constructor(conf) { this.id = genKey(); this.init = conf.init; this.beforeInit = conf.beforeInit || null; this.beforeUpdate = conf.beforeUpdate || null; this.init = conf.init || null; this.update = conf.update || null; this.unload = con...
import { genKey } from './key'; export default class RouteHandler { constructor(conf) { this.id = genKey(); this.beforeInit = conf.beforeInit || null; this.beforeUpdate = conf.beforeUpdate || null; this.init = conf.init || null; this.update = conf.update || null; this.unload = conf.unload || null; } }
Remove duplcate init property on RouteHandler
Remove duplcate init property on RouteHandler
JavaScript
apache-2.0
weepower/wee-core
49b3fb5255e9234d7817ce73a7b448372090bd17
routes/index.js
routes/index.js
var express = require('express'); var Git = require("nodegit"); var router = express.Router(); var token = process.env.GITHUB_TOKEN; router.post('/issues', function(req, res, next) { Git.Clone("https://" + token + ":x-oauth-basic@github.com/kewang/information-people", "./tmp", { checkoutBranch: "gh-pages" }).t...
var express = require('express'); var Git = require("nodegit"); var fs = require('fs'); var router = express.Router(); var GITHUB_TOKEN = process.env.GITHUB_TOKEN; var FILE_NAME = "index.htm"; var content; var repo; var head; var oid; router.post('/issues', function(req, res, next) { Git.Clone("https://" + GITHUB_TO...
Add push flow, but test fail
Add push flow, but test fail
JavaScript
mit
kewang/information-people,kewang/information-people
59120a3e1cd6fa2024d587af0655a0269f161211
routes/users.js
routes/users.js
var express = require('express'); var router = express.Router(); import encryptUtils from '../utilities/encrypt'; import userUtils from '../utilities/users_service.js'; import { userAuth, adminAuth } from '../utilities/auth'; router.post('/', (req, res) => { const { first_name, last_name, email, username, passwo...
var express = require('express'); var router = express.Router(); import encryptUtils from '../utilities/encrypt'; import userUtils from '../utilities/users_service.js'; import { userAuth, adminAuth } from '../utilities/auth'; router.post('/', (req, res) => { const { first_name, last_name, email, username, passwo...
Add user to session when they create a new account
Add user to session when they create a new account
JavaScript
mit
davidlamt/antfinder-api
584226c87cc41d09b28932972a55a22c74e420d2
config/db.config.js
config/db.config.js
module.exports = { db: { qrest_api:{ $filter: 'env', $base: { options: {} }, production: { url: 'mongodb://mongodb:27017/qrest_api' }, $default: { url: 'mongodb://localhost:27017/qrest_api...
module.exports = { db: { qrest_api:{ $filter: 'env', $base: { options: {} }, production: { url: process.env.MONGODB_URL || 'mongodb://mongodb:27017/qrest_api' }, $default: { url: process.e...
Add env override for mongodb url
Add env override for mongodb url
JavaScript
apache-2.0
jgrenon/qrest-api-server
86fd65dddd74cc679ca1dea3fcdbb36c3ed7e723
bin/cli.js
bin/cli.js
#!/usr/bin/env node console.log('hits cli.js file');
#!/usr/bin/env node var program = require('commander'); var prompt = require('inquirer'); var path = require('path'); var pkg = require(path.resolve(__dirname, '..', 'package.json')); program.version(pkg.version) program .command('new') .action(function() { console.log('hits new command'); }); ...
Add in base CLI interface
feat: Add in base CLI interface
JavaScript
mit
code-computerlove/quarry,code-computerlove/slate-cli,cartridge/cartridge-cli
1a420d9d243983fad908021fc13e90a101f8e58b
src/anol/geocoder/base.js
src/anol/geocoder/base.js
anol.geocoder.Base = function(_options) { if(_options === undefined) { return; } this.url = _options.url; this.options = _options; }; anol.geocoder.Base.prototype = { CLASS_NAME: 'anol.geocoder.Base', handleResponse: function(response) { var self = this; var results = []...
anol.geocoder.Base = function(_options) { if(_options === undefined) { return; } this.url = _options.url; this.options = _options; }; anol.geocoder.Base.prototype = { CLASS_NAME: 'anol.geocoder.Base', handleResponse: function(response) { var self = this; var results = []...
Handle failed geocoder requests correct
Handle failed geocoder requests correct
JavaScript
mit
omniscale/anol,omniscale/anol
3209c40ebe0070a4430009f6f703cf3fcf95e6f8
assets/js/modules/pagespeed-insights/settings/index.js
assets/js/modules/pagespeed-insights/settings/index.js
/** * WordPress dependencies */ import { __, sprintf } from '@wordpress/i18n'; /** * External dependencies */ import { sanitizeHTML } from 'assets/js/util'; export const settingsDetails = () => { const { dashboardPermalink } = global.googlesitekit; /* translators: %s is the URL to the Site Kit dashboard. */ c...
/** * WordPress dependencies */ import { __, sprintf } from '@wordpress/i18n'; /** * External dependencies */ import { sanitizeHTML } from 'assets/js/util'; export const settingsDetails = () => { const { dashboardPermalink } = global.googlesitekit; const content = sprintf( /* translators: %s is the URL to th...
Fix placement of translators comment.
Fix placement of translators comment.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
cecc6b4c8ce022b874b63450005d2e52ddc9cde7
guts/router.js
guts/router.js
var routeList = require('../config/routeList'); var router = require('koa-router'); var controllers = require('./controllers') var views = require('./views'); module.exports = function(app){ app.use(views('./views', { map: { html: 'underscore' }, locals: { title: 'with underscore' }, ...
var routeList = require('../config/routeList'); var router = require('koa-router'); var controllers = require('./controllers') var views = require('./views'); module.exports = function(app){ app.use(views('./views', { map: { html: 'ejs', ejs: 'ejs' }, locals: { title: 'with underscor...
Make it so HTML and EJS are both rendering via EJS.
Make it so HTML and EJS are both rendering via EJS.
JavaScript
bsd-2-clause
Tombert/frameworkey
685f58c77394c593f9af98dd9dfbfea8bbc4c239
src/modules/controls/OrbitModule.js
src/modules/controls/OrbitModule.js
import {Vector3} from 'three'; import {ThreeOrbitControls} from './lib/ThreeOrbitControls'; export class OrbitModule { constructor(params = {}) { this.params = Object.assign({ target: new Vector3(0, 0, 0), follow: false }, params); } manager(manager) { this.controls = new ThreeOrbitContr...
import {Vector3} from 'three'; import {Loop} from '../../core/Loop'; import {ThreeOrbitControls} from './lib/ThreeOrbitControls'; export class OrbitModule { constructor(params = {}) { this.params = Object.assign({ target: new Vector3(0, 0, 0), follow: false }, params); } manager(manager) { ...
Fix Loop dependency in OrbitControls
Fix Loop dependency in OrbitControls Former-commit-id: 8a856c3abacefad6dd5679baa714fe7bc24446ee
JavaScript
mit
WhitestormJS/whs.js,WhitestormJS/whs.js
6a619aa2629dc6bc049e7209265d8ee2cb9b72b2
rollup.config.js
rollup.config.js
import babel from 'rollup-plugin-babel'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import { terser } from 'rollup-plugin-terser'; import pkg from './package.json'; const input = 'src/index.js'; const plugins = [ babel({ exclude: '**/node_modules/**' }), ]; con...
import babel from 'rollup-plugin-babel'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import { terser } from 'rollup-plugin-terser'; import pkg from './package.json'; const input = 'src/index.js'; const plugins = [ babel({ exclude: '**/node_modules/**' }), ]; con...
Fix umd and cjs export names
Fix umd and cjs export names
JavaScript
mit
perrin4869/react-stay-scrolled
7a47a3665290f18a51a13fb183e3c388bff83691
src/index.js
src/index.js
// Loaded ready states const loadedStates = ['interactive', 'complete']; // Return Promise module.exports = (cb, doc) => new Promise(resolve => { // Use global document if we don't have one doc = doc || document; // Handle DOM load const done = () => resolve(cb && cb()); // Resolve now if DOM has already loaded...
// Loaded ready states const loadedStates = ['interactive', 'complete']; // Return Promise module.exports = (cb, doc) => new Promise(resolve => { // Allow doc to be passed in as the lone first param if (cb && typeof cb !== 'function') { doc = cb; cb = null; } // Use global document if we don't have one doc =...
Allow doc to be passed in as the lone first param
Allow doc to be passed in as the lone first param
JavaScript
mit
lukechilds/when-dom-ready
ed3ec4d2b860c259bb4d50dc972a891f8e1492c8
src/components/Sidebar.js
src/components/Sidebar.js
import React, { Component } from 'react'; import GBox from 'grommet/components/Box'; import GParagraph from 'grommet/components/Paragraph'; import GHeading from 'grommet/components/Heading'; import CLineList from '../containers/CLineList'; const Sidebar = ({ mode, toggleMode, numberOfBends, totalLength }) => { con...
import React, { Component } from 'react'; import GBox from 'grommet/components/Box'; import GParagraph from 'grommet/components/Paragraph'; import GHeading from 'grommet/components/Heading'; import CLineList from '../containers/CLineList'; class Sidebar extends React.Component { constructor(props) { super(prop...
Transform sidebar into traditional class and add type and color selectors
Transform sidebar into traditional class and add type and color selectors
JavaScript
mit
rjbernaldo/lines,rjbernaldo/lines
eff5178476db5a6326312b5c4f6026d86c1546e5
lib/helpers.js
lib/helpers.js
var exec = require('child_process').exec module.exports.asyncIterate = function(array, callback, done) { function iterate(idx) { var current = array[idx] if (current) { callback(current, function() { iterate(idx+1) }, function(err) { done(err) }) } else { done() ...
var exec = require('child_process').exec, _ = require('lodash') module.exports.asyncIterate = function(array, callback, done) { function iterate(idx) { var current = array[idx] if (current) { callback(current, function() { iterate(idx+1) }, function(err) { done(err) }) ...
Fix “checkRunning” to return right container’s running status
Fix “checkRunning” to return right container’s running status
JavaScript
mit
mnylen/pig,mnylen/pig
2daafd8e8c94bb3baa6c3a0a92bfef469e237b34
contourd/recommendation/plugins/scripted/links/main.js
contourd/recommendation/plugins/scripted/links/main.js
index = 0; config = self.getConfig(); function add(url, title, description, icon) { if (config.BoolValue(url, false) == false) { self.addRecommendation(0.0, url, title, description, icon); } } add("http://www.kde.org/", "KDE community", "The people behind Plasma Active", "kde"); add("http://plasma.kde...
index = 0; config = self.getConfig(); function add(url, title, description, icon) { if (config.BoolValue(url, false) == false) { self.addRecommendation(0.0, url, title, description, icon); } } add("http://www.kde.org/", "KDE community", "The people behind Plasma Active", "kde"); add("http://community....
Change broken url for one with usefull info.
Change broken url for one with usefull info.
JavaScript
lgpl-2.1
KDE/contour,KDE/contour,KDE/contour
29ecf0322654ac415df36802f403dad414bc5afe
server/auth/index.js
server/auth/index.js
const logger = require('../logging'); const passport = require('passport'); const { setupOIDC } = require('./oidc'); const { deserializeUser } = require('./user'); module.exports = async (app) => { await setupOIDC(); passport.serializeUser((user, done) => { logger.silly('Serializing user', { userId: user.id }...
const passport = require('passport'); const { setupOIDC } = require('./oidc'); const { deserializeUser } = require('./user'); module.exports = async (app) => { await setupOIDC(); passport.serializeUser((user, done) => done(null, user.id)); passport.deserializeUser(deserializeUser); app.use(passport.initialize...
Simplify deserialization call and remove unnecessary logging.
Simplify deserialization call and remove unnecessary logging.
JavaScript
mit
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
d9b87491c95c1caaf6e14f31723ae3978babc918
lib/helpers.js
lib/helpers.js
'use babel' const COLOR_EXTRACTION_REGEXP = /rgb\(\d+, \d+, \d+\)|\#[0-9a-f]{3,6}/ export function isColor(textEditor, bufferPosition) { const lineText = textEditor.getTextInRange([[bufferPosition.row, 0], [bufferPosition.row, Infinity]]) const matches = COLOR_EXTRACTION_REGEXP.exec(lineText) if (matches === nu...
'use babel' const COLOR_EXTRACTION_REGEXP = /rgb\(\d+, ?\d+, ?\d+\)|rgba\(\d+, ?\d+, ?\d+, ?\d?\.?\d+\)|#[0-9a-f]{3,6}/ export function isColor(textEditor, bufferPosition) { const lineText = textEditor.getTextInRange([[bufferPosition.row, 0], [bufferPosition.row, Infinity]]) const matches = COLOR_EXTRACTION_REGEX...
Add rgba support to regex
:new: Add rgba support to regex
JavaScript
mit
steelbrain/intentions-colorpicker
e99b789a7086f889355edea3ab293640c3f719be
src/sass.js
src/sass.js
'use strict' let sass = require('node-sass') /* * Transform SASS to CSS. * @public * @param {string} folderPath - Path to the folder containing the SASS file. * @param {string} str - SASS. * @param {Object} opts - Options for the task. * @param {function} next - The callback that handles the response. Receives ...
'use strict' let sass = require('node-sass') /* * Transform SASS to CSS. * @public * @param {string} folderPath - Path to the folder containing the SASS file. * @param {string} str - SASS. * @param {Object} opts - Options for the task. * @param {function} next - The callback that handles the response. Receives ...
Disable inline source map when optimization enabled
Disable inline source map when optimization enabled
JavaScript
mit
electerious/rosid-handler-sass,electerious/rosid-handler-scss
5eeb17a1aff26aa6d6ed38534af134aea905c065
src/app/store/createDevStore.js
src/app/store/createDevStore.js
export default function createDevToolsStore(onDispatch) { let currentState = { committedState: {}, stagedActions: [], computedStates: [], skippedActions: {}, currentStateIndex: 0 }; let listeners = []; function dispatch(action) { if (action.type[0] !== '@') onDispatch(action); retur...
export default function createDevToolsStore(onDispatch) { let currentState = { committedState: {}, stagedActions: [], computedStates: [], skippedActions: {}, currentStateIndex: 0 }; let listeners = []; let initiated = false; function dispatch(action) { if (action.type[0] !== '@') onDi...
Check whether liftedStore is initiated
Check whether liftedStore is initiated
JavaScript
mit
zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension
8675d11a8aafe341e3146bd42c90c8b794d61243
packages/reddio-ui/src/screens/ListingResolver.js
packages/reddio-ui/src/screens/ListingResolver.js
import React from "react"; import { View } from "react-native"; import { withRouter } from "react-router"; import ListingProvider from "../app/ListingProvider"; import PostListSort from "../components/PostListSort"; import PostList from "../components/PostList"; class ListingResolver extends React.Component { rende...
import React from "react"; import { View } from "react-native"; import { withRouter } from "react-router"; import ListingProvider from "../app/ListingProvider"; import PostListSort from "../components/PostListSort"; import PostList from "../components/PostList"; class ListingResolver extends React.Component { rende...
Use real pathname from location
Use real pathname from location
JavaScript
mit
yanglinz/reddio-next,yanglinz/reddio-next,yanglinz/reddio-next
909b2837f927a4b5afdcccc2cb6e29a5e4b278c1
app/client/admin/components/shared/toolbar/toolbar.controller.js
app/client/admin/components/shared/toolbar/toolbar.controller.js
'use strict'; /** * @module opa */ (function(app) { /** * Manages opaToolbar component. * * @class OpaToolbarController * @constructor * @param {Object} $scope opa-toolbar isolated scope * @param {Object} $window JQLite element of the window * @param {Object} $mdMedia AngularJS Material serv...
'use strict'; /** * @module opa */ (function(app) { /** * Manages opaToolbar component. * * @class OpaToolbarController * @constructor * @param {Object} $mdMedia AngularJS Material service to evaluate media queries */ function OpaToolbarController($mdMedia) { var ctrl = this; Object....
Remove unused dependencies from toolbar component
Remove unused dependencies from toolbar component
JavaScript
agpl-3.0
veo-labs/openveo-portal,veo-labs/openveo-portal,veo-labs/openveo-portal
c10cab06a2115995e818e4e7f8fde6882c554bed
test/all.js
test/all.js
/** * General test runner */ var fs = require('fs'); var files = fs.readdirSync(fs.realpathSync('./test')); console.log(files); for (var i in files) { var pattern = /^(test)\w*\.js$/; if (files.hasOwnProperty(i)) { pattern.lastIndex = 0; if (pattern.test(files[i])) { exports[files[i]] = require('...
/** * General test runner */ var fs = require('fs'); var files = fs.readdirSync(fs.realpathSync('./test')); for (var i in files) { var pattern = /^(test)\w*\.js$/; if (files.hasOwnProperty(i)) { pattern.lastIndex = 0; if (pattern.test(files[i])) { exports[files[i]] = require('./' + files[i].replac...
Clean up overly verbose test output
Clean up overly verbose test output
JavaScript
mit
jay-depot/turnpike,jay-depot/turnpike
f0c0b33c3e7c69bc8e1b704a18f8e206e346cb57
src/index.js
src/index.js
var speculation = function speculation (fn) { // Don't cancel by default: var cancel = ( arguments.length > 1 && arguments[1] !== undefined ) ? arguments[1] : Promise.reject(); return new Promise(function (resolve, reject) { var noop = function noop () {}; var onCancel = function onCancel (han...
var noop = function noop () {}; // HOF Wraps the native Promise API // to add take a shouldCancel promise and add // an onCancel() callback. var speculation = function speculation (fn) { // Don't cancel by default var cancel = ( arguments.length > 1 && arguments[1] !== undefined ) ? arguments[1] : Promis...
Add comments & cleanup formatting.
Add comments & cleanup formatting.
JavaScript
mit
ericelliott/speculation
9b457064997fde1aa218bd65ce9bd04a8dcabddb
index.android.js
index.android.js
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import {Provider} from 'react-redux' import MatchView from './src/components/MatchView' import store from './src...
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry } from 'react-native'; import {Provider} from 'react-redux' import store from './src/store' import RootView from './src/components/RootView' const Fussbolito = Reac...
Use new RootView also on Android
Use new RootView also on Android
JavaScript
mit
asharov/fussbolito,asharov/fussbolito,asharov/fussbolito
f49e4db8c5be936ecf711a8cda3e86d425f7e96d
src/js/helpers/prepare.js
src/js/helpers/prepare.js
/* Clearing variables */ import { getPositionIn, getPositionOut } from './offsetCalculator'; import getInlineOption from './getInlineOption'; const prepare = function($elements, options) { $elements.forEach((el, i) => { const mirror = getInlineOption(el.node, 'mirror', options.mirror); const once = getInlin...
/* Clearing variables */ import { getPositionIn, getPositionOut } from './offsetCalculator'; import getInlineOption from './getInlineOption'; const prepare = function($elements, options) { $elements.forEach((el, i) => { const mirror = getInlineOption(el.node, 'mirror', options.mirror); const once = getInlin...
Remove redundant code breaking tests
Remove redundant code breaking tests
JavaScript
mit
michalsnik/aos
522968de5fe048b701f7cd6600f5592e44bc6a4f
src/index.js
src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import Navbar from './components/Navbar.js'; import Header from './components/Header.js'; import Home from './components/Home.js'; import Instruction f...
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import Navbar from './components/Navbar.js'; import Header from './components/Header.js'; import Home from './components/Home.js'; import Instruction f...
Remove unused lines of code.
Remove unused lines of code.
JavaScript
mit
FilmonFeMe/coloreyes,FilmonFeMe/coloreyes
623926ce52dd881b9cec00c05b6c9a7996c9636c
lib/eval.js
lib/eval.js
var _ = require('underscore'); SYMBOL_TABLE = {} exports.define = function (sym, val) { SYMBOL_TABLE[sym] = val; } exports.eval = function eval(form, stack_frame) { if (typeof stack_frame == 'undefined') { stack_frame = SYMBOL_TABLE; } if (_.isEqual(form, null)) { return null; } if (form.type =...
var _ = require('underscore'); SYMBOL_TABLE = {} exports.define = function (sym, val) { SYMBOL_TABLE[sym] = val; } exports.apply = function (fn, args, stack_frame) { if (typeof fn != 'function') throw "cannot evaluate non-function value: " + fn; args.unshift(stack_frame); return fn.apply(undefined, args)...
Refactor out applying function. Throw if invalid.
Refactor out applying function. Throw if invalid.
JavaScript
mit
mikedouglas/conspiracy
8e4fbf59e00475f90dbf7d096550fa906db88370
src/fetch-feed.js
src/fetch-feed.js
var util = require('./util'); module.exports = function fetchFeed(delegate) { // delegate.url: a url string // delegate.verbose: a bool // delegate.onError: an error handler // delegate.onResponse: a response and data handler var request = util.request(delegate.url); request.on('error', function(e) { ...
var util = require('./util'); module.exports = function fetchFeed(delegate) { // delegate.url: a url string // delegate.verbose: a bool // delegate.onError: an error handler // delegate.onResponse: a response and data handler var request = util.request(delegate.url); request.on('error', function(e) { ...
Convert non-200 fetch responses into errors
Convert non-200 fetch responses into errors
JavaScript
mit
hlfcoding/custom-rss
fcde897bd7fbe28579e6a3c2307bd715da1a014f
.eslintrc.js
.eslintrc.js
module.exports = { root: true, env: { 'browser': true }, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, extends: 'airbnb', plugins: [ 'html' ], rules: { 'import/extensions': ['error', 'always', { 'js': 'never', 'vue': 'never' }], } };
module.exports = { root: true, env: { 'browser': true }, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, extends: 'airbnb', plugins: [ 'html' ], rules: { 'import/extensions': ['error', 'always', { 'js': 'never', 'vue': 'never' }], 'no-underscore-d...
Remove comma dangle rule from eslint rules (VueComponent methods use _comma dangle)
Remove comma dangle rule from eslint rules (VueComponent methods use _comma dangle)
JavaScript
mit
eddyerburgh/avoriaz,eddyerburgh/avoriaz,eddyerburgh/avoriaz
1bf03374b7edefdabacefbceb43ca02c6b702920
test/browser/browserstack-runner.js
test/browser/browserstack-runner.js
const reporter = require('mocha/lib/reporters').min; const bridgeTests = require('mocha-selenium-bridge'); const { Builder } = require('selenium-webdriver'); const bsConfig = { project: 'messageformat', 'browserstack.local': 'true', 'browserstack.user': process.env.BROWSERSTACK_USER, 'browserstack.key': proces...
const reporter = require('mocha/lib/reporters').min; const bridgeTests = require('mocha-selenium-bridge'); const { Builder } = require('selenium-webdriver'); const bsConfig = { project: 'messageformat', 'browserstack.local': 'true', 'browserstack.user': process.env.BROWSERSTACK_USER || process.env.BROWSERSTA...
Fix env var name for BrowserStack user
ci: Fix env var name for BrowserStack user
JavaScript
mit
SlexAxton/messageformat.js,SlexAxton/messageformat.js
2da65957e020bab97b6f3c0ddb67bf291ed0f925
website/static/js/waterbutler.js
website/static/js/waterbutler.js
var $ = require('jquery'); var settings = require('settings'); function getCookie() { match = document.cookie.match(/osf=(.*?)(;|$)/); return match ? match[1] : null; } function buildUrl(metadata, path, provider, file) { path = path || '/'; var baseUrl = settings.WATERBUTLER_URL + (metadata ? 'data?'...
var $ = require('jquery'); var $osf = require('osfHelpers'); var settings = require('settings'); function getCookie() { match = document.cookie.match(/osf=(.*?)(;|$)/); return match ? match[1] : null; } function getViewOnly() { return $osf.urlParams().view_only; } function buildUrl(metadata, path, provide...
Include view-only key in WaterButler URLs.
Include view-only key in WaterButler URLs.
JavaScript
apache-2.0
hmoco/osf.io,amyshi188/osf.io,caseyrollins/osf.io,zkraime/osf.io,asanfilippo7/osf.io,monikagrabowska/osf.io,hmoco/osf.io,lyndsysimon/osf.io,dplorimer/osf,felliott/osf.io,samchrisinger/osf.io,crcresearch/osf.io,aaxelb/osf.io,reinaH/osf.io,Nesiehr/osf.io,sbt9uc/osf.io,cosenal/osf.io,HarryRybacki/osf.io,monikagrabowska/os...
c07cfefbf1093bfa52a206fae1126b29e29fdc21
.eslintrc.js
.eslintrc.js
module.exports = { "root": true, "env": { "es6": true, "browser": true }, "extends": "eslint:recommended", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "warn", "tab", { "SwitchCase": 1 } ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error"...
module.exports = { "root": true, "env": { "es6": true }, "extends": "eslint:recommended", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "warn", "tab", { "SwitchCase": 1 } ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error", "double" ], ...
Revert "Add browser: true to env map to suppress eslint errors for browser globals"
Revert "Add browser: true to env map to suppress eslint errors for browser globals" This reverts commit b314d1b8a1c2ec7c26600b4e7f39f83083a1b835. See commit 79167ab0f855beb6942d576735a19d65f0f503e2.
JavaScript
mit
to2mbn/skinview3d
fbfe04e6f6203394a98a2b246ecc721d8d1f5ec0
src/gm.typeaheadDropdown.js
src/gm.typeaheadDropdown.js
angular.module('gm.typeaheadDropdown', ['ui.bootstrap']) .directive('typeaheadDropdown', function() { return { templateUrl:'templates/typeaheadDropdown.tpl.html', scope: { model:'=ngModel', getOptions:'&options', config:'=?', required:'=?ngRequired' }, replace:true, controller: ['$scope', '$q', f...
angular.module('gm.typeaheadDropdown', ['ui.bootstrap']) .directive('typeaheadDropdown', function() { return { templateUrl:'templates/typeaheadDropdown.tpl.html', scope: { model:'=ngModel', getOptions:'&options', config:'=?', required:'=?ngRequired' }, replace:true, controller: ['$scope', '$q', f...
Fix bug if model is initially null.
Fix bug if model is initially null.
JavaScript
mit
spongessuck/gm.typeaheadDropdown,spongessuck/gm.typeaheadDropdown
5312be998369de295e0c9a4ea88338f8ca0a558b
lib/main.js
lib/main.js
var Watcher = require('large-watcher'); module.exports = function(codebox) { var events = codebox.events; codebox.logger.log("Starting the file watcher"); codebox.workspace.path() .then(function(path) { var watcher = Watcher(path, 2).start(); // Handle deleted files watcher....
var Watcher = require('large-watcher'); module.exports = function(codebox) { var events = codebox.events; codebox.logger.log("Starting the file watcher"); var watcher = Watcher(codebox.workspace.root(), 2).start(); // Handle deleted files watcher.on('deleted', function(files) { codebox....
Use workspace.root() instead of workspace.path()
Use workspace.root() instead of workspace.path()
JavaScript
apache-2.0
etopian/codebox-package-watcher,CodeboxIDE/package-watcher
ff70ff08b9a1f3c5f5c3bcd3966ff00aa91b8910
routes/index.js
routes/index.js
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: "Dito's laboratory" }); }); module.exports = router;
var express = require('express'); var router = express.Router(); router.post('/postscore', function(req, res, next) { console.log("posting"); console.log(req); if (next) next(); }); router.get('/postscore', function(req, res, next) { console.log("getting"); console.log(req); if (next) next(); ...
Test commit for Unity WWW
Test commit for Unity WWW
JavaScript
mit
DominikDitoIvosevic/dito.ninja,DominikDitoIvosevic/dito.ninja
ce3a219b04f14d3629bd588ac8a60f004c6b61fd
routes/index.js
routes/index.js
/* * Controllers */ var homeController = require('../controllers/home_controller'); var authController = require('../controllers/authentication_controller'); /* * Routes */ module.exports = function(app, passport){ var authenticate = authController.setUp(authController, passport); app.get('/', homeControll...
/* * Controllers */ var homeController = require('../controllers/home_controller'); var pivotalController = require('../controllers/pivotal_controller'); var authController = require('../controllers/authentication_controller'); /* * Routes */ module.exports = function(app, passport){ var authenticate = ...
Build route for projects api
Build route for projects api
JavaScript
mit
tangosource/pokerestimate,tangosource/pokerestimate
cc5a2f0accc2e878e25066c76189e96f62208bf8
src/lib/guesstimator/samplers/DistributionBeta.js
src/lib/guesstimator/samplers/DistributionBeta.js
import math from 'mathjs'; import {Sample} from './Sampler.js' import {jStat} from 'jstat' export var Sampler = { sample({hits, total}, n) { // This treats your entry as a prior, and assumes you are 2 times more confident than // a raw beta would be. This gives your distribution more of a peak for small numb...
import {simulate} from './Simulator.js' export var Sampler = { sample({hits, total}, n) { // This treats your entry as a prior, and assumes you are 2 times more confident than // a raw beta would be. This gives your distribution more of a peak for small numbers. return simulate(`beta(${2*hits},${2*(total...
Fix beta with new sampling logic.
Fix beta with new sampling logic.
JavaScript
mit
getguesstimate/guesstimate-app
edd5d3098b12e6f91c89ffc5dc234b5026f52f51
lib/parsers/babylon.js
lib/parsers/babylon.js
"use strict"; const babylon = require("babylon"); exports.options = { allowImportExportEverywhere: true, allowReturnOutsideFunction: true, plugins: [ "*", "flow", "jsx", // The "*" glob no longer seems to include the following plugins: "objectRestSpread", "classProperties", "exportExtensions...
"use strict"; const babylon = require("babylon"); exports.options = { allowImportExportEverywhere: true, allowReturnOutsideFunction: true, plugins: [ "*", "flow", "jsx", // The "*" glob no longer seems to include the following plugins: "asyncGenerators", "classProperties", "decorators", ...
Enable the rest of Babylon's experimental plugins, for max tolerance.
Enable the rest of Babylon's experimental plugins, for max tolerance.
JavaScript
mit
benjamn/reify,benjamn/reify
51bcf356fc5459e9427dc46eb7abddc17f14f7e0
src/commands/find.js
src/commands/find.js
import moment from 'moment' import textTable from 'text-table' const find = (apiWrapper) => (search, options) => { const { startdate, enddate, businessunitids } = options return new Promise((resolve, reject) => { apiWrapper.getActivities({ startdate, enddate, businessunitids ...
import moment from 'moment' import textTable from 'text-table' const find = (apiWrapper) => (search, options) => { const { startdate, enddate, businessunitids } = options return new Promise((resolve, reject) => { apiWrapper.getActivities({ startdate, enddate, businessunitids ...
Put time and day in separate columns
Put time and day in separate columns
JavaScript
mit
gish/friskis-slack-booking
3421372936284eb4e143524e8ce2fcad9cc0d2ac
lib/sheets/comments.js
lib/sheets/comments.js
var utils = require('../utils/httpUtils.js'); var _ = require('underscore'); var constants = require('../utils/constants.js'); exports.create = function(options) { var optionsToSend = { accessToken : options.accessToken }; var getComment = function(getOptions, callback) { optionsToSend.url = buildUrl(ge...
var utils = require('../utils/httpUtils.js'); var _ = require('underscore'); var constants = require('../utils/constants.js'); exports.create = function(options) { var optionsToSend = { accessToken : options.accessToken }; var getComment = function(getOptions, callback) { optionsToSend.url = buildUrl(ge...
Fix options param names to match their requests.
Fix options param names to match their requests.
JavaScript
apache-2.0
smartsheet-platform/smartsheet-javascript-sdk
87cf5c61ea9a023d125b59688bd687d1d465d8c3
src/sagas.js
src/sagas.js
/** @babel */ /** global atom */ import { delay } from 'redux-saga' import { put, call, select, take, fork } from 'redux-saga/effects' import { run } from 'node-jq' import { ACTIONS as ACTION } from './constants' const ONE_SEC = 1000 // const jq = (filter) => { // return (dispatch, getState) => { // const { ac...
/** @babel */ /** global atom */ import { delay } from 'redux-saga' import { put, call, select, take, fork } from 'redux-saga/effects' import { run } from 'node-jq' import { ACTIONS as ACTION } from './constants' const ONE_SEC = 1000 function * jq () { while (true) { const action = yield take(ACTION.JQ_FILTER_...
Remove commented thunk code in saga
Remove commented thunk code in saga
JavaScript
mit
sanack/atom-jq
e88e85110242e88aefa3e02d36737c09205c1253
lib/args.js
lib/args.js
"use strict"; /** * Handle arguments for backwards compatibility * @param {Object} args * @returns {{config: {}, cb: *}} */ module.exports = function (args) { var config = {}; var cb; switch (args.length) { case 1 : if (isFilesArg(args[0])) { config.files = args...
"use strict"; function isFilesArg (arg) { return Array.isArray(arg) || typeof arg === "string"; } /** * Handle arguments for backwards compatibility * @param {Object} args * @returns {{config: {}, cb: *}} */ module.exports = function (args) { var config = {}; var cb; switch (args.length) { ...
Move function out of the scope
Move function out of the scope
JavaScript
apache-2.0
chengky/browser-sync,nothiphop/browser-sync,pmq20/browser-sync,chengky/browser-sync,portned/browser-sync,schmod/browser-sync,schmod/browser-sync,pepelsbey/browser-sync,BrowserSync/browser-sync,pepelsbey/browser-sync,zhelezko/browser-sync,beni55/browser-sync,lookfirst/browser-sync,guiquanz/browser-sync,BrowserSync/brows...
51dc7616671e8bcfcab0c8067fc3d6364debdfa9
lib/init.js
lib/init.js
var copy = require("./copy"); var path = require("path"); var temp = require("temp").track(); var Config = require("./config"); var Init = function(destination, callback) { var example_directory = path.resolve(path.join(__dirname, "..", "example")); copy(example_directory, destination, callback); } Init.sandbox =...
var copy = require("./copy"); var path = require("path"); var temp = require("temp").track(); var Config = require("./config"); var Init = function(destination, callback) { var example_directory = path.resolve(path.join(__dirname, "..", "example")); copy(example_directory, destination, callback); } Init.sandbox =...
Make Init.sandbox() take an input configuration.
Make Init.sandbox() take an input configuration.
JavaScript
mit
DigixGlobal/truffle,prashantpawar/truffle
cd6a769dc0c6343047632179c2e6c34ea50768e7
lib/util.js
lib/util.js
'use strict'; /* global -Promise */ var Promise = require('bluebird'); var _ = require('underscore'); var glob = require('glob'); var getFileList = function getFileList (files) { var fileList = []; return new Promise(function (resolve, reject) { if (_.isString(files)) { glob(files, function (err, files...
'use strict'; /* global -Promise */ var Promise = require('bluebird'); var _ = require('underscore'); var glob = Promise.promisify(require("glob"));; var getFileList = function getFileList (files) { if (_.isString(files)) { return glob(files); } else if (_.isArray(files)) { var fileSubLists = _.map(files...
Use Promisify and add ability to get String/Array of globs in api
Use Promisify and add ability to get String/Array of globs in api
JavaScript
mit
caniuse-js/caniuse-js
863071cc834c0c9e3b17d668c37f4886da5bd932
test/specs/component/TextSpec.js
test/specs/component/TextSpec.js
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={144}>This is really...
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={200}>This is really...
Update <Text> tests so they are not as particular about browser differences
Update <Text> tests so they are not as particular about browser differences
JavaScript
mit
recharts/recharts,recharts/recharts,sdoomz/recharts,sdoomz/recharts,thoqbk/recharts,recharts/recharts,recharts/recharts,thoqbk/recharts,sdoomz/recharts,thoqbk/recharts
00a1e98c52d51b07a0c051dba6107bc6e99e8916
server/api/geometry/routes.js
server/api/geometry/routes.js
/* eslint-disable new-cap */ const router = require('express').Router(); const jsonParser = require('body-parser').json(); const handlers = require('./handlers'); // Geometry tools router.post('/', jsonParser, handlers.getInEverySystem); router.post('/parse', jsonParser, handlers.parseCoordinates); module.exports ...
/* eslint-disable new-cap */ const router = require('express').Router(); const jsonParser = require('body-parser').json(); const handlers = require('./handlers'); // Geometry tools router.post('/', jsonParser, handlers.getInEverySystem); router.get('/parse', handlers.parseCoordinates); module.exports = router;
Use GET method to parse coordinates
Use GET method to parse coordinates
JavaScript
mit
axelpale/tresdb,axelpale/tresdb
c3001938537b7f5590d71e536653ebfd083ffa52
packages/react-native-codegen/src/generators/modules/Utils.js
packages/react-native-codegen/src/generators/modules/Utils.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; import type {ObjectTypeAliasTypeShape} from '../../CodegenSchema'; function getTypeA...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; import type { SchemaType, NativeModuleAliasMap, Required, NativeModuleObjectT...
Create utilities for module generators
Create utilities for module generators Summary: There are two operations we do in every NativeModule generator: - We convert the `SchemaType` into a map of NativeModule schemas - If the type-annotation is a TypeAliasTypeAnnotation, we resolve it by doing a lookup on the NativeModuleAliasMap. This is usually followed b...
JavaScript
mit
pandiaraj44/react-native,pandiaraj44/react-native,janicduplessis/react-native,arthuralee/react-native,facebook/react-native,pandiaraj44/react-native,javache/react-native,arthuralee/react-native,arthuralee/react-native,janicduplessis/react-native,facebook/react-native,janicduplessis/react-native,myntra/react-native,pand...
e1123e2de6d9542950967a4128e616ddcbad7259
src/react-chayns-openingtimes/utils/parseTimeString.js
src/react-chayns-openingtimes/utils/parseTimeString.js
export default function parseTimeString(str) { const regexRes = new RegExp('[0-9]{0,2}:[0-9]{0,2}').exec(str); let hours = null; let minutes = null; if (regexRes) { const parts = regexRes[0].split(':'); hours = parseInt(parts[0], 10) || 0; minutes = parseInt(parts[1], 10) || 0; ...
const TIME_STRING_REGEX = /([0-9]{0,2}):([0-9]{0,2})/; export default function parseTimeString(str) { const regexRes = TIME_STRING_REGEX.exec(str); let hours = null; let minutes = null; if (regexRes) { hours = parseInt(regexRes[1], 10) || 0; minutes = parseInt(regexRes[2], 10) || 0; ...
Use regex for parsing TimeString
:recycle: Use regex for parsing TimeString
JavaScript
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
a1d7933c578882aa73b5855961ff8622119c4141
ui/src/data_explorer/components/RawQueryEditor.js
ui/src/data_explorer/components/RawQueryEditor.js
import React, {PropTypes} from 'react' const ENTER = 13 const ESCAPE = 27 const RawQueryEditor = React.createClass({ propTypes: { query: PropTypes.shape({ rawText: PropTypes.string.isRequired, id: PropTypes.string.isRequired, }).isRequired, onUpdate: PropTypes.func.isRequired, }, getInit...
import React, {PropTypes} from 'react' const ENTER = 13 const ESCAPE = 27 const RawQueryEditor = React.createClass({ propTypes: { query: PropTypes.shape({ rawText: PropTypes.string.isRequired, id: PropTypes.string.isRequired, }).isRequired, onUpdate: PropTypes.func.isRequired, }, getInit...
Allow user to type :)
Allow user to type :)
JavaScript
mit
nooproblem/influxdb,li-ang/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,ma...
1d1fdcb0bd822a1b30d9f76c1a37b529216293f2
src/client/react/admin/AdminNavbar/MainNavigation.js
src/client/react/admin/AdminNavbar/MainNavigation.js
import React from 'react'; class MainNavigation extends React.Component { render() { return ( <div> </div> ); } } export default MainNavigation;
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...
Add visit site link to navbar
[ADD] Add visit site link to navbar
JavaScript
mit
bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race
40d2bf71e8515d16866ab1a6f77d562d81bf5c6c
src/readFiles.js
src/readFiles.js
'use strict'; const fs = require('fs-extra'); const marked = require('marked'); const parser = require('./littlePostParser'); module.exports = function readFiles(path) { const posts = []; fs.ensureDirSync(path); fs.readdirSync(path).forEach(file => { let date = file.match(/^(\d{4})-(\d\d?)-(\d\d?)-(.+)\.(md|...
'use strict'; const fs = require('fs-extra'); const marked = require('marked'); const parser = require('./littlePostParser'); module.exports = function readFiles(path) { const posts = []; fs.ensureDirSync(path); fs.readdirSync(path).forEach(file => { let date = file.match(/^(\d{4})-(\d\d?)-(\d\d?)-(.+)\.(md|...
Add `date` to post meta-date-uh 😆
Add `date` to post meta-date-uh 😆
JavaScript
mit
corderophilosophy/tickle-js-ssg,corderophilosophy/tickle-js-ssg
0bebc89c61b01f40587ac0820c0c3cbf80b63f6e
src/scripts/app/activities/sentences/editSentence.js
src/scripts/app/activities/sentences/editSentence.js
'use strict'; module.exports = /*@ngInject*/ function EditSentence( $scope, SentenceWritingService, $state, _ ) { SentenceWritingService.getSentenceWriting($state.params.id) .then(function(s) { s.category = _.findWhere($scope.availableCategories, function(o) { return o.$id == s.categoryId; ...
'use strict'; module.exports = /*@ngInject*/ function EditSentence( $scope, SentenceWritingService, $state, _ ) { SentenceWritingService.getSentenceWriting($state.params.id) .then(function(s) { s.category = _.findWhere($scope.availableCategories, function(o) { return o.$id == s.categoryId; ...
Add quantity into edit rules.
Add quantity into edit rules.
JavaScript
agpl-3.0
empirical-org/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,empirical-org/Quill-Grammar,ddmck/Quill-Grammar,ddmck/Quill-Grammar
d16d986edec59eed0a73490e4587efd5455e7b28
src/api/emit.js
src/api/emit.js
const CustomEvent = ((Event) => { if (Event) { try { new Event(); // eslint-disable-line no-new } catch (e) { return undefined; } } return Event; })(window.CustomEvent); function createCustomEvent(name, opts = {}) { let e; if (Event) { e = new Event(name, opts); if (opts.detai...
const CustomEvent = ((Event) => { if (Event) { try { new Event(); // eslint-disable-line no-new } catch (e) { return undefined; } } return Event; })(window.CustomEvent); function createCustomEvent(name, opts = {}) { let e; if (Event) { e = new Event(name, opts); if ('detail' i...
Allow detail to be falsy
Allow detail to be falsy
JavaScript
mit
chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs