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
11e47eb87016b2ca09591bf3b37920ad2b672b63
test/core/list_metadata_parser.js
test/core/list_metadata_parser.js
require('../initialize-globals').load(); var listMetadataParser = require('../../lib/core/list_metadata_parser'); describe('# list_metadata_parser', function() { describe("##createListMetadatasOptions", function() { it('GET', function() { var meta = { top: 10, skip: 23, sortFieldName...
require('../initialize-globals').load(); var listMetadataParser = require('../../lib/core/list_metadata_parser'); describe('# list_metadata_parser', function() { describe("##createListMetadatasOptions", function() { it('GET', function() { var meta = { top: 10, skip: 23, sortFieldName...
Update the test on the list metadata parser..
[test] Update the test on the list metadata parser..
JavaScript
mit
Jerom138/focus,KleeGroup/focus-core,Jerom138/focus,Jerom138/focus
b64369b91ee8415c934250674fb4c5e5d39c3617
lib/basic-auth-parser.js
lib/basic-auth-parser.js
module.exports = function parse(auth) { var result = {}, parts, decoded, credentials; parts = auth.split(' '); result.scheme = parts[0]; if (result.scheme !== 'Basic') { return result; } decoded = new Buffer(parts[1], 'base64').toString('utf8'); credentials = decoded && decoded.spli...
module.exports = function parse(auth) { if (!auth || typeof auth !== 'string') { throw new Error('No or wrong argument'); } var result = {}, parts, decoded, credentials; parts = auth.split(' '); result.scheme = parts[0]; if (result.scheme !== 'Basic') { return result; } decoded ...
Throw an error if no or wrong argument is provided
[api] Throw an error if no or wrong argument is provided Fixes #1.
JavaScript
mit
mmalecki/basic-auth-parser
4dd519ee8697a699b79d3f7dbaae29c2dc4b6b84
tasks/options/autoprefixer.js
tasks/options/autoprefixer.js
module.exports = { options: { // Options we might want to enable in the future. diff: false, map: false }, multiple_files: { // Prefix all CSS files found in `src/static/css` and overwrite. expand: true, src: 'demo/static/css/main.css' }, };
module.exports = { options: { // Options we might want to enable in the future. diff: false, map: false }, main: { // Prefix all properties found in `main.css` and overwrite. expand: true, src: 'demo/static/css/main.css' }, };
Fix Autoprefixer target name and comment
Fix Autoprefixer target name and comment
JavaScript
cc0-1.0
cfpb/cf-grunt-config,ascott1/cf-grunt-config,Scotchester/cf-grunt-config
c0102233fb7528891569113e73d7af9f33a07b7c
modules/messages/validator.js
modules/messages/validator.js
var Promise = require('bluebird'), mongoose = Promise.promisifyAll(require('mongoose')), Message = mongoose.model('Message'), UserUtils = require('utils/users'), MessageUtils = require('utils/messages'), GroupMessage = mongoose.model('GroupMessage'); module.exports = { one : One, get : Get, ...
var Promise = require('bluebird'), mongoose = Promise.promisifyAll(require('mongoose')), Message = mongoose.model('Message'), UserUtils = require('utils/users'), MessageUtils = require('utils/messages'), GroupMessage = mongoose.model('GroupMessage'); module.exports = { one : One, get : Get, ...
Check from/to for validating message ownership
Check from/to for validating message ownership
JavaScript
mit
Pranay92/lets-chat,Pranay92/collaborate
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
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
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
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
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
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
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
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
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
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
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
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
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
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...
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
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
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
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
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
358d2a9b5d2959031fa685045a9f1a07f2d27c78
client.src/shared/views/gistbook-view/views/text/edit/index.js
client.src/shared/views/gistbook-view/views/text/edit/index.js
// // textEditView // Modify text based on a textarea // import ItemView from 'base/item-view'; export default ItemView.extend({ template: 'editTextView', tagName: 'textarea', className: 'gistbook-textarea', // Get the value of the element value() { return this.el.value; } });
// // textEditView // Modify text based on a textarea // import ItemView from 'base/item-view'; export default ItemView.extend({ template: 'editTextView', tagName: 'textarea', className: 'gistbook-textarea', // Get the value of the element, // stripping line breaks from the // start and end value() {...
Remove new lines from text areas on save.
Remove new lines from text areas on save. Resolves #390
JavaScript
mit
jmeas/gistbook,joshbedo/gistbook
5aa339bb60364eb0c43690c907cc391788811a24
src/index.js
src/index.js
/* eslint-disable no-console */ import { createFilter } from 'rollup-pluginutils'; import { resolveSourceMap } from 'source-map-resolve'; import { readFile } from 'fs'; import { promisify } from './utils'; const readFileAsync = promisify(readFile); const resolveSourceMapAsync = promisify(resolveSourceMap); export def...
/* eslint-disable no-console */ import { createFilter } from 'rollup-pluginutils'; import { resolve } from 'source-map-resolve'; import { readFile } from 'fs'; import { promisify } from './utils'; const readFileAsync = promisify(readFile); const resolveSourceMapAsync = promisify(resolve); export default function sour...
Include sourcesContent in source map
Include sourcesContent in source map
JavaScript
mit
maxdavidson/rollup-plugin-sourcemaps,maxdavidson/rollup-plugin-sourcemaps
fbd3bd5365b8dd1b6f4773e22f7b94fe4126acfa
src/index.js
src/index.js
import React from 'react'; import { render } from 'react-dom'; import { Provider } from "react-redux"; import { createStore, applyMiddleware } from "redux"; import thunk from "redux-thunk"; import App from "./containers/App"; import rootReducer from "./reducers"; import { getTodosIfNeeded } from "./actions"; const cre...
import React from 'react'; import { render } from 'react-dom'; import { Provider } from "react-redux"; import { createStore, applyMiddleware } from "redux"; import thunk from "redux-thunk"; import injectTapEventPlugin from "react-tap-event-plugin"; import App from "./containers/App"; import rootReducer from "./reducers...
Add react tap event plugin
Add react tap event plugin
JavaScript
mit
alice02/go-todoapi,alice02/go-todoapi,alice02/go-todoapi
1481d1905b237c768d45335cc431d567f5676d87
src/index.js
src/index.js
//Get the required shit together const config = require("./config.json"); const Discord = require("discord.js"); const client = new Discord.Client(); const MSS = require("./functions/"); const fs = require("fs"); var command = []; //Login to Discord client.login(config.API.discord); //Include all files in the command...
//Get the required shit together const config = require("./config.json"); const Discord = require("discord.js"); const client = new Discord.Client(); const MSS = require("./functions/"); const fs = require("fs"); var command = []; //Login to Discord client.login(config.API.discord); //Include all files in the command...
Include from the functions directory
Include from the functions directory
JavaScript
mit
moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord
25e28e9795aee56e9d7acdb09b362c30ee7dad15
src/index.js
src/index.js
define([ "text!src/templates/command.html" ], function(commandTemplate) { var commands = codebox.require("core/commands"); var dialogs = codebox.require("utils/dialogs"); commands.register({ id: "palette.open", title: "Open Command Palette", shortcuts: [ "mod+shift+p...
define([ "text!src/templates/command.html" ], function(commandTemplate) { var commands = codebox.require("core/commands"); var dialogs = codebox.require("utils/dialogs"); commands.register({ id: "palette.open", title: "Command Palette: Open", shortcuts: [ "mod+shift+...
Change command title and hide from palette
Change command title and hide from palette
JavaScript
apache-2.0
etopian/codebox-package-command-palette,CodeboxIDE/package-command-palette,CodeboxIDE/package-command-palette,etopian/codebox-package-command-palette
453d61337dda06c15130b9783b39ce0e58979c86
src/index.js
src/index.js
import React from "react"; import { render } from "react-dom"; import Root from "./Root"; render( React.createElement(Root), document.getElementById("root") );
import React from "react"; import { render } from "react-dom"; import "./index.css"; import Root from "./Root"; render( React.createElement(Root), document.getElementById("root") );
Fix missing root css import
Fix missing root css import
JavaScript
apache-2.0
nwsapps/flashcards,nwsapps/flashcards
6f8019e821d94975cfab7e62c1557af4254be72e
src/index.js
src/index.js
import React from 'react' import { render } from 'react-dom' import createStore from './createStore' const store = createStore() render( <h1>Hello from React</h1>, document.getElementById('react') )
import React from 'react' import { render } from 'react-dom' import createStore from './createStore' import App from './components/App' const store = createStore() render( <App />, document.getElementById('react') )
Use App component in render
Use App component in render
JavaScript
mit
epicsharp/react-boilerplate,epicsharp/react-boilerplate,RSS-Dev/live-html,RSS-Dev/live-html
61c69d309ad8d80812b3467697ef52ead021249a
src/utils.js
src/utils.js
import pf from 'portfinder'; export function homedir() { return process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME']; } export function wait (time) { return new Promise(resolve => { setTimeout(() => resolve(), time); }); } export function getPort () { return new Promise((resolve, rejec...
import fs from 'fs'; import pf from 'portfinder'; export function homedir() { return process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME']; } export function wait (time) { return new Promise(resolve => { setTimeout(() => resolve(), time); }); } export function getPort () { return new Pr...
Fix getPort and add readFile
Fix getPort and add readFile getPort was considering bind to 0.0.0.0 instead of 127.0.0.1. readFile added to provide a promise-based version of fs.readFile
JavaScript
mit
sqlectron/sqlectron-term
a2136a83a4c7eeb988da2a2c1833fd16d4828632
extensions/roc-plugin-dredd/src/roc/index.js
extensions/roc-plugin-dredd/src/roc/index.js
import { lazyFunctionRequire } from 'roc'; import config from '../config/roc.config.js'; import meta from '../config/roc.config.meta.js'; const lazyRequire = lazyFunctionRequire(require); export default { config, meta, actions: [ { hook: 'server-started', description: 'Run...
import { lazyFunctionRequire } from 'roc'; import config from '../config/roc.config.js'; import meta from '../config/roc.config.meta.js'; const lazyRequire = lazyFunctionRequire(require); export default { config, meta, actions: [ { hook: 'server-started', description: 'Run...
Remove superflous settings option on dredd command
Remove superflous settings option on dredd command
JavaScript
mit
voldern/roc-plugin-dredd
83314d1d646ffa3ec5e668ecdc5ae0bbbabfaad8
app/scripts/collections/section.js
app/scripts/collections/section.js
define([ 'underscore', 'backbone', 'models/section', 'config' ], function (_, Backbone, Section, config) { 'use strict'; var SectionCollection = Backbone.Collection.extend({ model: Section, initialize: function(models, options) { if (options) { this.resume = options.resume; } this.fetc...
define([ 'underscore', 'backbone', 'models/section', 'config' ], function (_, Backbone, Section, config) { 'use strict'; var SectionCollection = Backbone.Collection.extend({ model: Section, initialize: function(models, options) { if (options) { this.resume = options.resume; } this.fetc...
Fix url to be not nested.
Fix url to be not nested.
JavaScript
mit
jmflannery/jackflannery.me,jmflannery/jackflannery.me,jmflannery/rez-backbone,jmflannery/rez-backbone
7b3f810e466248d77218a3d59bd674386ff9bd97
src/DB/Mongo.js
src/DB/Mongo.js
var path = require('path'); var fs = require('extfs'); var mongoose = require('mongoose'); import { AbstractDB } from './AbstractDB'; import { Core } from '../Core/Core'; export class Mongo extends AbstractDB { constructor(uri, options) { super(uri, options); } /** * Connect to mongodb * * @return...
var path = require('path'); var fs = require('extfs'); var mongoose = require('mongoose'); import { AbstractDB } from './AbstractDB'; import { Core } from '../Core/Core'; export class Mongo extends AbstractDB { constructor(uri, options) { super(uri, options); } /** * Connect to mongodb * * @return...
Fix a bug if mongoose path does not exist
Fix a bug if mongoose path does not exist
JavaScript
mit
marian2js/rode
3221f816bc32adee59d03fd9b5549507384f5b08
test/disk.js
test/disk.js
var Disk = require( '../' ) var BlockDevice = require( 'blockdevice' ) var assert = require( 'assert' ) const DISK_IMAGE = __dirname + '/data/bootcamp-osx-win.bin' describe( 'Disk', function( t ) { var device = null var disk = null it( 'init block device', function() { assert.doesNotThrow( function() ...
var Disk = require( '../' ) var BlockDevice = require( 'blockdevice' ) var assert = require( 'assert' ) ;[ 'apple-mac-osx-10.10.3.bin', 'bootcamp-osx-win.bin', 'usb-thumb-exfat.bin', 'usb-thumb-fat.bin' ].forEach( function( filename ) { const DISK_IMAGE = __dirname + '/data/' + filename describe( 'Di...
Update test: Run against all test images
Update test: Run against all test images
JavaScript
mit
jhermsmeier/node-disk
170248b70dfe6b4eb9eb476919c19fb98a2e88c8
examples/jquery/http-request.js
examples/jquery/http-request.js
// jQuery built with "grunt custom:-ajax/script,-ajax/jsonp,-css,-deprecated,-dimensions,-effects,-event,-event/alias,-offset,-wrap,-ready,-deferred,-exports/amd,-sizzle" // https://github.com/jquery/jquery#how-to-build-your-own-jquery var $ = require("./lib/jquery.min.js"); var MARGIN = 12; var page = tabris.create(...
// jQuery built with "grunt custom:-ajax/script,-ajax/jsonp,-css,-deprecated,-dimensions,-effects,-event,-event/alias,-offset,-wrap,-ready,-deferred,-exports/amd,-sizzle" // https://github.com/jquery/jquery#how-to-build-your-own-jquery var $ = require("./lib/jquery.min.js"); var MARGIN = 12; var page = tabris.create(...
Rename "Label" to "TextView" in jquery example
Rename "Label" to "TextView" in jquery example Done to reflect eclipsesource/tabris-js@ca0f105e82a2d27067c9674ecf71a93af2c7b7bd Change-Id: I1c267e0130809077c1339ba0395da1a7e1c6b281
JavaScript
bsd-3-clause
moham3d/tabris-js,mkostikov/tabris-js,mkostikov/tabris-js,softnep0531/tabrisjs,softnep0531/tabrisjs,pimaxdev/tabris,pimaxdev/tabris,eclipsesource/tabris-js,moham3d/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js
69914fdba918b1a8c38d9f8b08879d5d3d213132
test/trie.js
test/trie.js
var Trie = require('../app/trie'); describe('Trie', function() { var trie; beforeEach(function() { trie = new Trie(); }); it('should be an object', function() { expect(trie).to.be.ok; }); it('should have a root', function() { expect(trie.root).to.be.ok; }); it('should have add method', ...
var Trie = require('../app/trie'); describe('Trie', function() { var trie; beforeEach(function() { trie = new Trie(); }); it('should be an object', function() { expect(trie).to.be.ok; }); it('should have a root', function() { expect(trie.root).to.be.ok; }); it('should have add method', ...
Reword test for add string and find string
Reword test for add string and find string
JavaScript
mit
mgarbacz/nordrassil,mgarbacz/nordrassil
7749879e6c083bd9c5c4d5fc2244399c3cd5e861
releaf-core/app/assets/javascripts/releaf/include/store_settings.js
releaf-core/app/assets/javascripts/releaf/include/store_settings.js
jQuery(function(){ var body = jQuery('body'); var settings_path = body.data('settings-path'); body.on('settingssave', function( event, key_or_settings, value ) { if (!settings_path) { return; } var settings = key_or_settings; if (typeof settings === ...
jQuery(function(){ var body = jQuery('body'); var settings_path = body.data('settings-path'); body.on('settingssave', function( event, key_or_settings, value ) { if (!settings_path) { return; } var settings = key_or_settings; if (typeof settings === ...
Use vanilla-ujs LiteAjax for user settings sending
Use vanilla-ujs LiteAjax for user settings sending
JavaScript
mit
cubesystems/releaf,cubesystems/releaf,graudeejs/releaf,graudeejs/releaf,cubesystems/releaf,graudeejs/releaf
0fa905726bc545f6809aac20c7a3c8579dadb647
bin/collider-run.js
bin/collider-run.js
#!/usr/bin/env node 'use strict'; var pkg = require('../package.json') var cli = require('commander'); var fs = require('fs'); var path = require('path'); var spawn = require('child_process').spawn; cli .version( pkg.version ) .parse( process.argv ); var cwd = process.cwd(); var colliderFile = path.join( c...
#!/usr/bin/env node 'use strict'; var pkg = require('../package.json') var cli = require('commander'); var createError = require('../lib/createError'); var logErrorExit = require('../lib/logErrorExit'); var fs = require('fs'); var path = require('path'); var spawn = require('child_process').spawn; cli .vers...
Use creatError and logErrorExit to handle errors
Use creatError and logErrorExit to handle errors
JavaScript
mit
simonsinclair/collider-cli
4ccd6bf73b26f9910827bf5bd487bcd30e0b24c0
example/__tests__/example-test.js
example/__tests__/example-test.js
import path from 'path'; import webpack from 'webpack'; import config from '../webpack.config'; describe('example', () => { it('combines loader results into one object', () => new Promise(resolve => { webpack(config, (error, stats) => { const bundlePath = path.resolve( stats.compilation.c...
import path from 'path'; import webpack from 'webpack'; import config from '../webpack.config'; describe('example', () => { jest.setTimeout(10000); // 10 second timeout it('combines loader results into one object', () => new Promise(resolve => { webpack(config, (error, stats) => { const bundlePat...
Use a 10-second timeout for the Jest test
Use a 10-second timeout for the Jest test
JavaScript
mit
elliottsj/combine-loader
42e2cac9631969f51352f1c1d04cde129caa0dee
Resources/public/ol6-compat.js
Resources/public/ol6-compat.js
(function () { "use strict"; if (window.ol && ol.source && !ol.source.VectorEventType) { // HACK: monkey patch event types not present in current OL6 repackage build // @see https://github.com/openlayers/openlayers/blob/main/src/ol/source/VectorEventType.js ol.source.VectorEventType = { ...
(function () { "use strict"; if (window.ol && ol.source && !ol.source.VectorEventType) { // HACK: monkey patch event types not present in current OL6 repackage build // @see https://github.com/openlayers/openlayers/blob/main/src/ol/source/VectorEventType.js ol.source.VectorEventType = { ...
Fix "moveFeature" tool initialization errors
Fix "moveFeature" tool initialization errors
JavaScript
mit
mapbender/mapbender-digitizer,mapbender/mapbender-digitizer
83c53032c97e74bff2ba97f1a798ab28cad6f31d
shaders/chunks/normal-perturb.glsl.js
shaders/chunks/normal-perturb.glsl.js
module.exports = /* glsl */ ` #if !defined(USE_TANGENTS) && (defined(USE_NORMAL_MAP) || defined(USE_CLEAR_COAT_NORMAL_MAP)) //http://www.thetenthplanet.de/archives/1180 mat3 cotangentFrame(vec3 N, vec3 p, vec2 uv) { // get edge vectors of the pixel triangle vec3 dp1 = dFdx(p); vec3 dp2 = dFdy(p); ve...
module.exports = /* glsl */ ` #if !defined(USE_TANGENTS) && (defined(USE_NORMAL_MAP) || defined(USE_CLEAR_COAT_NORMAL_MAP)) //http://www.thetenthplanet.de/archives/1180 mat3 cotangentFrame(vec3 N, vec3 p, vec2 uv) { // get edge vectors of the pixel triangle highp vec3 dp1 = dFdx(p); highp vec3 dp2 = dFd...
Use highp for derivatives calculations in perturb normal
Use highp for derivatives calculations in perturb normal Fixes #258
JavaScript
mit
pex-gl/pex-renderer,pex-gl/pex-renderer