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
775c4a4ad5a553748804392899ee08ba6c2cc4e5
src/middleware/auth/processJWTIfExists.js
src/middleware/auth/processJWTIfExists.js
const nJwt = require('njwt'), config = require('config.js'), errors = require('feathers-errors'); function processJWTIfExists (req, res, next) { req.feathers = req.feathers || {}; let token = req.headers['authorization']; if (token == null) { let cookies = req.cookies; token = cookies.id...
const nJwt = require('njwt'), config = require('config.js'), errors = require('feathers-errors'); function processJWTIfExists (req, res, next) { req.feathers = req.feathers || {}; let token = req.headers['authorization']; if (token == null) { let cookies = req.cookies; token = cookies.id...
Use a catch with the JWT verify function
Use a catch with the JWT verify function
JavaScript
agpl-3.0
podverse/podverse-web,podverse/podverse-web,podverse/podverse-web,podverse/podverse-web
e7699d278aea82f2b10c07fbd028d35db704de94
kuulemma/static/app/components/location-map/location-map-directive.js
kuulemma/static/app/components/location-map/location-map-directive.js
(function() { 'use strict'; angular.module('kuulemmaApp').directive('locationMap', function($window) { return { restrict: 'A', scope: { latitude: '@', longitude: '@', polygon: '@' }, link: function(scope, element) { var L = $window.L; var map = L.m...
(function() { 'use strict'; angular.module('kuulemmaApp').directive('locationMap', function($window) { return { restrict: 'A', scope: { latitude: '@', longitude: '@', polygon: '@' }, link: function(scope, element) { var L = $window.L; var map = L.m...
Use https to load openstreetmap data
Use https to load openstreetmap data
JavaScript
agpl-3.0
fastmonkeys/kuulemma,City-of-Helsinki/kuulemma,fastmonkeys/kuulemma,City-of-Helsinki/kuulemma,City-of-Helsinki/kuulemma,fastmonkeys/kuulemma
65d110d813abdd2a039d223c7ddd41a4cc857a8b
server/common/set_language.js
server/common/set_language.js
// Store the preference locale in cookies and (if available) session to use // on next requests. 'use strict'; var _ = require('lodash'); var LOCALE_COOKIE_MAX_AGE = 0xFFFFFFFF; // Maximum 32-bit unsigned integer. module.exports = function (N, apiPath) { N.validate(apiPath, { locale: { type: 'string' } ...
// Store the preference locale in cookies and (if available) session to use // on next requests. 'use strict'; var _ = require('lodash'); var LOCALE_COOKIE_MAX_AGE = 0xFFFFFFFF; // Maximum 32-bit unsigned integer. module.exports = function (N, apiPath) { N.validate(apiPath, { locale: { type: 'string' } ...
Simplify updating of locale field in user account.
Simplify updating of locale field in user account.
JavaScript
mit
nodeca/nodeca.users
a1aca964cc495ddde6401be94cb231810b53598d
src/news/__tests__/ArticlePreview-test.js
src/news/__tests__/ArticlePreview-test.js
import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import ArticlePreview from '../ArticlePreview'; describe('ArticlePreview', () => { it('should render ArticlePreview component properly', () => { const wrapper = shallow(<ArticlePreview description="Article Descripti...
import React from 'react'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import ArticlePreview from '../ArticlePreview'; describe('ArticlePreview', () => { it('should render ArticlePreview component properly', () => { const wrapper = shallow(<ArticlePreview description="Article Descripti...
Fix a bug, used .test instead of .test()
Fix a bug, used .test instead of .test()
JavaScript
mit
qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary...
64167a5d7eba261f3f6c1b6e223d5f6b855b8df5
examples/extent-interaction.js
examples/extent-interaction.js
import ExtentInteraction from '../src/ol/interaction/Extent.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol...
import ExtentInteraction from '../src/ol/interaction/Extent.js'; import GeoJSON from '../src/ol/format/GeoJSON.js'; import Map from '../src/ol/Map.js'; import View from '../src/ol/View.js'; import {OSM, Vector as VectorSource} from '../src/ol/source.js'; import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol...
Use condition instead of setActive and listeners
Use condition instead of setActive and listeners
JavaScript
bsd-2-clause
stweil/ol3,adube/ol3,adube/ol3,openlayers/openlayers,stweil/ol3,oterral/ol3,ahocevar/openlayers,openlayers/openlayers,bjornharrtell/ol3,stweil/openlayers,stweil/ol3,ahocevar/ol3,ahocevar/openlayers,stweil/openlayers,openlayers/openlayers,stweil/openlayers,bjornharrtell/ol3,oterral/ol3,adube/ol3,ahocevar/ol3,ahocevar/op...
26fe7640b6ca46d053d5f9123f21411b3d739c80
_admin/js/sold_tickets.js
_admin/js/sold_tickets.js
function short_hash(data, type, row, meta) { return data.substring(0,8); } function init_page() { $('#tickets').dataTable({ "ajax": '../api/v1/tickets?filter=sold eq 1 and year eq 2016', columns: [ {'data': 'hash', 'render':short_hash}, {'data': 'firstName'}, ...
function short_hash(data, type, row, meta) { return data.substring(0,8); } function init_page() { $('#tickets').dataTable({ "ajax": '../api/v1/tickets?filter=sold eq 1 and year eq 2016&fmt=data-table', columns: [ {'data': 'hash', 'render':short_hash}, {'data': 'firstName...
Fix new API call for datatable consumer
Fix new API call for datatable consumer
JavaScript
apache-2.0
BurningFlipside/Tickets,BurningFlipside/Tickets,BurningFlipside/Tickets
a55246c980e48e3ed4e19a332dbc9178d0cd9265
static/sprints-new.js
static/sprints-new.js
$(document).ready(function() { $('select').chosen(); $('input.date').datepicker({ beforeShowDay: $.datepicker.noWeekends }); $('#save-button').savebutton($('#post-status'), ''); $('#cancel-button').cancelbutton(); });
$(document).ready(function() { $('select').chosen(); $('input.date').datepicker({ beforeShowDay: $.datepicker.noWeekends }); $('#save-button').savebutton($('#post-status'), ''); $('#cancel-button').cancelbutton('/'); });
Fix cancel button on new sprint page
Fix cancel button on new sprint page
JavaScript
mit
mrozekma/Sprint,mrozekma/Sprint,mrozekma/Sprint
cb87d72a356363cc7350ab3c2c06aeaa1967c846
src/argsToFindOptions.js
src/argsToFindOptions.js
export default function argsToFindOptions(args, target) { var result = {} , targetAttributes = Object.keys(target.rawAttributes); if (args) { Object.keys(args).forEach(function (key) { if (~targetAttributes.indexOf(key)) { result.where = result.where || {}; result.where[key] = args[ke...
export default function argsToFindOptions(args, target) { var result = {} , targetAttributes = Object.keys(target.rawAttributes); if (args) { Object.keys(args).forEach(function (key) { if (~targetAttributes.indexOf(key)) { result.where = result.where || {}; result.where[key] = args[ke...
Allow "reverse:fieldname" for a descending sort
Allow "reverse:fieldname" for a descending sort Closes #42
JavaScript
mit
idris/graphql-sequelize,mickhansen/graphql-sequelize,janmeier/graphql-sequelize
5b2ecde8e9cf8e4cc6e694ddfb6318ca47b342f5
lib/mixins/soft-delete.js
lib/mixins/soft-delete.js
'use strict'; const _ = require('lodash'); module.exports = function (Model, bootOptions = {}) { Model.defineProperty('deleted', { type: Boolean, required: true, default: false }); /** * @return {Promise<Model>} */ Model.prototype.softDelete = function () { return this.updateAttribute('...
'use strict'; const _ = require('lodash'); module.exports = function (Model, bootOptions = {}) { Model.defineProperty('deleted', { type: Boolean, required: true, default: false }); /** * @return {Promise<Model>} */ Model.prototype.softDelete = function () { return this.updateAttribute('...
Use not equal filter instead.
Use not equal filter instead.
JavaScript
mit
dynamoxteam/loopback-utilities
d1bd53c204c816dc0cca0cb3a502d30971ddcbcb
extension/media-control-api.js
extension/media-control-api.js
// Tab registration by MediaControlled event document.addEventListener("MediaControlled", function () { chrome.runtime.sendMessage({command: "registerTab"}); }); // Tab unregistration by MediaUncontrolled event document.addEventListener("MediaUncontrolled", function () { chrome.runtime.sendMessage({command: "u...
// Media Events emmiter chrome.runtime.onMessage.addListener(function(request) { switch (request.command) { case "play-pause": document.dispatchEvent(new Event("MediaPlayPause")); break; case "stop": document.dispatchEvent(new Event("MediaStop")); ...
Support for Web Page Media Control API v0.4
Support for Web Page Media Control API v0.4
JavaScript
apache-2.0
kristianj/keysocket,Whoaa512/keysocket,ALiangLiang/keysocket,borismus/keysocket,chrisdeely/keysocket,feedbee/keysocket,borismus/keysocket,vladikoff/keysocket,iver56/keysocket,kristianj/keysocket,vinyldarkscratch/keysocket,legionaryu/keysocket,vinyldarkscratch/keysocket,feedbee/keysocket
5e93f2da4c204b82c81eacbd86ab6368b67331ca
scripts/collections/quizz-collection.js
scripts/collections/quizz-collection.js
var QuizzCollection = Backbone.Collection.extend({ model: QuizzModel, url: './data/quizz.json' });
var QuizzCollection = Backbone.Collection.extend({ model: QuizzModel, url: 'http://dcamilleri.com/wsf/api' });
Change JSON url to API url
Change JSON url to API url
JavaScript
mit
KillianKemps/MovieQuizz,KillianKemps/MovieQuizz
f4086f9dd9381da2179adc2254b03b81d2e4fbb7
Smallstache.js
Smallstache.js
function Smallstache(source) { this.template = source.match(/^[#|\.].*/g) ? document.querySelector(source) : // source is selector source; // source is template } Smallstache.prototype.render = function(obj) { return this.template.replace(/{{\s*([\S|^}]+)\s*}}/g, ...
function Smallstache(source) { this.template = source.match(/^[#|\.].*/g) ? window.document.querySelector(source) : // source is selector source; // source is template } Smallstache.prototype.render = function(obj) { return this.template.replace(/{{\s*([\S|^}]+)\s*}}/...
Fix error with module export
Fix error with module export
JavaScript
mit
macie/smallstache
ac852a0a4478362ef3ca076fd14bbd048f4bc038
doc/components/CrossLinkComponent.js
doc/components/CrossLinkComponent.js
'use strict'; var Component = require('../../ui/Component'); var $$ = Component.$$; function CrossLinkComponent() { Component.apply(this, arguments); } CrossLinkComponent.Prototype = function() { this.render = function() { var doc = this.context.doc; var nodeId = this.props.nodeId; var el; if (no...
'use strict'; var Component = require('../../ui/Component'); var $$ = Component.$$; function CrossLinkComponent() { Component.apply(this, arguments); } CrossLinkComponent.Prototype = function() { this.render = function() { var doc = this.context.doc; var nodeId = this.props.nodeId; var el; if (no...
Fix display of return type.
Fix display of return type.
JavaScript
mit
TypesetIO/substance,andene/substance,TypesetIO/substance,abhaga/substance,michael/substance-1,stencila/substance,substance/substance,andene/substance,michael/substance-1,substance/substance,jacwright/substance,abhaga/substance,podviaznikov/substance,podviaznikov/substance,jacwright/substance
a9661d03d234101bd51d8fd66ddab653797c4543
lib/isomorphic/gatsby-helpers.js
lib/isomorphic/gatsby-helpers.js
import { config } from 'config' import invariant from 'invariant' import isString from 'lodash/isString' function isDataURL (s) { // Regex from https://gist.github.com/bgrins/6194623#gistcomment-1671744 // eslint-disable-next-line max-len const regex = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;...
import { config } from 'config' import invariant from 'invariant' import isString from 'lodash/isString' import path from 'path' function isDataURL (s) { // Regex from https://gist.github.com/bgrins/6194623#gistcomment-1671744 // eslint-disable-next-line max-len const regex = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a...
Use path.join for link prefixing
Use path.join for link prefixing
JavaScript
mit
mingaldrichgan/gatsby,mingaldrichgan/gatsby,gatsbyjs/gatsby,fabrictech/gatsby,rothfels/gatsby,gatsbyjs/gatsby,okcoker/gatsby,Khaledgarbaya/gatsby,ChristopherBiscardi/gatsby,danielfarrell/gatsby,fk/gatsby,ChristopherBiscardi/gatsby,gatsbyjs/gatsby,Khaledgarbaya/gatsby,rothfels/gatsby,0x80/gatsby,chiedo/gatsby,okcoker/ga...
dd81193bee7b57d2ff7c2f604a4ff37d629713bc
app/js/arethusa.core/dependency_loader.js
app/js/arethusa.core/dependency_loader.js
"use strict"; angular.module('arethusa.core').service('dependencyLoader', [ '$ocLazyLoad', '$q', 'basePath', function($ocLazyLoad, $q, basePath) { function expand(p) { return basePath.path + '/' + p; } function expandPath(path) { var res = []; if (angular.isArray(path)) { ...
"use strict"; angular.module('arethusa.core').service('dependencyLoader', [ '$ocLazyLoad', '$q', 'basePath', function($ocLazyLoad, $q, basePath) { function expand(p) { if (aU.isUrl(p)) { return p; } else { return basePath.path + '/' + p; } } function expandPath(pat...
Fix path handling in dependencyLoader
Fix path handling in dependencyLoader
JavaScript
mit
fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa
98ec5b6d04acd5410c71f84a4187c9ca7425defd
app/scripts/components/player-reaction.js
app/scripts/components/player-reaction.js
import m from 'mithril'; import classNames from '../classnames.js'; class PlayerReactionComponent { oninit({ attrs: { session, player } }) { session.on('send-reaction', ({ reactingPlayer, reaction }) => { if (reactingPlayer.color === player.color) { // Immediately update the reaction if another re...
import m from 'mithril'; import classNames from '../classnames.js'; class PlayerReactionComponent { oninit({ attrs: { session, player } }) { this.player = player; session.on('send-reaction', ({ reactingPlayer, reaction }) => { if (reactingPlayer.color === this.player.color) { // Immediately up...
Fix bug where reactions would break after starting new game
Fix bug where reactions would break after starting new game
JavaScript
mit
caleb531/connect-four
7be6e466152261159d1b6971ba231fc32464fc10
app/ui/browser/model/shared-prop-types.js
app/ui/browser/model/shared-prop-types.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...
Add shared immutable prop types for Profile models
Add shared immutable prop types for Profile models Signed-off-by: Victor Porof <7d8eebacd0931807085fa6b9af29638ed74e0886@mozilla.com>
JavaScript
apache-2.0
jsantell/tofino,mozilla/tofino,mozilla/tofino,jsantell/tofino,bgrins/tofino,victorporof/tofino,jsantell/tofino,victorporof/tofino,bgrins/tofino,mozilla/tofino,bgrins/tofino,bgrins/tofino,mozilla/tofino,jsantell/tofino
5ca8e5f6c57387af132f56bd997a06ab60bfe01e
test/test-creation.js
test/test-creation.js
/*global describe, beforeEach, it*/ 'use strict'; var path = require('path'); var helpers = require('yeoman-generator').test; describe('ink generator', function () { beforeEach(function (done) { helpers.testDirectory(path.join(__dirname, 'temp'), function (err) { if (err) { return done(err); ...
/*global describe, beforeEach, it*/ 'use strict'; var path = require('path'); var helpers = require('yeoman-generator').test; describe('ink generator', function () { beforeEach(function (done) { helpers.testDirectory(path.join(__dirname, 'temp'), function (err) { if (err) { return done(err); ...
Update test to check all files created
Update test to check all files created
JavaScript
mit
rogeriopvl/generator-ink,rogeriopvl/generator-ink
edb34ca791f133d22d27e00106e7351965c37152
lints/disallowImportingNonSharedCodeRule.js
lints/disallowImportingNonSharedCodeRule.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Lint = require("tslint"); class Rule extends Lint.Rules.AbstractRule { apply(sourceFile) { if (sourceFile.fileName.indexOf("src/debug/") === -1) { return this.applyWithWalker(new NoNonSharedCode(sourceFile, this.getOptions())); ...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Lint = require("tslint"); class Rule extends Lint.Rules.AbstractRule { apply(sourceFile) { return this.applyWithWalker(new NoNonSharedCode(sourceFile, this.getOptions())); } } Rule.DEBUG_FAILURE_STRING = "Do not import debugger co...
Enable more linting for shared imports
Enable more linting for shared imports
JavaScript
mit
Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code
f85e476263ffad5ce682ff40faa4979a8facf820
app/assets/javascripts/tagger/functions/setupDisplayFieldsEducation.js
app/assets/javascripts/tagger/functions/setupDisplayFieldsEducation.js
function setupDisplayFieldsEducationTab(TempObject, selectBox){ // This code is needed to merge the multiselect field and the "other" input field per if (typeof TempObject[selectBox] != 'undefined') { if (TempObject[selectBox] != "") { var optionsToSelect = TempObject[selectBox]; ...
// Take the comma separated list for {field} from {item}.{field} and populate the select#{field} box // Any of the values in the comma separated list for {field} that doesn't have an option in select#{field} // Get stuffed into {field}Other as it's own comma separated list. function setupDisplayFieldsEducationTab(item,...
Refactor of comma separated list to selectbox & other inputs.
Refactor of comma separated list to selectbox & other inputs.
JavaScript
apache-2.0
inbloom/APP-tagger,inbloom/APP-tagger
3a2c496d5d65d9e8dd01a09f03123b9b63853400
src/pages/index.js
src/pages/index.js
import React from 'react' import EventBets from '../templates/event-bets' import EventHeading from '../templates/event-heading' import styles from './index.module.styl' export default ({ data }) => ( <ol className={styles['events-list']}> { data.allMongodbPlacardDevEvents.edges.map(({ node }, idx) => ( ...
import React from 'react' import EventBets from '../templates/event-bets' import EventHeading from '../templates/event-heading' import styles from './index.module.styl' export default ({ data }) => ( <ol className={styles['events-list']}> { data.allMongodbPlacardDevEvents.edges.map(({ node }, idx) => ( ...
Set default page size to 10 events.
Set default page size to 10 events.
JavaScript
mit
LuisLoureiro/placard-wrapper
1d8de6175eb5405f3e1d316cb8ba65f70791f45f
src/main.js
src/main.js
'use babel' export const compiler = false export const minifier = false export function process(contents) { const chunks = contents.split(/\r?\n/) if (chunks[chunks.length - 1] !== '') { chunks.push('') } return chunks.join('\n') }
'use babel' import Path from 'path' import {rollup} from 'rollup' import {requireDependency} from './helpers' export const preprocessor = true export const compiler = false export const minifier = false export function process(contents, {rootDirectory, filePath, config, state}) { const plugins = [] plugins.push...
Implement proper plugins, resolution and maps support
:new: Implement proper plugins, resolution and maps support
JavaScript
mit
steelbrain/ucompiler-plugin-rollup
26c3cdec1c2eb9b39372da02e292d401e4eada6e
tests/WestleyTests.js
tests/WestleyTests.js
var lib = require("__buttercup/module.js"), Westley = lib.Westley; module.exports = { setUp: function(cb) { this.westley = new Westley(); (cb)(); }, _getCommandForName: { cachesCommandWhenCalledTwice: function(test) { var testCommandKey = 'tgr'; var firstCall = this.westley._getComm...
var lib = require("__buttercup/module.js"), Westley = lib.Westley; module.exports = { setUp: function(cb) { this.westley = new Westley(); (cb)(); }, _getCommandForName: { cachesCommandWhenCalledTwice: function(test) { var testCommandKey = 'tgr'; var f...
Correct indentation in westley tests
Correct indentation in westley tests
JavaScript
mit
buttercup-pw/buttercup-core,buttercup-pw/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core
0458137ee581e7b9ae4b63496c760fd964099271
generators/app/templates/api/policies/isAuthenticated.js
generators/app/templates/api/policies/isAuthenticated.js
/** * isAuthenticated * @description :: Policy that inject user in `req` via JSON Web Token */ var passport = require('passport'); module.exports = function (req, res, next) { passport.authenticate('jwt', function (error, user, info) { if (error) return res.serverError(error); if (!user) return res.unaut...
/** * isAuthenticated * @description :: Policy that inject user in `req` via JSON Web Token */ var _ = require('lodash'); var passport = require('passport'); module.exports = function (req, res, next) { passport.authenticate('jwt', function (error, user, info) { if (error || !user) return res.negotiate(_.ass...
Fix policy for new responses
Fix policy for new responses
JavaScript
mit
konstantinzolotarev/generator-trails,italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,tnunes/generator-trails,italoag/generator-sails-rest-api,eithewliter5518/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,IncoCode/generator-sails-rest-api,jaumard/generator-trails
6f6df7a1cdda9445ac32813d77b5aadd09664f17
lib/hooks.js
lib/hooks.js
'use strict' var shimmer = require('shimmer') var modules = require('./instrumentation/modules') module.exports = function (client) { if (!client._ff_instrument) return // TODO: This will actual just use the logger of the last client parsed in. // In most use-cases this is a non-issue, but if someone tries to ...
'use strict' var shimmer = require('shimmer') var modules = require('./instrumentation/modules') module.exports = function (client) { // TODO: This will actual just use the logger of the last client parsed in. // In most use-cases this is a non-issue, but if someone tries to initiate // multiple clients with di...
Allow simple shimming of http.Server if full instrumentation is disabled
Allow simple shimming of http.Server if full instrumentation is disabled
JavaScript
bsd-2-clause
opbeat/opbeat-node,opbeat/opbeat-node
b1f3ef17d75d3539c02659cbf300cd913879ce36
client/src/store.js
client/src/store.js
import {createStore, applyMiddleware } from 'redux'; import thunkMiddleware from 'redux-thunk'; import createLogger from 'redux-logger'; import reducer from './reducer'; const loggerMiddleware = createLogger(); const createStoreWithMiddleware = applyMiddleware( thunkMiddleware, loggerMiddleware )(createStore); e...
import {createStore, applyMiddleware } from 'redux'; import thunkMiddleware from 'redux-thunk'; import createLogger from 'redux-logger'; import reducer from './reducer'; const loggerMiddleware = createLogger(); const createStoreWithMiddleware = applyMiddleware( thunkMiddleware, loggerMiddleware //remove in produc...
Add comment to remove loggerMiddleware in production.
Add comment to remove loggerMiddleware in production.
JavaScript
agpl-3.0
mi-squared/volunteer-portal,mi-squared/volunteer-portal,mi-squared/volunteer-portal
7b7f5012a087f4454f81cecd1f7292d655265cdb
lib/index.js
lib/index.js
import Server from './server'; import Client from './client'; const debug = require('debug')('tinylr'); // Need to keep track of LR servers when notifying const servers = []; export default tinylr; // Expose Server / Client objects tinylr.Server = Server; tinylr.Client = Client; // and the middleware helpers tinyl...
import Server from './server'; import Client from './client'; const debug = require('debug')('tinylr'); // Need to keep track of LR servers when notifying const servers = []; export default tinylr; // Expose Server / Client objects tinylr.Server = Server; tinylr.Client = Client; // and the middleware helpers tinyl...
Fix changed done callback, missing typeof.
Fix changed done callback, missing typeof.
JavaScript
mit
mklabs/tiny-lr
64e7f7f2eef87d86393077ebab953c8954cccd0b
src/data-reader/local-json.js
src/data-reader/local-json.js
define([ 'base/class', 'jquery', 'underscore', 'base/utils' ], function(Class, $, _, Util) { var LocalJSONReader = Class.extend({ init: function(basepath) { this.data = []; this.basepath = basepath; }, read: function(queries, language) {...
define([ 'base/class', 'jquery', 'underscore', 'base/utils' ], function(Class, $, _, Util) { var LocalJSONReader = Class.extend({ init: function(basepath) { this.data = []; this.basepath = basepath; }, read: function(queries, language) {...
Fix Load multiple JSON bug using array of promises
Fix Load multiple JSON bug using array of promises
JavaScript
bsd-3-clause
homosepian/vizabi,Gapminder/vizabi,acestudiooleg/vizabi,jdk137/vizabi,sergey-filipenko/vizabi,maximhristenko/vizabi,maximhristenko/vizabi,Gapminder/vizabi,vizabi/vizabi,alliance-timur/vizabi,buchslava/vizabi,logicerpsolution/vizabi,buchslava/vizabi,alliance-timur/vizabi,Rathunter/vizabi,dab2000/vizabi,Rathunter/vizabi,...
9d33aca502e70c3da99a66c98ce54e109dc336e0
src/client/app/core/dataservice.spec.js
src/client/app/core/dataservice.spec.js
/* jshint -W117, -W030 */ describe('dataservice', function() { beforeEach(function() { bard.appModule('app.core'); bard.inject('$http','$httpBackend','$q','dataservice','$rootScope'); }); it('exists' , function(){ expect(dataservice).to.exist; }); it('getMessageCount returns a value' , function(...
/* jshint -W117, -W030 */ describe('dataservice', function() { beforeEach(function() { bard.appModule('app.core'); bard.inject('$http','$httpBackend','$q','dataservice','$rootScope'); }); it('exists' , function(){ expect(dataservice).to.exist; }); it('getMessageCount returns a value' , function(...
Fix test so that is uses regex to check the text returned.
Fix test so that is uses regex to check the text returned.
JavaScript
mit
bitclaw/angularjs-testing,bitclaw/angularjs-testing
7464095a8f29a8e7630ac518a34c74ff1ed75c49
src/js/components/CollapsibleContainer.js
src/js/components/CollapsibleContainer.js
import React, {Component} from 'react'; import Icon from './Icon'; class CollapsibleContainer extends Component { constructor() { super(...arguments); this.state = { toggle: false }; this.toggleContainer = this.toggleContainer.bind(this); } toggleContainer() { this.setState({toggle: ...
import React, {Component} from 'react'; import Icon from './Icon'; class CollapsibleContainer extends Component { constructor() { super(...arguments); this.state = { toggle: false }; this.toggleContainer = this.toggleContainer.bind(this); } toggleContainer() { this.setState({toggle: ...
Add required flag to label prop
Add required flag to label prop
JavaScript
apache-2.0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
a392c18f48b1af268e6882fde1ca09f75a87e73a
packages/pundle-chunk-transformer-js-uglify/src/index.js
packages/pundle-chunk-transformer-js-uglify/src/index.js
// @flow import { minify as processUglify } from 'uglify-es' import { minify as processTerser } from 'terser' import { createChunkTransformer } from 'pundle-api' import manifest from '../package.json' // TODO: Fix source maps const VALID_UGLIFIERS = new Set(['uglify', 'terser']) function createComponent({ options = ...
// @flow import { minify as processUglify } from 'uglify-es' import { minify as processTerser } from 'terser' import { createChunkTransformer } from 'pundle-api' import manifest from '../package.json' // TODO: Fix source maps const VALID_UGLIFIERS = new Set(['uglify', 'terser']) function createComponent({ options = ...
Tweak uglifyjs config to be faster
:racehorse: Tweak uglifyjs config to be faster
JavaScript
mit
motion/pundle,steelbrain/pundle,steelbrain/pundle,steelbrain/pundle
91db0045d899443f5c18c0dc42b51b679abe3aa4
ui/src/shared/middleware/resizeLayout.js
ui/src/shared/middleware/resizeLayout.js
// Trigger resize event to relayout the React Layout plugin export default function resizeLayout() { return next => action => { next(action) if ( action.type === 'ENABLE_PRESENTATION_MODE' || action.type === 'DISABLE_PRESENTATION_MODE' ) { // Uses longer event object creation method due...
// Trigger resize event to relayout the React Layout plugin import {enablePresentationMode} from '../actions/app' export default function resizeLayout() { return next => action => { next(action) if ( action.type === 'ENABLE_PRESENTATION_MODE' || action.type === 'DISABLE_PRESENTATION_MODE' ) {...
Add 'present' url query/search param to presentation mode middleware.
Add 'present' url query/search param to presentation mode middleware.
JavaScript
mit
mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdata/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/inf...
dd89728416e7078caf39b7dcb3182ab30d52e594
web_modules/layouts/PageLoading/index.js
web_modules/layouts/PageLoading/index.js
import React, { Component } from "react" import TopBarProgressIndicator from "react-topbar-progress-indicator" import styles from "./index.css" TopBarProgressIndicator.config({ barColors: { "0": "#0085a1", "1.0": "#0085a1", }, shadowBlur: 5, }) export default class PageLoading extends Component { re...
import React, { Component } from "react" import TopBarProgressIndicator from "react-topbar-progress-indicator" import styles from "./index.css" TopBarProgressIndicator.config({ barColors: { "0": "#fff", "1.0": "#fff", }, shadowBlur: 5, }) export default class PageLoading extends Component { render()...
Update color to match with header
ui(topbar): Update color to match with header
JavaScript
mit
thangngoc89/blog
1f1dfbc27a77fed2844a128c5dc38b1ffad3bab6
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var sass = require('gulp-sass'); var sasslint = require('gulp-sass-lint'); var sourcemaps = require('gulp-sourcemaps'); var rename = require('gulp-rename'); var header = require('gulp-header'); var pkg = require('./package.json'); var banner = '/*! <%= pkg.name %>: v.<%= pkg.version %>, las...
var gulp = require('gulp'); var sass = require('gulp-sass'); var sasslint = require('gulp-sass-lint'); var sourcemaps = require('gulp-sourcemaps'); var rename = require('gulp-rename'); var header = require('gulp-header'); var pkg = require('./package.json'); var banner = '/*! <%= pkg.name %>: v.<%= pkg.version %>, las...
Comment out missing call to notify plugin
Comment out missing call to notify plugin
JavaScript
mit
TMG-88/TAH,TMG-88/TAH,TMG-88/hello-world,TMG-88/hello-world
33f7cbd804244528bce4286f7f8806feb6f8d159
src/request/stores/request-entry-store.js
src/request/stores/request-entry-store.js
var glimpse = require('glimpse'), _requests = []; (function() { function dataFound(payload) { // TODO: Really bad hack to get things going atm _requests = payload.allRequests; glimpse.emit('shell.request.summary.changed', _requests); } // External data coming in glimpse.on...
var glimpse = require('glimpse'), _requests = [], _filteredRequests = [], _filters = {}; function requestsChanged(targetRequests) { glimpse.emit('shell.request.summary.changed', targetRequests); } // TODO: This needs to be refactored to dynamically lookup records, etc // TODO: Even at the moment this ...
Implement a basic version of filtering based on use selection
Implement a basic version of filtering based on use selection
JavaScript
unknown
avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype
45b60408828c430d18a470c16d3c3ac3557d5fc1
config/ember-try.js
config/ember-try.js
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#release', 'ember-data': 'components/ember-data#1.13.4' }, resolutions: { 'ember': 'release', 'embe...
module.exports = { scenarios: [ { name: 'default', dependencies: { } }, { name: 'ember-release', dependencies: { 'ember': 'components/ember#release', 'ember-data': 'components/ember-data#release' }, resolutions: { 'ember': 'release', 'emb...
Use release channel of ember-data
Use release channel of ember-data v1.13 is not supported for the next version of ember-data-fixture-adapter.
JavaScript
mit
emberjs/ember-data-fixture-adapter,emberjs/ember-data-fixture-adapter
0b148e268b8922d100d51e8bd5703b976955ed2b
lib/node_modules/@stdlib/utils/constructor-name/lib/constructor_name.js
lib/node_modules/@stdlib/utils/constructor-name/lib/constructor_name.js
'use strict'; // MODULES // var nativeClass = require( '@stdlib/utils/native-class' ); var RE = require( '@stdlib/regexp/function-name' ); var isBuffer = require( '@stdlib/assert/is-buffer' ); // MAIN // /** * Determines the name of a value's constructor. * * @param {*} v - input value * @returns {string} name of ...
'use strict'; // MODULES // var nativeClass = require( '@stdlib/utils/native-class' ); var RE = require( '@stdlib/regexp/function-name' ); var isBuffer = require( '@stdlib/assert/is-buffer' ); // MAIN // /** * Determines the name of a value's constructor. * * @param {*} v - input value * @returns {string} name of ...
Fix lint error and update JSDoc examples
Fix lint error and update JSDoc examples
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
dbfc34db0f4413c10205357ed423b244827c6388
shaq_overflow/app/assets/javascripts/app.js
shaq_overflow/app/assets/javascripts/app.js
$(document).ready(function() { $("a.up-vote-answer").click(function(event) { event.preventDefault(); var $target = $(event.target); console.log($target.data("url")) $.ajax({ type: "post", url: $target.data("url"), data: $target.data(), success: function(...
$(document).ready(function() { $("a.up-vote-answer").click(function(event) { event.preventDefault(); var $target = $(event.target); $.ajax({ type: "post", url: $target.data("url"), data: $target.data(), success: function(response) { $('#' + $target.data('ans...
Add ajax call for questions
Add ajax call for questions
JavaScript
mit
lucasrsantos1/lucky-ambassador,lucasrsantos1/lucky-ambassador,lucasrsantos1/lucky-ambassador
3cbedcf697029d844f472c6d2503f47edee6506d
src/helpers/getPetitionDaysRemaining.js
src/helpers/getPetitionDaysRemaining.js
import moment from 'moment'; import getPetitionEndDate from 'selectors/petitionEndDate'; export default ({ created, expires }, timeNow) => { const endDate = getPetitionEndDate({ created, expires }); const nowDate = timeNow || moment().valueOf(); const daysRemaining = moment.duration(moment(endDate).diff(nowDate)...
import moment from 'moment'; import getPetitionEndDate from 'selectors/petitionEndDate'; export default ({ created, expires }) => { const endDate = getPetitionEndDate({ created, expires }); const nowDate = moment().valueOf(); const daysRemaining = moment.duration(endDate.diff(nowDate)).asDays(); return Math.ma...
Remove unused param from daysRemaining function
Remove unused param from daysRemaining function
JavaScript
apache-2.0
iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend
071b13d9b044fd09d31f3d3f5c4d7f7c2385a793
src/models/CustomerIoEvent.js
src/models/CustomerIoEvent.js
'use strict'; class CustomerIoEvent { constructor(id, name, data) { this.id = id; this.name = name; this.data = data; } getId() { return this.id; } getName() { return this.name; } getData() { return this.data; } setVersion(version) { this.data.version = version; } } ...
'use strict'; class CustomerIoEvent { constructor(id, name, data) { this.id = id; this.name = name; this.data = data; } getId() { return this.id; } getName() { return this.name; } getData() { return this.data; } // Schema version of event data. setVersion(version) { ...
Add comment clarifying that cio event version is data schema version
Add comment clarifying that cio event version is data schema version
JavaScript
mit
DoSomething/blink,DoSomething/blink
fa74ef9e2294c798743d689d30fd8aa6138a2e44
lib/jsdom/living/post-message.js
lib/jsdom/living/post-message.js
"use strict"; const isValidTargetOrigin = require("../utils").isValidTargetOrigin; const DOMException = require("../web-idl/DOMException"); module.exports = function (message, targetOrigin) { if (arguments.length < 2) { throw new TypeError("'postMessage' requires 2 arguments: 'message' and 'targetOrigin'"); } ...
"use strict"; const isValidTargetOrigin = require("../utils").isValidTargetOrigin; const DOMException = require("../web-idl/DOMException"); module.exports = function (message, targetOrigin) { if (arguments.length < 2) { throw new TypeError("'postMessage' requires 2 arguments: 'message' and 'targetOrigin'"); } ...
Fix origin-checking logic in postMessage
Fix origin-checking logic in postMessage This allows us to post messages where the origin is something other than `*`. Closes #1789.
JavaScript
mit
mzgol/jsdom,Zirro/jsdom,Zirro/jsdom,mzgol/jsdom,mzgol/jsdom,tmpvar/jsdom,tmpvar/jsdom,snuggs/jsdom,snuggs/jsdom
aa31895f622ad0beebda72284ff76d7971edaf3a
generate-config-schema.js
generate-config-schema.js
"use strict"; const fs = require("fs"); const packageJsonPath = "./package.json"; const packageJson = require(packageJsonPath); const configurationSchema = require("./node_modules/markdownlint/schema/markdownlint-config-schema.json"); const defaultConfig = require("./default-config.json"); // Update package.json cons...
"use strict"; const fs = require("fs"); const packageJsonPath = "./package.json"; const packageJson = require(packageJsonPath); const configurationSchema = require("./node_modules/markdownlint/schema/markdownlint-config-schema.json"); const defaultConfig = require("./default-config.json"); // Update package.json cons...
Add trailing newline charater when generating config schema for package.json.
Add trailing newline charater when generating config schema for package.json.
JavaScript
mit
DavidAnson/vscode-markdownlint
c442ad739f2b65e5a62b7c4e6579a10ab5d34004
test/integration/assertions/noJsErrors.js
test/integration/assertions/noJsErrors.js
exports.assertion = function () { this.message = 'Page loaded with no errors.'; this.expected = []; this.pass = function (result) { return result && result.length === 0; }; this.failure = function (result) { var failed = result.value.length > 0; if (failed) { ...
exports.assertion = function () { this.message = 'Page loaded with no errors.'; this.expected = []; this.pass = function (result) { return !result.value && result.length === 0; }; this.failure = function (result) { var failed = result.value && result.value.length > 0; ...
Improve client side error detection
Improve client side error detection
JavaScript
apache-2.0
junbon/binary-static-www2,borisyankov/binary-static,massihx/binary-static,borisyankov/binary-static,brodiecapel16/binary-static,massihx/binary-static,massihx/binary-static,junbon/binary-static-www2,einhverfr/binary-static,borisyankov/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,tfoertsch/binary...
cfeb83d35a957a433362e8eed762c0e364cb4d6e
modules/angular-meteor-user.js
modules/angular-meteor-user.js
var angularMeteorUser = angular.module('angular-meteor.user', ['angular-meteor.utils']); angularMeteorUser.run(['$rootScope', '$meteorUtils', function($rootScope, $meteorUtils){ var currentUserDefer; $meteorUtils.autorun($rootScope, function(){ if (Meteor.user) { $rootScope.currentUser = Meteor.user(); ...
var angularMeteorUser = angular.module('angular-meteor.user', ['angular-meteor.utils']); angularMeteorUser.run(['$rootScope', '$meteorUtils', '$q', function($rootScope, $meteorUtils, $q){ var currentUserDefer; $meteorUtils.autorun($rootScope, function(){ if (Meteor.user) { $rootScope.currentUser = Meteo...
Add missing $q service to User
Add missing $q service to User
JavaScript
mit
shankarregmi/angular-meteor,Wanderfalke/angular-meteor,davidyaha/angular-meteor,Urigo/angular-meteor,evanliomain/angular-meteor,manhtuongbkhn/angular-meteor,nweat/angular-meteor,efosao12/angular-meteor,IgorMinar/angular-meteor,idanwe/angular-meteor,omer72/angular-meteor,eugene-d/angular-meteor,ahmedshuhel/angular-meteo...
777ca8757c04561f0bd0c3ad17e43ad384424504
src/routes.js
src/routes.js
//@flow import React from 'react' import { Route, IndexRoute } from 'react-router' import App from './App' if (process.env.NODE_ENV === 'development' || typeof require.ensure === 'undefined') require.ensure = (undefined, fc) => fc(require) export default () => ( // eslint-disable-line <Route component={App}> <R...
//@flow import React from 'react' import { Route, IndexRoute } from 'react-router' import App from './App' import Posts from './Posts' import AddPost from './AddPost' export default () => ( // eslint-disable-line <Route component={App}> <Route path="/"> <IndexRoute component={Posts}/> <Route path="ad...
Revert "Disable code-split in development mode and for server side"
Revert "Disable code-split in development mode and for server side" This reverts commit 90d307f6cf9792882dc4beabc2cd1d007ae26dc6.
JavaScript
mit
MrEfrem/TestApp,MrEfrem/TestApp
aea16e7ef4aa2fe11d282a2dabfbf73ade85fe31
ghost/admin/components/gh-notification.js
ghost/admin/components/gh-notification.js
var NotificationComponent = Ember.Component.extend({ classNames: ['js-bb-notification'], typeClass: function () { var classes = '', message = this.get('message'), type, dismissible; // Check to see if we're working with a DS.Model or a plain JS object ...
var NotificationComponent = Ember.Component.extend({ classNames: ['js-bb-notification'], typeClass: function () { var classes = '', message = this.get('message'), type, dismissible; // Check to see if we're working with a DS.Model or a plain JS object ...
Check the end of notification fade-out animation
Check the end of notification fade-out animation
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
e31c5e39f3775e2278f7bdb1b8e4de919c97266e
ghost/admin/components/gh-upload-modal.js
ghost/admin/components/gh-upload-modal.js
import ModalDialog from 'ghost/components/gh-modal-dialog'; import upload from 'ghost/assets/lib/uploader'; var UploadModal = ModalDialog.extend({ layoutName: 'components/gh-modal-dialog', didInsertElement: function () { this._super(); upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge...
import ModalDialog from 'ghost/components/gh-modal-dialog'; import upload from 'ghost/assets/lib/uploader'; var UploadModal = ModalDialog.extend({ layoutName: 'components/gh-modal-dialog', didInsertElement: function () { this._super(); upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge...
Fix button class on upload modal
Fix button class on upload modal no issue - this makes sure that the cancel button on the upload modal gets the correct class
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
23b4df8733dd31415a3053b8f8625144b259894c
test/component-test.js
test/component-test.js
var tape = require("tape"), jsdom = require("jsdom"), d3 = Object.assign( require("../"), require("d3-selection") ); // An example component. function Paragraph(){ return function (context, d){ context.text(d); }; } Paragraph.tagName = "p"; tape("component()", function(test) { var div = d3...
var tape = require("tape"), jsdom = require("jsdom"), d3 = Object.assign( require("../"), require("d3-selection") ); // An example component. function Paragraph(){ return function (context, d){ context.text(d); }; } Paragraph.tagName = "p"; tape("A component should render multiple inst...
Add test for single instance
Add test for single instance
JavaScript
bsd-3-clause
curran/d3-component
50fbcfd21058af009584b41cfd543c98b38ccb5a
reverse-array-in-place.js
reverse-array-in-place.js
// Reverse Array In Place /*RULES: Take array as parameter Reverse array Return reversed array NOTES: Can't create new empty array to push in Must modify given array Can't use array.reverse(); */ /*PSEUDOCODE 1) Find array length 2) Create variable "stopper" for last element in array 2) (arr...
// Reverse Array In Place /*RULES: Take array as parameter Reverse array Return reversed array NOTES: Can't create new empty array to push in Must modify given array Can't use array.reverse(); */ /*PSEUDOCODE 1) Find array length 2) Create variable "stopper" for last element in array 2) (arr...
Complete working algorithm, follows all rules and works perfectly
Complete working algorithm, follows all rules and works perfectly
JavaScript
mit
benjaminhyw/javascript_algorithms
37738318c9c13f5c796467a302776cca08c441bc
.eslintrc.js
.eslintrc.js
module.exports = { "extends": "react-app", "rules": { "comma-dangle": ["error", "always-multiline"], // disallow unnecessary semicolons 'no-extra-semi': 'error', }, };
module.exports = { "extends": "react-app", "rules": { "comma-dangle": ["warn", "always-multiline"], // disallow unnecessary semicolons 'no-extra-semi': 'warn', }, };
Change code style issues to warnings
Change code style issues to warnings
JavaScript
agpl-3.0
sMteX/WoWAnalyzer,FaideWW/WoWAnalyzer,Yuyz0112/WoWAnalyzer,sMteX/WoWAnalyzer,ronaldpereira/WoWAnalyzer,Juko8/WoWAnalyzer,ronaldpereira/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,Yuyz0112/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,enragednuke/WoWAnalyzer,FaideWW/WoWAnalyzer,hasseb...
23af74d81b718ab07db40c38c46b8c1c6337374b
app/assets/javascripts/dispatcher/index.js
app/assets/javascripts/dispatcher/index.js
// This dispatcher modifies some of the ideas in Facebook's template: // https://github.com/facebook/flux/blob/master/src/Dispatcher.js var FluxDispatcher = require('flux').Dispatcher; class AppDispatcher extends FluxDispatcher { dispatch(payload) { if (!payload.action && !payload.type) { console.error('C...
var FluxDispatcher = require('flux').Dispatcher; class AppDispatcher extends FluxDispatcher { dispatch(payload) { if (!payload.action && !payload.type) { console.error('Cannot dispatch null action. Make sure action type is in constants.js'); return; } super.dispatch(payload); } }; module....
Remove unnecessary comment, since the origins of the Dispatcher are now apparent
Remove unnecessary comment, since the origins of the Dispatcher are now apparent
JavaScript
agpl-3.0
lachlanjc/meta,assemblymade/meta,assemblymade/meta,assemblymade/meta,lachlanjc/meta,lachlanjc/meta,assemblymade/meta,lachlanjc/meta
414958ef0ee5d48d7f823517976493a2b237d2f3
test/encoders.tests.js
test/encoders.tests.js
var assert = require('assert'); var encoders = require('../lib/encoders'); var fixtures = require('./fixture/server'); describe('encoders', function () { describe('thumbprint', function () { it('should return the thumbprint in all caps', function () { var certThumbprint = encoders.thumbprint(fixtures.crede...
'use strict'; const assert = require('assert'); const encoders = require('../lib/encoders'); const fixtures = require('./fixture/server'); describe('encoders', function () { describe('thumbprint', function () { it('should return the thumbprint in all caps', function () { const certThumbprint = encoders.th...
Revert "Make compatible with Node 0.10 🤢"
Revert "Make compatible with Node 0.10 🤢" This reverts commit eaf1ad7
JavaScript
mit
auth0/node-wsfed,auth0/node-wsfed
028e456ff191d013c3cf48fcaaa106e11348c5c2
src/js/views/controls.js
src/js/views/controls.js
define(['underscore', 'backbone', 'jquery'], function(_, Backbone, $) { 'use strict'; var $navigatorBtn = $('.caption .controls button.navigator'); var $navigatorOverlay = $('.navigator-overlay'); return Backbone.View.extend({ initialize: function() { $navigatorBtn.click(_.bind(this.toggleNavigator, this)); ...
define(['underscore', 'backbone', 'jquery'], function(_, Backbone, $) { 'use strict'; var $navigatorBtn = $('.caption .controls button.navigator'); var $navigatorOverlay = $('.navigator-overlay'); return Backbone.View.extend({ initialize: function() { $navigatorBtn.click(_.bind(this.toggleNavigator, this)); ...
Remove unused methods from navigator control
Remove unused methods from navigator control
JavaScript
mit
nuclearwingsclan/skymaps,asleepwalker/skymaps,asleepwalker/skymaps,nuclearwingsclan/skymaps
c847d07a1d096750b9188a0969795c65afa859f5
lib/rules/validate-self-closing-tags.js
lib/rules/validate-self-closing-tags.js
var utils = require('../utils') , selfClosing = require('void-elements') module.exports = function () {} module.exports.prototype = { name: 'validateSelfClosingTags' , configure: function (options) { utils.validateTrueOptions(this.name, options) } , lint: function (file, errors) { var isX...
var utils = require('../utils') , selfClosing = require('void-elements') module.exports = function () {} module.exports.prototype = { name: 'validateSelfClosingTags' , configure: function (options) { utils.validateTrueOptions(this.name, options) } , lint: function (file, errors) { var isX...
Refactor `validateSelfClosingTags` to handle new token structure
Refactor `validateSelfClosingTags` to handle new token structure
JavaScript
isc
benedfit/jade-lint,pugjs/jade-lint,pugjs/pug-lint,benedfit/jadelint
c8ed1fb00519c3a0c42739476e07ad632bba86c0
lib/server/model.js
lib/server/model.js
'use strict'; const CommonModel = require('../common/model.js'); class ServerModel extends CommonModel { constructor(validator, messenger, dbStorage, config, jwt) { super(validator, messenger); this.db = dbStorage; this.config = config; this.jwt = jwt; } signinPassword(event) { this.db ...
'use strict'; const CommonModel = require('../common/model.js'); class ServerModel extends CommonModel { constructor(validator, messenger, dbStorage, config, jwt) { super(validator, messenger); this.db = dbStorage; this.config = config; this.jwt = jwt; } signinPassword(event) { this.db ...
Fix bug: call reply method on messenger
Fix bug: call reply method on messenger
JavaScript
mit
scola84/node-auth
b72a2e4ecd8c8fee9dba0b9bba059b31757dd0f7
lib/services/tag.js
lib/services/tag.js
import rp from 'request-promise'; import {Microservices} from '../../configs/microservices'; import {isEmpty, assignToAllById} from '../../common'; export default { // fetches the tags data fetchTagInfo(tags) { if (isEmpty(tags)) return Promise.resolve([]); return rp.get({ uri: `...
import rp from 'request-promise'; import {Microservices} from '../../configs/microservices'; import {isEmpty, assignToAllById} from '../../common'; export default { // fetches the tags data fetchTagInfo(tags) { if (isEmpty(tags)) return Promise.resolve([]); return rp.get({ uri: `...
Fix no topics shown when loading a deck
Fix no topics shown when loading a deck
JavaScript
mpl-2.0
slidewiki/slidewiki-platform,slidewiki/slidewiki-platform,slidewiki/slidewiki-platform
03b3bd619dcf68fbba409fa6de788d2e02f4c0ca
test/selectors.spec.js
test/selectors.spec.js
import * as selectors from '../src/selectors' describe('selectors', () => { it('includes selector to get session data', () => { const state = { session: { data: { token: 'abcde' } } } const result = selectors.getSessionData(state) expect(result).toEqual({ token: 'abcde' }) }) ...
import * as selectors from '../src/selectors' describe('selectors', () => { it('includes selector to get session data', () => { const state = { session: { data: { token: 'abcde' } } } const result = selectors.getSessionData(state) expect(result).toEqual({ token: 'abcde' }) }) ...
Add test for getHasFailedAuth selector
Add test for getHasFailedAuth selector
JavaScript
mit
jerelmiller/redux-simple-auth
923e723b701bb382c87ff811a2a4b861e4e6ec36
src/components/laws/LawCollectionChooser.js
src/components/laws/LawCollectionChooser.js
import React, { PropTypes } from 'react'; import ImmutableTypes from 'react-immutable-proptypes'; import { Grid, Cell, Button } from 'react-mdl'; const LawCollectionChooser = ({ collections, selected, onSelect }) => ( <Grid noSpacing> {collections.map(title => ( <Cell key={title} col={3} tablet={4} phone=...
import React, { PropTypes } from 'react'; import { List } from 'immutable'; import { range } from 'lodash'; import ImmutableTypes from 'react-immutable-proptypes'; import { Grid, Cell, Button } from 'react-mdl'; const shell = List(range(4).map(() => '')); const LawCollectionChooser = ({ collections, selected, onSel...
Implement shells for law index collection chooser.
Implement shells for law index collection chooser.
JavaScript
agpl-3.0
ahoereth/lawly,ahoereth/lawly,ahoereth/lawly
05a0de2d8680c92a40739027bd15a19c205d1f80
lib/utils/images.js
lib/utils/images.js
var _ = require("lodash"); var Q = require("q"); var fs = require("./fs"); var shellescape = require('shell-escape'); var spawn = require('spawn-cmd').spawn; var links = require("./links"); // Convert a svg file var convertSVG = function(source, dest, options) { if (!fs.existsSync(source)) return Q.reject(new Error(...
var _ = require("lodash"); var Q = require("q"); var fs = require("./fs"); var spawn = require('spawn-cmd').spawn; var links = require("./links"); // Convert a svg file var convertSVG = function(source, dest, options) { if (!fs.existsSync(source)) return Q.reject(new Error("File doesn't exist: "+source)); var d = Q...
Remove require of old dependency "shell-escape"
Remove require of old dependency "shell-escape"
JavaScript
apache-2.0
haamop/documentation,jocr1627/gitbook,hongbinz/gitbook,hujianfei1989/gitbook,athiruban/gitbook,switchspan/gitbook,haamop/documentation,bradparks/gitbook,gencer/gitbook,palerdot/gitbook,grokcoder/gitbook,sunlianghua/gitbook,sunlianghua/gitbook,jasonslyvia/gitbook,xxxhycl2010/gitbook,kamyu104/gitbook,webwlsong/gitbook,su...
8de090891a3492729fbb74b94fb28740c7143428
src/components/loggertrace/HeaderDisplay.js
src/components/loggertrace/HeaderDisplay.js
import React, { PropTypes } from 'react'; import { Table } from 'react-bootstrap'; import { List } from 'immutable'; import moment from 'moment'; import HeaderRow from './HeaderRow'; function HeaderDisplay(props) { let headers = props.headers; const rows = headers.map(h => { const name = h.get('name'); co...
import React, { PropTypes } from 'react'; import { Table } from 'react-bootstrap'; import { List } from 'immutable'; import moment from 'moment'; import HeaderRow from './HeaderRow'; function HeaderDisplay(props) { let headers = props.headers; const rows = headers.map((h, index) => { const name = h.get('name'...
Support for two headers with same name.
Support for two headers with same name. I found an example file with two different firmware version header lines. This caused a React error due to duplicate item keys. Fixed by appending the index to the name.
JavaScript
mit
alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst
af861de8c276b56babd2d978e2a1bc2950115ff5
main.js
main.js
import { app, BrowserWindow } from 'electron'; let mainWindow = null; app.on('window-all-closed', () => { if (process.platform != 'darwin') { app.quit(); } }); app.on('ready', () => { mainWindow = new BrowserWindow({width: 800, maxWidth: 800, height: 600}); //, titleBarStyle: 'hidden'}); mainWindow.loadU...
import { app, BrowserWindow } from 'electron'; let mainWindow = null; let willQuit = false; function createWindow() { mainWindow = new BrowserWindow({width: 800, maxWidth: 800, height: 600, fullscreenable: false}); //, titleBarStyle: 'hidden'}); mainWindow.loadURL('file://' + __dirname + '/index.html'); } app.on...
Make window persist on close
Make window persist on close
JavaScript
mit
cassidoo/todometer,jdebarochez/todometer,jdebarochez/todometer,cassidoo/todometer
516e2ca05aefe603e3ad2bbff272af1e2506d339
generators/client/templates/src/main/webapp/app/home/_home.controller.js
generators/client/templates/src/main/webapp/app/home/_home.controller.js
'use strict'; angular.module('<%=angularAppName%>') .controller('HomeController', function ($scope, Principal, LoginService) { function getAccount() { Principal.identity().then(function(account) { $scope.account = account; $scope.isAuthenticated = Principal.isAut...
'use strict'; angular.module('<%=angularAppName%>') .controller('HomeController', function ($scope, Principal, LoginService) { function getAccount() { Principal.identity().then(function(account) { $scope.account = account; $scope.isAuthenticated = Principal.isAut...
Fix the link sign in
Fix the link sign in
JavaScript
apache-2.0
danielpetisme/generator-jhipster,atomfrede/generator-jhipster,nkolosnjaji/generator-jhipster,ruddell/generator-jhipster,hdurix/generator-jhipster,eosimosu/generator-jhipster,liseri/generator-jhipster,maniacneron/generator-jhipster,PierreBesson/generator-jhipster,atomfrede/generator-jhipster,yongli82/generator-jhipster,...
0d23116dc716585310a41cbd083988406d1013b0
backend-services-push-hybrid-advanced/scripts/app.js
backend-services-push-hybrid-advanced/scripts/app.js
(function (global) { 'use strict'; var app = global.app = global.app || {}; var fixViewResize = function () { if (device.platform === 'iOS') { setTimeout(function() { $(document.body).height(window.innerHeight); }, 10); } }; var...
(function (global) { 'use strict'; var app = global.app = global.app || {}; app.everlive = new Everlive({ apiKey: app.config.everlive.apiKey, scheme: app.config.everlive.scheme }); var fixViewResize = function () { if (device.platform === 'iOS') { ...
Initialize earlier the Everlive instance.
Initialize earlier the Everlive instance.
JavaScript
bsd-2-clause
telerik/backend-services-push-hybrid-advanced,telerik/backend-services-push-hybrid-advanced
5bae5495c6e2518bb71ada45cc80fc98cbe94623
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), //JS Source files src: { js: ['app/js/**/*.js'] }, //JS Test files test: { karmaConfig: 'test/karma.conf.js', unit: ['test/unit/**/*.js'] }, // Configure Lint\JSHint Task jshint:...
'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), //JS Source files src: { js: ['app/js/**/*.js'] }, //JS Test files test: { karmaConfig: 'test/karma.conf.js', unit: ['test/unit/**/*.js'] }, // Configure Lint\JSHint Task jshint:...
Change tab to 4 instead of 8
Change tab to 4 instead of 8
JavaScript
mit
joetravis/angular-grunt-karma-coverage-seed
a8ed7c84080df374058353ea93f404a203d8a6b7
js/index.js
js/index.js
/** * Pulsar * * Core UI components that should always be present. * * Jadu Ltd. */ // Fixes issue with dependencies that expect both $ and jQuery to be set window.jQuery = window.$ = require('jquery'); // Global UI components var $ = require('jquery'), deck = require('./deck'), dropdown =...
/** * Pulsar * * Core UI components that should always be present. * * Jadu Ltd. */ // Fixes issue with dependencies that expect both $ and jQuery to be set window.jQuery = window.$ = require('jquery'); // Global UI components var $ = require('jquery'), deck = require('./deck'), dropdown ...
Add datatable libs to browserify config
Add datatable libs to browserify config
JavaScript
mit
jadu/pulsar,jadu/pulsar,jadu/pulsar
57e634af79738c46b25df71a12282763721a072c
js/index.js
js/index.js
module.exports = require('./load-image') require('./load-image-meta') require('./load-image-exif') require('./load-image-exif-map') require('./load-image-orientation')
module.exports = require('./load-image') require('./load-image-scale') require('./load-image-meta') require('./load-image-fetch') require('./load-image-exif') require('./load-image-exif-map') require('./load-image-orientation')
Include the scale and fetch plugins in the module.
Include the scale and fetch plugins in the module.
JavaScript
mit
blueimp/JavaScript-Load-Image,blueimp/JavaScript-Load-Image
47aefc0b32b1c008fb7cb2798b02cc7571d82380
test/fixtures/multiTargets/Gruntfile.js
test/fixtures/multiTargets/Gruntfile.js
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ echo: { one: { message: 'one has changed' }, two: { message: 'two has changed' }, wait: { message: 'I waited 2s', wait: 2000 }, interrupt: { message: 'I was interrupted', wait: 2000 }, }, watch: { one: { ...
module.exports = function(grunt) { 'use strict'; grunt.initConfig({ echo: { one: { message: 'one has changed' }, two: { message: 'two has changed' }, wait: { message: 'I waited 2s', wait: 2000 }, interrupt: { message: 'I was interrupted', wait: 5000 }, }, watch: { one: { ...
Increase interrupt test wait time to 5s
Increase interrupt test wait time to 5s
JavaScript
mit
testcodefresh/grunt-contrib-watch,testsUser/1428079884569,Ariel-Isaacm/grunt-contrib-watch,chemoish/grunt-contrib-watch,mobify/grunt-contrib-watch,Rebzie/grunt-contrib-watch,gruntjs/grunt-contrib-watch,JimRobs/grunt-chokidar,RealSkillorg/1427451101848,testsUser/1428079877839,yuhualingfeng/grunt-contrib-watch,chrisirhc/...
84e9e1957356f730aa78632971cfaa7c1b16eaef
app/scripts/controllers/logachievement.js
app/scripts/controllers/logachievement.js
angular.module('worldOfWorkCraftApp') .controller('LogAchievementCtrl', function($scope, $routeParams, $location, $http, UserData) { $scope.challengeName = $routeParams.challengeName; // TODO replace with real service endpoint $http.get('http://localhost:8080/worldofworkcraft/learner/'+UserData.username...
angular.module('worldOfWorkCraftApp') .controller('LogAchievementCtrl', function($scope, $routeParams, $location, $http, UserData) { $scope.challengeName = $routeParams.challengeName; // TODO replace with real service endpoint $http.get('http://localhost:8080/worldofworkcraft/learner/'+UserData.username...
Fix URL for logging achievement to match RequestMapping
Fix URL for logging achievement to match RequestMapping
JavaScript
mit
StevenACoffman/WorldOfWorkCraft,StevenACoffman/WorldOfWorkCraft
5e92ba10682c5e3419fd21c9f3e57a315c1e1e38
lib/configuration/hooks/i18n/index.js
lib/configuration/hooks/i18n/index.js
'use strict'; /** * Module dependencies */ // Node.js core. const path = require('path'); // Public node modules. const _ = require('lodash'); /** * i18n hook */ module.exports = function (strapi) { const hook = { /** * Default options */ defaults: { i18n: { defaultLocale: '...
'use strict'; /** * Module dependencies */ // Node.js core. const path = require('path'); // Public node modules. const _ = require('lodash'); /** * i18n hook */ module.exports = function (strapi) { const hook = { /** * Default options */ defaults: { i18n: { defaultLocale: '...
Update hook i18n to consider new locales filename
Update hook i18n to consider new locales filename
JavaScript
mit
lucusteen/strap,skelpook/strapi,evian42/starpies,lucusteen/strap,skelpook/strapi,wistityhq/strapi,evian42/starpies,evian42/starpies,wistityhq/strapi,skelpook/strapi,lucusteen/strap
f4f9703afebfcb51bb6a7905b930feef160f41aa
src/utils/file-loader.js
src/utils/file-loader.js
VideoStream.utils.loadFileFromURL = function(file, dir = '.'){ if(!file){ return new Promise(function(resolve){resolve('');}); } var path = file; if(file.startsWith('/') == false && file.startsWith(/http(s):\/\/|file:\/\//) == false){ path = dir.endsWith('/') ? dir + file : dir + '/' + file; } retu...
VideoStream.utils.loadFileFromURL = function(file, dir = '.'){ if(!file){ return new Promise(function(resolve){resolve(null);}); } var path = file; if(file.startsWith('/') == false && file.startsWith(/http(s):\/\/|file:\/\//) == false){ path = dir.endsWith('/') ? dir + file : dir + '/' + file; } re...
Change return type on empty arguments
Change return type on empty arguments
JavaScript
apache-2.0
2b2/video-stream.js
a08e21fb52b0c46b8b90221719fb54c56f06d317
tests/unit/mixins/service-cache-test.js
tests/unit/mixins/service-cache-test.js
import Ember from 'ember'; import ServiceCacheMixin from '../../../mixins/service-cache'; import { module, test } from 'qunit'; module('Unit | Mixin | service cache'); // Replace this with your real tests. test('it works', function(assert) { var ServiceCacheObject = Ember.Object.extend(ServiceCacheMixin); var sub...
import Ember from 'ember'; import ServiceCacheMixin from '../../../mixins/service-cache'; import { module, test } from 'qunit'; import { Post } from 'dummy/tests/helpers/resources'; let sandbox, subject; module('Unit | Mixin | service cache', { beforeEach() { sandbox = window.sinon.sandbox.create(); let Ser...
Add unit tests for service cache mixin
Add unit tests for service cache mixin
JavaScript
mit
Rahien/ember-jsonapi-resources,pixelhandler/ember-jsonapi-resources,kmkamruzzaman/ember-jsonapi-resources,greyhwndz/ember-jsonapi-resources,proteamer/ember-jsonapi-resources,rwjblue/ember-jsonapi-resources,Rahien/ember-jsonapi-resources,greyhwndz/ember-jsonapi-resources,proteamer/ember-jsonapi-resources,pixelhandler/em...
41c4f7f557aa24983a6367a715bdfcc3f4e7ff78
test.js
test.js
'use strict'; var test = require('ava'); var githubRepos = require('./'); test('user with more than 100 repos', function (t) { t.plan(2); var token = '523ef691191741c99d5afbcfe58079bfa0038771'; githubRepos('kevva', {token: token}, function (err, data) { t.assert(!err, err); t.assert(data.length, data.length);...
'use strict'; var test = require('ava'); var githubRepos = require('./'); test('user with more than 100 repos', function (t) { t.plan(2); var token = '523ef691191741c99d5afbcfe58079bfa0038771'; githubRepos('kevva', {token: token}, function (err, data) { t.assert(!err, err); t.assert(data.length, data.length);...
Test two subsequent requests get the same data
Test two subsequent requests get the same data
JavaScript
mit
forivall/github-repositories,kevva/github-repositories
dec57486ad76b180f7bd4c1e4541d046677addcf
src/projects/ll-links.js
src/projects/ll-links.js
import { inject, bindable, bindingMode } from 'aurelia-framework'; import { EventAggregator } from 'aurelia-event-aggregator'; @inject(EventAggregator) export class LlLinks { @bindable({ defaultBindingMode: bindingMode.twoWay }) source; constructor(eventAggregator) { this.ea = eventAggregator; ...
import { inject, bindable, bindingMode } from 'aurelia-framework'; import { EventAggregator } from 'aurelia-event-aggregator'; @inject(EventAggregator) export class LlLinks { @bindable({ defaultBindingMode: bindingMode.twoWay }) source; constructor(eventAggregator) { this.ea = eventAggregator; ...
Fix links on project not saved because of failed init
Fix links on project not saved because of failed init
JavaScript
mit
GETLIMS/LIMS-Frontend,GETLIMS/LIMS-Frontend
86222918e01b9ab91b8a14c2c8990857b944f953
src/routes/case/utils.js
src/routes/case/utils.js
/* @flow */ const CONSUMER = 'Consumer'; const NON_CONSUMER = 'Non Consumer'; const days = (date: number) => date / 1000 / 60 / 60 / 24; const ConsumerParty = { type: 'Consumer', name: 'Consumer', }; function partyType(initiatingParty: ?string) { switch (initiatingParty) { case 'Non Consumer': case 'B...
/* @flow */ const CONSUMER = 'Consumer'; const NON_CONSUMER = 'Non Consumer'; const days = (date: number) => Math.floor(date / 1000 / 60 / 60 / 24); const ConsumerParty = { type: 'Consumer', name: 'Consumer', }; function partyType(initiatingParty: ?string) { switch (initiatingParty) { case 'Non Consumer':...
Fix date display on case
Fix date display on case
JavaScript
mit
LevelPlayingField/levelplayingfield,LevelPlayingField/levelplayingfield
264e9a53b02f983f2131123eb02a2c17b37bf3b8
lib/plugin/theme/renderable/renderable.js
lib/plugin/theme/renderable/renderable.js
"use strict"; const merge = require('../../../util/merge'); const {coroutine: co} = require('bluebird'); class Renderable { constructor(data) { this.parent = undefined; this.data = data || {}; this.id = this.constructor.id; this.name = this.constructor.name; this.templateFile = this.constructor....
"use strict"; const merge = require('../../../util/merge'); const {coroutine: co} = require('bluebird'); class Renderable { constructor(data) { this.parent = undefined; this.data = data || {}; this.id = this.constructor.id; this.name = (data && data.name) ? data.name : this.constructor.name; thi...
Allow Renderable name to be included in initialization data
Allow Renderable name to be included in initialization data
JavaScript
mit
coreyp1/defiant,coreyp1/defiant
4cdab30201d079b0b7112c14ec56615e94155692
tasks/prepare-package.js
tasks/prepare-package.js
const fs = require('fs'); const path = require('path'); const pkg = require('../package.json'); const buildDir = path.resolve(__dirname, '../build/ol'); // update the version number in util.js const utilPath = path.join(buildDir, 'util.js'); const versionRegEx = /const VERSION = '(.*)';/g; const utilSrc = fs.readFile...
const fs = require('fs'); const path = require('path'); const pkg = require('../package.json'); const buildDir = path.resolve(__dirname, '../build/ol'); // update the version number in util.js const utilPath = path.join(buildDir, 'util.js'); const versionRegEx = /var VERSION = '(.*)';/g; const utilSrc = fs.readFileSy...
Replace VERSION correctly in transpiled code
Replace VERSION correctly in transpiled code
JavaScript
bsd-2-clause
geekdenz/openlayers,ahocevar/openlayers,stweil/ol3,adube/ol3,mzur/ol3,oterral/ol3,tschaub/ol3,ahocevar/openlayers,bjornharrtell/ol3,fredj/ol3,geekdenz/ol3,geekdenz/openlayers,stweil/openlayers,ahocevar/ol3,oterral/ol3,fredj/ol3,mzur/ol3,tschaub/ol3,oterral/ol3,openlayers/openlayers,stweil/openlayers,tschaub/ol3,geekden...
8c12936d9664b80716344c8f7e389cf2efcefeb7
frontend/src/components/chat/navigation/DeleteAccountForm.js
frontend/src/components/chat/navigation/DeleteAccountForm.js
import React, { Component } from 'react'; import {Button} from 'react-bootstrap'; class DeleteAccountForm extends Component { constructor(props) { super(props); this.state = { displayDeleteAccountMessage: false }; } handleDeleteAccountButton = () => { this.setSt...
import React, { Component } from 'react'; import {Button} from 'react-bootstrap'; import * as config from '../../config'; import axios from 'axios'; axios.defaults.withCredentials = true; class DeleteAccountForm extends Component { constructor(props) { super(props); this.state = { disp...
Call backend view on delete account frontend
Call backend view on delete account frontend
JavaScript
mit
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
27e999ba0fce125acc05c651ffe27811e639360a
static/js/services/dialogs.js
static/js/services/dialogs.js
/* * Spreed WebRTC. * Copyright (C) 2013-2014 struktur AG * * This file is part of Spreed WebRTC. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License...
/* * Spreed WebRTC. * Copyright (C) 2013-2014 struktur AG * * This file is part of Spreed WebRTC. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License...
Update dialog service to use defaults of angular ui-bootstrap.
Update dialog service to use defaults of angular ui-bootstrap.
JavaScript
agpl-3.0
tymiles003/spreed-webrtc,fancycode/spreed-webrtc,gerzhan/spreed-webrtc,theurere/spreed-webrtc,shelsonjava/spreed-webrtc,fancycode/spreed-webrtc,gerzhan/spreed-webrtc,gerzhan/spreed-webrtc,tymiles003/spreed-webrtc,shelsonjava/spreed-webrtc,gerzhan/spreed-webrtc,shelsonjava/spreed-webrtc,gerzhan/spreed-webrtc,shelsonjava...
aaaa6b05c25c3cd7c24d54bfbf906ee77f109f90
spec/process-tree.spec.js
spec/process-tree.spec.js
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. const processTree = require("../lib/process-tree"); let treeSpy = function(logTree, runningProcess) { let spy = { }; spy.tree = logT...
// Copyright (c) 2017 The Regents of the University of Michigan. // All Rights Reserved. Licensed according to the terms of the Revised // BSD License. See LICENSE.txt for details. const processTree = require("../lib/process-tree"); let treeSpy = function(logTree, runningProcess) { let spy = { }; spy.tree = logT...
Use async/await instead of Promise().then
:art: Use async/await instead of Promise().then
JavaScript
bsd-3-clause
daaang/awful-mess
da007b0590fb4540bc1c8b5d32a140ef57ccf720
lib/IntersectionParams.js
lib/IntersectionParams.js
/** * * IntersectionParams.js * * copyright 2002, Kevin Lindsey * */ /** * IntersectionParams * * @param {String} name * @param {Array<Point2D} params * @returns {IntersectionParams} */ function IntersectionParams(name, params) { this.init(name, params); } /** * init * * @param {String} n...
/** * * IntersectionParams.js * * copyright 2002, Kevin Lindsey * */ /** * IntersectionParams * * @param {String} name * @param {Array<Point2D} params * @returns {IntersectionParams} */ function IntersectionParams(name, params) { this.init(name, params); } !function () { IntersectionParams...
Make IntersectionPrams standard type strings available as constants.
Make IntersectionPrams standard type strings available as constants.
JavaScript
bsd-3-clause
Quazistax/kld-intersections,effektif/svg-intersections
7c2a06e6f1d47874b9e394aec4383f5c3a066ab4
public/src/core/track-network.js
public/src/core/track-network.js
/* @autor: Robin Giles Ribera * Module: TrackNetwork * Used on trackevent.js */ define( [], function() { console.log("[TrackNetwork][***###***]"); function TrackNetwork() { this.drawLine = function() { console.log("[DrawLine][***###***]"); var canvasElem = document.getElementById("tracks-container-canva...
/* @autor: Robin Giles Ribera * Module: TrackNetwork * Used on trackevent.js */ define( [], function() { function TrackNetwork() { //Adds a line in the drawing loop of the background canvas this.addLine = function(start_x, start_y, end_x, end_y, color) { lines.push({ start:{ x: start_x, y: s...
Add method 'AddLine' to the Module TrackNetwork
Add method 'AddLine' to the Module TrackNetwork
JavaScript
mit
robinparadise/videoquizmaker,robinparadise/videoquizmaker
cfdc132456e7269377974206939bc0d094f0848b
test/e2e/pages/invite.js
test/e2e/pages/invite.js
'use strict'; var Chance = require('chance'), chance = new Chance(); class InvitePage { constructor () { this.titleEl = element(by.css('.project-title')); this.message = chance.sentence(); this.AddPeopleBtn = element(by.css('.invite-button')); this.inviteBtn = element(by.css('[ng-click="invi...
'use strict'; var Chance = require('chance'), chance = new Chance(); class InvitePage { constructor () { this.titleEl = element(by.css('.project-title')); this.message = chance.sentence(); this.AddPeopleBtn = element(by.css('.invite-button')); this.inviteBtn = element(by.css('[ng-click="invi...
Add missing function calls in tests
Add missing function calls in tests
JavaScript
agpl-3.0
Grasia/teem,P2Pvalue/teem,P2Pvalue/teem,P2Pvalue/pear2pear,Grasia/teem,Grasia/teem,P2Pvalue/teem,P2Pvalue/pear2pear
8bda805d45b23c5c46988acf2d27863b0ed4092a
test/git-diff-archive.js
test/git-diff-archive.js
"use strict"; const assert = require("power-assert"); const rimraf = require("rimraf"); const unzip = require("unzip"); const gitDiffArchive = require("../"); const ID1 = ""; const ID2 = ""; const OUTPUT_DIR = `${__dirname}/tmp`; const OUTPUT_PATH = `${OUTPUT_DIR}/output.zip`; describe("git-diff-archive", () => { ...
"use strict"; const fs = require("fs"); const path = require("path"); const assert = require("power-assert"); const glob = require("glob"); const rimraf = require("rimraf"); const unzip = require("unzip"); const gitDiffArchive = require("../"); const ID1 = "b148b54"; const ID2 = "acd6e6d"; const EMPTY_ID1 = "f74c8e2"...
Add promise & create zip tests
Add promise & create zip tests
JavaScript
mit
tsuyoshiwada/git-diff-archive
de2fb2c260720ae3142066f2a3b611b7ba922af6
spec/specs.js
spec/specs.js
describe('pingPong', function() { it("is true for a number that is divisible by 3", function() { expect(pingPong(6)).to.equal(true); }); it("is true for a number that is divisible by 5", function() { expect(pingPong(10)).to.equal(true); }); it("is false for a number that is not divisible by 3 or 5", f...
describe('pingPong', function() { it("returns ping for a number that is divisible by 3", function() { expect(pingPong(6)).to.equal("ping"); }); it("returns pong for a number that is divisible by 5", function() { expect(pingPong(10)).to.equal("pong"); }); it("returns ping pong for a number that is divi...
Change spec test according to new javascript test code
Change spec test according to new javascript test code
JavaScript
mit
kcmdouglas/pingpong,kcmdouglas/pingpong
cc345fd8262974e3cc192c71199c6555d06bb161
examples/2DScrolling/2DScrolling.js
examples/2DScrolling/2DScrolling.js
var scrollingExample = { box: { id: "clip", className: "clip", children: { id: "image", className: "image" } }, constraints: [ "clip.left == 0", "clip.top == 0", "clip.right == 300", "clip.bottom == 300", // Spec...
var scrollingExample = { box: { id: "clip", className: "clip", children: { id: "image", className: "image" } }, constraints: [ "clip.left == 0", "clip.top == 0", "clip.right == 300", "clip.bottom == 300", // Spec...
Clean up weak initial position constraints.
Clean up weak initial position constraints.
JavaScript
apache-2.0
iamralpht/slalom,iamralpht/slalom,iamralpht/slalom
4d39b6e4e1334d571e8e03823740a7b5f8ebf218
routes/questionRoute.js
routes/questionRoute.js
var QuestionCtrl = require('../controllers/questionCtrl.js'); module.exports = function(express, app){ var router = express.Router(); router.post('/', QuestionCtrl.create); router.get('/', QuestionCtrl.get); router.put('/status', QuestionCtrl.set); app.use('/questions', router); };
var QuestionCtrl = require('../controllers/questionCtrl.js'); module.exports = function(express, app) { var router = express.Router(); router.post('/', QuestionCtrl.create); router.get('/', QuestionCtrl.get); router.post('/status', QuestionCtrl.set); app.use('/questions', router); };
Use post over put for the status change api
Use post over put for the status change api
JavaScript
mit
EasyAce-Edu/easyace-api
edb127f1c41dfb84bcb367cf4076cb25bda52727
tests/specs/math.test.js
tests/specs/math.test.js
define(['base'], function (base) { "use strict"; var math = base.math; describe("math", function () { it(".factorial()", function () { expect(typeof math.factorial).toBe('function'); [[0,1], [1,1], [2,2], [3,6], [4,24], [5,120], [6,720]].forEach(function (test) { expect(math.factorial(test[0])).toBe(te...
define(['base'], function (base) { "use strict"; var math = base.math; describe("math", function () { it(".clamp()", function () { expect(typeof math.clamp).toBe('function'); for (var i = -2; i < 5; ++i) { for (var min = -2; min < 3; ++min) { for (var max = min + 1; max < 4; ++max) { var cla...
Test cases for math.sign() and math.clamp()
Test cases for math.sign() and math.clamp()
JavaScript
mit
LeonardoVal/creatartis-base,LeonardoVal/creatartis-base
1999ff53d63ec55759b6ccb9109904a467585aa9
src/adapters/cli/serve.js
src/adapters/cli/serve.js
#!/usr/bin/env node /* @flow */ import { serve } from 'aspect/src/adapters/server' async function run(): Promise<void> { const server = await serve({ port: 'PORT' in process.env ? Number(process.env.PORT) : null }) console.log(`Running server at http://127.0.0.1:${server.port}`) } run()
#!/usr/bin/env node /* @flow */ import { serve } from 'aspect/src/adapters/server' import { parseEnv, optional } from 'env' async function run(): Promise<void> { const config = parseEnv({ PORT: optional(Number) }) const server = await serve({ port: config.PORT }) console.log(`Running server at http:...
Use env library to parse config out of environment
Use env library to parse config out of environment
JavaScript
mit
vinsonchuong/aspect,vinsonchuong/aspect
7ffa7a9528767ff915e1179e7e6dd7eec66e5afc
utils/slimer-script.js
utils/slimer-script.js
/*global slimer */ var webpage = require("webpage").create(); var messages = []; var system = require("system"); var args = system.args; var url = args[1] || ""; var thumbPath = args[2] || ""; webpage.onConsoleMessage = function(message, line, file) { console.log(message); }; webpage.onError = function(message) ...
/*global slimer */ var webpage = require("webpage").create(); var messages = []; var system = require("system"); var args = system.args; var url = args[1] || ""; var thumbPath = args[2] || ""; webpage.onConsoleMessage = function(message, line, file) { console.log(message); }; webpage.onError = function(message) ...
Remove example info text before rendering
Remove example info text before rendering
JavaScript
mit
variablestudio/pex-examples,pex-gl/pex-examples
af100fdb60b7d5bce620249be4a6370d345071e1
packages/standard-minifier-css/package.js
packages/standard-minifier-css/package.js
Package.describe({ name: 'standard-minifier-css', version: '1.3.3-beta.1', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); Package.registerBuildPlugin({ name: "minifyStdCSS", use: [ 'minifier-css@1.2.14' ], npmDependencies: { "source-map": "0.5...
Package.describe({ name: 'standard-minifier-css', version: '1.3.3', summary: 'Standard css minifier used with Meteor apps by default.', documentation: 'README.md' }); Package.registerBuildPlugin({ name: "minifyStdCSS", use: [ 'minifier-css@1.2.14' ], npmDependencies: { "source-map": "0.5.6", ...
Remove -beta.n suffix from standard-minifier-css before republishing.
Remove -beta.n suffix from standard-minifier-css before republishing.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
7b02cbde4f8e6118597e940cbc332251a86199b9
demos/demos.js
demos/demos.js
// Demo components. import "./src/CalendarDayMoonPhase.js"; import "./src/CarouselComboBox.js"; import "./src/CountryListBox.js"; import "./src/CustomCarousel2.js"; import "./src/CustomDrawer.js"; import "./src/FocusVisibleTest.js"; import "./src/LabeledColorSwatch.js"; import "./src/LocaleSelector.js"; import "./src/M...
// Demo components. import "./src/CalendarDayMoonPhase.js"; import "./src/CarouselComboBox.js"; import "./src/CountryListBox.js"; import "./src/CustomCarousel2.js"; import "./src/CustomDrawer.js"; import "./src/LabeledColorSwatch.js"; import "./src/LocaleSelector.js"; import "./src/MessageListBox.js"; import "./src/Mes...
Remove reference to old demo.
Remove reference to old demo.
JavaScript
mit
JanMiksovsky/elix,elix/elix,JanMiksovsky/elix,elix/elix
9cea73194d1274f475fae552ba1cf2ac7a2a4ded
dist/store_watch_mixin.js
dist/store_watch_mixin.js
var StoreWatchMixin = function(stores, options) { if (!options) options = {}; options.addListenerFnName = options.addListenerFnName || 'addChangeListener'; options.removeListenerFnName = options.removeListenerFnName || 'removeChangeListener'; options.handlerName = options.handlerName || 'onStoreChange'; re...
var StoreWatchMixin = function(stores, options) { if (!options) options = {}; options.addListenerFnName = options.addListenerFnName || 'addChangeListener'; options.removeListenerFnName = options.removeListenerFnName || 'removeChangeListener'; options.handlerName = options.handlerName || 'onStoreChange'; re...
Throw instead of warning when the handler is not declared
Throw instead of warning when the handler is not declared
JavaScript
mit
rafaelchiti/flux-commons-store-watch-mixin
da316224e7a440d30c944a0ecd17e65e1d7528d9
api/image.js
api/image.js
var http = require('http'); var request = require('request').defaults({ encoding: null }); var url = require('url'); var h = { 'Referer': null, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' }; function error (response) { response.writeHead(404); response.end(); retur...
var http = require('http'); var request = require('request').defaults({ encoding: null }); var headers = { 'Referer': null, 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' }; var result; function error (response) { response.writeHead(404); response.end(); return; } h...
Update API to do -all- the logic
Update API to do -all- the logic
JavaScript
mit
jillesme/ng-movies
9c1345b65035216149de35a8959fd6d086c65d44
website/static/js/pages/profile-page.js
website/static/js/pages/profile-page.js
/** * Initialization code for the profile page. Currently, this just loads the necessary * modules and puts the profile module on the global context. * */ var $ = require('jquery'); var m = require('mithril'); require('../project.js'); // Needed for nodelists to work require('../components/logFeed.js'); // Needed f...
/** * Initialization code for the profile page. Currently, this just loads the necessary * modules and puts the profile module on the global context. * */ var $ = require('jquery'); var m = require('mithril'); require('../project.js'); // Needed for nodelists to work require('../components/logFeed.js'); // Needed f...
Stop mounting quickfiles if no quickfiles
Stop mounting quickfiles if no quickfiles
JavaScript
apache-2.0
TomBaxter/osf.io,icereval/osf.io,aaxelb/osf.io,CenterForOpenScience/osf.io,adlius/osf.io,Johnetordoff/osf.io,TomBaxter/osf.io,cslzchen/osf.io,caseyrollins/osf.io,crcresearch/osf.io,HalcyonChimera/osf.io,baylee-d/osf.io,binoculars/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,felliott/osf.io,aaxelb/osf.io,erinspace/osf.io,...
66db7e0c65a87a3b5a613b39b0cb9fc093e67609
client/controllers/marketing/marketing.js
client/controllers/marketing/marketing.js
MarketingController = RouteController.extend({ waitOn: function () { return Meteor.subscribe('marketing'); }, action: function () { var indexPage = Pages.findOne(); if (indexPage) { Router.go('pages.show', { _id: indexPage.slug || indexPage._id }); } else { this.render(); } } })...
MarketingController = RouteController.extend({ waitOn: function () { return Meteor.subscribe('marketing'); }, action: function () { var indexPage = Pages.findOne({ type: 'INDEX' }); if (indexPage) { Router.go('pages.show', { _id: indexPage.slug || indexPage._id }); } else { this.rende...
Add constrain type index for home page
Add constrain type index for home page
JavaScript
mit
bojicas/letterhead,bojicas/letterhead
8a13fac752a4eb37f7b28a7baa938b5228bb9d6b
webpack.config.react-responsive-select.js
webpack.config.react-responsive-select.js
const nodeExternals = require('webpack-node-externals'); const path = require('path'); const entry = './src/ReactResponsiveSelect.js'; const library = 'ReactResponsiveSelect'; const module = { rules: [{ test: /\.js$/, loader: 'babel-loader', exclude: path.resolve(__dirname, 'node_modules') }] }; modul...
const nodeExternals = require('webpack-node-externals'); const path = require('path'); const entry = './src/ReactResponsiveSelect.js'; const library = 'ReactResponsiveSelect'; const moduleConfig = { rules: [{ test: /\.js$/, loader: 'babel-loader', exclude: path.resolve(__dirname, 'node_modules') }] }; ...
Remove name conflict module => moduleConfig
Remove name conflict module => moduleConfig
JavaScript
mit
benbowes/react-responsive-select,benbowes/react-responsive-select,benbowes/react-responsive-select
87f37e3b1f94aaae56ae59dfd775f08abe15f7bc
server/models/bikeshed.js
server/models/bikeshed.js
/** * Bikeshed model */ import Joi from 'joi' import * as utils from './utils' export const INDEXES = ['userId', 'createdAt'] export const TABLE = 'bikesheds' export const TYPE = 'Bikeshed' export const FileListItemSchema = Joi.object().keys({ fieldname: Joi.string(), originalname: Joi.string(), encoding: Joi...
/** * Bikeshed model */ import Joi from 'joi' import BaseModel from './model' const FileListItemSchema = Joi.object() .keys({ fieldname: Joi.string(), originalname: Joi.string(), encoding: Joi.string(), mimetype: Joi.string(), size: Joi.number(), key: Joi.string() }) const BikeshedSchema = Joi.object() ...
Update Bikeshed to use BaseModel
Update Bikeshed to use BaseModel
JavaScript
apache-2.0
cesarandreu/bshed,cesarandreu/bshed
98512d9d51ab29b6bf9cf57a90958adc31ddc2a3
app/routes/index.js
app/routes/index.js
'use strict'; var path = process.cwd(); module.exports = function (app) { app.route('/') .get(function (req, res) { res.sendFile(path + '/public/index.html'); }); app.route('/:time') .get(function(req, res) { console.log("Reached the regexp route for", req.url); let timeStr = req.params.time; ...
'use strict'; var path = process.cwd(); module.exports = function (app) { app.route('/') .get(function (req, res) { res.sendFile(path + '/public/index.html'); }); app.route('/:time') .get(function(req, res) { console.log("Reached the regexp route for", req.url); let timeStr = req.params.time; ...
Return null for the the properties if the string cannot be parsed as a date
Return null for the the properties if the string cannot be parsed as a date
JavaScript
mit
paperbagcorner/timestamp-microservice,paperbagcorner/timestamp-microservice
cdc1a125c60dad38fb52403b8c6bea79d7fcffbd
renderer-process/scrubVideoToTimestamp.js
renderer-process/scrubVideoToTimestamp.js
const moment = require('moment') const scrubVideoToTimestamp = function () { let player = document.getElementsByTagName('video')[0] let timestamp = this.innerHTML const timeToGoTo = moment.duration({ seconds: timestamp.split(':')[1], minutes: timestamp.split(':')[0] }).asSeconds() console.log(timest...
const moment = require('moment') const scrubVideoToTimestamp = function () { let player = document.getElementsByTagName('video')[0] let timestamp = this.innerHTML const timeToGoTo = moment .duration(timestamp) .asSeconds() console.log(timestamp) console.log(timeToGoTo) if (player !== null && play...
Use momentjs duration to parse timestamps
Use momentjs duration to parse timestamps
JavaScript
agpl-3.0
briandk/transcriptase,briandk/transcriptase
5eb79eb1492fdf3bd759bf7c04a57d516ad0581f
src/deploy.js
src/deploy.js
#!/bin/node import path from 'path'; import fs from 'fs'; import {all as rawMetadata} from '../katas/es6/language/__raw-metadata__'; import {writeToFileAsJson} from './_external-deps/filesystem'; import MetaData from './metadata.js'; import FlatMetaData from './flat-metadata'; import GroupedMetaData from './grouped-m...
#!/bin/node import path from 'path'; import fs from 'fs'; import {all as rawMetadata} from '../katas/es6/language/__raw-metadata__'; import {writeToFileAsJson} from './_external-deps/filesystem'; import MetaData from './metadata.js'; import FlatMetaData from './flat-metadata'; import GroupedMetaData from './grouped-m...
Fix the path because the file had moved.
Fix the path because the file had moved.
JavaScript
mit
tddbin/katas,tddbin/katas,tddbin/katas