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 |
|---|---|---|---|---|---|---|---|---|---|
6cdb80e5d3c223eff08d5df3319d174e830c5169 | viewportwidth.js | viewportwidth.js | /*! viewportwidth.js 0.1.1 | Author: Brett Jankord, 2012 | License: MIT */
/* https://github.com/bjankord/viewportwidth.js */
var getViewportWidth = function(){
var vpw, w = window, webkit = (!(window.webkitConvertPointFromNodeToPage == null));
// Webkit and IE 6-8
if (webkit || !(typeof (window.innerWi... | /*! viewportwidth.js 0.1.2 | Author: Brett Jankord, 2012 | License: MIT */
/* https://github.com/bjankord/viewportwidth.js */
module.exports = function() {
"use strict";
var isWebKit = 'WebkitAppearance' in document.documentElement.style;
var isOldIE = !(typeof (window.innerWidth) == 'number'); // IE 6-8
... | Simplify code and make it CommonJS friendly | Simplify code and make it CommonJS friendly | JavaScript | mit | bjankord/viewportwidth.js |
f8dcae29db067b567eeebf57c367d6740714f8fe | src/components/basic/view.js | src/components/basic/view.js | /**
* Created by Tomasz Gabrysiak @ Infermedica on 08/02/2017.
*/
import View from '../../base/view';
import template from './template';
export default class BasicView extends View {
constructor(el, context) {
const handleSexChange = (e) => {
this.context.patient.setSex(e.target.value);
};
cons... | /**
* Created by Tomasz Gabrysiak @ Infermedica on 08/02/2017.
*/
import View from '../../base/view';
import template from './template';
export default class BasicView extends View {
constructor(el, context) {
const handleSexChange = (e) => {
this.context.patient.setSex(e.target.value);
};
cons... | Set age added to context | refactor: Set age added to context
| JavaScript | mit | infermedica/js-symptom-checker-example,infermedica/js-symptom-checker-example |
0ea3aaa0408902d255e2430f9fdf79884bc23f18 | _tests/buster.js | _tests/buster.js | var config = module.exports;
config["DelegateTests"] = {
rootPath: '../',
environment: "browser",
extensions: [ require("buster-coverage") ],
"buster-coverage": {
outputDirectory: "build/logs/jscoverage", //Write to this directory instead of coverage
format: "lcov", //At the moment cobertu... | var config = module.exports;
config["DelegateTests"] = {
rootPath: '../',
environment: "browser",
extensions: [ require("buster-coverage") ],
"buster-coverage": {
outputDirectory: "build/logs/jscoverage",
format: "lcov",
combinedResultsOnly: true
},
sources: [
"lib/... | Remove comments copied from example | Remove comments copied from example
| JavaScript | mit | ftlabs/ftdomdelegate |
e16a2e957362d11b554f948270ed8ceb56de69bc | src/vm-status.js | src/vm-status.js | export function canStart (state) {
return ['down', 'paused', 'suspended'].includes(state)
}
export function canShutdown (state) {
return ['up', 'migrating', 'reboot_in_progress', 'paused', 'powering_up', 'powering_down', 'not_responding'].includes(state)
}
export function canRestart (state) {
return ['up', 'mig... | export function canStart (state) {
return ['down', 'paused', 'suspended'].includes(state)
}
export function canShutdown (state) {
return ['up', 'migrating', 'reboot_in_progress', 'paused', 'powering_up', 'powering_down', 'not_responding', 'suspended'].includes(state)
}
export function canRestart (state) {
retur... | Enable Shutdown button for a suspended VM | Enable Shutdown button for a suspended VM
Fixes: https://github.com/oVirt/ovirt-web-ui/issues/1227
Add missing 'suspended' in the array of VM statuses for shutdown button being enabled in VM details page.
Make the Shutdown action available for a suspended VM.
| JavaScript | apache-2.0 | oVirt/ovirt-web-ui,oVirt/ovirt-web-ui,oVirt/ovirt-web-ui |
ecc6bf0400f97f76aef91db6961c85f50d15fa85 | batch/pubsub/queue-seeker.js | batch/pubsub/queue-seeker.js | 'use strict';
function QueueSeeker(pool) {
this.db = 5;
this.channel = 'batch:hosts';
this.redisPrefix = 'batch:queues:';
this.pattern = this.redisPrefix + '*';
this.pool = pool;
}
module.exports = QueueSeeker;
QueueSeeker.prototype.seek = function (onMessage, callback) {
var initialCursor = ... | 'use strict';
function QueueSeeker(pool) {
this.db = 5;
this.channel = 'batch:hosts';
this.redisPrefix = 'batch:queues:';
this.pattern = this.redisPrefix + '*';
this.pool = pool;
}
module.exports = QueueSeeker;
QueueSeeker.prototype.seek = function (onMessage, callback) {
var initialCursor = ... | Use real on message handler | Use real on message handler
| JavaScript | bsd-3-clause | CartoDB/CartoDB-SQL-API,CartoDB/CartoDB-SQL-API |
a6c205b9a8575376f971f74e7fc1cd907a6c920a | src/gulp/test.js | src/gulp/test.js | import extend from 'extend'
import gulp, {tasks} from 'gulp'
import karma from 'karma'
import rump from 'rump'
const name = ::rump.taskName,
task = ::gulp.task,
{configs} = rump
task(name('scripts:test'), () => {
const options = extend(true, {}, configs.karma, {
singleRun: !configs.watch,
webpac... | import extend from 'extend'
import gulp, {tasks} from 'gulp'
import {Server} from 'karma'
import rump from 'rump'
const name = ::rump.taskName,
task = ::gulp.task,
{configs} = rump
task(name('scripts:test'), done => {
const server = new Server(extend(true, {}, configs.karma, {
singleRun: !configs.wa... | Use non deprecating Karma API | Use non deprecating Karma API
| JavaScript | mit | rumps/rump-scripts-test,rumps/scripts-test |
e7f355c7cfd4ca377d0f681b50be953279609d31 | app/js/controllers.js | app/js/controllers.js | 'use strict';
/* Controllers */
angular.module('nodeCheck.controllers', []).
controller('AppCtrl', function($scope, $http) {
$scope.website = {url: ''};
$scope.displayResult = false;
$scope.displayError = false;
$scope.check = function() {
var url = $scope.website.url;
if (url !== "") {
... | 'use strict';
/* Controllers */
angular.module('nodeCheck.controllers', []).
controller('AppCtrl', function($scope, $http) {
$scope.website = {url: ''};
$scope.displayResult = false;
$scope.displayError = false;
$scope.check = function() {
var url = $scope.website.url;
if (url !== "") {
... | Check that reasons length is greater than 0 | Check that reasons length is greater than 0
| JavaScript | mit | dotheyusenode/dotheyusenode |
d9c325f816892e5170f7ab9c0dab3f32a51167fb | blueprints/ember-cli-deploy-brotli/index.js | blueprints/ember-cli-deploy-brotli/index.js | /* eslint-env node */
module.exports = {
description: '',
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackageToProject('iltorb');
}
};
| /* eslint-env node */
module.exports = {
description: '',
normalizeEntityName: function() {}
};
| Remove afterInstall hook that added iltorb to package.json | Remove afterInstall hook that added iltorb to package.json
| JavaScript | mit | mfeckie/ember-cli-deploy-brotli |
c6891b08408f20f0cabea1ebb93c76eb627f8624 | app/js/constants/phishingExpressions.js | app/js/constants/phishingExpressions.js | (function() {
'use strict';
var phishingExpressions = [
/acusticanapoli\.com/,
/archer\.fr/,
/assurance-ameli-recouvrement\.com/,
/assurance-ameli-recouvrement\.net/,
/assurance\.remboursement-amelifr\.kostidis\.gr/,
/depor420\.beget\.tech/,
/intercoined\.com/,
/liveone\.com\.br/,
/... | (function() {
'use strict';
var phishingExpressions = [
/\.beget\.tech/,
/acusticanapoli\.com/,
/archer\.fr/,
/assurance-ameli-recouvrement\.com/,
/assurance\.remboursement-amelifr/,
/assure-ameli-portail-remboursement\.info/,
/assurance-ameli-recouvrement\.net/,
/assurance\.rembourseme... | Add items in phishing REGEX list | Add items in phishing REGEX list
| JavaScript | agpl-3.0 | sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui |
2648364ea3b1d05ee74c5b38365822a7918534d0 | activities/Abecedarium.activity/js/activity.js | activities/Abecedarium.activity/js/activity.js |
define(["sugar-web/activity/activity","sugar-web/datastore"], function (activity, datastore) {
Abcd.activity = activity;
Abcd.datastore = datastore;
app = null;
// Manipulate the DOM only when it is ready.
require(['domReady!'], function (doc) {
// Initialize the activity
Abcd.activity.setup();
// Creat... |
define(["sugar-web/activity/activity","sugar-web/datastore"], function (activity, datastore) {
if (!Abcd) {
Abcd = {};
}
Abcd.activity = activity;
Abcd.datastore = datastore;
app = null;
// Manipulate the DOM only when it is ready.
require(['domReady!'], function (doc) {
// Initialize the activity
Abcd... | Fix random issue in Abecedarium | Fix random issue in Abecedarium
| JavaScript | apache-2.0 | llaske/sugarizer,llaske/sugarizer,llaske/sugarizer |
87f893fa79ad6cf14faca88c3338c4d4a5bbc33b | client/util/CrowiAuth.js | client/util/CrowiAuth.js | import queryString from 'query-string'
export default class CrowiAuth {
constructor(crowi) {
this.crowi = crowi
this.location = crowi.location
this.localStorage = crowi.localStorage
this.onStorage = this.onStorage.bind(this)
this.subscribeStorage()
this.updateState()
}
isAuthenticated(... | import queryString from 'query-string'
export default class CrowiAuth {
constructor(crowi) {
this.crowi = crowi
this.location = crowi.location
this.localStorage = crowi.localStorage
this.onStorage = this.onStorage.bind(this)
this.subscribeStorage()
this.updateState()
}
isAuthenticated(... | Fix an issue any page is redirected to the top page when opening the cache of the login page (for example with the back button) | Fix an issue any page is redirected to the top page when opening the cache of the login page (for example with the back button)
| JavaScript | mit | crowi/crowi,crowi/crowi,crowi/crowi |
ac41a39aebec7983ba6e1ba1a159009969d361f6 | assets/js/modules/idea-hub/index.js | assets/js/modules/idea-hub/index.js | /**
* Idea Hub module initialization.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENS... | /**
* Idea Hub module initialization.
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENS... | Add ifEnabled function for idea-hub and wrap main exports. | Add ifEnabled function for idea-hub and wrap main exports.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
47ec3739c5656d4106efa6a93343d161f0bb5714 | utils.js | utils.js | /*
* Copyright 2011 Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*/
function getCallStatusText (agent) {
switch(agent.callStatus) {
case CallAge... | /*
* Copyright 2011 Intel Corporation.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*/
function getCallStatusText (agent) {
switch(agent.callStatus) {
case CallAge... | Remove "Duration -" from duration string. Remove leading zero on hour in duration string. | Remove "Duration -" from duration string.
Remove leading zero on hour in duration string.
| JavaScript | apache-2.0 | meego-tablet-ux/meego-app-im,meego-tablet-ux/meego-app-im |
1cdcb9d69d6279aa7619f9f9c33a6d5f75880bc3 | cypress/integration/simple_spec.js | cypress/integration/simple_spec.js | describe('Get a forecast for a city', function() {
it('Visits the weather chart site', function() {
cy.visit('http://localhost:8080')
})
}) | describe('Get a forecast for a city', () => {
it('Visits the weather chart site', () => {
cy.visit('http://localhost:8080')
})
it('Finds the search bar', () => {
cy.get('input').should('be.visible')
})
it('Displays a weather chart when user searches for a city', () => {
cy.... | Add integration tests for weather chart and search functionality | Add integration tests for weather chart and search functionality
| JavaScript | mit | CaseyKelly/react-redux-weather-charts,CaseyKelly/react-redux-weather-charts |
4c99ee7a875f9eb3ac7662b22766e9351b2197bb | phantomas.js | phantomas.js | #!/usr/bin/env phantomjs
/**
* PhantomJS-based web performance metrics collector
*
* Usage:
* ./phantomas.js
* --url=<page to check>
* [--format=json|csv|plain]
* [--timeout=5]
* ]--viewport=<width>x<height>]
* [--verbose]
* [--silent]
* [--log=<log file>]
* [--modules=moduleOne,mod... | #!/usr/bin/env phantomjs
/**
* PhantomJS-based web performance metrics collector
*
* Usage:
* ./phantomas.js
* --url=<page to check>
* [--format=json|csv|plain]
* [--timeout=5]
* ]--viewport=<width>x<height>]
* [--verbose]
* [--silent]
* [--log=<log file>]
* [--modules=moduleOne,mod... | Remove --cookies-file option for now. | Remove --cookies-file option for now.
I can't figure out if there are any public APIs for working with
the binary cookie formats that PhantomJS now uses.
Not sure if there are any functions exposed that would let us interpret
them correctly, and attempting to parse cookie binaries might not
be super useful.
| JavaScript | bsd-2-clause | macbre/phantomas,gmetais/phantomas,ingoclaro/phantomas,ingoclaro/phantomas,gmetais/phantomas,william-p/phantomas,gmetais/phantomas,ingoclaro/phantomas,william-p/phantomas,macbre/phantomas,william-p/phantomas,macbre/phantomas |
948df0e383d4d39f74e75e5c3b42b08f54eb82af | jest.config.js | jest.config.js | /* eslint-disable filenames/match-regex */
const reporters = ['default'];
if (process.env.CI) {
reporters.push([
'jest-junit',
{
output: './junit_jest.xml',
},
]);
}
// eslint-disable-next-line import/no-commonjs
module.exports = {
testMatch: ['<rootDir>/spec/frontend/**/*_spec.js'],
module... | /* eslint-disable filenames/match-regex */
const reporters = ['default'];
if (process.env.CI) {
reporters.push([
'jest-junit',
{
output: './junit_jest.xml',
},
]);
}
// eslint-disable-next-line import/no-commonjs
module.exports = {
testMatch: ['<rootDir>/spec/frontend/**/*_spec.js'],
module... | Add vendor/ to Jest aliases | Add vendor/ to Jest aliases
| JavaScript | mit | stoplightio/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,iiet/iiet-git,mmkassem/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,iiet/iiet-git,mmkassem/gitlabhq,mmkassem/gitlabhq |
e80401c9793c43e3237ba45168f11f7683901665 | components/join/index.js | components/join/index.js | const Join = () => {
return (
<div className="component">
<h1>Bli med i linjeforeningen!</h1>
<p>Alle informatikere er med i linjeforeningen. Gå videre til <a href="https://online.ntnu.no/">hovedsiden</a> for å lage din brukerkonto på Online sine systemer.</p>
<p>Har du lyst til å gjøre studieti... | const Join = () => {
return (
<div id="join" className="component">
<h1>Bli med i linjeforeningen!</h1>
<p>Alle informatikere er med i linjeforeningen. Gå videre til <a href="https://online.ntnu.no/">hovedsiden</a> for å lage din brukerkonto på Online sine systemer.</p>
<p>Har du lyst til å gjør... | Add an ID to join component | Add an ID to join component
| JavaScript | mit | dotKom/glowing-fortnight,dotKom/glowing-fortnight |
36ff97bd836fc1e4b8ca63ec3d3cb168c8bbc5ee | src/two-columns.js | src/two-columns.js | export const layoutWrapper = {
display: "flex",
justifyContent: "space-between",
};
export const sideBar = {
marginLeft: "35px",
marginTop: "25px",
order: "1",
flex: "1 6 25%",
};
export const mainContent = {
order: "2",
flex: "3 1 75%",
}; | export const layoutWrapper = {
display: "flex",
justifyContent: "space-between",
};
export const sideBar = {
marginLeft: "35px",
marginTop: "25px",
order: "1",
flex: "1 6 35%",
};
export const mainContent = {
marginTop: "25px",
order: "2",
flex: "3 1 65%",
}; | Make sidebar wider in 2-column layout | Make sidebar wider in 2-column layout
| JavaScript | mit | orouvinen/mytype-frontend,orouvinen/mytype-frontend |
7690d60150af45106485f3e6f87dd993081c563b | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
'browser-id3-writer': './src/browser-id3-writer.js',
'browser-id3-writer.min': './src/browser-id3-writer.js'
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
... | const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
'browser-id3-writer': './src/browser-id3-writer.js',
'browser-id3-writer.min': './src/browser-id3-writer.js'
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
... | Remove named define in AMD | chore(bundle): Remove named define in AMD
| JavaScript | mit | egoroof/browser-id3-writer |
abeba3df022368c8802664bd67f696642efbc96b | webpack.config.js | webpack.config.js | var path = require('path')
module.exports = {
entry: [
'./lib/index.js'
],
output: {
path: path.join(__dirname, '/dist/'),
filename: 'jose.min.js',
library: 'JOSE',
libraryTarget: 'var'
},
externals: {
webcrypto: 'crypto'
},
devtool: 'source-map'
}
| var path = require('path')
module.exports = {
entry: [
'./lib/index.js'
],
output: {
path: path.join(__dirname, '/dist/'),
filename: 'jose.min.js',
library: 'JOSE',
libraryTarget: 'var'
},
externals: {
'text-encoding': 'TextEncoder',
webcrypto: 'crypto'
},
devtool: 'source-map... | Add 'text-encoding' to webpack externals | chore(npm): Add 'text-encoding' to webpack externals
| JavaScript | mit | anvilresearch/jose |
3e7981acb3ee17987f62bd3b01d43ad6930eedcd | generators/app/templates/api/models/User.js | generators/app/templates/api/models/User.js | /**
* User
* @description :: Model for storing users
*/
module.exports = {
schema: true,
attributes: {
username: {
type: 'string',
required: true,
unique: true,
alphanumericdashed: true
},
password: {
type: 'string'
},
email: {
type: 'email',
requ... | /**
* User
* @description :: Model for storing users
*/
module.exports = {
schema: true,
attributes: {
username: {
type: 'string',
required: true,
unique: true,
alphanumericdashed: true
},
password: {
type: 'string'
},
email: {
type: 'email',
requ... | Fix double hashing in beforeUpdate | Fix double hashing in beforeUpdate
| JavaScript | mit | ghaiklor/generator-sails-rest-api,konstantinzolotarev/generator-trails,italoag/generator-sails-rest-api,IncoCode/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,jaumard/generator-trails,tnunes/generator-trails,eithewliter5518/generator-sails-rest-api,italoag/generator-sails-rest-api |
83357e228dc04abd3ff8e31fc12a77b937397f30 | src/foam/nanos/menu/Menu.js | src/foam/nanos/menu/Menu.js | foam.CLASS({
package: 'foam.nanos.menu',
name: 'Menu',
properties: [
{
class: 'String',
name: 'id'
},
{
class: 'String',
name: 'label'
},
{
class: 'FObjectProperty',
name: 'handler'
}
]
});
foam.RELATIONSHIP({
sourceModel: 'foam.nanos.menu.Menu',
... | foam.CLASS({
package: 'foam.nanos.menu',
name: 'Menu',
properties: [
{
class: 'String',
name: 'id'
},
{
class: 'String',
name: 'label'
},
{
class: 'FObjectProperty',
name: 'handler'
}
]
});
foam.RELATIONSHIP({
sourceModel: 'foam.nanos.menu.Menu',
... | Fix menu sorting by parent bug. | Fix menu sorting by parent bug.
| JavaScript | apache-2.0 | jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,TanayParikh/foam2,jacksonic/vjlofvhjfgm,TanayParikh/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,TanayParikh/foam2,TanayParikh/foam2 |
7cd67535400f56af3d01c23ab248cafa72e706ab | config.js | config.js | export default {
host: process.env.HOST || 'localhost',
mongo: {
url: process.env.MONGO_URL || 'mongodb://localhost:27017/Demographics'
},
port: process.env.PORT || '8080'
}
| export default {
host: process.env.HOST || '0.0.0.0',
mongo: {
url: process.env.MONGO_URL || 'mongodb://localhost:27017/Demographics'
},
port: process.env.PORT || '8000'
}
| Change host and port defaults | Change host and port defaults
| JavaScript | mit | onmodulus/demographics |
f9c178ad8a26aaf871668638b483960e2db7f915 | src/lifesized.js | src/lifesized.js | /**
* lifesized: Get the physical size of displays and their ppi
*/
var screen = require('screen'),
remote = require('remote'),
execSync = require('child_process').execSync,
path = require('path'),
os = require('os');
var lifesized = {
/**
* Get the pixels per inch of a screen
*
... | /**
* lifesized: Get the physical size of displays and their ppi
*/
var screen = require('screen'),
execSync = require('child_process').execSync,
path = require('path'),
os = require('os');
var lifesized = {
/**
* Get the pixels per inch of a screen
*
* @param [screen] (Electron Scre... | Fix for working in the main process | Fix for working in the main process
| JavaScript | mit | francoislaberge/lifesized,francoislaberge/lifesized |
d4b84828c4d7add95237d14c3d8f9b222eddcd77 | grunt-utils/manifest_url.js | grunt-utils/manifest_url.js | var url = require('url'),
grunt = require('grunt');
module.exports = {
manifestUrl: function(manifest) {
return function(path) {
if(process.env.GLAZIER_ENV !== "prod") { return path; }
var parsed = url.parse(path, true);
if (!manifest[parsed.pathname]) {
throw "No file found in manif... | var url = require('url'),
grunt = require('grunt');
module.exports = {
manifestUrl: function(manifest) {
return function(path) {
if(process.env.GLAZIER_ENV !== "prod") { return path; }
var parsed = url.parse(path, true);
var pathname = parsed.pathname;
var minifiedPathname = pathname.r... | Use .min files when available. | Use .min files when available.
| JavaScript | mit | yapplabs/glazier,yapplabs/glazier |
4969c90a9e5d607554a55c73e599c275e2c6fff8 | lib/partials/in-memory.js | lib/partials/in-memory.js | 'use strict';
const compile = require('../compiler').compile;
function InMemory(partials) {
this.partials = partials;
this.compiledPartials = {};
}
InMemory.prototype.get = function (id) {
if (this.compiledPartials.hasOwnProperty(id)) return this.compiledPartials[id];
if (this.partials.hasOwnProperty(id)) {
re... | 'use strict';
const compile = require('../compiler').compile;
function findPartial(partials, path) {
if (path.length === 0) return partials;
const head = path[0];
const tail = path.slice(1);
if (!partials.hasOwnProperty(head)) return null;
return findPartial(partials[head], tail);
}
function InMemory(partials)... | Add support for partial paths in the InMemory partials provider | Add support for partial paths in the InMemory partials provider
| JavaScript | mit | maghoff/mustachio,maghoff/mustachio,maghoff/mustachio |
3627df41e9efe953476a0adc7febd07474df35ba | demos/WT_integration.user.js | demos/WT_integration.user.js | // ==UserScript==
// @name WT_Integration
// @namespace https://wholetale.org/
// @version 0.1.0
// @description Mock WT integration
// @author Xarthisius
// @match https://dataverse.harvard.edu/dataset.xhtml*
// @grant none
// ==/UserScript==
$(document).ready(function() {
var ... | // ==UserScript==
// @name WT_Integration
// @namespace https://wholetale.org/
// @version 0.1.1
// @description Mock WT integration
// @author Xarthisius
// @match https://dataverse.harvard.edu/dataset.xhtml*
// @grant none
// ==/UserScript==
$(document).ready(function() {
var ... | Update script to include name | Update script to include name
| JavaScript | mit | whole-tale/wt-design-docs,whole-tale/wt-design-docs |
338ca91bf87454a920724016e8fd429cf4dd3f3c | __tests__/load.js | __tests__/load.js | const _ = require('lodash/fp')
const purespec = require('..')
describe('load()', () => {
it('returns tests loaded from the given PureSpec module', () => {
const actual = purespec.load('example.js')
expect(actual).toBeInstanceOf(purespec.matchers.Test)
expect(_.isFunction(actual.subject)).toBeTruthy()
... | const _ = require('lodash/fp')
const purespec = require('..')
describe('load()', () => {
it('returns tests loaded from the given PureSpec module', () => {
const actual = purespec.load('example.js')
expect(actual).toBeInstanceOf(purespec.matchers.Test)
expect(actual.name).toBe('Math.round()')
expect(... | Remove an unnecessary usage of toMatchObject() | Remove an unnecessary usage of toMatchObject()
| JavaScript | isc | nickmccurdy/purespec |
9225e26847b8786f130d47023cc4c2f0e93ba8ce | test/build.spec.js | test/build.spec.js | import { expect } from 'chai';
import { createStream } from './helper';
describe('build.js', () => {
describe('Failures', () => {
it('should stop when there is no index file', () => {
const stream = createStream(['build']);
return stream.once('data')
.then(output =>... | import { expect } from 'chai';
import { createStream } from './helper';
describe('build.js', () => {
describe('Failures', () => {
it('should stop when there is no index file', () => {
const stream = createStream(['build']);
return stream.once('data')
.then(output =>... | Increase timeout to avoid breaking build | Increase timeout to avoid breaking build
| JavaScript | mit | rung-tools/rung-cli,rung-tools/rung-cli,rung-tools/rung-cli |
cb05bbddd6cdd5f569be6dde902346a64315ff72 | centreon-frontend/centreon-ui/src/MaterialComponents/Switch/index.js | centreon-frontend/centreon-ui/src/MaterialComponents/Switch/index.js | import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import Switch from '@material-ui/core/Switch';
const CustomSwitch = withStyles({
switchBase: {
color: '#c7c8c9',
'&$checked': {
color: '#0072CE',
},
'&$checked + $track': {
backgroundColor: '#0072CE',
... | import React, { Component } from 'react';
import { withStyles } from '@material-ui/core/styles';
import Switch from '@material-ui/core/Switch';
const styles = () => ({
switchBase: {
color: '#c7c8c9',
'&$checked': {
color: '#0072CE',
},
'&$checked + $track': {
backgroundColor: '#0072CE',
... | Switch component refactored to stateful. | fix(switch): Switch component refactored to stateful.
| JavaScript | apache-2.0 | centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon,centreon/centreon |
a586783c31edcfbf47592d17fb8a528c4fc688bf | src/orb/index.js | src/orb/index.js | import GridConfiguration from './components/GridConfiguration';
import ChartConfiguration from './components/ChartConfiguration';
import Grid from './components/Grid';
import WrappedGrid from './WrappedGrid';
import Chart from './components/Chart/Chart';
import './index.css';
export { GridConfiguration };
export { Ch... | import GridConfiguration from './components/GridConfiguration';
import ChartConfiguration from './components/ChartConfiguration';
import Grid from './components/Grid';
import WrappedGrid from './WrappedGrid';
import Chart from './components/Chart/Chart';
import reducer from './reducers';
import hydrateStore from './hyd... | Add exports of reducer and hydrateStore | Add exports of reducer and hydrateStore
| JavaScript | mit | polluxparis/zebulon-grid,polluxparis/zebulon-grid |
c36b36e068b2ab50476fb81c7f148519237c1dec | src/Root.js | src/Root.js | import React from 'react';
import { applyMiddleware, createStore } from 'redux';
import { Provider as ReduxProvider } from 'react-redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import thunk from 'redux-thunk';
import createHistory from 'history/createBrowserHistory';
import { ConnectedRouter, r... | import React from 'react';
import { applyMiddleware, createStore } from 'redux';
import { Provider as ReduxProvider } from 'react-redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import thunk from 'redux-thunk';
import { createBrowserHistory } from 'history';
import { ConnectedRouter, routerMiddl... | Fix console warning about history import | Fix console warning about history import
| JavaScript | agpl-3.0 | ronaldpereira/WoWAnalyzer,Juko8/WoWAnalyzer,Juko8/WoWAnalyzer,yajinni/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,ronaldpereira/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,ronaldpereira/WoWAnalyzer,yajinn... |
b5fa2f9d907d0db9b265ffb9c4107db4a88b1522 | src/build.js | src/build.js | const Build = require('github-build')
const data = {
repo: process.env.TRAVIS_REPO_SLUG,
sha: process.env.TRAVIS_PULL_REQUEST_SHA,
token: process.env.github_token,
label: 'perfbench',
description: 'Running performance tests'
}
const build = new Build(data)
let pass = () => {} // noop
let fail = () => proce... | const Build = require('github-build')
const data = {
repo: process.env.TRAVIS_REPO_SLUG,
sha: process.env.TRAVIS_PULL_REQUEST_SHA,
token: process.env.github_token,
label: 'perfbench',
description: 'Running performance tests'
}
const build = new Build(data)
let pass = () => {} // noop
let fail = () => proce... | Test with messages without emoji | Test with messages without emoji
| JavaScript | mit | siddharthkp/perfbench,siddharthkp/perfbench |
23fda24f210eff4ec7779976d6a53ee211144545 | js-library/src/js/loader.js | js-library/src/js/loader.js | (function () {
function createIframe() {
var body = document.getElementsByTagName("body")[0];
var iframe = document.createElement("iframe");
var div = document.createElement("div");
iframe.style.display = "none";
iframe.id = "factlink-iframe";
div.id = "fl";
div.style.display = "none";
... | (function () {
function createIframe() {
var body = document.getElementsByTagName("body")[0];
var iframe = document.createElement("iframe");
var div = document.createElement("div");
iframe.style.display = "none";
iframe.id = "factlink-iframe";
div.id = "fl";
body.appendChild(div);
di... | Fix displaying of Factlink Bubble | Fix displaying of Factlink Bubble
Signed-off-by: tomdev <96835dd8bfa718bd6447ccc87af89ae1675daeca@codigy.nl>
| JavaScript | mit | daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core |
cfb023b9893c7f3a5b1cea869050dffc9ad9187a | lib/modules/behaviors/schema.js | lib/modules/behaviors/schema.js | var prototype = Astronomy.Schema.prototype;
prototype.addBehavior = function(behaviorName, behaviorOptions) {
if (!_.isString(behaviorName)) {
return;
}
behaviorOptions = behaviorOptions || {};
// Check if bahavior with given name exists.
if (!_.has(Astronomy._behaviors, behaviorName)) {
throw new E... | var prototype = Astronomy.Schema.prototype;
prototype.addBehavior = function(behaviorName, behaviorOptions) {
if (!_.isString(behaviorName)) {
return;
}
behaviorOptions = behaviorOptions || {};
// Check if bahavior with given name exists.
if (!_.has(Behaviors, behaviorName)) {
throw new Error('Behav... | Fix naming error Astronomy._behaviors to Behaviors | Fix naming error Astronomy._behaviors to Behaviors
| JavaScript | mit | tdamsma/meteor-astronomy,jagi/meteor-astronomy,MasterAM/meteor-astronomy,jakobrosenberg/meteor-astronomy,sekmet/meteor-astronomy,awei01/meteor-astronomy,ribbedcrown/meteor-astronomy,henry-hz/meteor-astronomy |
0a94ff40ab941493fc714f3582e3b37b047b71d5 | lib/msal-core/webpack.config.js | lib/msal-core/webpack.config.js | var path = require("path");
var webpack = require("webpack");
var UglifyJsPlugin = require('uglifyjs-webpack-plugin');
var package = require('./package');
var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
var PATHS = {
entryPoint: path.resolve(__dirname, 'src/index.ts'),
bundles: path.res... | var path = require("path");
var webpack = require("webpack");
var UglifyJsPlugin = require('uglifyjs-webpack-plugin');
var package = require('./package');
var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
var PATHS = {
entryPoint: path.resolve(__dirname, 'src/index.ts'),
bundles: path.res... | Switch to file-based sourcemaps for msal.js and msal.min.js | Switch to file-based sourcemaps for msal.js and msal.min.js
| JavaScript | mit | AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication... |
f06a02c145b67042a64d2c5240dfdff63cca99c5 | src/ggrc/assets/javascripts/components/mapping-controls/mapping-type-selector.js | src/ggrc/assets/javascripts/components/mapping-controls/mapping-type-selector.js | /*!
Copyright (C) 2017 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
*/
(function (can, GGRC) {
'use strict';
GGRC.Components('mappingTypeSelector', {
tag: 'mapping-type-selector',
template: can.view(
GGRC.mustache_path +
'/components/mapping-... | /*!
Copyright (C) 2017 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
*/
(function (can, GGRC) {
'use strict';
GGRC.Components('mappingTypeSelector', {
tag: 'mapping-type-selector',
template: can.view(
GGRC.mustache_path +
'/components/mapping-... | Fix Access Group's Mapper modal | Fix Access Group's Mapper modal
| JavaScript | apache-2.0 | VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core |
a83fe8d4b43bf687d398074fc43c90f3e87bd460 | template.js | template.js | ;(function (f) {
// CommonJS
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = f();
// RequireJS
} else if (typeof define === "function" && define.amd) {
define([], f);
// <script>
} else {
var g
if (typeof window !== "undefined") {
g = window;
... | ;(function (f) {
// CommonJS
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = f();
// RequireJS
} else if (typeof define === "function" && define.amd) {
define([], f);
// <script>
} else {
var g
if (typeof window !== "undefined") {
g = window;
... | Add `this` as a fallback global for Java 8 Nashorn | Add `this` as a fallback global for Java 8 Nashorn
[closes #22]
| JavaScript | mit | ForbesLindesay/umd,manvalls/umd |
d807f845d0d817fece44b0f137fb2fa4b47cafc4 | src/modules/ngSharepointLists/components/queries/updateQuery.js | src/modules/ngSharepointLists/components/queries/updateQuery.js | angular
.module('ngSharepoint.Lists')
.factory('UpdateQuery', ['$spList', 'CamlBuilder', 'WhereQuery', 'Query', function($spList, CamlBuilder, WhereQuery, Query) {
var UpdateQuery = function(list) {
this.__list = list;
this.__values = {};
this.__where = [];
return this;
};
UpdateQuery.prototype = ne... | angular
.module('ngSharepoint.Lists')
.factory('UpdateQuery', ['$spList', 'CamlBuilder', 'WhereQuery', 'Query', function($spList, CamlBuilder, WhereQuery, Query) {
var UpdateQuery = function(list) {
this.__list = list;
this.__values = {};
this.__where = [];
return this;
};
UpdateQuery.prototype = ne... | Use this instead of query | Use this instead of query
| JavaScript | apache-2.0 | maxjoehnk/ngSharepoint |
1c8d6a8fd6500f58e13f0d1f7d672421c9caad51 | app/config/env/production.js | app/config/env/production.js | 'use strict';
module.exports = {
db: {
connection: {
host: 'localhost',
user: 'works_servers',
password: 'iScada12',
database: 'works_servers',
charset: 'utf8'
},
client: 'mysql',
pool: {
min: 0,
max: 7
}
}
}; | 'use strict';
module.exports = {
db: {
connection: {
host: 'db_host',
user: 'db_user',
password: 'db_pass',
database: 'db_name',
charset: 'utf8'
},
client: 'mysql',
pool: {
min: 0,
max: 7
}
}
}; | Change to prod db config | Change to prod db config
| JavaScript | mit | chrisedg87/BeanJS,chrisedg87/BeanJS |
2a9f9d860ed5f6c6d95db30e54f8eadfbc8b0dfe | src/index.js | src/index.js | // Loaded ready states
const loadedStates = ['interactive', 'complete'];
// Return Promise
const whenDomReady = (cb, doc) => new Promise(resolve => {
// Allow doc to be passed in as the lone first param
if (cb && typeof cb !== 'function') {
doc = cb;
cb = null;
}
// Use global document if we don't have one
d... | // Loaded ready states
const loadedStates = ['interactive', 'complete'];
// Return Promise
const whenDomReady = (cb, doc) => new Promise(resolve => {
// Allow doc to be passed in as the lone first param
if (cb && typeof cb !== 'function') {
doc = cb;
cb = null;
}
// Use global document if we don't have one
d... | Use es2015 module syntax for src | Use es2015 module syntax for src
| JavaScript | mit | lukechilds/when-dom-ready |
27ebded8d2bec601c8d62e3e9825c90902fd768f | src/index.js | src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import SearchBar from './components/search_bar';
const API_KEY = 'AIzaSyDoq3zo7iLAeVX3tGVWP9EtRyIGeFqs7BQ';
// Create a new component. This component should produce some HTML.
const App = () => {
return (
<div>
<SearchBar />
</div>
... | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
const API_KEY = 'AIzaSyDoq3zo7iLAeVX3tGVWP9EtRyIGeFqs7BQ';
class App extends Component {
constructor(props) {
super(props);
this.state ... | Make app component a class component | Make app component a class component
| JavaScript | mit | theoryNine/react-video-browser,theoryNine/react-video-browser |
a0ccfaa717492ef56c3f9f0b4b816cfc4c6c63d4 | src/index.js | src/index.js | // We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element/build/document-register-element';
// You must include the ShadyDOM polyfill *before* ShadyCSS. It seems that some
/... | // We load the Safari fix before document-register-element because DRE
// overrides attachShadow() and calls back the one it finds on HTMLElement.
import './fix/safari';
import 'document-register-element/build/document-register-element';
import '@webcomponents/shadydom';
import '@webcomponents/shadycss';
| Revert "chore: add comment about import order for shadydom / shadycss." | Revert "chore: add comment about import order for shadydom / shadycss."
This reverts commit 41c6e9aeebff5f50d5ad4c61a21add257dcae1b2.
| JavaScript | mit | skatejs/web-components |
ce1757d8109d882110936c108755c49fbaaabfbb | src/index.js | src/index.js | export default function expandCache(cache) {
function followPath(path) {
return path.reduce((acc, part) => {
if (acc && acc[part]) {
return acc[part];
}
return undefined;
}, cache);
}
function expandChild(child) {
if (child.$type === 'atom') return child.value;
if (chil... | export default function expandCache(cache) {
function followPath(path) {
return path.reduce((acc, part) => {
if (acc && acc[part]) {
return acc[part];
}
return undefined;
}, cache);
}
function expandChild(child) {
if (child.$type === 'atom') return child.value;
if (chil... | Handle the case when node is falsey | [FIX] Handle the case when node is falsey
| JavaScript | mit | ekosz/falcor-expand-cache |
6ca8829029688d04ef12912b36134843af482c50 | src/index.js | src/index.js | var matter = exports;
matter.parsers = require('./parsers');
matter.register = matter.parsers.register;
matter.defaults = matter.parsers.defaults;
matter.parse = matter.parsers.registry;
// register the bundled parsers
require('./parsers/json');
require('./parsers/yaml');
matter.yaml = matter.parse.yaml;
matter.json... | var matter = exports;
matter.parsers = require('./parsers');
matter.parse = matter.parsers.registry;
// register the bundled parsers
require('./parsers/json');
require('./parsers/yaml');
matter.yaml = matter.parse.yaml;
matter.json = matter.parse.json;
| Make the api a bit more sane | Make the api a bit more sane
| JavaScript | mit | justinvdm/matter |
4ccf3bd4788b199f42999c1cd59e45e993a7f9e4 | src/index.js | src/index.js | import React from 'react';
import {render} from 'react-dom';
import {AppContainer} from 'react-hot-loader';
import store from './store';
import Root from './Root';
render(
<AppContainer>
<Root store={store} />
</AppContainer>,
document.getElementById('content')
);
if (module.hot) {
module.hot... | import React from 'react';
import {render} from 'react-dom';
import {AppContainer} from 'react-hot-loader';
import store from './store';
import Root from './Root';
render(
<AppContainer>
<Root store={store} />
</AppContainer>,
document.getElementById('content')
);
if (module.hot) {
module.hot... | Use System.import instead of require | Use System.import instead of require
| JavaScript | mit | tomvej/redux-starter,tomvej/redux-starter |
c4d33a19a624f702d159753e463f299296e99ae7 | src/components/TableArea.js | src/components/TableArea.js | import React from 'react';
import Paper from 'material-ui/Paper';
import Table, {
TableBody,
TableCell,
TableHead,
TableRow
} from 'material-ui/Table';
import TaxCalculator from '../libs/TaxCalculator';
const TableArea = ({ data }) =>
<Paper>
<Table>
<TableHead>
<TableRow>
<Table... | import React from 'react';
import Paper from 'material-ui/Paper';
import Table, {
TableBody,
TableCell,
TableHead,
TableRow
} from 'material-ui/Table';
import numeral from 'numeral';
import TaxCalculator from '../libs/TaxCalculator';
const TableArea = ({ data }) =>
<Paper>
<Table>
<TableHead>
... | Implement yen mark and comma. | Implement yen mark and comma.
| JavaScript | apache-2.0 | migutw42/jp-tax-calculator,migutw42/jp-tax-calculator |
924593fd2c8eccad6c3896462185c6f79e1814af | lib/browser-update/index.js | lib/browser-update/index.js | /**
* Module dependencies.
*/
var config = require('lib/config');
var jade = require('jade');
var path = require('path');
var resolve = path.resolve;
var t = require('t-component');
var html = jade.renderFile(resolve(__dirname, 'index.jade'), { config: config, t: t });
var express = require('express');
var app = mod... | /**
* Module dependencies.
*/
var config = require('lib/config');
var jade = require('jade');
var path = require('path');
var resolve = path.resolve;
var t = require('t-component');
var html = jade.renderFile(resolve(__dirname, 'index.jade'), { config: config, t: t });
var express = require('express');
var app = mod... | Fix ISE if the UA header is missing | Fix ISE if the UA header is missing
| JavaScript | mit | atlatszo/evoks,atlatszo/evoks |
a314c5aeff06b07ba711e85694cf7cababbe417b | packages/prose-editor/ProseEditorPackage.js | packages/prose-editor/ProseEditorPackage.js | import BasePackage from '../base/BasePackage'
import ParagraphPackage from '../paragraph/ParagraphPackage'
import HeadingPackage from '../heading/HeadingPackage'
import CodeblockPackage from '../codeblock/CodeblockPackage'
import BlockquotePackage from '../blockquote/BlockquotePackage'
import LinkPackage from '../link/... | import BasePackage from '../base/BasePackage'
import SwitchTextTypePackage from '../switch-text-type/SwitchTextTypePackage'
import ParagraphPackage from '../paragraph/ParagraphPackage'
import HeadingPackage from '../heading/HeadingPackage'
import CodeblockPackage from '../codeblock/CodeblockPackage'
import BlockquotePa... | Use SwitchTextType package in ProseEditor. | Use SwitchTextType package in ProseEditor.
| JavaScript | mit | michael/substance-1,andene/substance,andene/substance,michael/substance-1,substance/substance,substance/substance |
996f186a34f48f769a4721cad5e10c8cb8f6c88e | class/basic/app-finish.js | class/basic/app-finish.js | 'use strict'
class Monster {
constructor(name) {
this.name = name;
this.cp = 100;
}
attack() {
console.log(`Attack ${this.cp} points!`);
}
powerUp() {
this.cp += 100;
console.log("Power Up completed!")
}
}
let mon = new Monster("My Mon");
console.log(mon.name);
... | 'use strict'
class Monster {
constructor(name, cp = 100) {
this.name = name;
this.cp = cp;
}
attack() {
console.log(`Attack ${this.cp} points!`);
}
powerUp() {
this.cp += 100;
console.log("Power Up completed!")
}
}
let mon = new Monster("My Mon");
console.log(mo... | Add cp as default parameter in constructor | Add cp as default parameter in constructor
| JavaScript | apache-2.0 | teerasej/training-javascript-es6-beginner-thai |
57774a4a981e2f12cfe9b029447e34f203221b18 | local-cli/templates/HelloWorld/index.js | local-cli/templates/HelloWorld/index.js | import { AppRegistry } from 'react-native';
import App from './App';
AppRegistry.registerComponent('HelloWorld', () => App);
| import { AppRegistry } from 'react-native';
import App from './App';
import { name as appName } from './app.json';
AppRegistry.registerComponent(appName, () => App);
| Use app name from app.json for registering application | Use app name from app.json for registering application
Summary:
Currently when we change the app name in `app.json`, run `react-native eject` and then run the application, we get the following error `Application HelloWorld2 has not been registered`
<img src="https://user-images.githubusercontent.com/6805530/34646396-... | JavaScript | bsd-3-clause | pandiaraj44/react-native,exponentjs/react-native,javache/react-native,facebook/react-native,facebook/react-native,javache/react-native,facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,hoangpham95/react-native,myntra/react-native,exponent/react-native,javache/react-native,exponent/react-nati... |
0a7153d6723d3d12157ee54abe7ddb48c104cce1 | ext/bg.js | ext/bg.js | chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
if (request.method == "getSettings") {
sendResponse({
urls_to_jirafy: localStorage['urls_to_jirafy'],
project_keys: localStorage['project_keys'],
jira_server: localStorage['jira_server']
});
}
... | chrome.extension.onRequest.addListener(function(request, sender, sendResponse) {
if (request.method == "getSettings") {
sendResponse({
urls_to_jirafy: localStorage['urls_to_jirafy'],
project_keys: localStorage['project_keys'],
jira_server: localStorage['jira_server']
});
}
... | Load the options page on install | Load the options page on install
| JavaScript | apache-2.0 | square/jirafy,square/jirafy |
dafec66dbce004242587c42a70b950ad4ff8f4e8 | app/assets/javascripts/countdown.js | app/assets/javascripts/countdown.js | if(document.getElementById("countdown-holder")){
var end_time = document.getElementById("countdown-holder");
var start_time = new Date(Date.now())
var start_time_plus_four_hours = start_time.setHours(start_time.getHours() + 4)
var start = moment.utc(start_time,"HH:mm:ss");
var end = moment.utc(end_time.innerH... | if(document.getElementById("countdown-holder")){
var end_time = document.getElementById("countdown-holder");
var end_time_string = moment.utc(end_time.innerHTML.trim()).format();
var start_time = new Date(Date.now())
var start_time_plus_four_hours = moment.utc(start_time.setHours(start_time.getHours() + 4)).for... | Add fully functional timer for objects | Add fully functional timer for objects
| JavaScript | mit | Petey101/summoners-universe,Petey101/summoners-universe,Petey101/summoners-universe |
6d7db94be7d772f35ee1c0b6c849963ba43856e6 | .eslintrc.js | .eslintrc.js | const package = require('./package.json')
module.exports = {
parser: 'babel-eslint',
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:react/recommended',
'plugin:flowtype/recommended',... | const package = require('./package.json')
module.exports = {
parser: 'babel-eslint',
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:react/recommended',
'plugin:flowtype/recommended',... | Check using inexactly object type. | :+1: Check using inexactly object type.
| JavaScript | mit | keik/gh,keik/gh,keik/gh |
d2dc7094b12150a0b54a7ce86511b3353edc1356 | src/app/reducers/counter.js | src/app/reducers/counter.js | import { INCREMENT_COUNTER, DECREMENT_COUNTER, NOTIFY_SEND, NOTIFY_RECEIVE } from '../constants/ActionTypes';
export default function counter(state = { count: 0 }, action) {
if (window.bgBadge && (action.type === NOTIFY_SEND || action.type === NOTIFY_RECEIVE)) {
window.bgBadge(state.count); return state;
}
... | import { INCREMENT_COUNTER, DECREMENT_COUNTER, NOTIFY_SEND, NOTIFY_RECEIVE } from '../constants/ActionTypes';
export default function counter(state = { count: 0 }, action) {
if (typeof window === 'object' && window.bgBadge && (action.type === NOTIFY_SEND || action.type === NOTIFY_RECEIVE)) {
window.bgBadge(state... | Fix reducers for node envirement | Fix reducers for node envirement
| JavaScript | mit | zalmoxisus/crossbuilder,jordanco/drafter-frontend,zalmoxisus/crossbuilder,zalmoxisus/browser-redux,zalmoxisus/browser-redux,zalmoxisus/crossbuilder,jordanco/drafter-frontend,jordanco/drafter-frontend,zalmoxisus/browser-redux |
5373e59ace93849511e4c01c7db4b0673038fb04 | Scripts/Default.js | Scripts/Default.js | var viewModel = null;
var LogError = null;
// This function is run when the app is ready to start interacting with the host application.
// It ensures the DOM is ready before updating the span elements with values from the current message.
$(document).ready(function () {
LogError = window.parent.LogError;
$(w... | var viewModel = null;
var LogError = null;
// This function is run when the app is ready to start interacting with the host application.
// It ensures the DOM is ready before updating the span elements with values from the current message.
$(document).ready(function () {
LogError = window.parent.LogError;
$(w... | Remove extra call to recalculateVisibility | Remove extra call to recalculateVisibility
| JavaScript | mit | stephenegriffin/MHA,stephenegriffin/MHA,stephenegriffin/MHA |
5d1c802e2b3ee7ae7471bd2f159af236f7674453 | app/javascript/packs/application.js | app/javascript/packs/application.js | /* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//... | /* eslint no-console:0 */
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
//... | Fix JS require for hotwired/turbo | Fix JS require for hotwired/turbo
| JavaScript | mit | SplitTime/OpenSplitTime,SplitTime/OpenSplitTime,SplitTime/OpenSplitTime |
13020fa88a87427511f9b073ae523659e55d5e2c | app/js/services/githubUrlService.js | app/js/services/githubUrlService.js | 'use strict';
angular.module('gisto.service.githubUrlBuilder', [], function ($provide) {
$provide.factory('githubUrlBuilderService', function (ghAPI, $filter, $rootScope) {
var githubFileNameFilter = $filter('githubFileName');
var publicGithubUrl = 'https://gist.github.com/';
var baseUrl =... | 'use strict';
angular.module('gisto.service.githubUrlBuilder', [], function ($provide) {
$provide.factory('githubUrlBuilderService', function (ghAPI, $filter, $rootScope, $routeParams) {
var githubFileNameFilter = $filter('githubFileName');
var publicGithubUrl = 'https://gist.github.com/';
... | FIX (revisions): Fix revision history link | FIX (revisions): Fix revision history link
| JavaScript | mit | Gisto/Gisto,Gisto/Gisto,shmool/Gisto,shmool/Gisto,Gisto/Gisto,shmool/Gisto,Gisto/Gisto |
91e7819ff6768b0143f57f62ca0067600965f66c | node_modules/http-duplex.js | node_modules/http-duplex.js |
module.exports = HTTPDuplex
var util = require('util')
, http = require('http')
, https = require('https')
, stream = require('stream')
util.inherits(HTTPDuplex, stream.Duplex)
function HTTPDuplex (protocol) {
stream.Duplex.call(this)
this._req = null
this._res = null
this._client = null
if (prot... |
module.exports = HTTPDuplex
var util = require('util')
, http = require('http')
, https = require('https')
, stream = require('stream')
util.inherits(HTTPDuplex, stream.Duplex)
function HTTPDuplex (protocol) {
stream.Duplex.call(this)
this._req = null
this._res = null
this._client = null
if (prot... | Allow piping in the response event | Allow piping in the response event
| JavaScript | apache-2.0 | request/core |
e946c2cf3c72d17998e13fa95bcb2b7b606e6c8c | server/middlewares/cross_origin_requests.js | server/middlewares/cross_origin_requests.js | // Allow serving from another domain or protocol
module.exports = function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization");
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE'... | // Allow serving from another domain or protocol
module.exports = function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Request-Method', '*');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept, Authorization');
res.header('... | Send 200 for cross-domain OPTIONS preflight requests. | Send 200 for cross-domain OPTIONS preflight requests. | JavaScript | mit | unixmonkey/caedence.net-2015,unixmonkey/caedence.net-2015 |
8119bd29f6502229966ff7e444bc0d589ab53ca8 | src/index.js | src/index.js | #!/usr/bin/env node
var program = require('commander');
var gitLabel = require('git-label');
program
.version('2.0.0')
.option('-a, --api <api>', 'API endpoint url')
.option('-t, --token <token>', 'API token')
.option('-r, --repo <repo>', 'repo name [username/repo]')
.option('-p, --packages <items>', 'comm... | #!/usr/bin/env node
var program = require('commander');
var gitLabel = require('git-label');
var pkg = require('../package.json');
program
.version(pkg.version)
.option('-a, --api <api>', 'API endpoint url')
.option('-t, --token <token>', 'API token')
.option('-r, --repo <repo>', 'repo name [username/r... | Add version dynamically from package.json | Add version dynamically from package.json
| JavaScript | mit | jasonbellamy/git-label-cli |
c5cd83cd78b03aac6999cf145c302722663e348b | lib/moment-strftime.js | lib/moment-strftime.js | (function () {
var moment, replacements;
if (typeof require !== "undefined" && require !== null) {
moment = require('moment');
} else {
moment = this.moment;
}
replacements = {
a: 'ddd',
A: 'dddd',
b: 'MMM',
B: 'MMMM',
d: 'DD',
e: 'D',
F: 'YYYY-MM-DD',
H: 'HH',
I:... | (function () {
var moment, replacements;
if (typeof require === "function") {
moment = require('moment');
} else {
moment = this.moment;
}
replacements = {
a: 'ddd',
A: 'dddd',
b: 'MMM',
B: 'MMMM',
d: 'DD',
e: 'D',
F: 'YYYY-MM-DD',
H: 'HH',
I: 'hh',
j: 'DDDD',... | Fix webpack critical dependency warning | Fix webpack critical dependency warning
(Closes #20) | JavaScript | mit | benjaminoakes/moment-strftime |
037e0360070f2819e06b8c5b06396ec43644e44a | src/intro.js | src/intro.js | /*!
* Handsontable @@version
* Handsontable is a JavaScript library for editable tables with basic copy-paste compatibility with Excel and Google Docs
*
* Copyright @@year Handsoncode sp. z o.o. <hello@handsontable.com>
* Licensed under the MIT license.
* http://handsontable.com/
*
* Date: @@timestamp
*/
/*jsl... | /*!
* Handsontable @@version
* Handsontable is a JavaScript library for editable tables with basic copy-paste compatibility with Excel and Google Docs
*
* Copyright (c) 2012-2014 Marcin Warpechowski
* Copyright @@year Handsoncode sp. z o.o. <hello@handsontable.com>
* Licensed under the MIT license.
* http://hand... | Bring Marcin back to the copyright info ;) | Bring Marcin back to the copyright info ;)
| JavaScript | mit | zhouxiaoping/handsontable,Cropster/handsontable,kirubz/handsontable,iamjakob/handsontable,IntexSoft/handsontable,fashionsun/handsontable,ilovezy/handsontable,littleforeastli/handsontable,SecureCloud-biz/handsontable,Arteaga2k/handsontable,kirubz/handsontable,robksawyer/handsontable,LeeKyoungIl/handsontable,beealone/han... |
0d189ca92bece6bc0a9c740c1d2871121822953f | experiments/projected_grid_vs_lod/js/shaders/DefaultShader.js | experiments/projected_grid_vs_lod/js/shaders/DefaultShader.js | /**
* @author jbouny / https://github.com/fft-ocean
*/
THREE.ShaderChunk["lod_pars_vertex"] = [
'vec4 computePosition( vec4 position )',
'{',
' return modelMatrix * position;',
'}'
].join('\n');
THREE.ShaderChunk["lod_vertex"] = [
'worldPosition = computePosition( worldPosition );',
].join('\n'); | /**
* @author jbouny / https://github.com/fft-ocean
*/
THREE.ShaderChunk["default_pars_vertex"] = [
'vec4 computePosition( vec4 position )',
'{',
' return modelMatrix * position;',
'}'
].join('\n');
THREE.ShaderChunk["default_vertex"] = [
'worldPosition = computePosition( worldPosition );',
].join('\... | Rename the default shader chunk to "default_*" | Rename the default shader chunk to "default_*"
| JavaScript | mit | jbouny/jbouny,jbouny/jbouny |
199c5d38b28adf44f5216e5aeb77b61e57ce7a2e | renderer-process/native-ui/ex-links-file-manager/file-manager.js | renderer-process/native-ui/ex-links-file-manager/file-manager.js | var fileMangerBtn = document.getElementById('open-file-manager');
var shell = require('electron').shell;
fileMangerBtn.addEventListener('click', function (event) {
shell.showItemInFolder('/');
});
| var fileMangerBtn = document.getElementById('open-file-manager');
var shell = require('electron').shell;
var os = require('os');
fileMangerBtn.addEventListener('click', function (event) {
shell.showItemInFolder(os.homedir());
});
| Use os.homedir in shell.showItemInFolder example | Use os.homedir in shell.showItemInFolder example
| JavaScript | mit | electron/electron-api-demos,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,blep/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,electron/electron-api-demos |
8d372ff0ad87177c575ab5f6bed7ba87da59fd73 | lib/licensure.js | lib/licensure.js | 'use strict';
var fs = require('fs');
var path = require('path');
var dir = require('node-dir');
var q = require('q');
var findLicenses = function () {
var licenses = [];
var deferred = q.defer();
var modulesDir = path.join(process.cwd(), 'node_modules');
dir.files(modulesDir, function (err, files)... | 'use strict';
var fs = require('fs');
var path = require('path');
var dir = require('node-dir');
var q = require('q');
var findLicenses = function () {
var deferred = q.defer();
var modulesDir = path.join(process.cwd(), 'node_modules');
dir.files(modulesDir, function (err, files) {
var licenses ... | Move licenses into better scope | Move licenses into better scope
| JavaScript | mit | maxdeviant/licensure |
6c198e658a8e07a7dcefa06532b5a10ec4901d8a | src/index.js | src/index.js | import _Store from './store';
export const Store = _Store;
//Export types
import _union from './types/union';
import _Any from './types/any';
import _Nil from './types/nil';
import _reference from './types/reference';
import _ObjectId from './types/object-id';
import _collection from './types/collection';
import _coll... | export { default as Store } from './store';
//Export types
export { default as union } from './types/union';
export { default as Any } from './types/any';
export { default as Nil } from './types/nil';
export { default as reference } from './types/reference';
export { default as ObjectId } from './types/object-id';
exp... | Fix direct exporting of imports | Fix direct exporting of imports
| JavaScript | mit | ddsol/redux-schema |
1225f307b3c1992210171cb9542772640511c4a8 | src/index.js | src/index.js | var Request = require('request-promise')
var Querystring = require('querystring')
var HuntMe = function(apiKey) {
this.config = {
createLink: "http://api.hnt.me/links?accessToken=" + apiKey
}
return this
}
HuntMe.prototype.createLink = function* createLink(link, platform) {
payload = {links: ... | var Request = require('request-promise')
var Querystring = require('querystring')
var HuntMe = function(apiKey) {
this.config = {
createLink: "http://api.hnt.me/links?accessToken=" + apiKey
}
return this
}
/**
* Creates new short link pointing to different links depending on the user device
* E... | Create link for different platforms | Create link for different platforms
| JavaScript | mit | naughtyspirit/huntme.js |
5a3d33be543d74832b3500964b1dfec310c6bbb2 | src/index.js | src/index.js | 'use strict'
import React from 'react'
import { render } from 'react-dom'
import { version } from '../package.json'
import redirectToHttps from './utils/https'
import { BigSpinner } from './components/Spinner'
import './styles/normalize.css'
import './styles/Fonts.scss'
import './styles/Main.scss'
import './styles... | 'use strict'
import React from 'react'
import { render } from 'react-dom'
import { version } from '../package.json'
import redirectToHttps from './utils/https'
import { BigSpinner } from './components/Spinner'
import './styles/normalize.css'
import './styles/Fonts.scss'
import './styles/Main.scss'
import './styles... | Fix loading using local gateway | Fix loading using local gateway
Fix #142 | JavaScript | mit | orbitdb/orbit-web,orbitdb/orbit-web,orbitdb/orbit-web |
e0a3216004f08b63c7a141c2e6bb153cbcc26eb4 | spec/javascripts/controllers/middleware/middleware_add_datasource_controller_spec.js | spec/javascripts/controllers/middleware/middleware_add_datasource_controller_spec.js | 'use strict';
describe('middlewareAddDatasourceController', function() {
var rootScope;
var $scope;
var $controller;
var $httpBackend;
var miqService;
beforeEach(module('ManageIQ'));
beforeEach(inject(function(_$httpBackend_, _$rootScope_, _$controller_, _miqService_) {
miqService = _miqService_;
... | 'use strict';
describe('middlewareAddDatasourceController', function() {
var rootScope;
var $scope;
var miqService;
var $controller;
beforeEach(module('ManageIQ'));
beforeEach(inject(function(_$httpBackend_, _$rootScope_, _$controller_, _miqService_) {
miqService = _miqService_;
rootScope = _$roo... | Fix failing jasmine tests due to 'controllerAs' syntax refactoring. | Fix failing jasmine tests due to 'controllerAs' syntax refactoring.
(cherry picked from commit 6e7371a89573caa23446df53a78879532433d2d0)
| JavaScript | apache-2.0 | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic |
ab1124a6297432d87eddf1cde10a2583e3bfc9a9 | app/components/user-avatar.js | app/components/user-avatar.js | import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
classNameBindings: ['small:avatar--small:avatar'],
userInitials: Ember.computed('userInitials', function () {
let name = this.get('name');
let arr = name.split(' ');
let initials = '';
if (arr.length >= 2) {
... | import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
classNameBindings: ['small:avatar--small:avatar'],
userInitials: Ember.computed('name', function () {
let name = this.get('name');
if (name) {
let arr = name.split(' ');
let initials = '';
if (arr.len... | Fix broken PR tab when loading page directly | Fix broken PR tab when loading page directly
This appears to have stopped working recently, but it does not appear
to be related to any changes within the component itself.
I'm adding a guard here as a stop-gap, though we'll need to track down
later what the data changes were that led to this cropping up in the
first... | JavaScript | mit | fotinakis/travis-web,travis-ci/travis-web,travis-ci/travis-web,travis-ci/travis-web,fotinakis/travis-web,fotinakis/travis-web,travis-ci/travis-web,fotinakis/travis-web |
875a6743106326c271dd097ce077d884c1a1b94f | lib/route/integration_api.js | lib/route/integration_api.js |
'use strict';
const
express = require('express'),
router = express.Router();
module.exports = passport => {
router.get(
'/',
passport.authenticate('bearer', { session: false }),
(req, res) => res.json({ok : true})
);
router.get(
'/report/allowance',
passport.authenticate('bearer', { ... |
'use strict';
const
express = require('express'),
router = express.Router();
module.exports = passport => {
router.all(
/.*/,
passport.authenticate('bearer', { session: false }),
(req, res, next) => {
if ( req.isAuthenticated() ) {
return next();
}
return res.status(401... | Use global auth check per Integration API handler | Use global auth check per Integration API handler
| JavaScript | mit | timeoff-management/application,timeoff-management/application |
a7eb91357baa4f87ee14f632c190e8b1f0346f81 | logology-v12/src/www/js/app/controllers/MenuViewController.js | logology-v12/src/www/js/app/controllers/MenuViewController.js | /* @flow */
"use strict";
import ViewController from "$LIB/ViewController";
import {createMenuView} from "$VIEWS/MenuView";
import navigationBar from "$WIDGETS/bars/navigation";
import widgetGroup from "$WIDGETS/group";
import glyph from "$WIDGETS/glyph";
import GCS from "$LIB/grandCentralStation";
import L from "$... | /* @flow */
"use strict";
import ViewController from "$LIB/ViewController";
import {createMenuView} from "$VIEWS/MenuView";
import navigationBar from "$WIDGETS/bars/navigation";
import widgetGroup from "$WIDGETS/group";
import glyph from "$WIDGETS/glyph";
import GCS from "$LIB/grandCentralStation";
import L from "$... | Use a hamburger icon instead of back icon | Use a hamburger icon instead of back icon
| JavaScript | mit | kerrishotts/Mastering-PhoneGap-Code-Package,kerrishotts/Mastering-PhoneGap-Code-Package,kerrishotts/Mastering-PhoneGap-Code-Package,kerrishotts/Mastering-PhoneGap-Code-Package |
c03ad2b9e769558c5a2da6ebe3452ba619919346 | src/start.js | src/start.js | (function (A, M, D) {
// Asynchronous Module Definition, if available
/*globals YUI: false, module: false, define: false*/
if (typeof module !== "undefined" && module.exports) {
module.exports = D;
} else if (typeof define === "function" && define.amd) {
define(D);
} else if (typeof YUI === "functi... | (function (A, M, D) {
// Asynchronous Module Definition, if available
/*globals YUI: false, module: false, define: false*/
if (typeof module !== "undefined" && module.exports) {
module.exports = D;
} else if (typeof define === "function" && define.amd) {
define(D);
} else if (typeof YUI === "functi... | Write documentation for Main Helio Object | Write documentation for Main Helio Object
| JavaScript | mit | erikroyall/Helio |
b681f54848f63fa0a97739209cd2366969e7fd59 | src/nconf.js | src/nconf.js | /**
* @package admiral
* @author Andrew Munsell <andrew@wizardapps.net>
* @copyright 2015 WizardApps
*/
var nconf = require('nconf')
.argv({
'h': {
describe: 'Host for Etcd',
alias: 'host',
default: '127.0.0.1'
},
'p': {
describe: 'Port f... | /**
* @package admiral
* @author Andrew Munsell <andrew@wizardapps.net>
* @copyright 2015 WizardApps
*/
var nconf = require('nconf')
.argv({
't': {
describe: 'Tunnel to use to connect to Fleet.',
alias: 'tunnel',
default: null
},
'tunnel-username': {... | Add options for connecting with Fleet | Add options for connecting with Fleet
| JavaScript | mit | andrewmunsell/admiral |
ed2b6f5991d9c6b85b9c67c318542406c6b992f6 | src/js/streams/stream-base.js | src/js/streams/stream-base.js | YUI.add("stream-base", function(Y) {
"use strict";
var StreamBase;
StreamBase = function() {
this.publish("tweet", {
preventable : false
});
};
StreamBase.prototype = {
_stream : null,
start : function() {
if(!this._stre... | YUI.add("stream-base", function(Y) {
"use strict";
var StreamBase;
StreamBase = function() {
this.publish("tweet", {
preventable : false
});
};
StreamBase.prototype = {
_stream : null,
start : function() {
if(!this._stre... | Debug logging on twitter stream disconnect | Debug logging on twitter stream disconnect
| JavaScript | mit | tivac/falco,tivac/falco |
081dc9cd262b63441ee4f0011b159bd1f2d6bb44 | src/Oro/Bundle/AddressBundle/Resources/public/js/region/collection.js | src/Oro/Bundle/AddressBundle/Resources/public/js/region/collection.js | define([
'backbone',
'routing',
'oroaddress/js/region/model'
], function(Backbone, routing, RegionModel) {
'use strict';
/**
* @export oroaddress/js/region/collection
* @class oroaddress.region.Collection
* @extends Backbone.Collection
*/
return Backbone.Collection.extend... | define([
'backbone',
'routing',
'oroaddress/js/region/model',
'underscore'
], function(Backbone, routing, RegionModel, _) {
'use strict';
/**
* @export oroaddress/js/region/collection
* @class oroaddress.region.Collection
* @extends Backbone.Collection
*/
return Backb... | Address form om frontend does not work | BB-1049: Address form om frontend does not work
| JavaScript | mit | ramunasd/platform,ramunasd/platform,trustify/oroplatform,trustify/oroplatform,Djamy/platform,trustify/oroplatform,hugeval/platform,orocrm/platform,ramunasd/platform,Djamy/platform,orocrm/platform,geoffroycochard/platform,geoffroycochard/platform,Djamy/platform,hugeval/platform,orocrm/platform,hugeval/platform,geoffroyc... |
43c6906584e4b9e05d59a17109c680cf6679138c | test/AnimationFrameTests.js | test/AnimationFrameTests.js | describe("AnimationFrameRequest", function() {
beforeAll(function() {
timeVirtualizer.virtualize();
});
it("triggers required number of times when FPS is set", function() {
var afCallback = jasmine.createSpy("AF callback");
requestAnimationFrame(afCallback);
timeVirtualizer.... | describe("AnimationFrameRequest", function() {
beforeAll(function() {
timeVirtualizer.virtualize();
});
it("triggers required number of times when FPS is set", function() {
var afCallback = jasmine.createSpy("AF callback");
requestAnimationFrame(afCallback);
timeVirtualizer.... | Add test for behaviour when FPS is not set | Add test for behaviour when FPS is not set
| JavaScript | mit | yanenkoa/jstimevirtualizer,yanenkoa/jstimevirtualizer |
7a52543e88388b903de1da4044465c338aec1751 | components/loadingBar/LoadingBar.js | components/loadingBar/LoadingBar.js | import React, { PureComponent } from 'react';
import cx from 'classnames';
import PropTypes from 'prop-types';
import Box from '../box';
import theme from './theme.css';
class LoadingBar extends PureComponent {
render() {
const { className, color, size, tint, ...others } = this.props;
const classNames = cx... | import React, { PureComponent } from 'react';
import cx from 'classnames';
import PropTypes from 'prop-types';
import withTheme from '../hoc/withTheme';
import Box from '../box';
import theme from './theme.css';
class LoadingBar extends PureComponent {
render() {
const { className, ...others } = this.props;
... | Add example usage of HoC | Add example usage of HoC
| JavaScript | mit | teamleadercrm/teamleader-ui |
1ed23ef757b119bab7ee99393d15858480bd6f06 | supersede.js | supersede.js | function Supersede (value) {
this._root = {}
this._value = value
}
Supersede.prototype.set = function (path, value) {
var node = this._root
for (var i = 0, I = path.length; i < I; i++) {
if (!node[path[i]]) {
node[path[i]] = {}
}
node = node[path[i]]
}
node... | function Supersede (value) {
this._root = { '.value': value }
}
Supersede.prototype.set = function (path, value) {
var node = this._root
for (var i = 0, I = path.length; i < I; i++) {
if (!node[path[i]]) {
node[path[i]] = {}
}
node = node[path[i]]
}
node['.valu... | Store default value in root. | Store default value in root.
| JavaScript | mit | bigeasy/supersede,bigeasy/supersede |
e5f6a8bca713c66f1f6a75b04d31c6eed1fdc9b0 | chinachu/index.js | chinachu/index.js | 'use strict'
var url = require('url');
function ChinachuClient(options) {
var urlObj = url.parse(options.url);
urlObj.auth = options.user + ':' + options.password;
if (!urlObj.path.endsWith('/')) {
urlObj.path += '/';
}
this.baseUrl = url.resolve(url.format(urlObj), urlObj.path + 'api/');
this.userAge... | 'use strict'
var url = require('url');
function ChinachuClient(options) {
var urlObj = url.parse(options.url);
urlObj.auth = options.user + ':' + options.password;
if (urlObj.path[urlObj.path.length - 1] !== '/') {
urlObj.path += '/';
}
this.baseUrl = url.resolve(url.format(urlObj), urlObj.path + 'api/'... | Fix test error on node v0.10.x | Fix test error on node v0.10.x
| JavaScript | mit | yuya-oc/hubot-chinachu,yuya-oc/hubot-chinachu |
cb8f05c6ca5a107f8e20b75a9f874a83493913c3 | server/server.js | server/server.js | var express = require('express');
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var path = require('path');
var morgan = require('morgan');
var colors = require('colors/safe');
app.use(morgan('dev'));
app.use(express.static('client'));
app.get('*', function (... | var express = require('express');
var app = express();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var path = require('path');
var morgan = require('morgan');
var colors = require('colors/safe');
app.use(morgan('dev'));
app.use(express.static('client'));
app.get('/api/test', fun... | Integrate socket and http routes | Integrate socket and http routes
| JavaScript | mit | SillySalamanders/Reactivity,SillySalamanders/Reactivity |
25b7b4e80b5b7029d9fb99292ec1ee5a65fb2066 | test/stop.js | test/stop.js | 'use strict';
var expect = require('expect');
var ioc = require('../');
describe('.stop()', function () {
it('should call stop on all active instances', function (done) {
var stopA = 0;
var app = ioc.create()
.singleton('a', function () {
return {stop: function () {
stopA++;
return... | 'use strict';
var expect = require('expect');
var ioc = require('../');
var P = typeof Promise === 'undefined' ? require('es6-promise').Promise : Promise;
describe('.stop()', function () {
it('should call stop on all active instances', function (done) {
var stopA = 0;
var app = ioc.create()
.singleton('... | Fix reference to undefined 'Promise' in tests (node v0.10.48) | Fix reference to undefined 'Promise' in tests (node v0.10.48)
| JavaScript | mit | aantthony/di-ioc,aantthony/di-ioc |
8bceb52e0a3571e474fead6c6b15c49f0cbb4bf5 | forum-web-app/src/app.js | forum-web-app/src/app.js | "use strict";
// src/app.js
import { Post } from "./post";
import { ui } from "./ui";
Post.findAll()
.then(ui.renderPosts)
.catch( (error) => console.error("Error: ", error));
| "use strict";
// src/app.js
import { Post } from "./post";
import { ui } from "./ui";
Post.findAll()
.then(ui.renderPosts)
.catch( (error) => {
console.error("Error: ", error)
});
User.findRecent()
.then(ui.renderUsers)
.catch( (error) => {
console.error("Error: ", error)
});
| Edit spaces for Post.findAll(). Add User.findRecent() | Edit spaces for Post.findAll(). Add User.findRecent()
| JavaScript | mit | var-bin/reactjs-training,var-bin/reactjs-training,var-bin/reactjs-training |
a88293f19221745318843d18c72ed0c132f4515f | config/index.js | config/index.js | 'use strict';
var env = process.env,
path = require('path');
module.exports = {
env : env.NODE_ENV,
isDevelopment: env.NODE_ENV !== 'production',
isProduction : env.NODE_ENV === 'production',
port: env.PORT || 5000,
eventbrite: {
hostname: 'www.eventbriteapi.com',
v... | 'use strict';
var env = process.env,
path = require('path');
module.exports = {
env : env.NODE_ENV,
isDevelopment: env.NODE_ENV !== 'production',
isProduction : env.NODE_ENV === 'production',
port: env.PORT || 5000,
eventbrite: {
token : env.EVENTBRITE_OAUTH_TOKEN,
... | Update config to use environment variables and change Eventbrite token | Update config to use environment variables and change Eventbrite token
| JavaScript | mit | ericf/enviroecon.org,ericf/enviroecon.org |
8240a533acceb80cd107838f5043e4a4b32a6b1a | example/index.js | example/index.js | const http = require("http")
const url = require("url")
const namor = require("namor")
const server = http.createServer((req, res) => {
const { query } = url.parse(req.url, true)
const payload = JSON.stringify(
{
generated_name: namor.generate({
words: query.words,
saltLength: query.saltLength,
sal... | const http = require("http")
const url = require("url")
const namor = require("namor")
const server = http.createServer((req, res) => {
const { query } = url.parse(req.url, true)
const payload = JSON.stringify(
{
generated_name: namor.generate({
words: query.words,
saltLength: query.saltLength,
sal... | Add cors header to example | Add cors header to example
| JavaScript | mit | jsonmaur/namor,jsonmaur/namor |
a4507633e71a08a70055f030da0a9cb8d126d4fb | test/test.js | test/test.js | var should = require('should'),
Zombie = require('zombie'),
path = require('path');
var browser = new Zombie(),
test_page_path = 'file://' + path.join(__dirname, 'index.html');
describe('Performs basic OuiBounce functionality', function() {
before(function(done) {
_this = this;
bro... | var should = require('should'),
Zombie = require('zombie'),
path = require('path');
var browser = new Zombie(),
test_page_path = 'file://' + path.join(__dirname, 'index.html');
describe('Performs basic OuiBounce functionality', function() {
before(function(done) {
_this = this;
bro... | Test that OuiBounce cookies get dropped | Test that OuiBounce cookies get dropped
| JavaScript | mit | DavideDaniel/ouibounce,sebastien-fauvel/ouibounce,carlsednaoui/ouibounce,smokymountains/ouibounce,dahal/ouibounce,olhapi/ouibounce,haveal/wbounce,avorio/ouibounce,haveal/wbounce,olhapi/ouibounce,carlsednaoui/ouibounce,trishasalas/ouibounce,gdseller/ouibounce,kevinweber/wbounce,DavideDaniel/ouibounce,anthony-legible/oui... |
a125431bfeb245869cc8a54be8dcdbecb69852af | js/app.js | js/app.js | var hexcolor = document.getElementById('hexcolor');
var clock = document.getElementById('clock');
var hexColor = document.getElementById('hex-color');
function colorClock() {
var time = new Date();
var day = time.getDay();
var hours = time.getHours().toString();
var minutes = time.getMinutes().toString();
va... | var hexcolor = document.getElementById('hexcolor');
var clock = document.getElementById('clock');
var hexColor = document.getElementById('hex-color');
function colorClock() {
var time = new Date();
var day = time.getDay();
var hours = time.getHours().toString();
var minutes = time.getMinutes().toString();
va... | Change string singlequotes to doublequotes | Change string singlequotes to doublequotes
| JavaScript | mit | tlystad24/hex-clock,tlystad24/hex-clock |
05c78dd370caa12832de04262535b3ff8064c178 | js/app.js | js/app.js | var dom = require('./src/dom.js');
var notify = require('./src/notify.js');
var end = 0;
var state = 0;
var message = '';
var timeoutID = null;
var output = dom('title, h1');
var icon = './noticon.png';
var notification;
function go() {
if(state) {
var diff = (end - Date.now()) / 1000;
if(diff >... | var dom = require('./src/dom.js');
var notify = require('./src/notify.js');
var end = 0;
var state = 0;
var message = '';
var timeoutID = null;
var output = dom('title, h1');
var icon = './noticon.png';
var notification;
function go() {
if(state) {
var diff = Math.round((end - Date.now()) / 1000);
... | Fix bug where it skips starting point | Fix bug where it skips starting point
| JavaScript | mit | erickmerchant/chrono,erickmerchant/chrono |
c91f99cfa96d1419ac4e3f69263d2c98a823bea2 | tests/tap.js | tests/tap.js | suite('Tap', function() {
test('Up and Down', function(done) {
prepare(target, 'tap', done);
target.dispatchEvent(new PointerEvent('pointerdown', {isPrimary: true, buttons: 1, pointerId: 1, bubbles: true}));
target.dispatchEvent(new PointerEvent('pointerup', {isPrimary: true, buttons: 1, pointerId: 1, bub... | suite('Tap', function() {
test('Up and Down', function(done) {
prepare(target, 'tap', done);
var fireTap = function() {
target.dispatchEvent(new PointerEvent('pointerdown', {isPrimary: true, buttons: 1, pointerId: 1, bubbles: true}));
target.dispatchEvent(new PointerEvent('pointerup', {isPrimary: ... | Fix test race condition with DOMContentLoaded | Fix test race condition with DOMContentLoaded
Test tap could somtimes fire before the event handlers were added
| JavaScript | bsd-3-clause | Polymer/PointerGestures |
e39127b59dc90b5aa5af6816013b4b01f4db3c73 | js/app.js | js/app.js | App = Ember.Application.create();
App.Router.map(function() {
this.resource('games');
this.resource('players', function() {
this.resource('player', { path: ':player_id' });
});
});
App.PlayersRoute = Ember.Route.extend({
model: function() {
var i = 0;
return $.getJSON('http://localhost:8080/').the... | App = Ember.Application.create();
App.Router.map(function() {
this.resource('games');
this.resource('players', function() {
this.resource('player', { path: ':player_id' });
});
});
App.PlayersRoute = Ember.Route.extend({
model: function() {
var i = 0;
return $.getJSON('http://localhost:8080/player... | Use new player API that describes complete object and is in good namespace | Use new player API that describes complete object and is in good namespace
| JavaScript | mit | rkbodenner/goboard,rkbodenner/goboard,rkbodenner/goboard |
c79eaaace01b41ed0eec27a3cc072cc1e996c0af | models/status.js | models/status.js | var util = require('util'),
events = require('events'),
_ = require('underscore');
function Status(data) {
this.data = {
sha: data.sha,
target_url: data.target_url,
description: data.description,
state: data.state
};
}
Status.prototype.setData = function (data) {
this.data = d... | function Status(data) {
this.data = {
sha: data.sha,
target_url: data.target_url,
description: data.description,
state: data.state
};
}
module.exports = Status;
| Remove unused methods from `Status` object | Remove unused methods from `Status` object
| JavaScript | mit | iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher,iFixit/pulldasher |
ad830203c20e7a732405791402229f83495324ed | src/components/Loans/OpenLoans/helpers/isOverridePossible/overridePossibleMessages.js | src/components/Loans/OpenLoans/helpers/isOverridePossible/overridePossibleMessages.js | export default [
{
message: 'loan is not renewable',
showDueDatePicker: true,
},
{
message: 'item is not loanable',
showDueDatePicker: true,
},
{
message: 'renewal date falls outside of date ranges in fixed loan policy',
showDueDatePicker: true,
},
{
message: 'items cannot be r... | export default [
{
message: 'loan is not renewable',
showDueDatePicker: true,
},
{
message: 'item is not loanable',
showDueDatePicker: true,
},
{
message: 'item is Declared lost',
showDueDatePicker: false,
},
{
message: 'renewal date falls outside of date ranges in fixed loan p... | Add 'declared lost' to overridable conditions list (UIU-1208) | Add 'declared lost' to overridable conditions list (UIU-1208)
| JavaScript | apache-2.0 | folio-org/ui-users,folio-org/ui-users |
1605443f208b3c518fd4964db60fa1f68ae971d3 | src/.eslintrc.js | src/.eslintrc.js | module.exports = {
parser: "@typescript-eslint/parser",
extends: [
"plugin:react/recommended",
"plugin:react-hooks",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint", // Disables rules from @typescript-eslint that would conflict with Prettier
"plugin:prettier/recommended" /... | module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["react-hooks"],
extends: [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint", // Disables rules from @typescript-eslint that would conflict with Prettier
"plugin:prettier/recommended"... | Add hooks to the right place | Add hooks to the right place
| JavaScript | agpl-3.0 | DrXyzzy/smc,sagemathinc/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,DrXyzzy/smc,DrXyzzy/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc |
3a89c67b2a5e35f62d1c6ea8d3f19d01d1978e47 | assets/js/main.js | assets/js/main.js | $('a[href^="#"]').on('click', function(event) {
var target = $(this.getAttribute('href'));
if (target.length) {
event.preventDefault();
$('html, body').stop().animate( {
scrollTop: target.offset().top
}, 800);
}
}); | /* SMOOTH SCROLL */
$('a[href^="#"]').on('click', function(event) {
var target = $(this.getAttribute('href'));
if (target.length) {
event.preventDefault();
$('html, body').stop().animate( {
scrollTop: target.offset().top
}, 800);
}
}); | Add a comment about smooth scroll | Add a comment about smooth scroll
| JavaScript | mit | ederchristian/ederchristian.github.io |
cd457a58614bdfd344c5de73e14ea25b20621573 | www/android/IntentPlugin.js | www/android/IntentPlugin.js | function IntentPlugin() {
'use strict';
}
IntentPlugin.prototype.getCordovaIntent = function(successCallback, failureCallback) {
'use strict';
return cordova.exec (
successCallback,
failureCallback,
"IntentPlugin",
"getCordovaIntent",
[]
);
};
IntentPlugin.prot... | function IntentPlugin() {
'use strict';
}
IntentPlugin.prototype.getCordovaIntent = function(successCallback, failureCallback) {
'use strict';
return cordova.exec (
successCallback,
failureCallback,
"IntentPlugin",
"getCordovaIntent",
[]
);
};
IntentPlugin.prot... | Fix to javascript file. Did not pass callback | Fix to javascript file. Did not pass callback
| JavaScript | mit | napolitano/cordova-plugin-intent,napolitano/cordova-plugin-intent,napolitano/cordova-plugin-intent |
309d400992b7a19ba5e5b79f219182b9510ce9e3 | lib/prepare/modules/index.js | lib/prepare/modules/index.js | var load = require('./load')
var filter = require('./filter')
var compact = require('./compact')
module.exports = function (criteria, cwd) {
return compact(
filter(
load(criteria.glob, cwd),
criteria,
cwd
)
)
}
| var load = require('./load')
var filter = require('./filter')
var compact = require('./compact')
var _ = require('lodash')
module.exports = function (criteria, cwd) {
return compact(_.flatten(_.map(criteria.testFiles, function (fileCriteria) {
return filter(
load(fileCriteria.file, cwd),
fileCriteria... | Update modules() to allow existing tests to pass. | Update modules() to allow existing tests to pass.
| JavaScript | mit | testdouble/teenytest,testdouble/teenytest |
9520feb3ff0da769b3f29281f48c71bf55a88c6d | test/walker-test.js | test/walker-test.js | var scraper = require('../devUtils/nephi-scraper'),
expect = require('chai').expect;
console.log('in test');
describe('Scraper', function () {
it('should be included as a module', function () {
expect(scraper).to.be.defined;
});
});
| var scraper = require('../devUtils/nephi-scraper'),
expect = require('chai').expect;
console.log('in test');
describe('Scraper', function () {
it('should export the parser', function () {
expect(scraper).to.be.defined;
expect(scraper.write).to.be.a('function');
expect(scraper.end).to.be.a('function'... | Verify that the parser is exported | Verify that the parser is exported
Did this step backwards, first I refactored to export then I wrote the
test to verify.
Verify that the scraper module exports a parser interface.
| JavaScript | mit | tylerpeterson/scripture-lottery,tylerpeterson/scripture-lottery |
d943938a7b190a8e28c9dc305bed81f201ad2317 | js/tabBarStyles.js | js/tabBarStyles.js | import { StyleSheet } from 'react-native';
import { MAIN_CERISE, WHITE, SECONDARY_GRAY } from './components/common/colors';
const TabBarStyles = StyleSheet.create({
label: {
color: WHITE,
},
tabBar: {
backgroundColor: SECONDARY_GRAY,
},
indicator: {
backgroundColor: MAIN_CERISE,
},
});
module.... | import { StyleSheet } from 'react-native';
import { PRIMARY, WHITE } from './components/common/colors';
const TabBarStyles = StyleSheet.create({
label: {
color: PRIMARY,
fontSize: 10,
fontWeight: 'bold',
},
tabBar: {
backgroundColor: WHITE,
},
indicator: {
backgroundColor: PRIMARY,
},
}... | Apply brand theme to navigation tab bar | Apply brand theme to navigation tab bar
| JavaScript | mit | justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client |
27919a1ce4d58c9266012221194096e623a276c8 | lib/or.js | lib/or.js | const _ = require('lodash');
const {gen: tcg} = require('testcheck');
const {invalidString} = require('./conform');
const explainData = require('./explainData');
const {gen} = require('./gen');
const describe = require('./util/describe');
function or(...predicates) {
const pairs = _.chunk(predicates, 2);
r... | const _ = require('lodash');
const {gen: tcg} = require('testcheck');
const {invalidString} = require('./conform');
const explainData = require('./explainData');
const {gen} = require('./gen');
const describe = require('./util/describe');
function or(...predicates) {
const pairs = _.chunk(predicates, 2);
r... | Convert explain to yield function | Convert explain to yield function
| JavaScript | mit | mrijk/speculaas |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.