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 |
|---|---|---|---|---|---|---|---|---|---|
be8aa6973a1c9aafe2fd39775fc0da9036b47dea | addon/components/ef-list.js | addon/components/ef-list.js | import Component from 'ember-forge-ui/components/ef-list';
import Ember from 'ember';
const {
computed,
get
} = Ember;
/**
* @module
* @augments ember-forge-ui/components/ef-list
*/
export default Component.extend({
// -------------------------------------------------------------------------
// Dependenci... | import Component from 'ember-forge-ui/components/ef-list';
import Ember from 'ember';
const {
get
} = Ember;
/**
* @module
* @augments ember-forge-ui/components/ef-list
*/
export default Component.extend({
// -------------------------------------------------------------------------
// Dependencies
// ---... | Improve jQuery object iteration; remove unused deconstructed property | Improve jQuery object iteration; remove unused deconstructed property
| JavaScript | mit | ember-forge/ember-forge-ui-bootstrap4,ember-forge/ember-forge-ui-bootstrap4 |
451344a50a926183f5ec607d4e1eaa79762d8000 | client/src/components/Jobs/Jobs.js | client/src/components/Jobs/Jobs.js | import React from 'react';
import FeaturedItems from '../FeaturedItems';
import ItemCard from '../ItemCard';
const Jobs = props => {
return (
<FeaturedItems>
{props.data.map(job =>
<ItemCard
key={job._id}
id={job._id}
imgUrl={
job.info.imgUrl &&
... | import React from 'react';
import FeaturedItems from '../FeaturedItems';
import ItemCard from '../ItemCard';
const parseImgUrl = url => url.replace(/upload\//, 'upload/thumbs/');
const Jobs = props => {
return (
<FeaturedItems>
{props.data.map(job =>
<ItemCard
key={job._id}
id... | Refactor url parsing into function | Refactor url parsing into function
| JavaScript | mit | jenovs/bears-team-14,jenovs/bears-team-14 |
b584f4866e1ead65215a10b348aa9bcdfd62806e | assets/src/admin/paired-browsing/client.js | assets/src/admin/paired-browsing/client.js | /**
* WordPress dependencies
*/
import domReady from '@wordpress/dom-ready';
const { parent } = window;
if ( parent.pairedBrowsingApp ) {
window.ampPairedBrowsingClient = true;
const app = parent.pairedBrowsingApp;
app.registerClientWindow( window );
domReady( () => {
if ( app.documentIsAmp( document ) ) {
... | /**
* WordPress dependencies
*/
import domReady from '@wordpress/dom-ready';
const { parent } = window;
if ( parent.pairedBrowsingApp ) {
window.ampPairedBrowsingClient = true;
const app = parent.pairedBrowsingApp;
app.registerClientWindow( window );
domReady( () => {
if ( app.documentIsAmp( document ) ) {
... | Remove AMP menu in non-AMP window | Remove AMP menu in non-AMP window
| JavaScript | apache-2.0 | ampproject/amp-toolbox-php,ampproject/amp-toolbox-php |
c911af444539b17cde73a18afd3e39ae5eec0847 | nits/authors.js | nits/authors.js | exports.nit = function(env) {
var $ = env.$;
// at least one author
var authors = $(".section#authors address");
if (authors.length < 1) {
return env.error("No authors");
}
var hauth = $("#document .authors");
hauth.empty();
hauth.comment("Automatically generated from $('.sectio... | exports.nit = function(env) {
var $ = env.$;
// at least one author
var authors = $(".section#authors address");
if (authors.length < 1) {
return env.error("No authors");
}
var hauth = $("#document .authors");
if (hauth.length < 1) {
hauth = $("<div class='authors'/>");
... | Add author info in the document info if it doesn't exist. | Add author info in the document info if it doesn't exist.
| JavaScript | apache-2.0 | hildjj/html-rfc,hildjj/html-rfc,hildjj/html-rfc |
6cacc83f019ba788bef9718895102a11ad8e4271 | src/engines/json/validation.js | src/engines/json/validation.js | /**
* Validation
*
* @constructor
* @param {object} options
*/
var Validation = function(options) {
// Save a reference to the ‘this’
var self = this;
var defaultOptions = {
singleError: true,
errorMessages: errorMessages,
cache: false
};
each(defaultOptions, function(key, value) {
if... | /**
* Validation
*
* @constructor
* @param {object} options
*/
var Validation = function(options) {
// Save a reference to the ‘this’
var self = this;
var defaultOptions = {
singleError: true,
errorMessages: errorMessages,
cache: false
};
each(defaultOptions, function(key, value) {
if... | Fix merging of the ‘Options’ object | Fix merging of the ‘Options’ object
| JavaScript | mit | apiaryio/Amanda,Baggz/Amanda,apiaryio/Amanda |
f8aee5ccb82f1890607101452e5ee117420cecac | packages/vega-parser/src/parsers/guides/legend-gradient-labels.js | packages/vega-parser/src/parsers/guides/legend-gradient-labels.js | import {Perc, Label, GuideLabelStyle} from './constants';
import guideMark from './guide-mark';
import {TextMark} from '../marks/marktypes';
import {LegendLabelRole} from '../marks/roles';
import {addEncode} from '../encode/encode-util';
var alignExpr = 'datum.' + Perc + '<=0?"left"'
+ ':datum.' + Perc + '>=1?"right... | import {Perc, Label, GuideLabelStyle} from './constants';
import guideMark from './guide-mark';
import {TextMark} from '../marks/marktypes';
import {LegendLabelRole} from '../marks/roles';
import {addEncode} from '../encode/encode-util';
var alignExpr = 'datum.' + Perc + '<=0?"left"'
+ ':datum.' + Perc + '>=1?"right... | Fix legend gradient label text to use update set. | Fix legend gradient label text to use update set.
| JavaScript | bsd-3-clause | vega/vega,lgrammel/vega,vega/vega,vega/vega,vega/vega |
a05911938d0ca090a4677292375a8301265f273e | imports/startup/server/browser-policy.js | imports/startup/server/browser-policy.js | import { BrowserPolicy } from 'meteor/browser-policy-common';
BrowserPolicy.content.allowConnectOrigin("wss:");
BrowserPolicy.content.allowConnectOrigin("ws:");
BrowserPolicy.content.allowFontOrigin('data:');
BrowserPolicy.content.allowOriginForAll('*.bootstrapcdn.com');
| import { BrowserPolicy } from 'meteor/browser-policy-common';
BrowserPolicy.content.allowConnectOrigin('wss:');
BrowserPolicy.content.allowConnectOrigin('ws:');
BrowserPolicy.content.allowFontOrigin('data:');
BrowserPolicy.content.allowOriginForAll('https://maxcdn.bootstrapcdn.com');
| Clean code of browser policy file | Clean code of browser policy file
| JavaScript | mit | ggallon/rock,ggallon/rock |
245bc2bf935cb8aecba4c4e3707f1c5ebe1ec5e0 | server/server.js | server/server.js | var express = require('express');
var passport = require('passport');
var util = require('./lib/utility.js');
// Load environment variables
if (process.env.NODE_ENV !== 'integration') {
require('dotenv').config({ path: './env/.env' });
}
var app = express();
// Initial Configuration, Static Assets, & View Engine C... | // Load environment variables
if (process.env.NODE_ENV !== 'integration') {
require('dotenv').config({ path: './env/.env' });
}
var express = require('express');
var passport = require('passport');
var util = require('./lib/utility.js');
var app = express();
// Initial Configuration, Static Assets, & View Engine C... | Load environment variable first in express app | Load environment variable first in express app
| JavaScript | mit | formidable-coffee/masterfully,chkakaja/sentimize,formidable-coffee/masterfully,chkakaja/sentimize |
a869d330bc2fb7220ee83fd157e2aa234026d778 | src/Backend/Modules/Search/Js/Search.js | src/Backend/Modules/Search/Js/Search.js | /**
* All methods related to the search
*/
jsBackend.search =
{
// init, something like a constructor
init: function()
{
$synonymBox = $('input.synonymBox');
// synonyms box
if($synonymBox.length > 0)
{
$synonymBox.multipleTextbox(
{
... | /**
* All methods related to the search
*/
jsBackend.search = {
init: function() {
var $synonymBox = $('input.synonymBox');
// synonyms box
if ($synonymBox.length > 0) {
$synonymBox.multipleTextbox({
emptyMessage: jsBackend.locale.msg('NoSynonymsBox'),
addLabel: utils.string.ucfir... | Clean up backen search js | Clean up backen search js
| JavaScript | mit | Katrienvh/forkcms,carakas/forkcms,sumocoders/forkcms,jonasdekeukelaere/forkcms,carakas/forkcms,jessedobbelaere/forkcms,bartdc/forkcms,DegradationOfMankind/forkcms,sumocoders/forkcms,jacob-v-dam/forkcms,bartdc/forkcms,tommyvdv/forkcms,riadvice/forkcms,jonasdekeukelaere/forkcms,jonasdekeukelaere/forkcms,jeroendesloovere/... |
a967449a6ffc1b9a447a42faf9bdef8ff1057f7f | scripts/applyManifestOverrides.js | scripts/applyManifestOverrides.js | const fs = require('fs-extra');
const path = require('path');
const yargs = require('yargs').argv;
const validEnvironments = ['beta', 'development'];
if (!validEnvironments.includes(yargs.env)) {
console.log(`Invalid ENVIRONMENT provided. Must be one of: [${validEnvironments.join('|')}]`);
process.exit(1);
}
cons... | const fs = require('fs-extra');
const path = require('path');
const yargs = require('yargs').argv;
const validEnvironments = ['beta', 'development'];
if (!validEnvironments.includes(yargs.env)) {
console.log(`Invalid ENVIRONMENT provided. Must be one of: [${validEnvironments.join('|')}]`);
process.exit(1);
}
cons... | Add 1500 to build number until next minor bump | Add 1500 to build number until next minor bump
| JavaScript | mit | toolkit-for-ynab/toolkit-for-ynab,falkencreative/toolkit-for-ynab,falkencreative/toolkit-for-ynab,dbaldon/toolkit-for-ynab,dbaldon/toolkit-for-ynab,blargity/toolkit-for-ynab,blargity/toolkit-for-ynab,toolkit-for-ynab/toolkit-for-ynab,falkencreative/toolkit-for-ynab,dbaldon/toolkit-for-ynab,blargity/toolkit-for-ynab,too... |
33c1e3e15dbaaf8347521b9723bd6570ceea13a0 | src/components/Navigation/Navigation.js | src/components/Navigation/Navigation.js | 'use strict';
import React, { Component } from 'react';
import Navbar from 'react-bootstrap/lib/Navbar';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';
class Navigation extends Component {
render() {
return (
<Navbar brand='Football Hackday'>
<Nav>
... | 'use strict';
import React, { Component } from 'react';
import Navbar from 'react-bootstrap/lib/Navbar';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';
class Navigation extends Component {
render() {
return (
<Navbar brand='Football Hackday'>
<Nav>
... | Add a link to the API | Add a link to the API
| JavaScript | mit | footballhackday/hackday-example,footballhackday/hackday-example |
7e39d7132d15a5914f79672b632babc1c9ee0781 | src/app/utils/CanonicalLinker.js | src/app/utils/CanonicalLinker.js | import Apps from 'steemscript/apps.json';
export function makeCanonicalLink(d) {
var canonicalUrl = 'https://steemit.com' + d.link;
if (
d.json_metadata &&
d.json_metadata.app &&
typeof d.json_metadata.app !== 'string'
) {
return canonicalUrl;
}
const hasAppTemplateD... | import Apps from 'steemscript/apps.json';
export function makeCanonicalLink(d) {
let canonicalUrl = 'https://steemit.com' + d.link;
if (d.json_metadata) {
if (
d.json_metadata.canonical_link &&
typeof d.json_metadata.canonical_link === 'string'
) {
const url... | Allow the use of the json_metadata 'canonical_link' to set a canonical link on top of the app tag | Allow the use of the json_metadata 'canonical_link' to set a canonical link on top of the app tag
| JavaScript | mit | TimCliff/steemit.com,TimCliff/steemit.com,TimCliff/steemit.com,steemit/steemit.com,steemit/steemit.com,steemit/steemit.com |
71c6e3642c1ca25e8e069d8ad782e1056427ae4b | src/features/streamEdit/OperatorCard.js | src/features/streamEdit/OperatorCard.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './OperationCard.css';
class OperationCard extends Component {
render() {
const { operator, onOptionsChange } = this.props;
return (
<div className="operation-card-wrapper">
<div className="operation-card">
... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './OperationCard.css';
class OperationCard extends Component {
render() {
const { operator, onOptionsChange } = this.props;
return (
<div className="operation-card-wrapper">
<div className="operation-card">
... | Add key down handler for debounceTime options | Add key down handler for debounceTime options
| JavaScript | mit | mtauer/rx-cards,mtauer/rx-cards |
38826d9b912c1c57924eb1babb7e44977444fb50 | app.js | app.js | var express = require('express');
var http = require('http');
var path = require('path');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
var spotify = r... | var express = require('express');
var http = require('http');
var path = require('path');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
var spotify = r... | Remove router, we just have ONE GET, nothing more. | Remove router, we just have ONE GET, nothing more.
| JavaScript | mit | rmehner/spotify-remote,david-crowell/spotify-remote |
1569e94f02f423570c98b680da3506b2233bbda4 | app.js | app.js | var express = require('express');
var app = express();
var colors = [ "red", "yellow", "green" ];
var data = {
color: colors[0],
delay: 200
};
var chooseColor = function() {
// Don't show the same color twice to make it obvious that something
// is changing
var filteredColors = colors.filter(function(x) { ... | /// <reference path="typings/node/node.d.ts" />
/// <reference path="typings/express/express.d.ts" />
var express = require('express');
var app = express();
var colors = [ "red", "yellow", "green" ];
var data = {
color: colors[0],
delay: 200
};
var chooseColor = function() {
// Don't show the same color twi... | Add references to node and express typings grabbed with grab-typings (thanks bengreenier!) | Add references to node and express typings grabbed with grab-typings (thanks bengreenier!)
| JavaScript | mit | benfahrenheit/lab-color-server |
b5c5af52e7179f0ab165de851903f916ba51f1cd | cla_socketserver/app.js | cla_socketserver/app.js | var http = require('http')
, server = http.createServer().listen(8005)
, io = require('socket.io')(server)
, nsp = io.of('/socket.io')
, peopleManager = require('./utils/peopleManager');
nsp.on('connection', function (socket) {
socket.on('client', function (data) {
socket.broadcast.emit('server', data);... | var http = require('http')
, server = http.createServer().listen(8005)
, io = require('socket.io')(server)
, nsp = io.of('/socket.io')
, peopleManager = require('./utils/peopleManager');
nsp.on('connection', function (socket) {
socket.on('client', function (data) {
socket.broadcast.emit('server', data);... | Disable socket server listener for now | Disable socket server listener for now
| JavaScript | mit | ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend,ministryofjustice/cla_frontend |
c47fb6a4d38517663da1d71536117a149b42f849 | bot.js | bot.js | const fs = require('fs');
const path = require('path');
const lexicon = [];
{
const directory = path.join(__dirname, 'lexicon');
fs.readdirSync(directory).forEach(function(file) {
const entry = require(path.join(directory, file));
lexicon.push(entry);
});
}
const parse = function parse(message, reply) {... | const fs = require('fs');
const path = require('path');
const lexicon = [];
{
const directory = path.join(__dirname, 'lexicon');
fs.readdirSync(directory).forEach(function(file) {
const entry = require(path.join(directory, file));
lexicon.push(entry);
});
}
const parse = function parse(message, reply) {... | Fix help message when command is empty | Fix help message when command is empty
| JavaScript | mit | esoui/lexicon,esoui/lexicon |
1e9b81f455bffebb70458076392b27f7bcd3ad60 | ajax.js | ajax.js | (function(window){
window.ajax = function(url, options) {
var method = options.method || 'GET',
data = options.data || {},
success = options.success || function(response){},
error = options.error || function(response){},
request = new XMLHttpRequest();
... | (function(window){
window.ajax = function(route, options) {
var data = options.data || {},
success = options.success || function(response){},
error = options.error || function(response){},
request = new XMLHttpRequest();
request.open(route.method, route.u... | Switch to route based request | Switch to route based request | JavaScript | mit | marceloemanoel/desafioCeJs2014 |
213b8ffb0bec7693957975248ee3a30eafcf71e1 | config/routes.js | config/routes.js |
module.exports = function (app, passport) {
var authorization = require('../controllers/authorization'),
pages = require('../controllers/pages'),
users = require('../controllers/users'),
auth = require('../lib/authorization');
app.get('/', pages.index);
app.get('/about', pages.about);
app.... | module.exports = function (app, passport) {
var authorization = require('../controllers/authorization'),
pages = require('../controllers/pages'),
users = require('../controllers/users'),
auth = require('../lib/authorization');
app.get('/', pages.index);
app.get('/about', pages.about);
app.get('/si... | Cut the over than 80 columns code | Cut the over than 80 columns code
| JavaScript | mit | kabam-archived/users |
846eb6b48d4309fdbd23221714f5c4e0c8b2c92a | routes/index.js | routes/index.js | "use strict";
/* eslint new-cap: 0 */
var express = require('express');
var router = express.Router();
var getFeatureFilePaths = require("../lib/specifications/getFeatureFilePaths");
/* GET home page. */
router.get('/', function(req, res) {
getFeatureFilePaths('public/feature-files')
.then(function(featureFile... | "use strict";
/* eslint new-cap: 0 */
var express = require('express');
var router = express.Router();
var getFeatureFilePaths = require("../lib/specifications/getFeatureFilePaths");
/* GET home page. */
router.get('/', function(req, res) {
getFeatureFilePaths('public/feature-files')
.then(function(featureFile... | Return a HTML doc for the list of feature files, include link to the feature file. | Return a HTML doc for the list of feature files, include link to the feature file.
| JavaScript | mit | oss-specs/specs,oss-specs/specs |
cace8fe14ac23b41a097a6fefca7aa3cb51895fb | test/fixtures/simple-config.js | test/fixtures/simple-config.js | module.exports = function() {
return {
'translation.af': JSON.stringify({
'' : {
'domain' : 'messages',
'lang' : 'af',
'plural_forms' : 'nplurals=2; plural=(n != 1);'
},
'yes' : [null, 'ja'],
'no' : [null, 'nee... | module.exports = function() {
return {
'translation.af': JSON.stringify({
'' : {
'domain' : 'messages',
'lang' : 'af',
'plural_forms' : 'nplurals=2; plural=(n != 1);'
},
'yes' : [null, 'ja'],
'no' : [null, 'nee... | Add name config property to the simple config fixture | Add name config property to the simple config fixture
| JavaScript | bsd-3-clause | GeekFreaker/vumi-jssandbox-toolkit,GeekFreaker/vumi-jssandbox-toolkit |
1fe79a1b146018a39eaa345666f73772f574b01c | NoteWrangler/app/js/directives/nw-category-select.directive.js | NoteWrangler/app/js/directives/nw-category-select.directive.js | // js/directives/nw-category-select.directive
(function() {
"use strict";
angular.module("NoteWrangler")
.directive("nwCategorySelect", nwCategorySelectDirective);
function nwCategorySelectDirective() {
return {
replace: true,
restrict: "E",
templateUrl: "../templates/directives/nw-ca... | // js/directives/nw-category-select.directive
(function() {
"use strict";
angular.module("NoteWrangler")
.directive("nwCategorySelect", nwCategorySelectDirective);
function nwCategorySelectDirective() {
return {
replace: true,
restrict: "E",
templateUrl: "../templates/directives/nw-ca... | Add to Directive scope activeCategory value | Add to Directive scope activeCategory value
| JavaScript | mit | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training |
645c5e86b5396f56591c07378e4ef4af043cc27f | src/shapely.js | src/shapely.js | // @flow
export const union = require('./shapely/interfaceFunctions/union').default;
export const any = require('./shapely/interfaceFunctions/any').default;
export const nil = require('./shapely/interfaceFunctions/nil').default;
export const mapOf = require('./shapely/interfaceFunctions/mapOf').default;
export const a... | // @flow
export union from './shapely/interfaceFunctions/union';
export any from './shapely/interfaceFunctions/any';
export nil from './shapely/interfaceFunctions/nil';
export mapOf from './shapely/interfaceFunctions/mapOf';
export arrayOf from './shapely/interfaceFunctions/arrayOf';
export record from './shapely/inte... | Use of export...from instead of | Use of export...from instead of | JavaScript | mit | AriaMinaei/shapely |
d4ff2719cd470a8e47beebce8f62dcde30cf08ef | client/src/index.js | client/src/index.js | import initOpbeat from 'opbeat-react';
import 'opbeat-react/router';
let opbeat_app_id = process.env.REACT_APP_OPBEAT_APP_ID;
let opbeat_org_id = process.env.REACT_APP_OPBEAT_ORG_ID;
if(process.env.NODE_ENV === 'production' && opbeat_app_id && opbeat_org_id) {
initOpbeat({
appId: opbeat_app_id,
or... | import initOpbeat from 'opbeat-react';
import 'opbeat-react/router';
let opbeat_app_id = process.env.REACT_APP_OPBEAT_APP_ID;
let opbeat_org_id = process.env.REACT_APP_OPBEAT_ORG_ID;
if(process.env.NODE_ENV === 'production' && opbeat_app_id && opbeat_org_id) {
initOpbeat({
appId: opbeat_app_id,
or... | Add Opbeat performance flag for client | Add Opbeat performance flag for client
| JavaScript | mit | opbeat/opbeans,opbeat/opbeans,opbeat/opbeans |
297a2519df011febcbbeeb0364f019ecbf6a0c9a | src/__test__/partition.test.js | src/__test__/partition.test.js | /* eslint-env node, jest */
const { partition, range } = require('iter-tools')
describe('partition', function () {
describe('evens and odds', function () {
const isEven = n => n % 2 === 0
it('empty iterable', function () {
const [evens, odds] = partition(isEven, [])
expect([
Array.from(... | /* eslint-env node, jest */
const { partition, range, zip } = require('iter-tools')
describe('partition', function () {
describe('evens and odds', function () {
const isEven = n => n % 2 === 0
it('empty iterable', function () {
const [evens, odds] = partition(isEven, [])
expect([
Array.... | Test if it works with zip | Test if it works with zip
| JavaScript | mit | sithmel/iter-tools,sithmel/iter-tools |
33b8e1c17e3d80861d871409e8e4427c3c547956 | Gruntfile.js | Gruntfile.js | /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
require('dotenv').config();
const testUrl = 'http://localhost:3000/tests.html';
module.exports = (grunt) => {
const browsers = [
{
browserName: 'googlechrome',
platform: 'WIN10'
},
{
browserName: 'fir... | /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
require('dotenv').config();
const testUrl = 'http://localhost:3000/tests.html';
module.exports = (grunt) => {
const browsers = [
{
browserName: 'safari',
platform: 'macOS 10.12',
},
{
browserName: 'sa... | Add more desktop browsers to list of browsers to test | Add more desktop browsers to list of browsers to test
Currently don’t test mobile browsers as it looks like sauce are in the middle of restructuring how all the stuff works.
| JavaScript | mit | robbie-c/js-set-functions,robbie-c/js-set-functions |
5c1e06f90ee506f3726584728a819173d4a509aa | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'.jshintrc',
'package.json',
'**/*.js',
'!node_modules/**/*',
'!test/**/*',
'!static/**/*'
]
},
mocha... | 'use strict';
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: [
'.jshintrc',
'package.json',
'**/*.js',
'!node_modules/**/*',
'!test/**/*',
'!static/**/*'
]
},
mocha... | Remove coverage for now (its getting stuck) | Remove coverage for now (its getting stuck)
Remove coverage for now (its getting stuck) | JavaScript | apache-2.0 | totem/docker-image-factory,totem/docker-image-factory,totem/docker-image-factory |
9dd58ff59047ea31b73812b04480a34ccb20cb1c | Gruntfile.js | Gruntfile.js | module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
build: {
src: "build"
}
},
copy: {
build: {
files: [
{
expand: true,
cwd: 'source/',
src: ['pixadee.js'],
dest: 'build/'
}
]
}
}
});
grunt... | module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
build: {
src: "build"
}
},
copy: {
build: {
files: [
{
expand: true,
cwd: 'source/',
src: ['pixadee.js'],
dest: 'build/'
}
]
}
},
uglify: ... | Add a Grunt task to produce a minified version of pixadee.js. | Add a Grunt task to produce a minified version of pixadee.js.
| JavaScript | mit | carroket/pixadee,carroket/shapely |
5ccc14603ecef924002c92e74dc60b9d47711556 | src/js/graph/elements/nodes/implementations/OwlComplementOf.js | src/js/graph/elements/nodes/implementations/OwlComplementOf.js | var SetOperatorNode = require("../SetOperatorNode.js");
module.exports = (function () {
var o = function (graph) {
SetOperatorNode.apply(this, arguments);
var that = this;
this.styleClass("intersectionof")
.type("owl:intersectionOf");
this.drawNode = function (element) {
that.nodeElement(element);
... | var SetOperatorNode = require("../SetOperatorNode.js");
module.exports = (function () {
var o = function (graph) {
SetOperatorNode.apply(this, arguments);
var that = this;
this.styleClass("complementof")
.type("owl:complementOf");
this.drawNode = function (element) {
that.nodeElement(element);
e... | Fix type of complement of | Fix type of complement of
| JavaScript | mit | MissLoveWu/webvowl,leshek-pawlak/WebVOWL,VisualDataWeb/WebVOWL,VisualDataWeb/WebVOWL,leshek-pawlak/WebVOWL,MissLoveWu/webvowl |
c459be672eb9e29975859ceb6c18428af9d98328 | src/inputs/Array/FallbackPreviewComponent.js | src/inputs/Array/FallbackPreviewComponent.js | import React, {PropTypes} from 'react'
export default function FallbackPreviewComponent(props) {
return (
<div><pre>{JSON.stringify(props.value, null, 2)}</pre></div>
)
}
FallbackPreviewComponent.propTypes = {
value: PropTypes.any.isRequired,
field: PropTypes.object.isRequired,
type: PropTypes.object.is... | import React, {PropTypes} from 'react'
import {resolveJSType} from "../../types/utils";
function renderPrimitive(value) {
return value
}
const GUESS_PROPERTIES = 'title,name,label'.split(',')
function renderObject(value) {
const objectProperties = Object.keys(value)
const displayProperty = objectProperties.find... | Add heuristics to fallback preview component | Add heuristics to fallback preview component
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
17771cc2d6106a9972c6ec73fca100567c632235 | client-vendor/after-body/promise-throttler/promise-throttler.js | client-vendor/after-body/promise-throttler/promise-throttler.js | /*
* Author: CM
*/
(function(global) {
/**
* @callback PromiseThrottled
* @param {...Object|String|Number} any number of optional params
* @return {Promise}
*/
/**
* @param {PromiseThrottled} fn
* @param {Object|null} options
* @param {Boolean} options.cancel Whether to cancel the previous... | /*
* Author: CM
*/
(function(global) {
/**
* @param {PromiseThrottled} fn
* @param {Object|null} [options]
* @param {Boolean} options.cancel Whether to cancel the previous promise if it is still running.
* @returns {PromiseThrottled}
*/
function promiseThrottler(fn, options) {
options = _.def... | Unify promiseThrottler. Add 'key' to options. | Unify promiseThrottler. Add 'key' to options.
| JavaScript | mit | zazabe/cm,fauvel/CM,vogdb/cm,njam/CM,njam/CM,cargomedia/CM,tomaszdurka/CM,tomaszdurka/CM,fauvel/CM,alexispeter/CM,alexispeter/CM,tomaszdurka/CM,njam/CM,zazabe/cm,tomaszdurka/CM,vogdb/cm,fauvel/CM,tomaszdurka/CM,njam/CM,cargomedia/CM,fauvel/CM,alexispeter/CM,zazabe/cm,zazabe/cm,njam/CM,vogdb/cm,fauvel/CM,vogdb/cm,vogdb/... |
0c22f1f85bd561134a02b794c347e01b307eaa42 | src/lib/insert-links-into-head.js | src/lib/insert-links-into-head.js | /**
* @license
* 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 ... | /**
* @license
* 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 ... | Remove whitespace around inserted links | [v3]: Remove whitespace around inserted links | JavaScript | apache-2.0 | GoogleChrome/preload-webpack-plugin,GoogleChromeLabs/preload-webpack-plugin |
006697efbd8eb7bb7fa5780ae97021b31b0972bb | src/components/Header/index.js | src/components/Header/index.js | import React from 'react';
import Button from '../Button';
import styles from './styles.css';
const Header = () => (
<div className={styles.header}>
<h1 className={styles.title}>Bayes Editor</h1>
<Button
title="Menu"
className={styles.menuButton}
onClick={() => alert('menu')}
>
<i... | import React from 'react';
import Button from '../Button';
import styles from './styles.css';
const Header = () => (
<div className={styles.header}>
<h1 className={styles.title}>Bayes Editor</h1>
<Button
title="Menu"
className={styles.menuButton}
onClick={() => alert('¯\\_(ツ)_/¯')}
>
... | Change menu 'not implemented' alert ¯\_(ツ)_/¯ | Change menu 'not implemented' alert ¯\_(ツ)_/¯
| JavaScript | mit | fhelwanger/bayesjs-editor,fhelwanger/bayesjs-editor |
d8dcc0f8fdcd0c8f662dddbb6cae59cea267b34b | lifecycleScripts/submodules/getStatus.js | lifecycleScripts/submodules/getStatus.js | var path = require("path");
var rootDir = path.join(__dirname, "../..");
var exec = require(path.join(rootDir, "./utils/execPromise"));
module.exports = function getStatus() {
return exec("git submodule status", { cwd: rootDir})
.then(function(stdout) {
function getStatusPromiseFromLine(line) {
var... | var path = require("path");
var rootDir = path.join(__dirname, "../..");
var exec = require(path.join(rootDir, "./utils/execPromise"));
module.exports = function getStatus() {
return exec("git submodule status", { cwd: rootDir})
.then(function(stdout) {
if (!stdout) {
// In the case where we pull f... | Fix submodules for the "no-prebuilt install from npm" case | Fix submodules for the "no-prebuilt install from npm" case
| JavaScript | mit | nodegit/nodegit,nodegit/nodegit,jmurzy/nodegit,nodegit/nodegit,nodegit/nodegit,jmurzy/nodegit,jmurzy/nodegit,nodegit/nodegit,jmurzy/nodegit,jmurzy/nodegit |
8c2e3bea4a11d22e5b49eb7b7deb9c5798d0c7e8 | core/identify/mast/index.js | core/identify/mast/index.js | 'use strict'
const createAddFactory = require('../create-add')
const { sails } = require('../../directory')
const category = require('../../category')
const carbon = require('./carbon')
const size = require('./size')
const type = require('./type')
function factory (log) {
const createAdd = createAddFactory('mast', ... | 'use strict'
const createDirectoryFlow = require('../../directory/create-flow')
const { accesories, sails } = require('../../directory')
const createAddFactory = require('../create-add')
const category = require('../../category')
const carbon = require('./carbon')
const size = require('./size')
const type = require('.... | Enable resolve find brand from multiple directories | Enable resolve find brand from multiple directories
| JavaScript | mit | windtoday/windtoday-core,windtoday/windtoday-core |
f18b0684b92f2fef30a2a9d2f423bcc855dc05bb | app/services/demo-location-v1.js | app/services/demo-location-v1.js | var locationGraph = require('../assets/data/demo-picker-data-1.json')
function isCanonicalNode (node) {
return node.meta.canonical
}
function presentableName (node, locale) {
var requestedName = node['names'][locale]
var fallback = Object.values(node['names'])[0]
return requestedName || fallback
}
var locati... | var locationGraph = require('../assets/data/demo-picker-data-1.json')
function isCanonicalNode (node) {
return node.meta.canonical
}
function presentableName (node, locale) {
var requestedName = node['names'][locale]
var fallback = Object.keys(node['names']).map(k => node['names'][k])[0]
return requestedName ... | Fix cloudfoundry using wrong node version | HOTFIX: Fix cloudfoundry using wrong node version
| JavaScript | mit | openregister/picker-prototypes,openregister/picker-prototypes,openregister/picker-prototypes |
7c0af87234dc913515d94d5d5c91bb410eb69be4 | src/encoded/static/libs/compat.js | src/encoded/static/libs/compat.js | require('es5-shim');
require('es5-shim/es5-sham');
(function () {
if (typeof console === 'undefined') {
window.console = {};
window.console.log = function () {};
}
// These are only required for the case when React wants to reset the HTML element,
// which fails because it cannot set node.innerHTML on IE8
va... | require('es5-shim');
require('es5-shim/es5-sham');
(function () {
if (typeof console === 'undefined') {
window.console = {};
window.console.log = function () {};
}
})();
| Remove no longer necessary IE8 shims | Remove no longer necessary IE8 shims
| JavaScript | mit | ClinGen/clincoded,ClinGen/clincoded,philiptzou/clincoded,T2DREAM/t2dream-portal,kidaa/encoded,kidaa/encoded,kidaa/encoded,T2DREAM/t2dream-portal,kidaa/encoded,4dn-dcic/fourfront,ENCODE-DCC/snovault,ENCODE-DCC/snovault,hms-dbmi/fourfront,ENCODE-DCC/encoded,4dn-dcic/fourfront,ENCODE-DCC/snovault,ClinGen/clincoded,philipt... |
63c2f93de001c708780b6471d75906bab90ab0df | test/ignore.js | test/ignore.js | var expect = require('expect.js');
var ignore = require('../lib/ignore');
describe('ignoring files', function() {
it('determine if a directory matches an ignore glob', function () {
expect(ignore.match('/.git')).to.be(true);
expect(ignore.match('/dir')).to.be(false);
});
it('determines if a file match... | var expect = require('expect.js');
var ignore = require('../lib/ignore');
describe('ignoring files', function() {
it('determine if a directory matches an ignore glob', function () {
expect(ignore.match('/.git')).to.be(true);
expect(ignore.match('.DS_STORE')).to.be(true);
expect(ignore.match('/dir')).to.b... | Test for ignoring Mac DS_STORE | Test for ignoring Mac DS_STORE
| JavaScript | mit | aj0strow/superstatic,divshot/superstatic,firebase/superstatic,aj0strow/superstatic,firebase/superstatic,cysys/stratum,firebase/superstatic,carrot/superstatic,nnnnathann/superstatic,divshot/superstatic,cysys/stratum |
f137e093dadf0bfc83928787a84ad352bf9fcc43 | app/avoider/routes.js | app/avoider/routes.js | var utils = require("radiodan-client").utils,
logger = utils.logger(__filename);
module.exports = routes;
function routes(app, radiodan, bbcServices) {
var avoidPlayer = radiodan.player.get("avoider"),
mainPlayer = radiodan.player.get("main"),
announcePlayer = radiodan.player.get("announcer")... | var utils = require("radiodan-client").utils,
logger = utils.logger(__filename);
module.exports = routes;
function routes(app, radiodan, bbcServices) {
var avoidPlayer = radiodan.player.get("avoider"),
mainPlayer = radiodan.player.get("main"),
announcePlayer = radiodan.player.get("announcer")... | Update avoider's use of BBCServices | Update avoider's use of BBCServices
| JavaScript | apache-2.0 | radiodan/magic-button,radiodan/magic-button |
c22990de7d2051280721aca7a10c0ead02b59c45 | app/js/controllers.js | app/js/controllers.js | 'use strict';
/* Controllers */
angular.module('myApp.controllers', []).
controller('AppCtrl', function($scope) {
$scope.website = {url: ''};
$scope.check = function() {
var url = $scope.website.url;
if (url !== "") {
$scope.makeRequest(url, $scope.handleRequest);
}
}
$scop... | 'use strict';
/* Controllers */
angular.module('myApp.controllers', []).
controller('AppCtrl', function($scope, $http) {
$scope.website = {url: ''};
$scope.check = function() {
var url = $scope.website.url;
if (url !== "") {
$scope.makeRequest(url);
}
}
$scope.makeRequest =... | Use to make GET request | Use to make GET request
| JavaScript | mit | dotheyusenode/dotheyusenode |
7ea430e417c18c58a06ff4d46820a7e7461199a2 | test/promise_spec.js | test/promise_spec.js | // Tests FileLoader.Promise with the Promises / A+ Test Suite (https://github.com/promises-aplus/promises-tests)
require("./support/titanium");
var expect = require("chai").expect;
var promisesAplusTests = require("promises-aplus-tests").mocha;
var FileLoader = require("file_loader");
function getA... | // Tests FileLoader.Promise with the Promises / A+ Test Suite (https://github.com/promises-aplus/promises-tests)
// Includes tests for custom features.
require("./support/titanium");
var expect = require("chai").expect;
var promisesAplusTests = require("promises-aplus-tests").mocha;
var FileLoader =... | Add initial specs for custom features (pending) | Add initial specs for custom features (pending)
| JavaScript | mit | 0x00evil/TiCachedImages,sukima/TiCachedImages,sukima/TiCachedImages,0x00evil/TiCachedImages |
6a1a719928caebb0290431a5f7cfcd28b1627dca | test/node-plantuml-cmd-test.js | test/node-plantuml-cmd-test.js | /* global describe it */
var path = require('path')
var chai = require('chai')
var shell = require('shelljs')
var expect = chai.expect
var INDEX_JS = path.join(__dirname, '/../index.js')
var PUML = 'node ' + INDEX_JS
describe('node-plantuml CLI', function () {
describe('#encode', function () {
it('should gener... | /* global describe it */
var path = require('path')
var chai = require('chai')
var shell = require('shelljs')
var expect = chai.expect
var INDEX_JS = path.join(__dirname, '/../index.js')
var PUML = 'node ' + INDEX_JS
describe('node-plantuml CLI', function () {
describe('#encode', function () {
it('should encod... | Fix description of CLI encode test | Fix description of CLI encode test
| JavaScript | mit | markushedvall/node-plantuml,markushedvall/node-plantuml |
867bea2edc5385bd23f8502d58d2b2d200f6fc43 | config/ember-try.js | config/ember-try.js | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.13.X',
dependencies: {
'ember': '1.13.10'
}
},
{
name: 'ember-release',
dependencies: {
'ember': 'components/ember#release'
},
resolutions:... | module.exports = {
scenarios: [
{
name: 'default',
dependencies: { }
},
{
name: 'ember-1.12.X',
dependencies: {
'ember': '1.12.1'
}
},
{
name: 'ember-1.13.X',
dependencies: {
'ember': '1.13.10'
}
},
{
name: 'ember-releas... | Fix add Ember Try config for 1.12.X | Fix add Ember Try config for 1.12.X
| JavaScript | unlicense | martndemus/ember-font-awesome,martndemus/ember-cli-font-awesome,martndemus/ember-cli-font-awesome,lfridael/ember-cli-font-awesome,joedaniels29/ember-cli-font-awesome,lfridael/ember-cli-font-awesome,martndemus/ember-font-awesome,joedaniels29/ember-cli-font-awesome |
04d97175788ce6389377194b1ae852249f1b80c8 | test/csslint.js | test/csslint.js | 'use strict';
var csslint = require('../lib/csslint'),
fs = require('fs'),
path = require('path');
var formatter = csslint.getFormatter('compact');
module.exports = (function() {
var tests = {};
fs.readdirSync('test/less').forEach(function(file) {
if (!/\.less/.test(file)) {
retu... | 'use strict';
var csslint = require('../lib/csslint'),
fs = require('fs'),
path = require('path');
var formatter = csslint.getFormatter('compact');
module.exports = (function() {
var tests = {};
fs.readdirSync('test/less').forEach(function(file) {
if (!/\.less/.test(file)) {
retu... | Enable a test case which was failing previously. | Enable a test case which was failing previously.
| JavaScript | mit | joshuaspence/lesscsslint |
6fb772cb717c0e9704beafcd698d2e780513f6ca | __tests__/customConfig.test.js | __tests__/customConfig.test.js | import path from 'path'
import postcss from 'postcss'
import tailwind from '../src/index'
test('it uses the values from the custom config file', () => {
return postcss([tailwind(path.resolve(`${__dirname}/fixtures/customConfig.js`))])
.process(
`
@responsive {
.foo {
color: bl... | import path from 'path'
import postcss from 'postcss'
import tailwind from '../src/index'
test('it uses the values from the custom config file', () => {
return postcss([tailwind(path.resolve(`${__dirname}/fixtures/customConfig.js`))])
.process(
`
@responsive {
.foo {
color: bl... | Test config can be passed as object instead of path | Test config can be passed as object instead of path
| JavaScript | mit | tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss |
63ce0e11228b172409ff371ad6f42490e3fdea98 | addon/classes/async-process.js | addon/classes/async-process.js | import { tracked } from '@glimmer/tracking';
import { Resource } from 'ember-could-get-used-to-this';
export default class AsyncProcessResource extends Resource {
@tracked data;
get value() {
return this.data;
}
async setup() {
const fn = this.args.positional[0];
//pass any remaining arguments di... | import { tracked } from '@glimmer/tracking';
import { Resource } from 'ember-could-get-used-to-this';
export default class AsyncProcessResource extends Resource {
@tracked data;
get value() {
return this.data;
}
async setup() {
const fn = this.args.positional[0];
//pass any remaining arguments di... | Return the promise before it is resolved | Return the promise before it is resolved
AsyncProcess was returning undefined until the promise is resolved, but
we can return the promise itself and maybe make this more usable.
| JavaScript | mit | ilios/common,ilios/common |
ba979fdd17a0375cb81ee520757b6c1b1a675ad8 | stories/page-header.stories.js | stories/page-header.stories.js | /**
* External dependencies
*/
import { storiesOf } from '@storybook/react';
import PageHeader from 'GoogleComponents/page-header';
storiesOf( 'Global', module )
.add( 'Page Headers', () => (
<div>
<p>
<PageHeader
title="Module Page Title"
status="connected"
statusText="Analytics is connecte... | /**
* External dependencies
*/
import { storiesOf } from '@storybook/react';
import PageHeader from 'GoogleComponents/page-header';
/**
* WordPress dependencies
*/
import { removeAllFilters } from '@wordpress/hooks';
storiesOf( 'Global', module )
.add( 'Page Headers', () => {
removeAllFilters( 'googlesitekit.sh... | Set reset showDateRangeSelector for PageHeader VRT. | Set reset showDateRangeSelector for PageHeader VRT.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
d9358ebc7ed496c902ce16763445307a9f1c9ced | client/templates/helpers.js | client/templates/helpers.js | Template.registerHelper('preview', function(value, options) {
var length = options.hash.length || 140;
var content = value.replace(/<(?:.|\n)*?>/gm, ' ');
if(content.length > length) content = content.substring(0, length-1).trim() + '…';
return content;
});
Template.registerHelper('date', function(date) {
re... | Template.registerHelper('preview', function(value, options) {
if (!value) return;
var length = options.hash.length || 140;
var content = value.replace(/<(?:.|\n)*?>/gm, ' ');
if(content.length > length) content = content.substring(0, length-1).trim() + '…';
return content;
});
Template.registerHelper('date',... | Fix preview of bodies with no content | Fix preview of bodies with no content
| JavaScript | apache-2.0 | GeoMakers/geomakers.org,GeoMakers/geomakers.org |
f4963ed3dad878611eb52384bfca4474bbc02c23 | app/templates/gulp/_markups.js | app/templates/gulp/_markups.js | 'use strict';
var gulp = require('gulp');
var paths = gulp.paths;
var $ = require('gulp-load-plugins')();
gulp.task('markups', function() {
function renameToHtml(path) {
path.extname = '.html';
}
return gulp.src(paths.src + '/{app,components}/**/*.<%= props.htmlPreprocessor.extension %>')
<% if (props.ht... | 'use strict';
var gulp = require('gulp');
var paths = gulp.paths;
var $ = require('gulp-load-plugins')();
gulp.task('markups', function() {
function renameToHtml(path) {
path.extname = '.html';
}
return gulp.src(paths.src + '/{app,components}/**/*.<%= props.htmlPreprocessor.extension %>')
<% if (props.ht... | Add error handler on html preprocessing | Add error handler on html preprocessing
Close #238
| JavaScript | mit | groupe-sii/generator-gulp-angular,groupe-sii/generator-gulp-angular,groupe-sii/generator-gulp-angular,groupe-sii/generator-gulp-angular |
76ea033408f30667fa6d62221c92691697a6dc2b | app/scripts/services/project.js | app/scripts/services/project.js | 'use strict';
angular.module('scegratooApp')
.service('Project', function Project($resource, $http) {
// AngularJS will instantiate a singleton by calling "new" on this function
var apiRoot = 'api/v1'
var route = apiRoot + '/projects/:project.:format'
var resource = $resource(route, {format: 'json'})
return ... | 'use strict';
angular.module('scegratooApp')
.service('Project', function Project($resource, $http, Constants) {
// AngularJS will instantiate a singleton by calling "new" on this function
var route = Constants.apiRoot + '/projects/:project.:format'
var resource = $resource(route, {format: 'json'})
return {
... | Use Constants service instead of hardcoded apiRoot | Use Constants service instead of hardcoded apiRoot
| JavaScript | apache-2.0 | despairblue/scegratoo3,despairblue/scegratoo3,despairblue/scegratoo3 |
709a9143c072be19d9e5b74b156e9fda85b2173b | app/templates/test/name_test.js | app/templates/test/name_test.js | /*global describe,it*/
'use strict';
var assert = require('assert'),
<%= safeSlugname %> = require('../lib/<%= slugname %>.js');
describe('<%= slugname %> node module.', function() {
it('must be awesome', function() {
assert.equal( <%= safeSlugname %>.awesome(), 'awesome');
});
});
| /*global describe,it*/
'use strict';
var assert = require('assert'),
<%= safeSlugname %> = require('../lib/<%= slugname %>.js');
describe('<%= slugname %> node module', function() {
it('must be awesome', function() {
assert.equal( <%= safeSlugname %>.awesome(), 'awesome');
});
});
describe('<%= slugname %> ... | Add failing test example to scaffolded tests | Add failing test example to scaffolded tests
| JavaScript | mit | iamstarkov/generator-node,rhettl/generator-node,davewasmer/generator-node,thehobbit85/generator-node,yeoman/generator-node,stevemao/generator-node,joeybaker/generator-iojs,joeybaker/generator-iojs,RobertJGabriel/generator-node,zckrs/generator-node,amitport/generator-node,ksheedlo/generator-node-mocha-jscs,canercandan/g... |
4fdc977bc769b001a0d134bf3f4656e39898a807 | routes/recipes/index.js | routes/recipes/index.js | var express = require('express');
var router = express.Router();
var JsonDB = require('node-json-db');
// Recipes listing
router.get('/', function (req, res, next) {
var db = new JsonDB('db', false, false);
var recipes = db.getData('/recipes');
res.json(recipes);
});
module.exports = router;
| var express = require('express');
var router = express.Router();
var JsonDB = require('node-json-db');
var _ = require('lodash');
// Recipes listing
router.get('/', function (req, res, next) {
var db = new JsonDB('db', false, false);
var recipes = db.getData('/recipes');
// Expand requested resources if they ex... | Add recipe listing with optional expansion of properties | Add recipe listing with optional expansion of properties
| JavaScript | mit | adamsea/recipes-api |
f3343c95b40b4e15c11dfb8538806dca9dd33bab | lib/views/mixins/DOMViewControllerMixin.js | lib/views/mixins/DOMViewControllerMixin.js |
// Events are in the Backbone form of
// {
// '[type] [selector]':'[function]'
// }
// where selector may have a space, e.g. 'foo > bar'
function DOMViewMixin(view) {
var _this = this;
var events = view.events || {};
for (var key in events) {
if (events.hasOwnProperty(key)) {
var firstSpaceIndex = ke... |
// Events are in the Backbone form of
// {
// '[type] [selector]':'[function]'
// '[type]' :'[function]'
// }
// where selector may have a space, e.g. 'foo > bar'
function DOMViewMixin(view) {
var _this = this;
var events = view.events || {};
for (var key in events) {
if (events.hasOwnProperty(... | Support event on root element | Support event on root element | JavaScript | mit | bjnortier/triptych,bjnortier/triptych |
025f004f3c3159efe6bf7e07a1ec8736601b3f51 | components/avatar/AvatarStack.js | components/avatar/AvatarStack.js | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import cx from 'classnames';
import theme from './theme.css';
class AvatarStack extends PureComponent {
static propTypes = {
children: PropTypes.node,
className: PropTypes.string,
direction: PropTy... | import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Box from '../box';
import cx from 'classnames';
import theme from './theme.css';
class AvatarStack extends PureComponent {
render() {
const { children, className, direction, displayMax, inverse, onOverflowClick, size, ...oth... | Move propTypes & defaultProps outside of the component class | Move propTypes & defaultProps outside of the component class
| JavaScript | mit | teamleadercrm/teamleader-ui |
45a993c0eafb3850de20a5b271fe1b973d1b257c | components/datepicker/WeekDay.js | components/datepicker/WeekDay.js | import React from 'react';
import PropTypes from 'prop-types';
const WeekDay = ({ weekday, className, localeUtils, locale, size }) => {
const weekdayName = localeUtils.formatWeekdayLong(weekday, locale);
return (
<div className={className} title={weekdayName}>
{size === 'large' ? weekdayName.slice(0, 2)... | import React from 'react';
import PropTypes from 'prop-types';
const WeekDay = ({ weekday, className, localeUtils, locale, size }) => {
const weekdayName = localeUtils.formatWeekdayLong(weekday, locale);
return (
<div className={className} title={weekdayName}>
{weekdayName.slice(0, size === 'large' ? 2 ... | Write weekdayName.slice in a shorter way | Write weekdayName.slice in a shorter way
| JavaScript | mit | teamleadercrm/teamleader-ui |
656343dc7be88c5e207ef902ba90908ab13bf1bd | client/src/api.js | client/src/api.js | import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
NProgress.configure({
parent: '.header'
})
const API = {
fetch(url, params) {
params = params || {}
params.credentials = 'same-origin'
params.headers = params.headers || {}
params.headers['Accept'] = 'application/json'
API.startLoading()... | import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
NProgress.configure({
parent: '.header'
})
const API = {
fetch(url, params) {
params = params || {}
params.credentials = 'same-origin'
params.headers = params.headers || {}
params.headers['Accept'] = 'application/json'
if (params.showLoa... | Add an option to API.fetch to not trigger the loader | Add an option to API.fetch to not trigger the loader
| JavaScript | mit | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet |
769285b0f7539ec132cf6314d8120ef1a993d292 | run-tests.js | run-tests.js | const spawn = require('spawndamnit');
const ember = `./node_modules/.bin/ember`;
const userName = process.env['BROWSERSTACK_USERNAME']
const accessKey = process.env['BROWSERSTACK_ACCESS_KEY']
const canConnectToBrowserStack = (
userName && userName.trim().length !== 0 &&
accessKey && accessKey.trim().length !== 0... | const spawn = require('spawndamnit');
const ember = `./node_modules/.bin/ember`;
const userName = process.env['BROWSERSTACK_USERNAME']
const accessKey = process.env['BROWSERSTACK_ACCESS_KEY']
const canConnectToBrowserStack = (
userName && userName.trim().length !== 0 &&
accessKey && accessKey.trim().length !== 0... | Access results only on travis | Access results only on travis
| JavaScript | mit | ember-learn/ember-api-docs,toddjordan/ember-api-docs,ember-learn/ember-api-docs,toddjordan/ember-api-docs |
b9bf1bee68082e5e13fdb9888904abc4fb8c9134 | cli.js | cli.js | import 'babel-polyfill';
import meow from 'meow';
import logSymbols from 'log-symbols';
import parseURL from './lib/parse-url';
import checkURL from './lib/check-url';
const cli = meow(`
Example
$ is-js-error example.com
${logSymbols.success} OK
`);
if (cli.input.length === 0) {
console.error('Sp... | import 'babel-polyfill';
import meow from 'meow';
import logSymbols from 'log-symbols';
import parseURL from './lib/parse-url';
import checkURL from './lib/check-url';
const cli = meow(`
Example
$ is-js-error example.com
${logSymbols.success} OK
$ is-js-error example.com --wait 3000
${logS... | Add documentation on wait parameter | Add documentation on wait parameter
| JavaScript | isc | ThibWeb/is-js-error,ThibWeb/is-js-error,ThibWeb/is-js-error |
b303ae1db56b097a2db618cbd5f72a8664a7758b | test/unit/lifecycle-scenarios.js | test/unit/lifecycle-scenarios.js | import helperElement from '../lib/element';
import helperFixture from '../lib/fixture';
import helperReady from '../lib/ready';
import skate from '../../src/index';
import supportCustomElements from '../../src/support/custom-elements';
describe('lifecycle-scenarios', function () {
it('definition is registered before... | import helperElement from '../lib/element';
import helperFixture from '../lib/fixture';
import helperReady from '../lib/ready';
import skate from '../../src/index';
import supportCustomElements from '../../src/support/custom-elements';
describe('lifecycle-scenarios', function () {
it('definition is registered before... | Fix tests for browsers that support native custom elements. | Fix tests for browsers that support native custom elements.
| JavaScript | mit | chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,antitoxic/skatejs,skatejs/skatejs |
d8918698884f33964213e412fb599edd3dbd118a | .stylelintrc.js | .stylelintrc.js | /**
* Configure Stylint
*
* @see https://stylelint.io/user-guide/configuration
*/
module.exports = {
extends: ['stylelint-config-recommended']
};
| /**
* Configure Stylint
*
* https://github.com/stylelint/stylelint-config-recommended
*/
module.exports = {
extends: ['stylelint-config-recommended']
};
| Revert "Update stylelint config link" | Revert "Update stylelint config link"
This reverts commit c78bda6184b3fa11491d38c83e9c001c57f78c75.
| JavaScript | mit | claus/react-dat-gui |
da57bec4e469c8acb56be21b78fcfad7d87b8a3c | tests/unit/services/tour-test.js | tests/unit/services/tour-test.js | import {
moduleFor,
test
} from 'ember-qunit';
moduleFor('service:tour', {
// Specify the other units that are required for this test.
// needs: ['service:foo']
});
// Replace this with your real tests.
test('it exists', function(assert) {
var service = this.subject();
assert.ok(service);
});
| import Ember from 'ember';
import { moduleFor, test } from 'ember-qunit';
var steps = [
{
id: 'intro',
options: {
attachTo: '.test-element bottom',
builtInButtons: [
{
classes: 'shepherd-button-secondary',
text: 'Exit',
type: 'cancel'
},
{
... | Verify that the service starts the library | Verify that the service starts the library
| JavaScript | mit | shipshapecode/ember-shepherd,ifiokjr/ember-shepherd,rwwagner90/ember-shepherd,shipshapecode/ember-shepherd,rwwagner90/ember-shepherd,ifiokjr/ember-shepherd |
5f383651421b177091fa614fa60ecd2c07119abd | scripts/check-deps.js | scripts/check-deps.js | var colors = require('colors');
if (process.platform === 'win32') {
var fs = require('fs');
var path = require('path');
// https://github.com/atom/apm/blob/master/src/apm.coffee#L84
if (process.env.GYP_MSVS_VERSION === '2015') {
return;
}
var programDir = process.env["ProgramFiles(x86)"] || process.env... | var colors = require('colors');
if (process.platform === 'win32') {
var fs = require('fs');
var path = require('path');
// https://github.com/atom/apm/blob/master/src/apm.coffee#L84
if (process.env.GYP_MSVS_VERSION === '2015') {
return;
}
var programDir = process.env["ProgramFiles(x86)"] || process.env... | Add check for electron-builder dependencies | chore(pack): Add check for electron-builder dependencies
| JavaScript | bsd-3-clause | 0u812/nteract,nteract/nteract,rgbkrk/nteract,jdfreder/nteract,jdetle/nteract,nteract/composition,captainsafia/nteract,0u812/nteract,rgbkrk/nteract,jdfreder/nteract,rgbkrk/nteract,nteract/nteract,jdetle/nteract,nteract/composition,jdfreder/nteract,temogen/nteract,nteract/nteract,captainsafia/nteract,temogen/nteract,nter... |
fe98a849e7dc2482f7488eb90eca0fc10b7e6492 | src/index.js | src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import { setComponentsNames, globalizeComponents, promoteInlineExamples, flattenChildren } from './utils/utils';
import StyleGuide from 'rsg-components/StyleGuide';
import 'highlight.js/styles/tomorrow.css';
import './styles.css';
global.React = React;
if ... | import React from 'react';
import ReactDOM from 'react-dom';
import { setComponentsNames, globalizeComponents, promoteInlineExamples, flattenChildren } from './utils/utils';
import StyleGuide from 'rsg-components/StyleGuide';
import 'highlight.js/styles/tomorrow.css';
import './styles.css';
global.React = React;
if ... | Allow components and sections to be used in parallel | Allow components and sections to be used in parallel
| JavaScript | mit | bluetidepro/react-styleguidist,sapegin/react-styleguidist,sapegin/react-styleguidist,styleguidist/react-styleguidist,styleguidist/react-styleguidist,styleguidist/react-styleguidist |
312bb6ed59184f6f0318daf42f5dc201ed46da6d | app.js | app.js | var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send("Welcome to my app!");
})
app.listen(3000, console.log("Server listening on localhost:3000 "))
| var express = require('express'),
fs = require('fs');
var app = express();
app.get('/', function(req, res){
res.send("Welcome to my app!");
});
app.get('/games', function(req, res){
});
app.listen(3000, console.log("Server listening on localhost:3000 "))
| Include fs module, add empty get route for games | Include fs module, add empty get route for games
| JavaScript | mit | theomarkkuspaul/Tally |
ac3759bb55bb37e30dfd7fecb9a92103a144ae50 | app.js | app.js | import React from 'react';
import PokeMap from './components/PokeMap';
let pokemons = [
{ name: "Bulbasaur", position: {lat: 19.541980, lng: -96.927581} },
{ name: "Yvisaur", position: {lat: 20.223488, lng: -97.956551} },
{ name: "Venusaur", position: {lat: 21.088393, lng: -98.713452} },
{ name: "Charmander", ... | import React from 'react';
import PokeGame from './components/PokeGame';
React.render(<PokeGame />, document.getElementById('container-map'));
| Update file to render PokeGame | Update file to render PokeGame
| JavaScript | mit | omero/PokeMap,dezkareid/PokeMap,dezkareid/PokeMap,intfrr/PokeMap,intfrr/PokeMap,omero/PokeMap |
a422e60b1c89fa2985966f76e179ff1a63c80a52 | app.js | app.js | // Root file loaded by RequireJS
require.config({
paths: {
'jquery': 'lib/jquery',
'handlebars': 'lib/handlebars'
},
});
require([
'jQuery',
'map_controller'
],
function($, MapController) {
$(function() {
$('.js-map').each(function(_index, canvas) {
var controller = new M... | // Root file loaded by RequireJS
require.config({
paths: {
'jquery': 'vendor/jquery',
'handlebars': 'vendor/handlebars'
},
});
require([
'jquery',
'map_controller'
],
function($, MapController) {
$(function() {
$('.js-map').each(function(_index, canvas) {
var controller =... | Fix bugs introduced by Code Climate changes | Fix bugs introduced by Code Climate changes
| JavaScript | mit | isikyus/aeldardin-rooms,isikyus/aeldardin-rooms |
3a7aea300c41fb972ac19c1c8e361c1f731de154 | server/app/helpers.js | server/app/helpers.js | import { Promise } from 'es6-promise';
import distance from 'google-distance';
import dotenv from 'dotenv';
dotenv.load();
distance.apiKey = process.env.GOOGLE_DISTANCE_API_KEY;
export function getUserIdFromRequest( req ) {
return req.user.sub;
}
export function removeElementFromArray( ary, element ) {
return a... | import { Promise } from 'es6-promise';
import distance from 'google-distance';
import dotenv from 'dotenv';
dotenv.load();
distance.apiKey = process.env.GOOGLE_DISTANCE_API_KEY;
export function getUserIdFromRequest( req ) {
return req.user.sub;
}
export function getUserNameFromRequest( req ) {
return req.user.n... | Add getUserNameFromRequest helper method to server | Add getUserNameFromRequest helper method to server
| JavaScript | mit | sirbrillig/voyageur-js,sirbrillig/voyageur-js |
f1fc391e9ed70aff102e5819618bbf910ed938d3 | server/server.js | server/server.js | import path from 'path';
import express from 'express';
import exphbs from 'express-handlebars';
import mongoose from 'mongoose';
import Bootstrap from 'bootstrap/dist/css/bootstrap.css';
import app = express();
import serverConfig from './config';
// Connection to MongoDB
mongoose.connect(serverConfig.mongo_url, ... | var path = require('path');
var express = require('express');
var exphbs = require('express-handlebars');
var mongoose = require('mongoose');
var app = express();
var serverConfig = require('./config');
// Connection to MongoDB
mongoose.connect(serverConfig.mongo_url, (error) => {
if (error) {
console.error('... | Rollback on changes from commonsJS require to import. | Rollback on changes from commonsJS require to import. | JavaScript | mit | ateixeira/andreteixeira.info,ateixeira/andreteixeira.info,ateixeira/mern-stack,ateixeira/mern-stack |
531d0e521876a864298e9aae74214024a94fc026 | server/server.js | server/server.js | var kiwi_app = './kiwi.js';
var daemon = require('daemonize2').setup({
main: kiwi_app,
name: 'kiwiirc',
pidfile: '../kiwiirc.pid'
});
switch (process.argv[2]) {
case '-f':
require(kiwi_app);
break;
case 'start':
daemon.start();
break;
case '... | var kiwi_app = './kiwi.js';
var daemon = require('daemonize2').setup({
main: kiwi_app,
name: 'kiwiirc',
pidfile: '../kiwiirc.pid'
});
switch (process.argv[2]) {
case '-f':
require(kiwi_app);
break;
case 'start':
daemon.start();
break;
case '... | Build command added to bash wrapper | Build command added to bash wrapper
| JavaScript | agpl-3.0 | MDTech-us-MAN/KiwiIRC,prawnsalad/KiwiIRC,antwebes/KiwiIRC,spadgos/KiwiIRC,HellenicNetwork/KiwiIRC,Nurtic-Vibe/docker-kiwiirc,Flauschbaellchen/KiwiIRC,MDTech-us-MAN/KiwiIRC,rmoorman/KiwiIRC,ggff20/KiwiIRC,AWSinAction/KiwiIRC,spadgos/KiwiIRC,Faiz7412/KiwiIRC,AWSinAction/KiwiIRC,prawnsalad/KiwiIRC,boopcat/KiwiIRC,antwebes... |
fc8171a7047469d48d7e307f06d277bd69e58ee8 | content-script.js | content-script.js | var alreadyExistingTag = document.querySelector("script[async][src='chrome-extension://afcmfnlbcoginnfdkokfgpcmooekakhf/content-script-js-accesser.js']");
if(!alreadyExistingTag) {
var scriptTag = document.createElement("script");
scriptTag.src = chrome.runtime.getURL("content-script-js-accesser.js");
scriptTag.asyn... | var alreadyExistingTag = document.querySelector("script[async][src='" + chrome.runtime.getURL("content-script-js-accesser.js") + "']");
if(!alreadyExistingTag) {
var scriptTag = document.createElement("script");
scriptTag.src = chrome.runtime.getURL("content-script-js-accesser.js");
scriptTag.async = true;
document... | Use runtime.getURL instead of hardcoding | Use runtime.getURL instead of hardcoding
| JavaScript | mit | metarmask/tab-playlist,metarmask/tab-playlist |
1f78c2af1f45c022c5250cbe90c7ce57e3fe29e3 | build-re.js | build-re.js | var irregulars = require('english-irregular-verbs');
// Extract all past participles.
var irregularParticiples = [];
irregulars.forEach(function(verb) {
verb.participles.forEach(function(participle) {
irregularParticiples.push(participle);
});
});
var toBe = [ 'am', 'are', 'were', 'being', 'is', 'been', 'was'... | var irregularVerbs = require('english-irregular-verbs');
// Extract all past participles.
var irregularParticiples = [];
irregularVerbs.forEach(function(verb) {
verb.participles.forEach(function(participle) {
irregularParticiples.push(participle);
});
});
var toBe = [ 'am', 'are', 'were', 'being', 'is', 'been... | Add regular expression builder commentary | Add regular expression builder commentary
| JavaScript | apache-2.0 | anseljh/passive-aggressor |
53c4e2a82e77991eab85523e483ff3b5920290c9 | lib/process-task.js | lib/process-task.js | 'use strict'
const stream = require('stream')
const Transform = stream.Transform
const PassThrough = stream.PassThrough
/**
* Returns a transform stream that branches
* the input stream to several streams given by argument.
*/
module.exports = function selectTask (config) {
/**
* (inputStream) -> transform ->... | 'use strict'
const stream = require('stream')
const Transform = stream.Transform
const Readable = stream.Readable
/**
* Returns a transform stream that branches
* the input stream to several streams given by argument.
*/
module.exports = function selectTask (config) {
/**
* (inputStream) -> transform -> each ... | Use readable stream instead of pass through | Use readable stream instead of pass through
| JavaScript | mit | ktsn/houl,ktsn/houl,ktsn/houl |
5664aa9ba31544693586020c133597fc5f25c797 | lib/router/index.js | lib/router/index.js | var fs = require('fs-extra');
var path = require('path');
var serveStatic = require('serve-static');
var finalhandler = require('finalhandler');
module.exports = function(options) {
options = options || {};
var rcfile = path.join(options.cwd || process.cwd(), '.webmodulesrc');
var rc = fs.existsSync(rcfile) ?... | var fs = require('fs-extra');
var path = require('path');
var serveStatic = require('serve-static');
var finalhandler = require('finalhandler');
module.exports = function(options) {
options = options || {};
var rcfile = path.join(options.cwd || process.cwd(), '.webmodulesrc');
var rc = fs.existsSync(rcfile) ?... | Fix base dir in router | Fix base dir in router
| JavaScript | mit | attrs/webmodules |
6adf82866d8f0efe47dc103e1dde19d38cfd7bf5 | js/util.js | js/util.js | /* Helper function to add an event listener.
* @param el The element we want to add an event listener to.
* @param event The event we want to listen to.
* @param callback The callback function to call when the event is transmitted.
*/
function addEvent(el, event, callback) {
if ('addEventListener' in el) {
el... | /* Helper function to add an event listener.
* @param {Element} el - The element we want to add an event listener to.
* @param {Event} event - The event we want to listen to.
* @param {function} callback - The callback function to call when the event is
* transmitted.
*/
function addEvent(el, event, callback) {
... | Change doc style in addEvent() | Change doc style in addEvent()
| JavaScript | mit | oserr/omblog,oserr/omblog,oserr/omblog |
570b04a2a5e299089830a43cf0f3a7d1ca392a89 | lib/tests/module.js | lib/tests/module.js | var Mocha = require('mocha'),
_ = require('underscore');
module.exports = function (browser, module, suite, config, tests) {
suite = Mocha.Suite.create(suite, module.slug);
tests = _.extend({
exists: function () {
return browser
.$('#' + module.slug).isDisplayed()
.should.eventual... | var Mocha = require('mocha'),
_ = require('underscore');
module.exports = function (browser, module, suite, config, tests) {
suite = Mocha.Suite.create(suite, module.slug);
tests = _.extend({
exists: function () {
return browser
.$('#' + module.slug).isDisplayed()
.should.eventual... | Add tests for the non-existence of error messages | Add tests for the non-existence of error messages
| JavaScript | mit | alphagov/cheapseats |
f1e7037905b0b61407621c5f622227a540ac657a | fluent-dedent/test/blank_test.js | fluent-dedent/test/blank_test.js | "use strict";
import assert from "assert";
import ftl from "../src/index";
suite("blank lines", function() {
test("leading", function() {
assert.equal(
ftl`
foo
`,
"\nfoo"
);
});
test("middle", function() {
assert.equal(
ftl`
foo
bar
`,
... | "use strict";
import assert from "assert";
import ftl from "../src/index";
suite("blank lines", function() {
test("leading", function() {
assert.equal(
ftl`
foo
`,
"\nfoo"
);
});
test("middle", function() {
assert.equal(
ftl`
foo
bar
`,
... | Add tests for blank lines containing whitespace | Add tests for blank lines containing whitespace
| JavaScript | apache-2.0 | zbraniecki/fluent.js,projectfluent/fluent.js,zbraniecki/fluent.js,projectfluent/fluent.js,projectfluent/fluent.js |
9e6dc5f0e1a87c11ebdbb74993e879244643f19d | lib/api.js | lib/api.js | 'use strict';
var _ = require('underscore');
var util = require('./util.js');
var scan = require('./scan.js');
var analyze = require('./analyze.js');
var cani = function (files, browsers) {
var supportedBrowsers = util.getSupportedBrowserList(browsers);
util.getFileList(files)
.then(function (files) {
... | 'use strict';
var _ = require('underscore');
var util = require('./util.js');
var scan = require('./scan.js');
var analyze = require('./analyze.js');
var cani = function (files, browsers) {
var supportedBrowsers = util.getSupportedBrowserList(browsers);
util.getFileList(files)
.then(function (files) {
... | Add a logging statement for the time being | Add a logging statement for the time being
| JavaScript | mit | caniuse-js/caniuse-js |
fafa8131f12001cc0e0b882e1edd3225814596e5 | frontend/app/js/reducers/menu.js | frontend/app/js/reducers/menu.js | const default_state = {menu: null, user: {}, sidebar: true, screens: []}
function top(state=default_state, action){
switch(action.type){
case 'TOP_TOGGLE_MENU':
if (state.menu==action.menu)
state={...state, menu: undefined}
else
state={...state, menu: action.menu}
break;
cas... | const default_state = {
menu: null,
user: {},
sidebar: localStorage.show_sidebar == "true",
screens: []
}
function top(state=default_state, action){
switch(action.type){
case 'TOP_TOGGLE_MENU':
if (state.menu==action.menu)
state={...state, menu: undefined}
else
state={...state... | Store sidebar status for next session | Store sidebar status for next session
| JavaScript | apache-2.0 | serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards |
1b6c059bf32c764142190a5f4c2b9781bafdfef0 | src/api/index.js | src/api/index.js | const { createWebpackConfig } = require('../config/webpack');
module.exports = {
getDefaultWebpackConfig: createWebpackConfig
};
| const pkg = require('../../package');
module.exports = {
version: pkg.version
};
| Replace existing API (no longer used by news-core) with stub containing version number. | Replace existing API (no longer used by news-core) with stub containing version number.
| JavaScript | mit | abcnews/aunty,abcnews/aunty,abcnews/aunty |
be8672fc2a25ab90033e500b373a8c8492c23827 | src/constants.js | src/constants.js | export const socketOptions = {
protocol: 'http',
hostname: 'remotedev.io',
port: 80,
autoReconnect: true
};
| export const socketOptions = {
protocol: 'http',
hostname: 'remotedev.io',
port: 80,
autoReconnect: true,
autoReconnectOptions: {
randomness: 60000
}
};
| Add randomness to the reconnect delay not to flood the server after a worker crash | Add randomness to the reconnect delay not to flood the server after a worker crash
| JavaScript | mit | zalmoxisus/redux-remote-monitor,zalmoxisus/remote-redux-devtools |
2388db23e4b11ebd4e35399bb52d0708fae5059a | lib/headerParsingLib.js | lib/headerParsingLib.js | var url = require("url");
var qs = require("qs");
/**
* getNextLink
* @function
* @param {Object} response A response object returned from calling 'client.makeRequest'
* @returns A parsed version of the link to the subsequent page, or null if no such page exists.
*/
var getNextLink = function (response) {
if (re... | var url = require("url");
var querystring = require("querystring");
/**
* getNextLink
* @function
* @param {Object} response A response object returned from calling 'client.makeRequest'
* @returns A parsed version of the link to the subsequent page, or null if no such page exists.
*/
var getNextLink = function (r... | Switch from qs to querystring | Switch from qs to querystring
querystring is a core node module
| JavaScript | mit | bandwidthcom/node-bandwidth,bandwidthcom/node-bandwidth |
678a1784f2518782a5226b9fbd6af3d046c76087 | src/js/client.js | src/js/client.js | import React from 'react';
import ReactDOM from 'react-dom';
const Layout = props => <h1>{props.name} がやっていく</h1>;
ReactDOM.render(
<Layout name="yukiyan" />,
document.getElementById('app')
);
| import React from 'react';
import ReactDOM from 'react-dom';
const Layout = props => <h1>{props.name} がやっていく</h1>;
Layout.propTypes = {
name: React.PropTypes.string.isRequired,
};
ReactDOM.render(
<Layout name="yukiyan" />,
document.getElementById('app')
);
| Fix `Prevent missing props validation` | :shirt: Fix `Prevent missing props validation`
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
| JavaScript | mit | yukiyan/hitori-js-no-kai,yukiyan/hitori-js-no-kai |
a18033574bc6d299068d29f4e3b30ce852192a11 | devapp/controller/_root_.js | devapp/controller/_root_.js | var Controller = require('../../').Controller;
module.exports = Controller.create({
index(req, res) {
res.render("index");
},
socket(req, res) {
res.render("socket");
},
_private(req, res) {
res
.type("text/html; charset=UTF-8")
.end("Correctry call... | var Controller = require('../../').Controller;
module.exports = Controller.create({
index(req, res) {
res.render("index");
},
"403"(req, res) {
throw new maya.NotAllowedException();
},
error(req, res) {
throw new Error("Handled correctry?");
},
socket(req, res) {
... | Add more example in devapp | Add more example in devapp
| JavaScript | mit | Ragg-/rektia,Ragg-/maya.js,Ragg-/rektia,Ragg-/rektia,Ragg-/maya.js |
21cb91b028f2aef83508862a637571dbf53d1d7c | addon/components/search-help-modal/component.js | addon/components/search-help-modal/component.js | import Ember from 'ember';
import layout from './template';
/**
* Modal that provides examples and explanation of Lucene Search syntax
*
* ```handlebars
* {{search-help-modal
* isOpen=isOpen
* }}
* ```
* @class search-help-modal
*/
export default Ember.Component.extend({
layout,
isOpen: false,
... | import Ember from 'ember';
import layout from './template';
/**
* Modal that provides examples and explanation of Lucene Search syntax
*
* ```handlebars
* {{search-help-modal
* isOpen=isOpen
* }}
* ```
* @class search-help-modal
*/
export default Ember.Component.extend({
layout,
isOpen: false,
... | Modify how the currentPath is retrieved. | Modify how the currentPath is retrieved.
| JavaScript | apache-2.0 | crcresearch/ember-osf,binoculars/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,crcresearch/ember-osf,binoculars/ember-osf,baylee-d/ember-osf,CenterForOpenScience/ember-osf,chrisseto/ember-osf,jamescdavis/ember-osf,chrisseto/ember-osf,jamescdavis/ember-osf |
bd33718f4c91ed7d3ee56800bea879a91da95a5d | src/components/Nav.js | src/components/Nav.js | import React from 'react'
import styled from 'styled-components'
import { NavLink as Link } from 'react-router-dom'
const Nav = styled.nav`
display: flex;
justify-content: center;
`
const NavLink = styled(Link)`
margin: 0 12px;
font-size: 1.8rem;
text-decoration: none;
color: var(--gray700);
&:hover,
... | import React from 'react'
import styled from 'styled-components'
import { NavLink as Link } from 'react-router-dom'
const Nav = styled.nav`
display: flex;
justify-content: center;
`
const NavLink = styled(Link)`
margin: 0 12px;
font-size: 1.8rem;
text-decoration: none;
color: var(--gray700);
&:hover,
... | Use aria-current selector instead of className | Use aria-current selector instead of className
| JavaScript | mit | alexandernanberg/minimal-react-boilerplate,alexandernanberg/minimal-react-boilerplate |
e793dd1b970136b8259233cb634696e83516dbf5 | api/fin/keys.js | api/fin/keys.js | /************************************
* Redis key and channel namespaces *
************************************/
module.exports = {
getItemPropertyKey: getItemPropertyKey,
getKeyInfo: getKeyInfo,
getPropertyChannel: getPropertyChannel,
getFocusProperty: getFocusProperty,
// The unique ID key is used to consiste... | /************************************
* Redis key and channel namespaces *
************************************/
module.exports = {
getItemPropertyKey: getItemPropertyKey,
getKeyInfo: getKeyInfo,
getPropertyChannel: getPropertyChannel,
getFocusProperty: getFocusProperty,
// The unique ID key is used to consiste... | Normalize variable names, and error check for undefined rather than for falsy | Normalize variable names, and error check for undefined rather than for falsy
| JavaScript | mit | marcuswestin/fin |
7ef13a5accca7ce29898be05b40151dbd456f7c5 | spec/GameSpec.js | spec/GameSpec.js | describe("Tic Tac Toe Game", function() {
it("makes sure that player One starts", function() {
var game = new Game()
var playerOne = "X"
var playerTwo = "O"
var validTurn = game.put(playerOne)
expect(validTurn).toEqual(true)
})
it("makes sure that player Two does not start", function() {
... | describe("Tic Tac Toe Game", function() {
var playerOne = "X"
var playerTwo = "O"
var game
beforeEach(function() {
game = new Game()
})
it("makes sure that player One starts", function() {
var validTurn = game.put(playerOne)
expect(validTurn).toEqual(true)
})
it("makes sure that player T... | Clean up test suite's common variables. | refactor: Clean up test suite's common variables.
Signed-off-by: Oleksii Fedorov <0263a738e29f7a423bda1d60ddbfb884af6a4010@gmail.com>
| JavaScript | mit | ilonade/tic-tac-toe-kata-js,ilonade/tic-tac-toe-kata-js |
0e2ae0145d4e8ab486609db8d69547ae516393b4 | src/eeh-inengine-api.js | src/eeh-inengine-api.js | (function (angular) {
'use strict';
var InEngineApi = function ($resource, apiUrl) {
this.$resource = $resource;
this.apiUrl = apiUrl;
};
InEngineApi.prototype.queryResource = function (name) {
return this.$resource(this.apiUrl + '/' + name).query().$promise;
};
InEngin... | (function (angular) {
'use strict';
var InEngineApi = function ($resource, apiUrl) {
this.$resource = $resource;
this.apiUrl = apiUrl;
};
InEngineApi.prototype.queryResource = function (name) {
return this.$resource(this.apiUrl + '/' + name).query().$promise;
};
InEngin... | Allow TimeZone list to be retrieved | Allow TimeZone list to be retrieved
| JavaScript | mit | InEngine-NET/eeh-inengine-api |
9b7c3d339d3f646af82fab2f00c60922264bd8a2 | src/stringify.js | src/stringify.js | // https://docs.influxdata.com/influxdb/v1.5/write_protocols/line_protocol_tutorial/#special-characters-and-keywords
export function stringifyPoints(points) {
return points.map(_stringifyPoint).join("\n");
}
export function _stringifyPoint({ measurement, values, tags, timestamp }) {
const tagsString = Object.entr... | // https://docs.influxdata.com/influxdb/v1.5/write_protocols/line_protocol_tutorial/#special-characters-and-keywords
export function stringifyPoints(points) {
return points.map(_stringifyPoint).join("\n");
}
export function _stringifyPoint({ measurement, values, tags, timestamp }) {
const tagsString = Object.entr... | Fix escapeTag for non-string values | Fix escapeTag for non-string values
| JavaScript | mit | 8fit/telemetry |
6b66bd8641d64527fd258a0b598197cf85de5045 | addon/routes/index.js | addon/routes/index.js | import Ember from 'ember';
export default Ember.Route.extend({
blogData: Ember.inject.service(),
model() {
return this.get('blogData').posts;
}
});
| import Ember from 'ember';
import DS from 'ember-data';
export default Ember.Route.extend({
blogData: Ember.inject.service(),
model() {
console.log('store service is an instanceof DS.Store', this.get('store') instanceof DS.Store);
return this.get('blogData').posts;
}
});
| Add logging to show store injected into routes is a DS.Store | Add logging to show store injected into routes is a DS.Store
| JavaScript | mit | dgeb/ember-blog-engine,dgeb/ember-blog-engine |
ae0d709ee679fa1a1a6f78054657c78872e972e6 | events/guildMemberUpdate.js | events/guildMemberUpdate.js | exports.func = (client, oldMember, newMember) => {
if(oldMember.nickname != newMember.nickname) {
oldFormatted = oldMember.nickname ? `\`${oldMember.nickname}\`` : "_(none)_";
newFormatted = newMember.nickname ? `\`${newMember.nickname}\`` : "_(none)_";
client.logToGuild(newMember.guild, `:name_badge: ${client.... | exports.func = (client, oldMember, newMember) => {
if(oldMember.nickname != newMember.nickname) {
oldFormatted = oldMember.nickname ? `\`${oldMember.nickname}\`` : "_(none)_";
newFormatted = newMember.nickname ? `\`${newMember.nickname}\`` : "_(none)_";
client.logToGuild(newMember.guild, `:name_badge: ${client.... | Fix bug where role change logged on nickname change. | Fix bug where role change logged on nickname change.
| JavaScript | mit | IanMurray/AnnuBot |
1caf1d51e008f1be19be85bddbfe154d7c957426 | plugins/early_talker.js | plugins/early_talker.js | // This plugin checks for clients that talk before we sent a response
var constants = require('../constants');
var config = require('../config');
exports.register = function() {
this.pause = config.get('early_talker.pause', 'value');
this.register_hook('data', 'check_early_talker');
};
exports.check_early... | // This plugin checks for clients that talk before we sent a response
var constants = require('../constants');
var config = require('../config');
exports.register = function() {
this.pause = config.get('early_talker.pause', 'value');
this.register_hook('data', 'check_early_talker');
};
exports.check_early... | Switch to denydisconnect simply cos early talkers are RUDE! | Switch to denydisconnect simply cos early talkers are RUDE!
| JavaScript | mit | craigslist/Haraka,hatsebutz/Haraka,smfreegard/Haraka,fredjean/Haraka,armored/Haraka,abhas/Haraka,abhas/Haraka,msimerson/Haraka,DarkSorrow/Haraka,slattery/Haraka,typingArtist/Haraka,jaredj/Haraka,dweekly/Haraka,julian-maughan/Haraka,baudehlo/Haraka,slattery/Haraka,fatalbanana/Haraka,hiteshjoshi/my-haraka-config,Dexus/Ha... |
fd03c4c0a67f96db1b7e82abc837e72603abc5d9 | plugins/leboncoin_fr.js | plugins/leboncoin_fr.js | var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'Le bon coin',
version:'0.1',
prepareImgLinks:function (callback) {
var res = [];
hoverZoom.urlReplace(res,
'img[src*="thumbs"], span.thumbs',
'thumbs',
'images'
);
... | var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push({
name:'Le bon coin',
version:'0.2',
prepareImgLinks:function (callback) {
var res = [];
hoverZoom.urlReplace(res,
'img[src*="thumbs"], span.thumbs',
'thumbs',
'images'
);
... | Fix for plug-in : LeBonCoin | Fix for plug-in : LeBonCoin
| JavaScript | mit | extesy/hoverzoom,extesy/hoverzoom |
e0f36db9a811f7f84e5d0de34ee6b0a8be83a562 | dom_test.js | dom_test.js | //
// Tests!
//
'use strict';
var dom = require('./dom');
var assert = require('assert');
//
// Test 'element' and 'clone'.
//
(function() {
var e = dom.element({name: 'p', contents: 'hello'});
assert.equal(e.name, 'p');
assert.equal(e.contents, 'hello');
})();
module.exports = 'passed!';
| //
// Tests!
//
'use strict';
var dom = require('./dom');
var assert = require('assert');
var eq = assert.deepEqual;
//
// Test 'element' and 'render'.
//
(function() {
var e = dom.element({name: 'br'});
eq(e.name, 'br');
eq(e.render().tagName, 'BR');
// Pass element a string to create an element wi... | Add basic tests for dom.js | Add basic tests for dom.js
| JavaScript | bsd-3-clause | garious/poochie,poochiejs/poochie |
ca2fd55e031543e80402dd6ed1cdc444ab56efe8 | client/src/js/references/components/Official.js | client/src/js/references/components/Official.js | import React from "react";
import { connect } from "react-redux";
import styled from "styled-components";
import { Box, Button, ExternalLink } from "../../base";
import { checkAdminOrPermission } from "../../utils/utils";
import { remoteReference } from "../actions";
const StyledReferenceOfficial = styled(Box)`
al... | import React from "react";
import { connect } from "react-redux";
import styled from "styled-components";
import { Box, Button, ExternalLink } from "../../base";
import { checkAdminOrPermission } from "../../utils/utils";
import { remoteReference } from "../actions";
const StyledReferenceOfficial = styled(Box)`
al... | Change official reference message wording | Change official reference message wording
| JavaScript | mit | virtool/virtool,igboyes/virtool,virtool/virtool,igboyes/virtool |
dc070cc81c8f7fe1215787fa006dc57718b89225 | web/src/js/mutations/UpdateVcMutation.js | web/src/js/mutations/UpdateVcMutation.js | import {
commitMutation,
graphql
} from 'react-relay/compat'
const mutation = graphql`
mutation UpdateVcMutation($input: UpdateVcInput!) {
updateVc(input: $input) {
user {
id
}
}
}
`
function commit (environment, user) {
const userId = user.id
return commitMutation(
enviro... | import {
commitMutation,
graphql
} from 'react-relay/compat'
const mutation = graphql`
mutation UpdateVcMutation($input: UpdateVcInput!) {
updateVc(input: $input) {
user {
id
}
}
}
`
function commit (environment, user) {
const userId = user.id
return commitMutation(
enviro... | Fix user VC incrementing on client side. | Fix user VC incrementing on client side.
| JavaScript | mpl-2.0 | gladly-team/tab,gladly-team/tab,gladly-team/tab |
a06ff0e7c53f2f2e749c2bad383d40b289cf9be4 | js/Flux/AuthTokenActions.js | js/Flux/AuthTokenActions.js | /**
* Copyright 2015-present 650 Industries. All rights reserved.
*
* @providesModule AuthTokenActions
*/
'use strict';
import { action } from 'Flux';
import LocalStorage from '../Storage/LocalStorage';
let AuthTokenActions = {
@action
setAuthTokens(tokens) {
LocalStorage.saveAuthTokensAsync(tokens);
... | /**
* Copyright 2015-present 650 Industries. All rights reserved.
*
* @providesModule AuthTokenActions
*/
'use strict';
import { action } from 'Flux';
import LocalStorage from '../Storage/LocalStorage';
let AuthTokenActions = {
@action
setAuthTokens(tokens) {
LocalStorage.saveAuthTokensAsync(tokens);
... | Fix sign out to clear local storage | Fix sign out to clear local storage
fbshipit-source-id: ab91990
| JavaScript | bsd-3-clause | exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponent/exponen... |
52bd6f2dfe50469e7818240a45f34d3ba16b122a | lib/auth0.js | lib/auth0.js | import Auth0Lock from 'auth0-lock'
export const lock = new Auth0Lock(process.env.AUTH0_CLIENT_ID, process.env.AUTH0_DOMAIN)
| import Auth0Lock from 'auth0-lock'
export const isRequired = process.env.AUTH0_CLIENT_ID && process.env.AUTH0_DOMAIN
export const lock = new Auth0Lock(process.env.AUTH0_CLIENT_ID, process.env.AUTH0_DOMAIN)
| Add a check to see if auth is necessary | Add a check to see if auth is necessary
| JavaScript | mit | conveyal/analysis-ui,conveyal/scenario-editor,conveyal/analysis-ui,conveyal/scenario-editor,conveyal/analysis-ui |
9241f87d243e9852c9fb3cc7cce4af650de54d24 | frontend/src/next.config.js | frontend/src/next.config.js | const withCSS = require('@zeit/next-css');
const { ANALYZE } = process.env;
// Use next-compose-plugins if this gets weird
module.exports = withCSS({
distDir: '../.next', // this is next's config, not next-css'
webpack: (config, { isServer }) => {
if (ANALYZE) {
const { BundleAnalyzerPlugin } = require(... | const withCSS = require('@zeit/next-css');
const { ANALYZE } = process.env;
// Use next-compose-plugins if this gets weird
module.exports = withCSS({
distDir: '../.next', // this is next's config, not next-css'
webpack: (config, { isServer }) => {
if (ANALYZE) {
const { BundleAnalyzerPlugin } = require(... | Set higher age and buffer length for Next.js pages in dev | Set higher age and buffer length for Next.js pages in dev
| JavaScript | agpl-3.0 | iquabius/olimat,iquabius/olimat,iquabius/olimat |
735f856dc8926c164f252f57b65bbbeadf38aee2 | lib/index.js | lib/index.js | var buildFile = require('./build-file')
var runGitCommand = require('./helpers/run-git-command')
var COMMITHASH_COMMAND = 'rev-parse HEAD'
var VERSION_COMMAND = 'describe --always'
function GitRevisionPlugin (options) {
this.gitWorkTree = options && options.gitWorkTree
this.lightweightTags = options && options.li... | var buildFile = require('./build-file')
var runGitCommand = require('./helpers/run-git-command')
var COMMITHASH_COMMAND = 'rev-parse HEAD'
var VERSION_COMMAND = 'describe --always'
function GitRevisionPlugin (options) {
options = options || {}
this.gitWorkTree = options.gitWorkTree
this.commithashCommand = op... | Refactor lightweight tags to remove duplication 🐞 | Refactor lightweight tags to remove duplication 🐞 | JavaScript | mit | pirelenito/git-revision-webpack-plugin,pirelenito/git-revision-webpack-plugin,pirelenito/git-revision-webpack-plugin |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.