commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
740a375cc37975c57f8f88f0f14630a6021e7494
src/index.js
src/index.js
// @flow export {default as ChartData} from './chartdata/ChartData'; export {default as LineCanvas} from './component/canvas/LineCanvas'; export {default as ColumnCanvas} from './component/canvas/ColumnCanvas'; export {default as ScatterCanvas} from './component/canvas/ScatterCanvas';
// @flow export {default as ChartData} from './chartdata/ChartData'; export {default as Canvas} from './component/canvas/Canvas'; export {default as LineCanvas} from './component/canvas/LineCanvas'; export {default as ColumnCanvas} from './component/canvas/ColumnCanvas'; export {default as ScatterCanvas} from './compo...
Add canvas to export seeing as it is part of public api
Add canvas to export seeing as it is part of public api
JavaScript
mit
bigdatr/pnut,bigdatr/pnut
868d729ea7f3b928e811b0196598f09b0d11b3a3
src/index.js
src/index.js
var fs = require('fs'), Path = require('path'), scripts; scripts = [ 'pokemonfusion.js', 'catoverflow.js', 'nugme.coffee', 'mta.coffee', 'spot.js', 'hr.js' ]; module.exports = function (robot) { var path = Path.resolve(__dirname, 'scripts'); fs.exists(path, function (exists) {...
var fs = require('fs'), Path = require('path'), scripts; scripts = [ 'pokemonfusion.js', 'catoverflow.js', 'nugme.coffee', 'mta.coffee', 'spot.js', 'hr.js', 'jenkins-notifier.coffee' ]; module.exports = function (robot) { var path = Path.resolve(__dirname, 'scripts'); fs.e...
Enable our version of the jenkins-notifier script
Enable our version of the jenkins-notifier script
JavaScript
mit
josephcarmello/hubot-scripts,dyg2104/hubot-scripts,Tyriont/hubot-scripts,amhorton/hubot-scripts,1stdibs/hubot-scripts
0a029c055211315536b53a1960838dbf7d9ef610
src/index.js
src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import App from './components/app'; import reducers from './reducers'; const createStoreWithMiddleware = applyMiddleware()(createStore); ReactDOM.render( <Provi...
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import { BrowserRouter, Route } from 'react-router-dom'; import App from './components/app'; import reducers from './reducers'; const createStoreWithMiddleware = a...
Add dummy routes to try react-router-dom
Add dummy routes to try react-router-dom
JavaScript
mit
monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog
2e28d6f1578b9fe68a8d6bea3e7fbd7a61d8dbff
Resources/js/admin.js
Resources/js/admin.js
$(document).ready(function() { $('select[multiple]').each(function() { var select = $(this), search = $('<button/>', { 'class': 'btn' }).append( $('<span/>', { 'class': 'icon-search' })); select.removeAttr('required');...
$(document).ready(function() { if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) { $('select[multiple]').each(function() { var select = $(this), search = $('<button/>', { 'class': 'btn' }).append( $('<...
Disable select2 on mobile devices
Disable select2 on mobile devices
JavaScript
mit
bravesheep/crudify-bundle,bravesheep/crudify-bundle
611cc4009fa09351c2a012ab472affa2ec455cb8
cli.es6.js
cli.es6.js
#!/usr/bin/env node 'use strict'; import fs from 'fs'; import snfe from './index'; import { name, version } from './package.json'; let printHelpMesage = () => { console.log(`\nStrip Named Function Expression\n`); console.log(`Usage:\n`); console.log(` snfe [input file] > [output file]`); console.log(...
#!/usr/bin/env node 'use strict'; import fs from 'fs'; import snfe from './index'; import { name, version } from './package.json'; let printHelpMesage = () => { console.log(`\nStrip Named Function Expression\n`); console.log(`Usage:\n`); console.log(` snfe [input file] > [output file]`); console.log(...
Refactor the main logic block
Refactor the main logic block
JavaScript
mit
ajhsu/snfe
a502cf7fb2052263a2b0bb7d84e4cbfe91b70f86
Build/Grunt-Tasks/Compilers/Javascript.js
Build/Grunt-Tasks/Compilers/Javascript.js
/** * Compile:JS task. * Uglify and merge all javascript files in 'Public/Javascripts/Sources/'. */ var config = require("../../Config"); module.exports = function(grunt) { "use strict"; grunt.registerTask("compile:js", function() { // Optimize all js files if the 'useSingleFileBuild' option is 'false'. if(...
/** * Compile:JS task. * Uglify and merge all javascript files in 'Public/Javascripts/Sources/'. */ var config = require("../../Config"); module.exports = function(grunt) { "use strict"; grunt.registerTask("compile:js", function() { // Optimize all js files if the 'useSingleFileBuild' option is 'false'. if(...
Set the correct sub-task name for the uglify task
[BUGFIX] Set the correct sub-task name for the uglify task
JavaScript
mit
t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template
6591d7a6e52433519bb79678db85e015e3b50104
src/index.js
src/index.js
import React from 'react'; import Logo from './components/logo' import SocialButtons from './components/social-buttons' import Navigation from './components/navigation' import Home from './components/home'; import Footer from './components/footer'; import AppUrl from './appurl' class Page { render() { let...
import React from 'react'; import 'babel/polyfill'; import Logo from './components/logo' import SocialButtons from './components/social-buttons' import Navigation from './components/navigation' import Home from './components/home'; import Footer from './components/footer'; import AppUrl from './appurl' class Page { ...
Load babel polyfills, to work in less ES6 ready browsers.
Load babel polyfills, to work in less ES6 ready browsers.
JavaScript
mit
cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki
52a3703073c1a96d1056bd8be38228f530769971
planner/static/planner/js/new_step_form.js
planner/static/planner/js/new_step_form.js
$(function () { $(".inline." + formset_prefix).formset({ prefix: formset_prefix, // The form prefix for your django formset addCssClass: "btn btn-block btn-primary bordered inline-form-add", // CSS class applied to the add link deleteCssClass: "btn btn-block btn-primary bordered", // CSS cla...
$(function () { $(".inline." + formset_prefix).formset({ prefix: formset_prefix, // The form prefix for your django formset addCssClass: "btn btn-block btn-primary bordered inline-form-add", // CSS class applied to the add link deleteCssClass: "btn btn-block btn-primary bordered", // CSS cla...
Disable origin textfield for forms != first one
Disable origin textfield for forms != first one It will be automatically set to previous form's destination
JavaScript
mit
livingsilver94/getaride,livingsilver94/getaride,livingsilver94/getaride
dd0d1022cba70a3504d131c7d48a825be574b30b
src/index.js
src/index.js
require('./lib/whatwg-fetch/fetch.js') require('./lib/kube-6.0.1/kube.min.css') import 'react-hot-loader/patch' import React from 'react' import ReactDOM from 'react-dom' import Root from './components/Root' import configureStore from './configureStore' const store = configureStore() // import { AppContainer } from...
require('./lib/whatwg-fetch/fetch.js') //require('./lib/kube-6.0.1/kube.min.css') // Needed for onTouchTap // http://stackoverflow.com/a/34015469/988941 import injectTapEventPlugin from 'react-tap-event-plugin'; injectTapEventPlugin(); import 'react-hot-loader/patch' import React from 'react' import ReactDOM from 're...
Remove kube and add react touch events
Remove kube and add react touch events
JavaScript
mit
rjbernaldo/expensetracker-react-redux,rjbernaldo/expensetracker-react-redux
89bc200fc4d9db76e74d0524a69bbcc805317e13
src/index.js
src/index.js
import Player from './components/Player'; import Video from './components/Video'; import BigPlayButton from './components/BigPlayButton'; import LoadingSpinner from './components/LoadingSpinner'; import PosterImage from './components/PosterImage'; import ControlBar from './components/control-bar/ControlBar'; import For...
import Player from './components/Player'; import Video from './components/Video'; import BigPlayButton from './components/BigPlayButton'; import LoadingSpinner from './components/LoadingSpinner'; import PosterImage from './components/PosterImage'; import ControlBar from './components/control-bar/ControlBar'; import For...
Update Index.js to import new components
Update Index.js to import new components Update Index.js to import new components
JavaScript
mit
video-react/video-react,video-react/video-react
f611aeddab1b5510669080cbab1b8692e80764c4
src/lib/searchengine/graph.js
src/lib/searchengine/graph.js
var environment = require('../environment'), offload = require('../../graphworker/standalone'); module.exports.search = function (options, recordcb, facetcb) { if (typeof options.query !== 'undefined') { if (typeof options.query.plan === 'undefined') { options.query.plan = environment.query...
var environment = require('../environment'), offload = require('../../graphworker/standalone'); module.exports.search = function (options, recordcb, facetcb) { if (typeof options.query !== 'undefined') { options.query.plan = environment.querybuilder.build(options.query.ast); options.query.offse...
Rebuild the query every time it's needed so that preseeded results display
Rebuild the query every time it's needed so that preseeded results display
JavaScript
agpl-3.0
jcamins/biblionarrator,jcamins/biblionarrator
02b60cc05265429b90ac7289086661a7d8bd7814
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 canvas, con...
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] = ""; } } var canvas, co...
Add drawObject function to draw matrix of pixels
Add drawObject function to draw matrix of pixels
JavaScript
mit
peternatewood/pac-man-replica,peternatewood/pac-man-replica
94f8f130f60802a04d81c15b2b4c2766ca48e588
src/vibrant.service.js
src/vibrant.service.js
angular .module('ngVibrant') .provider('$vibrant', $vibrantProvider); function $vibrantProvider() { this.$get = function() { function $vibrant(element) { var instance = new Vibrant(element); return instance.swatches(); } }; }
angular .module('ngVibrant') .provider('$vibrant', $vibrantProvider); function $vibrantProvider() { this.$get = function() { function $vibrant(element) { var instance = new Vibrant(element); var swatches = instance.swatches(); var rgb = {}; Object.get...
Return only rgb swatches (gonna add a toggle for this later)
Return only rgb swatches (gonna add a toggle for this later)
JavaScript
apache-2.0
maxjoehnk/ngVibrant
aa2cc467387a8d156d64f6a6090d5a47bce0491d
app/src/reducers.js
app/src/reducers.js
import { combineReducers } from 'redux'; import { routerReducer } from 'react-router-redux'; import { reducer as formReducer } from 'redux-form'; // Import all of your reducers here: import employees from 'containers/GeoSpatialViewContainer/reducer'; import keyMetrics from 'containers/KeyMetricsViewContainer/reducer';...
import { combineReducers } from 'redux'; import { routerReducer } from 'react-router-redux'; import { reducer as formReducer } from 'redux-form'; // Import all of your reducers here: import employees from 'containers/GeospatialViewContainer/reducer'; import keyMetrics from 'containers/KeyMetricsViewContainer/reducer';...
TEST fix error cant resolve module
TEST fix error cant resolve module
JavaScript
mit
JaySmartwave/palace-bot-sw,JaySmartwave/palace-bot-sw
9c0c159b1184d5322f1baf0fa530efaf45cd5e3c
app/assets/javascripts/angular/main/login-controller.js
app/assets/javascripts/angular/main/login-controller.js
(function(){ 'use strict'; angular .module('secondLead') .controller('LoginCtrl', [ 'Restangular', '$state', 'store', 'UserModel', function (Restangular, $state, store, UserModel) { var login = this; login.user = {}; login.onSubmit = function() { UserModel.login(login.us...
(function(){ 'use strict'; angular .module('secondLead') .controller('LoginCtrl', [ 'Restangular', '$state', 'store', 'UserModel', function (Restangular, $state, store, UserModel) { var login = this; login.user = {}; login.onSubmit = function() { UserModel.login(login.us...
Add update to usermodel upon login with login controller
Add update to usermodel upon login with login controller
JavaScript
mit
ac-adekunle/secondlead,ac-adekunle/secondlead,ac-adekunle/secondlead
72267372d27463883af3dd2bff775e8199948770
VIE/test/rdfa.js
VIE/test/rdfa.js
var jQuery = require('jquery'); var VIE = require('../vie.js'); // Until https://github.com/tmpvar/jsdom/issues/issue/81 is fixed VIE.RDFa.predicateSelector = '[property]'; exports['test inheriting subject'] = function(test) { var html = jQuery('<div about="http://dbpedia.org/resource/Albert_Einstein"><span prope...
var jQuery = require('jquery'); var VIE = require('../vie.js'); // Until https://github.com/tmpvar/jsdom/issues/issue/81 is fixed VIE.RDFa.predicateSelector = '[property]'; exports['test inheriting subject'] = function(test) { var html = jQuery('<div about="http://dbpedia.org/resource/Albert_Einstein"><span prope...
Test getting properties as well
Test getting properties as well
JavaScript
mit
bergie/VIE,bergie/VIE
e2e2ea04901ca320c33792245fdb80c33f04ec6b
app/js/controllers.js
app/js/controllers.js
var phonecatControllers = angular.module('leaguecontrollers', []); phonecatControllers.factory("dataProvider", ['$q', function($q) { console.log("Running dataProvider factory"); return { getData: function() { var result = bowling.initialize({"root": "testdata"}, $q); ...
var phonecatControllers = angular.module('leaguecontrollers', []); phonecatControllers.factory("dataProvider", ['$q', function($q) { console.log("Running dataProvider factory"); var dataLoaded = false; return { getData: function() { if (!dataLoaded) { ...
Add getData overrides for multiple views.
Add getData overrides for multiple views.
JavaScript
mit
MeerkatLabs/bowling-visualization
39d4ee5ccd345b3aa7602e00ad70508ed5d0997b
benchmark/wrench.js
benchmark/wrench.js
#!/usr/bin/env node var wrench = require('wrench'); var files = 0; wrench.readdirRecursive(process.argv[2], function (err, curFiles) { if (curFiles === null) { console.log(files); } else { if (curFiles) files += curFiles.length; } });
#!/usr/bin/env node var wrench = require('wrench'); var files = 0; wrench.readdirRecursive(process.argv[2], function (err, curFiles) { if (curFiles === null) { console.log(files); } else { if (curFiles) files += curFiles.length; } });
Kill trailing whitespace in benchmark.
Kill trailing whitespace in benchmark.
JavaScript
mit
kjbekkelund/recurse,kjbekkelund/recurse
ef478f65b91a9948c33b446468b9c98861ad2686
src/TextSuggest.js
src/TextSuggest.js
/** * Created by XaviTorello on 30/05/18 */ import React from 'react'; import ComposedComponent from './ComposedComponent'; import AutoComplete from 'material-ui/AutoComplete'; class TextSuggest extends React.Component { render() { // console.log('TextSuggest', this.props.form); // assign the so...
/** * Created by XaviTorello on 30/05/18 */ import React from 'react'; import ComposedComponent from './ComposedComponent'; import AutoComplete from 'material-ui/AutoComplete'; const dataSourceConfig = { text: 'name', value: 'value', }; class TextSuggest extends React.Component { render() { // conso...
Add dataSourceConfig to link passed datasource keys
Add dataSourceConfig to link passed datasource keys
JavaScript
mit
networknt/react-schema-form,networknt/react-schema-form
abd11edf30aa0a77548b04263b26edd1efe8cc89
app/containers/TimeProvider/index.js
app/containers/TimeProvider/index.js
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import moment from 'moment'; import { gql, graphql } from 'react-apollo'; import { getCurrentTimeSuccess } from '../App/actions'; const GetCurrentTime = gql` query GetCurrentTime { time } `; @graphql(GetCurrentTime, { options: ...
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import moment from 'moment'; import { gql, graphql } from 'react-apollo'; import { getCurrentTimeSuccess } from '../App/actions'; const GetCurrentTime = gql` query GetCurrentTime { time } `; @graphql(GetCurrentTime, { options: ...
Check for GraphQL error in TimeProvider
Check for GraphQL error in TimeProvider
JavaScript
bsd-3-clause
zmora-agh/zmora-ui,zmora-agh/zmora-ui
80da46e990bc2f9562d56874903ecfde718027e7
test/riak.js
test/riak.js
"use strict"; /* global describe, it */ describe('Riak client', function() { var riakClient = require('../lib/riak')(); it('#getServerInfo', function() { return riakClient.getServerInfo() .then(function(info) { info.should.have.property('node') info.should...
"use strict"; /* global describe, it, before */ describe('Riak client', function() { var riakClient = require('../lib/riak')(); var bucket = 'test-riak-' + Date.now(); before(function() { return riakClient.setBucket({ bucket: bucket, props: { allow_mult: t...
Test Riak delete object with allow_mult=true
Test Riak delete object with allow_mult=true
JavaScript
mit
oleksiyk/riakfs
a30b3ede167cd547af9d367c9c07504e5015d8dc
server/app.js
server/app.js
var express = require('express'); var app = express(); // Serve assets in /public var path = require('path'); app.use(express.static(path.join(__dirname, '../client'))); // Body parsing for JSON POST payloads var bodyParser = require('body-parser'); app.use(bodyParser.json()); // Middlewares app.use(require('./middl...
var express = require('express'); var app = express(); // Serve assets in /public var path = require('path'); app.use(express.static(path.join(__dirname, '../client'))); // Body parsing for JSON POST payloads var bodyParser = require('body-parser'); app.use(bodyParser.json()); // Middlewares app.use(require('./middl...
Use port 3000 instead of 5000.
Use port 3000 instead of 5000.
JavaScript
mit
unixmonkey/caedence.net-2015,unixmonkey/caedence.net-2015
851cf0c6edb73b18dac37ffebb5b09c0e5237310
server/app.js
server/app.js
import express from 'express'; import logger from 'morgan'; import bodyParser from 'body-parser'; import http from 'http'; const app = express(); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.set('json spaces', 4); const port = parseInt(process.env.PORT...
import express from 'express'; import logger from 'morgan'; import bodyParser from 'body-parser'; const app = express(); app.use(logger('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); app.set('json spaces', 4); const port = process.env.PORT || 5000; app.set('port', port); ...
Refactor filre for hosting heroku
Refactor filre for hosting heroku
JavaScript
mit
Billmike/More-Recipes,Billmike/More-Recipes
1bcb78fa324e44fd9dcfebdb0a5f5e409f9a746a
lib/core/src/server/common/babel-loader.js
lib/core/src/server/common/babel-loader.js
import { includePaths, excludePaths } from '../config/utils'; export default options => ({ test: /\.(mjs|jsx?)$/, use: [ { loader: 'babel-loader', options, }, ], include: includePaths, exclude: excludePaths, }); export const nodeModulesBabelLoader = { test: /\.js$/, include: /\/node_...
import { includePaths, excludePaths } from '../config/utils'; export default options => ({ test: /\.(mjs|jsx?)$/, use: [ { loader: 'babel-loader', options, }, ], include: includePaths, exclude: excludePaths, }); export const nodeModulesBabelLoader = { test: /\.js$/, include: /\/node_...
Make nodeModulesBabelLoader compatible with Babel 6
Make nodeModulesBabelLoader compatible with Babel 6
JavaScript
mit
storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook
ffd6a08630675550427919737f6ddb6020ff1e63
main.js
main.js
/* * Evernote-webhooks: A project to use webhooks to automate things in Evernote */ var express = require('express'); var config = require('./config.json'); var app = express(); var consumerKey = process.env.consumerKey; var consumerSecret = process.env.consumerSecret; var wwwDir = "/www"; app.use('/', express.stat...
/* * Evernote-webhooks: A project to use webhooks to automate things in Evernote */ var express = require('express'); var app = express(); var consumerKey = process.env.consumerKey; var consumerSecret = process.env.consumerSecret; var wwwDir = "/www"; app.use('/', express.static(__dirname + wwwDir)); app.get('/:end...
Remove import of config.json for Heroku to work
Remove import of config.json for Heroku to work
JavaScript
mit
tomzhang32/evernote-webhooks,tomzhang32/evernote-webhooks
4f6915eb0ee67ea77a69ac7d4653279abb6e6bbd
data-init.js
data-init.js
'use strict'; angular.module('ngAppInit', []). provider('$init', function( ){ this.$get = function() { return {}; }; }). directive('ngAppInit', function( $window, $init ){ return { compile: function() { return { pre: function(scope, element, attrs) { angular.extend($init, $w...
'use strict'; angular.module('data-init', []). provider('$init', function() { this.$get = function( $window ){ return $window.JSON.parse(document.querySelector('[ng-app]').dataset.init); }; });
Rewrite the logic without using directive
Rewrite the logic without using directive
JavaScript
mit
gsklee/angular-init
ca7e839ee3013af0f16b3e4c0c88b231063cfc38
examples/async/server.js
examples/async/server.js
const webpack = require('webpack'); const webpackDevMiddleware = require('webpack-dev-middleware'); const webpackHotMiddleware = require('webpack-hot-middleware'); const config = require('./webpack.config'); const app = new (require('express'))(); const port = 4000; const compiler = webpack(config); app.use(webpackDe...
const webpack = require('webpack'); const webpackDevMiddleware = require('webpack-dev-middleware'); const webpackHotMiddleware = require('webpack-hot-middleware'); const config = require('./webpack.config'); const app = new (require('express'))(); const port = 4001; const compiler = webpack(config); app.use(webpackDe...
Change port of Async example
Change port of Async example
JavaScript
mit
quandhz/resaga,quandhz/resaga
f51217f928277adb8888e52cbcd8d7f373d72df4
src/db/queries.js
src/db/queries.js
const pgp = require('pg-promise')() const dbName = 'vinyl' const connectionString = process.env.DATABASE_URL || `postgres://localhost:5432/${dbName}` const db = pgp(connectionString) const getAlbums = () => { return db.query('SELECT * FROM albums') } const getAlbumById = (albumId) => { return db.one(` SELECT...
const pgp = require('pg-promise')() const dbName = 'vinyl' const connectionString = process.env.DATABASE_URL || `postgres://localhost:5432/${dbName}` const db = pgp(connectionString) const getAlbums = () => { return db.query('SELECT * FROM albums') } const getAlbumById = (albumId) => { return db.one(` SELECT...
Update query to make e-mail in sign-in not case sensitive
Update query to make e-mail in sign-in not case sensitive
JavaScript
mit
Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge
d9a2f54d42395ca21edc1de6383049af0d512c42
homeworks/dmitry.minchenko_wer1Kua/homework_2/script.js
homeworks/dmitry.minchenko_wer1Kua/homework_2/script.js
(function() { let height = 1, block = '#', space = ' '; if (height<2) { return console.log('Error! Height must be >= 2'); } for (let i = 0; i < height; i++) { console.log(space.repeat(height-i) + block.repeat(i+1) + space.repeat(2) + block.repeat(1+i)); } })();
(function() { let height = 13, block = '#', space = ' '; if (height<2 && height>12) { return console.log('Error! Height must be >= 2 and <= 12'); } for (let i = 0; i < height; i++) { console.log(space.repeat(height-i) + block.repeat(i+1) + space.repeat(2) + block.repeat...
Add maximum check for pyramid height
Add maximum check for pyramid height
JavaScript
mit
MastersAcademy/js-course-2017,MastersAcademy/js-course-2017,MastersAcademy/js-course-2017
04866dcdf67fe8a264a0bf6308613339527ed69c
app/api/rooms.js
app/api/rooms.js
module.exports = function(app) { /** * @apiGroup buildings * @apiName Show list of buildings * @apiVersion 3.0.0 * @api {get} buildings Show list of available buildings * @apiSuccess {[]} buildings List of buildings * @apiError InternalServerError */ app.get('/api/v3/...
module.exports = function(app) { /** * @apiGroup buildings * @apiName Show list of buildings * @apiVersion 3.0.0 * @api {get} buildings Show list of available buildings * @apiSuccess {[]} buildings List of buildings * @apiError InternalServerError */ app.get('/api/v3/...
Fix apidoc to allow `npm install` to complete
Fix apidoc to allow `npm install` to complete
JavaScript
mit
igalshapira/ziggi3,igalshapira/ziggi3
1e2f32d2da67b3731deee762f888682884f90099
spec/specs.js
spec/specs.js
describe('pingPong', function() { it("is false for a number that is not divisible by 3 or 5", function() { expect(pingPong(7)).to.equal(false); }); it("will run pingPongType if isPingPong is true", function() { expect(pingPong(6)).to.equal("ping"); }); }); describe('pingPongType', function() { it("re...
describe('pingPongType', function() { it("returns ping for a number that is divisible by 3", function() { expect(pingPongType(6)).to.equal("ping"); }); it("returns pong for a number that is divisible by 5", function() { expect(pingPongType(10)).to.equal("pong"); }); it("returns pingpong for a number t...
Remove description for pingPong, leave tests for pingPongType and isPingPong
Remove description for pingPong, leave tests for pingPongType and isPingPong
JavaScript
mit
kcmdouglas/pingpong,kcmdouglas/pingpong
91d8bb02e4216ac90cfe6d2ec98c52785720cc3b
node.js
node.js
/*eslint-env node*/ // Import assert function global.assert = require("assert"); // Code coverage helper require("blanket")({ pattern: "src/sinon.js" }); // 'Simulate' browser environment by creating a window object global.window = {}; // 'Load' the current sinon file require("./src/sinon.js"); // Map the sino...
/*eslint-env node*/ // Import assert function global.assert = require("assert"); delete global._$jscoverage; // Purge any previous blanket use // Code coverage helper require("blanket")({ pattern: "src/sinon.js" }); // 'Simulate' browser environment by creating a window object global.window = {}; // 'Load' the...
Clean any previous usage of blanket (because re-run in the same process)
Clean any previous usage of blanket (because re-run in the same process)
JavaScript
mit
ArnaudBuchholz/training-functions-stub,ArnaudBuchholz/training-functions-stub
54b272985753eeec263f0efe810197aea8a4106b
alexandria/static/js/controllers/login.js
alexandria/static/js/controllers/login.js
app.controller('LoginCtrl', ['$scope', '$log', '$route', 'User', function($scope, $log, $route, User) { $scope.loginForm = {}; $scope.errors = {}; $scope.login = function() { $log.debug('Setting all the form fields to $dirty...'); angular.forEach($scope.form, functi...
app.controller('LoginCtrl', ['$scope', '$log', '$route', 'User', function($scope, $log, $route, User) { $scope.loginForm = {}; $scope.errors = {}; $scope.login = function() { $log.debug('Setting all the form fields to $dirty...'); angular.forEach($scope.form, functi...
Add a submitted value to the form
Add a submitted value to the form
JavaScript
isc
cdunklau/alexandria,cdunklau/alexandria,bertjwregeer/alexandria,bertjwregeer/alexandria,cdunklau/alexandria
e1b5de724f301ae61ef656dbeab783bc2cdf2d54
api/controllers/GCMController.js
api/controllers/GCMController.js
/** * GCMKey provider * * @description :: Server-side logic for managing users * @help :: See http://links.sailsjs.org/docs/controllers */ module.exports = { key: function key(req, res) { sails.log("Google Project Number: " + sails.config.push.gcm.projectNumber); res.json(sails.config.push.gcm.projectN...
/** * GCMKey provider * * @description :: Server-side logic for managing users * @help :: See http://links.sailsjs.org/docs/controllers */ module.exports = { key: function key(req, res) { sails.log("Google Project Number: " + sails.config.gcm.projectNumber); res.json(sails.config.gcm.projectNumber); } ...
Use correct sails.config for GCM key
Use correct sails.config for GCM key
JavaScript
mit
SneakSpeak/sp-server
7f71436ba8d4c879a945d4ba7d88a71f2dbe0a43
apps/crbug/bg.js
apps/crbug/bg.js
var qb; function launch() { if ( ! qb ) qb = QBug.create(); qb.launchBrowser(); // qb.launchBrowser('chromium'); } if ( chrome.app.runtime ) { ajsonp = (function() { var factory = OAuthXhrFactory.create({ authAgent: ChromeAuthAgent.create({}), responseType: "json" }); return function(ur...
var qb; function launch() { if ( ! qb ) qb = QBug.create(); qb.launchBrowser(); // qb.launchBrowser('chromium'); } if ( chrome.app.runtime ) { ajsonp = (function() { var factory = OAuthXhrFactory.create({ authAgent: ChromeAuthAgent.create({}), responseType: "json" }); return function(ur...
Add optional payload to ajsonp
Add optional payload to ajsonp
JavaScript
apache-2.0
osric-the-knight/foam,shepheb/foam,jacksonic/foam,shepheb/foam,foam-framework/foam,osric-the-knight/foam,jacksonic/foam,osric-the-knight/foam,foam-framework/foam,mdittmer/foam,mdittmer/foam,mdittmer/foam,shepheb/foam,jlhughes/foam,jlhughes/foam,jlhughes/foam,foam-framework/foam,jacksonic/foam,foam-framework/foam,mdittm...
06dba54a9bd08e27756dceebd214841986de9d1a
grunt.js
grunt.js
module.exports = function (grunt) { grunt.initConfig({ meta: { banner: '// ' + grunt.file.read('src/loStorage.js').split("\n")[0] }, min: { dist: { src: ['<banner>', 'src/loStorage.js'], dest: 'src/loStorage.min.js' } }, jasmine: { all: ['spec/index.html'] }, watch: { test: { ...
module.exports = function (grunt) { grunt.initConfig({ meta: { banner: '// ' + grunt.file.read('src/loStorage.js').split("\n")[0] }, min: { dist: { src: ['<banner>', 'src/loStorage.js'], dest: 'src/loStorage.min.js' } }, jasmine: { all: ['spec/index.html'] }, watch: { test: { ...
Add min task to watch
Add min task to watch
JavaScript
mit
js-coder/loStorage.js,js-coder/loStorage.js,florian/loStorage.js,florian/loStorage.js,joshprice/loStorage.js,npmcomponent/js-coder-loStorage.js
c945aa9f72df97c2244d108d7cb0a4a778d6e2f1
vendor/assets/javascripts/_element.js
vendor/assets/javascripts/_element.js
this.Element && function (ElementPrototype) { ElementPrototype.matches = ElementPrototype.matches || ElementPrototype.matchesSelector || ElementPrototype.mozMatchesSelector || ElementPrototype.msMatchesSelector || ElementPrototype.webkitMatchesSelector || function (selector) { var node ...
/*jshint bitwise: true, curly: true, eqeqeq: true, forin: true, immed: true, indent: 4, latedef: true, newcap: true, noarg: true, noempty: true, nonew: true, quotmark: double, undef: true, unused: vars, strict: true, trailing: true, maxdepth: 3, devel: true, asi: true */ /*global HTMLElement: true */ // // ELEMENT // ...
Add jshint options and comments.
Add jshint options and comments.
JavaScript
mit
smockle/black-coffee
0dd0ec941fcc80c20a522ed409fd98b49b40e3a6
src/app/utilities/api-clients/collections.js
src/app/utilities/api-clients/collections.js
import http from '../http'; export default class collections { static get(collectionID) { return http.get(`/zebedee/collectionDetails/${collectionID}`) .then(response => { return response; }) } static getAll() { return http.get(`/zebedee/collect...
import http from '../http'; export default class collections { static get(collectionID) { return http.get(`/zebedee/collectionDetails/${collectionID}`) .then(response => { return response; }) } static getAll() { return http.get(`/zebedee/collect...
Add method to check is content is in another collection
Add method to check is content is in another collection
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
c56370a3518f967a6f4afed8bcc84c17500ee0b3
assets/js/googlesitekit-settings.js
assets/js/googlesitekit-settings.js
/** * Settings component. * * Site Kit by Google, Copyright 2021 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * ...
/** * Settings component. * * Site Kit by Google, Copyright 2021 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * ...
Remove import ref so builds.
Remove import ref so builds.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
9c2095a5ac8baab688a6a063ebf879ec5768ccb1
app/setup/initializers/origin.js
app/setup/initializers/origin.js
import config from 'config'; export const originMiddleware = async (ctx, next) => { ctx.response.set('Access-Control-Allow-Origin', config.origin); ctx.response.set('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS'); ctx.response.set('Access-Control-Allow-Headers', [ 'Origin', 'X-Requested-W...
import config from 'config'; export const originMiddleware = async (ctx, next) => { ctx.response.set('Access-Control-Allow-Origin', config.origin); ctx.response.set('Access-Control-Allow-Methods', 'GET,PUT,POST,PATCH,DELETE,OPTIONS'); ctx.response.set('Access-Control-Allow-Headers', [ 'Origin', 'X-Reque...
Add PATCH to Access-Control-Allow-Methods header
Add PATCH to Access-Control-Allow-Methods header
JavaScript
mit
FreeFeed/freefeed-server,FreeFeed/freefeed-server
0427b16a7ca1a2f1f5811794d798952787ffc6ea
blueprints/ivy-redactor/index.js
blueprints/ivy-redactor/index.js
/* jshint node:true */ module.exports = { afterInstall: function() { return this.addBowerPackageToProject('polyfills-pkg'); }, normalizeEntityName: function() { } };
/* jshint node:true */ module.exports = { normalizeEntityName: function() { } };
Stop requiring a polyfill that we don't need
Stop requiring a polyfill that we don't need
JavaScript
mit
IvyApp/ivy-redactor,IvyApp/ivy-redactor
e331915acffec129dd38f2d6b797cbe55a39b07f
source/boot/version.js
source/boot/version.js
/* Each Enyo-provided library will annotate this structure with its own version info. Why? In general, Enyo and its libraries are versioned and released together, but libraries may be versioned separately in the future. Also, since libraries are checked out and updated individually, a project may be using "mi...
/* Each Enyo-provided library will annotate this structure with its own version info. Why? In general, Enyo and its libraries are versioned and released together, but libraries may be versioned separately in the future. Also, since libraries are checked out and updated individually, a project may be using "mi...
Remove -dev suffix for pilot-5 release.
Remove -dev suffix for pilot-5 release.
JavaScript
apache-2.0
bright-sparks/enyo,enyojs/enyo,mcanthony/enyo,kustomzone/enyo,beni55/enyo,wikieswan/enyo,PKRoma/enyo,soapdog/enyo,beni55/enyo,enyojs/enyo,kustomzone/enyo,bright-sparks/enyo,zefsolutions/enyo,zefsolutions/enyo,PKRoma/enyo,mcanthony/enyo,wikieswan/enyo,soapdog/enyo
1af89b716f562b046bb1673725ee2cb6b660a82d
spec/writeFile.spec.js
spec/writeFile.spec.js
var path = require('path'), fs = require('fs'), crypto = require('crypto'); describe("writeFile functionality", function() { var _this = this; require('./harness.js')(_this); it("creates a directory", function(done) { var fname = "testDir"; var resolved = path.resolve(_this.tempdir,...
var path = require('path'), fs = require('fs'), crypto = require('crypto'); describe("writeFile functionality", function() { var _this = this; require('./harness.js')(_this); it("writes data to a file that doesn't exist", function(done) { var fname = "testDir"; var resolved = path.r...
Fix name of writeFile test
Fix name of writeFile test
JavaScript
bsd-2-clause
terribleplan/WorkingDirectory
1ab1f0a5ee5726f1c917ce6c40e4df03eb647589
sentiment/index.js
sentiment/index.js
// Include The 'require.async' Module require("require.async")(require); /** * Tokenizes an input string. * * @param {String} Input * * @return {Array} */ function tokenize (input) { return input .replace(/[^a-zA-Z ]+/g, "") .replace("/ {2,}/", " ") .toLowerCase() ...
// Include The 'require.async' Module require("require.async")(require); /** * Tokenizes an input string. * * @param {String} Input * * @return {Array} */ function tokenize (input) { return input .replace(/[^a-zA-Z ]+/g, "") .replace("/ {2,}/", " ") .toLowerCase() ...
Fix bug in sentiment calculation
Fix bug in sentiment calculation Signed-off-by: Itai Koren <7a3f8a9ea5df78694ad87e4c8117b31e1b103a24@gmail.com>
JavaScript
mit
itkoren/Lets-Node-ex-8
1ec5cc77997e6cc254b1891c2efdc1839f63625e
client/src/actions.js
client/src/actions.js
import { createAction } from 'redux-actions'; export const REQUEST_LOGIN = "REQUEST_LOGIN"; export const SUCCESS_LOGIN = "SUCCESS_LOGIN"; export const FAILURE_LOGIN = "FAILURE_LOGIN"; export const REQUEST_SUBMIT_SONG = "REQUEST_SUBMIT_SONG"; export const SUCCESS_SUBMIT_SONG = "SUCCESS_SUBMIT_SONG"; e...
import { createAction } from 'redux-actions'; export createActions( "REQUEST_LOGIN", "SUCCESS_LOGIN", "FAILURE_LOGIN", "REQUEST_SUBMIT_SONG", "SUCCESS_SUBMIT_SONG", "FAILURE_SUBMIT_SONG", "INPUT_QUERY", "REQUEST_SEARCH", "SUCCESS_SEARCH", "FAILURE_SEARCH", "ADDED_SONG", "PLAYED_SONG" );
Use createActions to create actioncreator
Use createActions to create actioncreator
JavaScript
mit
ygkn/DJ-YAGICHAN-SYSTEM,ygkn/DJ-YAGICHAN-SYSTEM
146601a2d4ebe4f9549146907c9c1fb757cf3405
src/kit/ui/_IsolatedInlineNodeComponent.js
src/kit/ui/_IsolatedInlineNodeComponent.js
import { IsolatedInlineNodeComponent as SubstanceIsolatedInlineNodeComponent } from 'substance' /* This is overriding Substance.IsolatedInlineNodeComponent to support Models. */ export default class IsolatedInlineNodeComponentNew extends SubstanceIsolatedInlineNodeComponent { // overriding AbstractIsolatedNodeComp...
import { IsolatedInlineNodeComponent as SubstanceIsolatedInlineNodeComponent } from 'substance' /* This is overriding Substance.IsolatedInlineNodeComponent to support Models. */ export default class IsolatedInlineNodeComponentNew extends SubstanceIsolatedInlineNodeComponent { // overriding AbstractIsolatedNodeComp...
Add a click hook to IsolatedInlineNodeComponent.
Add a click hook to IsolatedInlineNodeComponent.
JavaScript
mit
substance/texture,substance/texture
7f641cdf7fa3c1507c50e4bad02ec6ee2f9a13d7
problems/kata/001-todo-backend/001/todo.js
problems/kata/001-todo-backend/001/todo.js
var nano = require('nano')('http://localhost:5984'); var db = nano.db.use('todo'); var todo = {}; module.exports = todo;
var nano = require('nano')('http://localhost:5984'); var db = nano.db.use('todo'); var todo = {}; todo.getAll = function() { var results = []; db.view('todos', 'all_todos', function(err, body) { for (var row of body.rows) { results.push(row.value); } return results; }); }; module.exports = to...
Copy get all logic into a getAll function.
Copy get all logic into a getAll function.
JavaScript
mit
PurityControl/uchi-komi-js
7e33179406372482e0cfba1f14b5959883ae7fa3
backend/index.js
backend/index.js
"use strict"; var debug = require('debug')('server'); var express = require('express'); var path = require('path'); var routes = require('./routes/index'); var app = express(); app.use('/', routes); app.set('view engine', 'jade'); app.set('views', path.join(__dirname, 'views')); var server = app.listen(process.en...
"use strict"; var debug = require('debug')('server'); var express = require('express'); var io = require('socket.io')(); var path = require('path'); var routes = require('./routes/index'); var app = express(); app.use('/', routes); app.set('view engine', 'jade'); app.set('views', path.join(__dirname, 'views')); v...
Integrate socket.io to the backend.
Integrate socket.io to the backend. with dummy lines.
JavaScript
mit
team-kke/erichika
2c2517cef0f4b3183b8bbeabc72ff754a82178fc
web_external/js/init.js
web_external/js/init.js
/*global isic:true*/ var isic = isic || {}; _.extend(isic, { models: {}, collections: {}, views: {}, router: new Backbone.Router(), events: _.clone(Backbone.Events) }); girder.router.enabled(false);
/*global isic:true*/ var isic = isic || {}; _.extend(isic, { models: {}, collections: {}, views: {}, router: new Backbone.Router(), events: girder.events }); girder.router.enabled(false);
Make isic.events an alias for girder.events
Make isic.events an alias for girder.events Make isic.events an alias for girder.events instead of a separate object. For one, this ensures that triggering the 'g:appload.before' and 'g:appload.after' events in main.js reach plugins that observe those events on girder.events, such as the google_analytics plugin.
JavaScript
apache-2.0
ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive
ddcc84a84d3eced473e57c46c5f667424b4386fa
test/integration/test-remote.js
test/integration/test-remote.js
const Test = require('./include/runner'); const setUp = (context) => { return context.gitP(context.root).init(); }; describe('remote', () => { let context; let REMOTE_URL = 'https://github.com/steveukx/git-js.git'; beforeEach(() => setUp(context = Test.createContext())); it('adds and removes named r...
const Test = require('./include/runner'); const setUp = (context) => { return context.gitP(context.root).init(); }; describe('remote', () => { let context; let REMOTE_URL_ROOT = 'https://github.com/steveukx'; let REMOTE_URL = `${ REMOTE_URL_ROOT }/git-js.git`; beforeEach(() => setUp(context = Test.cr...
Add test for using `addRemote` and `remote(['set-url', ...])'`
Add test for using `addRemote` and `remote(['set-url', ...])'` Ref: #452
JavaScript
mit
steveukx/git-js,steveukx/git-js
ce70133b029a387bc4af082e44d85ac0b77bc698
config/Definitions.js
config/Definitions.js
module.exports = { Env: process.env.NODE_ENV || 'development', Permissions: { viewPage: 'viewPage' }, boxWidth: 55, boxHeight: 30, Difficulties: { 1: { name: 'Very Easy', percent: 10 }, 2: { name: 'Easy', percent: 15...
module.exports = { Env: process.env.NODE_ENV || 'development', Permissions: { viewPage: 'viewPage' }, boxWidth: 40, boxHeight: 35, Difficulties: { 1: { name: 'Very Easy', percent: 10 }, 2: { name: 'Easy', percent: 15...
Adjust dimensions of grid to be squarer
Adjust dimensions of grid to be squarer
JavaScript
mit
EnzoMartin/Minesweeper-React,EnzoMartin/Minesweeper-React
5f6c2a23b524f1b6465e3335956b2d62e9c6f42b
index.js
index.js
(function() { 'use strict'; var ripper = require('./Rip'), encoder = require('./Encode'), ui = require('bull-ui/app')({ redis: { host: 'localhost', port: '6379' } }), Queue = require('bull'); ui.listen(1337, function() { console.log('bull-ui started listening on p...
(function() { 'use strict'; var ripper = require('./Rip'), fs = require('fs'), encoder = require('./Encode'), ui = require('bull-ui/app')({ redis: { host: 'localhost', port: '6379' } }), Queue = require('bull'); ui.listen(1337, function() { console.log('bull-u...
Check for DVD device for ripping queue processing
Check for DVD device for ripping queue processing
JavaScript
mit
aztechian/ncoder,aztechian/ncoder
3086a6cb835bc47ca26c357178612f01b6f4ade8
src/server/webapp.js
src/server/webapp.js
'use strict'; const path = require('path'); const express = require('express'); const bodyParser = require('body-parser'); const routes = require('./controllers/routes'); let app = express(); // Configure view engine and views directory app.set('view engine', 'ejs'); app.set('views', path.join(__dirname, 'views')); ...
'use strict'; const path = require('path'); const express = require('express'); const bodyParser = require('body-parser'); const routes = require('./controllers/routes'); let app = express(); // Configure view engine and views directory app.set('view engine', 'ejs'); app.set('views', path.join(__dirname, 'views')); ...
Remove the 'X-Powered-By: Express' HTTP response header
Remove the 'X-Powered-By: Express' HTTP response header Fixes #2
JavaScript
mit
kwhinnery/todomvc-plusplus,kwhinnery/todomvc-plusplus
350cfb9149d7137d54cc53dee10d6d367ab24bfb
test/imagenames.js
test/imagenames.js
var test = require('tape') var names = require('../lib/imageref.js') test('litmus', function (t) { t.plan(2) t.looseEqual( names(['1', '']), ['atom-h'] ) t.looseEqual( names(['1', 'gc']), ['bond-left', 'bond-right', 'atom-h'] ) })
var test = require('tape') var names = require('../lib/imagenames.js') test('litmus', function (t) { t.plan(2) t.looseEqual( names(['1', '']), ['atom-h'] ) t.looseEqual( names(['1', 'gc']), ['bond-left', 'bond-right', 'atom-h'] ) })
Fix last minute name chang bug.
Fix last minute name chang bug.
JavaScript
isc
figlief/jsatomix
80ce4c3203bff1e5848360d91a507778ea86edc3
index.js
index.js
var postcss = require('postcss'); module.exports = postcss.plugin('postcss-prefixer-font-face', function (opts) { opts = opts || {}; var prefix = opts.prefix || ''; var usedFonts = []; return function (css, result) { /* Font Faces */ css.walkAtRules(/font-face$/, function (font) { ...
var postcss = require('postcss'); module.exports = postcss.plugin('postcss-prefixer-font-face', function (opts) { opts = opts || {}; var prefix = opts.prefix || ''; var usedFonts = []; return function (css, result) { /* Font Faces */ css.walkAtRules(/font-face$/, function (font) { ...
Support prefix if multiple font families are used
Support prefix if multiple font families are used
JavaScript
bsd-2-clause
koala-framework/postcss-prefixer-font-face
d117690efaadd5db838818cbe43a1dbaa63ca885
index.js
index.js
'use strict'; var async = require("async"); function capitalize(string) { return string.charAt(0).toUpperCase() + string.slice(1); } module.exports = function seeder(seedObject, mongoose, logger, cb) { if(!cb) { cb = logger; logger = console.log; } var ObjectId = mongoose.Types.ObjectId; async.ea...
'use strict'; var async = require("async"); function capitalize(string) { return string.charAt(0).toUpperCase() + string.slice(1); } module.exports = function seeder(seedObject, mongoose, logger, cb) { if(!cb) { cb = logger; logger = console.log; } var ObjectId = mongoose.Types.ObjectId; async.ea...
Add managing of _id field
Add managing of _id field
JavaScript
mit
AnyFetch/seeder.js
b98db4ad0e627c6a5326e8cabfde1e71e4bfdf2e
test/plexacious.js
test/plexacious.js
const { expect } = require('chai'); const Plexacious = require('../lib/Plexacious'); const config = { "hostname": process.env.PLEX_SERVER_HOST, "port": process.env.PLEX_SERVER_PORT, "https": process.env.PLEX_SERVER_HTTPS, "token": process.env.PLEX_AUTH_TOKEN }; const plex = new Plexacious(config); describe('P...
const { expect } = require('chai'); const Plexacious = require('../lib/Plexacious'); const env = require('node-env-file'); env('./.env'); const config = { "hostname": process.env.PLEX_SERVER_HOST, "port": process.env.PLEX_SERVER_PORT, "https": process.env.PLEX_SERVER_HTTPS, "token": process.env.PLEX_AUTH_TOKEN ...
Fix events() call to match renamed function eventFunctions()
Fix events() call to match renamed function eventFunctions()
JavaScript
isc
ketsugi/plexacious
203add406fbf5e23976bb32cac99bf004ba5eb4d
src/filter.js
src/filter.js
function hide_covers() { // Remove covers $(".mix_element div.cover").remove() // Add class so cards can be restyled $(".mix_card.half_card").addClass("ext-coverless_card") // Remove covers on track page $("#cover_art").remove() // Remove covers in the sidebar of a track page $(".card.s...
function hide_covers() { // Remove covers $(".mix_element div.cover").remove() // Add class so cards can be restyled $(".mix_card.half_card").addClass("ext-coverless_card") // Remove covers on track page $("#cover_art").remove() // Remove covers in the sidebar of a track page $(".card.s...
Replace mini covers with 8tracks icon
Replace mini covers with 8tracks icon
JavaScript
mit
pbhavsar/8tracks-Filter
877e9a521fe131978cd63b0af669c01746fe1d8c
index.js
index.js
var cookie = require('cookie'); var _cookies = cookie.parse((typeof document !== 'undefined') ? document.cookie : ''); for (var key in _cookies) { try { _cookies[key] = JSON.parse(_cookies[key]); } catch(e) { // Not serialized object } } function load(name) { return _cookies[name]; } function save(n...
var cookie = require('cookie'); var _cookies = cookie.parse((typeof document !== 'undefined') ? document.cookie : ''); for (var key in _cookies) { try { _cookies[key] = JSON.parse(_cookies[key]); } catch(e) { // Not serialized object } } function load(name) { return _cookies[name]; } function save(n...
Fix cookie not being parsed on load.
Fix cookie not being parsed on load. If you have to stringify your object before saving, and you add that, to the `_cookies` cache, then you'll return that on `load` after setting it with `save`. While if the value is already set, the script correctly parses the cookie values and what you load is returned as an objec...
JavaScript
mit
ChrisCinelli/react-cookie-async,reactivestack/cookies,xpepermint/react-cookie,eXon/react-cookie,reactivestack/cookies,reactivestack/cookies
d982c14d41f9a36e34471c19bc3cf277a64685ee
index.js
index.js
#!/usr/bin/env node 'use strict'; const moment = require("moment"); const sugar = require("sugar"); const chalk = require("chalk"); const exec = require("child_process").exec; process.argv.splice(0, 2); if (process.argv.length > 0) { // Attempt to parse the date let date = process.argv.join(" "); let parsedDa...
#!/usr/bin/env node "use strict"; const moment = require("moment"); const sugar = require("sugar"); const chalk = require("chalk"); const exec = require("child_process").exec; process.argv.splice(0, 2); if (process.argv.length > 0) { // Attempt to parse the date let date = process.argv.join(" "); let parsedDa...
Use double quotes on "use strict"
Use double quotes on "use strict"
JavaScript
mit
sam3d/git-date
79bf07a15de57912c2f6a0306e028fb3e99fa31e
index.js
index.js
var child_process = require('child_process'); var byline = require('./byline'); exports.handler = function(event, context) { var proc = child_process.spawn('./main', [JSON.stringify(event)], { stdio: [process.stdin, 'pipe', 'pipe'] }); proc.stdout.on('data', function(line){ var msg = JSON.parse(line); con...
var child_process = require('child_process'); exports.handler = function(event, context) { var proc = child_process.spawn('./main', [JSON.stringify(event)], { stdio: [process.stdin, 'pipe', 'pipe'] }); proc.stdout.on('data', function(line){ var msg = JSON.parse(line); context.succeed(msg); }) proc.st...
Remove unused dependency from JS wrapper
Remove unused dependency from JS wrapper
JavaScript
mit
ArjenSchwarz/igor,ArjenSchwarz/igor
f232636afd0a7ab9cb148f7b87aac551a866f3ec
index.js
index.js
'use strict'; class Mutex { constructor() { // Item at index 0 is the caller with the lock: // [ <has the lock>, <waiting>, <waiting>, <waiting> ... ] this.queue = []; } acquire({ timeout = 60000 } = {}) { const queue = this.queue; return new Promise((resolve, reject) => { setTimeout(...
'use strict'; class Mutex { constructor() { // Item at index 0 is the caller with the lock: // [ <has the lock>, <waiting>, <waiting>, <waiting> ... ] this.queue = []; } acquire({ timeout = false } = {}) { const queue = this.queue; return new Promise((resolve, reject) => { if (timeout...
Make timeout disabled by default
Make timeout disabled by default
JavaScript
mit
ilkkao/snap-mutex
b758446bae6fc066626d04f207c3e668d2a38fd4
index.js
index.js
'use strict'; var express = require('express'); var path = require('path'); var bodyParser = require('body-parser'); var api = require('./nestor/api'); var app = express(); app.use(bodyParser.json()); var router = express.Router(); router.route('/') .get(function (req, res) { api.rtm.start(); });...
'use strict'; var express = require('express'); var path = require('path'); var bodyParser = require('body-parser'); var api = require('./nestor/api'); var app = express(); app.use(bodyParser.json()); var router = express.Router(); app.set('port', process.env.PORT || 3000); var server = app.listen(app.get('port'...
Connect to RTM right away
Connect to RTM right away
JavaScript
mit
maxdeviant/nestor
e5e3e797753c954d1da82bf29adaf2d6bfacf945
index.js
index.js
'use strict'; var fs = require('fs'); function reset() { exports.out = []; exports.xmlEmitter = null; exports.opts = {}; } reset(); /** * Load a formatter * @param {String} formatterPath * @return */ function loadFormatter(formatterPath) { return require('./lib/' + formatterPath + '_emitter'); }...
'use strict'; var fs = require('fs'); function reset() { exports.out = []; exports.xmlEmitter = null; exports.opts = {}; } reset(); /** * Load a formatter * @param {String} formatterPath * @return */ function loadFormatter(formatterPath) { return require('./lib/' + formatterPath + '_emitter'); }...
Restructure things to handle all-ok cases
Restructure things to handle all-ok cases
JavaScript
mit
cleydsonjr/gulp-jshint-xml-file-reporter,lourenzo/gulp-jshint-xml-file-reporter
63978e0a545bb6945964fe0b5c964ccb52a67624
index.js
index.js
'use strict'; var minimatch = require('minimatch'); var anymatch = function(criteria, string, returnIndex, startIndex, endIndex) { if (!Array.isArray(criteria)) { criteria = [criteria]; } if (arguments.length === 1) { return anymatch.bind(null, criteria); } if (startIndex == null) { startIndex = 0; } var matc...
'use strict'; var minimatch = require('minimatch'); var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) { if (!Array.isArray(criteria)) { criteria = [criteria]; } var string = Array.isArray(value) ? value[0] : value; if (arguments.length === 1) { return anymatch.bind(null, criteria); } ...
Allow passing extra args to function matchers
Allow passing extra args to function matchers
JavaScript
isc
es128/anymatch,floatdrop/anymatch
f788366f2d9c21eb208bd53575210ed8da881b1b
index.js
index.js
/** * Dispatcher prototype */ var dispatcher = Dispatcher.prototype; /** * Exports */ module.exports = Dispatcher; /** * Dispatcher * * @return {Object} * @api public */ function Dispatcher() { if (!(this instanceof Dispatcher)) return new Dispatcher; this.callbacks = []; }; /** * Register a new sto...
/** * Exports */ module.exports = Dispatcher; /** * Dispatcher prototype */ var dispatcher = Dispatcher.prototype; /** * Dispatcher * * @return {Object} * @api public */ function Dispatcher() { if (!(this instanceof Dispatcher)) return new Dispatcher; this.callbacks = []; }; /** * Register a new sto...
Remove last reference to array returns
Remove last reference to array returns
JavaScript
mit
vebin/barracks,yoshuawuyts/barracks,yoshuawuyts/barracks
f188b3030f519a90708a57b0b840ec7516d6c53b
index.js
index.js
var util = require('util'); GeometryBounds = function(bounds) { this.xKey = "x"; this.yKey = "y"; this.bounds = []; if(!bounds || !bounds[0]) return; this.xKey = Object.keys(bounds[0])[0]; this.yKey = Object.keys(bounds[0])[1]; for(var b1 in bounds) { var constructedBound = []; var bound = bou...
var util = require('util'); GeometryBounds = function(bounds) { this.xKey = "x"; this.yKey = "y"; this.bounds = []; if(!bounds || !bounds[0] || !bounds[0][0]) return; this.xKey = Object.keys(bounds[0][0])[0]; this.yKey = Object.keys(bounds[0][0])[1]; for(var b1 in bounds) { var constructedBound = ...
Fix in defining keys for x,y
Fix in defining keys for x,y
JavaScript
mit
alandarev/node-geometry
572907e88cc2acf6ad7482f8cee43cce03385d39
library/CM/FormField/Text.js
library/CM/FormField/Text.js
/** * @class CM_FormField_Text * @extends CM_FormField_Abstract */ var CM_FormField_Text = CM_FormField_Abstract.extend({ _class: 'CM_FormField_Text', /** @type Boolean */ _skipTriggerChange: false, events: { 'blur input': function() { this.trigger('blur'); }, 'focus input': function() { this.trigg...
/** * @class CM_FormField_Text * @extends CM_FormField_Abstract */ var CM_FormField_Text = CM_FormField_Abstract.extend({ _class: 'CM_FormField_Text', /** @type Boolean */ _skipTriggerChange: false, events: { 'blur input': function() { this.trigger('blur'); }, 'focus input': function() { this.trigg...
Add hasFocus() for text formField
Add hasFocus() for text formField
JavaScript
mit
vogdb/cm,fvovan/CM,tomaszdurka/CM,zazabe/cm,fauvel/CM,cargomedia/CM,mariansollmann/CM,mariansollmann/CM,njam/CM,vogdb/cm,christopheschwyzer/CM,fvovan/CM,fauvel/CM,tomaszdurka/CM,cargomedia/CM,alexispeter/CM,fvovan/CM,alexispeter/CM,zazabe/cm,fauvel/CM,fvovan/CM,cargomedia/CM,njam/CM,tomaszdurka/CM,mariansollmann/CM,vog...
ff3e075eba9f87013879c889a8d70e119be04e13
lib/stack/Builder.js
lib/stack/Builder.js
/** * Builder.js * * @author: Harish Anchu <harishanchu@gmail.com> * @copyright Copyright (c) 2015-2016, QuorraJS. * @license See LICENSE.txt */ var StackedHttpKernel = require('./StackedHttpKernel'); function Builder() { /** * Stores middleware classes * * @type {Array} * @protected ...
/** * Builder.js * * @author: Harish Anchu <harishanchu@gmail.com> * @copyright Copyright (c) 2015-2016, QuorraJS. * @license See LICENSE.txt */ var StackedHttpKernel = require('./StackedHttpKernel'); function Builder() { /** * Stores middleware classes * * @type {Array} * @protected ...
Stop passing middlewares array to stack
Stop passing middlewares array to stack
JavaScript
mit
quorrajs/Positron,quorrajs/Positron
47d947642b5199ed81c388a51e5381fd0c6347f6
bin/pg-server.js
bin/pg-server.js
#!/usr/bin/env node 'use strict'; /** * Binary to run a pg server. * (C) 2015 Alex Fernández. */ // requires var stdio = require('stdio'); var server = require('../lib/server.js'); var packageJson = require(__dirname + '/../package.json'); // constants var PORT = 5433; // init var options = stdio.ge...
#!/usr/bin/env node 'use strict'; /** * Binary to run a pg server. * (C) 2015 Alex Fernández. */ // requires var Log = require('log'); var stdio = require('stdio'); var server = require('../lib/server.js'); var packageJson = require(__dirname + '/../package.json'); // globals var log = new Log('info'); // consta...
Debug and quiet have short keys.
Debug and quiet have short keys.
JavaScript
mit
alexfernandez/pooled-pg
1142407be4e1884fc79188680f2b8649f19d887f
test/unit/unit.js
test/unit/unit.js
'use strict'; require.config({ baseUrl: '../lib', paths: { 'test': '..', 'forge': 'forge.min' }, shim: { sinon: { exports: 'sinon', } } }); // add function.bind polyfill if (!Function.prototype.bind) { Function.prototype.bind = function(oThis) { ...
'use strict'; require.config({ baseUrl: '../lib', paths: { 'test': '..', 'forge': 'forge.min' } }); // add function.bind polyfill if (!Function.prototype.bind) { Function.prototype.bind = function(oThis) { if (typeof this !== "function") { // closest thing possible ...
Remove useless sinon require shim
Remove useless sinon require shim
JavaScript
mit
dopry/browserbox,emailjs/emailjs-imap-client,nifgraup/browserbox,ltgorm/emailjs-imap-client,dopry/browserbox,emailjs/emailjs-imap-client,whiteout-io/browserbox,ltgorm/emailjs-imap-client
6e5a575e2bab2ce9b1cb83182a791fe8d1995558
test/utils-test.js
test/utils-test.js
describe('getFolders()', function() { it('should return the correct list of folders', function() { var objects = [ { Key: '/' }, { Key: 'test/' }, { Key: 'test/test/' }, { Key: 'test/a/b' }, { Key: 'test' }, ]; chai.expect(dodgercms.utils.getFolders(objects)).to.have.members(...
describe('getFolders()', function() { it('should return the correct list of folders', function() { var objects = [ { Key: '/' }, { Key: 'test/' }, { Key: 'test/test/' }, { Key: 'test/a/b' }, { Key: 'test' }, ]; chai.expect(dodgercms.utils.getFolders(objects)).to.have.members(...
Add test cases for the utils
Add test cases for the utils
JavaScript
mit
ChrisZieba/dodgercms,ChrisZieba/dodgercms,etopian/dodgercms,etopian/dodgercms
c638b15fe519f33b2bfda4ae1269d77d4dba0cae
packages/test-in-browser/package.js
packages/test-in-browser/package.js
Package.describe({ summary: "Run tests interactively in the browser", version: '1.0.5-pre.2' }); Package.on_use(function (api) { // XXX this should go away, and there should be a clean interface // that tinytest and the driver both implement? api.use('tinytest'); api.use('bootstrap'); api.use('underscore...
Package.describe({ summary: "Run tests interactively in the browser", version: '1.0.5-pre.2' }); Package.on_use(function (api) { // XXX this should go away, and there should be a clean interface // that tinytest and the driver both implement? api.use('tinytest'); api.use('bootstrap@1.0.1'); api.use('unde...
Add version constraing to bootstrap use
Add version constraing to bootstrap use
JavaScript
mit
akintoey/meteor,ndarilek/meteor,Puena/meteor,ljack/meteor,Profab/meteor,ashwathgovind/meteor,DCKT/meteor,nuvipannu/meteor,shrop/meteor,DAB0mB/meteor,deanius/meteor,Paulyoufu/meteor-1,AnthonyAstige/meteor,jirengu/meteor,Ken-Liu/meteor,sdeveloper/meteor,AnjirHossain/meteor,emmerge/meteor,TechplexEngineer/meteor,yanisIk/m...
ed79ebfb2f092f386a2b6798ebbbd21dd2f68fbb
client/src/components/Header/Header.js
client/src/components/Header/Header.js
import React from 'react'; import { NavLink } from 'react-router-dom'; import './style.css'; const Header = props => { const { isAdmin, loggedIn } = props; return ( <div> <div className="navbar"> <div className="navbar-brand"> <NavLink to="/"> <img src="http://via.placehold...
import React from 'react'; import { NavLink } from 'react-router-dom'; import './style.css'; const Header = props => { const { isAdmin, loggedIn } = props; return ( <div> <div className="navbar"> <div className="navbar-brand"> <NavLink to="/"> <img src="http://via.placehold...
Add navbar link to /bookmarks
Add navbar link to /bookmarks
JavaScript
mit
jenovs/bears-team-14,jenovs/bears-team-14
4dc707df767bd7d4ace82747a9b478a29b7eda2e
config/log4js.js
config/log4js.js
var log4js = require('log4js'); log4js.configure({ appenders: [ { 'type': 'file', 'filename': 'logs/mymap.log', 'category': ['mymap', 'console'], 'maxLogSize': 5242880, 'backups': 10 }, { type: 'console' } ], replaceConsole: true }); exports.getL...
var log4js = require('log4js'), fs = require('fs'); configure(); exports.getLogger = function() { return log4js.getLogger('mymap'); } function configure() { if(!fs.existsSync('logs')) { fs.mkdirSync('logs'); } log4js.configure({ appenders: [ { 'type': '...
Create logs dir if necessary
Create logs dir if necessary
JavaScript
mit
k4v1cs/mymap
cf1b6a0f7df449b834d1fecca64a774a6f768593
DataAccess/Meets.js
DataAccess/Meets.js
const MySql = require("./MySql.js"); class Meet{ constructor(obj){ Object.keys(obj).forEach(k=>this[k]=obj[k]); } asMarkdown(){ return `*${this.post_title}* ${this.meet_start_time}\n_${this.guid}_`; } } Meet.fromObjArray = function(objArray){ return objArray.map(o=>new Meet(o)); }; function getAll...
const MySql = require("./MySql.js"); const entities = require("entities"); class Meet{ constructor(obj){ Object.keys(obj).forEach(k=>this[k]=entities.decodeHTML(obj[k])); } asMarkdown(){ return `*${this.post_title}* ${this.meet_start_time}\n${this.guid}`; } } Meet.fromObjArray = function(objArray){ ...
FIX broken markdown and entities
FIX broken markdown and entities
JavaScript
mit
severnbronies/Sail
703714a2b5d527aa87cd996cbc07c9f3fab3a55d
emcee.js
emcee.js
module.exports = exports = MC function MC () { this._loading = 0 this.models = {} } var modelLoaders = {} MC.model = function (name, loader) { modelLoaders[name] = loader return MC } MC.prototype.load = function (name) { if (!modelLoaders[name]) { throw new Error('Unknown model: ' + name) } if (thi...
module.exports = exports = MC function MC () { this.loading = 0 this.models = {} this.ondone = function () {} } var modelLoaders = {} MC.model = function (name, loader) { if (MC.prototype.hasOwnProperty(name) || name === 'loading' || name === 'ondone' || name === 'error' || name === 'm...
Put the model results right on the MC object
Put the model results right on the MC object
JavaScript
isc
isaacs/emcee
c2d0f37353c6ea1daf5f10c149d01c6e667c3524
fetch.js
fetch.js
const fs = require('fs'); const path = require('path'); const exec = require('child_process').exec; // this is from the env of npm, not node const nodePath = process.env.NODE; const version = process.versions.v8; const tmpfile = path.join(__dirname, version+'.flags.json'); if (!fs.existsSync(tmpfile)) { exec('"'+no...
const fs = require('fs'); const path = require('path'); const exec = require('child_process').exec; const nodePath = process.execPath; const version = process.versions.v8; const tmpfile = path.join(__dirname, version+'.flags.json'); if (!fs.existsSync(tmpfile)) { exec('"'+nodePath+'" --v8-options', function (execEr...
Use process.execPath to find node executable on Windows
Fix: Use process.execPath to find node executable on Windows
JavaScript
mit
js-cli/js-v8flags,tkellen/js-v8flags
d6484cd7f2cb24f7c0596f363c983c6c2a71057a
tools/scripts/property-regex.js
tools/scripts/property-regex.js
const { assemble, writeFile, unicodeVersion } = require('./utils.js'); const properties = [ 'ASCII', 'Alphabetic', 'Any', 'Default_Ignorable_Code_Point', 'Lowercase', 'Noncharacter_Code_Point', 'Uppercase', 'White_Space' ]; const result = []; for (const property of properti...
const { assemble, writeFile, unicodeVersion } = require('./utils.js'); // This intentially includes only the binary properties required by UTS 18 Level 1 RL1.2 for Unicode // regex support, minus `Assigned` which has special handling since it is the inverse of Unicode // category `Unassigned` (`Cn`). To in...
Add comment about level 1 Unicode properties
Add comment about level 1 Unicode properties
JavaScript
mit
GerHobbelt/xregexp,slevithan/xregexp,slevithan/xregexp,slevithan/XRegExp,slevithan/xregexp,GerHobbelt/xregexp,GerHobbelt/xregexp,slevithan/XRegExp
16f58e1d165b0d683fd44535ac6e8f6cb12fdd8c
popit-hosting/app.js
popit-hosting/app.js
/** * Module dependencies. */ var express = require('express'), expressHogan = require('express-hogan.js'), mongoose = require('mongoose'), nodemailer = require('nodemailer'); // Connect to the default database mongoose.connect('mongodb://localhost/all'); var app = module.exports = exp...
/** * Module dependencies. */ var express = require('express'), expressHogan = require('express-hogan.js'), mongoose = require('mongoose'), nodemailer = require('nodemailer'); // Connect to the default database mongoose.connect('mongodb://localhost/all'); var app = module.exports = exp...
Add logging to all requests (needed to be at start of configure, perhaps a template rendering issue?)
Add logging to all requests (needed to be at start of configure, perhaps a template rendering issue?)
JavaScript
agpl-3.0
maxogden/popit,mysociety/popit,mysociety/popit,openstate/popit,mysociety/popit,openstate/popit,maxogden/popit,mysociety/popit,mysociety/popit,Sinar/popit,openstate/popit,Sinar/popit,Sinar/popit,Sinar/popit,openstate/popit
a8514306b93f1311c6052cfe6440e84a1da1cca2
scripts/generators.js
scripts/generators.js
var pagination = require('hexo-pagination'); var _ = require('lodash'); hexo.extend.generator.register('category', function(locals){ var config = this.config; var categories = locals.data.categories; if (config.category_generator) { var perPage = config.category_generator.per_page; } else { var perPage...
var pagination = require('hexo-pagination'); var _ = require('lodash'); hexo.extend.generator.register('category', function(locals){ var config = this.config; var categories = locals.data.categories; if (config.category_generator) { var perPage = config.category_generator.per_page; } else { var perPage...
Add alternate language categories in generator
Add alternate language categories in generator This will populate the `alternates` variable that will be available to use in the layout files. The current language is not included for obvious reasons. Built from a10e346a1e29ca8ed1cb71666f8bf7b7d2fd8239.
JavaScript
mit
ahaasler/hexo-theme-colos,ahaasler/hexo-theme-colos
03bd8cd920c7d2d26e93da9e690cef5a01b710bf
core/util/DefaultKeystoneConfiguration.js
core/util/DefaultKeystoneConfiguration.js
/** * DefaultKeystoneConfiguration contains the default settings for keystone. * @class DefaultKeystoneConfiguration * @param {Theme} theme * @constructor * */ module.exports = function DefaultKeystoneConfiguration(theme) { return { 'name': process.env.DOMAIN || 'Estore', 'brand': process.env.DOMAIN || 'Es...
/** * DefaultKeystoneConfiguration contains the default settings for keystone. * @class DefaultKeystoneConfiguration * @param {Theme} theme * @constructor * */ module.exports = function DefaultKeystoneConfiguration(theme) { return { 'name': process.env.DOMAIN || 'Estore', 'brand': process.env.DOMAIN || 'Est...
Use an explicit check for auto update override.
Use an explicit check for auto update override.
JavaScript
mit
stunjiturner/estorejs,stunjiturner/estorejs,quenktechnologies/estorejs
70b429733a5a9be44be5d21fb2703b27068552b4
test-helpers/init.js
test-helpers/init.js
// First require your DOM emulation file (see below) require('./emulateDom.js'); import db_config from '../knexfile'; let exec_env = process.env.DB_ENV || 'test'; global.$dbConfig = db_config[exec_env]; process.env.NODE_ENV = 'test';
global.Promise = require('bluebird') global.Promise.onPossiblyUnhandledRejection((e) => { throw e; }); global.Promise.config({ // Enable warnings. warnings: false, // Enable long stack traces. longStackTraces: true, // Enable cancellation. cancellation: true }); // First require your DOM emulation file (s...
Use bluebird for debuggable promises in tests
Use bluebird for debuggable promises in tests
JavaScript
agpl-3.0
Lokiedu/libertysoil-site,Lokiedu/libertysoil-site
66921fdcec7506f3f86ee34ff9619e1978f7c41d
gevents.js
gevents.js
'use strict'; var request = require('request'); var opts = { uri: 'https://api.github.com' + '/users/' + parseParams(process.argv[2]) + '/events', json: true, method: 'GET', headers: { 'User-Agent': 'nodejs script' } } request(opts, function (err, res, body) { if (err) throw new Error...
'use strict'; var request = require('request'); var opts = { uri: 'https://api.github.com' + '/users/' + parseParams(process.argv[2]) + '/events', json: true, method: 'GET', headers: { 'User-Agent': 'nodejs script' } } request(opts, function (err, res, body) { if (err) throw new Error...
Add explanatory and TODO notes
Add explanatory and TODO notes
JavaScript
mit
jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts
1528ba519169e493fac28c21d6c483187d24bc36
test/markup/index.js
test/markup/index.js
'use strict'; var _ = require('lodash'); var bluebird = require('bluebird'); var fs = bluebird.promisifyAll(require('fs')); var glob = require('glob'); var hljs = require('../../build'); var path = require('path'); var utility = require('../utility'); function testLanguage(language) { desc...
'use strict'; var _ = require('lodash'); var bluebird = require('bluebird'); var fs = bluebird.promisifyAll(require('fs')); var glob = require('glob'); var hljs = require('../../build'); var path = require('path'); var utility = require('../utility'); function testLanguage(language) { desc...
Change synchronous readdir to a promise
Change synchronous readdir to a promise
JavaScript
bsd-3-clause
bluepichu/highlight.js,carlokok/highlight.js,aurusov/highlight.js,highlightjs/highlight.js,MakeNowJust/highlight.js,palmin/highlight.js,teambition/highlight.js,palmin/highlight.js,Sannis/highlight.js,sourrust/highlight.js,isagalaev/highlight.js,tenbits/highlight.js,Sannis/highlight.js,highlightjs/highlight.js,sourrust/...
34d660f07f603b9017fe2dcd88518c0a5c175503
test/onerror-test.js
test/onerror-test.js
var assert = buster.referee.assert; buster.testCase("Call onerror", { setUp: function () { $ = {}; $.post = this.spy(); initErrorHandler("/error", "localhost"); }, "exception within the system": function () { window.onerror('error message', 'http://localhost/test.js', 11); assert.isTru...
var assert = buster.referee.assert; var hostname = location.hostname; buster.testCase("Call onerror", { setUp: function () { $ = {}; $.post = this.spy(); initErrorHandler("/error", hostname); }, "exception within the system": function () { window.onerror('error message', 'http://' + hostna...
Make the tests work for remote test clients.
Make the tests work for remote test clients.
JavaScript
mit
lucho-yankov/window.onerror
2b7213f17e1b6206329bbc02693053b04e52669a
this.js
this.js
console.log(this) //contexto global console.log(this === window) //true var developer = { name : 'Erik', lastName : 'Ochoa', isAdult : true, completeName: function(){ return this.name + this.lastName } } console.log(developer.name) // Erik console.log(developer.lastName) // Ochoa console.log(developer...
console.log(this) //contexto global console.log(this === window) //true var developer = { name : 'Erik', lastName : 'Ochoa', isAdult : true, get completeName() { return this.name + this.lastName } } console.log(developer.name) // Erik console.log(developer.lastName) // Ochoa console.log(developer.isAd...
Use getter to call completeName as a property
Use getter to call completeName as a property
JavaScript
mit
Elyager/this-in-depth,Elyager/this-in-depth
3a04f4e532a7dbba3d560866e9e93b305ae3bf17
test/prerequisite.js
test/prerequisite.js
describe('Prerequisites', () => { describe('Call the same resource with both http client and iframe', () => { it('http headers should be less or equal than iframe ones', () => { browser.url('/'); browser.leftClick('.httpCall'); browser.waitForExist('.detail_headers'); browser.wai...
describe('Prerequisites', () => { describe('Call the same resource with both http client and iframe', () => { it('http headers should be less or equal than iframe ones', () => { browser.url('/'); browser.leftClick('.httpCall'); browser.waitForExist('.detail_headers'); browser.wai...
Refresh the page between a test and another
Refresh the page between a test and another
JavaScript
mit
apiaryio/apiary-console-seed,apiaryio/apiary-console-seed,apiaryio/console-proxy,apiaryio/console-proxy
c907f340b2ac40a6d4af218f2d68df5fde5cc57d
test/test-builder.js
test/test-builder.js
const Alfred = require('../index'); const Builder = Alfred.Builder; const bot = new Alfred(); bot.login('username', 'password') .then(() => bot.send('servernotifyregister', { 'event': 'server' })) .then(() => bot.send('servernotifyregister', { 'event': 'textprivate' })) .then(() => console.log('Connected ...
const Alfred = require('../index'); const Builder = Alfred.Builder; const bot = new Alfred(); bot.login('username', 'password') .then(() => bot.send('servernotifyregister', { 'event': 'server' })) .then(() => bot.send('servernotifyregister', { 'event': 'textprivate' })) .then(() => console.log('Connected ...
Add new line at the end of test files
Add new line at the end of test files
JavaScript
mit
schroffl/alfred-teamspeak
df378b792ed24f04915783f803cc3355b69e6129
APE_Server/APScripts/framework/cmd_event.js
APE_Server/APScripts/framework/cmd_event.js
/* * Command to handle APS events */ Ape.registerCmd("event", true, function(params, info) { if(params.multi){ var recipient = Ape.getChannelByPubid(params.pipe); }else{ var recipient = Ape.getUserByPubid(params.pipe); } if(recipient){ if(!!params.sync){ info.sendResponse("SYNC", { data: param...
/* * Command to handle APS events */ Ape.registerCmd("event", true, function(params, info) { if(params.multi){ var recipient = Ape.getChannelByPubid(params.pipe); }else{ var recipient = Ape.getUserByPubid(params.pipe); } if(recipient){ if(!!params.sync){ info.sendResponse("SYNC", { data: param...
Send error 425 if the recipient of an event is not found
Send error 425 if the recipient of an event is not found
JavaScript
mit
ptejada/ApePubSub,ptejada/ApePubSub
35b55bec4912c6f14351422bc6e6c6fecfd5bfe5
server/auth/index.js
server/auth/index.js
const logger = require('../logging'); const passport = require('passport'); const { setupOIDC } = require('./oidc'); const getUserById = require('../models/user.accessors').getUserById; require('./providers/ow4.js'); module.exports = async (app) => { passport.serializeUser((user, done) => { logger.silly('Seria...
const logger = require('../logging'); const passport = require('passport'); const { setupOIDC } = require('./oidc'); const getUserById = require('../models/user.accessors').getUserById; require('./providers/ow4.js'); module.exports = async (app) => { await setupOIDC(); passport.serializeUser((user, done) => { ...
Make OIDC be default auth mechanism
Make OIDC be default auth mechanism
JavaScript
mit
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
5e44054ad4223d32b53c2312ecd5798b0e114548
main.js
main.js
exports.AgGridAurelia = require('./lib/agGridAurelia').AgGridAurelia; exports.AgGridColumn = require('./lib/agGridColumn').AgGridColumn; exports.AgCellTemplate = require('./lib/agTemplate').AgCellTemplate; exports.AgEditorTemplate = require('./lib/agTemplate').AgEditorTemplate; exports.AgFilterTemplate = require('./li...
exports.AgGridAurelia = require('./lib/agGridAurelia').AgGridAurelia; exports.AgGridColumn = require('./lib/agGridColumn').AgGridColumn; exports.AgCellTemplate = require('./lib/agTemplate').AgCellTemplate; exports.AgEditorTemplate = require('./lib/agTemplate').AgEditorTemplate; exports.AgFullWidthRowTemplate = require...
Add FullWidth row template to exports
Add FullWidth row template to exports
JavaScript
mit
ceolter/ag-grid,ceolter/angular-grid,ceolter/angular-grid,ceolter/ag-grid
272e86c5f7e2d661fff0914abd612f5aef4ee6b1
demo/Progress.js
demo/Progress.js
import React, {Component} from 'react'; import Style from 'styled-components'; class Progress extends Component { state = {progress: 0}; componentDidMount() { this.props.emitter.on(({progress}) => { if (this.state.progress !== progress) { this.setState({progress: progress}); } }); } ...
import React, {Component} from 'react'; import Style from 'styled-components'; class Progress extends Component { state = {progress: 0}; componentDidMount() { this.props.emitter.on(({progress}) => { if (this.state.progress !== progress) { this.setState({progress: progress}); } }); } ...
Remove css transition from progress bar
Remove css transition from progress bar
JavaScript
mit
chitchu/react-mosaic,chitchu/react-mosaic
bdbeb4706abdf570ac5a926a2ed156a67909fac6
template/_copyright.js
template/_copyright.js
/* * Raven.js @VERSION * https://github.com/getsentry/raven-js * * Includes TraceKit * https://github.com/getsentry/TraceKit * * Copyright 2013 Matt Robenolt and other contributors * Released under the BSD license * https://github.com/getsentry/raven-js/blob/master/LICENSE * */ /*! Raven.js @VERSION | githu...
/*! Raven.js @VERSION | github.com/getsentry/raven-js */ /* * Includes TraceKit * https://github.com/getsentry/TraceKit * * Copyright 2013 Matt Robenolt and other contributors * Released under the BSD license * https://github.com/getsentry/raven-js/blob/master/LICENSE * */
Build the copyright header slightly less dumb
Build the copyright header slightly less dumb
JavaScript
bsd-2-clause
grelas/raven-js,Mappy/raven-js,malandrew/raven-js,chrisirhc/raven-js,eaglesjava/raven-js,vladikoff/raven-js,malandrew/raven-js,iodine/raven-js,janmisek/raven-js,chrisirhc/raven-js,housinghq/main-raven-js,housinghq/main-raven-js,getsentry/raven-js,iodine/raven-js,samgiles/raven-js,PureBilling/raven-js,vladikoff/raven-js...
632cdba5fab5df66cbbc98bb7168c13e9b5eb81b
packages/mjml-spacer/src/index.js
packages/mjml-spacer/src/index.js
import { MJMLElement } from 'mjml-core' import React, { Component } from 'react' const tagName = 'mj-spacer' const parentTag = ['mj-column', 'mj-hero-content'] const selfClosingTag = true const defaultMJMLDefinition = { attributes: { 'align': null, 'container-background-color': null, 'height': '20px', ...
import { MJMLElement } from 'mjml-core' import React, { Component } from 'react' const tagName = 'mj-spacer' const parentTag = ['mj-column', 'mj-hero-content'] const selfClosingTag = true const defaultMJMLDefinition = { attributes: { 'align': null, 'container-background-color': null, 'height': '20px', ...
Fix escaping servers which replace the `&nbsp;` with a space
Fix escaping servers which replace the `&nbsp;` with a space We have seen some servers which replace the non-breaking space character with an actual space. This should ensure that even when there is a space the div actually renders
JavaScript
mit
mjmlio/mjml
f43ddd7cc2e642e267970d9ac33931e1e8ac3821
public/js/app.js
public/js/app.js
"use strict"; var GitHubAPI = function(accessToken, org, repo) { var API_URL = 'https://api.github.com/repos/' + org + '/' + repo; return { getBranch: function(branchName) { return $.get(API_URL + '/branches/' + branchName); }, getTree: function(sha) { return $.get(API_URL + '/git/trees/...
"use strict"; var GitHubAPI = function(accessToken, org, repo) { var API_URL = 'https://api.github.com/repos/' + org + '/' + repo; return { getBranch: function(branchName) { return $.get(API_URL + '/branches/' + branchName); }, getTree: function(sha) { return $.get(API_URL + '/git/trees/...
Add an API call for file contents
Add an API call for file contents
JavaScript
mit
nhsalpha/vidius,nhsalpha/vidius,nhsalpha/vidius
9cfef29bf4495ee906341e1f3836142801093f9c
tests/lib/storage.js
tests/lib/storage.js
var ready; beforeEach(function() { storage = TEST_STORAGE; storage.clear(function() { ready = true; }); waitsFor(function() { return ready; }, "the storage to be set up for testing", 500); }); afterEach(function() { storage = DEFAULT_STORAGE; });
var ready; beforeEach(function() { ready = false; storage = TEST_STORAGE; storage.clear(function() { ready = true; }); waitsFor(function() { return ready; }, "the storage to be set up for testing", 500); }); afterEach(function() { storage = DEFAULT_STORAGE; });
Set ready var to false before each test so it doesn't run prematurely.
Set ready var to false before each test so it doesn't run prematurely.
JavaScript
mit
AntarcticApps/Tiles,AntarcticApps/Tiles
3d283ba50b964b06e0591114483b2f59e9012d5f
assets/js/googlesitekit/widgets/components/WidgetNull.js
assets/js/googlesitekit/widgets/components/WidgetNull.js
/** * WidgetNull component. * * Site Kit by Google, Copyright 2021 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * ...
/** * WidgetNull component. * * Site Kit by Google, Copyright 2021 Google LLC * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * ...
Update fn call for unset to work.
Update fn call for unset to work.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
627f1de997b292bd0069048bdda36b2ba0f144c2
lib/plugins/dataforms.js
lib/plugins/dataforms.js
'use strict'; require('../stanza/dataforms'); module.exports = function (client) { client.disco.addFeature('jabber:x:data'); client.disco.addFeature('urn:xmpp:media-element'); client.disco.addFeature('http://jabber.org/protocol/xdata-validate'); client.on('message', function (msg) { if (msg....
'use strict'; require('../stanza/dataforms'); module.exports = function (client) { client.disco.addFeature('jabber:x:data'); client.disco.addFeature('urn:xmpp:media-element'); client.disco.addFeature('http://jabber.org/protocol/xdata-validate'); client.disco.addFeature('http://jabber.org/protocol/xda...
Add disco feature for forms layout
Add disco feature for forms layout
JavaScript
mit
soapdog/stanza.io,legastero/stanza.io,rogervaas/stanza.io,legastero/stanza.io,otalk/stanza.io,flavionegrao/stanza.io,otalk/stanza.io,soapdog/stanza.io,spunkydunker/stanza.io,firdausramlan/stanza.io,spunkydunker/stanza.io,flavionegrao/stanza.io,rogervaas/stanza.io,glpenghui/stanza.io,Palid/stanza.io,glpenghui/stanza.io,...
a3e393d43c1752420360f71c319d2d6ea2300712
components/dash-core-components/src/utils/optionTypes.js
components/dash-core-components/src/utils/optionTypes.js
import {type} from 'ramda'; export const sanitizeOptions = options => { if (type(options) === 'Object') { return Object.entries(options).map(([value, label]) => ({ label: String(label), value, })); } if (type(options) === 'Array') { if ( options....
import React from 'react'; import {type} from 'ramda'; export const sanitizeOptions = options => { if (type(options) === 'Object') { return Object.entries(options).map(([value, label]) => ({ label: React.isValidElement(label) ? label : String(label), value, })); } i...
Fix objects options with component label.
Fix objects options with component label.
JavaScript
mit
plotly/dash,plotly/dash,plotly/dash,plotly/dash,plotly/dash