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
6946908ae19972853902e2e0aaf01f35b18731b8
src/prefabs/datatype_number.js
src/prefabs/datatype_number.js
var BigNumber = require("bignumber.js"); class ErlNumber { constructor(value) { this.value = new BigNumber(value); } toString() { return this.value.toString(); } static isErlNumber(erlnum) { return erlnum instanceof ErlNumber; } static cloneNumber(erlnum) { ...
var BigNumber = require("bignumber.js"); // Constructor function ErlNumber(value) { this.value = new BigNumber(value); } // Static Methods ErlNumber.isErlNumber = function(erlnum) { return erlnum instanceof ErlNumber; } ErlNumber.cloneNumber = function(erlnum) { return new ErlNumber(erlnum.toString());...
Change format of ErlNumber class
Change format of ErlNumber class
JavaScript
mit
Vereis/jarlang,Vereis/jarlang
96e350cb21377ca65d0c05ae63f37416fa0b0f65
models/student.model.js
models/student.model.js
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const studentSchema = new Schema({ fname: String, lname: String, csub_id: Number, gender: String, created_at: Date, evaluations: [ { wais: { vc: Number, pri: Number, wmi: Number, ps: Number, ...
const mongoose = require('mongoose'); const Schema = mongoose.Schema; const studentSchema = new Schema({ fname: String, lname: String, csub_id: Number, gender: String, created_at: Date, evaluations: { wais: { vc: Number, pri: Number, wmi: Number, ps: Number, fsiq: Number, ...
Use key/val data structure for evaluations
Use key/val data structure for evaluations
JavaScript
mit
corykitchens/gaus,corykitchens/gaus
f3cc961adfdaacfa43b2bc6349a389679f14740e
modules/chaos-monkey.js
modules/chaos-monkey.js
'use strict'; /** * Stubby Chaos Money Demo Module */ var StubbyChaosMonkey = function() { /* min is inclusive, and max is exclusive */ var getRandomArbitrary = function(min, max) { return Math.random() * (max - min) + min; }; var getRandomHTTPStatus = function() { return getRandomArbitrary(100,...
'use strict'; /** * Stubby Chaos Money Demo Module */ var StubbyChaosMonkey = function() { /* min is inclusive, and max is exclusive */ var getRandomArbitrary = function(min, max) { return Math.random() * (max - min) + min; }; var getRandomHTTPStatus = function() { return getRandomArbitrary(100,...
Remove empty event handler in chaos monkey
Remove empty event handler in chaos monkey
JavaScript
mit
gocardless/stubby,gocardless/stubby,gocardless/stubby
046b30842e00b37d8b30c899b7af06b76a7b4434
encryption.js
encryption.js
var crypto = require('crypto'); var iv = new Buffer(""); function createCryptor(key) { key = new Buffer(key); return function encrypt(data) { var cipher = crypto.createCipheriv("bf-ecb", key, iv); try { return Buffer.concat([ cipher.update(data), ciph...
var crypto = require('crypto'); var iv = new Buffer(""); var PADDING_LENGTH = 16; var PADDING = Array(PADDING_LENGTH).join("\0"); function createCryptor(key) { key = new Buffer(key); return function encrypt(data) { var cipher = crypto.createCipheriv("bf-ecb", key, iv); cipher.setAutoPadding(fa...
Fix null padding issues to pass tests
Fix null padding issues to pass tests
JavaScript
mit
dlom/anesidora
364541ae389891a27d7e1b2a87c9e37e25f50bae
src/store/reducers/captures.js
src/store/reducers/captures.js
function faceCaptures(state = [], action) { switch (action.type) { case 'FACE_CAPTURE': return [action.data, ...state] default: return state } } function documentCaptures(state = [], action) { switch (action.type) { case 'DOCUMENT_CAPTURE': return [action.data, ...state] default...
function faceCaptures(state = [], action) { switch (action.type) { case 'FACE_CAPTURE': return [action.payload, ...state] default: return state } } function documentCaptures(state = [], action) { switch (action.type) { case 'DOCUMENT_CAPTURE': return [action.payload, ...state] d...
Rename action data to payload
Rename action data to payload
JavaScript
mit
onfido/onfido-sdk-core
25158df23cfefb8c770da68393e8229a3b5ee39f
src/renderers/NotAnimatedContextMenu.js
src/renderers/NotAnimatedContextMenu.js
import React from 'react'; import { View } from 'react-native'; import { computePosition, styles } from './ContextMenu'; /** Simplified version of ContextMenu without animation. */ export default class NotAnimatedContextMenu extends React.Component { render() { const { style, children, layouts, ...other } = th...
import React from 'react'; import { I18nManager, View } from 'react-native'; import { computePosition, styles } from './ContextMenu'; /** Simplified version of ContextMenu without animation. */ export default class NotAnimatedContextMenu extends React.Component { render() { const { style, children, layouts, .....
Add RTL for not animated menu
Add RTL for not animated menu
JavaScript
isc
instea/react-native-popup-menu
1de65779516311c98f38f9c77bb13cab2716e5f6
.eslintrc.js
.eslintrc.js
module.exports = { extends: [ 'onelint' ], plugins: ['import'], rules: { 'import/no-extraneous-dependencies': [ 'error', { devDependencies: [ '**/test/**/*.js' ], optionalDependencies: false, peerDependencies: false ...
module.exports = { extends: [ 'onelint' ], plugins: ['import'], rules: { 'import/no-extraneous-dependencies': [ 'error', { devDependencies: [ '**/test/**/*.js', '**/bootstrap-unexpected-markdown.js' ], optionalDependencies: false, ...
Allow use of 'require' in the docs bootstrap
Allow use of 'require' in the docs bootstrap
JavaScript
mit
alexjeffburke/unexpected,unexpectedjs/unexpected,alexjeffburke/unexpected
f771deccadd644e2f79ff975fcb594c3639265c7
src/templates/post-template.js
src/templates/post-template.js
import React from 'react' import Helmet from 'react-helmet' import { graphql } from 'gatsby' import Layout from '../components/Layout' import PostTemplateDetails from '../components/PostTemplateDetails' class PostTemplate extends React.Component { render() { const { title, subtitle } = this.props.data.site.siteM...
import React from 'react' import Helmet from 'react-helmet' import { graphql } from 'gatsby' import Layout from '../components/Layout' import PostTemplateDetails from '../components/PostTemplateDetails' class PostTemplate extends React.Component { render() { const { title, subtitle } = this.props.data.site.siteM...
Fix social links at the bottom of posts
Fix social links at the bottom of posts
JavaScript
mit
schneidmaster/schneid.io,schneidmaster/schneid.io
e5a2221ec332ba1f3cd2fc8888770bdf31e9b851
element.js
element.js
var walk = require('dom-walk') var FormData = require('./index.js') module.exports = getFormData function buildElems(rootElem) { var hash = {} if (rootElem.name) { hash[rootElem.name] = rootElem return hash } walk(rootElem, function (child) { if (child.name) { hash[...
var walk = require('dom-walk') var FormData = require('./index.js') module.exports = getFormData function buildElems(rootElem) { var hash = {} if (rootElem.name) { hash[rootElem.name] = rootElem } walk(rootElem, function (child) { if (child.name) { hash[child.name] = child ...
Remove return early from buildElems
Remove return early from buildElems
JavaScript
mit
Raynos/form-data-set
4061d46dcfb7c33b22e8f1c50c76b507f596dd7a
app/models/booking_model.js
app/models/booking_model.js
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var Objectid = mongoose.Schema.Types.ObjectId; var BookingSchema = new Schema({ room: Objectid, start_time: Date, end_time: Date, title: String, member: String, _owner_id: Objectid }); BookingSchema.set("_perms", { admin: "crud", o...
var mongoose = require('mongoose'); var Schema = mongoose.Schema; var Objectid = mongoose.Schema.Types.ObjectId; var BookingSchema = new Schema({ room: Objectid, start_time: Date, end_time: Date, title: String, member: String, cost: Number, _owner_id: Objectid }); BookingSchema.set("_perms", { ad...
Handle Reserve from Booking Model
Handle Reserve from Booking Model
JavaScript
mit
10layer/jexpress,j-norwood-young/jexpress,j-norwood-young/jexpress,10layer/jexpress,j-norwood-young/jexpress
e34eb8ad630540f45f74c3a22e91595e6403e26c
src/reducers/author.js
src/reducers/author.js
'use strict' import * as types from '../constants/action-types' import { REQUEST_PAGE_START_FROM } from '../constants/author-page' import get from 'lodash/get' import isArray from 'lodash/isArray' import merge from 'lodash/merge' import uniq from 'lodash/uniq' const _ = { get, isArray, merge, uniq } const i...
'use strict' import * as types from '../constants/action-types' import { REQUEST_PAGE_START_FROM } from '../constants/author-page' import get from 'lodash/get' import isArray from 'lodash/isArray' import uniq from 'lodash/uniq' const _ = { get, isArray, uniq } const initialStates = { isFetching: false } ex...
Use assign instead of merge
Use assign instead of merge
JavaScript
agpl-3.0
hanyulo/twreporter-react,garfieldduck/twreporter-react,nickhsine/twreporter-react,garfieldduck/twreporter-react,hanyulo/twreporter-react,twreporter/twreporter-react
a107b97aca1d6346811f4fba3bd2cc0dcded2dff
lib/helpers.js
lib/helpers.js
o_.capitaliseFirstLetter = function(string){ return string.charAt(0).toUpperCase() + string.slice(1); }; o_.lowerFirstLetter = function(string){ if(!string) return; return string.charAt(0).toLowerCase() + string.slice(1); }; o_.sanitizeObject = function(object){ if(Meteor.isServer){ var saniti...
o_.capitaliseFirstLetter = function(string){ return string.charAt(0).toUpperCase() + string.slice(1); }; o_.lowerFirstLetter = function(string){ if(!string) return; return string.charAt(0).toLowerCase() + string.slice(1); }; o_.sanitizeObject = function(object){ if(Meteor.isServer){ var saniti...
Allow <a>-tags for policyAreas.summary and policies.summary
Allow <a>-tags for policyAreas.summary and policies.summary
JavaScript
mit
carlbror/political-works,carlbror/political-works
a894ec199d6335794110b6b54d5b63583bc80da7
lib/boilerUtils.js
lib/boilerUtils.js
/* boilerUtils * This object holds functions that assist Boilerplate */ var boilerUtils = {} boilerUtils.renderAction = function renderAction (action) { return { 'string': altboiler.getTemplate, 'function': action }[typeof action](action) }, boilerUtils.getBoilerTemplateData = function getTemplateData ...
/* boilerUtils * This object holds functions that assist Boilerplate */ var boilerUtils = {} boilerUtils.renderAction = function renderAction (action) { return { 'string': altboiler.getTemplate, 'function': action }[typeof action](action) }, boilerUtils.getBoilerTemplateData = function getTemplateData ...
Fix a small bug related to onLoadHooks
Fix a small bug related to onLoadHooks
JavaScript
mit
Kriegslustig/meteor-altboiler,Kriegslustig/meteor-altboiler
fddc78d8eff0e21b790cdb85a17f3c7406cd6f76
lib/dust_driver.js
lib/dust_driver.js
'use strict' const fs = require('fs') const { resolve } = require('url') const escapeHTML = require('escape-html') module.exports = createDustRenderer function createDustRenderer () { const dust = require('dustjs-linkedin') dust.config.cache = false dust.helpers.component = component dust.onLoad = onLoad r...
'use strict' const fs = require('fs') const escapeHTML = require('escape-html') module.exports = createDustRenderer function createDustRenderer () { const dust = require('dustjs-linkedin') dust.config.cache = false dust.helpers.component = component dust.onLoad = onLoad return function render (name, opts =...
Fix dust driver to include innerHTML
Fix dust driver to include innerHTML
JavaScript
mit
domachine/penguin,domachine/penguin
39a044493e57dabd6eb04d390fe12dc9d8033576
src/Filters/HTML/CSSInlining/inlined-css-retriever.js
src/Filters/HTML/CSSInlining/inlined-css-retriever.js
phast.stylesLoading = 0; var resourceLoader = new phast.ResourceLoader.make(phast.config.serviceUrl); phast.forEachSelectedElement('style[data-phast-params]', function (style) { phast.stylesLoading++; retrieveFromBundler(style.getAttribute('data-phast-params'), function (css) { style.textContent = css...
phast.stylesLoading = 0; var resourceLoader = new phast.ResourceLoader.make(phast.config.serviceUrl); phast.forEachSelectedElement('style[data-phast-params]', function (style) { phast.stylesLoading++; retrieveFromBundler(style.getAttribute('data-phast-params'), function (css) { style.textContent = css...
Make css loader work with promises
Make css loader work with promises
JavaScript
agpl-3.0
kiboit/phast,kiboit/phast,kiboit/phast
60ba23f69ee6e7997f58c303fe3d9fbb34d01f62
fsr-logger.js
fsr-logger.js
var moment = require('moment'), sprintf = require('sprintf'), fsr = require('file-stream-rotator'); function create_logger (streamConfig) { streamConfig = streamConfig || { filename: './log/activity.log', frequency: 'daily', verbose: false }; var stream = fsr.getStream(streamConfig); ...
var moment = require('moment'), sprintf = require('sprintf'), fsr = require('file-stream-rotator'); function create_simple_config(name, frequency, verbosity) { var config = {} config.filename = name || './log/activity.log'; config.frequency = frequency || 'daily'; config.verbose = verbosity || false; } ...
Make sure we can easily create new daily logs
Make sure we can easily create new daily logs
JavaScript
mit
jasonlotito/fsr-logger
26fcc3c6876a1ce783892bece78245609ce6d5d0
app/routes/post_login.js
app/routes/post_login.js
import Ember from 'ember'; import preloadDataMixin from '../mixins/preload_data'; export default Ember.Route.extend(preloadDataMixin, { cordova: Ember.inject.service(), beforeModel() { Ember.run(() => this.controllerFor('application').send('logMeIn')); return this.preloadData().catch(error => { if (...
import Ember from 'ember'; import preloadDataMixin from '../mixins/preload_data'; export default Ember.Route.extend(preloadDataMixin, { cordova: Ember.inject.service(), beforeModel() { Ember.run(() => this.controllerFor('application').send('logMeIn')); return this.preloadData().catch(error => { if (...
Revert "Revert "GCW- 2473- Replace Admin Offers UI with Dashboard and Search Filters""
Revert "Revert "GCW- 2473- Replace Admin Offers UI with Dashboard and Search Filters""
JavaScript
mit
crossroads/shared.goodcity,crossroads/shared.goodcity
0b79ce4530ac5b3a98883e06ba1bf0e2434aa598
js/myscript.js
js/myscript.js
// window.checkAdLoad = function(){ // var checkAdLoadfunction = function(){ // var msg = "Ad unit is not present"; // if($("._teraAdContainer")){ // console.log("Ad unit is present") // msg = "Ad unit is present"; // } // return msg; // } // checkAdLoadfunction() // console.log(chec...
// window.checkAdLoad = function(){ // var checkAdLoadfunction = function(){ // var msg = "Ad unit is not present"; // if($("._teraAdContainer")){ // console.log("Ad unit is present") // msg = "Ad unit is present"; // } // return msg; // } // checkAdLoadfunction() // console.log(chec...
Add changes to the js file
Add changes to the js file
JavaScript
mit
hoverr/hoverr.github.io,hoverr/hoverr.github.io
19288160ef71d34f48a424eaea3055cc0cc14c93
app/actions/asyncActions.js
app/actions/asyncActions.js
import AsyncQueue from '../utils/asyncQueueStructures'; let asyncQueue = new AsyncQueue(); const endAsync = () => ({ type: 'ASYNC_INACTIVE' }); const startAsync = () => ({ type: 'ASYNC_ACTIVE' }); const callAsync = (dispatchFn, newState) => (dispatch, getState) => { if (!asyncQueue.size) { asyncQueue.listenFo...
import AsyncQueue from '../utils/asyncQueueStructures'; let asyncQueue = new AsyncQueue(); const endAsync = () => ({ type: 'ASYNC_INACTIVE' }); const startAsync = () => ({ type: 'ASYNC_ACTIVE' }); const callAsync = (dispatchFn, ...args) => (dispatch, getState) => { if (!asyncQueue.size) { asyncQueue.listenFor...
Allow multiple arguments for async actions
Allow multiple arguments for async actions
JavaScript
mit
ivtpz/brancher,ivtpz/brancher
b328d6d95f5642afba8b6ee80b3351a3bf71a0af
better-stacks.js
better-stacks.js
try { require('source-map-support-2/register') } catch (_) {} // Async stacks. try { require('trace') } catch (_) {} // Removes node_modules and internal modules. try { var sep = require('path').sep var path = __dirname + sep + 'node_modules' + sep require('stack-chain').filter.attach(function (_, frames) { ...
Error.stackTraceLimit = 100 try { require('source-map-support-2/register') } catch (_) {} // Async stacks. try { require('trace') } catch (_) {} // Removes node_modules and internal modules. try { var sep = require('path').sep var path = __dirname + sep + 'node_modules' + sep require('stack-chain').filter.att...
Augment stack traces limit to 100.
Augment stack traces limit to 100.
JavaScript
agpl-3.0
vatesfr/xo-web,lmcro/xo-web,vatesfr/xo-web,lmcro/xo-web,lmcro/xo-web
c2091a31f778f4a3ca0894833bb4ca07a599ca81
lib/to_tree.js
lib/to_tree.js
"use strict"; /** * to_tree(source[, root = null]) -> array * - source (array): array of sections * - root (mongodb.BSONPure.ObjectID|String): id of common root for result first level. * * Build sections tree (nested) from flat sorted array. **/ module.exports = function (source, root) { var result = []; ...
"use strict"; /** * to_tree(source[, root = null]) -> array * - source (array): array of sections * - root (mongodb.BSONPure.ObjectID|String): id of common root for result first level. * * Build sections tree (nested) from flat sorted array. **/ module.exports = function (source, root) { var result = []; ...
Fix fatal error when visible section is a descendant of invisible one.
Fix fatal error when visible section is a descendant of invisible one.
JavaScript
mit
nodeca/nodeca.forum
7000f6dfd23da27fdb4c6b73a03a672f04abf271
jest_config/setup.js
jest_config/setup.js
import Vue from 'vue'; import Vuetify from 'vuetify'; Vue.use(Vuetify); const csrf = global.document.createElement('input'); csrf.name = 'csrfmiddlewaretoken'; csrf.value = 'csrfmiddlewaretoken'; global.document.body.append(csrf); global.document.body.setAttribute('data-app', true); global.window.Urls = new Proxy( ...
import Vue from 'vue'; import Vuetify from 'vuetify'; import icons from 'shared/vuetify/icons'; Vue.use(Vuetify, { icons: icons(), }); const csrf = global.document.createElement('input'); csrf.name = 'csrfmiddlewaretoken'; csrf.value = 'csrfmiddlewaretoken'; global.document.body.append(csrf); global.document.body.s...
Fix missing globally registered <Icon> in tests
Fix missing globally registered <Icon> in tests
JavaScript
mit
DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation,DXCanas/content-curation
4d5177898b73b95b304a39c2934201aefdc4ef26
jest.config.js
jest.config.js
module.exports = { name: 'Unit test', testMatch: ['**/packages/**/__tests__/?(*.)+(spec|test).js'], transform: {}, };
module.exports = { name: 'Unit test', testMatch: ['<rootDir>/packages/**/__tests__/?(*.)+(spec|test).js'], modulePathIgnorePatterns: ['.cache'], transform: {}, };
Fix jest hast map issue with .cache folder in examples
Fix jest hast map issue with .cache folder in examples Signed-off-by: Alexandre Bodin <70f0c7aa1e44ecfca5832512bee3743e3471816f@gmail.com>
JavaScript
mit
wistityhq/strapi,wistityhq/strapi
0476ef142043c2cbb7bb74dc4994d18f5ab4376e
src/services/config/config.service.js
src/services/config/config.service.js
'use strict'; // Service for the spec config. // We keep this separate so that changes are kept even if the spec changes. angular.module('vlui') .factory('Config', function() { var Config = {}; Config.data = {}; Config.config = {}; Config.getConfig = function() { return {}; }; Config...
'use strict'; // Service for the spec config. // We keep this separate so that changes are kept even if the spec changes. angular.module('vlui') .factory('Config', function() { var Config = {}; Config.data = {}; Config.config = {}; Config.getConfig = function() { return {}; }; Config...
Revert "Make tick thicker to facilitate hovering"
Revert "Make tick thicker to facilitate hovering" This reverts commit a90e6f1f92888e0904bd50d67993ab23ccec1a38.
JavaScript
bsd-3-clause
vega/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui
fa8fa16839f3ff5185fe74c83b75aacc9023155c
js/cookies.js
js/cookies.js
// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie console.log('Any cookies yet? ' + document.cookie); console.log('Setting a cookie...'); document.cookie = 'something=somethingelse'; console.log('OK set one: ' + document.cookie);
// https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie $(document).on('ready', function() { allCookies = document.cookie; if (allCookies === '') { $('hi').append('Welcome for the first time!'); document.cookie = 'something=somethingelse'; } else { $('hi').append('Welcome back!'); } ...
Change messaging based on cookie
Change messaging based on cookie
JavaScript
mit
oldhill/oldhill.github.io,oldhill/oldhill.github.io
ef4f7975c56c9c7adcaa213e99e394c035f1dd71
js/includes.js
js/includes.js
$(function() { $.get("includes/header.html", function(data) { $('body').prepend(data); }); $("#footer").load("includes/footer.html"); })
$(function() { $.get("includes/header.html", function(data) { $('body').prepend(data); $('.dropdown-item[href="' + window.location.pathname.split('/').pop() + '"]').addClass('active'); }); $("#footer").load("includes/footer.html"); })
Add active class to current page in drop down
Add active class to current page in drop down
JavaScript
mit
Skramdhanie/softwarecareers,Skramdhanie/softwarecareers,Skramdhanie/softwarecareers
1ac7400520c35c47b27c311fad3a15887f8cb2d5
athenicpaste/application.js
athenicpaste/application.js
'use strict'; let express = require('express'); let router = require('./router.js'); let createDatabaseManager = require('./models/dbManager.js'); let ClientError = require('./errors.js').ClientError; const dbUrl = 'mongodb://localhost:27017/athenicpaste'; function logErrors(err, request, response, next) { cons...
'use strict'; let express = require('express'); let router = require('./router.js'); let createDatabaseManager = require('./models/dbManager.js'); let ClientError = require('./errors.js').ClientError; const dbUrl = 'mongodb://localhost:27017/athenicpaste'; function createApplication() { return createDatabaseMan...
Fix error propagation in middleware
Fix error propagation in middleware
JavaScript
bsd-3-clause
cdunklau/athenicpaste
33d33c639ee78ff0877127b9c03fc9f842f83440
lib/reporters/tap.js
lib/reporters/tap.js
/** * Module dependencies. */ var Base = require('./base') , cursor = Base.cursor , color = Base.color; /** * Expose `TAP`. */ exports = module.exports = TAP; /** * Initialize a new `TAP` reporter. * * @param {Runner} runner * @api public */ function TAP(runner) { Base.call(this, runner); var se...
/** * Module dependencies. */ var Base = require('./base') , cursor = Base.cursor , color = Base.color; /** * Expose `TAP`. */ exports = module.exports = TAP; /** * Initialize a new `TAP` reporter. * * @param {Runner} runner * @api public */ function TAP(runner) { Base.call(this, runner); var se...
Remove hasmark from TAP titles.
Remove hasmark from TAP titles.
JavaScript
mit
nexdrew/mocha,tinganho/mocha,kevinburke/mocha,jbnicolai/mocha,duncanbeevers/mocha,outsideris/mocha,ajaykodali/mocha,GabrielNicolasAvellaneda/mocha,rstacruz/mocha,antoval/mocha,jbnicolai/mocha,geometrybase/mocha,pandeysoni/mocha,igwejk/mocha,adamgruber/mocha,GerHobbelt/mocha,tswaters/mocha,adamgruber/mocha,TimothyGu/moc...
5448e753590a58ac4fc2340a4cfb0798a54e494b
lib/sms.js
lib/sms.js
'use strict'; module.exports = { base_name : 'sms', action_name : 'sms/{id}', send: function() { return this.action(...arguments); }, getResponses: function(/* dynamic */) { var params = this.parseBaseParams(arguments); return this.quiubas.network.get( [ this.action_name + '/responses', { 'id': params.i...
'use strict'; module.exports = { base_name : 'sms', action_name : 'sms/{id}', send: function() { return this.action.apply(this, arguments); }, getResponses: function(/* dynamic */) { var params = this.parseBaseParams(arguments); return this.quiubas.network.get( [ this.action_name + '/responses', { 'id':...
Add Node <5 support by removing spread operator
Add Node <5 support by removing spread operator
JavaScript
mit
quiubas/quiubas-node
087fe83fd227c9700ca4dc0e9248103406617937
eloquent_js/chapter03/ch03_ex01.js
eloquent_js/chapter03/ch03_ex01.js
function min(a, b) { return a < b ? a : b; } console.log(min(0, 10)); console.log(min(0, -10));
function min(a, b) { return a < b ? a : b; }
Add chapter 3, exercise 1
Add chapter 3, exercise 1
JavaScript
mit
bewuethr/ctci
e3c4841a8552ea180ccfd9c241b6a3bf7382f200
test/fixtures/common/_sites.js
test/fixtures/common/_sites.js
var background= __dirname+'/../background'; var map= { localhost: background ,'127.0.0.1': background } exports= module.exports= { lookup: function() { return map[this.host.name] } ,paths: [background] }
var background= __dirname+'/../background'; var sample= __dirname+'/../sample.com'; var map= { localhost: background ,'127.0.0.1': background ,'sample.com': sample } exports= module.exports= { lookup: function() { return map[this.host.name] } ,paths: [background,sample] }
Add sample.com site. Rerouting allows testing site routing, so here's a site.
Add sample.com site. Rerouting allows testing site routing, so here's a site.
JavaScript
mit
randymized/malifi
1f2dac22c64a768aac02f2b9a1246dfcb9e9d75a
lib/policies/rate-limit/rate-limit.js
lib/policies/rate-limit/rate-limit.js
const RateLimit = require('express-rate-limit'); const RedisStore = require('rate-limit-redis'); const logger = require('../../logger').policy; module.exports = (params) => { if (params.rateLimitBy) { params.keyGenerator = (req) => { try { return req.egContext.evaluateAsTemplateString(params.rateLi...
const RateLimit = require('express-rate-limit'); const RedisStore = require('rate-limit-redis'); const logger = require('../../logger').policy; module.exports = (params) => { if (params.rateLimitBy) { params.keyGenerator = (req) => { try { return req.egContext.evaluateAsTemplateString(params.rateLi...
Update rate limit policy to set redis expiry inline with windowMs
Update rate limit policy to set redis expiry inline with windowMs
JavaScript
apache-2.0
ExpressGateway/express-gateway
c43f5346480d1f92f95ee495d31dd61940d453d7
lib/xregexp.js
lib/xregexp.js
const xRegExp = require('xregexp'); /** * Wrapper for xRegExp to work around * https://github.com/slevithan/xregexp/issues/130 */ module.exports = (regexp, flags) => { if (!flags || !flags.includes('x')) { // We aren't using the 'x' flag, so we don't need to remove comments and // whitespace as a workarou...
const originalXRegExp = require('xregexp'); /** * Wrapper for xRegExp to work around * https://github.com/slevithan/xregexp/issues/130 */ function xRegExp(regexp, flags) { if (!flags || !flags.includes('x')) { // We aren't using the 'x' flag, so we don't need to remove comments and // whitespace as a work...
Add exec() to xRegExp wrapper
Add exec() to xRegExp wrapper xRegExp includes an exec() method that we are using, but we hadn't included it on our wrapper, so it was failing.
JavaScript
mit
trotzig/import-js,trotzig/import-js,trotzig/import-js,Galooshi/import-js
e5d4685e2aec3c40253a62f75b1266024ad3af2f
src/server/config/index.js
src/server/config/index.js
import Joi from 'joi'; import jsonServerConfig from 'config/server.json'; import schema from './schema.js'; class ServerConfig { constructor() { this._jsonConfig = jsonServerConfig; /** * Validate the JSON config */ try { Joi.validate(this._jsonConfig, schema); } catch (e) { co...
import Joi from 'joi'; import jsonServerConfig from 'config/server.json'; import schema from './schema.js'; class ServerConfig { constructor() { /** * Validate the JSON config */ try { this._jsonConfig = Joi.validate(jsonServerConfig, schema).value; } catch (e) { console.error('The ...
Update logger and add config
Update logger and add config
JavaScript
mit
LuudJanssen/plus-min-list,LuudJanssen/plus-min-list,LuudJanssen/plus-min-list
4d6139bcd9af2b8acd02343330bbbe74bbe7a7a1
lib/config.js
lib/config.js
var fs = require('fs'); module.exports = function(opts) { this.options = opts; if (!opts.handlebars) this.options.handlebars = require('handlebars'); if (opts.template) { var fileData = fs.readFileSync(this.options.template); this.template = this.options.handlebars.compile(fileData.toString(), {noEscap...
var fs = require('fs'); module.exports = function(opts) { var fileData; this.options = opts; if (!opts.handlebars) this.options.handlebars = require('handlebars'); if (opts.template) { try { fileData = fs.readFileSync(this.options.template); } catch (e) { throw new Error('Error loadin...
Throw errors if a template is not set, or if a template can't be loaded
Throw errors if a template is not set, or if a template can't be loaded
JavaScript
mit
spacedoc/spacedoc,gakimball/supercollider,spacedoc/spacedoc
9f2af655b2502eaed5f899651ab652f8561c92c2
src/editor.js
src/editor.js
var h = require('html') var Panel = require('panel') function Editor() { this.layersPanel = new Panel(this, 215, h('.layers-panel')) this.inspectorPanel = new Panel(this, 215, h('.inspector-panel')) this.el = h('.editor', [ this.layersPanel.el, h('.canvas'), this.inspectorPanel.el ]) } Editor.pro...
var h = require('html') var Panel = require('panel') function Editor() { this.layersPanel = new Panel(this, 215, h('.layers-panel')) this.inspectorPanel = new Panel(this, 215, h('.inspector-panel')) this.el = h('.editor', [ this.layersPanel.el, h('.canvas'), this.inspectorPanel.el ]) } Editor.pro...
Add parameters to stub loading/saving methods
Add parameters to stub loading/saving methods
JavaScript
unlicense
freedraw/core,freedraw/core
17caa86e56c41bc5ce4092b1162b6cc5a12aa95f
example/nestedListView/NodeView.js
example/nestedListView/NodeView.js
/* @flow */ import React from 'react' import {TouchableOpacity, View, FlatList} from 'react-native' export default class NodeView extends React.PureComponent { componentWillMount = () => { let rootChildren = this.props.getChildren(this.props.node) if (rootChildren) { rootChildren = rootChildren.m...
/* @flow */ import React from 'react' import {TouchableOpacity, View, FlatList} from 'react-native' export default class NodeView extends React.PureComponent { componentWillMount = () => { let rootChildren = this.props.getChildren(this.props.node) if (rootChildren) { rootChildren = rootChildren.m...
Fix issue in flat list
Fix issue in flat list
JavaScript
mit
fjmorant/react-native-nested-listview,fjmorant/react-native-nested-listview,fjmorant/react-native-nested-listview
91451bab35e3e683d0c77c71f0ba1dbbf25ac302
app/controllers/account.js
app/controllers/account.js
var express = require('express'), router = express.Router(), passport = require('passport'); module.exports = function (app) { app.use('/account', router); }; router.get('/', function (req, res, next) { console.log('User: ', req); res.render('account', { title: 'Libbie: quickly add books to Goodreads!', user...
var express = require('express'), router = express.Router(), passport = require('passport'); module.exports = function (app) { app.use('/account', router); }; router.get('/', function (req, res, next) { console.log('User: ', req); res.render('account', { title: 'Libbie: quickly add books to Goodreads!', user...
Fix due to removed clientInfo property
Fix due to removed clientInfo property
JavaScript
apache-2.0
Mobius5150/libbie,Mobius5150/libbie
87d77b7bb4a5ee73004c65df99649a491b58df87
test/unit/unit.js
test/unit/unit.js
'use strict'; require.config({ baseUrl: '../lib', paths: { 'test': '..', 'forge': 'forge.min', 'stringencoding': 'stringencoding.min' }, shim: { sinon: { exports: 'sinon', } } }); // add function.bind polyfill if (!Function.prototype.bind) { ...
'use strict'; require.config({ baseUrl: '../lib', paths: { 'test': '..', 'forge': 'forge.min', 'stringencoding': 'stringencoding.min' } }); // add function.bind polyfill if (!Function.prototype.bind) { Function.prototype.bind = function(oThis) { if (typeof this !== "fun...
Remove useless sinon require shim
Remove useless sinon require shim
JavaScript
mit
whiteout-io/smtpclient,huangxok/smtpclient,huangxok/smtpclient,emailjs/emailjs-smtp-client,whiteout-io/smtpclient,emailjs/emailjs-smtp-client
c13ba4cb8088fa883c7e399715608b2e16fed77c
karma.conf.js
karma.conf.js
module.exports = function(config) { config.set({ frameworks: ['mocha'], exclude: ['build/test/external.spec.js'], files: [ 'vendor/es5-shim.js', 'vendor/es5-sham.js', 'vendor/rsvp.js', 'vendor/unexpected-magicpen.min.js', 'build/test/promisePolyfill.js', 'unexpected.j...
module.exports = function(config) { config.set({ frameworks: ['mocha'], exclude: ['build/test/external.spec.js'], files: [ 'vendor/es5-shim.js', 'vendor/es5-sham.js', 'vendor/rsvp.js', 'vendor/unexpected-magicpen.min.js', 'build/test/promisePolyfill.js', 'unexpected.j...
Use the progress reporter for karma
Use the progress reporter for karma
JavaScript
mit
unexpectedjs/unexpected
6a38487871bbfe84b915eac40bcb82a7bf742cb3
tilt-client/spec/sock_spec.js
tilt-client/spec/sock_spec.js
describe('Sock object', function() { var socket; var pong; var joinRoom; beforeEach(function() { }); afterEach(function() { }); it('should exist', function() { expect(window.Tilt.Sock).toBeDefined(); }); it('should connect and return a new sock object', function() { expect(window.Tilt.con...
describe('Sock object', function() { var socket; var pong; var joinRoom; beforeEach(function() { }); afterEach(function() { }); it('should exist', function() { expect(window.Tilt.Sock).toBeDefined(); }); it('should connect and return a new sock object', function() { expect(window.Tilt.con...
Add a test for controllers
Add a test for controllers
JavaScript
mit
tilt-js/tilt.js
a387535d2d6fdc1d6391ce46f2de98e08209fea1
static/js/feature_flags.js
static/js/feature_flags.js
var feature_flags = (function () { var exports = {}; exports.mark_read_at_bottom = true; exports.summarize_read_while_narrowed = true; exports.twenty_four_hour_time = _.contains([], page_params.email); exports.dropbox_integration = page_params.staging || _.contains(['dropbox.com'], ...
var feature_flags = (function () { var exports = {}; exports.mark_read_at_bottom = true; exports.summarize_read_while_narrowed = true; exports.twenty_four_hour_time = _.contains([], page_params.email); exports.dropbox_integration = page_params.staging || _.contains(['dropbox.com'], ...
Enable muting for internal MIT users.
Enable muting for internal MIT users. (imported from commit 82dc8c620c5f9af5b7a366bd16aee9125b9ba634)
JavaScript
apache-2.0
MayB/zulip,fw1121/zulip,peguin40/zulip,stamhe/zulip,brainwane/zulip,vikas-parashar/zulip,voidException/zulip,ericzhou2008/zulip,mahim97/zulip,babbage/zulip,souravbadami/zulip,easyfmxu/zulip,proliming/zulip,bssrdf/zulip,qq1012803704/zulip,xuanhan863/zulip,voidException/zulip,alliejones/zulip,guiquanz/zulip,yocome/zulip,...
de7b6aed2c248de3bcedc7f6b2ceba2d6de7558d
.eslintrc.js
.eslintrc.js
module.exports = { env: { browser: true, es6: true, }, globals: { afterEach: true, beforeEach: true, chrome: true, expect: true, jest: true, beforeEach: true, afterEach: true, describe: true, test: true, }, extends: [ 'eslint:recommended', 'plugin:flowtype/r...
module.exports = { env: { browser: true, es6: true, }, globals: { afterEach: true, beforeEach: true, chrome: true, describe: true, expect: true, jest: true, test: true, }, extends: [ 'eslint:recommended', 'plugin:flowtype/recommended', 'plugin:react/recommended'...
Remove duplicate keys in eslint `globals`
Remove duplicate keys in eslint `globals`
JavaScript
mit
jacobSingh/tabwrangler,tabwrangler/tabwrangler,tabwrangler/tabwrangler,tabwrangler/tabwrangler,jacobSingh/tabwrangler
aa9c0c1abbcec19a1c7d179f262f228977637e88
.eslintrc.js
.eslintrc.js
module.exports = { "env": { "node": true }, "extends": "eslint:recommended", "rules": { "indent": [ "error", 2 ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error", "single" ], "semi": [ "error", "always" ] } };
module.exports = { "env": { "es6": true, "node": true }, "extends": "eslint:recommended", "rules": { "indent": [ "error", 2 ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error", "single" ], "semi": [ "error", "always" ...
Enable ES6 support for const
Enable ES6 support for const
JavaScript
mit
raszi/node-tmp,raszi/node-tmp,coldrye-collaboration/node-tmp
54457cc5cde30a6f0647dd6603d328c3a04e72cb
.eslintrc.js
.eslintrc.js
module.exports = { 'env': { 'commonjs': true, 'es6': true, 'node': true, 'browser': true, 'jest': true, 'mocha': true, 'jasmine': true, }, 'extends': 'eslint:recommended', 'parser': 'babel-eslint', 'parserOptions': { 'sourceType': 'module' }, 'rules': { 'no-console': 0,...
module.exports = { plugins: [ 'html' ], 'env': { 'commonjs': true, 'es6': true, 'node': true, 'browser': true, 'jest': true, 'mocha': true, 'jasmine': true, }, 'extends': 'eslint:recommended', 'parser': 'babel-eslint', 'parserOptions': { 'sourceType': 'module' }, 'r...
Add eslint-plugin-html to config file
Add eslint-plugin-html to config file
JavaScript
mpl-2.0
mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway,mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway,moziot/gateway,mozilla-iot/gateway
4d56e2224c0292d1989e1c5c2a6d512925fa983a
lib/writer.js
lib/writer.js
var _ = require('underscore'), fs = require('fs'); function Writer() { function gen(templates, numSegments, params, outFile, cb) { var stream = fs.createWriteStream(outFile, { flags: 'w', encoding: 'utf-8' }), segmentId = 0; stream.on('error', function (err) { console.error('Error: ...
var _ = require('underscore'), fs = require('fs'); function Writer() { function gen(templates, numSegments, params, outFile, cb) { var stream = fs.createWriteStream(outFile, { flags: 'w', encoding: 'utf-8' }), segmentId = 0; stream.on('error', function (err) { console.error('Error: ...
Apply params in header and footer.
Apply params in header and footer.
JavaScript
mit
cliffano/datagen
7618f5f225ed9a0c87e37fc941fb1a045838372b
null-prune.js
null-prune.js
/* eslint-env amd */ (function (name, definition) { if (typeof define === 'function') { // AMD define(definition) } else if (typeof module !== 'undefined' && module.exports) { // Node.js module.exports = definition() } else { // Browser window[name] = definition() } })('nullPrune', funct...
/* eslint-env amd */ (function (name, definition) { if (typeof define === 'function') { // AMD define(definition) } else if (typeof module !== 'undefined' && module.exports) { // Node.js module.exports = definition() } else { // Browser window[name] = definition() } })('nullPrune', funct...
Make it compatible with old browsers
Make it compatible with old browsers
JavaScript
apache-2.0
cskeppstedt/null-prune
2a7b7d5fac3e7024af573dc21028bb29e7a05efd
test/setup.js
test/setup.js
steal('can/util/mvc.js') .then('funcunit/qunit', 'can/util/fixture') .then(function() { var oldmodule = window.module; // Set the test timeout to five minutes QUnit.config.hidepassed = true; QUnit.config.testTimeout = 300000; if ( console && console.log ) { QUnit.log(function( details ) { if ( ! details....
steal('can/util/mvc.js') .then('funcunit/qunit', 'can/util/fixture') .then(function() { var oldmodule = window.module; // Set the test timeout to five minutes QUnit.config.hidepassed = true; QUnit.config.testTimeout = 300000; if ( typeof console !== "undefined" && console.log ) { QUnit.log(function( details...
Fix to console check causing breaks in IE.
Fix to console check causing breaks in IE.
JavaScript
mit
patrick-steele-idem/canjs,cohuman/canjs,scorphus/canjs,rasjani/canjs,rjgotten/canjs,patrick-steele-idem/canjs,juristr/canjs,azazel75/canjs,rasjani/canjs,UXsree/canjs,mindscratch/canjs,sporto/canjs,dispatchrabbi/canjs,dimaf/canjs,rasjani/canjs,cohuman/canjs,jebaird/canjs,Psykoral/canjs,scorphus/canjs,schmod/canjs,airhad...
6720ea61038cf20824fe2b2e1c02db99a569cd3e
lib/variation-matches.js
lib/variation-matches.js
var basename = require('path').basename; module.exports = variationMatches; function variationMatches(variations, path) { var result; variations.some(function(variation) { variation.chain.some(function(dir) { var parts = path.split(new RegExp("/"+dir+"/")); var found = parts.len...
module.exports = variationMatches; function variationMatches(variations, path) { var result; variations.some(function(variation) { variation.chain.some(function(dir) { var parts = path.split(new RegExp("/"+dir+"/")); var found = parts.length > 1; if (found) result = ...
Fix variation matches with variations
Fix variation matches with variations
JavaScript
mit
stephanwlee/mendel,stephanwlee/mendel,yahoo/mendel,yahoo/mendel
a11095a4d2b16822d79c3cea0500849fbbfc9fd0
server/data/Movie.js
server/data/Movie.js
const mongoose = require('mongoose') const uniqueValidator = require('mongoose-unique-validator') const paginate = require('mongoose-paginate') const requiredValidationMessage = '{PATH} is required' let movieSchema = mongoose.Schema({ title: { type: String, required: requiredValidationMessage, trim: true }, image:...
const mongoose = require('mongoose') const uniqueValidator = require('mongoose-unique-validator') const paginate = require('mongoose-paginate') const requiredValidationMessage = '{PATH} is required' let movieSchema = mongoose.Schema({ title: { type: String, required: requiredValidationMessage, trim: true }, image:...
Change 'year' from persistent to virtual and get from 'releaseDate'
Change 'year' from persistent to virtual and get from 'releaseDate'
JavaScript
mit
iliandj/express-architecture,iliandj/express-architecture
9d2deacd0ee28da9ae78dc16f7174d3f5d593b32
src/apps/global-nav-items.js
src/apps/global-nav-items.js
const fs = require('fs') const path = require('path') const { compact, sortBy, concat, includes } = require('lodash') const config = require('../config') const urls = require('../lib/urls') const subApps = fs.readdirSync(__dirname) const APP_GLOBAL_NAV_ITEMS = compact( subApps.map((subAppDir) => { const consta...
const fs = require('fs') const path = require('path') const { compact, sortBy, concat, includes } = require('lodash') const urls = require('../lib/urls') const subApps = fs.readdirSync(__dirname) const APP_GLOBAL_NAV_ITEMS = compact( subApps.map((subAppDir) => { const constantsPath = path.join(__dirname, subAp...
Remove deprecated MI site from GLOBAL_NAV_ITEMS
Remove deprecated MI site from GLOBAL_NAV_ITEMS
JavaScript
mit
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
3b0d8f70ba2091d20dc91ea5235c0479a16f2991
www/app/filters/app.filters.number.js
www/app/filters/app.filters.number.js
'use strict'; /* * Number Filters * * In HTML Template Binding * {{ filter_expression | filter : expression : comparator}} * * In JavaScript * $filter('filter')(array, expression, comparator) * * https://docs.angularjs.org/api/ng/filter/filter */ var app = angular.module('app.filters.number', []); app.f...
'use strict'; /* * Number Filters * * In HTML Template Binding * {{ filter_expression | filter : expression : comparator}} * * In JavaScript * $filter('filter')(array, expression, comparator) * * https://docs.angularjs.org/api/ng/filter/filter */ var app = angular.module('app.filters.number', []); app.f...
Set the timezone on MySQL formatted dates.
Set the timezone on MySQL formatted dates.
JavaScript
mit
rachellcarbone/angular-seed,rachellcarbone/angular-seed,rachellcarbone/angular-seed
946eb3a92be4e3452f837130e5053643544ea08b
lib/app.js
lib/app.js
"use strict"; var zlib = require("zlib"); var cors = require("cors"), express = require("express"); var SyslogFilter = require("./syslog-filter"); module.exports = function(source) { var app = express(); app.disable('x-powered-by'); app.use(cors()); app.get("/:ps(\\w*)?", function(req, res, next) { ...
"use strict"; var stream = require("stream"), zlib = require("zlib"); var cors = require("cors"), express = require("express"); var SyslogFilter = require("./syslog-filter"); module.exports = function(nexus) { var app = express(); app.disable('x-powered-by'); app.use(cors()); app.get("/:ps(\\w*)?...
Unplug client streams when requests end
Unplug client streams when requests end
JavaScript
isc
mojodna/log-nexus
b94e3b3d2060456bd052a3cdde057f48a7e0ca91
lib/cli.js
lib/cli.js
'use strict'; var path = require('path'), opener = require('opener'), chalk = require('chalk'), pkg = require('../package.json'), server = require('./server'), program = require('commander'); function getConfigPath(config) { return path.resolve(config); } exports.run = function() { program...
'use strict'; var path = require('path'), opener = require('opener'), chalk = require('chalk'), pkg = require('../package.json'), server = require('./server'), program = require('commander'); exports.run = function() { program .version(pkg.version) .allowUnknownOption(true) ...
Add notification about gemini config overriding
Add notification about gemini config overriding
JavaScript
mit
gemini-testing/gemini-gui,gemini-testing/gemini-gui
5ad85f1120a19885ad11ade6a607542b6ea2e3ea
src/components/Logo/index.js
src/components/Logo/index.js
import React from 'react'; import SVGInline from 'react-svg-inline'; import svg from '../../static/logo.svg'; const Logo = (props) => { return ( <SVGInline svg={svg} desc={props.desc} width={props.width} height={props.height} /> ); }; Logo.propTy...
import React from 'react'; import SVGInline from 'react-svg-inline'; import svg from '../../static/logo.svg'; const Logo = (props) => { return ( <SVGInline svg={svg} desc={props.desc} width={props.width} height={props.height} cleanup={['width', 'h...
Fix weird logo size on Firefox
Fix weird logo size on Firefox
JavaScript
mit
devnews/web,devnews/web
2cb117bd56c5508c4abf885c6b8ed4d4c043462a
src/components/search_bar.js
src/components/search_bar.js
import React from 'react' //class-based component (ES6) class SearchBar extends React.Component { render() { //method definition in ES6 return <input />; } } export default SearchBar;
import React, { Component } from 'react' //class-based component (ES6) class SearchBar extends Component { render() { //method definition in ES6 return <input />; } } export default SearchBar;
Refactor to ES6 syntactic sugar
Refactor to ES6 syntactic sugar
JavaScript
mit
phirefly/react-redux-starter,phirefly/react-redux-starter
e0c685d096bac50e01946d43ab1c7c034ae68d98
src/config/globalSettings.js
src/config/globalSettings.js
/** * Global settings that do not change in a production environment */ if (typeof window === 'undefined') { // For tests global.window = {} } window.appSettings = { headerHeight: 60, drawerWidth: 250, drawerAnimationDuration:500, icons: { navbarArchive: 'ios-box', navbarEye...
/** * Global settings that do not change in a production environment */ if (typeof window === 'undefined') { // For tests global.window = {} } window.appSettings = { boardOuterMargin: 30, boardPostMargin: 25, // The following settings can't be changed explcitly. // Needs to be kept in sync ...
Add view ID's and board layout options
feat(appSettings): Add view ID's and board layout options
JavaScript
mit
AdamSalma/Lurka,AdamSalma/Lurka
382a847bbc4b483829e3ca3e8fb4169cc6649b92
src/menu-item-content/menu-item-content-directive.js
src/menu-item-content/menu-item-content-directive.js
'use strict'; angular.module('eehMenuBs3').directive('eehMenuBs3MenuItemContent', MenuItemContentDirective); /** @ngInject */ function MenuItemContentDirective(eehNavigation) { return { restrict: 'A', scope: { menuItem: '=eehMenuBs3MenuItemContent' }, templateUrl: 'templ...
'use strict'; angular.module('eehMenuBs3').directive('eehMenuBs3MenuItemContent', MenuItemContentDirective); /** @ngInject */ function MenuItemContentDirective(eehMenu) { return { restrict: 'A', scope: { menuItem: '=eehMenuBs3MenuItemContent' }, templateUrl: 'template/ee...
Fix names and paths in menu item content directive
Fix names and paths in menu item content directive
JavaScript
mit
MenuJS/eeh-menu-bs3,MenuJS/eeh-menu-bs3
9846027ab68bccc2eb2ccfacc5a3f7c3a84c6793
alien4cloud-ui/yo/app/scripts/services/rest_technical_error_interceptor.js
alien4cloud-ui/yo/app/scripts/services/rest_technical_error_interceptor.js
'use strict'; angular.module('alienUiApp').factory('restTechnicalErrorInterceptor', ['$rootScope', '$q', '$window', 'toaster', '$translate', function($rootScope, $q, $window, toaster, $translate) { var extractErrorMessage = function(rejection) { if (UTILS.isDefinedAndNotNull(rejection.data)) { if ...
'use strict'; angular.module('alienUiApp').factory('restTechnicalErrorInterceptor', ['$rootScope', '$q', '$window', 'toaster', '$translate', function($rootScope, $q, $window, toaster, $translate) { var extractErrorMessage = function(rejection) { if (UTILS.isDefinedAndNotNull(rejection.data)) { if ...
Fix double error message when "tour" is missing
Fix double error message when "tour" is missing
JavaScript
apache-2.0
ahgittin/alien4cloud,broly-git/alien4cloud,ahgittin/alien4cloud,PierreLemordant/alien4cloud,broly-git/alien4cloud,broly-git/alien4cloud,PierreLemordant/alien4cloud,ngouagna/alien4cloud,loicalbertin/alien4cloud,loicalbertin/alien4cloud,broly-git/alien4cloud,loicalbertin/alien4cloud,ngouagna/alien4cloud,igorng/alien4clou...
8f5b0dcd02f2b5b81139cba0c757a33d37204070
app/js/arethusa.core/directives/lang_specific.js
app/js/arethusa.core/directives/lang_specific.js
'use strict'; angular.module('arethusa.core').directive('langSpecific', [ 'languageSettings', function(languageSettings) { return { restrict: 'A', link: function(scope, element, attrs) { var settings = languageSettings.getFor('treebank'); if (settings) { element.attr('lang...
'use strict'; angular.module('arethusa.core').directive('langSpecific', [ 'languageSettings', function(languageSettings) { return { restrict: 'A', link: function(scope, element, attrs) { var settings = languageSettings.getFor('treebank') || languageSettings.getFor('hebrewMorph'); if...
Check hebrew document in langSpecific
Check hebrew document in langSpecific Very troublesome to hardcode this - we have to defer a decision on this a little longer.
JavaScript
mit
Masoumeh/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa
38ed99078ce7ed579dd72eb1fd493ce756473b59
server/config/routes.js
server/config/routes.js
module.exports = function(app, express) { // Facebook OAuth app.get('/auth/facebook', function(req, res) { res.send('Facebook OAuth'); }); app.get('/auth/facebook/callback', function(req, res) { res.send('Callback for Facebook OAuth'); }); // User Creation app.route('/api/users') .post(funct...
module.exports = function(app, express) { // Facebook OAuth app.get('/auth/facebook', function(req, res) { res.send('Facebook OAuth'); }); app.get('/auth/facebook/callback', function(req, res) { res.send('Callback for Facebook OAuth'); }); // User Creation app.route('/api/users') .post(funct...
Add endpoints for Room creation (start of lecture), Note Creation (end of lecture), Editing Notes
Add endpoints for Room creation (start of lecture), Note Creation (end of lecture), Editing Notes
JavaScript
mit
folksy-squid/Picky-Notes,inspiredtolive/Picky-Notes,derektliu/Picky-Notes,derektliu/Picky-Notes,inspiredtolive/Picky-Notes,derektliu/Picky-Notes,folksy-squid/Picky-Notes,inspiredtolive/Picky-Notes,folksy-squid/Picky-Notes
d1785feb25125bf750daa35b3612124fc72e30b3
app/scripts/timetable_builder/views/ExamsView.js
app/scripts/timetable_builder/views/ExamsView.js
define(['backbone.marionette', './ExamView', 'hbs!../templates/exams'], function (Marionette, ExamView, template) { 'use strict'; return Marionette.CompositeView.extend({ tagName: 'table', className: 'table table-bordered table-condensed', itemView: ExamView, itemViewContainer: 'tbody...
define(['backbone.marionette', './ExamView', 'hbs!../templates/exams'], function (Marionette, ExamView, template) { 'use strict'; return Marionette.CompositeView.extend({ tagName: 'table', className: 'table table-bordered table-condensed', itemView: ExamView, itemViewContainer: 'tbody...
Use getItemViewContainer() for safety - it ensures $itemViewContainer exists
Use getItemViewContainer() for safety - it ensures $itemViewContainer exists
JavaScript
mit
chunqi/nusmods,nusmodifications/nusmods,nathanajah/nusmods,chunqi/nusmods,nathanajah/nusmods,zhouyichen/nusmods,mauris/nusmods,zhouyichen/nusmods,nathanajah/nusmods,Yunheng/nusmods,Yunheng/nusmods,mauris/nusmods,mauris/nusmods,chunqi/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,nusmodification...
271974693930334174db0a01a86a7cffd3f7f9e0
src/ObjectLocator.js
src/ObjectLocator.js
class ObjectLocator { constructor(fs, objectName) { this.fs = fs; this.objectName = objectName; this.objects = []; this.objectDirectoryName = "objects"; } run() { this.loadAllObjects(this.objectName); return this.objects; } loadAllObjects(dependency...
class ObjectLocator { constructor(fs, objectName) { this.fs = fs; this.objectName = objectName; this.objects = []; this.objectDirectoryName = "objects"; } run() { this.loadAllObjects(this.objectName); return this.objects; } loadAllObjects(dependency...
Make driver object filename case-insensitive
Make driver object filename case-insensitive
JavaScript
mit
generationtux/cufflink
0ca10de801a0104fa3d9d3f23b074591672f2318
server/lib/redirects.js
server/lib/redirects.js
const redirects = [ ['192.168.99.100/fjs', 'https://github.com/kriegslustig/presentation-functional-javascript'], ['lucaschmid.net/fjs', 'https://github.com/kriegslustig/presentation-functional-javascript'] ] module.exports = function * (next) { const redirect = redirects.find(el => el[0] === `${this.request...
const redirects = [ ['192.168.99.100/fjs', 'https://github.com/kriegslustig/presentation-functional-javascript'], ['ls7.ch/fjs', 'https://github.com/kriegslustig/presentation-functional-javascript'] ] module.exports = function * (next) { const redirect = redirects.find(el => el[0] === `${this.request.host}${...
Make the fjs redirect shorter
Make the fjs redirect shorter
JavaScript
mit
Kriegslustig/lucaschmid.net,Kriegslustig/lucaschmid.net,Kriegslustig/lucaschmid.net
f585a93f9b3d9a830e752bd205c5427f7e1c4ac2
character_sheet/js/main.js
character_sheet/js/main.js
// Source: http://stackoverflow.com/a/1830844 function isNumber(n) { return !isNaN(parseFloat(n)) && isFinite(n); } function AppViewModel() { this.statStrength = ko.observable(); this.statEndurance = ko.observable(); this.statAgility = ko.observable(); this.statSpeed = ko.observable(); this.stat...
// Source: http://stackoverflow.com/a/1830844 function isNumber(n) { return !isNaN(parseFloat(n)) && isFinite(n); } function statBonus(statValue) { if(!isNumber(statValue)) { return false; } switch(+statValue) { // cast to number case 0: return "–"; break; ...
Add function to determine stat bonus from value.
Add function to determine stat bonus from value.
JavaScript
bsd-2-clause
vegarbg/horizon
0175c92b62010f33e7410cc0e6a5121ad87e52ba
templates/system/modules/ph7cms-donation/themes/base/js/donationbox.js
templates/system/modules/ph7cms-donation/themes/base/js/donationbox.js
/* * Author: Pierre-Henry Soria <hello@ph7cms.com> * Copyright: (c) 2015-2017, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $validationBox = (function () { $.get(pH7Url.base + 'ph7cms-don...
/* * Author: Pierre-Henry Soria <hello@ph7cms.com> * Copyright: (c) 2015-2017, Pierre-Henry Soria. All Rights Reserved. * License: GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. */ var $donationBox = (function () { $.get(pH7Url.base + 'ph7cms-donat...
Rename variable for more appropriate name
Rename variable for more appropriate name
JavaScript
mit
pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS
f337cf6f58d0b0da1435e49023a2e7cf5d9d33d9
protocols/discord.js
protocols/discord.js
const Core = require('./core'); class Discord extends Core { constructor() { super(); this.dnsResolver = { resolve: function(address) {return {address: address} } }; } async run(state) { this.usedTcp = true; const raw = await this.request({ uri: 'https://discordapp.com/api/guilds/' + this....
const Core = require('./core'); class Discord extends Core { constructor() { super(); this.dnsResolver = { resolve: function(address) {return {address: address} } }; } async run(state) { this.usedTcp = true; const raw = await this.request({ uri: 'https://discordapp.com/api/guilds/' + this....
Remove discriminator's from player names
Remove discriminator's from player names The widget API seems to always set discriminator to 0000
JavaScript
mit
sonicsnes/node-gamedig
7cf8d2f042c73277630a375f11c74ba8fe047e33
jujugui/static/gui/src/app/components/user-menu/user-menu.js
jujugui/static/gui/src/app/components/user-menu/user-menu.js
/* Copyright (C) 2017 Canonical Ltd. */ 'use strict'; const PropTypes = require('prop-types'); const React = require('react'); const ButtonDropdown = require('../button-dropdown/button-dropdown'); /** Provides a user menu to the header - shows Profile, Account and Logout links. If user is not logged in the user i...
/* Copyright (C) 2017 Canonical Ltd. */ 'use strict'; const PropTypes = require('prop-types'); const React = require('react'); const ButtonDropdown = require('../button-dropdown/button-dropdown'); /** Provides a user menu to the header - shows Profile, Account and Logout links. If user is not logged in the user i...
Remove unused user menu methods.
Remove unused user menu methods.
JavaScript
agpl-3.0
mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui,mitechie/juju-gui
25dbfe06d90c794525c956bf08ccecc1b7c8d8fc
addon/components/mapbox-gl-source.js
addon/components/mapbox-gl-source.js
import Ember from 'ember'; import layout from '../templates/components/mapbox-gl-source'; const { Component, computed, get, getProperties, guidFor } = Ember; export default Component.extend({ layout, tagName: '', map: null, dataType: 'geojson', data: null, sourceId: computed({ get() { ...
import Ember from 'ember'; import layout from '../templates/components/mapbox-gl-source'; const { Component, computed, get, getProperties, guidFor } = Ember; export default Component.extend({ layout, tagName: '', map: null, dataType: 'geojson', data: null, options: null, sourceId: computed(...
Support any options mapbox source supports. Maintain backwards compatibility.
Support any options mapbox source supports. Maintain backwards compatibility.
JavaScript
mit
kturney/ember-mapbox-gl,kturney/ember-mapbox-gl
142681d8ae8c96c30c03752426d6124d64e24c9a
server/readings-daily-aggregates/publications.js
server/readings-daily-aggregates/publications.js
Meteor.publish("dailyMeasuresBySensor", (sensorId, dayStart, dayEnd) => { check(sensorId, String); check(dayStart, String); check(dayEnd, String); return ReadingsDailyAggregates.find({ sensorId, day: { $gte: dayStart, $lte: dayEnd } }) });
Meteor.publish("dailyMeasuresBySensor", (sensorId, source, dayStart, dayEnd) => { check(sensorId, String); check(source, String); check(dayStart, String); check(dayEnd, String); return ReadingsDailyAggregates.find({ sensorId, source, day: { $gte: dayStart, ...
Change publication of sensor-daily-aggregates to include source.
Change publication of sensor-daily-aggregates to include source.
JavaScript
apache-2.0
innowatio/iwwa-back,innowatio/iwwa-back
26d299abc795cd90a5d2a3130e2a04e187e84799
pac_script.js
pac_script.js
var BOARD_HEIGHT = 288; var BOARD_WIDTH = 224; var VERT_TILES = BOARD_HEIGHT / 8; var HORIZ_TILES = BOARD_WIDTH / 8; gameBoard = new Array(VERT_TILES); for(var y = 0; y < VERT_TILES; y++) { gameBoard[y] = new Array(HORIZ_TILES); for(var x = 0; x < HORIZ_TILES; x++) { gameBoard[y][x] = 0; } }
var BOARD_HEIGHT = 288; var BOARD_WIDTH = 224; var VERT_TILES = BOARD_HEIGHT / 8; var HORIZ_TILES = BOARD_WIDTH / 8; gameBoard = new Array(VERT_TILES); for(var y = 0; y < VERT_TILES; y++) { gameBoard[y] = new Array(HORIZ_TILES); for(var x = 0; x < HORIZ_TILES; x++) { gameBoard[y][x] = 0; } } var ready = fun...
Add ready function in js with IE8 compatibility
Add ready function in js with IE8 compatibility
JavaScript
mit
peternatewood/pac-man-replica,peternatewood/pac-man-replica
721294c2debd50f91f191c60aa8183ac11b74bd0
src/js/components/dateRangePicker.js
src/js/components/dateRangePicker.js
// @flow /* flowlint * untyped-import:off */ import * as React from 'react'; import Datepicker from '@salesforce/design-system-react/components/date-picker'; const dateRangePicker = ({onChange, startName, endName} : {startName: string, endName: string, onChange : (...
// @flow /* flowlint * untyped-import:off */ import * as React from 'react'; import Datepicker from '@salesforce/design-system-react/components/date-picker'; import Button from '@salesforce/design-system-react/components/button'; import { useState } from 'react'; const dateRangePicker = ({onChange, startName, ...
Allow clearing of date ranges.
Allow clearing of date ranges.
JavaScript
bsd-3-clause
SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci
ec279560086ca1addd3b6ea20ec6516bdd351fd9
views/home.js
views/home.js
import React from "react-native"; import LocalitiesFiltered from "./localities-filtered"; export default class Home extends React.Component { render() { return <LocalitiesFiltered {...this.props} />; } }
import React from "react-native"; import LocalitiesController from "./localities-controller"; export default class Home extends React.Component { render() { return <LocalitiesController {...this.props} />; } }
Remove filter from my localities
Remove filter from my localities
JavaScript
unknown
wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods
a1bcbe2c769e14ecbc54af8587c91555e268bf25
service.js
service.js
/*! **| PonkBot **| A chat bot for CyTube **| **@author Xaekai **@copyright 2017 **@license MIT */ 'use strict'; const PonkBot = require('./lib/ponkbot.js'); const argv = require('minimist')(process.argv.slice(2)); const configfile = typeof argv.config == "String" ? argv.config : "./config"; const config =...
/*! **| PonkBot **| A chat bot for CyTube **| **@author Xaekai **@copyright 2017 **@license MIT */ 'use strict'; const PonkBot = require('./lib/ponkbot.js'); function getConfig(args){ let config = './config.js'; config = typeof args.config == "string" ? args.config : config; // Check for relati...
Improve handling of missing config file
Improve handling of missing config file
JavaScript
mit
Xaekai/PonkBot
79b97488d91f194721d1d2c9a0c612e2b18307ec
public/app.js
public/app.js
function something() { var x =window.localStorage.getItem('cc'); x = x * 1 + 1; window.localStorage.setItem('cc', x); alert(x); } function add_to_cart(id) { var key_id = 'product_' + id; var x = window.localStorage.getItem(key_id); x = x * 1 + 1; window.localStorage.setItem(key_id, x); // var ...
function something() { var x =window.localStorage.getItem('cc'); x = x * 1 + 1; window.localStorage.setItem('cc', x); alert(x); } function add_to_cart(id) { var key_id = 'product_' + id; var x = window.localStorage.getItem(key_id); x = x * 1 + 1; window.localStorage.setItem(key_id, x); }
Fix 2 Show numbers of products on cart
Fix 2 Show numbers of products on cart
JavaScript
mit
airwall/PizzaShop,airwall/PizzaShop,airwall/PizzaShop
a54a5cbd19a400a13a071685f54de611391e62b5
webpack.config.js
webpack.config.js
var path = require("path"); module.exports = { cache: true, entry: "./js/main.js", devtool: "#source-map", output: { path: path.resolve("./build"), filename: "bundle.js", sourceMapFilename: "[file].map", publicPath: "/build/", stats: { colors: true }, }, ...
var path = require("path"); module.exports = { cache: true, entry: "./js/main.js", devtool: "#source-map", output: { path: path.resolve("./build"), filename: "bundle.js", sourceMapFilename: "[file].map", publicPath: "/build/", stats: { colors: true }, }, ...
Change to react from react-with-addons
Change to react from react-with-addons
JavaScript
mpl-2.0
bbondy/khan-academy-fxos,bbondy/khan-academy-fxos
43e6579c55ff8eb592d864c7cfc4858ca69e25ef
src/mongo.js
src/mongo.js
var mongoose = require('mongoose'); mongoose.connect(process.env.MONGO_URI); mongoose.Model.prototype.psave = function () { var that = this; return new Promise(function (resolve) { that.save(function (err) { if (err) { throw err } resolve(); ...
var mongoose = require('mongoose'); // polyfill of catch // https://github.com/aheckmann/mpromise/pull/14 require('mongoose/node_modules/mpromise').prototype.catch = function (onReject) { return this.then(undefined, onReject); }; mongoose.connect(process.env.MONGO_URI); /** * Saves the model and returns a prom...
Modify model and add polyfill of promise.catch
Modify model and add polyfill of promise.catch
JavaScript
mit
kt3k/pomodoro-meter,kt3k/pomodoro-meter,kt3k/pomodoro-meter
f7f7d921e1153a86c74d5dfb2d728095313885f9
extension.js
extension.js
const UPower = imports.ui.status.power.UPower const Main = imports.ui.main let watching function bind () { getBattery(proxy => { watching = proxy.connect('g-properties-changed', update) }) } function unbind () { getBattery(proxy => { proxy.disconnect(watching) }) } function show () { getBattery((p...
const UPower = imports.ui.status.power.UPower const Main = imports.ui.main let watching function bind () { getBattery(proxy => { watching = proxy.connect('g-properties-changed', update) }) } function unbind () { getBattery(proxy => { proxy.disconnect(watching) }) } function show () { getBattery((p...
Improve logic for more edge cases
Improve logic for more edge cases
JavaScript
mit
ai/autohide-battery
810136cdab53dcc29751cb4584f9012c73aed0c3
src/javascript/_common/check_new_release.js
src/javascript/_common/check_new_release.js
const moment = require('moment'); const urlForStatic = require('./url').urlForStatic; const getStaticHash = require('./utility').getStaticHash; // only reload if it's more than 10 minutes since the last reload const shouldForceReload = last_reload => !last_reload || +last_reload + (10 * 60 * 1000) < moment().v...
const moment = require('moment'); const urlForStatic = require('./url').urlForStatic; const getStaticHash = require('./utility').getStaticHash; const LocalStore = require('../_common/storage').LocalStore; // only reload if it's more than 10 minutes since the last reload const shouldForceReload = last_reload...
Use LocalStore to have a fallback when localStorage is not avail.
Use LocalStore to have a fallback when localStorage is not avail.
JavaScript
apache-2.0
kellybinary/binary-static,ashkanx/binary-static,kellybinary/binary-static,binary-com/binary-static,ashkanx/binary-static,kellybinary/binary-static,binary-com/binary-static,ashkanx/binary-static,binary-com/binary-static
03a6a9e6a2e50fcb5d8a425e7a6275f30e8e95f1
src/modules/search/components/UnitSuggestions.js
src/modules/search/components/UnitSuggestions.js
import React from 'react'; import {Link} from 'react-router'; import ObservationStatus from '../../unit/components/ObservationStatus'; import {getAttr, getUnitIconURL, getServiceName, getObservation} from '../../unit/helpers'; const UnitSuggestion = ({unit, ...rest}) => <Link to={`/unit/${unit.id}`} className="searc...
import React from 'react'; import {Link} from 'react-router'; import ObservationStatus from '../../unit/components/ObservationStatus'; import {getUnitIconURL, getServiceName, getObservation} from '../../unit/helpers'; const UnitSuggestion = ({unit, ...rest}, context) => <Link to={`/unit/${unit.id}`} className="searc...
Fix translations for unit fields in search suggestions
Fix translations for unit fields in search suggestions
JavaScript
mit
nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map
4f61ec02643d6c200301c63c56c40c58bb6a3209
src/utils.js
src/utils.js
export function createPostbackAction(label, input, issuedAt) { return { type: 'postback', label, data: JSON.stringify({ input, issuedAt, }), }; } export function createFeedbackWords(feedbacks) { let positive = 0, negative = 0; feedbacks.forEach(e => { if (e.score > 0) { po...
export function createPostbackAction(label, input, issuedAt) { return { type: 'postback', label, data: JSON.stringify({ input, issuedAt, }), }; } export function createFeedbackWords(feedbacks) { let positive = 0; let negative = 0; feedbacks.forEach(e => { if (e.score > 0) { ...
Reword and add emoji on reference
Reword and add emoji on reference
JavaScript
mit
cofacts/rumors-line-bot,cofacts/rumors-line-bot,cofacts/rumors-line-bot
168bd2c28dedbed8b7c22a97138bf33d487250e4
app/assets/javascripts/parent-taxon-prefix-preview.js
app/assets/javascripts/parent-taxon-prefix-preview.js
(function (Modules) { "use strict"; Modules.ParentTaxonPrefixPreview = function () { this.start = function(el) { var $parentSelectEl = $(el).find('select.js-parent-taxon'); var $pathPrefixEl = $(el).find('.js-path-prefix-hint'); updateBasePathPreview(); $parentSelectEl.change(updateBas...
(function (Modules) { "use strict"; Modules.ParentTaxonPrefixPreview = function () { this.start = function(el) { var $parentSelectEl = $(el).find('select.js-parent-taxon'); var $pathPrefixEl = $(el).find('.js-path-prefix-hint'); function getParentPathPrefix(callback) { var parentTaxo...
Move the ParentTaxonPrefixPreview logic to the bottom
Move the ParentTaxonPrefixPreview logic to the bottom The functions are hoisted anyway.
JavaScript
mit
alphagov/content-tagger,alphagov/content-tagger,alphagov/content-tagger
429d78580b2f78b0bb12c79fe182c77986f89a5d
server/utils/get-db-sort-index-map.js
server/utils/get-db-sort-index-map.js
// Returns primitive { ownerId: sortIndexValue } map for provided sortKeyPath 'use strict'; var ensureString = require('es5-ext/object/validate-stringifiable-value') , ee = require('event-emitter') , memoize = require('memoizee') , dbDriver = require('mano').dbDriver; module.exports = memoiz...
// Returns primitive { ownerId: sortIndexValue } map for provided sortKeyPath 'use strict'; var ensureString = require('es5-ext/object/validate-stringifiable-value') , ee = require('event-emitter') , memoize = require('memoizee') , dbDriver = require('mano').dbDriver , isArray = Array.isAr...
Support for multiple storage names
Support for multiple storage names
JavaScript
mit
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
7fa801c636d9b4bc3176699c154b927b8389cf8f
app/assets/javascripts/tagger/onClick/publishButton.js
app/assets/javascripts/tagger/onClick/publishButton.js
$(function() { $("#publishButton").click( function() { showPleaseWait('Publishing... (This can take some time depending on the number of resources you have selected..)'); if (!$(this).hasClass('disabled')) { // First save the draft state var str = processJSONOutput(); ...
$(function() { $("#publishButton").click( function() { if (!$(this).hasClass('disabled')) { showPleaseWait('Publishing... (This can take some time depending on the number of resources you have selected..)'); // First save the draft state var str = processJSONOutput(); ...
Move please wait to inside the block so we don't show it if its not actually publishing
Move please wait to inside the block so we don't show it if its not actually publishing
JavaScript
apache-2.0
inbloom/APP-tagger,inbloom/APP-tagger
d2c4c56877f64262d2d7637021f94af75671e909
stamper.js
stamper.js
var page = require('webpage').create(), system = require('system'), address, output, size; if (system.args.length < 4 || system.args.length > 5) { console.log('Usage: '+system.args[0]+' URL selector filename [zoom]'); phantom.exit(1); } else { address = system.args[1]; selector = system.args[2]...
var page = require('webpage').create(), system = require('system'), address, output, size; page.viewportSize = { width: 640, height: 480 }; if (system.args.length < 4 || system.args.length > 5) { console.log('Usage: '+system.args[0]+' URL selector filename [zoom]'); phantom.exit(1); } else { a...
Set viewport size to 640 x 480
Set viewport size to 640 x 480
JavaScript
mit
buo/stamper
3bd40745f69a0f44bcb47dd77180e3a675fc851a
back/controllers/index.controller.js
back/controllers/index.controller.js
const path = require('path'); const express = require('express'); const router = express.Router(); const log = require('../logger'); const wordsRepository = new (require("../repositories/word.repository"))(); router.get('/', (req, res) => { wordsRepository.getRandomWords(6) .then(words => { res.render("ind...
const path = require('path'); const express = require('express'); const router = express.Router(); const log = require('../logger'); const wordsRepository = new (require("../repositories/word.repository"))(); router.get('/', (req, res) => { wordsRepository.getRandomWords(6) .then(words => { res.render("ind...
Add mapping to angular routes
feat(back): Add mapping to angular routes
JavaScript
bsd-3-clause
Saka7/word-kombat,Saka7/word-kombat,Saka7/word-kombat,Saka7/word-kombat
2b4f8c7d914a2539af765ee2d1a56688073b2c25
app/assets/javascripts/express_admin/utility.js
app/assets/javascripts/express_admin/utility.js
$(function() { // toggle on/off switch $(document).on('click', '[data-toggle]', function() { targetHide = $(this).data('toggle-hide') targetShow = $(this).data('toggle-show') $('[data-toggle-name="' + targetHide + '"]').addClass('hide') $('[data-toggle-name="' + targetShow + '"]').removeClass('hi...
$(function() { // toggle on/off switch $(document).on('click', '[data-toggle]', function() { targetHide = $(this).data('toggle-hide') targetShow = $(this).data('toggle-show') $('[data-toggle-name="' + targetHide + '"]').addClass('hide') $('[data-toggle-name="' + targetShow + '"]').removeClass('hi...
Remove the auto focus on element toggle feature
Remove the auto focus on element toggle feature
JavaScript
mit
aelogica/express_admin,aelogica/express_admin,aelogica/express_admin,aelogica/express_admin
6bb308cd9a8860e6b99d9c23e070386883feaf17
bundles/routing/bundle/inapprouting/instance.js
bundles/routing/bundle/inapprouting/instance.js
/** * This bundle logs the map click coordinates to the console. This is a demonstration of using DefaultExtension. * * @class Oskari.routing.bundle.inapprouting.InAppRoutingBundleInstance */ Oskari.clazz.define('Oskari.routing.bundle.inapprouting.InAppRoutingBundleInstance', /** * @method create called automa...
/** * This bundle logs the map click coordinates to the console. This is a demonstration of using DefaultExtension. * * @class Oskari.routing.bundle.inapprouting.InAppRoutingBundleInstance */ Oskari.clazz.define('Oskari.routing.bundle.inapprouting.InAppRoutingBundleInstance', /** * @method create called automa...
Make backend call for calculating route
Make backend call for calculating route
JavaScript
mit
uhef/Oskari-Routing-frontend,uhef/Oskari-Routing-frontend,uhef/Oskari-Routing-frontend,uhef/Oskari-Routing-frontend,uhef/Oskari-Routing-frontend,uhef/Oskari-Routing-frontend
5387eae85dcaf6051d0d9fde7c108509d8cd7755
sandbox/run_rhino.js
sandbox/run_rhino.js
load('bower_components/qunit/qunit/qunit.js'); load('bower_components/qunit-tap/lib/qunit-tap.js'); load('bower_components/power-assert-formatter/lib/power-assert-formatter.js'); load('bower_components/empower/lib/empower.js'); (function () { qunitTap(QUnit, print, { showModuleNameOnFailure: true, ...
load('bower_components/qunit/qunit/qunit.js'); load('bower_components/qunit-tap/lib/qunit-tap.js'); load('bower_components/estraverse/estraverse.js'); load('bower_components/power-assert-formatter/lib/power-assert-formatter.js'); load('bower_components/empower/lib/empower.js'); (function () { qunitTap(QUnit, print...
Update Rhino example since power-assert-formatter requires estraverse as runtime dependency.
Update Rhino example since power-assert-formatter requires estraverse as runtime dependency.
JavaScript
mit
twada/power-assert,saneyuki/power-assert,power-assert-js/power-assert,twada/power-assert,falsandtru/power-assert,yagitoshiro/power-assert,falsandtru/power-assert,power-assert-js/power-assert,saneyuki/power-assert,yagitoshiro/power-assert
ff82e198ca173fdbb5837982c3795af1dec3a15d
aura-components/src/main/components/ui/abstractList/abstractListRenderer.js
aura-components/src/main/components/ui/abstractList/abstractListRenderer.js
/* * Copyright (C) 2013 salesforce.com, inc. * * 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 ...
/* * Copyright (C) 2013 salesforce.com, inc. * * 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 ...
Make renderer polymorphically call updateEmptyListContent
Make renderer polymorphically call updateEmptyListContent @bug W-3836575@ @rev trey.washington@
JavaScript
apache-2.0
forcedotcom/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,forcedotcom/aura,forcedotcom/aura,madmax983/aura,madmax983/aura,madmax983/aura,madmax983/aura,madmax983/aura
acbd127fda54894c0f99b8f852c39402049bcabf
templates/sb-admin-v2/js/sb-admin.js
templates/sb-admin-v2/js/sb-admin.js
$(function() { $('#side-menu').metisMenu(); }); //Loads the correct sidebar on window load, //collapses the sidebar on window resize. $(function() { $(window).bind("load resize", function() { console.log($(this).width()) if ($(this).width() < 768) { $('div.sidebar-collapse').addCl...
$(function() { $('#side-menu').metisMenu(); }); //Loads the correct sidebar on window load, //collapses the sidebar on window resize. $(function() { $(window).bind("load resize", function() { if (this.window.innerWidth < 768) { $('div.sidebar-collapse').addClass('collapse') } else...
Use innerWindow as conditional comparison for appending/removing collapse class
Use innerWindow as conditional comparison for appending/removing collapse class
JavaScript
apache-2.0
habibmasuro/startbootstrap,roth1002/startbootstrap,javierperezferrada/startbootstrap,thejavamonk/startbootstrap,Sabertn/startbootstrap,agustik/startbootstrap,WangRex/startbootstrap,anupamme/startbootstrap,IronSummitMedia/startbootstrap,lee15/startbootstrap,lee15/startbootstrap,dguardia/startbootstrap,roth1002/startboot...
d4b1e50aa6d35fffc4e6ce579ea33c97d2799614
selfish-youtube.user.js
selfish-youtube.user.js
// ==UserScript== // @name Selfish Youtube // @namespace https://github.com/ASzc/selfish-youtube // @description On the watch page, prevent the share panel from being switched to after pressing Like // @include http://youtube.com/* // @include http://*.youtube.co...
// ==UserScript== // @name Selfish Youtube // @namespace https://github.com/ASzc/selfish-youtube // @description On the watch page, remove the share panel. // @include http://youtube.com/* // @include http://*.youtube.com/* // @include https://youtube...
Change to simple removal of the share panel and button
Change to simple removal of the share panel and button
JavaScript
mit
ASzc/selfish-youtube
e16769cfb773e9e07b32e30ebebe9338f635b8e7
common.blocks/link/link.tests/simple.bemjson.js
common.blocks/link/link.tests/simple.bemjson.js
({ block : 'page', title : 'bem-components: link', mods : { theme : 'normal' }, head : [ { elem : 'css', url : '_simple.css' }, { elem : 'js', url : '_simple.js' } ], content : [ { block : 'link', content : 'Empty link 1' }, { ...
({ block : 'page', title : 'bem-components: link', mods : { theme : 'normal' }, head : [ { elem : 'css', url : '_simple.css' }, { elem : 'js', url : '_simple.js' } ], content : ['default', 'simple', 'normal'].map(function(theme, i) { var content = [ { bloc...
Add example cases for block:link
Add example cases for block:link
JavaScript
mpl-2.0
just-boris/bem-components,just-boris/bem-components,pepelsbey/bem-components,pepelsbey/bem-components,dojdev/bem-components,tadatuta/bem-components,tadatuta/bem-components,dojdev/bem-components,tadatuta/bem-components,pepelsbey/bem-components,dojdev/bem-components,just-boris/bem-components
68045361c6f994e015f2d28026a443d67fc0507a
common/predictive-text/unit_tests/in_browser/cases/top-level-lmlayer.js
common/predictive-text/unit_tests/in_browser/cases/top-level-lmlayer.js
var assert = chai.assert; describe('LMLayer', function () { describe('[[constructor]]', function () { it('should construct with zero arguments', function () { let lmLayer = new LMLayer(); assert.instanceOf(lmLayer, LMLayer); }); }); describe('#initialize()', function () { // TODO: implem...
var assert = chai.assert; describe('LMLayer', function () { describe('[[constructor]]', function () { it('should construct with zero arguments', function () { let lmLayer = new LMLayer(); assert.instanceOf(lmLayer, LMLayer); }); }); describe('#asBlobURI()', function () { // #asBlobURI() ...
Remove test for configuration-negotiation (not applicable to dummy model).
Remove test for configuration-negotiation (not applicable to dummy model).
JavaScript
apache-2.0
tavultesoft/keymanweb,tavultesoft/keymanweb
2fb53769d3e52170accaa7b978ca7eb1ca4f5ba0
index.js
index.js
import $ from 'jquery'; export default function plugit( pluginName, pluginClass ) { let dataName = `plugin_${pluginName}`; $.fn[pluginName] = function( options ) { return this.each( function() { let $this = $( this ); let data = $this.data( dataName ); if ( ! data ) { $this.data( dataName, ( data = ...
import $ from 'jquery'; export default function plugit( pluginName, pluginClass ) { let dataName = `plugin_${pluginName}`; $.fn[pluginName] = function( opts ) { return this.each( function() { let $this = $( this ); let data = $this.data( dataName ); let options = $.extend( {}, this._defaults, opts ); ...
Add cached element and props before construction, merge defaults.
Add cached element and props before construction, merge defaults.
JavaScript
mit
statnews/pugin
7482a98a1050118ec5f52568ea66945e5429162f
index.js
index.js
var gulp = require('gulp'); var elixir = require('laravel-elixir'); var urlAdjuster = require('gulp-css-url-adjuster'); /* |---------------------------------------------------------------- | adjust css urls for images and stuff |---------------------------------------------------------------- | | A wrapper for gu...
var gulp = require('gulp'); var elixir = require('laravel-elixir'); var urlAdjuster = require('gulp-css-url-adjuster'); var files = []; /* |---------------------------------------------------------------- | adjust css urls for images and stuff |---------------------------------------------------------------- | | ...
Allow for multiple files to be urlAdjsted.
Allow for multiple files to be urlAdjsted.
JavaScript
mit
farrrr/laravel-elixir-css-url-adjuster
0cb448c2978cdb213e9dc04ccad7fcc571f519c7
index.js
index.js
'use strict'; var nomnom = require('nomnom'); var signal = require('./lib/signal'); var tree = require('./lib/tree'); var task = function (name, callback, options) { var command = nomnom.command(name); options.forEach(function (option) { command = command.option(option.name, { abbr: opti...
'use strict'; var nomnom = require('nomnom'); var signal = require('./lib/signal'); var tree = require('./lib/tree'); var task = function (name, callback, options) { options = options || []; var command = nomnom.command(name); options.forEach(function (option) { command = command.option(option....
Allow task third parameter to be optional
Allow task third parameter to be optional
JavaScript
mit
byggjs/bygg
7e6be2fd2346557fc81bd544ac8745021c50e266
index.js
index.js
'use strict'; var toStr = Number.prototype.toString; module.exports = function isNumberObject(value) { if (typeof value === 'number') { return true; } if (typeof value !== 'object') { return false; } try { toStr.call(value); return true; } catch (e) { return false; } };
'use strict'; var toStr = Number.prototype.toString; var tryNumberObject = function tryNumberObject(value) { try { toStr.call(value); return true; } catch (e) { return false; } }; module.exports = function isNumberObject(value) { if (typeof value === 'number') { return true; } if (typeof value !== 'object'...
Improve optimizability of the non-try/catch part.
Improve optimizability of the non-try/catch part.
JavaScript
mit
ljharb/is-number-object
0f375c2e85a348ce377cd7c6eced277b47a470ba
index.js
index.js
#!/usr/bin/env node /** * index.js * * for `character-map` command */ var opts = require('minimist')(process.argv.slice(2)); var opentype = require('opentype.js'); if (!opts.f || typeof opts.f !== 'string') { console.log('use -f to specify your font path, TrueType and OpenType supported'); return; } opentype....
#!/usr/bin/env node /** * index.js * * for `character-map` command */ var opts = require('minimist')(process.argv.slice(2)); var opentype = require('opentype.js'); if (!opts.f || typeof opts.f !== 'string') { console.log('use -f to specify your font path, TrueType and OpenType supported'); return; } opentype....
Fix broken iteration of items in Opentype.js slyphs object
Fix broken iteration of items in Opentype.js slyphs object
JavaScript
mit
bitinn/character-map
73eb904356c11abab11481a9585005afc017edd8
src/conjure/fragment.js
src/conjure/fragment.js
'use strict'; export default class Fragment { render () { return null; } /** * Generic event handler. Turns class methods into closures that can be used as event handlers. If you need to use * data from the event object, or have access to the event object in general, use handleEvent inst...
'use strict'; export default class Fragment { render () { return null; } /** * Generic event handler. Turns class methods into closures that can be used as event handlers. If you need to use * data from the event object, or have access to the event object in general, use handleEvent inst...
Change order of arguments in Fragment.handle
Change order of arguments in Fragment.handle
JavaScript
mit
smiley325/conjure