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 |
|---|---|---|---|---|---|---|---|---|---|
94b8d0ec50ed5f607c94b2207fab45ba0f16b3af | test/data-structures/testGraph.js | test/data-structures/testGraph.js | /* eslint-env mocha */
const Graph = require('../../src').DataStructures.Graph;
const assert = require('assert');
describe('Graph', () => {
it('should be empty when initialized', () => {
const inst = new Graph();
assert(inst.isEmpty());
assert.equal(inst.size, 0);
assert.deepStrictEqual(inst.vertice... | /* eslint-env mocha */
const Graph = require('../../src').DataStructures.Graph;
const assert = require('assert');
describe('Graph', () => {
it('should be empty when initialized', () => {
const inst = new Graph();
assert(inst.isEmpty());
assert.equal(inst.size, 0);
assert.deepStrictEqual(inst.vertice... | Test Graph: Adds test to check for neighbours | Test Graph: Adds test to check for neighbours
| JavaScript | mit | ManrajGrover/algorithms-js |
efb67c98f8669951adaf18185a3ae6ab949f0ad4 | config/deploy.js | config/deploy.js | /* eslint-env node */
module.exports = function(deployTarget) {
const API_VERSION = 'v1.12';
var ENV = {
build: {},
exclude: ['.DS_Store', '*-test.js'],
'revision-data': {
type: 'git-commit',
}
};
ENV.s3 = {
acl: 'public-read',
region: 'us-west-2',
bucket: 'ilios-frontend-ass... | /* eslint-env node */
module.exports = function(deployTarget) {
const API_VERSION = 'v1.12';
var ENV = {
build: {},
exclude: ['.DS_Store', '*-test.js'],
'revision-data': {
type: 'git-commit',
}
};
ENV.s3 = {
acl: 'public-read',
region: 'us-west-2',
bucket: 'ilios-frontend-ass... | Use ignorePattern to not gzip index.json | Use ignorePattern to not gzip index.json
This option wasn't originally available which is why filePattern needed
to be overridden.
| JavaScript | mit | gabycampagna/frontend,dartajax/frontend,gboushey/frontend,thecoolestguy/frontend,gboushey/frontend,stopfstedt/frontend,thecoolestguy/frontend,ilios/frontend,djvoa12/frontend,jrjohnson/frontend,ilios/frontend,gabycampagna/frontend,stopfstedt/frontend,jrjohnson/frontend,dartajax/frontend,djvoa12/frontend |
e8eeb4ed1c3a699d591e1727821cd2d9026e41e0 | test/_index.js | test/_index.js | var expect = require("expect.js");
var AWS = require('aws-sdk');
var AwsQ = require("../index.js");
describe('entry point',function(){
it('should inject/hack \'then\' into aws.response.prototype',function(){
AwsQ.InjectMagic(AWS);
expect(AWS.Request.prototype).to.have.property("then");
expect(AWS.Request.proto... | var expect = require("expect.js");
var AwsQ = require("../index.js");
var AwsMock;
beforeEach(function(){
AwsMock = {
Request:{
prototype:{
}
}
};
});
describe('AwsQ entry point',function(){
it('should inject/hack \'then\' into aws.response.prototype',function(){
AwsQ.InjectMagic(AwsMock);
expect(A... | Expand tests to prove Request.then returns a promise | Expand tests to prove Request.then returns a promise
| JavaScript | mit | Trioxis/aws-q |
b635d6277efbb7c401aac2d6d9c553a482d7d0d9 | configuration.js | configuration.js | var srcFolder = './src';
var distFolder = './dist';
var docsFolder = './docs';
var docsSrc = docsFolder + '/src';
var docsDist = docsFolder + '/dist';
var dirs = {
srcJS: srcFolder,
docs: {
src: docsSrc,
dist: docsDist,
srcJS: docsSrc,
distJS: docsDist,
srcCSS: docsFolder + '/**',
distCSS: ... | var srcFolder = './src';
var distFolder = './dist';
var docsFolder = './docs';
var docsSrc = docsFolder + '/src';
var docsDist = docsFolder + '/dist';
var dirs = {
srcJS: srcFolder,
docs: {
src: docsSrc,
dist: docsDist,
srcJS: docsSrc,
distJS: docsDist,
srcCSS: docsFolder + '/**',
distCSS: ... | Remove reference to images in Config file | Remove reference to images in Config file
| JavaScript | apache-2.0 | mesosphere/reactjs-components,mesosphere/reactjs-components |
efd7a2a81166320140d3df3e79e554e80b7598ce | test/helper.js | test/helper.js | /**
* Helper module for tests
*/
const path = require('path');
exports.appPath = path.resolve(__dirname, '../');
exports.electronPath = path.resolve(__dirname, '../node_modules/.bin/electron');
process.env.NODE_ENV = 'test'; // suppress logging
| /**
* Helper module for tests
*/
const path = require('path');
exports.appPath = path.resolve(__dirname, '../');
var exe_suffix = "";
if(process.platform === 'win32') {
exe_suffix = '.exe';
}
exports.electronPath = path.resolve(__dirname, '../node_modules/.bin/electron' + exe_suffix);
process.env.NODE_ENV = 'tes... | Make electron executable path platform dependent | Make electron executable path platform dependent
| JavaScript | isc | mykter/TagTime-desktop,mykter/TagTime-desktop,mykter/TagTime-desktop |
7394074876d2afa737652417bbf316b07d8b6789 | www/js/app.js | www/js/app.js | define(function (require) {
var app = {
// Application Constructor
initialize: function() {
this.bindEvents();
},
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
... | define(function (require) {
var app = {
// Application Constructor
initialize: function() {
this.bindEvents();
},
// Bind Event Listeners
//
// Bind any events that are required on startup. Common events are:
// 'load', 'deviceready', 'offline', and 'online'.
... | Fix unknown error for android/emulator. | Fix unknown error for android/emulator.
| JavaScript | mit | s1na/horin-mobile,s1na/horin-mobile |
fd1366890cadec868706d2e2596dca73b837c186 | tests/basic_functionality.js | tests/basic_functionality.js | module.exports = {
'Does Chat Exist' : function (browser) {
browser
.url(browser.launchUrl)
.waitForElementVisible('body', 1000)
.waitForElementVisible('iframe#drift-widget', 1000)
.frame('drift-widget')
.click('button.CHAT')
.end();
},
'Does Chat Open' : function (browser)... | module.exports = {
'Does Chat Exist' : function (browser) {
browser
.url(browser.launchUrl)
.waitForElementVisible('body', 1000)
.waitForElementVisible('iframe#drift-widget', 1000)
.frame('drift-widget')
.click('button.CHAT')
.end();
},
'Does Chat Open' : function (browser)... | Add chat name and message tests | Add chat name and message tests
| JavaScript | mit | TheLocust3/Drift-Nightwatch |
e2cbd988c9869a4641987254e4f805d4952514f3 | test/test-backbone/environment.js | test/test-backbone/environment.js | /* jshint strict:false */
/* global QUnit:false, Backbone:false, window:false */
// Taken from Backbone 1.1.2 test suite
(function() {
var sync = Backbone.sync;
var ajax = Backbone.ajax;
var emulateHTTP = Backbone.emulateHTTP;
var emulateJSON = Backbone.emulateJSON;
var history = window.history;
var push... | /* jshint strict:false */
/* global QUnit:false, Backbone:false */
// Taken from Backbone 1.1.2 test suite
// Routing-specific stuff commented out
(function() {
var sync = Backbone.sync;
var ajax = Backbone.ajax;
var emulateHTTP = Backbone.emulateHTTP;
var emulateJSON = Backbone.emulateJSON;
// var history... | Remove route-related stuff from test-bb/env | Remove route-related stuff from test-bb/env
| JavaScript | mit | biril/backbone-proxy,biril/backbone-proxy |
9d38130e0058278930bc59139b2b8cb67904101b | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
require('google-closure-compiler').grunt(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: '\n\n'
},
dist: {
src: [
'src/start.js',
'src/simple2d.js',
'... | module.exports = function(grunt) {
require('google-closure-compiler').grunt(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
banner: '// Simple2D.js — v<%= pkg.version %>, built <%= grunt.template.today("mm-dd-yyyy") %>\n\n',
separator: '\... | Add banner to Grunt banner | Add banner to Grunt banner
| JavaScript | mit | simple2d/simple2d.js,simple2d/simple2d.js |
981676eccb141aa1c3a6d26df31699b927f24fc0 | lib/actions/volume.js | lib/actions/volume.js | var winston = require('winston'),
utils = require('../utils');
module.exports = function(radio, command, logger) {
logger = logger || winston;
function boundVolume(vol) {
if(vol < 0) {
vol = 0;
} else if(vol > 100) {
vol = 100;
}
return vol;
}
var commandPromise;
if(command... | var winston = require('winston'),
utils = require('../utils');
function boundVolume(vol) {
if(vol < 0) {
vol = 0;
} else if(vol > 100) {
vol = 100;
}
return vol;
}
module.exports = function(radio, command, logger) {
logger = logger || winston;
var commandPromise;
if(command.hasOwnProperty(... | Move private function to outside of exported scope | Move private function to outside of exported scope
| JavaScript | apache-2.0 | radiodan/radiodan.js,radiodan/radiodan.js |
7123658a7331a083afceb3e3dc23f98746d9fd46 | lib/database/index.js | lib/database/index.js | var path = require('path');
var BACKENDS_PATH = __dirname;
function getDatabaseBackend(name, options) {
var module, databaseBackend;
module = require(path.join(BACKENDS_PATH, name.replace(/\.js$/, '')));
databaseBackend = new module.DatabaseBackend(name, options);
return databaseBackend;
}
exports.getDataba... | var path = require('path');
var sprintf = require('sprintf').sprintf;
var BACKENDS_PATH = __dirname;
function getDatabaseBackend(name, options) {
var module, databaseBackend;
try {
module = require(path.join(BACKENDS_PATH, name.replace(/\.js$/, '')));
}
catch (err) {
throw new Error(sprintf('Failed ... | Throw a custom error if a db backend cannot be loaded. | Throw a custom error if a db backend cannot be loaded. | JavaScript | bsd-3-clause | Kami/node-bittorrent-tracker,Kami/node-bittorrent-tracker |
d49bbb4bb447f1e533a911a55be15be7cf0ac51d | lib/deploy.command.js | lib/deploy.command.js | const path = require('path')
const fs = require('fs')
const { readFile } = require('./fs.utils')
const { log } = require('./log.utils')
module.exports = exports = configFilename => {
return (modules, options) => {
readFile(configFilename)
.then(data => JSON.parse(data).folder_path)
.then(folderPath ... | const path = require('path')
const fs = require('fs')
const { readFile } = require('./fs.utils')
const { log } = require('./log.utils')
module.exports = exports = configFilename => {
return (modules, options) => {
readFile(configFilename)
.then(data => JSON.parse(data).folder_path)
.then(processModu... | Change callback into external function | Change callback into external function
| JavaScript | apache-2.0 | Mindsers/configfile |
30877349d2a3fd8e47c8a111335c9b53558c5d94 | lib/webpack.config.js | lib/webpack.config.js | var path = require("path");
var webpack = require("webpack");
var libraryName = 'lc-form-validation';
var CopyWebpackPlugin = require('copy-webpack-plugin');
var basePath = __dirname;
var env = process.env.NODE_ENV;
var production = 'production';
var config = {
context: path.join(basePath, "src"),
resolve: {
... | var path = require("path");
var webpack = require("webpack");
var libraryName = 'lc-form-validation';
var CopyWebpackPlugin = require('copy-webpack-plugin');
var basePath = __dirname;
var env = process.env.NODE_ENV;
var production = 'production';
var config = {
context: path.join(basePath, "src"),
resolve: {
... | Copy README.md to dist folder | Copy README.md to dist folder
| JavaScript | mit | Lemoncode/lcFormValidation,Lemoncode/lcFormValidation |
47043b38b11145f567e002206bddd08ebcc087a5 | public/js/home.js | public/js/home.js | $(document).ready(
function(){
// Local copy of jQuery selectors, for performance.
var jpPlayTime = $("#jplayer_play_time");
var jpTotalTime = $("#jplayer_total_time");
var jpStatus = $("#demo_status"); // For displaying information about jPlayer's status in the demo page
$("#jquery_jplayer").jP... | $(document).ready(
function(){
// Local copy of jQuery selectors, for performance.
var jpPlayTime = $("#jplayer_play_time");
var jpTotalTime = $("#jplayer_total_time");
var jpStatus = $("#demo_status"); // For displaying information about jPlayer's status in the demo page
$("#jquery_jplayer").jP... | Set the click behavior in preparation of loading artist/album content. | Set the click behavior in preparation of loading artist/album content.
Signed-off-by: Nick Campbell <e31591b49bf5c9127aafb098f2b9d466891b32f9@gmail.com>
| JavaScript | mit | ncb000gt/node3p-web |
d8f60b4824e66053dc646b132e9ace7c607663f5 | packages/examples/pages/linking/index.js | packages/examples/pages/linking/index.js | import { Linking, StyleSheet, Text } from 'react-native';
import React, { PureComponent } from 'react';
import Example from '../../shared/example';
const url = 'https://mathiasbynens.github.io/rel-noopener/malicious.html';
export default class LinkingPage extends PureComponent {
handlePress() {
Linking.canOpenU... | import { Linking, StyleSheet, Text } from 'react-native';
import React, { PureComponent } from 'react';
import Example from '../../shared/example';
const url = 'https://mathiasbynens.github.io/rel-noopener/malicious.html';
export default class LinkingPage extends PureComponent {
handlePress() {
Linking.canOpenU... | Fix one of the Linking code examples | Fix one of the Linking code examples
Close #1996
| JavaScript | mit | necolas/react-native-web,necolas/react-native-web,necolas/react-native-web |
ea7bce30d7ac038cbc8d375f3cb48e2a98b65c86 | test/wef.cssParserTest.js | test/wef.cssParserTest.js | /*!
* wef.cssParser tests
* Copyright (c) 2011 Pablo Escalada
* MIT Licensed
*/
module("cssParser");
test("namespace", function() {
notEqual(wef.cssParser , undefined, "is wef.cssParser namespace defined?");
equal(typeof wef.cssParser, "function", "is wef.cssParser a function?");
});
test("constructor", fu... | /*!
* wef.cssParser tests
* Copyright (c) 2011 Pablo Escalada
* MIT Licensed
*/
module("cssParser");
test("namespace", function() {
notEqual(wef.cssParser , undefined, "is wef.cssParser namespace defined?");
equal(typeof wef.cssParser, "function", "is wef.cssParser a function?");
});
test("constructor", fu... | Add parse param type test | Add parse param type test
| JavaScript | mit | diesire/wef,diesire/wef,diesire/wef |
0e367b9c2fdf7d7d03e04a099877d8d65e88b500 | webpack.dev.js | webpack.dev.js | const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const WebpackBundleTracker = require('webpack-bundle-tracker')
module.exports = {
mode: 'development',
entry: {
base: './static/javascript/base',
pages: './static/javascript/pages',
home: './static/javascript/h... | const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const WebpackBundleTracker = require('webpack-bundle-tracker')
module.exports = {
mode: 'development',
entry: {
base: './static/javascript/base',
pages: './static/javascript/pages',
home: './static/javascript/h... | Remove file loader from conf | Remove file loader from conf
| JavaScript | mit | zenofewords/zenofewords,zenofewords/zenofewords,zenofewords/zenofewords |
2c3ab5f6884cb67bff4ad2ea70e06a5835ffca91 | .eslintrc.js | .eslintrc.js | var path = require('path');
module.exports = {
extends: [
require.resolve('ember-cli-eslint/coding-standard/ember-application.js')
]
};
| module.exports = {
extends: [
require.resolve('ember-cli-eslint/coding-standard/ember-application.js')
]
};
| Remove unused path require from eslint config | Remove unused path require from eslint config | JavaScript | mit | prototypal-io/untitled-ui,prototypal-io/untitled-ui |
1d8d291cd69b192dcf53a14d8f748cd54f6281c9 | living-with-django/main.js | living-with-django/main.js | require.config({
paths: {
text: 'lib/require-text',
css: 'lib/require-css',
jquery: 'lib/jquery',
underscore: 'lib/underscore',
'underscore.crunch': 'lib/underscore.crunch',
backbone: 'lib/backbone',
marked: 'lib/marked',
'marked.highlight': 'lib/marked.highlight',
moment: 'li... | require.config({
paths: {
text: 'lib/require-text',
css: 'lib/require-css',
jquery: 'lib/jquery',
underscore: 'lib/underscore',
'underscore.crunch': 'lib/underscore.crunch',
backbone: 'lib/backbone',
marked: 'lib/marked',
'marked.highlight': 'lib/marked.highlight',
moment: 'li... | Add comment explaining weird reload. | Add comment explaining weird reload.
| JavaScript | mit | astex/living-with-django,astex/living-with-django,astex/living-with-django |
75921bf9b582585b9471d09075fdab50aebdcc3c | modules/applications/course-analytics/category-home-countCourses.js | modules/applications/course-analytics/category-home-countCourses.js | var appRoot = require('app-root-path');
//var mongoose = require('mongoose');
var Categories = require(appRoot + '/modules/catalogs/categories.js');
var Courses = require(appRoot + '/modules/catalogs/courses.js');
var async = require('asyncawait/async');
var await = require('asyncawait/await');
function CatCountSubNod... | var appRoot = require('app-root-path');
//var mongoose = require('mongoose');
var Categories = require(appRoot + '/modules/catalogs/categories.js');
var Courses = require(appRoot + '/modules/catalogs/courses.js');
var async = require('asyncawait/async');
var await = require('asyncawait/await');
function CatCountSubNod... | Check number of not deleted course to display in categories mind map | Check number of not deleted course to display in categories mind map
| JavaScript | mit | CourseMapper/course-mapper,CourseMapper/course-mapper,CourseMapper/course-mapper |
5cb4dcae059dbee6615c2e1bb6415375f9f1de6d | spec/koan_spec.js | spec/koan_spec.js | var __ = 'Fill me in';
describe('koan.js', function () {
describe('Strings', function () {
it('should create Strings', function () {
expect('a String').toBe(__);
expect(new String('a String')).toBe(__);
});
it('should concatenate Strings', function () {
expect('a ' + 'String').toBe(__... | var __ = 'Fill me in';
describe('koan.js', function () {
describe('Strings', function () {
describe('literal', function () {
it('should create Strings', function () {
expect('a String').toBe(__);
});
it('should concatenate Strings', function () {
expect('a ' + 'String').toBe(_... | Split string literals and string objects tests | Split string literals and string objects tests
| JavaScript | mit | bltavares/koan.js |
5c29321b4564a9a4f2dc1efc1a0bebeb66d39a9c | modules/botQueryHandler.js | modules/botQueryHandler.js | 'use strict'
var botQueryHandler = require('./storage/replyQuery');
var tg = require('./telegram/telegramAPI');
var replyQuery = require('./storage/replyQuery');
var lfm = require('./lfmController')
botQueryHandler.answer = function (query, queryData) {
botQueryHandler[queryData.method](query, queryData);
};
bot... | 'use strict'
var botQueryHandler = require('./storage/replyQuery');
var tg = require('./telegram/telegramAPI');
var replyQuery = require('./storage/replyQuery');
var lfm = require('./lfmController')
botQueryHandler.answer = function (query, queryData) {
botQueryHandler[queryData.method](query, queryData);
};
bot... | Fix safe handling of old buttons | Fix safe handling of old buttons
| JavaScript | mit | TheBeastOfCaerbannog/last-fm-bot |
8f4be818db28b0b9ec262b1ef28527060d90347a | server/controllers/listingsController.js | server/controllers/listingsController.js | var db = require('../../db/db');
//Controller method - retrieve joined listing/user/category fields from DB
exports.getAll = function(category, callback) {
// Listing.findAll({ order: ['createdAt', 'DESC'] })
db.Listing.findAll({
include:
[{
model: db.Category,
attributes: ['categoryName'],
... | var db = require('../../db/db');
//Controller method - retrieve joined listing/user/category fields from DB
exports.getAll = function(category, callback) {
// Listing.findAll({ order: ['createdAt', 'DESC'] })
db.Listing.findAll({
include:
[{
model: db.Category,
attributes: ['categoryName'],
... | Implement sorting Listings in Descending order (most recent top of the page) | Implement sorting Listings in Descending order (most recent top of the page)
| JavaScript | mit | Hackifieds/hackifieds,glistening-gibus/hackifieds,Hackifieds/hackifieds,glistening-gibus/hackifieds,glistening-gibus/hackifieds |
bd5ea508ad68e2f53f71b2c515fd5124a27881af | src/parse/expr.js | src/parse/expr.js | var expr = require('vega-expression'),
args = ['datum', 'event', 'signals'];
module.exports = expr.compiler(args, {
idWhiteList: args,
fieldVar: args[0],
globalVar: args[2],
functions: function(codegen) {
var fn = expr.functions(codegen);
fn.eventItem = function() { return 'event.vg.item'; }... | var expr = require('vega-expression'),
args = ['datum', 'event', 'signals'];
module.exports = expr.compiler(args, {
idWhiteList: args,
fieldVar: args[0],
globalVar: args[2],
functions: function(codegen) {
var fn = expr.functions(codegen);
fn.eventItem = function() { return 'event.vg.item... | Add inrange in vega proper | Add inrange in vega proper
| JavaScript | bsd-3-clause | vega/vega,seyfert/vega,vega/vega,seyfert/vega,nyurik/vega,vega/vega,uwdata/vega,uwdata/vega,nyurik/vega,vega/vega,timelyportfolio/vega,seyfert/vega,nyurik/vega,lgrammel/vega,timelyportfolio/vega |
d3d3c8820cfcb155d9d532ae4f369146fbbce74a | daemon/rpccli.js | daemon/rpccli.js | #!/usr/bin/env node
var sys = require('sys');
var logger = require('../lib/logger');
var getConfig = require('./init').getConfig;
var cfg = getConfig();
if (cfg.jsonrpc.password == null) {
logger.error('No JSON RPC password specified in configuration.');
logger.notice('Note that you can use the --rpcpassword co... | #!/usr/bin/env node
var sys = require('sys');
var logger = require('../lib/logger');
var getConfig = require('./init').getConfig;
var cfg = getConfig();
if (cfg.jsonrpc.password == null) {
logger.error('No JSON RPC password specified in configuration.');
logger.notice('Note that you can use the --rpcpassword co... | Allow RPC client to accept string arguments. | Allow RPC client to accept string arguments.
| JavaScript | mit | bitfloor/bitcoinjs-server,zhangweis/node-jds,dazoe/bitcoinjs-server,javascriptit/bitcoinjs-server,bankonme/bitcoinjs-server,dazoe/bitcoinjs-server,zhangweis/node-jds,dazoe/bitcoinjs-server,javascriptit/bitcoinjs-server,javascriptit/bitcoinjs-server,bitfloor/bitcoinjs-server,bankonme/bitcoinjs-server,zhangweis/node-jds,... |
4a86295fb11d6ab8027eed62a88e185585de183f | nodejs/lib/expirer.js | nodejs/lib/expirer.js | var utils = require('./util'),
util = require("util"),
events = require("events");
function Expirer(collection, options){
var defaults = {
expire_after_ms: 10 * 60 * 1000,
time_attribute: 'touched'
},
me = this,
timer;
options = utils.merge(defaults, options || {});
options.cleanup_interval... | var utils = require('./util'),
util = require("util"),
events = require("events");
function Expirer(collection, options){
var defaults = {
expire_after_ms: 10 * 60 * 1000,
time_attribute: 'touched'
},
self = this,
timer;
options = utils.merge(defaults, options || {});
options.cleanup_interv... | Remove unused functions in Expirer.js | Remove unused functions in Expirer.js
| JavaScript | mit | iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com |
a204322945a46a6bec46122bdb7e7d3683152b80 | .eslintrc.js | .eslintrc.js | 'use strict';
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['ember', 'prettier'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
... | 'use strict';
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['ember', 'prettier'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
... | Disable eslint rules ember/no-legacy-test-waiters and ember/no-mixins | Disable eslint rules ember/no-legacy-test-waiters and ember/no-mixins
| JavaScript | mit | bgentry/ember-apollo-client,bgentry/ember-apollo-client |
10b1cc2ece9b5d121a3924eabcf27ce0588cc185 | packages/strapi-plugin-content-manager/controllers/ContentManager.js | packages/strapi-plugin-content-manager/controllers/ContentManager.js | 'use strict';
/**
* A set of functions called "actions" for `ContentManager`
*/
module.exports = {
models: async(ctx) => {
ctx.body = strapi.models;
},
find: async(ctx) => {
const model = ctx.params.model;
const {
limit = 10,
skip = 0,
sort = '_id'
} = ctx.request.query;
... | 'use strict';
/**
* A set of functions called "actions" for `ContentManager`
*/
module.exports = {
models: async(ctx) => {
ctx.body = strapi.models;
},
find: async(ctx) => {
const model = ctx.params.model;
const {
limit = 10,
skip = 0,
sort = '_id'
} = ctx.request.query;
... | Fix find function in content manager controller | Fix find function in content manager controller
| JavaScript | mit | skelpook/strapi,wistityhq/strapi,lucusteen/strap,skelpook/strapi,evian42/starpies,skelpook/strapi,evian42/starpies,lucusteen/strap,wistityhq/strapi,evian42/starpies,lucusteen/strap |
c1c7ade89a7434d80d3cdac710eb99f62935d54c | app/dashboard/static/js/app/view-tests-suite.2016.3.1.js | app/dashboard/static/js/app/view-tests-suite.2016.3.1.js | /*! Kernel CI Dashboard | Licensed under the GNU GPL v3 (or later) */
require([
], function() {
'use strict';
});
| /*! Kernel CI Dashboard | Licensed under the GNU GPL v3 (or later) */
require([
'jquery',
'utils/init',
'utils/html',
'utils/error',
'utils/request'
], function($, init, html, err, request) {
'use strict';
var gTestSuite;
document.getElementById('li-test').setAttribute('class', 'active'... | Add initial batch operations to retrieve data | Add initial batch operations to retrieve data
| JavaScript | lgpl-2.1 | kernelci/kernelci-frontend,kernelci/kernelci-frontend,kernelci/kernelci-frontend,kernelci/kernelci-frontend |
8140e8f37037e4635dec05244ab2f092a12169e3 | config/index.js | config/index.js | var parseEnv = require('parse-env');
var configTemplate = require('./config.template');
var config;
try {
config = require('./config');
}
catch(e) {}
module.exports = parseEnv(process.env, configTemplate, config);
| var parseEnv = require('parse-env');
var configTemplate = require('./config.template');
var config;
try {
config = require('./config');
}
catch(e) {}
var env = parseEnv(process.env, configTemplate, config);
if(process.env.VCAP_SERVICES){
var vcap = JSON.parse(process.env.VCAP_SERVICES);
console.log(vca... | Connect to MongoDB on AppFog | Connect to MongoDB on AppFog
| JavaScript | mit | jsdelivr/api-sync,2947721120/jsdelivr-api,MartinKolarik/api-sync,jsdelivr/api,MartinKolarik/api-sync,jsdelivr/api-sync,MartinKolarik/api |
a147f2d489650a701008036f241b387b49638c8b | app/assets/javascripts/map.js | app/assets/javascripts/map.js | //= require jquery.cookie
//= require jquery.timeago
//= require jquery.timeago.de
//= require leaflet
//= require foundation/modernizr.foundation
//= require foundation/jquery.placeholder
//= require foundation/jquery.foundation.alerts
//= require foundation/jquery.foundation.accordion
//= require foundation/jquery.fo... | //= require jquery.cookie
//= require jquery.timeago
//= require jquery.timeago.de
//= require leaflet
//= require foundation/modernizr.foundation
//= require foundation/jquery.placeholder
//= require foundation/jquery.foundation.alerts
//= require foundation/jquery.foundation.accordion
//= require foundation/jquery.fo... | Enable German locale for select2 dropdown form field. | Enable German locale for select2 dropdown form field.
| JavaScript | agpl-3.0 | sjockers/teikei,sjockers/teikei,teikei/teikei,sjockers/teikei,teikei/teikei,teikei/teikei |
c054a7b3e25f3bebfa5c9296836af1964a3a9d5c | corehq/couchapps/export_instances_by_domain/views/view/map.js | corehq/couchapps/export_instances_by_domain/views/view/map.js | function(doc) {
if (doc.doc_type === "FormExportInstance" || doc.doc_type === "CaseExportInstance") {
emit([doc.domain, doc.doc_type, doc.is_deidentified], {
_id: doc._id,
domain: doc.domain,
doc_type: doc.doc_type,
is_deidentified: doc.is_deidentified,
... | function(doc) {
if (doc.doc_type === "FormExportInstance" || doc.doc_type === "CaseExportInstance") {
emit([doc.domain, doc.doc_type, doc.is_deidentified], {
_id: doc._id,
domain: doc.domain,
doc_type: doc.doc_type,
is_deidentified: doc.is_deidentified,
... | Include is_odata_config in brief exports | Include is_odata_config in brief exports
Apparently the old version of the dbaccessors weren't actually
respecting include_docs=False - they returned the full, wrapped
instances.
| JavaScript | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq |
0f31a6bfe80e2e3451b67ecccf1cc1a3f32c3127 | evently/finder/loggedIn/selectors/#submit_pasted_url/click.js | evently/finder/loggedIn/selectors/#submit_pasted_url/click.js | function(context) {
var app = $$(this).app;
var url = $("#pasted_url").val();
if (url.length > 0) {
idPos = url.indexOf("id=");
if (idPos > -1) {
url = url.substr(idPos + 3);
}
lastSlash = url.lastIndexOf("/");
if (lastSlash > -1) {
url = url.substr(lastSlash + 1);
}
ampPos... | function(context) {
var app = $$(this).app;
var url = $("#pasted_url").val();
if (url.length > 0) {
idPos = url.indexOf("id=");
if (idPos > -1) {
url = url.substr(idPos + 3);
}
lastSlash = url.lastIndexOf("/");
if (lastSlash > -1) {
url = url.substr(lastSlash + 1);
}
ampPos... | Trim pasted URL before submitting. | Trim pasted URL before submitting.
Closes #14
| JavaScript | apache-2.0 | shmakes/hf-basic,shmakes/hf-basic |
106db6c922948d3519c7104494acd8821e638367 | frontend/core/src/main/webapp/static/js/controllers/signup.js | frontend/core/src/main/webapp/static/js/controllers/signup.js | /*jslint white: true */
'use strict';
function SignupController($location, $scope, $routeParams, authenticateRequest, errorHandler, httpRequest, itemsRequest, userSession) {
$scope.user = {};
var inviteResponseCode;
$scope.errorHandler = errorHandler;
httpRequest.get('/api/invite/' + $routeParams.hex_code +... | /*jslint white: true */
'use strict';
function SignupController($location, $scope, $routeParams, authenticateRequest, errorHandler, httpRequest, itemsRequest, userSession) {
$scope.user = {};
var inviteResponseCode;
$scope.errorHandler = errorHandler;
httpRequest.get('/api/invite/' + $routeParams.hex_code +... | Check is user already signed up. | Check is user already signed up.
| JavaScript | agpl-3.0 | ttiurani/extendedmind,extendedmind/extendedmind,extendedmind/extendedmind,extendedmind/extendedmind,ttiurani/extendedmind,ttiurani/extendedmind,extendedmind/extendedmind,extendedmind/extendedmind,ttiurani/extendedmind,ttiurani/extendedmind,ttiurani/extendedmind,extendedmind/extendedmind,extendedmind/extendedmind |
8bc6b266c61209f89b3c87af27b2cf1dc776633d | tests/integration/pods/components/zesty/time-input/component-test.js | tests/integration/pods/components/zesty/time-input/component-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('zesty/time-input', 'Integration | Component | zesty/time-input', {
integration: true
});
test('displays an input field', async function(assert) {
await this.render(hbs`
{{zesty/time-input
... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import moment from 'moment';
moduleForComponent('zesty/time-input', 'Integration | Component | zesty/time-input', {
integration: true
});
test('can update a moment date', async function(assert) {
assert.expect(3)... | Add a test for the right date being set | Add a test for the right date being set
| JavaScript | mit | zestyzesty/ember-cli-zesty-shared-components,zestyzesty/ember-cli-zesty-shared-components |
306d778e5b2cf3d05b4a094b7b20fb0b803e7e2f | static/js/main.js | static/js/main.js | openerp.printer_proxy = function (instance) {
instance.printer_proxy = {};
instance.printer_proxy.Printer = instance.web.Class.extend({
init: function(options){
options = options || {};
this.connection = new instance.web.JsonRPC();
this.connection.setup(options.url ... | openerp.printer_proxy = function (instance) {
instance.printer_proxy = {};
instance.printer_proxy.Printer = instance.web.Class.extend({
init: function(options){
options = options || {};
this.name = options.name || 'zebra_python_unittest';
this.connection = new insta... | Add 'name' option to Printer object, to specify the 'printer_name' argument sent to the client. | Add 'name' option to Printer object, to specify the 'printer_name' argument sent to the client.
| JavaScript | agpl-3.0 | ryepdx/printer_proxy,ryepdx/printer_proxy |
0dfb6e7111d794d8d37571c336aba48fdddf807e | client/views/pages/partials/page_settings/page_settings.js | client/views/pages/partials/page_settings/page_settings.js | /*****************************************************************************/
/* PageSettings: Event Handlers and Helpersss .js*/
/*****************************************************************************/
Template.PageSettings.events({
/*
* Example:
* 'click .selector': function (e, tmpl) {
*
* }... | /*****************************************************************************/
/* PageSettings: Event Handlers and Helpersss .js*/
/*****************************************************************************/
Template.PageSettings.events({
/*
* Example:
* 'click .selector': function (e, tmpl) {
*
* }... | Make a difference between add slug and remove slug | Make a difference between add slug and remove slug
| JavaScript | mit | bojicas/letterhead,bojicas/letterhead |
68c7acdbc2507125167391126453105b06df5d51 | src/js/components/UserAccountDropdown.js | src/js/components/UserAccountDropdown.js | import {Dropdown} from 'reactjs-components';
import React from 'react';
class UserAccountDropdown extends React.Component {
handleItemSelection(item) {
if (item.onClick) {
item.onClick();
}
}
render() {
return (
<Dropdown buttonClassName="user-account-dropdown-button"
dropdownMen... | import {Dropdown} from 'reactjs-components';
import React from 'react';
class UserAccountDropdown extends React.Component {
handleItemSelection(item) {
if (item.onClick) {
item.onClick();
}
}
render() {
return (
<Dropdown buttonClassName="user-account-dropdown-button text-no-transform"
... | Remove text transformation on user account dropdown button | Remove text transformation on user account dropdown button
| JavaScript | apache-2.0 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui |
bac5b5bb8d79ce8298c90c072343fb6f95672f1a | test/blueprints/endpoint.js | test/blueprints/endpoint.js | var endpoint = require('../../lib/endpoint')
, driver = require('../../lib/drivers/base')
, io = require('../mocks/io').new();
module.exports = endpoint;
module.exports.make = function(props) {
props = props || {};
return new endpoint({
'type': props.type || 'blergh',
'id' : props.id || 'endpoint_' +... | var endpoint = require('../../lib/endpoint');
function driver() {
return require("../../lib/drivers/base").new(
require('../mocks/io').new(true)
);
}
module.exports = endpoint;
module.exports.make = function(props) {
props = props || {};
return new endpoint({
'type': props.type || 'blergh',
'id' ... | Fix bug whereby all blueprint Endpoints shared a driver | Fix bug whereby all blueprint Endpoints shared a driver
| JavaScript | mit | andrewk/biodome |
e0e9028c180f31d5a5841d1810fecabf2ddc3a36 | assets/ng/rosie_app_module.js | assets/ng/rosie_app_module.js | angular.module('rosieApp', [
'ui.router',
'rosieApp.layout',
'rosieApp.lights',
'rosieApp.remotes',
'rosieApp.tasks'
])
| angular.module('rosieApp', [
'ui.router',
'rosieApp.layout',
'rosieApp.lights',
'rosieApp.remotes',
'rosieApp.tasks'
])
.run(function($rootScope) {
$rootScope.$on("$stateChangeError", console.log.bind(console));
})
| Print routing errors to console | Print routing errors to console
| JavaScript | mit | Olson3R/rosie_webui,Olson3R/rosie_webui,rosie-home-automation/rosie_webui,rosie-home-automation/rosie_webui |
8d83e9c0cde45bd44bb906c46a796ddae0b9753a | client/app/core/save-modal-dialog/save-modal-dialog.factory.js | client/app/core/save-modal-dialog/save-modal-dialog.factory.js | /** @ngInject */
export function SaveModalDialogFactory($uibModal) {
var modalSaveDialog = {
showModal: showModal,
};
return modalSaveDialog;
function showModal(saveCallback, doNotSaveCallback, cancelCallback, okToSave) {
var modalOptions = {
templateUrl: 'app/components/save-modal-dialog/save-m... | import templateUrl from './save-modal-dialog.html';
/** @ngInject */
export function SaveModalDialogFactory($uibModal) {
var modalSaveDialog = {
showModal: showModal,
};
return modalSaveDialog;
function showModal(saveCallback, doNotSaveCallback, cancelCallback, okToSave) {
var modalOptions = {
... | Save modal dialog now correctly imports html template | Save modal dialog now correctly imports html template
Error as a result of shufling file structure, not updating paths | JavaScript | apache-2.0 | ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-service,AllenBW/manageiq-ui-service,ManageIQ/manageiq-ui-self_service,AllenBW/manageiq-ui-service,AllenBW/manageiq-ui-service,AllenBW/manageiq-ui-service |
552901332ee3997026eb7224f85ef4cae7d8dde8 | server/settings/methods.js | server/settings/methods.js | import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { settingsLive } from './collections';
import defaultSettings from './defaultSettings';
import { checkSiteIdOwnership, checkUserLoggedIn } from '../utils';
Meteor.methods({
saveSettings(settings) {
const userId = this.userId;
... | import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { settingsLive } from './collections';
import defaultSettings from './defaultSettings';
import { checkSiteIdOwnership, checkUserLoggedIn } from '../utils';
Meteor.methods({
saveSettings(settings) {
const userId = this.userId;
... | Change 'init' to true on each save. | Change 'init' to true on each save.
| JavaScript | mit | worona/worona-core,worona/worona-core,worona/worona-dashboard,worona/worona-dashboard,worona/worona,worona/worona,worona/worona |
ab0d3eca89fa5346eb63fb08833f26d591776221 | server/utils/keep-alive.js | server/utils/keep-alive.js | function noop(){}
module.exports = function(ws) {
let isAlive = true;
ws.on('pong', () => isAlive = true);
setInterval(function ping() {
if(!isAlive) return ws.terminate();
isAlive = false;
ws.ping(noop);
}, 15000);
};
| function noop(){}
module.exports = function(ws) {
let awake = true;
ws.on('pong', () => awake = true);
const id = setInterval(function ping() {
if(!awake) return isAlive() && ws.terminate();
awake = false;
isAlive() && ws.ping(noop);
}, 15000);
function isAlive() {
if(ws.readyState === ... | Stop ping when client is not open | Stop ping when client is not open
| JavaScript | mit | JasonSteck/JS-Nexus,JasonSteck/JS-Nexus |
f3c70581725d2bc0e894d3b98ce40e31ccdfef5c | app/components/dropdown/trigger.js | app/components/dropdown/trigger.js | import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
classNames: ['rl-dropdown-toggle'],
tagName: 'button',
attributeBindings: ['type', 'role', 'disabled'],
type: computed('tagName', function() {
return this.tagName === 'button' ? 'button'... | import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
tagName: 'button',
attributeBindings: ['type', 'role', 'disabled'],
type: computed('tagName', function() {
return this.tagName === 'button' ? 'button' : null;
}),
role: computed('tagNa... | Remove unused `.rl-dropdown-toggle` CSS class assignment | Dropdown::Trigger: Remove unused `.rl-dropdown-toggle` CSS class assignment
| JavaScript | apache-2.0 | rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io |
e79c3947a20b766ef247985c08ec2eb0dda61a2b | app/js/directives/form_selector.js | app/js/directives/form_selector.js | "use strict";
annotationApp.directive('formSelector', function() {
return {
restrict: 'E',
replace: true,
controller: function($scope, $element, $attrs) {
var id = $scope.id;
var form = $scope.form;
$scope.text = 'Select';
$scope.action = function() {
if ($scope.plugin.isF... | "use strict";
annotationApp.directive('formSelector', function() {
return {
restrict: 'E',
replace: true,
controller: function($scope, $element, $attrs) {
var id = $scope.id;
var form = $scope.form;
$scope.text = 'Select';
$scope.action = function(event) {
event.stopPropag... | Stop event propagation in form-selector | Stop event propagation in form-selector
| JavaScript | mit | alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa |
7ddb85da7c42d584d900c7cd09d43e4b532681d4 | app/src/common/settings-manager.js | app/src/common/settings-manager.js | import {homedir} from 'os';
import settings from 'electron-settings';
import objectPath from 'object-path';
const DEFAULTS = {
kapturesDir: `${homedir()}/Movies/Kaptures`,
openOnStartup: false,
allowAnalytics: true,
showCursor: true,
highlightClicks: false,
fps: 30
};
const volatiles = {
cropperWindow:... | import {homedir} from 'os';
import settings from 'electron-settings';
import objectPath from 'object-path';
const DEFAULTS = {
kapturesDir: `${homedir()}/Movies/Kaptures`,
openOnStartup: false,
allowAnalytics: true,
showCursor: true,
highlightClicks: false,
fps: 30,
sound: false
};
const volatiles = {
... | Add `sound` to the default settings | Add `sound` to the default settings
| JavaScript | mit | albinekb/kap,albinekb/kap,wulkano/kap,albinekb/kap |
7997d02f9d2e8e85c24c671fe27bdb67794316ad | app.js | app.js | /**
* Main entrypoint for banknote.
*
* Copyright 2015 Ethan Smith
*/
var Backbone = require('backbone'),
Marionette = require('backbone.marionette'),
$ = require('jquery'),
_ = require('underscore'),
// Config
layout = require('./src/layout.js'),
// Controller
PrimaryDisplayControlle... | /**
* Main entrypoint for banknote.
*
* Copyright 2015 Ethan Smith
*/
var Backbone = require('backbone'),
Marionette = require('backbone.marionette'),
$ = require('jquery'),
_ = require('underscore'),
// Config
layout = require('./src/layout.js'),
// Controller
PrimaryDisplayControlle... | Load demo on new sheet click | Load demo on new sheet click
| JavaScript | mit | onebytegone/banknote-client,onebytegone/banknote-client |
f43a6c54edf64170e6911750e8a97bad5a939d99 | app.js | app.js | System.import('./test.jade!')
.then(function(fn) {
document.body.innerHTML = fn({local: 'no'});
})
.catch(function(err) {
console.log('ERROR: ', err);
});
| import fn from './test.jade!';
document.body.innerHTML = fn('no');
| Use import statement to convert jade template during bundle | Use import statement to convert jade template during bundle
| JavaScript | mit | johnsoftek/plugin-jade,johnsoftek/plugin-jade |
90e63de4a13bcc77ce5592b3175eaed40221e334 | run.js | run.js | 'use strict';
// Load environment variables.
require('dotenv').load();
var shell = require('shelljs');
var settings = require('./settings');
// Generate settings.json file.
shell.echo(JSON.stringify(settings)).to('settings.json');
// Copy settings.json file to root directory of etherpad.
shell.mv('-f', 'settings.js... | 'use strict';
// Load local environment variables (Uncomment this when doing development locally).
//require('dotenv').load();
var shell = require('shelljs');
var settings = require('./settings');
// Generate settings.json file.
shell.echo(JSON.stringify(settings)).to('settings.json');
// Copy settings.json file to... | Comment library that is only required when doing development locally. | Comment library that is only required when doing development locally.
| JavaScript | mit | Codeaux/codeaux-etherpad-heroku |
ec07d5a234ef79a0335b2d16073aa4ead07014e3 | lib/windshaft/renderers/plain/renderer.js | lib/windshaft/renderers/plain/renderer.js | var mapnik = require('mapnik');
function Renderer(color, options) {
this.color = color || '#ffffff';
this.options = options || {};
this.options.tileSize = this.options.tileSize || 256;
this.options.format = this.options.format || 'png8:m=h';
this.cachedTile = null;
}
module.exports = Renderer;
... | var mapnik = require('mapnik');
function Renderer(color, options) {
this.color = color || '#ffffff';
this.options = options || {};
this.options.tileSize = this.options.tileSize || 256;
this.options.format = this.options.format || 'png8:m=h';
this.cachedTile = null;
}
module.exports = Renderer;
... | Return the proper cached object | Return the proper cached object
| JavaScript | bsd-3-clause | HydroLogic/Windshaft,manueltimita/Windshaft,CartoDB/Windshaft,HydroLogic/Windshaft,wsw0108/Windshaft,wsw0108/Windshaft,manueltimita/Windshaft,CartoDB/Windshaft,manueltimita/Windshaft,wsw0108/Windshaft,CartoDB/Windshaft,HydroLogic/Windshaft |
97692795f8d46e521b72278feb9509461974ff64 | routes/index.js | routes/index.js | var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
if (!req.user) {
res.render('login', { title: 'Express',
ui_language: req.ui_language,
error_message: req.flash('error'),
success_message: req.flash('error... | var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
if (!req.user) {
res.render('login', { title: 'Express',
ui_language: req.ui_language,
error_message: req.flash('error'),
success_message: req.flash('error... | Test view allowed for also teachers | Test view allowed for also teachers
| JavaScript | mit | rkarhila/pilot_test_for_spoken_foreign_language,rkarhila/pilot_test_for_spoken_foreign_language,rkarhila/pilot_test_for_spoken_foreign_language,rkarhila/pilot_test_for_spoken_foreign_language |
9a7a1f50dd33fa91bfaac575ed08f93cafb2879d | packages/storybook/examples/core/IconCheckbox.stories.js | packages/storybook/examples/core/IconCheckbox.stories.js | import React from 'react';
import IconCheckbox from '@ichef/gypcrete/src/IconCheckbox';
import FlexRow from 'utils/FlexRow';
export default {
title: '@ichef/gypcrete|IconCheckbox',
component: IconCheckbox
};
export function BasicUsage() {
return (
<FlexRow>
<IconCheckbox />
... | import React from 'react';
import Checkbox from '@ichef/gypcrete/src/Checkbox';
import IconCheckbox from '@ichef/gypcrete/src/IconCheckbox';
import FlexRow from 'utils/FlexRow';
export default {
title: '@ichef/gypcrete|IconCheckbox',
component: IconCheckbox,
subcomponents: {
Checkbox,
},
};
e... | Add Checkbox into IconCheckbox storybook subcomponents | Add Checkbox into IconCheckbox storybook subcomponents
| JavaScript | apache-2.0 | iCHEF/gypcrete,iCHEF/gypcrete |
23f661b2a42c4e61edbd2b7b0d60233df57906f3 | analytics/static/js/main.js | analytics/static/js/main.js | requirejs.config({
baseUrl: "js",
urlArgs: '_=' + (new Date()).getTime(),
paths: {
jquery: 'libs/jquery',
elasticsearch: 'libs/elasticsearch',
d3: 'libs/d3',
d3pie: 'libs/d3pie',
d3tip: 'libs/index',
nv: 'libs/nv.d3',
app: 'app'
},
shim: {
... | requirejs.config({
baseUrl: "js",
waitSeconds: 60,
urlArgs: '_=' + (new Date()).getTime(),
paths: {
jquery: 'libs/jquery',
elasticsearch: 'libs/elasticsearch',
d3: 'libs/d3',
d3pie: 'libs/d3pie',
d3tip: 'libs/index',
nv: 'libs/nv.d3',
app: 'app'
... | Increase requirejs timeout to 60s | Increase requirejs timeout to 60s
Change-Id: I80c50a0ca2ce57bea0a5d4402e208384932963fc
| JavaScript | apache-2.0 | stackforge/fuel-stats,stackforge/fuel-stats,stackforge/fuel-stats |
80f2db1ba72eb249a242058a831ead5d8a5532fc | src/config/eslint.js | src/config/eslint.js | const paths = require('./paths');
module.exports = {
parser: 'babel-eslint',
extends: [
'airbnb',
'plugin:flowtype/recommended',
'prettier',
'prettier/flowtype',
'prettier/react',
],
env: {
browser: true,
node: true,
es6: true,
},
plugins: ['flowtype'],
rules: {
// imp... | module.exports = {
parser: 'babel-eslint',
extends: [
'airbnb',
'plugin:flowtype/recommended',
'prettier',
'prettier/flowtype',
'prettier/react',
],
env: {
browser: true,
node: true,
es6: true,
},
plugins: ['flowtype'],
rules: {
// import
'import/prefer-default-expo... | Use moduleDirectory instead of paths for import/resolver | Use moduleDirectory instead of paths for import/resolver
| JavaScript | mit | ProAI/react-kickstarter |
9d056b6902692ee561a15eee768f5f247df18b1f | routes/index.js | routes/index.js | var express = require('express');
var router = express.Router();
var nodemailer = require('nodemailer');
// create reusable transporter object using the default SMTP transport
var smtp = process.env.SMTPCREDENTIALS || '';
var transporter = nodemailer.createTransport(smtp);
var SECRET = process.env.SPASECRET || '';
r... | var express = require('express');
var router = express.Router();
var nodemailer = require('nodemailer');
// create reusable transporter object using the default SMTP transport
var smtp = process.env.SMTPCREDENTIALS || '';
var transporter = nodemailer.createTransport(smtp);
var SECRET = process.env.SPASECRET || '';
r... | Move conditional to chached data | Move conditional to chached data
| JavaScript | mit | gnomex/spa-form-deliver,gnomex/spa-form-deliver |
7ad6ac8967d5a85a10ca36bc8cf170ec69df9c63 | src/app/loading/loading.controller.js | src/app/loading/loading.controller.js | class LoadingController {
constructor($log, $scope, $state, $interval, SocketService, GameService) {
'ngInject';
this.$log = $log;
this.$state = $state;
this.$interval = $interval;
this.GameService = GameService;
this.SocketService = SocketService;
this.waitTime = 5000;
this.animTime... | class LoadingController {
constructor($log, $scope, $state, $interval, SocketService, GameService) {
'ngInject';
this.$log = $log;
this.$state = $state;
this.$interval = $interval;
this.GameService = GameService;
this.SocketService = SocketService;
this.waitTime = 5000;
this.animTime... | Send game_ready to players when game is ready | Send game_ready to players when game is ready
| JavaScript | mit | hendryl/Famous-Places-Web,hendryl/Famous-Places-Web |
4241ca6ebba09de02fa026b2ddabf53292bd5df4 | admin_ordering/static/admin_ordering/admin_ordering.js | admin_ordering/static/admin_ordering/admin_ordering.js | /* global django */
/* eslint indent:[2,4] */
/* eslint comma-dangle:[2,"never"] */
django.jQuery(function($){
var context = document.getElementById('admin-ordering-context');
if (!context) return;
var data = JSON.parse(context.getAttribute('data-context'));
if (data.tabular) {
$('#' + data.pr... | /* global django */
/* eslint indent:[2,4] */
/* eslint comma-dangle:[2,"never"] */
django.jQuery(function($){
var context = document.getElementById('admin-ordering-context');
if (!context) return;
var data = JSON.parse(context.getAttribute('data-context'));
if (data.tabular) {
$('#' + data.pr... | Add untested support for change lists | Add untested support for change lists
| JavaScript | bsd-3-clause | matthiask/django-admin-ordering,matthiask/django-admin-ordering |
abb5ed855d9ecdce2802e7d5e264aa37d9b81968 | website/app/index/config.js | website/app/index/config.js | function doConfig() {
if (window.location.hostname === 'localhost') {
mcglobals.apihost = window.location.protocol + '//localhost:5002';
} else {
mcglobals.apihost = window.location.protocol + '//' + window.location.hostname + '/api';
}
}
| function doConfig() {
if (window.location.hostname === 'localhost') {
mcglobals.apihost = window.location.protocol + '//localhost:5002';
} else {
mcglobals.apihost = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + '/api';
}
}
| Support website on port other than 80. | Support website on port other than 80.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
398864d50062f011950429380445e1b964d30f67 | apps/web/assets/javascripts/app.js | apps/web/assets/javascripts/app.js | $().ready(function(){
function init(){
var initialYear = new Date().getFullYear() - 100;
renderMap();
requestYears(function(years, formattedYears){
renderSlider(years, formattedYears, {
onChange: function(currentYear){
requestInfluences(currentYear, function(influences){
... | $().ready(function(){
function init(){
var initialYear = new Date().getFullYear() - 100;
renderMap();
requestYears(function(years, formattedYears){
renderSlider(years, formattedYears, {
onChange: function(currentYear){
requestInfluences(currentYear, function(influences){
... | Change initial year in slider for 100 years ago from now | Change initial year in slider for 100 years ago from now
| JavaScript | mit | rafaels88/pinfluence,prosi-org/pinfluence,rafaels88/pinfluence,prosi-org/pinfluence,rafaels88/pinfluence,prosi-org/pinfluence |
1ba1b331edd2e9b97b7428c73ebecfdacfc642c2 | app/assets/javascripts/application/hide-other-links.js | app/assets/javascripts/application/hide-other-links.js | /*global $ */
/*jslint
white: true,
vars: true,
indent: 2
*/
(function($) {
"use strict";
$.fn.hideOtherLinks = function() {
var $el = $(this),
showHide = $('<span class="other-content" />'),
shownElements = [],
hiddenElements = [],
currentlyAppending = shownElements;
$($... | /*global $ */
/*jslint
white: true,
vars: true,
indent: 2
*/
(function($) {
"use strict";
$.fn.hideOtherLinks = function() {
$(this).each(function(i, elm){
var $el = $(elm),
showHide = $('<span class="other-content" />'),
shownElements = [],
hiddenElements = [],
... | Enable multi-element selectors for hideOtherLinks | Enable multi-element selectors for hideOtherLinks
| JavaScript | mit | robinwhittleton/whitehall,alphagov/whitehall,alphagov/whitehall,ggoral/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,ggoral/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,hotvulcan/whitehall,askl56/whitehall,ggoral/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,alphagov/whitehall,alphagov/white... |
0b1a161824951b838e6f2313d1917016b897d7ae | app/scripts/components/auth/saml2/auth-saml2-dialog.js | app/scripts/components/auth/saml2/auth-saml2-dialog.js | import template from './auth-saml2-dialog.html';
const authSaml2Dialog = {
template,
bindings: {
dismiss: '&',
close: '&',
},
controller: class AuthSaml2DialogController {
// @ngInject
constructor($sce, ENV, Saml2Service, ncUtilsFlash) {
this.Saml2Service = Saml2Service;
this.ncUtil... | import template from './auth-saml2-dialog.html';
const authSaml2Dialog = {
template,
bindings: {
dismiss: '&',
close: '&',
},
controller: class AuthSaml2DialogController {
// @ngInject
constructor(Saml2Service, ncUtilsFlash, $rootScope) {
this.Saml2Service = Saml2Service;
this.ncUti... | Enable pending HTTP requests to get list of SAML2 identity providers. | Enable pending HTTP requests to get list of SAML2 identity providers.
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport |
84c7fea0065a92c5dd81088d0fb29100eb52e95d | scripts/dist.js | scripts/dist.js | /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
/* eslint-disable no-console */
import fs from 'fs';
import path from 'path';
import async from 'async';
// ///////////////////////////////////////////////////////////... | /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
/* eslint-disable no-console */
import fs from 'fs';
import path from 'path';
import async from 'async';
// ///////////////////////////////////////////////////////////... | Remove node engine version from published package | Remove node engine version from published package
| JavaScript | bsd-3-clause | salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react |
942f20df66928b5e0f6752ec80c34156bf7cc25f | app/js/sharedCartService.js | app/js/sharedCartService.js | "use strict";
angular.module("piadinamia").factory("sharedCartService",
["$firebase", "Firebase", "FBURL",
function ($firebase, Firebase, FBURL) {
var myCustomers = [],
fburl;
return {
init: function (customers, catalogName, userId) {
var customersRef;
... | "use strict";
angular.module("piadinamia").factory("sharedCartService",
["cartService", "$firebase", "Firebase", "FBURL",
function (cartService, $firebase, Firebase, FBURL) {
var myCustomers = [],
myCatalogName,
fburl;
return {
init: function (customers, cat... | Add getCartByUser in shared cart. | Add getCartByUser in shared cart.
| JavaScript | mit | albertosantini/piadinamia,albertosantini/piadinamia |
7d9d6d8069c152dca26be82eb3a76d1d4baf7453 | feelings/client/feelings.js | feelings/client/feelings.js | Template.feelings.events({
'click .feeling' (event, templateInstance) {
console.log(event.currentTarget.id);
}
});
| import Feelings from '/feelings/collection';
Template.feelings.events({
'click .feeling' (event, templateInstance) {
const feeling = event.currentTarget.id;
Feelings.insert({ feeling });
}
});
| Add collection insert on click | Add collection insert on click
| JavaScript | agpl-3.0 | GeriLife/feelings,GeriLife/feelings |
c8f229a513c8e53a2e55aefb294e3f8de010fbb3 | bin/autometa.js | bin/autometa.js | #!/usr/bin/env node
var program = require('commander');
var autometa = require('../lib/autometa.js');
var package = require('../package.json');
program
.version(package['version'], '-v, --version')
.usage('[options] <Excel spreadsheet>')
.option('-o, --stdout', 'place output on stdout')
.parse(process.argv);
... | #!/usr/bin/env node
var program = require('commander');
var autometa = require('../lib/autometa.js');
var package = require('../package.json');
program
.version(package['version'], '-v, --version')
.usage('[options] <Excel spreadsheet>')
.option('-o, --stdout', 'place output on stdout')
.option('-r, --registe... | Add register command-line interface option | Add register command-line interface option
| JavaScript | apache-2.0 | knjcode/autometa,knjcode/autometa |
5afd5f51d7989531762130aa1a515c3d1a0e78f3 | app/assets/javascripts/map/presenters/tabs/SpinnerPresenter.js | app/assets/javascripts/map/presenters/tabs/SpinnerPresenter.js | /**
* The SpinnerTabsPresenter class for the SpinnerTabsPresenter view.
*
* @return SpinnerTabsPresenter class.
*/
define([
'underscore',
'mps',
'map/presenters/PresenterClass',
], function(_, mps, PresenterClass) {
'use strict';
var SpinnerTabsPresenter = PresenterClass.extend({
init: function(vie... | /**
* The SpinnerTabsPresenter class for the SpinnerTabsPresenter view.
*
* @return SpinnerTabsPresenter class.
*/
define([
'underscore',
'mps',
'map/presenters/PresenterClass',
], function(_, mps, PresenterClass) {
'use strict';
var SpinnerTabsPresenter = PresenterClass.extend({
init: function(vie... | Fix loading indicator for subscribe view | Fix loading indicator for subscribe view
| JavaScript | mit | Vizzuality/gfw,Vizzuality/gfw |
9071c67f9b9eb3d5f600bda9d915bfabfae7d86e | elm-io-ports.js | elm-io-ports.js | /* Implementation from: https://github.com/laszlopandy/elm-console/blob/master/elm-io.sh */
module.exports =
"(function(){\n" +
" window = {Date: Date};\n" +
" if (typeof Elm === \"undefined\") { throw \"elm-io config error: Elm is not defined. Make sure you call elm-io with a real Elm output file\"}\n" +
... | /* Implementation from: https://github.com/laszlopandy/elm-console/blob/master/elm-io.sh */
module.exports =
"(function(){\n" +
" window = {Date: Date,addEventListener : function() {},removeEventListener : function() {}};\n" +
" if (typeof Elm === \"undefined\") { throw \"elm-io config error: Elm is not def... | Add addEventListener, removeEventListener to the window stub | Add addEventListener, removeEventListener to the window stub
| JavaScript | bsd-3-clause | rtfeldman/node-test-runner,avh4/node-elm-test,avh4/node-elm-test,rtfeldman/node-elm-test,rtfeldman/node-elm-test,ento/node-elm-test,ento/node-elm-test |
14c9237e412852faeb93782d75e30ce143f04e0f | routes/edit/routes.js | routes/edit/routes.js | import React from 'react'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import Header from './components/header'
import Footer from './components/footer'
import Homepage from './screens/homepage'
import UserDashboard from './screens/userDashboard'
import ProjectScreen from './screens/proje... | import React from 'react'
import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom'
import Header from './components/header'
import Footer from './components/footer'
import Homepage from './screens/homepage'
import UserDashboard from './screens/userDashboard'
import ProjectScreen from './scr... | Make edit the default project view | Make edit the default project view
| JavaScript | mit | Literasee/literasee,Literasee/literasee |
36fceed00831627c0e2489dae3ee20ee8c2d7950 | browser/runtime/lib/index.js | browser/runtime/lib/index.js | 'use strict';
var DataStore = require('./data-store/data-store');
var Messenger = require('./messenger/messenger');
var Deployer = require('./deploy/deployer');
var helpers = require('./helpers/helpers');
var deployer = new Deployer();
function register(name, tag, definition) {
return DataStore.registerModule(na... | 'use strict';
var DataStore = require('./data-store/data-store');
var Messenger = require('./messenger/messenger');
var Deployer = require('./deploy/deployer');
var helpers = require('./helpers/helpers');
var deployer = new Deployer();
// We use the module's tag for reference, so we need to give
// any modules that ... | Allow for more flexible arguments to BEST.register | Allow for more flexible arguments to BEST.register
| JavaScript | mit | SvitlanaShepitsena/remax-banner,infamous/famous-framework,ildarsamit/framework,KraigWalker/framework,colllin/famous-framework,SvitlanaShepitsena/framework,Famous/framework,woltemade/framework,woltemade/framework,SvitlanaShepitsena/framework,infamous/framework,jeremykenedy/framework,SvitlanaShepitsena/remax-banner,Svitl... |
68f5172f3135cfb7562268e1ac07c535e78783fc | assets/js/truncate_words.js | assets/js/truncate_words.js | $(function() {
function traverse($node, len, maxCount) {
var reachMaxCount = len > maxCount;
if (reachMaxCount) {
$node.hide();
}
var $contents = $node.contents();
for (var i = 0; i < $contents.length; ++i) {
if (reachMaxCount) {
$conte... | $(function() {
function traverse($node, len, maxCount) {
var reachMaxCount = len > maxCount;
if (reachMaxCount) {
$node.hide();
}
var $contents = $node.contents();
for (var i = 0; i < $contents.length; ++i) {
if (reachMaxCount) {
$conte... | Adjust the style to truncate post index. | Adjust the style to truncate post index.
| JavaScript | mit | xichen2016/xichen2016.github.com,xichen2016/xichen2016.github.com |
220c8cbe1c5c44d67e27b4743f5ae13c91ce6a95 | src/main/resources/static/js/staff.js | src/main/resources/static/js/staff.js | var validateEditForm = function (formObject) {
var error = false;
// check name
if (formObject.name.length < 1) {
toastr.error("You did not enter a valid name");
error = true;
}
// check username
if (formObject.username.length < 1) {
toastr.error("You did not enter a valid username");
error = true;
}
... | var validateEditForm = function (formObject) {
var error = false;
// check name
if (formObject.name.trim().length < 1) {
toastr.error("You did not enter a valid name");
error = true;
}
// check username
if (formObject.username.trim().length < 1) {
toastr.error("You did not enter a valid username");
erro... | Trim added to Mark's Form Validations. | Trim added to Mark's Form Validations.
| JavaScript | agpl-3.0 | musalbas/Nuclibook,musalbas/Nuclibook,musalbas/Nuclibook |
6b6eef4207690e30c42ad511c69d7c0cb682dd4a | Resources/public/js/emails.js | Resources/public/js/emails.js | $(document).ready(function () {
$('#add-another-email').click(function () {
var emailList = $('#email-fields-list');
var newWidget = emailList.attr('data-prototype');
newWidget = newWidget.replace(/__name__/g, emailCount);
emailCount++;
var newDiv = $('<div></div>').html(newW... | $(function () {
var cList = $('#email-fields-list'),
cCount = cList.children().length;
$('#add-another-email').on('click', function () {
widget = cList.attr('data-prototype').replace(/__name__/g, cCount++);
$('<div></div>').html(widget).appendTo(cList);
return false;
});
... | Apply layout to user edit account form. JS collection minor refactoring. | BAP-258: Apply layout to user edit account form. JS collection minor refactoring.
| JavaScript | mit | geoffroycochard/platform,ramunasd/platform,northdakota/platform,orocrm/platform,hugeval/platform,geoffroycochard/platform,umpirsky/platform,hugeval/platform,northdakota/platform,orocrm/platform,geoffroycochard/platform,morontt/platform,trustify/oroplatform,Djamy/platform,2ndkauboy/platform,trustify/oroplatform,Djamy/pl... |
159b012534f09ece875dafe236e40864539b4fc3 | grammar.js | grammar.js | module.exports = grammar({
name: 'ruby',
extras: $ => [
$.comment,
$._line_break,
/[ \t\r]/
],
rules: {
program: $ => repeat(seq($._statement, optional($._terminator))),
_statement: $ => choice($._expression),
_expression: $ => choice($._argument),
_argument: $ => choice($._primary)... | module.exports = grammar({
name: 'ruby',
extras: $ => [
$.comment,
$._line_break,
/[ \t\r]/
],
rules: {
program: $ => $._compound_statement,
_compound_statement: $ => repeat(seq($._statement, optional($._terminator))),
_statement: $ => choice($._expression),
_expression: $ => choic... | Add compound statements back in. | Add compound statements back in.
| JavaScript | mit | tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby |
48b04d42ceb838454a49351251b2a6f9f8e8ca00 | src/plugins/index.js | src/plugins/index.js | import * as config from './config'
import * as dict from '../get/dict'
import * as input from '../parse/interface/register'
import * as output from '../get/registrar'
const getConfig = config.get
const registers = {
config,
dict,
input,
output
}
const indices = {}
export const add = (ref, plugins) => {
let... | import * as config from './config'
import * as dict from '../get/dict'
import * as input from '../parse/interface/register'
import * as output from '../get/registrar'
const getConfig = config.get
const registers = {
config,
dict,
input,
output
}
const indices = {}
export const add = (ref, plugins = {}) => {
... | Allow empty plugin add method call | [plugins] Allow empty plugin add method call
Allow the general plugin add method to be called
with an empty object.
| JavaScript | mit | larsgw/citation.js,larsgw/citation.js |
93af3b16483b578aee7ed46be6d79744f7617a53 | src/main/webapp/resources/js/utilities/colour-utilities.js | src/main/webapp/resources/js/utilities/colour-utilities.js | import uniqolor from "uniqolor";
import { v5 as uuidv5 } from "uuid";
/**
* Create a unique color for any IRIDA thing (project, sample, etc.)
* @param id identifier for the thing
* @param label label for the thing
* @returns {{background: *, text: *}}
*/
export function generateColourForItem({ id, label }) {
co... | import uniqolor from "uniqolor";
import { v5 as uuidv5 } from "uuid";
/**
* Create a unique color for any IRIDA thing (project, sample, etc.)
* @param id identifier for the thing
* @param label label for the thing
* @returns {{background: *, text: *}}
*/
export function generateColourForItem({ id, label }) {
co... | Clean up unique project colours | Clean up unique project colours
| JavaScript | apache-2.0 | phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida |
78f05b53f680a1d6b1de09e9452c0b4728b68622 | constants.js | constants.js | export const loanProfileTypesMap = {
FIXED: 'Fixed',
ROLLING: 'Rolling',
INDEFINITE: 'Indefinite',
};
export const intervalPeriodsMap = {
MINUTE: 'minutes',
HOUR: 'hours',
DAY: 'days',
WEEK: 'weeks',
MONTH: 'months',
};
export const intervalIdsMap = {
'Minutes': 'minutes',
'Hours': 'hours',
'Day... | export const loanProfileTypesMap = {
FIXED: 'Fixed',
ROLLING: 'Rolling',
INDEFINITE: 'Indefinite',
};
export const intervalPeriodsMap = {
MINUTE: 'minutes',
HOUR: 'hours',
DAY: 'days',
WEEK: 'weeks',
MONTH: 'months',
};
export const intervalIdsMap = {
'Minutes': 'minutes',
'Hours': 'hours',
'Day... | Replace int values with string representations for renewFromOptions | Replace int values with string representations for renewFromOptions
| JavaScript | apache-2.0 | folio-org/ui-users,folio-org/ui-users |
48e3265874f89a0bc415f71a2d20eecf414cc0d1 | src/run-in-chrome.js | src/run-in-chrome.js | var fs = require('fs');
var path = require('path');
var Q = require('q');
var child_process = require('child_process');
// Returns a promise.
module.exports = exports = function runInChrome(platform) {
chromeAppRunRoot = null;
if (fs.existsSync('www/manifest.json')) {
chromeAppRunRoot = 'www';
} else if (fs.... | var fs = require('fs');
var path = require('path');
var Q = require('q');
var child_process = require('child_process');
// Returns a promise.
module.exports = exports = function runInChrome(platform) {
chromeAppRunRoot = null;
if (fs.existsSync('www/manifest.json')) {
chromeAppRunRoot = 'www';
} else if (fs.... | Add cca run chrome support for windows (maybe?) | Add cca run chrome support for windows (maybe?)
| JavaScript | bsd-3-clause | xiaoyanit/mobile-chrome-apps,hgl888/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,hgl888/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,guozanhua/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,hgl888/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,wudkj/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,... |
4c3d3e1e47cda3429472c9e2060e88da32cf6e2d | jquery.microdata.json.js | jquery.microdata.json.js | /* -*- mode: js; js-indent-level: 2; indent-tabs-mode: nil -*- */
// http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#json
jQuery.microdata.json = function(selector, format) {
function getObject($item) {
var result = {};
if ($item.itemType())
result.type = $item.itemType();
if... | /* -*- mode: js; js-indent-level: 2; indent-tabs-mode: nil -*- */
// http://www.whatwg.org/specs/web-apps/current-work/multipage/links.html#json
jQuery.microdata.json = function(selector, format) {
// Implemented as per spec, with the addition that a stack of
// elements is maintained to break itemref loops. The b... | Handle itemref loops in JSON conversion | Handle itemref loops in JSON conversion
| JavaScript | mit | matt-west/microdatajs,foolip/microdatajs,abernier/microdatajs,foolip/microdatajs |
fe76d664951dd6cb502c16bd1d8d13353c466043 | build.js | build.js | /* jshint node:true */
/* jshint -W034 */
/* jshint -W097 */
'use strict';
let exec = require('child_process').exec;
let path = require('path');
let cmdLine = path.join('.', 'node_modules', '.bin', 'webpack');
cmdLine += ' --progress --colors';
let env = !!process.argv[2] ? process.argv[2].toLowerCase() : 'producti... | /* jshint node:true */
/* jshint -W034 */
/* jshint -W097 */
'use strict';
let exec = require('child_process').exec;
let path = require('path');
let cmdLine = path.join('.', 'node_modules', '.bin', 'webpack');
cmdLine += ' -p --bail --progress --colors';
let env = !!process.argv[2] ? process.argv[2].toLowerCase() :... | Build for production with options -p and --bail | Build for production with options -p and --bail
| JavaScript | mit | e1-bsd/omni-common-ui,e1-bsd/omni-common-ui |
56fb66de0c6fe706fe792faad59958f2ffe8ab21 | public/src/scripts/index.js | public/src/scripts/index.js | 'use strict'
var page = require('page');
var React = require('react');
var moment = require('moment');
var WeekView = React.createFactory(require('./views/week.jsx'));
page('/', function(ctx) {
var year = moment().year();
var week = moment().week();
return page.show('/matches/' + year + '/' + week + '');
});
p... | 'use strict'
var page = require('page');
var React = require('react');
var moment = require('moment');
var WeekView = React.createFactory(require('./views/week.jsx'));
page('/', function(ctx) {
var year = moment().locale('fi').year();
var week = moment().locale('fi').week();
return page.show('/matches/' + yea... | Fix client 'moment.locale' not being set to 'fi'. | Fix client 'moment.locale' not being set to 'fi'.
| JavaScript | mit | tanelih/tgi-stats |
65762cc567146928451cb20ae8a23c5b08879f21 | app/alloy.js | app/alloy.js | // The contents of this file will be executed before any of
// your view controllers are ever executed, including the index.
// You have access to all functionality on the `Alloy` namespace.
//
// This is a great place to do any initialization for your app
// or create any global variables/functions that you'd like to
... | Alloy.Globals.pageStack = {
navigationWindow: null,
pages: [],
open: function(page) {
Alloy.Globals.pageStack.pages.push(page);
if (OS_IOS) {
if (Alloy.Globals.pageStack.navigationWindow === null) {
Alloy.Globals.pageStack.navigationWindow = Ti.UI.iOS.createNavigationWindow({
w... | Add my page stack to manage navigation on both iOS and Android | Add my page stack to manage navigation on both iOS and Android
| JavaScript | mit | App3ad/bo7,App3ad/bo7 |
420b9c0c54445bcdec5079792a551d9508174216 | client/components/SignIn.js | client/components/SignIn.js | import React, { Component } from 'react'
export class SignIn extends Component {
constructor(props) {
super(props)
}
render() {
return (
<div>
<div>
What up
</div>
</div>
)
}
} | import React, { Component } from 'react';
import { FacebookLogin } from 'react-facebook-login-component';
export class SignIn extends Component {
constructor(props, context) {
super(props, context);
}
responseFacebook (response, a) {
console.log(response, a);
//anything else you want to do(save to l... | Add facebook login button (functional.. ish) | Add facebook login button (functional.. ish)
| JavaScript | mit | scrumptiousAmpersand/journey,scrumptiousAmpersand/journey |
ba8c584360ab8a8de2039c8965006dde9293653d | app/scripts/services/customers-service.js | app/scripts/services/customers-service.js | 'use strict';
(function() {
angular.module('ncsaas')
.service('customersService', ['baseServiceClass', '$q', 'agreementsService', customersService]);
function customersService(baseServiceClass, $q, agreementsService) {
var ServiceClass = baseServiceClass.extend({
filterByCustomer: false,
init... | 'use strict';
(function() {
angular.module('ncsaas')
.service('customersService', ['baseServiceClass', '$q', 'agreementsService', customersService]);
function customersService(baseServiceClass, $q, agreementsService) {
var ServiceClass = baseServiceClass.extend({
filterByCustomer: false,
init... | Add filter by state (SAAS-635) | Add filter by state (SAAS-635)
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport |
d6ade7893ed822243f099aee77db089e0ed6b8f4 | components/ClickableImage.js | components/ClickableImage.js | import React, { Component } from 'react';
import { TouchableOpacity, Image, View } from 'react-native';
// import styles from './styles/ClickableImageStyle';
import PropTypes from 'prop-types';
import { StackNagivator } from 'react-navigation';
import FadeInView from '../animations/FadeInView';
export default class Cl... | import React, { Component } from 'react';
import { TouchableOpacity, Image, View } from 'react-native';
// import styles from './styles/ClickableImageStyle';
import PropTypes from 'prop-types';
import { StackNagivator } from 'react-navigation';
import FadeInView from '../animations/FadeInView';
export default class Cl... | Add variables and function call for longtouch | Add variables and function call for longtouch
| JavaScript | mit | fridl8/cold-bacon-client,fridl8/cold-bacon-client,fridl8/cold-bacon-client |
74bfa5bf70f01d6cc4365f6e6bf43629c45006f1 | components/calendar/index.js | components/calendar/index.js | import Day from './day';
const Calendar = ({ events }) => {
let id = 0;
let lastEpochDays = 0;
let daysEvents = [];
let allDays = [];
for (let event of events) {
event.start_time = new Date(event.start_time);
let epochDays = Math.floor(event.start_time.getTime() / 8.64e7);
if (lastEpochDays =... | import Day from './day';
const Calendar = ({ events }) => {
let id = 0;
let lastEpochDays = 0;
let daysEvents = [];
let allDays = [];
const MS_IN_DAY = 1000*60*60*24;
for (let event of events) {
event.start_time = new Date(event.start_time);
let epochDays = Math.floor(event.start_time.getTime()... | Make epochDays more legible by visualizing what it's divided by | Make epochDays more legible by visualizing what it's divided by
| JavaScript | mit | dotKom/glowing-fortnight,dotKom/glowing-fortnight |
b23cc5f6eaaab92895721d4a5758c819bd37b125 | hardware/index.js | hardware/index.js | var EventEmitter = require('events').EventEmitter;
var hardware = module.exports = new EventEmitter();
//var e = nobleEmitter.connect(peripheralUuid, serviceUuid, characteristicUuid);
var e = (process.env.DEVICE) ?
require('./serialport')(process.env.DEVICE) :
require('./stdin-mock');
var command... | var EventEmitter = require('events').EventEmitter;
var hardware = module.exports = new EventEmitter();
//var e = nobleEmitter.connect(peripheralUuid, serviceUuid, characteristicUuid);
var e = (process.env.DEVICE) ?
require('./serialport')(process.env.DEVICE) :
require('./stdin-mock');
var command... | Add command to allow reset with longpress on both a and b. | Add command to allow reset with longpress on both a and b.
| JavaScript | mit | bekk/bekkboard,bekk/bekkboard,bekk/bekkboard,bekk/bekkboard |
11cf8321779c021234a9d56e820e1a386b9aca6b | client/app/components/game/game.js | client/app/components/game/game.js | import angular from 'angular';
import uiRouter from 'angular-ui-router';
import gameComponent from './game.component';
const gameModule = angular
.module('game', [uiRouter])
.config(($stateProvider) => {
"ngInject";
$stateProvider.state('game', {
url: '/game',
component: 'game'
});
})
... | import angular from 'angular';
import uiRouter from 'angular-ui-router';
import gameComponent from './game.component';
const gameModule = angular
.module('game', [uiRouter])
.config(($stateProvider) => {
"ngInject";
$stateProvider.state('game', {
url: '/game',
component: 'game',
resolve:... | Initialize GameService upon displaying GameComponent | Initialize GameService upon displaying GameComponent
| JavaScript | apache-2.0 | basiloungas/word-game,basiloungas/word-game |
bc0e51146b5868a60c34c144f250cd3dfc3e851f | client/components/ServerListing.js | client/components/ServerListing.js | import React from 'react';
import ServerThumbnail from './ServerThumbnail';
const ServerListing = ({
servers
}) => (
<div className="servers">
{servers.length === 0 ? (
<p className="empty">
No servers are currently available.
</p>
) : servers.map((server) => (
<ServerThumbnail
... | import React from 'react';
import ServerThumbnail from './ServerThumbnail';
const ServerListing = ({
servers
}) => (
<div className="servers">
{servers.length === 0 ? (
<p className="empty">
No servers are currently available.
</p>
) : servers.map((server) => (
<ServerThumbnail
... | Add a margin around server thumbnails for mobile screens. | client: Add a margin around server thumbnails for mobile screens.
| JavaScript | mit | u-wave/hub |
7da907984b2dac69e32c0c17f8339d695f9ab76a | src/redux-entity-update.js | src/redux-entity-update.js | export const UPDATE_ENTITY = 'UPDATE_ENTITY';
export function updateEntity(href, token, entity) {
return {
type: UPDATE_ENTITY,
href,
token,
entity,
updatedAt: Date.now()
};
}
| export const UPDATE_ENTITY = 'UPDATE_ENTITY';
export function updateEntity(href, token, entity) {
const selfLink = entity && entity.links && entity.links.find(link => link.rel.includes('self'));
if (selfLink) {
href = selfLink.href;
}
return {
type: UPDATE_ENTITY,
href,
token,
entity,
updatedAt: Date.n... | Fix redux update not using self link | Fix redux update not using self link
| JavaScript | mit | Brightspace/inspiration-parallelms-ui,Brightspace/inspiration-parallelms-ui |
b423e55f7b47a73fcfae11880f75244ef7bf4ae8 | content/messenger-overlay.js | content/messenger-overlay.js | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
(function (aGlobal) {
var Cc = Components.classes;
var Ci = Components.interfaces;
var process = Cc["@mozill... | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
(function (aGlobal) {
var Cc = Components.classes;
var Ci = Components.interfaces;
const kIEPath = "C:\\Prog... | Create file and process instance every time | Create file and process instance every time
| JavaScript | mpl-2.0 | clear-code/tb-switch-link-external-handler |
5975fc9f41de80f47bf4cb325a60d7757cda4599 | seneca-browser-src.js | seneca-browser-src.js | var Timers = require('timers')
var SenecaModule = require('seneca')
global.setImmediate = global.setImmediate || Timers.setImmediate
var SenecaExport = function(options, more_options) {
options = options || {}
options.legacy = options.legacy || {}
options.legacy.transport = false
var seneca = SenecaModule(op... | var Timers = require('timers')
var SenecaModule = require('seneca')
global.setImmediate = global.setImmediate || Timers.setImmediate
var SenecaExport = function(options, more_options) {
options = options || {}
options.legacy = options.legacy || {}
options.legacy.transport = false
var seneca = SenecaModule(op... | Add credentials option in order to send headers | Add credentials option in order to send headers
| JavaScript | mit | rjrodger/seneca-browser,rjrodger/seneca-browser |
2fd7a86cc4dce28bf9118237f4dcfa23a51268de | app/helpers/smooth_helper.js | app/helpers/smooth_helper.js | Dashboard.SmoothHelper = Ember.Mixin.create({
_smoothHelperInterval: 10,
_smoothHelperProperties: function() {
return {};
}.property(),
setSmooth: function(property, value, duration) {
var p = this.get('_smoothHelperProperties');
var d = typeof duration !== 'undefined' ? duration : 1000;
if (p... | Dashboard.SmoothHelper = Ember.Mixin.create({
_smoothHelperInterval: 10,
_smoothHelperDuration: 1000,
_smoothHelperProperties: function() {
return {};
}.property(),
setSmooth: function(property, value, duration) {
var p = this.get('_smoothHelperProperties');
var d = typeof duration !== 'undefine... | Make the default duration of the transition in the 'setSmooth' method of SmoothHelper a property. | Make the default duration of the transition in the 'setSmooth' method of
SmoothHelper a property.
| JavaScript | mit | ShiftForward/mucuchies,kloudsio/mucuchies,kloudsio/mucuchies,ShiftForward/mucuchies |
2f12e9e36a5739f92f34b9d4db1971999cc91301 | js/game.js | js/game.js | // Game Controller
// A checkers board has 64 squares like a chess board but it only uses 32 squares all the same color
// Each player has 12 pieces and pieces that make until the last squares on the enemy side is promoted
// Promoted piece also moves on diagonals with no limit of squares if it is free
// The moves are... | // Game Controller
// A checkers board has 64 squares like a chess board but it only uses 32 squares all the same color
// Each player has 12 pieces and pieces that make until the last squares on the enemy side is promoted
// Promoted piece also moves on diagonals with no limit of squares if it is free
// The moves are... | Add call to Board flatten function and create selectPiece prototype function | Add call to Board flatten function and create selectPiece prototype function
| JavaScript | mit | RenanBa/checkers-v1,RenanBa/checkers-v1 |
959d7b5adc5a0c99ea00c5785c7a29879b100685 | _site/js/load.js | _site/js/load.js | (function() {
"use strict";
head.js("js/vendor/json2.js")
.js("js/vendor/jsonlint.js")
.js("js/vendor/lucene/lucene-query-parser.js")
.js("http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js","js/vendor/angular.min.js", function() {
head.js("js/vendor/angular-san... | (function() {
"use strict";
head.js("js/vendor/json2.js")
.js("js/vendor/jsonlint.js")
.js("http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js","js/vendor/angular.min.js", function() {
head.js("js/vendor/angular-sanitize.min.js","js/vendor/ng-bootstrap/ui-bootstrap-cust... | Remove lucene query parser lib | Remove lucene query parser lib
Originally added for an experiment to parse lucene query_string
queries, this lib is not currently used. Removeing
from the autoloader sequence, but leaving the lib and grammar
file in case I want to revisit the experiment later.
| JavaScript | apache-2.0 | AlphaStaxLLC/elasticsearch-inquisitor,polyfractal/elasticsearch-inquisitor,polyfractal/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor |
ba3fd95f14257da97bcb7f9227bba49c48bcea10 | examples/vuex-store/store/index.js | examples/vuex-store/store/index.js | import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
state: {
counter: 0
},
mutations: {
increment (state) {
state.counter++
}
}
})
export default store
| import Vuex from 'vuex'
const store = new Vuex.Store({
state: {
counter: 0
},
mutations: {
increment (state) {
state.counter++
}
}
})
export default store
| Fix example for vuex store | Fix example for vuex store
| JavaScript | mit | cj/nuxt.js,jfroffice/nuxt.js,cj/nuxt.js,jfroffice/nuxt.js,mgesmundo/nuxt.js,mgesmundo/nuxt.js |
2168a53a5fa4f1d19eafd2cc8a3c8eede9fc3db5 | config/environments/development.js | config/environments/development.js | var express = require('express');
module.exports = function() {
this.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
this.set('db-uri', 'mongodb://localhost/rezerve');
this.set('view options', {
pretty: true
});
}
| var express = require('express');
var utils = require('connect').utils;
module.exports = function() {
this.set('db-uri', 'mongodb://localhost/rezerve');
this.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
// Set pretty prints
this.express.locals.pretty = true;
};
| Add pretty print for Jade HTML output | Add pretty print for Jade HTML output
| JavaScript | mit | pblondin/re-zerve,pblondin/re-zerve |
76ce210f251d1c9e31f0f8211328d5f81805df22 | lib/cli.js | lib/cli.js | #! /usr/bin/env node
var cuecard = require('./cuecard.js'),
path = require('path'),
cuecardFile = require(path.join(process.cwd(), 'cuecard.js'));
if (cuecardFile.config) {
cuecard.create(cuecardFile.config);
} | #! /usr/bin/env node
var path = require('path'),
cuecardFile = require(path.join(process.cwd(), 'cuecard.js')); | Remove global Cuecard dep to run slideshow | Remove global Cuecard dep to run slideshow
| JavaScript | mit | markdalgleish/cuecard |
c87f02a4c2eada4212c7938e07bc3f5154c66901 | client-vendor/after-body/jquery.lazyImageSetup/jquery.lazyImageSetup.js | client-vendor/after-body/jquery.lazyImageSetup/jquery.lazyImageSetup.js | /*
* Author: CM
*/
(function($) {
/**
* @param {Object} [lazyLoadOptions] options to lazy-load-images plugin.
* @returns {jQuery}
*/
$.fn.lazyImageSetup = function(lazyLoadOptions) {
return this.each(function() {
var options = _.defaults(lazyLoadOptions || {}, {
threshold: 600,
... | /*
* Author: CM
*/
(function($) {
/**
* @param {Object} [lazyLoadOptions] options to lazy-load-images plugin.
* @returns {jQuery}
*/
$.fn.lazyImageSetup = function(lazyLoadOptions) {
return this.each(function() {
var options = _.defaults(lazyLoadOptions || {}, {
threshold: 600,
... | Improve container detection for images lazy load | Improve container detection for images lazy load
| JavaScript | mit | njam/CM,vogdb/cm,fauvel/CM,njam/CM,vogdb/cm,cargomedia/CM,vogdb/cm,cargomedia/CM,vogdb/cm,njam/CM,fauvel/CM,fauvel/CM,cargomedia/CM,fauvel/CM,njam/CM,fauvel/CM,njam/CM,cargomedia/CM,vogdb/cm |
1605710f9057422354187b749aa30ba57a7a1ac9 | lib/web.js | lib/web.js | var express = require('express');
var path = require('path');
var expressValidator = require('express-validator');
var home = require('./routes/home.js');
var api = require('./routes/api.js');
var port = process.env.PORT || 5000;
var app = express();
app.configure(function () {
app.set('views', __dirname + '/views... | var express = require('express');
var path = require('path');
var expressValidator = require('express-validator');
var home = require('./routes/home.js');
var api = require('./routes/api.js');
var port = process.env.PORT || 5000;
var app = express();
app.configure(function () {
app.set('views', __dirname + '/views... | Add Access-Control-Allow-Origin for CORS from gh-pages | Add Access-Control-Allow-Origin for CORS from gh-pages
| JavaScript | mit | creationix/npmalerts,seriema/npmalerts |
79824fea9e579c38cfcecbeb1281258f89e1133d | bin/build_server_runtime.js | bin/build_server_runtime.js | #!/usr/bin/env node
'use strict'
const browserify = require('browserify')
const str = require('string-to-stream')
const babel = require('babel-core')
const babelify = require('babelify')
const envify = require('envify')
const pkg = require('../package.json')
browserify(str(js(pkg)), { basedir: process.cwd(), detect... | #!/usr/bin/env node
'use strict'
const browserify = require('browserify')
const str = require('string-to-stream')
const babel = require('babel-core')
const babelify = require('babelify')
const envify = require('envify')
const pkg = require('../package.json')
browserify(str(js(pkg)), { basedir: process.cwd() })
.t... | Resolve browser field even in server runtime | Resolve browser field even in server runtime
Otherwise node shims aren't included (see
https://github.com/substack/node-browserify/issues/1654).
| JavaScript | mit | domachine/penguin,domachine/penguin |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.