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
28b930f4227fd9e796e0567d07ff53a0162cceac
lib/system/init/bundle/utils/resolve_vendor_packages.js
lib/system/init/bundle/utils/resolve_vendor_packages.js
// Takes a root path and an array of vendor package declarations and returns a // mapping of module names to absolute paths for the given packages. // It's similar to `require.resolve()` but resolves relative paths relative to // the given root directory instead of the current module's root. 'use strict'; var path ...
// Takes a root path and an array of vendor package declarations and returns a // mapping of module names to absolute paths for the given packages. // It's similar to `require.resolve()` but resolves relative paths relative to // the given root directory instead of the current module's root. 'use strict'; var path ...
Correct the note on vendor package path resolver.
Correct the note on vendor package path resolver.
JavaScript
mit
nodeca/nodeca.core,nodeca/nodeca.core
a517b8345b5c9fa41b41c3dc7893ca52a972c4bd
app/scripts/views/downloadedList.js
app/scripts/views/downloadedList.js
/** * View for viewing downloaded videos. */ export default class DownloadedList { /** * Default constructor for setting the values * * @param {HTMLElement} element - The HTML element to bind/adopt * @param {Array<Object>} [mediaItems=null] - The array containing media items */ constructor(element,...
import * as _ from 'lodash'; /** * View for viewing downloaded videos. */ export default class DownloadedList { /** * Default constructor for setting the values * * @param {HTMLElement} element - The HTML element to bind/adopt * @param {Array<Object>} [mediaItems=null] - The array containing media item...
Use map for creating the nodes
Use map for creating the nodes
JavaScript
apache-2.0
shnigi/YleOffline,shnigi/YleOffline
cb05aaf0f646a0eab8246ca22adf5fb1c985be8b
packages/whosmysanta-core/index.js
packages/whosmysanta-core/index.js
/* @flow */ type Category = 'Electronics' | 'Games' | 'Home Decoration'; type Wish = string | Array<Category>; type User = { name: string, email: string, wish?: Wish, }; export type Selection = { gifter: User, recipient: User, }; const raffleSecretSanta = (users: Array<User>): Array<Selection> => {...
/* @flow */ type Category = 'Electronics' | 'Games' | 'Home Decoration'; type Wish = string | Array<Category>; type User = { name: string, email: string, wish?: Wish, }; export type Selection = { gifter: User, recipient: User, }; const drawSecretSantas = (users: Array<User>): Array<Selection> => { ...
Rename core method to drawSecretSantas
Rename core method to drawSecretSantas
JavaScript
mit
WhosMySanta/app,WhosMySanta/app,WhosMySanta/whosmysanta
43696bd4131df40c20631a422236dae47cc68204
src/core/music.js
src/core/music.js
var Music = { sounds: { }, prepareSound: function(filename) { if (typeof(this.sounds[filename]) == 'undefined') { this.sounds[filename] = new Audio('assets/audio/' + filename); } return this.sounds[filename]; }, loopSound: function(filename) { var sound = t...
var Music = { sounds: { }, prepareSound: function(filename) { if (typeof(this.sounds[filename]) == 'undefined') { this.sounds[filename] = new Audio('assets/audio/' + filename); } return this.sounds[filename]; }, loopSound: function(filename) { var sound = t...
Fix stopAll() not working (at all)
Music: Fix stopAll() not working (at all)
JavaScript
mit
burningtomatoes/LootQuest
ea8a214b0fe044e81b9f2c0f9ddb228a8e964a5c
packages/lambda/src/postMetrics/index.js
packages/lambda/src/postMetrics/index.js
import { Metrics } from 'metrics' export async function handler (event, context, callback) { try { const metric = await new Metrics().createMetric(event.type, event.title, event.unit, event.description, event.status, event.props) callback(null, JSON.strin...
import { Metrics } from 'metrics' export async function handler (event, context, callback) { try { const metric = await new Metrics().createMetric(event.type, event.title, event.unit, event.description, event.status, event.props) callback(null, JSON.strin...
Return the error details when the postMetrics parameter is invalid
Return the error details when the postMetrics parameter is invalid
JavaScript
apache-2.0
ks888/LambStatus,ks888/LambStatus,ks888/LambStatus
07d742ff1811066793c99f091eabab4869f34629
src/file-saver.js
src/file-saver.js
/* angular-file-saver * * Provides integration between FileSaver.js (implements HTML5 saveAs()) * and angular * * (c) 2015 Philipp Alferiov * License: MIT * */ (function() { 'use strict'; angular .module('fileSaver', []) .factory('SaveAs', [SaveAs]); function SaveAs () { function handleBlob(dat...
/* angular-file-saver * * Provides integration between FileSaver.js and Angular * * (c) 2015 Philipp Alferov * License: MIT * */ (function() { 'use strict'; angular .module('fileSaver', []) .factory('SaveAs', [SaveAs]); function SaveAs () { function blobInit(data, type) { var blob; ...
Add support for blob object as parameter
Add support for blob object as parameter
JavaScript
mit
alferov/angular-file-saver
11dfadd29204b74f91dd47165f2ba26c5efba5f5
workcraft/CircuitPlugin/res/scripts/circuit-component-refinement.js
workcraft/CircuitPlugin/res/scripts/circuit-component-refinement.js
framework.addJavaScriptHelp("setCircuitComponentRefinement", "circuitWork, componentRef, refinementPath", "set 'refinementPath' file as refinement for component 'componentRef' in Circuit 'circuitWork'"); function setCircuitComponentRefinement(circuitWork, componentRef, refinementPath) { circuitMathModel = circ...
framework.addJavaScriptHelp("setCircuitComponentRefinement", "circuitWork, componentRef, refinementPath", "set 'refinementPath' file as refinement for component 'componentRef' in Circuit 'circuitWork'"); function setCircuitComponentRefinement(circuitWork, componentRef, refinementPath) { circuitMathModel = circ...
Set base path for refinement model
Set base path for refinement model
JavaScript
mit
workcraft/workcraft,danilovesky/workcraft,danilovesky/workcraft,danilovesky/workcraft,workcraft/workcraft,workcraft/workcraft,workcraft/workcraft,danilovesky/workcraft
9ac228e8216088a5aab2a03d4b82bf449545520e
app/tests/main.js
app/tests/main.js
require(["jquery", "backbone", "jasmine-html"], function($, Backbone, jasmine) { // NOTE: This is *the* place to add specs to the test suite // See the docs for more info on adding specs to Moxie specs = []; // Core app specs.push('tests/specs/app'); //Favourites specs.push('favourites/sp...
require(["jquery", "backbone", "jasmine-html"], function($, Backbone, jasmine) { // NOTE: This is *the* place to add specs to the test suite // See the docs for more info on adding specs to Moxie specs = []; // Core app specs.push('tests/specs/app'); //Favourites specs.push('favourites/sp...
Load specs for infinite scroll
Load specs for infinite scroll
JavaScript
apache-2.0
ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client
8eea51e02be811a1f91c925fa0a137349cbb5c38
src/app.js
src/app.js
'use strict'; import angular from 'angular'; import uiRouter from '@uirouter/angularjs'; import angularMaterial from 'angular-material'; import 'angular-material/angular-material.css'; import ngMdIcons from 'angular-material-icons'; import MoviesService from './services/movies/movies'; import UserService from './se...
'use strict'; import angular from 'angular'; import uiRouter from '@uirouter/angularjs'; import angularMaterial from 'angular-material'; import 'angular-material/angular-material.css'; import ngMdIcons from 'angular-material-icons'; import MoviesService from './services/movies/movies'; import UserService from './se...
Change the api url to connect to the backend server
Change the api url to connect to the backend server
JavaScript
mit
pulakchakraborty/Internal-CraftWorks-Frontend,pulakchakraborty/Internal-CraftWorks-Frontend
4222dd2e371085594d579c0f444c50c7caec0560
app/js/utils/email-utils.js
app/js/utils/email-utils.js
// @flow import { ServerAPI } from './server-utils' import log4js from 'log4js' const logger = log4js.getLogger(__filename) export function sendRecoveryEmail( email: string, blockstackId?: string, encryptedSeed: string ): Promise<any> { const { protocol, hostname, port } = location const thisUrl = `${protocol}//...
// @flow import { ServerAPI } from './server-utils' import log4js from 'log4js' const logger = log4js.getLogger(__filename) export function sendRecoveryEmail( email: string, blockstackId?: string, encryptedSeed: string ): Promise<any> { const { protocol, hostname, port } = location const thisUrl = `${protocol}//...
Send view recovery code URL with email request.
Send view recovery code URL with email request.
JavaScript
mpl-2.0
blockstack/blockstack-browser,blockstack/blockstack-browser,blockstack/blockstack-portal,blockstack/blockstack-portal,blockstack/blockstack-browser,blockstack/blockstack-portal,blockstack/blockstack-browser,blockstack/blockstack-browser,blockstack/blockstack-portal,blockstack/blockstack-portal,blockstack/blockstack-bro...
b523f48a77d1e98981667e72cd60bb50a35aa224
src/app.js
src/app.js
import "babel-polyfill"; import React from 'react'; import ReactDOM from 'react-dom'; import { applyRouterMiddleware, browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { useScroll } from 'react-router-scroll'; import makeRoutes from './routes'; import Root from './...
import "babel-polyfill"; import React from 'react'; import ReactDOM from 'react-dom'; import { applyRouterMiddleware, hashHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { useScroll } from 'react-router-scroll'; import makeRoutes from './routes'; import Root from './con...
Switch to using react-router hashHistory
Switch to using react-router hashHistory
JavaScript
mit
recharts/recharts.org,recharts/recharts.org
b75674c5b559b516ab843f25867e6da13f795d2d
src/bin/link-specs.js
src/bin/link-specs.js
import fs from 'node-promise-es6/fs'; import path from 'path'; async function run() { const {linkDependencies = {}} = await fs.readJson('package.json'); try { await fs.mkdir(path.resolve('spec/integration')); } catch (e) { if (e.code !== 'EEXIST') { throw e; } } await* Object.keys(linkDep...
import fs from 'node-promise-es6/fs'; import path from 'path'; async function run() { const {linkDependencies = {}} = await fs.readJson('package.json'); try { await fs.mkdir(path.resolve('spec')); } catch (e) { if (e.code !== 'EEXIST') { throw e; } } try { await fs.mkdir(path.resolve(...
Handle non-existence of spec directory
Handle non-existence of spec directory
JavaScript
mit
vinsonchuong/npm-integration
8f4e96ebd1823af6b008309f4482ade2254bacb9
blueprints/ember-cli-paint/index.js
blueprints/ember-cli-paint/index.js
'use strict'; module.exports = { normalizeEntityName: function() {}, afterInstall: function() { return this.addPackagesToProject([ { name: 'liquid-fire', target: '0.17.1' }, { name: 'ember-rl-dropdown', target: 'git+https://git@github.com/alphasights/ember-rl-dropdown.git' }, { name: 'ember-...
'use strict'; module.exports = { normalizeEntityName: function() {}, afterInstall: function() { return this.addPackagesToProject([ { name: 'liquid-fire', target: '0.17.1' }, { name: 'ember-rl-dropdown', target: 'git+https://git@github.com/alphasights/ember-rl-dropdown.git' }, { name: 'ember-...
Add broccoli-sass as a dependency
Add broccoli-sass as a dependency
JavaScript
mit
alphasights/ember-cli-paint,alphasights/ember-cli-paint
5088834cb2f18cf51d9bc5ce030a9bd241877fb2
lib/check-runtime.js
lib/check-runtime.js
var name, unsupportedFeatures = []; var features = { class: works('class A {}'), arrowFunction: works('() => {}'), let: works('let x'), const: works('const x = 1'), destructuring: works('var {x} = {x:1}'), defaultParamValues: works('function a (a=1) {}'), promises: works('Promise.resolve().t...
var name, unsupportedFeatures = []; var features = { class: works('class A {}'), arrowFunction: works('() => {}'), let: works('let x'), const: works('const x = 1'), destructuring: works('var {x} = {x:1}'), defaultParamValues: works('function a (a=1) {}'), promises: works('Promise.resolve().t...
Test runtime for template literals
Test runtime for template literals
JavaScript
isc
marek-saji/filmweb
41ab956377f7c796dc8d5790fa099fb5d5b29d65
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-mocha-cli'); grunt.loadNpmTasks('grunt-jslint'); grunt.initConfig({ mochacli: { options: { reporter: 'spec', require: ['should'] }, all: ['test/'] }, jsli...
module.exports = function(grunt) { grunt.loadNpmTasks('grunt-mocha-cli'); grunt.loadNpmTasks('grunt-jslint'); grunt.loadNpmTasks('grunt-typescript'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.initConfig({ mochacli: { options: { reporter: 'spec', ...
Add typescript and clean targets to gruntfile
Add typescript and clean targets to gruntfile
JavaScript
mit
cybrown/plugme,cybrown/plugme
20020479a95e7d49e9b781f4f2f9f6a349b7f361
Gruntfile.js
Gruntfile.js
var matchdep = require("matchdep"); module.exports = function(grunt) { // load all grunt tasks require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); var cfg = { jshint2: { options: { jshint: { boss: true, node: true } }, all: ["lib/**/*.js", "test/**/*.js", "Gruntfi...
var matchdep = require("matchdep"); module.exports = function(grunt) { // load all grunt tasks require('load-grunt-tasks')(grunt); var cfg = { jshint2: { options: { jshint: { boss: true, node: true } }, all: ["lib/**/*.js", "test/**/*.js", "Gruntfile.js"] }, simplemocha: { op...
Use load-grunt-tasks instead of matchdep
Use load-grunt-tasks instead of matchdep https://github.com/sindresorhus/load-grunt-tasks
JavaScript
mit
jgable/cache-swap
4569b78d22781ff28486368c10278cb9d6276ef6
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ jshint: { all: ['src/**/*.js', 'test/**/*.js'], options: { globals: { _: false, $: false, jasmine: false, describe: false, it: false, expect: false, beforeEach: false, ...
module.exports = function(grunt) { grunt.initConfig({ jshint: { all: ['src/**/*.js', 'test/**/*.js'], options: { globals: { _: false, $: false, jasmine: false, describe: false, it: false, expect: false, beforeEach: false, ...
Define The Default Grunt Task
Define The Default Grunt Task
JavaScript
mit
nguyenthong/build-your-own-angularjs,dee342/build-your-own-angularjs,zackgao/build-your-own-angularjs,checkraiser/build-your-own-angularjs,ovarunendra/build-your-own-angularjs,resalisbury/build-your-own-angularjs
47826dc10fa9ff62a56b62c8fb8f7e5d6f3d9cce
Gruntfile.js
Gruntfile.js
var config = require("./Build/Config"); module.exports = function(grunt) { "use strict"; // Display the execution time of grunt tasks require("time-grunt")(grunt); // Load all grunt-tasks in 'Build/Grunt-Options'. var gruntOptionsObj = require("load-grunt-configs")(grunt, { "config" : { src: "Build/Grunt-O...
module.exports = function(grunt) { "use strict"; // Display the execution time of grunt tasks require("time-grunt")(grunt); // Load all grunt-tasks in 'Build/Grunt-Options'. var gruntOptionsObj = require("load-grunt-configs")(grunt, { "config" : { src: "Build/Grunt-Options/*.js" } }); grunt.initConfig(g...
Remove an unnecessary require call for the Grunt-Config file
[MISC] Remove an unnecessary require call for the Grunt-Config file
JavaScript
mit
t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template
826c8a75ba7cbfa96a64bd82286b0175ba3897d0
Gruntfile.js
Gruntfile.js
'use strict'; module.exports = function(grunt) { var gtx = require('gruntfile-gtx').wrap(grunt); gtx.loadAuto(); var gruntConfig = require('./grunt'); gruntConfig.package = require('./package.json'); gtx.config(gruntConfig); gtx.alias('build', ['build-dist', 'less', 'copy']); gtx.alias('build-dist', ['...
'use strict'; module.exports = function(grunt) { var gtx = require('gruntfile-gtx').wrap(grunt); gtx.loadAuto(); var gruntConfig = require('./grunt'); gruntConfig.package = require('./package.json'); gtx.config(gruntConfig); gtx.alias('build', ['build-dist', 'less', 'copy']); gtx.alias('build-dist', ['...
Remove unneeded grunt task (PR comment)
Remove unneeded grunt task (PR comment)
JavaScript
mit
holidayextras/ui-toolkit,holidayextras/ui-toolkit
48c42c77760aeb3e53c0870dac0e78959e4a7820
public/app/services/authService.js
public/app/services/authService.js
(function() { 'use strict'; angular.module('authService', []); .factory('Auth', function($http, $q, AuthToken) { var authFactory = {}; authFactory.login = function(username, password) { //get API from api.post return $http.post('/api/login', { username: username, passwo...
(function() { 'use strict'; angular.module('authService', []); // A U T H F A C T O R Y .factory('Auth', function($http, $q, AuthToken) { var authFactory = {}; authFactory.login = function(username, password) { //get API from api.post return $http.post('/api/login', { ...
Create AuthToken factory and added nethods for localStorage
Create AuthToken factory and added nethods for localStorage
JavaScript
mit
shotbyabel/UserStories,shotbyabel/UserStories
92ffcf48b953aa12c33628b41f41505913bb062e
src/configureStore.js
src/configureStore.js
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; import initialReducers from './initialReducers'; import enhanceReducer from './enhanceReducer'; import epics from './epics'; import { createLogger } from 'redux-logger'; export default function configureSto...
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk'; import { createLogger } from 'redux-logger'; import initialReducers from './initialReducers'; import enhanceReducer from './enhanceReducer'; import epics from './epics'; export default function configureSto...
Reorder imports to satisfy ESLint. Part of STRIPES-100
Reorder imports to satisfy ESLint. Part of STRIPES-100
JavaScript
apache-2.0
folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core
9b34e97339cedae7821baed56e364e951e184988
js/pubsub.js
js/pubsub.js
/* Copyright 2014 (c) SoFIE Studios. All rights reserved. * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file. */ /** * @fileoverview A simple Pub/Sub system based on jQuery callbacks. Taken from the * jQuery gist here: http://api.jquery.com/jQuery.Callbacks/ *...
/* Copyright 2014 (c) SoFIE Studios. All rights reserved. * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file. */ /** * @fileoverview A simple Pub/Sub system based on jQuery callbacks. Taken from the * jQuery gist here: http://api.jquery.com/jQuery.Callbacks/ *...
Clean up a vestigial variable.
Clean up a vestigial variable.
JavaScript
mit
raketesturm/chicken_and_egg,raketesturm/chicken_and_egg
6f12c8fb7cb253d6426aef49cb9c2dbafae579ea
symbols.js
symbols.js
define([ 'symbols/base', 'symbols/dnd', 'symbols/architecture' ], function(baseScaled, dndScaled, architectureScaled) { var scaledSymbols = function(scale) { var options = { scale : scale, doorOffset : 8 }; options.doorThickness = options.doorOffset; options.doorWidth = ...
define([ 'symbols/base', 'symbols/dnd' ], function(baseScaled, dndScaled, architectureScaled) { var scaledSymbols = function(scale) { var options = { scale : scale, doorOffset : 8 }; options.doorThickness = options.doorOffset; options.doorWidth = options.scale - (options.doo...
Remove reference to 'architecture' symbol style
Remove reference to 'architecture' symbol style These symbols aren't included in the repository, as I'm unsure of their copyright status.
JavaScript
mit
isikyus/aeldardin-rooms,isikyus/aeldardin-rooms
535656f2a021850b3801acc417d8056a079d7414
src/helpers/player.js
src/helpers/player.js
const player = require('play-sound')( opts = {} ); const Random = require('random-js'); const sounds_path = './node_modules/kaamelott-soundboard'; const sound_connect = []; const sounds_start = [ 'en_garde_espece_de_vieille_pute_degarnie', 'en_garde_ma_mignone', ]; const sounds_win = [ 'putain_il_est_for...
const player = require('play-sound')( opts = {} ); const Random = require('random-js'); const sounds_path = './node_modules/kaamelott-soundboard'; const sound_connect = []; const sounds_start = [ 'en_garde_espece_de_vieille_pute_degarnie', 'en_garde_ma_mignone', ]; const sounds_win = [ 'putain_il_est_for...
Add log to check sound
Add log to check sound
JavaScript
mit
EPSI-I5-Kaamelott/Kaamelott-rasp,EPSI-I5-Kaamelott/Kaamelott-rasp
ce8f43eca5ee1d20a56d1dd08169b1f13f22e367
src/store/main.js
src/store/main.js
// import clientSocket from '../clientSocket' // const socket = clientSocket(); // ------------------------------------ // Constants // ------------------------------------ export const MAKE_SCREENSHOT = 'MAKE_SCREENSHOT' // ------------------------------------ // Actions // ------------------------------------ expor...
// ------------------------------------ // Constants // ------------------------------------ const MAKE_SCREENSHOT = 'MAKE_SCREENSHOT' // ------------------------------------ // Actions // ------------------------------------ export function makeScreenshot() { return { type: MAKE_SCREENSHOT } } // // ...
Remove Socket Client where it doesnt belong
Remove Socket Client where it doesnt belong
JavaScript
mit
salvocanna/shotio,salvocanna/shotio
0eb31fc617a73711b266faccaf5ee2e5e15dc6c5
app/models/plugin.js
app/models/plugin.js
import DS from 'ember-data'; var Plugin = DS.Model.extend({ name: DS.attr('string'), packageName: DS.attr('string'), description: DS.attr('string'), readme: DS.attr('string'), repositoryUrl: DS.attr('string'), website: DS.attr('string'), lastModified: DS.attr('date'), lastVersion: DS.attr('string'), ...
import DS from 'ember-data'; var Plugin = DS.Model.extend({ name: DS.attr('string'), packageName: DS.attr('string'), description: DS.attr('string'), readme: DS.attr('string'), repositoryUrl: DS.attr('string'), website: DS.attr('string'), lastModified: DS.attr('date'), lastVersion: DS.attr('string'), ...
Add installationCount attr on Plugin model
Add installationCount attr on Plugin model
JavaScript
mit
sergiolepore/hexo-plugin-site,sergiolepore/hexo-plugin-site
fa6cb13455a4deab26ed6c31c2fc93d9a317c359
app/pricing/route.js
app/pricing/route.js
import AbstractModuleRoute from 'hospitalrun/routes/abstract-module-route'; export default AbstractModuleRoute.extend({ addCapability: 'add_pricing', additionalModels: [{ name: 'expenseAccountList', findArgs: ['lookup', 'expense_account_list'] }, { name: 'procedurePricingTypes', findArgs: ['lookup...
import AbstractModuleRoute from 'hospitalrun/routes/abstract-module-route'; import { translationMacro as t } from 'ember-i18n'; export default AbstractModuleRoute.extend({ addCapability: 'add_pricing', additionalModels: [{ name: 'expenseAccountList', findArgs: ['lookup', 'expense_account_list'] }, { ...
Use translation file for '+ new item' in pricing
Use translation file for '+ new item' in pricing
JavaScript
mit
HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend
79116836a66e074da31e763700f64d2087badfac
Resources/ui/common/LoginView.js
Resources/ui/common/LoginView.js
var TopLevelView = require('ui/common/components/TopLevelView'); var NetworkHelper = require('helpers/NetworkHelper'); function LoginView() { var loginUrl = Ti.App.Properties.getString('server_url') + '/api/login'; var self = new TopLevelView('Login'); var emailField = Ti.UI.createTextField({ width : '80%...
var TopLevelView = require('ui/common/components/TopLevelView'); var NetworkHelper = require('helpers/NetworkHelper'); function LoginView() { var loginUrl = Ti.App.Properties.getString('server_url') + '/api/login'; var self = new TopLevelView('Login'); var emailField = Ti.UI.createTextField({ width : '80%...
Store the time of login.
Store the time of login.
JavaScript
mit
nilenso/ashoka-survey-mobile,nilenso/ashoka-survey-mobile
f7ad33ff22db54477de52ac62ba6924d392133c1
intake.js
intake.js
#!/usr/bin/env node /* * This file is used to intake the unique printfection urls * Usage: ./intake.js path/to/csv [mongodb://url] * Requires mongo://url argv or MONGO_URL env var */ var dotenv = require('dotenv').load(); var fs = require('fs'); var csv = require('csv'); var mongoose = require('mongoose'); var Co...
#!/usr/bin/env node /* * This file is used to intake the unique printfection urls * Usage: ./intake.js path/to/csv [mongodb://url] * Requires mongo://url argv or MONGO_URL env var */ var dotenv = require('dotenv').load(); var fs = require('fs'); var csv = require('csv'); var mongoose = require('mongoose'); var Co...
Fix typo in mongoose connection
Fix typo in mongoose connection
JavaScript
mit
eddiezane/contribot
d6412f7d0665dc8d8f13ecd654594124fe9843bd
lib/index.js
lib/index.js
'use strict'; // Load modules var Stringify = require('./stringify'); var Parse = require('./parse'); // Declare internals var internals = {}; exports.stringify = Stringify; exports.parse = Parse;
'use strict'; var Stringify = require('./stringify'); var Parse = require('./parse'); module.exports = { stringify: Stringify, parse: Parse };
Use `module.exports` instead of `exports`.
[Refactor] Use `module.exports` instead of `exports`.
JavaScript
bsd-3-clause
ljharb/qs,hapijs/qs
5120afd1a64910246af3745b8b13d81894fa20b3
gruntFile.js
gruntFile.js
module.exports = function (grunt) { "use strict"; // load all grunt tasks require('load-grunt-tasks')(grunt); // Default task. grunt.registerTask('default', ['jshint', 'karma']); // uglify grunt.registerTask('minify', ['uglify']); var testConfig = function(configFile, customOptions) { ...
module.exports = function (grunt) { "use strict"; // load all grunt tasks require('load-grunt-tasks')(grunt); // Default task. grunt.registerTask('default', ['jshint', 'karma']); // uglify grunt.registerTask('minify', ['uglify']); var testConfig = function(configFile, customOptions) { ...
Set jshint configuration option 'latedef' to false
Set jshint configuration option 'latedef' to false
JavaScript
mit
Cuahutli/calendario-angular-ejemplo,dmoser49/ui-calendar,davijunior/ui-calendar,tsuzuki08/ui-calendar,joshorvis/ui-calendar,seawenzhu/ui-calendar,angular-ui/ui-calendar,CapeSepias/ui-calendar,polarbird/ui-calendar,polarbird/ui-calendar,Cuahutli/calendario-angular-ejemplo,luiseduardohdbackup/ui-calendar,marclemedioni/ui...
ae57bf08ed1d72d70012af7f2d6627c67590b7d9
ie9-oninput-polyfill.js
ie9-oninput-polyfill.js
(function (d) { if (navigator.userAgent.indexOf('MSIE 9') === -1) return; var elements = [], values = [], ev = d.createEvent('CustomEvent'); ev.initCustomEvent('input', true, true, {}); d.addEventListener('selectionchange', function() { var actEl = d.activeElement; if (actEl.tagName === 'INPUT' && act...
(function (d) { if (navigator.userAgent.indexOf('MSIE 9') === -1) return; var elements = [], values = [], ev = d.createEvent('CustomEvent'); ev.initCustomEvent('input', true, true, {}); d.addEventListener('selectionchange', function() { var actEl = d.activeElement; var tagName = actEl.tagName; if ...
Add support for `textarea` inputs.
Add support for `textarea` inputs.
JavaScript
mit
buzinas/ie9-oninput-polyfill
d2c03df1622c5f1e543e01a7abe6832c0580d69c
webserver/static/js/main.js
webserver/static/js/main.js
console.log("Hello Console!"); host = window.location.host.split(":")[0]; console.log(host); var conn; $(document).ready(function () { conn = new WebSocket("ws://"+host+":8888/ws"); conn.onclose = function(evt) { console.log("connection closed"); } conn.onmessage = function(evt) { consol...
console.log("Hello Console!"); host = window.location.host.split(":")[0]; console.log(host); var conn; $(document).ready(function () { conn = new WebSocket("ws://"+host+":8888/ws"); conn.onclose = function(evt) { console.log("connection closed"); } conn.onmessage = function(evt) { consol...
Print data received from server
Print data received from server
JavaScript
mit
quintenpalmer/attempt,quintenpalmer/attempt,quintenpalmer/attempt,quintenpalmer/attempt
757e1f513e1731e95d8d7d534ab966af9ff98f9a
stories/iconButton.js
stories/iconButton.js
import React from 'react'; import PropTable from './components/propTable'; import { storiesOf } from '@storybook/react'; import { checkA11y } from 'storybook-addon-a11y'; import { withInfo } from '@storybook/addon-info'; import { withKnobs, boolean, select } from '@storybook/addon-knobs/react'; import { IconAddMediumOu...
import React from 'react'; import PropTable from './components/propTable'; import { storiesOf } from '@storybook/react'; import { checkA11y } from 'storybook-addon-a11y'; import { withInfo } from '@storybook/addon-info'; import { withKnobs, boolean, select } from '@storybook/addon-knobs/react'; import { IconAddMediumOu...
Add a IconButton story to demo the 'element' prop
Add a IconButton story to demo the 'element' prop
JavaScript
mit
teamleadercrm/teamleader-ui
dc97ac93333dcee8ac54154559f856570a8316f9
src/client/es6/service/base/cart-base.js
src/client/es6/service/base/cart-base.js
class CartBase { constructor(CartPost) { this.modelPost = CartPost; } logInit(name) { if (!console) { return; } console.log(`Service ${name} initialized`); } } CartBase.$inject = ['CartPost']; export default CartBase;
class CartBase { constructor(CartPost, CartCategory, CartTag, CartAttachment) { this.modelPost = CartPost; this.modelCategory = CartCategory; this.modelTag = CartTag; this.modelAttachment = CartAttachment; } logInit(name) { if (!console) { return; } console.log(`Service ${name} ...
Add all self defined models into base service injection.
Add all self defined models into base service injection.
JavaScript
mit
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
8415d253d4b517e74e39dee27b08daec3d90aeba
web_modules/Footer/index.js
web_modules/Footer/index.js
import React, { Component } from "react" import styles from "./index.css" import logo from "./evilmartians.svg" export default class Footer extends Component { render() { return ( <footer className={ styles.root } role="contentinfo"> <div className={ styles.inner }> <div className={ sty...
import React, { Component } from "react" import styles from "./index.css" import logo from "./evilmartians.svg" export default class Footer extends Component { render() { return ( <footer className={ styles.root } role="contentinfo"> <div className={ styles.inner }> <div className={ sty...
Add UTM mark to Evil Martian link
Add UTM mark to Evil Martian link
JavaScript
mit
postcss/postcss.org,postcss/postcss.org
b56e227c94b63ffbe32b5dcb47ed1b0f74718a1d
app/assets/javascripts/tagging.js
app/assets/javascripts/tagging.js
(function () { "use strict" var root = this, $ = root.jQuery; if (typeof root.GOVUK === 'undefined') { root.GOVUK = {}; } root.GOVUK.Tagging = { ready: function(options) { $('.js-tag-list').select2({ tags: options['autocompleteWith'], tokenSeparators: [','], initS...
(function () { "use strict" var root = this, $ = root.jQuery; if (typeof root.GOVUK === 'undefined') { root.GOVUK = {}; } root.GOVUK.Tagging = { ready: function(options) { $('.js-tag-list').select2({ tags: options['autocompleteWith'], selectOnBlur: true, tokenSepa...
Allow entered text to be used as a tag
Allow entered text to be used as a tag In user research a common problem with tagging was discovered. Users would enter text into the input field then click away or on the submit button. The default behaviour would hide the tag drop down and lear the tag input. So forms were being submitted without the intended tags. ...
JavaScript
mit
alphagov/transition,alphagov/transition,alphagov/transition
c014fd94a955fa7a200141d59139d9bee8d164fb
lib/index.js
lib/index.js
'use strict' var co = require('co') var cli = require('./cli') var utils = require('./utils') var reporter = require('./reporter') var notifier = require('update-notifier') var pkg = require('../package') co(function * () { // check if using latest notifier({pkg: pkg}).notify() // get command options var opts = ...
'use strict' var co = require('co') var cli = require('./cli') var utils = require('./utils') var reporter = require('./reporter') var notifier = require('update-notifier') var pkg = require('../package') co(function * () { // check if using latest notifier({pkg: pkg}).notify() // get command options var opts = ...
Fix bug introduced by switching to minimist
Fix bug introduced by switching to minimist
JavaScript
mit
lukeed/taskr,lukeed/taskr,bucaran/fly,lukeed/taskr
dcd9fd16f3ad4a3532981b93b021130efae2c18d
src/app-core.js
src/app-core.js
import * as HAWS from 'home-assistant-js-websocket'; window.HAWS = HAWS; window.HASS_DEMO = __DEMO__; const init = window.createHassConnection = function (password) { const proto = window.location.protocol === 'https:' ? 'wss' : 'ws'; const url = `${proto}://${window.location.host}/api/websocket`; const options...
import * as HAWS from 'home-assistant-js-websocket'; window.HAWS = HAWS; window.HASS_DEMO = __DEMO__; const init = window.createHassConnection = function (password) { const proto = window.location.protocol === 'https:' ? 'wss' : 'ws'; const url = `${proto}://${window.location.host}/api/websocket`; const options...
Add service worker registration back
Add service worker registration back
JavaScript
apache-2.0
sdague/home-assistant-polymer,sdague/home-assistant-polymer
af695603f859c97dccb25106689846a818f620a0
site/index.js
site/index.js
delete process.env.BROWSER; require('babel/register'); require('./server');
delete process.env.BROWSER; require('babel/register'); if (process.env.NODE_ENV === 'production') { require('react/dist/react.min'); // prime cache require.cache[require.resolve('react')] = require.cache[require.resolve('react/dist/react.min')]; require('react-dom/dist/react-dom.min'); // prime cache r...
Update site to include react for prod
Update site to include react for prod
JavaScript
mit
domadams/essential-ui,domadams/essential-ui,domadams/essential-ui
25552c3591c1fbdb15506c9acfdf9c90c35a3d5e
lib/mpd-process.js
lib/mpd-process.js
var Q = require('q'), spawn = require('child_process').spawn, fs = require('fs'), net = require('net'), logger = require('winston'), waitForSocket = require('./wait-for-socket.js'), mpdConfig = require(__dirname+'/mpd-config.js'); exports.create = function(config) { var mpdConf =...
var Q = require('q'), spawn = require('child_process').spawn, fs = require('fs'), net = require('net'), logger = require('winston'), waitForSocket = require('./wait-for-socket'), mpdChildProcess = require('./mpd-child-process'), mpdConfig = require('./mpd-config'); exp...
Implement new MPDChildProcess object into production code
Implement new MPDChildProcess object into production code
JavaScript
apache-2.0
radiodan/radiodan.js,radiodan/radiodan.js
49be25add0c1445faf8c19bc923747b538289cbf
lib/records/soa.js
lib/records/soa.js
var validators = require('../validators'); function SOA(host, opts) { if (typeof(host) !== 'string') throw new TypeError('host (string) is required'); if (!opts) opts = {}; var defaults = { admin: 'hostmaster.' + host, serial: 0,...
var validators = require('../validators'); function SOA(host, opts) { if (typeof(host) !== 'string') throw new TypeError('host (string) is required'); if (!opts) opts = {}; var defaults = { admin: 'hostmaster.' + host, serial: 0,...
Set more reasonable SOA defaults
Set more reasonable SOA defaults
JavaScript
mit
arekinath/node-named
b4d684fb56bc1877ef37bde06d2de142ca333a76
packages/@sanity/cli/src/util/clientWrapper.js
packages/@sanity/cli/src/util/clientWrapper.js
import client from '@sanity/client' import getUserConfig from './getUserConfig' /** * Creates a wrapper/getter function to retrieve a Sanity API client. * Instead of spreading the error checking logic around the project, * we call it here when (and only when) a command needs to use the API */ const defaults = { ...
import client from '@sanity/client' import getUserConfig from './getUserConfig' /** * Creates a wrapper/getter function to retrieve a Sanity API client. * Instead of spreading the error checking logic around the project, * we call it here when (and only when) a command needs to use the API */ const defaults = { ...
Add a more helpful error when the user needs to login to perform an operation
Add a more helpful error when the user needs to login to perform an operation
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
7bddee4df00ecf95d3ba6a6cc86c6c64de4e485b
app/notes/notesForm.controller.js
app/notes/notesForm.controller.js
(function() { 'use strict'; angular .module('meganote.notes') .controller('NotesFormController', NotesFormController); NotesFormController.$inject = ['notesService', '$state']; function NotesFormController(notesService, $state) { var vm = this; vm.note = notesService.find($state.params.noteI...
(function() { 'use strict'; angular .module('meganote.notes') .controller('NotesFormController', NotesFormController); NotesFormController.$inject = ['notesService', '$state']; function NotesFormController(notesService, $state) { var vm = this; vm.note = notesService.find($state.params.noteI...
Add state.go to saveNote and deleteNote functions. Remove unnecessary resetForm function
Add state.go to saveNote and deleteNote functions. Remove unnecessary resetForm function
JavaScript
mit
sbaughman/meganote,sbaughman/meganote
4b5f2c89c089fe7da4d56ed2420e17e12d8536d4
lib/platforms/react-native.js
lib/platforms/react-native.js
import { Linking } from 'react-native'; // eslint-disable-line import/no-unresolved, max-len export const dance = authUrl => Linking.openURL(authUrl) .then(() => new Promise((resolve, reject) => { const handleUrl = (url) => { if (!url || url.indexOf('fail') > -1) { reject(url); } else { ...
import { Linking } from 'react-native'; // eslint-disable-line import/no-unresolved, max-len let previousOnLinkChange; export const dance = (authUrl) => { if (previousOnLinkChange) { Linking.removeEventListener('url', previousOnLinkChange); } return Linking.openURL(authUrl) .then(() => new Promise((res...
Fix race condition in deep linking
Fix race condition in deep linking
JavaScript
mit
adamjmcgrath/react-native-simple-auth
b25caa9ab43e665d9568ba10bf280de37ac4b090
src/utils/generatePropsFromAttributes.js
src/utils/generatePropsFromAttributes.js
import htmlAttributesToReact from './htmlAttributesToReact'; import inlineStyleToObject from './inlineStyleToObject'; /** * Generates props for a React element from an object of HTML attributes * * @param {Object} attributes The HTML attributes * @param {String} key The key to give the react element */ export def...
import htmlAttributesToReact from './htmlAttributesToReact'; import inlineStyleToObject from './inlineStyleToObject'; /** * Generates props for a React element from an object of HTML attributes * * @param {Object} attributes The HTML attributes * @param {String} key The key to give the react element */ export def...
Fix empty string styles by running inlineStyleToObject on all strings and deleting non-string style props
Fix empty string styles by running inlineStyleToObject on all strings and deleting non-string style props
JavaScript
mit
wrakky/react-html-parser
05edf964c50eac5f6668c6980d33d3d7aa8aba87
assistant/utils.js
assistant/utils.js
function normalizeName (name) { return capitalizeFirstLetter(name.replace(/\s+/g, '')); } function capitalizeFirstLetter (string) { return string.charAt(0).toUpperCase() + string.slice(1); } function getKeyAndUnit (value) { let valueId = ' '; let measureUnit = ''; switch (value) { case 'te...
function normalizeName (name) { return capitalizeFirstLetter(name.replace(/\s+/g, '')); } function capitalizeFirstLetter (string) { return string.charAt(0).toUpperCase() + string.slice(1); } function uncapitalizeFirstLetter (string) { return string.charAt(0).toLowerCase() + string.slice(1); } function ge...
Fix assistant get key database
Fix assistant get key database
JavaScript
mit
gerard87/my-meteorological-station,gerard87/my-meteorological-station,gerard87/my-meteorological-station
f0504f461fc2391266ec91d5bd7e634955bdef48
app/alloy.js
app/alloy.js
// The contents of this file will be executed before any of // your view controllers are ever executed, including the index. // You have access to all functionality on the `Alloy` namespace. // // This is a great place to do any initialization for your app // or create any global variables/functions that you'd like to ...
// The contents of this file will be executed before any of // your view controllers are ever executed, including the index. // You have access to all functionality on the `Alloy` namespace. // // This is a great place to do any initialization for your app // or create any global variables/functions that you'd like to ...
Load the map module for each platform into Alloy Globals
Load the map module for each platform into Alloy Globals
JavaScript
apache-2.0
danielhanold/alloy_fugitive,sobytes/alloy_fugitive,sobytes/alloy_fugitive,danielhanold/alloy_fugitive
825f9de20ba740b317700bd8858325b9bf0ecd29
image/app.js
image/app.js
import { ProseEditor, ProseEditorConfigurator, EditorSession, ProseEditorPackage, ImagePackage } from 'substance' /* Example document */ const fixture = function(tx) { let body = tx.get('body') tx.create({ id: 'p1', type: 'paragraph', content: "Insert a new image using the image tool." }) bod...
import { ProseEditor, ProseEditorConfigurator, EditorSession, ProseEditorPackage, ImagePackage } from 'substance' /* Example document */ const fixture = function(tx) { let body = tx.get('body') tx.create({ id: 'p1', type: 'paragraph', content: "Insert a new image using the image tool." }) bod...
Change fixture for image example.
Change fixture for image example.
JavaScript
mit
substance/demos,philschatz/substance-editor,substance/examples,philschatz/substance-editor,substance/examples,substance/demos
4a071b27cb6b65eb35b7ecacfc5ea4739ad45d7c
app/Popup.js
app/Popup.js
import './global' import React from 'react' import ReactDOM from 'react-dom' import AuthPanel from './components/AuthPanel' import PopupHeader from './components/PopupHeader' import FeedContainer from './components/FeedContainer' import { getToken } from './storages/SessionStorage' import styles from './Popup.css' c...
import './global' import React from 'react' import ReactDOM from 'react-dom' import AuthPanel from './components/AuthPanel' import PopupHeader from './components/PopupHeader' import FeedContainer from './components/FeedContainer' import { getToken } from './storages/SessionStorage' import styles from './Popup.css' c...
Use async/await which getting token
Use async/await which getting token
JavaScript
mit
jastkand/vk-notifications,jastkand/vk-notifications
aed58e5b3d16adbcae22b3b3776be49dde2c87cb
backend/server/db/model/index.js
backend/server/db/model/index.js
module.exports = function models(r) { return { projects: require('./projects')(r), users: require('./users')(r), samples: require('./samples')(r), access: require('./access')(r), files: require('./files')(r) }; };
module.exports = function models(r) { return { projects: require('./projects')(r), users: require('./users')(r), samples: require('./samples')(r), access: require('./access')(r), files: require('./files')(r), r: r }; };
Make database available as an export.
Make database available as an export.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
8e31d12fdc639d8a85e803a401802e8a95129a31
both/methods/paragraphs.js
both/methods/paragraphs.js
/*****************************************************************************/ /* Paragraphs Methods */ /*****************************************************************************/ Meteor.methods({ /* * Example: * '/app/paragraphs/update/email': function (email) { * Users.update({_id: this.userId}, {$se...
/*****************************************************************************/ /* Paragraphs Methods */ /*****************************************************************************/ Meteor.methods({ /* * Example: * '/app/paragraphs/update/email': function (email) { * Users.update({_id: this.userId}, {$se...
Fix a bug related to paragraph ranks
Fix a bug related to paragraph ranks
JavaScript
mit
bojicas/letterhead,bojicas/letterhead
d05d955c9e9f61bf0ef5bc742f97f8674288af3c
test/support/Mouse.js
test/support/Mouse.js
const $ = require('NodObjC'); $.framework('Cocoa'); module.exports = { clickAt: (x, y) => { // get current mouse location const evtMouse = $.CGEventCreate(null); const mouseLocation = $.CGEventGetLocation(evtMouse); // simulate click, this will warp cursor position const evtDown = $.CGEventCreat...
const $ = require('NodObjC'); $.framework('CoreFoundation'); $.framework('CoreGraphics'); module.exports = { clickAt: (x, y) => { // get current mouse location const evtMouse = $.CGEventCreate(null); const mouseLocation = $.CGEventGetLocation(evtMouse); // simulate click, this will warp cursor posit...
Fix framework dependencies that used to work before 10.13
Fix framework dependencies that used to work before 10.13
JavaScript
mit
pronebird/NSEventMonitor,pronebird/NSEventMonitor,pronebird/NSEventMonitor,pronebird/NSEventMonitor
7a156489ed239bdbc372e94c5e9bba212fdd48b7
src/viewport.js
src/viewport.js
/** * Check whether an element is in the viewport by * more than offset px. */ export function inViewport (element, options) { const { top, right, bottom, left, width, height } = element.getBoundingClientRect(); const intersection = { t: bottom, r: window.innerWidth - left, b: window.i...
/** * Check whether an element is in the viewport by * more than offset px. */ export function inViewport (element, options) { const { top, right, bottom, left, width, height } = element.getBoundingClientRect(); const intersection = { t: bottom, r: window.innerWidth - left, b: window.i...
Fix wide and high entities thresholds and offsets handling
Fix wide and high entities thresholds and offsets handling
JavaScript
mit
kudago/in-view
ca3b1df3abe458cd6764b1b92b9397e0e637717d
lib/components/Input.js
lib/components/Input.js
import React, { Component } from 'react' import firebase, { reference, signIn } from '../firebase'; import { pick, map, extend } from 'lodash'; export default class Input extends Component { constructor(){ super(); this.state = { message: '', charCount: 140, } } handleSubmit() { this...
import React, { Component } from 'react' import firebase, { reference, signIn } from '../firebase'; import { pick, map, extend } from 'lodash'; export default class Input extends Component { constructor(){ super(); this.state = { message: '', } } handleSubmit() { this.props.sendMessage(thi...
Refactor character counter Now just a simple interpolation within the p-tag
Refactor character counter Now just a simple interpolation within the p-tag
JavaScript
mit
mlimberg/shoot-the-breeze,mlimberg/shoot-the-breeze
00f296a3ae6e9be2377002eab0d1d65ee9ecc57d
models/location.js
models/location.js
'use strict'; module.exports = function(sequelize, DataTypes) { var Location = sequelize.define('Location', { latitude: DataTypes.FLOAT(4, 6), longitude: DataTypes.FLOAT(4, 6), timestamp: DataTypes.DATE, speed: DataTypes.FLOAT(4, 2), course: DataTypes.INTEGER, altitude: DataTypes.FLOAT(4, 2),...
'use strict'; module.exports = function(sequelize, DataTypes) { var Location = sequelize.define('Location', { latitude: DataTypes.FLOAT(4, 6), longitude: DataTypes.FLOAT(4, 6), timestamp: DataTypes.DATE, speed: DataTypes.FLOAT(4, 2), course: DataTypes.FLOAT(4, 2), altitude: DataTypes.FLOAT(4,...
Fix float datatype for gps course
Fix float datatype for gps course
JavaScript
mit
sbekti/seth-server,sbekti/seth-server
1fab3d9d803462799ee679aefba5dc1a5b1cf37c
app/models/users.js
app/models/users.js
'use strict'; var mongoose = require('mongoose'); var Schema = mongoose.Schema; var User = new Schema({ name: String, email: String, password: String, date: Date, city: String, state: String, movies: Array }); module.exports = mongoose.model('User', User);
'use strict'; var mongoose = require('mongoose'); var Schema = mongoose.Schema; var User = new Schema({ name: String, email: String, password: String, date: Date, city: String, state: String, gender: Number, notify: Boolean, movies: Array }); module.exports = mongoose.model('User', User);
Add properties to user model
Add properties to user model
JavaScript
mit
mirabalj/movieswap,mirabalj/movieswap
b2c1fe02b54fbcd0cfa241453e2c279bdf8b9848
js/config.js
js/config.js
// ref: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript/2880929#2880929 var urlParams; (window.onpopstate = function () { var match, pl = /\+/g, // Regex for replacing addition symbol with a space search = /([^&=]+)=?([^&]*)/g, decode = function (s) { re...
// ref: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript/2880929#2880929 var urlParams; (window.onpopstate = function () { var match, pl = /\+/g, // Regex for replacing addition symbol with a space search = /([^&=]+)=?([^&]*)/g, decode = function (s) { re...
Store counter info in window.counters and move them to its position.
Store counter info in window.counters and move them to its position.
JavaScript
mit
wildjcrt/wargame-web,wildjcrt/wargame-web,wildjcrt/wargame-web
866d2022f7981593db7bf811192da7d2c0a36ff0
client/js/middleware/api.js
client/js/middleware/api.js
import api from "../libs/api"; import { DONE } from "../constants/wrapper"; const API = store => next => action => { function request(method, url, params, body, headers){ const state = store.getState(); const promise = api.execRequest(method, url, state.settings.apiUrl, state.jwt, state.settings....
import api from "../libs/api"; import { DONE } from "../constants/wrapper"; const API = store => next => action => { function request(method, url, params, body, headers){ const state = store.getState(); const updatedParams = { oauth_consumer_key: state.settings.oauthConsumerKey, // Add cons...
Add lti key to all requests
Add lti key to all requests
JavaScript
mit
atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/lti_starter_app,atomicjolt/adhesion,atomicjolt/adhesion,atomicjolt/lti_starter_app,atomicjolt/adhesion
17c863479bf25a6d2b6bc4f5bd85d665ea74e2fa
src/runner/install/package-json.js
src/runner/install/package-json.js
import path from 'path' import json from '../../util/json' const saguiScripts = { 'build': 'sagui build', 'develop': 'sagui develop --port 3000', 'dist': 'NODE_ENV=production sagui build --optimize', 'start': 'npm run develop', 'test': 'npm run test:lint && npm run test:unit', 'test:coverage': 'npm run tes...
import path from 'path' import json from '../../util/json' const saguiScripts = { 'build': 'sagui build', 'develop': 'sagui develop --port 3000', 'dist': 'NODE_ENV=production sagui build --optimize', 'start': 'npm run develop', 'test': 'npm run test:lint && npm run test:typecheck && npm run test:unit', 'te...
Add package.json scripts for type checking 🚕
Add package.json scripts for type checking 🚕
JavaScript
mit
saguijs/sagui,saguijs/sagui
5857c79fe3629c04563861d54a7cd48af50765ee
sciexp.js
sciexp.js
#!/usr/bin/env node /* Copyright 2015 Google Inc. All Rights Reserved. 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 a...
#!/usr/bin/env node /* Copyright 2015 Google Inc. All Rights Reserved. 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 a...
Use locally installed tbb if available
Use locally installed tbb if available
JavaScript
apache-2.0
dglazkov/tree-builder-builder,chunmun/tree-builder-builder,dglazkov/tree-builder-builder,chunmun/tree-builder-builder,chunmun/tree-builder-builder,dglazkov/tree-builder-builder
7e2f9221edf9cfdd69068dc7a61938c25e9952ef
ui/gulp/bundle/css.js
ui/gulp/bundle/css.js
'use strict' const iif = require('gulp-if') const concat = require('gulp-concat') const cssmin = require('gulp-cssmin') const sourcemaps = require('gulp-sourcemaps') const filenames = require('gulp-filenames') const flatten = require('gulp-flatten') const hash = require('gulp-hash-filename') const util = require('gulp...
'use strict' const iif = require('gulp-if') const concat = require('gulp-concat') const cssmin = require('gulp-cssmin') const sourcemaps = require('gulp-sourcemaps') const filenames = require('gulp-filenames') const flatten = require('gulp-flatten') const hash = require('gulp-hash-filename') const util = require('gulp...
Add workarround to fix source map paths.
Add workarround to fix source map paths.
JavaScript
mit
jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr
cb4aa6bd6e5e922a526bec712c33fd9c3268d272
bs-config.js
bs-config.js
const Bibi = require('./bibi.info.js'); module.exports = { port: 61671, ui: { port: 61672 }, server: { baseDir: Bibi.DIST, index: 'index.html' }, files: [ 'bibi/**' ], startPath: 'bibi/?book=', snippetOptions: { whitelist: [ 'bibi/...
const Bibi = require('./bibi.info.js'); module.exports = { port: 61671, ui: { port: 61672 }, server: { baseDir: Bibi.DIST, index: 'index.html' }, startPath: 'bibi/?book=', ghostMode: false };
Simplify BrowserSync setting (because HTMLs become not to be loaded via src attribute of iframes).
Simplify BrowserSync setting (because HTMLs become not to be loaded via src attribute of iframes).
JavaScript
mit
satorumurmur/bibi,satorumurmur/bibi
0a560657159f0bef78a6782d4a437ff47937b499
components/article-teaser-view.js
components/article-teaser-view.js
import Link from 'next/prefetch' const ArticleTeaserView = ({ id, title, date, lead, author, teaser }) => ( <div className="article-teaser-view"> <Link href={`/article?id=${id}`}> <a className="article-teaser-view__link"> <div className="article-teaser-view__wrapper"> <img src={teaser} />...
import Link from 'next/prefetch' const ArticleTeaserView = ({ id, title, date, lead, author, teaser }) => ( <div className="article-teaser-view"> <div className="article-teaser-view__wrapper"> <img src={teaser} /> <Link href={`/article?id=${id}`}> <a className="article-teaser-view__li...
Read more button and only title is link
Read more button and only title is link
JavaScript
mit
Reprocess/middle-end
673dc99c917f737a572e1d3ea71d7de5b57edca0
src/app/components/msp/application/sending/i18n/data/en/index.js
src/app/components/msp/application/sending/i18n/data/en/index.js
module.exports = { pageTitle: 'Submitting your MSP enrollment application', transmissionSuccess: 'You MSP enrollment application has been successfully submitted!', transmissionInProgressMessage: 'Please do not close this browser tab or window, it can take 1-2 minutes to complete the submission.', transmissionEr...
module.exports = { pageTitle: 'Submitting your MSP enrollment application', transmissionSuccess: 'You MSP enrollment application has been successfully submitted!', transmissionInProgressMessage: 'Please do not close this browser tab or window, it can take 1-2 minutes to complete the submission.', transmissionEr...
Make consistent with Sarah's text
Make consistent with Sarah's text
JavaScript
apache-2.0
bcgov/MyGovBC-MSP,bcgov/MyGovBC-MSP,bcgov/MyGovBC-MSP,bcgov/MyGovBC-MSP
640ce2cc805d79e5cc65b48fad7ef1901a6508b8
server.js
server.js
'use strict'; const express = require('express'); const app = express(); app.route('/') .get((req, res) => { res.sendFile(process.cwd() + '/public/index.html'); }); const port = process.env.PORT || 8080; app.listen(port, function() { console.log('Node.js listening on port ' + port + '...'); });
'use strict'; const express = require('express'); const app = express(); app.enable('trust proxy'); app.set('json spaces', 1); app.route('/') .get((req, res) => { res.sendFile(process.cwd() + '/public/index.html'); }); app.route('/api/whoami') .get((req, res) => { let result = {}; ...
Add route for the api
Add route for the api
JavaScript
mit
paperbagcorner/requestheaderparser,paperbagcorner/requestheaderparser
ba45795400f99580c7d0de04c1cafe41185c7c34
configs/webpack.js
configs/webpack.js
// Webpack Configuration // ===================== // // Import Modules // -------------- // // ### NPM Modules import {assign} from 'bound-native-methods/object'; import Webpack from 'webpack'; // Define Values // ------------- const isProduction = process.env.NODE_ENV === 'production'; // Export Module // --------...
// Webpack Configuration // ===================== // // Import Modules // -------------- // // ### Node.js Modules import path from 'path'; // ### NPM Modules import {assign} from 'bound-native-methods/object'; import Webpack from 'webpack'; // Define Values // ------------- const isProduction = process.env.NODE_E...
Enable better local module resolution within the app
Enable better local module resolution within the app 20a273a only works for the server-side; this commit adds the necessary config to enable the some effect on the client-side.
JavaScript
mit
gsklee/cell,gsklee/frontier,gsklee/frontier,gsklee/cell,gsklee/cell,gsklee/frontier
61c5711581833448d43a7cabcf6c25eca7b6ae64
Gulpfile.js
Gulpfile.js
/** * Gulpfile.js */ /* jshint node:true */ 'use strict'; var gulp = require('gulp'), sass = require('gulp-ruby-sass'), autoprefixer = require('gulp-autoprefixer'), cssmin = require('gulp-minify-css'), rename = require('gulp-rename'), sourcemaps = require('gulp-sourcemaps'); // Gulp Tasks // ...
/** * Gulpfile.js */ /* jshint node:true */ 'use strict'; var gulp = require('gulp'), sass = require('gulp-ruby-sass'), autoprefixer = require('gulp-autoprefixer'), cssmin = require('gulp-minify-css'), rename = require('gulp-rename'), sourcemaps = require('gulp-sourcemaps'); // Gulp Tasks // ...
Fix clean-css processing font @import rule
Fix clean-css processing font @import rule
JavaScript
mit
tyxchen/aops-city
cc89b77fba71b7dc7bdc9bcaa0e8141cd6ebdac8
lib/admin.js
lib/admin.js
function Admin() {} Admin.prototype.setVersion = function(version) { this.version = version; }; Admin.prototype.getViewData = function(req) { var viewData = { loggedIn: req.session.loggedIn, version: this.version }; return viewData; }; module.exports = new Admin();
function Admin() {} Admin.prototype.setVersion = function(version) { this.version = version; }; Admin.prototype.getViewData = function(req) { var viewData = { //loggedIn: req.session.loggedIn, loggedIn: true, version: this.version }; return viewData; }; module.exports = new Admin();
Remove password at the moment for debugging
Remove password at the moment for debugging
JavaScript
mpl-2.0
fhsav/clock.js,fhsav/clock.js
576d8c4f3a1ac4cce2a2158b96562f6b02ddfd31
lib/apis/index.js
lib/apis/index.js
module.exports = { servers: require("./servers") , accounts: require("./accounts") , api_clients: require("./api_clients") , cloud_ips: require("./cloud_ips") , collaborations: require("./collaborations") };
// Dependencies var Fs = require("fs") , allFiles = Fs.readdirSync(__dirname) , Apis = module.exports = {} ; // Require APIs allFiles.forEach(function (c) { if (!/^(?!index.js).*\.js$/.test(c)) { return; } Apis[c.replace(/.js$/, "")] = require(__dirname + "/" + c); });
Read files from apis directory and include them
Read files from apis directory and include them
JavaScript
mit
IonicaBizau/node-brightbox
21a778ed1d74c4321f9bdc596b7f5081868420d3
lib/index.js
lib/index.js
var builder = require('./builder') exports.Builder = builder.Builder exports.loadBrocfile = builder.loadBrocfile var server = require('./server') exports.server = server var cli = require('./cli') exports.cli = cli exports.makeTree = function makeTree (dir) { throw new Error('broccoli.makeTree has been removed in fa...
var builder = require('./builder') exports.Builder = builder.Builder exports.loadBrocfile = builder.loadBrocfile var server = require('./server') exports.server = server var cli = require('./cli') exports.cli = cli exports.makeTree = function makeTree (dir) { throw new Error('broccoli.makeTree has been removed in fa...
Throw helpful error for broccoli.bowerTrees
Throw helpful error for broccoli.bowerTrees
JavaScript
mit
ember-cli/broccoli,rwjblue/broccoli,broccolijs/broccoli,ember-cli/broccoli,gabesoft/broccoli,broccolijs/broccoli,broccolijs/broccoli,osxi/broccoli,osxi/broccoli,ixisystems/broccoli,ember-cli/broccoli,osxi/broccoli,gabesoft/broccoli,ixisystems/broccoli,gabesoft/broccoli,broccolijs/broccoli
4767de606654d59c528ffe07d156dbee0413195d
lib/install/prune-tree.js
lib/install/prune-tree.js
'use strict' var validate = require('aproba') var flattenTree = require('./flatten-tree.js') function isNotPackage (mod) { return function (parentMod) { return mod !== parentMod } } module.exports = function pruneTree (tree) { validate('O', arguments) var flat = flattenTree(tree) // we just do this repeatedly...
'use strict' var validate = require('aproba') var flattenTree = require('./flatten-tree.js') function isNotPackage (mod) { return function (parentMod) { return mod !== parentMod } } module.exports = function pruneTree (tree) { validate('O', arguments) var flat = flattenTree(tree) // we just do this repeatedly...
Fix bug in tree pruning caused by change in dev module flagging
Fix bug in tree pruning caused by change in dev module flagging
JavaScript
artistic-2.0
lxe/npm,haggholm/npm,yibn2008/npm,TimeToogo/npm,cchamberlain/npm,misterbyrne/npm,Volune/npm,kimshinelove/naver-npm,rsp/npm,DaveEmmerson/npm,segrey/npm,haggholm/npm,segrey/npm,xalopp/npm,xalopp/npm,midniteio/npm,princeofdarkness76/npm,cchamberlain/npm,evanlucas/npm,ekmartin/npm,evocateur/npm,chadnickbok/npm,DIREKTSPEED-...
cbf2399768b058a32dff69054d9560edf3bbea49
logic/monitorModelDeleteLogic.js
logic/monitorModelDeleteLogic.js
var configuration = require('../config/configuration.json') module.exports = function (redisClient, accountHashID, monitorHashID, callback) { multi = redisClient.multi() var monitorTable = configuration.TableMAMonitorModel + monitorHashID multi.hdel(monitorTable, configuration.ConstantMMTime, configurati...
var configuration = require('../config/configuration.json') module.exports = function (redisClient, accountHashID, monitorHashID, callback) { multi = redisClient.multi() var monitorTable = configuration.TableMAMonitorModel + monitorHashID multi.hdel(monitorTable, configuration.ConstantMMTime, configurati...
Remove MonitorModel HashID from AccountModel:MonitorModel:hashID
Remove MonitorModel HashID from AccountModel:MonitorModel:hashID
JavaScript
mit
Flieral/Logger-Service
2f896a83dab4b0316ca13835a5299468df971e7f
lib/index.js
lib/index.js
var path = require('path'); var fs = require('fs'); var execute = function(pluginName, configFilePathStr, callback) { if (!pluginName) { callback(new Error('Input the plugin name')); return; } if (!configFilePathStr) { callback(new Error('Input the config file path')); return; } var configFi...
var path = require('path'); var fs = require('fs'); var execute = function(pluginName, configFilePathStr, callback) { if (!pluginName) { callback(new Error('Input the plugin name')); return; } if (!configFilePathStr) { callback(new Error('Input the config file path')); return; } var configFi...
Change error message when config file is invalid syntax
Change error message when config file is invalid syntax
JavaScript
mit
teloo/delevts
0ea7c1171343c90f868387b70fa885ed8a3b189c
lib/parse.js
lib/parse.js
var cheerio = require('cheerio'); var ParseContext = require('./ParseContext'); var callbackify = require('./callbackify'); function parse (html, filter, callback) { var $ = cheerio.load(html); var parseContext = new ParseContext({ $: $, $container: $.root(), filter: filter }); return callbackify...
var cheerio = require('cheerio'); var ParseContext = require('./ParseContext'); var callbackify = require('./callbackify'); function parse (html, filter, callback) { if (typeof html !== 'string') { throw new Error('HTML string required'); } var $ = cheerio.load(html); var parseContext = new ParseContext(...
Throw error if html not passed in
Throw error if html not passed in
JavaScript
mit
prolificinteractive/node-html-to-json
212569d87e2c2f57b59cd44b74af2027060cc035
templates/template_dependencies.js
templates/template_dependencies.js
/** Describes the dependencies for each library-specific template * Note that the first entry will be the default. * THE OBJECT NAME MUST BE THE SAME AS THE FOLDER NAME */ module.exports = { vue: { 'name': 'VueJS & bootstrap-vue', 'folder': 'vue', 'dependencies': [ 'vue', 'bootstrap-vue'...
/** Describes the dependencies for each library-specific template * Note that the first entry will be the default. * THE OBJECT NAME MUST BE THE SAME AS THE FOLDER NAME */ module.exports = { vue: { 'name': 'VueJS & bootstrap-vue', 'folder': 'vue', 'dependencies': [ 'vue', 'bootstrap-vue'...
Make blank the default, add external
Make blank the default, add external
JavaScript
apache-2.0
TotallyInformation/node-red-contrib-uibuilder,TotallyInformation/node-red-contrib-uibuilder
64f22bd5fd70d22ea83ef98364073d1432415a36
lib/utils.js
lib/utils.js
var path = require('path'); function isFileURL(url) { return url.substr(0, 5) === 'file:'; } exports.isFileURL = isFileURL; /* Remove scheme prefix from file URLs, so that they are paths. */ function filePath(url) { if (isFileURL(url)) return url.replace(/^file:\/+/, '/'); } exports.filePath = filePath; /* C...
var path = require('path'); function isFileURL(url) { return url.substr(0, 5) === 'file:'; } exports.isFileURL = isFileURL; /* Remove scheme prefix from file URLs, so that they are paths. */ function filePath(url) { if (isFileURL(url)) return url.replace(/^file:\/+/, '/'); } exports.filePath = filePath; /* C...
Drop explicit handling of absolute URLs
Drop explicit handling of absolute URLs
JavaScript
mit
Psvensso/builder,matthewbauer/builder,alexisvincent/builder,jrauschenbusch/builder,buddhike/builder,ahmedshuhel/builder,systemjs/builder,richardTowers/builder,JeroenVinke/builder,Munter/builder,douglasduteil/builder,JeroenVinke/builder,synaptek/builder,jrauschenbusch/builder,alexisvincent/builder,robwormald/builder,Mun...
f4720d01fe6433e62f294a44cdb32101f87faf0c
src/plugins/error-response.js
src/plugins/error-response.js
import AbstractLambdaPlugin from './abstract-lambda-plugin' import PluginHook from '../enums/hooks' import LambdaType from '../enums/lambda-type' export default class ErrorResponse extends AbstractLambdaPlugin { constructor (defaultErrorResponse) { super('errorResponse', LambdaType.API_GATEWAY) this._default...
import AbstractLambdaPlugin from './abstract-lambda-plugin' import PluginHook from '../enums/hooks' import LambdaType from '../enums/lambda-type' export default class ErrorResponse extends AbstractLambdaPlugin { constructor (defaultErrorResponse) { super('errorResponse', LambdaType.API_GATEWAY) this._default...
Add some defaults on the error handler to prevent undefined errors
Add some defaults on the error handler to prevent undefined errors
JavaScript
mit
SkippyZA/lambda-lib
e0b443d57e691894bc1e03be0fb6797d6021073b
lib/gauss.js
lib/gauss.js
/** * Gauss [Node] * Copyright(c) 2012 Fredrick Galoso * LICENSE: MIT/X11 */ var Vector = require('./vector'), TimeSeries = require('./timeseries'); /** * Library version */ exports.version = '0.2.5'; /** * Expose constructors */ exports.Vector = Vector; exports.TimeSeries = TimeSeries;
/** * Gauss * https://github.com/stackd/gauss * Copyright(c) 2012 Fredrick Galoso * LICENSE: MIT/X11 */ var Vector = require('./vector'), TimeSeries = require('./timeseries'); /** * Library version */ exports.version = '0.2.5'; /** * Expose constructors */ exports.Vector = Vector; exports.TimeSeries =...
Remove platform distinction in source
Remove platform distinction in source
JavaScript
mit
korel-san/gauss,wayoutmind/gauss
a9501f8d24bbbbaaeaee5b54bf71989aaf492286
lib/index.js
lib/index.js
// Public object SockJS = (function(){ var _document = document; var _window = window; var utils = {}; <!-- include lib/reventtarget.js --> <!-- include lib/simpleevent.js --> <!-- include lib/eventemitter.js --> <!-- include lib/utils.js --> <!-- include lib/dom.js --> <!-- i...
// Public object SockJS = (function(){ var _document = document; var _window = window; var utils = {}; <!-- include lib/reventtarget.js --> <!-- include lib/simpleevent.js --> <!-- include lib/eventemitter.js --> <!-- include lib/utils.js --> <!-- include lib/dom.js --> <!-- i...
Remove explicit AMD name for greater portability.
Remove explicit AMD name for greater portability. See http://requirejs.org/docs/api.html#modulename.
JavaScript
mit
modulexcite/sockjs-client,the1sky/sockjs-client,jmptrader/sockjs-client,webmechanicx/sockjs-client,bulentv/sockjs-client,reergymerej/sockjs-client,sockjs/sockjs-client,woosoobar/sockjs-client,modulexcite/sockjs-client,f5io/sockjs-client,webmechanicx/sockjs-client,woosoobar/sockjs-client,Chovans/sockjs-client,f5io/sockj...
bf1a5444e2f87e311f6c09f597cc3aa9f17cb48f
lib/index.js
lib/index.js
/** server The backbone of the server module. In development, this runs proxied through BrowserSync server. @param {Object} options Options passed on to "globals" @param {Function} next Called when server successfully initialized **/ var reorg = require("reorg"); module.exports = reorg(function(options,...
/** server The backbone of the server module. In development, this runs proxied through BrowserSync server. @param {Object} options Options passed on to "globals" @param {Function} next Called when server successfully initialized **/ var reorg = require("reorg"); module.exports = reorg(function(options,...
Disable Express' view components (we use our own)
Disable Express' view components (we use our own)
JavaScript
apache-2.0
shippjs/shipp-server,shippjs/shipp-server
7250c0f7f1d5abb0fd9835cc46a03781b6924d6c
tests/sample-application/server.js
tests/sample-application/server.js
var app = require( 'express' )(); var switchyard = require( './../../lib/switchyard.js' ); switchyard( app, __dirname + '/controllers' ); module.exports = app.listen( 40595, function() { } );
var app = require( 'express' )(); var switchyard = require( './../../lib/switchyard.js' ); switchyard( app, __dirname + '/controllers', require( './route-aliases.js' ) ); module.exports = app.listen( 40595, function() { } );
Include route aliases in our test conditions.
Include route aliases in our test conditions.
JavaScript
apache-2.0
pcrumm/switchyard
f56ae3649d8629d89e9055c900c0897ac4def4ba
lib/route.js
lib/route.js
export default { mounted () { window.location.reload() }, render () {} }
module.exports = { mounted: () => { window.location.reload() }, render: () => {} }
Use syntax that doesnt make uglify explode
Use syntax that doesnt make uglify explode
JavaScript
mit
samtgarson/nuxt-oauth
9f2e103f4fc10b8f533a4f4b277971a205e0abf7
app/models/ripple_address.js
app/models/ripple_address.js
var Sequelize = require('sequelize'); var db = require('../../config/initializers/sequelize'); var RippleAddress = sequelize.define('ripple_address', { id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true, }, user_id: { type: Sequelize.INTEGER, notNull: true }, managed: { type: Sequelize...
var Sequelize = require('sequelize'); var db = require('../../config/initializers/sequelize'); var RippleAddress = sequelize.define('ripple_address', { id: { type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true, }, user_id: { type: Sequelize.INTEGER, notNull: true }, managed: { type: Sequelize...
Add RippleAddress class method to create a user hosted wallet.
[FEATURE] Add RippleAddress class method to create a user hosted wallet.
JavaScript
isc
zealord/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,Parkjeahwan/awegeeks,zealord/gatewayd,xdv/gatewayd,crazyquark/gatewayd
33a656e73ef205cf0629339d826d423b62213c26
gulpfile.js
gulpfile.js
var gulp = require('gulp') var babel = require('gulp-babel') var sourcemaps = require('gulp-sourcemaps') gulp.task('build', function() { return gulp.src('upgrade-object.js') .pipe(sourcemaps.init()) .pipe(babel()) .pipe(sourcemaps.write('../maps')) .pipe(gulp.dest('dist')) })
var gulp = require('gulp') var babel = require('gulp-babel') var sourcemaps = require('gulp-sourcemaps') var path = require('path') var main = path.basename(require('./package.json').main) gulp.task('build', function () { return gulp.src([main, 'lib/*.js']) .pipe(sourcemaps.init()) .pipe(babel()) .pipe...
Make build script more flexible
Make build script more flexible
JavaScript
mit
ileri/upgrade-object
f656a9382483b30dd94a0d77aa5498ebe2af4e3d
app/config/default/mode/command-reference/invoke.js
app/config/default/mode/command-reference/invoke.js
var session = require("zed/session"); /** * Inputs: lines, cursor */ module.exports = function(info) { var pos = info.inputs.cursor; var lines = info.inputs.lines; // Search backwards for the command title to invoke, aborting // if we find a section header. for (var i = pos.row; i > 1 && lines[i...
var session = require("zed/session"); /** * Inputs: lines, cursor */ module.exports = function(info) { var command = info.inputs.lines[info.inputs.cursor.row].match(/^ `(.*)`$/)[1]; if (command) { session.callCommand(info.path, command); } };
Reduce clickable area to just the command title.
Reduce clickable area to just the command title.
JavaScript
mit
LuoZijun/zed,matthiaskr/zed,TheKiteEatingTree/zed,matejc/zed,matthiaskr/zed,LuoZijun/zed,zedapp/zed,TheKiteEatingTree/zed,AaronZhangL/zed,matthiaskr/zed,TheKiteEatingTree/zed,AaronZhangL/zed,zedapp/zed,LuoZijun/zed,AaronZhangL/zed,XenonApp/xenon,matejc/zed,zedapp/zed,matejc/zed,XenonApp/xenon
2db13d480c166f57a976b40161bcd818b43db613
modules/helma/parser.js
modules/helma/parser.js
/** * @fileoverview A JS interface to the Rhino parser. */ /** * Parse a script resource and return its AST tree. * @param resource {Resource} an instance of org.helma.repository.Resource */ exports.parseScriptResource = function(resource) { return getParser().parse(resource.content, resource.name, 0); }; /*...
/** * @fileoverview A JS interface to the Rhino parser. */ /** * Parse a script resource and return its AST tree. * @param resource {Resource} an instance of org.helma.repository.Resource */ exports.parseScriptResource = function(resource) { return getParser().parse(resource.content, resource.name, 0); }; /*...
Use full class name for Context class
Use full class name for Context class
JavaScript
apache-2.0
oberhamsi/ringojs,oberhamsi/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ringo/ringojs,Transcordia/ringojs,ringo/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,Transcordia/ringojs
246ff9ba16bb9a6f0003fd461710c4e2f9530d15
example-plugin/components/AccessibilityBadge.js
example-plugin/components/AccessibilityBadge.js
/* @flow */ import React from 'react'; import Badge from './Badge'; type P = { level: { aaa?: bool, aa?: bool, aaLarge?: bool, } } const AccessibilityBadge = ({ level }: P) => { let text = null; if (level.aaa) { text = 'AAA'; } if (level.aa) { text = 'AA'; } if (level.aaLarge) { text = 'AA Larg...
/* @flow */ import React from 'react'; import Badge from './Badge'; type P = { level: { aaa?: bool, aa?: bool, aaLarge?: bool, } } const AccessibilityBadge = ({ level }: P) => { let text; switch (true) { case level.aaa: text = 'AAA'; break; case level.aa: text = 'AA'; ...
Correct the precedence when rendering accessiblity badges
Correct the precedence when rendering accessiblity badges
JavaScript
mit
weaintplastic/react-sketchapp
b36a6b1e32376f6fb46c7d1e68bbcdf4955db480
client/js/connection/socket/index.js
client/js/connection/socket/index.js
// Socket.io singleton // // Usage: // var socket = require('./socket'); // socket.on('myevent', fn) var socket = null; var setupMessages = require('./messages'); var queue = {}; import( /* webpackChunkName: "socket-io" */ /* webpackPrefetch: true */ 'socket.io-client' ) .then(function (moduleWrap) { ...
// Socket.io singleton // // Usage: // var socket = require('./socket'); // socket.on('myevent', fn) var socket = null; var setupMessages = require('./messages'); var io = require('socket.io-client'); socket = io('/'); console.log('socket = io(/) called'); setupMessages(socket); exports.on = function (eventName...
Return socket.io to the main bundle
Return socket.io to the main bundle
JavaScript
mit
axelpale/tresdb,axelpale/tresdb
7afaa1f93364928757f879aa1d5e52709cb15c90
lib/BaseSocial.js
lib/BaseSocial.js
var _ = require('lodash'); /** * Create base social instance * @param {Object} [_config] * @constructor */ function BaseSocial(_config) { this._config = {}; _.forOwn(_config, function (value, key) { this.set(key, value); }.bind(this)); } /** * Get configuration value * @param {String} [path] * @retu...
var _ = require('lodash'); /** * Create base social instance * @param {Object} [_config] * @constructor */ function BaseSocial(_config) { this._config = {}; _.forOwn(_config, function (value, key) { this.set(key, value); }.bind(this)); } /** * Get configuration value * @param {String} [path] * @retu...
Add new methods to base social class
Add new methods to base social class
JavaScript
mit
ghaiklor/sails-service-social
c177e5b79511073102f297484c7bac51426d002e
app/screens/add-edit-task.js
app/screens/add-edit-task.js
import React, { Component } from 'react'; import { View } from 'react-native'; import { TaskForm } from '../components'; import { AddEditTaskStyles } from '../styles/containers'; export default class AddEditTask extends Component { getValuesFromListType(list) { switch (list) { case 'now': { return ['urgent'...
import React, { Component } from 'react'; import { View } from 'react-native'; import { TaskForm } from '../components'; import { AddEditTaskStyles } from '../styles/containers'; export default class AddEditTask extends Component { getValuesFromListType(list) { switch (list) { case 'now': { return ['urgent'...
Clean up initialValues for TaskForm
Clean up initialValues for TaskForm
JavaScript
mit
CarlaCrandall/DoItNow,CarlaCrandall/DoItNow,CarlaCrandall/DoItNow
a72758cd836169b548406666a0ca90b4e7e0c4f5
examples/cli-sample/index.js
examples/cli-sample/index.js
console.time('start'); var flatiron = require('../../lib/flatiron'), app = flatiron.app; app.use(flatiron.plugins.cli, { dir: __dirname, usage: [ 'Simple app example for flatiron!', '', 'app start - print a prompt and arguments', 'print <msg> - echo a message' ] }); app.cmd('app start', func...
console.time('start'); var flatiron = require('../../lib/flatiron'), app = flatiron.app; require('pkginfo')(module, 'version'); app.version = exports.version; app.use(flatiron.plugins.cli, { dir: __dirname, usage: [ 'Simple app example for flatiron!', '', 'app start - print a prompt and arguments...
Use `version` CLI option in `cli-sample`
[doc] Use `version` CLI option in `cli-sample`
JavaScript
mit
flatiron/flatiron,flatiron/flatiron
b35a03d3841e753f38af60988cfbcbc9cfe0ff11
lib/cli/create.js
lib/cli/create.js
/*! * Module dependencies. */ var console = require('./console'); /** * Command line create command. * * For now, forward to the original PhoneGap Build create. * * Options: * * - `argv` {Object} is an optimist object. * - `callback` {Function} is a completion callback. * - `e` {Error} is null unle...
/*! * Module dependencies. */ var console = require('./console'), path = require('path'); /** * Command line create command. * * For now, forward to the original PhoneGap Build create. * * Options: * * - `argv` {Object} is an optimist object. * - `callback` {Function} is a completion callback. * ...
Create outputs message to console.
[cli] Create outputs message to console.
JavaScript
apache-2.0
octavioturra/phonegap-cli
91883be18ca306a92b341e75a403e7a73cb97843
src/containers/Counter/Counter.js
src/containers/Counter/Counter.js
import React, { PropTypes, Component } from 'react' import { connect } from 'react-redux' import { incrementCounter, decrementCounter, incrementCounterAsync } from '../../actions/counter' import {} from './Counter.scss' class Counter extends Component { render () { return ( <div className="counter"> ...
import React, { PropTypes, Component } from 'react' import { connect } from 'react-redux' import { incrementCounter, decrementCounter, incrementCounterAsync } from '../../actions/counter' import {} from './Counter.scss' class Counter extends Component { constructor () { super() this.onIncrementCounter = th...
Remove the use of mapDispatchToProps
Remove the use of mapDispatchToProps
JavaScript
mit
RSS-Dev/live-html,epicsharp/react-boilerplate,epicsharp/react-boilerplate,RSS-Dev/live-html
2963f67cab1a87ae7aaa4e4b3fb04cc30b177485
src/directives/layervisibility.js
src/directives/layervisibility.js
goog.provide('go_layervisibility_directive'); goog.require('go'); goog.require('goog.asserts'); goModule.directive('goLayerVisibility', [ /** * @return {angular.Directive} The directive specs. */ function() { return { restrict: 'E', template: '<input type="checkbox" ng-model="l.visible"/>',...
goog.provide('go_layervisibility_directive'); goog.require('go'); goog.require('goog.asserts'); /** * Directive to control the visibility of a layer. To be used with * a checkbox like element. Requires ngModel. * * Usage: * <input type="checkbox" ng-model="layervisible" go-layer-visibility="layer"> */ goModule...
Make goLayerVisibility a directive of type A
Make goLayerVisibility a directive of type A
JavaScript
mit
tsauerwein/ngeo,gberaudo/ngeo,elemoine/ngeo,Jenselme/ngeo,Jenselme/ngeo,balpreetspankaj/ngeo,Jenselme/ngeo,gberaudo/ngeo,tsauerwein/ngeo,ger-benjamin/ngeo,Jenselme/ngeo,camptocamp/ngeo,mygu/ngeo,mygu/ngeo,kalbermattenm/ngeo,adube/ngeo,gberaudo/ngeo,adube/ngeo,adube/ngeo,camptocamp/ngeo,pgiraud/ngeo,elemoine/ngeo,elemoi...
a4c5fa249d82cbbd981e67f9e6a2f39958b16abb
lib/connection.js
lib/connection.js
var mongo = require('mongoskin'); var job = require('./job'); var Queue = require('./queue'); var Worker = require('./worker'); module.exports = Connection; function Connection(uri, options) { this.db = mongo.db(uri, options); } Connection.prototype.worker = function (queues, options) { var self = this; ...
var mongo = require('mongoskin'); var job = require('./job'); var Queue = require('./queue'); var Worker = require('./worker'); module.exports = Connection; function Connection(uri, options) { this.db = mongo.db(uri, options); } Connection.prototype.worker = function (queues, options) { var self = this; ...
Support single queue argument when creating working
Support single queue argument when creating working
JavaScript
mit
dhritzkiv/monq,saintedlama/monq,scttnlsn/monq,Santinell/monq
632756f438ef4a0411521ba49131b75b19b28ab0
src/components/ui/Loader.js
src/components/ui/Loader.js
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Loader from 'react-loader'; import { oneOrManyChildElements } from '../../prop-types'; export default class LoaderComponent extends Component { static propTypes = { children: oneOrManyChildElements, loaded: PropTypes.bool, ...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Loader from 'react-loader'; import { oneOrManyChildElements } from '../../prop-types'; export default class LoaderComponent extends Component { static propTypes = { children: oneOrManyChildElements, loaded: PropTypes.bool, ...
Add color as an optional property
Add color as an optional property
JavaScript
apache-2.0
GustavoKatel/franz,meetfranz/franz,meetfranz/franz,GustavoKatel/franz,meetfranz/franz
ee55420005e7ab23e8802b246758d9ba6580b7e7
directives/click-out-directive.js
directives/click-out-directive.js
/** * @author Evgeny Shpilevsky <evgeny@shpilevsky.com> * @date 9/27/13 */ angular.module("enlitePack").directive("clickOut", function ($document) { return { restrict: 'A', scope: { visible: '=clickOut' }, link: function (scope, element, attr) { var e...
/** * @author Evgeny Shpilevsky <evgeny@shpilevsky.com> * @date 9/27/13 */ angular.module("enlitePack").directive("clickOut", [$document, function ($document) { return { restrict: 'A', scope: { visible: '=clickOut' }, link: function (scope, element, attr) { ...
Fix load in minimized JS for the clickOut directive
Fix load in minimized JS for the clickOut directive
JavaScript
mit
enlitepro/enlite-angular-pack
29a9d3218214219671b1408b725e66057db2d8f9
src/crash-reporter-start.js
src/crash-reporter-start.js
module.exports = function(params) { const { crashReporter } = require('electron'); const os = require('os'); const platformRelease = os.release(); const arch = os.arch(); const { uploadToServer, releaseChannel } = params; crashReporter.start({ productName: 'Atom', companyName: 'GitHub', submitU...
module.exports = function(params) { const { crashReporter } = require('electron'); const os = require('os'); const platformRelease = os.release(); const arch = os.arch(); const { uploadToServer, releaseChannel } = params; const parsedUploadToServer = uploadToServer !== null? uploadToServer : false; cras...
Fix uploadToServer can't be null
Fix uploadToServer can't be null
JavaScript
mit
PKRoma/atom,PKRoma/atom,atom/atom,brettle/atom,PKRoma/atom,atom/atom,brettle/atom,atom/atom,Mokolea/atom,Mokolea/atom,brettle/atom,Mokolea/atom
3f32d2381e564a34efd5a357ee02b71b98fca164
src/lib/shadowtree/entry.js
src/lib/shadowtree/entry.js
import _Node from "./node" import {Context, ContextTypes, Doc, ParserStateOption} from "./node" export default class Entry extends _Node { /** @type {?_Node} */ get key() { return this.cacheNode("key") } /** @type {_Node} */ get value() { return this.cacheNode("value") } /** ...
import _Node from "./node" import {Context, ContextTypes, Doc, ParserStateOption} from "./node" export default class Entry extends _Node { /** @type {?_Node} */ get key() { return this.cacheNode("key") } /** @type {_Node} */ get value() { return this.cacheNode("value") } /** ...
Set the return type for Entry to the RHS
Set the return type for Entry to the RHS
JavaScript
bsd-2-clause
jj101k/php-lint,jj101k/php-lint