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 |
|---|---|---|---|---|---|---|---|---|---|
59ad47aa54b15a420efea1b2bbc0f44a2e5e5b3e | gulpfile.js | gulpfile.js | var plugins = require('gulp-load-plugins')({
lazy: true
});
////////// TASKS ////////////
/**
* Prints out the list of available tasks.
*/
gulp.task('default', plugins.taskListing);
/////// ACCESSORY FUNCTIONS ////////
| var plugins = require('gulp-load-plugins')({
lazy: true
});
////////// TASKS ////////////
/**
* Prints out the list of available tasks.
*/
gulp.task('default', plugins.taskListing);
////// igonzalez tasks /////////////
gulp.task('analyze');
////// fjfernandez tasks /////////////
/////// ACCESSORY FUNCTIONS... | Add personal areas to prevent merge conflicts. | Add personal areas to prevent merge conflicts.
| JavaScript | mit | natete/matrix-angular-gulp,natete/matrix-angular-gulp |
dbcb98136ecf6d2f6200d2e5fb29f7d1684c9edf | js/colors.js | js/colors.js | module.exports = {
BLACK: 1,
RED: 1,
GREEN: 2,
BLUE: 3
} | module.exports = {
BLACK: 0,
RED: 1,
GREEN: 2,
BLUE: 3
} | Correct color value for Black | Correct color value for Black
| JavaScript | mit | gbirke/textiles-web,gbirke/textiles-web |
5ca496397a1f948ecd2e1e0cb07fc3ad3e40bc64 | src/main/webapp/public/app-reset.js | src/main/webapp/public/app-reset.js | require.config({
paths: {
"jquery": "js/jquery-2.1.4.min",
"underscore": "js/underscore-min",
"knockout": "js/knockout-min-3.3.0"
}
});
require(['jquery', 'js/modules/dukecondb', 'js/modules/dukeconsettings', 'domReady!'], function($, db, settings) {
console.log("Clearing DB");
... | require.config({
paths: {
"jquery": "js/jquery-2.1.4.min",
"underscore": "js/underscore-min",
"domReady": "js/domReady",
"knockout": "js/knockout-min-3.3.0"
}
});
require(['jquery', 'js/modules/dukecondb', 'js/modules/dukeconsettings', 'domReady!'], function($, db, settings) {
... | Add missing "domReady" module declaration | Add missing "domReady" module declaration
| JavaScript | mit | dukecon/dukecon_html5,dukecon/dukecon_html5 |
23b3ba56043fed9a53a3ec6ed6e622063d7ca5e5 | src/nls/zh-tw/urls.js | src/nls/zh-tw/urls.js | /*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the ri... | /*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the ri... | Update CC BY 3.0 link to zh-TW localized version. | Update CC BY 3.0 link to zh-TW localized version.
| JavaScript | mit | zhukaixy/brackets,Live4Code/brackets,2youyouo2/cocoslite,adrianhartanto0/brackets,srinivashappy/brackets,albertinad/brackets,emanziano/brackets,fcjailybo/brackets,MahadevanSrinivasan/brackets,michaeljayt/brackets,tan9/brackets,chrismoulton/brackets,fronzec/brackets,MantisWare/brackets,IAmAnubhavSaini/brackets,malinkie/... |
8923137c551fd8ab14798e0fe35ff2018f6b966f | app/constants/Images.js | app/constants/Images.js | /*
* Copyright 2017-present, Hippothesis, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
'use strict';
export const Images = {
logo: null
};
export default Images;
| /*
* Copyright 2017-present, Hippothesis, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
'use strict';
export const Images = {
icons: {
home: require('../images/home-icon.png'),
... | Add file paths to icons | Add file paths to icons
| JavaScript | bsd-3-clause | hippothesis/Recipezy,hippothesis/Recipezy,hippothesis/Recipezy |
7c52422a46c92c85d6ddb482cce389d5fa80e5ba | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var tsc = require('gulp-tsc');
var tape = require('gulp-tape');
var tapSpec = require('tap-spec');
var del = require('del');
gulp.task("test:clean", function(done) {
del(['build-test/**']).then(function(paths) {
console.log("=====\nDeleted the following files:\n" + paths.join('\n')+ "... | var gulp = require('gulp');
var tsc = require('gulp-tsc');
var tape = require('gulp-tape');
var tapSpec = require('tap-spec');
var del = require('del');
gulp.task("test:clean", function(done) {
del(['build-test/**']).then(function(paths) {
console.log("=====\nDeleted the following files:\n" + paths.join('\n')+ "... | Call completion callback in test:run | Call completion callback in test:run
| JavaScript | mit | Jameskmonger/isaac-crypto |
4993dac019eb6eb43b74d5999efebeb5e5c99bdb | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var watch = require('gulp-watch');
var harp = require('harp');
var browserSync = require('browser-sync');
var ghPages = require('gulp-gh-pages');
var harpServerOptions = {
port: 9000
};
var paths = {
projectDir: './',
outputDir: './dist',
outputFiles: './dist/**/*.*'... | 'use strict';
var gulp = require('gulp');
var watch = require('gulp-watch');
var harp = require('harp');
var browserSync = require('browser-sync');
var ghPages = require('gulp-gh-pages');
var harpServerOptions = {
port: 9000
};
var paths = {
projectDir: './',
outputDir: './dist',
outputFiles: './dist/**/*',
... | Modify files globs to include all files | Modify files globs to include all files
The wildcard pattern was not picking up CNAME. Now it does.
| JavaScript | mit | josh-egan/tech.joshegan.com,josh-egan/tech.joshegan.com,josh-egan/tech.joshegan.com |
7baa60230492c34ca9b1bb881731e0f6b5827d25 | gulpfile.js | gulpfile.js | const gulp = require('gulp');
const browserify = require('gulp-browserify');
const pkg = require('./package.json')
gulp.task('build', () =>
gulp.src(pkg.main)
.pipe(browserify({
insertGlobals : true,
debug : !gulp.env.production
}))
.pipe(gulp.dest('dist'))
);
gulp.task('default', ['build'])... | const gulp = require('gulp');
const browserify = require('gulp-browserify');
const rename = require("gulp-rename");
const pkg = require('./package.json');
gulp.task('build', () =>
gulp.src(pkg.main)
.pipe(browserify({
insertGlobals: true,
debug: !gulp.env.production
}))
.pipe(rename(function(path) {
... | Add renaming of index.js to memefy.js | Add renaming of index.js to memefy.js
| JavaScript | mit | Kaioru/memefy.js |
132822c44fc6916a01a547a2cfb70e1305b737ea | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
rimraf = require('rimraf'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
insert = require('gulp-insert'),
p = require('./package.json')
;
//Folders and annotation
var src = 'src/',
dest = 'dist/',
anno... | var gulp = require('gulp'),
rimraf = require('rimraf'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
insert = require('gulp-insert'),
p = require('./package.json')
;
//Folders and annotation
var src = 'src/',
dest = 'dist/',
anno... | Update gulp to change name of generated file | Update gulp to change name of generated file
| JavaScript | mit | Sevrahk/seSlider,Sevrahk/seSlider |
3ee6f9293edd48a1ca8302f799f8a339549952a1 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var del = require('del');
var babel = require('gulp-babel');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var mocha = require('gulp-mocha');
var mochaBabelRegister = require('babel/register');
var ... | 'use strict';
var gulp = require('gulp');
var del = require('del');
var babel = require('gulp-babel');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var mocha = require('gulp-mocha');
var mochaBabelRegister = require('babel/register');
var ... | Add gulp task to run tests on file change. | Add gulp task to run tests on file change.
| JavaScript | mit | jnhuynh/min-flux |
59ca17998801770666c812e00942c0887ded1156 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var iife = require('gulp-iife');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
gulp.task('default', ['scripts']);
gulp.task('scripts', function () {
gulp.src('src/**/*.js')
.pipe(concat('vk-api-angular.js'))
.pi... | var gulp = require('gulp');
var iife = require('gulp-iife');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
gulp.task('default', ['scripts']);
gulp.task('scripts', function () {
return gulp.src('src/**/*.js')
.pipe(concat('vk-api-angular.js'))
... | Add return statement to gulp task | Add return statement to gulp task
| JavaScript | mit | kefir500/vk-api-angular |
0c5e8cd6c96275a1db428bc572bea0418e7b3c31 | gulpfile.js | gulpfile.js | var del = require('del');
var gulp = require('gulp');
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var $ = require('gulp-load-plugins')();
var config = require('./webpack.config.js');
gulp.task('js', function (cb) {
webpack(config, function (err, stats) {
if(err) thr... | var del = require('del');
var gulp = require('gulp');
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var $ = require('gulp-load-plugins')();
var config = require('./webpack.config.js');
gulp.task('js', function (cb) {
webpack(config, function (err, stats) {
if(err) thr... | Fix an error in the clean task | Fix an error in the clean task
| JavaScript | mit | darthmall/once-in-a-blue-moon,darthmall/once-in-a-blue-moon,darthmall/once-in-a-blue-moon |
5f9884433df23b78ca063001cfb594081ca5bc35 | app/libs/utils/index.js | app/libs/utils/index.js | 'use strict';
module.exports = {
camelCase: require('./camel-case'),
colorString: require('./color-string'),
nestOptions: require('./nest-options'),
uid: require('./uid'),
request: require('./request'),
metadata: require('./metadata'),
framerate: require('./framerate'),
normalizeLanguage: require('./no... | 'use strict';
module.exports = {
camelCase: require('./camel-case'),
colorString: require('./color-string'),
nestOptions: require('./nest-options'),
uid: require('./uid'),
request: require('./request'),
metadata: require('./metadata'),
framerate: require('./framerate'),
normalizeLanguage: require('./no... | Add command exists to utils | Add command exists to utils
| JavaScript | apache-2.0 | transmutejs/core |
1cde6271d8b7a3c38dfb6e75f0229b670921238a | src/targets/native/ios-simulator.js | src/targets/native/ios-simulator.js | const createWebsocketTarget = require('./create-websocket-target');
const osnap = require('osnap/src/ios');
const saveScreenshotToFile = filename => osnap.saveToFile({ filename });
const createIOSSimulatorTarget = socketUri =>
createWebsocketTarget(socketUri, 'ios', saveScreenshotToFile);
module.exports = createIO... | const fs = require('fs-extra');
const osnap = require('osnap/src/ios');
const { withRetries } = require('../../failure-handling');
const createWebsocketTarget = require('./create-websocket-target');
const saveScreenshotToFile = withRetries(3)(async filename => {
await osnap.saveToFile({ filename });
const { size }... | Add retry mechanism for iOS screenshots | Add retry mechanism for iOS screenshots
| JavaScript | mit | oblador/loki,oblador/loki,oblador/loki |
c29eb1e9d74438621585ac56c239a92ba2eb503b | vendor/assets/javascripts/koi/form-for.js | vendor/assets/javascripts/koi/form-for.js | (function($) {
$(function(){
// https://stackoverflow.com/questions/20658402/internet-explorer-issue-with-html5-form-attribute-for-button-element
// detect if browser supports this
var sampleElement = $('[form]').get(0);
var isIE11 = !(window.ActiveXObject) && "ActiveXObject" in window;
if (sampl... | (function($) {
$(function(){
// https://stackoverflow.com/questions/20658402/internet-explorer-issue-with-html5-form-attribute-for-button-element
// detect if browser supports this
$("body").on("click", "button[form]", function(e){
var $element = $(this);
var sampleElement = this;
if (sa... | Fix for Nav items duplicating | Fix for Nav items duplicating
| JavaScript | mit | katalyst/koi,katalyst/koi,katalyst/koi |
8fa4ec3b7d2ba0145b16e6e2a1c8f9e7366e96de | webapp/client/app/transforms/timestamp.js | webapp/client/app/transforms/timestamp.js | import DS from 'ember-data';
import Firebase from 'firebase';
export default DS.DateTransform.extend({
serialize: function(date) {
if (date === Firebase.ServerValue.TIMESTAMP){
return date;
}
return this._super(date);
}
});
| import DS from 'ember-data';
import Firebase from 'firebase';
export default DS.DateTransform.extend({
serialize: function(date) {
if (date === Firebase.ServerValue.TIMESTAMP){
return date;
}
// to timestamp
return new Date(date).getTime();
}
});
| Fix date issue on edit | Fix date issue on edit
| JavaScript | agpl-3.0 | asm-products/autora,asm-products/autora,MartinMalinda/autora,MartinMalinda/autora,asm-products/autora,MartinMalinda/autora |
ad736959264f0cdc2bae5fa0391569f432fb3c65 | 029-distinct-powers/javascript-solution.js | 029-distinct-powers/javascript-solution.js | exponentiateStrings = function(string1, string2) {
// must have a powers function for strings because 100 ** 100 is too high for JS...
}
// var powers = [];
// for (var a = 2; a <= 100; a++) {
// for (var b = 2; b <= 100; b++) {
// powers.push(exponentiateStrings(a.toString(), b.toString()));
// }
// }
// ... | require("../custom-methods")
// exponentiateStrings = function(string1, string2) {
// // must have a powers function for strings because 100 ** 100 is too high for JS...
// }
// var powers = [];
// for (var a = 2; a <= 100; a++) {
// for (var b = 2; b <= 100; b++) {
// powers.push(exponentiateStrings(a.toSt... | Add and require custom-methods file | Add and require custom-methods file
| JavaScript | mit | JacobCrofts/project-euler,JacobCrofts/project-euler,JacobCrofts/project-euler |
2f58bac8452ec8981b5e8cc0ed45434768bf63ef | models/campground.js | models/campground.js | var mongoose = require('mongoose');
// SCHEMA SETUP:
var campgroundSchema = new mongoose.Schema({
name: String,
image: String,
description: String,
comments: [
{
type: mongoose.Schema.Types.ObjectId,
ref: 'Comment'
}
]
});
module.exports = mongoose.model('Campground', campgro... | var mongoose = require('mongoose');
// SCHEMA SETUP:
var campgroundSchema = new mongoose.Schema({
name: String,
image: String,
description: String,
author: {
id: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User'
},
username: String
},
comments: [
{
type: ... | Add relations between Campgrounds and User models. | Add relations between Campgrounds and User models.
| JavaScript | mit | JuanHenriquez/yelp-camp,JuanHenriquez/yelp-camp |
ef675c190419fcb18c426484ba707dfddf9b866c | lib/hooks.js | lib/hooks.js | 'use strict'
var http = require('http')
var shimmer = require('shimmer')
var asyncState = require('./async-state')
module.exports = function (client) {
shimmer({ logger: client.logger.error })
shimmer.massWrap(http.Server.prototype, ['on', 'addListener'], function (fn) {
return function (event, listener) {
... | 'use strict'
var http = require('http')
var shimmer = require('shimmer')
var asyncState = require('./async-state')
module.exports = function (client) {
// TODO: This will actual just use the logger of the last client parsed in.
// In most use-cases this is a non-issue, but if someone tries to initiate
// multip... | Add TODO related to the auto-request hook feature | Add TODO related to the auto-request hook feature
| JavaScript | bsd-2-clause | opbeat/opbeat-node,opbeat/opbeat-node |
739fa1573e59dee5c862ecf1f5e0dd71342ddfcc | lib/index.js | lib/index.js |
var math = require('mathjs');
var ERROR_RESPONSE = 'I can\'t calculate that!';
module.exports = function(argv, response) {
var respBody = ERROR_RESPONSE;
try {
var expression = argv.slice(1).join('');
var result = math.eval(expression);
if (typeof result === 'function') {
console.error('Someh... |
var math = require('mathjs');
var ERROR_RESPONSE = 'I can\'t calculate that!';
module.exports = function(argv, response, logger) {
var respBody = ERROR_RESPONSE;
try {
var expression = argv.slice(1).join('');
var result = math.eval(expression);
if (typeof result === 'function') {
logger.error... | Use the botstrap logger instead of console for logging | Use the botstrap logger instead of console for logging
| JavaScript | mit | elvinyung/scalk |
c4812b1d7f7164a5c23c1c723d564cfdac584680 | lib/praat.js | lib/praat.js | var info = require('./info');
var path = require('path');
var myPackageJson = require('../package.json');
var version = myPackageJson.praatVersion;
module.exports = [__dirname, '..', 'node_modules', '.bin', info.praatRealExecName(info.getOsInfo(), version)].join(path.sep);
| var info = require('./info');
var path = require('path');
var myPackageJson = require('../package.json');
var version = myPackageJson.praatVersion;
module.exports = path.resolve(__dirname, '..', 'node_modules', '.bin', info.praatRealExecName(info.getOsInfo(), version));
| Use path.resolve instead of string join | Use path.resolve instead of string join
| JavaScript | mit | motiz88/node-praat |
a47d6f43d397f6ac52fabb3881056af9e8c0a86a | lib/utils.js | lib/utils.js | var STATUS_CODES = require('http');
exports.error = function (statusCode, message) {
var err;
if (message instanceof Error) {
err = message;
} else {
err = new Error(message || STATUS_CODES[statusCode]);
}
err.status = statusCode;
return err;
};
exports.extend = function exte... | var STATUS_CODES = require('http').STATUS_CODES;
exports.error = function (statusCode, message) {
var err;
if (message instanceof Error) {
err = message;
} else {
err = new Error(message || STATUS_CODES[statusCode]);
}
err.status = statusCode;
return err;
};
exports.extend = ... | Fix HTTP status code error messages | Fix HTTP status code error messages
| JavaScript | mit | ericf/open-marriage,HandyCodeJob/open-marriage,djscholl/open-marriage,djscholl/open-marriage,FerriNRachel/getting-married,FerriNRachel/getting-married |
26bc33be05e3c4ec5403f8074bace5aa447dacf4 | demo/js/demo.js | demo/js/demo.js | 'use strict';
var require = typeof require === 'undefined' ? function() {} : require;
var React = window.React || require('react');
var ReactDom = window.ReactDOM || require('react-dom') || React;
var ElementPan = React.createFactory(window.reactElementPan || require('react-element-pan'));
// Simple image demo
React... | 'use strict';
var require = typeof require === 'undefined' ? function() {} : require;
var React = window.React || require('react');
var ReactDom = window.ReactDOM || require('react-dom') || React;
var ElementPan = React.createFactory(window.reactElementPan || require('react-element-pan'));
if (React.initializeTouchE... | Enable touch events on old React versions | Enable touch events on old React versions
| JavaScript | mit | rexxars/react-element-pan |
7a45d261a7720133c7004487f273915c48cfef7b | app/assets/javascripts/discourse/components/private_message_map_component.js | app/assets/javascripts/discourse/components/private_message_map_component.js | /**
The controls at the top of a private message in the map area.
@class PrivateMessageMapComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
Discourse.PrivateMessageMapComponent = Ember.View.extend({
templateName: 'components/private-message-map',
tagName: 'section',
classNam... | /**
The controls at the top of a private message in the map area.
@class PrivateMessageMapComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
Discourse.PrivateMessageMapComponent = Ember.View.extend({
templateName: 'components/private-message-map',
tagName: 'section',
classNam... | Fix inviting others to private messages. | Fix inviting others to private messages.
| JavaScript | mit | natefinch/discourse,natefinch/discourse |
2d9feaa714088dafc473434b8a57e559b3416a5d | kolibri/plugins/learn/assets/src/modules/pluginModule.js | kolibri/plugins/learn/assets/src/modules/pluginModule.js | import mutations from './coreLearn/mutations';
import * as getters from './coreLearn/getters';
import * as actions from './coreLearn/actions';
import classAssignments from './classAssignments';
import classes from './classes';
import examReportViewer from './examReportViewer';
import examViewer from './examViewer';
imp... | import { PageNames, ClassesPageNames } from './../constants';
import mutations from './coreLearn/mutations';
import * as getters from './coreLearn/getters';
import * as actions from './coreLearn/actions';
import classAssignments from './classAssignments';
import classes from './classes';
import examReportViewer from '.... | Update learn getters to create page link references | Update learn getters to create page link references
| JavaScript | mit | learningequality/kolibri,learningequality/kolibri,learningequality/kolibri,learningequality/kolibri |
b223c3f57215b8e42ee1792d507c146afad1129d | test/subscribers.js | test/subscribers.js | /* global describe, it */
'use strict'
var expect = require('expect.js')
var MailerLite = require('..')
var ML = new MailerLite()
const LIST_NAME = 'Mocha Test'
const TEST_SUBSCRIBERS = [
{
email: 'foo@bar.com',
name: 'Foo Bar'
},
{
email: 'john@doe.net',
name: 'John Doe'
}
]
describe('Sub... | Test to add a subscriber to new list and remove it. | Test to add a subscriber to new list and remove it.
| JavaScript | mit | fmoliveira/mailerlite-sdk-nodejs,fmoliveira/mailerlite-sdk-nodejs | |
8de92e7e3acee87e6bf9b2932a56783d0d3ebacf | test/test-github.js | test/test-github.js | "use strict";
const {expect} = require("chai");
before(() => {
browser.url("/login");
browser.setCookie({
name: "user_session",
value: process.env.USER_SESSION,
});
});
describe("Pull Requests (listings)", () => {
it("should redact the author", () => {
browser.url("/pulls/mentioned");
const... | "use strict";
const {expect} = require("chai");
before(() => {
browser.url("/login");
browser.setCookie({
name: "user_session",
value: process.env.USER_SESSION,
});
});
describe("Pull Requests (listings)", () => {
it("should redact the author", () => {
browser.url("/pulls/mentioned");
const... | Add test for PR page, check if author is redacted | Add test for PR page, check if author is redacted
| JavaScript | mit | zombie/blind-reviews,zombie/blind-reviews |
20476caed9ff374a9b201b057d2dcff3522c6ca4 | test/typeOf-test.js | test/typeOf-test.js | "use strict";
var buster = require("buster");
var sinon = require("../lib/sinon");
var assert = buster.assert;
buster.testCase("sinon.typeOf", {
"returns boolean": function () {
assert.equals(sinon.typeOf(false), "boolean");
},
"returns string": function () {
assert.equals(sinon.typeOf("S... | /*eslint-env mocha*/
/*eslint max-nested-callbacks: 0*/
"use strict";
var referee = require("referee");
var sinon = require("../lib/sinon");
var assert = referee.assert;
describe("sinon.typeOf", function () {
it("returns boolean", function () {
assert.equals(sinon.typeOf(false), "boolean");
});
i... | Convert typeof tests to mocha | Convert typeof tests to mocha
| JavaScript | bsd-3-clause | fatso83/Sinon.JS,Khan/Sinon.JS,Khan/Sinon.JS,fatso83/Sinon.JS,jishi/sinon,mroderick/Sinon.JS,mroderick/Sinon.JS,jishi/sinon,Khan/Sinon.JS,cjohansen/Sinon.JS,fatso83/Sinon.JS,cjohansen/Sinon.JS,jishi/sinon,andpor/sinon,andpor/sinon,mroderick/Sinon.JS,andpor/sinon,cjohansen/Sinon.JS |
fb6bb2e453ea1b49593df36addb5c7f90f683452 | client/src/actions/index.js | client/src/actions/index.js | import * as types from './ActionTypes'
import axios from 'axios'
export function addPattern(name, pattern) {
return {
type: types.ADD_PATTERN,
name: name,
pattern: pattern
}
}
export function selectPattern(pattern) {
return {
type: types.SELECT_PATTERN,
name: pattern
}
}
export function d... | import * as types from './ActionTypes'
import axios from 'axios'
export function addPattern(name, pattern) {
return {
type: types.ADD_PATTERN,
name: name,
pattern: pattern
}
}
export function selectPattern(pattern) {
return {
type: types.SELECT_PATTERN,
name: pattern
}
}
export function d... | Fix URL to use HTTPS. | Fix URL to use HTTPS.
| JavaScript | mit | Subzidion/riveter,Subzidion/riveter,Subzidion/riveter |
025610aea87b2cec86855b29c7042a6b37c35de5 | lib/initializer.js | lib/initializer.js | "use strict";
var
Promise = require('./promise');
module.exports = function (API) {
var
self = Object.create(null),
promise = Promise.resolve(API);
self.init = function (initializer) {
promise = promise.then(function () {
return initializer(API);
});
return self;
};
return self;
};
| "use strict";
var
Promise = require('./promise');
module.exports = function (API) {
var
self = Object.create(null),
initializers = [],
promise = Promise.resolve(API);
self.init = function (initializer) {
initializers.push(initializer);
promise = promise.then(function () {
initia... | Add stop() method to Initializer. | Add stop() method to Initializer.
modified: lib/initializer.js
| JavaScript | mit | kixxauth/enginemill |
b5a4f896615b9a15f0cb975982447a96e0959368 | migrations/util.js | migrations/util.js | var stream = require('stream')
var mongoose = require('mongoose')
exports.mongoose = mongoose
exports.connectMongoose = function() {
mongoose.connect(process.env.MONGO_URL || 'mongodb://localhost/meku')
return this
}
exports.progressMonitor = function(num) {
var ii = 0
var tick = num || 250
return function... | var stream = require('stream')
var mongoose = require('mongoose')
exports.mongoose = mongoose
exports.connectMongoose = function() {
mongoose.connect(process.env.MONGOHQ_URL || 'mongodb://localhost/meku')
return this
}
exports.progressMonitor = function(num) {
var ii = 0
var tick = num || 250
return functi... | Fix migrations mongo url variable | Fix migrations mongo url variable
| JavaScript | mit | kavi-fi/meku,kavi-fi/meku,kavi-fi/meku |
31fb423a90cdb5445bf1d3fada17195a85773e1e | gruntfile.js | gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
pkgFile: 'package.json',
clean: ['build'],
babel: {
options: {
sourceMap: false
},
dist: {
files: [{
expand: true,
cwd: './lib',
... | module.exports = function(grunt) {
grunt.initConfig({
pkgFile: 'package.json',
clean: ['build'],
babel: {
options: {
sourceMap: false
},
dist: {
src: 'index.js',
dest: 'build/index.js'
}
}... | Revert "Add a babel task to watch which works" | Revert "Add a babel task to watch which works"
This reverts commit 9b22494b461448d9e75e153610c1629d8e455074.
| JavaScript | mit | webdriverio/wdio-sync |
5503337e5452e62eb7bb8b77b4cf4dccb6703015 | components/icon/Icon.js | components/icon/Icon.js | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import cx from 'classnames';
import theme from './theme.css';
class Icon extends PureComponent {
static propTypes = {
children: PropTypes.any,
className: PropTypes.string,
color: PropTypes.oneOf(['... | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import cx from 'classnames';
import theme from './theme.css';
class Icon extends PureComponent {
static propTypes = {
children: PropTypes.any,
className: PropTypes.string,
color: PropTypes.oneOf(['... | Add extra check to ensure child is an actual React component | Add extra check to ensure child is an actual React component
| JavaScript | mit | teamleadercrm/teamleader-ui |
af8887e9c755638f306cc17617c62e0032d31912 | Apps/CesiumViewer/CesiumViewer.profile.js | Apps/CesiumViewer/CesiumViewer.profile.js | var profile = {
basePath : '../..',
baseUrl : '.',
releaseDir : './Build/Apps/CesiumViewer',
action : 'release',
cssOptimize : 'comments',
mini : true,
optimize : 'closure',
layerOptimize : 'closure',
stripConsole : 'all',
selectorEngine : 'acme',
layers : {
'dojo/doj... | var profile = {
basePath : '../..',
baseUrl : '.',
releaseDir : './Build/Apps/CesiumViewer',
action : 'release',
cssOptimize : 'comments',
mini : true,
optimize : 'closure',
layerOptimize : 'closure',
stripConsole : 'all',
selectorEngine : 'acme',
layers : {
'dojo/doj... | Tweak CesiumViewer build to avoid some warnings. | Tweak CesiumViewer build to avoid some warnings.
| JavaScript | apache-2.0 | progsung/cesium,aelatgt/cesium,CesiumGS/cesium,NaderCHASER/cesium,esraerik/cesium,ggetz/cesium,jason-crow/cesium,CesiumGS/cesium,kiselev-dv/cesium,wallw-bits/cesium,soceur/cesium,oterral/cesium,kiselev-dv/cesium,kaktus40/cesium,omh1280/cesium,CesiumGS/cesium,denverpierce/cesium,geoscan/cesium,YonatanKra/cesium,emackey/... |
fd4522d63e7d9dc18abc03f16fc5cf00a59409d9 | lib/generators/half_pipe/templates/tasks/options/watch.js | lib/generators/half_pipe/templates/tasks/options/watch.js | module.exports = {
debug: {
files: ['app/scripts/**/*', 'app/styles/**/*'],
tasks: ['build:debug']
},
rails: {
files: ['config/**/*.rb', 'lib/**/*.rb', 'Gemfile.lock'],
tasks: ['rails:server:restart'],
options: {
interrupt: true
}
}
};
| module.exports = {
debug: {
files: ['app/scripts/**/*', 'app/styles/**/*', 'config/build.js'],
tasks: ['build:debug']
},
rails: {
files: ['config/**/*.rb', 'lib/**/*.rb', 'Gemfile.lock'],
tasks: ['rails:server:restart'],
options: {
interrupt: true
}
}
};
| Watch for build configuration changes | Watch for build configuration changes
| JavaScript | mit | half-pipe/half-pipe,half-pipe/half-pipe |
96e5f4266391ae5487414e0e8814a95af0100c34 | lib/evaluator.js | lib/evaluator.js | 'use strict';
var evalInScope = require('./helpers/eval-in-scope');
/*eslint-disable*/
function evalBEST(source, builder) {
evalInScope(source, { component: builder });
}
function evalSources(sources, proc, cb) {
var sourcesLength = sources.length;
var sourcesLoaded = 0;
if (sourcesLength === source... | 'use strict';
var evalInScope = require('./helpers/eval-in-scope');
var HelperFunctions = require('./helper-functions');
var ObjUtils = require('framework-utilities/object');
/*eslint-disable*/
function evalBEST(source, builder) {
var bestNamespace = ObjUtils.merge(HelperFunctions, { component: builder });
e... | Attach helpers to instead of | Attach helpers to instead of
| JavaScript | mit | jeremykenedy/framework,colllin/famous-framework,infamous/famous-framework,infamous/framework,jeremykenedy/framework,colllin/famous-framework,Famous/framework,KraigWalker/framework,SvitlanaShepitsena/remax-banner,SvitlanaShepitsena/framework-1,infamous/framework,woltemade/framework,infamous/famous-framework,tbossert/fra... |
3cdfcdaaedd63d2c7c388a3de6b29fa9c95322c4 | addon/components/sl-tooltip.js | addon/components/sl-tooltip.js | import Ember from 'ember';
import TooltipEnabled from '../mixins/sl-tooltip-enabled';
/**
* @module components
* @class sl-tooltip
*/
export default Ember.Component.extend( TooltipEnabled, {
// -------------------------------------------------------------------------
// Dependencies
// --------------... | import Ember from 'ember';
import TooltipEnabled from '../mixins/sl-tooltip-enabled';
/**
* @module components
* @class sl-tooltip
*/
export default Ember.Component.extend( TooltipEnabled, {
// -------------------------------------------------------------------------
// Dependencies
// --------------... | Refactor to follow style guidelines | Refactor to follow style guidelines
| JavaScript | mit | erangeles/sl-ember-components,theoshu/sl-ember-components,alxyuu/sl-ember-components,softlayer/sl-ember-components,alxyuu/sl-ember-components,Suven/sl-ember-components,theoshu/sl-ember-components,erangeles/sl-ember-components,Suven/sl-ember-components,azizpunjani/sl-ember-components,softlayer/sl-ember-components,azizpu... |
84aa293b304a55458c556d4406e24cba458ace0a | injected.js | injected.js | // Entire frame is insecure?
if ((document.location.protocol == "http:") ||
(document.location.protocol == "ftp:"))
{
document.body.style.backgroundColor="#E04343";
}
var lnks = document.getElementsByTagName("a");
var arrUnsecure = [];
for(var i = 0; i < lnks.length; i++) {
var thisLink = ... | // Entire frame is insecure?
if ((document.location.protocol == "http:") ||
(document.location.protocol == "ftp:"))
{
document.body.style.backgroundColor="#E04343";
}
var lnks = document.querySelectorAll("a[href]");
var arrUnsecure = [];
for (var i = 0; i < lnks.length; i++) {
var thisLink = lnks[i];
var ... | Use QuerySelectorAll to find links | Use QuerySelectorAll to find links
Faster, and avoid <A> that lack hrefs. | JavaScript | mit | ericlaw1979/moartls,Lloth/moartls,ericlaw1979/moartls,Lloth/moartls |
8bc4f4d164c6eb5caa96698ddcbfce30743c3a30 | website/gulpfile.js | website/gulpfile.js | var gulp = require("gulp");
var usemin = require("gulp-usemin");
var ngmin = require("gulp-ngmin");
var uglify = require("gulp-uglify");
var minifyHtml = require("gulp-minify-html");
var minifyCss = require("gulp-minify-css");
var rev = require("gulp-rev");
gulp.task('partials', function() {
var stream = gulp.src(... | var gulp = require("gulp");
var usemin = require("gulp-usemin");
var ngmin = require("gulp-ngmin");
var uglify = require("gulp-uglify");
var minifyHtml = require("gulp-minify-html");
var minifyCss = require("gulp-minify-css");
var rev = require("gulp-rev");
var clean = require("gulp-clean");
var gulpSequence = require(... | Update gulp file to build a clean version of prod. Sequence the tasks and update them to include needed assets. | Update gulp file to build a clean version of prod. Sequence the tasks
and update them to include needed assets.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
4a6e5be03eec92df7a19e56fb3f97035fa516734 | spec/lib/services/lookup-spec.js | spec/lib/services/lookup-spec.js | // Copyright 2014, Renasar Technologies Inc.
/* jshint node:true */
'use strict';
describe(__filename, function () {
it('needs specs');
}); | // Copyright 2014, Renasar Technologies Inc.
/* jshint node:true */
'use strict';
describe("Lookup Service", function() {
var injector;
var lookupService;
var dhcpProtocol;
var dhcpSubcription;
beforeEach(function() {
injector = helper.baseInjector.createChild(_.flatten([
help... | Add lookup service tests for ip to mac | Add lookup service tests for ip to mac
| JavaScript | apache-2.0 | YoussB/on-core,YoussB/on-core |
392d4e2c4a4abbcf4aa05ad2554b163a821f7d9a | js/agent.js | js/agent.js | (function() {
// wait for polyfill to be loaded
if (document.readyState == "complete") {
init();
} else {
window.onload = init;
}
var loggedIn = false;
function init() {
if (!navigator.id)
return;
sendToContent({ type: "init" });
window.addEventListener('browserid-exec', onMessa... | (function() {
// wait for polyfill to be loaded
if (document.readyState == "complete") {
init();
} else {
window.addEventListener('load', init);
}
var loggedIn = false;
function init() {
if (!navigator.id)
return;
sendToContent({ type: "init" });
window.addEventListener('browser... | Use addEventListener instead of onload | Use addEventListener instead of onload
| JavaScript | mit | sickill/chrome-browserid |
d09838f37b7fbf7fc31fb662353a98233157ffd7 | js/index.js | js/index.js | (function( $ ) {
function setHeaderHeight() {
$( '#screen-fill' ).css( 'height', $( window ).height() - 50 );
}
$( document ).ready( setHeaderHeight );
$( window ).resize( setHeaderHeight );
$( window ).scroll( function() {
var currentY = window.scrollY;
$( '.fading' ).each( function(i, el) {
var elemY =... | (function( $ ) {
function setHeaderHeight() {
$( '#screen-fill' ).css( 'height', $( window ).height() - 50 );
}
$( document ).ready( setHeaderHeight );
$( window ).resize( setHeaderHeight );
$( window ).scroll( function() {
var currentY = window.scrollY;
$( '.fading' ).each( function(i, el) {
var elemY ... | Reduce precision for fade out | Reduce precision for fade out
| JavaScript | mit | Automattic/socket.io-website,davidcelis/socket.io-website,davidcelis/socket.io-website,Automattic/socket.io-website,Automattic/socket.io-website |
1455be74c9839c3da35a54793babbe84140e2250 | src/game/TutorialState.js | src/game/TutorialState.js | import Phaser from 'phaser-ce';
import { tissueColor, bacteriaColor } from './constants';
export default class TutorialState extends Phaser.State {
bacteria = null;
preload() {
this.game.load.image('bacteria', 'assets/sprites/bacteria.png');
}
create() {
console.log(this);
t... | import Phaser from 'phaser-ce';
import { tissueColor, bacteriaColor } from './constants';
export default class TutorialState extends Phaser.State {
bacteria = null;
tissue = {
bacteria: null,
macrophage: null,
neutrophil: null
};
boneMarrow = {
macrophage: null,
... | Add tissue and boneMarrow objects to tutorial state | Add tissue and boneMarrow objects to tutorial state
| JavaScript | mit | marc1404/WreckSam,marc1404/WreckSam |
6fcdedcfce8460b174bb7b3c44282998cb867c7c | lib/consolify.js | lib/consolify.js | 'use strict';
var fs = require('fs');
var through = require('through2');
var consolify = require('consolify');
module.exports = function (b, opts) {
consolify(b, {
bundle: opts.bundle
});
function apply() {
var file = '';
b.pipeline.get('wrap').push(through(function (chunk, enc, next) {
... | /*
* mochify.js
*
* Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de>
*
* @license MIT
*/
'use strict';
var fs = require('fs');
var through = require('through2');
var consolify = require('consolify');
module.exports = function (b, opts) {
consolify(b, {
bundle: opts.bundle
});
functi... | Add missing copyright and license header | Add missing copyright and license header
| JavaScript | mit | mantoni/mochify.js,boneskull/mochify.js,jhytonen/mochify.js,jhytonen/mochify.js,Swaagie/mochify.js,mantoni/mochify.js,boneskull/mochify.js,mantoni/mochify.js,Swaagie/mochify.js |
113c43942cca2535079e6041d4b625676b8b2a66 | lib/markybars.js | lib/markybars.js | module.exports.compile = compile
var hb = require('handlebars')
var marky = require('marky-markdown')
var fs = require('fs')
function compile (page, partials) {
var markybars = hb.create()
var pageContent = fs.readFileSync(page, 'utf8')
Object.keys(partials).forEach(function (p) {
var partialContent = fs.r... | module.exports.compile = compile
var hb = require('handlebars')
var marky = require('marky-markdown')
var fs = require('fs')
function compile (page, partials) {
var markybars = hb.create()
var pageContent = fs.readFileSync(page, 'utf8')
Object.keys(partials).forEach(function (p) {
var partialContent = fs.r... | Fix for new version of marky-markdown | Fix for new version of marky-markdown
| JavaScript | isc | feross/standard-www,feross/standard-www |
7bdd7b1475ce5bf53711f688fe027f555a60f129 | Utilities/ExampleRunner/template-config.js | Utilities/ExampleRunner/template-config.js | module.exports = function buildConfig(name, relPath, destPath, root) {
return `
var loaders = require('../config/webpack.loaders.js');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
plugins: [
new HtmlWebpackPlugin({
inject: 'body',
}),
],
entry: '${relPath}',
output... | module.exports = function buildConfig(name, relPath, destPath, root) {
return `
var loaders = require('../config/webpack.loaders.js');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
module.exports = {
plugins: [
new HtmlWebpackPlugin({
inject: 'body',
}),
... | Fix example runner to support __BASE_PATH__ and serve the full vtk-js repo | fix(ExampleBuilder): Fix example runner to support __BASE_PATH__ and serve the full vtk-js repo
| JavaScript | bsd-3-clause | Kitware/vtk-js,Kitware/vtk-js,Kitware/vtk-js,Kitware/vtk-js |
33bcb755e5b68e97f65cd63664a82219c2297015 | diaeresis.js | diaeresis.js | /* Diaeresis.js | Copyright (C) 2016 Curiositry (http://curiositry.com) | MIT Licensed */
| /* Diaeresis.js | Copyright (C) 2016 Curiositry (http://curiositry.com) | MIT Licensed */
(function(){
})();
| Add self-executing anonymous function to put it all in. | :construction: Add self-executing anonymous function to put it all in.
| JavaScript | mit | curiositry/diaeresis,curiositry/diaeresis |
7bebf6268b47c2520daa41327ddd268f133404d0 | examples/all.js | examples/all.js | import React from 'react';
import ReactDOM from 'react-dom';
import DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib';
import allContentState from './utils/allContentState';
const mount = document.querySelector('[data-mount-all]');
const onSave = contentState => {
sessionStorage.setItem('all:contentSta... | import React from 'react';
import ReactDOM from 'react-dom';
import DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib';
import allContentState from './utils/allContentState';
const mount = document.querySelector('[data-mount-all]');
const onSave = contentState => {
sessionStorage.setItem('all:contentSta... | Stop showing atomic block in "All" example | Stop showing atomic block in "All" example
| JavaScript | mit | springload/draftail,springload/draftail,springload/draftail,springload/draftail |
44a2826d08a44f0494e86469cd6632e7f9ff071f | app/controllers/sell/successTransaction.js | app/controllers/sell/successTransaction.js | //////////////////////////////////////
// User buys one ticket for himself //
//////////////////////////////////////
'use strict';
var Promise = require('bluebird');
module.exports = function (db, config) {
var logger = require('../../lib/log')(config);
var rest = require('../../lib/rest'... | //////////////////////////////////////
// User buys one ticket for himself //
//////////////////////////////////////
'use strict';
var Promise = require('bluebird');
module.exports = function (db, config) {
var logger = require('../../lib/log')(config);
var rest = require('../../lib/rest'... | Use token and not data | Use token and not data
| JavaScript | mit | buckutt/BuckUTT-pay,buckutt/BuckUTT-pay,buckutt/BuckUTT-pay |
bcc70e0d4ed383c3731a65db4fbd5ae67d95c845 | Resources/Private/Javascripts/Main.js | Resources/Private/Javascripts/Main.js | /**
* RequireJS configuration
* @description Pass in options for RequireJS like paths, shims or the baseUrl
*/
require.config({
paths: {
"mainModule" : "Modules/Main"
},
// Append a date on each requested script to prevent caching issues.
urlArgs: "bust=" + Date.now()
});
/**
* RequireJS calls
* @descript... | /**
* RequireJS configuration
* @description Pass in options for RequireJS like paths, shims or the baseUrl
*/
require.config({
paths: {
"mainModule" : "Modules/Main"
},
// Append a date on each requested script to prevent caching issues.
urlArgs: "bust=" + Date.now()
});
/**
* RequireJS calls
* @descript... | Revert 60f69b3 as the var based syntax isn't working with the r.js optimizer | [BUGFIX] Revert 60f69b3 as the var based syntax isn't working with the r.js optimizer
| JavaScript | mit | t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template |
f78fb6622ecc2204573326790eb5bdd254206580 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | //= require vendor
//= require app
//= require_tree ./lib
//= require_tree ./app/controllers
//= require_tree ./app/helpers
//= require_tree ./app/models
//= require sponsors
//= require_tree ./sponsors
| //= require vendor
//= require app
//= require_tree ./lib
//= require_tree ./app
//= require sponsors
//= require_tree ./sponsors
| Bring back ALL THE ASSETS! | Bring back ALL THE ASSETS!
| JavaScript | mit | 0xCCD/travis-ci,0xCCD/travis-ci |
573253b7f5fca0a4e19111a07044bdb1caa59f45 | 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... | Fix off-canvas menu with Turbolinks | Fix off-canvas menu with Turbolinks
Solution from Gian Marco Prazzoli's post in
http://foundation.zurb.com/forum/posts/2348-foundation-5-topbar-menu-not-responding-on-rails4
| JavaScript | mit | hackedu/website,zachlatta/website,zachlatta/website,zachlatta/website,hackedu/website,hackedu/website |
dd96f8db06a1b3303336fb963993a5b0657c3700 | routes/index.js | routes/index.js | const express = require('express'),
router = express.Router(),
passport = require('passport'),
User = require('../models/user');
router.get('/', function(req, res, next) {
res.redirect('/user');
});
// AUTH ROUTES
// sign up
router.get('/new', function(req, res, next) {
res.render('users/new');
... | const express = require('express'),
router = express.Router(),
passport = require('passport'),
User = require('../models/user');
router.get('/', function(req, res, next) {
res.redirect('/user');
});
// AUTH ROUTES
// sign up
router.get('/new', function(req, res, next) {
res.render('users/new');
... | Set currentUser to req.user before redirecting after login | Set currentUser to req.user before redirecting after login
| JavaScript | mit | tymeart/mojibox,tymeart/mojibox |
2c45fb05fae5aed1e2f11b8ed3fe91056b88cbf9 | app/components/select-or-typeahead.js | app/components/select-or-typeahead.js | import Ember from 'ember';
import SelectValues from 'hospitalrun/utils/select-values';
export default Ember.Component.extend({
name: 'select-or-typeahead',
className: null,
hint: true,
label: null,
list: null,
optionLabelPath: 'value',
optionValuePath: 'id',
property: null,
prompt: ' ',
selection: n... | import Ember from 'ember';
import SelectValues from 'hospitalrun/utils/select-values';
export default Ember.Component.extend({
name: 'select-or-typeahead',
className: null,
hint: true,
label: null,
list: null,
optionLabelPath: 'value',
optionValuePath: 'id',
property: null,
prompt: ' ',
selection: n... | Make sure lookup list isn't modified | Make sure lookup list isn't modified
| JavaScript | mit | HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend |
2e15ab28e8ae50fc53ef71cc0283ac2f8e9b22fc | lib/exec.js | lib/exec.js | var spawn = require('child_process').spawn;
var dotenv = require('./dot-env');
var objectAssign = require('object-assign');
module.exports = function exec(script) {
// Grab the command section of the entered command
var command = script.command.split(' ')[0];
// Anything else is options
var options = script.comma... | var spawn = require('child_process').spawn;
var dotenv = require('./dot-env');
var objectAssign = require('object-assign');
module.exports = function exec(script) {
var argv = process.argv.splice(3);
var command = script.command + ' ' + argv.join(' ');
script.env = script.env || {};
var env = objectAssign(proce... | Add unix (sh -c) and win32 (cmd /c) to command head | Add unix (sh -c) and win32 (cmd /c) to command head
| JavaScript | mit | mr47/run-on |
be73ae321a6449596acc75e8d7987abdf659bc99 | lib/pipe.js | lib/pipe.js | 'use strict';
var value = require('es5-ext/lib/Object/valid-value')
, emit = require('./core').methods.emit;
module.exports = function (emitter1, emitter2) {
value(emitter1) && value(emitter2);
emitter1.emit = function () {
emit.apply(this, arguments);
emit.apply(emitter2, arguments);
};
};
| 'use strict';
var defineProperty = Object.defineProperty
, d = require('es5-ext/lib/Object/descriptor')
, value = require('es5-ext/lib/Object/valid-value')
, emit = require('./core').methods.emit;
module.exports = function (emitter1, emitter2) {
var desc;
value(emitter1) && va... | Use descriptor to override emit method | Use descriptor to override emit method
| JavaScript | mit | snowyu/events-ex.js,icebob/event-emitter,medikoo/event-emitter |
79e238a34ccaf320ac339c7c9812cc1f006c7155 | lib/save.js | lib/save.js | var thenify = require('thenify')
var fs = require('fs')
var writeFile = thenify(fs.writeFile)
module.exports = function save (pkg, installedPackages, saveType, useExactVersion) {
var packageJson = pkg.pkg
packageJson[saveType] = packageJson[saveType] || {}
installedPackages.forEach(function (dependency) {
va... | var writeFile = require('mz/fs').writeFile
module.exports = function save (pkg, installedPackages, saveType, useExactVersion) {
var packageJson = pkg.pkg
packageJson[saveType] = packageJson[saveType] || {}
installedPackages.forEach(function (dependency) {
var semverCharacter = useExactVersion ? '' : '^'
... | Use mz/fs instad of thenify | Use mz/fs instad of thenify
| JavaScript | mit | andreypopp/pnpm,pnpm/supi,pnpm/supi,pnpm/pnpm,andreypopp/pnpm,rstacruz/pnpm,rstacruz/pnpm,rstacruz/pnpm,pnpm/pnpm,pnpm/pnpm,pnpm/supi,andreypopp/pnpm |
876760cb0761d0b3954d24cbb1d7c0838a49ff9c | platform/mds/mds-web/src/main/resources/webapp/js/app.js | platform/mds/mds-web/src/main/resources/webapp/js/app.js | (function () {
'use strict';
var mds = angular.module('mds', [ 'motech-dashboard', 'mds.services',
'mds.controllers', 'mds.directives', 'mds.utils', 'ui.directives']);
$.ajax({
url: '../mds/available/mdsTabs',
success: function(data) {
mds.constant('AVAILABLE_TABS... | (function () {
'use strict';
var mds = angular.module('mds', [ 'motech-dashboard', 'mds.services', 'webSecurity.services',
'mds.controllers', 'mds.directives', 'mds.utils', 'ui.directives']);
$.ajax({
url: '../mds/available/mdsTabs',
success: function(data) {
mds.... | Bring back dependency for web-security services to MDS schema browser | Bring back dependency for web-security services to MDS schema browser
Change-Id: I71f289f9201bfad22d67e7d77d6b7065b53436a3
| JavaScript | bsd-3-clause | pgesek/motech,wstrzelczyk/motech,sebbrudzinski/motech,wstrzelczyk/motech,ngraczewski/motech,koshalt/motech,jefeweisen/motech,smalecki/motech,justin-hayes/motech,adamkalmus/motech,shubhambeehyv/motech,ngraczewski/motech,LukSkarDev/motech,tstalka/motech,smalecki/motech,justin-hayes/motech,tectronics/motech,kmadej/motech,... |
d81289bdc0a32305fb339c78bc0e191edd86bfcb | workshop/www/js/recipe.js | workshop/www/js/recipe.js | var Recipe = function(data){
this.title = data.Title;
this.stars = data.StarRating;
this.imageUrl = data.ImageURL
}
function BigOvenRecipeSearchJson(query) {
var allRecipes = [];
var noImageLink = "http://redirect.bigoven.com/pics/recipe-no-image.jpg"
var apiKey = APIKEY;
var titleKeyword = query;
var ... | var Recipe = function(data){
this.title = data.Title;
this.stars = data.StarRating;
this.imageUrl = data.ImageURL
}
function BigOvenRecipeSearchJson(query) {
var allRecipes = [];
var noImageLink = "http://redirect.bigoven.com/pics/recipe-no-image.jpg"
var apiKey = "dvx7zJ0x53M8X5U4nOh6CMGpB3d0PEhH";
var ... | Add then callback to render search-results template | Add then callback to render search-results template
| JavaScript | mit | danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danas... |
8b9b539bae31a49442361ae3f69a8be15f44882e | lib/exit.js | lib/exit.js | /*
* exit
* https://github.com/cowboy/node-exit
*
* Copyright (c) 2013 "Cowboy" Ben Alman
* Licensed under the MIT license.
*/
'use strict';
module.exports = function exit(exitCode, streams) {
if (!streams) { streams = [process.stdout, process.stderr]; }
var drainCount = 0;
// Actually exit if all streams... | /*
* exit
* https://github.com/cowboy/node-exit
*
* Copyright (c) 2013 "Cowboy" Ben Alman
* Licensed under the MIT license.
*/
'use strict';
module.exports = function exit(exitCode, streams) {
if (!streams) { streams = [process.stdout, process.stderr]; }
var drainCount = 0;
// Actually exit if all streams... | Use an empty write instead of drain event. Closes gh-5, gh-4. | Use an empty write instead of drain event. Closes gh-5, gh-4.
| JavaScript | mit | cowboy/node-exit |
f7bb7dff415e0652a0e8b95b0f311bacfd5b481c | src/database/DataTypes/Report.js | src/database/DataTypes/Report.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
import Realm from 'realm';
/**
* A Report.
*
* @property {string} id
* @property {string} type
* @property {string} title
* @property {string} _data
*/
export class Report extends Realm.Object {
... | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
import Realm from 'realm';
import checkIsObject from '../utilities';
/**
* A Report.
*
* @property {string} id
* @property {string} type
* @property {string} title
* @property {string} _data
*/
ex... | Add checkIsObject in set data() | Add checkIsObject in set data()
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
a8609d63bb4ad116904be74aa9f1b66f676ae294 | public/modules/core/controllers/home.client.controller.js | public/modules/core/controllers/home.client.controller.js | 'use strict';
angular.module('core').controller('HomeController', ['$scope', '$http', 'Authentication', 'Users',
function($scope, $http, Authentication, Users) {
// This provides Authentication context.
$scope.authentication = Authentication;
if (Authentication.user !== '') {
$scope.helloMessage = 'Привет, ... | 'use strict';
angular.module('core').controller('HomeController', ['$scope', '$http', '$location', 'Authentication', 'Users',
function($scope, $http, $location, Authentication, Users) {
// This provides Authentication context.
$scope.authentication = Authentication;
if (Authentication.user !== '') {
$scope.... | Add redirecting to sing in page if user not authorizated' | Add redirecting to sing in page if user not authorizated'
| JavaScript | mit | sevazhidkov/angular-test-app,sevazhidkov/angular-test-app,sevazhidkov/angular-test-app |
129a40482844c3968d6d387b4648d70944732b9d | src/entities.js | src/entities.js | ;(function(exports) {
function Entities(coquette, game) {
this.c = coquette;
this.game = game;
this._entities = [];
};
Entities.prototype = {
update: function(interval) {
var entities = this.all();
for (var i = 0, len = entities.length; i < len; i++) {
if (entities[i].update !... | ;(function(exports) {
function Entities(coquette, game) {
this.c = coquette;
this.game = game;
this._entities = [];
};
Entities.prototype = {
update: function(interval) {
var entities = this.all();
for (var i = 0, len = entities.length; i < len; i++) {
if (entities[i].update !... | Remove unused callback params from create() destroy() | Remove unused callback params from create() destroy() | JavaScript | mit | maryrosecook/coquette,maryrosecook/coquette,matthewsimo/coquette,matthewsimo/coquette,cdosborn/coquette,cdosborn/coquette |
61c9d6ed8df1a57a53406492989829f7bf8feca3 | lib/mime.js | lib/mime.js | /*!
* YUI Mocha
* Copyright 2011 Yahoo! Inc.
* Licensed under the BSD license.
*/
/**
* File extension to MIME type map.
*
* Used by `serve.js` when streaming files from disk.
*/
this.contentTypes = {
"css": "text/css",
"html": "text/html",
"ico": "image/vnd.microsoft.icon",
"jpeg": "image/jpeg",
"jp... | /*!
* YUI Mocha
* Copyright 2011 Yahoo! Inc.
* Licensed under the BSD license.
*/
/**
* @module mime
*/
/**
* File extension to MIME type map.
*
* Used by `serve.js` when streaming files from disk.
*
* @property contentTypes
* @type object
*/
this.contentTypes = {
"css": "text/css",
"html": "text/htm... | Add YUI Doc tags to documentation blocks. | Add YUI Doc tags to documentation blocks.
| JavaScript | bsd-3-clause | reid/onyx,reid/onyx |
a1875e57a2da90534d43819f3e05fbcf79b0dfa6 | plugins/instagram.js | plugins/instagram.js | var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'Instagram',
prepareImgLinks:function (callback) {
$('body').on('mouseenter', 'a[href*="?taken-by"]', function () {
var link = $(this);
if (link.hasClass('hoverZoomLink'))
return;
... | var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'Instagram',
prepareImgLinks:function (callback) {
$('body').on('mouseenter', 'a[href*="?taken-by"]', function () {
var link = $(this);
if (link.hasClass('hoverZoomLink'))
return;
... | Use full-size image instead of the default one. | Use full-size image instead of the default one.
| JavaScript | mit | superlime/hoverzoomgold,extesy/hoverzoom,extesy/hoverzoom,superlime/hoverzoomgold |
a307404e7c4772fa2ba65830fa857e1508056ac7 | lib/util.js | lib/util.js | 'use strict'
const childProcess = require('child_process')
const fs = require('fs')
function exec (command, options) {
return new Promise(function (resolve, reject) {
childProcess.exec(command, options, function (err, stdout, stderr) {
if (err) {
reject(err)
} else {
resolve({command... | 'use strict'
const childProcess = require('child_process')
const fs = require('fs')
function exec (command, options) {
return new Promise(function (resolve, reject) {
childProcess.exec(command, options, function (err, stdout, stderr) {
if (err) {
reject(err)
} else {
resolve({command... | Add promisify function to reduce redundancy | Add promisify function to reduce redundancy
| JavaScript | isc | jcollado/multitest |
91c922ac32d68db8965f335f13882c51f73bb522 | public/robot-kata.js | public/robot-kata.js | console.log("Hello Robot Kata!");
var floorContext = document.getElementById('floor').getContext('2d');
var floorImage = new Image();
var floorOffset = $('#floor').offset();
floorImage.src = 'roomba-dock.png';
floorImage.onload = function () {
floorContext.drawImage(floorImage, 0, 0);
};
$('#floor').mousemove(func... | loadFloorImage(function () {
console.log("Hello Robot Kata!");
});
var floor = {
context: $('#floor')[0].getContext('2d'),
offset: $('#floor').offset(),
getPosition: function (e) {
return {
x: Math.floor(e.pageX - this.offset.left),
y: Math.floor(e.pageY - this.offset.top)
}
}
}
function... | Refactor and add function to determine color | Refactor and add function to determine color
| JavaScript | mit | ideal-knee/robot-kata-js,ideal-knee/robot-kata-js,ideal-knee/robot-kata-js |
dae1278238e40b79f5bc08f72e7040ef4291f920 | examples/js-config.js | examples/js-config.js | // Configure client
Opbeat.config({
orgId: 'b3eba3d11f6e4c3a9db52f477caa4fa2',
appId: 'e9797db8c7',
token: '6451721d51b6d95cf6c6b09498feafd865f1f976'
}).install()
// Set optional user data
Opbeat.setUserContext({
email: 'vanja@opbeat.com',
id: 1
})
// Test functions
function multiply (a, b) {
return a * b... | // Configure client
Opbeat.config({
debug: true,
orgId: 'b3eba3d11f6e4c3a9db52f477caa4fa2',
appId: 'e9797db8c7',
token: '6451721d51b6d95cf6c6b09498feafd865f1f976'
}).install()
// Set optional user data
Opbeat.setUserContext({
email: 'vanja@opbeat.com',
id: 1
})
// Test functions
function multiply (a, b) {... | Enable debug mode for JS config example | Enable debug mode for JS config example | JavaScript | mit | jahtalab/opbeat-js,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-js-core,opbeat/opbeat-js-core,opbeat/opbeat-angular,opbeat/opbeat-angular,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-react |
fc81c225801101221d308f300d2491a39d2db22e | frontend/reducers/promoteModal.js | frontend/reducers/promoteModal.js | import * as CONST from '../constants/actionTypes';
const initialState = { open: false };
export default function promoteModal(state = initialState, action) {
switch (action.type) {
case CONST.SHOW_PROMOTE_MODAL:
return { open: true };
case CONST.HIDE_PROMOTE_MODAL:
return { open: false };
default:
... | import * as CONST from '../constants/actionTypes';
const initialState = { open: false, piece: undefined };
export default function promoteModal(state = initialState, action) {
switch (action.type) {
case CONST.SHOW_PROMOTE_MODAL:
return { open: true, piece: action.piece };
case CONST.HIDE_PROMOTE_MODAL:
... | Update reducer properties, allow `piece` key. | Update reducer properties, allow `piece` key.
* the `piece` is the target promote or not.
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front |
91e8cbf86807bef4636f38d8157557af8901f39c | gateways/paypal_express/script.js | gateways/paypal_express/script.js | (function() {
/***********************************************************/
/* Handle Proceed to Payment
/***********************************************************/
jQuery(function() {
jQuery(document).on('proceedToPayment', function(event, ShoppingCart) {
if (ShoppingCart.gateway... | (function() {
/***********************************************************/
/* Handle Proceed to Payment
/***********************************************************/
jQuery(function() {
jQuery(document).on('proceedToPayment', function(event, ShoppingCart) {
if (ShoppingCart.gateway... | Store the correct payment method | Store the correct payment method
| JavaScript | mit | flaviocopes/grav-plugin-shoppingcart-paypal,flaviocopes/grav-plugin-shoppingcart-paypal |
77144a91f28c5801951861c9e7ebc3df8d12097f | server/config/resources.js | server/config/resources.js | module.exports = {
user: {
type: 'document',
schema: {
attributes: {
name: String
}
},
user: true
},
project: {
type: 'document',
schema: {
attributes: {
name: String,
description:... | module.exports = {
user: {
type: 'document',
schema: {
attributes: {
name: String
}
},
user: true
},
project: {
type: 'document',
schema: {
attributes: {
name: String,
description:... | Use Date type for history on server side | Use Date type for history on server side
| JavaScript | mit | pmsipilot/pmsiplan,pmsipilot/pmsiplan,pmsipilot/pmsiplan |
0888954bb9641cf7b5fe5cf4dc30d89f77f6d953 | server/lib/load-dot-env.js | server/lib/load-dot-env.js | if (!process.env.NODE_ENV) {
process.env.NODE_ENV = 'development';
}
if (process.env.NODE_ENV === 'development') {
const dotenv = require('dotenv');
dotenv.config(); // this loads .env with real values. It needs to be first because dotenv doesn't overwrite any values
dotenv.config({path: 'default.env'}); // th... | if (!process.env.NODE_ENV) {
process.env.NODE_ENV = 'development';
}
if (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'docker') {
const dotenv = require('dotenv');
dotenv.config(); // this loads .env with real values. It needs to be first because dotenv doesn't overwrite any values
dotenv... | Load '.env' files under docker | Load '.env' files under docker
| JavaScript | mit | OpenCollective/opencollective-api,OpenCollective/opencollective-api,OpenCollective/opencollective-api |
1c91214da859ceaa3d44d6e0be87d02a1e49a039 | lib/index.js | lib/index.js | /*
* gulp-hub
* https://github.com/frankwallis/gulp-hub
*
* Copyright (c) 2014 Frank Wallis
* Licensed under the MIT license.
*/
var gulp = require('gulp');
var path = require('path');
var util = require('gulp-util');
var runSequence = require('run-sequence');
var resolveGlob = require('./resolve-glob');
var getS... | /*
* gulp-hub
* https://github.com/frankwallis/gulp-hub
*
* Copyright (c) 2014 Frank Wallis
* Licensed under the MIT license.
*/
var gulp = require('gulp');
var path = require('path');
var util = require('gulp-util');
var runSequence = require('run-sequence');
var resolveGlob = require('./resolve-glob');
var getS... | Attach main function directly to exports, linting | Attach main function directly to exports, linting
| JavaScript | mit | frankwallis/gulp-hub,stevemao/gulp-hub,phated/gulp-hub |
2ccf293d75528d21e97e22a6a7ba95d0305370bf | lib/index.js | lib/index.js | 'use babel'
/* @flow */
import {Disposable} from 'atom'
import {Main} from './main'
import type {Provider} from './types'
module.exports = {
config: {
},
activate() {
this.instance = new Main()
},
deactivate() {
this.instance.dispose()
},
provideIntentions(): Main {
return this.instance
... | 'use babel'
/* @flow */
import {Disposable} from 'atom'
import {Main} from './main'
import type {Provider} from './types'
module.exports = {
config: {
},
activate() {
this.instance = new Main()
},
deactivate() {
this.instance.dispose()
},
provideIntentions(): Main {
return this.instance
... | Add return type to consumer method | :art: Add return type to consumer method
| JavaScript | mit | steelbrain/declarations |
fe751015ca6bdeec416c266868c43f67a3ca19f7 | lib/local.js | lib/local.js | "use strict";
var fakeNullFiber = Object.create(null);
var localKey = "_optimism_local";
function getCurrentFiber() {
return fakeNullFiber;
}
try {
var fiberPath = require.resolve("fibers");
} catch (e) {}
if (fiberPath) {
var Fiber = require(fiberPath);
// If we were able to require("fibers"), redefine th... | "use strict";
var fakeNullFiber = function Fiber(){};
var localKey = "_optimism_local";
function getCurrentFiber() {
return fakeNullFiber;
}
try {
var fiberPath = require.resolve("fibers");
} catch (e) {}
if (fiberPath) {
var Fiber = require(fiberPath);
// If we were able to require("fibers"), redefine the... | Make fakeNullFiber look a little less fake. | Make fakeNullFiber look a little less fake.
| JavaScript | mit | benjamn/optimism,benjamn/optimism |
bb7162a886b4ed17caab08228e504cf09fdb5da2 | src/js/index.js | src/js/index.js | require('../css/main.scss');
import grindy from "./grindy.js"
(function() {
let game = grindy();
game.start();
})()
| import '../css/main.scss'
import 'file?name=[name].html!../index.html'
import Grindy from './grindy.js'
(function() {
let game = grindy();
game.start();
})()
| Use of already installed file-loader :) ... we can use import also for "special webpack imports" | Use of already installed file-loader :)
... we can use import also for "special webpack imports"
| JavaScript | mit | Vorgnr/Grindy,Vorgnr/Grindy |
f4dd36946e54b9ba6d037275b4dd184621729de8 | test/test-harness-test.js | test/test-harness-test.js | describe('test-harness', function() {
describe('globals', function() {
it('should expose should as a global', function() {
should.exist(should);
});
it('should expose sinon as a global', function() {
should.exist(sinon);
});
});
describe('should-sinon plugin', function() {
it... | describe('test/test-harness-test.js', function() {
describe('globals', function() {
it('should expose should as a global', function() {
should.exist(should);
});
it('should expose sinon as a global', function() {
should.exist(sinon);
});
});
describe('should-sinon plugin', functio... | Fix linter issue with test describe path | Fix linter issue with test describe path | JavaScript | mit | Springworks/node-test-harness |
e7eddd8e4f13e556fa5c07071cec9911a689187b | liphte.ts.js | liphte.ts.js | var fs = require('fs');
var vm = require('vm');
var includeInThisContext = function(path) {
var code = fs.readFileSync(path);
vm.runInThisContext(code, path);
}.bind(this);
includeInThisContext(__dirname+"/dist/liphte.min.js");
exports.liphte = liphte;
exports.liphte.tag = liphte.tag; | var fs = require('fs');
var vm = require('vm');
var includeInThisContext = function(path) {
var code = fs.readFileSync(path);
vm.runInThisContext(code, path);
}.bind(this);
includeInThisContext(__dirname+"/dist/liphte.min.js");
exports.liphte = liphte;
exports.tag = liphte.tag;
| Fix module for NodeJS - apped_dir_name | Fix module for NodeJS - apped_dir_name
| JavaScript | mit | maveius/liphte.ts,maveius/liphte.ts |
d664f7aff910b8ccf46f45f341a0776d4498124b | electron/menus/win-linux.js | electron/menus/win-linux.js | export const winLinuxMenu = (app, window, openAbout) => (
[{
label: 'Daedalus',
submenu: [{
label: 'About',
click() {
openAbout();
}
}, {
label: 'Close',
accelerator: 'Ctrl+W',
click() {
app.quit();
}
}]
}, {
label: 'Edit',
submenu: [... | export default (app, window, openAbout) => (
[{
label: 'Daedalus',
submenu: [{
label: 'About',
click() {
openAbout();
}
}, {
label: 'Close',
accelerator: 'Ctrl+W',
click() {
app.quit();
}
}]
}, {
label: 'Edit',
submenu: [{
label... | Fix missing application menu on Windows build | [DDW-212] Fix missing application menu on Windows build
| JavaScript | apache-2.0 | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus |
7e6c11f37053a33e0ad4b6ee90b6b2b4317960a7 | src/components/floating-button/FloatingButtonItemLabel.js | src/components/floating-button/FloatingButtonItemLabel.js | 'use strict'
import React, { Component } from 'react'
import ReactCSS from 'reactcss'
import colors from '../../styles/variables/colors'
import { spacing, sizing } from '../../styles/variables/utils'
class FloatingButtonItemLabel extends Component {
classes() {
return {
'default': {
wrap: {
... | 'use strict'
import React, { Component } from 'react'
import ReactCSS from 'reactcss'
import colors from '../../styles/variables/colors'
import { spacing, sizing } from '../../styles/variables/utils'
class FloatingButtonItemLabel extends Component {
classes() {
return {
'default': {
wrap: {
... | Improve floating button item label styles | Improve floating button item label styles
| JavaScript | mit | tobycyanide/felony,henryboldi/felony,henryboldi/felony,tobycyanide/felony |
eec077fa040d29767acae307ae74e97c8d511fba | src/containers/shared-assets/form-assets/form-tooltips.js | src/containers/shared-assets/form-assets/form-tooltips.js | import React from 'react';
const requirementsObj = {
list_symbol: "◇",
username: ["start with letter", "be between 3-10 characters", "contain only [a-zA-Z] characters"],
['e-mail']: ["look like: example@example.com"],
['confirm_e-mail']: ["be the same as e-mail address written above"],
password: ["be K"]
};
... | import React from 'react';
const requirementsObj = {
list_symbol: "◇",
username: ["start with letter", "be between 3-10 characters", "contain only [a-zA-Z] characters"],
['e-mail']: ["look like: example@example.com"],
['confirm_e-mail']: ["be the same as e-mail address written above"],
password: ["be K"],
... | Change switch statement to dynamic | Change switch statement to dynamic
| JavaScript | bsd-3-clause | vFujin/HearthLounge,vFujin/HearthLounge |
f017a1d21145668d0182339bb195e98e2da21992 | server/recalls.controller.js | server/recalls.controller.js | 'use strict';
var _ = require('lodash'),
Promise = require('bluebird');
module.exports = ['data', function (data) {
var filters = function (query) {
var where = data.utils.rangeFilter('Year', query.start, query.end);
return _.assign(where, data.utils.inFilter('Make', query.makes));
};
return {
'... | 'use strict';
var _ = require('lodash'),
Promise = require('bluebird');
module.exports = ['data', function (data) {
var filters = function (query) {
var where = data.utils.rangeFilter('Year', query.start, query.end);
return _.assign(where, data.utils.inFilter('Make', query.makes));
};
return {
'... | Add operation parameter to recalls route | Add operation parameter to recalls route
Instead of having the operation parameter in the query string it
optimizes for Restangular to have it as an action on the route.
| JavaScript | mit | justinsa/maine-coone,justinsa/maine-coone |
29548e72dced63c277f16a33a5a4e44be668473b | shared/util/feature-flags.js | shared/util/feature-flags.js | /* @flow */
import getenv from 'getenv'
// To enable a feature, include it in the environment variable KEYBASE_FEATURES.
// For example, KEYBASE_FEATURES=tracker2,login,awesomefeature
const tracker2Key = 'tracker2'
const loginKey = 'login'
const mobileAppsExistKey = 'mobileAppsExist'
type FeatureFlags = {
'tracke... | /* @flow */
import getenv from 'getenv'
// To enable a feature, include it in the environment variable KEYBASE_FEATURES.
// For example, KEYBASE_FEATURES=tracker2,login,awesomefeature
const tracker2Key = 'tracker2'
const loginKey = 'login'
const mobileAppsExistKey = 'mobileAppsExist'
const adminKey = 'admin'
type F... | Add adminKey, will be for early access to dz2 | Add adminKey, will be for early access to dz2
Can be turned on with `launchctl setenv KEYBASE_FEATURES admin`
| JavaScript | bsd-3-clause | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client |
0f775d0cea33f6525b3875db69f8830859c83b8d | tests/unit/looper-test.js | tests/unit/looper-test.js | import Ember from 'ember';
import { csp, channel, looper } from 'ember-processes';
module('Unit: Loopers');
test('loopers take a channel name', function(assert) {
QUnit.stop();
assert.expect(3);
let outch = csp.chan();
let MyObject = Ember.Object.extend({
myChannel: channel(),
doStuff: looper('myCha... | import Ember from 'ember';
import { csp, channel, looper } from 'ember-processes';
module('Unit: Loopers');
function testLooper(testName, makeHandler) {
test('loopers take a channel name (' + testName + ')', function(assert) {
QUnit.stop();
assert.expect(3);
let outch = csp.chan();
let MyObject = ... | Add test for regular function loopers | Add test for regular function loopers | JavaScript | mit | machty/ember-concurrency,jeradg/ember-concurrency,jeradg/ember-concurrency,machty/ember-concurrency,jeradg/ember-concurrency,machty/ember-concurrency,machty/ember-concurrency,jeradg/ember-concurrency |
d3e18b83b2093637adfce4ccaa8c1cec4aee7e2c | public/app/services/toasterutils.service.js | public/app/services/toasterutils.service.js | (function () {
'use strict';
angular
.module('PLMApp')
.factory('toasterUtils', toasterUtils);
toasterUtils.$inject = ['toaster', '$timeout'];
function toasterUtils(toaster, $timeout) {
var service = {
info: info,
success: success,
warning: warning,
error: erro... | (function () {
'use strict';
angular
.module('PLMApp')
.factory('toasterUtils', toasterUtils);
toasterUtils.$inject = ['toaster', '$timeout'];
function toasterUtils(toaster, $timeout) {
var service = {
info: info,
success: success,
warning: warning,
error: erro... | Add parameter setting toaster's duration | Add parameter setting toaster's duration
| JavaScript | agpl-3.0 | BuggleInc/webPLM,BuggleInc/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,polux/webPLM,polux/webPLM,MatthieuNICOLAS/webPLM,BuggleInc/webPLM,MatthieuNICOLAS/webPLM,polux/webPLM |
5b630ad5fe4719659bdc8fe4276f4fb013336cad | src/registry.js | src/registry.js | 'use strict'
/**
* @module registry
*/
module.exports.isListed = isListed
module.exports.isUnlisted = isUnlisted
var vocab = require('solid-namespace')
/**
* Returns true if the parsed graph is a `solid:UnlistedDocument` document.
* @method isUnlisted
* @param graph {Graph} Parsed graph (loaded from a registry-... | 'use strict'
/**
* @module registry
*/
module.exports.isListed = isListed
module.exports.isUnlisted = isUnlisted
var vocab = require('solid-namespace')
/**
* Returns true if the parsed graph is a `solid:UnlistedDocument` document.
* @method isUnlisted
* @param graph {Graph} Parsed graph (loaded from a registry-... | Make isListed / isUnlisted query more specific | Make isListed / isUnlisted query more specific
Address issue #141.
| JavaScript | mit | solid/solid-client,solid/solid-client,solid/solid.js,solid/solid-client,solid/solid.js,solid/solid.js |
10cc6b06dedfd1a90bc45d1eb5d2f469b876e70b | config/env/all.js | config/env/all.js | // default app configuration
var defaultConfig = {
port: process.env.PORT || 4000,
db: "mongodb://nodegoat:owasp@widmore.mongohq.com:10000/nodegoat",
cookieSecret: "session_cookie_secret_key_here",
cryptoKey: "a_secure_key_for_crypto_here",
cryptoAlgo: "aes256"
};
module.exports = defaultConfig;
| // default app configuration
var defaultConfig = {
port: process.env.PORT || 4000,
db: process.env.MONGODB_URL || "mongodb://nodegoat:owasp@widmore.mongohq.com:10000/nodegoat",
cookieSecret: "session_cookie_secret_key_here",
cryptoKey: "a_secure_key_for_crypto_here",
cryptoAlgo: "aes256"
};
module.... | Use MONGODB_URL from env variable if provided | Use MONGODB_URL from env variable if provided
| JavaScript | apache-2.0 | codiscope/NodeGoatExample,panstav/NodeGoat,samheadrick/NodeGoat,diegochavezcarro/nodegoatsecure,zkovalenko/NodeGoatTEST,nearform/NodeGoat,bertonjulian/NodeGoat,OWASP/NodeGoat,abaldock/cs132_security_lab_group_24,zkovalenko/NodeGoatTEST,isp1r0/NodeGoat,GMNetto/NodeSecurity,OWASP/NodeGoat,syzer/NodeGoat,GMNetto/NodeSecur... |
b82572880ad9c3a5960ba56b2603006546d29aa7 | src/client/react/admin/AdminNavbar/MainNavigation.js | src/client/react/admin/AdminNavbar/MainNavigation.js | import React from 'react';
import { Link } from 'react-router-dom';
const linkStyle = 'pt-button pt-minimal';
class MainNavigation extends React.Component {
render() {
return (
<div>
<a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/'>Visit site</a>
</div>
);
}
}
export default MainN... | import React from 'react';
import { Link } from 'react-router-dom';
const linkStyle = 'pt-button pt-minimal';
class MainNavigation extends React.Component {
render() {
return (
<div>
<a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/' target='_blank'>Visit site</a>
</div>
);
}
}
expo... | Make Visit Site link in the navbar open a new window | [FIX] Make Visit Site link in the navbar open a new window
| JavaScript | mit | bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race |
d2482daf863450d2ae2470ceba86b341574d7ba8 | examples/simple-done-app.js | examples/simple-done-app.js | // Simple "Done" application
let doneItems = []
let text
function input(event) {
text = event.target.value
}
function done(event) {
doneItems.push(text)
Twirlip7.WorkspaceView.toast("did " + text)
text = ""
}
Twirlip7.show(() => {
return m("div", [
doneItems.map(item => m("div", item)),
... | // Simple "Done" application
let doneItems = []
let text
function input(event) {
text = event.target.value
}
function done(event) {
doneItems.push(text)
// Toast will not show up running standalone as it depends on the editor
Twirlip7.WorkspaceView.toast("did " + text)
text = ""
}
Twirlip7.show(... | Add comment to simple done app example about toast | Add comment to simple done app example about toast
| JavaScript | mit | pdfernhout/Twirlip7,pdfernhout/Twirlip7,pdfernhout/Twirlip7 |
2ffec5ba86e05618c2ea809aa24f28386bce4c8f | src/data/examples/zh-Hans/05_Image/10_Copy_Method.js | src/data/examples/zh-Hans/05_Image/10_Copy_Method.js | /*
* @name Copy() method
* @frame 600,400
* @description 一个如何使用copy()方法模拟为图像着色的示例。
*/
let draft, ready;
function preload() {
ready = loadImage("assets/parrot-color.png");
draft = loadImage("assets/parrot-bw.png");
}
function setup() {
createCanvas(600, 400);
noCursor();
cursor("assets/brush.p... | /*
* @name Copy() 函数
* @frame 600,400
* @description 一个如何使用 copy() 函数模拟为图像着色的范例。
*/
let draft, ready;
function preload() {
ready = loadImage("assets/parrot-color.png");
draft = loadImage("assets/parrot-bw.png");
}
function setup() {
createCanvas(600, 400);
noCursor();
cursor("assets/brush.png... | Edit Chinese translation of example | Edit Chinese translation of example
| JavaScript | mit | processing/p5.js-website,processing/p5.js-website |
afc92c86d9c8199283dcd028ae6f09de3fda052e | lib/plugin/example/handler/alwaysProcessHandler.js | lib/plugin/example/handler/alwaysProcessHandler.js | "use strict";
const Handler = require('../../router/handler');
class AlwaysProcessHandler extends Handler {
init(context) {
console.log(this.constructor.id, context.request.urlTokenized.join('/'));
return Promise.resolve();
}
}
AlwaysProcessHandler.alwaysProcess = true;
AlwaysProcessHandler.id = 'Example... | "use strict";
const Handler = require('../../router/handler');
class AlwaysProcessHandler extends Handler {
init(context) {
console.log(this.constructor.id, '/' + context.request.urlTokenized.join('/'));
return Promise.resolve();
}
}
AlwaysProcessHandler.alwaysProcess = true;
AlwaysProcessHandler.id = 'E... | Prepend / to AlwaysProcessHandler log output | Prepend / to AlwaysProcessHandler log output
| JavaScript | mit | coreyp1/defiant,coreyp1/defiant |
abf494d31e5704b89875940aa9aed5e2f1bbd0cd | scripts/index.js | scripts/index.js | /*global module, require, process */
(function () {
'use strict';
var required = {
util: require('./util'),
testsUtil: require('./testsUtil'),
assert: require('./assert'),
test: require('tape-compact'),
json: typeof JSON === 'object' && null !== JSON ? JSON : requir... | /*global module, require, process */
(function () {
'use strict';
var required = {
util: require('./util'),
testsUtil: require('./testsUtil'),
assert: require('assert'),
test: require('tape-compact'),
json: typeof JSON === 'object' && null !== JSON ? JSON : require(... | Revert back to nodes assert module | Revert back to nodes assert module
| JavaScript | mit | Xotic750/astrodate |
3b02bcafaec47660344803f66baff351b44f2619 | server/routes/recipes/index.js | server/routes/recipes/index.js | import express from 'express';
import * as userController from '../../controllers/recipes.js';
const user = express.Router();
// define route controllers for creating sign up, login and sign out
user.post('/', userController.addRecipe);
export default user;
| import express from 'express';
import * as userController from '../../controllers/recipes.js';
const user = express.Router();
user.use('*', (req, res, next) => {
// check for authentication here
if (!req.session.user) {
return res.status(401).send({
error: 'You do not have the permission to perform thi... | Add user authentication to route | Add user authentication to route
| JavaScript | apache-2.0 | larrystone/BC-26-More-Recipes,larrystone/BC-26-More-Recipes |
2b1f5c27fd8cfbc06c23a76b5942bec589e553c8 | stryker.conf.js | stryker.conf.js | module.exports = function(config) {
config.set({
coverageAnalysis: 'off',
logLevel: 'info',
mutate: [
'src/**/*.ts?',
'!src/**/__tests__/*.ts?'
],
mutator: 'typescript',
reporter: ['html', 'clear-text', 'progress', 'dashboard'],
testRunner: 'jest',
transpilers: ['typescript... | module.exports = function(config) {
config.set({
coverageAnalysis: 'off',
files: [
{ pattern: 'node_modules/react-scripts-ts/**/*.js' },
{ pattern: 'node_modules/ts-jest/**/*.js' },
],
logLevel: 'info',
mutate: [
'src/**/*.ts?',
'!src/**/__tests__/*.ts?'
],
mutator:... | Add some files that are needed for mutation testing | Add some files that are needed for mutation testing
| JavaScript | mit | mthmulders/hyperion-web,mthmulders/hyperion-web,mthmulders/hyperion-web |
47ea8fb0e20024d9a5531ec2addc3d459e535a09 | js/events.js | js/events.js | function Events()
{
var listeners = {}
$.extend(this, {
on: function(type, cb)
{
if (!$.isArray(listeners[type]))
listeners[type] = []
if (listeners[type].indexOf(cb) < 0)
listeners[type].push(cb)
},
once: function(type, cb)
{
this.o... | function Events()
{
var listeners = {}
$.extend(this, {
on: function(type, cb)
{
if (!$.isArray(listeners[type]))
listeners[type] = []
if (listeners[type].indexOf(cb) < 0)
listeners[type].push(cb)
return this;
},
once: function(type, cb)
... | Return the event object when you call on, once or off | Return the event object when you call on, once or off
| JavaScript | artistic-2.0 | atrodo/fission_engine,atrodo/fission_engine |
d073fe7d70675e9f51dde9737fe04136917b4799 | public/js/app.js | public/js/app.js | angular.module('specialBlogApp', [
'ngRoute',
'ngResource'
])
.config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/index.html',
controller: 'HomeCtrl'
})
.when('/article/:articleId', {
... | angular.module('specialBlogApp', [
'ngRoute',
'ngResource'
])
.config(function ($routeProvider, $locationProvider) {
$routeProvider
.when('/', {
templateUrl: '/views/index.html',
controller: 'HomeCtrl'
})
.when('/article/:articleId', {
... | Fix the bug of **Tried to load angular more than once.**. | Fix the bug of **Tried to load angular more than once.**.
| JavaScript | mit | SpecialCyCi/specialblog-node-js,SpecialCyCi/specialblog-node-js,SpecialCyCi/specialblog-node-js |
ef7a42074a5f3521ace7a453395b6e8896a0c0ef | services/ui/src/components/Favicon/index.js | services/ui/src/components/Favicon/index.js | import React from 'react';
import Head from 'next/head';
import { color } from 'lib/variables';
/**
* Adds the Lagoon icon as the favicon for the website.
*/
const Favicon = () => (
<Head>
<link rel="apple-touch-icon" sizes="180x180" href="/static/images/favicons/apple-touch-icon.png" />
<link rel="icon" t... | import React from 'react';
import Head from 'next/head';
import { color } from 'lib/variables';
/**
* Adds the Lagoon icon as the favicon for the website.
*/
const Favicon = () => (
<Head>
<link rel="apple-touch-icon" sizes="180x180" href="/static/images/favicons/apple-touch-icon.png" />
<link rel="icon" t... | Remove trailing single quote typo in favicon URL | Remove trailing single quote typo in favicon URL
| JavaScript | apache-2.0 | amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon |
83f708e666d6186b681195a674d8b90a39e60a21 | jQuery.animateOnce.js | jQuery.animateOnce.js | /**
* Utility function for triggering animate.css animations
*/
$.fn.animateOnce = function( className ) {
var animEndEvent = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',
animClass = 'animated ' + className;
this
.addClass( animClass )
.off( animEndEvent )
.one( animEn... | /* global jQuery */
/**
* Utility function for triggering animate.css animations
*/
(function ( $ ) {
'use strict';
$.fn.animateOnce = function( className, cb ) {
var animEndEvent = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',
animClass = 'animated ' + className,
cal... | Add callback function. Use Strict. noConflict support | Add callback function.
Use Strict.
noConflict support
| JavaScript | mit | NicolajKN/jQuery.animateOnce |
793d224e509715f48e576717a249672bd81f46dc | scripts/create_sequence.js | scripts/create_sequence.js | db.counters.insert(
{
_id: "cemetery",
seq: 0,
}
)
db.counters.insert(
{
_id: "geolocation",
seq: 0,
}
)
db.counters.insert(
{ ... | // Create (or recreate) ID counters for our various entities
db.counters.insert(
{
_id: "cemetery",
seq: 0,
}
)
db.counters.insert(
{
_id: "geolocation",
seq: 0, ... | Create or recreate sequence counters for Monogo database objects | Create or recreate sequence counters for Monogo database objects
| JavaScript | mit | sjccs/cemetery-reader |
bd8e7a0f7330cc4ba0f1728ee60db76a37ef76d0 | app/assets/javascripts/application.js | app/assets/javascripts/application.js | //= require modernizr-2.8.3.custom
//= require turbolinks
//= require local_time
//= require init
//= require pages
document.addEventListener("turbolinks:load", atthemovies.init());
if (document.readyState != 'loading') {
atthemovies.init();
} else {
document.addEventListener('DOMContentLoaded', atthemovies.init... | //= require modernizr-2.8.3.custom
//= require turbolinks
//= require local_time
//= require init
//= require pages
document.addEventListener("turbolinks:load", function() {
atthemovies.init();
});
if (document.readyState != 'loading') {
atthemovies.init();
} else {
document.addEventListener('DOMContentLoaded'... | Fix double JS on first page load | Fix double JS on first page load | JavaScript | agpl-3.0 | andycroll/atthemovies,andycroll/atthemovies,andycroll/atthemovies,andycroll/atthemovies |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.