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 |
|---|---|---|---|---|---|---|---|---|---|
ee4ffa6511d0d2a96487e7d3a0f4eb7d14891282 | packages/teacups/public/services/teacups.js | packages/teacups/public/services/teacups.js | 'use strict';
angular.module('mean.teacups').factory('Teacups', [
'$resource',
function($resource) {
return $resource('teacups/:teacupId', {
teacupId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]); | 'use strict';
angular.module('mean.teacups').factory('Teacups', [
'$resource',
function($resource) {
return $resource('teacups/:teacupId', {
teacupId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]);
angular.module('mean.teacups').... | Revert "placed angularjs factory for rooms in seperate file." | Revert "placed angularjs factory for rooms in seperate file."
This reverts commit 97b997ea986f1d48c3408d310a23bd008745e7a0.
| JavaScript | mit | StarTrackDevelopment/TeaCup,StarTrackDevelopment/TeaCup,StarTrackDevelopment/TeaCup |
c2400b1dd1febefc3d36e9241dacfd020bcb19d3 | packages/test-studio/src/dashboardConfig.js | packages/test-studio/src/dashboardConfig.js | export default {
widgets: [
{name: 'sanity-tutorials', layout: {width: 'full'}},
{name: 'document-list'},
{name: 'document-list', options: {title: 'Last edited', order: '_updatedAt desc'}},
{name: 'document-list', options: {title: 'Last created books', types: ['book']}},
{name: 'project-users'},
... | export default {
widgets: [
{name: 'sanity-tutorials', layout: {width: 'full'}},
{name: 'document-list'},
{name: 'document-list', options: {title: 'Last edited', order: '_updatedAt desc'}},
{name: 'document-list', options: {title: 'Last created books', types: ['book']}},
{name: 'project-users'},
... | Configure up non-existing widget in test-studio | [test-studio] Configure up non-existing widget in test-studio
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
f4091965ce51d9c99cf16ae09b1709c1023c88a4 | demo/src/App.js | demo/src/App.js | import React from 'react'
import Config from '../../src/ui-components/web/Config'
/**
* Sample that has a function to enable the overlay.
*/
const App = ({ enableOverlay }) => (
<div>
<input
onFocus={enableOverlay}
type='search'
className='top-search-text'
id='top-search-text'
va... | import React from 'react'
/**
* Sample that has a function to enable the overlay.
*/
const App = ({ enableOverlay }) => (
<div>
<input
onFocus={enableOverlay}
type='search'
className='top-search-text'
id='top-search-text'
value='Search'
readOnly
/>
</div>
)
export def... | Remove config (already declared in index) | Remove config (already declared in index)
| JavaScript | mit | sajari/sajari-sdk-react,sajari/sajari-sdk-react |
b995423983ede6f874febcd55987f9b141d7f8d3 | lib/configs/node.js | lib/configs/node.js | module.exports = {
env: {
node: true
},
plugins: [
'node'
],
rules: require('./rules/node')
};
| module.exports = {
env: {
es6: true,
node: true
},
plugins: [
'node'
],
rules: require('./rules/node')
};
| Add `es6` environment to NodeJS | fix: Add `es6` environment to NodeJS
| JavaScript | mit | WordPress-Coding-Standards/eslint-plugin-wordpress,ntwb/eslint-plugin-wordpress |
e4455716919c4bd7052f10fc877eb74c212f8cc3 | lib/local-docker.js | lib/local-docker.js |
var Docker = require('dockerode');
function localDocker() {
if (process.env.DOCKER_HOST) {
var split = /tcp:\/\/([0-9.|localhost]+):([0-9]+)/g.exec(process.env.DOCKER_HOST);
opts = {
host: split[1],
protocol: 'http',
port: split[2],
timeout: 5000
};
} else {
opts = {
... |
var Docker = require('dockerode');
var fs = require('fs');
var path = require('path');
var instantiateDocker = function() {
var split;
var opts = {}
if (process.env.DOCKER_HOST) {
split = /tcp:\/\/([0-9.]+):([0-9]+)/g.exec(process.env.DOCKER_HOST);
if (process.env.DOCKER_TLS_VERIFY === '1') {
op... | Support for docker TLS and boot2docker 1.3.0. | Support for docker TLS and boot2docker 1.3.0.
| JavaScript | artistic-2.0 | nearform/nscale-local-analyzer |
a33d5b99241254a4d6554aadfed0d322bcb1e0fd | lib/measure-time.js | lib/measure-time.js | var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-typography/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-typography/tachyons-typography.min.css', 'utf8')
var mod... | var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-typography/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-typography/tachyons-typography.min.css', 'utf8')
var mod... | Add site footer to each documentation generator | Add site footer to each documentation generator
| JavaScript | mit | fenderdigital/css-utilities,pietgeursen/pietgeursen.github.io,matyikriszta/moonlit-landing-page,tachyons-css/tachyons,fenderdigital/css-utilities,topherauyeung/portfolio,cwonrails/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,getfrank/tachyons |
770206d1ace546b13a3fc4bac949486f860e4197 | lib/node/request.js | lib/node/request.js | 'use strict';
var request = require('request'), undef;
module.exports = function(options) {
// Prepare options
options.method = options.method.toUpperCase();
options.uri = options.uri.toString();
// Do we have any callback, or is this a fire-and-forgot request?
var hasCallback = !!options.on... | 'use strict';
var request = require('request');
module.exports = function(options) {
// Prepare options
options.method = options.method.toUpperCase();
options.uri = options.uri.toString();
// Do we have any callback, or is this a fire-and-forgot request?
var hasCallback = !!options.onComplete;
... | Use 'undefined' instead of setting an undefined variable | Use 'undefined' instead of setting an undefined variable
| JavaScript | mit | rexxars/imboclient-js,imbo/imboclient-js,rexxars/imboclient-js,rexxars/imboclient-js,imbo/imboclient-js,imbo/imboclient-js |
84fcb4e32a5b38a2210b60bfb9f5ed857e1ac966 | client/.storybook/main.js | client/.storybook/main.js | const paths = require("../config/paths")
module.exports = {
stories: [
"../stories/*.stories.mdx",
"../stories/*.stories.@(js|jsx|ts|tsx)"
],
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
webpackFinal: async(config, { configType }) => {
// `configType` has a value of 'DEVELOPME... | const paths = require("../config/paths")
module.exports = {
stories: [
"../stories/*.stories.mdx",
"../stories/*.stories.@(js|jsx|ts|tsx)"
],
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
webpackFinal: async (config, { configType }) => {
// `configType` has a value of 'DEVELOPM... | Use our top level postcss version in storybook | Use our top level postcss version in storybook
Storybook generally updates late which causes build failures
| JavaScript | mit | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet |
2b010d85ca637526b184c0a781d0f8adc9fcc408 | driver/CardUseStruct.js | driver/CardUseStruct.js |
class CardUseStruct {
constructor(from, card) {
this.from = from;
this.card = card;
this.to = [];
this.target = null;
}
toJSON() {
return {
from: this.from.seat(),
card: this.card.toJSON(),
to: this.to.length > 0 ? this.to.map(player => player.seat()) : undefined,
target: this.target ? this.... |
class CardUseStruct {
/**
*
* @param {Player} from
* @param {Card} card
*/
constructor(from, card) {
this.from = from;
this.card = card;
this.to = [];
this.target = null;
}
toJSON() {
return {
from: this.from.seat(),
card: this.card.toJSON(),
to: this.to.length > 0 ? this.to.map(player... | Add a simple procedure of using a card | Add a simple procedure of using a card
| JavaScript | agpl-3.0 | takashiro/sanguosha-server,takashiro/sanguosha-server |
e09a922f0b5558ec17bdf9fc9efd1fd73162c6f1 | src/scripts/student-profile/js/react-index.js | src/scripts/student-profile/js/react-index.js | import React from 'react';
import ReactDOM from 'react-dom';
import ContactTable from './components/student-contacts/ContactTable';
window.fetch('/ws/schema/query/com.icsd.sp.overview.contacts', {
credentials: 'include',
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': '... | import React from 'react';
import ReactDOM from 'react-dom';
import ContactTable from './components/student-contacts/ContactTable';
import General from './components/general/General';
const contactsFetch = window.fetch('/ws/schema/query/com.icsd.sp.overview.contacts', {
credentials: 'include',
method: 'post',
... | Use Promise.all() load PowerQuery results in new react version. | Use Promise.all() load PowerQuery results in new react version.
| JavaScript | mit | IronCountySchoolDistrict/student-profile,IronCountySchoolDistrict/student-profile |
ce211aeac22f948ec0a9f63e2c78cba270c7c209 | server.js | server.js | var sql = require('msnodesql');
// Change the connectionString. Example
// "Driver={SQL Server Native Client 11.0};Server=tcp:?????.database.windows.net,1433;Database=????;Uid=?????@?????;Pwd=?????";
var connectionString = "";
var testQuery = "SELECT 1";
if(connectionString == "") {
console.log("This script cannot r... | var sql = require('msnodesql');
// Change the connectionString. Example
// "Driver={SQL Server Native Client 11.0};Server=tcp:?????.database.windows.net,1433;Database=????;Uid=?????@?????;Pwd=?????";
var connectionString = "";
var testQuery = "SELECT 1";
if(connectionString == "") {
console.log("This script cannot r... | Print node version and environment architecture | Print node version and environment architecture
| JavaScript | mit | jorgeazevedo/node-sqlserver-unofficial |
8e5ec17fd2973b8e5e5c4fe43d1421ca1e5e8cd7 | server.js | server.js |
/**
* Simple server to serve builds
*/
const express = require("express"),
path = require("path"),
webpack = require("webpack"),
app = express(),
assert = require("assert");
require('dotenv').config();
assert(process.env.PORT, "Specify a PORT in a .env");
app.use(express.static(path.join(__dirname... |
/**
* Simple server to serve builds
*/
const express = require("express"),
path = require("path"),
webpack = require("webpack"),
app = express(),
assert = require("assert");
require('dotenv').config();
assert(process.env.PORT, "Specify a PORT in a .env");
app.use(express.static(path.join(__dirname... | Build on deploy (for heroku) | Build on deploy (for heroku)
| JavaScript | mit | Spensaur-K/mlfq-viz,Spensaur-K/mlfq-viz,Spensaur-K/mlfq-viz |
802e4684b8df1b494b18ea58d9b5ab10d2cbfa0a | packages/react-fast-refresh/package.js | packages/react-fast-refresh/package.js | Package.describe({
name: 'react-fast-refresh',
version: '0.1.1',
summary: 'Automatically update React components with HMR',
documentation: 'README.md',
devOnly: true
});
Npm.depends({
'react-refresh': '0.9.0',
semver: '7.3.4'
});
Package.onUse(function (api) {
api.export('ReactFastRefre... | Package.describe({
name: 'react-fast-refresh',
version: '0.1.1',
summary: 'Automatically update React components with HMR',
documentation: 'README.md',
devOnly: true
});
Npm.depends({
'react-refresh': '0.9.0',
semver: '7.3.4'
});
Package.onUse(function (api) {
api.export('ReactFastRefre... | Fix loading react-fast-refresh in cordova | Fix loading react-fast-refresh in cordova
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor |
1639dd3609ad81346423d1699eb31e97f39b54eb | engine/canIUseParser.js | engine/canIUseParser.js | import cache from './cache.js';
export default class CanIUseParser {
results = {};
url = 'https://raw.githubusercontent.com/Fyrd/caniuse/master/data.json';
majorVersion(version) {
return parseInt(version.substr(0, version.indexOf('.')), 10);
}
read() {
return cache.readJson(this.url)
.then((r... | import cache from './cache.js';
export default class CanIUseParser {
results = {};
url = 'https://raw.githubusercontent.com/Fyrd/caniuse/master/data.json';
read() {
return cache.readJson(this.url)
.then((results) => {
this.results = results;
});
}
}
| Remove spurious function from CanIUseParser class | Remove spurious function from CanIUseParser class
| JavaScript | apache-2.0 | mozilla/platatus,mozilla/platatus |
69898cd06cc28bd040421db65bf52c4f7f4eeaba | examples/App.js | examples/App.js | import { AppRegistry } from 'react-native'
import Basic from './components/Basic/'
// import Dynamic from './components/Dynamic/'
// import Phone from './components/Phone/'
// import Swiper from './components/Swiper/'
// import SwiperNumber from './components/SwiperNumber/'
// import LoadMinimal from './components/Load... | import { AppRegistry } from 'react-native'
import Basic from './components/Basic/'
// import Dynamic from './components/Dynamic/'
// import LoadMinimal from './components/LoadMinimal/'
// import Phone from './components/Phone/'
// import PhotoView from './components/PhotoView/' // not working
// import Swiper from './c... | Set Basic example as default example to test | Set Basic example as default example to test
| JavaScript | mit | leecade/react-native-swiper,kjkta/react-native-swiper |
e734776a35430ab124cee57bc21ef34f61a7cba0 | src/dq.js | src/dq.js | (function() {
const domQuery = (function () {
function $(selector) {
let collection = ((typeof selector === 'string') ? document.querySelectorAll(selector) :
(typeof selector === 'object' && (selector.nodeType === 1 || selector.nodeType === 9)) ? [selector] : [] ),
instance = new DQ(c... | (function() {
const domQuery = (function () {
function $(selector) {
let collection = (!selector ? [] :
(typeof selector === 'string') ? document.querySelectorAll(selector) :
(selector instanceof DQ) ? selector :
(typeof selector === 'object' && (selector.nodeType === 1 ... | Allow factories to call factories, allow document, allow window, allow empty selector | initial-push: Allow factories to call factories, allow document, allow window, allow empty selector
| JavaScript | mit | tbremer/collector,tbremer/collector |
49b47dad90e6faecdc4f6d6641633a9ac6d80a45 | app/components/ilios-calendar-event.js | app/components/ilios-calendar-event.js | /* global moment */
import Ember from 'ember';
import { default as CalendarEvent } from 'el-calendar/components/calendar-event';
export default CalendarEvent.extend({
viewType: 'day',
event: null,
classNameBindings: [':event', ':event-pos', ':ilios-calendar-event', 'event.eventClass', 'viewType'],
toolTipMessa... | /* global moment */
import Ember from 'ember';
import layout from '../templates/components/ilios-calendar-event';
import { default as CalendarEvent } from 'el-calendar/components/calendar-event';
export default CalendarEvent.extend({
layout: layout,
viewType: 'day',
event: null,
classNameBindings: [':event', '... | Set layout explicitly for the overridden ilios-calendar-component | Set layout explicitly for the overridden ilios-calendar-component
| JavaScript | mit | djvoa12/frontend,djvoa12/frontend,gabycampagna/frontend,thecoolestguy/frontend,dartajax/frontend,thecoolestguy/frontend,stopfstedt/frontend,dartajax/frontend,stopfstedt/frontend,jrjohnson/frontend,jrjohnson/frontend,gabycampagna/frontend,gboushey/frontend,gboushey/frontend,ilios/frontend,ilios/frontend |
f9202618a958f5319a7d04f710bab17049a18ebc | webpack/dev.config.js | webpack/dev.config.js | import path from 'path';
import webpack from 'webpack';
const port = 3000;
const entry = [
`webpack-dev-server/client?http://localhost:${port}`,
'webpack/hot/only-dev-server'
];
export default {
devtool: 'inline-source-map',
entry: {
background: [ path.join(__dirname, '../src/browser/extension/background/... | import path from 'path';
import webpack from 'webpack';
const port = 3000;
const entry = [
`webpack-dev-server/client?http://localhost:${port}`,
'webpack/hot/only-dev-server'
];
export default {
devtool: 'eval-cheap-module-source-map',
entry: {
background: [ path.join(__dirname, '../src/browser/extension/... | Use eval-cheap-module-source-map in webpack dev mode | Use eval-cheap-module-source-map in webpack dev mode
| JavaScript | mit | zalmoxisus/crossbuilder,zalmoxisus/crossbuilder,jordanco/drafter-frontend,zalmoxisus/browser-redux,jordanco/drafter-frontend,jordanco/drafter-frontend,zalmoxisus/browser-redux,zalmoxisus/crossbuilder,zalmoxisus/browser-redux |
ff534219e735070dc1b40325a7ad4416645c46bb | mods/lowtierrandom/formats-data.js | mods/lowtierrandom/formats-data.js | exports.BattleFormatsData = {
kangaskhanmega: {
randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"],
randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","doubleedge","poweruppunch","drainpunch","crunch","protect"],
tier: "Uber"
},
mawilemega: {
rand... | exports.BattleFormatsData = {
kangaskhanmega: {
randomBattleMoves: ["fakeout","return","suckerpunch","earthquake","poweruppunch","crunch"],
randomDoubleBattleMoves: ["fakeout","return","suckerpunch","earthquake","doubleedge","poweruppunch","drainpunch","crunch","protect"],
tier: "Uber"
},
pinsirmega: {
rando... | Update Low Tier Random Battle | Update Low Tier Random Battle | JavaScript | mit | yashagl/pokecommunity,yashagl/pokemon-showdown,SkyeTheFemaleSylveon/Mudkip-Server,yashagl/pokecommunity,lFernanl/Mudkip-Server,lFernanl/Mudkip-Server,yashagl/yash-showdown,TheManwithskills/DS,MayukhKundu/Mudkip-Server,TheManwithskills/Server,yashagl/yash-showdown,yashagl/pokemon,yashagl/pokemon,SkyeTheFemaleSylveon/Mud... |
93bf3a54321d850ef0e8834344a692cd39feb7e2 | examples/callforth.js | examples/callforth.js | var Forth = require("../forth"),
forth = Forth.go ( function start (callforth) {
setTimeout(function () {
callforth.report(null, Date.now());
callforth.report(null, Date.now());
callforth.report(null, Date.now());
if (Date.now() % 3) {
callforth ( null, [1, 2, 3] );
} else {
callforth ( new ... | var Forth = require("../forth"),
forth = Forth.go ( function start (callforth) {
var result = [1, 2, 3];
callforth.report(null, Date.now());
callforth.report(null, Date.now());
callforth.report(null, Date.now());
if (Date.now() % 3) {
callforth ( null, result );
result.push(4); // NOTE: callforth is... | Support multiple import methods and add Forth.pass. | Support multiple import methods and add Forth.pass.
| JavaScript | mit | jcmoore/forthjs |
5c33e1d5f679a398fecb42671c769828dfe8e2a9 | lib/models/ljs-request.js | lib/models/ljs-request.js | var LJSRequest = function(req, app) {
this.req = req;
this.body = req.body;
this.app = app;
var paths = req.url.split("/");
this.collectionName = paths[1];
};
LJSRequest.prototype.schemeAndAuthority = function() {
return this.req.protocol + '://' + this.req.get('Host');
};
LJSRequest.prototyp... | function LJSRequest(req, app) {
this.req = req;
this.body = req.body;
this.app = app;
var paths = req.url.split("/");
this.collectionName = paths[1];
};
LJSRequest.prototype.schemeAndAuthority = function() {
return this.req.protocol + '://' + this.req.get('Host');
};
LJSRequest.prototype.base... | Change constructor to improve node exceptions . | Change constructor to improve node exceptions .
| JavaScript | mit | globocom/loopback-jsonschema,backstage/loopback-jsonschema |
b668f6099c5edeb19c92ff4a6f63d95d40b478d6 | www/js/core/directives/datefield.directive.js | www/js/core/directives/datefield.directive.js | (function () {
"use strict";
angular.module('orange')
.directive('datefield', datefield);
datefield.$inject = ['$cordovaDatePicker'];
function datefield($cordovaDatePicker) {
return {
scope: {
'maxDateNow': '='
},
require: 'ngModel'... | (function () {
"use strict";
angular.module('orange')
.directive('datefield', datefield);
datefield.$inject = ['$cordovaDatePicker'];
function datefield($cordovaDatePicker) {
return {
scope: {
//allow dates in the future as per request
// 'maxDateNow': '='
... | Change to allow the date picker to move past the current date. | Change to allow the date picker to move past the current date. | JavaScript | apache-2.0 | amida-tech/orange,amida-tech/orange,amida-tech/orange |
d4b90e12ca34fe500f11d40ac210ec9440216762 | src/assets/scripts/jquery.overlay_closer.js | src/assets/scripts/jquery.overlay_closer.js | // JavaScript Document
// Scripts written by YOURNAME @ YOURCOMPANY
// close the overlay and any associated elements when overlay-closer is clicked
jQuery(".overlay-closer").click(function(e) {
var closing_overlay = jQuery("[data-overlay][aria-hidden=false]").data("overlay");
jQuery("[data-overlay=" + closin... | // JavaScript Document
// Scripts written by YOURNAME @ YOURCOMPANY
// close the overlay and any associated elements when overlay-closer is clicked
jQuery(".overlay-closer").click(function(e) {
var closing_overlay = jQuery("[data-overlay][aria-hidden=false]").data("overlay");
jQuery("[data-overlay=" + closin... | Enable esc to close overlay | Enable esc to close overlay
| JavaScript | mit | revxx14/new-site,JacobDB/new-site,JacobDB/new-site,JacobDB/new-site,revxx14/new-site |
92e2f52a1246c658b5f1eb71fd2f24d7025985e3 | actions/userCreate.js | actions/userCreate.js | exports.action = {
name: 'userCreate',
description: 'Creates a User',
version: 1,
inputs: {
required: [ 'name', 'organizationId', 'email', 'password', 'admin' ],
optional: []
},
outputExample: {},
run: function (api, connection, next) {
var id = api.mongoose.Types.Ob... | exports.action = {
name: 'userCreate',
description: 'Creates a User',
version: 1,
inputs: {
required: [ 'name', 'organizationId', 'email', 'password', 'admin' ],
optional: []
},
outputExample: {},
run: function (api, connection, next) {
var id = api.mongoose.Types.Ob... | Fix potential problem with sending admin value | Fix potential problem with sending admin value
Parses a true value as a boolean true value and anything else as false
| JavaScript | mit | printerSystemCSI210/api-server |
85e1e2f52acb6ad9e272b0209aeb3fdb6d9a0c1a | kolibri/plugins/facility/assets/src/modules/classAssignMembers/index.js | kolibri/plugins/facility/assets/src/modules/classAssignMembers/index.js | import { SET_MODAL } from '../shared';
import { assignCoachesToClass, enrollLearnersInClass } from './actions';
function defaultState() {
return {
class: {},
facilityUsers: [],
modalShown: false,
};
}
export default {
namespaced: true,
state: defaultState(),
mutations: {
SET_STATE(state, pay... | import { SET_MODAL } from '../shared';
import { assignCoachesToClass, enrollLearnersInClass } from './actions';
function defaultState() {
return {
class: {},
facilityUsers: [],
totalPageNumber: 0,
totalLearners: 0,
modalShown: false,
};
}
export default {
namespaced: true,
state: defaultSt... | Update default state for classAssignMembers to better support pagination | Update default state for classAssignMembers to better support pagination
| JavaScript | mit | learningequality/kolibri,learningequality/kolibri,learningequality/kolibri,learningequality/kolibri |
98d0b442831de29e790491a0a9495f2e95aacd17 | main.js | main.js | const electron = require('electron')
const app = electron.app // Module to control application life.
const BrowserWindow = electron.BrowserWindow // Module to create native browser window.
const nativeImage = require('electron').nativeImage
require('./main-process/file-selection')
let mainWindow
function createWindow... | const electron = require('electron')
const app = electron.app // Module to control application life.
const BrowserWindow = electron.BrowserWindow // Module to create native browser window.
const nativeImage = require('electron').nativeImage
require('./main-process/file-selection')
let mainWindow
function createWindow... | Stop opening devtools on app launch | Stop opening devtools on app launch
| JavaScript | agpl-3.0 | briandk/transcriptase,briandk/transcriptase |
729e8b5c30c4647a88f2711cb1a16d831c722d94 | mesh.js | mesh.js | var Vector = require('./vector.js');
/**
* @constructor
* @this {Mesh}
* @param {string} name
* @param {Array.<Vertex>} vertices
* @param {Array.<{edge: Array.<number>, color: string}>} edges
*/
function Mesh(name, vertices, faces){
this.name = name;
this.vertices = vertices;
this.faces = faces;
... | var Vector = require('./vector.js');
/**
* @constructor
* @this {Mesh}
* @param {string} name
* @param {Array.<Vertex>} vertices
* @param {Array.<{edge: Array.<number>, color: string}>} edges
*/
function Mesh(name, vertices, faces){
this.name = name;
this.vertices = vertices;
this.faces = faces;
... | Add face normal and centroid methods | Add face normal and centroid methods
| JavaScript | mit | ebenpack/linearalgea.js,ebenpack/linearalgea.js |
3506d505417d5ec2b9dd64703811c31538dc0154 | src/js/editing/History.js | src/js/editing/History.js | define(['summernote/core/range'], function (range) {
/**
* History
* @class
*/
var History = function () {
var stack = [], stackOffset = 0;
var makeSnapshot = function ($editable) {
var editable = $editable[0];
var rng = range.create();
return {
contents: $editable.html(... | define(['summernote/core/range'], function (range) {
/**
* History
* @class
*/
var History = function () {
var stack = [], stackOffset = 0;
var makeSnapshot = function ($editable) {
var editable = $editable[0];
var rng = range.create();
var emptyBookmark = {s: {path: [0], offset:... | Add emptyBookmark and fix bugs in history module | Add emptyBookmark and fix bugs in history module
| JavaScript | mit | AshDevFr/winternote,summernote/summernote,bebeeteam/summernote,bebeeteam/summernote,AshDevFr/winternote,bebeeteam/summernote,AshDevFr/winternote,summernote/summernote,summernote/summernote |
cafa92b9f5919d5afd544044aabeae9fef576eb7 | app/js/controllers.js | app/js/controllers.js | 'use strict';
/* Controllers */
angular.module('myApp.controllers', []).
controller('HomeCtrl', [function() {
}]);
| 'use strict';
/* Controllers */
angular.module('myApp.controllers', []).
controller('HomeCtrl', ['$scope', function($scope) {
SC.get('/users/thunder-hustle/favorites', { limit: 20 }, function(tracks) {
$scope.$apply(function() {
if (tracks.length > 1) {
$scope.likes = tracks;
} e... | Access track favorites on SoundCloud | Access track favorites on SoundCloud
* Use SoundCloud API call to get top 20 favorites
* Store favorites on scope for access in view
| JavaScript | mit | wh1tney/thunderhustle,wh1tney/thunderhustle,wh1tney/thunderhustle |
59b5bf97b56531ba153384b62897845cfa2e0b52 | test/index.js | test/index.js | require('./board-test.js');
require('./game-test.js');
require('./light-test.js');
require('./levels-test.js');
require('./score-test.js');
require('./messages-test.js');
require('./next-move-test.js');
require('./end-pattern-test.js');
require('./neighbor-coords-test.js');
require('./relative-coords-test.js');
| require('./board-test.js');
require('./game-test.js');
require('./light-test.js');
require('./levels-test.js');
require('./score-test.js');
require('./messages-test.js');
require('./next-move-test.js');
require('./neighbor-coords-test.js');
require('./relative-coords-test.js');
| Remove reference to end-pattern test | Remove reference to end-pattern test
| JavaScript | mit | plato721/lights-out,plato721/lights-out |
1581a18a7d9d9aca2fce20213e818e0f9a62e7b7 | src/su_safeframe/SKUI/js/utilities.js | src/su_safeframe/SKUI/js/utilities.js | /*******************************************************************************
*
* Utilities
*
******************************************************************************/
Function.prototype.get_typename = function() {
if (Function.prototype.name === undefined) {
var funcNameRegex = /function\s([^(]{1,... | /*******************************************************************************
*
* Utilities
*
******************************************************************************/
Function.prototype.get_typename = function() {
if (Function.prototype.name === undefined) {
var funcNameRegex = /function\s([^(]{1,... | Fix IE8 issue with missing trim() method. | Fix IE8 issue with missing trim() method.
| JavaScript | mit | SketchUp/sketchup-safe-frames,SketchUp/sketchup-safe-frames,SketchUp/sketchup-safe-frames |
2cd7a27940507bdda42be9649f6d35890218547d | gulp/tasks/default.js | gulp/tasks/default.js | var gulp = require('gulp');
var config = require('../config');
gulp.task('watch', function() {
gulp.watch(config.css.watch, ['css']);
gulp.watch(config.coffeelint.watch, ['coffeelint']);
gulp.watch(config.browserify.app.watch, ['browserify-app']);
gulp.watch(config.brow... | var gulp = require('gulp');
var config = require('../config');
// Note that it would be simpler to just remove the './' from the definitions
// of `src` and `dest` in config.js, but that broke other tasks. Rather than
// figure out how to fix those other tasks, we simply make the change locally.
function gulpWatch(wat... | Fix gulp.watch configuration so new/deleted files trigger rebuild | Fix gulp.watch configuration so new/deleted files trigger rebuild
| JavaScript | mit | concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models |
db9f4e4e7cf58b097cdfd185b986cc427d4461c8 | test/index.js | test/index.js | 'use strict';
var browserify = require('browserify');
var streamToPromise = require('stream-to-promise');
var expect = require('chai').expect;
describe('proxyquire-universal', function () {
function bundle (scenario) {
return streamToPromise(browserify()
.plugin(require('../'))
.add(_... | 'use strict';
var browserify = require('browserify');
var streamToPromise = require('stream-to-promise');
var expect = require('chai').expect;
describe('proxyquire-universal', function () {
function bundle (scenario) {
return streamToPromise(browserify()
.plugin(require('../'))
.add(_... | Fix assertions for comments and strings to fix false positive | Fix assertions for comments and strings to fix false positive
proxyquireify will always be a substring of the bundle because it adds a file
| JavaScript | mit | royriojas/proxyquire-universal,bevacqua/proxyquire-universal,modulexcite/proxyquire-universal,bendrucker/proxyquire-universal |
17e052b40bd632a18f64861e03cfe2e3468c03be | js/bbc-radio.js | js/bbc-radio.js | (function (exports) {
'use strict';
var obj = {
playableLinks: function (container) {
return container.querySelectorAll('a[data-player-html5-stream]');
},
playlistUrl: function playlistUrl(el) {
console.log('playlistUrl( %o )', el);
return new Promise(function (resolve, reject) {
... | (function (exports) {
'use strict';
var obj = {
playlistFormat: 'http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/vpid/$station/format/pls.pls',
playableLinks: function (container) {
return container.querySelectorAll('a[data-player-html5-stream]');
},
playlistUrl: fun... | Use known playlist URL format to fetch streamable URL | Use known playlist URL format to fetch streamable URL
Signed-off-by: Andrew Nicolaou <867853b9f5173cd1402c104fc88b929245e71ca4@bbc.co.uk>
| JavaScript | apache-2.0 | mediascape/discovery-bbc-radio |
b561eeeb08843c71c327d548d8bfb47d66ac7458 | lib/settings.js | lib/settings.js | "use strict";
var cacheManager = require("cache-manager");
module.exports = {
// cache system (see https://github.com/BryanDonovan/node-cache-manager)
Cache: cacheManager.caching({
store: "memory",
max: 5000,
ttl: 60 * 60
}),
// default request timeout values
DefaultOpenTim... | "use strict";
var cacheManager = require("cache-manager");
module.exports = {
// cache system (see https://github.com/BryanDonovan/node-cache-manager)
Cache: cacheManager.caching({
store: "memory",
max: 5000,
ttl: 60 * 60
}),
// default request timeout values
DefaultOpenTim... | Use exact default values from needle docs for clarity | Use exact default values from needle docs for clarity
| JavaScript | mit | cubehouse/themeparks |
c4fa25940ab6301717aaf1f031185357278ea59a | src/react/LogMonitorEntryAction.js | src/react/LogMonitorEntryAction.js | import React from 'react';
import JSONTree from './JSONTree';
const styles = {
actionBar: {
paddingTop: 8,
paddingBottom: 7,
paddingLeft: 16
},
payload: {
paddingLeft: 15
}
};
export default class LogMonitorAction extends React.Component {
renderPayload(payload) {
return (
<div st... | import React from 'react';
import JSONTree from './JSONTree';
const styles = {
actionBar: {
paddingTop: 8,
paddingBottom: 7,
paddingLeft: 16
},
payload: {
margin: 0,
overflow: 'auto'
}
};
export default class LogMonitorAction extends React.Component {
renderPayload(payload) {
return... | Fix action node overflow, background | Fix action node overflow, background
| JavaScript | mit | romseguy/redux-devtools,blackxored/redux-devtools,threepointone/redux-devtools,threepointone/redux-devtools,jackielii/redux-devtools,konce/redux-devtools,jackielii/redux-devtools,alexkuz/redux-devtools,bloodyowl/redux-devtools,AnthonyWhitaker/redux-devtools,ellbee/redux-devtools,BoffinsDev/redux-devtools,cyhunter/redux... |
1173bda414f44366d61f6dd36ee070d0fd69a42b | test/works.js | test/works.js | import assert from 'assert';
describe('test setup works?', function() {
it('i hope', function() {
assert.equal(1, 1);
});
});
function tick() {
return {};
}
describe('universe', function() {
describe('next generation', function() {
it('of empty universe is empty', function() {
let universe = {
... | import assert from 'assert';
describe('test setup works?', function() {
it('i hope', function() {
assert.equal(1, 1);
});
});
function tick() {
return {};
}
describe('universe', function() {
describe('next generation', function() {
it('of empty universe is empty', function() {
let universe = {
... | Remove duplication, reuse the universes knowledge. | Remove duplication, reuse the universes knowledge.
| JavaScript | mit | wolframkriesing/brutal-constraints-gol |
a167ba6d86987f7eb0ed3044e4c4f995274a6b28 | lib/ngts-create.js | lib/ngts-create.js | #!/usr/bin/env node
var program = require('commander');
function out(val) {
return val;
}
program
.usage("<appName> [options]")
.arguments("<appName>")
.action(function (appName) {
cmdAppName = appName;
})
.option("-o, --out <output-folder>", "Specifies the output (build) folder of th... | #!/usr/bin/env node
var program = require('commander');
var _ = require("lodash");
function out(val) {
return val || "wwwroot";
}
function src(val) {
return val || "src";
}
program
.usage("<appName> [options]")
.arguments("<appName>")
.action(function (appName) {
cmdAppName = appName;
... | Add the src option and default values | Add the src option and default values
| JavaScript | mit | Kurtz1993/ngts-cli,Kurtz1993/ngts-cli,Kurtz1993/ngts-cli |
fb5722f678fac832a0431b0f119343a55b1b9066 | mappers/country-report.js | mappers/country-report.js | var superagent = require('superagent');
var superagentQ = require('superagent-promises');
class CountryReportMapper {
//============================================================
//
//
//============================================================
async query () {
var res = await ... | var superagent = require('superagent');
var superagentQ = require('superagent-promises');
class CountryReportMapper {
//============================================================
//
//
//============================================================
async query () {
var res = await ... | Add files to Country Reports | Add files to Country Reports
| JavaScript | mit | scbd/informea |
f063e42e33f033b24af1448ed4664b81ccfcc043 | lib/util/yfm.js | lib/util/yfm.js | var yaml = require('yamljs');
module.exports = function(source){
var content = source.split('---\n');
if (content.length === 1){
var result = {_content: content[0]};
} else {
var content = content.slice(1),
result = yaml.parse(content.shift());
result._content = content.join('---\n');
}
... | var yaml = require('js-yaml');
module.exports = function(source){
var content = source.split('---\n');
if (content.length === 1){
var result = {_content: content[0]};
} else {
var content = content.slice(1),
result = yaml.load(content.shift());
result._content = content.join('---\n');
}
... | Use js-yaml to parse YAML front matter | Use js-yaml to parse YAML front matter
| JavaScript | mit | sundyxfan/hexo,wyfyyy818818/hexo,hexojs/hexo,XGHeaven/hexo,SaiNadh001/hexo,Regis25489/hexo,jonesgithub/hexo,wflmax/hexo,hackjustu/hexo,hexojs/hexo,magicdawn/hexo,wenzhucjy/hexo,keeleys/hexo,runlevelsix/hexo,hanhailong/hexo,zhangg/hexo,initiumlab/hexo,lknny/hexo,jp1017/hexo,meaverick/hexo,G-g-beringei/hexo,0111001101111... |
20d469253c65b7b775d3ecc683e90839ada48a78 | javascripts/routes.js | javascripts/routes.js | var express = require('express');
module.exports = function(sellerService) {
var router = express.Router();
router.get('/', function(request, response) {
response.render('index', { title: 'Katazon' });
});
router.get('/sellers', function(request, response) {
console.log(sellerService.... | var express = require('express');
module.exports = function(sellerService) {
var router = express.Router();
router.get('/', function(request, response) {
response.render('index', { title: 'Katazon' });
});
router.get('/sellers', function(request, response) {
response.render('sellers',... | Use redirect in Post /sellers instead of render. | Use redirect in Post /sellers instead of render.
| JavaScript | bsd-3-clause | jak78/extreme-carpaccio,dlresende/extreme-carpaccio,dlresende/extreme-carpaccio,jak78/extreme-carpaccio,dlresende/extreme-carpaccio,jak78/extreme-carpaccio,jak78/extreme-carpaccio,dlresende/extreme-carpaccio,dlresende/extreme-carpaccio,dlresende/extreme-carpaccio,jak78/extreme-carpaccio,jak78/extreme-carpaccio,octo-tec... |
3dab636b59f3229f09eb8f026ff3acf78bf48334 | test/basics.js | test/basics.js | var start = require('./start')
var request = require('request')
var should = require('should')
describe('do they use node?', function(){
before(function(done) {
start(done)
})
it('should return json')
it('should return no reasons for google.com')
it('should return browserify reasons for substack.net')... | var start = require('./start')
var request = require('request')
var should = require('should')
describe('do they use node?', function(){
var host = 'http://localhost:3000';
function ops(q) {
if (!q) {
q = {}
}
q.json = true
return q
}
before(function(done) {
start(done)
})
it('s... | Add check for json tests | Add check for json tests
| JavaScript | mit | dotheyusenode/dotheyusenode |
78e633397ee89f5ca06bc250f70ac4be2dc1c299 | src/components/Menu/NestedList.js | src/components/Menu/NestedList.js | import React, {PropTypes} from 'react';
import {pagesShape} from '../../CatalogPropTypes';
import Link from '../Link/Link';
import ListItem, {style as listItemStyle} from './ListItem';
import {style as menuStyle} from './Menu';
import Radium from 'radium';
const NestedList = React.createClass({
propTypes: {
pag... | import React, {PropTypes} from 'react';
import {pagesShape} from '../../CatalogPropTypes';
import Link from '../Link/Link';
import ListItem, {style as listItemStyle} from './ListItem';
import {style as menuStyle} from './Menu';
import Radium from 'radium';
const NestedList = ({theme, pages, title}, {router}) => {
c... | Replace React.createClass with a plain function | Replace React.createClass with a plain function
| JavaScript | bsd-3-clause | interactivethings/catalog,interactivethings/catalog,interactivethings/catalog,interactivethings/catalog |
a352be9d4df3f4322836c8940a81929316719de2 | stockflux-components/webpack.config.js | stockflux-components/webpack.config.js | const path = require('path');
module.exports = {
mode: 'development', // TODO: production mode
entry: path.resolve('src', 'index.js'),
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
library: 'stockflux-components',
libraryTarget: 'umd'
},
modu... | const path = require('path');
module.exports = {
mode: 'production',
entry: path.resolve('src', 'index.js'),
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'dist'),
library: 'stockflux-components',
libraryTarget: 'umd'
},
module: {
rules: [
... | Use production mode for stockflux components build | Use production mode for stockflux components build
| JavaScript | mit | ScottLogic/bitflux-openfin,ScottLogic/StockFlux,owennw/OpenFinD3FC,owennw/OpenFinD3FC,ScottLogic/StockFlux,ScottLogic/bitflux-openfin |
c65d99933600a0581ee1f366fabbbecbaca638e7 | test/DirectMailer.test.js | test/DirectMailer.test.js | var assert = require('chai').assert;
var Promise = require('bluebird');
var sinon = require('sinon');
var DirectMailer = require('../lib/DirectMailer');
describe('DirectMailer', function () {
it('Should properly export', function () {
assert.isFunction(DirectMailer);
});
it('Should properly instantiate', fu... | var assert = require('chai').assert;
var Promise = require('bluebird');
var sinon = require('sinon');
var DirectMailer = require('../lib/DirectMailer');
describe('DirectMailer', function () {
it('Should properly export', function () {
assert.isFunction(DirectMailer);
});
it('Should properly instantiate', fu... | Cover direct mailer with stub fn | Cover direct mailer with stub fn
| JavaScript | mit | ghaiklor/sails-service-mailer |
38638646b9fa1ba21b57d9ac43c7f1ca014b3422 | app/js/services/siteService.js | app/js/services/siteService.js | angular.module('seoApp').factory('SiteService', ['$http', function($http) {
var service = {}, urlUtils = require('urlUtils'), data = {}, init;
init = function() {
$http.get('seo-data.json').success(function(json) {
data = json;
for (var i in data.pages) {
data.pages[i].name = urlUtils.relat... | angular.module('seoApp').factory('SiteService', ['$http', function($http) {
var service = {}, urlUtils = require('urlUtils'), site = {}, init;
init = function() {
$http.get('seo-data.json').success(function(json) {
var address = json.address,
pages = json.pages || [],
urls = [];
f... | Improve SiteService with valid url list | Improve SiteService with valid url list
| JavaScript | mit | joehua87/onsite-seo,rewoo/onsite-seo,joehua87/onsite-seo |
c96052863a77a92ac05f59e332ce2e0dbdbfd1c6 | public/js/cv.js | public/js/cv.js | $(document).ready(function () {
$(".js-define").each(function(index) {
$(this).attr('id', "field-" + index);
$(this).popover({
"html": true,
"placement": "bottom",
"content": generateInputElement(index)
});
});
$(".js-use").click(function() {
... | $(document).ready(function () {
$(".js-define").each(function(index) {
$(this).attr('id', "field-" + index);
$(this).popover({
"html": true,
"placement": "bottom",
"content": generateInputElement(index)
});
});
$(".js-use").click(function() {
... | Change text-updating logic to match on title rather than ID | Change text-updating logic to match on title rather than ID
| JavaScript | mit | colinpilloud/cv_generator,colinpilloud/cv_generator |
a48e68a77e86f97f15f5a0ed057d48f9e9d3b30d | app/services/resize-updater.js | app/services/resize-updater.js | (function() {
'use strict';
angular
.module('app.services')
.factory('resizeUpdater', function($window, $q){
var api = {};
var size = {
width: undefined,
height: undefined
};
api.getSize = function(){
... | (function() {
'use strict';
angular
.module('app.services')
.factory('resizeUpdater', function($window, $q){
var api = {};
var size = {
width: undefined,
height: undefined
};
api.getSize = function(){
... | Update addCallback and add removeCallback function | Update addCallback and add removeCallback function
handle array api.list by keys
| JavaScript | mit | nagygergo/PixelFactory,nagygergo/PixelFactory |
47e7b7557909307c090f3b3308540ff072b7d6a3 | scrollfix.js | scrollfix.js | ;(function(window, document){
document.addEventListener('touchmove', function(e) {
isScrollElement(e.target) || e.preventDefault();
}, false);
document.addEventListener('touchstart', function(e){
var elem = isScrollElement(e.target);
var startTopScroll = 0;
if(elem) {
startTopScroll = elem.scrollTop;
i... | ;(function(window, document){
document.addEventListener('touchmove', function(e) {
isScrollElement(e.target) || e.preventDefault();
}, false);
document.addEventListener('touchstart', function(e){
var elem = isScrollElement(e.target);
var startTopScroll = 0;
if(elem) {
startTopScroll = elem.scrollTop;
i... | Change comparison from the window to itself. | Change comparison from the window to itself.
Checks if the target element's scroll height is bigger than the client height. | JavaScript | mit | nickcolley/ScrollFix |
6036140c1135d959e47b1e559d8e23bc32d83193 | src/helpers/makeRouteHooksSafe.js | src/helpers/makeRouteHooksSafe.js | import { createRoutes } from 'react-router/lib/RouteUtils';
// Wrap the hooks so they don't fire if they're called before
// the store is initialised. This only happens when doing the first
// client render of a route that has an onEnter hook
function makeHooksSafe(routes, store) {
if (Array.isArray(routes)) {
r... | import { createRoutes } from 'react-router/lib/RouteUtils';
// Wrap the hooks so they don't fire if they're called before
// the store is initialised. This only happens when doing the first
// client render of a route that has an onEnter hook
function makeHooksSafe(routes, store) {
if (Array.isArray(routes)) {
r... | Support onEnter hooks on IndexRoutes | Support onEnter hooks on IndexRoutes
| JavaScript | mit | coopdevs/katuma-web,coopdevs/katuma-web |
5cf9c4434372a611146c264ba4ef2e43e2933631 | src/data/inflation_pools.js | src/data/inflation_pools.js | export default {
GA3FUYFOPWZ25YXTCA73RK2UGONHCO27OHQRSGV3VCE67UEPEFEDCOPA: {
name: 'xlmpool',
website: 'https://xlmpool.com',
},
GBL7AE2HGRNQSPWV56ZFLILXNT52QWSMOQGDBBXYOP7XKMQTCKVMX2ZL: {
name: 'futuretense.io',
website: 'https://pool.futuretense.io/',
},
}
| export default {
GA3FUYFOPWZ25YXTCA73RK2UGONHCO27OHQRSGV3VCE67UEPEFEDCOPA: {
name: 'xlmpool',
website: 'https://xlmpool.com',
},
GBL7AE2HGRNQSPWV56ZFLILXNT52QWSMOQGDBBXYOP7XKMQTCKVMX2ZL: {
name: 'futuretense.io',
website: 'https://pool.futuretense.io/',
},
GCCD6AJOYZCUAQLX32ZJF2MKFFAUJ53PVCFQI... | Add Lumenaut Community Pool to known inflation pools | Add Lumenaut Community Pool to known inflation pools
| JavaScript | apache-2.0 | chatch/stellarexplorer,chatch/stellarexplorer |
e10c1657107759c5ba77d59deb5e8c8d2c16cca0 | client/js/app/validations/SharedValidations.js | client/js/app/validations/SharedValidations.js | var RunValidations = require('../utils/RunValidations').run;
var FilterValidations = require('../validations/FilterValidations');
var TimeframeUtils = require('../utils/TimeframeUtils');
var FilterUtils = require('../utils/FilterUtils');
module.exports = {
event_collection: {
msg: 'Choose an Event Collecti... | var _ = require('lodash');
var RunValidations = require('../utils/RunValidations').run;
var FilterValidations = require('../validations/FilterValidations');
var TimeframeUtils = require('../utils/TimeframeUtils');
var FilterUtils = require('../utils/FilterUtils');
module.exports = {
event_collection: {
msg... | Return true if there are no filters to validate. | Return true if there are no filters to validate.
| JavaScript | mit | keen/explorer,amitmawkin/explorer,keen/explorer,amitmawkin/explorer,keen/explorer |
11818da19c0729f1ba487f728ca651cc6ba28e71 | src/Store.js | src/Store.js | import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
import reducers fr... | import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
import reducers fr... | Add dispensary to store blacklist | Add dispensary to store blacklist
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
09c361ba4613dca36fbaed0f8e855537a4ccb7da | app/assets/javascripts/header-footer-only.js | app/assets/javascripts/header-footer-only.js | //= require libs/jquery/plugins/jquery.base64
//= require vendor/polyfills/bind
//= require analytics
//= require start-modules
//= require core
//= require govuk/selection-buttons
//= require govuk/shim-links-with-button-role
| //= require libs/jquery/plugins/jquery.base64
//= require vendor/polyfills/bind
//= require analytics
//= require start-modules
//= require govuk/selection-buttons
//= require govuk/shim-links-with-button-role
//= require core
| Load files in correct order | Load files in correct order
The core.js file needs GOVUK.SelectionButtons so move after the require.
| JavaScript | mit | alphagov/static,alphagov/static,alphagov/static |
8229e10a2a9f358348b3eb7721768276e2e2643a | webpack.mix.js | webpack.mix.js | let mix = require('laravel-mix');
let tailwindcss = require('tailwindcss');
mix.setPublicPath('app/assets');
mix.webpackConfig({
watchOptions: { ignored: ['node_modules', 'app/vendor'] }
});
mix.sass('app/resources/sass/app.scss', 'app/assets/app.css').options({
processCssUrls: false,
postCss: [tailwindc... | let mix = require('laravel-mix');
let tailwindcss = require('tailwindcss');
mix.setPublicPath('app/assets');
mix.webpackConfig({
watchOptions: { ignored: ['node_modules', 'app/vendor'] }
});
mix.sass('app/resources/sass/app.scss', 'app/assets/app.css').options({
processCssUrls: false,
postCss: [tailwindc... | Disable npm build success notifications | Disable npm build success notifications
| JavaScript | mit | DirectoryLister/DirectoryLister,DirectoryLister/DirectoryLister,DirectoryLister/DirectoryLister,DirectoryLister/DirectoryLister |
4f815fdeb978279d3100d5bba2f620eb0f242241 | src/js/components/Layout.js | src/js/components/Layout.js | import React from "react"
import { connect } from "react-redux"
//import { fetchLinks } from "../actions/linkActions"
@connect((store) => {
return {
user: 'Celso',
myList: ['fee', 'fi', 'fo', 'fum'],
message: ''//,
//links: store.links.links
};
})
export default class Layout extends React.Componen... | import React from "react"
import { connect } from "react-redux"
//import { fetchLinks } from "../actions/linkActions"
@connect((store) => {
return {
user: 'Celso',
myList: ['fee', 'fi', 'fo', 'fum'],
message: ''//,
//links: store.links.links
};
})
export default class Layout extends React.Componen... | Fix warning with list iteration | Fix warning with list iteration
| JavaScript | mit | celsom3/Cosecha-SMS,celsom3/Cosecha-SMS |
a159c61046dcd55bfbd267b74d2c3f935678690d | src/index.js | src/index.js | export function onConnect(respond, connections = {}, tab, error) {
chrome.runtime.onConnect.addListener(function(port) {
function extensionListener(message) {
if (message.name === 'init') {
connections[message.tabId || port.sender.tab.id] = port;
if (tab && message.tabId !== tab.id) {
... | export function onConnect(init, responses, connections, tab, error) {
chrome.runtime.onConnect.addListener(function(port) {
function extensionListener(message) {
if (message.name === 'init') {
connections[message.tabId || port.sender.tab.id] = port;
if (tab && message.tabId !== tab.id) {
... | Use an array of responses | Use an array of responses
| JavaScript | mit | zalmoxisus/crossmessaging |
7f2b2d2dc8fc997b3b4a70a4fa1c0be314fa3300 | src/index.js | src/index.js | const config = require('../src/getConfig')();
const actions = require('../src/actions');
const ios = require('../src/ios');
const android = require('../src/android');
const projects = {
ios: ios.fromConfig(config.ios),
android: android.fromConfig(config.android),
};
module.exports = {projects, actions};
| const config = require('./getConfig')();
const actions = require('./actions');
const ios = require('./ios');
const android = require('./android');
const projects = {
ios: ios.fromConfig(config.ios),
android: android.fromConfig(config.android),
};
module.exports = {projects, actions};
| Rewrite paths after moving file | Rewrite paths after moving file
| JavaScript | mit | rnpm/rnpm |
99fd54833d9f5f480d0722524600c8fc18e0d290 | src/index.js | src/index.js | // @flow
import * as config from 'aws-cognito-promises';
import sagas from './sagas';
import * as action from './actions';
import * as selectors from './selectors';
import * as reducer from './reducer';
export { config, sagas, action, selectors, reducer };
| // @flow
import * as config from 'aws-cognito-promises';
import * as actions from './actions';
import * as selectors from './selectors';
import reducer from './reducer';
import sagas from './sagas';
export { config, sagas, actions, selectors, reducer };
| Clean up some other exports. | Clean up some other exports.
| JavaScript | mit | omt-tech/redux-modules-aws-cognito |
8701fc4075b56ef31d87ef2a99a7c3917b51e5be | www/js/main.js | www/js/main.js | var cordova = require("cordova");
window.onload = action
var action = document.pesan.action = login();
var rs = ["Royal Progress", "RSUP Dr Cipto Mangunkusumo", "RSUP Fatmawati", "RSUP Persahabatan"]
function login() {
var nama = document.pesan.nama.value;
var name = "Andre Christoga";
if ((name == nama)) {
wi... | var cordova = require("cordova");
window.onload = action
var action = document.pesan.action = login();
var rs = ["Royal Progress", "RSUP Dr Cipto Mangunkusumo", "RSUP Fatmawati", "RSUP Persahabatan"]
function login() {
}
| Remove everything from login function | Remove everything from login function
| JavaScript | mit | cepatsembuh/cordova,christoga/cepatsembuh,mercysmart/cepatsembuh,christoga/cepatsembuh,mercysmart/cepatsembuh,cepatsembuh/cordova,cepatsembuh/cordova,christoga/cepatsembuh,christoga/cepatsembuh,mercysmart/cepatsembuh,mercysmart/cepatsembuh,cepatsembuh/cordova,christoga/cepatsembuh,mercysmart/cepatsembuh,cepatsembuh/cor... |
ae62068dcfe9e45889b213ff99165c989fe46637 | assets/javascript/layout.js | assets/javascript/layout.js | document.addEventListener('DOMContentLoaded', function () {
const jsOnlyElements = document.getElementsByClassName('js-only');
for (var i = 0; i < jsOnlyElements.length; ++i) {
var element = jsOnlyElements.item(i);
element.className = element.className.replace('js-only', '').trim();
}
});
| 'use strict';
document.addEventListener('DOMContentLoaded', function () {
const jsOnlyElements = Array.prototype.slice.call(document.getElementsByClassName('js-only'));
jsOnlyElements.forEach(function (element) {
element.className = element.className.replace('js-only', '').trim();
});
});
| Fix code which removes js-only class | Fix code which removes js-only class
| JavaScript | mit | ventaquil/picap,ventaquil/picap |
d140b2b334feea3b7f616b2e9fb86a928ec85230 | app/components/Main.js | app/components/Main.js | // @flow
import React from 'react';
import Relay from 'react-relay/classic';
import DocumentTitle from 'react-document-title';
import Navigation from './layout/Navigation';
import Footer from './layout/Footer';
import Flashes from './layout/Flashes';
type Props = {
children: React$Node,
viewer?: Object,
organi... | // @flow
import React from 'react';
import Relay from 'react-relay/classic';
import DocumentTitle from 'react-document-title';
import Navigation from './layout/Navigation';
import Footer from './layout/Footer';
import Flashes from './layout/Flashes';
type Props = {
children: React$Node,
viewer?: Object,
organi... | Use flex to dock footer to the bottom of the screen | Use flex to dock footer to the bottom of the screen
| JavaScript | mit | buildkite/frontend,buildkite/frontend |
2d376fc7a9e95996806543c1d3fdded04b27f0f4 | app/components/Main.js | app/components/Main.js | import React from 'react';
import Relay from 'react-relay';
import Navigation from './layout/Navigation';
import Footer from './layout/Footer';
class Main extends React.Component {
static propTypes = {
children: React.PropTypes.node.isRequired,
viewer: React.PropTypes.object.isRequired,
organization: Re... | import React from 'react';
import Relay from 'react-relay';
import Navigation from './layout/Navigation';
import Footer from './layout/Footer';
class Main extends React.Component {
static propTypes = {
children: React.PropTypes.node.isRequired,
viewer: React.PropTypes.object.isRequired,
organization: Re... | Use BUILD_STATE_SCHEDULED and BUILD_STATE_RUNNING enums | Use BUILD_STATE_SCHEDULED and BUILD_STATE_RUNNING enums
| JavaScript | mit | fotinakis/buildkite-frontend,fotinakis/buildkite-frontend,buildkite/frontend,buildkite/frontend |
8b5f940602b33a0e91c9fd7c3482fd118ff33a7a | assets/js/api-fetch-shim.js | assets/js/api-fetch-shim.js | /**
* WordPress dependencies
*/
import apiFetch from '@wordpress/api-fetch__non-shim';
if ( global._apiFetch === undefined ) {
global._apiFetch = apiFetch;
if ( global._apiFetchRootURL ) {
apiFetch.use( apiFetch.createRootURLMiddleware( global._apiFetchRootURL ) );
}
if ( global._apiFetchNonceMiddleware ) {
... | /**
* WordPress dependencies
*/
import apiFetch from '@wordpress/api-fetch__non-shim';
if ( global._apiFetchRootURL || global._apiFetchNonceMiddleware ) {
if ( global._apiFetchRootURL ) {
apiFetch.use( apiFetch.createRootURLMiddleware( global._apiFetchRootURL ) );
}
if ( global._apiFetchNonceMiddleware ) {
a... | Remove global apiFetch in shim. | Remove global apiFetch in shim.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
4239b93165cbdbd05fd787cecdcc28866d68c8d3 | src/sap.ui.core/test/sap/ui/core/qunit/rules/misc/silentEventBus.qunit.js | src/sap.ui.core/test/sap/ui/core/qunit/rules/misc/silentEventBus.qunit.js | /*global QUnit testRule*/
sap.ui.define([
"jquery.sap.global"
], function(/*jQuery*/) {
"use strict";
QUnit.module("sap.ui.core EventBus logs rule tests", {
beforeEach: function() {
sap.ui.getCore().getEventBus().subscribe("myChannel", "myChannel", function(){});
//these 2 publications should be responsib... | /*global QUnit testRule*/
sap.ui.define([
"jquery.sap.global"
], function(/*jQuery*/) {
"use strict";
QUnit.module("sap.ui.core EventBus logs rule tests", {
beforeEach: function() {
this.listener = function(){};
sap.ui.getCore().getEventBus().subscribe("myChannel", "myEvent", this.listener);
//these 2... | Support Rules: Fix Eventbus rule | [FIX][INTERNAL] Support Rules: Fix Eventbus rule
Change-Id: I4069957e7e14de55ee8319073c46317e101b764d
| JavaScript | apache-2.0 | cschuff/openui5,SAP/openui5,SAP/openui5,SAP/openui5,cschuff/openui5,cschuff/openui5,SAP/openui5 |
717d5428813011a8d477c3b2f868605399d3f48a | settings-default.js | settings-default.js | module.exports = {
ircNetwork: "chat.freenode.net",
ircNick: "",
ircName: "",
ircPassword: "",
ircRooms: "#screeps",
ircTrusted: "",
twitterEnabled: false,
twitterConsumerKey: "",
twitterConsumerSecret: "",
twitterAccessToken: "",
twitterAccessSecret: "",
screepsEnabled: true,
screepsEmail: "",
screepsPas... | module.exports = {
ircNetwork: process.env.IRC_NETWORK || "chat.freenode.net",
ircNick: process.env.IRC_NICK || "",
ircName: process.env.IRC_NAME || "",
ircPassword: process.env.IRC_PASSWORD || "",
ircRooms: process.env.IRC_ROOMS || "#screeps",
ircTrusted: process.env.IRC_TRUSTED || "",
twitterEnabled: !!(proces... | Add support for environment-variable based configuration | Add support for environment-variable based configuration | JavaScript | mit | stanier/snippy |
d540c09ed5afd7885c125b6c9b9922139f982db2 | src/sagas.js | src/sagas.js | import { put, takeEvery } from 'redux-saga/effects';
import { MOVE_PIECE, GO_BACK, GO_FORWARD, SCROLL_TO_CENTER } from './actions'
export function* watchInputMove() {
yield [
takeEvery(MOVE_PIECE, scrollToCurrentNode),
takeEvery(GO_BACK, scrollToCurrentNode),
takeEvery(GO_FORWARD, scrollToCurrentNode),
... | import { put, takeEvery } from 'redux-saga/effects';
import { MOVE_PIECE, GO_BACK, GO_FORWARD, SCROLL_TO_CENTER } from './actions'
export function* watchInputMove() {
yield takeEvery([MOVE_PIECE, GO_BACK, GO_FORWARD], scrollToCurrentNode);
}
export function* scrollToCurrentNode() {
yield put({ type: SCROLL_TO_CE... | Use array-style pattern in redux-saga's takeEvery | Use array-style pattern in redux-saga's takeEvery
| JavaScript | mit | orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook |
f1f7d5ff0a7a432986ab387a29947b1ea31c4c04 | src/apps/interactions/middleware/details.js | src/apps/interactions/middleware/details.js | const { fetchInteraction } = require('../repos')
const { getDitCompany } = require('../../companies/repos')
async function getInteractionDetails(req, res, next, interactionId) {
try {
const interaction = await fetchInteraction(req, interactionId, res.locals)
res.locals.interaction = interaction
if (!res... | const { fetchInteraction } = require('../repos')
const { getDitCompany } = require('../../companies/repos')
async function getInteractionDetails(req, res, next, interactionId) {
try {
const interaction = await fetchInteraction(
req,
interactionId,
res.locals.features['trade-agreement-interactio... | Fix trade agreements feature flag always being evaluated as true | Fix trade agreements feature flag always being evaluated as true
| JavaScript | mit | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend |
0fb58c1f035a74de51af111feee0fe8ca83ed69d | src/scope.js | src/scope.js | var d = require('./util').log;
exports.createScope = function(obj, parentScope) {
return (obj.__parent__ = parentScope) && obj;
};
exports.findInScope = function findInScope(scope, identifier) {
d(scope);
d(identifier);
if (0 === Object.keys(scope).length) throw new ReferenceError(identifier + ' is not defin... | const d = require('./util').log;
exports.createScope = function(obj, parentScope) {
obj = obj || {};
return (obj.__parent__ = parentScope) && obj;
};
exports.findInScope = function findInScope(scope, identifier) {
d('findInScope:');
d(scope);
d(identifier);
d('/findInScope');
if (0 === Object.keys(sco... | Change var to const and fix some logging | Change var to const and fix some logging
| JavaScript | mit | zeusdeux/moks |
6bb7ad2e60e8998b5eaf2282d7235a3d33a0d277 | routes/index.js | routes/index.js | var models = require('../models');
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
models.Question.findAll({
include: [{ model: models.Choice }]
})
.then(function(questions) {
var qs = questions.map(function(question) {
... | var models = require('../models');
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
models.Question.find({
include: [{ model: models.Choice }],
order: [ models.sequelize.fn('RANDOM') ]
})
.then(function(question) {
return... | Select one Question at random. | Select one Question at random.
| JavaScript | mit | thirdtruck/sumo-survey,thirdtruck/sumo-survey |
efa1fbe4b8e56468750937a2847929b310de15ae | config/db.js | config/db.js | const db = require('mongoose');
const config = require('../config/default.js');
if (process.env.NODE_ENV === 'test') {
config.db.name = 'test_db';
config.db.username = 'test_user';
config.db.password = 'test_password';
}
// connect the database
db.connect(process.env.MONGODB_DB_URL || 'mongodb://' + confi... | const db = require('mongoose');
const config = require('../config/default.js');
if (process.env.NODE_ENV === 'test') {
config.db.name = 'test_db';
config.db.username = 'test_user';
config.db.password = 'test_password';
}
// connect the database
db.connect(process.env.MONGODB_DB_URL || 'mongodb://' + confi... | Use mongoClient for connecting to mongoDB | Use mongoClient for connecting to mongoDB
| JavaScript | mit | UtkarshMe/api,BitsAiims2017/api |
6c785cf1d12c18977c24f3b5b7d9f3bb5ea63a64 | select/index.js | select/index.js | module.exports = Select;
function Select() {}
Select.prototype.view = __dirname + '/views';
Select.prototype.style = __dirname + '/styles';
Select.prototype.name = 'select';
Select.prototype.components = [];
require('./operations');
require('./actions');
Select.prototype.init = function(model) {
var optionList = ... | module.exports = Select;
function Select() {}
Select.prototype.view = __dirname + '/views';
Select.prototype.style = __dirname + '/styles';
Select.prototype.name = 'select';
Select.prototype.components = [];
require('./operations');
require('./actions');
Select.prototype.init = function(model) {
var optionList = ... | Refactor according to styles doc | Refactor according to styles doc
| JavaScript | mit | BBWeb/d-md-components,BBWeb/d-md-components |
8a8c0bd0b34da460f5fa151a9ceda533cbeb52c7 | client/src/components/GeneralBanner.js | client/src/components/GeneralBanner.js | import React from 'react'
const GeneralBanner = (props) => {
const bannerClassName = `general-banner alert ${props.banner.statusColor}`
return (
<div className={bannerClassName}>
<div className="messsage"><strong>Announcement:</strong> {props.banner.message}</div>
</div>
)
... | import React, {Component} from 'react'
export default class GeneralBanner extends Component {
render() {
const bannerClassName = `general-banner alert ${this.props.banner.statusColor}`
return (
<div className={bannerClassName}>
<div className="messsage"><strong>Announcem... | Refactor general banner function to react component | Refactor general banner function to react component
| JavaScript | mit | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet |
e8ba1a79fb4be2d36df09ec3211b94732834121d | imports/startup/client/index.js | imports/startup/client/index.js | import { Meteor } from 'meteor/meteor'
import { render } from 'react-dom'
import { renderRoutes } from './routes.jsx'
Meteor.startup(() => {
render(renderRoutes(), document.getElementById('app'))
})
| import { Meteor } from 'meteor/meteor'
import { render } from 'react-dom'
import { createStore } from 'redux'
import { renderRoutes } from './routes.jsx'
import withProvider from '../both/withProvider'
import mainReducer from '../../api/redux/reducers'
Meteor.startup(() => {
const store = createStore(mainReducer, w... | Configure client-side init to use a Redux store initialized with data arrived from the server. | Configure client-side init to use a Redux store initialized with data arrived from the server.
| JavaScript | mit | LuisLoureiro/placard-wrapper |
21e581cb61839697956de68e88c380995173a282 | www/app/config/app.run.js | www/app/config/app.run.js | 'use strict';
/*
* Application .run
*
* On a successful state change set the root scopes title property
* used for the html <title> tag.
*
* Angular .run exicuted after the .config function.
*/
var app = angular.module('app.run', []);
app.run(function ($rootScope) {
// Execute every time the state i... | 'use strict';
/*
* Application .run
*
* On a successful state change set the root scopes title property
* used for the html <title> tag.
*
* Angular .run exicuted after the .config function.
*/
var app = angular.module('app.run', []);
app.run(function ($rootScope) {
// Execute every time the state i... | Add body class to all html pages. | Add body class to all html pages.
| JavaScript | mit | rachellcarbone/angular-seed,rachellcarbone/angular-seed,rachellcarbone/angular-seed |
4643642187d92468a300a8a87eff460ab14ebba5 | getInstalledPackage.js | getInstalledPackage.js | const fs = require('fs')
const path = require('path')
const cache = {}
module.exports = function(packageName) {
if (packageName in cache) {
return cache[packageName]
}
try {
const packageJson = fs.readFileSync(
path.resolve('node_modules', packageName, 'package.json')
)
cache[packageName]... | const fs = require('fs')
const path = require('path')
const cache = {}
module.exports = function(packageName) {
if (packageName in cache) {
return cache[packageName]
}
try {
const packageJson = JSON.parse(
fs.readFileSync(path.resolve('node_modules', packageName, 'package.json'))
)
cache[... | Fix reading of package versions | Fix reading of package versions
| JavaScript | mit | vinsonchuong/standard-esnext |
a4b8cc6ab0ecc3b34366b7f0815e6d518b5e7142 | src/disclosures/js/utils/print-page.js | src/disclosures/js/utils/print-page.js | 'use strict';
require( '../libs/google-cloud-print' );
var ua = navigator.userAgent.toLowerCase(),
isAndroid = ua.indexOf( 'android' ) > -1;
/**
* Print the current screen using Google Cloud Print for Android devices.
*/
function printAndroidPage() {
// https://developers.google.com/cloud-print/docs/gadget
... | 'use strict';
require( '../libs/google-cloud-print' );
var ua = navigator.userAgent.toLowerCase(),
isAndroid = ua.indexOf( 'android' ) > -1;
/**
* Print the current screen using Google Cloud Print for Android devices.
*/
function printAndroidPage() {
// https://developers.google.com/cloud-print/docs/gadget
... | Print the dynamically modified HTML from the page | Print the dynamically modified HTML from the page
| JavaScript | cc0-1.0 | mistergone/college-costs,mistergone/college-costs,mistergone/college-costs,mistergone/college-costs |
8c3bad54f17e517dbe7ee6f3b8cfc55764c9f84e | db/userdb.js | db/userdb.js | const sqlite3 = require('sqlite3').verbose()
const dbName = 'chat.sqlite'
const db = new sqlite3.Database(dbName)
db.serialize(() => {
const sql = `
CREATE TABLE IF NOT EXISTS users
(id integer primary key AUTOINCREMENT, phoneNumber, userName)
`;
db.run(sql)
})
class Users {
static all(cb) {
db.all('SE... | const sqlite3 = require('sqlite3').verbose()
const dbName = 'chat.sqlite'
const db = new sqlite3.Database(dbName)
db.serialize(() => {
const sql = `
CREATE TABLE IF NOT EXISTS users
(id integer primary key AUTOINCREMENT, phoneNumber, userName)
`;
db.run(sql)
})
class Users {
static all (cb) {
db.all('S... | Add function to get list of objects having only userNames | Add function to get list of objects having only userNames
| JavaScript | mit | chandrajob365/ChatApp,chandrajob365/ChatApp |
220fd1ef19968b06c794da0b068a786dfcf1765b | server/helpers/wowCommunityApi.js | server/helpers/wowCommunityApi.js | import request from 'request-promise-native';
const availableRegions = [
'eu',
'us',
'tw',
'kr',
];
export function fetchCharacter(region, realm, name, fields) {
region = region.toLowerCase();
if (!availableRegions.includes(region)) {
throw new Error('Region not recognized.');
}
return request.ge... | import request from 'request-promise-native';
const availableRegions = [
'eu',
'us',
'tw',
'kr',
];
export function fetchCharacter(region, realm, name, fields) {
region = region.toLowerCase();
if (!availableRegions.includes(region)) {
throw new Error('Region not recognized.');
}
return request.ge... | Fix issue fetching characters with strange characters in their names | Fix issue fetching characters with strange characters in their names
| JavaScript | agpl-3.0 | Juko8/WoWAnalyzer,sMteX/WoWAnalyzer,Juko8/WoWAnalyzer,ronaldpereira/WoWAnalyzer,ronaldpereira/WoWAnalyzer,yajinni/WoWAnalyzer,ronaldpereira/WoWAnalyzer,FaideWW/WoWAnalyzer,FaideWW/WoWAnalyzer,anom0ly/WoWAnalyzer,anom0ly/WoWAnalyzer,yajinni/WoWAnalyzer,sMteX/WoWAnalyzer,FaideWW/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,sMteX/... |
7eb6cd37a5fc18e5e85e111f988b6dd70b301028 | draft-js-undo-plugin/src/UndoButton/index.js | draft-js-undo-plugin/src/UndoButton/index.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { EditorState } from 'draft-js';
import unionClassNames from 'union-class-names';
class UndoButton extends Component {
static propTypes = {
children: PropTypes.node.isRequired,
theme: PropTypes.any,
};
onClick = () => ... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { EditorState } from 'draft-js';
import unionClassNames from 'union-class-names';
class UndoButton extends Component {
static propTypes = {
children: PropTypes.node.isRequired,
theme: PropTypes.any,
};
onClick = () => ... | Fix Undo Button initialize issue | Fix Undo Button initialize issue
https://github.com/draft-js-plugins/draft-js-plugins/issues/718 | JavaScript | mit | dagopert/draft-js-plugins,draft-js-plugins/draft-js-plugins,nikgraf/draft-js-plugin-editor,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins,koaninc/draft-js-plugins,dagopert/draft-js-plugins,koaninc/draft-js-plugins,draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins,dagopert/draft-js-pl... |
04a80bd46034dcf55a9efaff84c5f063316e193c | lib/response-cache/entry.js | lib/response-cache/entry.js | function Entry(key, ttlInMilliSeconds, cache) {
if (!key)
throw new Error('invalid cache key');
if (!ttlInMilliSeconds)
throw new Error('invalid TTL');
if (!cache)
throw new Error('invalid storage');
this.key = key;
this.ttlInMilliSeconds = ttlInMilliSeconds;
this.cache = cache;
this.data =... | function Entry(key, ttlInMilliSeconds, cache) {
if (!key)
throw new Error('invalid cache key');
if (!ttlInMilliSeconds)
throw new Error('invalid TTL');
if (!cache)
throw new Error('invalid storage');
this.key = key;
this.ttlInMilliSeconds = ttlInMilliSeconds;
this.cache = cache;
this.data =... | Make readonly attributes to boolean methods | Make readonly attributes to boolean methods
| JavaScript | mit | droonga/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga,KitaitiMakoto/express-droonga |
8da8cc82a50b030e09ce637bbdd16679a0046af8 | closure/goog/events/keys.js | closure/goog/events/keys.js | // Copyright 2006 The Closure Library Authors. All Rights Reserved.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requ... | // Copyright 2006 The Closure Library Authors. All Rights Reserved.
//
// 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requ... | Expand Keys enum to include the escape key. | Expand Keys enum to include the escape key.
Key values reference: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values
RELNOTES: KeyboardEvent.key now includes escape key.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213994507
| JavaScript | apache-2.0 | lucidsoftware/closure-library,teppeis/closure-library,google/closure-library,lucidsoftware/closure-library,teppeis/closure-library,google/closure-library,google/closure-library,lucidsoftware/closure-library,teppeis/closure-library,google/closure-library,teppeis/closure-library,lucidsoftware/closure-library,google/closu... |
ff751f24d9e92c3fc30aeca8cdf575eac3bcb8f2 | spec/mocha-spec.js | spec/mocha-spec.js | /////////////////////
// gulp-node-slate //
/////////////////////
// Run:
// $ cd gulp-node-slate
// $ npm update
// $ npm run mocha
var assert = require('assert');
var es = require('event-stream');
var File = require('vinyl');
var gulpNodeSlate = require('../index.js');
///////////////... | /////////////////////
// gulp-node-slate //
/////////////////////
// Run:
// $ cd gulp-node-slate
// $ npm update
// $ npm run mocha
var assert = require('assert');
var es = require('event-stream');
var fs = require('fs');
var File = require('vinyl');
var gulpNodeSlate = requi... | Test case to verify creation of api documentation web page | Test case to verify creation of api documentation web page
| JavaScript | mit | pinntech/gulp-node-slate,pinntech/gulp-node-slate |
4c3e3ff6a87c10dfa31df6a7fb59915b865924ca | packages/simplebar-react/index.js | packages/simplebar-react/index.js | import React from 'react';
import PropTypes from 'prop-types';
import 'simplebar';
export default function SimpleBar({ children, ...options }) {
return (
<div data-simplebar {...options}>
<div className="simplebar-scroll-content">
<div className="simplebar-content">
{children}
</d... | import React from 'react';
import PropTypes from 'prop-types';
import 'simplebar';
export default function SimpleBar({ children, ...options }) {
return (
<div data-simplebar {...options}>
<div className="simplebar-height-auto-observer-wrapper">
<div className="simplebar-height-auto-observer"></div>... | Rewrite simplebar-react to work with new experimental code | Rewrite simplebar-react to work with new experimental code
| JavaScript | mit | Grsmto/simplebar,Grsmto/simplebar,Grsmto/simplebar |
39ad2e5ec053c0be0c312101e18db09d5350b882 | _setup/objects-set.js | _setup/objects-set.js | 'use strict';
var setPrototypeOf = require('es5-ext/object/set-prototype-of')
, d = require('d/d')
, PrimitiveSet = require('observable-set/create-read-only')(
require('observable-set/primitive')
)
, serializeObject = require('./serialize/object')
, defFilterByKey = require('./utils/define-... | 'use strict';
var setPrototypeOf = require('es5-ext/object/set-prototype-of')
, d = require('d/d')
, PrimitiveSet = require('es6-set/primitive')
, createReadOnly = require('observable-set/create-read-only')
, createObservable = require('observable-set/create-complete')
, serializeObjec... | Fix observable base for objectsSet | Fix observable base for objectsSet
| JavaScript | mit | medikoo/dbjs |
8ed5ceb703bfd032f8f911dee26ec4ca7bdf66d4 | src/database.js | src/database.js | const knex = require('knex');
const cfg = require('../config');
const db = knex(cfg.db);
module.exports = {
async createUser(telegramId) {
return db('user')
.insert({ telegram_id: telegramId });
},
async linkUser(telegramId, username) {
return db('user')
.where({ telegram_id: telegramId })
... | const knex = require('knex');
const cfg = require('../config');
const db = knex(cfg.db);
module.exports = {
async createUser(telegramId) {
return db('user')
.insert({ telegram_id: telegramId });
},
async linkUser(telegramId, username) {
return db('user')
.where({ telegram_id: telegramId })
... | Set default state back to null | Set default state back to null
| JavaScript | mit | majori/piikki-client-tg |
be78546123e6b9e83a1e7184244a132c3029150d | web/static/js/configs/stage_configs.js | web/static/js/configs/stage_configs.js | export default {
"prime-directive": {
alert: null,
confirmationMessage: "Are you sure want to proceed to the Idea Generation stage? This will commence the retro in earnest.",
nextStage: "idea-generation",
button: {
copy: "Proceed to Idea Generation",
iconClass: "arrow right",
},
},
... | export default {
"prime-directive": {
alert: null,
confirmationMessage: "Are you sure want to proceed to the Idea Generation stage? This will commence the retro in earnest.",
nextStage: "idea-generation",
button: {
copy: "Proceed to Idea Generation",
iconClass: "arrow right",
},
},
... | Add null fields to action-item-distribution config for consistency | Add null fields to action-item-distribution config for consistency
| JavaScript | mit | samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro |
52acbec6477dce86d27e63ed16f472a113c77892 | app/assets/javascripts/main_include.js | app/assets/javascripts/main_include.js | // Pagedown customizations
//= require ./pagedown_custom.js
// The rest of the externals
//= require_tree ./external
//= require ./discourse/helpers/i18n_helpers
//= require ./discourse
//= require ./locales/date_locales.js
// Stuff we need to load first
//= require_tree ./discourse/mixins
//= require ./discourse/c... | // The rest of the externals
//= require_tree ./external
//= require ./discourse/helpers/i18n_helpers
//= require ./discourse
//= require ./locales/date_locales.js
// Pagedown customizations
//= require ./pagedown_custom.js
// Stuff we need to load first
//= require_tree ./discourse/mixins
//= require ./discourse/c... | Load pagedown_custom.js a bit later so it can use translations | Load pagedown_custom.js a bit later so it can use translations
| JavaScript | mit | natefinch/discourse,tadp/learnswift,tadp/learnswift,tadp/learnswift,natefinch/discourse |
b6c6814d9b3e88823c084906f2644f2a27dc5c6b | app/components/RelationPeriod/index.js | app/components/RelationPeriod/index.js | import React, { PropTypes } from 'react';
import moment from 'moment';
const dateFormat = 'MMM YYYY';
const calendarFormat = {
sameDay: '[Present]',
sameElse: dateFormat,
};
const RelationPeriod = ({ since, until }) => {
const from = moment(since[0], 'YYYY-MM-DD');
const to = until ? moment(until[0], 'YYYY-MM... | import React, { PropTypes } from 'react';
import moment from 'moment';
const dateFormat = 'MMM YYYY';
const calendarFormat = {
sameDay: '[Present]',
sameElse: dateFormat,
};
const RelationPeriod = ({ since, until }) => {
const from = moment(since, 'YYYY-MM-DD');
const to = until ? moment(until, 'YYYY-MM-DD') ... | Return 'present' for future dates | Return 'present' for future dates
| JavaScript | mit | transparantnederland/browser,transparantnederland/relationizer,transparantnederland/browser,transparantnederland/relationizer,waagsociety/tnl-relationizer,waagsociety/tnl-relationizer |
e0e485833a37c2fb44c789a87e41a7e7fb623476 | src/error_parser.js | src/error_parser.js | var ErrorStackParser = require('error-stack-parser');
var UNKNOWN_FUNCTION = '?';
function guessFunctionName(url, line) {
return UNKNOWN_FUNCTION;
}
function gatherContext(url, line) {
return null;
}
function Frame(stackFrame) {
var data = {};
data._stackFrame = stackFrame;
data.url = stackFrame.fileNa... | var ErrorStackParser = require('error-stack-parser');
var UNKNOWN_FUNCTION = '?';
function guessFunctionName(url, line) {
return UNKNOWN_FUNCTION;
}
function gatherContext(url, line) {
return null;
}
function Frame(stackFrame) {
var data = {};
data._stackFrame = stackFrame;
data.url = stackFrame.fileNa... | Change argument name in Stack() to fix uglify bug. | Change argument name in Stack() to fix uglify bug.
| JavaScript | mit | rollbar/rollbar.js,Crisfole/rollbar.js |
351890decff63a19db177bfb631edb6cb8a44d63 | ui/component/fileRenderInline/index.js | ui/component/fileRenderInline/index.js | import { connect } from 'react-redux';
import { makeSelectFileInfoForUri, makeSelectStreamingUrlForUri } from 'lbry-redux';
import { doClaimEligiblePurchaseRewards } from 'redux/actions/rewards';
import { makeSelectFileRenderModeForUri, selectPrimaryUri } from 'redux/selectors/content';
import { withRouter } from 'reac... | import { connect } from 'react-redux';
import { makeSelectFileInfoForUri, makeSelectStreamingUrlForUri } from 'lbry-redux';
import { doClaimEligiblePurchaseRewards } from 'redux/actions/rewards';
import { makeSelectFileRenderModeForUri, makeSelectIsPlaying } from 'redux/selectors/content';
import { withRouter } from 'r... | Fix 'isPlaying' to reflect 'playing' instead of 'primary' URI | Fix 'isPlaying' to reflect 'playing' instead of 'primary' URI
## Issue
4959: Deleting MD from downloads list causes spinning icon to run forever
5077: player doesn't close when video deleted
| JavaScript | mit | lbryio/lbry-app,lbryio/lbry-app |
008c75d2d8c1d8cb5b4e8ce3cbf622738da89701 | src/moment/index.js | src/moment/index.js | // Custom moment-timezone data that only includes Europe/London timezone
import data from './data.json';
import moment from 'moment-timezone/moment-timezone';
moment.tz.load(data);
export default moment;
| // Custom moment-timezone data that only includes Europe/London timezone
import data from './data.json';
import moment from 'moment-timezone/moment-timezone';
moment.tz.load(data);
moment.tz.setDefault("Europe/London");
export default moment;
| Set moment default timezone to London | Set moment default timezone to London
| JavaScript | mit | danielgavrilov/room-bookings,danielgavrilov/room-bookings |
7309435dd7f44210d4eaa5f17353468e0c7897da | tetrinimo.js | tetrinimo.js | var Tetrinimo = function(args) {
this.element = args.element;
var shape = args.shape;
this.blocks = shape.map(function(block) {
return {x: new Number(block.x), y: new Number(block.y)};
});
this.row = 0;
this.col = 5;
for(var block in this.blocks) {
this.blocks[block].y += this.row;
this.blo... | var Tetrinimo = function(args) {
this.element = args.element;
var shape = args.shape;
this.blocks = shape.map(function(block) {
return {x: new Number(block.x), y: new Number(block.y)};
});
this.row = 0;
this.col = 5;
for(var block in this.blocks) {
this.blocks[block].y += this.row;
this.blo... | Update rotate function with basic transformation | Update rotate function with basic transformation
| JavaScript | mit | RoyTuesday/tetrelementis,peternatewood/tetrelementis,RoyTuesday/tetrelementis,peternatewood/tetrelementis |
68b2b8664a13124eb6dbc2d7b35eb9091154e95c | app/js/routes/map-route.js | app/js/routes/map-route.js | 'use strict';
// update
var Backbone = require('backbone');
var $ = require('jquery');
Backbone.$ = $;
module.exports = function() {
var MapView = require('../views/map-view');
var mapView = new MapView({model: this.mapModel, businesses: this.collection });
$('#backbone').html(mapView.el);
};
| 'use strict';
var Backbone = require('backbone');
var $ = require('jquery');
Backbone.$ = $;
module.exports = function() {
// Handle people clicking out of map (to business URL) and then back again:
// Since data no longer available, fail gracefully by redirecting home
if (!this.mapModel) {
Backbone.history.navi... | Check for data; if none on hand, reroute back to home | Check for data; if none on hand, reroute back to home
| JavaScript | mit | Localhost3000/along-the-way |
b11a207822c46d98ff5be670b35c4229ced24ca8 | app/config/tickers.js | app/config/tickers.js | const tickers = {
equities: ['SPY', 'VEU', 'SHY'],
credit: ['LQD', 'JNK', 'SHY'],
realEstate: ['VNQ', 'REM', 'SHY'],
econ: ['GLD', 'TLT', 'SHY'],
all: [{ symbol: 'SPY', code: 'GOOG/NYSE_SPY' },
{ symbol: 'VEU', code: 'GOOG/AMEX_VEU' },
{ symbol: 'LQD', code: 'GOOG/NYSEARCA_LQD' },
{ sy... | const tickers = {
equities: ['SPY', 'VEU', 'SHY'],
credit: ['LQD', 'JNK', 'SHY'],
realEstate: ['VNQ', 'MORT', 'SHY'],
econ: ['GLD', 'TLT', 'SHY'],
all: [{ symbol: 'SPY', code: 'GOOG/NYSE_SPY' },
{ symbol: 'VEU', code: 'GOOG/AMEX_VEU' },
{ symbol: 'LQD', code: 'GOOG/NYSEARCA_LQD' },
{ s... | Switch REM to MORT due to reverse split issues | Switch REM to MORT due to reverse split issues
| JavaScript | mit | andrewjesaitis/dual-momentum,andrewjesaitis/dual-momentum |
888ce4bf3e69b61a6d55b308db5b084aa7475dfd | assets/base.js | assets/base.js | (function(target) {
'use strict'
function ajax(Url, Method, Contents) {
return new Promise(function(resolve, reject) {
const XHR = new XMLHttpRequest()
XHR.open(Method, Url, true)
XHR.addEventListener('load', () => {
resolve(XHR.responseText)
})
XHR.addEventListener('error'... | (function(target) {
'use strict'
function ajax(Url, Method, Contents) {
return new Promise(function(resolve, reject) {
const XHR = new XMLHttpRequest()
XHR.open(Method, Url, true)
XHR.addEventListener('load', () => {
resolve(XHR.responseText)
})
XHR.addEventListener('error'... | Fix a dead lock in App.lock | :bug: Fix a dead lock in App.lock
| JavaScript | mit | raeesbhatti/boilerplate,raeesbhatti/boilerplate |
6cf8aa436d3793b7f08206c394df674eb1546bae | .storybook/preview.js | .storybook/preview.js | import React from 'react';
import { addDecorator } from '@storybook/react';
import { ThemeProvider } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import { lightTheme } from '../lib/theme';
import '../components/app.css';
addDecorator(storyFn => (
<ThemeProvider theme={lig... | import React from 'react';
import { addDecorator } from '@storybook/react';
import { ThemeProvider } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import { lightTheme } from '../lib/theme';
import '../components/app.css';
// Mock next/router
// @see https://github.com/vercel... | Add next/route mock to storybook so that elements with <Link> can be put in storybook | Add next/route mock to storybook
so that elements with <Link> can be put in storybook
| JavaScript | mit | cofacts/rumors-site,cofacts/rumors-site |
3cb861cb1e2e8e27401cd8052e3f4b860fc239d3 | .storybook/preview.js | .storybook/preview.js | import './global.css';
import './fonts.css';
| import { addParameters } from '@storybook/react';
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
import './global.css';
import './fonts.css';
addParameters({
viewport: {
viewports: INITIAL_VIEWPORTS,
},
});
| Use more granular list of devices in viewports addon | [WEB-589] Storybook: Use more granular list of devices in viewports addon
| JavaScript | bsd-2-clause | tidepool-org/blip,tidepool-org/blip,tidepool-org/blip |
4a32cada6221d91bc8a5405ac8b45c465556cee1 | es6/index.js | es6/index.js | 'use strict';
module.exports = {
extends: 'ryansobol/core',
parser: 'babel-eslint',
env: {
es6: true,
node: true
},
ecmaFeatures: {
modules: true
},
rules: Object.assign(
require('../rules/ecmascript-6'),
{ 'no-param-reassign': 0 } // because of default params
)
};
| 'use strict';
module.exports = {
extends: 'ryansobol/core',
parser: 'babel-eslint',
env: {
es6: true,
node: true
},
ecmaFeatures: {
modules: true
},
rules: require('../rules/ecmascript-6')
};
| Remove no-param-reassign rule from es6 rules (still disabled) | Remove no-param-reassign rule from es6 rules (still disabled)
| JavaScript | mit | ryansobol/eslint-config-ryansobol |
59b18fab5b7800d311655526f563eb492303ea9b | app/views/accounts-list.js | app/views/accounts-list.js | module.exports = Zeppelin.View.extend({
el: 'ol.accounts__list',
name: 'AccountsList',
template: require('templates/accounts-list'),
bindings: {
'model change:accounts': 'onAccountsChange'
},
context: function() {
return this.model.getPresenters(['accounts']);
},
onAccountsChange: function(... | module.exports = Zeppelin.View.extend({
el: 'ol.accounts__list',
name: 'AccountsList',
template: require('templates/accounts-list'),
context: function() {
return this.model.getPresenters(['accounts']);
}
});
| Remove unnecessary model biding in accounts list view. | Remove unnecessary model biding in accounts list view.
| JavaScript | agpl-3.0 | GetBlimp/boards-web,jessamynsmith/boards-web,jessamynsmith/boards-web |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.