commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
a67a70ec7693081fa6aa1f94eb9e82cb22b4e7a4 | lib/create-styled-component.js | lib/create-styled-component.js | import React from "react";
import R from "ramda";
import T from "prop-types";
export default function createStyledComponent(displayName, use) {
return class StyledComponent extends React.Component {
static displayName = displayName;
static propTypes = {
use: T.oneOfType([T.string, T.func]),
visu... | import React from "react";
import R from "ramda";
import T from "prop-types";
export default function createStyledComponent(displayName, use) {
return class StyledComponent extends React.Component {
static displayName = displayName;
static propTypes = {
use: T.oneOfType([T.string, T.func]),
visu... | Add support for "innerRef" prop | Add support for "innerRef" prop
| JavaScript | mit | arturmuller/fela-components |
058a1e3a32b3dda08bb3f8cd3f3fc695b3b06a8f | services/auth.js | services/auth.js | const jwt = require('jsonwebtoken')
const config = require('config')
const bcrypt = require('bcrypt')
const User = require('./../models/user')
const Authenticate = (user) => {
return new Promise((resolve, reject) => {
User.findOne({ 'where': { 'email': user.email } })
.then((record) => {
if (!... | const jwt = require('jsonwebtoken')
const config = require('config')
const bcrypt = require('bcrypt')
const _ = require('lodash')
const User = require('./../models/user')
const Authenticate = (user) => {
return new Promise((resolve, reject) => {
User.findOne({ 'where': { 'email': user.email } })
... | Use database record to sign jwt token without password | Use database record to sign jwt token without password
| JavaScript | mit | lucasrcdias/customer-mgmt |
f0c6fbfa23714cd0996886bcd76ed4789c85932b | src/__tests__/components/CloseButton.js | src/__tests__/components/CloseButton.js | /* eslint-env jest */
import React from 'react';
import { shallow } from 'enzyme';
import CloseButton from './../../components/CloseButton';
const closeToast = jest.fn();
describe('CloseButton', () => {
it('Should call closeToast on click', () => {
const component = shallow(<CloseButton closeToast={closeToast}... | /* eslint-env jest */
import React from 'react';
import { shallow } from 'enzyme';
import CloseButton from './../../components/CloseButton';
const closeToast = jest.fn();
describe('CloseButton', () => {
it('Should call closeToast on click', () => {
const component = shallow(<CloseButton closeToast={closeToast}... | Fix failing test event undefined when shadow rendering | Fix failing test event undefined when shadow rendering
| JavaScript | mit | fkhadra/react-toastify,sniphpet/react-toastify,fkhadra/react-toastify,fkhadra/react-toastify,sniphpet/react-toastify,fkhadra/react-toastify |
6d59fcf4270230a50a33f61c2d59643798f7e2df | lib/install/filter-invalid-actions.js | lib/install/filter-invalid-actions.js | 'use strict'
var path = require('path')
var validate = require('aproba')
var log = require('npmlog')
var getPackageId = require('./get-package-id.js')
module.exports = function (top, differences, next) {
validate('SAF', arguments)
var action
var keep = []
/*eslint no-cond-assign:0*/
while (action = differenc... | 'use strict'
var path = require('path')
var validate = require('aproba')
var log = require('npmlog')
var getPackageId = require('./get-package-id.js')
module.exports = function (top, differences, next) {
validate('SAF', arguments)
var action
var keep = []
differences.forEach(function (action) {
var cmd = ... | Remove extraneous warns when removing a symlink | uninstall: Remove extraneous warns when removing a symlink
Don't warn about not acting on a module in a symlink when the module's
parent is being removed anyway
| JavaScript | artistic-2.0 | TimeToogo/npm,midniteio/npm,DaveEmmerson/npm,TimeToogo/npm,yodeyer/npm,princeofdarkness76/npm,ekmartin/npm,ekmartin/npm,lxe/npm,cchamberlain/npm,misterbyrne/npm,yodeyer/npm,segrey/npm,xalopp/npm,princeofdarkness76/npm,kemitchell/npm,princeofdarkness76/npm,yodeyer/npm,kemitchell/npm,misterbyrne/npm,segrey/npm,chadnickbo... |
492e5e6f35d8fd3cb7d79da358ea710364fa0fe5 | app/scripts-browserify/index.js | app/scripts-browserify/index.js | const config = require('collections-online/shared/config');
// Always include collections-online's base
require('base')({
helpers: require('../../shared/helpers')
});
// Project specific
require('analytics');
if(config.features.sitewidePassword) {
require('./sitewide-password');
}
| const config = require('collections-online/shared/config');
// Always include collections-online's base
// FIXME: For some reason require currently does not accept "base" as the
// module. To address this we have to provide a full path to the file.
require('../../node_modules/collections-online/app/scripts-browserify/b... | Fix JavaScript error causing images not to be loaded | Fix JavaScript error causing images not to be loaded
The error is caused by AssetPage not being available in the window
scope. It is currently not included in browserify-index.js either. This
is despite the fact that it has been so earlier. Other browserify
scripts from collections-online are not included either.
The... | JavaScript | mit | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder |
6b9b235b828956915dda289ef845455798c3a281 | source/logger.js | source/logger.js | if (Meteor.isServer) {
winston = Npm.require('winston');
}
Space.Logger = Space.Object.extend(Space, 'Logger', {
_logger: null,
_state: 'stopped',
Constructor() {
if (Meteor.isServer) {
this._logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)()
... | if(Meteor.isServer) {
winston = Npm.require('winston');
}
Space.Logger = Space.Object.extend(Space, 'Logger', {
_logger: null,
_state: 'stopped',
Constructor() {
if(Meteor.isServer) {
this._logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)()
]... | Apply arguments, check message for string | Apply arguments, check message for string
| JavaScript | mit | meteor-space/base,meteor-space/base |
d4d3cee54f57442c2166bead54a8c20d2be0274d | public/lib/feathers/feathers-client.js | public/lib/feathers/feathers-client.js | import feathers from 'feathers/client';
import io from 'steal-socket.io';
import socketio from 'feathers-socketio/client';
import auth from 'feathers-authentication/client';
import hooks from 'feathers-hooks';
var socket = io({
transports: ['websocket']
});
const app = feathers()
.configure(socketio(socket))
.co... | import feathers from 'feathers/client';
import io from 'socket.io-client/dist/socket.io';
import socketio from 'feathers-socketio/client';
import auth from 'feathers-authentication/client';
import hooks from 'feathers-hooks';
var socket = io({
transports: ['websocket']
});
const app = feathers()
.configure(socketi... | Use socket.io-client in place of steal-socket.io | Use socket.io-client in place of steal-socket.io
| JavaScript | mit | donejs/bitcentive,donejs/bitcentive |
ffd02046e61ba52f4ff0f0189efa260f3befeb76 | src/component.js | src/component.js | import { select, local } from "d3-selection";
export default function (Component){
var className = Component.className,
tagName = Component.tagName,
componentLocal = local();
return function (selection, props){
var components = selection
.selectAll(className ? "." + className : tagName)
... | import { select, local } from "d3-selection";
export default function (component){
var className = component.className,
tagName = component.tagName,
render = component.render || function(){};
return function (selection, props){
var components = selection
.selectAll(className ? "." + className... | Restructure implementation to meet new tests | Restructure implementation to meet new tests
| JavaScript | bsd-3-clause | curran/d3-component |
1e2e0af67d1ca051e4b87c77c832e1d6644eb439 | spec/javascripts/pdf/page_spec.js | spec/javascripts/pdf/page_spec.js | import Vue from 'vue';
import pdfjsLib from 'vendor/pdf';
import workerSrc from 'vendor/pdf.worker.min';
import PageComponent from '~/pdf/page/index.vue';
import testPDF from '../fixtures/blob/pdf/test.pdf';
const Component = Vue.extend(PageComponent);
describe('Page component', () => {
let vm;
let testPage;
p... | import Vue from 'vue';
import pdfjsLib from 'vendor/pdf';
import workerSrc from 'vendor/pdf.worker.min';
import PageComponent from '~/pdf/page/index.vue';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import testPDF from 'spec/fixtures/blob/pdf/test.pdf';
describe('Page component', () => {
c... | Remove waiting from PDF page component test | Remove waiting from PDF page component test
| JavaScript | mit | stoplightio/gitlabhq,stoplightio/gitlabhq,dreampet/gitlab,stoplightio/gitlabhq,axilleas/gitlabhq,iiet/iiet-git,dreampet/gitlab,dreampet/gitlab,iiet/iiet-git,mmkassem/gitlabhq,axilleas/gitlabhq,dreampet/gitlab,axilleas/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,mmkassem/gitlabhq,mmkassem/gitlabhq,mmkassem/gitlabhq,stopligh... |
609e022fe21ca52f678c04bddd4a150e9f112787 | app/models/account.js | app/models/account.js | // Example model
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
// Authenticate Schema
var Account = new Schema ({
//conflict with node so changed from domain
domainProvider: { type: String, default: ''},
uid: { type: String, default: ''},
// Could this be better?
//user: { ty... | // Example model
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
// Authenticate Schema
var Account = new Schema ({
//conflict with node so changed from domain
domainProvider: { type: String, default: ''},
uid: { type: String, default: ''},
// Could this be better?
//user: { ty... | Use appropriate model types - continued | Use appropriate model types - continued
| JavaScript | mit | RichardVSaasbook/ITCS4155Team4,lestrell/bridgesAPI,squeetus/bridgesAPI,stevemacn/bridgesAPI,lestrell/bridgesAPI,squeetus/bridgesAPI,stevemacn/bridgesAPI |
0c496c344830c479413def1cf70c741d142a4193 | app/models/comment.js | app/models/comment.js | import DS from 'ember-data';
export default DS.Model.extend({
blocks: DS.attr(),
insertedAt: DS.attr('date', { defaultValue() { return new Date(); } }),
updatedAt: DS.attr('date'),
canvas: DS.belongsTo('canvas'),
block: DS.belongsTo('block'),
creator: DS.belongsTo('user'),
});
| import DS from 'ember-data';
import Ember from 'ember';
export default DS.Model.extend({
blocks: DS.attr(),
insertedAt: DS.attr('date', { defaultValue() { return new Date(); } }),
updatedAt: DS.attr('date'),
canvas: DS.belongsTo('canvas'),
block: DS.belongsTo('block'),
creator: DS.belongsTo('user'),
bloc... | Add computed property blockID to fix deprecated binding issues | Add computed property blockID to fix deprecated binding issues
| JavaScript | apache-2.0 | usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2 |
195fd6df585d9378cfb1331c320f5179d1018248 | app/models/service.js | app/models/service.js | import Resource from 'ember-api-store/models/resource';
import { get, computed } from '@ember/object';
import { inject as service } from '@ember/service';
export default Resource.extend({
intl: service(),
scope: service(),
canEditYaml: true,
displayKind: computed('intl.locale', 'kind', function() {
const... | import Resource from 'ember-api-store/models/resource';
import { get, computed } from '@ember/object';
import { reference } from 'ember-api-store/utils/denormalize';
import { inject as service } from '@ember/service';
export default Resource.extend({
intl: service(),
scope: service(),
clusterStore: service(),
... | Fix lb group by issue | Fix lb group by issue
| JavaScript | apache-2.0 | rancher/ui,vincent99/ui,rancher/ui,lvuch/ui,rancher/ui,vincent99/ui,westlywright/ui,rancherio/ui,vincent99/ui,rancherio/ui,lvuch/ui,lvuch/ui,westlywright/ui,rancherio/ui,westlywright/ui |
d1375e032ac0b4cf0fb56501dc0e79c20d6e0d29 | app/static/js/init.js | app/static/js/init.js | $(document).ready(function(){
$('#title_inc').tagsInput({'defaultText': '…'});
$('#title_exc').tagsInput({'defaultText': '…'});
$('#link_inc').tagsInput({'defaultText': '…'});
$('#link_exc').tagsInput({'defaultText': '…'});
set_submit(false)
$('#rss_url').blur(function(){
url = $(this... | $(document).ready(function(){
$('#title_inc').tagsInput({'defaultText': '…'});
$('#title_exc').tagsInput({'defaultText': '…'});
$('#link_inc').tagsInput({'defaultText': '…'});
$('#link_exc').tagsInput({'defaultText': '…'});
set_submit(false)
$('#rss_url').blur(check_url)
check_url()
})
... | Fix ajax URL check to run on page load | Fix ajax URL check to run on page load
| JavaScript | mit | cuducos/filterss,cuducos/filterss,cuducos/filterss |
3e830bd1b65b5f83980c68ec56efe328f3e69781 | src/wysihtml5.js | src/wysihtml5.js | /**
* @license wysihtml5 v@VERSION
* https://github.com/xing/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
*
* Copyright (C) 2011 XING AG
* Licensed under GNU General Public License
*
*/
var wysihtml5 = {
version: "@VERSION",
// namespaces
commands: {},
dom: {},
quirks:... | /**
* @license wysihtml5 v@VERSION
* https://github.com/xing/wysihtml5
*
* Author: Christopher Blum (https://github.com/tiff)
*
* Copyright (C) 2012 XING AG
* Licensed under the MIT license (MIT)
*
*/
var wysihtml5 = {
version: "@VERSION",
// namespaces
commands: {},
dom: {},
quirks: ... | Update main js file to reflect new license (thx for pointing this out @stereobit) | Update main js file to reflect new license (thx for pointing this out @stereobit) | JavaScript | mit | mmolhoek/wysihtml,camayak/wysihtml5,vitoravelino/wysihtml,Trult/wysihtml,modulexcite/wysihtml,argenticdev/wysihtml,qualwas72/wysihtml5,StepicOrg/wysihtml5,uxtx/wysihtml,StepicOrg/wysihtml5,mrjoelkemp/wysihtml,Voog/wysihtml,Attamusc/wysihtml,argenticdev/wysihtml,jeffersoncarpenter/wysihtml5,flowapp/wysihtml5,GerHobbelt/... |
89dd3fd60f1c35c9c8a50141c0579042919e6d51 | static/js/vcs.js | static/js/vcs.js | var $ = $ || function() {}; // Keeps from throwing ref errors.
function swapselected(from, to) {
$(to).html(options[$(from).val()]);
}
function detailselected(from, to) {
$(to).text(details[$(from).val()]);
}
$(function() {
$("#grp-slct").change(
function() {
swapselected("#grp-slct", "#subgrp-slct");
});
... | var $ = $ || function() {}; // Keeps from throwing ref errors.
function swapselected(from, to) {
$(to).html(options[$(from).val()]);
}
function detailselected(from, to) {
$(to).text(details[$(from).val()]);
}
$(function() {
$("#grp-slct").change(
function() {
swapselected("#grp-slct", "#subgrp-slct");
});
... | Add the hidden activity value to the form so we know which activity has been selected. | Add the hidden activity value to the form so we know which activity has been selected.
| JavaScript | bsd-3-clause | AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker |
486a84e01f4e1ea9ab1ab0bf8dbbaaf2b80c4db6 | grant.js | grant.js |
exports.express = () => {
return require('./lib/consumer/express')
}
exports.koa = () => {
var version = parseInt(require('koa/package.json').version.split('.')[0])
return require('./lib/consumer/koa' + (version < 2 ? '' : '2'))
}
exports.hapi = () => {
var version = parseInt(require('hapi/package.json').ver... |
exports.express = () => {
return require('./lib/consumer/express')
}
exports.koa = () => {
var version = parseInt(require('koa/package.json').version.split('.')[0])
return require('./lib/consumer/koa' + (version < 2 ? '' : '2'))
}
exports.hapi = () => {
var pkg
try {
pkg = require('hapi/package.json')
... | Add support for @hapi/hapi namespace | Add support for @hapi/hapi namespace
| JavaScript | mit | simov/grant |
6ed889b77ae4f84a757881249d13ab8fffac6b75 | index.js | index.js | var Twit = require('twit');
var config = require('./config.json');
var talks = require('libtlks').talk;
var T = new Twit({
consumer_key: config.twitterConsumerKey,
consumer_secret: config.twitterConsumerSecret,
access_token: config.workers.twitter.token,
access_token_secret: config.workers.twitter.sec... | var Twit = require('twit');
var config = require('./config.json');
var talks = require('libtlks').talk;
var T = new Twit({
consumer_key: config.twitterConsumerKey,
consumer_secret: config.twitterConsumerSecret,
access_token: config.workers.twitter.token,
access_token_secret: config.workers.twitter.sec... | Change attribution message from 'by' to 'via' | Change attribution message from 'by' to 'via'
| JavaScript | mit | tlksio/worker.twitter |
b3fd8d1bc3d4becb398b610f9b62334ac2b213d4 | index.js | index.js | #!/usr/bin/env node --harmony
var program = require('commander');
var fetch = require('node-fetch');
var base64 = require('base-64');
program
.arguments('<uri>')
.version('0.0.2')
.description('A command line tool to retrieve that URI to the latest artifact from an Artifactory repo')
.option('-u, --username <user... | #!/usr/bin/env node --harmony
var program = require('commander');
var fetch = require('node-fetch');
var base64 = require('base-64');
async function fetchArtifactList(uri, username, password) {
const response = await fetch(uri, {
method: 'get',
headers: {
'Authorization': 'Basic ' + base64.encode(username + '... | Throw error and exit on failure | Throw error and exit on failure
| JavaScript | mit | kmerhi/artifactoid |
6ea8681b9224beb02aed1b7d0b61ad00880517c5 | index.js | index.js | 'use strict';
var objectToString = Object.prototype.toString;
var ERROR_TYPE = '[object Error]';
module.exports = isError;
function isError(err) {
return objectToString.call(err) === ERROR_TYPE;
}
| 'use strict';
var objectToString = Object.prototype.toString;
var getPrototypeOf = Object.getPrototypeOf;
var ERROR_TYPE = '[object Error]';
module.exports = isError;
function isError(err) {
while (err) {
if (objectToString.call(err) === ERROR_TYPE) {
return true;
}
err = getP... | Fix for all combinations of foreign and inherited | Fix for all combinations of foreign and inherited
| JavaScript | mit | Raynos/is-error |
d2efe553705101504c4e06ef4f5ec6e9b99c7896 | index.js | index.js | /* jshint node: true */
'use strict';
var VersionChecker = require('ember-cli-version-checker');
module.exports = {
name: 'ember-scrollable',
init: function() {
this._super.init && this._super.init.apply(this, arguments);
var checker = new VersionChecker(this);
this._checkerForEmber = checker.for('... | /* jshint node: true */
'use strict';
var VersionChecker = require('ember-cli-version-checker');
module.exports = {
name: 'ember-scrollable',
init: function() {
this._super.init && this._super.init.apply(this, arguments);
var checker = new VersionChecker(this);
this._checkerForEmber = checker.for('... | Allow addon to be nested at depth of n | Allow addon to be nested at depth of n | JavaScript | mit | alphasights/ember-scrollable,alphasights/ember-scrollable,alphasights/ember-scrollable,alphasights/ember-scrollable |
2910888dea3d7b8ec0a1312acfcf9f9a3a7f0332 | index.js | index.js | var isPatched = false;
var slice = Array.prototype.slice;
if (isPatched) return;
function addColor(string) {
var colorName = getColorName(string);
var colors = {
green: ['\x1B[32m', '\x1B[39m'],
red: ['\x1B[1m\x1B[31m', '\x1B[39m\x1B[22m'],
yellow: ['\x1B[33m', '\x1B[39m']
}
return colors[colorNa... | var isPatched = false;
var slice = Array.prototype.slice;
if (isPatched) return;
function addColor(string) {
var colorName = getColorName(string);
var colors = {
green: ['\x1B[32m', '\x1B[39m'],
red: ['\x1B[1m\x1B[31m', '\x1B[39m\x1B[22m'],
yellow: ['\x1B[33m', '\x1B[39m']
}
return colors[colorNa... | Append timestamp to existing message string | Append timestamp to existing message string
- This fixes a race condition that could cause the timestamp to become
separated from the rest of the message if there were a lot of calls to
a log method roughly at the same time.
| JavaScript | mit | coachme/console-time |
d3b58ec8c213f169dd5980dfe0be859058a32f0d | index.js | index.js |
var request = require('request-core')
function client (options) {
if (options.end === undefined) {
options.end = true
}
return request(options)
}
module.exports = client
|
var request = require('@http/core')
function client (options) {
if (options.end === undefined) {
options.end = true
}
return request(options)
}
module.exports = client
| Migrate to the @http npm scope | Migrate to the @http npm scope
| JavaScript | apache-2.0 | request/client |
a100cff62a2ebc0c9bb640b71cee9d54da90cef0 | index.js | index.js | export {all} from './lib/all.js'
export {one} from './lib/one.js'
export {toHast} from './lib/index.js'
| /**
* @typedef {import('./lib/index.js').Options} Options
* @typedef {import('./lib/index.js').Handler} Handler
* @typedef {import('./lib/index.js').Handlers} Handlers
* @typedef {import('./lib/index.js').H} H
*/
export {all} from './lib/all.js'
export {one} from './lib/one.js'
export {toHast} from './lib/index.j... | Add exports of a couple of types | Add exports of a couple of types
| JavaScript | mit | wooorm/mdast-util-to-hast,syntax-tree/mdast-util-to-hast |
342df768597a9e6cdc8205d8fd19431dcc5af73c | index.js | index.js | /**
* Remove initial and final spaces and tabs at the line breaks in `value`.
* Does not trim initial and final spaces and tabs of the value itself.
*
* @param {string} value
* Value to trim.
* @returns {string}
* Trimmed value.
*/
export function trimLines(value) {
return String(value).replace(/[ \t]*\n+... | /**
* Remove initial and final spaces and tabs at the line breaks in `value`.
* Does not trim initial and final spaces and tabs of the value itself.
*
* @param {string} value
* Value to trim.
* @returns {string}
* Trimmed value.
*/
export function trimLines(value) {
return String(value).replace(/[ \t]*(\r... | Add support for carriage return, carriage return + line feed | Add support for carriage return, carriage return + line feed
| JavaScript | mit | wooorm/trim-lines |
314febf7078ea6becc74d46ca562cb442c73c34e | index.js | index.js | /* jshint node: true */
'use strict';
// var path = require('path');
module.exports = {
name: 'ember-power-select',
included: function(app) {
// Don't include the precompiled css file if the user uses ember-cli-sass
if (!app.registry.availablePlugins['ember-cli-sass']) {
app.import('vendor/ember-pow... | /* jshint node: true */
'use strict';
// var path = require('path');
module.exports = {
name: 'ember-power-select',
included: function(app) {
// Don't include the precompiled css file if the user uses ember-cli-sass
if (!app.registry.availablePlugins['ember-cli-sass']) {
app.import('vendor/ember-pow... | Fix invocation of ember-basic-dropdown's contentFor hook | Fix invocation of ember-basic-dropdown's contentFor hook
| JavaScript | mit | esbanarango/ember-power-select,cibernox/ember-power-select,cibernox/ember-power-select,chrisgame/ember-power-select,esbanarango/ember-power-select,esbanarango/ember-power-select,chrisgame/ember-power-select,Dremora/ember-power-select,Dremora/ember-power-select,cibernox/ember-power-select,cibernox/ember-power-select |
9014971093b57ca00e7d36bfefeaaba3a3ccc9dd | index.js | index.js | module.exports = {
parser: 'babel-eslint',
extends: 'airbnb',
globals: {
before: true,
beforeEach: true,
after: true,
afterEach: true,
describe: true,
it: true,
},
rules: {
'arrow-body-style': [0],
'react/jsx-no-bind': [0],
},
};
| module.exports = {
parser: 'babel-eslint',
extends: 'airbnb',
globals: {
before: true,
beforeEach: true,
after: true,
afterEach: true,
describe: true,
it: true,
},
rules: {
'arrow-body-style': [0],
'react/jsx-no-bind': [0],
'object-shorthand': [0],
},
};
| Allow long version of object construction. | Allow long version of object construction.
| JavaScript | mit | crewmeister/eslint-config-crewmeister |
acd16ec4341cbd416951712afe3e52a761027dde | index.js | index.js | module.exports = {
Builder: require("./lib/builder").Builder,
defaultConfig: require("./lib/defaults")
};
| module.exports = {
Builder: require("./lib/builder").Builder,
defaultConfig: require("./lib/default")
};
| Fix error in node module | Fix error in node module
| JavaScript | apache-2.0 | HRDeprecated/builder |
255a3e5703da713d56d7403458e76efab3fc8199 | index.js | index.js | var LogEmitter = function (source) {
this.source = source;
};
LogEmitter.prototype.info = function (message) {
process.emit("gulp:log", { level: "info", message: message, source: this.source });
};
LogEmitter.prototype.warn = function (message) {
process.emit("gulp:log", { level: "warn", message: message, sourc... | var LogEmitter = function (source) {
this.source = source;
};
LogEmitter.prototype.info = function (message) {
this.emit({ level: "info", message: message, source: this.source });
};
LogEmitter.prototype.warn = function (message) {
this.emit({ level: "warn", message: message, source: this.source });
};
LogEmit... | Refactor emit action into its own method | Refactor emit action into its own method
| JavaScript | mit | contra/gulp-log-emitter |
cc4d32b3767a62a4f84f62240280014cff5fbc7e | src/candela/VisComponent/index.js | src/candela/VisComponent/index.js | export default class VisComponent {
constructor (el) {
if (!el) {
throw new Error('"el" is a required argument');
}
this.el = el;
}
render () {
throw new Error('"render() is pure abstract"');
}
}
| export default class VisComponent {
constructor (el) {
if (!el) {
throw new Error('"el" is a required argument');
}
this.el = el;
}
render () {
throw new Error('"render() is pure abstract"');
}
getSerializationFormats () {
return [];
}
}
| Add default getSerializationFormats method in superclass | Add default getSerializationFormats method in superclass
| JavaScript | apache-2.0 | Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela |
82588752c39925c756ae0aeef5346a694a44a1c7 | src/commands/rover/PingCommand.js | src/commands/rover/PingCommand.js | const Command = require('../Command')
module.exports =
class PingCommand extends Command {
constructor (client) {
super(client, {
name: 'ping',
properName: 'Ping',
description: 'Ping the bot to see API latency',
userPermissions: [],
throttling: { usages: 1, duration: 10 } // 1 usage... | const Command = require('../Command')
module.exports =
class PingCommand extends Command {
constructor (client) {
super(client, {
name: 'ping',
properName: 'Ping',
description: 'Ping the bot to see API latency',
userPermissions: [],
throttling: { usages: 1, duration: 10 } // 1 usage... | Update ping command to show Discord latency | Update ping command to show Discord latency | JavaScript | apache-2.0 | evaera/RoVer |
75a66a9bad87cf4c9b9dfea6be5ffbf1559a791d | src/main/webapp/scripts/index.js | src/main/webapp/scripts/index.js | //$("checkbox").click(setLocationCookie);
$(document).ready(function() {
$('#location-checkbox').change(function() {
if(this.checked) {
setLocationCookie();
}
});
}); | //$("checkbox").click(setLocationCookie);
$(document).ready(function() {
$('#location-checkbox').change(function() {
if(this.checked) {
setLocationCookie();
}
});
$('#blob-input').change(function() {
const filePath = $(this).val();
$('#file-path').text(filePath.split('\\').pop());
});
});... | Add js for fake upload button | Add js for fake upload button
| JavaScript | apache-2.0 | googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020 |
cc13a47514441d2ffd90b041d6ef7a792609e61e | src/js/components/search-input.js | src/js/components/search-input.js | import React from 'react'
import { sparqlConnect } from '../sparql/configure-sparql'
import { LOADING, LOADED, FAILED } from 'sparql-connect'
import { browserHistory } from 'react-router'
import { uriToLink } from '../router-mapping'
import { connect } from 'react-redux'
import { changeKeyword } from '../actions/app-st... | import React, { Component } from 'react'
import { sparqlConnect } from '../sparql/configure-sparql'
import { LOADING, LOADED, FAILED } from 'sparql-connect'
import { browserHistory } from 'react-router'
import { uriToLink } from '../router-mapping'
import { connect } from 'react-redux'
export default class SearchInput... | Use stateful component for search input and remove appState reducer | Use stateful component for search input and remove appState reducer
| JavaScript | mit | Antoine-Dreyer/Classification-Explorer,UNECE/Classification-Explorer,Antoine-Dreyer/Classification-Explorer,UNECE/Classification-Explorer |
8789732b4ceb906ecc37aa56ba185b52b7c94128 | src/server/boot/angular-html5.js | src/server/boot/angular-html5.js | var libPath = require('path');
module.exports = function supportAngularHtml5(server) {
var router = server.loopback.Router();
router.all('/*', function(req, res, next) {
var reqUrl = req.originalUrl;
if (reqUrl.match(/^\/js\/.*/) !== null) {
// static javascript resources, skip it
next();
... | var libPath = require('path');
module.exports = function supportAngularHtml5(server) {
var router = server.loopback.Router();
router.all('/*', function(req, res, next) {
var reqUrl = req.originalUrl;
if (reqUrl.match(/^\/js\/.*/) !== null) {
// static javascript resources, skip it
next();
... | Add more filter rules to meet requirement. | Add more filter rules to meet requirement.
| JavaScript | mit | agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart |
b5fdaf6c9d68dc759f9f05d9c7b3b3dcd2a7ff7a | dawn/js/utils/Ansible.js | dawn/js/utils/Ansible.js | import AppDispatcher from '../dispatcher/AppDispatcher';
let runtimeAddress = localStorage.getItem('runtimeAddress') || '127.0.0.1';
let socket = io('http://' + runtimeAddress + ':5000/');
socket.on('connect', ()=>console.log('Connected to runtime.'));
socket.on('connect_error', (err)=>console.log(err));
/*
* Hack f... | import AppDispatcher from '../dispatcher/AppDispatcher';
let runtimeAddress = localStorage.getItem('runtimeAddress') || '127.0.0.1';
let socket = io('http://' + runtimeAddress + ':5000/');
socket.on('connect', ()=>console.log('Connected to runtime.'));
socket.on('connect_error', (err)=>console.log(err));
/*
* Hack f... | Add socketio websocket status check | Add socketio websocket status check
| JavaScript | apache-2.0 | pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral |
b88476d0f8ff2ee9a534245b61c672d340c2b941 | test/gameSpec.js | test/gameSpec.js | var game = require('../game.js');
var chai = require('chai');
chai.should();
describe('Game', function() {
describe('createPack', function() {
it('has 52 cards', function() {
var p = game.createPack();
p.should.have.lengthOf(52);
});
});
describe('shuffle', function() {
it('should have ... | var game = require('../game.js');
var chai = require('chai');
chai.should();
describe('Game', function() {
describe('createPack', function() {
it('has 52 cards', function() {
var p = game.createPack();
p.should.have.lengthOf(52);
});
});
describe('shuffle', function() {
it('should have ... | Add test that draw removes card from deck | Add test that draw removes card from deck
| JavaScript | mit | psmarshall/500,psmarshall/500 |
4e723a8b1f997595373c04af130a15e0c18a07d5 | www/js/app.js | www/js/app.js | // We use an "Immediate Function" to initialize the application to avoid leaving anything behind in the global scope
(function () {
/* ---------------------------------- Local Variables ---------------------------------- */
var service = new EmployeeService();
var homeTpl = Handlebars.compile($("#home.tpl... | // We use an "Immediate Function" to initialize the application to avoid leaving anything behind in the global scope
(function () {
/* ---------------------------------- Local Variables ---------------------------------- */
var service = new EmployeeService();
var homeTpl = Handlebars.compile($("#home.tpl... | Modify findByName() to call employeeListTpl | Modify findByName() to call employeeListTpl
| JavaScript | mit | tlkiong/cordovaTutorial,tlkiong/cordovaTutorial,tlkiong/cordovaTutorial,tlkiong/cordovaTutorial,tlkiong/cordovaTutorial |
6a1abab752d4cef30e8433b518648893814754f5 | icons.js | icons.js | define(function () {
icons = {};
icons.load = function (iconInfo, callback) {
if ("uri" in iconInfo) {
source = iconInfo.uri;
}
else if ("name" in iconInfo) {
source = "lib/sugar-html-graphics/icons/" + iconInfo.name + ".svg";
}
fillColor = iconI... | define(function () {
icons = {};
icons.load = function (iconInfo, callback) {
if ("uri" in iconInfo) {
source = iconInfo.uri;
}
else if ("name" in iconInfo) {
source = "lib/sugar-html-graphics/icons/" + iconInfo.name + ".svg";
}
fillColor = iconI... | Improve API to colorize an icon | Improve API to colorize an icon
Move the details to this library. Usage example:
icons.colorize(myButton, ["#FF0000", "#00FF00"]);
| JavaScript | apache-2.0 | godiard/sugar-web,sugarlabs/sugar-web |
8b38fbec1496431c650677b426662fd708db4b12 | src/main/resources/tools/build.js | src/main/resources/tools/build.js | /*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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
*
* http://www.apache.org/li... | /*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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
*
* http://www.apache.org/li... | Add full project optimization in comment for testing | Add full project optimization in comment for testing
| JavaScript | apache-2.0 | wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics,wso2/carbon-analytics |
562e2b130db0ee402d0203189aeef65bd0d5ff09 | index.js | index.js | window.lovelyTabMessage = (function(){
var hearts = ['❤','💓','💖','💗','💘','💝','💕'];
var heart = hearts[Math.floor(Math.random() * (hearts.length))];
var lang = (window && window.navigator && window.navigator.language || 'en');
switch(lang){
case 'en':
return 'Come back, i miss y... | window.lovelyTabMessage = (function(){
var stringTree = {
comeBackIMissYou: {
de: 'Komm zurück, ich vermisse dich.',
en: 'Come back, i miss you.'
}
}
// Let's see what lovely options we have to build our very romantic string
var lovelyOptions = Object.keys(stringT... | Add some more spice to those lovely messages | Add some more spice to those lovely messages
| JavaScript | mit | tarekis/tab-lover |
ad5e2272bc1d857fdec6e14f0e8232296fc1aa38 | models/raw_feed/model.js | models/raw_feed/model.js | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var config = require('../../config.js');
this.rawFeedModel = {
timestamp: {type: Date, default: Date.now},
text: String
};
var rawFeedSchema = new Schema(this.rawFeedModel);
this.rawFeed = mongoose.model('rawFeed', rawFeedSchema); | var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var config = require('../../config.js');
this.rawFeedModel = {
timestamp: {type: Date, default: Date.now},
text: String,
feedSource: {type: String, enum: ['Twitter', 'Email']}
};
var rawFeedSchema = new Schema(this.rawFeedModel);
this.rawFeed = mong... | Add data source property to raw feed object | Add data source property to raw feed object
| JavaScript | mit | NextCenturyCorporation/EVEREST |
e986b22d01bdb50da6145610d962bc9663a5b9e4 | index.js | index.js | var isVowel = require('is-vowel');
var khaan = module.exports = {
splitAtVowels: function ( word ) {
var output = [];
var current = '';
for ( var i = 0; i < word.length; i++ ) {
var c = word[i];
if ( isVowel( c ) ) {
if ( current !== '' ) {
output.push( current );
}
current = '';
}
c... | var isVowel = require('is-vowel');
var khaan = module.exports = {
splitAtVowels: function ( word ) {
var output = [];
var current = '';
for ( var i = 0; i < word.length; i++ ) {
var c = word[i];
if ( isVowel( c ) ) {
if ( current !== '' ) {
output.push( current );
}
current = '';
}
c... | Use last vowel, instead of first | Use last vowel, instead of first
| JavaScript | isc | zuzak/node-khaan |
026a8c0f001800c7e4304105af14cf1c1f56e933 | index.js | index.js | 'use strict';
var through = require('through')
var write = function write(chunk) {
var self = this
//read each line
var data = chunk.toString('utf8')
var lines = data.split('\n')
lines.forEach(function (line) {
if (!line) return
if (line.match(/^\s*#.*$/)) return
self.emit('data', line)
})
... | 'use strict';
var through = require('through')
var write = function write(chunk) {
var self = this
//read each line
var data = chunk.toString('utf8')
var lines = data.split('\n')
lines.forEach(function (line) {
//generic catch all
if (!line) return
//skip empty lines
if (line.match(/^\s... | Update module to match tests | Update module to match tests
| JavaScript | mit | digitalsadhu/env-reader |
c897c1047356ba25fdc111b7a997a34e0fc4cc04 | index.js | index.js | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-ui-sortable',
included: function(app) {
this._super.included(app);
//app.import(app.bowerDirectory + '/jquery-ui/ui/data.js');
//app.import(app.bowerDirectory + '/jquery-ui/ui/scroll-parent.js');
//app.import(app.bowerDirectory... | /* jshint node: true */
'use strict';
module.exports = {
name: 'ember-ui-sortable',
included: function(app) {
this._super.included(app);
app.import(app.bowerDirectory + '/jquery-ui/ui/version.js');
app.import(app.bowerDirectory + '/jquery-ui/ui/data.js');
app.import(app.bowerDirectory + '/jquery-... | Update dependencies to be an exact copy of jquery-ui's custom download option | Update dependencies to be an exact copy of jquery-ui's custom download option
| JavaScript | mit | 12StarsMedia/ember-ui-sortable,12StarsMedia/ember-ui-sortable |
5de5b0c2b772ea307d2fb74828c85401b31f7ea1 | modules/finders/index.js | modules/finders/index.js | module.exports = {
Reddit: require( './reddit.js' ),
Steam: require( './steam.js' ),
MiggyRSS: require( './MiggyRSS.js' ),
};
| /* eslint-disable global-require */
module.exports = {
Reddit: require( './reddit.js' ),
Steam: require( './steam.js' ),
MiggyRSS: require( './MiggyRSS.js' ),
};
| Make sure the lint passes | Make sure the lint passes
| JavaScript | mit | post-tracker/finder |
49c0174266ded14f48df30aad1d8f90a809f21cf | packages/@sanity/import/src/batchDocuments.js | packages/@sanity/import/src/batchDocuments.js | const MAX_PAYLOAD_SIZE = 1024 * 512 // 512KB
function batchDocuments(docs) {
let currentBatch = []
let currentBatchSize = 0
const batches = [currentBatch]
docs.forEach(doc => {
const docSize = JSON.stringify(doc).length
const newBatchSize = currentBatchSize + docSize
// If this document pushes us... | const MAX_PAYLOAD_SIZE = 1024 * 256 // 256KB
function batchDocuments(docs) {
let currentBatch = []
let currentBatchSize = 0
const batches = [currentBatch]
docs.forEach(doc => {
const docSize = JSON.stringify(doc).length
const newBatchSize = currentBatchSize + docSize
// If this document pushes us... | Reduce batch size to 128kb | [import] Reduce batch size to 128kb
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
473a265a16f9c51e0c006b3d49d695700770a9e4 | packages/core/upload/server/routes/content-api.js | packages/core/upload/server/routes/content-api.js | 'use strict';
module.exports = {
type: 'content-api',
routes: [
{
method: 'POST',
path: '/',
handler: 'content-api.upload',
},
{
method: 'GET',
path: '/files/count',
handler: 'content-api.count',
},
{
method: 'GET',
path: '/files',
handler: ... | 'use strict';
module.exports = {
type: 'content-api',
routes: [
{
method: 'POST',
path: '/',
handler: 'content-api.upload',
},
{
method: 'GET',
path: '/files',
handler: 'content-api.find',
},
{
method: 'GET',
path: '/files/:id',
handler: 'co... | REMOVE count route from upload plugin | REMOVE count route from upload plugin | JavaScript | mit | wistityhq/strapi,wistityhq/strapi |
c8e3b4a5c321bfd6826e9fc9ea16157549850844 | app/initializers/blanket.js | app/initializers/blanket.js | export function initialize(application) {
const inject = (property, what) => {
application.inject('controller', property, what);
application.inject('component', property, what);
application.inject('route', property, what);
};
inject('config', 'service:config');
inject('session', 'service:session')... | export function initialize(application) {
const inject = (property, what) => {
application.inject('controller', property, what);
application.inject('component', property, what);
application.inject('route', property, what);
};
inject('config', 'service:config');
inject('session', 'service:session')... | Introduce ember-infinity as a service | Introduce ember-infinity as a service
| JavaScript | apache-2.0 | ritikamotwani/open-event-frontend,CosmicCoder96/open-event-frontend,CosmicCoder96/open-event-frontend,ritikamotwani/open-event-frontend,ritikamotwani/open-event-frontend,CosmicCoder96/open-event-frontend |
fe58a8feb7724c074fb37b62b4e180a254416e73 | coreplugins/slack/slack.js | coreplugins/slack/slack.js | var plugin;
var slack;
var config;
var events = {}
events.onLoad = function(plugin) {
// dependency injection, any better methods for Node?
this.plugin = plugin;
config = plugin.getConfig();
// https://www.npmjs.com/package/slack-node
var Slack = require('slack-node');
slack = new Slack();
... | var plugin;
var slack;
var config;
var events = {}
events.onLoad = function(plugin) {
// dependency injection, any better methods for Node?
this.plugin = plugin;
config = plugin.getConfig();
// https://www.npmjs.com/package/slack-node
var Slack = require('slack-node');
slack = new Slack();
... | Add a space onto the end of italic text (prevent merging the _ with links) | Slack: Add a space onto the end of italic text (prevent merging the _ with links)
| JavaScript | mit | ylt/BotPlug,WritheM/Wallace,WritheM/Wallace,ylt/Wallace,Reanmachine/Wallace,Reanmachine/Wallace,ylt/Wallace |
683d418fd7bede0da8b5c1d7b1250c50a4b0eca9 | test/utils/testStorage.js | test/utils/testStorage.js | export default () => ({
persist: jest.fn(data => Promise.resolve(data)),
restore: jest.fn(() =>
Promise.resolve({ authenticated: { authenticator: 'test' } })
)
})
| export default () => ({
persist: jest.fn(),
restore: jest.fn(() => ({
authenticated: {
authenticator: 'test'
}
}))
})
| Update test storage to better mimic actual storage behavior | Update test storage to better mimic actual storage behavior
| JavaScript | mit | jerelmiller/redux-simple-auth |
c971b63c3cc2b070643f51675f262f518c86325f | src/files/navigation.js | src/files/navigation.js | var sidebarOpen = false;
var menuText = ["Menu", "Close"];
var menuElement = document.querySelector(".menu-link");
var sidebarElement = document.querySelector(".sidebar");
var headerElement = document.querySelector("header");
var rAF;
menuElement.addEventListener( "click", toggleSidebar, false );
window.addEventListen... | var sidebarOpen = false;
var menuText = ["Menu", "Close"];
var menuElement = document.querySelector(".menu-link");
var sidebarElement = document.querySelector(".sidebar");
var mainElement = document.querySelector("main");
var headerElement = document.querySelector("header");
var rAF;
mainElement.addEventListener( "cli... | Add ability to close sidebar by clicking outside | Add ability to close sidebar by clicking outside
| JavaScript | mit | sveltejs/svelte.technology,sveltejs/svelte.technology |
2f3f141e1196eaa39ade102d3795cd189f57828f | src/IconMenu/IconMenu.js | src/IconMenu/IconMenu.js | import React from 'react'
import PropTypes from 'prop-types'
import {SimpleMenu, MenuAnchor, Icon} from '..'
class IconMenu extends React.PureComponent {
static displayName = 'IconMenu'
static propTypes = {
children: PropTypes.node,
name: PropTypes.string,
open: PropTypes.bool,
}
static defaultPr... | import React from 'react'
import PropTypes from 'prop-types'
import {SimpleMenu, MenuAnchor, Icon} from '..'
class IconMenu extends React.PureComponent {
static displayName = 'IconMenu'
static propTypes = {
children: PropTypes.node,
iconName: PropTypes.string,
open: PropTypes.bool,
}
static defau... | Rename prop name => iconName | refactor(components): Rename prop name => iconName
| JavaScript | mit | dimik/react-material-web-components,dimik/react-material-web-components |
9542380f1530e9cbb680e04ac8694c649e5acab8 | scripts/ui.js | scripts/ui.js | 'use strict';
const $ = require('jquery'),
remote = require('remote');
let main = remote.getCurrentWindow();
$(function(){
$('.tools > div').on('click', (e) => main[e.target.className]());
});
| 'use strict';
const $ = require('jquery'),
remote = require('remote');
let main = remote.getCurrentWindow();
$(function(){
$('.tools > div').on('click', (e) => main[e.target.className]());
let toggleMax = () => $('.app').toggleClass('maximized');
main.on('maximize', toggleMax).on('unmaximize', toggleMax... | Add maxmimize and unmaxmize class toggler. | Add maxmimize and unmaxmize class toggler.
| JavaScript | mit | JamenMarz/vint,JamenMarz/cluster |
b12455b707f3e720173f0b74ce3f49921697db78 | app/src/Home.js | app/src/Home.js | import React from 'react';
import {Link} from 'react-router-dom'
class Home extends React.Component {
render() {
return (
<div>
<Link to="/add-words" className="button btn-large">Add new word</Link>
<Link to="#/translate" className="button btn-large">Translate</Link>
<Link to="#/dictio... | import React from 'react';
import {Link} from 'react-router-dom'
class Home extends React.Component {
render() {
return (
<div>
<Link to="/add-words" className="button btn-large">Add new word</Link>
<Link to="/translate" className="button btn-large">Translate</Link>
<Link to="/dictiona... | Change remaining <a> tags into <Link> components | Change remaining <a> tags into <Link> components
| JavaScript | mit | dmatthew/my-secret-language,dmatthew/my-secret-language,dmatthew/my-secret-language |
7fff75c2c053e3b4084fddad486a3e03c2afe0fb | assets/js/controls/transport.js | assets/js/controls/transport.js | var Transport = can.Control.extend({
init: function(element, options) {
this.status = options.status;
element.html(can.view('views/transport.ejs'));
},
sendCommand: function(command) {
var self = this;
can.ajax({
url: '/api/control/' + command,
type: 'PUT',
success: function(st... | var Transport = can.Control.extend({
init: function(element, options) {
this.status = options.status;
element.html(can.view('views/transport.ejs'));
},
updateStatus: function(status) {
this.status.attr(status);
},
sendCommand: function(command) {
var self = this;
can.ajax({
url: '... | Split out status update into its own function. | Split out status update into its own function.
| JavaScript | mit | danbee/mpd-client,danbee/mpd-client |
20135db684aeb8d4f626d62f03c08b41ac8b5900 | cli/options.js | cli/options.js | const commander = require('commander')
class Options {
constructor(argv) {
const args = commander
.option('--electron-debug',
'Show the browser window and keep it open after running features')
.parse(argv)
this.electronDebug = args.electronDebug
this.cucumberArgv = argv.filter... | const commander = require('commander')
class Options {
constructor(argv) {
const args = commander
.option('--electron-debug',
'Show the browser window and keep it open after running features')
.parse(argv)
this.electronDebug = Boolean(args.electronDebug)
this.cucumberArgv = ar... | Fix regression with hiding the window unless --electron-debug | Fix regression with hiding the window unless --electron-debug
| JavaScript | mit | featurist/cucumber-electron,featurist/cucumber-electron,cucumber/cucumber-electron,cucumber/cucumber-electron,cucumber/cucumber-electron,cucumber/cucumber-electron |
4fd9b9584dd1d273274be5734f783d0d4a857a5a | index.js | index.js | 'use strict';
module.exports = {
fetch: function () {
},
update: function () {
},
merge: function () {
},
};
| 'use strict';
var options = {
repository: 'https://github.com/dorian-marchal/phonegap-boilerplate',
branch: 'master',
};
/**
* Check that the cli is used in a phonegap boilerplate project
* @return {bool} true if we are in a pb project, else otherwise
*/
var checkWorkingDirectory = function () {
};
/**
... | Add the base project structure | Add the base project structure
| JavaScript | mit | dorian-marchal/phonegap-boilerplate-cli |
7adfdc80661f56070acf94ee2e24e9ea42d1c96c | sauce/features/accounts/toggle-splits/settings.js | sauce/features/accounts/toggle-splits/settings.js | module.exports = {
name: 'ToggleSplits',
type: 'checkbox',
default: false,
section: 'accounts',
title: 'Add a Toggle Splits Button',
description: 'Clicking the toggle splits button shows or hides the sub-transactions within a split.'
};
| module.exports = {
name: 'ToggleSplits',
type: 'checkbox',
default: false,
section: 'accounts',
title: 'Add a Toggle Splits Button to the Account(s) toolbar',
description: 'Clicking the Toggle Splits button shows or hides all sub-transactions within all split transactions. *__Note__: you must toggle splits ... | Add text regsarding the location of the button and that splits must be toggled open before editing a split txn. | Add text regsarding the location of the button
and that splits must be toggled open before editing a split txn.
| JavaScript | mit | dbaldon/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,falkencreative/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,blargity/toolkit-for-ynab,ahatzz11/toolkit-for-ynab,falkencreative/toolkit-for-ynab,falkencreative/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,ahatzz11/toolkit-for-ynab,dbaldon/toolkit-for... |
4c0ead9c25c3062daa8204c007274758aecda144 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
mocha = require('gulp-mocha');
var paths = {
scripts: ['./*.js', './test/*.js', '!./lib', '!./gulpfile.js']
};
gulp.task('lint', function() {
return gulp.src(paths.scripts)
.pipe(jshint())
.pipe(jshint.reporter... | 'use strict';
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
mocha = require('gulp-mocha'),
qunit = require('./index');
var paths = {
scripts: ['./*.js', './test/*.js', '!./lib', '!./gulpfile.js']
};
gulp.task('lint', function() {
return gulp.src(paths.scripts)
.pipe(jshint(... | Add sample sample qunit gulp tasks for testing. | Add sample sample qunit gulp tasks for testing.
| JavaScript | mit | jonkemp/node-qunit-phantomjs |
cfa32de7fb24d29cd7fbf52e1d1822f61a6db8c5 | index.js | index.js | 'use strict';
var fs = require('fs');
var spawnSync = require('child_process').spawnSync;
var HttpResponse = require('http-response-object');
require('concat-stream');
require('then-request');
var JSON = require('./lib/json-buffer');
Function('', fs.readFileSync(require.resolve('./lib/worker.js'), 'utf8'));
module.e... | 'use strict';
var fs = require('fs');
var spawnSync = require('child_process').spawnSync;
var HttpResponse = require('http-response-object');
require('concat-stream');
require('then-request');
var JSON = require('./lib/json-buffer');
Function('', fs.readFileSync(require.resolve('./lib/worker.js'), 'utf8'));
module.e... | Fix suggested npm install command. | Fix suggested npm install command.
Instructions were pointing to the wrong project. | JavaScript | mit | ForbesLindesay/sync-request,ForbesLindesay/sync-request |
0c263159c54f9a7cbc6617e02bb9fba762b7bf82 | src/scripts/app/play/proofreadings/controller.js | src/scripts/app/play/proofreadings/controller.js | 'use strict';
module.exports =
/*@ngInject*/
function ProofreadingPlayCtrl(
$scope, $state, ProofreadingService, RuleService
) {
$scope.id = $state.params.id;
function error(e) {
console.error(e);
$state.go('index');
}
function prepareProofReading(pf) {
pf.replace(/{+(.+)-(.+)\|(.+)}/g, functi... | 'use strict';
module.exports =
/*@ngInject*/
function ProofreadingPlayCtrl(
$scope, $state, ProofreadingService, RuleService
) {
$scope.id = $state.params.id;
function error(e) {
console.error(e);
$state.go('index');
}
function prepareProofReading(pf) {
pf.replace(/{\+(\w+)-(\w+)\|(\w+)}/g, fu... | Use a regex to parse the syntax | Use a regex to parse the syntax
into key, plus, minus, rule number
| JavaScript | agpl-3.0 | ddmck/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,empirical-org/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar |
006a8e25c02f800d4b36cc051c46f736fcc940b2 | site/src/main/resources/static/js/findpassword.js | site/src/main/resources/static/js/findpassword.js | jQuery(function ($) {
function d(event) {
event.keyCode === 13 && button.click();
}
function click() {
image.attr('src', src + (src.indexOf('?') < 0 ? '?' : '&') + '_=' + +new Date());
imgv.val('');
(user.val() ? imgv : user).focus();
}
function enable() {
b... | jQuery(function ($) {
function d(event) {
event.keyCode === 13 && button.click();
}
function click() {
image.attr('src', src + (src.indexOf('?') < 0 ? '?' : '&') + '_=' + +new Date());
imgv.val('');
(user.val() ? imgv : user).focus();
}
function enable() {
b... | Fix console is undefined on IE 8 | Fix console is undefined on IE 8
| JavaScript | apache-2.0 | zjnu-acm/judge,zjnu-acm/judge,zjnu-acm/judge,zjnu-acm/judge,zjnu-acm/judge |
72ca5876f553f595582993e800708b707b956b16 | EventTarget.js | EventTarget.js | /**
* @author mrdoob / http://mrdoob.com
* @author Jesús Leganés Combarro "Piranna" <piranna@gmail.com>
*/
function EventTarget()
{
var listeners = {};
this.addEventListener = function(type, listener)
{
if(!listener) return
var listeners_type = listeners[type]
if(listeners_type === undefined)
... | /**
* @author mrdoob / http://mrdoob.com
* @author Jesús Leganés Combarro "Piranna" <piranna@gmail.com>
*/
function EventTarget()
{
var listeners = {};
this.addEventListener = function(type, listener)
{
if(!listener) return
var listeners_type = listeners[type]
if(listeners_type === undefined)
... | Support for Internet Explorer 8 | Support for Internet Explorer 8
| JavaScript | mit | ShareIt-project/EventTarget.js |
d7c647971190893a30dd61068c1edcf266a32201 | Gruntfile.js | Gruntfile.js | var config = require('./Build/Config');
module.exports = function(grunt) {
'use strict';
// Display the execution time of grunt tasks
require('time-grunt')(grunt);
// Load all grunt-tasks in 'Build/Grunt-Options'.
var gruntOptionsObj = require('load-grunt-configs')(grunt, {
config : {
src: "Build/Grunt-Opt... | var config = require('./Build/Config');
module.exports = function(grunt) {
'use strict';
// Display the execution time of grunt tasks
require('time-grunt')(grunt);
// Load all grunt-tasks in 'Build/Grunt-Options'.
var gruntOptionsObj = require('load-grunt-configs')(grunt, {
config : {
src: "Build/Grunt-Opt... | Test all grunt tasks on Travis CI | [MISC] Test all grunt tasks on Travis CI
| JavaScript | mit | t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template |
1c9492dd27e6115c6bc0a8e8305a3165d55c313f | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function (grunt) {
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// Configurable paths
config: {
lintFiles: [
'angular-bind-html-compile.js'
]
},
jshint: {
... | 'use strict';
module.exports = function (grunt) {
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
grunt.initConfig({
// Configurable paths
config: {
lintFiles: [
'**/*.js',
'!*.min.js'
]
},
jshint: {
... | Revert "Revert "Added support for multiple files (excluding minified scripts)"" | Revert "Revert "Added support for multiple files (excluding minified scripts)""
This reverts commit fde48e384ec241fef5d6c4c80a62e3f32f9cc7ab.
| JavaScript | mit | ivanslf/angular-bind-html-compile,incuna/angular-bind-html-compile |
903456c8c2203d3b86aab36fc70edb0780cf85f1 | index.js | index.js | var Prism = require('prismjs');
var cheerio = require('cheerio');
module.exports = {
book: {
assets: './node_modules/prismjs/themes',
css: [
'prism.css'
]
},
hooks: {
page: function (page) {
page.sections.forEach(function (section) {
var $ = cheerio.load(section.content);
... | var Prism = require('prismjs');
var cheerio = require('cheerio');
var path = require('path');
var cssFile = require.resolve('prismjs/themes/prism.css');
var cssDirectory = path.dirname(cssFile);
module.exports = {
book: {
assets: cssDirectory,
css: [path.basename(cssFile)]
},
hooks: {
page: function... | Use Node resolving mechanism to locate Prism CSS | Use Node resolving mechanism to locate Prism CSS
| JavaScript | apache-2.0 | gaearon/gitbook-plugin-prism |
e5636a64d0e737a63ca7f5e5762c098afbeca578 | spec/index.spec.js | spec/index.spec.js |
'use strict';
// eslint-disable-next-line no-console
console.log(`———————————————————————————————— ${(new Date())} \n\n`);
describe('MarkTodoItem', () => {
const test_case_mocks = require('./test-case.mocks');
const MarkTodoItem = require('../');
const markTodoItem = MarkTodoItem();
test_case_mocks.forEach... | /* global describe, it, expect */
'use strict';
// eslint-disable-next-line no-console
console.log(`———————————————————————————————— ${(new Date())} \n\n`);
describe('MarkTodoItem', () => {
const test_case_mocks = require('./test-case.mocks');
const MarkTodoItem = require('../');
const markTodoItem = MarkTodo... | Add ESLint comment for globals: describe, it, expect | Add ESLint comment for globals: describe, it, expect
| JavaScript | mit | MelleWynia/mark-todo-item |
cff4ad9e8273d3560485b8e459d689088a629d9d | babel.config.js | babel.config.js | module.exports = {
"sourceMaps": true,
"presets": [
["@babel/preset-env", {
"targets": {
"browsers": [
"last 2 Chrome versions", "last 2 Firefox versions", "last 2 Safari versions"
]
},
}],
"@babel/preset-typescr... | module.exports = {
"sourceMaps": true,
"presets": [
["@babel/preset-env", {
"targets": [
"last 2 Chrome versions", "last 2 Firefox versions", "last 2 Safari versions"
],
}],
"@babel/preset-typescript",
"@babel/preset-flow",
"@babel/... | Remove legacy and stop using deprecated things | Remove legacy and stop using deprecated things
| JavaScript | apache-2.0 | vector-im/riot-web,vector-im/riot-web,vector-im/riot-web,vector-im/riot-web,vector-im/vector-web,vector-im/riot-web,vector-im/riot-web,vector-im/vector-web,vector-im/vector-web,vector-im/vector-web,vector-im/vector-web |
bae1de8075c538aa67ee233d5bf7c6b808e275c6 | index.js | index.js | /* jshint node: true */
'use strict';
var replace = require('broccoli-replace');
var favicons = require('broccoli-favicon');
var htmlCache = null;
module.exports = {
name: 'ember-cli-favicon',
included: function(app) {
this.options = app.favicons || {};
this.options.htmlCallback = function(html) {
... | /* jshint node: true */
'use strict';
var replace = require('broccoli-replace');
var favicons = require('broccoli-favicon');
var htmlCache = null;
module.exports = {
name: 'ember-cli-favicon',
included: function(app) {
this.options = app.favicons || {};
this.options.callback = function(html) {
ht... | Use callback instead of htmlCallback | Use callback instead of htmlCallback | JavaScript | mit | davewasmer/ember-cli-favicon,davewasmer/ember-cli-favicon |
043adbd2ca8d5ba976f3520132e1743844c55abd | browser/react/components/App.js | browser/react/components/App.js | import React from 'react';
import '../../aframeComponents/scene-load';
import '../../aframeComponents/aframe-minecraft';
import AssetLoader from './AssetLoader';
import InitialLoading from './InitialLoading';
export default function App (props) {
console.log('props ', props);
return (
// AssetLoader is a state... | import React from 'react';
import '../../aframeComponents/scene-load';
import '../../aframeComponents/aframe-minecraft';
import AssetLoader from './AssetLoader';
import InitialLoading from './InitialLoading';
export default function App (props) {
console.log('props ', props);
return (
// AssetLoader is a state... | Change background of spinner to match login | feat: Change background of spinner to match login
| JavaScript | mit | TranscendVR/transcend,TranscendVR/transcend |
29d581091804b1f6b4aa55e0b8cc8d96270ab575 | index.js | index.js | 'use strict';
var assign = require('object-assign');
var chalk = require('chalk');
var ProgressBar = require('progress');
/**
* Progress bar download plugin
*
* @param {Object} res
* @api public
*/
module.exports = function (opts) {
return function (res, file) {
opts = opts || { info: 'cyan' };
... | 'use strict';
var assign = require('object-assign');
var chalk = require('chalk');
var ProgressBar = require('progress');
/**
* Progress bar download plugin
*
* @param {Object} res
* @api public
*/
module.exports = function (opts) {
return function (res, file, cb) {
opts = opts || { info: 'cyan' };
... | Allow other middleware by calling `cb()` | Allow other middleware by calling `cb()`
| JavaScript | mit | kevva/download-status |
79923a9af19fd1b6b7ecb2ee984736404d8f0504 | test/TestServer/UnitTestConfig.js | test/TestServer/UnitTestConfig.js | // Some user-accessible config for unit tests
// Format is: { platform:{ ...settings.. } }
// numDevices - The number of devices the server will start a test with
// Any other devices after that will just be ignored
var config = {
ios: {
numDevices:2
},
android: {
numDevices:0
}
}
module... | // Some user-accessible config for unit tests
// Format is: { platform:{ ...settings.. } }
// numDevices - The number of devices the server will start a test with (-1 == all devices)
// Any other devices after that will just be ignored
// Note: Unit tests are designed to require just two devi... | Add android devices back in | Add android devices back in
| JavaScript | mit | thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin |
dc9375c8faa47f915d24aaf6ebc1e67a431fa1b9 | index.js | index.js | /*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function accesorString(value) {
var depths = value.split(".");
var length = depths.length;
var result = "";
for (var i = 0; i < length; i++) {
result += "[" + JSON.stringify(depths[i]) + "]";
}
return result;... | /*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
function accesorString(value) {
var childProperties = value.split(".");
var length = childProperties.length;
var propertyString = "global";
var result = "";
for (var i = 0; i < length; i++) {
propertyString += ... | Check if child property exists prior to adding to property | Check if child property exists prior to adding to property
| JavaScript | mit | wuxiandiejia/expose-loader |
ecddfbde7f0a484e13b3118615d125796fb8e949 | test/api/routes/homeRoute.test.js | test/api/routes/homeRoute.test.js | /**
* Copyright (c) 2013-2015 Memba Sarl. All rights reserved.
* Sources at https://github.com/Memba
*/
/* jshint node: true, expr: true */
/* globals describe: false, before: false, it: false */
'use strict';
var request = require('supertest'),
//We cannot define app like this because the server is already ... | /**
* Copyright (c) 2013-2015 Memba Sarl. All rights reserved.
* Sources at https://github.com/Memba
*/
/* jshint node: true, expr: true */
/* globals describe: false, before: false, it: false */
'use strict';
var request = require('supertest'),
//We cannot define app like this because the server is already ... | Use config to build paths | Use config to build paths
| JavaScript | agpl-3.0 | Memba/Memba-Blog,Memba/Memba-Blog,Memba/Memba-Blog |
ca08af4d5eb1c48698fa52f1b8b651fca4525b60 | migrations/20170515084345_taxonomy_term_data.js | migrations/20170515084345_taxonomy_term_data.js |
exports.up = function(knex, Promise) {
return knex.schema.createTable('taxonomy_term_data', function (table) {
table.increments('id').primary()
table.integer('id_vocabulary').unsigned()
table.foreign('id_vocabulary').references('taxonomy_vocabulary.id')
table.string('title')
table.text('de... |
exports.up = function (knex, Promise) {
return knex.schema.createTable('taxonomy_term_data', function (table) {
table.increments('id').primary()
table.integer('id_vocabulary').unsigned()
table.foreign('id_vocabulary').references('taxonomy_vocabulary.id')
table.string('title')
table.text('d... | Edit content structure to knex taxonomy_term_data migration file | Edit content structure to knex taxonomy_term_data migration file
| JavaScript | mit | smanongga/smanongga.github.io,smanongga/smanongga.github.io,smanongga/smanongga.github.io |
457a6fe779b4921c88d436a35cdf4fb9f0a9d02b | test/generators/root/indexTest.js | test/generators/root/indexTest.js | 'use strict';
let path = require('path');
let assert = require('yeoman-generator').assert;
let helpers = require('yeoman-generator').test
describe('react-webpack-redux:root', () => {
let generatorDispatcher = path.join(__dirname, '../../../generators/root');
/**
* Return a newly generated dispatcher with give... | 'use strict';
let path = require('path');
let assert = require('yeoman-generator').assert;
let helpers = require('yeoman-generator').test
describe('react-webpack-redux:root', () => {
let generatorDispatcher = path.join(__dirname, '../../../generators/root');
/**
* Return a newly generated dispatcher with give... | Check that the run script has been written | Check that the run script has been written
| JavaScript | mit | stylesuxx/generator-react-webpack-redux,stylesuxx/generator-react-webpack-redux |
e64e0e8cd275c108d9766d4062d4eab77984212f | spec/specs.js | spec/specs.js | describe('pingPong', function() {
it("is true for a number that is divisible by 3", function() {
expect(pingPong(6)).to.equal(true);
});
it("is true for a number that is divisible by 5", function() {
expect(pingPong(10)).to.equal(true);
});
});
| describe('pingPong', function() {
it("is true for a number that is divisible by 3", function() {
expect(pingPong(6)).to.equal(true);
});
it("is true for a number that is divisible by 5", function() {
expect(pingPong(10)).to.equal(true);
});
it("is false for a number that is not divisible by 3 or 5", f... | Add a test for userNumbers not divisible by 3 or 5 | Add a test for userNumbers not divisible by 3 or 5
| JavaScript | mit | kcmdouglas/pingpong,kcmdouglas/pingpong |
fff9513aa9d0590679875ed3c3c4c0b080305c89 | app/assets/javascripts/leap.js | app/assets/javascripts/leap.js | //document.observe("dom:loaded", function(){
// if ($('flash_notice')){
// Element.fade.delay(4,'flash_notice');
// }
// if ($('q')) {
// $('q').activate();
// if ($('search_extended')) {
// $('search_extended').observe("click", function(event){
// $('search_form').submit();
// })
// }
/... | //document.observe("dom:loaded", function(){
// if ($('flash_notice')){
// Element.fade.delay(4,'flash_notice');
// }
// if ($('q')) {
// $('q').activate();
// if ($('search_extended')) {
// $('search_extended').observe("click", function(event){
// $('search_form').submit();
// })
// }
/... | Put the notice fade back in | Put the notice fade back in
| JavaScript | agpl-3.0 | sdc/leap,sdc/leap,sdc-webteam-deploy/leap,sdc/leap,sdc-webteam-deploy/leap,sdc-webteam-deploy/leap,sdc-webteam-deploy/leap,sdc/leap |
e252bd17fbbb174182fb322de6138bc6fe53f599 | index.js | index.js | module.exports = (addDays = 0) => {
let date = new Date();
date.setDate(date.getDate() + addDays);
date.setUTCHours(0);
date.setUTCMinutes(0);
date.setUTCSeconds(0);
date.setUTCMilliseconds(0);
return date;
};
| module.exports = (addDays = 0, sinceDate = new Date()) => {
let date = new Date(sinceDate);
date.setDate(date.getDate() + addDays);
date.setUTCHours(0);
date.setUTCMinutes(0);
date.setUTCSeconds(0);
date.setUTCMilliseconds(0);
return date;
};
| Allow passing in initial date | Allow passing in initial date
| JavaScript | mit | MartinKolarik/relative-day-utc |
9d6ff0ae59a2314b457475706a4e6f2b5362ff33 | app/configurations/settings.js | app/configurations/settings.js | /* @flow */
'use strict';
export const settings = {
API_BASE_URL: 'https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/',
API_KEY: 'jVDiaXvfpsmshdrtFO7JHibo7Hrtp16UelPjsnBE4Bfzl0CV5u'
}; | /* @flow */
'use strict';
export const settings = {
API_BASE_URL: 'https://spoonacular-recipe-food-nutrition-v1.p.mashape.com/',
API_KEY: 'jVDiaXvfpsmshdrtFO7JHibo7Hrtp16UelPjsnBE4Bfzl0CV5u'
}; | Add API base url and key | Add API base url and key
| JavaScript | bsd-3-clause | hippothesis/Recipezy,hippothesis/Recipezy,hippothesis/Recipezy |
b316098cd7e6985bc17bbda872e9e4beefb2e479 | website/src/app/project/experiments/experiment/components/tasks/current-task.service.js | website/src/app/project/experiments/experiment/components/tasks/current-task.service.js | class CurrentTask {
constructor() {
this.currentTask = null;
}
get() {
return this.currentTask;
}
set(task) {
this.currentTask = task;
}
}
angular.module('materialscommons').service('currentTask', CurrentTask);
| class CurrentTask {
constructor() {
this.currentTask = null;
this.onChangeFN = null;
}
setOnChange(fn) {
this.onChangeFN = fn;
}
get() {
return this.currentTask;
}
set(task) {
this.currentTask = task;
if (this.onChangeFN) {
this.... | Add setOnChange that allows a controller to set a function to call when the currentTask changes. | Add setOnChange that allows a controller to set a function to call when the currentTask changes.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
4db4e1b3f9e13c8faa2449a231669ca047b79572 | client/src/Account/index.js | client/src/Account/index.js | import React from 'react';
import { PasswordForgetForm } from '../PasswordForget';
import PasswordChangeForm from '../PasswordChange';
import { AuthUserContext, withAuthorization } from '../Session';
const AccountPage = () => (
<AuthUserContext.Consumer>
{authUser => (
<div>
<h1>Account: {authUser... | import React from 'react';
import PasswordChangeForm from '../PasswordChange';
import { AuthUserContext, withAuthorization } from '../Session';
const AccountPage = () => (
<AuthUserContext.Consumer>
{authUser => (
<div>
<h1>Account: {authUser.email}</h1>
<PasswordChangeForm />
</div>... | Remove extra form from account page. | Remove extra form from account page.
| JavaScript | apache-2.0 | googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone,googleinterns/Pictophone |
aff3ad78cd1e04e26f9618cdb58bf0e477768f95 | lib/polyfill/all.js | lib/polyfill/all.js | /** @license
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
goog.provide('shaka.polyfill');
goog.require('shaka.util.Iterables');
/**
* @summary A one-stop installer for all polyfills.
* @see http://enwp.org/polyfill
* @exportDoc
*/
shaka.polyfill = class {
/**
* Install all polyfi... | /** @license
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
goog.provide('shaka.polyfill');
goog.require('shaka.util.Iterables');
/**
* @summary A one-stop installer for all polyfills.
* @see http://enwp.org/polyfill
* @exportInterface
*/
shaka.polyfill = class {
/**
* Install all ... | Fix shaka.polyfill missing in externs | Fix shaka.polyfill missing in externs
The generated externs did not include shaka.polyfill because we used
the wrong annotation on the class. This fixes it.
Raised in PR #1273
Change-Id: I348064a117a7e1878b439ad8bd1ce49df56bfd39
| JavaScript | apache-2.0 | shaka-project/shaka-player,tvoli/shaka-player,shaka-project/shaka-player,shaka-project/shaka-player,tvoli/shaka-player,tvoli/shaka-player,shaka-project/shaka-player,tvoli/shaka-player |
8ca1ad8a0ca0644d114e509c7accadd3e1fa460d | lib/post_install.js | lib/post_install.js | #!/usr/bin/env node
// adapted based on rackt/history (MIT)
var execSync = require('child_process').execSync;
var stat = require('fs').stat;
function exec(command) {
execSync(command, {
stdio: [0, 1, 2]
});
}
stat('dist-modules', function(error, stat) {
if (error || !stat.isDirectory()) {
exec('npm run ... | #!/usr/bin/env node
// adapted based on rackt/history (MIT)
var execSync = require('child_process').execSync;
var stat = require('fs').stat;
function exec(command) {
execSync(command, {
stdio: [0, 1, 2]
});
}
stat('dist-modules', function(error, stat) {
if (error || !stat.isDirectory()) {
exec('npm i ba... | Install Babel before generating `dist-modules` | Install Babel before generating `dist-modules`
Otherwise it will rely on globally installed Babel. Not good.
| JavaScript | mit | rdoh/reactabular,reactabular/reactabular,reactabular/reactabular |
21e70737e4499c164b04095568ff748b6c0ff32a | app/services/scores.service.js | app/services/scores.service.js | (function(){
angular
.module("movieMash")
.factory("scoreService",scoreService);
scoreService.$inject=['localStorageService','$firebaseArray','firebaseDataService'];
function scoreService(localStorageService,$firebaseArray,firebaseDataService){
var scoresSyncArray = $firebaseArray(firebaseDataService.scor... | (function(){
angular
.module("movieMash")
.factory("scoreService",scoreService);
scoreService.$inject=['localStorageService','$firebaseArray','firebaseDataService'];
function scoreService(localStorageService,$firebaseArray,firebaseDataService){
var scoresSyncArray = $firebaseArray(firebaseDataService.scor... | Fix an bug into the id generation for a score record. | Fix an bug into the id generation for a score record.
| JavaScript | mit | emyann/MovieMash,emyann/MovieMash |
8a64a017121b4f5e0e32f7ffe3aae3519f3e4697 | routes/event.js | routes/event.js | var express = require('express');
var router = express.Router();
var endpoint = require('../app/endpoint');
router.get('/event/:name/:args(*)', function(req, res) {
var e = endpoint('http', 'get', req.params.name);
e({
args: req.params.args,
body: req.body
});
});
module.exports = route... | var express = require('express');
var router = express.Router();
var endpoint = require('../app/endpoint');
router.get('/event/:name/:args(*)', function(req, res) {
var e = endpoint('http', 'get', req.params.name);
if (!e) return res.status(400).send('The requested endpoint has not been defined.');
e({
... | Check if endpoint handler exists. | Check if endpoint handler exists.
| JavaScript | agpl-3.0 | CamiloMM/Noumena,CamiloMM/Noumena,CamiloMM/Noumena |
bb29f0cdfce053b339802c3747fa4ee79bdec036 | src/utils/array/Each.js | src/utils/array/Each.js | /**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Passes each element in the array to the given callback.
*
* @function Phaser.Utils.Array.Each
* @since 3.4.0... | /**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Passes each element in the array to the given callback.
*
* @function Phaser.Utils.Array.Each
* @since 3.4.0... | Fix `context` argument wrongly passed to callback | Fix `context` argument wrongly passed to callback
| JavaScript | mit | spayton/phaser,BeanSeed/phaser,englercj/phaser,BeanSeed/phaser,TukekeSoft/phaser,pixelpicosean/phaser,TukekeSoft/phaser,mahill/phaser,photonstorm/phaser,photonstorm/phaser,mahill/phaser,spayton/phaser,TukekeSoft/phaser |
7cd44b68d733217e790766e7759e0d83deb623c3 | public/load-analytics.js | public/load-analytics.js | if (document.location.hostname === "josephduffy.co.uk") {
// Don't load analytics for noanalytics.josephduffy.co.uk or onion service
return;
}
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["disableCookies"]);
_paq.push(['trackPageVi... | (function() {
if (document.location.hostname === "josephduffy.co.uk") {
// Don't load analytics for noanalytics.josephduffy.co.uk or onion service
return;
}
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["disableCookies... | Fix error when no loading analytics | Fix error when no loading analytics
| JavaScript | mit | JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk |
55c0f4c0908ba79f9d54bb197340358398122548 | test/components/streams/DiscoverComponent_test.js | test/components/streams/DiscoverComponent_test.js | import { expect, getRenderedComponent, sinon } from '../../spec_helper'
import { routeActions } from 'react-router-redux'
// import * as MAPPING_TYPES from '../../../src/constants/mapping_types'
import Container, { Discover as Component } from '../../../src/containers/discover/Discover'
function createPropsForComponen... | import { expect, getRenderedComponent, sinon } from '../../spec_helper'
import { routeActions } from 'react-router-redux'
import { Discover as Component } from '../../../src/containers/discover/Discover'
function createPropsForComponent(props = {}) {
const defaultProps = {
dispatch: sinon.spy(),
isLoggedIn:... | Clean up some code mess | Clean up some code mess
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp |
19a3015ebaf0d9d058eecff620cc38b7f4008a0d | assets/javascripts/resume.js | assets/javascripts/resume.js | ---
layout: null
---
jQuery(document).ready(function($) {
/* Method 2: */
/* var isFirefox = /^((?!chrome|android).)*firefox/i.test(navigator.userAgent); */
$("#btn-print").click(function() {
/* Method 1:*/
if (navigator.vendor == "" || navigator.vendor == undefined) {
alert("This Browser is not p... | ---
layout: null
---
jQuery(document).ready(function($) {
if (navigator.vendor == "" || navigator.vendor == undefined) {
function show_alert(){
alert("This Browser is not printable with this page. If you print with Ctrl + P, errors will appear in the page structure. We recommend 'Google Chrome' or 'Safari'. ... | Update - sáb nov 11 19:54:37 -02 2017 | Update - sáb nov 11 19:54:37 -02 2017
| JavaScript | mit | williamcanin/williamcanin.github.io,williamcanin/williamcanin.github.io,williamcanin/williamcanin.github.io,williamcanin/williamcanin.github.io |
c59f159f18f7a26d000e94e1fe5bd62687e886c5 | jest.config.js | jest.config.js | const path = require('path')
module.exports = {
globals: {
'ts-jest': {
tsConfig: '<rootDir>/src/tsconfig.test.json'
}
},
setupFiles: ['<rootDir>/src/bp/jest-before.ts'],
globalSetup: '<rootDir>/src/bp/jest-rewire.ts',
setupFilesAfterEnv: [],
collectCoverage: false,
resetModules: true,
ve... | const path = require('path')
module.exports = {
globals: {
'ts-jest': {
tsConfig: '<rootDir>/src/tsconfig.test.json'
}
},
setupFiles: ['<rootDir>/src/bp/jest-before.ts'],
globalSetup: '<rootDir>/src/bp/jest-rewire.ts',
setupFilesAfterEnv: [],
collectCoverage: false,
resetModules: true,
ve... | Put proper path to project tests | Put proper path to project tests
| JavaScript | agpl-3.0 | botpress/botpress,botpress/botpress,botpress/botpress,botpress/botpress |
a341760e3945404a64f597580df23dbcfe226a54 | app/app.js | app/app.js | 'use strict';
// Declare app level module which depends on views, and components
angular.module('myApp', [
'ngRoute',
'drupalService',
'myApp.node_add',
'myApp.node_nid',
'myApp.node',
'myApp.taxonomy_term'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.otherwise({red... | 'use strict';
// Declare app level module which depends on views, and components
angular
.module('myApp', [
'ngRoute',
'drupalService',
'myApp.node_add',
'myApp.node_nid',
'myApp.node',
'myApp.taxonomy_term',
'myApp.node_lifecycle'
]).
config(['$route... | Add two way textarea binding. | Add two way textarea binding.
| JavaScript | mit | clemens-tolboom/drupal-8-rest-angularjs,clemens-tolboom/drupal-8-rest-angularjs |
88f86838b7f7f926e5df349edcd6461284fde181 | jest.config.js | jest.config.js | module.exports = {
testEnvironment: 'node',
preset: '@shelf/jest-mongodb'
}
| module.exports = {
testEnvironment: 'node',
preset: '@shelf/jest-mongodb',
roots: ['src']
}
| Add root to prevent infinite loop in watch | Add root to prevent infinite loop in watch
| JavaScript | mit | synzen/Discord.RSS,synzen/Discord.RSS |
debb0af80d5e3cde2d55b3076cc8a25a824d16c8 | scripts/models/graphs-model.js | scripts/models/graphs-model.js | // TODO: This is not a real model or controller
App.Graphs = Ember.Controller.extend({
graph: function(emberId, entityName, entityType, numSeries) {
entityName = entityName.replace(/\./g, '-');
var url = ((!localStorage.apiDomain) ? '' : '//' + localStorage.apiDomain) + '/api/v1/graphs?entityType=' + entityTy... | // TODO: This is not a real model or controller
App.Graphs = Ember.Controller.extend({
graph: function(emberId, entityName, entityType, numSeries) {
entityName = entityName.replace(/\./g, '-');
var url = ((!localStorage.apiDomain) ? '' : '//' + localStorage.apiDomain) + '/api/v1/graphs?entityType=' + entityTy... | Use brighter colors in contextual Graphite graphs | Use brighter colors in contextual Graphite graphs
| JavaScript | apache-2.0 | vine77/saa-ui,vine77/saa-ui,vine77/saa-ui |
f12db5425cf5246b95fcae2c8b54fdf092fc4158 | core/modules/hubot/responder.js | core/modules/hubot/responder.js | var http = require('scoped-http-client');
var Responder = function (api, event, match, message) {
this.api = api;
this.event = event;
this.match = match;
this.message = message;
};
Responder.prototype.random = function (arr) {
return arr[Math.floor(Math.random() * arr.length)];
};
Responder.prot... | var http = require('scoped-http-client'),
fs = require('fs'),
path = require('path'),
urlMatcher = /^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/,
imageExts = ['.jpg','.png','.gif','.gifv','.tif','.tiff','.jpeg'];
var getType = function(message) {
try {
fs.statSync(message);
return 'file';
}
catch... | Enable image/file/url embedding with hubot scripts | Enable image/file/url embedding with hubot scripts
| JavaScript | mit | concierge/Concierge,faizaanmadhani/brianIsTenCarols,faizaanmadhani/brianIsTenCarols,concierge/Concierge |
0dabf910f31ed3b0fdacc742eae9555962462b57 | src/javascripts/asyncModules/Label.js | src/javascripts/asyncModules/Label.js | import Module from '../Module'
export default class Label extends Module {
constructor(el, name, options) {
const defaults = {
"once": false,
"activeClass": "is-active"
}
super(el, name, options, defaults)
}
init() {
const Input = this
console.log(Input);
let toggleLabel ... | import Module from '../Module'
export default class Label extends Module {
constructor(el, name, options) {
const defaults = {
"activeClass": "is-active"
}
super(el, name, options, defaults)
}
init() {
const Input = this
console.log(Input);
let toggleLabel = function() {
... | Refactor some of the form CSS | Refactor some of the form CSS
| JavaScript | mit | Jaywing/atomic,Jaywing/atomic |
f17aea4fed7652378310b53630191e8a48461716 | bin/cli.js | bin/cli.js | #!/usr/bin/env node
var program = require('commander');
var prompt = require('inquirer');
var path = require('path');
var pkg = require(path.resolve(__dirname, '..', 'package.json'));
program.version(pkg.version)
program
.command('new')
.action(function() {
console.log('hits new command');
});
... | #!/usr/bin/env node
var program = require('commander');
var prompt = require('inquirer');
var path = require('path');
var pkg = require(path.resolve(__dirname, '..', 'package.json'));
program.version(pkg.version)
program
.command('new <name>')
.description('Create a new project with the provided name')
... | Add in required argument name for new command | feat: Add in required argument name for new command
| JavaScript | mit | code-computerlove/slate-cli,code-computerlove/quarry,cartridge/cartridge-cli |
7f4cce36d7509feb926eed95a39f73c3dc28633d | scripts/main.js | scripts/main.js | /*
* site: codemelon2012
* file: scripts/main.js
* author: Marshall Farrier
* date: 8/24/2012
* description:
* main JavaScript for codemelon2012
* links:
* http://code.google.com/p/jquery-rotate/ (if needed)
*/
function codeMelonMain(activePage) {
if (!$.support.boxModel) {
window.location.... | /*
* site: codemelon2012
* file: scripts/main.js
* author: Marshall Farrier
* date: 8/24/2012
* description:
* main JavaScript for codemelon2012
* links:
* http://code.google.com/p/jquery-rotate/ (if needed)
*/
function codeMelonMain(activePage) {
if (!$.support.boxModel) {
window.location.... | Edit comment to describe the difficulty more clearly. | Edit comment to describe the difficulty more clearly.
| JavaScript | mit | aisthesis/codemelon2012,aisthesis/codemelon2012,aisthesis/codemelon2012,aisthesis/codemelon2012 |
bcd7062615b4a4210529525e359ad9e91da457c1 | tasks/publish/concat.js | tasks/publish/concat.js | 'use strict';
var applicationConf = process.requirePublish('conf.json');
/**
* Gets the list of minified JavaScript files from the given list of files.
*
* It will just replace ".js" by ".min.js".
*
* @param Array files The list of files
* @return Array The list of minified files
*/
function getMinifiedJSFiles... | 'use strict';
var applicationConf = process.requirePublish('conf.json');
/**
* Gets the list of minified JavaScript files from the given list of files.
*
* It will just replace ".js" by ".min.js".
*
* @param Array files The list of files
* @return Array The list of minified files
*/
function getMinifiedJSFiles... | Correct bug when compiling JavaScript sources | Correct bug when compiling JavaScript sources
Compiled JavaScript files were empty due to previous modifications on routes architecture. Configuration of grunt concat task wasn't conform to this new architecture.
| JavaScript | agpl-3.0 | veo-labs/openveo-publish,veo-labs/openveo-publish,veo-labs/openveo-publish |
07ce413ce8dbb1476de5d34c2d1b8816d6aaf88c | ui/app/mixins/window-resizable.js | ui/app/mixins/window-resizable.js | import Mixin from '@ember/object/mixin';
import { run } from '@ember/runloop';
import { assert } from '@ember/debug';
import { on } from '@ember/object/evented';
import $ from 'jquery';
export default Mixin.create({
windowResizeHandler() {
assert('windowResizeHandler needs to be overridden in the Component', fal... | import Mixin from '@ember/object/mixin';
import { run } from '@ember/runloop';
import { assert } from '@ember/debug';
import { on } from '@ember/object/evented';
export default Mixin.create({
windowResizeHandler() {
assert('windowResizeHandler needs to be overridden in the Component', false);
},
setupWindow... | Remove jquery from the window resize helper | Remove jquery from the window resize helper
| JavaScript | mpl-2.0 | burdandrei/nomad,dvusboy/nomad,hashicorp/nomad,dvusboy/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,dvusboy/nomad,burdandrei/nomad,dvusboy/nomad,hashicorp/nomad,burdandrei/nomad,hashicorp/nomad,hashicorp/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad |
7683a9a714d86a223fb89e9e7126aa7bcb8ac57d | public/javascripts/ga.js | public/javascripts/ga.js | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
g... | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga... | Update google analytics tracking code | Update google analytics tracking code
| JavaScript | bsd-3-clause | BloodAxe/CloudCV,BloodAxe/CloudCV |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.