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 |
|---|---|---|---|---|---|---|---|---|---|
8f9322768881b9a534d0eaffdd77c916142bae6c | test/_data/options.js | test/_data/options.js | var options = {
dbname: 'yamb-test',
storage: require('./storage')
};
if (process.env.yapi) {
options.yapi = process.env.yapi;
}
module.exports = options; | var options = {
storage: require('./storage')
};
if (process.env.yapi) {
options.yapi = process.env.yapi;
}
module.exports = options; | Remove old option for tests | Remove old option for tests
| JavaScript | mit | yamb/yamb |
9a965cc4e6b4e239a40b74907422990fa9f7b549 | src/request/index.js | src/request/index.js | import registerListeners from './register-listeners';
export default ({ request, files, instance, progress }) =>
new Promise(resolve => {
const xhr = new XMLHttpRequest();
instance(xhr);
registerListeners({ xhr, resolve, progress });
xhr.open(request.method || 'POST', request.url);
xhr.withCred... | import registerListeners from './register-listeners';
export default ({ request, files, instance, progress }) =>
new Promise(resolve => {
const xhr = new XMLHttpRequest();
instance(xhr);
registerListeners({ xhr, resolve, progress });
xhr.open(request.method || 'POST', request.url);
xhr.withCred... | Append fields before files in FormData of request | Append fields before files in FormData of request
| JavaScript | mit | navjobs/upload |
b9c4a27972098aa94f0d8935693145a5505feaba | test/highlightAuto.js | test/highlightAuto.js | 'use strict';
var fs = require('fs');
var hljs = require('../build');
var utility = require('./utility');
function testAutoDetection(language) {
it('should be detected as ' + language, function() {
var filename = language + '.txt',
languagePath = utility.buildPath('language', filename),
... | 'use strict';
var fs = require('fs');
var hljs = require('../build');
var path = require('path');
var utility = require('./utility');
function testAutoDetection(language) {
it('should be detected as ' + language, function() {
var languagePath = utility.buildPath('language', language),
example... | Change testAutoDetection to handle multiple files | Change testAutoDetection to handle multiple files
| JavaScript | bsd-3-clause | taoger/highlight.js,0x7fffffff/highlight.js,snegovick/highlight.js,palmin/highlight.js,SibuStephen/highlight.js,delebash/highlight.js,xing-zhi/highlight.js,Ajunboys/highlight.js,teambition/highlight.js,1st1/highlight.js,adam-lynch/highlight.js,sourrust/highlight.js,yxxme/highlight.js,Delermando/highlight.js,martijnruss... |
045fae21bde6fb90900e1e0c04f17601c0fc9fcd | static/js/download.js | static/js/download.js | ;
(function (d, n) {
'use strict';
var os = n.platform.match(/(Win|Mac|Linux)/);
var x = n.userAgent.match(/x86_64|Win64|WOW64/) ||
n.cpuClass === 'x64' ? 'x64' : 'x86';
var db = d.getElementById('home-downloadbutton');
if (!db) { return; }
var version = db.dataset.version;
var dlLocal = db.dataset.dl... | ;
(function (d, n) {
'use strict';
var os = n.platform.match(/(Win|Mac|Linux)/);
var x = n.userAgent.match(/x86_64|Win64|WOW64/) ||
n.cpuClass === 'x64' ? 'x64' : 'x86';
var db = d.getElementById('home-downloadbutton');
if (!db) { return; }
var version = db.dataset.version;
var dlLocal = db.dataset.dl... | Fix version check for win-x64 | js: Fix version check for win-x64
| JavaScript | mit | SomeoneWeird/new.nodejs.org,vaniaul/new.nodejs.org,MassimilianoMura/new.nodejs.org,xicombd/new.nodejs.org,narqo/new.nodejs.org,boneskull/new.nodejs.org,bogas04/new.nodejs.org,yosuke-furukawa/new.nodejs.org,elinnet/new.nodejs.org,cgvarela/new.nodejs.org,thefourtheye/new.nodejs.org,boneskull/new.nodejs.org,rnsloan/new.no... |
08bbfe70f4328cdd6801eca5786d3cc72f5ef37a | gulpfile.js | gulpfile.js | /*
gulpfile.js
===========
Each task has been broken out into its own file in build/tasks. Any file in that folder gets
automatically required by the loop in ./gulp/index.js (required below).
To add a new task, simply add a new task file to ./build/tasks.
*/
var gulp = require('gulp'),
config = require(... | /*
gulpfile.js
===========
Each task has been broken out into its own file in build/tasks. Any file in that folder gets
automatically required by the loop in ./gulp/index.js (required below).
To add a new task, simply add a new task file to ./build/tasks.
*/
var gulp = require('gulp'),
config = require(... | Use gulp dev helper for our own dev task | Use gulp dev helper for our own dev task
| JavaScript | mit | walmartlabs/circus-handlebars,walmartlabs/circus-handlebars |
a721c84f8c9ca1636f692d4fa5c52f8076abf5ba | tasks/options/copy.js | tasks/options/copy.js | module.exports = {
main: {
files: [
{ expand: true, src: ["assets/images/**"], dest: "dist/" },
{ expand: true, src: ["assets/kss/**"], dest: "dist/" },
{ expand: true, src: ["assets/fonts/**"], dest: "dist/" },
{ expand: true, src: ["scss/**"], dest: "dist/" },
{ src: "README.md", d... | module.exports = {
main: {
files: [
{ expand: true, src: ["assets/images/**"], dest: "dist/" },
{ expand: true, src: ["assets/kss/**"], dest: "dist/" },
{ expand: true, src: ["assets/fonts/**"], dest: "dist/" },
{ expand: true, src: ["scss/**"], dest: "dist/" },
{ expand: true, src: ... | Include JS source in distribution build for direct consumption. | Include JS source in distribution build for direct consumption.
| JavaScript | mit | sbsmith86/neue,DoSomething/forge,DoSomething/neue |
e8bb4155a6baaa1a08efa728e2e630c42fd7d6e4 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var runSequence = require('run-sequence');
var del = require('del');
gulp.task('zip', function () {
return gulp.src([
'templates/*',
'templates/app/**',
'!**/.DS_Store'
], {dot: true})
.pipe($.ignore.include({isFile: t... | 'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var runSequence = require('run-sequence');
var del = require('del');
gulp.task('zip', function () {
return gulp.src([
'templates/*',
'templates/app/**',
'!**/.DS_Store'
], {base: 'templates', dot: true})
.pipe($.ignore... | Fix directory structure in zip archive | Fix directory structure in zip archive
| JavaScript | mit | rakuten-frontend/rff-gulp,rakuten-frontend/rff-gulp |
e471f8c4da271dabebc070e77df77d888c328fc4 | haraka.js | haraka.js | #!/usr/bin/env node
"use strict";
var path = require('path');
// this must be set before "server.js" is loaded
process.env.HARAKA = process.env.HARAKA || path.resolve('.');
try {
require.paths.push(path.join(process.env.HARAKA, 'node_modules'));
}
catch(e) {
process.env.NODE_PATH += ':' + path.join(process.e... | #!/usr/bin/env node
"use strict";
var path = require('path');
// this must be set before "server.js" is loaded
process.env.HARAKA = process.env.HARAKA || path.resolve('.');
try {
require.paths.push(path.join(process.env.HARAKA, 'node_modules'));
}
catch(e) {
process.env.NODE_PATH = process.env.NODE_PATH ?
... | Fix paths not working on node 0.6 (hack alert) | Fix paths not working on node 0.6 (hack alert)
| JavaScript | mit | AbhilashSrivastava/haraka_sniffer,Dexus/Haraka,slattery/Haraka,julian-maughan/Haraka,fatalbanana/Haraka,hatsebutz/Haraka,craigslist/Haraka,ruffrey/hk,haraka/Haraka,fatalbanana/Haraka,baudehlo/Haraka,baudehlo/Haraka,AbhilashSrivastava/haraka_sniffer,Synchro/Haraka,smfreegard/Haraka,bsmr-x-script/Haraka,hatsebutz/Haraka,... |
72b1397b269ca3dd62d2ae4a0b617c413a450077 | karma.conf.js | karma.conf.js | module.exports = function(config) {
config.set({
frameworks: ['mocha'],
exclude: ['build/test/external.spec.js'],
files: [
'vendor/es5-shim.js',
'vendor/es5-sham.js',
'vendor/rsvp.js',
'vendor/unexpected-magicpen.min.js',
'build/test/promisePolyfill.js',
'unexpected.j... | module.exports = function(config) {
config.set({
frameworks: ['mocha'],
exclude: ['build/test/external.spec.js'],
files: [
'vendor/es5-shim.js',
'vendor/es5-sham.js',
'vendor/rsvp.js',
'vendor/unexpected-magicpen.min.js',
'build/test/promisePolyfill.js',
'unexpected.j... | Use the unexpected-dev project on browserstack for Travis "PR" builds | Use the unexpected-dev project on browserstack for Travis "PR" builds
https://github.com/travis-ci/travis-ci/issues/6652
| JavaScript | mit | unexpectedjs/unexpected |
7fc07e35df64869ccd86e4b4a3f956afdeef0f80 | lib/main.js | lib/main.js | 'use babel';
import levelsConfig from './levels-config';
import levelsServices from './levels-services';
import workspaceManager from './workspace-manager';
export default {
activate() {
workspaceManager.setUpWorkspace();
workspaceManager.activateEventHandlers();
workspaceManager.activateCommandHa... | 'use babel';
import languageRegistry from './language-registry';
import levelsConfig from './levels-config';
import levelsServices from './levels-services';
import workspace from './workspace';
import workspaceManager from './workspace-manager';
export default {
activate() {
workspaceManager.setUpW... | Destroy language registry and workspace on package deactivation | Destroy language registry and workspace on package deactivation
| JavaScript | mit | lakrme/atom-levels |
45cd43dec71103feb0445de96416132a0cf77d06 | lib/post.js | lib/post.js | var opener = require('opener')
var template = require('lodash.template')
var fs = require('fs')
var path = require('path')
var md = fs.readFileSync(path.join(__dirname, 'template.md'), 'utf8')
var message = template(md)
var endpoint = 'https://github.com/npm/support-cli/issues/new?body='
module.exports = function (ans... | var opener = require('opener')
var template = require('lodash.template')
var fs = require('fs')
var path = require('path')
var md = fs.readFileSync(path.join(__dirname, 'template.md'), 'utf8')
var message = template(md)
var endpoint = 'https://github.com/npm/npm/issues/new?body='
module.exports = function (answers) {
... | Update the target url to npm/npm from npm/support-cli | Update the target url to npm/npm from npm/support-cli
| JavaScript | isc | watilde/npm-report |
fb96e85071fa0f3b1343c236c91930f3f88970a7 | app/js/arethusa.core/directives/plugin_setting.js | app/js/arethusa.core/directives/plugin_setting.js | 'use strict';
angular.module('arethusa.core').directive('pluginSetting', [
'userPreferences',
function (userPreferences) {
return {
restrict: 'A',
scope: true,
link: function(scope, element, attrs) {
scope.change = function() {
var model = scope.setting.model;
var v... | 'use strict';
angular.module('arethusa.core').directive('pluginSetting', [
'userPreferences',
function (userPreferences) {
return {
restrict: 'A',
scope: true,
link: function(scope, element, attrs) {
scope.change = function() {
var model = scope.setting.model;
var v... | Fix calling of change function | pluginSetting: Fix calling of change function
A function itself is passed to this - not a pointer to a public plugin
function.
Fixes e.g. the bug that the `Preselect` setting in `morph` didn't
trigger when you clicked on it.
| JavaScript | mit | PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa |
b7247066e55fc83f51e753aab16fe29784d37584 | js/Report.js | js/Report.js | module.exports = (function() {
return function($record) {
this.name = $record.find('.item-list__name').html();
var _info = $record.children('div');
this.salePrice = _info.eq(1).text().trim();
this.buyer = _info.eq(2).text().trim();
this.saleDate = eval(_info.eq(3).children('script').text().split('... | module.exports = (function() {
function buildDate(match, p1) {
var d = new Date();
var date = [
d.getFullYear(),
('0' + (d.getMonth() + 1)).substr(-2),
('0' + d.getDate()).substr(-2)
].join('/');
return [date, ' ', ('0'+p1).substr(-2), ':'].join('');
}
return function($record) {... | Replace '本日' with date string | Replace '本日' with date string
| JavaScript | mit | sakmas/RetainerReport,sakmas/RetainerReport |
ecc8380f34ae9587251e4546a106a88f644c30d7 | routes/recipes/index.js | routes/recipes/index.js | var express = require('express');
var router = express.Router();
var JsonDB = require('node-json-db');
var _ = require('lodash');
// Recipes listing
router.get('/', function (req, res, next) {
var db = new JsonDB('db', false, false);
var recipes = db.getData('/recipes');
// Expand requested resources if they ex... | var express = require('express');
var router = express.Router();
var JsonDB = require('node-json-db');
var _ = require('lodash');
// Recipes listing
router.get('/', function (req, res, next) {
var db = new JsonDB('db', false, false);
var recipes = db.getData('/recipes');
// Expand requested resources if they ex... | Prepare branch for section 2.2 tutorial | Prepare branch for section 2.2 tutorial
| JavaScript | mit | adamsea/recipes-api |
269b494bb12983da3bc46518f3326cdeda89a837 | app/controller/BuildController.js | app/controller/BuildController.js | var Schema = require('./../Schema');
function BuildController(mongoose){
var convert = function(build){
return build
};
this.get = function (req, res) {
var Build = mongoose.model('Build', Schema.buildSchema);
Build.findOne({"blueprint.owner": req.params.owner, "blueprint.repo": r... | var _ = require('underscore'),
Schema = require('./../Schema'),
CONFIG = require('config');
function BuildController(mongoose){
var convert = function(build){
var makeUrl = function(owner, repo, name, type){
return CONFIG.url + '/file/' + owner + '/' + repo + '/' + name + '/' + type;
... | Convert file paths to urls | Convert file paths to urls
| JavaScript | apache-2.0 | InTeXration/InTeXration-Server |
c065772746dbde7997ac583bbc49e54f1fed34cd | client/src/js/App.js | client/src/js/App.js | import { Component } from 'react';
import h from 'react-hyperscript';
import Quote from './components/Quote';
import getRandomQuote from './utils/getRandomQuote';
class App extends Component {
constructor(props) {
super(props);
this.state = {
text: 'Loading...',
name: 'website',
};
}
c... | import { Component } from 'react';
import h from 'react-hyperscript';
import Quote from './components/Quote';
import getRandomQuote from './utils/getRandomQuote';
class App extends Component {
constructor(props) {
super(props);
this.state = {
text: 'Loading...',
name: 'website',
};
}
c... | Revert to name 'website' on error | Revert to name 'website' on error
| JavaScript | mit | richarddewit/random-quotes,richarddewit/random-quotes |
2c11d861f3185d62c4ce8661594f752145fc5242 | lib/routes.js | lib/routes.js |
var Router = require('routes');
var router = new Router();
var st = require('st');
var fs = require('fs');
var mount = st({
path: __dirname + '/static/', // resolved against the process cwd
url: 'boot/', // defaults to '/'
// indexing options
index: 'index', // auto-index, the default
dot: false // defaul... |
var Router = require('routes');
var router = new Router();
var st = require('st');
var fs = require('fs');
var mount = st({
path: __dirname + '/../static/', // resolved against the process cwd
url: 'boot/', // defaults to '/'
// indexing options
index: 'index', // auto-index, the default
dot: false // def... | Check bootdir async and fix static path | Check bootdir async and fix static path
| JavaScript | mit | theredcat/forge |
887e9c90db98fad0ff3df681d12e1af080923328 | app/session-stores/application.js | app/session-stores/application.js | import LocalStorageStore from 'ember-simple-auth/session-stores/local-storage';
export default LocalStorageStore.extend({
key: 'ghost:session'
});
| import AdaptiveStore from 'ember-simple-auth/session-stores/adaptive';
export default AdaptiveStore.extend({
localStorageKey: 'ghost:session',
cookieName: 'ghost:session'
});
| Use AdaptiveStore for cookie fallback if local storage is unavailable | Use AdaptiveStore for cookie fallback if local storage is unavailable
closes #5829
- switch application session store to inherit from ESA's `AdaptiveStore` instead of `LocalStorageStore`
| JavaScript | mit | airycanon/Ghost-Admin,kevinansfield/Ghost-Admin,TryGhost/Ghost-Admin,dbalders/Ghost-Admin,acburdine/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,dbalders/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,kevinansfield/Ghost-Admin,acburdine/Ghost-Admin |
205f3a920fe5a88c8427b637d38ab10a3a733f39 | selfish-youtube.user.js | selfish-youtube.user.js | // ==UserScript==
// @name Selfish Youtube
// @version 2013-05-06
// @namespace https://github.com/ASzc/selfish-youtube
// @description On the watch page, remove the share panel.
// @include http://youtube.com/watch*
// @include http://*.youtube.com/w... | // ==UserScript==
// @name Selfish Youtube
// @version 2013-05-06
// @namespace https://github.com/ASzc/selfish-youtube
// @description On the watch page, remove the share panel.
// @include http://youtube.com/watch*
// @include http://*.youtube.com/w... | Remove instanceof check for button list | Remove instanceof check for button list
| JavaScript | mit | ASzc/selfish-youtube |
948938599576c189ae96dc2c6dd38bf5591ac682 | spec/util/app-service-mock.js | spec/util/app-service-mock.js | "use strict";
var EventEmitter = require("events");
var util = require("util");
var instance = null;
function MockAppService() {
EventEmitter.call(this);
}
util.inherits(MockAppService, EventEmitter);
MockAppService.prototype.listen = function(port) {
// NOP
};
MockAppService.prototype._trigger = function(ev... | "use strict";
var EventEmitter = require("events");
var util = require("util");
var instance = null;
function MockAppService() {
EventEmitter.call(this);
}
util.inherits(MockAppService, EventEmitter);
MockAppService.prototype.listen = function(port) {
// NOP
};
MockAppService.prototype._trigger = function(ev... | Make instance() not create new singletons | Make instance() not create new singletons
| JavaScript | apache-2.0 | matrix-org/matrix-appservice-irc,matrix-org/matrix-appservice-irc,matrix-org/matrix-appservice-irc |
dc1056891723ea4ca63730114384bb2bb1502f1e | lib/renderer/extensions/storage.js | lib/renderer/extensions/storage.js |
const getStorage = () => {
const data = window.localStorage.getItem('__chrome.storage.sync__')
if (data != null) {
return JSON.parse(data)
} else {
return {}
}
}
const setStorage = (storage) => {
const json = JSON.stringify(storage)
window.localStorage.setItem('__chrome.storage.sync__', json)
}
... |
const getStorage = () => {
const data = window.localStorage.getItem('__chrome.storage.sync__')
if (data != null) {
return JSON.parse(data)
} else {
return {}
}
}
const setStorage = (storage) => {
const json = JSON.stringify(storage)
window.localStorage.setItem('__chrome.storage.sync__', json)
}
... | Handle the three get cases | Handle the three get cases
| JavaScript | mit | MaxWhere/electron,jhen0409/electron,rajatsingla28/electron,electron/electron,brave/muon,brenca/electron,joaomoreno/atom-shell,rajatsingla28/electron,brave/electron,leethomas/electron,bbondy/electron,miniak/electron,MaxWhere/electron,aliib/electron,deed02392/electron,minggo/electron,dongjoon-hyun/electron,aliib/electron... |
642ca5519af0db0c6a7ad37c51d22cf7caddb8e6 | public/backbone-marionette/js/main.js | public/backbone-marionette/js/main.js | /* global BackboneWizard, Marionette, Backbone, $ */
window.BackboneWizard = {};
var app = new Marionette.Application();
app.addRegions({
wizard: '#wizard'
});
app.addInitializer(function () {
BackboneWizard.itemList = new app.Collections.ItemList();
BackboneWizard.transaction = new app.Models.Transacti... | /* global BackboneWizard, Marionette, Backbone, $ */
window.BackboneWizard = {};
var app = new Marionette.Application();
app.addRegions({
wizard: '#wizard'
});
app.addInitializer(function () {
var wizardController = new app.Controllers.WizardController();
BackboneWizard.itemList = new app.Collections.I... | Remove controller from the global namespace. | Remove controller from the global namespace.
| JavaScript | mit | jonkemp/wizard-mvc |
2b87bbf32e46a5339d99c3293e91dcf2c88d0c92 | extensions/gdata/module/scripts/project-injection.js | extensions/gdata/module/scripts/project-injection.js | // Client side resources to be injected for gData extension
// Add items to the exporter menu
MenuBar.insertBefore(
[ "core/project", "core/export", "core/export-templating" ],
[
{
"label":"Google Spreadsheet",
"click": function() {}
},
... | // Client side resources to be injected for gData extension
// Add items to the exporter menu
//ExportManager.MenuItems.append(
// [ "core/project", "core/export", "core/export-templating" ],
// [
// {
// "label":"Google Spreadsheet",
// "click": function() {}
// ... | Comment out unused exporter injection. Target has moved anyway | Comment out unused exporter injection. Target has moved anyway
git-svn-id: 434d687192588585fc4b74a81d202f670dfb77fb@1550 7d457c2a-affb-35e4-300a-418c747d4874
| JavaScript | mit | DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier,DTL-FAIRData/FAIRifier |
c6b6a6c97b588ea1aff9e47518fa4a7af6dbaae2 | packages/redux-simple-auth/test/utils/createStore.js | packages/redux-simple-auth/test/utils/createStore.js | import { applyMiddleware, createStore } from 'redux'
import reducer from '../../src/reducer'
export default ({ middleware, initialState = {} }) =>
createStore(reducer, initialState, applyMiddleware(middleware))
| import { applyMiddleware, combineReducers, createStore } from 'redux'
import reducer from '../../src/reducer'
export default ({ middleware, initialState = {} }) =>
createStore(
combineReducers({ session: reducer }),
initialState,
applyMiddleware(middleware)
)
| Use combine reducers in test store | Use combine reducers in test store
| JavaScript | mit | jerelmiller/redux-simple-auth |
fb1bd1add510e9780ca34d83dead102a68336f0a | src/engines/nunjucks.js | src/engines/nunjucks.js | var marked = require('marked');
var nunjucks = require('nunjucks');
var path = require('path');
module.exports = function(options) {
options || (options = {});
options.path || (options.path = 'template');
var env = new nunjucks.Environment(
new nunjucks.FileSystemLoader(options.path),
{noCache: t... | var marked = require('marked');
var nunjucks = require('nunjucks');
var path = require('path');
module.exports = function(options) {
options || (options = {});
options.path || (options.path = 'template');
var env = new nunjucks.Environment(
new nunjucks.FileSystemLoader(options.path),
{noCache: t... | Make markdown filter not to throw error for null or undefined | Make markdown filter not to throw error for null or undefined
| JavaScript | mit | hanamura/gulp-minisite,hanamura/gulp-minisite |
90c594d56fec5095b4ed19b05e29b378b313f3a7 | examples/default.js | examples/default.js | /**
* The default template based URL, used as it by the template cache.
* @type {string}
*/
ngeo.baseTemplateUrl = '../src/directives/partials';
| /**
* The default template based URL, used as-is by the template cache.
* @type {string}
*/
ngeo.baseTemplateUrl = '../src/directives/partials';
/**
* The default modules template based URL, used as-is by the template cache.
* @type {string}
*/
ngeo.baseModuleTemplateUrl = '../src/modules';
| Fix examples using module templates | Fix examples using module templates
| JavaScript | mit | adube/ngeo,adube/ngeo,adube/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,adube/ngeo,camptocamp/ngeo |
2488ca21adecf94f36d07efe95dbda2af13905da | config/grunt/clean.js | config/grunt/clean.js | module.exports = {
package: {
src: [ '<%= paths.tmp %>' ]
},
wpcom: {
src: [
'<%= paths.wpcom %>/*',
'!<%= paths.wpcom %>/.svn',
'!<%= paths.wpcom %>/inc',
'!<%= paths.wpcom %>/includes',
'<%= paths.wpcom %>/includes/*',
'!<%= paths.wpcom %>/includes/wpcom',
'!<%= paths.wpcom %>/languages'
... | module.exports = {
package: {
src: [ '<%= paths.tmp %>' ]
},
wpcom: {
src: [
'<%= paths.wpcom %>/*',
'!<%= paths.wpcom %>/.svn',
'!<%= paths.wpcom %>/inc',
'!<%= paths.wpcom %>/includes',
'<%= paths.wpcom %>/includes/*',
'!<%= paths.wpcom %>/includes/plugins',
'<%= paths.wpcom %>/includes/pl... | Move WP.com support to /includes/plugins/jetpack-pro/*. | Move WP.com support to /includes/plugins/jetpack-pro/*.
| JavaScript | mit | cedaro/cedaro-wp-theme-config,cedaro/wp-theme-config |
6f254d5fda78d107d2fdbe3501917c09acb05de5 | client/app/router.js | client/app/router.js | import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function () {
this.route('cabins', {path: '/hytter', resetNamespace: true}, function () {
this.route('edit', {path: '/:id'});
});
this.route('session.login... | import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function () {
this.route('cabins', {path: '/hytter', resetNamespace: true}, function () {
this.route('edit', {path: '/:id'});
this.route('new', {path: '/ny'... | Add route for adding new cabin | Add route for adding new cabin
| JavaScript | mit | Turistforeningen/Hytteadmin,Turistforeningen/Hytteadmin |
2f89e7f3f475bae040f6529991bc483a1b27d85b | lib/webapi.js | lib/webapi.js | var TradeOfferManager = require('./index.js');
var EResult = require('../resources/EResult.js');
TradeOfferManager.prototype._apiCall = function(httpMethod, method, version, input, callback) {
var iface = 'IEconService';
if(typeof method === 'object') {
iface = method.iface;
method = method.method;
}
var op... | var TradeOfferManager = require('./index.js');
var EResult = require('../resources/EResult.js');
TradeOfferManager.prototype._apiCall = function(httpMethod, method, version, input, callback) {
var iface = 'IEconService';
if(typeof method === 'object') {
iface = method.iface;
method = method.method;
}
var op... | Include eresult property in WebAPI errors | Include eresult property in WebAPI errors
| JavaScript | mit | DoctorMcKay/node-steam-tradeoffer-manager,FelikZ/node-steam-tradeoffer-manager,nseckinoral/node-steam-tradeoffer-manager |
3302a5331b0960c75ba76e99e167ea6452379923 | js/mylib/popover.js | js/mylib/popover.js |
// ----------------------------------------------------------------
// Popover Class
class PopoverModel extends CommonModel {
constructor({
name = 'Popover',
selector = null,
help = 'popover',
trigger = 'hover'
} = {})
{
super({
name: name
});
this.NAME = name;
this.SE... |
// ----------------------------------------------------------------
// Popover Class
class PopoverModel extends CommonModel {
constructor({
name = 'Popover',
selector = null,
help = 'popover',
trigger = 'hover'
} = {})
{
super({
name: name,
echoPermission: false
});
... | Add echoPermission option in PopoverModel | Add echoPermission option in PopoverModel
| JavaScript | mit | AyaNakazawa/business_card_bank,AyaNakazawa/business_card_bank,AyaNakazawa/business_card_bank |
93043e90d1e352c089a00cd65a5bbfed12e4453a | components/Footer.js | components/Footer.js | var React = require('react'),
DOM = React.DOM;
module.exports = React.createClass({
propTypes: {
version: React.PropTypes.string,
year: React.PropTypes.number,
author: React.PropTypes.string,
email: React.PropTypes.string,
githubUrl: React.PropTypes.string
},
getDefaultProps: function () {
return {
... | var React = require('react'),
DOM = React.DOM;
module.exports = React.createClass({
propTypes: {
version: React.PropTypes.string,
year: React.PropTypes.number,
author: React.PropTypes.string,
email: React.PropTypes.string,
githubUrl: React.PropTypes.string
},
getDefaultProps: function () {
return {
... | Update component to pass tests. | Update component to pass tests.
| JavaScript | mit | ScottMaclure/scott-cv,ScottMaclure/scott-cv |
c23f9754dc931f0bc0ffae1c7f8a4945d274676a | src/load.js | src/load.js | const _ = require('lodash/fp')
const fs = require('fs')
const dsl = require('./dsl')
const vm = require('vm')
module.exports = function (file) {
return vm.runInNewContext(fs.readFileSync(file),
_.assign(dsl, { module }),
{ filename: file })
}
| const fs = require('fs')
const dsl = require('./dsl')
const vm = require('vm')
module.exports = function (file) {
return vm.runInNewContext(fs.readFileSync(file),
Object.assign({ module, require }, global, dsl),
{ filename: file })
}
| Fix missing globals in PureSpec modules | Fix missing globals in PureSpec modules
| JavaScript | isc | nickmccurdy/purespec |
3085397f29285a2a0b2f8e08cd839ed7a2278b26 | lib/core/pmodule.js | lib/core/pmodule.js | const pp = require('./ppublish');
const pt = require('./ptalk');
const utils = require('../common/utils');
const fs = require('fs');
const commander = require('commander');
const path = require('path');
commander
.option('-m --module <file>', 'specify a pjs file')
.option('-s --se... | const pp = require('./ppublish');
const pt = require('./ptalk');
const utils = require('../common/utils');
const fs = require('fs');
const commander = require('commander');
const path = require('path');
const { exec } = require('child_process');
commander
.option('-m --module <file>'... | Add automatic pjs module search | Add automatic pjs module search
| JavaScript | mit | pluggerjs/plugger,pluggerjs/plugger |
8a680bb3557f44412c3f2c021fc9ba9512acc70d | public/js/main.js | public/js/main.js | $(document).ready(function() {
// Set title preview
$("#title").on('keyup', function(e) {
$("#title-preview").text($("#title").val());
$("#title-preview").attr("href", $("#url").val());
})
// Set image preview
$("#url").on('keyup', function(e) {
$("#img-preview").attr("src", $("#url").val());
})... | $(document).ready(function() {
// Set title preview
$("#title").on('keyup', function(e) {
$("#title-preview").text($("#title").val());
$("#title-preview").attr("href", $("#url").val());
})
// Set image preview
$("#url").on('keyup', function(e) {
$("#img-preview").attr("src", $(this).val());
})
... | Replace all broken image links in js | Replace all broken image links in js
| JavaScript | mit | HermanFassett/project-osiris-website,HermanFassett/pinternetapp,HermanFassett/pinternetapp,HermanFassett/project-osiris-website |
1fa6636d9f986ee80d8af39658c1c89016083f9e | test/typescript.spec.js | test/typescript.spec.js | import * as tt from 'typescript-definition-tester'
describe('TypeScript definitions', () => {
it('should compile against index.d.ts', (done) => {
tt.compileDirectory(
__dirname + '/typescript',
fileName => fileName.match(/\.ts$/),
() => done()
)
})
})
| import * as tt from 'typescript-definition-tester'
describe('TypeScript definitions', function() {
this.timeout(0)
it('should compile against index.d.ts', (done) => {
tt.compileDirectory(
__dirname + '/typescript',
fileName => fileName.match(/\.ts$/),
() => done()
)
})
})
| Disable timeout for TypeScript definitions tests | Disable timeout for TypeScript definitions tests
| JavaScript | mit | gaearon/redux,tappleby/redux,lifeiscontent/redux,tatsuhino/reactPractice,lifeiscontent/redux,jas-chen/typed-redux,tappleby/redux,doerme/redux,roth1002/redux,doerme/redux,jas-chen/typed-redux,joaomilho/redux,joshwreford/idle-game,CompuIves/redux,chentsulin/redux,splendido/redux,bvasko/redux,gaearon/redux,neighborhood999... |
8e4c8cb8995d2f6a044226966d90d3de3061d639 | routes/version.js | routes/version.js | var middleware = require('../middleware');
var Router = require('express').Router();
var request = require('superagent');
const IMG_URL = process.env.IMG_URL || 'http://localhost:9003';
Router.route('/version/api')
.get(middleware.authenticate('user', 'guest'))
.get(function(req, res) {
var ... | var middleware = require('../middleware');
var Router = require('express').Router();
var request = require('superagent');
const IMG_URL = process.env.IMG_URL || 'http://localhost:9003';
Router.route('/version/api')
.get(middleware.authenticate('user', 'guest'))
.get(function(req, res) {
var ... | Handle error in case img service is down. | Handle error in case img service is down.
| JavaScript | mit | spherelot/teamboard-api,nikolauska/teamboard-api,N4SJAMK/teamboard-api,tanelih/teamboard-api,JanKuukkanen/teamboard-api |
7932deafc53587b20e479bf4b219cb99e71c2db4 | tokenize.js | tokenize.js | module.exports = function (sch) {
var noComments = function (line) {
var i = line.indexOf('//')
return i > -1 ? line.slice(0, i) : line
}
var noMultilineComments = function () {
var inside = false
return function (token) {
if (token === '/*') {
inside = true
return false
... | module.exports = function (sch) {
var noComments = function (line) {
var i = line.indexOf('//')
return i > -1 ? line.slice(0, i) : line
}
var noMultilineComments = function () {
var inside = false
return function (token) {
if (token === '/*') {
inside = true
return false
... | Fix tokenizing of comment after closing brace of last message | Fix tokenizing of comment after closing brace of last message
| JavaScript | mit | mafintosh/protocol-buffers-schema,cpdeethree/protocol-buffers-schema,mbrtargeting/protocol-buffers-schema |
9afa194f7d40dded915b9403169bfab21e8c9b85 | upgrades.js | upgrades.js | /** @namespace H5PUpgrades */
var H5PUpgrades = H5PUpgrades || {};
H5PUpgrades['H5P.Agamotto'] = (function ($) {
return {
1: {
3: function (parameters, finished) {
// Update image items
parameters.items = parameters.items.map( function (item) {
// Create new image structure
... | /** @namespace H5PUpgrades */
var H5PUpgrades = H5PUpgrades || {};
H5PUpgrades['H5P.Agamotto'] = (function ($) {
return {
1: {
3: function (parameters, finished) {
// Update image items
if (parameters.items) {
parameters.items = parameters.items.map( function (item) {
... | Fix upgrade script: Check for empty items | Fix upgrade script: Check for empty items
| JavaScript | mit | otacke/h5p-agamotto |
07f6cb3dc55d0e615d1eceddd21364a2d4473e7d | fpl-iwon-scroller.user.js | fpl-iwon-scroller.user.js | // ==UserScript==
// @name FPL Iwon scroller
// @namespace mikemanger
// @grant none
// @include https://fplcomps.iwn.io/*/*
// @updateURL https://raw.githubusercontent.com/mikemanger/userscripts/master/fpl-iwon-scroller.user.js
// @downloadURL https://raw.githubusercontent.com/mikemanger/userscrip... | // ==UserScript==
// @name FPL Iwon scroller
// @namespace mikemanger
// @grant none
// @include https://fplcomps.iwn.io/*/*
// @updateURL https://raw.githubusercontent.com/mikemanger/userscripts/master/fpl-iwon-scroller.user.js
// @downloadURL https://raw.githubusercontent.com/mikemanger/userscrip... | Add clicker to fpl script | Add clicker to fpl script | JavaScript | mit | ohmanger/userscripts |
947e11c1ed484dc5c973253b7d567e551a9954a6 | src/array.spec.js | src/array.spec.js | import test from 'tape'
import chunkify from './index'
test('should require an array', t => {
t.throws(() => {
chunkify.array()
}, /Usage: chunkify.array\(Array array, Function fn, \[Object] options\) - bad array/);
t.end()
});
test('should require a function', t => {
t.throws(() => {
chunkify.array(... | import test from 'tape'
import chunkify from './index'
import ChunkifyOptions from './options'
import sinon from 'sinon'
let spy_ChunkifyOptions_of = (callback) => {
let spy = sinon.spy(ChunkifyOptions, 'of');
callback(spy);
ChunkifyOptions.of.restore()
};
test('should require an array', t => {
t.throws(() =... | Test delegation of options parsing | Test delegation of options parsing
| JavaScript | mit | yangmillstheory/chunkify,yangmillstheory/chunkify |
e8fc817e1ea2c678ba1c0f0abd230666c38bd5a5 | slyd/app/controllers/template/index.js | slyd/app/controllers/template/index.js | import BaseController from 'portia-web/controllers/base-controller';
export default BaseController.extend({
breadCrumb: null,
_breadCrumb: null,
});
| import BaseController from '../base-controller';
export default BaseController.extend({
breadCrumb: null,
_breadCrumb: null,
});
| Use relative path for template | Use relative path for template
| JavaScript | bsd-3-clause | PrasannaVenkadesh/portia,anjuncc/portia,livepy/portia,NicoloPernigo/portia,NoisyText/portia,sntran/portia,naveenvprakash/portia,chennqqi/portia,livepy/portia,NoisyText/portia,SouthStar/portia,livepy/portia,PrasannaVenkadesh/portia,hanicker/portia,NicoloPernigo/portia,anjuncc/portia,chennqqi/portia,Youwotma/portia,sntra... |
4db1167055bb9f8b16f17a33906754761aa38adb | src/test/e2e/basic-scenarios.spec.js | src/test/e2e/basic-scenarios.spec.js | describe('idai field app', function() {
function createObject() {
return clickCreateObject()
.then(selectTypeObject)
.then(typeInIdentifier)
.then(saveObject);
}
function clickCreateObject() {
return element(by.id('object-overview-button-cr... | describe('idai field app', function() {
function createObject() {
return clickCreateObject()
.then(selectTypeObject)
.then(typeInIdentifier)
.then(saveObject);
}
function clickCreateObject() {
return element(by.id('object-overview-button-cr... | Add basic e2e for search field. | Add basic e2e for search field.
| JavaScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client |
fe3799bb4816094dfe5d5facede2ff00b8adaf05 | test/unit/sprites_rendered-target.js | test/unit/sprites_rendered-target.js | var test = require('tap').test;
var RenderedTarget = require('../../src/sprites/rendered-target');
var Sprite = require('../../src/sprites/sprite');
test('clone effects', function (t) {
// Create two clones and ensure they have different graphic effect objects.
// Regression test for Github issue #224
var ... | var test = require('tap').test;
var RenderedTarget = require('../../src/sprites/rendered-target');
var Sprite = require('../../src/sprites/sprite');
test('clone effects', function (t) {
// Create two clones and ensure they have different graphic effect objects.
// Regression test for Github issue #224
var ... | Add test for gfx reset on stop | Add test for gfx reset on stop
| JavaScript | bsd-3-clause | LLK/scratch-vm,LLK/scratch-vm,LLK/scratch-vm |
a07f685522c00da4a278391424e28e3e7699913f | lib/validator.js | lib/validator.js | const RateLimiter = require("rolling-rate-limiter");
const prettyMs = require('pretty-ms');
const config = require('../config');
const validKeys = ['key1','key2', 'key3', 'key4', 'key5']; //TODO replace API keys in request with JWT-token?
const limiter = RateLimiter({
interval: 60*60*1000, //1 hour in miliseconds
... | const RateLimiter = require("rolling-rate-limiter");
const prettyMs = require('pretty-ms');
const config = require('../config');
const validKeys = process.env.CLIENT_KEYS.split(',');
const limiter = RateLimiter({
interval: 60*60*1000, //1 hour in miliseconds
maxInInterval: config.max_requests_per_hour
});
const... | Read client keys from environment variable rather than hardcoding in source | Read client keys from environment variable rather than hardcoding in source
| JavaScript | mit | umasudhan/weather |
0b15a5e070ddf0ab4f2a1cbda473facbe6b0dc69 | test/unit/model/association.setters.js | test/unit/model/association.setters.js | var assert = require('assert'),
manyToManyFixture = require('../../support/fixtures/model/context.manyToMany.fixture'),
Model = require('../../../lib/waterline/model');
describe('instance methods', function() {
describe('association setters', function() {
////////////////////////////////////////////////... | var assert = require('assert'),
manyToManyFixture = require('../../support/fixtures/model/context.manyToMany.fixture'),
Model = require('../../../lib/waterline/model');
describe('instance methods', function() {
describe('association setters', function() {
////////////////////////////////////////////////... | Add unit tests on .add() and .remove() | Add unit tests on .add() and .remove() | JavaScript | mit | metidia/waterline,3032441712/waterline,jonniedeb/waterline,devinivy/waterline,Atlantis-Software/waterline,Zaggen/waterline,hippich/waterline,mmiller42/waterline,particlebanana/waterline,listepo/waterline,waterlinejs/waterline,contra/waterline,postmanlabs/sails-mysql-transactions-waterline,luislobo/waterline,kriswill/wa... |
d579690b64eff2ba7c280dbc3918036c436a0a28 | package-audit.js | package-audit.js | const exec = require('child_process').exec;
const AUDIT_EXCEPTIONS = ['handlebars'];
const execute = (command, callback) => {
exec(
command, {
maxBuffer: 2000 * 1024
},
(error, stdout, stderr) => {
callback(stdout);
}
);
};
execute('npm audit --json', json => {
const advisories = JSO... | const exec = require('child_process').exec;
const AUDIT_EXCEPTIONS = ['handlebars', 'decompress'];
const execute = (command, callback) => {
exec(
command, {
maxBuffer: 2000 * 1024
},
(error, stdout, stderr) => {
callback(stdout);
}
);
};
execute('npm audit --json', json => {
const ad... | Add decompress to audit exceptions | Add decompress to audit exceptions
| JavaScript | mit | MyEtherWallet/MyEtherWallet,MyEtherWallet/MyEtherWallet,MyEtherWallet/MyEtherWallet |
a81cee190ec4a9f2d392e3b809c9813693b1b38c | main/directives/fixContainerHeight.js | main/directives/fixContainerHeight.js | 'use strict';
module.exports = [
'$rootScope', '$window', '$timeout',
function FixContainerHeight($rootScope, $window, $timeout) {
return {
restrict: 'A',
link: function($scope, el) {
function setParentHeight() {
var pel = el[0].parentNode;
var h = el[0].offsetHeight;
... | 'use strict';
module.exports = [
'$rootScope', '$window', '$timeout',
function FixContainerHeight($rootScope, $window, $timeout) {
return {
restrict: 'A',
link: function($scope, el) {
function setParentHeight() {
var pel = el[0].parentNode;
var h = el[0].offsetHeight;
... | Fix content height not being set on Safari | Fix content height not being set on Safari
| JavaScript | mit | unkhz/almost-static-site,unkhz/almost-static-site |
fcd7ac0ad73f1469f8f248a4e460d68c469168fa | lib/inlineContent.js | lib/inlineContent.js | 'use strict';
var extractCss = require('extract-css'),
inlineCss = require('./inline-css');
module.exports = function inlineContent(src, options) {
return new Promise(function (resolve, reject) {
var content;
if (!options.url) {
reject('options.url is required');
}
... | 'use strict';
var Promise = require('bluebird'),
extractCss = require('extract-css'),
inlineCss = require('./inline-css');
module.exports = function inlineContent(src, options) {
return new Promise(function (resolve, reject) {
var content;
if (!options.url) {
reject('options.u... | Fix error in node v0.10 missing Promises. | Fix error in node v0.10 missing Promises.
| JavaScript | mit | jonkemp/inline-css,jonkemp/inline-css |
8429a6e8722f1ada46c7b3a055785f8d2da41738 | webpack.config.js | webpack.config.js | module.exports = {
entry: './client/src/index.jsx',
output: {
path: './client/dist',
filename: 'index.bundle.js',
},
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
}
}]
},
dev... | var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'webpack-hot-middleware/client',
'./client/src/index.jsx'
],
output: {
path: path.join(__dirname, '/client/dist'),
filename: 'index.bundle.js',
},
plugins: [
new webpack.HotModuleReplacementPlugin(),... | Add hot module loading plugin for webpack | Add hot module loading plugin for webpack
| JavaScript | mit | derektliu/Picky-Notes,derektliu/Picky-Notes,folksy-squid/Picky-Notes,folksy-squid/Picky-Notes,inspiredtolive/Picky-Notes,folksy-squid/Picky-Notes,derektliu/Picky-Notes,inspiredtolive/Picky-Notes,inspiredtolive/Picky-Notes |
e06977ff6a9c5cff55e6f55e769b915896bb6235 | .eslintrc.js | .eslintrc.js | module.exports = {
extends: [
'airbnb-base',
'./common.js'
],
parser: 'babel-eslint',
plugins: [
'babel',
'import',
],
rules: {
'func-names': 0,
curly: ['error', 'all']
},
};
| module.exports = {
extends: [
'airbnb-base'
],
parser: 'babel-eslint',
plugins: [
'babel',
'import',
],
rules: {
'func-names': 0,
curly: ['error', 'all']
},
};
| Fix import file not exists in project. | Fix import file not exists in project.
| JavaScript | mit | getninjas/gaiden,getninjas/gaiden |
14fe7b90cf803499e9f96adaf742a6f71b70499d | .eslintrc.js | .eslintrc.js | module.exports = {
"extends": "airbnb",
"plugins": [
"react"
]
}; | module.exports = {
"extends": "airbnb",
"plugins": [
"react"
],
"env": {
"node": true,
"mocha": true,
},
};
| Add envs to eslint. Fix indentation | Add envs to eslint. Fix indentation
| JavaScript | mit | wooken/mptlog |
927fa4a323537c8f326988bdcb0581f1c47e45fd | node/spec/lib/redirecter/http_spec.js | node/spec/lib/redirecter/http_spec.js | describe('Redirecter::Http', function() {
var RedirecterHttp = require('../../../lib/redirecter/http'),
DummyServer = require('../../support/dummy_server'),
EasyClient = require('../../support/easy_client'),
Http = require('http'),
server,
subject;
beforeAll(function(){
server = n... | describe('Redirecter::Http', function() {
var RedirecterHttp = require('../../../lib/redirecter/http'),
DummyServer = require('../../support/dummy_server'),
EasyClient = require('../../support/easy_client'),
nock = require('nock'),
Http = require('http'),
server,
subject;
befor... | Use nock for request mocking | Use nock for request mocking
| JavaScript | mit | darthjee/frog |
77f2f532b5ac1299b3749e036d9d1d92c075852f | .eslintrc.js | .eslintrc.js | module.exports = {
extends: [
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"plugin:prettier/recommended", // Enables eslint-plugin-prettier ... | module.exports = {
extends: [
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin
"plugin:prettier/recommended" // Enables eslint-plugin-prettier a... | Remove obsolete entry from eslint config. | Remove obsolete entry from eslint config.
| JavaScript | mit | vikpe/react-webpack-typescript-starter,vikpe/react-webpack-typescript-starter |
a255303b1a08ee56756c78e69ad51b3589adfbc5 | .eslintrc.js | .eslintrc.js | const config = {
extends: ['standard', 'prettier', 'prettier/standard'],
plugins: ['import', 'mocha'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/test/**/*.js',
'**/bootstrap-unexpected-markdown.js'
],
optionalDepen... | const config = {
extends: ['standard', 'prettier', 'prettier/standard'],
plugins: ['import', 'mocha'],
env: {
mocha: true
},
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/test/**/*.js',
'**/bootstrap-unexpected-markdown.js'
... | Add mocha env to the eslint config | Add mocha env to the eslint config
| JavaScript | mit | unexpectedjs/unexpected |
73b04734a72b2156284efd1c50371e3da6adebbc | app/js/utils.js | app/js/utils.js | /*exported _*/
'use strict';
var _ = {};
_.find = function( array, callback ) {
var element;
for ( var i = 0, il = array.length; i < il; i++ ) {
element = array[i];
if ( callback( element, i, array ) ) {
return element;
}
}
};
| /*exported _*/
'use strict';
var _ = {};
_.find = function( array, callback ) {
var element;
for ( var i = 0, il = array.length; i < il; i++ ) {
element = array[i];
if ( callback( element, i, array ) ) {
return element;
}
}
};
_.set = function( array, indices, value ) {
if ( !Array.isArray(... | Add setter with lazy multi-dimensional array indexing. | Add setter with lazy multi-dimensional array indexing.
| JavaScript | mit | razh/osc-dev |
f9b18dd70a3fe58b9e48a5899a9a4a64bf77199b | src/EntitySchema.js | src/EntitySchema.js | export default class EntitySchema {
constructor(key, options = {}) {
if (!key || typeof key !== 'string') {
throw new Error('A string non-empty key is required');
}
this._key = key;
const idAttribute = options.idAttribute || 'id';
this._getId = typeof idAttribute === 'function' ? idAttribu... | export default class EntitySchema {
constructor(key, options = {}) {
if (!key || typeof key !== 'string') {
throw new Error('A string non-empty key is required');
}
this._key = key;
const idAttribute = options.idAttribute || 'id';
this._getId = typeof idAttribute === 'function' ? idAttribu... | Revert "Schema.define could return associated instance" | Revert "Schema.define could return associated instance"
| JavaScript | mit | gaearon/normalizr,paularmstrong/normalizr,dojiboy9/normalizr,paularmstrong/normalizr,dojiboy9/normalizr |
7d22c06edeae42488b2d5cfc59ca5a4ee15182d7 | public/js/otworlds.minimap.js | public/js/otworlds.minimap.js | Mapeditor.Minimap = {};
Mapeditor.Minimap.loaded = false;
Mapeditor.Minimap.loadStatic = function(){
jQuery('#minimap .content')
.html('<img />');
jQuery('#minimap img')
.attr('src', Mapeditor.config.urls.backend + 'map/' + Mapeditor.map.meta.id + '/minimap?' + new Date().getTime())
.css({
'ma... | Mapeditor.Minimap = {};
Mapeditor.Minimap.loaded = false;
Mapeditor.Minimap.loadStatic = function(){
jQuery('#minimap .content')
.html('<img />');
jQuery('#minimap img')
.attr('src', Mapeditor.config.urls.backend + 'map/' + Mapeditor.map.meta.id + '/minimap?' + new Date().getTime())
.css({
'ma... | Move to coordinate when clicked | Move to coordinate when clicked
| JavaScript | mit | Sleavely/OTWorlds,Sleavely/OTWorlds,Sleavely/OTWorlds,Sleavely/OTWorlds |
ed3e3595606b5fa8cd529b0498cf702570ab5e79 | 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 any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | // 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 any plugin's vendor/assets/javascripts directory can be referenced here using a relative ... | Update tooltip on page change | Update tooltip on page change
| JavaScript | mit | simplyianm/classtime,simplyianm/classtime,simplyianm/classtime |
a19bf03c8224a1ec6fbfa5932ebc35e0a31ac9f4 | app/containers/YoutubePlayer/index.js | app/containers/YoutubePlayer/index.js | /*
*
* YoutubePlayer
*
*/
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import YouTube from 'react-youtube';
import mapStateToProps from './selectors';
import mapDispatchToProps from './actions';
import YoutubeOverlay from 'components/YoutubeOverlay';
class Youtube... | /*
*
* YoutubePlayer
*
*/
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import YouTube from 'react-youtube';
import mapStateToProps from './selectors';
import mapDispatchToProps from './actions';
import YoutubeOverlay from 'components/YoutubeOverlay';
const YoutubePlayer = ({... | Use function component for youtube player container | Use function component for youtube player container
| JavaScript | mit | zillding/hangouts,zillding/hangouts |
eaac51e32939586e2db769eb901597591979554c | assets/concrete5filemanager/plugin.js | assets/concrete5filemanager/plugin.js | (function() {
CKEDITOR.plugins.add('concrete5filemanager', {
init: function () {
CKEDITOR.on('dialogDefinition', function(event) {
var editor = event.editor,
dialogDefinition = event.data.definition,
tabContent = dialogDefinition.contents.l... | (function() {
CKEDITOR.plugins.add('concrete5filemanager', {
init: function () {
CKEDITOR.on('dialogDefinition', function(event) {
var editor = event.editor,
dialogDefinition = event.data.definition,
tabContent = dialogDefinition.contents.l... | Disable width/height resize on image browse selection and use inlnie url for responsive images. | Disable width/height resize on image browse selection and use inlnie url for responsive images.
Add Download URL to images automatically
| JavaScript | mit | ExchangeCore/Concrete5-CKEditor,MrKarlDilkington/Concrete5-CKEditor,MrKarlDilkington/Concrete5-CKEditor,ExchangeCore/Concrete5-CKEditor |
efbf3086d5db81bfeaaf386d862a76a7b45e3020 | assets/js/googlesitekit-activation.js | assets/js/googlesitekit-activation.js | /**
* Activation component.
*
* This JavaScript loads on every admin page. Reserved for later.
*
* 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 ... | /**
* Activation component.
*
* This JavaScript loads on every admin page. Reserved for later.
*
* 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 ... | Send plugin_activated event on activation. | Send plugin_activated event on activation.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
6e9b84b55bd1fe7c5e5b7b114767584728a5925c | config/index.js | config/index.js | module.exports = {
service: {
name: 'melodies',
synopsis: 'thoughts from soundtrack.io',
icon: 'music'
},
database: {
name: 'blog:soundtrack'
}
};
| module.exports = {
service: {
name: 'melodies',
synopsis: 'thoughts from soundtrack.io',
icon: 'music'
},
database: {
name: 'blog:soundtrack'
},
services: {
http: {
port: 13005
}
}
};
| Change port number for production. | Change port number for production.
| JavaScript | mit | martindale/melody,martindale/melody,martindale/blog.soundtrack.io,martindale/blog.soundtrack.io |
0fa7c1304f9234131487461c89bb91c13aecd8cf | src/delegated-listener.js | src/delegated-listener.js | const EventKit = require('event-kit')
module.exports =
function listen (element, eventName, selector, handler) {
var innerHandler = function (event) {
if (selector) {
var currentTarget = event.target
while (true) {
if (currentTarget.matches && currentTarget.matches(selector)) {
hand... | const EventKit = require('event-kit')
module.exports =
function listen (element, eventName, selector, handler) {
var innerHandler = function (event) {
if (selector) {
var currentTarget = event.target
while (currentTarget) {
if (currentTarget.matches && currentTarget.matches(selector)) {
... | Stop looping when currentTarget becomes undefined | Stop looping when currentTarget becomes undefined
| JavaScript | mit | ardeshirj/atom,seedtigo/atom,ObviouslyGreen/atom,cyzn/atom,AlexxNica/atom,brumm/atom,johnrizzo1/atom,johnhaley81/atom,gabrielPeart/atom,helber/atom,Ingramz/atom,sotayamashita/atom,decaffeinate-examples/atom,beni55/atom,nrodriguez13/atom,cyzn/atom,transcranial/atom,seedtigo/atom,hellendag/atom,me-benni/atom,daxlab/atom,... |
c66229de8519fe571c77f814bcfa971637868cd3 | robot-name/robot-name.spec.js | robot-name/robot-name.spec.js | import Robot from './robot-name';
describe('Robot', () => {
let robot;
beforeEach(() => {
robot = new Robot();
});
it('has a name', () => {
expect(robot.name).toMatch(/^[A-Z]{2}\d{3}$/);
});
xit('name is the same each time', () => {
expect(robot.name).toEqual(robot.name);
});
xit('diffe... | import Robot from './robot-name';
describe('Robot', () => {
let robot;
beforeEach(() => {
robot = new Robot();
});
it('has a name', () => {
expect(robot.name).toMatch(/^[A-Z]{2}\d{3}$/);
});
xit('name is the same each time', () => {
expect(robot.name).toEqual(robot.name);
});
xit('diffe... | Use ES2015 feature Set() to store unique robot names | Use ES2015 feature Set() to store unique robot names
| JavaScript | mit | tejasbubane/xecmascript,exercism/xecmascript,MattH-be/ecmascript,arthurchipdean/xecmascript,tejasbubane/xecmascript,exercism/xecmascript,arthurchipdean/xecmascript,MattH-be/ecmascript |
87912919ae5bea20bc6920648be6ae1056c7e856 | src/helpers/yotiHelper.js | src/helpers/yotiHelper.js | const fs = require('fs');
const path = require('path');
const env = require('env2');
env('./config.env');
const YotiClient = require('yoti-node-sdk');
const CLIENT_SDK_ID = process.env.SDK;
const PEM = fs.readFileSync(path.join(__dirname, '../../keys_pem/help-access-security.pem'));
const yotiClient = new YotiClient(C... | const fs = require('fs');
const path = require('path');
const env = require('env2');
env('./config.env');
const YotiClient = require('yoti-node-sdk');
const CLIENT_SDK_ID = process.env.SDK;
// local only
const PEM = fs.readFileSync(path.join(__dirname, '../../keys_pem/help-access-security.pem'));
const yotiClient = ne... | Comment on pem file use | Comment on pem file use
| JavaScript | mit | lucy-marko/centrepoint,lucy-marko/centrepoint,centrepoint-exresapp/cpapp-salesforce,centrepoint-exresapp/cpapp-salesforce |
501e9d2c2d9624199b73d68678cebf29f43fe4c1 | examples/iterative.js | examples/iterative.js | /**
* A simple progressbar with synchronous calls to tick()
* (i.e. no setTimeout/setInterval)
*/
var ProgressBar = require('../');
var len = 10000000; // Adjust to your machine's speed
var bar = new ProgressBar('[:bar]', len);
for (var i = 0; i <= len; i++) {
bar.tick();
} | /**
* A simple progressbar with synchronous calls to tick()
* (i.e. no setTimeout/setInterval)
*/
var ProgressBar = require('../');
var len = 10000000; // Adjust to your machine's speed
var bar = new ProgressBar('[:bar]', {total: len, renderThrottle: 100});
for (var i = 0; i <= len; i++) {
bar.tick();
} | Set renderThrottle in synch example to 100 ms | Set renderThrottle in synch example to 100 ms
Just to demonstrate that this now works.
| JavaScript | mit | visionmedia/node-progress,tj/node-progress |
fcd7bf13cce5b75cdff0168abed3d0963652ecf7 | packages/jsonmvc-util-load/src/index.js | packages/jsonmvc-util-load/src/index.js |
function loadModule (newModule) {
let name = newModule.name ? newModule.name : 'app'
let module = {
name,
controllers: [],
views: [],
models: [],
data: []
}
let files = newModule.files
Object.keys(files).forEach(file => {
let path = file.match(/([a-zA-Z0-9_]+)/gi)
let componentT... |
function loadModule (newModule) {
let name = newModule.name ? newModule.name : 'app'
let module = {
name,
controllers: [],
views: [],
models: [],
data: []
}
let files = newModule.files
Object.keys(files).forEach(file => {
let path = file.match(/([a-zA-Z0-9_]+)/gi)
let componentT... | Add module path based on module name if path does not exist. | fix(util-load): Add module path based on module name if path does not exist.
| JavaScript | mit | jsonmvc/jsonmvc,jsonmvc/jsonmvc |
d16b0773d64d8f40d0762546bc0bd9b495408838 | app/index.js | app/index.js | import {
StackNavigator,
} from 'react-navigation';
import SearchScreen from './scenes/SearchScreen';
const GitHubProjects = StackNavigator({
Search: { screen: SearchScreen },
});
export default GitHubProjects;
| import {
StackNavigator,
} from 'react-navigation';
import SearchScreen from './scenes/SearchScreen';
const GitHubProjects = StackNavigator({
Search: {
screen: SearchScreen,
navigationOptions: {
title: 'GitHub Search'
}},
});
export default GitHubProjects;
| Add Title to Navbar for search screen | Add Title to Navbar for search screen
| JavaScript | mit | msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects |
ddd76d74eb80af8a9d1fb4d72ae2b0a87fe2971f | app/index.js | app/index.js | const express = require('express');
const clientApp = require('../clientapp');
const config = require('./lib/config');
const nunjucks = require('nunjucks');
const path = require('path');
const middleware = require('./middleware');
var app = express();
require('express-monkey-patch')(app);
var staticDir = path.join(_... | const express = require('express');
const clientApp = require('../clientapp');
const config = require('./lib/config');
const nunjucks = require('nunjucks');
const path = require('path');
const middleware = require('./middleware');
const DEV_MODE = config('DEV', false);
var app = express();
require('express-monkey-pa... | Add caching to static files if not in dev mode | Add caching to static files if not in dev mode
| JavaScript | mpl-2.0 | mozilla/openbadges-discovery |
515ca73a67b1d8e9898091f832b10a3963352756 | app/noflo.js | app/noflo.js | window.addEventListener('polymer-ready', function() {
document.body.classList.remove('loading');
var noflo = require('noflo');
var graphs = {};
var registerAndStart = function (network) {
for (var component in graphs) {
if (component === 'main') {
continue;
}
network.loader.regis... | window.addEventListener('polymer-ready', function() {
document.body.classList.remove('loading');
var noflo = require('noflo');
var graphs = {};
var registerAndStart = function (network) {
for (var component in graphs) {
if (component === 'main') {
continue;
}
network.loader.regis... | Use textContent as innerText causes issues on IE | Use textContent as innerText causes issues on IE
| JavaScript | mit | taylorzane/noflo-ui,noflo/noflo-ui,noflo/noflo-ui,rdf-pipeline/noflo-server,lxfschr/noflo-ui,flyboarder/noflo-ui,oportocala/noflo-ui,taylorzane/noflo-ui,oportocala/noflo-ui,rasata/noflo-ui,rdf-pipeline/noflo-server,rasata/noflo-ui,lxfschr/noflo-ui |
0d73be57b06d2fd339c1540c79f05d2be6e8c176 | src/components/ConnectedRouter/index.js | src/components/ConnectedRouter/index.js | import React, { Component } from 'react'
import { Router } from 'react-router-dom'
const LOCATION_CHANGE = '@@router/LOCATION_CHANGE'
class ConnectedRouter extends Component {
constructor (props) {
super(props)
this.handleLocationChange = this.handleLocationChange.bind(this)
}
componentWillMount () {
... | import React, { Component } from 'react'
import { Router } from 'react-router-dom'
const LOCATION_CHANGE = '@@router/LOCATION_CHANGE'
class ConnectedRouter extends Component {
constructor (props) {
super(props)
this.handleLocationChange = this.handleLocationChange.bind(this)
}
componentWillMount () {
... | Add scroll to top on router update | Add scroll to top on router update
| JavaScript | mit | antoinechalifour/Reddix,antoinechalifour/Reddix |
1466cf76d4cfd3607143b2a30e3e0796673b94e3 | bin/serve.js | bin/serve.js | #!/usr/bin/env node
// Packages
const asyncToGen = require('async-to-gen/register')
const updateNotifier = require('update-notifier')
const {red} = require('chalk')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
// Ours
const pkg = require('../package')
// Support ... | #!/usr/bin/env node
// Native
const path = require('path')
// Packages
const asyncToGen = require('async-to-gen/register')
const updateNotifier = require('update-notifier')
const {red} = require('chalk')
const nodeVersion = require('node-version')
const isAsyncSupported = require('is-async-supported')
// Ours
const ... | Make `async-to-gen` work on Now | Make `async-to-gen` work on Now
| JavaScript | mit | disquisition/serve,zeit/micro-list,disquisition/serve,zeit/micro-list,zeit/serve |
5a972d8686184b3a86308689a7cbe2b07edc4823 | test/integration/rewire-wrapper-test.js | test/integration/rewire-wrapper-test.js | import assert from 'power-assert';
import rewire from '../../lib/babel-rewire-wrapper';
import greeter from './module/greeter';
/**
* Do actual rewiring to test modules.
*/
describe('Integration: babel-rewire wrapper', () => {
function assertGreet(expectedGreet) {
assert.equal(greeter.greet(), expectedGreet);
... | import assert from 'power-assert';
import rewire from '../../lib/babel-rewire-wrapper';
import greeter from './module/greeter';
/**
* Do actual rewiring.
*/
describe('Integration: babel-rewire wrapper', () => {
function assertGreet(expectedGreet) {
assert.equal(greeter.greet(), expectedGreet);
}
it('has b... | Add integration tests of rewiring | test: Add integration tests of rewiring
| JavaScript | mit | ryym/babel-rewire-wrapper |
5535e08933ba8ece49e3b310e1d9ad8ea3046b86 | src/js/models/_attributable.js | src/js/models/_attributable.js | import { entries } from '../utils/object-utils';
export const VALID_ATTRIBUTES = [
'data-md-text-align'
];
/*
* A "mixin" to add section attribute support
* to markup and list sections.
*/
export function attributable(ctx) {
ctx.attributes = {};
ctx.setAttribute = (key, value) => {
if (!VALID_ATTRIBUTES... | import { entries } from '../utils/object-utils';
import { contains } from '../utils/array-utils';
export const VALID_ATTRIBUTES = [
'data-md-text-align'
];
/*
* A "mixin" to add section attribute support
* to markup and list sections.
*/
export function attributable(ctx) {
ctx.attributes = {};
ctx.setAttrib... | Replace Array.includes with utility function for IE11 compat 🐲 | Replace Array.includes with utility function for IE11 compat 🐲 | JavaScript | mit | bustlelabs/content-kit-editor,bustle/mobiledoc-kit,bustlelabs/content-kit-editor,bustlelabs/content-kit-editor,bustle/mobiledoc-kit,bustlelabs/mobiledoc-kit,bustle/mobiledoc-kit,bustlelabs/mobiledoc-kit,bustle/mobiledoc-kit,bustlelabs/mobiledoc-kit |
a03275095ec6eccd0de6fd3a7c1935402f1e66dd | lib/broadway.js | lib/broadway.js | /*
* broadway.js: Top-level include for the broadway module.
*
* (C) 2011, Nodejitsu Inc.
* MIT LICENSE
*
*/
var fs = require('fs');
var broadway = exports;
broadway.App = require('./broadway/app').App;
broadway.common = require('./broadway/common');
broadway.features = require('./broadway/features');
... | /*
* broadway.js: Top-level include for the broadway module.
*
* (C) 2011, Nodejitsu Inc.
* MIT LICENSE
*
*/
var fs = require('fs'),
path = require('path'),
utile = require('utile');
var broadway = exports;
broadway.App = require('./broadway/app').App;
broadway.common = require('./broadway/comm... | Use `utile.requireDirLazy` for loading plugins | [refactor] Use `utile.requireDirLazy` for loading plugins
| JavaScript | mit | znetstar/broadway,smashingboxes/broadway,smashingboxes/broadway,indexzero/broadway,znetstar/broadway |
000e4aa22fda2fac788196434baf8638d0df0dec | test/fixtures/generic-qunit.js | test/fixtures/generic-qunit.js | /* global QUnit, expect, bootlint */
/* jshint browser: true */
/*eslint-env browser */
(function () {
'use strict';
function lintCurrentDoc() {
var lints = [];
var reporter = function (lint) {
lints.push(lint.message);
};
bootlint.lintCurrentDocument(reporter, []);... | /* global QUnit, expect, bootlint */
/* jshint browser: true */
/*eslint-env browser */
(function () {
'use strict';
function lintCurrentDoc() {
var lints = [];
var reporter = function (lint) {
lints.push(lint.message);
};
bootlint.lintCurrentDocument(reporter, []);... | Remove QUnit UI's checkboxes from the DOM during tests to prevent false positives | Remove QUnit UI's checkboxes from the DOM during tests to prevent false positives
Refs #373
| JavaScript | mit | freezy-sk/bootlint,freezy-sk/bootlint,twbs/bootlint,chrismbarr/bootlint,twbs/bootlint,chrismbarr/bootlint,freezy-sk/bootlint,chrismbarr/bootlint |
6d57063e709de1d3070cba0e555471ef2f07e04d | imports/ui/components/DocumentsList.js | imports/ui/components/DocumentsList.js | import React from 'react';
import PropTypes from 'prop-types';
import { browserHistory } from 'react-router';
import { ListGroup, ListGroupItem, Alert } from 'react-bootstrap';
import { Meteor } from 'meteor/meteor';
import Documents from '../../api/documents/documents';
import container from '../../modules/container';... | import React from 'react';
import PropTypes from 'prop-types';
import { browserHistory } from 'react-router';
import { ListGroup, ListGroupItem, Alert } from 'react-bootstrap';
import { Meteor } from 'meteor/meteor';
import Documents from '../../api/documents/documents';
import container from '../../modules/container';... | Sort movies list by released year | Sort movies list by released year
| JavaScript | mit | zarazi/movies-listie,zarazi/movies-listie |
9eb501587c9b30dfaacaf5bb350a5cf1bd18dba0 | bin/cli.js | bin/cli.js | #!/usr/bin/env node
const Host = require('../src/host');
const logger = require('../src/logger');
// node <current script> <rest of args>
const [, , ...args] = process.argv;
try {
const host = new Host(args);
host.start({ proc: process });
} catch (err) {
logger.error(err);
}
process.on('unhandledRejection', (... | #!/usr/bin/env node
const Host = require('../src/host');
const logger = require('../src/logger');
// node <current script> <rest of args>
const [, , ...args] = process.argv;
if (args[0] === '--version') {
// eslint-disable-next-line global-require
const pkg = require('../package.json');
// eslint-disable-next-l... | Change host to respond to `--version` request (for CheckHealth) | Change host to respond to `--version` request (for CheckHealth)
| JavaScript | mit | rhysd/node-client,neovim/node-client,neovim/node-client |
5db9eb1ea8bf820e54b231e357f664a6418c5730 | lib/camayak_medium.js | lib/camayak_medium.js | "use strict";
const medium = require('medium-sdk');
class CamayakMedium {
constructor(api_key) {
this.api_key = api_key;
// Since we use an Integration Token instead
// of oAuth login, we just enter dummy values
// for the oAuth client options.
this.client = new mediu... | "use strict";
const medium = require('medium-sdk');
class CamayakMedium {
constructor(api_key) {
this.api_key = api_key;
// Since we use an Integration Token instead
// of oAuth login, we just enter dummy values
// for the oAuth client options.
this.client = new mediu... | Use fat arrows instead of that=this. Some foratting fixes | Use fat arrows instead of that=this. Some foratting fixes
| JavaScript | mit | camayak/contentapi-medium-node |
9342478f7eef12a7ba2867f0c9ab6c73634cb955 | app/javascript/initializeGame.js | app/javascript/initializeGame.js | /* global angular */
import {web3, Chess} from '../../contract/Chess.sol';
angular.module('dappChess').controller('InitializeGameCtrl',
function ($rootScope, $scope, accounts) {
$scope.availableAccounts = accounts.availableAccounts;
$scope.selectedAccount = accounts.defaultAccount;
$scope.startcolor = 'wh... | /* global angular */
import {web3, Chess} from '../../contract/Chess.sol';
angular.module('dappChess').controller('InitializeGameCtrl',
function ($rootScope, $scope, accounts) {
$scope.availableAccounts = accounts.availableAccounts;
$scope.selectedAccount = accounts.defaultAccount;
$scope.startcolor = 'wh... | Add additional logging to init game | Add additional logging to init game
| JavaScript | mit | ise-ethereum/on-chain-chess,ise-ethereum/on-chain-chess |
22f3fd702854e2afb6dec364f2291067e62df157 | client/src/Loading.js | client/src/Loading.js | import React from 'react'
import Bubbles from './Bubbles'
export default class Welcome extends React.Component {
render() {
const { opacity } = this.props
const containerStyle = {
background: '#E64369',
bottom: 0,
color: 'white',
display: 'flex',
flexDirection: 'column',
... | import React from 'react'
import Bubbles from './Bubbles'
export default class Welcome extends React.Component {
render() {
const { opacity } = this.props
const containerStyle = {
background: '#E64369',
bottom: 0,
color: 'white',
display: 'flex',
flexDirection: 'column',
... | Remove opacity from “What is this?” link 💋 | Remove opacity from “What is this?” link 💋 | JavaScript | mit | pirelenito/unbubble |
faf04735d80c8b980c8484df1d4b1e9b11f66f15 | src/gatherActions.js | src/gatherActions.js | // Gather actionNames from all registered modules for hot-key mapping
import { modules } from 'stripes-loader'; // eslint-disable-line
import stripesComponents from '@folio/stripes-components/package.json';
function addKeys(register, list) {
if (list) {
for (const actionName of list) {
register[actionName... | // Gather actionNames from all registered modules for hot-key mapping
import { modules } from 'stripes-loader'; // eslint-disable-line
import stripesComponents from '@folio/stripes-components/package.json';
function addKeys(moduleName, register, list) {
if (list) {
for (const actionName of list) {
if (!re... | Gather names of modules that use action-names | Gather names of modules that use action-names
At present, we then immeduately discard that information, since we
only return the array of _keys_ of the `allActions` register. But we
may change the API of `stripes.allActions` down the line to return the
whole register.
| JavaScript | apache-2.0 | folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core |
aed35d2269f1fda412befb3b9d7489f529641eb7 | src/component/handlers/edit/DraftEditorEditHandler.js | src/component/handlers/edit/DraftEditorEditHandler.js | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
* @emails oncall+draft_js
*/
'use strict';
const onBeforeInput = require('editOnBeforeInput');
... | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
* @emails oncall+draft_js
*/
'use strict';
import type DraftEditor from 'DraftEditor.react';
c... | Fix for workchat composer cursor jumping | Fix for workchat composer cursor jumping
Summary:
As figured out in T47552048, the issue of cursor jumping is happening because the draft editor's selection state is not in the correct state. After digging in, I discovered that the draft editor manages this state through the contenteditable div's onSelect event, but i... | JavaScript | mit | facebook/draft-js |
558382b760703d752e26aea9da89a941c754d9fe | packages/prelude/test/function-test.js | packages/prelude/test/function-test.js | /** @license MIT License (c) copyright 2016 original author or authors */
import {describe, it} from 'mocha';
import assert from 'assert';
import { id } from '../src/function';
describe('id', () => {
it('should return its input', () => {
const x = {};
assert(id(x) === x);
});
});
| /** @license MIT License (c) copyright 2016 original author or authors */
import {describe, it} from 'mocha';
import assert from 'assert';
import { id, compose, apply } from '../src/function';
describe('id', () => {
it('id(x) === x', () => {
const x = {};
assert.strictEqual(id(x), x);
});
});
describe('... | Add unit tests for compose and apply | Add unit tests for compose and apply
| JavaScript | mit | nissoh/core,mostjs/core,axefrog/core,mostjs/core |
2b4613936f3eaf7d5cd89728838ea9fa72fa3e42 | src/main/web/florence/js/functions/_handleApiError.js | src/main/web/florence/js/functions/_handleApiError.js | function handleApiError(response) {
if(!response || response.status === 200)
return;
if(response.status === 403) {
logout();
}
else {
console.log('Error: ' + response.responseText);
alert(response.responseText);
}
}
| function handleApiError(response) {
if(!response || response.status === 200)
return;
if(response.status === 403 || response.status === 401) {
logout();
}
else {
console.log('Error: ' + response.responseText);
alert(response.responseText);
}
}
| Handle 401 api errors and logout. | Handle 401 api errors and logout.
| JavaScript | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence |
575d4eb43592b97e871d3039543aeb1df15910a8 | routes/index.js | routes/index.js | const express = require('express');
const StorageHandler = require('../lib/storage-handler');
const router = express.Router();
const storageHandler = new StorageHandler();
const REPO_KEY = 'REPOSITORIES';
const WIKI_KEY = 'WIKI_EDITS';
/* GET home page. */
router.get('/', (req, res, next) => {
const repos = storage... | const express = require('express');
const StorageHandler = require('../lib/storage-handler');
const router = express.Router();
const storageHandler = new StorageHandler();
const REPO_KEY = 'REPOSITORIES';
const WIKI_KEY = 'WIKI_EDITS';
const MAX_RETURN_ROWS_NEW = 200;
const MAX_RETURN_ROWS_UPDATED = 200;
/* GET home ... | Increase number of updated repos | Increase number of updated repos
| JavaScript | mpl-2.0 | MichaelKohler/mozilla-watcher,MichaelKohler/mozilla-watcher,MichaelKohler/mozilla-github-watcher |
101aee1d91b6e685254b2903eb7fc96cb5d25ec5 | env/env-config.example.js | env/env-config.example.js | module.exports = {
APP_NAME: 'app-name',
PROTOCOL: 'http://',
HOST: '127.0.0.1',
PORT: 3030
} | module.exports = {
APP_NAME: 'app-name',
PROTOCOL: 'http://',
HOST: '127.0.0.1',
PORT: 3030,
DB_USER: '',
DB_PASSWORD: ''
} | Update env config with db_user and db_password fields | Update env config with db_user and db_password fields
| JavaScript | mit | formidable-coffee/masterfully,chkakaja/sentimize,chkakaja/sentimize,formidable-coffee/masterfully |
18a4a9754d625d20c7ab5bc6b6b060c7ae9bf756 | assets/js/util/is-wp-error.js | assets/js/util/is-wp-error.js | /**
* WP Error Utilities.
*
* 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.0
*
* ... | /**
* WP Error Utilities.
*
* 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.0
*
* ... | Update isWPError function to use isPlainObject. | Update isWPError function to use isPlainObject.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
4d57eb0081b298a164f88b9a3d69e7d9147bc307 | midway.js | midway.js | $(window).ready(function() {
$('.centerHorizontal').css('marginLeft', - + $('.centerHorizontal').width()/2);
$('.centerVertical').css('marginTop', - + $('.centerVertical').height()/2);
$(".centerHorizontal").css({
'position' : 'absolute',
'top' : '50%',
'left' : '50%'
});
$(".centerVertical").css({
'pos... | function Midway() {
$('.centerHorizontal').css('marginLeft', - + $('.centerHorizontal').width()/2);
$('.centerVertical').css('marginTop', - + $('.centerVertical').height()/2);
$(".centerHorizontal").css({
'position' : 'absolute',
'top' : '50%',
'left' : '50%'
});
$(".centerVertical").css({
'position' : '... | Allow triggering of event at any time. | Allow triggering of event at any time.
| JavaScript | mit | npmcomponent/ramitos-midway |
24ef0392ecc9c0673b0f6ff56e36a10bad27d16f | lib/index.js | lib/index.js | module.exports = {
'tokens': require('./tokens'),
'parser': require('./parser')
};
| module.exports = {
'tokens': require('./tokens'),
'parser': require('./parser'),
'resolve': require('./resolve')
};
| Update wrapper to include resolver | Update wrapper to include resolver
| JavaScript | mit | jamen/craze |
577cc2bc83c0840e0694fcf966cf77fb1c3fb076 | src/defaults.js | src/defaults.js | module.exports = [
{
id: "application",
caption: "Codebox",
items: [
{
caption: "Settings",
command: "settings.open"
},
{ type: "separator" },
{
caption: "About",
command: "applica... | module.exports = [
{
id: "application",
caption: "Codebox",
items: [
{
caption: "Settings",
command: "settings.open"
},
{ type: "separator" },
{
caption: "About",
command: "applica... | Remove statusbar command from default menu | Remove statusbar command from default menu
| JavaScript | apache-2.0 | etopian/codebox-package-menubar,CodeboxIDE/package-menubar |
a5e651068a470a0f9ab8baa2a7a716c3789c5d56 | server/middleware/authorizedRequest.js | server/middleware/authorizedRequest.js | let session = require('../../database/models/session');
let isAuthorizedForRoute = (req, res, next) => {
session.getSession(req.cookie.id)
.then((session) => {
console.log(session);
});
};
module.exports = isAuthorizedForRoute;
| let session = require('../../database/models/session');
let isAuthorizedForRoute = (req, res, next) => {
session.getSession(req.cookies.session.id)
.then((session) => {
if (session.hash === req.cookies.session.hash &&
session.houseId === req.cookies.session.houseId &&
session.userId === req.coo... | Add authorized route checking middleware | Add authorized route checking middleware
NOTE: Not integrated yet, will be integrated once session adding middleware is in place
| JavaScript | mit | SentinelsOfMagic/SentinelsOfMagic |
4551b9f361e12a69b559efc826a70e080015e877 | cli/lib/cmds/services/list.js | cli/lib/cmds/services/list.js | 'use strict';
var Promise = require('es6-promise').Promise;
var Command = require('../../cli/command');
var services = require('../../services');
module.exports = new Command(
'services',
'list services for your org',
function(ctx) {
return new Promise(function(resolve) {
resolve();
});
}
);
| 'use strict';
var Promise = require('es6-promise').Promise;
var Command = require('../../cli/command');
module.exports = new Command(
'services',
'list services for your org',
function(/*ctx*/) {
return new Promise(function(resolve) {
resolve();
});
}
);
| Fix lint errors in 'ag services' base | Fix lint errors in 'ag services' base
| JavaScript | bsd-3-clause | manifoldco/torus-cli,luizbranco/torus-cli,manifoldco/torus-cli,manifoldco/torus-cli,luizbranco/torus-cli,luizbranco/torus-cli |
870800d5240e9fdc2f610204fd495c69bfae7f63 | lib/forgot/forgot-view.js | lib/forgot/forgot-view.js | /*
* Module dependencies.
*/
var template = require('./forgot-form');
var t = require('t');
var FormView = require('form-view');
var page = require('page');
/**
* Expose ForgotView.
*/
module.exports = ForgotView;
/**
* Forgot password view
*
* @return {ForgotView} `ForgotView` instance.
* @api public
*/
... | /*
* Module dependencies.
*/
var template = require('./forgot-form');
var t = require('t');
var FormView = require('form-view');
var page = require('page');
/**
* Expose ForgotView.
*/
module.exports = ForgotView;
/**
* Forgot password view
*
* @return {ForgotView} `ForgotView` instance.
* @api public
*/
... | Remove unneeded switchOff function from forgot view | Remove unneeded switchOff function from forgot view
| JavaScript | mit | dkrathi457/app,DemocracyOS/app,PartidoDeLaRed/app,EuParticipo/Caxias,atlatszo/evoks,DemocraciaEnRed/bahiablanca,DemocraciaEnRed/comunas,okfn-brasil/euvoto,beomjae/app,indiofran/app,mbhicks90/myvotes.ca,EuParticipo/Caxias,solde9/app,ben-pr-p/app,kant/app,alexproca/democracy-os,radvansky-tomas/app,huulbaek/app,fonorobert... |
f3f68e18c964d3a2358dbe6e8107d668826dd8f6 | scripts/build.js | scripts/build.js | #!/usr/bin/env node
var fs = require('fs-extra');
var async = require('async');
var exec = require('child_process').exec;
var colors = require('colors');
function doExec(text) {
return function (done) {
exec(text, function (err, stdout, stderr) {
if (stdout) console.log(stdout.grey);
... | #!/usr/bin/env node
var fs = require('fs-extra');
var async = require('async');
var exec = require('child_process').exec;
var colors = require('colors');
function doExec(text) {
return function (done) {
exec(text, function (err, stdout, stderr) {
if (stdout) console.log(stdout.grey);
... | Add network-information plugin. Related to GH-885 | Add network-information plugin. Related to GH-885
| JavaScript | mpl-2.0 | mozilla/webmaker-app-cordova,mozilla/webmaker-app-cordova |
a69d27be3970b28d4ce80922e58313c739b40838 | prefix.js | prefix.js | 'use strict'
var isObject = require('is-object')
var startsWith = require('starts-with')
var startsWithPrefix = (prefix, key) => {
return startsWith(key, prefix)
}
module.exports = (input, scripts) => {
var prefixes = input.split('.')
var startsWithFilter
var isLastPrefix
var matches
var results
var ke... | 'use strict'
var isObject = require('is-object')
var startsWith = require('starts-with')
var startsWithPrefix = function (prefix, key) {
return startsWith(key, prefix)
}
module.exports = function (input, scripts) {
var prefixes = input.split('.')
var startsWithFilter
var isLastPrefix
var matches
var resu... | Remove arrow functions ... to support older versions of node | Remove arrow functions
... to support older versions of node
| JavaScript | mit | rowanoulton/prefix-matches |
c52eba300b2722e12c0e697a663689bbdbef8416 | server/server.js | server/server.js | const bleno = require('bleno')
const TestCharacteristic = require('./characteristics/test')
const LightCharacteristic = require('./characteristics/light')
const AntiTheftCharacteristic = require('./characteristics/antiTheft')
const ids = require('../global/ble').bleIds
const bikeService = new bleno.PrimaryService({
... | const bleno = require('bleno')
const TestCharacteristic = require('./characteristics/test')
const LightCharacteristic = require('./characteristics/light')
const AntiTheftCharacteristic = require('./characteristics/antiTheft')
const ids = require('../global/ble').bleIds
const testCharacteristic = new TestCharacterist... | Change to previous Char format | Change to previous Char format
| JavaScript | mit | escaip/smart_bike,escaip/smart_bike |
a9050bb0029538eb3af00f6d182eb25454ba3859 | bin/message.js | bin/message.js | module.exports = (function() {
var def = require('./def');
var util = require('./util');
var guard_undef = util.guard_undef;
var Message = def.type(function(raw_msg) {
guard_undef(raw_msg);
var def_prop = def.prop.bind(this);
def_prop('raw', raw_msg);
def_prop('channel', slack.getChannelGroup... | module.exports = (function() {
var def = require('./def');
var util = require('./util');
var guard_undef = util.guard_undef;
var Message = def.type(function(raw_msg) {
guard_undef(raw_msg);
this.def_prop('raw', raw_msg);
this.def_prop('channel', slack.getChannelGroupOrDMByID(raw_msg.channel));
... | Refactor to use method calls rather than direct def calls. | Refactor to use method calls rather than direct def calls.
| JavaScript | mit | bassettmb/slack-bot-dev |
a8ebcad5db49f7187b3f743fd528de8b7d79dcc5 | server.js | server.js | var express = require('express');
var path = require('path');
var bodyParser = require('body-parser');
var port = 3000;
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(express.static(path.resolve("./dist")));
app.get('/', function(req, res){
res.sendFile... | var express = require('express');
var path = require('path');
var bodyParser = require('body-parser');
var port = 3000;
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
app.use(express.static(path.resolve("./dist")));
app.get('/', function(req, res){
res.sendFile... | Change to try and trigger webhook | Change to try and trigger webhook
| JavaScript | mit | mzrimsek/resume_site,mzrimsek/mzrimsek.github.io,mzrimsek/mzrimsek.github.io |
84c34361a002cab797fb0a706f81c88cff8b3674 | test/fixtures/test_mapconfigFactory.js | test/fixtures/test_mapconfigFactory.js | function getVectorMapConfig(opts) {
return {
buffersize: {
mvt: 1
},
layers: _generateLayers(opts),
};
}
function _generateLayers(opts) {
const numberOfLayers = opts.numberOfLayers || 1;
const layers = [];
for (let index = 0; index <= numberOfLayers; index++) {
... | function getVectorMapConfig(opts) {
return {
buffersize: {
mvt: 1
},
layers: _generateLayers(opts),
};
}
function _generateLayers(opts) {
const numberOfLayers = opts.numberOfLayers || 1;
const layers = [];
for (let index = 0; index < numberOfLayers; index++) {
... | Fix loop limits, add per layer options in test mapconfig Factory | Fix loop limits, add per layer options in test mapconfig Factory
| JavaScript | bsd-3-clause | CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.