commit
stringlengths
40
40
old_file
stringlengths
4
150
new_file
stringlengths
4
150
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
501
message
stringlengths
15
4.06k
lang
stringclasses
4 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
diff
stringlengths
0
4.35k
97e271d4db24cbc89d367d19c6a65ae402972c8e
lib/commands/search.js
lib/commands/search.js
'use strict'; var _ = require('lodash'); var fs = require('fs'); var path = require('path'); var api = require('../api'); function arrayToQueryString(args) { var searchString = '?q=' + args._.join('+'); if (args.user) { searchString = searchString.concat('+user:' + args.user); } if (args.language) { s...
'use strict'; var _ = require('lodash'); var fs = require('fs'); var path = require('path'); var api = require('../api'); function queryStringFromArgs(args) { var searchString = '?q=' + args._.join('+'); if (args.user) { searchString = searchString.concat('+user:' + args.user); } if (args.language) { ...
Rename function for generating query string.
Rename function for generating query string.
JavaScript
mit
stillesjo/buh
--- +++ @@ -5,7 +5,7 @@ var path = require('path'); var api = require('../api'); -function arrayToQueryString(args) { +function queryStringFromArgs(args) { var searchString = '?q=' + args._.join('+'); if (args.user) { searchString = searchString.concat('+user:' + args.user); @@ -17,7 +17,7 @@ } fun...
843c48748261d44331f81ac915621766ce5ca0b6
test/index.js
test/index.js
'use strict'; var angular = require('angular'); var expect = require('chai').use(require('sinon-chai')).expect; var sinon = require('sinon'); var sap = require('sinon-as-promised'); describe('animate-change', function () { var $scope, $animate, element; beforeEach(angular.mock.module(require('../'))); b...
'use strict'; var angular = require('angular'); var expect = require('chai').use(require('sinon-chai')).expect; var sinon = require('sinon'); var sap = require('sinon-as-promised'); describe('animate-change', function () { var $scope, $animate, element; beforeEach(angular.mock.module(require('../'))); b...
Update tests for using element.removeClass instead of $animate
Update tests for using element.removeClass instead of $animate
JavaScript
mit
bendrucker/angular-animate-change,bendrucker/angular-animate-change
--- +++ @@ -20,16 +20,16 @@ $scope.$evalAsync(fn); }); $animate.addClass = sinon.stub().resolves(); - $animate.removeClass = sinon.stub().resolves(); element = $compile('<span animate-change="foo" change-class="on"></span>')($scope); })); - it('adds the animation class when the model ch...
56d7dc2661360d21325ac94338556036c774eb1a
test/model.js
test/model.js
var async = require("async"); var bay6 = require("../lib/"); var expect = require("chai").expect; var mongoose = require("mongoose"); var request = require("supertest"); describe("Model", function() { var app; var model; beforeEach(function() { app = bay6(); app.options.prefix = ""; model = app.mode...
var async = require("async"); var bay6 = require("../lib/"); var expect = require("chai").expect; var mongoose = require("mongoose"); var request = require("supertest"); describe("Model", function() { var app; var model; beforeEach(function() { app = bay6(); app.options.prefix = ""; model = app.mode...
Remove mongoose debug mode from test
Remove mongoose debug mode from test Signed-off-by: Ian Macalinao <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@ian.pw>
JavaScript
mit
simplyianm/bay6
--- +++ @@ -15,7 +15,6 @@ title: String, contents: String }); - mongoose.set("debug", true); }); describe("#limit", function() {
ce8df49212f484ef04b03225b02db5f519b12113
lib/display-message.js
lib/display-message.js
const $ = require('jquery'); function DisplayMessage(){ } DisplayMessage.prototype.showWinMessage = function(){ var div = $('#post-game'); div.empty() .show() .append(`<h1>You Win!</h1> <p>Click to play the next level.</p>` ); div.on('click', function(){ div.hide(); })...
const $ = require('jquery'); function DisplayMessage(){ } DisplayMessage.prototype.showWinMessage = function(){ var div = $('#post-game'); div.empty() .show() .append(`<h1>You Win!</h1> <p>Click to play the next level.</p>` ); div.on('click', function(){ div.hide(); })...
Remove event listener in game win to avoid multiplication
Remove event listener in game win to avoid multiplication
JavaScript
mit
plato721/lights-out,plato721/lights-out
--- +++ @@ -23,10 +23,9 @@ .append(`<h1>High Score!</h1> <p>Name:</p> <input class='input'></input> - <button>Submit</button>` + <button id="high-submit-button">Submit</button>` ); - - div.on('click', 'button', function(){ + div.unbind('clic...
1f59f1a7b1a1a5a3346c3f607a20309d332fd3ac
lib/helpers/helpers.js
lib/helpers/helpers.js
'use strict'; function Helpers() { } Helpers.prototype = { getClassesFromSelector: function (selector) { if (!selector) { return []; } var classRegEx = /[_a-zA-Z\*][_a-zA-Z0-9-]*/g; return selector.match(classRegEx); }, getSelectorLength: function (selector) { ...
'use strict'; function Helpers() { } Helpers.prototype = { getClassesFromSelector: function (selector) { if (!selector) { return []; } var classRegEx = /[_a-zA-Z][_a-zA-Z0-9-]*/g; return selector.match(classRegEx); }, getSelectorLength: function (selector) { ...
Revert "support * selectors", it appears this bug was already fixed but not released
Revert "support * selectors", it appears this bug was already fixed but not released
JavaScript
mit
timeinfeldt/grunt-csschecker,timeinfeldt/grunt-csschecker
--- +++ @@ -8,7 +8,7 @@ if (!selector) { return []; } - var classRegEx = /[_a-zA-Z\*][_a-zA-Z0-9-]*/g; + var classRegEx = /[_a-zA-Z][_a-zA-Z0-9-]*/g; return selector.match(classRegEx); }, getSelectorLength: function (selector) {
3916cb06b6c1d8694eceb25534e67bcd2830ebb2
app.js
app.js
var express = require('express'), schedule = require('node-schedule'), cacheService = require('./cache-service.js')(), app = express(), dataCache = { news: null, weather: null }; setUpSchedule(); app.get('/', function (req, res) { res.send('Welcome to Scraper API\n'); }); //n...
var express = require('express'), schedule = require('node-schedule'), cacheService = require('./cache-service.js')(), app = express(), dataCache = { news: null, weather: null }; setUpSchedule(); app.get('/', function (req, res) { res.send('Welcome to Scraper API\n' + 'Server ...
Add log of server time
Add log of server time
JavaScript
mit
AlexanderAntov/scraper-js,AlexanderAntov/scraper-js
--- +++ @@ -10,7 +10,7 @@ setUpSchedule(); app.get('/', function (req, res) { - res.send('Welcome to Scraper API\n'); + res.send('Welcome to Scraper API\n' + 'Server time: ' + new Date().toString()); }); //news
78826dbdb3e81b084918f550c34527652f8d5de7
examples/cli.js
examples/cli.js
#!/usr/bin/node var convert = require('../'), fs = require('fs'), geojson = JSON.parse(fs.readFileSync(process.argv[2])), mtl = process.argv[3], mtllibs = process.argv.slice(4), options = { coordToPoint: convert.findLocalProj(geojson), mtllib: mtllibs }; if (mtl) { options....
#!/usr/bin/node var convert = require('../'), localProj = require('local-proj'), fs = require('fs'), geojson = JSON.parse(fs.readFileSync(process.argv[2])), mtl = process.argv[3], mtllibs = process.argv.slice(4), options = { coordToPoint: localProj.find(geojson).forward, mtllib:...
Update to async; fix problem with missing findLocalProj
Update to async; fix problem with missing findLocalProj
JavaScript
isc
perliedman/geojson2obj
--- +++ @@ -1,19 +1,24 @@ #!/usr/bin/node var convert = require('../'), + localProj = require('local-proj'), fs = require('fs'), geojson = JSON.parse(fs.readFileSync(process.argv[2])), mtl = process.argv[3], mtllibs = process.argv.slice(4), options = { - coordToPoint: convert.fi...
18957b36ddcd96b41c8897542609c53c166052c3
config/initializers/middleware.js
config/initializers/middleware.js
express = require('express') expressValidator = require('express-validator') module.exports = (function(){ function configure(app) { app.set('port', process.env.PORT || 3000); app.set('host', process.env.HOST || '127.0.0.1') app.use(express.static(__dirname + '/public')); app.use(express.bodyParser()...
express = require('express') expressValidator = require('express-validator') module.exports = (function(){ function configure(app) { app.set('port', process.env.PORT || 3000); app.set('host', process.env.HOST || '127.0.0.1') app.use(express.static(__dirname + '/public')); app.use(function(req,res,nex...
Add access control allow origin middlewar
[FEATURE] Add access control allow origin middlewar
JavaScript
isc
zealord/gatewayd,crazyquark/gatewayd,xdv/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd,zealord/gatewayd
--- +++ @@ -6,6 +6,10 @@ app.set('port', process.env.PORT || 3000); app.set('host', process.env.HOST || '127.0.0.1') app.use(express.static(__dirname + '/public')); + app.use(function(req,res,next) { + res.header("Access-Control-Allow-Origin", "*"); + res.header("Access-Control-Allow-Heade...
5762d478a22bb76807e3b92a3b881c42686b3b69
lib/replace-prelude.js
lib/replace-prelude.js
'use strict'; var bpack = require('browser-pack'); var fs = require('fs'); var path = require('path'); var xtend = require('xtend'); var preludePath = path.join(__dirname, 'prelude.js'); var prelude = fs.readFileSync(preludePath, 'utf8'); // This plugin replaces the prelude and adds a transform var plugin = exports....
'use strict'; var bpack = require('browser-pack'); var fs = require('fs'); var path = require('path'); var xtend = require('xtend'); var preludePath = path.join(__dirname, 'prelude.js'); var prelude = fs.readFileSync(preludePath, 'utf8'); // This plugin replaces the prelude and adds a transform var plugin = exports....
Copy `hasExports` setting from bpack when bundle is reset
Copy `hasExports` setting from bpack when bundle is reset Browserify copies this setting manually in b.reset: https://github.com/substack/node-browserify/blob/a18657c6f363272ce3c7722528c8ec5f325d0eaf/index.js#L732 Since we replace the bpack instance the `hasExports` value has to be manually copied from the default b...
JavaScript
mit
royriojas/browsyquire,royriojas/proxyquireify,royriojas/browsyquire,royriojas/proxyquireify,thlorenz/proxyquireify
--- +++ @@ -18,7 +18,7 @@ }; // browserify sets "hasExports" directly on bfy._bpack - bfy._bpack = bpack(xtend(bfy._options, packOpts)); + bfy._bpack = bpack(xtend(bfy._options, packOpts, {hasExports: bfy._bpack.hasExports})); // Replace the 'pack' pipeline step with the new browser-pack instan...
10f4293f4ac9ec29d80ddcaaae9cf31f1b054fed
tests/test-load-ok.js
tests/test-load-ok.js
/** * Jasmine test to check success callback */ describe('stan-loader-ok', function() { // Declare status var var status; // Activate async beforeEach(function(done) { // Initiate $STAN loader using normal window load events $STAN_Load([ '//code.jquery.com/jquery-1.10.1.min.js', '//netdna.bootstrapcd...
/** * Jasmine test to check success callback */ describe('stan-loader-ok', function() { // Declare status var var status; // Activate async beforeEach(function(done) { // Initiate $STAN loader using normal window load events $STAN_Load([ '//code.jquery.com/jquery-1.11.2.min.js', '//netdna.bootstrapcd...
Update jQuery and BS to latest version for tests
Update jQuery and BS to latest version for tests
JavaScript
apache-2.0
awomersley/stan-loader,awomersley/stan-loader
--- +++ @@ -11,8 +11,8 @@ // Initiate $STAN loader using normal window load events $STAN_Load([ - '//code.jquery.com/jquery-1.10.1.min.js', - '//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js' + '//code.jquery.com/jquery-1.11.2.min.js', + '//netdna.bootstrapcdn.com/bootstrap/3.3.2/js/boot...
b1aaf8485740f65770acb7b9a20ca9e35c37b9ad
lib/htmlfile.js
lib/htmlfile.js
module.exports = HtmlFile; function HtmlFile(path) { this.path = path; } HtmlFile.prototype.querySelectorAll = function(ph, style, cb) { var _this = this; return new Promise(function(resolve) { ph.createPage(function(page) { page.open(_this.path, function() { page.evaluate((function() { ...
module.exports = HtmlFile; function HtmlFile(path) { this.path = path; } HtmlFile.prototype.querySelectorAll = function(ph, style, cb) { var _this = this; return new Promise(function(resolve) { ph.createPage(function(page) { page.open(_this.path, function() { var func = 'function() { return do...
Fix "Wrap only the function expression in parens"
Fix "Wrap only the function expression in parens"
JavaScript
mit
sinsoku/clairvoyance,sinsoku/clairvoyance
--- +++ @@ -9,9 +9,8 @@ return new Promise(function(resolve) { ph.createPage(function(page) { page.open(_this.path, function() { - page.evaluate((function() { - return 'function() { return document.querySelectorAll("' + style + '"); }'; - }()), function(value) { + var func...
41de713c677477bae0548bd9b17c5edb100bc53b
aura-components/src/main/components/ui/abstractList/abstractListRenderer.js
aura-components/src/main/components/ui/abstractList/abstractListRenderer.js
/* * Copyright (C) 2013 salesforce.com, inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
/* * Copyright (C) 2013 salesforce.com, inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
Revert "Make renderer polymorphically call updateEmptyListContent"
Revert "Make renderer polymorphically call updateEmptyListContent" This reverts commit ff82e198ca173fdbb5837982c3795af1dec3a15d.
JavaScript
apache-2.0
forcedotcom/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,madmax983/aura,forcedotcom/aura,forcedotcom/aura,madmax983/aura,madmax983/aura
--- +++ @@ -25,11 +25,10 @@ this.superAfterRender(); helper.updateEmptyListContent(component); }, - rerender : function(component){ + rerender : function(component, helper){ this.superRerender(); - var concreteCmp = component.getConcreteComponent(); - if (concreteCm...
ce52b37873c55045b97c4288e9d6b8dfdd3a03f8
test/testCacheAllTheThings.js
test/testCacheAllTheThings.js
var Assert = require('assert'); var CacheAllTheThings = require('../'); describe('CacheAllTheThings', function() { it('When asked to boot a Redis instance, it should do so', function() { var inst = new CacheAllTheThings('redis'); Assert(inst.name, 'RedisCache'); }); });
var Assert = require('assert'); var CacheAllTheThings = require('../'); describe('CacheAllTheThings', function() { it('When asked to boot a Redis instance, it should do so', function() { var inst = new CacheAllTheThings('redis'); Assert(inst.name, 'RedisCache'); }); describe('Redis', functio...
Add more tests to set and get values from Redis
Add more tests to set and get values from Redis
JavaScript
mit
andrewhathaway/CacheAllTheThings,andrewhathaway/CacheAllTheThings
--- +++ @@ -8,4 +8,47 @@ Assert(inst.name, 'RedisCache'); }); + describe('Redis', function() { + + it('Should set a key', function(done) { + var redisInst = new CacheAllTheThings('redis'); + + redisInst + .set('lol', 'hai') + .then(function(e) { + Assert.equal(e, null); ...
687b8066a908dc6a9bbd4c184e143981dec5493a
src/features/header/header-main/styled-components/Wrapper.js
src/features/header/header-main/styled-components/Wrapper.js
//@flow import styled, { css } from "styled-components"; export const Wrapper = styled.div` ${({ theme }: { theme: Theme }) => css` box-sizing: border-box; position: relative; width: 100%; background-color: ${theme.color.background}; padding-top: ${theme.scale.s4(-1)}; @media (min-width: ...
//@flow import styled, { css } from "styled-components"; export const Wrapper = styled.div` ${({ theme }: { theme: Theme }) => css` box-sizing: border-box; position: relative; width: 100%; background-color: ${theme.color.background}; `} `;
Remove media query that accounds for status bar
Remove media query that accounds for status bar Testing if the necessary space will be added by the mobile browser automatically TODO: verify no additional padding required.
JavaScript
mit
slightly-askew/portfolio-2017,slightly-askew/portfolio-2017
--- +++ @@ -10,10 +10,6 @@ position: relative; width: 100%; background-color: ${theme.color.background}; - padding-top: ${theme.scale.s4(-1)}; - - @media (min-width: 675px) { - padding-top: 0; - } + `} `;
4b14f7745c20c489cb8ee554ee98fbcde2058832
backend/servers/mcapid/initializers/api.js
backend/servers/mcapid/initializers/api.js
const {Initializer, api} = require('actionhero'); const r = require('@lib/r'); module.exports = class ApiInitializer extends Initializer { constructor() { super(); this.name = 'api-initializer'; } initialize() { api.mc = { r: r, directories: require('@dal/di...
const {Initializer, api} = require('actionhero'); const r = require('@lib/r'); module.exports = class ApiInitializer extends Initializer { constructor() { super(); this.name = 'api-initializer'; } initialize() { api.mc = { r: r, directories: require('@dal/di...
Add log shortcuts instead of having to specify the log level if a parameter is added
Add log shortcuts instead of having to specify the log level if a parameter is added
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -19,6 +19,16 @@ samples: require('@dal/samples')(r), templates: require('@dal/templates')(r), files: require('@dal/files')(r), + log: { + debug: (msg, params) => api.log(msg, 'debug', params), + info: (msg, params) => api.log(m...
7af9ca83021937683ab538c355b1e6a1a2c8cd8d
src/renderer/scr.state.js
src/renderer/scr.state.js
var STATE = (function(){ var FILE; var MSGS; var selectedChannel; return { uploadFile: function(file){ FILE = file; MSGS = null; }, getChannelList: function(){ var channels = FILE.getChannels(); return Object.keys(channels).map(key => ({ // reserve.txt ...
var STATE = (function(){ var FILE; var MSGS; var selectedChannel; return { uploadFile: function(file){ FILE = file; MSGS = null; }, getChannelList: function(){ var channels = FILE.getChannels(); return Object.keys(channels).map(key => ({ // reserve.txt ...
Fix message sorting in renderer having issues with varying message key lengths
Fix message sorting in renderer having issues with varying message key lengths
JavaScript
mit
chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker,chylex/Discord-History-Tracker
--- +++ @@ -31,7 +31,15 @@ selectChannel: function(channel){ selectedChannel = channel; - MSGS = Object.keys(FILE.getMessages(channel)).sort(); + + MSGS = Object.keys(FILE.getMessages(channel)).sort((key1, key2) => { + if (key1.length === key2.length){ + return key1 >...
f9de0a7b6535fe2a3129db0a886f6f9cae8d2930
tools/tests/dynamic-import.js
tools/tests/dynamic-import.js
var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; selftest.define("dynamic import(...) in development", function () { const s = new Sandbox(); s.createApp("dynamic-import-test-app-devel", "dynamic-import"); s.cd("dynamic-import-test-app-devel", run.bind(s, false)); }); selft...
var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; selftest.define("dynamic import(...) in development", function () { const s = new Sandbox(); s.createApp("dynamic-import-test-app-devel", "dynamic-import"); s.cd("dynamic-import-test-app-devel", run.bind(s, false)); }); selft...
Use NODE_ENV (with --production) to run production import(...) tests.
Use NODE_ENV (with --production) to run production import(...) tests.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
--- +++ @@ -13,7 +13,7 @@ s.cd("dynamic-import-test-app-prod", run.bind(s, true)); }); -function run(prod) { +function run(isProduction) { const sandbox = this; const args = [ "test", @@ -22,8 +22,11 @@ "--driver-package", "dispatch:mocha-phantomjs" ]; - if (prod) { + if (isProduction) { ...
ceb264e849abfddfb250de15c78b78007287d83e
gulp/tasks/uploading.js
gulp/tasks/uploading.js
'use strict'; const fs = require('fs'); const gulp = require('gulp'); const rsync = require('gulp-rsync'); // 'gulp deploy' -- reads rsync credentials file and incrementally uploads site to server gulp.task('upload', () => { var credentials = JSON.parse(fs.readFileSync('rsync-credentials.json', 'utf8')); retu...
'use strict'; const fs = require('fs'); const gulp = require('gulp'); const rsync = require('gulp-rsync'); // 'gulp deploy' -- reads rsync credentials file and incrementally uploads site to server gulp.task('upload', () => { var credentials = JSON.parse(fs.readFileSync('rsync-credentials.json', 'utf8')); retu...
Disable duplicate Rsync progress output
Disable duplicate Rsync progress output
JavaScript
mit
blogtips/blogtips.github.io,mmistakes/made-mistakes-jekyll,mmistakes/made-mistakes-jekyll,blogtips/blogtips.github.io,mmistakes/made-mistakes-jekyll,blogtips/blogtips.github.io
--- +++ @@ -17,7 +17,6 @@ incremental: true, recursive: true, compress: true, - progress: true, clean: true, chmod: "Du=rwx,Dgo=rx,Fu=rw,Fgo=r", }));
f157ca1c747d48ba416ec2896d2153c25ce2a8a8
app/components/liquid-child.js
app/components/liquid-child.js
import Ember from "ember"; export default Ember.Component.extend({ classNames: ['liquid-child'], attributeBindings: ['style'], style: Ember.computed('visible', function() { return new Ember.Handlebars.SafeString(this.get('visible') ? '' : 'visibility:hidden'); }), tellContainerWeRendered: Ember.on('didIns...
import Ember from "ember"; export default Ember.Component.extend({ classNames: ['liquid-child'], updateElementVisibility: function() { let visible = this.get('visible'); let $container = this.$(); if ($container && $container.length) { $container.css('visibility', visible ? 'visible' : 'hidden')...
Switch inline style attribute binding to jQuery CSS DOM Manip for CSP
Switch inline style attribute binding to jQuery CSS DOM Manip for CSP
JavaScript
mit
ember-animation/liquid-fire-core,byelipk/liquid-fire,davewasmer/liquid-fire,ianstarz/liquid-fire,envoy/liquid-fire,csantero/liquid-fire,ember-animation/liquid-fire-velocity,ember-animation/ember-animated,jamesreggio/liquid-fire,ember-animation/liquid-fire-velocity,jayphelps/liquid-fire,acorncom/liquid-fire,chadhietala/...
--- +++ @@ -1,10 +1,16 @@ import Ember from "ember"; export default Ember.Component.extend({ classNames: ['liquid-child'], - attributeBindings: ['style'], - style: Ember.computed('visible', function() { - return new Ember.Handlebars.SafeString(this.get('visible') ? '' : 'visibility:hidden'); - }), + + upd...
259d0c00fefb67aeded6f1f1831fbc6784d9fb2a
tests/dummy/app/components/trigger-with-did-receive-attrs.js
tests/dummy/app/components/trigger-with-did-receive-attrs.js
import Trigger from 'ember-basic-dropdown/components/basic-dropdown/trigger'; export default Trigger.extend({ didOpen: false, didReceiveAttrs() { let dropdown = this.get('dropdown'); let oldDropdown = this.get('oldDropdown'); if ((oldDropdown && oldDropdown.isOpen) === false && dropdown.isOpen) { ...
import Trigger from 'ember-basic-dropdown/components/basic-dropdown/trigger'; export default Trigger.extend({ didOpen: false, didReceiveAttrs() { let dropdown = this.get('dropdown'); let oldDropdown = this.get('oldDropdown'); if ((oldDropdown && oldDropdown.isOpen) === false && dropdown.isOpen) { ...
Transform all tests for the trigger
Transform all tests for the trigger
JavaScript
mit
cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown
717722bb2a343c00fa00980fcee67717279b6264
bids-validator/validators/tsv/tsvParser.js
bids-validator/validators/tsv/tsvParser.js
/* * TSV * Module for parsing TSV (and eventually other formats) */ const trimSplit = separator => str => str.trim().split(separator) const isContentfulRow = row => row && !/^\s*$/.test(row) function parseTSV(contents) { const content = { headers: [], rows: [], } content.rows = trimSplit('\n')(conten...
/* * TSV * Module for parsing TSV (and eventually other formats) */ const normalizeEOL = str => str.replace('\r\n', '\n').replace('\r', '\n') const isContentfulRow = row => row && !/^\s*$/.test(row) function parseTSV(contents) { const content = { headers: [], rows: [], } content.rows = normalizeEOL(c...
Normalize TSV end-of-line without stripping all whitespace
FIX: Normalize TSV end-of-line without stripping all whitespace (cherry picked from commit 786cfbb5847f5508720416cc7846fa1fcadc36bc)
JavaScript
mit
nellh/bids-validator,nellh/bids-validator,Squishymedia/BIDS-Validator,Squishymedia/bids-validator,nellh/bids-validator
--- +++ @@ -3,7 +3,7 @@ * Module for parsing TSV (and eventually other formats) */ -const trimSplit = separator => str => str.trim().split(separator) +const normalizeEOL = str => str.replace('\r\n', '\n').replace('\r', '\n') const isContentfulRow = row => row && !/^\s*$/.test(row) function parseTSV(contents...
bf3f03acdfcc7ddb98c820282af6ec5b7ae5c2d9
server/worker/index.js
server/worker/index.js
/** * A worker will listen for jobs on the job queue, and execute them. */ var async = require('async'); function bootstrapWorker (api, config, next) { var follower = function (cb) { api.messaging.listen('seguir-publish-to-followers', function (data, next) { api.feed.insertFollowersTimeline(data, next);...
/** * A worker will listen for jobs on the job queue, and execute them. */ var async = require('async'); var restify = require('restify'); var bunyan = require('bunyan'); var logger = bunyan.createLogger({ name: 'seguir', serializers: restify.bunyan.serializers }); function bootstrapWorker (api, config, next) { ...
Add logging to worker process, keep consistent with server logging via bunyan
Add logging to worker process, keep consistent with server logging via bunyan
JavaScript
mit
tes/seguir,cliftonc/seguir
--- +++ @@ -2,17 +2,25 @@ * A worker will listen for jobs on the job queue, and execute them. */ var async = require('async'); +var restify = require('restify'); +var bunyan = require('bunyan'); +var logger = bunyan.createLogger({ + name: 'seguir', + serializers: restify.bunyan.serializers +}); function boo...
7027fa2118cf7efc9dea127b68266b4aa2c6adf7
app/js/controllers/homepage.js
app/js/controllers/homepage.js
'use strict'; angular.module('ddsApp').controller('HomepageCtrl', function($scope, $state, droitsDescription, $timeout, ABTestingService, phishingExpressions) { [ 'prestationsNationales', 'partenairesLocaux' ].forEach(function(type) { $scope[type] = droitsDescription[type]; $scope[type + 'Count'] ...
'use strict'; angular.module('ddsApp').controller('HomepageCtrl', function($scope, $state, $sessionStorage, droitsDescription, $timeout, ABTestingService, phishingExpressions) { [ 'prestationsNationales', 'partenairesLocaux' ].forEach(function(type) { $scope[type] = droitsDescription[type]; $scope...
Allow users from phishing website to continue
Allow users from phishing website to continue
JavaScript
agpl-3.0
sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui,sgmap/mes-aides-ui
--- +++ @@ -1,6 +1,6 @@ 'use strict'; -angular.module('ddsApp').controller('HomepageCtrl', function($scope, $state, droitsDescription, $timeout, ABTestingService, phishingExpressions) { +angular.module('ddsApp').controller('HomepageCtrl', function($scope, $state, $sessionStorage, droitsDescription, $timeout, ABTes...
0b41586db6bf65a9357093c5a447ea12fab4c4ff
app/client/templates/modals/user_profile_edit/user_profile_edit.js
app/client/templates/modals/user_profile_edit/user_profile_edit.js
/*****************************************************************************/ /* UserProfileEdit: Event Handlers */ /*****************************************************************************/ Template.UserProfileEdit.events({ 'click #confirm': function(event) { event.preventDefault(); var newU...
/*****************************************************************************/ /* UserProfileEdit: Event Handlers */ /*****************************************************************************/ Template.UserProfileEdit.events({ 'click #confirm': function(event) { event.preventDefault(); var newU...
Improve user edit modal, now it saves the last name and bio
Improve user edit modal, now it saves the last name and bio
JavaScript
agpl-3.0
openp2pdesign/OpenMetaDesign,openp2pdesign/OpenMetaDesign,openp2pdesign/OpenMetaDesign
--- +++ @@ -23,7 +23,24 @@ "profile.firstName": newFirstName } }); - + } + if (newLastName) { + Meteor.users.update({ + _id: Meteor.userId() + }, { + $set: { + "profile.lastName": ne...
809b449002671226018fbd2e9d3285e6e7037ea0
server/index.js
server/index.js
'use strict'; var http = require('http'), spotify = require('spotify-node-applescript'); var cb = function(request, response) { debugger; response.writeHead(200, {'Content-Type': 'text/html'}); response.write('Hello spotkula servereerer!'); response.end(); }; http.createServer(cb).listen(3000, 'localho...
'use strict'; var http = require('http'), spotify = require('spotify-node-applescript'), express = require('express'); var app = express(); app.get('/', function (request, response) { response.send('ok'); }); app.listen(3000); console.log("Listening on port 3000");
Reimplement basic server as express app
Reimplement basic server as express app
JavaScript
mit
ilkka/spotkula-server
--- +++ @@ -1,15 +1,15 @@ 'use strict'; var http = require('http'), - spotify = require('spotify-node-applescript'); + spotify = require('spotify-node-applescript'), + express = require('express'); -var cb = function(request, response) { +var app = express(); - debugger; +app.get('/', function (requ...
2a26cba118a63f53321f9285351fa8a1a9ad9484
lib/assets/test/spec/new-dashboard/unit/specs/core/metrics.spec.js
lib/assets/test/spec/new-dashboard/unit/specs/core/metrics.spec.js
import * as Metrics from 'new-dashboard/core/metrics'; import store from 'new-dashboard/store'; describe('Internal Metrics Tracker', () => { describe('sendMetric', () => { beforeEach(() => { global.fetch = jest.fn(); }); it('should return call fetch with proper parameters', () => { const eve...
import * as Metrics from 'new-dashboard/core/metrics'; import store from 'new-dashboard/store'; describe('Internal Metrics Tracker', () => { describe('sendMetric', () => { let previousState; beforeEach(() => { global.fetch = jest.fn(); previousState = { ...store.state, config: { ...
Add base url and user id to metrics test
Add base url and user id to metrics test
JavaScript
bsd-3-clause
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
--- +++ @@ -3,15 +3,27 @@ describe('Internal Metrics Tracker', () => { describe('sendMetric', () => { + let previousState; + beforeEach(() => { global.fetch = jest.fn(); + previousState = { + ...store.state, + config: { ...store.state.config }, + user: { ...store.state.u...
0cebcf119713d523a27fb54fa0bf1f1afe4eb267
packages/crosswalk/package.js
packages/crosswalk/package.js
Package.describe({ summary: "Makes your Cordova application use the Crosswalk WebView \ instead of the System WebView on Android", version: '1.4.1-rc.1', documentation: null }); Cordova.depends({ 'cordova-plugin-crosswalk-webview': '1.4.0' });
Package.describe({ summary: "Makes your Cordova application use the Crosswalk WebView \ instead of the System WebView on Android", version: '1.6.0-rc.1', documentation: null }); Cordova.depends({ 'cordova-plugin-crosswalk-webview': '1.6.0' });
Update Crosswalk plugin to 1.6.0
Update Crosswalk plugin to 1.6.0
JavaScript
mit
nuvipannu/meteor,jdivy/meteor,AnthonyAstige/meteor,Hansoft/meteor,AnthonyAstige/meteor,nuvipannu/meteor,nuvipannu/meteor,AnthonyAstige/meteor,DAB0mB/meteor,nuvipannu/meteor,chasertech/meteor,AnthonyAstige/meteor,Hansoft/meteor,DAB0mB/meteor,DAB0mB/meteor,4commerce-technologies-AG/meteor,mjmasn/meteor,mjmasn/meteor,chas...
--- +++ @@ -1,10 +1,10 @@ Package.describe({ summary: "Makes your Cordova application use the Crosswalk WebView \ instead of the System WebView on Android", - version: '1.4.1-rc.1', + version: '1.6.0-rc.1', documentation: null }); Cordova.depends({ - 'cordova-plugin-crosswalk-webview': '1.4.0' + 'cord...
11cec30a94f134f7442867bbbb33fc3490e6a2d2
src/Section/StatisticsSection/StatisticsSection.js
src/Section/StatisticsSection/StatisticsSection.js
import React from 'react' import PieChart from '../../Charts/PieChart/PieChart' import BarChart from '../../Charts/BarChart/BarChart' import Percent from '../../Statistics/Percent/Percent' const StatisticsSection = ({metrics}) => { return ( <div className="ui equal width center aligned stackable grid"> ...
import React from 'react' import PieChart from '../../Charts/PieChart/PieChart' import BarChart from '../../Charts/BarChart/BarChart' import Percent from '../../Statistics/Percent/Percent' const StatisticsSection = ({metrics}) => { return ( <div className="ui equal width center aligned stackable grid"> ...
Change openness users icon by unlock icon
Change openness users icon by unlock icon
JavaScript
mit
sgmap/inspire,sgmap/inspire
--- +++ @@ -7,7 +7,7 @@ return ( <div className="ui equal width center aligned stackable grid"> <div className="eight wide column"> - <Percent metrics={metrics} label="openness" icon="users" description="Percentage of open source data." /> + <Percent metrics={metrics} label="ope...
6aae6d6b876c88327ce8ef31dbf3dec8eb60d3a4
src/Data/Ord.js
src/Data/Ord.js
"use strict"; // module Data.Ord exports.ordArrayImpl = function (f) { return function (xs) { return function (ys) { var i = 0; var xlen = xs.length; var ylen = ys.length; while (i < xlen && i < ylen) { var x = xs[i]; var y = ys[i]; var o = f(x)(y); if (o ...
"use strict"; // module Data.Ord exports.ordArrayImpl = function (f) { return function (xs) { return function (ys) { var i = 0; var xlen = xs.length; var ylen = ys.length; while (i < xlen && i < ylen) { var x = xs[i]; var y = ys[i]; var o = f(x)(y); if (o ...
Remove unused (moved) FFI function
Remove unused (moved) FFI function
JavaScript
bsd-3-clause
purescript/purescript-prelude,hdgarrood/purescript-prelude
--- +++ @@ -27,15 +27,3 @@ }; }; }; - -exports.unsafeCompareImpl = function (lt) { - return function (eq) { - return function (gt) { - return function (x) { - return function (y) { - return x < y ? lt : x > y ? gt : eq; - }; - }; - }; - }; -};
361524e620348e32061165c02290f04a305cfa76
draft-js-dnd-plugin/src/blockRendererFn.js
draft-js-dnd-plugin/src/blockRendererFn.js
import {Entity} from 'draft-js'; export default (config) => (contentBlock, getEditorState, updateEditorState) => { const type = contentBlock.getType(); if (type === 'image') { const entityKey = contentBlock.getEntityAt(0); const data = entityKey ? Entity.get(entityKey).data : {}; return { compone...
import {Entity} from 'draft-js'; import removeBlock from './modifiers/removeBlock'; export default (config) => (contentBlock, getEditorState, updateEditorState) => { const type = contentBlock.getType(); if (type === 'image') { const entityKey = contentBlock.getEntityAt(0); const data = entityKey ? Entity.g...
Allow Image block to access remove method
Allow Image block to access remove method
JavaScript
mit
dagopert/draft-js-plugins,draft-js-plugins/draft-js-plugins,nikgraf/draft-js-plugin-editor,dagopert/draft-js-plugins,dagopert/draft-js-plugins,draft-js-plugins/draft-js-plugins-v1,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins-v1,draft-js-plugins/draft-js-plugins,koaninc/draft-js-plugins,koaninc/draft...
--- +++ @@ -1,4 +1,5 @@ import {Entity} from 'draft-js'; +import removeBlock from './modifiers/removeBlock'; export default (config) => (contentBlock, getEditorState, updateEditorState) => { const type = contentBlock.getType(); @@ -8,7 +9,8 @@ return { component: config.Image, props: { - ...
3ea31603656b25b7d8a6903f432a4d321067cc8a
packages/autoupdate/package.js
packages/autoupdate/package.js
Package.describe({ summary: "Update the client when new client code is available", version: '1.1.4' }); Cordova.depends({ 'org.apache.cordova.file': '1.3.2', 'org.apache.cordova.file-transfer': '0.4.8' }); Package.onUse(function (api) { api.use('webapp', 'server'); api.use(['tracker', 'retry'], 'client');...
Package.describe({ summary: "Update the client when new client code is available", version: '1.1.4' }); Cordova.depends({ 'org.apache.cordova.file': '1.3.3', 'org.apache.cordova.file-transfer': '0.4.8' }); Package.onUse(function (api) { api.use('webapp', 'server'); api.use(['tracker', 'retry'], 'client');...
Upgrade the file cordova dependency to 1.3.3
Upgrade the file cordova dependency to 1.3.3
JavaScript
mit
pandeysoni/meteor,benstoltz/meteor,benjamn/meteor,kengchau/meteor,tdamsma/meteor,ljack/meteor,justintung/meteor,AnjirHossain/meteor,juansgaitan/meteor,somallg/meteor,DAB0mB/meteor,namho102/meteor,jrudio/meteor,calvintychan/meteor,neotim/meteor,chmac/meteor,evilemon/meteor,brettle/meteor,shmiko/meteor,meteor-velocity/me...
--- +++ @@ -4,7 +4,7 @@ }); Cordova.depends({ - 'org.apache.cordova.file': '1.3.2', + 'org.apache.cordova.file': '1.3.3', 'org.apache.cordova.file-transfer': '0.4.8' });
e176f4ed812d0d91646ba62838e1769548b81f39
example/src/redux/reducer/storage.js
example/src/redux/reducer/storage.js
import { types } from './storage.actions'; const initialState = { file: null, url: null, }; export default function storageReducer(state=initialState, action={}) { switch (action.type) { case types.SET_FILE: return { ...state, file: action.file, } case types.SET_FILE_URL: ...
import { types } from './storage.actions'; const initialState = { file: null, loading: false, url: null, }; export default function storageReducer(state=initialState, action={}) { switch (action.type) { case types.SET_FILE: return { ...state, file: action.file, } case types...
Store file upload loading state.
Store file upload loading state.
JavaScript
mit
n6g7/redux-saga-firebase
--- +++ @@ -2,6 +2,7 @@ const initialState = { file: null, + loading: false, url: null, }; @@ -15,8 +16,14 @@ case types.SET_FILE_URL: return { ...state, + loading: false, url: action.url, } + case types.SEND_FILE: + return { + ...state, + ...
336d92edc418ef85c88390b3e33896ca73284c81
computer-science/01-introduction-to-cs-and-programming-mit/src/02-lecture.js
computer-science/01-introduction-to-cs-and-programming-mit/src/02-lecture.js
// Modules var prompt = require( 'prompt' ); // // Create a variable x and assign value 3 to it // var x = 3; // // Bind x to value 9 // x *= x; // or x = x * x; // console.log( x ); // read input data from terminal prompt.start(); prompt.get({ name : 'number', description : 'Enter a number' }, function( ...
// Modules var prompt = require( 'prompt' ); // // Create a variable x and assign value 3 to it // var x = 3; // // Bind x to value 9 // x *= x; // or x = x * x; // console.log( x ); // // read input data from terminal // prompt.start(); // prompt.get({ // name : 'number', // description : 'Enter a number...
Verify if a integer number is even or odd - refactor
Verify if a integer number is even or odd - refactor
JavaScript
mit
waterlooSunset/computer-science-and-engineering
--- +++ @@ -8,47 +8,49 @@ // x *= x; // or x = x * x; // console.log( x ); +// // read input data from terminal +// prompt.start(); +// prompt.get({ +// name : 'number', +// description : 'Enter a number' +// }, function( err, results ) { + +// console.log( results.number ); + +// }); + +// Verify if...
7358e642ffbea4ce3d2dd54da8b26068cd3d0f4d
rules/es2017.js
rules/es2017.js
module.exports = { parserOptions: { ecmaVersion: 2017, sourceType: 'module', ecmaFeatures: { experimentalObjectRestSpread: true } }, rules: { 'arrow-body-style': ['error', 'as-needed', { requireReturnForObjectLiteral: false, }], 'arrow-spacing': ['error', { before: true, af...
module.exports = { parserOptions: { ecmaVersion: 2017, sourceType: 'module', ecmaFeatures: { experimentalObjectRestSpread: true } }, rules: { 'arrow-spacing': ['error', { before: true, after: true }], 'no-const-assign': 'error', 'no-duplicate-imports': 'error', 'no-new-symbol...
Remove arrow-body-style. Is too confusing
Remove arrow-body-style. Is too confusing
JavaScript
mit
sevenval/eslint-config-sevenval
--- +++ @@ -7,9 +7,6 @@ } }, rules: { - 'arrow-body-style': ['error', 'as-needed', { - requireReturnForObjectLiteral: false, - }], 'arrow-spacing': ['error', { before: true, after: true }], 'no-const-assign': 'error', 'no-duplicate-imports': 'error',
b702adaf1fae5e798db51d36b1919254f387f031
js/eventPage.js
js/eventPage.js
function runAlarm() { chrome.tabs.create({ url: "http://example.com" }); } chrome.alarms.onAlarm.addListener(function(alarm) { console.log(alarm); chrome.tabs.query({}, function(tabs) { if (tabs.length === 0) { chrome.storage.local.set({ "missed": 1 ...
function runAlarm() { chrome.tabs.create({ url: "http://example.com" }); } chrome.alarms.onAlarm.addListener(function(alarm) { console.log(alarm); chrome.tabs.query({}, function(tabs) { if (tabs.length === 0) { chrome.storage.local.set({ "missed": 1 ...
Create default settings upon first installation
Create default settings upon first installation
JavaScript
mit
adrianhuna/tabscheduler
--- +++ @@ -13,7 +13,7 @@ } else { runAlarm(); } - }) + }); }); chrome.windows.onCreated.addListener(function(window) { chrome.storage.local.get("missed", function(r) { @@ -25,3 +25,15 @@ } }); }); +chrome.runtime.onInstalled.addListener(function(details) { +...
b049412bfd8d13c5055324ceac5f305b7b680e0e
js/modules/debuglogs.js
js/modules/debuglogs.js
/* eslint-env node */ const FormData = require('form-data'); const got = require('got'); const BASE_URL = 'https://debuglogs.org'; // Workaround: Submitting `FormData` using native `FormData::submit` procedure // as integration with `got` results in S3 error saying we haven’t set the // `Content-Length` header: con...
/* eslint-env node */ const FormData = require('form-data'); const got = require('got'); const BASE_URL = 'https://debuglogs.org'; // Workaround: Submitting `FormData` using native `FormData::submit` procedure // as integration with `got` results in S3 error saying we haven’t set the // `Content-Length` header: // ...
Document workaround for `got` `FormData` bug
Document workaround for `got` `FormData` bug See: https://github.com/sindresorhus/got/pull/466
JavaScript
agpl-3.0
nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop
--- +++ @@ -9,6 +9,7 @@ // Workaround: Submitting `FormData` using native `FormData::submit` procedure // as integration with `got` results in S3 error saying we haven’t set the // `Content-Length` header: +// https://github.com/sindresorhus/got/pull/466 const submitFormData = (form, url) => new Promise((resol...
44da4e0035a0a72346b72c696aee73c23096275f
tests/testWithCallBack.js
tests/testWithCallBack.js
const request = require('request') function getLuke(cb) { const lukeInfo = { name: 'Luke', } request('https://swapi.co/api/people/1', (error, response, body) => { if (error) return cb(error) const data = JSON.parse(body) const startShipURL = data.starships[0] const vehicleUR...
const request = require('request') function getLuke(cb) { const lukeInfo = { name: 'Luke', } /* Here stars the callback hell. Please notice the if (error) return cb(error) redundant code */ request('https://swapi.co/api/people/1', (error, response, body) => { if (error) return cb(error) ...
Add notice in callback example
Add notice in callback example
JavaScript
mit
pierreroth64/js-async-tutorial
--- +++ @@ -5,6 +5,7 @@ name: 'Luke', } + /* Here stars the callback hell. Please notice the if (error) return cb(error) redundant code */ request('https://swapi.co/api/people/1', (error, response, body) => { if (error) return cb(error)
987d9722ecbcfa8925a48765086beceb2a913a58
tests/test_convert_tag.js
tests/test_convert_tag.js
var suite = require('suite.js'); var convertTag = require('../lib/convert_tag'); suite(convertTag, [ 'foo', 'foo', 'self help', 'self_help', 'self-help', 'self__help', 'another self help', 'another_self_help', 'another-self-help', 'another__self__help', 'SciFi', 'sci_fi', 'sci-fi', 'sci__f...
var suite = require('suite.js'); var convertTag = require('../lib/convert_tag'); suite(convertTag, [ 'foo', 'foo', 'self help', 'self_help', 'self-help', 'self__help', 'another self help', 'another_self_help', 'another-self-help', 'another__self__help', 'SciFi', 'sci_fi', 'SciFiToo', 'sci_...
Add multipart case for upper case boundaries
Add multipart case for upper case boundaries
JavaScript
mit
Kikobeats/blogger2ghost,bebraw/blogger2ghost
--- +++ @@ -9,5 +9,6 @@ 'another self help', 'another_self_help', 'another-self-help', 'another__self__help', 'SciFi', 'sci_fi', + 'SciFiToo', 'sci_fi_too', 'sci-fi', 'sci__fi' ]);
c2a32db5fe2d291f4edd38b484aca17b51f5edae
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { jshintrc: '.jshintrc' }, all: [ 'Gruntfile.js', 'lib/**/*.js', 'public/javascripts...
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { options: { jshintrc: '.jshintrc' }, all: [ 'Gruntfile.js', 'lib/**/*.js', 'public/javascripts...
Stop watchnig so many files, fixes errors
Stop watchnig so many files, fixes errors
JavaScript
mit
jamiemill/lux,jamiemill/lux,jamiemill/lux
--- +++ @@ -28,8 +28,9 @@ } }, watch: { - files: '**/*.js', - tasks: ['jshint', 'cafemocha', 'karma:unit:run'] + files: ['<%= jshint.all %>'], + tasks: ['jshint', 'cafemocha', 'karma:unit:run'], + options: {interrupt: true} ...
439f689096d46eac35c2adfe23b901e220a0f558
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { grunt.initConfig({ bowerPkg: grunt.file.readJSON('bower.json'), karma: { unit: { configFile: 'karma.conf.js', singleRun: true, browsers: ['PhantomJS'] } }, uglify: { options: { banner: '/* <%= bowerPkg.name %> v<%= bowerPkg.version %> (<%= bowerPkg.ho...
module.exports = function(grunt) { grunt.initConfig({ bowerPkg: grunt.file.readJSON('bower.json'), karma: { unit: { configFile: 'karma.conf.js', singleRun: true, browsers: ['PhantomJS'] } }, cssmin: { build: { options: { banner: '/* <%= bowerPkg.name %> v<%= bowerPkg.version %> (<...
Add cssmin to Grunt task ‘build’
Add cssmin to Grunt task ‘build’
JavaScript
bsd-2-clause
SonicHedgehog/angular-progress-button,SonicHedgehog/angular-progress-button
--- +++ @@ -6,6 +6,15 @@ configFile: 'karma.conf.js', singleRun: true, browsers: ['PhantomJS'] + } + }, + cssmin: { + build: { + options: { + banner: '/* <%= bowerPkg.name %> v<%= bowerPkg.version %> (<%= bowerPkg.homepage %>) */' + }, + src: 'src/progress-button.css', + dest: 'di...
ae5cad1e172ecd2a12a380c9f473b8b04af0f814
Gruntfile.js
Gruntfile.js
/*global module:false*/ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Task configuration. csslint: { src: ['public/**/*.css'], }, docco: { src: ['*.js', 'routes/**/*.js'] }, jshint: { // See .jshintrc src: ['*.js', 'routes/**/*.js...
/*global module:false*/ module.exports = function(grunt) { // Project configuration. grunt.initConfig({ // Task configuration. csslint: { src: ['public/**/*.css'], }, docco: { src: ['*.js', 'routes/**/*.js'] }, jshint: { // See .jshintrc src: ['*.js', 'routes/**/*.js...
Add csslint and docco to the default grunt task
Add csslint and docco to the default grunt task
JavaScript
mit
nicolasmccurdy/jsbox
--- +++ @@ -30,6 +30,6 @@ grunt.loadNpmTasks('grunt-docco'); // Default task. - grunt.registerTask('default', ['jshint']); + grunt.registerTask('default', ['jshint', 'csslint', 'docco']); };
b345db1e7fce6d1f67aeaecb480c98f1e72dadf2
Gruntfile.js
Gruntfile.js
/* jslint node: true */ 'use strict' module.exports = function (grunt) { // Project configuration. grunt.initConfig({ nodeunit: { files: ['test/**/*_test.js'] } }) // These plugins provide necessary tasks. grunt.loadNpmTasks('grunt-contrib-nodeunit') // Default task. grunt.registerT...
/* jslint node: true */ 'use strict' module.exports = function (grunt) { // Project configuration. grunt.initConfig({ nodeunit: { files: ['test/**/*_test.js'] } }) // These plugins provide necessary tasks. grunt.loadNpmTasks('grunt-contrib-nodeunit') // Default task. grunt.registerTask('t...
Apply standard 11.x code style
Apply standard 11.x code style
JavaScript
mit
bkimminich/z85-cli
--- +++ @@ -2,17 +2,17 @@ 'use strict' module.exports = function (grunt) { - // Project configuration. + // Project configuration. grunt.initConfig({ nodeunit: { files: ['test/**/*_test.js'] } }) - // These plugins provide necessary tasks. + // These plugins provide necessary task...
a3e29bcc9da540c6601c7ce74046c6451775809a
mergedSchema.js
mergedSchema.js
import { mergeSchemas, introspectSchema, makeRemoteExecutableSchema } from "graphql-tools" import { createHttpLink } from "apollo-link-http" import fetch from "node-fetch" import localSchema from "./schema" export default async function mergedSchema() { const convectionLink = createHttpLink({ fetch, uri: pr...
import { mergeSchemas, introspectSchema, makeRemoteExecutableSchema } from "graphql-tools" import { createHttpLink } from "apollo-link-http" import fetch from "node-fetch" import localSchema from "./schema" export default async function mergedSchema() { const convectionLink = createHttpLink({ fetch, uri: pr...
Enable type name conflict logging.
[Stitching] Enable type name conflict logging.
JavaScript
mit
artsy/metaphysics,mzikherman/metaphysics-1,craigspaeth/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,mzikherman/metaphysics-1,craigspaeth/metaphysics,artsy/metaphysics,artsy/metaphysics
--- +++ @@ -28,7 +28,7 @@ schemas: [localSchema, convectionSchema, linkTypeDefs], // Prefer others over the local MP schema. onTypeConflict: (_leftType, rightType) => { - // console.warn(`[!] Type collision ${rightType}`) + console.warn(`[!] Type collision ${rightType}`) // eslint-disable-lin...
994d14b7619ff6997881cb87b0d4653b6aca645c
app.js
app.js
"use strict"; // Load the libraries and modules var assets = require(__dirname + '/data/assets.json'); var config = { npm: __dirname + '/node_modules/', libraries: { nodejs: {}, npm: {} }, directory: __dirname + '/modules/', modules: { npm: { 'dragonnodejs-webse...
"use strict"; // Load the libraries and modules var assets = require(__dirname + '/data/assets.json'); var config = { npm: __dirname + '/node_modules/', libraries: { nodejs: {}, npm: {} }, directory: __dirname + '/modules/', modules: { npm: { 'dragonnodejs-webse...
Add basic http authentication for all http requests on testserver
Add basic http authentication for all http requests on testserver
JavaScript
mit
SunnyUK/assetlist,SunnyUK/assetlist
--- +++ @@ -14,6 +14,11 @@ npm: { 'dragonnodejs-webserver': { app: { port: process.env.PORT }, + auth: { + realm: process.env.AUTH_REALM, + user: process.env.AUTH_USER, + password: process.env.AUTH_PASSWORD ...
df342fe730d44c0141bd169d90df7202f0d3a571
app.js
app.js
'use strict'; /** * Module dependencies. */ const express = require('express'); const compression = require('compression'); const bodyParser = require('body-parser'); const router = require('./routes/routes'); /** * Express configuration. */ const app = express(); app.use(compression()); // pars...
'use strict'; /** * Module dependencies. */ const express = require('express'); const compression = require('compression'); const bodyParser = require('body-parser'); const router = require('./routes/routes'); /** * Express configuration. */ const app = express(); app.use(compression()); // pars...
Update error function to arrow function
Update error function to arrow function
JavaScript
mit
lostatseajoshua/Challenger
--- +++ @@ -28,7 +28,7 @@ /** * Catch all error requests */ -app.use(function(err, req, res, next) { +app.use((err, req, res, next) => { console.error(err.stack); res.status(500).send('Something broke!'); });
3e67e31a319630328d2271ad323d43f7f5dd4e1c
app/ui/setup.js
app/ui/setup.js
const { configureStore } = require('../store'); const readline = require('readline'); const draw = require('./draw'); const { keys } = require('./input'); const actions = require('../actions'); const resize = (proc, store) => { const action = actions.resize({ rows: proc.stdout.rows, columns: proc.s...
const { configureStore } = require('../store'); const readline = require('readline'); const draw = require('./draw'); const { keys } = require('./input'); const actions = require('../actions'); const resize = (proc, store) => { const action = actions.resize({ rows: proc.stdout.rows, columns: proc.s...
Remove the unnecessary render on start up
Remove the unnecessary render on start up
JavaScript
mit
andybry/explorer-cli
--- +++ @@ -16,7 +16,6 @@ const store = configureStore(proc, initialState); const onStateChange = draw(proc, store); store.subscribe(onStateChange); - onStateChange(); proc.stdin.addListener('keypress', keys(store)); proc.stdout.addListener('resize', () => resize(proc, store)); resize...
510dab8128321ab8fa9f2ee4983cff3037b961a8
bin/sssg.js
bin/sssg.js
#!/usr/bin/env node var argv = require("yargs").argv; var main = require('../'); var task = argv._[0]; var options = {}; if(task === "try"){ options.env = "development"; main.do("init", options, function(){ options.src = "./src"; options.dst = "./docs"; main.do("serve", options); }); r...
#!/usr/bin/env node var argv = require("yargs").argv; var main = require('../'); var task = argv._[0]; var options = {}; if(task === "try"){ options.env = "development"; main.do("init", options, function(){ options.src = "./src"; options.dst = "./docs"; main.do("serve", options); }); return...
Set env=development when task:serve is dispatched
Set env=development when task:serve is dispatched
JavaScript
mit
Hinaser/sssg,Hinaser/sssg
--- +++ @@ -12,7 +12,6 @@ main.do("init", options, function(){ options.src = "./src"; options.dst = "./docs"; - main.do("serve", options); }); @@ -22,6 +21,12 @@ options.src = argv.src || argv.s; options.dst = argv.dst || argv.d; options.root = argv.root || argv.r; -options.env = argv...
2e926ceaa52929378444fcaa6394a90de3b8ee44
app/common/modules/applications.js
app/common/modules/applications.js
define([ 'extensions/collections/collection' ], function (Collection) { return { requiresSvg: true, collectionClass: Collection, collectionOptions: function () { var valueAttr = this.model.get('value-attribute') || '_count'; var options = { valueAttr: valueAttr }; option...
define([ 'extensions/collections/collection' ], function (Collection) { return { requiresSvg: true, collectionClass: Collection, collectionOptions: function () { var valueAttr = this.model.get('value-attribute') || '_count'; var options = { valueAttr: valueAttr }; option...
Add valueAttr to the application module
Add valueAttr to the application module
JavaScript
mit
tijmenb/spotlight,alphagov/spotlight,alphagov/spotlight,keithiopia/spotlight,tijmenb/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,alphagov/spotlight
--- +++ @@ -36,6 +36,7 @@ visualisationOptions: function () { return { + valueAttr: this.model.get('value-attribute'), maxBars: this.model.get('max-bars'), target: this.model.get('target'), pinTo: this.model.get('pin-to')
3eb39cf29563deade1d8a2b6687bbb0f17101ba0
app/controllers/messages/create.js
app/controllers/messages/create.js
var r = require('rethinkdb'); module.exports = function messageCreator(pool) { return function(message) { return pool.runQuery(r.table('messages').insert({ body: message.body, creation: r.now() })); }; };
var r = require('rethinkdb'); module.exports = function messageCreator(pool) { return function(message) { return pool.runQuery(r.table('messages').insert({ body: message.body, scope: message.scope, creation: r.now() })); }; };
Include scope in controller when adding post
Include scope in controller when adding post
JavaScript
mit
dingroll/dingroll.com,dingroll/dingroll.com
--- +++ @@ -4,6 +4,7 @@ return function(message) { return pool.runQuery(r.table('messages').insert({ body: message.body, + scope: message.scope, creation: r.now() })); };
93204638953bebc77a46a5d8b0b3f9318046fc1a
src/pipeline.js
src/pipeline.js
import { basename, extname, join, dirname, relative, resolve } from 'path' import { default as put } from 'output-file-sync' import { parallel } from 'async' const keys = Object.keys export default function createPipeline(pkg, opts, build, progress) { const { onBuild = noop , onError = noop } = progress...
import { basename, extname, join, dirname, relative, resolve } from 'path' import { default as put } from 'output-file-sync' import { parallel } from 'async' const keys = Object.keys export default function createPipeline(pkg, opts, build, progress) { const { onBuild = noop , onError = noop } = progress...
Fix error logging to actually output useful data
Fix error logging to actually output useful data
JavaScript
mit
zambezi/ez-build,zambezi/ez-build
--- +++ @@ -19,7 +19,7 @@ let result = { input: file } if (error) { result.error = error - console.log(onError, result) + onError(result) } else { result.messages = output.messages result.files = keys(output.files).map(name ...
e49af4ac9be10a34e24672f65bab16c6c1efa5ef
vue.config.js
vue.config.js
module.exports = { assetsDir: 'styleguide/', css: { modules: true } };
module.exports = { css: { modules: true }, publicPath: '/styleguide/' };
Correct to the right property
Correct to the right property
JavaScript
mit
rodet/styleguide,rodet/styleguide
--- +++ @@ -1,6 +1,6 @@ module.exports = { - assetsDir: 'styleguide/', css: { modules: true - } + }, + publicPath: '/styleguide/' };
c3ad93cb30061349d175f48fe5df8d04f817c057
web/src/js/components/Settings/SettingsMenuItem.js
web/src/js/components/Settings/SettingsMenuItem.js
import React from 'react' import PropTypes from 'prop-types' import ListItem from '@material-ui/core/ListItem' import ListItemText from '@material-ui/core/ListItemText' import NavLink from 'general/NavLink' class SettingsMenuItem extends React.Component { render () { const menuItemStyle = Object.assign( {}...
import React from 'react' import PropTypes from 'prop-types' import ListItem from '@material-ui/core/ListItem' import ListItemText from '@material-ui/core/ListItemText' import NavLink from 'general/NavLink' class SettingsMenuItem extends React.Component { render () { return ( <NavLink to={this.prop...
Add placeholder menu item hover style
Add placeholder menu item hover style
JavaScript
mpl-2.0
gladly-team/tab,gladly-team/tab,gladly-team/tab
--- +++ @@ -6,15 +6,12 @@ class SettingsMenuItem extends React.Component { render () { - const menuItemStyle = Object.assign( - {}, - this.props.style) return ( <NavLink to={this.props.to} style={{ textDecoration: 'none' }} > - <ListItem style={menuItemSt...
9604f1566158623e5d009df9b72e133129b7a18f
src/components/LawList.js
src/components/LawList.js
import React, { PropTypes } from 'react'; import { Link } from 'react-router'; import { DataTable, FABButton, Icon } from 'react-mdl'; import Pagination from './Pagination'; import './lawList.scss'; const LawList = ({ laws, page, pageSize, selectPage, total }) => { const columns = [ { name: 'groupkey', label: ...
import React, { PropTypes } from 'react'; import { Link } from 'react-router'; import { DataTable, TableHeader, FABButton, Icon } from 'react-mdl'; import Pagination from './Pagination'; import './lawList.scss'; const LawList = ({ laws, page, pageSize, selectPage, total }) => { const rows = laws.map(law => ({...la...
Implement new version of react-mdl's DataTable including TableHeader component.
Implement new version of react-mdl's DataTable including TableHeader component.
JavaScript
agpl-3.0
ahoereth/lawly,ahoereth/lawly,ahoereth/lawly
--- +++ @@ -1,18 +1,12 @@ import React, { PropTypes } from 'react'; import { Link } from 'react-router'; -import { DataTable, FABButton, Icon } from 'react-mdl'; +import { DataTable, TableHeader, FABButton, Icon } from 'react-mdl'; import Pagination from './Pagination'; import './lawList.scss'; const LawLi...
71af63a1dbbf93b49b26bed20f11e9f5abbcb591
app/webpack/entities/alarmClock.js
app/webpack/entities/alarmClock.js
import Entity from '../Entity.js'; import printMessage from '../printMessage.js'; import action from '../action.js'; import time from '../time.js'; export class AlarmClock extends Entity { constructor() { super(); this.ringing = true; } name() { return "alarm clock"; } actions() { if(this.r...
import Entity from '../Entity.js'; import printMessage from '../printMessage.js'; import action from '../action.js'; import time from '../time.js'; export class AlarmClock extends Entity { constructor() { super(); this.ringing = true; } name() { return "alarm clock"; } actions() { const che...
Check time after alarm disabled
Check time after alarm disabled
JavaScript
mit
TEAMBUTT/LD35
--- +++ @@ -14,6 +14,10 @@ } actions() { + const checkTime = action("Look at the time.", () => { + printMessage(`It is now ${time()}.`); + }) + if(this.ringing) { return [ action("Snooze", () => { @@ -22,10 +26,11 @@ action("Turn if off.", () => { this.ringi...
a7114d6f043978002f6d7c9d1974f21c72dddf77
lib/fs.utils.js
lib/fs.utils.js
const fs = require('fs') function fileExist(filename = '') { try { fs.accessSync(filename) } catch (e) { return false } return true } function writeFile(filename, data) { return new Promise((resolve, reject) => { fs.writeFile(filename, data, error => { if (error) { reject(error); return }...
const fs = require('fs') function fileExist(filename = '') { try { fs.accessSync(filename) } catch (e) { return false } return true } function writeFile(filename, data) { return new Promise((resolve, reject) => { fs.writeFile(filename, data, error => { if (error) { reject(error); return }...
Add method to promisify chmod function
Add method to promisify chmod function
JavaScript
apache-2.0
Mindsers/configfile
--- +++ @@ -30,8 +30,19 @@ }) } +function chmod(filename, rights) { + return new Promise((resolve, reject) => { + fs.chmod(filename, rights, error => { + if (error) { reject(error); return } + + resolve() + }) + }) +} + module.exports = exports = { fileExist, writeFile, - readFile + r...
64e91980f64ca6299b774f2d47a7c352503b6466
troposphere/static/js/components/modals/instance/launch/components/InstanceLaunchFooter.react.js
troposphere/static/js/components/modals/instance/launch/components/InstanceLaunchFooter.react.js
import React from 'react'; export default React.createClass({ propTypes: { backIsDisabled: React.PropTypes.bool.isRequired, launchIsDisabled: React.PropTypes.bool.isRequired, advancedIsDisabled: React.PropTypes.bool.isRequired, viewAdvanced: React.PropTypes.func, onSubmitLau...
import React from 'react'; export default React.createClass({ propTypes: { backIsDisabled: React.PropTypes.bool.isRequired, launchIsDisabled: React.PropTypes.bool.isRequired, advancedIsDisabled: React.PropTypes.bool.isRequired, viewAdvanced: React.PropTypes.func, onSubmitLau...
Make InstanceLaunchFooter functionally disabled instead of just visually
Make InstanceLaunchFooter functionally disabled instead of just visually
JavaScript
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
--- +++ @@ -27,14 +27,13 @@ }, render: function() { - let launchIsDisabled = this.props.launchIsDisabled ? "disabled" : ""; - let advancedIsDisabled = this.props.advancedIsDisabled ? "disabled" : ""; return ( <div className="modal-footer"> {this.rende...
fe97f331b8f2e94c03630f3b6adaec711c0978bd
test/acceptance/features/messages/step_definitions/messages.js
test/acceptance/features/messages/step_definitions/messages.js
const { client } = require('nightwatch-cucumber') const { defineSupportCode } = require('cucumber') defineSupportCode(({ Then }) => { const Messages = client.page.Messages() Then(/^I see the success message$/, async () => { await Messages .waitForElementPresent('@flashMessage') .assert.cssClassPre...
const { client } = require('nightwatch-cucumber') const { defineSupportCode } = require('cucumber') defineSupportCode(({ Then }) => { const Messages = client.page.Messages() Then(/^I see the success message$/, async () => { await Messages .waitForElementPresent('@flashMessage') .assert.cssClassPre...
Remove redundant error message assertion
Remove redundant error message assertion
JavaScript
mit
uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
--- +++ @@ -9,10 +9,4 @@ .waitForElementPresent('@flashMessage') .assert.cssClassPresent('@flashMessage', 'c-message--success') }) - - Then(/^I see the error message$/, () => { - Messages - .waitForElementPresent('@flashMessage') - .assert.cssClassPresent('@flashMessage', 'c-message--er...
071992c3a29c44ae565bd81c18b7144f87d356ff
Source/Our.Umbraco.Nexu.Core/Client/controllers/base-delete-controller.js
Source/Our.Umbraco.Nexu.Core/Client/controllers/base-delete-controller.js
angular.module('umbraco').controller('Our.Umbraco.Nexu.BaseDeleteController', ['$scope', '$controller', 'Our.Umbraco.Nexu.Resource', function ($scope, $controller, nexuResource) { // inherit core delete controller angular.extend(this, $controller('Umbraco.Editors.Media.DeleteControl...
angular.module('umbraco').controller('Our.Umbraco.Nexu.BaseDeleteController', ['$scope', '$controller', 'Our.Umbraco.Nexu.Resource', function ($scope, $controller, nexuResource) { // inherit core delete controller if ($scope.isMedia) { angular.extend(this, $controlle...
Set correct base controller for content type
Set correct base controller for content type
JavaScript
mit
dawoe/umbraco-nexu,dawoe/umbraco-nexu,dawoe/umbraco-nexu
--- +++ @@ -2,7 +2,12 @@ ['$scope', '$controller', 'Our.Umbraco.Nexu.Resource', function ($scope, $controller, nexuResource) { // inherit core delete controller - angular.extend(this, $controller('Umbraco.Editors.Media.DeleteController', { $scope: $scope })); + if ($sc...
463359038908a85f8624483473b29fe720050c06
lib/markdown.js
lib/markdown.js
/* globals atom:false */ 'use strict'; exports.provideBuilder = function () { return { niceName: 'Markdown', isEligable: function () { var textEditor = atom.workspace.getActiveTextEditor(); if (!textEditor || !textEditor.getPath()) { return false; } var path = textEditor.get...
/* globals atom:false */ 'use strict'; exports.provideBuilder = function () { return { niceName: 'Markdown', isEligable: function () { var textEditor = atom.workspace.getActiveTextEditor(); if (!textEditor || !textEditor.getPath()) { return false; } var path = textEditor.get...
Use `open` to find Marked.app, because of path problems finding the `mark` command.
Use `open` to find Marked.app, because of path problems finding the `mark` command.
JavaScript
mpl-2.0
bwinton/atom-build-markdown
--- +++ @@ -18,8 +18,8 @@ settings: function () { return [ { name: 'Markdown: view', - exec: 'mark', - args: [ '{FILE_ACTIVE}' ] + exec: 'open', + args: [ '-a', 'Marked.app', '{FILE_ACTIVE}' ] }]; } };
f659cc0dee2d9ed1df80793d87a1337a1403d7bc
packages/@sanity/desk-tool/src/DeskTool.js
packages/@sanity/desk-tool/src/DeskTool.js
import React, {PropTypes} from 'react' import styles from '../styles/DeskTool.css' import PaneResolver from 'config:desk-tool/pane-resolver' DeskTool.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string.isRequired }) } function DeskTool({location}) { return ( <div className={styles.deskT...
import React, {PropTypes} from 'react' import styles from '../styles/DeskTool.css' import PaneResolver from 'config:desk-tool/pane-resolver' import ActionButton from 'component:@sanity/base/action-button?' import schema from 'schema:@sanity/base/schema' import config from 'config:sanity' function DeskTool({location}) ...
Use action button if it exists
Use action button if it exists
JavaScript
mit
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
--- +++ @@ -1,6 +1,24 @@ import React, {PropTypes} from 'react' import styles from '../styles/DeskTool.css' import PaneResolver from 'config:desk-tool/pane-resolver' +import ActionButton from 'component:@sanity/base/action-button?' +import schema from 'schema:@sanity/base/schema' +import config from 'config:sanity...
f4f55a8ed829910cdec7d4025b4ea07ee606271b
rules/errors.js
rules/errors.js
'use strict'; module.exports = { 'rules': { // Enforce trailing commas in multiline object literals 'comma-dangle': [2, 'always-multiline'], }, };
'use strict'; module.exports = { 'rules': { // Enforce trailing commas in multiline object literals 'comma-dangle' : [2, 'always-multiline'], // Disallow template literal placeholder syntax in regular strings 'no-template-curly-in-string': [2], // Disallow nega...
Enable more core “Errors” rules
Enable more core “Errors” rules
JavaScript
mit
nutshellcrm/eslint-config-nutshell
--- +++ @@ -3,6 +3,12 @@ module.exports = { 'rules': { // Enforce trailing commas in multiline object literals - 'comma-dangle': [2, 'always-multiline'], + 'comma-dangle' : [2, 'always-multiline'], + // Disallow template literal placeholder syntax in regular strings +...
d13350e6592dce99e3d3b508b335e2b9f73000eb
routes/recipes/index.js
routes/recipes/index.js
var express = require('express'); var router = express.Router(); var JsonDB = require('node-json-db'); var _ = require('lodash'); // Recipes listing router.get('/', function (req, res, next) { var db = new JsonDB('db', false, false); var recipes = db.getData('/recipes'); // Expand requested resources if they ex...
var express = require('express'); var router = express.Router(); var JsonDB = require('node-json-db'); var _ = require('lodash'); // Recipes listing router.get('/', function (req, res, next) { var db = new JsonDB('db', false, false); var recipes = db.getData('/recipes'); // Expand requested resources if they ex...
Add section 2.4 code to search recipe descriptions
Add section 2.4 code to search recipe descriptions
JavaScript
mit
adamsea/recipes-api
--- +++ @@ -12,21 +12,37 @@ // The resource to expand is singular, e.g. // to expand 'users' we provide _expand=user var expand = req.query._expand; + var relation; if (expand) { try { - var relation = db.getData('/' + expand + 's'); - _(recipes) - .forEach(function (recipe) { - ...
0a776b2259f3f3d5cda8d1103689539cfd9f862e
build/tasks/build-release/start.js
build/tasks/build-release/start.js
module.exports = function(grunt, config, parameters, done) { function endForError(e) { process.stderr.write(e.message || e); done(false); } try { var rimraf = require('rimraf'), fs = require('fs'), download = require('download'), path = "./release"; rimraf.sync(path); fs.mkdir(path); // Down...
module.exports = function(grunt, config, parameters, done) { function endForError(e) { process.stderr.write(e.message || e); done(false); } try { var shell = require('shelljs'), fs = require('fs'), download = require('download'), path = "./release"; shell.rm('-rf', path); fs.mkdir(path); // ...
Use shelljs instead of rimraf
Use shelljs instead of rimraf
JavaScript
mit
matt9mg/concrete5,TimDix/concrete5,TimDix/concrete5,avdevs/concrete5,matt9mg/concrete5,avdevs/concrete5,avdevs/concrete5,MichaelMaar/concrete5,TimDix/concrete5,MichaelMaar/concrete5,matt9mg/concrete5,MichaelMaar/concrete5
--- +++ @@ -6,12 +6,12 @@ } try { - var rimraf = require('rimraf'), + var shell = require('shelljs'), fs = require('fs'), download = require('download'), path = "./release"; - rimraf.sync(path); + shell.rm('-rf', path); fs.mkdir(path); // Download archive from git
602adb639f55da9ee6a9c16f5c0fec0e4e10821f
assets/debug.js
assets/debug.js
window.onerror = function(message, url, line) { $.ajax('/api/Error', { data: { message: message, url: url, line: line } }); };
window.onerror = function(message, url, line) { // Don't attempt to handle non-standard errors (e.g. failed // HTTP request via jQuery). if (typeof message !== 'string') return; $.ajax('/api/Error', { data: { message: message, url: url, line: line } ...
Fix for failure to serialize jQuery event object.
Fix for failure to serialize jQuery event object.
JavaScript
bsd-3-clause
developmentseed/bones,Wiredcraft/bones,developmentseed/bones,Wiredcraft/bones
--- +++ @@ -1,4 +1,7 @@ window.onerror = function(message, url, line) { + // Don't attempt to handle non-standard errors (e.g. failed + // HTTP request via jQuery). + if (typeof message !== 'string') return; $.ajax('/api/Error', { data: { message: message,
3a09cec10086b36ad297b31efdb3575bbc1163ee
mark_as_read.js
mark_as_read.js
HNSpecial.settings.registerModule("mark_as_read", function () { function editLinks() { var subtexts = _.toArray(document.getElementsByClassName("subtext")); subtexts.forEach(function (subtext) { if (!subtext.getAttribute("data-hnspecial-mark-as-read")) { subtext.setAttribute("data-hnspecial-mar...
HNSpecial.settings.registerModule("mark_as_read", function () { function editLinks() { var subtexts = _.toArray(document.getElementsByClassName("subtext")); subtexts.forEach(function (subtext) { if (!subtext.getAttribute("data-hnspecial-mark-as-read")) { subtext.setAttribute("data-hnspecial-mar...
Make sure button is before all other children
Make sure button is before all other children
JavaScript
mit
lieuwex/hn-special,gabrielecirulli/hn-special,gabrielecirulli/hn-special,benoror/hn-special,lieuwex/hn-special,lieuwex/hn-special,benoror/hn-special,gabrielecirulli/hn-special,benoror/hn-special,kislakiruben/hn-special,kislakiruben/hn-special,kislakiruben/hn-special
--- +++ @@ -14,7 +14,7 @@ // Add the click listener button.addEventListener("click", function (e) { - // Wow, that escalated quickly + // Well, that escalated quickly var url = e.target.parentElement.parentElement.previousSibling.childNodes[2].children[0].href; ...
c86593d654f2852caad6620510069c63191c3f04
app/index.js
app/index.js
var peer = require('./peer'); var textOT = require('ottypes').text var gulf = require('gulf'); var bindEditor = require('gulf-textarea'); var textarea = document.querySelector('textarea#doc'); var textareaDoc = bindEditor(textarea); var text = 'hello'; var path = 'chat.sock'; // var transport = require('./transports/...
var peer = require('./peer'); var textOT = require('ottypes').text var gulf = require('gulf'); var text = 'hello'; var doc = require('gulf-textarea')( document.querySelector('textarea#doc') ); var path = 'chat.sock'; // var transport = require('./transports/socket')(path); // var transport = require('./transports/...
Tidy doc representation into swappable one-liner.
Tidy doc representation into swappable one-liner.
JavaScript
cc0-1.0
nybblr/p2p-experiments,nybblr/p2p-experiments
--- +++ @@ -2,10 +2,11 @@ var textOT = require('ottypes').text var gulf = require('gulf'); -var bindEditor = require('gulf-textarea'); -var textarea = document.querySelector('textarea#doc'); -var textareaDoc = bindEditor(textarea); var text = 'hello'; + +var doc = require('gulf-textarea')( + document.querySelec...
dc79c6bdd3bae0ed3aa5a5663a55d574ab18379d
app/index.js
app/index.js
import 'babel-core/polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import { ReduxRouter } from 'redux-router'; import Immutable from 'seamless-immutable'; import rootReducer from 'reducers/index'; import configureSt...
import 'babel-core/polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import { ReduxRouter } from 'redux-router'; import Immutable from 'seamless-immutable'; import rootReducer from 'reducers/index'; import configureSt...
Fix logout link on IE
Fix logout link on IE Closes #213.
JavaScript
mit
fastmonkeys/respa-ui
--- +++ @@ -32,3 +32,12 @@ if (__DEVTOOLS__) { require('./createDevToolsWindow')(store); } + +// Fix for IE +if (!window.location.origin) { + window.location.origin = ( + window.location.protocol + '//' + window.location.hostname + ( + window.location.port ? ':' + window.location.port : '' + ) + ); ...
6dc0dabebb1ce6bf419cbb53d83c42b017c467a6
src/components/datepicker/utils.js
src/components/datepicker/utils.js
import { DateUtils } from 'react-day-picker/lib/src/index'; export const convertModifiersToClassnames = (modifiers, theme) => { if (!modifiers) { return {}; } return Object.keys(modifiers).reduce((convertedModifiers, key) => { return { ...convertedModifiers, [theme[key]]: modifiers[key], ...
import { DateUtils } from 'react-day-picker/lib/src/index'; import { DateTime } from 'luxon'; export const convertModifiersToClassnames = (modifiers, theme) => { if (!modifiers) { return {}; } return Object.keys(modifiers).reduce((convertedModifiers, key) => { return { ...convertedModifiers, ...
Add util function to convert a JS date to locale string
Add util function to convert a JS date to locale string
JavaScript
mit
teamleadercrm/teamleader-ui
--- +++ @@ -1,4 +1,5 @@ import { DateUtils } from 'react-day-picker/lib/src/index'; +import { DateTime } from 'luxon'; export const convertModifiersToClassnames = (modifiers, theme) => { if (!modifiers) { @@ -18,3 +19,9 @@ const isRangeSelected = from && to; return !from || isBeforeFirstDay || isRangeSel...
30c2850e9593738f2059c4c401ac75fd7b2c87fe
src/js/route.js
src/js/route.js
var route = function(name, params = {}, absolute = true) { var domain = (namedRoutes[name].domain || baseUrl).replace(/\/+$/,'') + '/', url = (absolute ? domain : '') + namedRoutes[name].uri, paramsArrayKey = 0; return url.replace( /\{([^}]+)\}/gi, function (tag) { v...
var route = function(name, params = {}, absolute = true) { var domain = (namedRoutes[name].domain || baseUrl).replace(/\/+$/,'') + '/', url = (absolute ? domain : '') + namedRoutes[name].uri, params = typeof params !== 'object' ? [params] : params, paramsArrayKey = 0; return url.replace...
Add support for single param instead of array/object.
Add support for single param instead of array/object.
JavaScript
mit
tightenco/ziggy,tightenco/ziggy
--- +++ @@ -1,6 +1,7 @@ var route = function(name, params = {}, absolute = true) { var domain = (namedRoutes[name].domain || baseUrl).replace(/\/+$/,'') + '/', url = (absolute ? domain : '') + namedRoutes[name].uri, + params = typeof params !== 'object' ? [params] : params, paramsArrayK...
72c5934e1f5fde40ef8cdae61b205ebd91bddd3c
website/src/app/project/experiments/experiment/experiment.model.js
website/src/app/project/experiments/experiment/experiment.model.js
export class ExperimentStep { constructor(title, _type) { this.id = ''; this.title = title; this._type = _type; this.steps = []; this.description = ''; this.flags = { important: false, review: false, error: false, done: ...
export class ExperimentStep { constructor(title, _type) { this.id = ''; this.title = title; this._type = _type; this.steps = []; this.description = ''; this.flags = { important: false, review: false, error: false, done: ...
Add done flag to experiment.
Add done flag to experiment.
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -39,6 +39,7 @@ this.goal = ''; this.description = 'Look at grain size as it relates to hardness'; this.aim = ''; + this.done = false; this.steps = []; }
ba39cf7dbc7ec530d0e9556bd819f01ae97f73f3
src/helpers/collection/sort.js
src/helpers/collection/sort.js
exports.sort = function (Handlebars) { return function (array, field, options) { if (arguments.length === 1) { throw new Error('Handlebars Helper "sort" needs 1 parameter'); } options = arguments[arguments.length - 1]; if (arguments.length === 2) { field = undefined; } var results; if (field ==...
exports.sort = function (Handlebars) { return function (input, key, options) { if (arguments.length === 1) { throw new Error('Handlebars Helper "sort" needs 1 parameter'); } options = arguments[arguments.length - 1]; if (arguments.length === 2) { key = undefined; } var results = input.concat(); ...
Sort by key now confirms both inputs are objects before comparing keys.
Sort by key now confirms both inputs are objects before comparing keys.
JavaScript
mit
ChiperSoft/HandlebarsHelperHoard,ChiperSoft/HandlebarsHelperHoard
--- +++ @@ -1,6 +1,6 @@ exports.sort = function (Handlebars) { - return function (array, field, options) { + return function (input, key, options) { if (arguments.length === 1) { throw new Error('Handlebars Helper "sort" needs 1 parameter'); } @@ -8,15 +8,18 @@ options = arguments[arguments.length - 1...
ec7fa504176d692b3425a9954114189e6428c03e
src/js/ui/counter-indicator.js
src/js/ui/counter-indicator.js
export const counterIndicator = { name: 'counter', order: 5, onInit: (counterElement, pswp) => { pswp.on('change', () => { counterElement.innerHTML = (pswp.currIndex + 1) + pswp.options.indexIndicatorSep + pswp.getNumItems(); }); ...
export const counterIndicator = { name: 'counter', order: 5, onInit: (counterElement, pswp) => { pswp.on('change', () => { counterElement.innerText = (pswp.currIndex + 1) + pswp.options.indexIndicatorSep + pswp.getNumItems(); }); ...
Drop support of HTML for indexIndicatorSep option
Drop support of HTML for indexIndicatorSep option
JavaScript
mit
dimsemenov/PhotoSwipe,dimsemenov/PhotoSwipe
--- +++ @@ -3,7 +3,7 @@ order: 5, onInit: (counterElement, pswp) => { pswp.on('change', () => { - counterElement.innerHTML = (pswp.currIndex + 1) + counterElement.innerText = (pswp.currIndex + 1) + pswp.options.indexIndicatorSep ...
90405067d41afe85eaaa7d9822f40f5ec74b7881
spring-boot-admin-server-ui/modules/applications/services/applicationViews.js
spring-boot-admin-server-ui/modules/applications/services/applicationViews.js
/* * Copyright 2014 the original author or authors. * * 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 applica...
/* * Copyright 2014 the original author or authors. * * 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 applica...
Fix wrong links when listing multiple apps
Fix wrong links when listing multiple apps
JavaScript
apache-2.0
codecentric/spring-boot-admin,librucha/spring-boot-admin,joshiste/spring-boot-admin,joshiste/spring-boot-admin,codecentric/spring-boot-admin,codecentric/spring-boot-admin,librucha/spring-boot-admin,joshiste/spring-boot-admin,librucha/spring-boot-admin,joshiste/spring-boot-admin,librucha/spring-boot-admin
--- +++ @@ -15,6 +15,7 @@ */ 'use strict'; +var angular = require('angular'); module.exports = function ($state, $q) { 'ngInject'; @@ -29,18 +30,18 @@ views.forEach(function (view) { $q.when(!view.show || view.show(application)).then(function (result) { if (result) { - view.hr...
c3b3b55bcd208f66a2a6e85f1b97d822d815e803
schema/image/proxies/index.js
schema/image/proxies/index.js
module.exports = function() { return require('./embedly').apply(null, arguments); };
const { RESIZING_SERVICE } = process.env; module.exports = function() { if (RESIZING_SERVICE === 'gemini') { return require('./gemini').apply(null, arguments); } else { return require('./embedly').apply(null, arguments); } };
Configure using an ENV variable
Configure using an ENV variable
JavaScript
mit
craigspaeth/metaphysics,mzikherman/metaphysics-1,craigspaeth/metaphysics,mzikherman/metaphysics-1,1aurabrown/metaphysics,artsy/metaphysics,broskoski/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,artsy/metaphysics
--- +++ @@ -1,3 +1,9 @@ +const { RESIZING_SERVICE } = process.env; + module.exports = function() { - return require('./embedly').apply(null, arguments); + if (RESIZING_SERVICE === 'gemini') { + return require('./gemini').apply(null, arguments); + } else { + return require('./embedly').apply(null, arguments)...
fd1b91a2cc219d27318d7b72a213a41c55fd1859
dataviva/static/js/modules/help.js
dataviva/static/js/modules/help.js
$('.sidebar a').on('click', function(){ $('.sidebar a').attr('class',''); $(this).toggleClass('active'); });
$('.sidebar a').on('click', function(){ $('.sidebar a').attr('class',''); $(this).toggleClass('active'); }); $("#home .col-md-6 > .panel-heading > h2 a").on('click', function(){ $('.sidebar a').attr('class',''); $('#sidebar_' + $(this).parent().parent()[0].id).toggleClass('active'); });
Add js funtion that maps tab-content to sidebar-menu.
Add js funtion that maps tab-content to sidebar-menu.
JavaScript
mit
DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site
--- +++ @@ -2,3 +2,9 @@ $('.sidebar a').attr('class',''); $(this).toggleClass('active'); }); + + +$("#home .col-md-6 > .panel-heading > h2 a").on('click', function(){ + $('.sidebar a').attr('class',''); + $('#sidebar_' + $(this).parent().parent()[0].id).toggleClass('active'); +});
6055bc4109f4ccc582095f912bf68fb796e6d63e
public/js/chrome/toppanel.js
public/js/chrome/toppanel.js
(function () { /*global jsbin, $, $body*/ 'use strict'; if (jsbin.settings.gui === undefined) { jsbin.settings.gui = {}; } if (jsbin.settings.gui.toppanel === undefined) { jsbin.settings.gui.toppanel = true; } var removeToppanel = function() { $body.addClass('toppanel-close'); $body.remo...
(function () { /*global jsbin, $, $body, $document*/ 'use strict'; if (jsbin.settings.gui === undefined) { jsbin.settings.gui = {}; } if (jsbin.settings.gui.toppanel === undefined) { jsbin.settings.gui.toppanel = true; localStorage.setItem('settings', JSON.stringify(jsbin.settings)); } var r...
Save the state in localStorage
Save the state in localStorage
JavaScript
mit
IvanSanchez/jsbin,eggheadio/jsbin,yohanboniface/jsbin,jsbin/jsbin,vipulnsward/jsbin,KenPowers/jsbin,yize/jsbin,thsunmy/jsbin,jamez14/jsbin,martinvd/jsbin,ilyes14/jsbin,svacha/jsbin,remotty/jsbin,yize/jsbin,roman01la/jsbin,kirjs/jsbin,IvanSanchez/jsbin,yohanboniface/jsbin,mlucool/jsbin,kirjs/jsbin,filamentgroup/jsbin,mi...
--- +++ @@ -1,5 +1,5 @@ (function () { - /*global jsbin, $, $body*/ + /*global jsbin, $, $body, $document*/ 'use strict'; if (jsbin.settings.gui === undefined) { @@ -7,14 +7,19 @@ } if (jsbin.settings.gui.toppanel === undefined) { jsbin.settings.gui.toppanel = true; + localStorage.setItem('se...
0a4fba655f4030f0b4b5d244416510086c0ae419
public/main/utils/updates.js
public/main/utils/updates.js
define([ "Underscore", "yapp/yapp", "vendors/socket.io" ], function(_, yapp, io) { var logging = yapp.Logger.addNamespace("updates"); var Updates = new (yapp.Class.extend({ /* Constructor */ initialize: function() { this.url = [window.location.protocol, '//', window.locat...
define([ "Underscore", "yapp/yapp", "vendors/socket.io" ], function(_, yapp, io) { var logging = yapp.Logger.addNamespace("updates"); var Updates = new (yapp.Class.extend({ /* Constructor */ initialize: function() { this.url = [window.location.protocol, '//', window.locat...
Correct error in client for streaming
Correct error in client for streaming
JavaScript
apache-2.0
mafintosh/tv.js,thefkboss/tv.js,SamyPesse/tv.js,thefkboss/tv.js,mafintosh/tv.js,SamyPesse/tv.js,thefkboss/tv.js
--- +++ @@ -12,10 +12,10 @@ this.socket = io.connect(this.url); // Video streaming stats - this.socket.on('stats', function(data) { + this.socket.on('stats', _.bind(function(data) { //logging.log("streaming stats ", data); this.trigge...
15607d784bd426fa22789beaf42b6625e0c606c0
src/chart/candlestick/candlestickVisual.js
src/chart/candlestick/candlestickVisual.js
define(function (require) { var positiveBorderColorQuery = ['itemStyle', 'normal', 'borderColor']; var negativeBorderColorQuery = ['itemStyle', 'normal', 'borderColor0']; var positiveColorQuery = ['itemStyle', 'normal', 'color']; var negativeColorQuery = ['itemStyle', 'normal', 'color0']; return f...
define(function (require) { var positiveBorderColorQuery = ['itemStyle', 'normal', 'borderColor']; var negativeBorderColorQuery = ['itemStyle', 'normal', 'borderColor0']; var positiveColorQuery = ['itemStyle', 'normal', 'color']; var negativeColorQuery = ['itemStyle', 'normal', 'color0']; return f...
Remove layout dependency in candlestick visual
Remove layout dependency in candlestick visual
JavaScript
apache-2.0
hexj/echarts,ecomfe/echarts,ecomfe/echarts,apache/incubator-echarts,chenfwind/echarts,hexj/echarts,100star/echarts,chenfwind/echarts,hexj/echarts,starlkj/echarts,starlkj/echarts,starlkj/echarts,apache/incubator-echarts,100star/echarts
--- +++ @@ -19,7 +19,9 @@ if (!ecModel.isSeriesFiltered(seriesModel)) { data.each(function (idx) { var itemModel = data.getItemModel(idx); - var sign = data.getItemLayout(idx).sign; + var openVal = data.get('open', idx); + ...
5a98f2a4874d47da9e05a56eae3018e911fc30f1
src/components/demos/DigitalLines/index.js
src/components/demos/DigitalLines/index.js
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { PropTypes } from 'react'; class DigitalLines { static propTypes = { }; canvasRender() { }; componentDidMount() { // Get a reference to the canvas object var canvas = document.getElementById('digitalLinesCa...
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { PropTypes } from 'react'; class Line { constructor() { try { this.path = new paper.Path(); this.path.fillColor = undefined; this.path.strokeColor = 'green'; this.path.strokeWidth = 2; // Left side v...
Update to DigitalLines. Taking a slight mental transition to learn about Bezier Curves.
Update to DigitalLines. Taking a slight mental transition to learn about Bezier Curves.
JavaScript
mit
jung-digital/jd-demos,jung-digital/jd-demos
--- +++ @@ -2,7 +2,30 @@ import React, { PropTypes } from 'react'; +class Line { + constructor() { + try { + this.path = new paper.Path(); + this.path.fillColor = undefined; + this.path.strokeColor = 'green'; + this.path.strokeWidth = 2; + // Left side + var cur = new paper.Point(0, Math....
c951d161be8d2faf6e497d80e69998aa49a445bd
desktop/tests/database.spec.js
desktop/tests/database.spec.js
const assert = require('assert'); const parse = require('../app/shared/database/parse'); describe('database', () => { describe('parse.js', () => { const testQuery = 'Learn something! @3+2w !'; it('should return correct task text', () => { assert(parse(testQuery).text === 'Learn something!'); }); ...
const assert = require('assert'); const parse = require('../app/shared/database/parse'); describe('database', () => { describe('parse.js', () => { const testQuery = 'Learn something! @3+2w !'; it('should return task text', () => { assert(parse(testQuery).text === 'Learn something!'); }); it('sh...
Remove "correct" word from test titles
Remove "correct" word from test titles
JavaScript
mit
mkermani144/wanna,mkermani144/wanna
--- +++ @@ -4,19 +4,19 @@ describe('database', () => { describe('parse.js', () => { const testQuery = 'Learn something! @3+2w !'; - it('should return correct task text', () => { + it('should return task text', () => { assert(parse(testQuery).text === 'Learn something!'); }); - it('should...
b1f3c2110910665038b5d4738d225009b21530f1
plugins/knowyourmeme.js
plugins/knowyourmeme.js
var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Know Your Meme', version:'0.1', prepareImgLinks:function (callback) { var res = []; hoverZoom.urlReplace(res, 'a img.small', '/small/', '/original/' ); callback($...
var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Know Your Meme', version:'0.2', prepareImgLinks:function (callback) { var res = []; hoverZoom.urlReplace(res, 'a img.small', '/small/', '/original/' ); ...
Update for plug-in : KnowYourMeme
Update for plug-in : KnowYourMeme
JavaScript
mit
extesy/hoverzoom,extesy/hoverzoom
--- +++ @@ -1,14 +1,22 @@ var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Know Your Meme', - version:'0.1', + version:'0.2', prepareImgLinks:function (callback) { var res = []; + hoverZoom.urlReplace(res, 'a img.small', ...
7b52bf19eda8d52be5ae8db7fb1d1544912e1794
client/index.js
client/index.js
var document = require('global/document'); var value = require('observ'); var struct = require('observ-struct'); var Delegator = require('dom-delegator'); var mainLoop = require('main-loop'); var h = require('virtual-hyperscript'); var MultipleEvent = require('geval/multiple'); var changeEvent = require('value-event/ch...
var document = require('global/document'); var value = require('observ'); var struct = require('observ-struct'); var Delegator = require('dom-delegator'); var mainLoop = require('main-loop'); var h = require('virtual-hyperscript'); var MultipleEvent = require('geval/multiple'); var changeEvent = require('value-event/ch...
Change search field type to "search"
Change search field type to "search" This is like "text" except that a little "x" button appears so that one can easily clear the field. Also, on mobile browsers, the action button on the keyboard will display "Search" instead of just "Go". Old browsers will gracefully fallback to "text" anyways, so this is a progres...
JavaScript
mit
KenanY/course-search,KenanY/course-search
--- +++ @@ -32,7 +32,7 @@ var ret = []; var inputField = h('input', { - type: 'text', + type: 'search', name: 'query', value: String(state.query), 'ev-event': changeEvent(state.events.change),
4177d6050ef41c70dc25a34ee32e43984e77f461
visualizer/index.js
visualizer/index.js
'use strict' const fg = require('d3-fg') const render = require('nanohtml') const morphdom = require('morphdom') const debounce = require('debounce') const createActions = require('./actions') const createState = require('./state') const graph = require('./cmp/graph')(render) const ui = require('./cmp/ui')(render) mod...
'use strict' const fg = require('d3-fg') const render = require('nanohtml') const morphdom = require('morphdom') const debounce = require('debounce') const createActions = require('./actions') const createState = require('./state') const graph = require('./cmp/graph')(render) const ui = require('./cmp/ui')(render) mod...
Add top offset to prevent top bar from cropping the top stack
Add top offset to prevent top bar from cropping the top stack
JavaScript
mit
davidmarkclements/0x
--- +++ @@ -20,7 +20,8 @@ categorizer, tree, exclude: Array.from(exclude), - element: chart + element: chart, + topOffset: 55 }) const { colors } = flamegraph
e9bd0c16bda4221a420a9206c239e06b44a5911f
addon/index.js
addon/index.js
import Ember from 'ember'; Ember.deprecate("ember-getowner-polyfill is now a true polyfill. Use Ember.getOwner directly instead of importing from ember-getowner-polyfill", false, { id: "ember-getowner-polyfill.import" }); export default Ember.getOwner;
import Ember from 'ember'; Ember.deprecate("ember-getowner-polyfill is now a true polyfill. Use Ember.getOwner directly instead of importing from ember-getowner-polyfill", false, { id: "ember-getowner-polyfill.import", until: '3.0.0' }); export default Ember.getOwner;
Add option.until to prevent extra deprecation
Add option.until to prevent extra deprecation
JavaScript
mit
rwjblue/ember-getowner-polyfill,rwjblue/ember-getowner-polyfill
--- +++ @@ -1,7 +1,8 @@ import Ember from 'ember'; Ember.deprecate("ember-getowner-polyfill is now a true polyfill. Use Ember.getOwner directly instead of importing from ember-getowner-polyfill", false, { - id: "ember-getowner-polyfill.import" + id: "ember-getowner-polyfill.import", + until: '3.0.0' }); ex...
5ddc15870172cabe4a362fa338dd804f6b1264e2
src/components/Media/Media.js
src/components/Media/Media.js
import React from 'react'; import classnames from 'classnames'; const Media = (props) => { const children = props.children; return ( <div className={classnames('ui-media')}> {children} </div> ); }; Media.propTypes = { children: React.PropTypes.node, }; export default Media;
import React from 'react'; import classnames from 'classnames'; const Media = ({ compact, children }) => { const className = classnames('ui-media', { 'ui-media-compact': compact, }); return ( <div className={className}> {children} </div> ); }; Media.propTypes = { children: React.PropTypes...
Introduce compact prop for media component
Introduce compact prop for media component
JavaScript
mit
wundery/wundery-ui-react,wundery/wundery-ui-react
--- +++ @@ -1,11 +1,13 @@ import React from 'react'; import classnames from 'classnames'; -const Media = (props) => { - const children = props.children; +const Media = ({ compact, children }) => { + const className = classnames('ui-media', { + 'ui-media-compact': compact, + }); return ( - <div class...
85367a62999ef6be0e34556cd71d54871c98dc19
worker/index.js
worker/index.js
'use strict'; const config = require('config'); const logger = require('../modules').logger; const rollbarHelper = require('../modules').rollbarHelper; const invalidator = require('./invalidator'); const opendata = require('./opendata'); function shutdown() { logger.info('[WORKER] Ending'); setTimeout(process.ex...
'use strict'; const config = require('config'); const logger = require('../modules').logger; const mongooseHelper = require('../modules').mongooseHelper; const rollbarHelper = require('../modules').rollbarHelper; const invalidator = require('./invalidator'); const opendata = require('./opendata'); function shutdown(...
Initialize rollbar before mongoose in worker
Initialize rollbar before mongoose in worker
JavaScript
mit
carparker/carparker-server
--- +++ @@ -2,6 +2,7 @@ const config = require('config'); const logger = require('../modules').logger; +const mongooseHelper = require('../modules').mongooseHelper; const rollbarHelper = require('../modules').rollbarHelper; const invalidator = require('./invalidator'); @@ -13,8 +14,8 @@ } if (!module.pare...
49bd3bf427f57fa65a9b04bcbb5af9d654258120
providers/providers.js
providers/providers.js
var path = require('path'); var _ = require('underscore')._; module.exports = function(app, settings) { var providers = {}; for (var p in settings.providers) { // TODO :express better providers[p] = require('./' + path.join(p, 'index'))(app, settings); } app.get('/provider', function(re...
var path = require('path'); var _ = require('underscore')._; module.exports = function(app, settings) { var providers = {}; for (var p in settings.providers) { // TODO :express better providers[p] = require('./' + path.join(p, 'index'))(app, settings); } app.get('/provider', function(re...
Add comment which notes that the provider endpoint is a backbone.js collection endpoint as well.
Add comment which notes that the provider endpoint is a backbone.js collection endpoint as well.
JavaScript
bsd-3-clause
nyimbi/tilemill,mbrukman/tilemill,mbrukman/tilemill,isaacs/tilemill,mbrukman/tilemill,MappingKat/tilemill,paulovieira/tilemill-clima,Zhao-Qi/tilemill,Teino1978-Corp/Teino1978-Corp-tilemill,mbrukman/tilemill,paulovieira/tilemill-clima,nyimbi/tilemill,MappingKat/tilemill,makinacorpus/tilemill,Teino1978-Corp/Teino1978-Cor...
--- +++ @@ -13,6 +13,11 @@ provider: _.keys(settings.providers) }); }); + /** + * This endpoint is a backbone.js collection compatible REST endpoint + * providing datasource model objects. The models provided are read-only + * and cannot be created, saved or destroyed back to...
a37853c97ad9850e6bae0adf254399b3d6d29424
src/suspense.js
src/suspense.js
import { Component } from './component'; import { createElement } from './create-element'; // having a "custom class" here saves 50bytes gzipped export function s(props) {} s.prototype = new Component(); s.prototype._childDidSuspend = function(e) { this.setState({ _loading: true }); const cb = () => { this.setState(...
import { Component } from './component'; import { createElement } from './create-element'; // having a "custom class" here saves 50bytes gzipped export function s(props) {} s.prototype = new Component(); /** * @param {Promise} promise The thrown promise */ s.prototype._childDidSuspend = function(promise) { this.se...
Add some jsdoc to _childDidSuspend
Add some jsdoc to _childDidSuspend
JavaScript
mit
developit/preact,developit/preact
--- +++ @@ -4,13 +4,18 @@ // having a "custom class" here saves 50bytes gzipped export function s(props) {} s.prototype = new Component(); -s.prototype._childDidSuspend = function(e) { + +/** + * @param {Promise} promise The thrown promise + */ +s.prototype._childDidSuspend = function(promise) { this.setState({ ...
bf79820c7a37188c9e66c912eb9a66ad45ecc7ad
app/javascript/app/pages/sectors-agriculture/sectors-agricuture-selectors.js
app/javascript/app/pages/sectors-agriculture/sectors-agricuture-selectors.js
import { createSelector } from 'reselect'; // import omit from 'lodash/omit'; // import qs from 'query-string'; const getSections = routeData => routeData.route.sections || null; // const getSearch = routeData => routeData.location.search || null; // const getHash = routeData => routeData.hash || null; // const getRou...
import { createSelector } from 'reselect'; const getSections = routeData => routeData.route.sections || null; export const getAnchorLinks = createSelector([getSections], sections => sections.filter(route => route.anchor).map(route => ({ label: route.label, path: route.path, hash: route.hash, compone...
Remove commented code from agriculture selectors
Remove commented code from agriculture selectors
JavaScript
mit
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
--- +++ @@ -1,11 +1,6 @@ import { createSelector } from 'reselect'; -// import omit from 'lodash/omit'; -// import qs from 'query-string'; const getSections = routeData => routeData.route.sections || null; -// const getSearch = routeData => routeData.location.search || null; -// const getHash = routeData => route...
ed3c72146dad8baa293755c8732f3ad0ef9581f2
eloquent_js/chapter11/ch11_ex02.js
eloquent_js/chapter11/ch11_ex02.js
function Promise_all(promises) { return new Promise((resolve, reject) => { let ctr = promises.length; let resArray = []; if (ctr === 0) resolve(resArray); for (let idx = 0; idx < promises.length; ++idx) { promises[idx].then(result => { resArray[idx] = resu...
function Promise_all(promises) { return new Promise((resolve, reject) => { let result = []; let unresolved = promises.length; if (unresolved == 0) resolve(result); for (let i = 0; i < promises.length; ++i) { promises[i] .then(value => { result[i] = value; --unresolved; if (unresolved == ...
Add chapter 11, exercise 2
Add chapter 11, exercise 2
JavaScript
mit
bewuethr/ctci
--- +++ @@ -1,14 +1,17 @@ function Promise_all(promises) { - return new Promise((resolve, reject) => { - let ctr = promises.length; - let resArray = []; - if (ctr === 0) resolve(resArray); - for (let idx = 0; idx < promises.length; ++idx) { - promises[idx].then(result => { -...
334795d1f6a881f9377bb9c436641a422431153f
modules/cloud-portal-server/src/main/resources/public/static/dist/js/portal.js
modules/cloud-portal-server/src/main/resources/public/static/dist/js/portal.js
$(function() { $("form :button").each(function(){ var button = $(this); if ($(button).attr('id') == 'cancel') { $(button).click(function(e){ e.preventDefault(); history.back(); }); } else { $(button).click(function(e){ var buttonId = $(button).attr('id'); if (typeof ...
$(function() { $("form :button").each(function(){ var button = $(this); if ($(button).attr('id') == 'cancel') { $(button).click(function(e){ e.preventDefault(); history.back(); }); } else { $(button).click(function(e){ var buttonId = $(button).attr('id'); if (typeof ...
Fix for vm list ordering
Fix for vm list ordering
JavaScript
mit
chrisipa/cloud-portal,chrisipa/cloud-portal,chrisipa/cloud-portal
--- +++ @@ -49,6 +49,6 @@ $('#datatable').DataTable({ responsive: true, - order: [[ 0, 'desc' ]] + order: [[ 0, 'asc' ]] }); });
ea768085c12ef4ea8551510bd3ab606a61115967
get-file.js
get-file.js
var fs = require('fs'); var path = require('path'); var md = require('cli-md'); module.exports = function (filepath) { return md(fs.readFileSync(filepath, 'utf8')) .replace(/&#39;/g, "'") .replace(/&quot;/g, '"') .replace(/&lt;/g, '<') .replace(/&gt;/g, '<'); };
var fs = require('fs'); var path = require('path'); var md = require('cli-md'); module.exports = function (filepath) { return md(fs.readFileSync(filepath, 'utf8')) .replace(/&#39;/g, "'") .replace(/&quot;/g, '"') .replace(/&lt;/g, '<') .replace(/&gt;/g, '<'); };
Fix greate/less than HTML entity in problem description
Fix greate/less than HTML entity in problem description
JavaScript
mit
soujiro27/javascripting,ubergrafik/javascripting,SomeoneWeird/javascripting,jaredhensley/javascripting,d9magai/javascripting,montogeek/javascripting,liyuqi/javascripting,nodeschool-no/javascripting,braday/javascripting,michaelgrilo/javascripting,RichardLitt/javascripting,barberboy/javascripting,agrimm/javascripting,ymo...
c4bb41471441da921da9c2dc9515e662619fef5b
public/javascripts/checker.js
public/javascripts/checker.js
var socket = io.connect('/'); var waitMilliSec = 1000; var oldJavaCode = ''; var oldClassName = ''; socket.on('byte_code', function(data) { $('#output_bc').val(data.code); }); socket.on('wrong', function(data) { $('#output_bc').val(data.err); }); $(function() { var inputJavaCM = CodeMirror.fromTextArea(document...
var socket = io.connect('/'); var waitMilliSec = 1000; var oldJavaCode = ''; var oldClassName = ''; var outputBcCM; socket.on('byte_code', function(data) { outputBcCM.setValue(data.code); }); socket.on('wrong', function(data) { outputBcCM.setValue(data.err); }); $(function() { var inputJavaCM = CodeMirror.fromTe...
Apply CodeMirror to output textarea.
Apply CodeMirror to output textarea.
JavaScript
mit
Java2ByteCode/InstantBytecode,Java2ByteCode/InstantBytecode
--- +++ @@ -2,18 +2,22 @@ var waitMilliSec = 1000; var oldJavaCode = ''; var oldClassName = ''; - +var outputBcCM; socket.on('byte_code', function(data) { - $('#output_bc').val(data.code); + outputBcCM.setValue(data.code); }); socket.on('wrong', function(data) { - $('#output_bc').val(data.err); + outputBcCM...
4690efb9543e0fffc11c5330dc93c75482c3e9b5
kolibri/plugins/coach/assets/src/state/mutations/lessonsMutations.js
kolibri/plugins/coach/assets/src/state/mutations/lessonsMutations.js
export function SET_CLASS_LESSONS(state, lessons) { state.pageState.lessons = lessons; } export function SET_CURRENT_LESSON(state, lesson) { state.pageState.currentLesson = lesson; } export function SET_LEARNER_GROUPS(state, learnerGroups) { state.pageState.learnerGroups = learnerGroups; }
export function SET_CLASS_LESSONS(state, lessons) { state.pageState.lessons = lessons; } export function SET_CURRENT_LESSON(state, lesson) { state.pageState.currentLesson = { ...lesson }; } export function SET_LEARNER_GROUPS(state, learnerGroups) { state.pageState.learnerGroups = learnerGroups; }
Make copy before setting current lesson
Make copy before setting current lesson
JavaScript
mit
DXCanas/kolibri,christianmemije/kolibri,benjaoming/kolibri,christianmemije/kolibri,DXCanas/kolibri,lyw07/kolibri,mrpau/kolibri,mrpau/kolibri,jonboiser/kolibri,indirectlylit/kolibri,jonboiser/kolibri,indirectlylit/kolibri,benjaoming/kolibri,lyw07/kolibri,DXCanas/kolibri,benjaoming/kolibri,christianmemije/kolibri,indirec...
--- +++ @@ -3,7 +3,7 @@ } export function SET_CURRENT_LESSON(state, lesson) { - state.pageState.currentLesson = lesson; + state.pageState.currentLesson = { ...lesson }; } export function SET_LEARNER_GROUPS(state, learnerGroups) {
d6da2ba83bb7dbcdaa73f4df45927a50fe8f8e15
backend/Log.js
backend/Log.js
var Log = require("log4js"); var Utils = require("./Utils"); Log.configure({ "replaceConsole": true, "appenders": process.env.DEBUG ? [{"type": "console"}] : [ { "type": "console" }, { "type": "logLevelFilter", "level":...
var Log = require("log4js"); var Utils = require("./Utils"); Log.configure({ "replaceConsole": true, "appenders": process.env.DEBUG ? [{"type": "console"}] : [ { "type": "console" }, { "type": "logLevelFilter", "level":...
Fix for error reporting email
Fix for error reporting email
JavaScript
mit
y-a-r-g/color-themes,y-a-r-g/color-themes
--- +++ @@ -14,7 +14,7 @@ "appender": { "type": "smtp", "recipients": process.env.EMAIL, - "sender": "info@ideacolorthemes.org", + "sender": process.env.EMAIL, "sendInterval": process.env.LOG_EMAIL_IN...
d3d7932eb1c067b2a403e0260c87192940565964
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); gulp.task('mock-server', function() { nodemon({ script: 'server.js' , ext: 'js json' , env: { 'NODE_ENV': 'development' } }) });
var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); gulp.task('default', function() { nodemon({ script: 'server.js' , ext: 'js json' , env: { 'NODE_ENV': 'development' } }) });
Set gulp task as default
Set gulp task as default
JavaScript
mit
isuru88/lazymine-mock-server
--- +++ @@ -1,7 +1,7 @@ var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); -gulp.task('mock-server', function() { +gulp.task('default', function() { nodemon({ script: 'server.js' , ext: 'js json'
9765f97a3c71483ef3793b7990ec73b6909edc9c
gulpfile.js
gulpfile.js
var elixir = require('laravel-elixir'); /* |-------------------------------------------------------------------------- | Elixir Asset Management |-------------------------------------------------------------------------- | | Elixir provides a clean, fluent API for defining some basic Gulp tasks | for your Larave...
var elixir = require('laravel-elixir'); /* |-------------------------------------------------------------------------- | Elixir Asset Management |-------------------------------------------------------------------------- | | Elixir provides a clean, fluent API for defining some basic Gulp tasks | for your Larave...
Use same syntax for all assets
Use same syntax for all assets
JavaScript
mit
nestor-qa/nestor,kinow/nestor,kinow/nestor,nestor-qa/nestor,nestor-qa/nestor,nestor-qa/nestor,kinow/nestor,kinow/nestor
--- +++ @@ -14,10 +14,10 @@ elixir(function(mix) { mix.sass('app.scss'); //mix.less(''); - + mix.copy( './public/js/libs/semantic/dist/themes', - 'public/css/themes' + './public/css/themes' ); mix.styles([ @@ -28,6 +28,6 @@ // mix.scripts([ // './resources/asse...
e1fb651837436053b24b9198a5d62ba869090297
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var uglify = require('gulp-uglify'); gulp.task('default', function() { gulp.src('lib/fs.js') .pipe(uglify()) .pipe(gulp.dest('build')); });
var gulp = require('gulp'); var uglify = require('gulp-uglify'); var babel = require('gulp-babel'); var sourcemaps = require('gulp-sourcemaps'); var rename = require('gulp-rename'); gulp.task('default', function() { gulp.src('src/fs.js') .pipe(sourcemaps.init()) .pipe(babel()) .pipe(uglify()) .pipe(renam...
Update default task for compile prod code
1.2.2: Update default task for compile prod code
JavaScript
mit
wangpin34/fs-h5,wangpin34/fs-h5
--- +++ @@ -1,8 +1,15 @@ var gulp = require('gulp'); var uglify = require('gulp-uglify'); +var babel = require('gulp-babel'); +var sourcemaps = require('gulp-sourcemaps'); +var rename = require('gulp-rename'); gulp.task('default', function() { - gulp.src('lib/fs.js') + gulp.src('src/fs.js') + .pipe(sourcemap...
2e8ab65088ba8acd7ddda01e4cfc5ba0f0fcdc1a
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp') , jshint = require('gulp-jshint') , nodemon = require('gulp-nodemon') , paths ; paths = { projectScripts: ['./bin/www', '**/*.js', '!node_modules/**', '!public/**'] }; gulp.task('default', ['develop'], function () { }); gulp.task('develop', function () { nodemon(...
'use strict'; var gulp = require('gulp') , jshint = require('gulp-jshint') , nodemon = require('gulp-nodemon') , paths ; paths = { projectScripts: ['./bin/www', '**/*.js', '!node_modules/**', '!public/**'] }; gulp.task('default', ['develop'], function () { }); gulp.task('develop', function () { nodemon(...
Rename lint task to hint
Rename lint task to hint
JavaScript
mit
Hilzu/SecureChat
--- +++ @@ -15,13 +15,13 @@ gulp.task('develop', function () { nodemon({ script: 'bin/www', ext: 'js' }) - .on('change', ['lint']) + .on('change', ['hint']) .on('restart', function () { console.log('Restared!'); }); }); -gulp.task('lint', function () { +gulp.task('hint', function () { ...
83cc95b851a39cd3952fa105272a750e0a147dee
addons/notes/src/__tests__/index.js
addons/notes/src/__tests__/index.js
import addons from '@storybook/addons'; import { withNotes } from '..'; jest.mock('@storybook/addons'); describe('Storybook Addon Notes', () => { it('should inject info', () => { const channel = { emit: jest.fn() }; addons.getChannel.mockReturnValue(channel); const getStory = jest.fn(); const conte...
import addons from '@storybook/addons'; import { withNotes } from '..'; jest.mock('@storybook/addons'); describe('Storybook Addon Notes', () => { it('should inject text from `notes` parameter', () => { const channel = { emit: jest.fn() }; addons.getChannel.mockReturnValue(channel); const getStory = jes...
Update tests with new API
Update tests with new API
JavaScript
mit
rhalff/storybook,storybooks/react-storybook,storybooks/storybook,rhalff/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,rhalff/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,rhalff/storybook,storybooks/storybook,storybooks/react-story...
--- +++ @@ -4,12 +4,39 @@ jest.mock('@storybook/addons'); describe('Storybook Addon Notes', () => { - it('should inject info', () => { + it('should inject text from `notes` parameter', () => { const channel = { emit: jest.fn() }; addons.getChannel.mockReturnValue(channel); const getStory = jest...