commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
a244849572e671865cfa28171d567a15d318b38d
client/src/App/index.js
client/src/App/index.js
// Import libraries import 'rxjs' import { Provider } from 'react-redux' import React, { PureComponent } from 'react' import { syncHistoryWithStore } from 'react-router-redux' import { Router, Route, browserHistory, IndexRoute } from 'react-router' // Add CSS framework import 'foundation-sites/dist/foundation.min.css'...
// Import libraries import 'rxjs' import { Provider } from 'react-redux' import React, { PureComponent } from 'react' import { syncHistoryWithStore } from 'react-router-redux' import { Router, Route, browserHistory, IndexRoute } from 'react-router' // Add CSS framework import 'foundation-sites/dist/foundation.min.css'...
Add routes for Aksels further development
Add routes for Aksels further development
JavaScript
mit
Entake/acuity,Entake/acuity,Entake/acuity
5a53fd6dab930c9b3e3984c369ada0d0e9410207
app/reducers/verticalTreeReducers.js
app/reducers/verticalTreeReducers.js
import undoable from 'redux-undo-immutable'; import { fromJS } from 'immutable'; import { findPathByNodeId } from '../utils/vertTreeUtils'; const defaultState = fromJS([{ value: undefined, children: [], _id: 1000 }]); const verticalTreeData = ( state = defaultState, action ) => { let path = findPathByNodeId(act...
import undoable from 'redux-undo-immutable'; import { fromJS } from 'immutable'; import { findPathByNodeId } from '../utils/vertTreeUtils'; const defaultState = fromJS([{ value: undefined, children: [], _id: 1000 }]); const verticalTreeData = ( state = defaultState, action ) => { let path = findPathByNodeId(act...
Move path logic out of switch statements
Move path logic out of switch statements
JavaScript
mit
ivtpz/brancher,ivtpz/brancher
8cf72e8a622aef28778487738de8fa03c4023014
jquery.externalLinkWarning.js
jquery.externalLinkWarning.js
;(function($) { $.fn.externalLinkWarning = function() { $('a').on('click', function(e) { // create temporary anchor var tmpLink = document.createElement('a'); tmpLink.href = this.href; // check if anchor host matches top window host ...
;(function($) { $.fn.externalLinkWarning = function() { $('a').on('click', function(e) { // create temporary anchor var tmpLink = document.createElement('a'); tmpLink.href = this.href; // check if anchor host matches top window host ...
Change host to hostname for IE compatibility
Change host to hostname for IE compatibility
JavaScript
mit
martinbean/external-link-warning
bcaa28358534bee8f5e0bfe40f33e05ac09fcd6f
lib/id_token.js
lib/id_token.js
module.exports = (provider, body, session) => { if (!/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/.test(body.id_token)) { return {error: 'Grant: OpenID Connect invalid id_token format'} } var [header, payload, signature] = body.id_token.split('.') try { header = JSON.parse(Buffer.from(he...
const isAudienceValid = (aud, key) => (Array.isArray(aud) && aud.indexOf(key) !== -1) || aud === key; module.exports = (provider, body, session) => { if (!/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/.test(body.id_token)) { return {error: 'Grant: OpenID Connect invalid id_token format'} } var [...
Handle audience as an array
Handle audience as an array According to RFC7519, `aud` claim is an array of strings; only in case there's one audience, `aud` can be a string. See https://tools.ietf.org/html/rfc7519#page-9 This fix allows for audience claim to be both string and array of strings.
JavaScript
mit
simov/grant
ec95831e70ae13816a6ad88cb5113f31a87b525f
server/app/models/barman.js
server/app/models/barman.js
const { DataTypes, Model } = require('sequelize'); /** * This class represents a barman. */ class Barman extends Model { /** * Initialization function. * * @param sequelize * @returns {Model} */ static init(sequelize) { return super.init({ id: { t...
const { DataTypes, Model } = require('sequelize'); /** * This class represents a barman. */ class Barman extends Model { /** * Initialization function. * * @param sequelize * @returns {Model} */ static init(sequelize) { return super.init({ id: { t...
Add field `active` for Barman
Add field `active` for Barman
JavaScript
apache-2.0
K-Fet/K-App,K-Fet/K-App,K-Fet/K-App,K-Fet/K-App
8325ecf62128b33ca43fd188fcefe524e17c38f3
ycomments.js
ycomments.js
(function ($) { var settings = {}, defaults = { api: "http://api.ihackernews.com/post/%s?format=jsonp", }; $.fn.ycomments = function (options) { $.extend(settings, defaults, options); return this.each(init); }; init = function () { var $this = $(thi...
(function ($) { var settings = {}, defaults = { api: "http://api.ihackernews.com/post/%s?format=jsonp", apidatatype: "jsonp", }; $.fn.ycomments = function (options) { $.extend(settings, defaults, options); return this.each(init); }; init = funct...
Make API data type configurable.
Make API data type configurable.
JavaScript
isc
whilp/ycomments
5eca351cf8a562dcd00f671db68b80ea64265131
tests/dummy/config/environment.js
tests/dummy/config/environment.js
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'hash', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
/* jshint node: true */ module.exports = function(environment) { var ENV = { modulePrefix: 'dummy', environment: environment, baseURL: '/', locationType: 'hash', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-contr...
Set the baseURL for development
Set the baseURL for development
JavaScript
mit
gloit/gloit-component,gloit/gloit-component
9fcc31c97cdc01ce38e7ac5f5151837fa5ea1b18
lib/facebook-setup.js
lib/facebook-setup.js
(function () { var _fb = false; var _pc = false; var _inst = null; var app = null; window.fbAsyncInit = function() { FB.init({ appId : '1238816002812487', xfbml : true, version : 'v2.5' }); _fb = true; if (_fb &&...
(function () { var _fb = false; var _pc = false; var _inst = null; var app = null; window.fbAsyncInit = function() { FB.init({ appId : '1238816002812487', xfbml : true, version : 'v2.5' }); _fb = true; if (_fb &&...
Use `initialize` event to start up
Use `initialize` event to start up Initialize event is fired after other scripts have initialized. Which means they can listen for fb:init event.
JavaScript
mit
playcanvas/playcanvas-facebook
7a89eb48c8486235cd9d197fc2ad7c84ef0201a6
tests/specs/misc/on-error/main.js
tests/specs/misc/on-error/main.js
define(function(require) { var test = require('../../../test') var n = 0 // 404 var a = require('./a') test.assert(a === null, '404 a') // exec error setTimeout(function() { var b = require('./b') }, 0) require.async('./c', function(c) { test.assert(c === null, '404 c') done() }) ...
define(function(require) { var test = require('../../../test') var n = 0 // 404 var a = require('./a') test.assert(a === null, '404 a') // exec error setTimeout(function() { var b = require('./b') }, 0) require.async('./c', function(c) { test.assert(c === null, '404 c') done() }) ...
Fix test spec for old browsers
Fix test spec for old browsers
JavaScript
mit
yuhualingfeng/seajs,judastree/seajs,LzhElite/seajs,mosoft521/seajs,ysxlinux/seajs,sheldonzf/seajs,jishichang/seajs,jishichang/seajs,chinakids/seajs,yern/seajs,longze/seajs,imcys/seajs,mosoft521/seajs,mosoft521/seajs,zaoli/seajs,LzhElite/seajs,Lyfme/seajs,AlvinWei1024/seajs,moccen/seajs,twoubt/seajs,seajs/seajs,chinakid...
71ddf05f43903a0549ec74e46e71a59e57c88ccd
karma.local.conf.js
karma.local.conf.js
"use strict"; module.exports = function(config) { config.set({ frameworks: [ "mocha" ], files: [ "dist/jsonapi-client-test.js" ], reporters: [ "spec" ], plugins: [ "karma-mocha", "karma-firefox-launcher", "karma-spec-reporter" ], port: 9876, colors: true, logLevel: config.LOG_INFO, au...
"use strict"; module.exports = function(config) { config.set({ frameworks: [ "mocha" ], files: [ "dist/jsonapi-client-test.js" ], reporters: [ "spec" ], plugins: [ "karma-mocha", "karma-firefox-launcher", "karma-spec-reporter" ], port: 9876, colors: true, logLevel: config.LOG_INFO, au...
Extend timeout on travis Mocha tests
Extend timeout on travis Mocha tests
JavaScript
mit
holidayextras/jsonapi-client
473ec082e5f0bcb8279a4e6c2c16bec7f11cd592
js/main.js
js/main.js
var questions = [ Q1 = { question: "What does HTML means?", answer: "HyperText Markup Language" }, Q2 = { question: "What does CSS means?", answer: "Cascading Style Sheet" }, Q3 = { question: "Why the \"C\" in CSS, is called Cascading?", answer: "When CSS rules are duplicated, the rule to be use i...
var questions = [ Q1 = { question: "What does HTML means?", answer: "HyperText Markup Language" }, Q2 = { question: "What does CSS means?", answer: "Cascading Style Sheet" }, Q3 = { question: "Why the \"C\" in CSS, is called Cascading?", answer: "When CSS rules are duplicated, the rule to be use i...
Change the value of revealBtn when clicked
Change the value of revealBtn when clicked
JavaScript
mit
vinescarlan/FlashCards,vinescarlan/FlashCards
177405e72f0057fe6953833325e8342e8a2b1dca
test/issues/issue-beta-352.js
test/issues/issue-beta-352.js
console.log('1..4'); console.log([1,2,3].join() == '1,2,3' ? 'ok' : 'not ok'); console.log([1,2,3].join('###') == '1###2###3' ? 'ok' : 'not ok'); console.log([1,2,3].join(1) == '11213' ? 'ok' : 'not ok'); console.log([1,2,3].join(null) == '1,2,3' ? 'ok' : 'not ok');
console.log('1..4'); console.log([1,2,3].join() == '1,2,3' ? 'ok' : 'not ok'); console.log([1,2,3].join('###') == '1###2###3' ? 'ok' : 'not ok'); console.log([1,2,3].join(1) == '11213' ? 'ok' : 'not ok'); console.log([1,2,3].join(null) == '1null2null3' ? 'ok' : 'not ok');
Fix Tim's dumbass broken test
Fix Tim's dumbass broken test
JavaScript
apache-2.0
tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime,tessel/t1-runtime
7f444a4bc172e88fe0e0466d4103189c4b8d32dc
js/main.js
js/main.js
var tabs = document.querySelectorAll('.tab'); var allPanels = document.querySelectorAll(".schedule"); function activateTab(tab) { //remove active de todas as outras tabs tabs.forEach(function(tab) { tab.classList.remove('active'); }); //adiciona active em t tab.classList.add('active'); } function openCo...
var tabs = document.querySelectorAll('.tab'); var allPanels = document.querySelectorAll(".schedule"); function activateTab(tab) { //remove active de todas as outras tabs for (i = 0; i < tabs.length; ++i) { tabs[i].classList.remove('active'); } //adiciona active em t tab.classList.add('active'); } functi...
Fix timeline tabs to work on mozilla (for instead of forEach to nodelist)
Fix timeline tabs to work on mozilla (for instead of forEach to nodelist)
JavaScript
cc0-1.0
FatecSorocaba/semana-da-tecnologia,FatecSorocaba/semana-da-tecnologia
e7c19ff1ab2ceefea9968c5587487fa10f539ab5
src/lib/logger.js
src/lib/logger.js
var config = require('./config') var logStack = [] module.exports = { getLogStack: function () { return logStack }, log: function (message, data) { var isDebugMode = config.get('debug') == 'true' var hasConsole = window.console logStack.push({ msg: message, data: data }) i...
var config = require('./config') var logStack = [] module.exports = { getLogStack: function () { return logStack }, log: function (message, data) { var isDebugMode = config.get('debug') === true || config.get('debug') === 'true' var hasConsole = window.console logStack.push({ msg: messag...
Handle of the case of debug-config being a bool
Handle of the case of debug-config being a bool
JavaScript
mit
opbeat/opbeat-angular,opbeat/opbeat-js-core,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-react,jahtalab/opbeat-js,opbeat/opbeat-js-core,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-angular,jahtalab/opbeat-js
9f1604e38dfeb88a9c327a0c0096b7712738da5a
tests/helpers/start-app.js
tests/helpers/start-app.js
import Ember from 'ember'; import Application from '../../app'; import config from '../../config/environment'; export default function startApp(attrs) { let application; // use defaults, but you can override let attributes = Ember.assign({}, config.APP, attrs); Ember.run(() => { application = Application...
import Ember from 'ember'; import Application from '../../app'; import config from '../../config/environment'; const merge = Ember.assign || Ember.merge; export default function startApp(attrs) { let application; let attributes = merge({}, config.APP); attributes = merge(attributes, attrs); // use defaults, bu...
Fix startApp for older ember versions
Fix startApp for older ember versions
JavaScript
mit
jkusa/ember-cli-clipboard,jkusa/ember-cli-clipboard
d9f8fc7a8edea40b3ef244f5f4ab19403d9a14a0
js/classes/Message.js
js/classes/Message.js
// Show message // --------------------------------------------------------------------- class Message { show(msg, timing, animations, new_game_btn, field) { if (new_game_btn === undefined) { new_game_btn = false; } $('#msg_new_game').off('click'); var msg_box = $('#message_box'); msg_box.hide(); ...
// Show message // --------------------------------------------------------------------- class Message { show(msg, timing, animations, new_game_btn, field) { if (new_game_btn === undefined) { new_game_btn = false; } $('#msg_new_game').off('click'); var msg_box = $('#message_box'); msg_box.hide(); ...
Switch from filter to backdrop-filter to blur background
Switch from filter to backdrop-filter to blur background
JavaScript
lgpl-2.1
blazeag/js-mineblaster,blazeag/js-mineblaster
95876f17f96cf06542e050643c12f93731837ae1
test.js
test.js
'use strict'; var assert = require('assert'), Selector = require('./'); describe('Selector', function () { it('should return an object', function () { var selector = new Selector('body', [ 0, 0, 0, 1 ]); console.log(selector); assert(selector); assert.equal(selector.text, 'body...
/* global describe, it */ 'use strict'; var assert = require('assert'), Selector = require('./'); describe('Selector', function () { it('should return an object', function () { var selector = new Selector('body', [ 0, 0, 0, 1 ]); assert(selector); assert.equal(selector.text, 'body'); ...
Remove logging and add globals for jshint.
Remove logging and add globals for jshint.
JavaScript
mit
jonkemp/style-selector
9db45c50489d852c0a40167f59dee4720712c78c
assets/lib/js/sb-admin-2.min.js
assets/lib/js/sb-admin-2.min.js
$(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,768>width?($("div.navbar-collapse").addClass("collapse"),topOffset=100):$("div.navbar-collapse").removeClass("collapse"),height=(this.windo...
$(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){topOffset=50,width=this.window.innerWidth>0?this.window.innerWidth:this.screen.width,768>width?($("div.navbar-collapse").addClass("collapse"),topOffset=100):$("div.navbar-collapse").removeClass("collapse"),height=(this.windo...
Fix for active nav links when URL has hash
Fix for active nav links when URL has hash
JavaScript
mit
p2made/yii2-sb-admin-theme,p2made/yii2-sb-admin-theme,p2made/yii2-sb-admin-theme
57edac53919b5d94ac9d32a6689efe6ba393dab9
src/hooks/query-with-current-user.js
src/hooks/query-with-current-user.js
const defaults = { idField: '_id', as: 'userId' }; export default function(options = {}) { return function(hook) { if (hook.type !== 'before') { throw new Error(`The 'associateCurrentUser' hook should only be used as a 'before' hook.`); } if (!hook.params.user) { throw new Error('There i...
const defaults = { idField: '_id', as: 'userId' }; export default function(options = {}) { return function(hook) { if (hook.type !== 'before') { throw new Error(`The 'queryWithCurrentUser' hook should only be used as a 'before' hook.`); } if (!hook.params.user) { throw new Error('There i...
Fix copy paste typo in queryWithCurrentUser hook.
Fix copy paste typo in queryWithCurrentUser hook.
JavaScript
mit
m1ch3lcl/feathers-authentication,eblin/feathers-authentication,eblin/feathers-authentication,feathersjs/feathers-authentication,feathersjs/feathers-passport-jwt,feathersjs/feathers-passport-jwt,m1ch3lcl/feathers-authentication
fc66fd3761ba8231e49a7045cd5290b619dfc0e0
lib/node/nodes/weighted-centroid.js
lib/node/nodes/weighted-centroid.js
'use strict'; var Node = require('../node'); var dot = require('dot'); var TYPE = 'weighted-centroid'; var PARAMS = { source : Node.PARAM.NODE(Node.GEOMETRY.POINT), weight_column : Node.PARAM.STRING, category_column : Node.PARAM.STRING }; var WeightedCentroid = Node.create(TYPE, PARAMS, {cache: true});...
'use strict'; var Node = require('../node'); var dot = require('dot'); var TYPE = 'weighted-centroid'; var PARAMS = { source : Node.PARAM.NODE(Node.GEOMETRY.POINT), weight_column : Node.PARAM.STRING, category_column : Node.PARAM.STRING }; var WeightedCentroid = Node.create(TYPE, PARAMS, {cache: true});...
Fix too long line issue
Fix too long line issue
JavaScript
bsd-3-clause
CartoDB/camshaft
63fd3aa92c0d659e577cee39db72914951b5d9fa
ui/src/actions/documentActions.js
ui/src/actions/documentActions.js
import { endpoint } from 'app/api'; import asyncActionCreator from './asyncActionCreator'; export const ingestDocument = asyncActionCreator( (collectionId, metadata, file, onUploadProgress, cancelToken) => async () => { const formData = new FormData(); if (file) { formData.append('file', file); } ...
import { endpoint } from 'app/api'; import asyncActionCreator from './asyncActionCreator'; export const ingestDocument = asyncActionCreator( (collectionId, metadata, file, onUploadProgress, cancelToken) => async () => { const formData = { meta: JSON.stringify(metadata), file: file, }; const ...
Use automatic form data serialization
Use automatic form data serialization Starting from 0.27.0, axios supports automatic serialization to the form data format for requests with a `multipart/form-data` content type.
JavaScript
mit
alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph
8823acb41f9810e07f09ea9fe660deebc657f451
lib/menus/contextMenu.js
lib/menus/contextMenu.js
'use babel'; const init = () => { const copyEnabled = () => atom.config.get('remote-ftp.context.enableCopyFilename'); const contextMenu = { '.remote-ftp-view .entries.list-tree:not(.multi-select) .directory .header': { enabled: copyEnabled(), command: [{ label: 'Copy name', command:...
'use babel'; const init = () => { const contextMenu = { '.remote-ftp-view .entries.list-tree:not(.multi-select) .directory': { enabled: atom.config.get('remote-ftp.context.enableCopyFilename'), command: [{ label: 'Copy name', command: 'remote-ftp:copy-name', }, { type: '...
Fix directory "Copy name" function
Fix directory "Copy name" function
JavaScript
mit
mgrenier/remote-ftp,icetee/remote-ftp
95c874d1a0f53bc15bba2c3e141560e20fc8ee3b
src/nzServices.js
src/nzServices.js
(function (angular) { "use strict"; var module = angular.module('net.enzey.services', []); module.service('nzService', function ($document, $timeout) { // position flyout var getChildElems = function(elem) { var childElems = []; elem = angular.element(elem); var children = elem.children(); for ...
(function (angular) { "use strict"; var module = angular.module('net.enzey.services', []); module.service('nzService', function ($document, $timeout) { // position flyout var getChildElems = function(elem) { var childElems = []; elem = angular.element(elem); var children = elem.children(); for ...
Allow multiple elements, and their children, to be watched to determine if the clickAwayAction should be called.
Allow multiple elements, and their children, to be watched to determine if the clickAwayAction should be called.
JavaScript
apache-2.0
EnzeyNet/Services
bd565f9c1131a432028da2de89646c80b2420aa3
lib/update-license.js
lib/update-license.js
module.exports = function (licenseContent, done) { var thisYear = (new Date()).getFullYear(); var latestYear, originalYearInfo, updatedYearInfo, match, updatedLicenseContent; match = licenseContent.match(/Copyright \(c\) (\d{4})\s*[~-]\s*(\d{4})/); if (match) { latestYear = match[2]; if (parseInt(lat...
module.exports = function (licenseContent, done) { var thisYear = (new Date()).getFullYear(); var latestYear, originalYearInfo, updatedYearInfo, match, updatedLicenseContent; match = licenseContent.match(/Copyright \(c\) (\d{4})\s*[~-]\s*(\d{4})/); if (match) { latestYear = match[2]; if (parseInt(lat...
Check match exists before extracting latestYear
Check match exists before extracting latestYear
JavaScript
mit
sungwoncho/license-up
116724c9e7dfdbd528f98cf435abe6d1a2255c94
app/scripts/controllers/navbar.js
app/scripts/controllers/navbar.js
'use strict'; /** * @ngdoc function * @name dockstore.ui.controller:NavbarCtrl * @description * # NavbarCtrl * Controller of the dockstore.ui */ angular.module('dockstore.ui') .controller('NavbarCtrl', [ '$scope', '$rootScope', '$auth', '$location', 'UserService', 'NotificationService',...
'use strict'; /** * @ngdoc function * @name dockstore.ui.controller:NavbarCtrl * @description * # NavbarCtrl * Controller of the dockstore.ui */ angular.module('dockstore.ui') .controller('NavbarCtrl', [ '$scope', '$rootScope', '$auth', '$location', 'UserService', 'NotificationService',...
Handle error case for username shortening
Handle error case for username shortening
JavaScript
apache-2.0
ga4gh/dockstore-ui,ga4gh/dockstore-ui,ga4gh/dockstore-ui
e986b21056f79b7632f6854d31f0f2dd352ae1d1
src/arrow.js
src/arrow.js
import {Table} from 'apache-arrow'; const RowIndex = Symbol('rowIndex'); export default function arrow(data) { const table = Table.from(Array.isArray(data) ? data : [data]), proxy = rowProxy(table), rows = Array(table.length); table.scan(i => rows[i] = proxy(i)); return rows; } arrow.response...
import {Table} from 'apache-arrow'; const RowIndex = Symbol('rowIndex'); export default function arrow(data) { const table = Table.from(Array.isArray(data) ? data : [data]), proxy = rowProxy(table), rows = Array(table.length); table.scan(i => rows[i] = proxy(i)); return rows; } arrow.response...
Use indices for faster column lookup.
Use indices for faster column lookup.
JavaScript
bsd-3-clause
vega/vega-loader-arrow
07f15715639416099e8f58462a96e14874dd70d7
Gruntfile.js
Gruntfile.js
/* jshint node:true */ 'use strict'; module.exports = function (grunt) { var config = { pkg: grunt.file.readJSON('package.json'), srcDir: 'src', destDir: 'dist', tempDir: 'tmp', }; // load plugins require('load-grunt-tasks')(grunt); // load task definitions grunt.loadTasks('tasks'); //...
/* jshint node:true */ 'use strict'; module.exports = function (grunt) { var config = { pkg: grunt.file.readJSON('package.json'), srcDir: 'src', destDir: 'dist', tempDir: 'tmp', }; // load plugins require('load-grunt-tasks')(grunt); // load task definitions grunt.loadTasks('tasks'); //...
Update loadConfig to allow duplicates
Update loadConfig to allow duplicates
JavaScript
agpl-3.0
grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana
aca17ece6baa27b604a46116a8aaeb034d042286
src/WebInterface.js
src/WebInterface.js
const util = require('util'); const express = require('express'); const app = express(); const router = express.Router(); const Config = require('./Config'); class WebInterface { constructor(state) { this.state = state; this.port = Config.get('webPort') || 9000; } init() { router.get('...
const util = require('util'); const express = require('express'); const app = express(); const router = express.Router(); const Config = require('./Config'); class WebInterface { constructor(state) { this.state = state; this.port = Config.get('webPort') || 9000; } init() { // Routes f...
Add routes for various get responses.
Add routes for various get responses.
JavaScript
mit
shawncplus/ranviermud,seanohue/ranviermud,seanohue/ranviermud
e735a093caade4c4106307935e25a42d7361c49a
semaphore.js
semaphore.js
(function (context) { var _SEMAPOHRES = {}; var Semaphore = function (key) { this.key = key; if (_SEMAPOHRES[this.key] == undefined) _SEMAPOHRES[this.key] = false; return this; }; Semaphore.prototype.isLocked = function() { return _SEMAPOHRES[this.key]; }; Semaphore.prototype.lock =...
(function (context) { var _SEMAPOHRES = {}; var Semaphore = function (key) { this.key = key; if (_SEMAPOHRES[this.key] == undefined) _SEMAPOHRES[this.key] = false; return this; }; Semaphore.prototype.isLocked = function() { return _SEMAPOHRES[this.key]; }; Semaphore.prototype.lock =...
Remove second Semaphore.wrap and pass in this.
Remove second Semaphore.wrap and pass in this.
JavaScript
mit
RyanMcG/semaphore-js
dae676daebaca628db83a769ca6cba03f3b8727b
blueprints/ember-cli-react/index.js
blueprints/ember-cli-react/index.js
/*jshint node:true*/ var RSVP = require('rsvp'); module.exports = { description: 'Install ember-cli-react dependencies into your app.', normalizeEntityName: function() {}, // Install react into host app afterInstall: function() { return RSVP.all([ this.addPackageToProject("ember-browserify", "^1.1...
/*jshint node:true*/ var RSVP = require('rsvp'); var pkg = require('../../package.json'); function getDependencyVersion(packageJson, name) { var dependencies = packageJson.dependencies; var devDependencies = packageJson.devDependencies; return dependencies[name] || devDependencies[name]; } module.exports = { ...
Synchronize packages version in blueprint
Synchronize packages version in blueprint
JavaScript
mit
pswai/ember-cli-react,pswai/ember-cli-react
2aa678272232db394988884c2eabbeba50f84f36
src/components/Panels.js
src/components/Panels.js
import React, { Component, PropTypes } from 'react'; import Panel from './Panel'; import idSafeName from '../helpers/idSafeName'; class Panels extends Component { render () { const { data, selectedIndex } = this.props; if (!data.length) { return null; } return ( ...
import React, { Component, PropTypes } from 'react'; import Panel from './Panel'; import idSafeName from '../helpers/idSafeName'; class Panels extends Component { render () { const { data, selectedIndex } = this.props; if (!data.length) { return null; } return ( ...
Put .tabs__panels on correct element
Put .tabs__panels on correct element
JavaScript
mit
stowball/react-accessible-tabs
da16e7386042b77c942924fcab6114116bc52ec8
src/index.js
src/index.js
import {Configure} from './configure'; export function configure(aurelia, configCallback) { var instance = aurelia.container.get(Configure); // Do we have a callback function? if (configCallback !== undefined && typeof(configCallback) === 'function') { configCallback(instance); } return n...
import {Configure} from './configure'; export function configure(aurelia, configCallback) { var instance = aurelia.container.get(Configure); // Do we have a callback function? if (configCallback !== undefined && typeof(configCallback) === 'function') { configCallback(instance); } return n...
Call the check function during configuration phase
Call the check function during configuration phase
JavaScript
mit
Vheissu/Aurelia-Configuration,JeroenVinke/Aurelia-Configuration,JoshMcCullough/Aurelia-Configuration,Vheissu/Aurelia-Configuration
490db713beee28b626237aab95fd70ead87a6ac5
src/index.js
src/index.js
import Component from './class/Component'; import render from './core/render'; import renderToString from './core/renderToString'; import unmountComponentAtNode from './core/unmountComponentAtNode'; import FragmentValueTypes from './enum/fragmentValueTypes'; import TemplateTypes from './enum/templateTypes'; import crea...
export { default as Component } from './class/Component'; export { default as render } from './core/render'; export { default as renderToString } from './core/renderToString'; export { default as unmountComponentAtNode } from './core/unmountComponentAtNode'; export { default as FragmentValueTypes } from './enum/fragmen...
Use ES6 export instead of CJS
Use ES6 export instead of CJS
JavaScript
mit
trueadm/inferno,infernojs/inferno,trueadm/inferno,infernojs/inferno
ab2c01ed76f5e55b82736eb5cf7314c6524fd05d
src/order.js
src/order.js
import { polygonCentroid, distance } from "./math.js"; // With 8 or fewer shapes, find the best permutation // Skip if array is huge (9+ shapes) export default function(start, end) { let distances = start.map(p1 => end.map(p2 => squaredDistance(p1, p2))), order = bestOrder(start, end, distances); if (start.le...
import { polygonCentroid, distance } from "./math.js"; // With 8 or fewer shapes, find the best permutation // Skip if array is huge (9+ shapes) export default function(start, end) { let distances = start.map(p1 => end.map(p2 => squaredDistance(p1, p2))); if (start.length > 8) { return start.map((d, i) => i); ...
Remove unused call to 'bestOrder'
Remove unused call to 'bestOrder'
JavaScript
mit
veltman/flubber
c879f1c7b35af059ca97d05b57ef1ee41da7ca60
api/tests/features/events/index.unit.spec.js
api/tests/features/events/index.unit.spec.js
require('rootpath')(); const Hapi = require('hapi'); const { describe, it, expect, sinon, before, after, beforeEach, afterEach } = require('tests/helper'); const route = require('app/features/events'); const eventHandler = require('app/features/events/eventHandler'); describe('Unit | Route | Event Index ', function()...
require('rootpath')(); const Hapi = require('hapi'); const { describe, it, expect, sinon, before, after, beforeEach, afterEach } = require('tests/helper'); const route = require('app/features/events'); const eventHandler = require('app/features/events/eventHandler'); describe('Unit | Route | Event Index ', function()...
Add test when error is unknown
Add test when error is unknown
JavaScript
agpl-3.0
Hypernikao/who-brings-what
cc6b9e82123d9a9f75075ed0e843227ea9c74e4d
src/timer.js
src/timer.js
var Timer = (function(Util) { 'use strict'; // Internal constants for the various timer states. var Waiting = 0, Inspecting = 1, Ready = 2, Running = 3, Delay = 4; var state = Waiting; var startTime = undefined, endTime = undefined, solveTime = undefined; var intervalID = undefined; function isWaiting(...
var Timer = (function(Util) { 'use strict'; // Internal constants for the various timer states. var Waiting = 0, Inspecting = 1, Ready = 2, Running = 3, Delay = 4; var state = Waiting; var startTime = undefined, endTime = undefined, solveTime = undefined; var intervalID = undefined; function isWaiting(...
Move the functionality out of trigger(), to make it do as little as possible. Also, use '===' instead of '=='.
Move the functionality out of trigger(), to make it do as little as possible. Also, use '===' instead of '=='.
JavaScript
mit
jjtimer/jjtimer-core
8b5307e97bf54da9b97f1fbe610daf6ca3ebf7aa
src/server/app.js
src/server/app.js
import upload from './upload'; import express from 'express'; import logger from 'winston'; const app = express(); export default app; app.set('port', process.env.PORT || 3000); logger.remove(logger.transports.Console); logger.add(logger.transports.Console, {'timestamp':true,}); app.use((req, res, next) => { // e...
import upload from './upload'; import express from 'express'; import logger from 'winston'; const app = express(); export default app; app.set('port', process.env.PORT || 3000); logger.remove(logger.transports.Console); logger.add(logger.transports.Console, {'timestamp':true,}); app.use((req, res, next) => { res...
Fix endless loop in server
Fix endless loop in server
JavaScript
agpl-3.0
gusmonod/aag,gusmonod/aag
6a6df1b256978c460ec823ee019c2028806d5bd1
sashimi-webapp/src/database/storage.js
sashimi-webapp/src/database/storage.js
/* * CS3283/4 storage.js * This is a facade class for other components */
/** * * CS3283/4 storage.js * This class acts as a facade for other developers to access to the database. * The implementation is a non-SQL local storage to support the WebApp. * */ const entitiesCreator = require('./create/entitiesCreator'); class Storage { static constructor() {} static initializeData...
Add initializeDatabase function facade class
Add initializeDatabase function facade class
JavaScript
mit
nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note
60bd0a8274ec5e922bdaaba82c8c9e1054cea5f5
backend/src/routes/users/index.js
backend/src/routes/users/index.js
const express = require('express') const ERRORS = require('../../errors') const User = require('../../models/User') const utils = require('../../utils') const router = express.Router() router.post('/', register) function register(req, res, next) { const { body: { username, password } } = req if (!username || !...
const express = require('express') const ERRORS = require('../../errors') const User = require('../../models/User') const utils = require('../../utils') const router = express.Router() router.post('/', register) function register(req, res, next) { const { body: { username, password } } = req if (!username || !...
Fix missing parameter to pass tests
Fix missing parameter to pass tests
JavaScript
mit
14Plumes/Hexode,14Plumes/Hexode,KtorZ/Hexode,14Plumes/Hexode,KtorZ/Hexode,KtorZ/Hexode
c98265f61bae81b9de01ac423f7a2b57a7f83e0f
tests/CoreSpec.js
tests/CoreSpec.js
describe("Core Bliss", function () { "use strict"; before(function() { fixture.setBase('tests/fixtures'); }); beforeEach(function () { this.fixture = fixture.load('core.html'); document.body.innerHTML += this.fixture[0]; }); // testing setup it("has the fixture on the dom", function () { expect($('#fi...
describe("Core Bliss", function () { "use strict"; before(function() { fixture.setBase('tests/fixtures'); }); beforeEach(function () { this.fixture = fixture.load('core.html'); }); // testing setup it("has the fixture on the dom", function () { expect($('#fixture-container')).to.not.be.null; }); it("...
Remove appending of fixture to dom
Remove appending of fixture to dom This is not needed as far as I can tell, the test below works without it, and loading other fixtures elsewhere doesn't seem to work with this here.
JavaScript
mit
zdfs/bliss,zdfs/bliss,LeaVerou/bliss,dperrymorrow/bliss,LeaVerou/bliss,dperrymorrow/bliss
3f85aa402425340b7476aba9873af2bb3bc3534e
next/pages/index.js
next/pages/index.js
// This is the Link API import Link from 'next/link' const Index = () => ( <div> <Link href="/about"> <a>About Page</a> </Link> <p>Hello Next.js</p> </div> ) export default Index
// This is the Link API import Link from 'next/link' const Index = () => ( <div> <Link href="/about"> <a style={{fontSize: 20}}>About Page</a> </Link> <p>Hello Next.js</p> </div> ) export default Index
Add style to anchor link
Add style to anchor link
JavaScript
mit
yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program
2ad2196880708ceaf1870c89a5080f65efb66e8b
example/hoppfile.js
example/hoppfile.js
import hopp from 'hopp' export const css = hopp([ 'src/css/*.css' ]) .dest('dist/css') export const js = hopp([ 'src/js/*.js' ]) // create fs streams // .babel() // pipe to (create babel stream) .dest('dist/js') // pipe to (create dest stream) export default [ 'js', 'css' ]
import hopp from 'hopp' export const css = hopp([ 'src/css/*.css' ]) .dest('dist/css') export const js = hopp([ 'src/js/*.js' ]) .dest('dist/js') export const watch = hopp.watch([ 'js', 'css' ]) export default [ 'js', 'css' ]
Add sample watch task to example
Add sample watch task to example
JavaScript
mit
hoppjs/hopp
ab13702e08dd3daa943b08bb4a2cc014128b0ee0
wolf.js
wolf.js
var irc = require('irc'); // IRC Client require('js-yaml'); // JavaScript YAML parser (for settings) // Import settings file var settings = require('./config/bot.yaml'); var client = new irc.Client(settings.server, settings.nick, { userName: settings.username, realName: settings.realname, port: settings.port, cha...
var irc = require('irc'); // IRC Client require('js-yaml'); // JavaScript YAML parser (for settings) // Gr__dirnameab configuration files var settings = require(__dirname + '/config/bot.yaml'); var werewolf = require(__dirname + '/config/werewolf.yaml'); var client = new irc.Client(settings.server, settings.nick, { ...
Use the new locale handler
Use the new locale handler
JavaScript
mpl-2.0
gluxon/wolf.js
b1030675d9b6432dfaf2bd76b395c28491bc32a8
src/main/server/Stats.js
src/main/server/Stats.js
import bunyan from 'bunyan'; import Promise from 'bluebird'; import SDC from 'statsd-client'; const logger = bunyan.createLogger({name: 'Stats'}); export default class Stats { constructor(config) { const stats = config.statsd; logger.info('Starting StatsD client.'); this._statsd = new SDC({ host: ...
import bunyan from 'bunyan'; import Promise from 'bluebird'; import SDC from 'statsd-client'; const logger = bunyan.createLogger({name: 'Stats'}); export default class Stats { constructor(config) { const stats = config.statsd; logger.info('Starting StatsD client.'); this._statsd = new SDC({ host: ...
Make stats quieter in logs.
Make stats quieter in logs.
JavaScript
mit
ssube/eveningdriver,ssube/eveningdriver
b268879770a80c260b68e7a5925f988b713bea09
src/components/FormInput.js
src/components/FormInput.js
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Form, Label, Input } from 'semantic-ui-react'; class FormInput extends Component { componentWillReceiveProps(nextProps) { const { input: { value, onChange }, meta: { visited }, defaultValue } = nextProps; ...
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Form, Label, Input } from 'semantic-ui-react'; class FormInput extends Component { componentWillReceiveProps(nextProps) { const { input: { value, onChange }, meta: { visited }, defaultValue } = nextProps; ...
Add ability to customize error message styles
Add ability to customize error message styles
JavaScript
mit
mariusespejo/semantic-redux-form-fields
e3a8c773cc63a8263f8fe9bb98be8326671bbdcc
src/components/posts_new.js
src/components/posts_new.js
import React from 'react'; class PostsNew extends React.Component { render() { return ( <div className='posts-new'> Posts new </div> ); } } export default PostsNew;
import React from 'react'; import { Field, reduxForm } from 'redux-form'; class PostsNew extends React.Component { render() { return ( <form className='posts-new'> <Field name='title' component={} /> </form> ); } } export default reduxForm({ form: 'PostsNe...
Add initial posts new form elements
Add initial posts new form elements
JavaScript
mit
monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog
6874f190611009228ea9d6901fcdd6b951c66198
tests/unit/tooltip/tooltip_common.js
tests/unit/tooltip/tooltip_common.js
TestHelpers.commonWidgetTests( "tooltip", { defaults: { content: function() {}, disabled: false, hide: true, items: "[title]:not([disabled])", position: { my: "left top+15", at: "left bottom", collision: "flipfit flipfit" }, show: true, tooltipClass: null, track: false, // callbacks clo...
TestHelpers.commonWidgetTests( "tooltip", { defaults: { content: function() {}, disabled: false, hide: true, items: "[title]:not([disabled])", position: { my: "left top+15", at: "left bottom", collision: "flipfit flip" }, show: true, tooltipClass: null, track: false, // callbacks close:...
Fix default for position option, follow-up to 1d9eab1.
Tooltip: Fix default for position option, follow-up to 1d9eab1.
JavaScript
mit
GrayYoung/jQuery.UI.Extension,GrayYoung/jQuery.UI.Extension
4fce90c61e7b0c363261866d4d47268403c634ba
lib/models/relatedResource.js
lib/models/relatedResource.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ObjectId = Schema.Types.ObjectId; var ORIGIN_TYPES = [ 'srv:coupledResource', 'gmd:onLine' ]; var RESOURCE_TYPES = [ 'feature-type', 'link', 'atom-feed' ]; var RelatedResourceSchema = new Schema({ type: { type: String, re...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var ObjectId = Schema.Types.ObjectId; var ORIGIN_TYPES = [ 'srv:coupledResource', 'gmd:onLine' ]; var RESOURCE_TYPES = [ 'feature-type', 'link', 'atom-feed' ]; var RelatedResourceSchema = new Schema({ type: { type: String, re...
Add checking flag to RelatedResource model
Add checking flag to RelatedResource model
JavaScript
agpl-3.0
jdesboeufs/geogw,inspireteam/geogw
20f511a5e77972396b3ba9496283900bcbb6cbf6
webpack.common.js
webpack.common.js
var path = require('path'); module.exports = { /** * Path from which all relative webpack paths will be resolved. */ context: path.resolve(__dirname), /** * Entry point to the application, webpack will bundle all imported modules. */ entry: './src/index.ts', /** ...
var path = require('path'); var rootDir = path.resolve(__dirname); function getRootPath(args) { args = Array.prototype.slice.call(arguments, 0); return path.join.apply(path, [rootDir].concat(args)); } module.exports = { /** * Path from which all relative webpack paths will be resolved. ...
Add module loading from src to webpack configuration.
Add module loading from src to webpack configuration.
JavaScript
mit
Baasic/baasic-sdk-javascript,Baasic/baasic-sdk-javascript
b8a2c85d3191879b74520499dbe768ddf487adc0
src/frontend/container/Resources/SwitchResource.js
src/frontend/container/Resources/SwitchResource.js
import React from 'react'; import PropTypes from 'prop-types'; import * as action from '../../action/'; import Switch from '@material-ui/core/Switch'; import Typography from '@material-ui/core/Typography'; import { connect } from 'react-redux'; class SwitchResource extends React.Component { handleChange = (field, v...
import React from 'react'; import PropTypes from 'prop-types'; import * as action from '../../action/'; import Switch from '@material-ui/core/Switch'; import Typography from '@material-ui/core/Typography'; import { connect } from 'react-redux'; class SwitchResource extends React.Component { handleChange = (field, v...
Fix bug with unresponsive switch due to new framework
Fix bug with unresponsive switch due to new framework
JavaScript
apache-2.0
doemski/cblocks,doemski/cblocks
06b3319ea0b7add2e69eecc473927034521bd7e5
lib/languages/rust.js
lib/languages/rust.js
var DocsParser = require("../docsparser"); var xregexp = require('../xregexp').XRegExp; function RustParser(settings) { DocsParser.call(this, settings); } RustParser.prototype = Object.create(DocsParser.prototype); RustParser.prototype.setup_settings = function() { this.settings = { 'curlyTypes': fal...
var DocsParser = require("../docsparser"); var xregexp = require('../xregexp').XRegExp; function RustParser(settings) { DocsParser.call(this, settings); } RustParser.prototype = Object.create(DocsParser.prototype); RustParser.prototype.setup_settings = function() { this.settings = { 'curlyTypes': fal...
Improve Rust function parser (Use correct identifier)
Improve Rust function parser (Use correct identifier)
JavaScript
mit
NikhilKalige/docblockr
8c7a1ff64829876ee7d3815a7dd2bc32c6d7ec44
lib/testExecutions.js
lib/testExecutions.js
"use strict"; const file = require("./file"); module.exports = function testExecutions(data, formatForSonar56 = false) { const aTestExecution = [{ _attr: { version: "1" } }]; const testResults = data.testResults.map(file); return formatForSonar56 ? { unitTest: aTestExecution.concat(testResults) } : { t...
'use strict' const file = require('./file') module.exports = function testExecutions(data, formatForSonar56 = false) { const aTestExecution = [{_attr: {version: '1'}}] const testResults = data.testResults.map(file) return formatForSonar56 ? { unitTest: aTestExecution.concat(testResults) } : { testExecu...
Undo changes done by prettier
Undo changes done by prettier old habbits die hard! Ran the prettier on Atom on the whole file, this commit undoes it.
JavaScript
mit
3dmind/jest-sonar-reporter,3dmind/jest-sonar-reporter
fe71f0ef2c920712e3b33f5002a18ab87ff52544
src/index.js
src/index.js
export function onConnect(respond, connections = {}, tab, error) { chrome.runtime.onConnect.addListener(function(port) { function extensionListener(message) { if (message.name === 'init') { connections[message.tabId] = port; if (tab && message.tabId !== tab.id) { error(port); ...
export function onConnect(respond, connections = {}, tab, error) { chrome.runtime.onConnect.addListener(function(port) { function extensionListener(message) { if (message.name === 'init') { connections[message.tabId || port.sender.tab.id] = port; if (tab && message.tabId !== tab.id) { ...
Allow not to specify sender tab id. Detect it implicitly
Allow not to specify sender tab id. Detect it implicitly
JavaScript
mit
zalmoxisus/crossmessaging
e2925bec159f6fc40317b40b3036cd669a23ddfb
app/Artist.js
app/Artist.js
const https = require("https"); const fs = require("fs"); module.exports = class Artist { constructor(artistObject) { this.id = artistObject.id; this.name = artistObject.name; this.tracks = []; this.artistObject = artistObject; this.artId = artistObject.picture; } a...
const https = require("https"); const fs = require("fs"); module.exports = class Artist { constructor(artistObject) { this.id = artistObject.id; this.name = artistObject.name; this.tracks = []; this.artistObject = artistObject; this.artId = artistObject.picture; } a...
Check if directory exists before creating
Check if directory exists before creating
JavaScript
mit
okonek/tidal-cli-client,okonek/tidal-cli-client
128f6c14cc4562a43bd929080691a4c764cb9b8d
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); gulp.task('compile', function () { return gulp.src('./scss/*.scss') .pipe(gulp.dest('./dist/')); }); gulp.task('watch', function () { gulp.watch('./scss/*.scss', ['compile']); });
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); gulp.task('compile', function () { return gulp.src('./scss/*.scss') .pipe(sass()) .pipe(gulp.dest('./dist/')); }); gulp.task('watch', function () { gulp.watch('./scss/*.scss', ['compile']); });
Add sass compilation back to gulp file, tweaked output
Add sass compilation back to gulp file, tweaked output
JavaScript
mit
MikeBallan/Amazium,aoimedia/Amazium,aoimedia/Amazium,catchamonkey/amazium,OwlyStuff/Amazium,OwlyStuff/Amazium
13526036cd2f742c1ef744cbd87debdcea70e1ea
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var minifycss = require('gulp-minify-css'); var autoprefixer = require('gulp-autoprefixer'); var sourcemaps = require('gulp-sourcemaps'); var paths = { sass: 'wye/static/sass/*.scss', css: 'wye/static/css' }; gulp.task('css', function(...
'use strict'; var gulp = require('gulp'); var sass = require('gulp-sass'); var minifycss = require('gulp-minify-css'); var autoprefixer = require('gulp-autoprefixer'); var sourcemaps = require('gulp-sourcemaps'); var paths = { sass: 'wye/static/sass/**/*.scss', css: 'wye/static/css' }; gulp.task('css', functi...
Include all sass dirs to compile
Include all sass dirs to compile
JavaScript
mit
pythonindia/wye,pythonindia/wye,pythonindia/wye,pythonindia/wye
0f21e31f84a1fececa6b8220eb2049651630e58e
gulpfile.js
gulpfile.js
var gulp = require('gulp'), gulpCopy = require('gulp-file-copy'); gulp.task('copy', function() { gulp.src('./bower_components/jquery/jquery.min.js') .pipe(gulp.dest('./js/lib/')); gulp.src('./jquery-mobile/jquery.mobile-1.4.5.js') .pipe(gulp.dest('./js/lib/')); gulp.src('./bower_components/mom...
var gulp = require('gulp'), gulpCopy = require('gulp-file-copy'); gulp.task('copy', function() { gulp.src('./bower_components/jquery/jquery.min.js') .pipe(gulp.dest('./js/lib/')); gulp.src('./jquery-mobile/jquery.mobile-1.4.5.js') .pipe(gulp.dest('./js/lib/')); gulp.src('./bower_components/mom...
Add copy image in gulp
Add copy image in gulp
JavaScript
mit
jeremy5189/payWhichClient,jeremy5189/payWhichClient
80469cdd650849ad6775f5d0a2bfad6a1cb445db
desktop/app/shared/database/parse.js
desktop/app/shared/database/parse.js
/** * Parse task and return task info if * the task is valid, otherwise throw * error. * @param {string} query Enetered task * @return {object} Task info containing * task text, start time * and dealine */ function parse(query) { /** * Day, week or m...
/** * Parse task and return task info if * the task is valid, otherwise throw * error. * @param {string} query Enetered task * @return {object} Task info containing * task text, start time * and dealine */ function parse(query) { /** * Day, week or m...
Move task starting and ending points to start of days
Move task starting and ending points to start of days
JavaScript
mit
mkermani144/wanna,mkermani144/wanna
f9089bd10a8283fb2cd9f9914c39dc61f5c670fa
tasks/css_flip.js
tasks/css_flip.js
/* * grunt-css-flip * https://github.com/twbs/grunt-css-flip * * Copyright (c) 2014 Chris Rebert * Licensed under the MIT License. */ 'use strict'; var flip = require('css-flip'); module.exports = function(grunt) { grunt.registerMultiTask('cssflip', "Grunt plugin for Twitter's css-flip", function () { v...
/* * grunt-css-flip * https://github.com/twbs/grunt-css-flip * * Copyright (c) 2014 Chris Rebert * Licensed under the MIT License. */ 'use strict'; var flip = require('css-flip'); module.exports = function (grunt) { grunt.registerMultiTask('cssflip', "Grunt plugin for Twitter's css-flip", function () { ...
Add missing space before paren
Add missing space before paren
JavaScript
mit
twbs/grunt-css-flip
286b7f561655fdf75e0fe53d888d95082605ef3f
src/index.js
src/index.js
export default function({ types }) { return { visitor: { Function: function parseFunctionPath(path) { (path.get('params') || []).reverse().forEach(function(param) { const decorators = param.node.decorators.reverse(); if (param.node && Arra...
export default function({ types }) { return { visitor: { Function: function parseFunctionPath(path) { (path.get('params') || []).reverse().forEach(function(param) { let currentDecorator; (param.node.decorators || []).reverse() ...
Fix issue with the existence of the decorators array introduced by syntax changes
Fix issue with the existence of the decorators array introduced by syntax changes
JavaScript
mit
benderTheCrime/babel-plugin-transform-function-parameter-decorators
45263d5abdd81c9ce15c52835d98b4998ccbe337
src/index.js
src/index.js
import Promise from 'bluebird'; import process from 'process'; import util from 'util'; import { withRetries } from 'killrvideo-nodejs-common'; import { Scheduler } from './scheduler'; import * as availableTasks from './tasks'; import { initCassandraAsync } from './utils/cassandra'; import { initializeSampleDataAsync }...
import Promise from 'bluebird'; import process from 'process'; import util from 'util'; import { withRetries } from 'killrvideo-nodejs-common'; import { Scheduler } from './scheduler'; import * as availableTasks from './tasks'; import { initCassandraAsync } from './utils/cassandra'; import { initializeSampleDataAsync }...
Make sure we actually exit when we fail on startup
Make sure we actually exit when we fail on startup
JavaScript
apache-2.0
KillrVideo/killrvideo-generator,KillrVideo/killrvideo-generator
11086bca7cb8b43fb099e70ab70fc548bcba9683
src/index.js
src/index.js
/** * @copyright 2015, Prometheus Research, LLC */ import {createValue} from './Value'; export Fieldset from './Fieldset'; export Field from './Field'; export {createValue}; export WithFormValue from './WithFormValue'; export * as Schema from './Schema'; export Input from './Input'; expo...
/** * @copyright 2015, Prometheus Research, LLC */ import {createValue} from './Value'; export Fieldset from './Fieldset'; export Field from './Field'; export {createValue}; export WithFormValue from './WithFormValue'; export * as Schema from './Schema'; export Input from './Input'; expo...
Fix typo: createvalue -> createValue
Fix typo: createvalue -> createValue
JavaScript
mit
prometheusresearch/react-forms
b394877b0b152d43656c5dfc18e667111273668e
src/utils.js
src/utils.js
/** * Create a copy of an object, omitting provided keys. * @param {Object} obj Object to copy * @param {Array} arr Keys to omit * @returns {Object} */ export const omit = (obj, arr) => Object.keys(obj).reduce((res, key) => { if (arr.indexOf(key) === -1) { res[key] = obj[key] } return res }, {}) export...
/** * Create a copy of an object, omitting provided keys. * @param {Object} obj Object to copy * @param {Array} arr Keys to omit * @returns {Object} */ export const omit = (obj, arr) => Object.keys(obj).reduce((res, key) => { if (arr.indexOf(key) === -1) { res[key] = obj[key] } return res }, {}) /** *...
Add util to parse response from GitHub access token request
Add util to parse response from GitHub access token request
JavaScript
mit
nicolas-goudry/react-social-login,deepakaggarwal7/react-social-login,deepakaggarwal7/react-social-login,nicolas-goudry/react-social-login,deepakaggarwal7/react-social-login,nicolas-goudry/react-social-login
61328d83b9671c066913c301bc4bc449ea427eb7
src/utils.js
src/utils.js
export function getInterfaceLanguage() { if (!!navigator && !!navigator.language) { return navigator.language; } else if (!!navigator && !!navigator.languages && !!navigator.languages[0]) { return navigator.languages[0]; } else if (!!navigator && !!navigator.userLanguage) { return navigator.userLangua...
export function getInterfaceLanguage() { if (!!navigator && !!navigator.language) { return navigator.language; } else if (!!navigator && !!navigator.languages && !!navigator.languages[0]) { return navigator.languages[0]; } else if (!!navigator && !!navigator.userLanguage) { return navigator.userLangua...
Use includes to make code simplier
Use includes to make code simplier
JavaScript
mit
stefalda/react-localization
b44c58ba61808077ae22d1e4e3030d0aeb84c97a
face-read.js
face-read.js
'use strict'; var fs = require('fs'); /* * read *.<type> files at given `path', * return array of files and their * textual content */ exports.read = function (path, type, callback) { var textFiles = {}; var regex = new RegExp("\\." + type); fs.readdir(path, function (error, files) { if (err...
'use strict'; var fs = require('fs'); /* * read *.<type> files at given `path', * return array of files and their * textual content */ exports.read = function (path, type, callback) { var textFiles = {}; var regex = new RegExp("\\." + type); var typeLen = (type.length * -1) -1; fs.readdir(path, ...
Split up assignment logic and add elucidating comment
Split up assignment logic and add elucidating comment This is the first in a line of commit intended to make this module more useable
JavaScript
mit
jm-janzen/EC2-facer,jm-janzen/EC2-facer,jm-janzen/EC2-facer
db859ac95909fe575ffeab45892c67b4f910f6c4
config/_constant.js
config/_constant.js
/** * @author {{{author}}} * @since {{{date}}} */ (function () { 'use strict'; angular .module({{{moduleName}}}) .constant({{{elementName}}}, // Add your values here ); }); })();
/** * @author {{{author}}} * @since {{{date}}} */ (function () { 'use strict'; angular .module('{{{moduleName}}}') .constant('{{{elementName}}}', // Add your values here ); }); })();
Add missing quotes to template
Add missing quotes to template
JavaScript
mit
natete/angular-file-templates,natete/angular-file-templates
edc62580aaa114c7b87938a2e275acdef3562981
tests/js/index.js
tests/js/index.js
/*global mocha, mochaPhantomJS, sinon:true, window */ 'use strict'; var $ = require('jquery'), chai = require('chai'), sinon = require('sinon'), sinonChai = require('sinon-chai'), toggles; // Expose jQuery globals window.$ = window.jQuery = $; toggles = require('../../libs/jquery-toggles/toggles.min'...
/*global mocha, mochaPhantomJS, sinon:true, window */ 'use strict'; var $ = require('jquery'), chai = require('chai'), sinon = require('sinon'), sinonChai = require('sinon-chai'), toggles; // Expose jQuery globals window.$ = window.jQuery = $; toggles = require('../../libs/jquery-toggles/toggles.min'...
Fix merge conflict in js tests
Fix merge conflict in js tests
JavaScript
mit
jadu/pulsar,jadu/pulsar,jadu/pulsar
12cfd7069c6513186bffdc073c1fd5264d077754
app/js/arethusa.core/conf_url.js
app/js/arethusa.core/conf_url.js
'use strict'; // Handles params concerning configuration files in the $routeProvider phase angular.module('arethusa.core').factory('confUrl', [ 'CONF_PATH', '$route', function (CONF_PATH, $route) { return function (useDefault) { var params = $route.current.params; var confPath = CONF_PATH + '/'; ...
'use strict'; // Handles params concerning configuration files in the $routeProvider phase angular.module('arethusa.core').factory('confUrl', [ 'CONF_PATH', '$route', function (CONF_PATH, $route) { // The default route is deprectated and can be refactored away return function (useDefault) { var para...
Add comment about future work in confUrl
Add comment about future work in confUrl
JavaScript
mit
Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa
1378fbb1df3684e9674a2fb9836d8516b624e7a4
grunt/css.js
grunt/css.js
module.exports = function(grunt) { //grunt-sass grunt.config('sass', { options: { outputStyle: 'expanded', imagePath: '../<%= config.image.dir %>' }, dist: { files: { '<%= config.css.dir %>/<%= config.css.file %>': '<%= config.scss....
module.exports = function(grunt) { //grunt-sass grunt.config('sass', { options: { outputStyle: 'expanded', //includePaths: ['<%= config.scss.includePaths %>'], imagePath: '../<%= config.image.dir %>' }, dist: { files: { '...
Add commented includePaths parameters for grunt-sass in case of Foundation usage
Add commented includePaths parameters for grunt-sass in case of Foundation usage
JavaScript
mit
SnceGroup/grunt-config-for-websites,SnceGroup/grunt-config-for-websites
79ddea43a8e7217f974dc183e4f9bdb6732d2d11
controllers/users/collection.js
controllers/users/collection.js
module.exports = (function(){ // GET /users/:id/media?lat=<LAT>&lng=<LNG>&time=<TIME> return function* collection(id) { // Twitter Requests var TwitterManager = require('../media/twitter'); var twitterGranuals = yield TwitterManager.search(this.request.url) var InstagramManager = require('../media/instagra...
module.exports = (function(){ // GET /users/:id/media?lat=<LAT>&lng=<LNG>&time=<TIME> return function* collection(id) { // Twitter Requests var twitterDef = require('q').defer() var TwitterManager = require('../media/twitter'); var twitterGranuals = twitterDef.promise.then(TwitterManager.search); //...
Refactor the twitter manager search methods with promises.
Refactor the twitter manager search methods with promises.
JavaScript
mit
capsul/capsul-api
3dd759f1b7756e34f94a66ae361c44c6a2781c8d
client/js/directives/give-focus-directive.js
client/js/directives/give-focus-directive.js
"use strict"; angular.module("hikeio"). directive("giveFocus", function() { return { link: function(scope, element, attributes) { scope.$watch(attributes.giveFocus, function(value) { if (value) { setTimeout(function() { element.focus(); }); } }); } }; });
"use strict"; angular.module("hikeio"). directive("giveFocus", ["$timeout", function($timeout) { return { link: function(scope, element, attributes) { scope.$watch(attributes.giveFocus, function(value) { if (value) { $timeout(function() { element.focus(); }); } }); } }; }]);
Use angular timeout directive instead of setTimeout.
Use angular timeout directive instead of setTimeout.
JavaScript
mit
zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io
13b62a9096c0e81efeaabfe7f603051a246fd22d
tasks/defaults.js
tasks/defaults.js
/******************************* Default Paths *******************************/ module.exports = { base : '', theme : './src/theme.config', docs : { source : '../docs/server/files/release/', output : '../docs/release/' }, // files cleaned after install setupFiles: [ './src/theme....
/******************************* Default Paths *******************************/ module.exports = { base : '', theme : './src/theme.config', docs : { source : '../docs/server/files/release/', output : '../docs/release/' }, // files cleaned after install setupFiles: [ './src/theme....
Fix regexp for theme changes
Fix regexp for theme changes
JavaScript
mit
lucienevans/Semantic-UI,avorio/Semantic-UI,Dineshs91/Semantic-UI,CapeSepias/Semantic-UI,bradbird1990/Semantic-UI,techpool/Semantic-UI,vibhatha/Semantic-UI,dhj2020/Semantic-UI,Keystion/Semantic-UI,nik4152/Semantic-UI,raoenhui/Semantic-UI-DIV,zcodes/Semantic-UI,CapsuleHealth/Semantic-UI,davialexandre/Semantic-UI,86yankai...
63875316d9df4983c477600dac427f1bed899ae2
common/app/Router/redux/add-lang-enhancer.js
common/app/Router/redux/add-lang-enhancer.js
import { langSelector } from './'; // This enhancers sole purpose is to add the lang prop to route actions so that // they do not need to be explicitally added when using a RFR route action. export default function addLangToRouteEnhancer(routesMap) { return createStore => (...args) => { const store = createStore...
import { langSelector } from './'; // This enhancers sole purpose is to add the lang prop to route actions so that // they do not need to be explicitly added when using a RFR route action. export default function addLangToRouteEnhancer(routesMap) { return createStore => (...args) => { const store = createStore(....
Add lang to payload if payload doesn't exist
fix(Router): Add lang to payload if payload doesn't exist closes #16134
JavaScript
bsd-3-clause
MiloATH/FreeCodeCamp,HKuz/FreeCodeCamp,Munsterberg/freecodecamp,jonathanihm/freeCodeCamp,FreeCodeCampQuito/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,no-stack-dub-sack/freeCodeCamp,matthew-t-smith/freeCodeCamp,FreeCodeCamp/FreeCodeCamp,raisedadead/FreeCodeCamp,BerkeleyTrue/FreeCodeCamp,raisedadead/FreeCodeCamp,otavioarc/f...
1b36979ac15068f7072fb1cc4d36318fdc805a44
test/view.sendmessage.js
test/view.sendmessage.js
'use strict'; var express = require('express'); var supertest = require('supertest'); var logger = require('log4js').getLogger('Unit-Test'); var nconf = require('nconf'); nconf.argv() .env() .file({ file: 'config.json' }); var request = supertest(app); exports['Check view health'] = function(test){ request.g...
'use strict'; var express = require('express'); var supertest = require('supertest'); var logger = require('log4js').getLogger('Unit-Test'); var nconf = require('nconf'); nconf.argv() .env() .file({ file: 'config.json' }); var request = supertest(app); exports['Check view health'] = function(test){ request.g...
Fix the url of message
Fix the url of message
JavaScript
apache-2.0
dollars0427/ATMessager,dollars0427/ATMessager
7ec505fba9972b109a3aea2e70c103f5b8c09286
src/browser-runner/platform-dummy/sagas/server-command-handlers.js
src/browser-runner/platform-dummy/sagas/server-command-handlers.js
/* Copyright 2016 Mozilla 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 in writing, software distributed u...
/* Copyright 2016 Mozilla 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 in writing, software distributed u...
Use logger module instead of console for the dummy browser runner sagas
Use logger module instead of console for the dummy browser runner sagas Signed-off-by: Victor Porof <4f672cb979ca45495d0cccc37abaefc8713fcc24@gmail.com>
JavaScript
apache-2.0
victorporof/tofino,victorporof/tofino
1c4c3c036aa2d88db4d1c078d009eb2d0875b136
packages/babel-preset-expo/index.js
packages/babel-preset-expo/index.js
module.exports = function() { return { presets: ['module:metro-react-native-babel-preset'], plugins: [ [ 'babel-plugin-module-resolver', { alias: { 'react-native-vector-icons': '@expo/vector-icons', }, }, ], ['@babel/plugin-proposal-dec...
module.exports = function(api) { const isWeb = api.caller(isTargetWeb); return { presets: ['module:metro-react-native-babel-preset'], plugins: [ [ 'babel-plugin-module-resolver', { alias: { 'react-native-vector-icons': '@expo/vector-icons', }, }...
Update preset to be able to detect if it's run from Webpack's babel-loader
[babel] Update preset to be able to detect if it's run from Webpack's babel-loader
JavaScript
bsd-3-clause
exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponen...
8acde49dee699c4055d930eb4bfb9916e884026f
app/events/model.js
app/events/model.js
var mongoose = require('mongoose'); var schema = require('validate'); var Event = mongoose.model('Event', { name: String, start: Date, end: Date, group: String, notify: Boolean }); var validate = function (event) { var test = schema({ name: { type: 'string', required: true, message: ...
var mongoose = require('mongoose'); var schema = require('validate'); var Event = mongoose.model('Event', { name: String, start: Date, end: Date, group: {type: String, enum: ['attendee', 'staff', 'admin'], default: 'attendee'}, notify: {type: Boolean, default: true} }); var validate = function (event) { v...
Fix validation issue on events
Fix validation issue on events
JavaScript
mit
hacksu/kenthackenough,hacksu/kenthackenough
db599cb4fdaa27d68a45f0d5198d2e8a6a70201b
server/auth/local/passport.js
server/auth/local/passport.js
'use strict'; import passport from 'passport'; import {Strategy as LocalStrategy} from 'passport-local'; function localAuthenticate(User, email, password, done) { User.findOneAsync({ email: email.toLowerCase() }) .then(user => { if (!user) { return done(null, false, { message: 'Thi...
'use strict'; import passport from 'passport'; import {Strategy as LocalStrategy} from 'passport-local'; function localAuthenticate(User, email, password, done) { User.findOne({ email: email.toLowerCase() }) .then(user => { if (!user) { return done(null, false, { message: 'This ema...
Remove async from mongosoe query
Remove async from mongosoe query
JavaScript
mit
Klemensas/ffempire,Klemensas/ffempire
a6e68f4688fa2f527b118f175d46e1dadba27472
server/publications/groups.js
server/publications/groups.js
Meteor.publish('allGroups', function () { return Groups.find(); });
Meteor.publish('allGroups', function () { // Publish all groups return Groups.find(); }); Meteor.publish('singleGroup', function (groupId) { // Publish only one group, specified as groupId return Groups.find(groupId); });
Add singleGroup publication, clarifying comments
Add singleGroup publication, clarifying comments
JavaScript
agpl-3.0
GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing
5cd96c419d81f5365121064bfb8a0762c3004984
test/libraries.js
test/libraries.js
var fs = require('fs'), Libraries = require('../lib/libraries'), should = require('should'); describe('Libraries', function() { describe('#bowerLibraries', function() { var readdirSync = fs.readdirSync, statSync = fs.statSync, context = { event: {emit: function() {}} };...
var fs = require('fs'), Libraries = require('../lib/libraries'), should = require('should'); describe('Libraries', function() { describe('#bowerLibraries', function() { beforeEach(function() { require('bower').config.directory = 'bower_components'; }); var readdirSync = fs.readdirSync, ...
Fix bower config value for tests
Fix bower config value for tests
JavaScript
mit
walmartlabs/lumbar
30caeb00644a2f7e3740b49b39790f96a796bee5
test/init.js
test/init.js
require('ts-node').register({ fast: true, compilerOptions: { target: 'es2015', } }) require('source-map-support/register') require('jsdom-global/register') require('raf').polyfill(global) const enzyme = require('enzyme') const chai = require('chai') const chaiEnzyme = require('chai-enzyme') const sinonChai = require(...
require('ts-node').register({ fast: true, compilerOptions: { target: 'es2015' } }) require('source-map-support').install({ hookRequire: true }) require('jsdom-global/register') require('raf').polyfill(global) const enzyme = require('enzyme') const chai = require('chai') const chaiEnzyme = require('chai-enzyme') const ...
Fix testcase source maps and hide console.warn messages
Fix testcase source maps and hide console.warn messages
JavaScript
mit
brightinteractive/bright-js-framework,brightinteractive/bright-js-framework,brightinteractive/bright-js-framework
4718270e280fb258aacf942ed6d33cb3e6c39ae3
test/select-test.js
test/select-test.js
var chai = require('chai'), expect = chai.expect, sql = require('../psql'); describe('select', function() { it('should generate a select statement with an asterisk with no arguments', function() { expect(sql.select().from('users').toQuery().text).to.equal('select * from users'); }); it('should gener...
var chai = require('chai'), expect = chai.expect, sql = require('../psql'); describe('select', function() { it('should generate a select statement with an asterisk with no arguments', function() { expect(sql.select().from('users').toQuery().text).to.equal('select * from users'); }); it('should gener...
Add select test for json columns
Add select test for json columns
JavaScript
mit
swlkr/psqljs
0e16b3547b7134e032885053ddac97cb85cb7ee2
tests/karma.conf.js
tests/karma.conf.js
var path = require('path'); var webpack = require('./webpack.config'); process.env.CHROME_BIN = require('puppeteer').executablePath(); module.exports = function (config) { config.set({ basePath: '.', frameworks: ['mocha'], reporters: ['mocha'], client: { captureConsole: true, mocha: { ...
var path = require('path'); var webpack = require('./webpack.config'); process.env.CHROME_BIN = require('puppeteer').executablePath(); module.exports = function (config) { config.set({ basePath: '.', frameworks: ['mocha'], reporters: ['mocha'], client: { captureConsole: true, }, files:...
Decrease high timeout in ci
Decrease high timeout in ci
JavaScript
bsd-3-clause
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
ce1c01c9c1802296c4ff319f71a60a079b758cbb
examples/dir/counter/index.js
examples/dir/counter/index.js
import { app, html } from "flea" const model = 0 const view = (model, dispatch) => html` <div> <h1>${model}</h1> <button onclick=${_ => dispatch("INCREMENT")}>+</button> <button onclick=${_ => dispatch("DECREMENT")}>-</button> </div>` const update = { INCREMENT: model => model + 2...
import { app, html } from "flea" const model = 0 const view = (model, dispatch) => html` <div> <button onclick=${_ => dispatch("INCREMENT")}>+</button> <p>${model}</p> <button onclick=${_ => dispatch("DECREMENT")} disabled=${model <= 0}>-</button> </div>` const update = { INCREMEN...
Increment by one. Show how to use disabled attribute with boolean var.
Increment by one. Show how to use disabled attribute with boolean var.
JavaScript
mit
Mytrill/hyperapp,tzellman/hyperapp,Mytrill/hyperapp
7d1c8097ef9ead4935f94e7f69dcbe5e8e5f2330
test/spec/json.js
test/spec/json.js
'use strict'; var JsonExtension = require('../../src/json'); var expect = require('chai').expect; describe('JsonExtension', function () { var ext; beforeEach(function() { ext = new JsonExtension(); }); describe('extension applicability', function() { it('should apply when application/json content t...
'use strict'; var JsonExtension = require('../../src/json'); var expect = require('chai').expect; describe('JsonExtension', function () { var ext; beforeEach(function() { ext = new JsonExtension(); }); describe('extension applicability', function() { it('should apply when application/json content t...
Test JSON extension deoes not apply for 204 status responses.
Test JSON extension deoes not apply for 204 status responses.
JavaScript
mit
petejohanson/hy-res
6a25939169dde7cb31093f3ebf7298a658ed0ab4
lib/repl.js
lib/repl.js
const {VM} = require('vm2') const exec = require('child_process').exec module.exports = { js: code => { const vm = new VM() try { return vm.run(code).toString() } catch (e) { return e.toString(); } }, rb: code => { return new Promise((resolve, reject) => { const unsafe = new...
const {VM} = require('vm2') const exec = require('child_process').exec module.exports = { js: code => { const vm = new VM() try { return vm.run(code).toString() } catch (e) { return e.toString(); } }, rb: code => { return new Promise((resolve, reject) => { const unsafe = new...
Add more keywords to ruby sandbox
Add more keywords to ruby sandbox
JavaScript
mit
josephrexme/sia
4b37bc34f49b3cdc59b2960dd97b4083995f72a4
webpack.config.js
webpack.config.js
const HtmlWebPackPlugin = require("html-webpack-plugin") module.exports = { entry: { main: __dirname + "/src/DragRange.jsx", viewer: __dirname + "/src/index.js", }, output: { filename: "[name].js", path: __dirname + "/dist", }, devtool: "source-map", module: { rules: [ { ...
const HtmlWebPackPlugin = require("html-webpack-plugin") module.exports = { entry: { main: __dirname + "/src/DragRange.jsx", viewer: __dirname + "/src/index.js", }, output: { filename: "[name].js", path: __dirname + "/dist", }, devtool: "source-map", module: { rules: [ { ...
Use relative path for html plugin
Use relative path for html plugin
JavaScript
mit
Radivarig/react-drag-range,Radivarig/react-drag-range
a49d464a2ba55c3d0c3600f14c85f8c003c785cd
webpack.config.js
webpack.config.js
const path = require("path") const PATHS = { app: path.join(__dirname, 'src/index.tsx'), } module.exports = { entry: { app: PATHS.app, }, output: { path: __dirname + '/dist', filename: 'bundle.js', publicPath: "http://localhost:8080/" }, mode: 'development', module: { rules: [ ...
const path = require("path") const PATHS = { app: path.join(__dirname, 'src/index.tsx'), } module.exports = { entry: { app: PATHS.app, }, output: { path: __dirname + '/dist', filename: 'bundle.js', publicPath: "http://localhost:8080/" }, mode: 'development', module: { rules: [ ...
Add .ts files to loader
Add .ts files to loader
JavaScript
mit
looker-open-source/extension-template-react,looker-open-source/extension-template-react
f011989558edaea5df62e28155cd904942ed743f
webpack.config.js
webpack.config.js
var path = require('path'); var webpack = require('webpack'); module.exports = { entry: [ path.resolve(__dirname, "src", "r3test.js"), "webpack/hot/dev-server", "webpack-dev-server/client?http://localhost:8081" ], output: { path: path.resolve(__dirname, "scripts"), publicPath: "/scripts/", ...
var path = require('path'); var webpack = require('webpack'); module.exports = { entry: [ path.resolve(__dirname, "src", "r3test.js"), "webpack/hot/dev-server", "webpack-dev-server/client?http://localhost:8081" ], output: { path: path.resolve(__dirname, "scripts"), publicPath: "/scripts/", ...
Switch to new babel/react-transform build pipeline
Switch to new babel/react-transform build pipeline
JavaScript
apache-2.0
Izzimach/r3test,Izzimach/r3test
0fb79bc1c55db7e13eb4ce987256b87f751d3d01
src/index.js
src/index.js
require('core-js'); // es2015 polyfill var path = require('path'); var plopBase = require('./modules/plop-base'); var generatorRunner = require('./modules/generator-runner'); /** * Main node-plop module * * @param {string} plopfilePath - The absolute path to the plopfile we are interested in working with * @return...
require('core-js'); // es2015 polyfill var path = require('path'); var plopBase = require('./modules/plop-base'); var generatorRunner = require('./modules/generator-runner'); /** * Main node-plop module * * @param {string} plopfilePath - The absolute path to the plopfile we are interested in working with * @return...
Make plop file optional, and expose plop.setGenerator() function to allow dynamic creation of generator configs.
Make plop file optional, and expose plop.setGenerator() function to allow dynamic creation of generator configs.
JavaScript
mit
amwmedia/node-plop,amwmedia/node-plop,amwmedia/node-plop
ebbffa2dde972b267f70677adc60a21c89c07b8e
src/index.js
src/index.js
import React from 'react' import { render } from 'react-dom' import './index.css' import '../semantic/dist/semantic.min.css'; import Exame from './Exame.js' import Result from './Result.js' import { Route, BrowserRouter } from 'react-router-dom' let TO_ANSWER_GROUPS = require('.//GROUP_DEFINITION.json') render( <Br...
import React from 'react' import { render } from 'react-dom' import './index.css' import '../semantic/dist/semantic.min.css'; import Exame from './Exame.js' import Result from './Result.js' import { Route, HashRouter } from 'react-router-dom' let TO_ANSWER_GROUPS = require('.//GROUP_DEFINITION.json') render( <HashR...
Use HashRouter for fix gh-page routing.
Use HashRouter for fix gh-page routing.
JavaScript
mit
wallat/little-test,wallat/little-test
bc24c5e0a2abc2f89c98f66ea19b632d3248c64b
frontend/app/components/bar-graph.js
frontend/app/components/bar-graph.js
import Ember from 'ember'; export default Ember.Component.extend({ didInsertElement() { Chart.defaults.global.responsive = true; Chart.defaults.global.legend.display =false }, didRender() { let data = this.get('data'); let toGraph = { labels: [], ...
import Ember from 'ember'; export default Ember.Component.extend({ didInsertElement() { Chart.defaults.global.responsive = true; Chart.defaults.global.legend.display =false }, didRender() { let data = this.get('data'); let toGraph = { labels: [], ...
Remove console logging from figuring out graphjs.
Remove console logging from figuring out graphjs.
JavaScript
mit
ThreeDRadio/playlists,ThreeDRadio/playlists,ThreeDRadio/playlists
d5e55241a66d37f45b0404be3d4e1d0f85715573
src/store.js
src/store.js
/** @babel */ import { applyMiddleware, createStore } from 'redux' import createLogger from 'redux-logger' import createSagaMiddleware from 'redux-saga' import reducers, { initialState } from './reducers' import rootSaga from './sagas' import { isAtomInDebugMode } from './debug' const saga = createSagaMiddleware() le...
/** @babel */ import { applyMiddleware, createStore } from 'redux' import createLogger from 'redux-logger' import createSagaMiddleware from 'redux-saga' import reducers, { initialState } from './reducers' import rootSaga from './sagas' import { isAtomInDebugMode } from './debug' const saga = createSagaMiddleware() le...
Use loggin on debug mode
Improve(debug): Use loggin on debug mode
JavaScript
mit
sanack/atom-jq
d8fff58a630c053f4a5706a7022ab2f3589200f6
app/routes.js
app/routes.js
var express = require('express'); var router = express.Router(); var TaxonPresenter = require('./presenters/taxon-presenter.js'); router.get('/', function (req, res) { res.render('index'); }); router.get('/tabbed/:taxonSlug', function (req, res) { var presenter = new TaxonPresenter(req, 'all'); res.render(pres...
var express = require('express'); var router = express.Router(); var TaxonPresenter = require('./presenters/taxon-presenter.js'); router.get('/', function (req, res) { res.render('index'); }); router.get('/tabbed/:taxonSlug', function (req, res) { var presenter = new TaxonPresenter(req, 'all'); res.render(pres...
Fix item list length bug when rendering tabless design
Fix item list length bug when rendering tabless design
JavaScript
mit
alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype
825828d319b65a1027f18b42bac80c7d0a89869f
src/index.js
src/index.js
import React, { Component } from 'react' import PropTypes from 'prop-types' export const getContextualizer = (propTypes, targetProp) => { class ContextProps extends Component { getChildContext () { const props = Object.keys(this.props).reduce((x, key) => { if (key !== 'children') { x[key]...
import React, { Component } from 'react' import PropTypes from 'prop-types' export const getContextualizer = (propTypes, targetProp) => { class ContextProps extends Component { getChildContext () { const props = Object.keys(this.props).reduce((x, key) => { if (key !== 'children') { x[key]...
Update displayName of wrapped component to include HoC name
Update displayName of wrapped component to include HoC name
JavaScript
unlicense
xaviervia/react-context-props,xaviervia/react-context-props
987768c4c78761ed5b827131f10b4a9d6e79fc12
src/index.js
src/index.js
const { createLogger, LEVELS: { INFO } } = require('./loggers') const logFunctionConsole = require('./loggers/console') const Cluster = require('./cluster') const createProducer = require('./producer') const createConsumer = require('./consumer') module.exports = class Client { constructor({ brokers, ssl, ...
const { createLogger, LEVELS: { INFO } } = require('./loggers') const logFunctionConsole = require('./loggers/console') const Cluster = require('./cluster') const createProducer = require('./producer') const createConsumer = require('./consumer') module.exports = class Client { constructor({ brokers, ssl, ...
Create different instances of the cluster for producers and consumers
Create different instances of the cluster for producers and consumers
JavaScript
mit
tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs
d6a2545ab672c59f66b13570a7d809483cd7e78e
src/index.js
src/index.js
/** * Returns a very important number. * * @returns {number} - The number. */ export default function theDefaultExport() { return 40; } /** * Value that can be incremented. * * @type {number} */ export let value = 0; /** * Increments the value by one. */ export function incrementValue() { value++; } /*...
/** * Returns a very important number. * * @returns {number} - The number. */ export default function theDefaultExport() { return 42; } /** * Value that can be incremented. * * @type {number} */ export let value = 0; /** * Increments the value by one. */ export function incrementValue() { value++; } /*...
Revert "test: make test fail"
Revert "test: make test fail" This reverts commit 6e23d7e72ae9379a18b756d609985065a840b3d7.
JavaScript
mit
cheminfo-js/test
ab9f0b13f4a8e07d4e255a856fcc2ae2c0e4a456
src/index.js
src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; // Create a new component to produce some html const App = function () { // const means that this is the final value. Here we are making a component. return <div>Hello!</div>; // This is JSX, which gets transpiled to javascript. ...
import React from 'react'; import ReactDOM from 'react-dom'; // Create a new component to produce some html const App = () => { // const means that this is the final value. Here we are making a component. return <div>Hello!</div>; // This is JSX, which gets transpiled to javascript. // ...
Use ES6 syntax fat arrow instead of using 'function'
Use ES6 syntax fat arrow instead of using 'function'
JavaScript
mit
phirefly/react-redux-starter,phirefly/react-redux-starter
d86544c4df922080939dc057f7b682298b13a6d6
src/index.js
src/index.js
import h from 'snabbdom/h' import extend from 'extend' const sanitizeProps = (props) => { props = props === null ? {} : props Object.keys(props).map((prop) => { const keysRiver = prop.split('-').reverse() if(keysRiver.length > 1) { let newObject = keysRiver.reduce( (object, key) => ({ [ke...
import h from 'snabbdom/h' import extend from 'extend' const sanitizeProps = (props) => { props = props === null ? {} : props Object.keys(props).map((prop) => { const keysRiver = prop.split('-').reverse() if(keysRiver.length > 1) { let newObject = keysRiver.reduce( (object, key) => ({ [ke...
Add component as function support
Add component as function support
JavaScript
mit
Swizz/snabbdom-pragma
069158e6356e3a58a8c41191a5d00f2afeac0bba
src/index.js
src/index.js
import { createFilter } from 'rollup-pluginutils'; import { resolve as resolveSourceMap } from 'source-map-resolve'; import { readFile } from 'fs'; export default function sourcemaps({ include, exclude } = {}) { const filter = createFilter(include, exclude); return { name: 'sourcemaps', load(id) { ...
import { createFilter } from 'rollup-pluginutils'; import { resolve as resolveSourceMap } from 'source-map-resolve'; import * as fs from 'fs'; export default function sourcemaps({ include, exclude, readFile = fs.readFile } = {}) { const filter = createFilter(include, exclude); return { name: 'sourcemaps', ...
Add the ability to override the readFile function
Add the ability to override the readFile function
JavaScript
mit
maxdavidson/rollup-plugin-sourcemaps,maxdavidson/rollup-plugin-sourcemaps