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 |
|---|---|---|---|---|---|---|---|---|---|
bf889c7b5199832cf02af3c7ad2d85eb7ea86a0a | Kinect2Scratch.js | Kinect2Scratch.js | (function(ext) {
// Cleanup function when the extension is unloaded
ext._shutdown = function() {};
// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.my_first_block = fun... | (function(ext) {
// Cleanup function when the extension is unloaded
ext._shutdown = function() {};
// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.my_first_block = fun... | Make command block do something | Make command block do something
| JavaScript | bsd-3-clause | visor841/SkelScratch,Calvin-CS/SkelScratch |
88dfefa01d456538776a1807721de604d0ff7e86 | app/actions/verticalTreeActions.js | app/actions/verticalTreeActions.js | const updateStructure = newState => ({ type: 'UPDATE_VERT_STRUCTURE', newState });
const highlightNode = nodeId => (dispatch, getState) => {
setTimeout(() => dispatch(unHighlightNode(nodeId)), getState().async.delay / 1.1);
dispatch({ type: 'HIGHLIGHT_NODE', nodeId });
};
const unHighlightNode = nodeId => ({ type... | const updateStructure = newState => ({ type: 'UPDATE_VERT_STRUCTURE', newState });
const highlightNode = nodeId => (dispatch, getState) => {
setTimeout(() => dispatch(unHighlightNode(nodeId)), getState().async.delay / 1.1);
dispatch({ type: 'HIGHLIGHT_NODE', nodeId });
};
const unHighlightNode = nodeId => ({ type... | Add action to reset tree | Add action to reset tree
| JavaScript | mit | ivtpz/brancher,ivtpz/brancher |
3f68e221937cd45836a4fdaee3d33e1e1eb55ac6 | src/core/Clock.js | src/core/Clock.js | /**
* @author alteredq / http://alteredqualia.com/
*/
function Clock( autoStart ) {
this.autoStart = ( autoStart !== undefined ) ? autoStart : true;
this.startTime = 0;
this.oldTime = 0;
this.elapsedTime = 0;
this.running = false;
}
Object.assign( Clock.prototype, {
start: function () {
this.startTime... | /**
* @author alteredq / http://alteredqualia.com/
*/
function Clock( autoStart ) {
this.autoStart = ( autoStart !== undefined ) ? autoStart : true;
this.startTime = 0;
this.oldTime = 0;
this.elapsedTime = 0;
this.running = false;
}
Object.assign( Clock.prototype, {
start: function () {
this.startTime... | Add a comment with a link to PR | Add a comment with a link to PR
| JavaScript | mit | xundaokeji/three.js,looeee/three.js,googlecreativelab/three.js,jeffgoku/three.js,opensim-org/three.js,WestLangley/three.js,julapy/three.js,matgr1/three.js,arodic/three.js,06wj/three.js,RemusMar/three.js,zhoushijie163/three.js,Aldrien-/three.js,sasha240100/three.js,ondys/three.js,zhoushijie163/three.js,Ludobaka/three.js... |
33ae72d4c09fd2713f6d5dde20ef3bd02384dacd | src/prefabs/datatype_map.js | src/prefabs/datatype_map.js | // Constructor
function Map() {
this.value = undefined;
}
// Static Methods
Map.isMap = (map) => map instanceof Map;
// Prototype Methods
Map.prototype.value = function() {
throw "Map is not implemented yet";
}
Map.prototype.toString = function() {
throw "Map is not implemented yet";
}
Map.prototype.isU... | // Constructor
function ErlMap(map) {
this.value = typeof map == "object" ? map : {};
}
// Static Methods
ErlMap.isErlMap = (map) => map instanceof ErlMap;
// Prototype Methods
ErlMap.prototype.getValue = function() {
return this.value;
};
ErlMap.prototype.get = function(key) {
if (typeof key != "string"... | Add some functionality to the map datatype | Add some functionality to the map datatype
| JavaScript | mit | Vereis/jarlang,Vereis/jarlang |
845a40ba458e636b7611c760d558bb64836bef29 | benchmark/utils.js | benchmark/utils.js | function pad( str, len ) {
let res = str;
while ( res.length < len ) {
res += ' ';
}
return res;
}
function runBenchmark( name, preFunc, func, maxTime, maxIterations = Infinity ) {
let iterations = 0;
let elapsed = 0;
while ( elapsed < maxTime ) {
if ( preFunc ) preFunc;
let start = Date.now();
f... | function pad( str, len ) {
let res = str;
while ( res.length < len ) {
res += ' ';
}
return res;
}
function runBenchmark( name, preFunc, func, maxTime, maxIterations = 100 ) {
let iterations = 0;
let elapsed = 0;
while ( elapsed < maxTime ) {
if ( preFunc ) preFunc();
let start = Date.now();
func... | Fix pre func use in benchmark | Fix pre func use in benchmark
| JavaScript | mit | gkjohnson/three-mesh-bvh,gkjohnson/three-mesh-bvh,gkjohnson/three-mesh-bvh |
647bf1a2e61a71b66653628fb1a3a343f6be8f91 | arches/app/media/js/views/components/widgets/text.js | arches/app/media/js/views/components/widgets/text.js | define(['knockout', 'underscore', 'viewmodels/widget'], function (ko, _, WidgetViewModel) {
/**
* registers a text-widget component for use in forms
* @function external:"ko.components".text-widget
* @param {object} params
* @param {string} params.value - the value being managed
* @param {functi... | define(['knockout', 'underscore', 'viewmodels/widget'], function (ko, _, WidgetViewModel) {
/**
* registers a text-widget component for use in forms
* @function external:"ko.components".text-widget
* @param {object} params
* @param {string} params.value - the value being managed
* @param {functi... | Update function to keep defaultValue and Value in sync in config forms | Update function to keep defaultValue and Value in sync in config forms
| JavaScript | agpl-3.0 | archesproject/arches,archesproject/arches,archesproject/arches,archesproject/arches |
73f4f8726e02883608d8d3cd791c0078f478e26c | src/projects/product-history.js | src/projects/product-history.js | import { inject, NewInstance } from 'aurelia-framework';
import { ProjectApi } from './api';
import { DialogService } from 'aurelia-dialog';
import { HistoryDialog } from './history-dialog';
@inject(ProjectApi, DialogService)
export class ProductHistory {
constructor(projectApi, dialogService) {
this.api ... | import { inject, NewInstance } from 'aurelia-framework';
import { ProjectApi } from './api';
import { DialogService } from 'aurelia-dialog';
import { HistoryDialog } from './history-dialog';
@inject(ProjectApi, DialogService)
export class ProductHistory {
constructor(projectApi, dialogService) {
this.api ... | Remove debug info in product history | Remove debug info in product history
| JavaScript | mit | GETLIMS/LIMS-Frontend,GETLIMS/LIMS-Frontend |
2b50597fa29d8076973c37caeb41ee87e5fb9d62 | plugins/noauth.js | plugins/noauth.js | var pull = require('pull-stream')
module.exports = function (opts) {
return {
name: 'noauth',
create: function (_opts) {
return function (stream, cb) {
stream.address = 'noauth'
cb(null, {
remote: '',
auth: { allow: null, deny: null },
source: stream.source... | var pull = require('pull-stream')
module.exports = function (opts) {
return {
name: 'noauth',
create: function (_opts) {
return function (stream, cb) {
cb(null, {
remote: opts.keys.publicKey,
auth: { allow: null, deny: null },
source: stream.source,
sink:... | Make auth work, remote is needed | Make auth work, remote is needed
| JavaScript | mit | dominictarr/multiserver |
920f823924667200b3243ea6046408006a7fdbc7 | js/main.js | js/main.js | $('a[href^="#"]').on('click', function(evt) {
console.log(this, this.hash)
evt.preventDefault();
$('html, body').stop().animate({
'scrollTop': $(this.hash).offset().top
}, 750, 'swing', function() {
window.location.hash = this.hash;
});
});
$('.intro-screenshots .button, .intro-screen... | $('a[href^="#"]').on('click', function(evt) {
evt.preventDefault();
$('html, body').stop().animate({
'scrollTop': $(this.hash).offset().top
}, 750, 'swing', function() {
window.location.hash = this.hash;
});
});
$('.intro-screenshots .button, .intro-screenshots img').click(function(evt)... | Remove console.log call from js | Remove console.log call from js
| JavaScript | agpl-3.0 | drivnal/drivnal.github.io |
4e99cfe5108a022cde05a283ea8bd1038ff719e3 | buildtools/webpack.gmfapps.js | buildtools/webpack.gmfapps.js | const path = require('path');
const ls = require('ls');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const plugins = [];
const entry = {};
const filenamePrefix = process.env.DEV_SERVER ? 'contribs/gmf/apps/' : '';
for (const filename of ls('contribs/gmf/apps/*/index.h... | const path = require('path');
const ls = require('ls');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const plugins = [];
const entry = {};
const filenamePrefix = process.env.DEV_SERVER ? 'contribs/gmf/apps/' : '';
for (const filename of ls('contribs/gmf/apps/*/index.h... | Build gmf apps directly into examples-hosted directory | Build gmf apps directly into examples-hosted directory
| JavaScript | mit | camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo |
18ef15bd4f4aa8b80197a63acc76e093c18d8ada | Test/LiveObjectTests.js | Test/LiveObjectTests.js | QUnit.test("CanGetLiveTicks", function(assert) {
var someGame = new TameGame.StandardGame();
var someObject = someGame.createObject();
var someScene = someGame.createScene();
var numTicks = 0;
someScene.addObject(someObject);
someScene.events.onTick(function (tickData) {
++numTicks;... | QUnit.test("CanGetLiveTicks", function(assert) {
var someGame = new TameGame.StandardGame();
var someObject = someGame.createObject();
var someScene = someGame.createScene();
var numTicks = 0;
someScene.addObject(someObject);
someScene.events.onTick(TameGame.UpdatePass.Animations, function ... | Work around a rounding error in the 60fps test | Work around a rounding error in the 60fps test
| JavaScript | apache-2.0 | TameGame/Engine,TameGame/Engine,TameGame/Engine |
04eadbfd25d2170a482cd50d9286ab1030bd18c5 | src/services/room/room.hooks.js | src/services/room/room.hooks.js | const { authenticate } = require('feathers-authentication').hooks;
const genRandomName = require('../../hooks/gen-rand-room-name.js');
module.exports = {
before: {
all: [ authenticate('jwt') ],
find: [],
get: [],
create: [ genRandomName() ],
update: [],
patch: [],
remove: []
},
after... | const { authenticate } = require('feathers-authentication').hooks;
const genRandomName = require('../../hooks/gen-rand-room-name.js');
const hooks = require('feathers-authentication-hooks');
module.exports = {
before: {
all: [ authenticate('jwt') ],
find: [],
get: [],
create: [
genRandomName(),... | Add creatorId association creation-hook to room service | Add creatorId association creation-hook to room service
| JavaScript | agpl-3.0 | mutiny/lexsur,mutiny/lexsur |
d007df7c06e02d7a372c22d937332fdab073caa0 | src/source-map-generator/vlq.js | src/source-map-generator/vlq.js | const integerToChar = Array.prototype.reduce.call(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
(memo, char, idx) => {
memo[idx] = char;
return memo;
},
Object.create(null)
);
/* eslint-disable no-bitwise */
function encodeInteger (int, collection) {
if (int < 0) {
int = -... | // This appears to be redundant, but a object lookup call will perform better than
// a character lookup in a string.
const integerToChar = Array.prototype.reduce.call(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
(memo, char, idx) => {
memo[idx] = char;
return memo;
},
Object.cr... | Add explanatory comment for why an object lookup is used vs a string lookup. | Add explanatory comment for why an object lookup is used vs a string lookup.
| JavaScript | mit | interlockjs/intergenerator |
e81cb46aa1bfa486739ebfba6e06186eaeac6b77 | Gruntfile.js | Gruntfile.js | var grunt = require('grunt');
require('load-grunt-tasks')(grunt);
grunt.initConfig({
babel: {
options: {
modules: 'common'
},
dist: {
files: [{
"expand": true,
"cwd": "src/",
"src": ["**/*.js"],
"dest": "lib/",
"ext": ".js"
}]
}
},
watch:... | var grunt = require('grunt');
require('load-grunt-tasks')(grunt);
grunt.initConfig({
babel: {
options: {
modules: 'common'
},
dist: {
files: [{
"expand": true,
"cwd": "src/",
"src": ["**/*.js"],
"dest": "lib/",
"ext": ".js"
}]
}
},
watch:... | Add jshint to test task | Add jshint to test task
| JavaScript | mit | mohebifar/xto6,lebab/lebab,bigsan/xto6,listepo/xto6,mohebifar/lebab |
3ceeec3d8e45b6380a97b6b7c2bfdb12111a18a6 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
version: '<%= pkg.version %>'
},
jasmine: {
sources: 'src/majesty.js',
options: {
keepRunner: true,
specs: 'spec/*.js'
}
}
});
grunt.loadNpmTasks... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
version: '<%= pkg.version %>'
},
jasmine: {
sources: 'src/majesty.js',
options: {
keepRunner: true,
specs: 'spec/*.js'
}
},
watch: {
all: {... | Add watch task to grunt | Add watch task to grunt
| JavaScript | mit | craigerm/majesty-js |
358a3bd7bd8d82fc06a4ff9c401d2eef209b0719 | preview/assets/js/toolconfigs/BubbleChart-sodertorn.js | preview/assets/js/toolconfigs/BubbleChart-sodertorn.js | var VIZABI_MODEL = {
"state": {
"time": {
"startOrigin": "1993",
"endOrigin": "2012",
"dim": "year",
"delay": 1
},
"entities": {
"dim": "basomrade",
"show": { }
},
"marker": {
"label": {
"which": "name"
},
"axis_y": {
"which": "... | var VIZABI_MODEL = {
"state": {
"time": {
"startOrigin": "1993",
"endOrigin": "2012",
"dim": "year",
"delay": 1
},
"entities": {
"dim": "basomrade",
"show": { }
},
"entities_colorlegend": {
"dim": "municipality"
},
"marker": {
"label": {
... | Fix config so that color legend shows up correctly | Fix config so that color legend shows up correctly
| JavaScript | bsd-3-clause | Gapminder/vizabi,vizabi/vizabi,vizabi/vizabi,Gapminder/vizabi,Gapminder/vizabi |
a11df2cf1c854be97bf0b544ba64bddf084f73c8 | src/containers/Header/TitleHeaderComponent.js | src/containers/Header/TitleHeaderComponent.js | import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { NavigationExperimental } from 'react-native';
const {
Header: NavigationHeader,
} = NavigationExperimental;
const TitleHeaderComponent = ({
scene,
}) => {
const { route } = scene;
let title = '';
if (route.key !== 'lo... | import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { NavigationExperimental } from 'react-native';
const {
Header: NavigationHeader,
} = NavigationExperimental;
const TitleHeaderComponent = ({
scene,
}) => {
const { route } = scene;
let title = '';
if (route.key !== 'lo... | Fix the header title for AddIncomeContainer | Fix the header title for AddIncomeContainer
| JavaScript | mit | nikolay-radkov/EBudgie,nikolay-radkov/EBudgie,nikolay-radkov/EBudgie |
96d83af378f8d47b159ef49e36f8efa750caf762 | lib/bot.js | lib/bot.js | var irc = require('irc');
function Bot(settings) {
this.settings = settings;
console.log('Connecting to IRC server ' + settings.irc.host + ' with nick ' +
settings.irc.nick);
this.irc = new irc.Client(settings.irc.host, settings.irc.nick, {
channels: [settings.irc.channel],
});
this.irc.addListene... | var irc = require('irc');
function Bot(settings) {
this.settings = settings;
console.log('Connecting to IRC server ' + settings.irc.host + ' with nick ' +
settings.irc.nick);
this.irc = new irc.Client(settings.irc.host, settings.irc.nick, {
channels: [settings.irc.channel],
});
var obj = this;... | Move onError callback to a method | Move onError callback to a method
| JavaScript | mit | mmalecki/dmkbot,mmalecki/dmkbot |
3f3dc3c7b72e8361171ad8b78a37b3c01865f66d | src/lib/update.js | src/lib/update.js | "use strict";
module.exports = function(ref, path, val) {
var db = path ? ref.child(path) : ref;
if(val === false) {
return db.remove();
}
return db.set(val);
};
| "use strict";
module.exports = function(ref, path, val) {
var db;
if(!ref) {
return;
}
db = path ? ref.child(path) : ref;
if(val === false) {
return db.remove();
}
return db.set(val);
};
| Update checks for refs before doing anything | Update checks for refs before doing anything
| JavaScript | mit | tivac/anthracite,kevinkace/crucible,tivac/crucible,tivac/crucible,Ryan-McMillan/crucible,tivac/anthracite,kevinkace/crucible,Ryan-McMillan/crucible |
4ac17081888c4f12dd51ad68f68a007c38438043 | Gruntfile.js | Gruntfile.js | require('js-yaml');
var path = require('path');
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jst');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-karma');
grunt.initConfig({
paths: require('js_paths.yml'),
mochaTest: {
jsbox_apps: {
src: ['<%=... | require('js-yaml');
var path = require('path');
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jst');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-karma');
grunt.initConfig({
paths: require('js_paths.yml'),
mochaTest: {
jsbox_apps: {
src: ['<%=... | Bring back the hating for Django Pipeline's processing of template names :) | Bring back the hating for Django Pipeline's processing of template names :)
| JavaScript | bsd-3-clause | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go |
3effb1cf0488aef3801f6e02fbcac5104d8bf2a0 | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
grunt.initConfig({
shell: {
jekyllBuild: {
command: 'jekyll build --drafts'
}
},
connect: {
server: {
options: {
port: 8080,
base: '_site'
... | module.exports = function (grunt) {
grunt.initConfig({
shell: {
jekyllBuild: {
command: 'jekyll build --drafts'
}
},
connect: {
server: {
options: {
port: 8080,
base: '_site'
... | Make sure grunt is aware of css and font files | Make sure grunt is aware of css and font files
This is just for live-reload. | JavaScript | bsd-3-clause | numbsafari/samandamber.us,numbsafari/samandamber.us |
144e52fa28dc69282022dfe1ff93f2ac00f0f7b0 | support/entry.js | support/entry.js | let ClientEntry = require('../src/Main.purs');
let app = ClientEntry.main(window.location.pathname)(window.__puxLastState || ClientEntry.initialState)()
app.state.subscribe((state) => {
window.__puxLastState = state;
});
// If hot-reloading, hook into each state change and re-render using the last
// state.
if (modu... | var ClientEntry = require('../src/Main.purs');
var app = ClientEntry.main(window.location.pathname)(window.__puxLastState || ClientEntry.initialState)()
app.state.subscribe(function (state) {
window.__puxLastState = state;
});
// If hot-reloading, hook into each state change and re-render using the last
// state.
if... | Use ES5 to fix uglifyJS crash. | Use ES5 to fix uglifyJS crash.
- Fixes #34
| JavaScript | bsd-3-clause | totycro/compras,alexmingoia/pux-starter-app,alexmingoia/pux-starter-app,totycro/compras,totycro/compras |
aabb4e9e34fbc1dd29f89a744f92b1b87d66f867 | src/js/shared/team-form.js | src/js/shared/team-form.js | const { fields, validators, widgets, create: createForm } = require('forms');
function textField(label, maxlength, options = { }) {
return fields.string(Object.assign({ }, options, {
widget: widgets.text({
maxlength,
classes: [ 'pixel' ],
placeholder: options.placeholder,
}),
label,
... | const { fields, validators, widgets, create: createForm } = require('forms');
function extendOptions(options, newOptions) {
return Object.assign({ }, options, newOptions);
}
function textField(label, maxlength, options = { }) {
return fields.string(extendOptions(options, {
widget: widgets.text({
maxleng... | Improve readability of code to extend options | Improve readability of code to extend options
| JavaScript | mit | hackcambridge/hack-cambridge-website,hackcambridge/hack-cambridge-website,hackcambridge/hack-cambridge-website,hackcambridge/hack-cambridge-website |
e3bb26f0fd87974f33e9809bd0eec51266b4fba1 | lib/ssh.js | lib/ssh.js | var Bluebird = require('bluebird');
var connection = require('./connection');
var errors = require('./errors');
var mockOptions = {};
module.exports.errors = errors;
module.exports.connect = function connect(options) {
return new connection.Connection(options).connect();
};
module.exports.connectMock = function c... | var Bluebird = require('bluebird');
var connection = require('./connection');
var errors = require('./errors');
var mockOptions = {},
offlineMode = false;
module.exports.errors = errors;
module.exports.connect = function connect(options) {
if (offlineMode) {
throw new Error("Real connections to " + options... | Add option to prevent real connections in test mode | Add option to prevent real connections in test mode
| JavaScript | mit | relekang/promised-ssh |
064bcdb1860e88a275447c8606910068dc6fd6a4 | Gruntfile.js | Gruntfile.js | "use strict";
module.exports = function (grunt) {
grunt.initConfig({
bump: {
options: {
files: ["package.json"],
commit: true,
commitMessage: "Release %VERSION%",
commitFiles: ["package.json"],
createTag: true,
... | "use strict";
module.exports = function (grunt) {
grunt.initConfig({
bump: {
options: {
files: ["package.json"],
commit: true,
commitMessage: "Release %VERSION%",
commitFiles: ["package.json"],
createTag: true,
... | Add bump:major task to Grunt | Add bump:major task to Grunt
| JavaScript | bsd-2-clause | silverwind/oui |
6ef1a39679606a75611240fe6bdf6b4d90fc2c30 | Gruntfile.js | Gruntfile.js | /* jshint node:true */
"use strict";
module.exports = function (grunt) {
// Show elapsed time at the end
require("time-grunt")(grunt);
// Load all grunt tasks
require("load-grunt-tasks")(grunt);
// Project configuration.
grunt.initConfig({
nodeunit: {
files: ["test/bootstr... | /* jshint node:true */
"use strict";
module.exports = function (grunt) {
// Show elapsed time at the end
require("time-grunt")(grunt);
// Load all grunt tasks
require("load-grunt-tasks")(grunt);
// Project configuration.
grunt.initConfig({
config: {
main: "object-event",
... | Add config property to grunt config | Add config property to grunt config
| JavaScript | mit | ileri/object-event |
9446967b18980ae73d27994c0483b988443d1e6c | library.js | library.js | 'use strict';
// Requirements
var User = module.parent.require('./user'),
var winston = module.parent.require('winston'),
var watsonDev = require('watson-developer-cloud');
// Methods
var Watson = {};
Watson.response = function(postData) {
var conversation = watsonDev.conversation({
username: 'c9d9cc99-b3e5-... | 'use strict';
// Requirements
var winston = module.parent.require('winston');
var watsonDev = require('watson-developer-cloud');
// Methods
var Watson = {};
Watson.response = function(postData) {
var conversation = watsonDev.conversation({
username: 'c9d9cc99-b3e5-44f5-a234-ccae1578e8ae',
password: 'xUtH... | Use of Winston to output messages in the console | Use of Winston to output messages in the console
| JavaScript | mit | gmochi56/nodebb-plugin-watson |
be93df3b236efef0b46677eeddc666b393daffd4 | Gruntfile.js | Gruntfile.js | 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... | 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... | Use the anonymous function expression style to describe the default grunt tasks | [TASK] Use the anonymous function expression style to describe the default grunt tasks
This is to increase the readability of the code
| JavaScript | mit | t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template |
47ce3b25326e12e0fdb37baf0c5f835de4cc84e1 | Gruntfile.js | Gruntfile.js | module.exports = function( grunt ) {
"use strict";
grunt.initConfig({
bump: {
options: {
files: [ "package.json" ],
// Commit
commit: true,
commitMessage: "Release v%VERSION%",
commitFiles: [ "package.json" ],
... | module.exports = function( grunt ) {
"use strict";
grunt.initConfig({
bump: {
options: {
files: [ "package.json" ],
// Commit
commit: true,
commitMessage: "Release v%VERSION%",
commitFiles: [ "package.json" ],
... | Add test gruntfile to jshint checks | Add test gruntfile to jshint checks
| JavaScript | mit | jscs-dev/grunt-jscs,markelog/grunt-checker,BridgeAR/grunt-jscs |
300a051d5ede657fdc1f2e0a3c28d5bffe291cae | apps/skeleton/config.js | apps/skeleton/config.js | exports.httpConfig = {
staticDir: 'static'
};
exports.urls = [
[ '/', 'actions' ]
];
exports.middleware = [
'ringo/middleware/etag',
'ringo/middleware/responselog',
// 'ringo/middleware/profiler'
];
exports.app = require('ringo/webapp').handleRequest;
exports.macros = [
'ringo/skin/macros',
... | exports.httpConfig = {
staticDir: 'static'
};
exports.urls = [
[ '/', 'actions' ]
];
exports.middleware = [
'ringo/middleware/etag',
'ringo/middleware/responselog',
'ringo/middleware/error',
'ringo/middleware/notfound'
// 'ringo/middleware/profiler'
];
exports.app = require('ringo/webapp').... | Update middleware stack of skeleton app. | Update middleware stack of skeleton app.
| JavaScript | apache-2.0 | ringo/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,oberhamsi/ringojs,ringo/ringojs,ringo/ringojs,Transcordia/ringojs,Transcordia/ringojs |
616d1a2c88092903231115c9ce57a3bc6412f635 | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
grunt.initConfig({
jshint: {
jshintrc: '.jshintrc',
files: ['Gruntfile.js', 'bin/*', 'lib/**/*.js', 'test/**/*.js', '!test/assets/**/*']
},
simplemocha: {
options: {
reporter: 'spec'
},
... | module.exports = function (grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
files: ['Gruntfile.js', 'bin/*', 'lib/**/*.js', 'test/**/*.js', '!test/assets/**/*']
},
simplemocha: {
options: {
... | Make the grunt jshint task use the .jshintrc | Make the grunt jshint task use the .jshintrc
| JavaScript | mit | DrRataplan/bower,watilde/bower,skinzer/bower,fernandomoraes/bower,mattpugh/bower,return02/bower,msbit/bower,XCage15/bower,wenyanw/bower,jodytate/bower,Backbase/bower,mex/bower,JFrogDev/bower-art,insanehong/bower,rajzshkr/bower,pjump/bower,prometheansacrifice/bower,gronke/bower,Teino1978-Corp/Teino1978-Corp-bower,unilyn... |
0464ee5c8c9fcd0bb9880c1060013415c4d2ec73 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
'use strict';
// Configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jscs: {
options: {
config: '.jscsrc'
},
bin: 'bin/**/*.js',
grunt: 'Gruntfile.js',
lib... | module.exports = function(grunt) {
'use strict';
// Configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jscs: {
options: {
config: '.jscsrc'
},
bin: 'bin/**/*.js',
grunt: 'Gruntfile.js',
lib... | Add a `travis` task for grunt. | Add a `travis` task for grunt.
| JavaScript | mit | joshuaspence/lesscsslint |
f18b237a0152bc6c1b163a57a11f66853f39d520 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
babel: {
options: {
sourceMap: false
},
dist: {
files: [{
expand: true,
cwd: 'src',
src: ['**/*.js'],
dest: "lib",
ext: ".js"
... | module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
babel: {
options: {
sourceMap: false
},
dist: {
files: [{
expand: true,
cwd: 'src',
src: ['**/*.js'],
dest: "lib",
ext: ".js"
... | Use the bin in node_modules | Use the bin in node_modules
| JavaScript | mit | atom/husk-cli,electronjs/husk-cli |
75305c448a1acc4d71d8426d49cbc4caf18d94c8 | lib/plugins/issues.js | lib/plugins/issues.js | const handlebars = require('handlebars');
const Plugin = require('../plugin');
module.exports = class Issues extends Plugin {
// checkIfEventApplies(event) {
// return event.issue !== undefined || event.pull_request !== undefined;
// }
comment(context, content) {
const template = handlebars.compile(cont... | const handlebars = require('handlebars');
const Plugin = require('../plugin');
module.exports = class Issues extends Plugin {
comment(context, content) {
const template = handlebars.compile(content)(context.payload);
return context.github.issues.createComment(context.payload.toIssue({body: template}));
}
... | Remove commented out conditions for now | Remove commented out conditions for now
We can figure out how to guard against plugins receiving the wrong events later
| JavaScript | isc | pholleran-org/probot,bkeepers/PRobot,probot/probot,probot/probot,pholleran-org/probot,probot/probot,bkeepers/PRobot,pholleran-org/probot |
66192ef0d96f2a3d23668444e809de887c0e65af | src/App.js | src/App.js | import React, { Component } from 'react';
import './App.css';
import TimeTable from './TimeTable.js'
class App extends Component {
render() {
//return <TimeTable />;
//return <TimeTable stopCode="E2036" />;
return <TimeTable lat={60.1836474999998} lon={24.828072999999993} />;
}
}
export default App;
| import React, { Component } from 'react';
import './App.css';
import Error from './Error.js'
import Loading from './Loading.js'
import TimeTable from './TimeTable.js'
import UserLocation from './UserLocation.js'
class App extends Component {
constructor(props) {
super(props);
this.state = {};
}
componentDidMou... | Add implementation to show closest departures. | Add implementation to show closest departures.
| JavaScript | mit | kangasta/timetablescreen,kangasta/timetablescreen |
f061f3489e33bf5a931fb9aee911156336c03c44 | src/app.js | src/app.js | (function() {
var osdOpentok = angular.module('osdOpentok', [
'ngLodash'
]);
})();
| (function() {
var osdOpentok = angular.module('osdOpentok', []);
})();
| Remove lodash and Array dependencies | Remove lodash and Array dependencies
| JavaScript | mit | Osedea/angular-osd-opentok |
9415eb7a524ae894aaa967c5adf754f9b8d7cfa4 | tests/platform/002_agents_install.js | tests/platform/002_agents_install.js | #!/usr/bin/node
var test = require('tap').test;
var child = require('child_process');
test("Agents are installed", function(t) {
t.plan(3);
child.exec("find /opt/smartdc/agents/bin/ -follow -type f ! -perm -a+x",
function(err, stdout, stderr){
t.equal(err, null, "Agents bin directory exis... | #!/usr/bin/node
var test = require('tap').test;
var child = require('child_process');
// This test is to check for regressions against AGENT-420
test("Agents are installed", function(t) {
t.plan(3);
child.exec("find /opt/smartdc/agents/bin/ -follow -type f ! -perm -a+x",
function(err, stdout, stderr)... | Add note as to why agent test exists | [QA-95] Add note as to why agent test exists
| JavaScript | mpl-2.0 | joyent/sdc-system-tests,joyent/sdc-system-tests |
7f05efbc01ab87b9cdaa4ca6b0d3e281eaf5d737 | static/scripts.js | static/scripts.js | function fetchDefinition() {
var term = document.getElementById('id_term-text').value;
var language = document.getElementById('id_term-language').value;
var url = '/api/define.json?term=' + term + '&language=' + language;
fetch(url)
.then(function(response) {
return response.json();
})
... | function fetchDefinition() {
var term = document.getElementById('id_term-text').value;
var language = document.getElementById('id_term-language').value;
var url = '/api/define.json?term=' + term + '&language=' + language;
fetch(url)
.then(function(response) {
return response.json();
})
... | Set term category when fetching definition | Set term category when fetching definition
| JavaScript | mit | dellsystem/bookmarker,dellsystem/bookmarker,dellsystem/bookmarker |
5a58563c854448f4fddc7971c6a62e218f3ee554 | tests/unit/instance-initializers/i18n-test.js | tests/unit/instance-initializers/i18n-test.js | import Ember from 'ember';
import I18nInstanceInitializer from 'ember-flexberry/instance-initializers/i18n';
import { module, test } from 'qunit';
import startApp from '../../helpers/start-app';
import destroyApp from '../../helpers/destroy-app';
let application;
let appInstance;
module('Unit | Instance Initializer |... | import I18nInstanceInitializer from 'ember-flexberry/instance-initializers/i18n';
import { module, test } from 'qunit';
import startApp from '../../helpers/start-app';
import destroyApp from '../../helpers/destroy-app';
let application;
let appInstance;
let fakeLocale;
module('Unit | Instance Initializer | i18n', {
... | Remove unnecessary tests from i18n instance-initializer tests | Remove unnecessary tests from i18n instance-initializer tests
| JavaScript | mit | Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry |
9f739fb962c69666a98d7216d4307f8307a9ec01 | project/src/main/webapp/script.js | project/src/main/webapp/script.js | // Copyright 2019 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
//
// Unless required by applicable law or agreed to in ... | // Copyright 2019 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
//
// Unless required by applicable law or agreed to in ... | Add greeting when logged into the account | Add greeting when logged into the account
| JavaScript | apache-2.0 | googleinterns/step62-2020,googleinterns/step62-2020,googleinterns/step62-2020,googleinterns/step62-2020,googleinterns/step62-2020 |
ae98a21617fea9a9d2b4d8a6c0f22eaafcc1416b | webpack.feature-flags.config.js | webpack.feature-flags.config.js | /**
* Feature flags configuration.
*
* Site Kit by Google, Copyright 2020 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... | /**
* Feature flags configuration.
*
* Site Kit by Google, Copyright 2020 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... | Add user0input to feature flags. | Add user0input to feature flags.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
07c3eb1ab6f37ccd059887fb4afcba5b7baf5efc | test/Absolute/prototype/toDateTime/calendar-convert.js | test/Absolute/prototype/toDateTime/calendar-convert.js | // Copyright (C) 2020 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.absolute.prototype.todatetime
---*/
const values = [
[null, "null"],
[true, "true"],
["iso8601", "iso8601"],
[2020, "2020"],
[2n, "2"],
];
const absolute =... | // Copyright (C) 2020 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-temporal.absolute.prototype.todatetime
---*/
const values = [
[null, "null"],
[true, "true"],
["iso8601", "iso8601"],
[2020, "2020"],
[2n, "2"],
];
const absolute =... | Improve some tests for calendar conversions. | Improve some tests for calendar conversions.
| JavaScript | isc | js-temporal/temporal-polyfill,js-temporal/temporal-polyfill,js-temporal/temporal-polyfill |
bc458f8bb9f7aecb0c9145b3bd130d836b449ae7 | webview.js | webview.js | const path = require('path');
module.exports = (Franz, options) => {
// Add back button to individual rants
if ($('.addcomment-btn').length) {
$('.rantlist').append('<li class="feed-prev-more"><a class="feed-back" onclick="window.history.back()" style="cursor: pointer"><span class="icon-back2 icon"></span><span cl... | const path = require('path');
module.exports = (Franz, options) => {
// Add back button to individual rants
if ($('.addcomment-btn').length) {
$('.rantlist').append('<li class="feed-prev-more"><a class="feed-back" onclick="window.history.back()" style="cursor: pointer"><span class="icon-back2 icon"></span><span cl... | Add help link to devrant menu | Add help link to devrant menu
| JavaScript | mit | extendfranz/devrant |
63444e63454c607e8049d25ab0e041bf6386b3a5 | src/scene/DefaultScene.js | src/scene/DefaultScene.js | /** Default scene sets is a scene that has automatically created camera node. */
var DefaultScene=Scene.extend({
init: function() {
this._super();
// Create default camera node and add camera component to it
this.root.name="Root";
this.cameraNode=new Node("Camera");
this.cameraComponent=this.cameraNod... | /** Default scene sets is a scene that has automatically created camera node. */
var DefaultScene=Scene.extend({
init: function() {
this._super();
// Create default camera node and add camera component to it
this.root.name="Root";
this.cameraNode=new Node("Camera");
this.cameraComponent=this.cameraNode.add... | Set default light intensity to 1.0 | Set default light intensity to 1.0
| JavaScript | mit | lammas/frak-1.x,3dtech/frak,lammas/frak-1.x,kalatestimine/frak,3dtech/frak,kalatestimine/frak |
e6d240b5f8837a202db786be939a31b5c4285499 | test/lib/TempDir.js | test/lib/TempDir.js | // test/lib/TempDir.js
//
'use strict';
var fs = require('fs');
var path = require('path');
var spawnSync = require('child_process').spawnSync;
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var TempDir = {
tmpLocation: null,
prepare: function () {
mkdirp.sync(this.tmpLocation);
},
cl... | // test/lib/TempDir.js
//
'use strict';
var cmds = require('../../lib/commands');
var fs = require('fs');
var path = require('path');
var spawnSync = require('child_process').spawnSync;
var mkdirp = require('mkdirp');
var rimraf = require('rimraf');
var TempDir = {
tmpLocation: null,
prepare: function () {
... | Add runCmd method to execute CMD handlers | Add runCmd method to execute CMD handlers
| JavaScript | mit | simonsinclair/collider-cli |
762a76f23a1024265d4b35169429554890dfb6bf | src/server/lib/i18nmiddleware.js | src/server/lib/i18nmiddleware.js | import glob from 'glob';
import path from 'path';
function loadLanguages() {
const files = glob
.sync('src/client/*/i18n/*.js')
.map(file => {
const translations = require(path.join(__dirname, '../../../', file));
const tokens = file.match(/([^/]+)\/i18n\/([^/]+).js$/);
return {
lan... | import glob from 'glob';
import path from 'path';
import immutable from 'immutable';
import merger from './merger';
function loadLanguages() {
const files = glob
.sync('src/client/*/i18n/*.js')
.map(file => {
const translations = require(path.join(__dirname, '../../../', file));
const tokens = fi... | Extend translations with default ones | Extend translations with default ones
| JavaScript | mit | TheoMer/este,AlesJiranek/este,neozhangthe1/framedrop-web,AugustinLF/este,ViliamKopecky/este,abelaska/este,XeeD/este,sljuka/portfolio-este,glaserp/Maturita-Project,cazacugmihai/este,estaub/my-este,zanj2006/este,vacuumlabs/este,abelaska/este,sikhote/davidsinclair,laxplaer/este,skyuplam/debt_mgmt,aindre/este-example,amrse... |
708a2bf77aa3fdbec093bbbecdae3abca3813133 | bin/web2splash.js | bin/web2splash.js | #!/usr/bin/env node
/*
* Module dependencies.
*/
var fs = require('fs');
var path = require('path');
var program = require('commander');
var web2splash = require('./../lib/web2splash');
/*
* Load package.json
*/
var packageJSON = JSON.parse(fs.readFileSync(path.join(__dirname,'..','package.json'), 'utf8'));
/*... | #!/usr/bin/env node
/*
* Module dependencies.
*/
var fs = require('fs');
var path = require('path');
var program = require('commander');
var web2splash = require('./../lib/web2splash');
/*
* Load package.json
*/
var packageJSON = JSON.parse(fs.readFileSync(path.join(__dirname,'..','package.json'), 'utf8'));
/*... | Update default output path for bin/ | Update default output path for bin/
| JavaScript | apache-2.0 | mwbrooks/web2splash |
6db893a2ca1815436582b92a957f71ee2bc04685 | examples/git-pull.js | examples/git-pull.js |
var connect = require( 'connect' ),
shell = require( 'shelljs' ),
flick = require( '..' ),
handler = flick(),
app = connect();
handler.use( 'romac/romac.github.com', gitPull( '/var/www/romac.me', { rebase: true } ) );
function gitPull( root, options )
{
return function( req, res, next )
{
... |
var connect = require( 'connect' ),
shell = require( 'shelljs' ),
flick = require( '..' ),
handler = flick(),
app = connect();
handler.use( 'romac/romac.github.com', gitPull( '/var/www/romac.me', { rebase: true } ) );
function gitPull( root, options )
{
return function( req, res, next )
{
... | Update the example with different usage example. | Update the example with different usage example.
| JavaScript | mit | romac/node-flick |
8d311dc44f60bb2aeae7e954efaa90b61e5a55cb | src/base-config.js | src/base-config.js | /**
*
*/
module.exports = {
extends: 'airbnb-base',
env: {
jest: true,
},
rules: {
'no-underscore-dangle': ['off'],
'global-require': ['off'],
'no-use-before-define': ['warn'],
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'import/prefer-default-export': ['off'],... | /**
*
*/
module.exports = {
extends: 'airbnb-base',
env: {
jest: true,
},
rules: {
'no-duplicate-imports': ['off'],
'no-underscore-dangle': ['off'],
'global-require': ['off'],
'no-use-before-define': ['warn'],
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'im... | Allow duplicate imports (useful when importing flow types) | tweak: Allow duplicate imports (useful when importing flow types)
| JavaScript | mit | SimonDegraeve/eslint-config-saya |
9a48c8cfe763d6f5a8f07d3964c8df5cab3e14cf | autofocus.js | autofocus.js | AutofocusableTags = ['input', 'textarea', 'button'];
var autofocusSelector = _.map(AutofocusableTags, function (tag) {
return tag + '[autofocus]';
}).join(', ');
var _super = Template.prototype.constructView;
Template.prototype.constructView = function (/* arguments */) {
var args = Array.prototype.slice.call(ar... | AutofocusableTags = ['input', 'textarea', 'button'];
var autofocusSelector = _.map(AutofocusableTags, function (tag) {
return tag + '[autofocus]';
}).join(', ');
var autofocusRenderedCallback = function() {
var autofocusField = this.find(autofocusSelector);
if (autofocusField) {
autofocusField.focus();
}
... | Fix the implementation for the upcoming release of Meteor (v1.0.4) | Fix the implementation for the upcoming release of Meteor (v1.0.4)
The new release supports multiple `onRendered` callbacks per instance.
This new meteor feature broke our implementation, so considering that
we had to change it we now take advantage of the multiple callbacks
per template to simplify our implementation... | JavaScript | mit | mquandalle/blaze-autofocus,mquandalle/blaze-autofocus |
9573f86c81df3895d5771ac4de6d617a793e497d | webpack.config.js | webpack.config.js | var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
... | var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client',
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
... | Use simpler syntax for webpack CSS loaders | Use simpler syntax for webpack CSS loaders | JavaScript | isc | jfbarnes/babel-webpack-express-boilerplate,jfbarnes/babel-webpack-express-boilerplate |
687861bd84987e764676b20da6c1e65927bbefb2 | webpack.config.js | webpack.config.js | /* eslint-env node */
module.exports = {
entry: './DayPicker.js',
devtool: 'source-map',
output: {
path: __dirname + '/dist',
filename: 'DayPicker.js',
library: 'DayPicker',
libraryTarget: 'var',
},
externals: {
react: 'React',
},
};
| /* eslint-env node */
module.exports = {
entry: './DayPicker.js',
devtool: 'source-map',
output: {
path: __dirname + '/dist',
filename: 'DayPicker.js',
library: 'DayPicker',
libraryTarget: 'umd'
},
externals: {
'react': {
root: 'React',
commonjs2: 'react',
commonjs: 'rea... | Build the library as a UMD module | Build the library as a UMD module
| JavaScript | mit | gpbl/react-day-picker,gpbl/react-day-picker,saenglert/react-day-picker,gpbl/react-day-picker |
83528fd63346ae92e4f04db3c79e3ff2faba2a7c | src/main/resources/assets/toast/script/js/Util.js | src/main/resources/assets/toast/script/js/Util.js | var find_common_pkg = function(pkglist) {
var common = [pkglist[0].split(/\./)];
pkglist.forEach(function(pkg) {
var spl = pkg.split(/\./);
var fnd = false;
common.forEach(function(com, ind) {
if (spl[0] === com[0]) {
common[ind] = spl.filter(function(n) {
... | var find_common_pkg = function(pkglist) {
var common = [pkglist[0].split(/\./)];
pkglist.forEach(function(pkg) {
var spl = pkg.split(/\./);
var fnd = false;
common.forEach(function(com, ind) {
if (spl[0] === com[0]) {
common[ind] = spl.filter(function(n) {
... | Add eval command for JS scripting | Add eval command for JS scripting
| JavaScript | mit | Open-RIO/ToastAPI,Open-RIO/ToastAPI,Open-RIO/ToastAPI |
e9995be086292cdff92281941f3bf63048da329e | src/routes/Queue/containers/QueueContainer.js | src/routes/Queue/containers/QueueContainer.js | import { connect } from 'react-redux'
import { fetchQueue, queueSong } from '../modules/queue'
import QueueView from '../components/QueueView'
// Object of action creators (can also be function that returns object).
const mapActionCreators = {
fetchQueue,
queueSong
}
const mapStateToProps = (state) => ({
queue... | import { connect } from 'react-redux'
import { fetchQueue, queueSong } from '../modules/queue'
import QueueView from '../components/QueueView'
// Object of action creators (can also be function that returns object).
const mapActionCreators = {
fetchQueue,
queueSong
}
const mapStateToProps = (state) => ({
queue... | Connect current user data to Queue view | Connect current user data to Queue view
| JavaScript | isc | bhj/karaoke-forever,bhj/karaoke-forever |
6f06de3b391749315df0f38a2af929ef23bf7fef | webpack.config.js | webpack.config.js | "use strict";
const webpack = require("webpack");
const DEV_ENV = "development";
const NODE_ENV = process.env.NODE_ENV || DEV_ENV;
module.exports = {
entry: "./home",
output: {
filename: "build.js",
library: "home"
},
watch: NODE_ENV == DEV_ENV,
watchOptions: {
aggregateOptions: 100
},
d... | "use strict";
const webpack = require("webpack");
const DEV_ENV = "development";
const PRODUCTION_ENV = "production";
const NODE_ENV = process.env.NODE_ENV || DEV_ENV;
module.exports = {
entry: "./home",
output: {
filename: "build.js",
library: "home"
},
watch: NODE_ENV == DEV_ENV,
watchOptions: ... | Use DEV_ENV to webpack.DefinePlugin. Add PRODUCTION_ENV constant. Use webpack.optimize.UglifyJsPlugin if PRODUCTION_ENV | Use DEV_ENV to webpack.DefinePlugin. Add PRODUCTION_ENV constant. Use webpack.optimize.UglifyJsPlugin if PRODUCTION_ENV
| JavaScript | mit | var-bin/webpack-training,var-bin/webpack-training,var-bin/webpack-training,var-bin/webpack-training |
fd1ff157204d17a338a0128cf9d51a2f83ccc22d | webpack.config.js | webpack.config.js | var webpack = require('webpack');
module.exports = {
entry: {
main: ['babel-polyfill', './lib/index.js'],
test: ['babel-polyfill', 'mocha!./test/index.js']
},
output: {
path: __dirname,
filename: '[name].bundle.js'
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: ... | const webpack = require('webpack');
module.exports = {
entry: {
main: ['babel-polyfill', './lib/index.js'],
test: ['babel-polyfill', 'mocha!./test/index.js'],
},
output: {
path: __dirname,
filename: '[name].bundle.js',
},
module: {
loaders: [
{
test: /\.jsx?$/,
exclu... | Change var to const for webpack. | Change var to const for webpack.
| JavaScript | mit | thatPamIAm/weathrly,thatPamIAm/weathrly |
2fb2ebcb5a7b9066997c5e58ce50bea5ad8a0a40 | webpack.config.js | webpack.config.js | var path = require("path");
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js",
},
};
| var path = require("path");
module.exports = {
entry: "./src/index.js",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js",
},
module: {
rules: [
{test: /\.js$/, use: "babel-loader"},
],
},
};
| Use babel-loader for .js files | Use babel-loader for .js files
| JavaScript | mit | tiere/react-starter,tiere/react-starter |
038a296db9e1457e259cb1442993b24dfe096909 | wildcard-regex.js | wildcard-regex.js | "use strict";
function transformWildcardToPattern(wildcardString) {
var length = wildcardString.length;
var character;
var pattern = '';
if(wildcardString === '') {
pattern = '^$';
} else {
for (var index = 0; index < length; index++) {
character = wildcardString.charAt(index);
if (charac... | "use strict";
function transformWildcardToPattern(wildcardString) {
var length = wildcardString.length;
var character;
var pattern = '^';
for (var index = 0; index < length; index++) {
character = wildcardString.charAt(index);
if (character === '*') {
pattern = pattern + '.*'
} else {
p... | Enforce beginning and ending of transformed RegExp patterns | Enforce beginning and ending of transformed RegExp patterns
| JavaScript | mit | kevinzwhuang/wildcard-regex |
e94610330ffd734d6cbf5febcf78c73e6696e80d | www/open.js | www/open.js | var exec = require('cordova/exec');
exports.coolMethod = function(arg0, success, error) {
exec(success, error, "open", "coolMethod", [arg0]);
};
| var exec = require('cordova/exec');
exports.open = function(args, success, error) {
var argsArray =
(Object.prototype.toString.call(args) === '[object Array]') ? args : [args];
function defaultSuccess() {
if (typeof success === 'function') {
success();
}
}
function defaultError() {
if ... | Add default methods for plugin | Add default methods for plugin
| JavaScript | mit | flassa/cordova-open,battmanz/cordova-open,homdna/cordova-open,battmanz/cordova-open,flassa/cordova-open,homdna/cordova-open,flassa/cordova-open,disusered/cordova-open,battmanz/cordova-open,homdna/cordova-open,disusered/cordova-open,disusered/cordova-open |
4691b5f1b0460bfc5c0e26c28e8f7a8fa9acca05 | utils/npm/header.js | utils/npm/header.js |
var window = window || {};
var self = self || {};
|
var window = window || {};
var self = self || {};
// High-resulution counter: emulate window.performance.now() for THREE.CLOCK
if( window.performance === undefined ) {
window.performance = { };
}
if( window.performance.now === undefined ) {
window.performance.now = function () {
var time = process.hrtime();
... | Use process.hrtime() for Clock in node.js builds | Use process.hrtime() for Clock in node.js builds
As discussed in #2975.
| JavaScript | mit | Black-Alpha/three.js,gveltri/three.js,prika/three.js,Jonham/three.js,sebasbaumh/three.js,ZhenxingWu/three.js,lollerbus/three.js,AltspaceVR/three.js,anvaka/three.js,ValtoLibraries/ThreeJS,archcomet/three.js,brianchirls/three.js,VimVincent/three.js,sebasbaumh/three.js,toxicFork/three.js,elephantatwork/ZAAK.IO-EditorInter... |
bcc0515153384ca6cf5bc4191e69e5ee10d7b0e8 | jsapp/controllers/level-01.ctrl.js | jsapp/controllers/level-01.ctrl.js | /**
* @fileOverview Level 01 controller.
*/
var Vector = require('../vector/main.vector');
var Level = require('../level/level.base');
/**
* Level 01 controller.
*
* @constructor
*/
var Level01 = module.exports = function () {
};
/**
* Initialize Level 01.
*
*/
Level01.prototype.init = function() {
this.... | /**
* @fileOverview Level 01 controller.
*/
var Vector = require('../vector/main.vector');
var Level = require('../level/level.base');
/**
* Level 01 controller.
*
* @constructor
*/
var Level01 = module.exports = function () {
};
/**
* Initialize Level 01.
*
*/
Level01.prototype.init = function() {
this.... | Comment out unimplemented methods invocation | Comment out unimplemented methods invocation
| JavaScript | mpl-2.0 | skgtech/stepstepjump |
8b5571accabe1212d60cda251d2615ac9a6e9732 | .eslintrc.js | .eslintrc.js | module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
"mocha": true
},
"extends": "eslint:recommended",
"plugins": ["eslint-plugin-jsdoc", "eslint-plugin-markdown"],
"parserOptions": {
"ecmaVersion": 2018
},
... | module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
"mocha": true
},
"extends": "eslint:recommended",
"plugins": ["eslint-plugin-jsdoc", "eslint-plugin-markdown"],
"parserOptions": {
"ecmaVersion": 2018
},
... | Fix linting rule for switch-case indentation | Fix linting rule for switch-case indentation
| JavaScript | bsd-3-clause | thelonious/kld-affine,lysz210/kld-affine |
1eddc75bce88ed573fad85da8105824995a53065 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Remove nonexistent js services directory | Remove nonexistent js services directory
| JavaScript | mit | allantokuda/LDT,allantokuda/LDT,allantokuda/LDT,allantokuda/LDT |
4743b76ec8aa6e7b31392a441c83ead496c413d7 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | //= require jquery
//= require jquery_ujs
//= require jquery.remotipart
//= require select2
//= require cocoon
//= require dropzone
//= require moj
//= require modules/moj.cookie-message
//= require_tree .
/*For JSHint to ignore ADP object*/
/* globals rorData */
var moj = moj || {};
moj.Modules.devs.init = function... | //= require jquery
//= require jquery_ujs
//= require jquery.remotipart
//= require select2
//= require cocoon
//= require dropzone
//= require moj
//= require modules/moj.cookie-message
//= require_tree .
(function () {
"use strict";
delete moj.Modules.devs;
// Accordion
$('#claim-accordion')
.find('h2'... | Fix JSHint warnings, refactor accordion, remove footer margins | Fix JSHint warnings, refactor accordion, remove footer margins
| JavaScript | mit | ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments |
433c80288dc6bee8e67c0b4213e846b3c05a0beb | app/assets/javascripts/application.js | app/assets/javascripts/application.js | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat... | Remove loader js - moved to own file | Remove loader js - moved to own file
| JavaScript | mit | fma2/nyc-high-school-programs,fma2/nyc-high-school-programs |
e805feadf0a5a85c4e4a7a00b424f78d2cdb7f83 | src/Store.js | src/Store.js | import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
import reducers fr... | import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
import reducers fr... | Add blacklisting of PatientReducer in redux store | Add blacklisting of PatientReducer in redux store
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
59c4df3d9bdb6c0103efd65a399bf60fe9fb6034 | www/common/sframe-boot2.js | www/common/sframe-boot2.js | // This is stage 1, it can be changed but you must bump the version of the project.
// Note: This must only be loaded from inside of a sandbox-iframe.
define([
'/common/requireconfig.js',
'/common/test.js'
], function (RequireConfig, Test) {
require.config(RequireConfig());
// most of CryptPad breaks i... | // This is stage 1, it can be changed but you must bump the version of the project.
// Note: This must only be loaded from inside of a sandbox-iframe.
define([
'/common/requireconfig.js',
'/common/test.js'
], function (RequireConfig, Test) {
require.config(RequireConfig());
// most of CryptPad breaks i... | Fix 'NaN' txid for RPC when using IE | Fix 'NaN' txid for RPC when using IE
| JavaScript | agpl-3.0 | xwiki-labs/cryptpad,xwiki-labs/cryptpad,xwiki-labs/cryptpad |
625df2f15a6c97a1fa94f88aa638f0cf47038f45 | src/assets/js/copyButton.js | src/assets/js/copyButton.js | $('[data-clipboard]').each(function() {
var text = $(this).parent().find('code').text().replace('<', '<').replace('>', '>');
var clipboard = new Clipboard(this, {text: function() {return text}});
clipboard.on('success', function(e) {
$(e.trigger).text('Copied!');
e.clearSelection();
});
});
| $('[data-clipboard]').each(function() {
var self = this;
var clipboard = new Clipboard(this, {text: function() {
var text = $(self).parents('.code-box').find('code:visible').text().replace('<', '<').replace('>', '>');
return text;
}});
clipboard.on('success', function(e) {
$(e.trigger).text('C... | Fix copy in new markup structure | Fix copy in new markup structure
| JavaScript | mit | zurb/building-blocks,zurb/building-blocks |
8c8f7141eb14c44ffa3d1cdaf9dface1cec14b9a | config-example.js | config-example.js | /**
* Ripple Client Configuration
*
* Copy this file to config.js and edit to suit your preferences.
*/
var Options = {
server: {
"trusted" : true,
"websocket_ip" : "s1.ripple.com",
"websocket_port" : 51233,
"websocket_ssl" : true
// "websocket_ip" : "127.0.0.1",
// "websocket_port" : 5006,
... | /**
* Ripple Client Configuration
*
* Copy this file to config.js and edit to suit your preferences.
*/
var Options = {
server: {
"trusted" : true,
"websocket_ip" : "s1.ripple.com",
"websocket_port" : 51233,
"websocket_ssl" : true
// "websocket_ip" : "127.0.0.1",
// "websocket_port" : 5006,
... | Add config example for Bitcoin outbound bridge. | Add config example for Bitcoin outbound bridge.
| JavaScript | isc | vhpoet/ripple-client-desktop,MatthewPhinney/ripple-client-desktop,xdv/ripple-client,xdv/ripple-client,vhpoet/ripple-client,thics/ripple-client-desktop,resilience-me/DEPRICATED_ripple-client,arturomc/ripple-client,arturomc/ripple-client,resilience-me/DEPRICATED_ripple-client,xdv/ripple-client-desktop,bsteinlo/ripple-cli... |
853ab4149c832006875257a1625bfd17439080d4 | lib/shared/addon/utils/evaluate.js | lib/shared/addon/utils/evaluate.js | function getVariables(showIf, operator) {
if ( showIf.indexOf(operator) > -1 ) {
const array = showIf.split(operator);
if ( array.length === 2 ) {
return {
left: array[0],
right: array[1]
};
} else {
return null;
}
}
return null;
}
function getAnswer(variable,... | import { get } from '@ember/object'
function getVariables(showIf, operator) {
if ( showIf.indexOf(operator) > -1 ) {
const array = showIf.split(operator);
if ( array.length === 2 ) {
return {
left: array[0],
right: array[1]
};
} else {
return null;
}
}
return ... | Support or for catalog question | Support or for catalog question
https://github.com/rancher/rancher/issues/17020
| JavaScript | apache-2.0 | vincent99/ui,rancher/ui,rancherio/ui,lvuch/ui,rancherio/ui,vincent99/ui,westlywright/ui,lvuch/ui,rancher/ui,westlywright/ui,vincent99/ui,rancherio/ui,westlywright/ui,rancher/ui,lvuch/ui |
0d496ed09be215d6d44ab047ede1712564d0ca37 | src/components/BlockRoot.js | src/components/BlockRoot.js | import React from 'react'
export default class BlockRoot extends React.Component {
constructor(props) {
super(props);
}
render() {
const {widthUnits, extraStyles} = this.props;
const widthPx = 64*widthUnits - 2;
return (
<div style={{boxSizing: 'border-box', width: widthPx+'px', height: '... | import React from 'react'
export default class BlockRoot extends React.Component {
constructor(props) {
super(props);
}
render() {
const {widthUnits, extraStyles} = this.props;
const widthPx = 64*widthUnits - 2;
return (
<div style={{boxSizing: 'border-box', width: widthPx+'px', height: '... | Fix issue with block overflow | Fix issue with block overflow
| JavaScript | mit | rsimmons/plinth,rsimmons/plinth,rsimmons/plinth |
5c99b823368c8ab6186e33cf89a12d9e50e447ea | src/javascripts/ng-admin/Crud/column/maReferencedListColumn.js | src/javascripts/ng-admin/Crud/column/maReferencedListColumn.js | export default function maReferencedListColumn(NgAdminConfiguration) {
return {
scope: {
'field': '&',
'datastore': '&'
},
restrict: 'E',
link: {
pre: function(scope) {
scope.field = scope.field();
var targetEntity =... | export default function maReferencedListColumn(NgAdminConfiguration) {
return {
scope: {
'field': '&',
'datastore': '&'
},
restrict: 'E',
link: {
pre: function(scope) {
scope.field = scope.field();
var targetEntity =... | Add entryCssClasses functionality to referenced list field. | Add entryCssClasses functionality to referenced list field.
| JavaScript | mit | vasiakorobkin/ng-admin,LuckeyHomes/ng-admin,LuckeyHomes/ng-admin,SebLours/ng-admin,jainpiyush111/ng-admin,ulrobix/ng-admin,ulrobix/ng-admin,ulrobix/ng-admin,marmelab/ng-admin,eBoutik/ng-admin,jainpiyush111/ng-admin,jainpiyush111/ng-admin,eBoutik/ng-admin,marmelab/ng-admin,SebLours/ng-admin,eBoutik/ng-admin,marmelab/ng-... |
f0cee5ce02f39e1b0cad64385ab4279067dac12d | api/models/Organization.js | api/models/Organization.js | /**
* Organization
*
* @module :: Model
* @description :: A short summary of how this model works and what it represents.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
name: 'STRING'
/* e.g.
nickname: 'string'
*/
}
};
| /**
* Organization
*
* @module :: Model
* @description :: A short summary of how this model works and what it represents.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
name: {
type: 'string',
required: true
}
/* e.g.
nickname: 'str... | Add some additional validation for organization model | Add some additional validation for organization model
| JavaScript | mit | thomaslangston/sailsnode |
94ae3494f0911dec364bee7df12fd7e2e3e0d680 | src/index.js | src/index.js | // @flow
import React from 'react';
import ReactDOM from 'react-dom';
// AppContainer is a necessary wrapper component for HMR
import { AppContainer } from 'react-hot-loader';
import { BrowserRouter as Router } from 'react-router-dom';
import 'normalize.css';
import App from './app';
const rootElement = document.getE... | // @flow
import React from 'react';
import ReactDOM from 'react-dom';
// AppContainer is a necessary wrapper component for HMR
import { AppContainer } from 'react-hot-loader';
import { BrowserRouter as Router } from 'react-router-dom';
import 'normalize.css';
import App from './app';
const rootElement = document.getE... | Handle flow check error when React mount node is not found | Handle flow check error when React mount node is not found
| JavaScript | mit | bhongy/react-components,bhongy/react-components |
bac25cdf297a7fa54f21977aa17d455e439cdf51 | test/generation.js | test/generation.js | var path = require('path');
var _ = require('lodash');
var assert = require('assert');
var fs = require("fs");
var fsUtil = require("../lib/utils/fs");
var testGeneration = function(book, type, func, done) {
var OUTPUT_PATH = book.options.output;
qdone(
book.generate(type)
.then(function(... | var path = require('path');
var _ = require('lodash');
var assert = require('assert');
var fs = require("fs");
var fsUtil = require("../lib/utils/fs");
var testGeneration = function(book, type, func, done) {
var OUTPUT_PATH = book.options.output;
qdone(
book.generate(type)
.then(function(... | Improve tests for multilingual json output | Improve tests for multilingual json output
| JavaScript | apache-2.0 | palerdot/gitbook,bradparks/gitbook,vehar/gitbook,haamop/documentation,qingying5810/gitbook,minghe/gitbook,gaearon/gitbook,haamop/documentation,kamyu104/gitbook,nycitt/gitbook,palerdot/gitbook,iflyup/gitbook,a-moses/gitbook,rohan07/gitbook,justinleoye/gitbook,jasonslyvia/gitbook,rohan07/gitbook,justinleoye/gitbook,sudob... |
6f202897a9144a752c88c7dc992de17bc67c8f9c | test/stack-test.js | test/stack-test.js | /*global describe, it*/
/*
* mochify.js
*
* Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
'use strict';
var assert = require('assert');
var run = require('./fixture/run');
describe('stack', function () {
this.timeout(3000);
it('does not screw up xunit', function (done) {
... | /*global describe, it*/
/*
* mochify.js
*
* Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
'use strict';
var assert = require('assert');
var run = require('./fixture/run');
describe('stack', function () {
this.timeout(3000);
it('does not screw up xunit', function (done) {
... | Fix test case to not fail due to varying timings | Fix test case to not fail due to varying timings
The xunit output contains the time it took to run the tests.
It's sometimes 0 and sometimes 0.001. | JavaScript | mit | Swaagie/mochify.js,jhytonen/mochify.js,boneskull/mochify.js,Heng-xiu/mochify.js,boneskull/mochify.js,Heng-xiu/mochify.js,mantoni/mochify.js,jhytonen/mochify.js,Swaagie/mochify.js,mantoni/mochify.js,mantoni/mochify.js |
1c8676f2b1a0a4737ad24524e4ea07bca6e475b3 | karma.conf.js | karma.conf.js | /* jshint node: true */
'use strict';
var webpackLoadersConfig = require('./webpack/loaders.config');
var webpackPluginsConfig = require('./webpack/plugins.config');
var webpackResolveConfig = require('./webpack/resolve.config');
module.exports = function(config) {
config.set({
browsers: [
'Chrome'
]... | /* jshint node: true */
'use strict';
var webpackLoadersConfig = require('./webpack/loaders.config');
var webpackPluginsConfig = require('./webpack/plugins.config');
var webpackResolveConfig = require('./webpack/resolve.config');
module.exports = function(config) {
config.set({
browsers: [
'Chrome'
]... | Watch source files to rerun tests on change | Watch source files to rerun tests on change
| JavaScript | mit | yejodido/webpack-todomvc,yejodido/webpack-todomvc |
a0dd7a216b9a5ea06550fcb3ab22942f9bc83179 | tests/angular-js/karma.conf.js | tests/angular-js/karma.conf.js | (function () {
'use strict';
module.exports = function(config){
config.set({
basePath : '../../',
files : [
'cla_frontend/assets-src/vendor/raven-js/dist/angular/raven.js',
'cla_frontend/assets/javascripts/lib.min.js',
'cla_frontend/assets/javascripts/cla.main.min.js',
... | (function () {
'use strict';
module.exports = function(config){
config.set({
basePath : '../../',
files : [
'cla_frontend/assets-src/vendor/raven-js/dist/angular/raven.js',
'cla_frontend/assets/javascripts/lib.min.js',
'cla_frontend/assets/javascripts/cla.main.min.js',
... | Change path references for angular-mocks | Change path references for angular-mocks | JavaScript | mit | ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend |
97e14bcf5f0eca4b1edaa70cfe01ddeb32dfba3f | app/src/home/contact.js | app/src/home/contact.js | document.addEventListener('DOMContentLoaded', () => {
// The <form> element
const contactForm = document.forms['contact-form'];
// The button in the <form> element
const formSubmitButton = document.getElementById('contact-form-submit');
formSubmitButton.addEventListener('click', () => {
// Read URL and H... | function submit() {
// The <form> element
const contactForm = document.forms['contact-form'];
// Read URL and HTTP method from the attributes on the <form> element
const submitURL = contactForm.getAttribute('action');
const submitMethod = contactForm.getAttribute('method');
// Read data from the form for ... | Split submission into a separate function | Split submission into a separate function
| JavaScript | mit | arkis/arkis.io,arkis/arkis.io |
875f6414a3fa22808997db84d4df6224faf376da | apps/skeleton/config.js | apps/skeleton/config.js | exports.httpConfig = {
staticDir: 'static'
};
exports.urls = [
[ '/', 'actions' ]
];
exports.middleware = [
'helma/logging',
];
exports.macros = [
'helma/skin/macros',
'helma/skin/filters'
];
exports.charset = 'UTF-8';
exports.contentType = 'text/html';
| exports.httpConfig = {
staticDir: 'static'
};
exports.urls = [
[ '/', 'actions' ]
];
exports.middleware = [
'helma/middleware/etag',
'helma/middleware/responselog',
// 'helma/middleware/profiler'
];
exports.macros = [
'helma/skin/macros',
'helma/skin/filters'
];
exports.charset = 'UTF-8';
... | Update middleware module names in skeleton app. | Update middleware module names in skeleton app.
git-svn-id: fac99be8204c57f0935f741ea919b5bf0077cdf6@9808 688a9155-6ab5-4160-a077-9df41f55a9e9
| JavaScript | apache-2.0 | Transcordia/ringojs,Transcordia/ringojs,Transcordia/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,ringo/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ringo/ringojs |
eafd6cf2e51bd03a030633e8d2cf3a96ef500ca8 | admin/server/routes/signout.js | admin/server/routes/signout.js | var keystone = require('../../../');
var session = require('../../../lib/session');
module.exports = function (req, res) {
session.signout(req, res, function () {
if (typeof keystone.get('signout redirect') === 'string') {
return res.redirect(keystone.get('signout redirect'));
} else if (typeof keystone.get('s... | var keystone = require('../../../');
var session = require('../../../lib/session');
module.exports = function (req, res) {
session.signout(req, res, function () {
// After logging out, the user will be redirected to /signin?signedout
// It shows a bar on top of the sign in panel saying "You have been signed out".... | Comment for signin?signedout version added | Comment for signin?signedout version added
| JavaScript | mit | creynders/keystone,creynders/keystone |
e33b2a1202ece50ffc946e1f84ea653e6d54a669 | bin/bosco.js | bin/bosco.js | #!/usr/bin/env node
/**
* Bosco command line tool
*/
var program = require('commander');
var Bosco = require('../index');
var _ = require('lodash');
program
.version('0.0.1')
.usage('[options] <command>')
.option('-c, --configFile [file]', 'Use specific config file')
.option('-e, --environment [environment... | #!/usr/bin/env node
/**
* Bosco command line tool
*/
var program = require('commander');
var Bosco = require('../index');
var _ = require('lodash');
program
.version('0.0.1')
.usage('[options] <command>')
.option('-c, --configFile [file]', 'Use specific config file')
.option('-e, --environment [environment... | Set default build if not provided | Set default build if not provided
| JavaScript | mit | tomgco/bosco,tes/bosco,tomgco/bosco,tomgco/bosco,tes/bosco,ahmadassaf/Bosco,ahmadassaf/Bosco |
ca2e017f805c590a696eca2a024a9dd9bf17b986 | src/charts/Chart.Scatter.js | src/charts/Chart.Scatter.js | (function() {
"use strict";
var root = this;
var Chart = root.Chart;
var helpers = Chart.helpers;
var defaultConfig = {
hover: {
mode: 'single',
},
scales: {
xAxes: [{
type: "linear", // scatter should not use a category axis
position: "bottom",
id: "x-axis-1", // need an ID so datasets ... | (function() {
"use strict";
var root = this;
var Chart = root.Chart;
var helpers = Chart.helpers;
var defaultConfig = {
hover: {
mode: 'single',
},
scales: {
xAxes: [{
type: "linear", // scatter should not use a category axis
position: "bottom",
id: "x-axis-1", // need an ID so datasets ... | Update default tooltip configs for scatter charts. Made scatter charts a first class chart type. | Update default tooltip configs for scatter charts. Made scatter charts a first class chart type.
| JavaScript | mit | el-ee/Chart.js,chartjs/Chart.js,rvaidya/Chart.js,potatopeelings/Chart.js,2Ring/Chart.js,salzhrani/Chart.js,el-ee/Chart.js,panzarino/Chart.js,Magnetic/Chart.js,bokysan/Chart.js,amir-hadzic/Chart.js,rvaidya/Chart.js,touletan/Chart.js,amir-hadzic/Chart.js,ldwformat/Chart.js,chartjs/Chart.js,morleyzhi/OkChart.js,touletan/C... |
c2af0539e362fe3a510ab2cad02df0f732e8ae47 | test/unit.js | test/unit.js | import test from 'ava'
import Onionoo from '../'
test('Onionoo is a function', t => {
t.is(typeof Onionoo, 'function')
})
| import test from 'ava'
import Onionoo from '../'
test('Onionoo is a function', t => {
t.is(typeof Onionoo, 'function')
})
test('Onionoo cannot be invoked without \'new\'', t => {
t.throws(() => Onionoo())
t.notThrows(() => new Onionoo())
})
| Test Onionoo cannot be invoked without 'new' | Test Onionoo cannot be invoked without 'new'
| JavaScript | mit | lukechilds/onionoo-node-client |
13b3199794edaff517333be3a06b3d39a6a5d19b | angular/app/components/cms-ngos-list/cms-ngos-list.component.js | angular/app/components/cms-ngos-list/cms-ngos-list.component.js | class CmsNgosListController{
constructor(NgoService, $filter, $state, DialogService){
'ngInject';
var vm = this;
this.$filter = $filter;
this.$state = $state;
this.DialogService = DialogService;
this.NgoService = NgoService;
this.NgoService.fetchAll().then(fun... | class CmsNgosListController{
constructor(NgoService, $filter, $state, DialogService){
'ngInject';
var vm = this;
this.$filter = $filter;
this.$state = $state;
this.DialogService = DialogService;
this.NgoService = NgoService;
this.listOrderByColumn = '-organisa... | Fix ordering bug in NGO edit | Fix ordering bug in NGO edit
Fix issue #126
| JavaScript | mit | magnolo/newhere,magnolo/newhere,newhere-team/nh-website,newhere-team/nh-website,magnolo/newhere,newhere-team/nh-website |
deccf198d3ec5b5b65a867cba35cde82eb1e726c | app/routes/PlayerSelect/index.js | app/routes/PlayerSelect/index.js | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
ScrollView,
Image,
Alert
} from 'react-native';
import MyButton from '../../../MyButton';
import Input from '../../../Input';
import List from '../../../List';
export class PlayerSelect extends Component {
static navigationOptions... | /* @flow */
import React, { Component } from 'react';
import {
Text,
View,
ScrollView,
Image,
Alert
} from 'react-native';
import MyButton from '../../../MyButton';
import Input from '../../../Input';
import List from '../../../List';
export class PlayerSelect extends Component {
static navigationOptions ... | Add flow to PlayerSelect and clean up | Add flow to PlayerSelect and clean up
| JavaScript | mit | iimog/x-party-game-app,iimog/x-party-game-app |
908446265e12553bfafe70860a715d35fded539b | src/friendo/measurements.js | src/friendo/measurements.js | import { STATS } from './constants'
/**
* Defines functions that calculate limb sizes and positions
*/
export const thighGap = () => 13
export const armGirth = friendo => friendo.getStatStage(STATS.ARM) * 2
export const armLength = friendo => Math.floor(((friendo.getStatStage(STATS.ARM) - 1) * 6) + 10)
export const... | import { STATS } from './constants'
/**
* Defines functions that calculate limb sizes and positions
*/
export const thighGap = () => 13
export const armGirth = friendo => (friendo.getStat(STATS.ARM) * 0.2) + 2
export const armLength = friendo => Math.floor(((friendo.getStat(STATS.ARM) - 1) * 0.6) + 10)
export const... | Modify leg and arm scaling to use raw stats | :recycle: Modify leg and arm scaling to use raw stats
| JavaScript | mit | mattdelsordo/friendo,mattdelsordo/friendo,mattdelsordo/friendo |
1b99797d3293cfe9c14aa3f166aaf30d245f9b6f | src/glue/avm2/flash_geom.js | src/glue/avm2/flash_geom.js | natives.PointClass = function PointClass(runtime, scope, instance, baseClass) {
var c = new runtime.domain.system.Class("Point", instance, Domain.passthroughCallable(instance));
c.extend(baseClass, Point.prototype);
c.nativeStatics = {
};
c.nativeMethods = {
};
return c;
}; | natives.ColorTransformClass = function ColorTransformClass(runtime, scope, instance, baseClass) {
var c = new runtime.domain.system.Class("ColorTransform", instance, Domain.passthroughCallable(instance));
c.extend(baseClass, ColorTransform.prototype);
c.nativeStatics = {
};
c.nativeMethods = {
};
retur... | Add glue code for flash.geom classes. | Add glue code for flash.geom classes.
| JavaScript | apache-2.0 | mozilla/shumway,yurydelendik/shumway,yurydelendik/shumway,tschneidereit/shumway,tschneidereit/shumway,mozilla/shumway,yurydelendik/shumway,tschneidereit/shumway,tschneidereit/shumway,mbebenita/shumway,mozilla/shumway,mbebenita/shumway,mozilla/shumway,mbebenita/shumway,mozilla/shumway,yurydelendik/shumway,mozilla/shumwa... |
d97b3fa63f461e7bd00341b41cb109c2fa86427a | src/assertions.js | src/assertions.js | import assert from 'assert';
export default function assertion(result, assert = assert) {
return {
equal: assert.equal.bind(null, result),
notEqual: assert.notEqual.bind(null, result),
ok: assert.ok.bind(null, result)
};
}
| import assert from 'assert';
export default function assertion(result, assertion = assert) {
return {
equal: assertion.equal.bind(null, result),
notEqual: assertion.notEqual.bind(null, result),
ok: assertion.ok.bind(null, result)
};
}
| Fix an issue where assert is not defined | Fix an issue where assert is not defined
| JavaScript | mit | zephraph/sasspec |
81bb79d9f4ec29a357b2d7a2dd6f89556972168d | Kwc/Statistics/GoogleTagManager/Component.defer.js | Kwc/Statistics/GoogleTagManager/Component.defer.js | var dataLayer = require('kwf/data-layer');
dataLayer.onPush(function (data) {
window.dataLayer.push(data);
});
| var dataLayer = require('kwf/data-layer');
dataLayer.onPush(function (data) {
if (window.dataLayer) window.dataLayer.push(data);
});
| Fix missing datalayer object, as this is not set if ignored is true | Fix missing datalayer object, as this is not set if ignored is true
| JavaScript | bsd-2-clause | koala-framework/koala-framework,koala-framework/koala-framework |
9869a3507b1cff155f8a0083093c917d8a3e0a51 | api/src/jobs/sendAuditEmail.js | api/src/jobs/sendAuditEmail.js | export default (app) => {
app.jobs.schedule('send audit email', '0 16 * * FRI', async () => {
app.info('CRON: sending audit email - starting')
const mailerConfig = app.get('mailer')
const recipients =
mailerConfig.auditRecipients && mailerConfig.auditRecipients.split(',')
if (recipients) {
... | export default (app) => {
app.jobs.schedule('send audit email', '0 16 * * 6', async () => {
app.info('CRON: sending audit email - starting')
const mailerConfig = app.get('mailer')
const recipients =
mailerConfig.auditRecipients && mailerConfig.auditRecipients.split(',')
app.info(`recipients: $... | Use numeric value for day of week in CRON expression. | Use numeric value for day of week in CRON expression.
| JavaScript | agpl-3.0 | teikei/teikei,teikei/teikei,teikei/teikei |
1c420fea8205a7fab70b2d5c8acc6b98d2851b89 | gruntfile.js | gruntfile.js | module.exports = function(grunt) {
// Project configuration
grunt.initConfig({
clean: {
all: {
src: ['.tmp', 'dist']
}
},
concat: {
all: {
src: [
'less/mixins.less',
'less/variables.less',
'less/*.less',
],
... | module.exports = function(grunt) {
// Project configuration
grunt.initConfig({
clean: {
all: {
src: ['.tmp', 'dist']
}
},
concat: {
all: {
src: [
'less/mixins.less',
'less/variables.less',
'less/*.less',
],
... | Use different port for server task | chore: Use different port for server task
| JavaScript | mit | iVantage/ivantage-flavored-markdown |
f7084c16405300e440722546ec1e66db96815a8b | src/javascripts/firebase.js | src/javascripts/firebase.js | import * as firebase from 'firebase';
import { testAction } from "../actions/userActions";
import store from "../store/configureStore";
let config = {
apiKey: 'AIzaSyBhSdMEX0P-QGwfZLOYLApr63rmERuxb_o',
authDomain: 'butterflypinner.firebaseapp.com',
databaseURL: 'https://butterflypinner.firebaseio.com',
projec... | import * as firebase from 'firebase';
import { testAction } from '../actions/userActions';
import store from '../store/configureStore';
let config = {
apiKey: 'AIzaSyBhSdMEX0P-QGwfZLOYLApr63rmERuxb_o',
authDomain: 'butterflypinner.firebaseapp.com',
databaseURL: 'https://butterflypinner.firebaseio.com',
projec... | Save user data to cloud upon login | Save user data to cloud upon login
| JavaScript | mit | omarcodex/butterfly-pinner,omarcodex/butterfly-pinner |
d07fc4bd050d461052d59fa9df2a46b3935b0968 | src/characters.js | src/characters.js | import {
child, avenger, protector, persecutor,
scorpion,
} from 'emoji';
export default {
/* The Good Guys */
child: {
name: `Child`,
emoji: child,
type: true,
maxHealth: 40,
abilities: {
move: {
range: 3,
},
},
},
avenger: {
name: `Avenger`,
emoji: a... | import {
child, avenger, protector, persecutor,
scorpion,
} from 'emoji';
export default {
/* The Good Guys */
child: {
name: `Child`,
emoji: child,
type: true,
maxHealth: 40,
abilities: {
move: {
range: 3,
},
},
},
avenger: {
name: `Avenger`,
emoji: a... | Add aiAttack details to swarmer | Add aiAttack details to swarmer
| JavaScript | mit | HyphnKnight/js13k-2017,HyphnKnight/js13k-2017 |
dcc3375ddac386e1861d3406791069c2200351a2 | src/components/ImputationResults.js | src/components/ImputationResults.js | import React from 'react';
class ImputationResults extends React.Component {
static propTypes = {
imputation_data: React.PropTypes.object,
biobank: React.PropTypes.string,
}
let analysis;
if (
hunt && hunt.length && hunt[0].genotyped ||
tromso && tromso.l... | import React from 'react';
class ImputationResults extends React.Component {
static propTypes = {
imputation_data: React.PropTypes.object,
biobank: React.PropTypes.string,
}
render() {
if (!this.props.imputation_data) {
return <div />;
}
const data = this... | Remove unneded (copied for reference) code | Remove unneded (copied for reference) code
| JavaScript | agpl-3.0 | hunt-genes/fasttrack,hunt-genes/gwasc,hunt-genes/gwasc,hunt-genes/fasttrack |
034e5b25313d6c3b66bd7ae1e6f15fcd0f2e1654 | backend/src/models/User.js | backend/src/models/User.js | import mongo from '../db'
import utils from '../utils'
/**
* User :: {
* id: String,
* username: String,
* password: String,
* createdAt: String
* }
*/
/** String -> String -> User */
function createUser(username, password) {
return {
"id": utils.UUID(),
"username": username,
... | import mongo from '../db'
import utils from '../utils'
import crypto from 'crypto'
/**
* User :: {
* id: String,
* username: String,
* password: String,
* createdAt: String
* }
*/
/** String -> String -> User */
function createUser(username, password) {
return {
"id": utils.UUID(),
... | Use nodejs native crypto module | Use nodejs native crypto module
| JavaScript | mit | 14Plumes/Hexode,KtorZ/Hexode,KtorZ/Hexode,14Plumes/Hexode,14Plumes/Hexode,KtorZ/Hexode |
0ad734237f6fff69738bed22c7b8a99947b632b6 | lib/core-components/famous-tests/physics/basic/particle/particle.js | lib/core-components/famous-tests/physics/basic/particle/particle.js | FamousFramework.scene('famous-tests:physics:basic:particle', {
behaviors: {
'.particle': {
'size': [200, 200],
'align': [0.5, 0.5],
'mount-point': [0.5, 0.5],
'style': {
'background': 'whitesmoke',
'border-radius': '50%'
... | FamousFramework.scene('famous-tests:physics:basic:particle', {
behaviors: {
'.particle': {
'size': [200, 200],
'align': [0.5, 0.5],
'mount-point': [0.5, 0.5],
'style': {
'background': 'whitesmoke',
'border-radius': '50%'
... | Add example of removing physics force | example: Add example of removing physics force
| JavaScript | mit | jeremykenedy/framework,colllin/famous-framework,SvitlanaShepitsena/framework,SvitlanaShepitsena/framework-1,SvitlanaShepitsena/framework-1,woltemade/framework,infamous/framework,SvitlanaShepitsena/framework,woltemade/framework,tbossert/framework,jeremykenedy/framework,SvitlanaShepitsena/remax-banner,ildarsamit/framewor... |
0a414544701f842a2aabf9320f2f358f050d476e | scripts/afterBuild.js | scripts/afterBuild.js | const { resolve, extname } = require('path')
const { copyFileSync, readdirSync } = require('fs')
const NATIVE_ADDON_RELEASE_PATH = resolve(__dirname, '..', 'bindings', 'build', 'Release')
const BUNDLE_PATH = resolve(__dirname, '..', 'dist', 'bundled')
const actions = {
win32: windows
}
function windows () {
cons... | const { resolve, extname } = require('path')
const { copyFileSync, readdirSync } = require('fs')
const NATIVE_ADDON_RELEASE_PATH = resolve(__dirname, '..', 'bindings', 'build', 'Release')
const BUNDLE_PATH = resolve(__dirname, '..', 'dist', 'bundled')
const actions = {
win32: windows
}
function windows () {
cons... | Fix after build script for other platforms | Fix after build script for other platforms
| JavaScript | mit | Kylart/KawAnime,Kylart/KawAnime,Kylart/KawAnime |
ff6f9d5360780acef1a9c85b0b29031195137b32 | templates/spec/Component.js | templates/spec/Component.js | 'use strict';
describe('<%= classedName %>', function () {
var <%= classedName %>, component;
beforeEach(function () {
<%= classedName %> = require('../../../src/scripts/components/<%= classedFileName %>.js');
component = <%= classedName %>();
});
it('should create a new instance of <%= classedName %... | 'use strict';
describe('<%= classedName %>', function () {
var React = require('react/addons');
var <%= classedName %>, component;
beforeEach(function () {
<%= classedName %> = require('../../../src/scripts/components/<%= classedFileName %>.js');
component = React.createElement(<%= classedName %>);
})... | Fix warning "Something is calling a React component directly" | Fix warning "Something is calling a React component directly" | JavaScript | mit | rogeriochaves/generator-react-webpack,mattludwigs/generator-react-redux-kit,cmil/generator-react-webpack,cmil/generator-react-webpack,akampjes/generator-react-webpack,mattludwigs/generator-react-redux-kit,justin3737/generator-react-webpack,akampjes/generator-react-webpack,adnasa/generator-react-webpack,rogeriochaves/ge... |
3a15362d3b90984a8b9498711731f7cf2dbb1d53 | src/models/crashLogModel.js | src/models/crashLogModel.js | /*
* Author: Alexandre Havrileck (Oxyno-zeta)
* Date: 08/07/16
* Licence: See Readme
*/
/* ************************************* */
/* ******** REQUIRE ******** */
/* ************************************* */
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const crashLogSchema = n... | /*
* Author: Alexandre Havrileck (Oxyno-zeta)
* Date: 08/07/16
* Licence: See Readme
*/
/* ************************************* */
/* ******** REQUIRE ******** */
/* ************************************* */
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const crashLogSchema = n... | Add date to CrashLog model | [Backend][Model] Add date to CrashLog model
| JavaScript | mit | oxyno-zeta/crash-reporter-electron,oxyno-zeta/crash-reporter-electron |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.