commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 624 | message stringlengths 15 4.7k | lang stringclasses 3
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
295e757a4b9b1f0947a89bca41ac0e777deeac9f | src/index.js | src/index.js | import express from 'express';
import leagueTips from 'league-tooltips';
import runTask from './cronTask';
import taskGenerator from './cronTasks/generator';
import config from './config';
import routes from './routes';
// ==== Server ====
const app = express();
app.use(leagueTips(config.key.riot, 'euw', {
url: '/... | import express from 'express';
import leagueTips from 'league-tooltips';
import runTask from './cronTask';
import taskGenerator from './cronTasks/generator';
import config from './config';
import routes from './routes';
// ==== Server ====
const app = express();
app.use(leagueTips(config.key.riot, 'euw', {
url: '/... | Fix CORS allowed origin typo. | Fix CORS allowed origin typo.
| JavaScript | mit | league-of-legends-devs/feeder.lol-item-sets-generator.org,league-of-legends-devs/feeder.lol-item-sets-generator.org |
decd9e03343b62f2de598bbdb2a51794b71176f0 | src/index.js | src/index.js | import fs from 'fs'
import _ from 'lodash'
import postcss from 'postcss'
import stylefmt from 'stylefmt'
import defaultConfig from './defaultConfig'
import mergeConfig from './util/mergeConfig'
import generateUtilities from './lib/generateUtilities'
import substituteHoverableAtRules from './lib/substituteHoverableAtR... | import fs from 'fs'
import _ from 'lodash'
import postcss from 'postcss'
import stylefmt from 'stylefmt'
import defaultConfig from './defaultConfig'
import mergeConfig from './util/mergeConfig'
import generateUtilities from './lib/generateUtilities'
import substituteHoverableAtRules from './lib/substituteHoverableAtR... | Revert "Allow passing config as lazy-evaluated function" | Revert "Allow passing config as lazy-evaluated function"
This reverts commit 1819cf67d3f24ebe055b4c54b4e037a6621b3734.
| JavaScript | mit | tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss |
e3038c549a27d65ace8e4dcf69ba18cddd70ccc3 | src/index.js | src/index.js | 'use strict';
import 'source-map-support/register';
import http from 'http';
import express from 'express';
import RED from 'node-red';
// Create an Express app
let app = express();
// Create a server
let server = http.createServer(app);
// Create the settings object - see default settings.js file for other options... | 'use strict';
import 'source-map-support/register';
import http from 'http';
import express from 'express';
import RED from 'node-red';
// Exit handler
process.stdin.resume();
function exitHandler(err) {
if (err instanceof Error) {
console.log(err.stack);
process.exit(1);
} else if (isNaN(err)) {
proc... | Add the process exit handler to perform finalization process | Add the process exit handler to perform finalization process
| JavaScript | unknown | dbaba/candy-red,dbaba/candy-red,CANDY-LINE/candy-red,dbaba/candy-red,CANDY-LINE/candy-red,CANDY-LINE/candy-red |
a7848664c8c5d80f8bf98e93523daec60c54512b | 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 insurance shape to blacklist | Add insurance shape to blacklist
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
ee0297dc6068c1e0cdec22e73f84cb6dfae2cde6 | src/store.js | src/store.js | import _merge from 'lodash/merge'
import moment from 'moment'
let today = moment().format('YYYY-MM-DD')
export default {
loading: true,
schedule: {},
// Restore saved preferences to over default lunches and classes
lunches: _merge({ 'Monday': 1, 'Tuesday': 1, 'Wednesday': 1, 'Thursday': 1, 'Friday': 1 },
... | import _merge from 'lodash/merge'
import moment from 'moment'
let today = moment().format('YYYY-MM-DD')
export default {
loading: true,
schedule: {},
// Restore saved preferences to over default lunches and classes
lunches: _merge({ 'Monday': 1, 'Tuesday': 1, 'Wednesday': 1, 'Thursday': 1, 'Friday': 1 },
... | Modify block colors for greater contrast | Modify block colors for greater contrast
| JavaScript | mit | Foo-Bear/beartime-web,Foo-Bear/beartime-web |
9e50914060d36a4f6836280ba1d70d08e255ff23 | tests/jest.config.js | tests/jest.config.js | const baseConfig = require('tdd-buffet/config/jest.config');
const path = require('path');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('../tsconfig');
const rootDir = path.join(__dirname, '../');
module.exports = {
...baseConfig,
rootDir,
// For some reason... | const baseConfig = require('tdd-buffet/config/jest.config');
const path = require('path');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('../tsconfig');
const rootDir = path.join(__dirname, '../');
module.exports = {
...baseConfig,
rootDir,
// For some reason... | Check coverage at the end | Check coverage at the end
| JavaScript | mit | uberVU/mugshot,uberVU/mugshot |
bfc138deca8d789387fb12e91a874948c440b29c | src/index.js | src/index.js | import * as components from './components'
import config, { setOptions } from './utils/config'
import { use, registerComponentProgrammatic } from './utils/plugins'
const Buefy = {
install(Vue, options = {}) {
// Options
setOptions(Object.assign(config, options))
// Components
for (... | import * as components from './components'
import config, { setOptions } from './utils/config'
import { use, registerComponentProgrammatic } from './utils/plugins'
const Buefy = {
install(Vue, options = {}) {
// Options
setOptions(Object.assign(config, options))
// Components
for (... | Add export all components in src | Add export all components in src
| JavaScript | mit | rafaelpimpa/buefy,rafaelpimpa/buefy,rafaelpimpa/buefy |
ceb46510b3dba3846a51ea9a96983338ac349250 | src/index.js | src/index.js | var coffeeScript = require("coffee-script");
var commands = codebox.require("core/commands");
var File = codebox.require("models/file");
commands.register({
id: "coffeescript.preview",
title: "CoffeeScript: Preview",
context: ["editor"],
shortcuts: [
"ctrl+shift+c"
],
run: function(arg... | var coffeeScript = require("coffee-script");
var commands = codebox.require("core/commands");
var File = codebox.require("models/file");
commands.register({
id: "coffeescript.preview",
title: "CoffeeScript: Preview",
context: ["editor"],
shortcuts: [
"ctrl+shift+c"
],
run: function(arg... | Use new multiple cmd contexts | Use new multiple cmd contexts
| JavaScript | apache-2.0 | CodeboxIDE/package-coffeescript |
abea4b81b50c55fa2fdda58804dcab30a4c5d65e | src/index.js | src/index.js | import React from "react";
import ReactDOM from "react-dom";
import { RoutingApp } from "./modules/RoutingApp";
import store from "./store";
import { Provider } from "react-redux";
import { STUY_SPEC_API_URL } from "./constants";
import { ApolloProvider } from "react-apollo";
import { ApolloClient } from "apollo-clien... | import React from "react";
import ReactDOM from "react-dom";
import { RoutingApp } from "./modules/RoutingApp";
import store from "./store";
import { Provider } from "react-redux";
import { STUY_SPEC_API_URL } from "./constants";
import { ApolloProvider } from "react-apollo";
import { ApolloClient } from "apollo-clien... | Enable Apollo devtools in production | Enable Apollo devtools in production | JavaScript | mit | stuyspec/client-app |
7abca73b600af4152b0108cd44767dbd5fbc0980 | react-github-battle/webpack.config.js | react-github-battle/webpack.config.js | var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: __dirname + '/app/index.html',
filename: 'index.html',
inject: 'body'
});
module.exports = {
entry: [
'./app/index.js'
],
output: {
path: __dirname + '/dist',
filename: "index... | var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: __dirname + '/app/index.html',
filename: 'index.html',
inject: 'body'
});
module.exports = {
entry: [
'./app/index.js'
],
output: {
path: __dirname + '/dist',
filename: "index... | Load style-loader and css-loader into webpack making require css possible | Load style-loader and css-loader into webpack making require css possible
| JavaScript | mit | guilsa/javascript-stuff,guilsa/javascript-stuff |
95a364f75062d73bc219c21debb69de7ca2c016c | test/spec/leafbird.spec.js | test/spec/leafbird.spec.js | /*
Copyright 2015 Leafbird
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 required by applicable law or agreed to in writing, sof... | /*
Copyright 2015 Leafbird
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 required by applicable law or agreed to in writing, sof... | Verify if leafbird variable has defined on the global scope | Verify if leafbird variable has defined on the global scope
| JavaScript | apache-2.0 | bscherer/leafbird,bscherer/leafbird,lucasb/leafbird,lucasb/leafbird,leafbirdjs/leafbird,leafbirdjs/leafbird |
bab883be3f5f8eb4969021fe4924253090d58614 | js/application.js | js/application.js | $(document).ready(function(){
var arrayOfColumnNames = [
"c0",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
];
for (var i=0; i<7; i++) {
$("#board").append("<div class='column-div' id=" + arrayOfColumnNames[i] + "></div>");
// console.log($('#' + arrayOfColumnNames[i]));
var thisC... | $(document).ready(function(){
var arrayOfColumnNames = [
"c0",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
];
for (var i=0; i<7; i++) {
$("#board").append("<div class='column-div' id=" + arrayOfColumnNames[i] + "></div>");
// console.log($('#' + arrayOfColumnNames[i]));
var thisC... | Add pieces to the board | Add pieces to the board
| JavaScript | mit | RNBrandt/Connect-4,RNBrandt/Connect-4 |
7b7c5befdb6404705ca905bf3e2ae8c8aebe4271 | source/setup/components/VaultPage.js | source/setup/components/VaultPage.js | import React, { Component } from "react";
import PropTypes from "prop-types";
import BUI, { VaultProvider, VaultUI } from "@buttercup/ui";
class VaultPage extends Component {
static propTypes = {
sourceID: PropTypes.string.isRequired,
vault: PropTypes.object
};
state = {
masterPass... | import React, { Component } from "react";
import PropTypes from "prop-types";
import { VaultProvider, VaultUI } from "@buttercup/ui";
class VaultPage extends Component {
static propTypes = {
sourceID: PropTypes.string.isRequired,
vault: PropTypes.object
};
state = {
masterPassword:... | Remove testing for vault ui | Remove testing for vault ui
| JavaScript | mit | buttercup-pw/buttercup-browser-extension,buttercup-pw/buttercup-browser-extension,perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome |
03f2023117163b855f447ef842712f549e6235a4 | lib/webrat/selenium/location_strategy_javascript/webratlink.js | lib/webrat/selenium/location_strategy_javascript/webratlink.js | var links = inDocument.getElementsByTagName('a');
var candidateLinks = $A(links).select(function(candidateLink) {
var textMatched = PatternMatcher.matches(locator, getText(candidateLink));
var idMatched = PatternMatcher.matches(locator, candidateLink.id);
var titleMatched = PatternMatcher.matches(locator,... | var links = inDocument.getElementsByTagName('a');
var candidateLinks = $A(links).select(function(candidateLink) {
var textMatched = false;
var titleMatched = false;
var idMatched = false;
if (getText(candidateLink).toLowerCase().indexOf(locator.toLowerCase()) != -1) {
textMatched = true;
}
if (candid... | Make link location in Selenium more reliable and consistent with non-Selenium | Make link location in Selenium more reliable and consistent with non-Selenium
| JavaScript | mit | brynary/webrat,jacksonfish/webrat,irfanah/webrat,johnbintz/webrat,jacksonfish/webrat,irfanah/webrat,johnbintz/webrat,irfanah/webrat,brynary/webrat |
282a542462c9a738aa150c8fe785e264f42cf98a | src/geo/leaflet/leaflet-cartodb-webgl-layer-group-view.js | src/geo/leaflet/leaflet-cartodb-webgl-layer-group-view.js | var TC = require('tangram.cartodb');
var LeafletLayerView = require('./leaflet-layer-view');
var LeafletCartoDBVectorLayerGroupView = window.L.TileLayer.extend({
includes: [
LeafletLayerView.prototype
],
options: {
minZoom: 0,
maxZoom: 28,
tileSize: 256,
zoomOffset: 0,
tileBuffer: 50
}... | var TC = require('tangram.cartodb');
var LeafletLayerView = require('./leaflet-layer-view');
var L = require('leaflet');
var LeafletCartoDBVectorLayerGroupView = L.Layer.extend({
includes: [
LeafletLayerView.prototype
],
options: {
minZoom: 0,
maxZoom: 28,
tileSize: 256,
zoomOffset: 0,
t... | Extend from the proper layer | Extend from the proper layer
| JavaScript | bsd-3-clause | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js |
17d2056799f9560f0340efa18447a6ea7dd52e56 | src/mixin.js | src/mixin.js | function Mixin(proto, properties) {
for (const property in properties) {
const value = properties[property];
if (proto[property] && typeof value == "function") {
inherit(proto, property, value);
} else {
proto[property] = value;
}
}
}
function inherit(proto, name, func) {
var parentFu... | function Mixin(proto, properties) {
for (const property in properties) {
const value = properties[property];
if (proto[property] && typeof value == "function") {
inherit(proto, property, value);
} else {
proto[property] = value;
}
}
}
function inherit(proto, property, func) {
var pare... | Make name `name` match in `inherit` helper | Make name `name` match in `inherit` helper
This function uses approximately the same variable names to add to the
prototype. Lets match `Mixin`.
| JavaScript | mit | iFixit/node-markup,iFixit/node-markup,iFixit/node-markup |
ce62829374960f487c98c974be3725b244fc1ff6 | LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js | LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js | importScripts('common.js');
function continuouslyGenerateRsaKey()
{
var extractable = false;
var usages = ['encrypt', 'decrypt'];
// Note that the modulus length is small.
var algorithm = {name: "RSAES-PKCS1-v1_5", modulusLength: 512, publicExponent: hexStringToUint8Array("010001")};
return crypto... | importScripts('common.js');
function continuouslyGenerateRsaKey()
{
var extractable = false;
var usages = ['sign', 'verify'];
// Note that the modulus length is small.
var algorithm = {name: "RSASSA-PKCS1-v1_5", modulusLength: 512, publicExponent: hexStringToUint8Array("010001"), hash: {name: 'sha-1'}}... | Remove a lingering usage of RSA-ES. | [webcrypto] Remove a lingering usage of RSA-ES.
TBR=jww
BUG=372920,245025
Review URL: https://codereview.chromium.org/344503003
git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@176389 bbb929c8-8fbe-4397-9dbb-9b2b20218538
| JavaScript | bsd-3-clause | primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs |
86e7de3cb692cc025512546876e4bb733f130d7c | packages/pundle-transformer-js/lib/plugin-remove-dead-nodes.js | packages/pundle-transformer-js/lib/plugin-remove-dead-nodes.js | // @flow
import * as t from '@babel/types'
// Empty out bodies of falsy parts of if/else statements
// to avoid requiring modules that aren't needed aka
// if (process.env.NODE_ENV === 'production') module.exports = require('./prod-version') else module.exports = require('./dev-version')
// OR
// module.exports = pro... | // @flow
import * as t from '@babel/types'
// Empty out bodies of falsy parts of if/else statements
// to avoid requiring modules that aren't needed aka
// if (process.env.NODE_ENV === 'production') module.exports = require('./prod-version') else module.exports = require('./dev-version')
// OR
// module.exports = pro... | Fix issue with non-block if/else blocks | :bug: Fix issue with non-block if/else blocks
| JavaScript | mit | steelbrain/pundle,motion/pundle,steelbrain/pundle,steelbrain/pundle |
8cd66a00388b06bf6744c0be19eb38a20bc7fc59 | src/validators/ValidationError.js | src/validators/ValidationError.js | /**
* Copyright 2015 Jaime Pajuelo
*
* 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 required by applicable law or a... | /**
* Copyright 2015 Jaime Pajuelo
*
* 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 required by applicable law or a... | Change 'div' element of validation error to 'p' | Change 'div' element of validation error to 'p'
| JavaScript | apache-2.0 | jpajuelo/js-form-validator |
fa1bcd93bb50dfed00a56e908270a1338ca36b67 | src/xmlWriter.js | src/xmlWriter.js | /* global jasmineImporter */
const {GLib} = imports.gi;
const Utils = jasmineImporter.utils;
function Node(name) {
this.name = name;
this.attrs = {};
this.children = [];
this.text = '';
}
function _attrsToString(attrs) {
return Object.keys(attrs).map(key => {
const value = attrs[key].toS... | /* global jasmineImporter */
/* exported Node */
const {GLib} = imports.gi;
const Utils = jasmineImporter.utils;
var Node = class Node {
constructor(name) {
this.name = name;
this.attrs = {};
this.children = [];
this.text = '';
}
toString() {
return `<?xml version... | Change XMLWriter.Node to an ES6 class | Change XMLWriter.Node to an ES6 class
This was still using the old way without syntactic sugar.
| JavaScript | mit | ptomato/jasmine-gjs,ptomato/jasmine-gjs |
fa4465e3705fd2d75011401a9ec2167842d4f5ce | static/js/vcs.js | static/js/vcs.js | var $ = $ || function() {}; // Keeps from throwing ref errors.
function swapselected(from, to) {
$(to).html(options[$(from).val()]);
}
function detailselected(from, to) {
$(to).text(details[$(from).val()]);
}
$(function() {
$("#grp-slct").change(
function() {
swapselected("#grp-slct", "#subgrp-slct");
});
... | var $ = $ || function() {}; // Keeps from throwing ref errors.
function swapselected(from, to) {
$(to).html(options[$(from).val()]);
}
function detailselected(from, to) {
$(to).text(details[$(from).val()]);
}
$(function() {
$("#grp-slct").change(
function() {
swapselected("#grp-slct", "#subgrp-slct");
});
... | Add the hidden activity value to the form so we know which activity has been selected. | Add the hidden activity value to the form so we know which activity has been selected.
| JavaScript | bsd-3-clause | AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker |
4bc5e394580543c2f31ac2d4d7424fef6e47a21a | .eslintrc.js | .eslintrc.js | module.exports = {
extends: "eslint:recommended",
rules: {
"no-console": 0,
"object-curly-spacing": ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
quotes: ["error", "backtick"],
semi: ["error", "never"],
},
env: {
node: true,
},
parserOptions: {
ecmaVersion: ... | module.exports = {
extends: "eslint:recommended",
rules: {
"no-console": 0,
"object-curly-spacing": ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
quotes: ["error", "backtick"],
semi: ["error", "never"],
"arrow-body-style": [
"error",
"as-needed",
{ req... | Add explicit rule for arrow functions and add support for es6 globals | Add explicit rule for arrow functions and add support for es6 globals
| JavaScript | mit | mattdean1/contentful-text-search |
a2603a86697b856749a1df9027505adf11908cad | src/components/ReviewRecipe.js | src/components/ReviewRecipe.js | import React from 'react';
import { Link } from 'react-router-dom';
import { Button } from 'react-bootstrap';
import ModifyTitle from '../containers/ModifyTitle';
import ModifyIngredients from '../containers/ModifyIngredients';
import PropTypes from 'prop-types';
const ReviewRecipe = (props) => {
return (
<div>
... | import React from 'react';
import { Link } from 'react-router-dom';
import { Button } from 'react-bootstrap';
import ModifyTitle from '../containers/ModifyTitle';
import ModifyIngredients from '../containers/ModifyIngredients';
import PropTypes from 'prop-types';
const ReviewRecipe = (props) => {
return (
<div>
... | Refactor if statement for clarity. | Refactor if statement for clarity.
| JavaScript | mit | phuchle/recipeas,phuchle/recipeas |
0a3273bbb40e2c7c9c84f2df01ce53a8b379a86e | app/components/common/cityModule/cityElectionsController.js | app/components/common/cityModule/cityElectionsController.js | 'use strict';
function cityElectionsController($scope, ballot) {
$scope.ballot = ballot;
$scope.isOffice = isOffice;
$scope.isReferendum = isReferendum;
function isOffice(contest) {
return contest.type === 'office';
}
function isReferendum(contest) {
return contest.type === 'referendum';
}
}
... | 'use strict';
function cityElectionsController($scope, ballot) {
$scope.ballot = ballot;
$scope.isOffice = isOffice;
$scope.isReferendum = isReferendum;
function isOffice(contest) {
return contest.contest_type === 'office';
}
function isReferendum(contest) {
return contest.contest_type === 'refe... | Fix the contest type property | Fix the contest type property
| JavaScript | mit | KyleW/disclosure-frontend,caciviclab/disclosure-frontend,caciviclab/disclosure-frontend,KyleW/disclosure-frontend,caciviclab/disclosure-frontend-alpha,KyleW/disclosure-frontend,caciviclab/disclosure-frontend,caciviclab/disclosure-frontend-alpha,caciviclab/disclosure-frontend-alpha |
8c999c55254a61185589743e2e8aebf4e71bca06 | modules/data-selection/components/formatter/formatter.component.js | modules/data-selection/components/formatter/formatter.component.js | (function () {
'use strict';
angular
.module('dpDataSelection')
.component('dpDataSelectionFormatter', {
bindings: {
variables: '<',
formatter: '@',
useInline: '<'
},
templateUrl: 'modules/data-selection/compone... | (function () {
'use strict';
angular
.module('dpDataSelection')
.component('dpDataSelectionFormatter', {
bindings: {
variables: '<',
formatter: '@',
useInline: '<'
},
templateUrl: 'modules/data-selection/compone... | Debug thing pushing to adw.. | Debug thing pushing to adw..
| JavaScript | mpl-2.0 | DatapuntAmsterdam/atlas_prototype,Amsterdam/atlas,DatapuntAmsterdam/atlas_prototype,DatapuntAmsterdam/atlas,DatapuntAmsterdam/atlas,Amsterdam/atlas,Amsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas |
0165ba27355a4ea2125abf4875a212257bf2567e | lib/flux_mixin.js | lib/flux_mixin.js | module.exports = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
};
| var FluxMixin = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
};
FluxMixin.componentWillMount = fu... | Throw if Fluxbox.FluxMixin used as a mixin instead of a function | Throw if Fluxbox.FluxMixin used as a mixin instead of a function
| JavaScript | mit | hoanglamhuynh/fluxxor,STRML/fluxxor,alcedo/fluxxor,davesag/fluxxor,nagyistoce/fluxxor,BinaryMuse/fluxxor,VincentHoang/fluxxor,davesag/fluxxor,chimpinano/fluxxor,davesag/fluxxor,dantman/fluxxor,nagyistoce/fluxxor,andrewslater/fluxxor,webcoding/fluxxor,chimpinano/fluxxor,SqREL/fluxxor,dantman/fluxxor,hoanglamhuynh/fluxxo... |
b32b1eb4acda8ea21328f8056666ec22421a038e | lib/web-server.js | lib/web-server.js | #!/usr/bin/env node
// Modules
var connect = require('connect'),
fs = require('fs'),
http = require('http'),
path = require('path'),
serveStatic = require('serve-static'),
serveIndex = require('serve-index');
// Variables
var app = connect(),
hookFile = 'web-server-hook.js';
function main(por... | #!/usr/bin/env node
// Modules
var connect = require('connect'),
fs = require('fs'),
http = require('http'),
path = require('path'),
serveStatic = require('serve-static'),
serveIndex = require('serve-index');
// Variables
var app = connect(),
hookFile = 'web-server-hook.js';
function main(por... | Fix inclusion of server hook to use proper relative path | Fix inclusion of server hook to use proper relative path
| JavaScript | mit | itsananderson/node-web-server-cli |
d0c8e97a68089b2fcd94b9921b976a4ff9619fad | tool/src/main/webapp/static/lib/serverDate.js | tool/src/main/webapp/static/lib/serverDate.js | // Small jQuery plugin to get dates from server.
(function($){
var serverDate;
var init = function(){
if (!serverDate) {
$.ajax({
"url": "/course-signup/rest/user/current",
"type": "GET",
"async": false,
"dataType": "json",
... | // Small jQuery plugin to get dates from server.
(function($){
// Work out the difference between client time and server time.
var adjustment;
var init = function(){
if (!adjustment) {
$.ajax({
"url": "/course-signup/rest/user/current",
"type": "GET",
... | Make sure serverdate updates using the client clock. | Make sure serverdate updates using the client clock. | JavaScript | apache-2.0 | ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup |
865c601b1b0fb542733e854087581f12b142c59e | src/components/App/components/UserInputError/UserInputError.js | src/components/App/components/UserInputError/UserInputError.js | import styles from './UserInputError.less';
import React, { Component, PropTypes } from 'react';
import { MIN_FONT_SIZE, MAX_FONT_SIZE } from 'flux/constants/config';
export default class UserInputError extends Component {
static propTypes = {
areColorsValid: PropTypes.bool.isRequired,
isFontSizeValid: Prop... | import styles from './UserInputError.less';
import React, { Component, PropTypes } from 'react';
import { MIN_FONT_SIZE } from 'flux/constants/config';
export default class UserInputError extends Component {
static propTypes = {
areColorsValid: PropTypes.bool.isRequired,
isFontSizeValid: PropTypes.bool.isRe... | Update font size error message | Update font size error message
| JavaScript | mit | moroshko/accessible-colors,moroshko/accessible-colors |
29d0e65927d34f8077c56321c4c145b0fd9d87b3 | test/gameSpec.js | test/gameSpec.js | var game = require('../game.js');
var chai = require('chai');
chai.should();
describe('Game', function() {
describe('createPack', function() {
it('has 52 cards', function() {
var p = game.createPack();
p.should.have.lengthOf(52);
});
});
describe('shuffle', function() {
it('should have ... | var game = require('../game.js');
var chai = require('chai');
chai.should();
describe('Game', function() {
describe('createPack', function() {
it('has 52 cards', function() {
var p = game.createPack();
p.should.have.lengthOf(52);
});
});
describe('shuffle', function() {
it('should have ... | Add some tests for drawing cards | Add some tests for drawing cards
| JavaScript | mit | psmarshall/500,psmarshall/500 |
f9f7ba4eb96ff7bcadfd2c7859d315ff3418e084 | src/components/LastHarvestStatus/LastHarvestStatus.js | src/components/LastHarvestStatus/LastHarvestStatus.js | import React from 'react'
import moment from 'moment'
import { theme } from '../../tools'
let styles = {
chip: {},
}
const LastHarvestStatus = ({harvest}) => {
const date = new Date(harvest.finished || harvest.finishedAt).getTime()
const hoursDifference = moment(date).fromNow()
let status
if (harvest.statu... | import React from 'react'
import moment from 'moment'
import { theme } from '../../tools'
let styles = {
chip: {},
}
const LastHarvestStatus = ({harvest}) => {
const date = new Date(harvest.finished || harvest.finishedAt).getTime()
const hoursDifference = moment(date).fromNow()
let status
if (harvest.statu... | Fix color on last harvested | Fix color on last harvested
| JavaScript | mit | sgmap/inspire,sgmap/inspire |
b60d3007afcddbe61f1aa3a78bacf284907ffcf6 | src/plugins/configure/index.js | src/plugins/configure/index.js | const { next, hookStart, hookEnd } = require('hooter/effects')
const assignDefaults = require('./assignDefaults')
const validateConfig = require('./validateConfig')
const EVENTS_WITH_CONFIG = ['start', 'execute', 'process', 'handle', 'error']
module.exports = function* configurePlugin() {
let schema, config
fu... | const { next, hook, hookStart, hookEnd } = require('hooter/effects')
const assignDefaults = require('./assignDefaults')
const validateConfig = require('./validateConfig')
const EVENTS_WITH_CONFIG = ['start', 'execute', 'process', 'handle', 'error']
module.exports = function* configurePlugin() {
let schema, config... | Use 'hook' to assign defaults | Use 'hook' to assign defaults
| JavaScript | isc | alex-shnayder/comanche |
6629bedfc4b561b3fbacdb5042b7538f6ad3ac80 | app/assets/javascripts/lib/requests.js | app/assets/javascripts/lib/requests.js | import Axios from 'axios';
export function request (url, method, data = {}, options = {scroll: true}) {
let promise = Axios.post(url, data, {
headers: {
'X-HTTP-Method-Override': method,
'X-CSRF-Token': document.querySelector('meta[name=csrf-token]').getAttribute('content')
}
});
... | import Axios from 'axios';
export function request (url, method, data = {}, options = {scroll: true}) {
let promise = Axios.post(url, data, {
headers: {
'X-HTTP-Method-Override': method,
'X-CSRF-Token': document.querySelector('meta[name=csrf-token]').getAttribute('content')
}
});
... | Save scroll position in Firefox. | Save scroll position in Firefox.
| JavaScript | agpl-3.0 | harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o |
37952efe4b53a791028e72ac9419864fcaf6a4f8 | tests/dummy/app/services/store.js | tests/dummy/app/services/store.js | import Ember from 'ember';
import DS from 'ember-data';
import { Offline } from 'ember-flexberry-data';
export default Offline.Store.extend({
init() {
this._super(...arguments);
let owner = Ember.getOwner(this);
let Store = DS.Store;
let onlineStore = Store.create(owner.ownerInjection());
this.se... | import Ember from 'ember';
import DS from 'ember-data';
import { Offline } from 'ember-flexberry-data';
export default Offline.Store.extend({
init() {
this.set('offlineSchema', {
TestDB: {
0.1: {
'ember-flexberry-dummy-suggestion': 'id,address,text,date,votes,moderated,type,author,editor1... | Test dummy-app add offline schema for tests | Test dummy-app add offline schema for tests
| JavaScript | mit | Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data |
a51a480ac80d7123451ed45dca816d445c92d20e | src/routes/control.js | src/routes/control.js | // Manage the SHA of the latest control repository commit.
var restify = require('restify');
var storage = require('../storage');
var log = require('../logging').getLogger();
exports.store = function (req, res, next) {
if (req.params.sha === undefined) {
return next(new restify.InvalidContentError('Missing req... | // Manage the SHA of the latest control repository commit.
var restify = require('restify');
var storage = require('../storage');
var log = require('../logging').getLogger();
exports.store = function (req, res, next) {
if (req.params.sha === undefined) {
return next(new restify.InvalidContentError('Missing req... | Remove a misleading log message. | Remove a misleading log message.
| JavaScript | mit | deconst/content-service,deconst/content-service |
0123500c30cb7acf695d5486b161f3b4ecd3b545 | test/trie.js | test/trie.js | var Trie = require('../app/trie');
describe('Trie', function() {
var trie;
beforeEach(function() {
trie = new Trie();
});
it('should be an object', function() {
expect(trie).to.be.ok;
});
it('should have a root', function() {
expect(trie.root).to.be.ok;
});
it('should have add method', ... | var Trie = require('../app/trie');
describe('Trie', function() {
var trie;
beforeEach(function() {
trie = new Trie();
});
it('should be an object', function() {
expect(trie).to.be.ok;
});
it('should have a root', function() {
expect(trie.root).to.be.ok;
});
it('should have add method', ... | Add test for trimming leading/trailing whitespace | Add test for trimming leading/trailing whitespace
| JavaScript | mit | mgarbacz/nordrassil,mgarbacz/nordrassil |
21c33458f27ade177cdced1f2f9adba321883274 | protractor-demo/conf.js | protractor-demo/conf.js | // An example configuration file.
exports.config = {
// The address of a running selenium server.
//seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// Spec patterns are relative to the location of the s... | // An example configuration file.
exports.config = {
// The address of a running selenium server.
//seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
allScriptsTimeout: 11000,
// Spec patterns are rela... | Add timeouts to protractor demo | Add timeouts to protractor demo
| JavaScript | mit | petebacondarwin/angularjs-testing-presentation |
802462643c25d33f0632b0a58671094277f8a541 | examples/producer.js | examples/producer.js |
var starsky = require('..');
setInterval(function () {
starsky.publish('starsky.test', {
subject: 'test message'
});
}, 1000);
starsky.connect(); |
var starsky = require('..');
starsky.configure(__dirname + '/config.yml');
setInterval(function () {
starsky.publish('starsky.test', {
subject: 'test message'
}, confirm);
}, 1000);
function confirm (err) {
if (err) console.error(err.message);
}
starsky.connect();
| Add confirm callback to example | Add confirm callback to example
| JavaScript | mit | recurly/starsky |
b1e159223635a33ba2c3e5ad239b0dd50baa5bad | src/apps/contacts/middleware/collection.js | src/apps/contacts/middleware/collection.js | const { pick, mapValues, isArray, pickBy, get } = require('lodash')
const { search } = require('../../search/services')
const { transformApiResponseToSearchCollection } = require('../../search/transformers')
const { transformContactToListItem } = require('../transformers')
const removeArray = require('../../../lib/rem... | const { pick, mapValues, isArray, pickBy, get } = require('lodash')
const { search } = require('../../search/services')
const { transformApiResponseToSearchCollection } = require('../../search/transformers')
const { transformContactToListItem } = require('../transformers')
const removeArray = require('../../../lib/rem... | Add support to the contact list middleware for contact name | Add support to the contact list middleware for contact name
| JavaScript | mit | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend |
e235cdc5790481504b81622b52b9049cb97ef5a0 | models/profile.js | models/profile.js | // Profile Model
module.exports = function(sequelize, DataTypes) {
var Profile = sequelize.define('Profile', {
tagLine: {
type: DataTypes.STRING,
allowNull: false
},
description: {
type: DataTypes.TEXT,
allowNull: false
}
}, {
associate: function(models) {
Profile.h... | // Profile Model
module.exports = function(sequelize, DataTypes) {
var Profile = sequelize.define('Profile', {
tagLine: {
type: DataTypes.STRING,
allowNull: false
},
description: {
type: DataTypes.TEXT,
allowNull: false
},
votes: {
type: DataTypes.INTEGER,
defau... | Add 'votes' field to Profile model | Add 'votes' field to Profile model
| JavaScript | mit | kocsenc/nodejs-tutorme,kocsenc/nodejs-tutorme |
ca2cbd5b3f051ac74922da0fa7ab7b3d1f5630a8 | lib/assert-full-equal/utilities.js | lib/assert-full-equal/utilities.js | 'use strict';
function isObject(/* subjects... */) {
var index,
length = arguments.length,
current;
if (length < 1) {
return false;
}
for (index = 0; index < length; index += 1) {
current = arguments[index];
if (('object' !== typeof current) || (null === current)) {
return fal... | 'use strict';
function isObject(/* subjects... */) {
var index,
length = arguments.length,
current;
if (length < 1) {
return false;
}
for (index = 0; index < length; index += 1) {
current = arguments[index];
if (('object' !== typeof current) || (null === current)) {
return fal... | Remove unused `xor` utility function | Remove unused `xor` utility function
| JavaScript | mit | dervus/assert-paranoid-equal |
4da68c1db54090b480551211563610d9a4c45713 | tests/acceptance/css-styles-test.js | tests/acceptance/css-styles-test.js | import { test } from 'qunit';
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';
moduleForAcceptance('Acceptance | css styles');
test('check that Octicons scss is being applied', function(assert) {
visit('/');
andThen(function() {
assert.equal($('.octicon').css('display'), 'inline-b... | import { test } from 'qunit';
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';
moduleForAcceptance('Acceptance | css styles');
test('check that Octicons scss is being applied', function(assert) {
visit('/');
andThen(function() {
assert.equal($('span.octicon').css('display'), 'inli... | Make sure we're testing span | Make sure we're testing span
| JavaScript | mit | kpfefferle/ember-octicons,kpfefferle/ember-cli-octicons,kpfefferle/ember-cli-octicons,kpfefferle/ember-octicons |
57addfba221451214ed59738f528c5febfc5265b | src/types/var-type.js | src/types/var-type.js | const DocumentedItem = require('./item');
class DocumentedVarType extends DocumentedItem {
registerMetaInfo(data) {
this.directData = data;
}
serialize() {
const names = [];
for(const name of this.directData.names) names.push(this.constructor.splitVarName(name));
if(!this.directData.description && !this.di... | const DocumentedItem = require('./item');
class DocumentedVarType extends DocumentedItem {
registerMetaInfo(data) {
this.directData = data;
}
serialize() {
const names = [];
for(const name of this.directData.names) names.push(this.constructor.splitVarName(name));
if(!this.directData.description && !this.di... | Remove dots from generic types | Remove dots from generic types
| JavaScript | apache-2.0 | hydrabolt/discord.js-docgen |
fa071535ee1bd3ea9421d98903d39803558405b8 | back/routes/city.router.js | back/routes/city.router.js | /**
* @fileOverview Routes for City.
*/
var log = require('logg').getLogger('app.router.city');
var HomeCtrl = require('../controllers/city/index.ctrl');
var StaticsCtrl = require('../controllers/city/statics.ctrl');
var router = module.exports = {};
/**
* Initialize routes.
*
* @param {express} app Express ins... | /**
* @fileOverview Routes for City.
*/
var log = require('logg').getLogger('app.router.city');
var HomeCtrl = require('../controllers/city/index.ctrl');
var StaticsCtrl = require('../controllers/city/statics.ctrl');
var TogetherCtrl = require('../controllers/city/together.ctrl');
var router = module.exports = {};
... | Add route for together event | Add route for together event
| JavaScript | mpl-2.0 | WeAreTech/wearetech.io,WeAreRoots/weareroots.org,WeAreTech/wearetech.io |
dcd4c2c790536ee755b42f9cc0a51b5cdb6f04e7 | js/chartist2image-with-svg2bitmap.js | js/chartist2image-with-svg2bitmap.js | window.onload = function() {
createChart('.ct-chart', true);
document.getElementById('button1').onclick = function () {
var chartDivNode = document.getElementById('chart');
var chartSvgNode = chartDivNode.children[0];
SVG2Bitmap(chartSvgNode, document.getElementById('canvas'));
};
document.getE... | window.onload = function() {
// using true as the second parameter we force chartist.js to use plain SVG not <foreignObject>
createChart('.ct-chart', true);
document.getElementById('button1').onclick = function () {
var chartDivNode = document.getElementById('chart');
var chartSvgNode = chartDivNode.ch... | Comment added to the JS code | Comment added to the JS code
| JavaScript | apache-2.0 | giraone/chartist2image,giraone/chartist2image |
097e4552a3f47a38bc4ae97eb53993f13106904e | vendor/ember-cli-qunit/test-loader.js | vendor/ember-cli-qunit/test-loader.js | /* globals jQuery,QUnit */
jQuery(document).ready(function() {
var TestLoader = require('ember-cli/test-loader')['default'];
TestLoader.prototype.shouldLoadModule = function(moduleName) {
return moduleName.match(/\/.*[-_]test$/) || (!QUnit.urlParams.nojshint && moduleName.match(/\.jshint$/));
};
TestLoade... | /* globals jQuery,QUnit */
jQuery(document).ready(function() {
var TestLoaderModule = require('ember-cli/test-loader');
var TestLoader = TestLoaderModule['default'];
var addModuleIncludeMatcher = TestLoaderModule['addModuleIncludeMatcher'];
function moduleMatcher(moduleName) {
return moduleName.match(/\/.... | Use addModuleIncludeMatcher instead of prototype mutation. | Use addModuleIncludeMatcher instead of prototype mutation.
| JavaScript | mit | ember-cli/ember-cli-qunit,nathanhammond/ember-cli-qunit,ember-cli/ember-cli-qunit,nathanhammond/ember-cli-qunit |
407de35036baf8aec2cca3f0bf6dede8870fa327 | public/javascripts/pluginUpload.js | public/javascripts/pluginUpload.js | var MAX_FILE_SIZE = 1048576;
$(function() {
$('#pluginFile').on('change', function() {
var alert = $('.alert-file');
var fileName = $(this).val().trim();
var fileSize = this.files[0].size;
if (!fileName) {
alert.fadeOut(1000);
return;
}
if (f... | var MAX_FILE_SIZE = 1048576;
$(function() {
$('#pluginFile').on('change', function() {
var alert = $('.alert-file');
var fileName = $(this).val().trim();
var fileSize = this.files[0].size;
if (!fileName) {
alert.fadeOut(1000);
return;
}
if (f... | Add spinner to upload button | Add spinner to upload button
Signed-off-by: Walker Crouse <a52c6ce3cf7a08dcbb27377aa79f9b994b446d4c@hotmail.com>
| JavaScript | mit | SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore,SpongePowered/Ore |
2c8a9fb5fe88c71970af1ad428221251136307eb | functions/helper-intents/ask-for-datetime.js | functions/helper-intents/ask-for-datetime.js | // Copyright 2018, Google, Inc.
// 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 required by applicable law or agreed to in wr... | // Copyright 2018, Google, Inc.
// 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 required by applicable law or agreed to in wr... | Remove spaces from datetime SSML response. | Remove spaces from datetime SSML response.
bug: b/124764992
Change-Id: I846c6e96311350215b2237ebc213c12fc4e79610
| JavaScript | apache-2.0 | actions-on-google/dialogflow-helper-intents-nodejs |
33619ceac4f7453c87c02610ef297af0d76beee9 | gulp/tasks/styles.js | gulp/tasks/styles.js | 'use strict';
var config = require('../config');
var gulp = require('gulp');
var sass = require('gulp-sass');
var gulpif = require('gulp-if');
var handleErrors = require('../util/handleErrors');
var browserSync = require('browser-sync');
var autoprefixer = require('gulp-autoprefixer');
gu... | 'use strict';
var config = require('../config');
var gulp = require('gulp');
var sass = require('gulp-sass');
var gulpif = require('gulp-if');
var handleErrors = require('../util/handleErrors');
var browserSync = require('browser-sync');
var autoprefixer = require('gulp-autoprefixer');
gu... | Add option to not break pipe when sass syntax error | Add option to not break pipe when sass syntax error
| JavaScript | mit | loklak/loklak_webclient,loklak/loklak_webclient,aayusharora/loklak_webclient,aayusharora/loklak_webclient,codethejason/loklak_webclient,loklak/loklak_webclient,codethejason/loklak_webclient,codethejason/loklak_webclient,aayusharora/loklak_webclient |
4e7632351780a9fe7ba52616313e7a1b31b410ac | packages/coinstac-ui/app/render/components/projects/dashboard-projects.js | packages/coinstac-ui/app/render/components/projects/dashboard-projects.js | import React, { PropTypes } from 'react';
export default class DashboardProjects extends React.Component { // eslint-disable-line
render() {
return (
<div className="projects">
<div className="page-header clearfix">
<h1 className="pull-left">Projects</h1>
</div>
{this.prop... | import React, { PropTypes } from 'react';
export default class DashboardProjects extends React.Component { // eslint-disable-line
render() {
return (
<div className="projects">
<div className="page-header clearfix">
<h1 className="pull-left">Projects</h1>
</div>
{this.prop... | Fix project dashboard's prop type. | Fix project dashboard's prop type.
| JavaScript | mit | MRN-Code/coinstac,MRN-Code/coinstac,MRN-Code/coinstac |
fe70897411c2109d1cbc725068e96ae177dfdbb9 | lib/composition/node/subelm/index.js | lib/composition/node/subelm/index.js | var Deffy = require("deffy")
function SubElm(data, parent) {
this.name = data.name;
this.label = Deffy(data.label, this.name);
this.type = data.type;
this.id = [this.type, parent.name, this.name].join("_");
}
module.exports = SubElm;
| var Deffy = require("deffy")
, Typpy = require("typpy")
;
function SubElm(type, data, parent) {
if (Typpy(data, SubElm)) {
return data;
}
this.name = data.name || data.event || data.method;
this.label = Deffy(data.label, this.name);
this.type = type;
this.id = [this.type, parent.nam... | Set the sub element name | Set the sub element name
| JavaScript | mit | jillix/engine-builder |
edfeb5b06100df3c2ccc46eb56edc9224624b96b | packages/ember-cli-fastboot/vendor/experimental-render-mode-rehydrate.js | packages/ember-cli-fastboot/vendor/experimental-render-mode-rehydrate.js | (function() {
if (typeof FastBoot === 'undefined') {
var current = document.getElementById('fastboot-body-start');
if (
current &&
typeof Ember.ViewUtils.isSerializationFirstNode === 'function' &&
Ember.ViewUtils.isSerializationFirstNode(current.nextSibling)
) {
Ember.ApplicationI... | (function() {
if (typeof FastBoot === 'undefined') {
var current = document.getElementById('fastboot-body-start');
var Ember = require('ember').default;
if (
current &&
typeof Ember.ViewUtils.isSerializationFirstNode === 'function' &&
Ember.ViewUtils.isSerializationFirstNode(current.nex... | Fix use of Ember global | Fix use of Ember global
Fixes #827
| JavaScript | mit | ember-fastboot/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot |
d3ced289507adb4840c6bfdbb53dc015c864e190 | website/index.js | website/index.js | /* global window */
/* @jsx createElement */
// @flow
// eslint-disable-next-line no-unused-vars
import { createElement } from 'jsx-dom';
import { watch } from '../core';
// $FlowFixMe
import cardInfoHeader from '../assets/tooltip-header-sprite.png';
// $FlowFixMe
import cardInfoBackground from '../assets/tooltip-text... | /* global window */
/* @jsx createElement */
// @flow
// eslint-disable-next-line no-unused-vars
import { createElement } from 'jsx-dom';
import { watch } from '../core';
// $FlowFixMe
import cardInfoHeader from '../assets/tooltip-header-sprite.png';
// $FlowFixMe
import cardInfoBackground from '../assets/tooltip-text... | Fix missing Halis Book font on website | Fix missing Halis Book font on website
| JavaScript | mit | Soreine/hyper-gwent,Soreine/hyper-gwent,Soreine/hyper-gwent |
84a40d835cb1f4d6abcfd44db26b342a6ba8dbb3 | webpack/build.js | webpack/build.js | const esbuild = require("esbuild");
const isProduction = false;
esbuild.buildSync({
entryPoints: ['./src/platform/current/server/serverStartup.ts'],
bundle: true,
outfile: './build/server/js/bundle2.js',
platform: "node",
sourcemap: true,
minify: false,
define: {
"process.env.NODE_ENV": isProduction... | const esbuild = require("esbuild");
const isProduction = false;
esbuild.buildSync({
entryPoints: ['./src/platform/current/server/serverStartup.ts'],
bundle: true,
outfile: './build/server/js/bundle2.js',
platform: "node",
sourcemap: true,
minify: false,
define: {
"process.env.NODE_ENV": isProduction... | Fix crash in intercom on server navigation events | Fix crash in intercom on server navigation events
| JavaScript | mit | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 |
f403af1dfbe36cab61e52f7faafe80a6a3e22e24 | statsd/config.js | statsd/config.js | (function() {
return {
port: 8125,
mgmt_port: 8126,
percentThreshold: [ 50, 75, 90, 95, 98, 99, 99.9, 99.99, 99.999],
graphitePort: parseInt(process.env.GRAPHITE_PORT) || 2003,
graphiteHost: process.env.GRAPHITE_HOST || "127.0.0.1",
flushInterval: 10000,
prefixStats: "statsd",
backends: ['./back... | (function() {
return {
port: 8125,
mgmt_port: 8126,
percentThreshold: [ 50, 75, 90, 95, 98, 99, 99.9, 99.99, 99.999],
graphitePort: parseInt(process.env.GRAPHITE_PORT) || 2003,
graphiteHost: process.env.GRAPHITE_HOST || "127.0.0.1",
flushInterval: 60000,
prefixStats: "statsd",
backends: ['./back... | Set flush to 60s and disable dumpMessages by default | Set flush to 60s and disable dumpMessages by default
| JavaScript | epl-1.0 | ibm-watson-iot/connector-statsd,ibm-watson-iot/connector-statsd |
a169d2ecdb6e7d4457eadfc15f33129847c370ec | app/assets/javascripts/angular/common/models/review-model.js | app/assets/javascripts/angular/common/models/review-model.js | (function(){
'use strict';
angular
.module('secondLead')
.factory('ReviewModel',['Restangular', 'store', function(Restangular, store) {
var currentUser = store.get('user');
return {
getAll: function(dramaID){
return Restangular.one('dramas', dramaID).getList('reviews').$object
... | (function(){
'use strict';
angular
.module('secondLead')
.factory('ReviewModel',['Restangular', 'store', function(Restangular, store) {
var currentUser = store.get('user');
return {
getAll: function(dramaID){
return Restangular.one('dramas', dramaID).getList('reviews').$object
... | Add create and update functions to ang review model | Add create and update functions to ang review model
| JavaScript | mit | ac-adekunle/secondlead,ac-adekunle/secondlead,ac-adekunle/secondlead |
c210a34a20955ac96f5d8bc0913f5aa8e2aa6634 | blueprints/ember-cli-mirage/files/app/mirage/factories/contact.js | blueprints/ember-cli-mirage/files/app/mirage/factories/contact.js | /*
This is an example factory definition. Factories are
used inside acceptance tests.
Create more files in this directory to define additional factories.
*/
import Mirage from 'ember-cli-mirage';
export default Mirage.Factory.extend({
name: 'Pete',
age: 20,
email: (i) => `person${i}@test.com`,
admin: ... | /*
This is an example factory definition. Factories are
used inside acceptance tests.
Create more files in this directory to define additional factories.
*/
import Mirage from 'ember-cli-mirage';
export default Mirage.Factory.extend({
// name: 'Pete', // strings
// age: 20, ... | Update blueprint to use comments | Update blueprint to use comments | JavaScript | mit | unchartedcode/ember-cli-mirage,martinmaillard/ember-cli-mirage,PrecisionNutrition/ember-cli-mirage,mixonic/ember-cli-mirage,kategengler/ember-cli-mirage,flexyford/ember-cli-mirage,rubygiulioni/testing-waffle,lazybensch/ember-cli-mirage,andrei1089/ember-cli-mirage,samselikoff/ember-cli-mirage,alecho/ember-cli-mirage,mak... |
eb26baf49634cc1547b2a8a9be0befac551c11ac | src/app-webapp/app/components/new-question/new-question.js | src/app-webapp/app/components/new-question/new-question.js | import React from 'react'
class NewQuestion extends React.Component {
render () {
return <div>
<h2>Create a New Question</h2>
</div>
}
}
export default NewQuestion
| import React from 'react'
import {
Form, FormGroup, ControlLabel, FormControl, Col
} from 'react-bootstrap'
import Button from 'react-bootstrap-button-loader'
class NewQuestion extends React.Component {
constructor (props) {
super(props)
this.state = { question: '', answer: '', isLoading: false }
this... | Add form for for creating a new question. | Add form for for creating a new question.
| JavaScript | mit | Charterhouse/NextBuild2017,Charterhouse/NextBuild2017,Charterhouse/NextBuild2017 |
5f80a1d7d6737168e211e8e04f70a0baaf2864b5 | app/aptible/torii-provider.js | app/aptible/torii-provider.js | import BaseProvider from "torii/providers/base";
import ajax from "../utils/ajax";
import config from "../config/environment";
export default BaseProvider.extend({
open: function(credentials){
return ajax(config.authBaseUri+'/tokens', {
type: 'POST',
data: credentials
}).catch(function(jqXHR){
... | import BaseProvider from "torii/providers/base";
import ajax from "../utils/ajax";
import config from "../config/environment";
export default BaseProvider.extend({
open: function(credentials){
return ajax(config.authBaseUri+'/tokens', {
type: 'POST',
data: credentials,
xhrFields: { withCredenti... | Send the cookies with the request | Send the cookies with the request
| JavaScript | mit | blakepettersson/dashboard.aptible.com,blakepettersson/dashboard.aptible.com,aptible/dashboard.aptible.com,aptible/dashboard.aptible.com,aptible/dashboard.aptible.com,blakepettersson/dashboard.aptible.com,chasballew/dashboard.aptible.com,chasballew/dashboard.aptible.com,chasballew/dashboard.aptible.com |
7e950ec73d741059adb354a6d65d564a7b27ab5a | scripts/clients/git_diff.js | scripts/clients/git_diff.js | const {
spawn
} = require("child_process");
const gitCommand = "git";
const gitDiff = "diff";
const statOption = "--numstat";
function promisify(child_process) {
return new Promise((resolve, reject) => {
const result = "";
child_process.stdout.on('data', data => {
result.push(data... | const {
spawn
} = require("child_process");
const Promise = require("bluebird").Promise;
const gitCommand = "git";
const gitDiff = "diff";
const statOption = "--numstat";
function promisify(child) {
return new Promise((resolve, reject) => {
let result = "";
child.stdout.on('data', data => {
... | Return output from child process git diff | Return output from child process git diff
| JavaScript | mit | ovidiup13/L5-ProjectSource |
2a138502bf320dcf7b25bfb7340aa6ac00d7e8aa | first_controller/script.js | first_controller/script.js | // Code goes here
/*
* Time to display not just simple data, but data from an object.
*/
var MainController = function($scope, $http) {
$scope.message = "Hello, Angular World!";
var whenGetComplete = function(response) {
$scope.person = response.data;
}
var ifErrorResponse = function(reason) {
$scope.erro... | // Code goes here
/*
* Time to display not just simple data, but data from an object.
*/
var MainController = function($scope, $http) {
$scope.message = "Hello, Angular World!";
var whenGetComplete = function(response) {
$scope.person = response.data;
}
var ifErrorResponse = function(reason) {
$scope.erro... | Correct the GitHub API call; everything works! | Correct the GitHub API call; everything works!
| JavaScript | mit | mrwizard82d1/angular_js_getting_started,mrwizard82d1/angular_js_getting_started |
07a30d57ac292bbb630a78eb58f4995c702222f2 | test/conversorTest.js | test/conversorTest.js | const chai = require('chai')
const exec = require('child_process').exec
var assert = chai.assert
console.log('Testing the app')
describe('Conversion Params', function () {
// Further code for tests goes here
it('If no params', function (done) {
// Test implementation goes here
exec('currencyconv',
... | /*
global describe
global it
*/
const chai = require('chai')
const exec = require('child_process').exec
const path = require('path')
var assert = chai.assert
console.log('Testing the app')
var cmd = 'node ' + path.join(__dirname, '../index.js') + ' '
describe('Conversion Params', function () {
// Further code... | Change the way the test works with the command | Change the way the test works with the command
| JavaScript | mit | duvanmonsa/currency_conversor_cli |
f5822d9e9fd386b46194fd719e6b4b6f8dfcec42 | test/lib/dashycode.js | test/lib/dashycode.js | 'use strict';
const assert = require('assert');
const Dashycode = require('./../../.lib-dist/dashycode');
describe('Dashycode', function () {
// Technically we should be testing for values up to 0x10FFFF, but we will
// never see any above 0xFFFF because of how SockJS works.
const codepoints = Array.from({length: ... | 'use strict';
const assert = require('assert');
const Dashycode = require('./../../.lib-dist/dashycode');
describe('Dashycode', function () {
// Technically we should be testing for values up to 0x10FFFF, but we will
// never see any above 0xFFFF because of how SockJS works.
const codepoints = Array.from({length: ... | Remove unused parameter from function in Dashycode's unit tests | Remove unused parameter from function in Dashycode's unit tests
| JavaScript | mit | sirDonovan/Pokemon-Showdown,sirDonovan/Pokemon-Showdown,svivian/Pokemon-Showdown,QuiteQuiet/Pokemon-Showdown,xfix/Pokemon-Showdown,urkerab/Pokemon-Showdown,panpawn/Gold-Server,Zarel/Pokemon-Showdown,urkerab/Pokemon-Showdown,jumbowhales/Pokemon-Showdown,Enigami/Pokemon-Showdown,Zarel/Pokemon-Showdown,Zarel/Pokemon-Showd... |
3223750e3abc0b941331c960b6c3afa027ef31dc | find-core/src/main/public/static/js/find/app/page/search/results/query-strategy.js | find-core/src/main/public/static/js/find/app/page/search/results/query-strategy.js | /*
* Copyright 2015 Hewlett-Packard Development Company, L.P.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
*/
define([], function () {
"use strict";
function displayPromotions() {
return true;
}
function requestParams(qu... | /*
* Copyright 2015 Hewlett-Packard Development Company, L.P.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
*/
define([], function () {
"use strict";
function displayPromotions() {
return true;
}
function requestParams(qu... | Disable spellcheck/auto correct as there are platform issues with it | Disable spellcheck/auto correct as there are platform issues with it
| JavaScript | mit | LinkPowerHK/find,hpe-idol/find,LinkPowerHK/find,LinkPowerHK/find,hpe-idol/java-powerpoint-report,hpautonomy/find,hpautonomy/find,LinkPowerHK/find,hpautonomy/find,hpautonomy/find,hpe-idol/java-powerpoint-report,hpe-idol/find,hpe-idol/find,LinkPowerHK/find,hpe-idol/find,hpe-idol/find,hpautonomy/find |
bc077131bfdef8a35e54bdb61089914d376fdc59 | src/middleware.js | src/middleware.js | class Middleware {
constructor() {
}
before(event) {
}
after(event) {
}
}
module.exports = Middleware | class Middleware {
constructor() {
}
before(event) {
return event
}
after(event) {
return event
}
}
module.exports = Middleware | Make sure stub methods return event. | Make sure stub methods return event.
| JavaScript | mit | surebot/Eventline,surebot/Eventline |
7050035874fdd5d42d5e74617011201f9595065d | native/components/thread-visibility.react.js | native/components/thread-visibility.react.js | // @flow
import * as React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { threadTypes, type ThreadType } from 'lib/types/thread-types';
type Props = {|
+threadType: ThreadType,
+color: string,
|};
function ThreadVisibility... | // @flow
import * as React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { threadTypes, type ThreadType } from 'lib/types/thread-types';
import ThreadIcon from './thread-icon.react';
type Props = {|
+threadType: ThreadType,
+color: string,
|};
function ThreadVisibility(props: Props... | Make thread-visiblity icon use thread-icon | Make thread-visiblity icon use thread-icon
Summary: Made it so thread-visiblity uses thread-icon.react.js instead of its own icon.
Test Plan: Checked in thread settings to see if icon still worked. Also checked private threads before and after updates to make sure they still work. And also made sure normal threads st... | JavaScript | bsd-3-clause | Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal |
b4181ef46197cdaf830014e57f42d97efdebec92 | src/components/FormViewerContainer.js | src/components/FormViewerContainer.js | import {
connect
} from "react-redux";
import FormViewer from "./FormViewer";
const mapStateToProps = (state) => {
const points = state.waterlines.filter((offset) => {
return offset && offset.x != undefined && offset.y != undefined;
});
points.push(...state.buttocks.filter((offset) => {
... | import {
connect
} from "react-redux";
import FormViewer from "./FormViewer";
const mapStateToProps = (state) => {
const points = state.waterlines.filter((offset) => {
return offset && offset.x !== undefined && offset.y !== undefined;
});
points.push(...state.buttocks.filter((offset) => {
... | Sort points based on order, waterlines and buttocks fully integrated now | Sort points based on order, waterlines and buttocks fully integrated now
| JavaScript | apache-2.0 | sel129/lofter,sel129/lofter |
dc51280c20545b07c9dc7bb0cd11dd60384e9b79 | test/exceptions/minified_code.spec.js | test/exceptions/minified_code.spec.js | var context = require('../../src/exceptions/context')
describe("Minified code detection", function() {
it("Empty source returns false", function() {
expect(context.isSourceMinified('')).toBe(false)
})
it("Minified JS Bundle returns true", function() {
var source = require('./data/bundle.js')
expect(cont... | var context = require('../../src/exceptions/context')
describe("isSourceMinified", function() {
it("Empty source returns false", function() {
expect(context.isSourceMinified('')).toBe(false)
})
it("Minified JS Bundle returns true", function() {
var source = require('./data/bundle.js')
expect(context.isS... | Add tests of minified code detection logic | Add tests of minified code detection logic
| JavaScript | mit | opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-angular,jahtalab/opbeat-js,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-react,opbeat/opbeat-js-core,opbeat/opbeat-js-core,jahtalab/opbeat-js,jahtalab/opbeat-js |
ee7042ed28b7e15087543b59609e74276bf5befa | nodejs_projects/basic_nodejs_samples/read.js | nodejs_projects/basic_nodejs_samples/read.js | logMessage("Script Begins!");
var Galileo = require("galileo-io");
var board = new Galileo();
var previousData = 0;
logMessage("Setting Ready event for the Galileo Board");
board.on("ready", galileoReadyHandler);
logMessage("Root Execution Complete!");
/*
* Contains the logic for when the Galileo Board is Ready
* @... | logMessage("Script Begins!");
var Galileo = require("galileo-io");
var board = new Galileo();
var previousData = 0;
logMessage("Setting Ready event for the Galileo Board");
board.on("ready", galileoReadyHandler);
logMessage("Root Execution Complete!");
/*
* Contains the logic for when the Galileo Board is Ready
* @... | Tidy code for basic examples on NodeJS | Tidy code for basic examples on NodeJS | JavaScript | mit | janunezc/GALILEO,janunezc/GALILEO,janunezc/GALILEO |
5897c870fa46c8844c3f0bc92d8888377eb0f2ce | ui/src/registrator/PrihlaskyDohlasky/Input/InputActions.js | ui/src/registrator/PrihlaskyDohlasky/Input/InputActions.js | // eslint-disable-next-line import/prefer-default-export
export const createInputChanged = actionPrefix => (name, event) => ({
type: `${actionPrefix}_INPUT_CHANGED`,
name,
id: event.target.id,
startovne: event.target.nonce,
value: event.target.type === 'checkbox' ? event.target.checked : event.target.value
})... | // eslint-disable-next-line import/prefer-default-export
export const createInputChanged = actionPrefix => (name, event) => {
const action = {
type: `${actionPrefix}_INPUT_CHANGED`,
name,
id: event.target.id,
value: event.target.type === 'checkbox' ? event.target.checked : event.target.value
};
i... | Convert startovne to a number. | Convert startovne to a number.
| JavaScript | mit | ivosh/jcm2018,ivosh/jcm2018,ivosh/jcm2018 |
47048495b692d66fdd3ef3c7e472705e455ddd29 | frontend/src/core/Store.js | frontend/src/core/Store.js | import {createStore, compose, applyMiddleware} from 'redux';
import {devTools, persistState} from 'redux-devtools';
import thunkMiddleware from 'redux-thunk';
import travelApp from 'reducers/Reducers.js';
const enhancedCreateStore = compose(
applyMiddleware(
thunkMiddleware),
devTools(),
persistState(window.... | import {createStore, compose, applyMiddleware} from 'redux';
import {devTools, persistState} from 'redux-devtools';
import thunkMiddleware from 'redux-thunk';
import createLogger from 'redux-logger';
import travelApp from 'reducers/Reducers.js';
const logger = createLogger();
const enhancedCreateStore = compose(
ap... | Apply the logger as middleware | Apply the logger as middleware
| JavaScript | agpl-3.0 | jilljenn/voyageavecmoi,jilljenn/voyageavecmoi,jilljenn/voyageavecmoi |
25519614f435bc1f0e277e823fe17ffd9a89f240 | app/boxoffice.block/boxoffice.block.js | app/boxoffice.block/boxoffice.block.js | 'use strict';
angular.module('ticketbox.boxoffice.block', [
'ngRoute',
'ticketbox.config',
'ticketbox.components.api',
'ticketbox.common.seatplan.handlers',
'ticketbox.components.seatplan',
'ticketbox.components.reserver',
'ticketbox.boxoffice.toolbar'])
.config(function($routeProvider... | 'use strict';
angular.module('ticketbox.boxoffice.block', [
'ngRoute',
'ticketbox.config',
'ticketbox.components.api',
'ticketbox.common.seatplan.handlers',
'ticketbox.components.seatplan',
'ticketbox.components.reserver',
'ticketbox.boxoffice.toolbar'])
.config(function($routeProvider... | Set back number of seats when unspecified seats are reserved | Set back number of seats when unspecified seats are reserved
| JavaScript | mit | ssigg/ticketbox-client-angularjs,ssigg/ticketbox-client-angularjs |
79885e0a2710b2be0bad18c2fac206e129cbdbf6 | get-flashplayer-program.js | get-flashplayer-program.js | var inspect = require("util").inspect
var path = require("path")
module.exports = function (callback) {
try_in_order([
function (callback) {
if (process.env.RUN_SWF_VERBOSE) {
console.warn("run-swf: looking for $FLASHPLAYER...")
}
if (process.env.FLASHPLAYER) {
get_program(proc... | var inspect = require("util").inspect
var fs = require("fs")
module.exports = function (callback) {
try_in_order([
function (callback) {
if (process.env.RUN_SWF_VERBOSE) {
console.warn("run-swf: looking for $FLASHPLAYER...")
}
if (process.env.FLASHPLAYER) {
get_program(process.... | Use fs.exists instead of path.exists | Use fs.exists instead of path.exists
| JavaScript | mit | dbrock/stdio.as,dbrock/stdio.as,dbrock/stdio.as |
475b9aa8146e6e4307c0fac0df76e3810c4eb9d3 | tests/unit/utils/round-number-test.js | tests/unit/utils/round-number-test.js | import roundNumber from 'dummy/utils/round-number';
import { module, test } from 'qunit';
module('Unit | Utility | round number');
test('it rounds a number to two decimal places by default', function(assert) {
let result = roundNumber(123.123);
assert.equal(result, 123.12);
});
test('it rounds a number to a conf... | import roundNumber from 'dummy/utils/round-number';
import { module, test } from 'qunit';
module('Unit | Utility | round number');
test('it rounds a number to two decimal places by default', function(assert) {
let result = roundNumber(123.123);
assert.equal(result, 123.12);
});
test('it rounds a number to a conf... | Add Unit Test For precision=0 | Add Unit Test For precision=0
| JavaScript | mit | PrecisionNutrition/unit-utils,PrecisionNutrition/unit-utils |
09a038dde6ea453fafad4899c43746e461c24a40 | test/index.js | test/index.js | var assert = require('chai').assert;
var StorageService = require('../');
var AmazonStorage = StorageService.AmazonStorage;
describe('Factory Method', function () {
it('Should properly export', function () {
assert.isObject(StorageService);
assert.isFunction(StorageService.create);
assert.isFunction(Stor... | var assert = require('chai').assert;
var StorageService = require('../');
var AmazonStorage = StorageService.AmazonStorage;
describe('Factory Method', function () {
it('Should properly export', function () {
assert.isObject(StorageService);
assert.isFunction(StorageService.create);
assert.isFunction(Stor... | Improve test coverage for StorageService | Improve test coverage for StorageService
| JavaScript | mit | ghaiklor/sails-service-storage |
fe00fb8e58535abb1818bcbe3dfb4a780c4d8558 | providers/latest-provider/index.js | providers/latest-provider/index.js | import { useEffect, useMemo } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import reducerRegistry from 'redux/registry';
import * as actions from './actions';
import { getLatestProps } from './selectors';
import reducers, { initialState } from './reducers';
const LatestProv... | import { PureComponent } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import reducerRegistry from 'redux/registry';
import isEqual from 'lodash/isEqual';
import * as actions from './actions';
import { getLatestProps } from './selectors';
import reducers, { initialState } fro... | Fix loop if same provider endpoints | Fix loop if same provider endpoints
| JavaScript | mit | Vizzuality/gfw,Vizzuality/gfw |
6d3ae8de4e99fc2fb925b3a645b8549756ccdb11 | website/mcapp.projects/src/app/project/home/mc-project-home-reminders.components.js | website/mcapp.projects/src/app/project/home/mc-project-home-reminders.components.js | class MCProjectHomeRemindersComponentController {
/*@ngInject*/
constructor(projectsAPI) {
this.projectsAPI = projectsAPI;
}
removeReminder(index) {
this.project.reminders.splice(index, 1);
}
addReminder() {
this.project.reminders.push({note: '', status: 'none'});
}... | class MCProjectHomeRemindersComponentController {
/*@ngInject*/
constructor(projectsAPI) {
this.projectsAPI = projectsAPI;
}
removeReminder(index) {
this.project.reminders.splice(index, 1);
this.projectsAPI.updateProject(this.project.id, {reminders: this.project.reminders});
... | Delete project reminder on backend | Delete project reminder on backend
When a reminder is deleted on the front-end ensure that it is also deleted on the backend.
| JavaScript | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org |
413642773139e4d18c3c07193a873f98136fbad8 | src/components/panel/editForm/Panel.edit.display.js | src/components/panel/editForm/Panel.edit.display.js | export default [
{
weight: 10,
type: 'textfield',
input: true,
placeholder: 'Panel Title',
label: 'Title',
key: 'title',
tooltip: 'The title text that appears in the header of this panel.'
},
{
weight: 20,
type: 'textarea',
input: true,
key: 'tooltip',
label: 'Toolt... | export default [
{
key: 'label',
hidden: true,
calculateValue: 'value = data.title'
},
{
weight: 1,
type: 'textfield',
input: true,
placeholder: 'Panel Title',
label: 'Title',
key: 'title',
tooltip: 'The title text that appears in the header of this panel.'
},
{
wei... | Hide the label settings for Panels since they have a title field. | Hide the label settings for Panels since they have a title field.
| JavaScript | mit | formio/formio.js,formio/formio.js,formio/formio.js |
ede88730cd71028cf01cd6a43d80e0b14622eccc | apps/jsgi/main.js | apps/jsgi/main.js | // start the web server. (we'll soon write a dedicated script to do this.)
if (module.id === require.main) {
require('ringo/httpserver').start();
}
| // start the web server. (we'll soon write a dedicated script to do this.)
if (module == require.main) {
require('ringo/webapp').start();
}
| Make jsgi demo app run again | Make jsgi demo app run again
| JavaScript | apache-2.0 | oberhamsi/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,Transcordia/ringojs,Transcordia/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,oberhamsi/ringojs,ringo/ringojs |
eb0bf2ff537bf74fc8027074380870d473af03b7 | Restaurant.js | Restaurant.js | import React from 'react'
import RestaurantModel from './RestaurantModel'
class Restaurant extends React.Component {
constructor(props) {
super(props)
this.displayName = "Restaurant"
}
render() {
// helper for code simplicity.
var model = this.props.model
// Controller calculats food icon f... | import React from 'react'
import RestaurantModel from './RestaurantModel'
class Restaurant extends React.Component {
constructor(props) {
super(props)
this.displayName = "Restaurant"
}
render() {
// helper for code simplicity.
var model = this.props.model
// Controller calculats food icon f... | Use better css selector naming. | Use better css selector naming.
Fixes https://github.com/maximveksler/EatWell/pull/2#discussion_r60944809
| JavaScript | apache-2.0 | maximveksler/EatWell,maximveksler/EatWell |
0d50135bf62bcb3bd2e8d5a978ecb4c2f1599d1d | src/client/app/core/core.routes.js | src/client/app/core/core.routes.js | (function () {
'use strict';
angular
.module('app.core')
.run(function($rootScope, $state) {
return $rootScope.$on('$stateChangeStart', function() {
return $rootScope.$state = $state;
});
})
.config(function ($stateProvider, $urlRouterProv... | (function () {
'use strict';
angular
.module('app.core')
.run(function($rootScope, $state) {
return $rootScope.$on('$stateChangeStart', function() {
$rootScope.$state = $state;
});
})
.config(function ($stateProvider, $urlRouterProvider) {... | Correct code to remove JSHint error "Did you mean to return a conditional instead of an assignment?" | Correct code to remove JSHint error "Did you mean to return a conditional instead of an assignment?"
| JavaScript | mit | MAustinMMDP/web-brownie,MAustinMMDP/web-brownie |
b02b5ddc87d50fd64808f54d026c3e5675fd9973 | app/store/configureStore.js | app/store/configureStore.js | import { createStore, applyMiddleware } from 'redux'
import rootReducer from '../reducers'
import thunkMiddleware from 'redux-thunk'
import createLogger from 'redux-logger'
const loggerMiddleware = createLogger()
export default function configureStore(initialState) {
return createStore(
rootReducer,
applyM... | import { createStore, applyMiddleware } from 'redux'
import rootReducer from '../reducers'
import thunkMiddleware from 'redux-thunk'
import createLogger from 'redux-logger'
const loggerMiddleware = createLogger()
export default function configureStore(initialState) {
const store = createStore(
rootReducer,
... | Enable store module hot loading | Enable store module hot loading
| JavaScript | mit | UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile |
b06754b77fa01e847b959f823fe9d19c44b1aaa4 | ui/protractor.conf.js | ui/protractor.conf.js | const ts = require('ts-node')
exports.config = {
baseUrl: 'http://localhost:3000',
specs: ['test-e2e/**/*.spec.ts'],
directConnect: true,
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': [
'--show-fps-counter',
'--no-default-browser-check',
'--no-first-r... | const ts = require('ts-node')
exports.config = {
baseUrl: 'http://localhost:3000',
specs: ['test-e2e/**/*.spec.ts'],
directConnect: true,
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': [
'--show-fps-counter',
'--no-default-browser-check',
'--no-first-r... | Use before-lauch as highlighted in the protractor docs. | Use before-lauch as highlighted in the protractor docs.
| JavaScript | mit | jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr |
80b744b2af3964abf6d1c26991bebd4070cbc19d | jquery.focusleave.js | jquery.focusleave.js | (function ( $ ) {
$.fn.onFocusLeave = function(cb) {
return this.each(function() {
var $this = $(this),
timeout;
$(this).on('focusout', function(e) {
timeout = window.setTimeout(function(){cb($this);}, 50);
});
$(this).on('... | (function ( $ ) {
$.fn.onFocusLeave = function(cb) {
return this.each(function() {
var $this = $(this),
timeout;
$this.on('focusout', function(e) {
timeout = window.setTimeout(function(){cb($this);}, 50);
});
$this.on('focu... | Use cached version of $this | Use cached version of $this
| JavaScript | mit | ianmcburnie/jquery-focusexit-js |
c3f8a9bed2417d96a88890d43c16e2323cbea730 | src/repositories/PlayersStats.test.js | src/repositories/PlayersStats.test.js | import PlayersStats from './PlayersStats'
test('should add player stat to collection', () => {
// given
let repository = new PlayersStats([])
let playerStats = { id: 1, data: 'some-data' }
// when
let added = repository.add(playerStats)
// then
expect(added).toBeTruthy()
expect(repository.all().lengt... | import PlayersStats from './PlayersStats'
test('should add player stat to collection', () => {
// given
let repository = new PlayersStats()
let playerStats = { id: 1, data: 'some-data' }
// when
let added = repository.add(playerStats)
// then
expect(added).toBeTruthy()
expect(repository.all().length)... | Test playersstats without default empty array | Test playersstats without default empty array
| JavaScript | mit | chagasaway/nba-players-scrapper |
90423ebf435d8c3dbb66af12729ad9d2a0475a0c | src/foam/apploader/ModelRefines.js | src/foam/apploader/ModelRefines.js | foam.CLASS({
package: 'foam.apploader',
name: 'ModelRefines',
refines: 'foam.core.Model',
methods: [
{
name: 'getClassDeps',
code: function() {
var deps = this.requires ?
this.requires.map(function(r) { return r.path }) :
[];
deps = deps.concat(this.imple... | foam.CLASS({
package: 'foam.apploader',
name: 'ModelRefines',
refines: 'foam.core.Model',
methods: [
{
name: 'getClassDeps',
code: function() {
var deps = this.requires ?
this.requires.map(function(r) { return r.path }) :
[];
deps = deps.concat(this.imple... | Add refines to getClassDeps and prepend any deps with no package with 'foam.core.' | Add refines to getClassDeps and prepend any deps with no package with 'foam.core.'
| JavaScript | apache-2.0 | jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2 |
3c48a5d5af10d9b9d6a13fcde859b1d7d91f70e5 | commands/randomness_commands.js | commands/randomness_commands.js |
module.exports = {
factcheck: (message, _, msg) => {
const bool1 = (Math.random() > 0.5);
const bool2 = (Math.random() > 0.5);
let str;
if (msg) {
str = `${message.author}'s claim, "${msg}",`;
str = bool1 ? `${str} is obviously ${bool2.toString()}.`
... |
module.exports = {
factcheck: (message, _, msg) => {
const bool1 = (Math.random() > 0.5);
const bool2 = (Math.random() > 0.5);
let str;
if (msg) {
str = `${message.author}'s claim, "${msg}",`;
str = bool1 ? `${str} is obviously ${bool2.toString()}.`
... | Add images to coin command | Add images to coin command
| JavaScript | mit | Rafer45/soup |
4c2fefb8422f93ef861fe171bcc73273de577153 | addon/pods/components/rui-icon/component.js | addon/pods/components/rui-icon/component.js | import Ember from 'ember';
import layout from './template';
export default Ember.Component.extend({
layout: layout,
tagName: 'i',
classNames: ['fa'],
classNameBindings: ['nameComputed'],
// Constructors
classPrefix: 'fa',
// Computed
nameComputed: Ember.computed('style', function() {
// Builds th... | import Ember from 'ember';
import layout from './template';
export default Ember.Component.extend({
layout: layout,
tagName: 'i',
classNames: ['fa'],
classNameBindings: ['nameComputed'],
// Constructors
classPrefix: 'fa',
// Computed
nameComputed: Ember.computed('name', function() {
// Builds the... | Change computed to update on name change | Change computed to update on name change
| JavaScript | mit | revelation/ember-cli-revelation-ui,revelation/ember-cli-revelation-ui |
6489f67e37a39828a2553c0913c4f1ee5b201835 | test/let_tests.js | test/let_tests.js | var expect = require('chai').expect;
describe('let', function() {
it('variables declared with let are accessible within nested blocks', function() {
'use strict';
let foo = 'bar';
if (true) {
expect(foo).to.equal('bar');
}
});
});
| 'use strict';
var expect = require('chai').expect;
describe('let', function() {
it('variables declared with let are accessible within nested blocks', function() {
let foo = 'bar';
if (true) {
expect(foo).to.equal('bar');
}
});
});
| Use string for all tests | Use string for all tests
| JavaScript | mit | chrisneave/es2015-demo |
5ec387aa829d0f9bef9b1e2871491c4c30fcf188 | shells/browser/shared/src/renderer.js | shells/browser/shared/src/renderer.js | /**
* In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts.
* Since it is a complex file (with imports) we can't just toString() it like we do with the hook itself,
* So this entry point (one of the web_accessible_resources) provcides a way to eagerly injec... | /**
* In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts.
* Since it is a complex file (with imports) we can't just toString() it like we do with the hook itself,
* So this entry point (one of the web_accessible_resources) provcides a way to eagerly injec... | Mark reload-and-profile attach as configurable | Mark reload-and-profile attach as configurable
| JavaScript | mit | rickbeerendonk/react,billfeller/react,chenglou/react,billfeller/react,acdlite/react,acdlite/react,trueadm/react,flarnie/react,acdlite/react,glenjamin/react,yungsters/react,terminatorheart/react,camsong/react,tomocchino/react,Simek/react,mjackson/react,tomocchino/react,trueadm/react,TheBlasfem/react,rickbeerendonk/react... |
d4aea530dd9588dd23cfb0a914be138626a4bd43 | input/fixture.js | input/fixture.js | 'use strict';
/* eslint-disable indent */
module.exports = function(tx) {
var body = tx.get('body');
tx.create({
id: 'title',
type: 'heading',
level: 1,
content: 'Input Element'
});
body.show('title');
tx.create({
id: 'intro',
type: 'paragraph',
content: [
"You can use cus... | 'use strict';
/* eslint-disable indent */
module.exports = function(tx) {
var body = tx.get('body');
tx.create({
id: 'title',
type: 'heading',
level: 1,
content: 'Input Element'
});
body.show('title');
tx.create({
id: 'intro',
type: 'paragraph',
content: [
"You can use cus... | Add more description to input example. | Add more description to input example.
| JavaScript | mit | philschatz/substance-editor,substance/examples,substance/examples,philschatz/substance-editor,substance/demos,substance/demos |
f5ae5d64c43915af9e2da0ab1f1c08c94b7249e1 | app/containers/NavigationContainer/sagas.js | app/containers/NavigationContainer/sagas.js | // import { take, call, put, select } from 'redux-saga/effects';
import { REQUEST_TOPICS } from './constants';
import { takeLatest } from 'redux-saga';
import { call } from 'redux-saga/effects';
export function fetchTopicsFromServer() {
return fetch('http://locahost:3000/api/topics')
.then(response => response.j... | // import { take, call, put, select } from 'redux-saga/effects';
import { REQUEST_TOPICS } from './constants';
import { takeLatest } from 'redux-saga';
import { call, put } from 'redux-saga/effects';
import { requestTopicsSucceeded, requestTopicsFailed } from './actions';
export function fetchTopicsFromServer() {
re... | Handle response from server in saga | Handle response from server in saga
| JavaScript | mit | GeertHuls/react-async-saga-example,GeertHuls/react-async-saga-example |
9703839e2484f4bd603c65f02ca6ca3dad30f2d2 | src/main/webapp/js/imcms/components/imcms_displacing_array.js | src/main/webapp/js/imcms/components/imcms_displacing_array.js | /**
* Array with fixed max length and displacing first element on oversize.
*
* @author Serhii Maksymchuk from Ubrainians for imCode
* 10.05.18
*/
Imcms.define('imcms-displacing-array', [], function () {
var DisplacingArray = function (size) {
if (typeof size !== 'number') throw new Error("Size should... | /**
* Array with fixed max length and displacing first element on oversize.
*
* @author Serhii Maksymchuk from Ubrainians for imCode
* 10.05.18
*/
Imcms.define('imcms-displacing-array', [], function () {
var DisplacingArray = function (size) {
if (typeof size !== 'number') throw new Error("Size should... | Add a "pin" icon to imCMS's panel: - Refreshing elements length for displacing array. | IMCMS-290: Add a "pin" icon to imCMS's panel:
- Refreshing elements length for displacing array.
| JavaScript | agpl-3.0 | imCodePartnerAB/imcms,imCodePartnerAB/imcms,imCodePartnerAB/imcms |
d9a3ed959f61ddf0af6a393305486cfd02ac988d | js/shiv-test-util.js | js/shiv-test-util.js | if (!shiv) {
throw(new Error("Don't load this file directly! Use shiv.load()"));
}
shiv.test(
"shiv.map",
function() {
return shiv.map([1,2,3], function(x) { return x * 2; });
},
function(res) {
return (
(res[0] == 1) &&
(res[1] == 4) &&
(res[2] == 6)
);
}
);
| if (!shiv) {
throw(new Error("Don't load this file directly! Use shiv.load()"));
}
shiv.test(
"shiv.map",
function() {
return shiv.map([1,2,3], function(x) { return x * 2; });
},
function(res) {
//
// Array equality has to be tested element by element in JS
//
return (
(res[0] == ... | Comment added to shiv.map test | Comment added to shiv.map test
| JavaScript | mit | michiel/shivjs |
622ea2706b200059053e311b14e8cd7e44c8942c | test/selectors/petitionSupportable.js | test/selectors/petitionSupportable.js | import { assert } from 'chai';
import getPetionSupportable from 'selectors/petitionSupportable';
describe('getPetionSupportable', () => {
context('with a new petition', () => {
const actual = getPetionSupportable({});
const expected = false;
it('returns false', () => assert.equal(actual, expected));
}... | import { assert } from 'chai';
import getPetitionSupportable from 'selectors/petitionSupportable';
describe('getPetitionSupportable', () => {
context('with a new petition', () => {
const actual = getPetitionSupportable({});
const expected = false;
it('returns false', () => assert.equal(actual, expected)... | Fix a typo in selector test | Fix a typo in selector test
| JavaScript | apache-2.0 | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend |
e033432500d70b2a0ea04fd0548a665d6ec4bf2f | api/src/lib/form-handler.js | api/src/lib/form-handler.js | const logger = require('./logger');
module.exports = (
userService,
themeService,
clientService
) => {
return (templateName, getView, postHandler) => async (request, reply, source, error) => {
if (error && error.output.statusCode === 404) {
reply(error);
}
try {
const client = await cli... | const logger = require('./logger');
module.exports = (
userService,
themeService,
clientService
) => {
return (templateName, getView, postHandler) => async (request, reply, source, error) => {
if (error && error.output.statusCode === 404) {
return reply(error);
}
try {
const client = aw... | Add return to replies so they don't get called multiple times | Add return to replies so they don't get called multiple times
| JavaScript | mit | synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform |
33b118bba40c4cd86e6bef67d375422e9bb02490 | src/actions/settings.js | src/actions/settings.js | import * as types from './types';
export function updateField(key, value) {
return {
type: types.SETTING_UPDATE,
payload: {
key,
value,
},
};
}
| import {
CHECKBOX_UPDATE,
RANGE_UPDATE,
FUZZY,
} from './types';
export function updateCheckbox(key, value) {
return {
type: CHECKBOX_UPDATE,
payload: {
key,
value,
},
};
}
export function updateFuzzyCheckbox(key, value) {
return {
type: FUZZY + CHECKBOX_UPDATE,
payload: {... | Add actions for handling setting state in the background | Add actions for handling setting state in the background
| JavaScript | mit | reblws/tab-search,reblws/tab-search |
469dc586285709a67cd2b1ebc0470df9baba5a90 | packages/react-proxy/modules/requestForceUpdateAll.js | packages/react-proxy/modules/requestForceUpdateAll.js | var deepForceUpdate = require('./deepForceUpdate');
var isRequestPending = false;
module.exports = function requestForceUpdateAll(getRootInstances, React) {
if (isRequestPending) {
return;
}
/**
* Forces deep re-render of all mounted React components.
* Hat's off to Omar Skalli (@Chetane) for suggest... | var deepForceUpdate = require('./deepForceUpdate');
var isRequestPending = false;
module.exports = function requestForceUpdateAll(getRootInstances, React) {
if (isRequestPending) {
return;
}
/**
* Forces deep re-render of all mounted React components.
* Hat's off to Omar Skalli (@Chetane) for suggest... | Fix usage with external React on 0.13+ | Fix usage with external React on 0.13+
| JavaScript | mit | gaearon/react-hot-loader,gaearon/react-hot-loader |
8c69a9c5faf7d8a6238be02fca5b026e33dede48 | adapters/axios.js | adapters/axios.js | require('native-promise-only');
var axios = require('axios');
var Axios = function(settings) {
return new Promise(function(resolve, reject) {
var options = {
method: settings.type.toLowerCase(),
url: settings.url,
responseType: "text"
};
if (settings.headers) {
options.headers = s... | var extend = require('../utils').extend;
require('native-promise-only');
var axios = require('axios');
var Axios = function(settings) {
return new Promise(function(resolve, reject) {
var options = {
method: settings.type.toLowerCase(),
url: settings.url,
responseType: "text",
headers: {
... | Use application/json as default content-type with Axios | Use application/json as default content-type with Axios
| JavaScript | mit | hoppula/vertebrae,hoppula/vertebrae |
d87500c1aadbfb56a059a8855c79448a11ed9d99 | tests/integration/components/froala-content-test.js | tests/integration/components/froala-content-test.js | import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | froala-content', function(hooks) {
setupRenderingTest(hooks);
test('.fr-view class is applied', asyn... | import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import $ from 'jquery';
module('Integration | Component | froala-content', function(hooks) {
setupRenderingTest(hooks);
test('.fr-view... | Remove usage of ember jquery integration in tests | Remove usage of ember jquery integration in tests
Note, the ember-jquery addon re-enables usage of this.$() within components without a depreciation warning.
https://deprecations.emberjs.com/v3.x/#toc_jquery-apis
| JavaScript | mit | Panman8201/ember-froala-editor,froala/ember-froala-editor,froala/ember-froala-editor,Panman8201/ember-froala-editor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.