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
954b34245682de410257ebf5aab3ea6281850b12
src/app/index.route.js
src/app/index.route.js
function routerConfig ($stateProvider, $urlRouterProvider) { 'ngInject'; $stateProvider .state('home', { url: '/', templateUrl: 'app/main/main.html', controller: 'MainController', controllerAs: 'main' }); $urlRouterProvider.otherwise('/'); } export default routerConfig;
function routerConfig ($stateProvider, $urlRouterProvider) { 'ngInject'; $stateProvider .state('home', { url: '/', templateUrl: 'app/main/main.html', controller: 'MainController', controllerAs: 'main' }) .state('ambr', { url: '/ambr', templateUrl: 'app/projects/ambr.h...
Add routing for each project
Add routing for each project
JavaScript
mit
RobEasthope/lazarus,RobEasthope/lazarus
64b3b6f6b40b1e604d9f161c1b34a7cf619e02b0
packages/neft-core/src/initializer.js
packages/neft-core/src/initializer.js
const Renderer = require('./renderer') const Document = require('./document') const Element = require('./document/element') const windowElement = new Element.Tag() windowElement.props.set('n-style', ['__default__', 'item']) const windowDocument = new Document('__window__', { style: { __default__: { item: ...
const Renderer = require('./renderer') const Document = require('./document') const Element = require('./document/element') const eventLoop = require('./event-loop') const windowElement = new Element.Tag() windowElement.props.set('n-style', ['__default__', 'item']) const windowDocument = new Document('__window__', { ...
Fix for handling errors when calling Neft.render
Fix for handling errors when calling Neft.render
JavaScript
apache-2.0
Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft,Neft-io/neft
fe268dacebda3161c2efeb9d1091a412702d1228
src/components/modals/CreatorTypesModal.js
src/components/modals/CreatorTypesModal.js
import React from 'react' import CreatorTypeContainer from '../../containers/CreatorTypeContainer' import * as s from '../../styles/jso' import { css, media } from '../../styles/jss' const creatorTypeModalStyle = css( s.bgcWhite, s.fullWidth, s.mxAuto, s.p10, { borderRadius: 5, maxWidth: 510 }, media(s.min...
import React from 'react' import CreatorTypeContainer from '../../containers/CreatorTypeContainer' import * as s from '../../styles/jso' import { css, media } from '../../styles/jss' const creatorTypeModalStyle = css( s.bgcWhite, s.fullWidth, s.mxAuto, s.p10, { borderRadius: 5, maxWidth: 510 }, media(s.min...
Update creator type modal copy
Update creator type modal copy
JavaScript
mit
ello/webapp,ello/webapp,ello/webapp
905f2424a016aeb004f5bd2a14b26fe008d485ac
test/hashtable.js
test/hashtable.js
var HashMap = require('..'), test = require('test-more')(); var hashmap = new HashMap(); test. ok(hashmap, 'new HashMap()'). is(function() { hashmap.max_load_factor(0.75); return hashmap.max_load_factor(); }, 0.75, 'get/set max_load_factor'). test("object identity", function(tes...
var HashMap = require('..'), test = require('test-more')(); var hashmap = new HashMap(); test.ok(hashmap, 'new HashMap()') .is(function() { hashmap.max_load_factor(0.75); return hashmap.max_load_factor(); }, 0.75, 'get/set max_load_factor') .test("object identity", function(test) { ...
Revert "Changed tests to 'dot-after' formatting"
Revert "Changed tests to 'dot-after' formatting" This reverts commit 9cd0e3cb0ea17ded5fa93c4471a9cad73b0b2f30.
JavaScript
mit
chad3814/node-hashtable,vigbk/node-hashtable,vigbk/node-hashtable,vigbk/node-hashtable,chad3814/node-hashtable,chad3814/node-hashtable
638def304c2efc0755aedf0070760bc15c404bee
lib/index.js
lib/index.js
"use strict"; var Model = require('./model'); module.exports = new Restifier(); module.exports.Restifier = Restifier; function Restifier() { this.prefix = ''; } Restifier.prototype.initialize = function() { return require('res-error')({ log: false }); }; Restifier.prototype.model = function(mongooseModel...
"use strict"; var Model = require('./model'); module.exports = new Restifier(); module.exports.Restifier = Restifier; function Restifier() { this.models = []; } Restifier.prototype.initialize = function() { return require('res-error')({ log: false }); }; Restifier.prototype.model = function(mongooseModel...
Store models in restifier instance
Store models in restifier instance Signed-off-by: Ian Macalinao <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@ian.pw>
JavaScript
mit
simplyianm/preston,simplyianm/preston
0898198cb32667ff94b83dd0d2f1ce26a810d89f
src/js/services/homeIntegrationsService.js
src/js/services/homeIntegrationsService.js
'use strict'; angular.module('copayApp.services').factory('homeIntegrationsService', function(configService, $log) { var root = {}; var services = []; root.register = function(serviceInfo) { $log.info('Adding home Integrations entry:' + serviceInfo.name); services.push(serviceInfo); }; root...
'use strict'; angular.module('copayApp.services').factory('homeIntegrationsService', function(lodash, configService, $log) { var root = {}; var services = []; root.register = function(serviceInfo) { // Check if already exists if (lodash.find(services, { 'name': serviceInfo.name })) return; $l...
Fix duplicated home integration items
Fix duplicated home integration items
JavaScript
mit
cmgustavo/copay,matiu/copay,fr34k8/copay,dabura667/copay,gabrielbazan7/copay,bitchk-wallet/copay,gabrielbazan7/copay,Bitcoin-com/Wallet,Bitcoin-com/Wallet,gabrielbazan7/copay,bitjson/copay,msalcala11/copay,Bitcoin-com/Wallet,msalcala11/copay,gabrielbazan7/copay,cmgustavo/copay,janko33bd/copay,bitchk-wallet/copay,fr34k8...
869084d477d7df84d80b2674e2a5be7242fe562b
app/lib/router.js
app/lib/router.js
require('dashboard/core'); require('dashboard/github_data_source'); Dashboard.Router = Ember.Router.extend({ root: Ember.Route.extend({ index: Ember.Route.extend({ route: '/', connectOutlets: function(router) { router.transitionTo('user', { username: 'pangratz' }); } ...
require('dashboard/core'); require('dashboard/github_data_source'); Dashboard.Router = Ember.Router.extend({ root: Ember.Route.extend({ index: Ember.Route.extend({ route: '/', connectOutlets: function(router) { router.transitionTo('user', { username: 'pangratz' }); } ...
Use outlet to show repositories
Use outlet to show repositories
JavaScript
isc
greyhwndz/dashboard,pangratz/dashboard,greyhwndz/dashboard,pangratz/dashboard,greyhwndz/dashboard
977307c14c41df2eeb53df04f58222ef7a009fc6
app/assets/javascripts/paginator.js
app/assets/javascripts/paginator.js
$(document).ready(function() { $(".per-page").chosen({ width: '70px', disable_search_threshold: 20, }); $(".per-page").change(function () { location.href = add_parameter(location.href, 'per_page', $(this).val()); }); });
$(document).ready(function() { $(".per-page").select2({ width: '70px', minimumResultsForSearch: 20, }); $(".per-page").change(function () { location.href = add_parameter(location.href, 'per_page', $(this).val()); }); });
Make pagination dropdown into select2
Make pagination dropdown into select2
JavaScript
mit
Marri/glowfic,Marri/glowfic,Marri/glowfic,Marri/glowfic
1b0427393e5713700039862b2d5cbd7c3e079cba
src/components/search_bar.js
src/components/search_bar.js
import React, { Component } from 'react'; class SearchBar extends Component { render() { return <input onChange={event => console.log(event.target.value)} />; } // onInputChange(event) { // console.log(event.target.value); // } } export default SearchBar;
import React, { Component } from 'react'; class SearchBar extends Component { constructor(props) { super(props); this.state = { term: '' }; } render() { return ( <div> <input onChange={event => this.setState({ term: event.target.value })} /> </div> ); } } export default SearchBar;
Add a constructor method and add a property of term for the state, add a function as an event handler onchange that sets the state for term as the inputs value.
Add a constructor method and add a property of term for the state, add a function as an event handler onchange that sets the state for term as the inputs value.
JavaScript
mit
JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial
04649c101a33074c7745c867aab8eacc322a057a
www/js/app.js
www/js/app.js
(function () { RecipeListView.prototype.template = Handlebars.compile($("#recipe-list-tpl").html()); RecipeView.prototype.template = Handlebars.compile($("#recipe-tpl").html()); var service = new RecipeService(); service.initialize().done(function () { router.addRoute('', function() { ...
(function () { RecipeListView.prototype.template = Handlebars.compile($("#recipe-list-tpl").html()); RecipeView.prototype.template = Handlebars.compile($("#recipe-tpl").html()); Handlebars.registerHelper('recipe_image', function(image_id) { return _.find(recipe_images, function(recipe){ return reci...
Add handlebars helper in order to show recipe image
Add handlebars helper in order to show recipe image
JavaScript
mit
enoliglesias/wpreader,enoliglesias/wpreader
b7ffeb3e868611232fc03fd6f317d66511ff5f1e
app/moxie.conf.js
app/moxie.conf.js
define([], function() { var MoxieConf = { endpoint: 'http://api.m.ox.ac.uk', paths: { places_search: '/places/search', places_id: '/places/', dates: '/oxford_dates/', courses_search: '/courses/search', courses_subjects: '/courses/subjects',...
define([], function() { var MoxieConf = { endpoint: 'http://api.m.ox.ac.uk', paths: { places_search: '/places/search', places_categories: '/places/types', places_id: '/places/', dates: '/oxford_dates/', courses_search: '/courses/search', ...
Add API endpoint for categories
Add API endpoint for categories
JavaScript
apache-2.0
ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client
9686e400d6823e23e5740676b5f8e67f32a56051
tests/CoreSpec.js
tests/CoreSpec.js
describe("Core Bliss", function () { "use strict"; beforeEach(function () { fixture.setBase('tests/fixtures'); this.fixture = fixture.load('core.html'); document.body.innerHTML += this.fixture[0]; }); // testing setup it("has the fixture on the dom", function () { expect($('#fixture-container')).to.not.b...
describe("Core Bliss", function () { "use strict"; before(function() { fixture.setBase('tests/fixtures'); }); beforeEach(function () { this.fixture = fixture.load('core.html'); document.body.innerHTML += this.fixture[0]; }); // testing setup it("has the fixture on the dom", function () { expect($('#fi...
Set fixture base before instead of before each
Set fixture base before instead of before each
JavaScript
mit
LeaVerou/bliss,LeaVerou/bliss,dperrymorrow/bliss,zdfs/bliss,dperrymorrow/bliss,zdfs/bliss
16666da6421dd2bf6f580ef534c9a7b24d9cd927
app/middleware/preview-api.js
app/middleware/preview-api.js
const parseUrl = require('parseurl'); const get = require('lodash/get'); const crypto = require('crypto'); const timingSafeCompare = require('tsscmp'); const contentStore = require('../../lib/content-store'); /* eslint-disable no-param-reassign */ module.exports = (req, res, next) => { const pathName = get(parseUr...
const parseUrl = require('parseurl'); const get = require('lodash/get'); const crypto = require('crypto'); const timingSafeCompare = require('tsscmp'); const contentStore = require('../../lib/content-store'); /* eslint-disable no-param-reassign */ module.exports = (req, res, next) => { const pathName = get(parseUr...
Update preview logic after content refactoring
Update preview logic after content refactoring As we removed the two column layout in favour of the 1 column stream, the related preview logic has to be updated.
JavaScript
mit
nhsuk/betahealth,nhsuk/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsuk/betahealth
d8c404e8b641e9ff42f0fd10843f55977667594f
application/index.js
application/index.js
var dispatcher = require('../dispatcher'); module.exports = { render: require('./render'), builtInStore: require('./built-in-store'), actionBuilder: require('./action-builder'), clear: require('./clear'), mountedComponents: require('./mounted-components'), changeMode(newMode, previousMode){ var mode = {...
var dispatcher = require('../dispatcher'); var Empty = React.createClass({ render: function() { return <div></div>; } }); module.exports = { render: require('./render'), builtInStore: require('./built-in-store'), actionBuilder: require('./action-builder'), clear: require('./clear'), mountedComponents...
Change div with empty compoennt.
[clear-cartridge] Change div with empty compoennt.
JavaScript
mit
Jerom138/focus,Jerom138/focus,Jerom138/focus,KleeGroup/focus-core
aded6fe440526e31c1f2da2f4336bf53c10f4f9d
lib/index.js
lib/index.js
'use strict' /* eslint-disable no-param-reassign */ // Replace absolute file paths with <PROJECT_ROOT> const cwd = process.cwd() /*:: type Val = string | Object */ module.exports = { print (val/* : Val */, serialize/* : Function */) { if (isPath(val)) { val = val.split(cwd).join('<PROJECT_ROOT>') ...
'use strict' /* eslint-disable no-param-reassign */ // Replace absolute file paths with <PROJECT_ROOT> const cwd = process.cwd() module.exports = { print (val, serialize) { if (isPath(val)) { val = val.split(cwd).join('<PROJECT_ROOT>') } else if (val instanceof Error) { val.message = v...
Remove all flowtypes for now
Remove all flowtypes for now
JavaScript
apache-2.0
tribou/jest-serializer-path
34ba61a4dca1c8968ca03c669dba1689a99c26ba
lib/index.js
lib/index.js
'use strict' function makeError (res, originalError) { var errorMessage = res.body.message || res.body.error_message || res.body.ErrorMessage if (errorMessage) { var error = new Error(originalError.message) if (res.body.code) { error.code = res.body.code } if (res.body.name) { error.nam...
'use strict' function makeError (res, originalError) { var errorMessage = res.body.message || res.body.error_message || res.body.ErrorMessage if (errorMessage) { var error = new Error(originalError.message) if (res.body.code) { error.code = res.body.code } if (res.body.name) { error.nam...
Remove lambda expression for ES5 support
Remove lambda expression for ES5 support
JavaScript
mit
LOKE/supertest-thenable
99383952dc38f0e673955aa76feb210c93c665bc
src/patchers/FunctionApplicationPatcher.js
src/patchers/FunctionApplicationPatcher.js
import NodePatcher from './NodePatcher'; export default class FunctionApplicationPatcher extends NodePatcher { constructor(node, context, editor, fn, args) { super(node, context, editor); this.fn = fn; this.args = args; fn.setRequiresExpression(); args.forEach(arg => arg.setRequiresExpression());...
import NodePatcher from './NodePatcher'; export default class FunctionApplicationPatcher extends NodePatcher { constructor(node, context, editor, fn, args) { super(node, context, editor); this.fn = fn; this.args = args; fn.setRequiresExpression(); args.forEach(arg => arg.setRequiresExpression());...
Add basic support for inserting function call parentheses.
Add basic support for inserting function call parentheses.
JavaScript
mit
alangpierce/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,decaffeinate/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate
3a449b052e3080c7af175012b8bfdf2e221568c3
share/spice/rfc/rfc.js
share/spice/rfc/rfc.js
(function (env) { "use strict"; env.ddg_spice_rfc = function(api_result) { if (!api_result || api_result.error || api_result.message == "no results.") { return Spice.failed('rfc'); } Spice.add({ id: "rfc", name: "Reference", data: api_res...
(function (env) { "use strict"; env.ddg_spice_rfc = function(api_result) { if (!api_result || api_result.error || api_result.message == "no results.") { return Spice.failed('request_for_comments'); } Spice.add({ id: "rfc", name: "Answer", ...
Update name property, rename id in failed function call.
Update name property, rename id in failed function call.
JavaScript
apache-2.0
soleo/zeroclickinfo-spice,levaly/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,deserted/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,soleo/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,whalenrp/zeroclickinf...
d15c68fbffbc7ac26e07bf034ab828c72669447f
lib/tests.js
lib/tests.js
#!/usr/bin/env node var suite = require('suite.js'); var o = require('./object-sugar'); // test schemas var license = o.schema('License', { name: {type: String, unique: true} }); var library = o.schema('Library', { name: {type: String, required: true}, licenses: o.refs('License') }); suite(o.get, [ ], {...
#!/usr/bin/env node var suite = require('suite.js'); var o = require('./object-sugar'); suite(o.get, [ ], {async: true}); (function() { var li = license(); suite(o.create, [ [li, {name: 'foobar'}], {name: 'foobar'}, [li, {name: 'foobar'}], {error: 'name was not unique!'}, // XXX: trig err! ...
Make test dbs not persistent
Make test dbs not persistent
JavaScript
mit
sugarjs/object-sugar
e30d9f0b4ea028f0a93177500a490d99cc15cd26
lib/types.js
lib/types.js
'use babel' /* @flow */ import type {Point, TextEditorMarker, TextEditor, Range} from 'atom' export type Provider = { grammarScopes: Array<string>, getDeclarations: ((params: {textEditor: TextEditor, visibleRange: Range}) => Array<Declaration>) } export type Declaration = { range: Range, source: { fileP...
'use babel' /* @flow */ import type {Point, TextEditorMarker, TextEditor, Range} from 'atom' export type Provider = { grammarScopes: Array<string>, getDeclarations: ((params: {textEditor: TextEditor, visibleRange: Range}) => Array<Declaration>) } export type Declaration = { range: Range, source: Declaration...
Add new type to flow
:new: Add new type to flow
JavaScript
mit
steelbrain/declarations
5b08e397562e9a56d3142e145057a930860b4f6a
generators/app/index.js
generators/app/index.js
'use strict'; var yeoman = require( 'yeoman-generator' ), yosay = require( 'yosay' ); var DashGenerator = yeoman.generators.Base.extend( { initializing: function() { this.pkg = require( '../../package.json' ); }, prompting: function() { var done = this.async(); // Have Yeo...
'use strict'; var yeoman = require( 'yeoman-generator' ), yosay = require( 'yosay' ); var DashGenerator = yeoman.generators.Base.extend( { initializing: function() { this.pkg = require( '../../package.json' ); }, prompting: function() { var done = this.async(); // Have Yeo...
Fix copying files that don't exist
Fix copying files that don't exist
JavaScript
mit
Circular-Studios/generator-dash
ac9a1dd651b5d590e2633a140ca6aa53e1a7d9e8
src/search/search-index/tag-suggestions.js
src/search/search-index/tag-suggestions.js
import index from './' import { keyGen, removeKeyType } from './util' /** * @param {string} [query=''] Plaintext query string to match against start of tag names. * eg. 'wo' would match 'work', 'women' (assuming both these tags exist). * @param {number} [limit=10] Max number of suggestions to return. * @returns {...
import index from './' import { keyGen, removeKeyType } from './util' /** * @param {string} [query=''] Plaintext query string to match against start of tag names. * eg. 'wo' would match 'work', 'women' (assuming both these tags exist). * @param {number} [limit=10] Max number of suggestions to return. * @returns {...
Update suggest + fetch tags methods to return arrays
Update suggest + fetch tags methods to return arrays - prev was using `Set` but it cannot be simply serialized to a primitive to send over the web ext interscript messaging API
JavaScript
mit
WorldBrain/WebMemex,WorldBrain/WebMemex
d142757dfdccd5480f28b1938009e80133c6cc68
src/strategies/direction/nativeStrategy.js
src/strategies/direction/nativeStrategy.js
function nativeStrategy(data) { const { origin, destination, mode } = data; let originLocation; let destinationLocation; if (typeof origin === 'object' && origin.lat && origin.lng) { originLocation = new google.maps.LatLng(origin); } else { originLocation = origin; } if (typeof destination === ...
function nativeStrategy(data) { const { origin, destination, mode } = data; let originLocation; let destinationLocation; if (typeof origin === 'object' && origin.lat && origin.lng) { originLocation = new google.maps.LatLng(origin); } else { originLocation = origin; } if (typeof destination === ...
Fix native strategy resolution path
Fix native strategy resolution path
JavaScript
mit
bondz/react-static-google-map
7c01fd5c5e3c174d7d5f3eee599603d3295c27e8
src/js/modules/courselist.js
src/js/modules/courselist.js
this.mmooc=this.mmooc||{}; this.mmooc.courseList = function() { return { listCourses: function(parentId) { mmooc.api.getEnrolledCourses(function(courses) { var html = mmooc.util.renderTemplateWithData("courselist", {courses: courses}); document.getElementById(pa...
this.mmooc=this.mmooc||{}; this.mmooc.courseList = function() { return { listCourses: function(parentId) { mmooc.api.getEnrolledCourses(function(courses) { var html = mmooc.util.renderTemplateWithData("courselist", {courses: courses}); document.getElementById(pa...
Use $.ajaxSuccess to show "add new course" button
Use $.ajaxSuccess to show "add new course" button
JavaScript
mit
matematikk-mooc/frontend,matematikk-mooc/frontend
fb3fbe1df40744ac42dfb79ad6117dce48322fc7
tools/run-test.js
tools/run-test.js
const path = require("path"); const rootDir = path.normalize(path.join(__dirname, "..")); const tester = path.join(rootDir, "node_modules", "vscode", "bin", "test"); const cp = require("child_process"); let tests = process.argv.slice(2); let failed = 0; tests.forEach((test) => { let [ testName, wsName ] = test.spl...
const path = require("path"); const rootDir = path.normalize(path.join(__dirname, "..")); const tester = path.join(rootDir, "node_modules", "vscode", "bin", "test"); const cp = require("child_process"); let tests = process.argv.slice(2); let failed = 0; tests.forEach((test) => { let [ testName, wsName ] = test.spl...
Fix env for test runner
Fix env for test runner
JavaScript
mit
kimushu/rubic-vscode,kimushu/rubic-vscode,kimushu/rubic-vscode,kimushu/rubic-vscode
9e7bcadbb2c522d394f73b762dd986f9c4a5b3c1
simpleshelfmobile/_attachments/code/couchutils.js
simpleshelfmobile/_attachments/code/couchutils.js
/** * Utilities for accessing CouchDB. */ define([ "jquery" ], function($) { var couchUtils = { /** * Login to CouchDB * @return Promise */ login: function(userName, password, urlPrefix) { // $.Deferred callbacks: done, fail, always return $.a...
/** * Utilities for accessing CouchDB. */ define([ "jquery", "settings" ], function($, appSettings) { var couchUtils = { /** * Determine if current session is active. * @return Promise **/ isLoggedIn: function() { var dfrd = $.Deferred(); ...
Add login check, use appSetting model
Add login check, use appSetting model
JavaScript
agpl-3.0
tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf,tephyr/simpleshelf
74463bb0f1dc606ce8856db350ea88a6cf7840c4
scripts/externals/mpv/libs.js
scripts/externals/mpv/libs.js
const { copyFileSync, existsSync } = require('fs') const { join } = require('path') const IS_LINUX = !['win32', 'darwin'].includes(process.platform) const baseDir = ({ 'darwin': '/usr/local/lib', 'win32': 'C:\\Windows\\system32' }[process.platform]) const libFilename = ({ 'darwin': 'libmpv.1.dylib', 'win32':...
const { copyFileSync, existsSync } = require('fs') const { join } = require('path') const IS_LINUX = !['win32', 'darwin'].includes(process.platform) if (!IS_LINUX) { const baseDir = ({ 'darwin': '/usr/local/lib', 'win32': 'C:\\Windows\\system32' }[process.platform]) const libFilename = ({ 'darwin':...
Fix lib import for linux platforms
Fix lib import for linux platforms
JavaScript
mit
Kylart/KawAnime,Kylart/KawAnime,Kylart/KawAnime
2209db752bea8f0989134b1bb5a107f52d2282b4
src/plugins/cache/index.js
src/plugins/cache/index.js
import {curry, values} from 'ladda-fp'; import {createCache} from './cache'; import {decorateCreate} from './operations/create'; import {decorateRead} from './operations/read'; import {decorateUpdate} from './operations/update'; import {decorateDelete} from './operations/delete'; import {decorateNoOperation} from './op...
import {curry, values} from 'ladda-fp'; import {createCache} from './cache'; import {decorateCreate} from './operations/create'; import {decorateRead} from './operations/read'; import {decorateUpdate} from './operations/update'; import {decorateDelete} from './operations/delete'; import {decorateNoOperation} from './op...
Normalize fn name for change objects
Normalize fn name for change objects
JavaScript
mit
petercrona/ladda,petercrona/ladda,ladda-js/ladda
92b970377d8089486a929a06ba0085fe60aaca5f
src/libs/mapbox-rtl.js
src/libs/mapbox-rtl.js
import MapboxGl from 'mapbox-gl' // Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX. const data = require("raw-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js"); const blob = new window.Blob([data]); const objectUrl = window.URL.createObjectURL(blob...
import MapboxGl from 'mapbox-gl' // Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX. const data = require("raw-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js"); const blob = new window.Blob([data], { type: "text/javascript" }); const objectUrl = ...
Set MIME type for RTL blob
Set MIME type for RTL blob
JavaScript
mit
maputnik/editor,maputnik/editor
70ce9cfe4a0192ad766eac75f6fd51d32cd43024
server.js
server.js
'use strict'; const WebApp = require('./services/WebApp'); const app = new WebApp(); app .configure({ files: [ __dirname + '/config/application.js' ] }) .bootstrap() .launch(); module.exports = app;
'use strict'; const WebApp = require('./services/WebApp'); const app = new WebApp(); app .configure({ files: [ `${__dirname}/config/application.js`, `${__dirname}/config/application.local.js`, ], }) .bootstrap() .launch(); module.exports = app;
Add support for local config overrides
Add support for local config overrides
JavaScript
mit
release-notes/release-notes-hub,release-notes/release-notes-hub
5e27c30b83bf462f152b3839646f3ffc17b2f62e
_promisify.js
_promisify.js
var falsey = { 0: true, false: true, no: true, nope: true } var bloob = process.env.MZ_BLUEBIRD if (typeof Promise === 'undefined' || (bloob && !falsey[bloob])) { // use bluebird var promisify try { promisify = require('bluebird').promisify } catch (err) { throw new Error('please install blueb...
var falsey = { 0: true, false: true, no: true, nope: true } var bloob = process.env.MZ_BLUEBIRD if (typeof Promise === 'undefined' || (bloob && !falsey[bloob])) { // use bluebird var promisify try { promisify = require('bluebird').promisify } catch (err) { throw new Error('please install blueb...
Optimize native promisification and support multiple arguments
Optimize native promisification and support multiple arguments
JavaScript
mit
normalize/mz,aminuga/mz,petkaantonov/mz
e8c149607f9266b348fa519addf05f8f311f19f5
src/sorted_unique_count.js
src/sorted_unique_count.js
'use strict'; /** * For a sorted input, counting the number of unique values * is possible in constant time and constant memory. This is * a simple implementation of the algorithm. * * Values are compared with `===`, so objects and non-primitive objects * are not handled in any special way. * * @param {Array} ...
'use strict'; /** * For a sorted input, counting the number of unique values * is possible in constant time and constant memory. This is * a simple implementation of the algorithm. * * Values are compared with `===`, so objects and non-primitive objects * are not handled in any special way. * * @param {Array} ...
Fix code style of sorted unique count.
Fix code style of sorted unique count.
JavaScript
isc
simple-statistics/simple-statistics,GerHobbelt/simple-statistics,simple-statistics/simple-statistics,llimllib/simple-statistics,simple-statistics/simple-statistics,tmcw/simple-statistics
497be86d19253138425577534f68acd76143b275
authWindow.js
authWindow.js
const electron = require('electron'); const BrowserWindow = electron.BrowserWindow; const ipcMain = electron.ipcMain; module.exports = { createAuthWindow: function(mainWindow, loginCallback) { var loginWindow = new BrowserWindow({ frame: false, height: 250, modal: true, parent: mainWindow, movabl...
const electron = require('electron'); const BrowserWindow = electron.BrowserWindow; const ipcMain = electron.ipcMain; module.exports = { createAuthWindow: function(mainWindow, loginCallback) { var loginWindow = new BrowserWindow({ frame: false, height: 250, modal: true, parent: mainWindow, movabl...
Fix electron behaviour when cancelling http basic auth
Fix electron behaviour when cancelling http basic auth
JavaScript
mit
bobar/tdfb,bobar/tdfb,bobar/tdfb,bobar/tdfb
a30e8e8d64c242fd699dadd1de970d0024edcbd4
config/initializers/sequelize.js
config/initializers/sequelize.js
Sequelize = require('sequelize') dbConfig = require('../database.json')['staging'] pg = require('pg').native; var db; if (process.env.POSTGRES_URL) { var match = process.env.POSTGRES_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/); var db = new Sequelize(match[5], match[1], match[2], { dialect: ...
Sequelize = require('sequelize') dbConfig = require('../database.json')['staging'] pg = require('pg').native; var db; if (process.env.DATABASE_URL) { var match = process.env.DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/); var db = new Sequelize(match[5], match[1], match[2], { dialect: ...
Use DATABASE_URL instead of POSTGRES_URL
[CHORE] Use DATABASE_URL instead of POSTGRES_URL
JavaScript
isc
crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,crazyquark/gatewayd,zealord/gatewayd,whotooktwarden/gatewayd
65f772caa5aa0350ae0456e8bc2f447db1f21921
packages/internal-test-helpers/tests/index-test.js
packages/internal-test-helpers/tests/index-test.js
QUnit.module('internal-test-helpers'); QUnit.test('module present', function(assert) { assert.ok(true, 'each package needs at least one test to be able to run through `npm test`'); });
import { moduleFor, AbstractTestCase } from 'internal-test-helpers'; moduleFor('internal-test-helpers', class extends AbstractTestCase { ['@test module present'](assert) { assert.ok(true, 'each package needs at least one test to be able to run through `npm test`'); } });
Convert internal-test-helpers to new test style
[CLEANUP] Convert internal-test-helpers to new test style
JavaScript
mit
fpauser/ember.js,tildeio/ember.js,jaswilli/ember.js,asakusuma/ember.js,emberjs/ember.js,karthiick/ember.js,qaiken/ember.js,jaswilli/ember.js,xiujunma/ember.js,givanse/ember.js,Turbo87/ember.js,Gaurav0/ember.js,kellyselden/ember.js,givanse/ember.js,intercom/ember.js,jaswilli/ember.js,asakusuma/ember.js,miguelcobain/embe...
2ad65976d5fbbea38e74004b4836c97d13394993
web/js/profile.js
web/js/profile.js
/** * Created by nkmathew on 05/07/2016. */ $(document).ready(function () { $("#profile-form").submit(function (e) { $("#btn-submit-profile").spin(BIG_SPINNER); var url = '/site/profile'; $.ajax({ type: 'POST', url: url, data: $("#profile-for...
/** * Created by nkmathew on 05/07/2016. */ $(document).ready(function () { $("#profile-form").submit(function (e) { $("#btn-submit-profile").spin(BIG_SPINNER); var url = '/site/profile'; $.ajax({ type: 'POST', url: url, data: $("#profile-for...
Add button for jumping to todays date
Add button for jumping to todays date
JavaScript
bsd-3-clause
nkmathew/intern-portal,nkmathew/intern-portal
69aed72d668bbe18883ce511a4b359c268c9c582
src/commands/commands.js
src/commands/commands.js
'use strict'; // This is a very simple interface // Used to fire up gulp task in your local project var runner = require('../utils/runner'), cb = require('../utils/callback'), argv = require('minimist')(process.argv.slice(2)); var commands = function(options) { var command = argv._[0] || options.parent.rawA...
'use strict'; // This is a very simple interface // Used to fire up gulp task in your local project var runner = require('../utils/runner'), cb = require('../utils/callback'), argv = require('minimist')(process.argv.slice(2)); var commands = function(options) { var command = argv._[0] || options.parent.rawA...
Adjust switch for accept alias to serve and build.
Adjust switch for accept alias to serve and build.
JavaScript
mit
mattma/ember-rocks,mattma/ember-rocks,mattma/ember-rocks
51d3aa5289b62f4d6a602e7807ef934f4862525c
app/config.js
app/config.js
module.exports = (function () { 'use strict'; var config = { development: { server: { port: 3000 }, wsapp: { port: 3334 } }, testing: { server: { port: 3001 }, wsapp: { port: 3334 } }, production: { server: { ...
module.exports = (function () { 'use strict'; var config = { development: { server: { port: 3000 }, wsapp: { port: 3334 } }, testing: { server: { port: 3001 }, wsapp: { port: 3334 } }, production: { server: { ...
Use env port for app to listen on
Use env port for app to listen on
JavaScript
mit
cr0cK/mockify,Gandi/mockify
46014be39155d26a1b04d14485990a0a562b4695
src/som/vmobjects/SAbstractObject.js
src/som/vmobjects/SAbstractObject.js
'use strict'; function SAbstractObject() { this.toString = function () { var clazz = getClass(); if (clazz === null) { return "an Object(clazz==null)"; } return "a " + clazz.getName().getString(); }; this.send = function (selectorString, args) { var sele...
'use strict'; function SAbstractObject() { var _this = this; this.toString = function () { var clazz = _this.getClass(); if (clazz === null) { return "an Object(clazz==null)"; } return "a " + clazz.getName().getString(); }; this.send = function (selectorStr...
Use _this when it seems necessary
Use _this when it seems necessary Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
JavaScript
mit
smarr/JsSOM,smarr/JsSOM,SOM-st/JsSOM,smarr/JsSOM,smarr/JsSOM,SOM-st/JsSOM,SOM-st/JsSOM,SOM-st/JsSOM
8ffc94a2239933f0134cfc603d019da3a9b9a499
tests/unit/routes/index_test.js
tests/unit/routes/index_test.js
import Index from 'appkit/routes/index'; import App from 'appkit/app'; var route; module("Unit - IndexRoute", { setup: function(){ route = App.__container__.lookup('route:index'); } }); test("it exists", function(){ ok(route); ok(route instanceof Ember.Route); }); test("#model", function(){ deepEqual(...
import Index from 'appkit/routes/index'; import App from 'appkit/app'; var route; module("Unit - IndexRoute", { setup: function(){ route = routeFor('index'); } }); test("it exists", function(){ ok(route); ok(route instanceof Ember.Route); }); test("#model", function(){ deepEqual(route.model(), ['red',...
Refactor to use new test helper
Refactor to use new test helper
JavaScript
mit
dierbro/ember-invoice
5cd19bdea12501dc8a2a8cf8255f132f2794046d
src/gulpfile.js
src/gulpfile.js
var elixir = require('laravel-elixir'); elixir(function(mix) { mix.copy( 'node_modules/bootstrap/dist/fonts', 'public/build/fonts' ); mix.copy( 'node_modules/font-awesome/fonts', 'public/build/fonts' ); mix.copy( 'node_modules/ionicons/dist/fonts', ...
var elixir = require('laravel-elixir'); elixir(function(mix) { mix.copy( 'node_modules/bootstrap/dist/fonts', 'public/build/fonts' ); mix.copy( 'node_modules/font-awesome/fonts', 'public/build/fonts' ); mix.copy( 'node_modules/ionicons/dist/fonts', ...
Fix invalid path for Bootstrap js file
Fix invalid path for Bootstrap js file
JavaScript
mit
syahzul/admin-theme
8c36e50421438506ef24e5566761ebb30ec849fa
packages/ember-template-compiler/tests/system/compile_options_test.js
packages/ember-template-compiler/tests/system/compile_options_test.js
import { defaultCompileOptions } from 'ember-template-compiler'; import TransformOldBindingSyntax from 'ember-template-compiler/plugins/transform-old-binding-syntax'; import TransformItemClass from 'ember-template-compiler/plugins/transform-item-class'; import TransformAngleBracketComponents from 'ember-template-compil...
import { defaultCompileOptions } from 'ember-template-compiler'; import defaultPlugins from 'ember-template-compiler/plugins'; QUnit.module('ember-template-compiler: default compile options'); QUnit.test('default options are a new copy', function() { notEqual(defaultCompileOptions(), defaultCompileOptions()); }); ...
Fix tests confirming default plugins are included in compileOptions.
Fix tests confirming default plugins are included in compileOptions.
JavaScript
mit
jherdman/ember.js,intercom/ember.js,mfeckie/ember.js,HeroicEric/ember.js,miguelcobain/ember.js,cibernox/ember.js,amk221/ember.js,emberjs/ember.js,code0100fun/ember.js,cbou/ember.js,nickiaconis/ember.js,xiujunma/ember.js,stefanpenner/ember.js,tsing80/ember.js,chadhietala/ember.js,kaeufl/ember.js,sandstrom/ember.js,inter...
4640bab0430674787ed3d6ad613c9525925dbfbf
bindings/pyroot/ROOTaaS/html/static/js/custom.js
bindings/pyroot/ROOTaaS/html/static/js/custom.js
/* ROOTaaS JS */ // Make sure Clike JS lexer is loaded, then configure syntax highlighting for %%cpp and %%dcl magics require(['codemirror/mode/clike/clike', 'base/js/namespace', 'notebook/js/codecell'], function(Clike, IPython, CodeCell) { IPython.CodeCell.config_defaults.highlight_modes['magic_text/x-c++src'] = ...
/* ROOTaaS JS */ highlight_cells = function(IPython, mime) { IPython.CodeCell.options_default.cm_config.mode = mime; var cells = IPython.notebook.get_cells(); for (i = 0; i < cells.length; i++) { var cell = cells[i]; if (cell.cell_type == "code") { cell.code_mirror.setOption('mo...
Configure C++ syntax highlighting for ROOT prompt notebooks
Configure C++ syntax highlighting for ROOT prompt notebooks
JavaScript
lgpl-2.1
mkret2/root,veprbl/root,BerserkerTroll/root,gganis/root,CristinaCristescu/root,sbinet/cxx-root,bbockelm/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,beniz/root,beniz/root,thomaskeck/root,BerserkerTroll/root,esakellari/root,arch1tect0r/root,Y--/root,lgiommi/root,simonpf/root,veprbl/root,sirinath/root,agarciamo...
738918c2cf2eb9d3d4f88798a6e57a200985abaf
webpack.config.js
webpack.config.js
var webpack = require('webpack'), path = require('path'), yargs = require('yargs'); var libraryName = 'hdrhistogram', plugins = [], outputFile; if (yargs.argv.p) { //plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true })); outputFile = libraryName + '.min.js'; } else { outputFile =...
var webpack = require('webpack'), path = require('path'), yargs = require('yargs'); var libraryName = 'hdrhistogram', plugins = [], outputFile; if (yargs.argv.p) { plugins.push(new webpack.optimize.UglifyJsPlugin({ minimize: true })); outputFile = libraryName + '.min.js'; } else { outputFile = l...
Add pako as a webpack external dependency
Add pako as a webpack external dependency
JavaScript
bsd-2-clause
alexvictoor/HdrHistogramJS,HdrHistogram/HdrHistogramJS,HdrHistogram/HdrHistogramJS,HdrHistogram/HdrHistogramJS,alexvictoor/HdrHistogramJS
1f727966e6416ca11789722552f52ee27297c2ab
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }...
'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }...
Remove build as dependency from release task.
chore(gulp): Remove build as dependency from release task.
JavaScript
mit
sebald/guidelines,sebald/guidelines
48017f9a9135b16b47a0404dab9d4e30c19ef4e1
gulpfile.js
gulpfile.js
'use strict'; const gulp = require('gulp'); const tools = require('./src'); const unmockedModulePathPatterns = [ 'node_modules/.*', 'utils/helper-tests.js' ]; tools.setGlobalConfiguration(defaults => { defaults.sourceFiles = defaults.sourceFiles.concat(// eslint-disable-line no-param-reassign '!**/dist/**'...
'use strict'; const gulp = require('gulp'); const tools = require('./src'); const unmockedModulePathPatterns = [ 'node_modules/.*', 'utils/helper-tests.js' ]; tools.setGlobalConfiguration(defaults => { defaults.sourceFiles = defaults.sourceFiles.concat(// eslint-disable-line no-param-reassign '!**/dist/**'...
Increase timeout for mocha tests
Increase timeout for mocha tests
JavaScript
mit
urbanjs/urbanjs-tools,urbanjs/urbanjs-tools,urbanjs/tools,urbanjs/tools,urbanjs/tools,urbanjs/urbanjs-tools
a30c0038343c6ccdfbe78c7e31e787b701b02e0c
gulpfile.js
gulpfile.js
const gulp = require('gulp'); const jasmineNode = require('gulp-jasmine-node'); const livereload = require('gulp-livereload'); // Loads Jasmine Browser gulp.task('test', () => gulp.src('jasmine/spec/*_spec.js').pipe(jasmineNode())); // Loads Jasmine Browser gulp.task('browser', () => gulp.src('index.html').pipe(live...
/* jshint esversion: 6 */ const gulp = require('gulp'); const jasmineNode = require('gulp-jasmine-node'); const livereload = require('gulp-livereload'); // Loads Jasmine Browser gulp.task('test', () => gulp.src('jasmine/spec/*_spec.js').pipe(jasmineNode())); // Loads Jasmine Browser gulp.task('browser', () => gul...
Add jshint esverion: 6 comment
Add jshint esverion: 6 comment
JavaScript
mit
andela-wmaina/inverted-index,andela-wmaina/inverted-index
30f768e24be58b83fed22847bc255dd3aaf68add
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var path = require('path'); var metal = require('gulp-metal'); var runSequence = require('run-sequence'); var codeFileGlobs = [ 'src/**/*.js', 'test/**/*.js', 'gulpfile.js', '!test/**/assets/**/*.js' ]; metal.registerTasks({ corePathFromSoy: function(file) { return pa...
'use strict'; var gulp = require('gulp'); var path = require('path'); var metal = require('gulp-metal'); var runSequence = require('run-sequence'); var codeFileGlobs = [ 'src/**/*.js', 'test/**/*.js', 'gulpfile.js', '!test/**/assets/**/*.js' ]; metal.registerTasks({ corePathFromSoy: function(file) { return pa...
Redefine build:all:js task to skip jquery builds
Redefine build:all:js task to skip jquery builds
JavaScript
bsd-3-clause
travisc5/metal.js,zsagia/metal.js,travisc5/metal.js,mairatma/metal.js,zsagia/metal.js
f8d297353f33accefde38b9100cb877ca680af49
app/scripts/helpers/repository-data-mapper.js
app/scripts/helpers/repository-data-mapper.js
'use babel'; import $ from 'jquery'; import CONFIG from '../constants/AppConstants'; let RepositoryDataMapper = { parse: (data) => { let xml = $($.parseXML(data)); return xml.find('Projects').map(function(){ let el = $(this).find('Project'); let lastBuildStatus = el.attr('lastBuildStatus'); ...
'use babel'; import $ from 'jquery'; import CONFIG from '../constants/AppConstants'; const getClassByBuildStatus = (lastBuildStatus) => { let statusClassname = ''; switch(lastBuildStatus) { case CONFIG.BUILD_STATUS_SUCCESS: statusClassname = CONFIG.CARD_SUCCESS_CLASS; break; case CONFIG.BUILD_...
Add new classes and icons based in cctray response status
Add new classes and icons based in cctray response status
JavaScript
mit
willmendesneto/build-checker-app,willmendesneto/build-checker-app
abc76d852c0ac8bc8e156cedea3b4a44c90e322f
htdocs/components/EG_10_Piechart.js
htdocs/components/EG_10_Piechart.js
Ensembl.Panel.Piechart.prototype.getContent = function() { var panel = this; var visible = []; this.graphData = []; this.graphConfig = {}; this.graphEls = {}; this.dimensions = eval($('input.graph_dimensions', this.el).val()); // ParaSite: sometimes the order of items in the DOM doesn't match th...
Ensembl.Panel.Piechart.prototype.init = function () { var panel = this; this.base(); if (typeof Raphael === 'undefined') { $.getScript('/raphael/raphael-min.js', function () { $.getScript('/raphael/g.raphael-min.js', function () { $.getScript('/raphael/g.pie-modified.js', function () { panel.g...
Use modified version of raphael piechart code
Use modified version of raphael piechart code
JavaScript
apache-2.0
EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite,EnsemblGenomes/eg-web-parasite
3c450f8338cc14f2ecbc1f411f45084b7bbf0b65
webpack.config.js
webpack.config.js
module.exports = { entry: './src/index.js', output: { path: './dist', filename: 'hyperline.js' }, module: { loaders: [ { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { presets: ['es2015'] } } ] } };
module.exports = { entry: './src/index.js', output: { path: './dist', filename: 'hyperline.js', libraryTarget: "commonjs" }, module: { loaders: [ { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { presets: ['es2015'] } ...
Set webpack libraryTarget to commonjs
Set webpack libraryTarget to commonjs
JavaScript
mit
Hyperline/hyperline,edoren/hyperline
7d42f49e80f1abdb8917363835dd9b372f281b0b
webpack.config.js
webpack.config.js
/* eslint-env node */ const isProduction = process.env.NODE_ENV === 'production'; module.exports = { entry: { daypicker: './DayPicker.dist.js', }, output: { path: `${__dirname}/lib`, filename: `[name]${isProduction ? '.min' : ''}.js`, library: 'DayPicker', libraryTarget: 'umd', }, extern...
/* eslint-env node */ const isProduction = process.env.NODE_ENV === 'production'; module.exports = { devtool: 'source-map', entry: { daypicker: './DayPicker.dist.js', }, output: { path: `${__dirname}/lib`, filename: `[name]${isProduction ? '.min' : ''}.js`, library: 'DayPicker', libraryTar...
Add source-map to minified build
Add source-map to minified build
JavaScript
mit
saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker
eb2caed8e729b35d4311c2e80b85b6981bb42f37
webpack.config.js
webpack.config.js
const path = require('path'); module.exports = { devtool: 'cheap-module-eval-source-map', entry: { eventPage: './src/eventPage.js', contentScript: './src/contentScript.jsx', }, output: { path: path.join(__dirname, '/dist'), filename: '[name].bundle.js', }, module: { loaders: [ { ...
const path = require('path'); module.exports = { devtool: 'cheap-module-eval-source-map', entry: { eventPage: './src/eventPage.js', contentScript: './src/contentScript.jsx', }, output: { path: path.join(__dirname, '/dist'), filename: '[name].bundle.js', }, module: { loaders: [ { ...
Enable import of React components without .jsx suffix
Enable import of React components without .jsx suffix
JavaScript
mit
JohnAmadeo/fb-messenger-slackmoji,JohnAmadeo/fb-messenger-slackmoji
0ec06924f2c02763a6e21ca6b0e8e8a45644c0b7
webpack.config.js
webpack.config.js
const path = require('path'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const CompressionPlugin = require('compression-webpack-plugin'); const config = { entry: path.resolve(__dirname, './src/index.js'), output: { path: path.resolve(__dirname, './dist'), filename: 'ap...
const path = require('path'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const config = { entry: path.resolve(__dirname, './src/index.js'), output: { path: path.resolve(__dirname, './dist'), filename: 'app.bundle.js', }, module: { rules: [ {...
Remove devtool in production build
Remove devtool in production build - Reduces bundle size by 90%
JavaScript
mit
arnav-aggarwal/react-boilerplate-setup
17305541fff8cdf2ad709f16ecb6db1dfed325ca
src/hyper-content-for.js
src/hyper-content-for.js
angular.module("hyperContentFor", []) .value("HYPER_CONTENT_FOR_IDS", { }) .directive("hyperContent", function() { return { scope: { "for": "@" }, restrict: "E", transclude: true, controller: function($scope, $transclude, HYPER_CONTENT_FOR_IDS) { HYPER_CONTENT_FOR_IDS[$scope[...
angular.module('hyperContentFor', []) .value('HYPER_CONTENT_FOR_IDS', { }) .directive('hyperContent', function() { return { scope: { 'for': '@' }, restrict: 'E', transclude: true, controller: function($scope, $transclude, HYPER_CONTENT_FOR_IDS) { HYPER_CONTENT_FOR_IDS[$scope[...
Swap out double quotes with single quotes
Swap out double quotes with single quotes
JavaScript
mit
hyperoslo/hyper-content-for-angular,hyperoslo/hyper-content-for-angular
eced298af987ec1bc6e42392f80b9c6afc27e752
slickdeals-dont-track-me.user.js
slickdeals-dont-track-me.user.js
// ==UserScript== // @name Slickdeals Don't Track Me! // @version 1.0 // @description Replaces outgoing Slickdeals tracking links with direct links. // @match http://slickdeals.net/f/* // @namespace https://github.com/gg/slickdeals-dont-track-me // @author Gregg Gajic <https://github.com/gg> // @licen...
// ==UserScript== // @name Slickdeals Don't Track Me! // @version 1.1 // @description Replaces outgoing Slickdeals tracking links with direct links. // @match http://slickdeals.net/f/* // @namespace https://github.com/gg/slickdeals-dont-track-me // @author Gregg Gajic <https://github.com/gg> // @licen...
Add support for forum thread view
Add support for forum thread view
JavaScript
mit
gg/slickdeals-dont-track-me
d855c11a138e15dde2582319c3f8ccc443910f7a
test/PageClick-test.js
test/PageClick-test.js
describe('PageClick', () => { const PageClickInjector = require('inject!../src/PageClick'); let mock, PageClick; beforeEach(() => { mock = jasmine.createSpyObj('mock', ['']); }); beforeEach(() => PageClick = PageClickInjector({ mock })); it('should be ok', () => { expect(PageClick).toBeT...
import React from 'react/addons'; const TestUtils = React.addons.TestUtils; describe('PageClick', () => { const PageClickInjector = require('inject!../src/PageClick'); let mock, PageClick; beforeEach(() => { mock = jasmine.createSpyObj('mock', ['']); }); beforeEach(() => PageClick = PageClickInjecto...
Add tests for document click sub/unsub
Add tests for document click sub/unsub
JavaScript
mit
nkbt/react-page-click
71d93fec3444fc2813df4e93050eb1c5206ec6d9
bin/message.js
bin/message.js
module.exports = (function() { var def = require('./def'); var util = require('./util'); var guard_undef = util.guard_undef; var Message = def.type(function(raw_msg) { guard_undef(raw_msg); this.def_prop('raw', raw_msg); this.def_prop('channel', slack.getChannelGroupOrDMByID(raw_msg.channel)); ...
module.exports = (function() { var def = require('./def'); var util = require('./util'); var guard_undef = util.guard_undef; var Message = def.type(function(client, raw_msg) { guard_undef(raw_msg); this.def_prop('raw', raw_msg); this.def_prop('channel', client.getChannelGroupOrDMByID(raw_msg.chan...
Fix reference to non-existent field. Inject session state into ctor.
Fix reference to non-existent field. Inject session state into ctor.
JavaScript
mit
bassettmb/slack-bot-dev
b5b2d02b60c9db94b4fce6d7839832eb7b6a0356
config/webpack.js
config/webpack.js
const path = require('path'); const options = require('../utils/commandOptions'); module.exports = { commonn: { convertPxToRem: { enable: false, options: { rootValue: 108, // 设计稿为3倍图 propList: ['*', '!border'], unitPrecision: 4, ...
const path = require('path'); const options = require('../utils/commandOptions'); module.exports = { commonn: { convertPxToRem: { enable: false, options: { rootValue: 108, // 设计稿为3倍图 propList: ['*', '!border'], unitPrecision: 4, ...
Solve the default random avatar path problem
fix: Solve the default random avatar path problem
JavaScript
mit
yinxin630/fiora,yinxin630/fiora,yinxin630/fiora
aafe773244155b0630eed62ae72014d8a471b001
template/test/index.js
template/test/index.js
import glob from 'glob'; glob.sync('**/*-test.js', {realpath: true, cwd: __dirname}).forEach(require);
'use strict'; require('react-component-template/test');
Use test runner from react-component-template
Use test runner from react-component-template
JavaScript
mit
nkbt/cf-react-component-template
a49043204b258ae6e04038c69c40a4bb16ca18e8
server/config/routes.js
server/config/routes.js
const userController = require('./users/userController.js'); const listingController = require('./listings/listingController.js'); module.exports = (app, db) => { // Routes for all users app.get('/api/users', userController.getAll); app.post('/api/users', userController.createOne); // Routes for specific use...
const userController = require('./users/userController.js'); const listingController = require('./listings/listingController.js'); module.exports = (app, db, path, rootPath) => { // Routes for all users app.get('/api/users', userController.getAll); app.post('/api/users', userController.createOne); // Routes ...
Add catch-all route to allow page refreshing
Add catch-all route to allow page refreshing
JavaScript
mit
bwuphan/raptor-ads,Darkrender/raptor-ads,bwuphan/raptor-ads,wolnewitz/raptor-ads,Velocies/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads,wolnewitz/raptor-ads
1eb7f32e8bb7097cfca068dda7b339aca4691938
components/message/Message.js
components/message/Message.js
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import { ButtonGroup } from '../button'; import cx from 'classnames'; import theme from './theme.css'; class Message extends PureComponent { static propTypes = { className: PropTypes.string, children: ...
import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import Box from '../box'; import { ButtonGroup } from '../button'; import cx from 'classnames'; import theme from './theme.css'; class Message extends PureComponent { static propTypes = { className: PropTypes.string, children: ...
Drop the wrapper, clone the element and apply the class instead
Drop the wrapper, clone the element and apply the class instead
JavaScript
mit
teamleadercrm/teamleader-ui
190e5fb8e549493841b9bb9ffd7820ddb00e6d85
src/index.js
src/index.js
function FakeStorage() { this.clear(); } FakeStorage.prototype = { key(index) { // sanitise index as int index = parseInt(index); // return early if index isn't a positive number or larger than length if (isNaN(index) || index < 0 || index >= this.length) { return null; } // loop thro...
class FakeStorage { #data = {}; get length() { return Object.keys(this.#data).length; } key(n) { return Object.keys(this.#data)[Number.parseInt(n, 10)] ?? null; } getItem(key) { const _data = this.#data; const _key = `${key}`; return Object.prototype.hasOwnProperty.call(_data, _key) ...
Rewrite using modern JavaScript features
Rewrite using modern JavaScript features
JavaScript
mit
jacobbuck/fake-storage
3ca2c46fef9c7b2339ca8df5e64044736f166ed0
src/index.js
src/index.js
/** * __ _ __ ____ * / / | |/ // __ \ * / / | // / / / * / /___/ |/ /_/ / * /_____/_/|_/_____/ * * @author Alan Doherty (BattleCrate Ltd.) * @license MIT */ // requires var Client = require('./classes/Client'); /** * Creates a new client at the specified host, if none * is provided the ...
/** * __ _ __ ____ * / / | |/ // __ \ * / / | // / / / * / /___/ |/ /_/ / * /_____/_/|_/_____/ * * @author Alan Doherty (BattleCrate Ltd.) * @license MIT */ // requires var Client = require('./classes/Client'); /** * Creates a new client at the specified host, if none * is provided the ...
Change js2doc fields in lxd init function
Change js2doc fields in lxd init function
JavaScript
mit
alandoherty/node-lxd
0c9d564d3733fa5807c36cb992e13026c0ec21c7
src/loading_bar_middleware.js
src/loading_bar_middleware.js
import { showLoading, hideLoading } from './loading_bar_ducks' const defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'] export default function loadingBarMiddleware(config = {}) { const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes return ({ dispatch }) => next => action => { ...
import { showLoading, hideLoading } from './loading_bar_ducks' const defaultTypeSuffixes = ['PENDING', 'FULFILLED', 'REJECTED'] export default function loadingBarMiddleware(config = {}) { const promiseTypeSuffixes = config.promiseTypeSuffixes || defaultTypeSuffixes return ({ dispatch }) => next => action => { ...
Update the way we identify suffixes to be more precise
Update the way we identify suffixes to be more precise
JavaScript
mit
mironov/react-redux-loading-bar
977b87be2bd6d05ee626e09b5ec7faff0edf888b
src/proxy.js
src/proxy.js
var http = require('http'); exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) { var proxy_req = http.createClient(proxy_port, proxy_host).request( client_req.method, client_req.url, client_req.headers); client_req.setEncoding('binary'); proxy_req.setEncoding('binary'); proxy_re...
var http = require('http'); exports.proxy = function(proxy_port, proxy_host, client_req, client_resp) { var proxy_req = http.createClient(proxy_port, proxy_host).request( client_req.method, client_req.url, client_req.headers); client_req.setEncoding('binary'); proxy_req.addListener('response', function (p...
Revert "more encoding settings." because it's stupid.
Revert "more encoding settings." because it's stupid. This reverts commit ccb99882a11a9edd301de8c6e42bf9700e6f8bf5.
JavaScript
apache-2.0
tilgovi/lode,tilgovi/lode
8de119d3bf8d14d30b71efe3af5a1bf41eaca220
src/responseBuilderHandler.js
src/responseBuilderHandler.js
'use strict'; var ResponseBuilder = require('./ResponseBuilder'); module.exports = function(promiseReturningHandlerFn, request, cb, CustomRespBuilderClass) { promiseReturningHandlerFn() .then(function(respBuilder) { // eslint-disable-next-line no-console console.log('completed with %s milli...
'use strict'; var ResponseBuilder = require('./ResponseBuilder'); /** * In our APIs, we often have errors that are several promises deep, and without this, * it's hard to tell where the error actually originated (especially with AWS calls, etc). * This will generally make error stack traces much more helpful to us...
Enable Q's long stack support by default
Enable Q's long stack support by default Since the response builder handler is often one of the first things created in our APIs, it provides a convenient place to enable the long stack support in Q.
JavaScript
mit
silvermine/apigateway-utils
2c3f63b6cc372fac32cc0a917100d381f82743be
ui/js/dashboard/nco.js
ui/js/dashboard/nco.js
'use strict'; module.exports = { template: require('./nco.html'), data: function () { return { region : 12907, campaign: true, // Trick with-indicator into loading without a campaign overview: [{ title : 'Influencer', indicators: [164,165,166,167], chart : 'chart-bar' }, { t...
'use strict'; module.exports = { template: require('./nco.html'), data: function () { return { region : null, campaign: null, overview: [{ title : 'Influencer', indicators: [164,165,166,167], chart : 'chart-bar' }, { title : 'Information Source', indicators: [164,165,...
Set campaign and region to null by default
Set campaign and region to null by default Campaign and region are getting passed down by the dashboard view from the dropdowns, so there is no need to provide defaults in the NCO dashboard component.
JavaScript
agpl-3.0
unicef/polio,unicef/polio,unicef/polio,unicef/polio,unicef/rhizome,SeedScientific/polio,unicef/rhizome,unicef/rhizome,SeedScientific/polio,SeedScientific/polio,SeedScientific/polio,SeedScientific/polio,unicef/rhizome
6972b64ab05f7b66af8e512067a83cba0e0be917
jakefile.js
jakefile.js
/*global desc, task, jake, fail, complete */ (function() { "use strict"; task("default", ["lint"]); desc("Lint everything"); task("lint", [], function() { var lint = require("./build/lint/lint_runner.js"); var files = new jake.FileList(); files.include("**/*.js"); files.exclude("node_modules"); var opt...
/*global desc, task, jake, fail, complete */ (function() { "use strict"; desc("Build and test"); task("default", ["lint"]); desc("Lint everything"); task("lint", [], function() { var lint = require("./build/lint/lint_runner.js"); var files = new jake.FileList(); files.include("**/*.js"); files.exclude("...
Set up continuous integration script
Set up continuous integration script
JavaScript
mit
kyroskoh/lets_code_javascript,kyroskoh/lets_code_javascript,halcwb/lets_code_javascript,halcwb/lets_code_javascript,halcwb/lets_code_javascript,kyroskoh/lets_code_javascript
d5c4e9fe858c226b163114f6d9f5e2636c8a5589
spec/strong-api-spec.js
spec/strong-api-spec.js
describe('strong-api', function(){ var StrongAPI = require('../lib/strong-api'); var api; beforeEach(function () { api = new StrongAPI(); }); it('should translate in the default default locale', function() { expect(api.translate('everything')).toEqual('I am a translated string for locale: en'); ...
describe('strong-api', function(){ var StrongAPI = require('../lib/strong-api'); var api; beforeEach(function () { api = new StrongAPI(); }); it('should translate in the default default locale', function() { expect(api.translate('everything')).toEqual('I am a translated string for locale: en'); ...
Write a failing test to show variable substitution
Write a failing test to show variable substitution I plan to just use sprintf's support for this. http://www.diveintojavascript.com/projects/javascript-sprintf
JavaScript
mit
fs-webdev/strong,timshadel/strong
65942a18a3050a4572a1200bbe69a0d146251c15
test/components/MenuScreen/MenuScreen.spec.js
test/components/MenuScreen/MenuScreen.spec.js
import React from "react"; import ReactTestUtils from "react-addons-test-utils"; import MenuScreen from "src/components/MenuScreen/MenuScreen.js"; describe("MenuScreen", () => { it("should exist", () => { MenuScreen.should.exist; }); it("should be react element", () => { ReactTestUtils.isElement(<Menu...
import React from "react"; import ReactTestUtils from "react-addons-test-utils"; import jsdom from "mocha-jsdom"; import MenuScreen from "src/components/MenuScreen/MenuScreen.js"; import Button from "src/components/Shared/Button.js"; import setCurrentScreenAction from "src/actions/ScreenActions.js"; import { GAME_SCR...
Add tests for menu buttons
Add tests for menu buttons
JavaScript
mit
Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React
fa1180e20689c88f6e5db4023770cb51ba9d3e9a
utils/elementToText.js
utils/elementToText.js
import { isValidElement } from 'react' const whitespacesRe = /\s+/g const _format = (str = '') => str.replace(whitespacesRe, ' ') const elementToTextRec = x => { if (Array.isArray(x)) { return x.map(elementToTextRec).join('') } else if (isValidElement(x)) { return elementToTextRec(x.props.children) } el...
import { isValidElement } from 'react' const whitespacesRe = /\s+/g const _format = (str = '') => str.trim().replace(whitespacesRe, ' ') const elementToTextRec = x => { if (Array.isArray(x)) { return x.map(elementToTextRec).join('') } else if (isValidElement(x)) { return elementToTextRec(x.props.children)...
Move trim into more sensible place
Move trim into more sensible place
JavaScript
mit
styled-components/styled-components-website,styled-components/styled-components-website
a5fd7493788a20e1175d66f23dde1fdde6ff7fd2
src/article/shared/BlockQuoteComponent.js
src/article/shared/BlockQuoteComponent.js
import { NodeComponent } from '../../kit' export default class BlockQuoteComponent extends NodeComponent { render ($$) { let node = this.props.node let el = $$('div') .addClass('sc-block-quote') .attr('data-id', node.id) el.append( this._renderValue($$, 'content').ref('content'), ...
import { NodeComponent } from '../../kit' export default class BlockQuoteComponent extends NodeComponent { render ($$) { let node = this.props.node let el = $$('div') .addClass('sc-block-quote') .attr('data-id', node.id) el.append( this._renderValue($$, 'content', { container: true })....
Make BlockQuote.content editable as container.
Make BlockQuote.content editable as container.
JavaScript
mit
substance/texture,substance/texture
62e6ed3baa6183897b1af121269d1dee9edb2704
js/popup.js
js/popup.js
// Filename: popup.js // Date: July 2017 // Authors: Evgeni Dobranov & Thomas Binu // Purpose: Defines extension UI and functional behavior // Entry point into app functionality function onPopupLoad(){ // Immediately inject script to get page content chrome.tabs.executeScript(null, { file: "js/contentsc...
// Filename: popup.js // Date: July 2017 // Authors: Evgeni Dobranov & Thomas Binu // Purpose: Defines extension UI and functional behavior // Entry point into app functionality function onPopupLoad(){ // Immediately inject script to get page content chrome.tabs.executeScript(null, { file: "js/contentsc...
Update regex that cleans page content
Update regex that cleans page content Regex no longer removes common punctuation. Line breaks are replaced with a space.
JavaScript
apache-2.0
our-sinc-topo/visable-marketplace,our-sinc-topo/visable-marketplace
1a0c26c08f4c61db23fe5ad990b69e1da7579d16
test/transformer.spec.js
test/transformer.spec.js
var tape = require('tape'); tape.test('transformer - should be a function', function (assert) { assert.equals(typeof require('../lib/transformer'), 'function'); assert.end(); }); tape.test('transformer - should return a templating function', function (assert) { assert.equals(typeof require('../lib/transformer')(),...
var tape = require('tape'); tape.test('transformer - should be a function', function (assert) { assert.equals(typeof require('../lib/transformer'), 'function'); assert.end(); }); tape.test('transformer - should return a templating function', function (assert) { assert.equals(typeof require('../lib/transformer')(),...
Add tests for the {index} placeholder
Add tests for the {index} placeholder
JavaScript
mit
nsand/newid
493bfd49c7a7d45bb723a4108889c27afc6bddff
examples/artwork-of-selection.js
examples/artwork-of-selection.js
var iTunes = require('../') , conn = null iTunes.createConnection(onConn); function onConn (err, c) { if (err) throw err; conn = c; conn.selection( onSelection ); } function onSelection (err, selection) { if (err) throw err; if (selection.length > 0) { var track = selection[0]; track.artworks(o...
var iTunes = require('../') , conn = null iTunes.createConnection(onConn); function onConn (err, c) { if (err) throw err; conn = c; conn.selection( onSelection ); } function onSelection (err, selection) { if (err) throw err; if (selection.length > 0) { var track = selection[0]; track.artworks(o...
Add a test case to ensure that the memory leak is fixed.
Add a test case to ensure that the memory leak is fixed.
JavaScript
mit
TooTallNate/node-iTunes,TooTallNate/node-iTunes,TooTallNate/node-iTunes
e204f56c778711d707589a96b0aff021f2efeda3
tickle-frontend/src/errorReporting.js
tickle-frontend/src/errorReporting.js
// This should be the only file aware that we use Opbeat for error reporting. import { opbeatAppId, opbeatOrgId } from './settings' const init = () => { window._opbeat('config', { orgId: opbeatOrgId, appId: opbeatAppId }) } const setExtraContext = (extraContext) => { window._opbeat('setExtraContext', ex...
// This should be the only file aware that we use Opbeat for error reporting. import { opbeatAppId, opbeatOrgId } from './settings' const init = () => { window._opbeat('config', { orgId: opbeatOrgId, appId: opbeatAppId }) } const setExtraContext = (extraContext) => { window._opbeat('setExtraContext', ex...
Use extra context from error object
Use extra context from error object
JavaScript
mit
ovidner/bitket,ovidner/bitket,ovidner/bitket,ovidner/bitket
9d8b30591611a56c2d6410eab501fcdb5997f3c3
test/decoder/decode.js
test/decoder/decode.js
import test from 'ava'; import { decoder } from '../../src'; import base from '../base'; test('should be able to compose decoder functions', t => { t.deepEqual( decoder.decode( [].concat( base.latLngBytes, base.unixtimeBytes, base.uint16Bytes, base.tempBytes, base.ui...
import test from 'ava'; import { decoder } from '../../src'; import base from '../base'; test('should be able to compose decoder functions', t => { t.deepEqual( decoder.decode( [].concat( base.latLngBytes, base.unixtimeBytes, base.uint16Bytes, base.tempBytes, base.ui...
Fix copy-paste typo in unit test.
Fix copy-paste typo in unit test.
JavaScript
mit
thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization,thesolarnomad/lora-serialization
99057f25b5c98fb4ff89090f96dbcb112ab93c86
dropbox_client.js
dropbox_client.js
DropboxOAuth = {}; // Request dropbox credentials for the user // @param options {optional} // @param callback {Function} Callback function to call on // completion. Takes one argument, credentialToken on success, or Error on // error. DropboxOAuth.requestCredential = function (options, callback) { // support bo...
DropboxOAuth = {}; // Request dropbox credentials for the user // @param options {optional} // @param callback {Function} Callback function to call on // completion. Takes one argument, credentialToken on success, or Error on // error. DropboxOAuth.requestCredential = function (options, callback) { // support bo...
Undo code for client logic
Undo code for client logic
JavaScript
mit
gcampax/meteor-dropbox-oauth,gcampax/meteor-dropbox-oauth
f2264fa5eab081f13ba87bf79eae1e1a6c64bf8f
test/sugar_dom_test.js
test/sugar_dom_test.js
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/ /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ (function(el, document) { test('is awesome', 1, function() { ...
/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/ /*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/ /*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/ (function(el, document) { test('creating plain DOM elements', ...
Add more basic tests for creating elements
Add more basic tests for creating elements
JavaScript
mit
webmat/sugar_dom
5c67a13bd8167183720cb8d39ff9e5630d8398e3
src/js/api.js
src/js/api.js
import ApiEvents from './events/ApiEvents'; import { firebaseRef } from './appconfig'; var ref = firebaseRef.child('notes'); var API = { start() { ref.on('child_added', (snapshot) => { var noteName = snapshot.key(); var note = snapshot.val(); ApiEvents.noteAdded(noteName, note); }); r...
import ApiEvents from './events/ApiEvents'; import { firebaseRef } from './appconfig'; var noteRef = firebaseRef.child('notes'); var API = { start() { noteRef.on('child_added', (snapshot) => { var noteName = snapshot.key(); var note = snapshot.val(); ApiEvents.noteAdded(noteName, note); })...
Rename ref to noteRef in API
Rename ref to noteRef in API Will need ref to ref the base ref.
JavaScript
mit
kentor/notejs-react,kentor/notejs-react,kentor/notejs-react
a012312485095fd894806b4070164f859bcab523
minechat.js
minechat.js
var readline = require('readline'); var mineflayer = require('mineflayer'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false }); var bot = mineflayer.createBot({ host: "hostname", username: "user@email.com", password: "password" }); rl.on('line', function(lin...
var readline = require('readline'); var mineflayer = require('mineflayer'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false }); function print_help() { console.log("usage: node minechat.js <hostname> <user> <password>"); } if (process.argv.length < 5) { console....
Read host, user and passwd from arglist
Read host, user and passwd from arglist
JavaScript
mit
ut7/minechat,llbit/minechat
dbd02d4ae342e0b5797dc2cd4b7092daf20a1e73
js/select_place.js
js/select_place.js
var Place = {}; $(document).on('pageshow', '#select-place', function() { $('#select-place-map').css('height', 500); utils.getCurrentLocation().done(function(location) { Place.map = Map.createMap('select-place-map', location.latitude, location.longitude, 12); Place.currentLocation = Map.createMarker(Pl...
var Place = {}; $(document).on('pageshow', '#select-place', function() { $('#select-place-map').css('height', 450); var pos = Map.map.getCenter(); Place.map = Map.createMap('select-place-map', pos.lat(), pos.lng(), 8); // kutc Place.currentLocation = Map.createMarker(Place.map, 'Current Location', ...
Set select place marker latlng based on main map center latlng
Set select place marker latlng based on main map center latlng
JavaScript
mit
otknoy/michishiki
d0cf2ffa9ed5613bd6bb34c7cd6049d8b6304b27
test/cypress/plugins/index.js
test/cypress/plugins/index.js
/* eslint-disable */ require('dotenv').config() module.exports = (on, config) => { if (config.testingType === 'component') { require('@cypress/react/plugins/load-webpack')(on, config, {webpackFilename: './webpack.config.js'}) return config } require('@cypress/code-coverage/task')(on, config) on('file:...
/* eslint-disable */ require('dotenv').config() module.exports = (on, config) => { if (config.testingType === 'component') { require('@cypress/react/plugins/load-webpack')(on, config, { webpackFilename: './webpack.config.js' }) return config } require('@cypress/code-coverage/task')(on, config) on('fil...
Fix formatting in plugins file
Fix formatting in plugins file
JavaScript
mit
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
762e01365545b5eb2638fbe8efd9753fef907d92
app.js
app.js
function Dialogue(title,contents,buttons) { var Title; var Contents; var Buttons; /** Setters */ function SetTitle(){ } function SetButtons(){ } function SetContents(){ } function SetID(){ } /** Getters */ function GetTitle(){ } function GetButtons...
function App(){ return { assert: function(a, b, message) { if (a !== b) { throw message || "Assertion Failed"; } } } } function Dialogue(title,contents,buttons){ var Title; var Contents; var Buttons; var ID; var app = new App(); ...
Add assert as part of App();
Add assert as part of App();
JavaScript
mit
lgoldstien/legacy.JS
69100f5362709045ef496caad23a464921dc63ba
frontend/app/base/directives/editable_link.js
frontend/app/base/directives/editable_link.js
angular.module('app.directives').directive('editableLink', editableLink); function editableLink() { return { restrict: 'E', scope: { viewModel: '=', type: '@', field: '@', object: '=?', socialMediaName: '@?', }, templateUrl...
angular.module('app.directives').directive('editableLink', editableLink); function editableLink() { return { restrict: 'E', scope: { viewModel: '=', type: '@', field: '@', object: '=?', socialMediaName: '@?', }, templateUrl...
Allow clearing of social media fields with inline editing
LILY-2266: Allow clearing of social media fields with inline editing
JavaScript
agpl-3.0
HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily
120096cd116a7dcd910ea5d887a6e969b206b53d
controller.js
controller.js
'use strict'; const Foxx = require('org/arangodb/foxx'); const schema = require('./schema'); const graphql = require('graphql-sync').graphql; const ctrl = new Foxx.Controller(applicationContext); // This is a regular Foxx HTTP API endpoint. ctrl.post('/graphql', function (req, res) { // By just passing the raw body...
'use strict'; const Foxx = require('org/arangodb/foxx'); const schema = require('./schema'); const graphql = require('graphql-sync').graphql; const formatError = require('graphql-sync').formatError; const ctrl = new Foxx.Controller(applicationContext); // This is a regular Foxx HTTP API endpoint. ctrl.post('/graphql'...
Use formatError to expose errors
Use formatError to expose errors
JavaScript
apache-2.0
arangodb-foxx/demo-graphql
26b3b8c32d8fd9a51e374f4cdd278a5fcec92daf
project/static/js/authors/friend-requests.js
project/static/js/authors/friend-requests.js
$(function() { var $friend_request_button = $("#send-friend-request-button"); var $friend_request_sent_message = $("#friend-request-sent-message"); $friend_request_button.on('click', function () { var $that = $(this); $.post($that.data('url'), function () { $that.hide(); ...
$(function() { var $friend_request_button = $("#send-friend-request-button"); var $friend_request_sent_message = $("#friend-request-sent-message"); var $follow_button = $("#follow-button"); var $unfollow_button = $("#unfollow-button"); $friend_request_button.on('click', function () { var $t...
Update UI to represent that author is also followed when you send a friend request
Update UI to represent that author is also followed when you send a friend request
JavaScript
apache-2.0
TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution
0fb6b78a3f59152405c0f6e5a81adcd939c1fc01
src/commands/tick-rm.js
src/commands/tick-rm.js
export default rm import Entry from '../entry' import PouchDB from 'pouchdb' import {write} from './output' import chalk from 'chalk' import conf from '../config' let db = new PouchDB(conf.db) function rm (yargs) { let argv = yargs .usage('tick rm entryid') .argv db.get(argv._[1]) .then(removeEntry) }...
export default rm import Entry from '../entry' import PouchDB from 'pouchdb' import {write} from './output' import chalk from 'chalk' import conf from '../config' let db = new PouchDB(conf.db) function rm (yargs) { let argv = yargs .usage('Usage: tick rm [options] <entryid ...>') .help('h') .alias('h', 'help...
Clean up tick rm usage and add help
Clean up tick rm usage and add help
JavaScript
agpl-3.0
jonotron/tickbin,tickbin/tickbin,chadfawcett/tickbin
c02374368a35d3780d67d88c79e8bfef139fae80
ckeditor/static/ckeditor/ckeditor/config.js
ckeditor/static/ckeditor/ckeditor/config.js
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6...
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.editorConfig = function( config ) { // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6...
Disable the SCAYT and context menu CKEditor plugins so we can use the native browser / OS spell-checker instead.
Disable the SCAYT and context menu CKEditor plugins so we can use the native browser / OS spell-checker instead.
JavaScript
bsd-3-clause
ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor,ZG-Tennis/django-ckeditor
623b9508b89f243f7f0652d01cf18f79c7604405
snippets/base/static/js/templateChooserWidget.js
snippets/base/static/js/templateChooserWidget.js
;$(function() { 'use strict'; if ($('.inline-template').length > 1) { $('.inline-template').hide(); $('#id_template_chooser').change(function() { let template = $(this).val(); $('.inline-template').hide(); if (template) { $inline = $('.' + tem...
;$(function() { 'use strict'; function showTemplate() { let value = $('#id_template_chooser').val(); if (value) { $('.inline-template').hide(); $('.' + value).show(); } } if ($('.inline-template').length > 1) { $('.inline-template').hide(); ...
Fix template chooser on save error.
Fix template chooser on save error.
JavaScript
mpl-2.0
glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service,mozmar/snippets-service,mozilla/snippets-service,mozmar/snippets-service,glogiotatidis/snippets-service,mozmar/snippets-service,mozilla/snippets-service,glogiotatidis/snippets-service,mozilla/snippets-service,glogiotatidis/snippets-service
b1416f9fabc1a6c17436eb443050ec8e997abc1a
app/js/arethusa.core/arethusa_local_storage.js
app/js/arethusa.core/arethusa_local_storage.js
"use strict"; /** * @ngdoc service * @name arethusa.core.arethusaLocalStorage * * @description * Arethusa's API to communicate with `localStorage`. All values stored are * prefixed with `arethusa.`. * * Performs type coercion upon retrieval for Booleans, so that `true`, `false` * and `null` can be used proper...
"use strict"; /** * @ngdoc service * @name arethusa.core.arethusaLocalStorage * * @description * Arethusa's API to communicate with `localStorage`. All values stored are * prefixed with `arethusa.`. * * Performs type coercion upon retrieval for Booleans, so that `true`, `false` * and `null` can be used proper...
Add delegator for keys() in arethusaLocalStorage
Add delegator for keys() in arethusaLocalStorage
JavaScript
mit
Masoumeh/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa
8d479ed64e6e21445cfa8e5c60f46605bd8eea5a
lib/components/completeBlock/completeBlock.js
lib/components/completeBlock/completeBlock.js
import CompleteBlock from './completeBlock.html'; import './completeBlock.scss'; class CompleteBlock { static detailsComponent() { return { templateUrl: CompleteBlock, bindings: { headerImg: '@', headerTitle: '@', headerPicto: '@', headerColor: '@', headerBackgroundColor: '@', bodyBack...
import TemplateCompleteBlock from './completeBlock.html'; import './completeBlock.scss'; class CompleteBlock { static detailsComponent() { return { templateUrl: TemplateCompleteBlock, bindings: { headerImg: '@', headerTitle: '@', headerPicto: '@', headerColor: '@', headerBackgroundColor: '...
Rename variable because the template and the class has the same name
fix: Rename variable because the template and the class has the same name
JavaScript
mit
kevincaradant/web-template-webpack,kevincaradant/web-template-webpack
efbef4f393cd571b593b5aafb7cd3465f1102e62
src/components/utils.js
src/components/utils.js
export function asyncHandler(handler) { return function(req, res, next) { if (!handler) { throw new Error(`Invalid handler ${handler}, it must be a function.`); } handler(req, res, next) .then(function(response) { if (response) { res.send(response); } }) ...
export function asyncHandler(handler) { return function(req, res, next) { if (!handler) { throw new Error(`Invalid handler ${handler}, it must be a function.`); } handler(req, res, next) .then(function(response) { if (response) { res.send(response); } }) ...
Fix incorrect extraction of error code
Fix incorrect extraction of error code
JavaScript
mit
arkakkar/electron-update-api,TakeN0/squirrel-updates-server,Aluxian/squirrel-updates-server
a1e25a3e10cc2ce7cbf9c07284981cd2cc5b85eb
app/assets/javascripts/application.js
app/assets/javascripts/application.js
//= require jquery //= require jquery_ujs //= require jquery.remotipart //= require select2 //= require cocoon //= require dropzone //= require govuk/selection-buttons //= require moj //= require modules/moj.cookie-message.js //= require_tree . (function () { 'use strict'; delete moj.Modules.devs; $('#fixed-fee...
//= require jquery //= require jquery_ujs //= require jquery.remotipart //= require select2 //= require cocoon //= require dropzone //= require vendor/polyfills/bind //= require govuk/selection-buttons //= require moj //= require modules/moj.cookie-message.js //= require_tree . (function () { 'use strict'; delete ...
Fix issue with PhantomJS and Function.prototype.bind support
Fix issue with PhantomJS and Function.prototype.bind support
JavaScript
mit
ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments
97b56dd8f09dbc18f4c57652fd665f325aec6bcb
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Remove require_self and back to require ./wookmark...
Remove require_self and back to require ./wookmark...
JavaScript
mit
ninabreznik/RefugeesWork,ninabreznik/RefugeesWork,ninabreznik/RefugeesWork
15732c641dfbd0d814dff0bb6cfdc9c0d4293d2a
app/assets/javascripts/application.js
app/assets/javascripts/application.js
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative pat...
Remove loading of scrollify, not using
Remove loading of scrollify, not using
JavaScript
mit
fma2/cfe-money,fma2/cfe-money,fma2/cfe-money
650f4373a69a4af57def67ce53356ef8093e603b
test/specs/component/TextSpec.js
test/specs/component/TextSpec.js
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={200}>This is really...
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={300} style={{ fontF...
Set fontFamily on <Text> tests to guarantee consistent regardless of environment (hopefully fix failures in CI)
Set fontFamily on <Text> tests to guarantee consistent regardless of environment (hopefully fix failures in CI)
JavaScript
mit
recharts/recharts,sdoomz/recharts,recharts/recharts,sdoomz/recharts,thoqbk/recharts,thoqbk/recharts,sdoomz/recharts,recharts/recharts,recharts/recharts,thoqbk/recharts
dbe6cea973ff30b9b5ca61f09b34b61b8cf5295d
src/elements/element.js
src/elements/element.js
import TYPES from 'types'; function isMember(element) { if (element.element) { return element.element === TYPES.MEMBER; } return element === TYPES.MEMBER; } function getValueType({element, content}) { if (isMember(element)) { return content.value.element; } return element; } function getType(el...
import TYPES from 'types'; function isMember(element) { if (element.element) { return element.element === TYPES.MEMBER; } return element === TYPES.MEMBER; } function getValueType({element, content}) { if (isMember(element)) { return content.value.element; } return element; } function getType(el...
Remove the ‘isNestedObject’ helper, no longer used.
Element: Remove the ‘isNestedObject’ helper, no longer used.
JavaScript
mit
apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit
4ffa7245d7f0cb5e053ff3219d8b586c62938819
src/js/pebble-js-app.js
src/js/pebble-js-app.js
var initialized = false; var options = {}; Pebble.addEventListener("ready", function() { console.log("ready called!"); initialized = true; }); Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); Pebble.openURL('http://assets.getpebble.com.s3-website-us-east-1.amazon...
var initialized = false; var options = {}; Pebble.addEventListener("ready", function() { console.log("ready called!"); initialized = true; }); Pebble.addEventListener("showConfiguration", function() { console.log("showing configuration"); Pebble.openURL('http://assets.getpebble.com.s3-website-us-east-1.amazon...
Improve robustness of cancellation detection.
Improve robustness of cancellation detection.
JavaScript
mit
pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo,pebble-hacks/js-configure-demo