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 |
|---|---|---|---|---|---|---|---|---|---|
733b66e5733800e4abc8dbcf358b3af20e424313 | app/components/popover-confirm.js | app/components/popover-confirm.js | import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['popover-confirm'],
iconClass: function () {
var filename = this.get('filename'),
regex, extension;
if (filename) {
regex = /\.([0-9a-z]+)$/i;
extension = filename.match(/\.([0-... | import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['popover-confirm'],
iconClass: function () {
var filename = this.get('filename'),
regex, match, extension;
if (filename) {
regex = /\.([0-9a-z]+)$/i;
match = filename.match(/\.(... | Fix generating icon name for files without extension | Fix generating icon name for files without extension
| JavaScript | mit | cowbell/sharedrop,umeshjakhar/sharedrop,cowbell/sharedrop,rogervaas/sharedrop,umeshjakhar/sharedrop,rogervaas/sharedrop |
c118153f2f48a271cb8d4859e5c65e22cd59ee5f | app/components/repos-list-item.js | app/components/repos-list-item.js | import Ember from 'ember';
import Polling from 'travis/mixins/polling';
import { colorForState } from 'travis/utils/helpers';
export default Ember.Component.extend(Polling, {
routing: Ember.inject.service('-routing'),
tagName: 'li',
pollModels: 'repo',
classNames: ['repo'],
classNameBindings: ['selected'],
... | import Ember from 'ember';
import Polling from 'travis/mixins/polling';
import { colorForState } from 'travis/utils/helpers';
export default Ember.Component.extend(Polling, {
routing: Ember.inject.service('-routing'),
tagName: 'li',
pollModels: 'repo',
classNames: ['repo'],
classNameBindings: ['selected'],
... | Remove click handler overriding default link behavior | Remove click handler overriding default link behavior
An [issue](https://github.com/travis-ci/travis-ci/issues/5181) was reported in
which the repository sidebar links were not functioning properly. I've
tracked it down to the fact that a click handler was registered and
automatically performing a redirect to the repo... | JavaScript | mit | fauxton/travis-web,fotinakis/travis-web,travis-ci/travis-web,travis-ci/travis-web,travis-ci/travis-web,travis-ci/travis-web,fotinakis/travis-web,fauxton/travis-web,fauxton/travis-web,fauxton/travis-web,fotinakis/travis-web,fotinakis/travis-web |
8aa9ed0a01065affb26bd069fc4afbdcfd9a7cf3 | tasks/appium.js | tasks/appium.js | /*
* grunt-appium
* https://github.com/hungrydavid/grunt-appium
*
* Copyright (c) 2015 David Adams
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Please see the Grunt documentation for more information regarding task
// creation: http://gruntjs.com/creating-tasks
... | /*
* grunt-appium
* https://github.com/hungrydavid/grunt-appium
*
* Copyright (c) 2015 David Adams
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Please see the Grunt documentation for more information regarding task
// creation: http://gruntjs.com/creating-tasks
... | Make task async and only quit once process exits | Make task async and only quit once process exits
| JavaScript | mit | hungrydavid/grunt-appium |
308f844589596950fc43b2699bdd33d79f67bcb4 | postinstall.js | postinstall.js | 'use strict';
var fs = require('fs');
var cp = require('child_process');
var assert = require('assert');
var partialDependencies = {
"concat-stream": "^1.4.7",
"os-shim": "^0.1.2"
};
var fullDependencies = {
"concat-stream": "^1.4.7",
"os-shim": "^0.1.2",
"try-thread-sleep": "^1.0.0"
};
var REQUIRES_UPDATE... | 'use strict';
var fs = require('fs');
var cp = require('child_process');
var assert = require('assert');
var partialDependencies = {
"concat-stream": "^1.4.7",
"os-shim": "^0.1.2"
};
var fullDependencies = {
"concat-stream": "^1.4.7",
"os-shim": "^0.1.2",
"try-thread-sleep": "^1.0.0"
};
var REQUIRES_UPDATE... | Add quotes around the npm_execpath | Add quotes around the npm_execpath
[fixes #19]
| JavaScript | mit | ForbesLindesay/spawn-sync,terabyte/spawn-sync,bcoe/spawn-sync,tmagiera/spawn-sync |
48e5053047d6b48c40a55a69b9f945658b4ef438 | lib/Middleware.js | lib/Middleware.js | export default class Middleware {
/**
* Constructor
*/
constructor(key, value) {
key = key.toLowerCase();
// In case of simple middleware
if (key == "middleware") {
return this.simpleMiddleware(value);
}
if (OPTIONS[key]) {
return OPTIONS[key].init(value);
}
}
/**
*... | export default class Middleware {
/**
* Constructor
*/
constructor(key, value) {
key = key.toLowerCase();
// In case of simple middleware
if (key == "middleware") {
return this.simpleMiddleware(value);
}
if (OPTIONS[key]) {
return {
key: key,
value: OPTIONS[key... | Add the key and value in option | Add the key and value in option
| JavaScript | mit | ArthurMialon/StarterApiNodejs |
46f8795db8215e2a470b54cfe1e94ebb1888460e | closure/testing/test/arithmetic_es6module_test.js | closure/testing/test/arithmetic_es6module_test.js | // Copyright 2016 The Closure Rules Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... | // Copyright 2016 The Closure Rules Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... | Remove use of the import 'goog:...' pattern | Remove use of the import 'goog:...' pattern
Support for this is soon to be removed.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177366930
| JavaScript | apache-2.0 | jart/rules_closure,jart/rules_closure,jart/rules_closure,gramic/rules_closure,gramic/rules_closure,bazelbuild/rules_closure,gramic/rules_closure,gramic/rules_closure,jart/rules_closure,jart/rules_closure,bazelbuild/rules_closure,bazelbuild/rules_closure,bazelbuild/rules_closure |
ab7e76c25376e82ca3559b6a088ea213ae227a6e | src/resources/basefield.js | src/resources/basefield.js | export class Basefield {
id = '';
label = '';
columns = 8;
index = undefined;
parent = undefined;
init(id = '', {label = '', columns = 8, parent, index} = {}) {
this.id = id;
this.label = label;
this.columns = columns;
this.index = index;
this.parent = parent;
return this;
}
bi... | export class Basefield {
id = '';
label = '';
columns = 8;
index = undefined;
parent = undefined;
init(id = '', {label = '', columns = 8, parent, index} = {}) {
this.id = id;
this.label = label;
this.columns = columns;
this.index = index;
this.parent = parent;
return this;
}
bi... | Fix not being able to delete first item of list | Fix not being able to delete first item of list
| JavaScript | mit | apinf/openapi-designer,apinf/open-api-designer,apinf/open-api-designer,apinf/openapi-designer |
204c213882920d4666fb962d8c3bb39ce2fcf988 | lib/apply-data.js | lib/apply-data.js | import { handleSuccess, handleFailure } from './assert-promise';
function applyData(object, data) {
return new Ember.RSVP.Promise(function(resolve, reject) {
if (typeof data === 'function') {
var newObject = data.call(object, object);
if (!newObject.then) {
return resolve(newObject);
}... | import { handleSuccess, handleFailure } from './assert-promise';
function applyData(object, data) {
return new Ember.RSVP.Promise(function(resolve, reject) {
if (typeof data === 'function') {
var newObject = data.call(object, object);
if (!newObject.then) {
return resolve(newObject);
}... | Allow `{local: true, id: 123}` specification for relationships (inside `data` hash) | Allow `{local: true, id: 123}` specification for relationships (inside `data` hash)
| JavaScript | mit | runtrizapps/ember-testing-grate |
8dcb43a4272563971cd22f32106731519451f83a | desktop/app/components/tasks/directive.js | desktop/app/components/tasks/directive.js | angular.module('MainApp')
.directive('uaf', () => { // uaf = Update after find
return (scope, el, attrs) => {
scope.$watch('tasks', (newVal) => {
el[0].children[0].children[0].innerHTML = newVal[attrs.uaf];
}, true);
};
});
| angular.module('MainApp')
.directive('uaf', () => // uaf = Update after find
(scope, el, attrs) => {
scope.$watch('tasks', (newVal) => {
el[0].children[0].children[0].innerHTML = newVal[attrs.uaf];
}, true);
}
);
| Fix eslint errors - 6 | Fix eslint errors - 6
| JavaScript | mit | mkermani144/wanna,mkermani144/wanna |
d90c82cea8abeace95e5b97cc0e51debe0b63225 | packages/lesswrong/lib/collections/tagRels/views.js | packages/lesswrong/lib/collections/tagRels/views.js | import { TagRels } from './collection.js';
import { ensureIndex } from '../../collectionUtils';
TagRels.addView('postsWithTag', terms => {
return {
selector: {
tagId: terms.tagId,
baseScore: {$gt: 0},
},
}
});
TagRels.addView('tagsOnPost', terms => {
return {
selector: {
postId: te... | import { TagRels } from './collection.js';
import { ensureIndex } from '../../collectionUtils';
TagRels.addView('postsWithTag', terms => {
return {
selector: {
tagId: terms.tagId,
baseScore: {$gt: 0},
},
sort: {baseScore: -1},
}
});
TagRels.addView('tagsOnPost', terms => {
return {
s... | Sort tags by descending relevance | Sort tags by descending relevance
| JavaScript | mit | Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2 |
df3fd41acf43fe5b0401ecb60ae090541c575d59 | lib/mainWindow.js | lib/mainWindow.js | import { screen } from 'electron';
/**
* Create main window's settings.
* @param {Object} rawopts - Configuration options for main window.
* @return {Object} The main window configuration.
*/
function mainWindow(rawopts) {
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
const opts = Object.a... | import { screen } from 'electron';
/**
* Create main window's settings.
* @param {Object} rawopts - Configuration options for main window.
* @return {Object} The main window configuration.
*/
function mainWindow(rawopts) {
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
const opts = Object.a... | Hide main window until ready | Hide main window until ready
| JavaScript | mit | JamenMarz/cluster,JamenMarz/vint |
c32995e50fc10e50e6808d5f5df51dd203c8a613 | src/utils/getUsers.js | src/utils/getUsers.js | import axios from 'axios';
function getUsers() {
return axios({
url: '/api/users',
timeout: 20000,
method: 'get',
responseType: 'json'
})
.then(function (res) {
return res.data;
})
}
export default getUsers; | import axios from 'axios';
function getUsers() {
return axios({
url: '/api/users',
timeout: 20000,
method: 'get',
responseType: 'json'
})
.then(function (res) {
return res.data;
})
}
export default getUsers; | Set up getUser axios to get all users | Set up getUser axios to get all users
| JavaScript | mit | Keitarokido/tiles,Keitarokido/tiles |
8941d15ae95988becf61ba2d05a4eca140dd2486 | test/of_test.js | test/of_test.js | import check from './support/check';
describe('of operator', () => {
it('turns into an `in` operator', () => {
check(`
a of b
`, `
a in b;
`);
});
it('works in an expression context', () => {
check(`
a(b, c.d of e)
`, `
a(b, c.d in e);
`);
});
it('works with ... | import check from './support/check';
describe('of operator', () => {
it('turns into an `in` operator', () => {
check(`
a of b
`, `
a in b;
`);
});
it('works in an expression context', () => {
check(`
a(b, c.d of e)
`, `
a(b, c.d in e);
`);
});
it('works with ... | Add another test for double negation of `of`. | Add another test for double negation of `of`.
| JavaScript | mit | eventualbuddha/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate |
5016ab3b206d1a53fce943d07b0402df7a145aed | server/db/controllers/getMatchesGivenSelfAndOffset.js | server/db/controllers/getMatchesGivenSelfAndOffset.js | const db = require('../db.js');
module.exports = (self, offSet) => {
const queryStr = `SELECT teach.teach_id FROM (
(
SELECT users_languages_levels.user AS teach_id FROM users_languages_levels
INNER JOIN languages_levels
... | const db = require('../db.js');
module.exports = (self, offSet) => {
const queryStr = `SELECT teach.teach_id FROM (
(
SELECT users_languages_levels.user AS teach_id FROM users_languages_levels
INNER JOIN languages_levels
... | Add limit and offset in query string | Add limit and offset in query string
| JavaScript | mit | VictoriousResistance/iDioma,VictoriousResistance/iDioma |
217c40ac2ca61f4a14f41a1a5b3d4f7983910b46 | harmless-ransom-note.js | harmless-ransom-note.js | // Harmless Ransom Note
/* Rules:
Takes two parameters
First will be the note we want to write as a string.
The second will be the magazine text we have available to make the note out of as a string
The purpose of the algorithm is to see if we have enough words in the magazine text to write our note
If... | // Harmless Ransom Note
/* Rules:
Takes two parameters
First will be the note we want to write as a string.
The second will be the magazine text we have available to make the note out of as a string
The purpose of the algorithm is to see if we have enough words in the magazine text to write our note
If... | Add pseudocode in notes, begin skeleton of function | Add pseudocode in notes, begin skeleton of function
| JavaScript | mit | benjaminhyw/javascript_algorithms |
3a4bba37b5f2e46fc8484a9ad1a5142bf9adc183 | src/templates/blog-post.js | src/templates/blog-post.js | import React from "react";
import { graphql, Link } from "gatsby";
import Layout from "../app/layout";
import "./blog-post.scss";
export const BLOG_POST_QUERY = graphql`
query BlogPostTemplate($slug: String!) {
markdownRemark(fields: { slug: { eq: $slug } }) {
id
excerpt
html
fields {
... | import React from "react";
import { graphql, Link } from "gatsby";
import Layout from "../app/layout";
import "prismjs/themes/prism-solarizedlight.css";
import "./blog-post.scss";
export const BLOG_POST_QUERY = graphql`
query BlogPostTemplate($slug: String!) {
markdownRemark(fields: { slug: { eq: $slug } }) {
... | Add styles for code blocks | Add styles for code blocks
| JavaScript | mit | yanglinz/personal-site,yanglinz/personal-site |
0e34b6069f2f4e70620eeb40fa44f19e1a93f5e0 | datasets.js | datasets.js | /**
* Different datasets the tool can use
*
* The first-level keys are country names, in English,
* as they will appear in the app
*
* The second level names are database identifiers.
* These ids are used in the url, so should be as short as possible
*
* The name of a database will be visible in the app, and m... | /**
* Different datasets the tool can use
*
* The first-level keys are country names, in English,
* as they will appear in the app
*
* The second level names are database identifiers.
* These ids are used in the url, so should be as short as possible
*
* The name of a database will be visible in the app, and m... | Enable the Norwegian kindergartens again (not yet visible due to lack of data in the right repo) | Enable the Norwegian kindergartens again (not yet visible due to lack of data in the right repo)
| JavaScript | bsd-3-clause | POI-Importer/POI-Importer.github.io,POI-Importer/POI-Importer.github.io |
050a474b6f5e000584bf5a1a8f41e3d9750faf3d | tasks/load-options.js | tasks/load-options.js | /*
* grunt-load-options
* https://github.com/chriszarate/grunt-load-options
*
* Copyright (c) 2013 Chris Zarate
* Licensed under the MIT license.
*/
'use strict';
var requireDirectory = require('require-directory');
module.exports = function(grunt) {
grunt.initConfig(requireDirectory(module, './grunt/options... | /*
* grunt-load-options
* https://github.com/chriszarate/grunt-load-options
*
* Copyright (c) 2013 Chris Zarate
* Licensed under the MIT license.
*/
'use strict';
var requireDirectory = require('require-directory');
module.exports = function(grunt) {
// Load config options.
var options = requireDirectory(... | Resolve options expressed as functions. | Resolve options expressed as functions.
| JavaScript | mit | chriszarate/grunt-load-options |
3fc6e2976b46dfaa6dc6768884f8c7a959c12996 | client/shared/services/metaDataService.js | client/shared/services/metaDataService.js | 'use strict';
export default class metaDataService {
constructor() {
this.pageTitle = '';
}
getPageTitle() {
return this.pageTitle;
}
setPageTitle(newTitle) {
this.pageTitle = newTitle;
}
} | 'use strict';
export default class metaDataService {
constructor($location) {
this.pageTitle = '';
this.address = `http://${$location.host()}/`;
}
getPageTitle() {
return this.pageTitle;
}
setPageTitle(newTitle) {
this.pageTitle = newTitle;
}
}
metaDataService... | Add site address to metadata service | Add site address to metadata service
| JavaScript | mit | flareair/board_of_shame,flareair/board_of_shame,flareair/board_of_shame |
4c869f1077036ededd6c755a600b9200997f56bb | src/widgets/index.js | src/widgets/index.js | // Lazy-loaded modules are assumed on the hosting domain,
// so we override the constant at runtime.
// __webpack_public_path__ = process.env.NODE_ENV === "production"
// ? "https://example.com"
// : "http://localhost:3000";
import { camelCase } from "lodash";
(async () => {
// For minority of browers, bring in... | import { camelCase } from "lodash";
(async () => {
// For minority of browers, bring in heavier polyfills.
if (!Object.assign || !Array.from || !window.location.origin) {
await import("../polyfills");
}
// Iterable list of widget scripts
const containers = [...document.querySelectorAll("[data-my-widget]... | Remove __webpack_public_path__ for a "gotcha" | Remove __webpack_public_path__ for a "gotcha"
| JavaScript | mit | ericclemmons/performant-3rd-party-widgets,ericclemmons/performant-3rd-party-widgets |
765578bfcb878b4fc7668b08ce2fe6fb12721592 | helpers/unixToDate.js | helpers/unixToDate.js | module.exports = (function(){
return function unixToDate(unixTime) {
console.log(unixTime)
var date = new Date(Number(unixTime));
var year = date.getFullYear();
var month;
var day;
if (date.getMonth().toString().length === 1) {
month = "0" + (date.getMonth() + 1).toString();
} else {
month = (date... | module.exports = function(unixTime) {
var date = new Date(Number(unixTime))
var year = date.getFullYear()
var month = constructMonth(date)
var day = constructDay(date)
return year + '-' + month + '-' + day
}
function constructMonth(date) {
var month = (date.getMonth() + 1).toString()
return padFormatting(month... | Refactor date conversion into smaller, more modular methods | Refactor date conversion into smaller, more modular methods
| JavaScript | mit | capsul/capsul-api |
277eeede63ec0ec591eaa934c2ace2df13592e77 | test/special/index.js | test/special/index.js | 'use strict';
var _ = require('lodash');
var fs = require('fs');
var hljs = require('../../build');
var jsdom = require('jsdom').jsdom;
var utility = require('../utility');
describe('special cases tests', function() {
before(function(done) {
var filename = utility.buildPath('fixtures', 'index.ht... | 'use strict';
var _ = require('lodash');
var bluebird = require('bluebird');
var hljs = require('../../build');
var jsdomEnv = bluebird.promisify(require('jsdom').env);
var readFile = bluebird.promisify(require('fs').readFile);
var utility = require('../utility');
describe('special cases tests', function(... | Use promises for special case tests | Use promises for special case tests
I'm not too sure what is causing tests to fail because locally they pass
and on travis `class` is turning into `undefined`.
| JavaScript | bsd-3-clause | aurusov/highlight.js,teambition/highlight.js,Sannis/highlight.js,MakeNowJust/highlight.js,carlokok/highlight.js,bluepichu/highlight.js,StanislawSwierc/highlight.js,carlokok/highlight.js,palmin/highlight.js,teambition/highlight.js,carlokok/highlight.js,isagalaev/highlight.js,dbkaplun/highlight.js,tenbits/highlight.js,hi... |
97f6eb7ce14fe5baa6533216fa04717e69e7f44b | test/support/index.js | test/support/index.js | var root = null;
if (typeof window === 'undefined') {
root = global;
root.tryc = require('../../');
} else {
root = window;
root.tryc = require('tryc');
root.__karma__.start = function() {
root.__karma__.info({ total: 1 });
root.__karma__.result({ success: true });
root.__karma__.complete();
};... | var root = null;
var completed = null;
var tests = [];
if (typeof window === 'undefined') {
root = global;
root.tryc = require('../../');
completed = function(){};
} else {
root = window;
root.tryc = require('tryc');
root.__karma__.start = function() {};
completed = function() {
root.__karma__.info(... | Fix issues with the custom test runner | Fix issues with the custom test runner
| JavaScript | mit | vesln/tryc |
f506d6f9e71821fe808d2b77d2b5c886591383ed | lib/plugin/theme/renderable/collection.js | lib/plugin/theme/renderable/collection.js | "use strict";
const Renderable = require('./renderable');
class Collection extends Renderable {}
Collection.Instance = require('./collectionInstance');
/*
const Registry = require('../../../util/registry');
class Collection extends Renderable {
addElement(data, element) {
if (!data.elementRegistry) {
da... | "use strict";
const Renderable = require('./renderable');
class Collection extends Renderable {}
Collection.Instance = require('./collectionInstance');
module.exports = Collection;
| Remove accidental inclusion of commented-out code | Remove accidental inclusion of commented-out code
| JavaScript | mit | coreyp1/defiant,coreyp1/defiant |
eeb287f6029c7116b81ac81af76e055b2e3efa85 | commands/misc.js | commands/misc.js | /*
Miscellaneous commands
*/
Settings.addPermissions(['pick', 'randomanswer']);
exports.commands = {
choose: 'pick',
pick: function (arg, by, room, cmd) {
var choices = arg.split(",");
choices = choices.filter(function (i) {return (toId(i) !== '');});
if (choices.length < 2) return this.pmReply(this.trad('er... | /*
Miscellaneous commands
*/
Settings.addPermissions(['pick', 'randomanswer', 'usage', 'help']);
exports.commands = {
choose: 'pick',
pick: function (arg, by, room, cmd) {
var choices = arg.split(",");
choices = choices.filter(function (i) {return (toId(i) !== '');});
if (choices.length < 2) return this.pmRe... | Add usage and help commands | Add usage and help commands
| JavaScript | mit | ateck5/le_spatula,sama2/Pokemon-Showdown-Node-Bot,awolffromspace/PC-Battle-Server-Bot,TheFenderStory/Mambot,Ecuacion/Espaol-Bot,abulechu/Pokemon-Showdown-Node-Bot,Robophill/Pokemon-Showdown-Node-Bot,Flareninja/Pokemon-Showdown-Node-Bot,Ecuacion/Pokemon-Showdown-Node-Bot,TheFenderStory/Pokemon-Showdown-Node-Bot,Freigeis... |
28aed7e4779ad302b0b25b2d321a975179a24602 | test/validation_test.js | test/validation_test.js | 'use strict';
const assert = require('assert');
const Event = require('../db/models/Event');
describe('Validation of User records', () => {
it('should require a name for every event', () => {
const validationEvt = new Event({ name: undefined }),
validationResult = validationEvt.validateSync(),
... | 'use strict';
const assert = require('assert');
const Event = require('../db/models/Event');
describe('Validation of User records', () => {
// Tests that records for which no `name` property is defined are marked invalid
// and return a validation fallback message:
it('should require a name for every event', ... | Write test to catch invalid inserts | test: Write test to catch invalid inserts
| JavaScript | mit | IsenrichO/react-timeline,IsenrichO/react-timeline |
5f32e2d1ee4cb89dc50b4bcd5126258cbe6f2107 | test/common/cycle.js | test/common/cycle.js | 'use strict';
/* global describe, it */
let assert = require('assert');
let Cycle = require('../../src/cycle');
describe('Cycle', function () {
describe('API', function () {
it('should have `applyToDOM`', function () {
assert.strictEqual(typeof Cycle.applyToDOM, 'function');
});
it('should have `r... | 'use strict';
/* global describe, it */
let assert = require('assert');
let Cycle = require('../../src/cycle');
describe('Cycle', function () {
describe('API', function () {
it('should have `applyToDOM`', function () {
assert.strictEqual(typeof Cycle.applyToDOM, 'function');
});
it('should have `r... | Add test case for svg() (like h() is) | Add test case for svg() (like h() is)
| JavaScript | mit | bzalasky/cycle-core,Widdershin/cycle-core,secobarbital/cycle-core,beni55/cycle-core,gdseller/cycle-core,Amirus/cycle-core,secobarbital/cycle-core,richardTowers/cycle-core,beni55/cycle-core,ccapndave/cycle-core,Iced-Tea/cycle-core,Widdershin/cycle-core,Iced-Tea/cycle-core,Amirus/cycle-core |
5116c1dd1c7a9e993d0c4b86a67d58520386fb56 | test/detect/index.js | test/detect/index.js | 'use strict';
var bluebird = require('bluebird');
var fs = bluebird.promisifyAll(require('fs'));
var hljs = require('../../build');
var path = require('path');
var utility = require('../utility');
function testAutoDetection(language) {
var languagePath = utility.buildPath('detect', language);
it(`... | 'use strict';
let bluebird = require('bluebird');
let fs = bluebird.promisifyAll(require('fs'));
let hljs = require('../../build');
let path = require('path');
let utility = require('../utility');
function testAutoDetection(language) {
let languagePath = utility.buildPath('detect', language);
it(`... | Use let in the detect test suite | Use let in the detect test suite
| JavaScript | bsd-3-clause | bluepichu/highlight.js,bluepichu/highlight.js,MakeNowJust/highlight.js,isagalaev/highlight.js,highlightjs/highlight.js,highlightjs/highlight.js,teambition/highlight.js,Sannis/highlight.js,carlokok/highlight.js,MakeNowJust/highlight.js,palmin/highlight.js,sourrust/highlight.js,bluepichu/highlight.js,StanislawSwierc/high... |
cb192f3b98bcfc5d8363924c5be1f2be37a2dbb5 | admin/scripts/default.js | admin/scripts/default.js | $(document).ready(function () {
/*Navigation initialization*/
var navigation = $('#navigation');
var navShown = false;
$('#nav-controller').on('click', function () {
if (navShown) {
navigation.removeClass('show-nav');
navigation.addClass('hide-nav');
navShown... | $(document).ready(function () {
/*Navigation initialization*/
var navigation = $('#navigation');
var navShown = false;
var navController = $('#nav-controller');
if (navController) {
navController.on('click', function () {
if (navShown) {
navigation.removeClass('s... | Resolve all the JS errors | Resolve all the JS errors
| JavaScript | mit | UoG-Libraries/Adshow,UoG-Libraries/Adshow,UoG-Libraries/Adshow |
10be5cde2d00aee7a8aaf248f978476d92f73581 | app/js/service/router.js | app/js/service/router.js | define([
'flight/lib/component',
'director'
], function(defineComponent, Router) {
'use strict';
function RouterService() {
this.gotoPost = function(id) {
this.trigger(document, 'service.fetchPost', {
"id": id
});
};
this.gotoPosts = func... | define([
'flight/lib/component',
'director'
], function(defineComponent, Router) {
'use strict';
function RouterService() {
this.gotoPost = function(id) {
this.trigger(document, 'service.fetchPost', {
"id": id
});
};
this.gotoPosts = func... | Set post page as the default page | Set post page as the default page
| JavaScript | mit | unitedstackfront/ued,unitedstackfront/ued |
d76797c3ac220189e303670312bb6571ef096b22 | packages/create-graphql/src/utils.js | packages/create-graphql/src/utils.js | import shell from 'shelljs';
import chalk from 'chalk';
import ora from 'ora';
import spawn from 'cross-spawn-promise';
const tic = chalk.green('✓');
const tac = chalk.red('✗');
const installYeoman = async () => {
const spinner = ora('Installing Yeoman...');
spinner.start();
let command = 'yarn';
let args =... | import shell from 'shelljs';
import chalk from 'chalk';
import ora from 'ora';
import spawn from 'cross-spawn-promise';
const tic = chalk.green('✓');
const tac = chalk.red('✗');
const installYeoman = async () => {
const spinner = ora('Installing Yeoman...');
spinner.start();
const command = 'npm';
const arg... | Remove the yarn checking, as yarn itself is not stable yet and a lot of people are using old versions. | Remove the yarn checking, as yarn itself is not stable yet and a lot of people are using old versions.
| JavaScript | mit | graphql-community/create-graphql,lucasbento/create-graphql |
cd0c283d607b5ac4af377d9a05a99218c5ae7091 | assets/js/modules/idea-hub/datastore/base.js | assets/js/modules/idea-hub/datastore/base.js | /**
* `modules/idea-hub` base data store
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LIC... | /**
* `modules/idea-hub` base data store
*
* Site Kit by Google, Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LIC... | Add ownerID in settingSlugs for idea hub. | Add ownerID in settingSlugs for idea hub.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
eb530d7da6d372703d54f6648cdf5000949d71a9 | Ship/CommandSource.js | Ship/CommandSource.js | class CommandSource {
constructor(messageSource,botUsername){
this.botUsername = botUsername;
this.bindings = {};
messageSource.on("text",this.handle.bind(this));
}
addCommand(name,command){
if(name in this.bindings){
throw `Error: A command is already bound to ${name}`;
}
this.bind... | class CommandSource {
constructor(messageSource,botUsername){
this.botUsername = botUsername;
this.bindings = {};
messageSource.on("text",this.handle.bind(this));
}
addCommand(name,command){
if(name in this.bindings){
throw `Error: A command is already bound to ${name}`;
}
this.bind... | Fix bot failing to respond to command with it's username | Fix bot failing to respond to command with it's username
Fix #5
| JavaScript | mit | severnbronies/Sail |
7c014584f848d9f7df9470ee796aaa32317a82de | db/users.js | db/users.js | var records = [
{ id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] }
, { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@example.com' } ] }
];
exports.findByUsername = function(username, cb) {
process.nextTi... | require('dotenv').load()
var records = [
{ id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] }
, { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@example.com' } ] }
];
if (process.env.shared_secret != null &&... | Support for shared secrets for authentication. | Support for shared secrets for authentication.
Provide an enviroment variable "shared_secret" and you will
be able to authenticate with any username that is not matched
in the "database." Optionally, provide "shared_username" to
set the username explicitly; otherwise, "community" will be
used.
| JavaScript | unlicense | community-lands/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station,community-lands/community-lands-monitoring-station,community-lands/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station |
297c33b3f790fdbdec51891451703724ca1a2614 | core/client/components/gh-activating-list-item.js | core/client/components/gh-activating-list-item.js | var ActivatingListItem = Ember.Component.extend({
tagName: 'li',
classNameBindings: ['active'],
active: false
});
export default ActivatingListItem;
| var ActivatingListItem = Ember.Component.extend({
tagName: 'li',
classNameBindings: ['active'],
active: false,
unfocusLink: function () {
this.$('a').blur();
}.on('click')
});
export default ActivatingListItem;
| Fix active menu state on settings navigation | Fix active menu state on settings navigation
closes #4622
- unfocus ActivatingListItem link when clicked
| JavaScript | mit | panezhang/Ghost,beautyOfProgram/Ghost,jaswilli/Ghost,qdk0901/Ghost,rchrd2/Ghost,schematical/Ghost,icowan/Ghost,singular78/Ghost,NamedGod/Ghost,GroupxDev/javaPress,Bunk/Ghost,jomahoney/Ghost,SachaG/bjjbot-blog,bisoe/Ghost,kwangkim/Ghost,daihuaye/Ghost,ngosinafrica/SiteForNGOs,ASwitlyk/Ghost,prosenjit-itobuz/Ghost,BayPhi... |
8df9abb705e05391a592a379b9ddbc6d27b3d1cf | packages/react-jsx-highcharts/src/components/PlotBandLine/usePlotBandLineLifecycle.js | packages/react-jsx-highcharts/src/components/PlotBandLine/usePlotBandLineLifecycle.js | import React, { useRef, useEffect, useState } from 'react';
import uuid from 'uuid/v4';
import { attempt } from 'lodash-es';
import useModifiedProps from '../UseModifiedProps';
import useAxis from '../UseAxis';
export default function usePlotBandLine(props, plotType) {
const { id = uuid, children, ...rest } = props;... | import React, { useRef, useEffect, useState } from 'react';
import uuid from 'uuid/v4';
import { attempt } from 'lodash-es';
import useModifiedProps from '../UseModifiedProps';
import useAxis from '../UseAxis';
export default function usePlotBandLine(props, plotType) {
const { id = uuid, children, ...rest } = props;... | Revert "Fix plotline getting removed when children present" | Revert "Fix plotline getting removed when children present"
This reverts commit d8dd4d977c3dcec578e083a2cd5beca4b9873e5c.
| JavaScript | mit | whawker/react-jsx-highcharts,whawker/react-jsx-highcharts |
8bc84bd260f674c6707db51f961056847e332e5e | core/client/components/gh-upload-modal.js | core/client/components/gh-upload-modal.js | import ModalDialog from 'ghost/components/gh-modal-dialog';
import upload from 'ghost/assets/lib/uploader';
var UploadModal = ModalDialog.extend({
layoutName: 'components/gh-modal-dialog',
didInsertElement: function () {
this._super();
upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge... | import ModalDialog from 'ghost/components/gh-modal-dialog';
import upload from 'ghost/assets/lib/uploader';
var UploadModal = ModalDialog.extend({
layoutName: 'components/gh-modal-dialog',
didInsertElement: function () {
this._super();
upload.call(this.$('.js-drop-zone'), {fileStorage: this.ge... | Fix button class on upload modal | Fix button class on upload modal
no issue
- this makes sure that the cancel button on the upload modal gets the
correct class
| JavaScript | mit | johnnymitch/Ghost,ManRueda/Ghost,r14r/fork_nodejs_ghost,ckousik/Ghost,thomasalrin/Ghost,singular78/Ghost,ballPointPenguin/Ghost,tanbo800/Ghost,JohnONolan/Ghost,carlyledavis/Ghost,laispace/laiblog,schneidmaster/theventriloquist.us,hyokosdeveloper/Ghost,achimos/ghost_as,achimos/ghost_as,etdev/blog,epicmiller/pages,nmukh/... |
69420c72b6f9adabc6bbe027c24d4313efea534c | protractor.conf.js | protractor.conf.js | require("./server")
exports.config = {
directConnect: true,
specs: 'tests/e2e/*.js',
baseUrl: 'http://localhost:1234',
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
}
};
| ci = process.env.CI !== undefined
if (!ci)
require("./server")
exports.config = {
directConnect: !ci,
specs: 'tests/e2e/*.js',
baseUrl: (ci ? 'http://pollsapiclient.herokuapp.com' : 'http://localhost:1234'),
framework: 'jasmine2',
sauceUser: 'vincenzchianese',
sauceKey : 'ebcc4534-bdcc-4ad5-8fd2-31ea2a1... | Set up data for saucelabs | Set up data for saucelabs
| JavaScript | mit | XVincentX/pollsApiClient,XVincentX/pollsApiClient |
258e9170038e3c55481447c1460413af710c21a8 | public/js/app/fields/CreateAttachmentView.js | public/js/app/fields/CreateAttachmentView.js | define(["app/app"], function(App) {
"use strict";
App.CreateAttachmentView = Ember.View.extend({
tagName: 'input',
type: 'file',
attributeBindings: ['type'],
change: function(event) {
if (event.target.files.length > 0) {
// Send the file object to controller
var newFile = eve... | define(["app/app"], function(App) {
"use strict";
App.CreateAttachmentView = Ember.View.extend({
tagName: 'input',
type: 'file',
multiple: true,
attributeBindings: ['type', 'multiple'],
change: function(event) {
if (event.target.files.length > 0) {
// Send the file object(s) to c... | Enable multiple file upload for attachments | Enable multiple file upload for attachments
Fixes #130.
| JavaScript | mit | davidmz/pepyatka-html,SiTLar/pepyatka-html,pepyatka/pepyatka-html,dsumin/freefeed-html,FreeFeed/freefeed-html,dsumin/freefeed-html,davidmz/pepyatka-html,FreeFeed/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,pepyatka/pepyatka-html,epicmonkey/pepyatka-html |
b56c5ecd849d23519a063bc2396f8e7811d0f2ad | data/settings.js | data/settings.js | var settings = {
"endpoints": [
{
"name": "World Cup",
"url": "https://worldcup-graphql.now.sh/",
"auth": '',
"verb": 'POST',
"accept": '*/*',
"contentType": 'application/json',
"useIntrospectionQuery": true,
"re... | var settings = {
"endpoints": [
{
"name": "Space X",
"url": "https://api.spacex.land/graphql/",
"auth": '',
"verb": 'POST',
"accept": '*/*',
"contentType": 'application/json',
"useIntrospectionQuery": true,
"requ... | Change endpoint to Space X | fix: Change endpoint to Space X
| JavaScript | mit | Brbb/graphql-rover,Brbb/graphql-rover |
9ff4d5ee986e9a821d910c13e78e39623b2fe7b1 | web_external/model.js | web_external/model.js | isic.Model = girder.Model.extend({
urlRoot: function () {
return this.resourceName;
}
});
| isic.Model = girder.Model.extend({
urlRoot: function () {
return this.resourceName;
},
// "girder.Model.destroy" doesn't trigger many of the proper Backbone events
destroy: Backbone.Model.prototype.destroy
});
| Use Backbone destroy, instead of Girder's method | Use Backbone destroy, instead of Girder's method
| JavaScript | apache-2.0 | ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive |
3e9c692ef04e33826b4ed31d63651aa6f6aa6516 | server/controllers/sampleCtrl.js | server/controllers/sampleCtrl.js | 'use strict'
/**
* Sample API controller. Can safely be removed.
*/
const Sample = require('../models').sample.Sample
const co = require('co')
module.exports = {
getData: co.wrap(getData),
postData: co.wrap(postData)
}
function * getData (req, res, next) {
try {
const doc = yield Sample.findById(req.par... | 'use strict'
/**
* Sample API controller. Can safely be removed.
*/
const Sample = require('../models').sample.Sample
const co = require('co')
module.exports = {
getData: co.wrap(getData),
postData: co.wrap(postData)
}
function * getData (req, res, next) {
try {
let doc = {}
if (process.env.NODE_MOC... | Support for startMock mode in getData | Support for startMock mode in getData
| JavaScript | mit | KTH/lms-export-results |
2848d099199c841f64c7c66ce33775e0bc25bc59 | test/torpedo-build-test.js | test/torpedo-build-test.js | var fs = require('fs')
, path = require('path')
, expect = require('chai').expect
, shell = require('shelljs')
, glob = require('glob')
, _ = require('lodash')
function read(filename) {
return fs.readFileSync(filename, 'utf8')
}
function fixture(name) {
return read('test/fixtures/' + name + '.html')
}
... | var fs = require('fs')
, path = require('path')
, expect = require('chai').expect
, shell = require('shelljs')
, glob = require('glob')
, _ = require('lodash')
function read(filename) {
return fs.readFileSync(filename, 'utf8')
}
function fixture(name) {
return read('test/fixtures/' + name + '.html')
}
... | Fix tests to delete the _site directory after running. | Fix tests to delete the _site directory after running.
| JavaScript | mit | philipwalton/ingen |
20d900a89125cf0141e31b14f43ff65265aab505 | js/utils.js | js/utils.js | function numberToString(number) {
var r = Math.round(number * 1000) / 1000;
return ""+r;
}
function addCommas(nStr)
{
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 ... | function numberToString(number) {
var r = Math.round(number * 1000) / 1000;
return ""+r;
}
/**
* There are some difficulties with locales with this script's number
* output (when number > 1e21) and Clicker Heroes' input formatting.
* This function makes sure there are no decimal points in the output.
*/
f... | Make sure there are no decimal points in the (pasteable) level change output. | Make sure there are no decimal points in the (pasteable) level change output.
| JavaScript | mit | Beskhue/ClickerHeroesCalculator,Beskhue/ClickerHeroesCalculator |
be3aac36283d562d94f358e81de722e1854f56b7 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('default', ['sass'], function () {
//gulp.src('./node_modules/font-awesome/fonts/**/*.{eot,svg,ttf,woff,woff2}')
// .pipe(gulp.dest('./styles/warriormachines_2016/theme/gulp-generated/fonts'));
});
gulp.task('sass', funct... | 'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('default', ['sass', 'fonts'], function () {
});
gulp.task('sass', function () {
return gulp.src('./styles/warriormachines_2016/theme/sass/app.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./st... | Use gulp to generate one app.css, and separate 'fonts' task | Use gulp to generate one app.css, and separate 'fonts' task
| JavaScript | mit | WarriorMachines/warriormachines-phpbb,WarriorMachines/warriormachines-phpbb,WarriorMachines/warriormachines-phpbb |
7513968732441a2bd3ecd720d821e12a1311a38b | installer/js/setup/repositories/RepositoryList.js | installer/js/setup/repositories/RepositoryList.js | import React, { Component, PropTypes } from 'react';
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table';
import { getRepositories } from '../../installer/github';
import Repository from './Repository';
import Pagination from './Pagination';
const accessToken = window.local... | import React, { Component, PropTypes } from 'react';
import Progress from 'material-ui/CircularProgress';
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table';
import { getRepositories } from '../../installer/github';
import Repository from './Repository';
import Pagination f... | Add a loader while loading repositories | Add a loader while loading repositories
| JavaScript | mit | marmelab/sedbot.js |
7930c5a16744f6464a126ebe739704dadeca9382 | lib/main.js | lib/main.js | "use babel";
export default {
config: {
executable: {
type: "string",
default: "gfortran"
},
gfortran_flags: {
type: "string",
default: "-Wall -Wextra"
},
},
activate: () => {
require("atom-package-deps").install("lint... | "use babel";
export default {
config: {
executable: {
type: "string",
default: "gfortran"
},
gfortran_flags: {
type: "string",
default: "-Wall -Wextra"
},
},
activate: () => {
require("atom-package-deps").install("lint... | Support all the fortran grammars | Support all the fortran grammars
| JavaScript | mit | Luthaf/linter-gfortran |
27ad5450c62de6fee222e6298901b3101a097930 | src/transform-data.js | src/transform-data.js | "use strict"
/**
* Inverts the data from the deepstream structure to reduce nesting.
*
* { _v: 1, _d: { name: 'elasticsearch' } } -> { name: 'elasticsearch', __ds = { _v: 1 } }
*
* @param {String} value The data to save
*
* @private
* @returns {Object} data
*/
module.exports.transformValueForStorage = functi... | "use strict"
/**
* Inverts the data from the deepstream structure to reduce nesting.
*
* { _v: 1, _d: { name: 'elasticsearch' } } -> { name: 'elasticsearch', __ds = { _v: 1 } }
*
* @param {String} value The data to save
*
* @private
* @returns {Object} data
*/
module.exports.transformValueForStorage = functi... | Clone data to avoid mutations to effect rest of workflow | Clone data to avoid mutations to effect rest of workflow
| JavaScript | mit | hoxton-one/deepstream.io-storage-rethinkdb |
0b8d55b196164dc7dfdef644ee95806f2d5dac59 | packages/kolibri-tools/jest.conf/setup.js | packages/kolibri-tools/jest.conf/setup.js | import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n... | import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n... | Add extra logging for node promises | Add extra logging for node promises
| JavaScript | mit | indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri |
1da816b0cbe307f3cb8ea74dc368e460d7eb16c2 | packages/workflow/tests/dummy/config/environment.js | packages/workflow/tests/dummy/config/environment.js | /* eslint-env node */
'use strict';
module.exports = function(environment) {
let ENV = {
modulePrefix: 'dummy',
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contro... | /* eslint-env node */
'use strict';
module.exports = function(environment) {
let ENV = {
modulePrefix: 'dummy',
environment,
rootURL: '/',
locationType: 'auto',
EmberENV: {
FEATURES: {
// Here you can enable experimental features on an ember canary build
// e.g. 'with-contro... | Remove empty block for eslint happiness | Remove empty block for eslint happiness
| JavaScript | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack |
ade9f35525d169ada126e66ced7be3e51ba5a4ef | src/helpers.js | src/helpers.js | "use strict";
// Bind event listeners to target.
export function on (target, eventName, listener, capture = false) {
return target.addEventListener(eventName, listener, capture);
}
// Unbind event listeners
export function off (target, eventName, listener, capture = false) {
target.removeEventListener(eventName, ... | "use strict";
// Bind event listeners to target.
export function on (el, events, cb, capture = false) {
events.split(' ').map(event => {
if (event) el.addEventListener(event, cb, capture);
});
}
// Unbind event listeners
export function off (el, events, cb, capture = false) {
events.split(' ').map(event => ... | Add support to bind to multiple events in one call. | Add support to bind to multiple events in one call.
| JavaScript | mit | Andreyco/react-video,Andreyco/react-video |
ccfc6e5850fa6de5b821a292eab02c9755bd2062 | src/number.js | src/number.js | 'use strict';
var card = require('creditcards').card;
module.exports = function ($parse) {
return {
restrict: 'A',
require: ['ngModel', 'ccNumber'],
controller: function () {
var expectedType;
this.expect = function (type) {
expectedType = type;
};
},
compile: function ... | 'use strict';
var card = require('creditcards').card;
module.exports = function ($parse) {
return {
restrict: 'A',
require: ['ngModel', 'ccNumber'],
controller: function () {
this.type = null;
},
compile: function (element, attributes) {
attributes.$set('pattern', '[0-9]*');
r... | Remove dead code from ccNumber controller | Remove dead code from ccNumber controller
| JavaScript | mit | SimeonC/angular-credit-cards,matiasarayac/angular-credit-cards,Noxwille/angular-credit-cards,bendrucker/angular-credit-cards,antoinepairet/angular-credit-cards,dingels35/angular-credit-cards,dribehance/angular-credit-cards,aspone/angular-credit-cards,robertbaker/angular-credit-cards |
ad45bd67ba40b86954e5649f04ef5c42258bf6d4 | packages/ember-runtime/tests/array/invoke-test.js | packages/ember-runtime/tests/array/invoke-test.js | import EmberObject from '../../lib/system/object';
import { AbstractTestCase } from 'internal-test-helpers';
import { runArrayTests } from '../helpers/array';
class InvokeTests extends AbstractTestCase {
'@test invoke should call on each object that implements'() {
let cnt, ary, obj;
function F(amt) {
... | import { Object as EmberObject, NativeArray } from '../../index';
import { AbstractTestCase } from 'internal-test-helpers';
import { runArrayTests } from '../helpers/array';
class InvokeTests extends AbstractTestCase {
'@test invoke should call on each object that implements'() {
let cnt, ary, obj;
function... | Add failing tests for `A().invoke()` not returning an `A`. | Add failing tests for `A().invoke()` not returning an `A`.
| JavaScript | mit | bekzod/ember.js,knownasilya/ember.js,GavinJoyce/ember.js,kellyselden/ember.js,Turbo87/ember.js,elwayman02/ember.js,jaswilli/ember.js,cibernox/ember.js,kellyselden/ember.js,qaiken/ember.js,twokul/ember.js,qaiken/ember.js,mike-north/ember.js,stefanpenner/ember.js,asakusuma/ember.js,emberjs/ember.js,xiujunma/ember.js,twok... |
8ea3fe598997e04b102d50bc31c6c579b5591679 | src/js/main.js | src/js/main.js | require('../css/style.css');
(function(window, document, requirejs, define){
'use strict';
// config
try {
var config = JSON.parse(
document.getElementById('data-config').getAttribute('data-config')
);
var versions = config.versions;
} catch (error) {
// con... | require('../css/style.css');
(function(window, document, requirejs, define){
'use strict';
// config
try {
var config = JSON.parse(
document.getElementById('data-config').getAttribute('data-config')
);
var versions = config.versions;
} catch (error) {
// con... | Refactor `react-engine` client-side mounting to use Require.js | Refactor `react-engine` client-side mounting to use Require.js
Replace event listener `DOMContentLoaded` with `requirejs` now
that the scripts will run after they are loaded.
Make sure to load `react` and `react-dom` before `react-router`.
Also, attach the modules to `window` for it to work in production.
| JavaScript | mit | remarkablemark/react-engine-template,remarkablemark/react-engine-template |
9c90a3a6e2f4e5e6e8028e63936daa28ef51f294 | build/configs/replace.js | build/configs/replace.js | module.exports = function (grunt) {
var semver = require('semver');
var version = grunt.option('version');
function bump () {
//console.log(arguments[0][0]);
}
function file (path) {
return {
dest: path,
src: path
};
}
function pattern (find) {
return {
match: find,
... | module.exports = function (grunt) {
var curver = require('../../package.json').version;
var semver = require('semver');
var version = grunt.option('version');
function bump () {
return version ? version : semver.inc(curver);
}
function file (path) {
return {
dest: path,
src: path
}... | Use specified version or increment current version. | Use specified version or increment current version.
| JavaScript | mit | skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,antitoxic/skatejs,chrisdarroch/skatejs,skatejs/skatejs |
948dd454a231de83b3f7ef522f99588dbcb109de | server/fixtures.js | server/fixtures.js | defaultFeedIds = [];
defaultFeeds = [{
name: 'Sneakers',
icon: 'money'
}, {
name: 'Electronics',
icon: 'laptop'
}, {
name: 'Clothing (Men)',
icon: 'male'
}, {
name: 'Clothing (Women)',
icon: 'female'
}, {
name: 'Books',
icon: 'book'
}, {
name: 'Others',
icon: 'random'
}];
if (!Feeds.findOne()) {
defaultF... | Meteor.startup(function() {
defaultFeedIds = [];
defaultFeeds = [{
name: 'Sneakers',
icon: 'money'
}, {
name: 'Electronics',
icon: 'laptop'
}, {
name: 'Clothing (Men)',
icon: 'male'
}, {
name: 'Clothing (Women)',
icon: 'female'
}, {
name: 'Books',
icon: 'book'
}, {
name: 'Others',
icon: '... | Put feed fixture in startup | Put feed fixture in startup
| JavaScript | mit | BaseNY/base,BaseNY/base,BaseNY/base |
68312d1d3e9a2f4f3211c0ba91105e11270b6f3d | src/app/common/interceptors.js | src/app/common/interceptors.js | (function (angular) {
"use strict";
angular.module("mfl.gis.interceptor", [])
.factory("mfl.gis.interceptor.headers", [function () {
var etag_header = null;
var last_modified_header = null;
return {
"request" : function(config) {
if (etag_header) {
... | (function (angular) {
"use strict";
angular.module("mfl.gis.interceptor", [])
.factory("mfl.gis.interceptor.headers", [function () {
var cache_headers = {};
var request_fxn = function(config) {
var headers = cache_headers[config.url];
if (_.isUndefined(headers)) {
... | Make cache headers sentitive to urls | Make cache headers sentitive to urls
| JavaScript | mit | MasterFacilityList/mfl_web,urandu/mfl_web,MasterFacilityList/mfl_web,urandu/mfl_web,MasterFacilityList/mfl_web,MasterFacilityList/mfl_web |
23a2c12b26d128c6b9cda4764d5b0487eba8671b | gulpfile.js | gulpfile.js | var gulp = require( 'gulp' );
var browserify = require( 'browserify' );
var source = require( 'vinyl-source-stream' );
var uglify = require( 'gulp-uglify' );
var streamify = require( 'gulp-streamify' );
gulp.task( 'browserify', function() {
return browserify( './index.js' )
.bundle()
... | var gulp = require( 'gulp' );
var browserify = require( 'browserify' );
var source = require( 'vinyl-source-stream' );
var uglify = require('gulp-uglify-es').default;;
var streamify = require( 'gulp-streamify' );
gulp.task( 'browserify', function() {
return browserify( './index.js' )
.b... | Use gulp-uglify-es instead of gulp-uglify | Use gulp-uglify-es instead of gulp-uglify
To properly build the project - has ES in spots
| JavaScript | mit | Automattic/vip-js-sdk |
1e0ef500de5b3bdaa857b091176b8cae3e2a330f | src/rx-glob.js | src/rx-glob.js | import Rx from 'rx';
import glob from 'glob';
var rxGlobArray = Rx.Observable.fromNodeCallback(glob);
export
default
function rxGlob(...args) {
console.log(...args);
return rxGlobArray(...args).flatMap(Rx.Observable.from)
.tapOnNext(console.log);
}
rxGlob.hasMagic = glob.hasMagic;
| import Rx from 'rx';
import glob from 'glob';
var rxGlobArray = Rx.Observable.fromNodeCallback(glob);
export
default
function rxGlob(...args) {
return rxGlobArray(...args).flatMap(Rx.Observable.from)
.tapOnNext(console.log);
}
rxGlob.hasMagic = glob.hasMagic;
| Fix stray console.log that messed up output | Fix stray console.log that messed up output
| JavaScript | mit | motiz88/sqin |
d28d419833b093b4f6d0da409d91f67637f341a8 | migrations/v1.0_v1.1.js | migrations/v1.0_v1.1.js | var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/dds');
require('../lib/config/mongoose').init(mongoose);
require('../lib/models/acceptanceTest');
var AcceptanceTest = mongoose.model('AcceptanceTest');
var AcceptanceTestActivity = mongoose.model('AcceptanceTestActivity');
var stream =... | var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/dds');
require('../lib/config/mongoose').init(mongoose);
require('../lib/models/acceptanceTest');
var AcceptanceTest = mongoose.model('AcceptanceTest');
var AcceptanceTestActivity = mongoose.model('AcceptanceTestActivity');
var stream =... | Delete tests that only wrongly tested uncomputable | Delete tests that only wrongly tested uncomputable
| JavaScript | agpl-3.0 | sgmap/ludwig-api |
db48e742bdea3a3b9b0de459019f74f632b6ceef | verify-package-settings.js | verify-package-settings.js | "use strict";
const expect = require('chai').expect
const packageSettings = require('./package.json')
const Up = require('./' + packageSettings.main)
describe('The `main` field in package.json', () => {
it('points to the entry point of the library', () => {
expect(Up.parseAndRender('It *actually* worked?')).t... | "use strict";
const path = require('path');
const expect = require('chai').expect
const packageSettings = require('./package.json')
const Up = require('./' + packageSettings.main)
describe('The `main` field in package.json', () => {
it('points to the entry point of the library', () => {
expect(Up.parseAndRend... | Verify `typings` field in package.json | Verify `typings` field in package.json
| JavaScript | mit | start/up,start/up |
f545a0e2137b4864a242416b1af5d429faad405d | build-supported-words.js | build-supported-words.js | var fs = require('fs'),
words = require('./data/buzzwords.json');
fs.writeFileSync('Supported-buzzwords.md',
'Supported Buzzwords\n' +
'=================\n' +
'\n' +
words.map(function (word) {
return '* “' + word + '”';
}).join(';\n') +
'.\n'
);
| 'use strict';
var fs = require('fs'),
words = require('./data/buzzwords.json');
fs.writeFileSync('Supported-buzzwords.md',
'Supported Buzzwords\n' +
'=================\n' +
'\n' +
words.map(function (word) {
return '* “' + word + '”';
}).join(';\n') +
'.\n'
);
| Add strict mode to support generation | Add strict mode to support generation
| JavaScript | mit | wooorm/buzzwords |
9a6369ffcae9f46945ad94840806d5b08099bae0 | gulpfile.js | gulpfile.js | var gulp = require("gulp");
var uglify = require("gulp-uglify");
var rename = require("gulp-rename");
var cleanCSS = require("gulp-clean-css");
var config = {};
config.srcPath = "./src/";
config.distPath = "./dist/";
config.cssSrcPath = config.srcPath + "css/*.css";
config.jsSrcPath = config.srcPath + "js/*... | var gulp = require("gulp");
var uglify = require("gulp-uglify");
var rename = require("gulp-rename");
var cleanCSS = require("gulp-clean-css");
var config = {};
config.srcPath = "./src/";
config.distPath = "./dist/";
config.cssSrcPath = config.srcPath + "css/*.css";
config.jsSrcPath = config.srcPath + "js/*... | Use short function like above | Standards: Use short function like above
| JavaScript | agpl-3.0 | nirmankarta/eddyst.one,nirmankarta/eddyst.one |
2ebb6791a94db6e84c7811aa69d2a1542e6d18f4 | lib/commands/migrate.js | lib/commands/migrate.js | var OS = require("os");
var Config = require("truffle-config");
var Contracts = require("../contracts");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Migrate = require("truffle-migrate");
var Environment = require("../environment");
var command = {
command: 'migrate... | var OS = require("os");
var Config = require("truffle-config");
var Contracts = require("../contracts");
var Resolver = require("truffle-resolver");
var Artifactor = require("truffle-artifactor");
var Migrate = require("truffle-migrate");
var Environment = require("../environment");
var command = {
command: 'migrate... | Add the -f option to run from a specific migration. | Add the -f option to run from a specific migration.
| JavaScript | mit | DigixGlobal/truffle,prashantpawar/truffle |
44676a86b28fdee89ccc2ced929a68f0f9c86329 | gulpfile.js | gulpfile.js | "use strict"
var gulp = require("gulp");
var eslint = require("gulp-eslint");
var babel = require("gulp-babel");
var SOURCE_PATH = ["./src/**/*.js", "./src/**/*.jsx"];
gulp.task("build", function () {
return gulp.src(SOURCE_PATH)
.pipe(babel())
.pipe(gulp.dest("lib"));
});
gulp.task("watch", function(callba... | "use strict"
var gulp = require("gulp");
var eslint = require("gulp-eslint");
var babel = require("gulp-babel");
var SOURCE_PATH = ["./src/**/*.js", "./src/**/*.jsx"];
// gulp.task("build", function () {
// return gulp.src(SOURCE_PATH)
// .pipe(babel())
// .pipe(gulp.dest("lib"));
// });
// gulp.task("watch... | Comment out build step (gulp). | Comment out build step (gulp).
| JavaScript | mit | philcockfield/ui-harness,philcockfield/ui-harness,philcockfield/ui-harness |
601ea6b5155bd81e007bd8bad583e50e9f1ba42c | gulpfile.js | gulpfile.js | "use strict";
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
filter = require('gulp-filter'),
mocha = require('gulp-mocha');
gulp.task('default', ['test']);
gulp.task('watch', function () {
gulp.watch('test/*.js', ['test']);
});
gulp.task('test', ['lint'], function () {
gulp.src('test/*.js', {r... | "use strict";
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
filter = require('gulp-filter'),
mocha = require('gulp-mocha');
gulp.task('default', ['test']);
gulp.task('watch', function () {
gulp.watch(['**/*.js', '!node_modules/**/*.js'], ['test']);
});
gulp.task('test', ['lint'], function () {
... | Add all .js files to gulp.watch instead of just the files under 'test/' | Add all .js files to gulp.watch instead of just the files under 'test/'
| JavaScript | mit | keithmorris/gulp-nunit-runner |
4d476004060dfdd7c6c124fe53d077f4e9bdd859 | test/Login.js | test/Login.js | 'use strict';
import Login from '../src/Login';
describe('Login', function() {
it('should be tested', function() {
assert.fail('No tests for this module yet.');
});
});
| 'use strict';
import Login from '../src/Login';
describe('Login', function() {
beforeEach(function () {
this.xhr = sinon.useFakeXMLHttpRequest();
var requests = this.requests = [];
this.xhr.onCreate = function (xhr) {
requests.push(xhr);
};
});
afterEach(function () {
this.xhr.restore();
});
it(... | Add test for login component | Add test for login component
| JavaScript | bsd-3-clause | nhpatt/metal-login,nhpatt/metal-login |
856cc359223a4acc2c8ba9ccebe965fa37a86e04 | sli/config/indexes/ingestion_batch_job_indexes.js | sli/config/indexes/ingestion_batch_job_indexes.js | //
// Copyright 2012 Shared Learning Collaborative, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | //
// Copyright 2012 Shared Learning Collaborative, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... | Revert "DE2347 - Remove tenantId index from recordHash as intended" | Revert "DE2347 - Remove tenantId index from recordHash as intended"
This reverts commit 6718f6f8388ca42d85c6403129be29d2c36852e8.
Need to keep the index because purging the data in recordHash,
which remains shared across tenants in ingestion_batch_job,
requires a full-table-table scan when the index is absent.
That i... | JavaScript | apache-2.0 | inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service |
e53946933a575fa13682b538186828a90e4d9101 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var ts = require('gulp-typescript');
var tslint = require('gulp-tslint');
var jade = require('gulp-jade');
gulp.task('jade', function() {
gulp.src('./src/views/*.jade')
.pipe(jade())
.pipe(gulp.dest('./dist/'))
});
gulp.task('typescript', function() {
gulp.src('src/... | var gulp = require('gulp');
var ts = require('gulp-typescript');
var tslint = require('gulp-tslint');
var jade = require('gulp-jade');
gulp.task('jade', function() {
gulp.src('./src/views/*.jade')
.pipe(jade())
.pipe(gulp.dest('./dist/'))
});
gulp.task('typescript', function() {
gulp.src('src/... | Set JavaScript file destination directory, after TypeScript compile | Set JavaScript file destination directory, after TypeScript compile
| JavaScript | mit | kubosho/simple-music-player |
4ceb847fa6340bb869d9c8cb3e55701124d0b92b | app/assets/javascripts/views/navbar.js | app/assets/javascripts/views/navbar.js | $(document).ready(function() {
$(".welcome").on("click", function() {
console.log("YES");
$(this).slideUp(1500);
// $(this).parent().slideUp(1500);
$(this).parent().animate({ height: 'toggle', opacity: 0.5 }, 1500);
});
$("#about").on("click", function() {
var popupBox = $(".popup-about");
... | $(document).ready(function() {
$(".welcome").on("click", function() {
console.log("YES");
$(this).fadeOut(1400);
$(this).parent().slideUp(1800);
// $(this).slideUp(1200);
// $(this).parent().animate({ height: 'toggle', opacity: 0.5 }, 1500);
});
$("#about").on("click", function() {
var p... | Modify slide and fade features | Modify slide and fade features
| JavaScript | mit | chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord |
37704ec24635ab7f256706e6c929733ab2b64e7d | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var eslint = require('gulp-eslint');
var coveralls = require('gulp-coveralls');
gulp.task('pre-test', function () {
return gulp.src(['lib/**/*.js', '!lib/micro-whalla.js'])
.pipe(istanbul({ includeUntested: tr... | var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
var eslint = require('gulp-eslint');
var coveralls = require('gulp-coveralls');
gulp.task('pre-test', function () {
return gulp.src(['lib/**/*.js', '!lib/micro-whalla.js', '!lib/helpers.js'])
.pipe(istanbul({ ... | Add helpers.js to ignore from tests | Add helpers.js to ignore from tests
| JavaScript | mit | czerwonkabartosz/Micro-Whalla |
7cb6aab651c603f0d0d3a2159193b3cb8e62a97d | gulpfile.js | gulpfile.js | // Generated by CoffeeScript 1.6.2
(function() {
var coffee, concat, gulp, gutil, mocha, uglify, wrap;
gulp = require('gulp');
coffee = require('gulp-coffee');
concat = require('gulp-concat');
gutil = require('gulp-util');
mocha = require('gulp-mocha');
uglify = require('gulp-uglify');
wrap = req... | //the build instructions are in gulpfile.coffee
//this file is a simple bridge since gulp doesn't support
//coffeescript files natively.
require('coffee-script');
require('./gulpfile.coffee');
| Use bridge gulp file instead of having to re-generate. | Use bridge gulp file instead of having to re-generate.
| JavaScript | mit | resin-io/validateSSHjs |
864f02426a0fceca05a597d46a7e61210497b9a3 | gui/editor/src/command/TableCommand.js | gui/editor/src/command/TableCommand.js | import Command from './Command.js';
/**
* Table Command
*/
export default class TableCommand extends Command {
/**
* @inheritDoc
*/
execute() {
const figure = this.editor.document.createElement('figure');
const table = this.editor.document.createElement('table');
const figca... | import Command from './Command.js';
/**
* Table Command
*/
export default class TableCommand extends Command {
/**
* @inheritDoc
*/
execute() {
const figure = this.editor.document.createElement('figure');
const table = this.editor.document.createElement('table');
const figca... | Rename param to be consistent | Rename param to be consistent
| JavaScript | mit | akilli/cms,akilli/cms,akilli/cms |
1836576ba5045392f9af0473f48cbfac27ccd8ef | src/components/document/authors/authorsDirective.js | src/components/document/authors/authorsDirective.js | 'use strict';
// @ngInject
var authorsDirective = function() {
return {
scope: {
authors: '='
},
template: require('./authorstemplate.html'),
//@ngInject
controller: function($scope) {
$scope.fullnames = function (authors) {
return authors.reduce((m, a, i) => m + a.first_name ... | 'use strict';
// @ngInject
var authorsDirective = function() {
return {
scope: {
authors: '='
},
template: require('./authorstemplate.html'),
//@ngInject
controller: function($scope) {
$scope.fullnames = function (authors) {
return authors.reduce((m, a, i) => {
retur... | Support first_name, last_name and name | Support first_name, last_name and name
| JavaScript | mit | npolar/npdc-common,npolar/npdc-common |
28d94abe7b927ddb8edfe50e1641d0614cc5c01b | src/build/minionette.js | src/build/minionette.js | var Minionette = (function(global, _, $, Backbone) {
'use strict';
// Define and export the Minionette namespace
var Minionette = {};
Backbone.Minionette = Minionette;
// @include ../jquery.cleanData.js
// @include ../view.js
// @include ../region.js
// @include ../model_view.js
/... | var Minionette = (function(global, _, $, Backbone) {
'use strict';
// Define and export the Minionette namespace
var Minionette = {};
Backbone.Minionette = Minionette;
// @include ../jquery.cleanData.js
// @include ../region.js
// @include ../view.js
// @include ../model_view.js
/... | Make sure Region is included before View | Make sure Region is included before View
View depends on Region
| JavaScript | mit | thejameskyle/minionette,jridgewell/minionette |
c710b5a7f3293c280483ae25655b0144076da984 | gulpfile.js | gulpfile.js | var gulp = require('gulp')
var shell = require('./')
var paths = {
js: ['*.js', 'test/*.js']
}
gulp.task('test', shell.task('mocha -R spec -r should'))
gulp.task('coverage', ['test'], shell.task('istanbul cover _mocha -- -R spec'))
gulp.task('coveralls', ['coverage'], shell.task('cat coverage/lcov.info | coveral... | var gulp = require('gulp')
var shell = require('./')
var paths = {
js: ['*.js', 'test/*.js']
}
gulp.task('test', shell.task('mocha -R spec -r should'))
gulp.task('coverage', ['test'], shell.task('istanbul cover _mocha -- -R spec'))
gulp.task('coveralls', ['coverage'], shell.task('cat coverage/lcov.info | coveral... | Remove dirty hack for keeping watch running on errors | Remove dirty hack for keeping watch running on errors
| JavaScript | mit | realtymaps/gulp-shell,Xerkus/gulp-shell,AcklenAvenue/gulp-shell,alfonso-presa/gulp-shell |
5ade2739a47f3fb2a3a8ee5bc5c62619f1c78e74 | src/client/etherscan.js | src/client/etherscan.js | /**
* @file Etherscan API client.
* @module client/etherscan
*/
'use strict'
/**
* Etherscan API client.
* @static
*/
class Client {
}
// Expose
module.exports = Client
| /**
* @file Etherscan API client.
* @module client/etherscan
*/
'use strict'
/**
* Private members store.
* @private
*/
const privs = new WeakMap()
/**
* Etherscan API client.
* @static
*/
class Client {
/**
* No parameters.
*/
constructor () {
const priv = {}
privs.set(this, priv)
}
}
... | Add private members store to Etherscan client | Add private members store to Etherscan client
| JavaScript | unlicense | jestcrows/ethtaint,jestcrows/ethtaint |
a635b7b9f5b6b49ce079f3ea15e62df089f39452 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var $ = require('gulp-load-plugins')({
camelize: true
});
var config = {
source: {
scripts: {
path: 'app/',
files: './app/**/*.js'
}
},
build: {
scripts: 'build/scrips/'
}
}
gulp.task('build-scripts', function() {
return gulp.src(config.source.scripts.fi... | var gulp = require('gulp');
var $ = require('gulp-load-plugins')({
camelize: true
});
var config = {
source: {
scripts: {
path: 'app/',
files: './app/**/*.js'
},
markup: {
path: 'app/',
files: './app/**/*.html'
}
},
build: {
scripts: 'build/scrips/',
markup: 'bui... | Add gulp task build markup | Add gulp task build markup | JavaScript | mit | letanure/gulp-demo,letanure/gulp-demo |
3c7218c4e42017c4c602fb4fe86dd5641ff93cde | gulpfile.js | gulpfile.js | var gulp = require('gulp')
var sass = require('gulp-sass')
var browserSync = require('browser-sync').create()
gulp.task('sass', function () {
return gulp.src('./scss/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./css'))
})
gulp.task('browser-sync', function() {
browserSync.init({
... | var gulp = require('gulp')
var sass = require('gulp-sass')
var browserSync = require('browser-sync').create()
gulp.task('sass', function () {
return gulp.src('./scss/**/*.scss')
.pipe(sass())
.pipe(gulp.dest('./css'))
.pipe(browserSync.stream())
})
gulp.task('browser-sync', function() {
browserSync.in... | Fix gulfile not watching Sass changes | Fix gulfile not watching Sass changes
| JavaScript | mit | ellsclytn/AirCalc,ellsclytn/AirCalc |
9cffc665772326208a446bc203ff127f877aa318 | src/data/mutations/addRanking.js | src/data/mutations/addRanking.js | import StoriesItemType from '../types/StoriesItemType'
import RankingInputItemType from '../types/RankingInputItemType'
import {Story, User, Ranking} from '../models'
const addRanking = {
name: 'addRanking',
type: StoriesItemType,
args: {
story: {type: RankingInputItemType}
},
async resolve (value, {stor... | import StoriesItemType from '../types/StoriesItemType'
import RankingInputItemType from '../types/RankingInputItemType'
import {Story, User, Ranking} from '../models'
const addRanking = {
name: 'addRanking',
type: StoriesItemType,
args: {
story: {type: RankingInputItemType}
},
async resolve (value, {stor... | Add user check to add ranking | Add user check to add ranking
| JavaScript | mit | DominikePessoa/rateissuesfront,DominikePessoa/rateissuesfront,cassioscabral/rateissuesfront,cassioscabral/rateissuesfront |
4017470f2f16cb62ab89ad2b181e9338188c3fdb | lib/user-credentials.js | lib/user-credentials.js | var md5= require('./md5');
/*
* Hide the password. Uses the password to form authorization strings,
* but provides no interface for exporting it.
*/
function user_credentials(username,password) {
if (username.is_user_credentials &&
typeof username.basic === 'function' &&
typeof username.digest === 'functi... | var md5= require('./md5');
/*
* Hide the password. Uses the password to form authorization strings,
* but provides no interface for exporting it.
*/
function user_credentials(username,password) {
if (username.is_user_credentials &&
typeof username.basic === 'function' &&
typeof username.digest === 'functi... | Refactor user credentials as a prototyped object. | Refactor user credentials as a prototyped object.
| JavaScript | mit | randymized/www-authenticate |
3748b6e2d9d97238a3ee9580a3d62dd60380edb7 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var nodemon = require('nodemon');
var webpack = require('webpack');
var clientConfig = require('./webpack.config');
var path = require('path');
function onBuild(cb) {
return function(err, stats) {
if (err)
console.log('Error', err);
else
console.log(stats.toString());
... | var gulp = require('gulp');
var nodemon = require('nodemon');
var webpack = require('webpack');
var clientConfig = require('./webpack.config');
var path = require('path');
var wpCompiler = webpack(clientConfig);
function onBuild(cb) {
return function(err, stats) {
if (err)
console.log('Error', err);
e... | Fix onBuild callback for webpack watch mode, now it properly outputs what it should to the log (screen). Also microrefactor the webpack calling code. | Fix onBuild callback for webpack watch mode, now it properly outputs what it should to the log (screen). Also microrefactor the webpack calling code.
| JavaScript | mit | bragin/ublog,bragin/ublog |
4fcee02539bddc4c2b0079fa6f4e5707a6f887c6 | gulpfile.js | gulpfile.js | var gulp = require("gulp");
var sass = require("gulp-sass");
gulp.task('sass', function () {
gulp.src('src/hipster-grid-system.scss')
.pipe(sass())
.pipe(gulp.dest('dist'));
});
| var gulp = require("gulp");
var sass = require("gulp-sass");
var rename = require("gulp-rename");
var autoprefixer = require("gulp-autoprefixer");
gulp.task('sass', function () {
gulp.src('src/hipster-grid-system.scss')
.pipe(sass())
.pipe(autoprefixer())
.pipe(gulp.dest('dist'));
gulp.... | Add support autoprefixer for cross-browser. Add support minify dist file. | Add support autoprefixer for cross-browser.
Add support minify dist file.
| JavaScript | mit | erdoganbulut/hipster-grid-system |
767e66816b18085e0ab553eb0368b34fa94e6547 | packages/redis/index.js | packages/redis/index.js | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
... | const Redis = require('ioredis');
module.exports = url => {
const redis = new Redis(url);
redis.setJSON = async (...arguments) => {
arguments[1] = JSON.stringify(arguments[1]);
if (typeof arguments[2] === 'object' && arguments[2].asSeconds) {
arguments[2] = parseInt(arguments[2].asSeconds());
}
... | Fix redis syntax error if third argument is undefined | Fix redis syntax error if third argument is undefined
| JavaScript | mit | sharaal/dnode,sharaal/dnode |
b361f2ca2d51038f00b64fba0cb96d1cf635dd55 | commands/togethertube.js | commands/togethertube.js | const Command = require('../structures/command.js');
const request = require('request');
module.exports = class TogetherTube extends Command {
constructor(client) {
super(client);
this.name = "togethertube";
this.aliases ["ttube", "ttb"];
}
run(message, args, commandLang) {
let embed = this.cli... | const Command = require('../structures/command.js');
const request = require('request');
module.exports = class TogetherTube extends Command {
constructor(client) {
super(client);
this.name = "togethertube";
this.aliases = ["ttube", "ttb"];
}
run(message, args, commandLang) {
let embed = thi... | Fix aliases and error message.g | Fix aliases and error message.g
| JavaScript | mit | pedrofracassi/deku |
be788cdbacab391543739cf651f2c5562cc04a85 | app/models/taxonomy.js | app/models/taxonomy.js | import DS from 'ember-data';
import OsfModel from 'ember-osf/models/osf-model';
/**
* @module ember-preprints
* @submodule models
*/
/**
* Model for OSF APIv2 preprints. This model may be used with one of several API endpoints. It may be queried directly. In the future, there will be multiple taxonomy endpoints u... | import DS from 'ember-data';
import OsfModel from 'ember-osf/models/osf-model';
/**
* @module ember-preprints
* @submodule models
*/
/**
* Model for OSF APIv2 preprints. This model may be used with one of several API endpoints. It may be queried directly. In the future, there will be multiple taxonomy endpoints u... | Update field name -remove TODO | Update field name
-remove TODO
| JavaScript | apache-2.0 | pattisdr/ember-preprints,baylee-d/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints,hmoco/ember-preprints,hmoco/ember-pr... |
0dab4acbf0b8c8c14bce3518cf47fb566a7e839d | static/js/main.js | static/js/main.js | /**
* Created by jonathan on 3/7/15.
*/
var CameraApp = function() {};
CameraApp.prototype = {
framesPerSecond: 1,
setup: function() {
this.image = document.getElementById('CameraImage');
this.imageSource = 'http://104.206.193.11:49709/dcnvr/video/live/image/2?w=320&h=240';
this.loa... | /**
* Created by jonathan on 3/7/15.
*/
var CameraApp = function() {};
CameraApp.prototype = {
framesPerSecond: 1,
timeoutInMinutes: 1,
setup: function() {
this.startTime = new Date().getTime();
this.image = document.getElementById('CameraImage');
this.imageSource = 'http://104.... | Add live video feed timeout | Add live video feed timeout
| JavaScript | mit | bytedreamer/LollypopCatToy,bytedreamer/LollypopCatToy,bytedreamer/LollypopCatToy |
0688a80f86e0fcc36d861ccc53e347e5822f119c | packages/diffhtml/lib/tasks/patch-node.js | packages/diffhtml/lib/tasks/patch-node.js | import patchNode from '../node/patch';
import Transaction from '../transaction';
import { CreateNodeHookCache, VTree } from '../util/types';
import globalThis from '../util/global';
/**
* Processes a set of patches onto a tracked DOM Node.
*
* @param {Transaction} transaction
* @return {void}
*/
export default fu... | import patch from '../node/patch';
import Transaction from '../transaction';
import { CreateNodeHookCache, VTree } from '../util/types';
import globalThis from '../util/global';
/**
* Processes a set of patches onto a tracked DOM Node.
*
* @param {Transaction} transaction
* @return {void}
*/
export default functi... | Rename public function to match task name | Rename public function to match task name
| JavaScript | mit | tbranyen/diffhtml,tbranyen/diffhtml,tbranyen/diffhtml,tbranyen/diffhtml |
5bf7329fdb2f67aceafc0f0b3e7265f0082d76e1 | lib/util.js | lib/util.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 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... | Switch string.incluldes() to string.indexOf() for compatibility reasons | Switch string.incluldes() to string.indexOf() for compatibility reasons
| JavaScript | mit | bandwidthcom/node-bandwidth,bandwidthcom/node-bandwidth |
a6509c1044bc53b22234ee3f935084989c59ea73 | src/remove-duplicate-elements.js | src/remove-duplicate-elements.js | // Remove duplicate elements from array
function removeDups(arr){
var dupes ={},
returnArray = [],
el;
for(var i =0; i<arr.length; i++){
el = arr[i];
if(!dupes[el]){
returnArray.push(el);
dupes[el] = true;
}
}
return returnArray;
}
removeDups([1,3,3,3,1,5,6,7,8,1]); | // Remove duplicate elements from array
function removeDups(arr){
var dupes ={},
returnArray = [],
el;
for(var i =0; i<arr.length; i++){
el = arr[i];
if(!dupes[el]){
returnArray.push(el);
dupes[el] = true;
}
}
return returnArray;
}
removeDups([10,30,3,30,3,10,5,6,7,8,1,1, ... | Remove duplicate elements in an array (FIX) | Remove duplicate elements in an array (FIX)
| JavaScript | mit | dedurus/js-algos |
bd13289c96e95952696b392ff232c5e27333750c | tools/analyzeBundle.js | tools/analyzeBundle.js | import webpack from 'webpack';
import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';
import config from '../webpack.config.prod';
config.plugins.push(new BundleAnalyzerPlugin());
const compiler = webpack(config);
compiler.run((error, stats) => {
if (error) {
throw new Error(error);
}
console.log(s... | import webpack from 'webpack';
import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';
import config from '../webpack.config.prod';
config.plugins.push(new BundleAnalyzerPlugin());
process.env.NODE_ENV = 'production';
const compiler = webpack(config);
compiler.run((error, stats) => {
if (error) {
throw ... | Set prod env when analyzing bundle | Set prod env when analyzing bundle
| JavaScript | mit | coryhouse/react-slingshot,flibertigibet/react-redux-starter-kit-custom,flibertigibet/react-redux-starter-kit-custom,danpersa/remindmetolive-react,coryhouse/react-slingshot,danpersa/remindmetolive-react,danpersa/remindmetolive-react |
91363795e88b13f13bd15842039e2cf94e1e357f | assets/scripts/main.js | assets/scripts/main.js | import $ from 'jquery';
import Router from './util/router';
import common from './routes/Common';
import home from './routes/Home';
import about_us from './routes/About';
// Import Bootstrap
import 'bootstrap/dist/js/umd/util.js';
import 'bootstrap/dist/js/umd/alert.js';
import 'bootstrap/dist/js/umd/button.js';
impor... | import $ from 'jquery';
import Router from './util/router';
import common from './routes/Common';
import home from './routes/Home';
import about_us from './routes/About';
// Import npm dependencies
import 'bootstrap/dist/js/umd/util.js';
import 'bootstrap/dist/js/umd/alert.js';
import 'bootstrap/dist/js/umd/button.js'... | Update comment for importing deps | Update comment for importing deps | JavaScript | mit | agusgarcia/sage9,JulienMelissas/sage,mckelvey/sage,levito/kleineweile-wp-theme,ChrisLTD/sage,ChrisLTD/sage,skemantix/sage,PCHC/pharmacyresidency2017,generoi/sage,teaguecnelson/tn-tellis-bds,gkmurray/sage,NicBeltramelli/sage,skemantix/sage,ptrckvzn/sage,agusgarcia/sage9,sacredwebsite/sage,sacredwebsite/sage,c50/c50_root... |
4f0e80b7dc2744c9527cebc5b9c99605f1f92f0a | geocoder.js | geocoder.js | var geocoder = require('node-geocoder') ("google", "https", {
apiKey: '<YOUR-KEY>'
});
var csv = require('csv');
process.stdin
.pipe(csv.parse())
.pipe(csv.transform(function(data, callback){
setImmediate(function(){
geocoder.geocode(data[1])
.then(function(res) {
data.push(res[0].latitude);
data... | var apiKey = "<YOUR-KEY>";
var geocoder = require('node-geocoder') ("google", "https", { apiKey: apiKey });
var csv = require('csv');
process.stdin
.pipe(csv.parse())
.pipe(csv.transform(function(data, callback){
setImmediate(function(){
geocoder.geocode(data[1])
.then(function(res) {
data.push(res[0]... | Relocate the key to be able to find it eaven easier | Relocate the key to be able to find it eaven easier
| JavaScript | mit | jpenninkhof/geocoder |
33f2a8f4c1dec243db8f33098174ab6bdf201aa9 | gulpfile.js | gulpfile.js | 'use strict';
var gulp = require('gulp');
var files = ['manifest.json', 'background.js'];
var xpiName = 'catgifs.xpi';
gulp.task('default', function () {
console.log(files, xpiName)
});
| 'use strict';
var gulp = require('gulp');
var zip = require('gulp-zip');
var files = ['manifest.json', 'background.js'];
var xpiName = 'catgifs.xpi';
gulp.task('default', function () {
gulp.src(files)
.pipe(zip(xpiName))
.pipe(gulp.dest('.'));
});
| Use gulp to create the xpi. | Use gulp to create the xpi. | JavaScript | mpl-2.0 | bwinton/catgif-extension |
46d0b833d4bce66dd7f4a717cab9968bf113551c | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var shell = require('gulp-shell');
var tsc = require('gulp-tsc');
gulp.task('build', function () {
return gulp.src([
'./**/*.ts',
'!./node_modules/**/*.ts'
])
.pipe(tsc({
target: 'ES5',
removeComments: true,
sourceMap: true
}))
.pipe(gulp.dest... | var gulp = require('gulp');
var shell = require('gulp-shell');
var tsc = require('gulp-tsc');
gulp.task('build', function () {
return gulp.src([
'./**/*.ts',
'!./node_modules/**/*.ts'
])
.pipe(tsc({
target: 'ES5',
removeComments: true,
sourceMap: true
}))
.pipe(gulp.dest... | Add lib to NODE_PATH when running the app. | Add lib to NODE_PATH when running the app.
| JavaScript | apache-2.0 | SollmoStudio/beyond.ts,sgkim126/beyond.ts,SollmoStudio/beyond.ts,murmur76/beyond.js,noraesae/beyond.ts,sgkim126/beyond.ts,murmur76/beyond.ts,murmur76/beyond.js,murmur76/beyond.ts,noraesae/beyond.ts |
4ded0d94d560d9793af9b9d1e2cb17495aa5c111 | optimize/node/engine.js | optimize/node/engine.js | var parse = require('./parse');
var clean = require('./clean');
module.exports = Engine = {};
var pythons = [];
var outputs = [];
var pythonNum = 0;
Engine.runPython = function(operation, a, b, cb) {
if (operation === 'local' || operation === 'global') {
var cleanup = clean.cleanMin(operation, a, b, cb);
a... | var parse = require('./parse');
var clean = require('./clean');
module.exports = Engine = {};
var pythons = [];
var outputs = [];
var pythonNum = 0;
Engine.runPython = function(operation, a, b, cb, xData, yData) {
if (operation === 'local' || operation === 'global') {
var cleanup = clean.cleanMin(operation, a,... | Add specification for fit operation | Add specification for fit operation
| JavaScript | mit | acjones617/scipy-node,acjones617/scipy-node |
912dcf904aac4e8730e3c45b2282d39e1c75170b | test/autoprefixer_test.js | test/autoprefixer_test.js | 'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, expected, [messa... | 'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actual, expected, [messa... | Remove test for default options | Remove test for default options
| JavaScript | mit | yuhualingfeng/grunt-autoprefixer,nqdy666/grunt-autoprefixer,nDmitry/grunt-autoprefixer |
af9adbb32651ae83dba7522211e540a20d0fe01b | blueprints/local-config/files/__config__/__name__.local.js | blueprints/local-config/files/__config__/__name__.local.js | /* jshint node: true */
module.exports = function(environment) {
return {};
}; | /* jshint node: true */
/* ==================
* USAGE INSTRUCTIONS
* ==================
*
* If you'd like to make a local change to this file, you need
* to tell git to ignore any changes to this file. You can do
* this by running:
*
* git update-index --skip-worktree [file-path]
*
* If you want to undo the ... | Add usage instructions to config blueprint | Add usage instructions to config blueprint
| JavaScript | mit | asakusuma/ember-local-config,asakusuma/ember-local-config |
04a10e43de71a1f8ff19bf840ffc48dcf9e4e266 | wafer/static/js/scheduledatetime.js | wafer/static/js/scheduledatetime.js | // Basic idea from Bojan Mihelac -
// http://source.mihelac.org/2010/02/19/django-time-widget-custom-time-shortcuts/
// Django imports jQuery into the admin site using noConflict(True)
// We wrap this in an anonymous function to stick to jQuery's $ idiom
// and ensure we're using the admin version of jQuery, rather th... | // Override the default setting on the django admin DateTimeShortcut
// Django 2 nicely does make this overridable, but we need to
// set it up before the DateTimeShortcuts init is called by
// window.onload, so we attach it to DOMContentLoaded
//
// The names of the input fields are also a bit opaque, and
// unfornate... | Rework the scheduletime helper to work with later admintimewidget helper code | Rework the scheduletime helper to work with later admintimewidget helper code
| JavaScript | isc | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer |
7ac6877cc11671359f31439bfd32f4c79253c0ae | tests/generated-assets.js | tests/generated-assets.js | var expect = require('chai').expect,
request = require('superagent').agent(),
PrettyCSS = require('PrettyCSS'),
testhost = require('../src/server').testhost();
describe('fields.css', function() {
var res;
before(function (done) {
request.get(testhost + '/css/fields.css').end(function(r) {
... | var expect = require('chai').expect,
request = require('superagent').agent(),
PrettyCSS = require('PrettyCSS'),
Q = require('q'),
connect = Q.defer(),
environment = require('./lib/environment').default;
require('../src/server').harness(function (url) {
connect.resolve(url);
});
describe('fiel... | Use new harness in generated assets unit test | Use new harness in generated assets unit test
| JavaScript | agpl-3.0 | jcamins/biblionarrator,jcamins/biblionarrator |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.