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
6cac446d118154a2e9939f32e7f2d2ef628db82b
server/index.js
server/index.js
// To use it create some files under `routes/` // e.g. `server/routes/ember-hamsters.js` // // module.exports = function(app) { // app.get('/ember-hamsters', function(req, res) { // res.send('hello'); // }); // }; module.exports = function(app) { var globSync = require('glob').sync; var bodyParser = requ...
// To use it create some files under `routes/` // e.g. `server/routes/ember-hamsters.js` // // module.exports = function(app) { // app.get('/ember-hamsters', function(req, res) { // res.send('hello'); // }); // }; module.exports = function(app) { var globSync = require('glob').sync; var bodyParser = requ...
Add some delay to the dev api to better represent reality
Add some delay to the dev api to better represent reality
JavaScript
mit
jrjohnson/frontend,gboushey/frontend,ilios/frontend,stopfstedt/frontend,thecoolestguy/frontend,stopfstedt/frontend,djvoa12/frontend,dartajax/frontend,dartajax/frontend,gabycampagna/frontend,djvoa12/frontend,gboushey/frontend,gabycampagna/frontend,ilios/frontend,thecoolestguy/frontend,jrjohnson/frontend
--- +++ @@ -19,6 +19,9 @@ app.use(bodyParser.urlencoded({ extended: true })); + app.use(function(req,res,next){ + setTimeout(next,1000); + }); // Uncomment to log proxy requests // var morgan = require('morgan');
14620efc5cea0749966d218989592246001a3ab1
app/soc/content/js.min/templates/modules/gsoc/_survey.js
app/soc/content/js.min/templates/modules/gsoc/_survey.js
(function(){melange.template.survey=function(){};melange.template.survey.prototype=new melange.templates._baseTemplate;melange.template.survey.prototype.constructor=melange.template.survey;melange.template.survey.apply(melange.template.survey,[melange.template.survey,melange.template.survey.prototype.context])})();
melange.templates.inherit(function(){});
Add minimized version of updated script.
Add minimized version of updated script.
JavaScript
apache-2.0
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
--- +++ @@ -1 +1 @@ -(function(){melange.template.survey=function(){};melange.template.survey.prototype=new melange.templates._baseTemplate;melange.template.survey.prototype.constructor=melange.template.survey;melange.template.survey.apply(melange.template.survey,[melange.template.survey,melange.template.survey.proto...
abdcfcf3af18dd866023b4b0f4b874435197b015
src/nyc_trees/js/src/mapUtil.js
src/nyc_trees/js/src/mapUtil.js
"use strict"; var _ZOOM = { NEIGHBORHOOD: 16, MIN: 0, MAX: 19 }; module.exports = { ZOOM: Object.freeze ? Object.freeze(_ZOOM) : _ZOOM, setCenterAndZoomLL: function(map, zoom, location) { // Never zoom out, or try to zoom farther than allowed. var zoomToApply = Math.max( ...
"use strict"; var _ZOOM = { NEIGHBORHOOD: 16, MIN: 8, MAX: 19 }; module.exports = { ZOOM: Object.freeze ? Object.freeze(_ZOOM) : _ZOOM, setCenterAndZoomLL: function(map, zoom, location) { // Never zoom out, or try to zoom farther than allowed. var zoomToApply = Math.max( ...
Set a minimum zoom compatible with most viewports
Set a minimum zoom compatible with most viewports fixes #512 on github
JavaScript
agpl-3.0
azavea/nyc-trees,azavea/nyc-trees,kdeloach/nyc-trees,maurizi/nyc-trees,RickMohr/nyc-trees,kdeloach/nyc-trees,azavea/nyc-trees,kdeloach/nyc-trees,maurizi/nyc-trees,azavea/nyc-trees,RickMohr/nyc-trees,azavea/nyc-trees,maurizi/nyc-trees,kdeloach/nyc-trees,RickMohr/nyc-trees,RickMohr/nyc-trees,kdeloach/nyc-trees,maurizi/ny...
--- +++ @@ -2,7 +2,7 @@ var _ZOOM = { NEIGHBORHOOD: 16, - MIN: 0, + MIN: 8, MAX: 19 };
f26332123823f9295f50ec62899583c4931e3274
src/javascript/app_2/App/app.js
src/javascript/app_2/App/app.js
import { configure } from 'mobx'; import React from 'react'; import { render } from 'react-dom'; import Client from '_common/base/client_base'; import NetworkMonitor from 'Services/network_monitor'; import RootStore from 'Stores'; import { setStorageEvents ...
import { configure } from 'mobx'; import React from 'react'; import { render } from 'react-dom'; import Client from '_common/base/client_base'; import BinarySocket from '_common/base/socket_base'; import NetworkMonitor from 'Services/network_monitor'; import R...
Add a wait to get authorize response before initial trade page
Add a wait to get authorize response before initial trade page
JavaScript
apache-2.0
4p00rv/binary-static,ashkanx/binary-static,binary-com/binary-static,ashkanx/binary-static,kellybinary/binary-static,binary-com/binary-static,4p00rv/binary-static,kellybinary/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,kellybinary...
--- +++ @@ -2,6 +2,7 @@ import React from 'react'; import { render } from 'react-dom'; import Client from '_common/base/client_base'; +import BinarySocket from '_common/base/socket_base'; import NetworkMonitor from 'Services/network_monitor'; import RootStore ...
18dbcfa13ba598b97b3396f90bef0833954eb5bb
src/Rectangle.js
src/Rectangle.js
import Shape from 'kittik-shape-basic'; /** * Implements rectangle shape with text support. * * @since 1.0.0 * @version 1.0.0 */ export default class Rectangle extends Shape { render(cursor) { let text = this.getText(); let width = this.getWidth(); let height = this.getHeight(); let x1 = this.ge...
import Shape from 'kittik-shape-basic'; /** * Implements rectangle shape with text support. * * @since 1.0.0 * @version 1.0.0 */ export default class Rectangle extends Shape { render(cursor) { let text = this.getText(); let width = this.getWidth(); let height = this.getHeight(); let x1 = this.ge...
Simplify logic where calculates coordinates
fix(shape): Simplify logic where calculates coordinates
JavaScript
mit
kittikjs/shape-rectangle
--- +++ @@ -13,8 +13,8 @@ let height = this.getHeight(); let x1 = this.getX(); let y1 = this.getY(); - let x2 = x1 + width - 1; - let y2 = y1 + height - 1; + let x2 = x1 + width; + let y2 = y1 + height; let background = this.getBackground(); let foreground = this.getForeground(); ...
225b84d3d19c7d4129c13fb7f18c3dd908fefa08
constants/data.js
constants/data.js
export const GAMES = { 'board1': { 'words': ['one', 'two', 'three'], 'board': [ ['o', 'n', 'e', '-', '-', '-'], ['t', 'w', 'o', '-', '-', '-'], ['t', 'h', 'r', 'e', 'e', '-'], ['-', '-', '-', '-', '-', '-'], ['-', '-', '-', '-', '-', '-'], ...
export const GAMES = { 'wordSet1': { 'words': ['one', 'two', 'three', 'four','five','six','seven','eight','nine','ten'], 'board': [ ['o', 'n', 'e', '-', '-', '-'], ['t', 'w', 'o', '-', '-', '-'], ['t', 'h', 'r', 'e', 'e', '-'], ['-', '-', '-', '-', '-'...
Refactor of bard identifier names
Refactor of bard identifier names
JavaScript
apache-2.0
paulbevis/wordsearch,paulbevis/wordsearch
--- +++ @@ -1,6 +1,6 @@ export const GAMES = { - 'board1': { - 'words': ['one', 'two', 'three'], + 'wordSet1': { + 'words': ['one', 'two', 'three', 'four','five','six','seven','eight','nine','ten'], 'board': [ ['o', 'n', 'e', '-', '-', '-'], ['t', 'w', 'o', '-',...
85b7bf880a8ecccdd8c732f79fea73db403d237a
src/Reporter.js
src/Reporter.js
const Report = require('./Report'); const Hipchat = require('./Hipchat'); function Reporter( request, reply ) { console.log(request.query); return reply({}); } module.exports = Reporter;
const Report = require('./Report'); const Notification = require('./Notification'); async function Reporter( request, reply ) { const result = await new Report({ k: process.env.WEB_PAGE_TEST_KEY || '', url: request.query.site, }).run(); // Set error as default. let notificationOptions = { statu...
Add reporter and notifications setup
Add reporter and notifications setup
JavaScript
mit
wearenolte/lighthouse-reporter
--- +++ @@ -1,9 +1,31 @@ const Report = require('./Report'); -const Hipchat = require('./Hipchat'); +const Notification = require('./Notification'); -function Reporter( request, reply ) { - console.log(request.query); - return reply({}); +async function Reporter( request, reply ) { + + const result = await new ...
a389a4e8807cabced1a08e4ee3c6798dd4e34ea9
memory-store.js
memory-store.js
var SortedArray = require('sorted-array') var compareTime = require('./compare-time') function compareCreated (a, b) { return compareTime(b[1].created, a[1].created) } function compareAdded (a, b) { return b[1].added - a[1].added } /** * Simpliest memory-based events store. * * It is good for tests, but not ...
var SortedArray = require('sorted-array') var compareTime = require('./compare-time') function compareCreated (a, b) { return compareTime(b[1].created, a[1].created) } /** * Simpliest memory-based events store. * * It is good for tests, but not for server or client usage, * because it doesn’t save events to fi...
Use simple array for added index in MemoryStore
Use simple array for added index in MemoryStore
JavaScript
mit
logux/logux-core
--- +++ @@ -4,10 +4,6 @@ function compareCreated (a, b) { return compareTime(b[1].created, a[1].created) -} - -function compareAdded (a, b) { - return b[1].added - a[1].added } /** @@ -28,24 +24,32 @@ */ function MemoryStore () { this.created = new SortedArray([], compareCreated) - this.added = new ...
5f468801d91b156d8d04b3a81c7dd234b44173db
index.js
index.js
'use strict'; var request = require('request'); var symbols = require('log-symbols'); module.exports = function(domain, callback){ var path = 'https://domainr.com/api/json/search?q='+domain+'&client_id=avail'; request(path, function (error, response, body) { var results = JSON.parse(body); results = resu...
'use strict'; var request = require('request'); var symbols = require('log-symbols'); module.exports = function(domain, callback){ var path = 'https://api.domainr.com/v1/api/json/search?q='+domain+'&client_id=avail'; request(path, function (error, response, body) { var results = JSON.parse(body); results...
Update to new v1 endpoint
Update to new v1 endpoint We're moving to a versioned API endpoint. Thanks!
JavaScript
mit
srn/avail
--- +++ @@ -4,7 +4,7 @@ var symbols = require('log-symbols'); module.exports = function(domain, callback){ - var path = 'https://domainr.com/api/json/search?q='+domain+'&client_id=avail'; + var path = 'https://api.domainr.com/v1/api/json/search?q='+domain+'&client_id=avail'; request(path, function (error, ...
c122d6e2a45c90212a2197da2359fdf2bfc5066e
index.js
index.js
'use strict'; const express = require('express'); const app = express(); const bodyParser = require('body-parser'); const morgan = require('morgan'); const port = 8080; const router = express.Router(); const routes = require('./routes'); app.use(bodyParser.urlencoded({ extended: false }...
'use strict'; const express = require('express'); const app = express(); const bodyParser = require('body-parser'); const morgan = require('morgan'); const port = process.env.PORT || 8080; const router = express.Router(); const routes = require('./routes'); app.use(bodyParser.urlencoded({...
Add the ability for the port to be set by environment variables
Add the ability for the port to be set by environment variables
JavaScript
mit
andela-oolutola/document-management-system-api
--- +++ @@ -4,12 +4,10 @@ const app = express(); const bodyParser = require('body-parser'); const morgan = require('morgan'); -const port = 8080; - +const port = process.env.PORT || 8080; const router = express.Router(); const routes = require('./routes'); - app.use(bodyParser...
da68f92fdbc2d4512b01ac5985f3d221bcd4a6bb
index.js
index.js
module.exports = { extends: 'stylelint-config-standard', plugins: ['stylelint-order', 'stylelint-scss'], rules: { 'at-rule-empty-line-before': [ 'always', { except: ['inside-block', 'blockless-after-blockless', 'first-nested'], ignore: ['after-comment'] } ], 'at-rule-...
module.exports = { extends: 'stylelint-config-standard', plugins: ['stylelint-order', 'stylelint-scss'], rules: { 'at-rule-empty-line-before': [ 'always', { except: ['inside-block', 'blockless-after-blockless', 'first-nested'], ignore: ['after-comment'] } ], 'at-rule-...
Add include to be ignored
Add include to be ignored
JavaScript
mit
italodr/stylelint-config-runroom
--- +++ @@ -12,13 +12,13 @@ 'at-rule-no-unknown': [ true, { - ignoreAtRules: ['extend', 'content', 'if', 'else', 'mixin', 'function', 'return'] + ignoreAtRules: ['extend', 'content', 'if', 'else', 'mixin', 'function', 'return', 'include'] } ], 'block-closing-brace-new...
2cd216ece7d96af562fcf3679d190042a725ff27
index.js
index.js
var fs = require('fs'); var Jafar = function(opts) { var that = this; if (!opts.json || (typeof(opts.json) !== 'object' && typeof(opts.json) !== 'string')) { throw new Error('You must pass a reference to a valid JSON object/file into Jafar constructor!'); } this.json = (typeof(opts.json) === ...
var fs = require('fs'); var Jafar = function(opts) { var that = this, // TODO: would need error handling to ensure opts exists at all inputJson = opts.json ? opts.json : null; if (!inputJson || (typeof(inputJson) !== 'object' && typeof(inputJson) !== 'string')) { throw new Error('You m...
Reduce redundancy with opts object
Reduce redundancy with opts object
JavaScript
mit
jkymarsh/jafar
--- +++ @@ -1,16 +1,18 @@ var fs = require('fs'); var Jafar = function(opts) { - var that = this; + var that = this, + // TODO: would need error handling to ensure opts exists at all + inputJson = opts.json ? opts.json : null; - if (!opts.json || (typeof(opts.json) !== 'object' && typeof(...
b09e4ffc14571cd9679800f1ba02cc7bc728e687
index.js
index.js
'use strict'; var isStream = require('is-stream'); var matchCondition = require('match-condition'); var peekStream = require('peek-stream'); var through = require('through2'); module.exports = function (condition, stream, fn, opts) { opts = opts || {}; if (fn && !isStream(fn) && typeof fn !== 'function') { opts =...
'use strict'; var isStream = require('is-stream'); var matchCondition = require('match-condition'); var peekStream = require('peek-stream'); var through = require('through2'); module.exports = function (condition, stream, fn, opts) { opts = opts || {}; if (fn && !isStream(fn) && typeof fn !== 'function') { opts =...
Check if `stream` is a function
Check if `stream` is a function
JavaScript
mit
kevva/if-stream
--- +++ @@ -22,7 +22,7 @@ return; } - swap(null, stream()); + swap(null, typeof stream === 'function' ? stream() : stream); }); return peek;
b1e3a3c32000690495bacc4d11189b15aa740932
client/app.js
client/app.js
(function() { 'use strict'; angular .module('weatherApp', ['ngRoute']) .config(config); function config($routeProvider) { $routeProvider .when('/', { templateUrl: 'components/home/home.view.html', controller: 'HomeCtrl', c...
(function() { 'use strict'; angular .module('weatherApp', ['ngRoute']) .config(['$routeProvider'], config); function config($routeProvider) { $routeProvider .when('/', { templateUrl: 'components/home/home.view.html', controller: 'HomeCtrl...
Add inline annotation to config
Add inline annotation to config
JavaScript
mit
cpanz/Angular_Weather,cpanz/Angular_Weather
--- +++ @@ -3,7 +3,7 @@ angular .module('weatherApp', ['ngRoute']) - .config(config); + .config(['$routeProvider'], config); function config($routeProvider) { $routeProvider
60e2a7db670003f8f49b786a69be0b16992993a6
example/simple.js
example/simple.js
var zmqbus = require('../lib/index.js'); /* simple quote sender/reader. Run multiple processes to send/receive cluster-wide. */ var node = zmqbus.createNode(); node.on('ready', function() { // subscribe to equity channel node.subscribe("equity"); setInterval(fakeEquityQuote, 1000); // uncomment th...
var zmqbus = require('zmqbus'); /* simple quote sender/reader. Run multiple processes to send/receive cluster-wide. */ var node = zmqbus.createNode(); node.on('ready', function() { // subscribe to equity channel node.subscribe("equity"); setInterval(fakeEquityQuote, 1000); // uncomment the followi...
Fix example to use the right module name
Fix example to use the right module name
JavaScript
mit
edwardchoh/zmqbus-node
--- +++ @@ -1,4 +1,4 @@ -var zmqbus = require('../lib/index.js'); +var zmqbus = require('zmqbus'); /* simple quote sender/reader. Run multiple processes to send/receive cluster-wide.
f9df796731fe97fb1c9d6487a25b3dee6a9c7524
server/server.js
server/server.js
'use strict'; const express = require('express'); // Constants const PORT = 8080; // App const app = express(); app.get('/', function (req, res) { res.send('Hello world\n'); }); app.listen(PORT); console.log('Running on http://localhost:' + PORT);
require('dotenv').config(); const bodyParser = require('body-parser'); const metadata = require('../package.json'); const compression = require('compression'); const express = require('express'); const path = require('path'); const redis = require('redis'); const sharp = require('sharp'); const utils = require('./lib/...
Add npm modules and set up middleware
Add npm modules and set up middleware
JavaScript
mit
francoabaroa/happi,francoabaroa/happi
--- +++ @@ -1,15 +1,56 @@ -'use strict'; +require('dotenv').config(); +const bodyParser = require('body-parser'); +const metadata = require('../package.json'); +const compression = require('compression'); +const express = require('express'); +const path = require('path'); +const redis = require('redis'); +const sharp...
e8306057a65889f384caa24933c71f8c8ec71854
src/server/boot/root.js
src/server/boot/root.js
module.exports = function(server) { // Install a `/` route that returns server status var router = server.loopback.Router(); router.get('/', server.loopback.status()); server.use(router); };
module.exports = function(server) { // Install a `/` route that returns server status var router = server.loopback.Router(); //router.get('/', server.loopback.status()); // loopback default router, change it to do production work router.get('/', function(req, res) { res.sendfile('client/public/index.html');...
Change default action of path '/', send index.html file.
Change default action of path '/', send index.html file.
JavaScript
mit
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
--- +++ @@ -1,6 +1,9 @@ module.exports = function(server) { // Install a `/` route that returns server status var router = server.loopback.Router(); - router.get('/', server.loopback.status()); + //router.get('/', server.loopback.status()); // loopback default router, change it to do production work + route...
49c652b034e8f2c9238282c67e0c3394e6165382
public/javascripts/pages/index.js
public/javascripts/pages/index.js
function proceedSignin() { 'use strict'; event.preventDefault(); var emailField = document.getElementById('email'), passwordField = document.getElementById('password'); var user = { username: emailField.value, password: passwordField.value } var xhr = new XMLHttpReque...
function proceedSignin() { 'use strict'; event.preventDefault(); var emailField = document.getElementById('email'), passwordField = document.getElementById('password'); var user = { username: emailField.value, password: passwordField.value } var xhr = new XMLHttpReque...
Add parameters to /signin (POST) request header
Add parameters to /signin (POST) request header
JavaScript
mit
sea-battle/sea-battle,sea-battle/sea-battle
--- +++ @@ -27,6 +27,7 @@ xhr.open('POST', '/signin', true); xhr.setRequestHeader('content-type', 'application/json; charset=utf-8'); + xhr.setRequestHeader('x-requested-with', 'XMLHttpRequest'); xhr.send(JSON.stringify(user)); }
859dbe0e2bc5a322633f7323b1ff9fe638624c9f
app/assets/javascripts/remote_consoles/vnc.js
app/assets/javascripts/remote_consoles/vnc.js
//= require jquery //= require novnc-rails //= require_tree ../locale //= require gettext/all $(function() { var host = window.location.hostname; var encrypt = window.location.protocol === 'https:'; var port = encrypt ? 443 : 80; if (window.location.port) { port = window.location.port; } // noVNC requ...
//= require jquery //= require novnc-rails //= require_tree ../locale //= require gettext/all $(function() { var host = window.location.hostname; var encrypt = window.location.protocol === 'https:'; var port = encrypt ? 443 : 80; if (window.location.port) { port = window.location.port; } // noVNC requ...
Fix VNC console connection to Windows VMs and Ctrl-Alt-Del button
Fix VNC console connection to Windows VMs and Ctrl-Alt-Del button https://bugzilla.redhat.com/show_bug.cgi?id=1464152
JavaScript
apache-2.0
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
--- +++ @@ -34,6 +34,9 @@ }, }); - $('#ctrlaltdel').click(vnc.sendCtrlAltDel); vnc.connect(host, port, $('#remote-console').attr('data-secret'), $('#remote-console').attr('data-url')); + + $('#ctrlaltdel').on('click', function(){ + vnc.sendCtrlAltDel(); + }); });
0a46deb294a7c093997a4cf2d4d7188e9ef02424
sources/openfisca.js
sources/openfisca.js
<openfisca> <p>la variable <input required type="text" name="query" placeholder="al.R1.taux1" value={ opts.value } onchange={ getDescription }> dans Openfisca ({ description })</p> <script> getDescription() { var url = 'http://api.openfisca.fr/api/1/parameters?name=' + this.query.value; fetch(url) .the...
<openfisca> <p>la variable <input required type="text" name="query" placeholder="nb_pac" value={ opts.value } onchange={ getDescription }> dans Openfisca ({ description })</p> <script> getDescription() { var url = 'http://api.openfisca.fr/api/1/variables?name=' + this.query.value; fetch(url) .then(func...
Use variables instead of params
Use variables instead of params
JavaScript
agpl-3.0
MattiSG/alignements-loi,MattiSG/alignements-loi
--- +++ @@ -1,15 +1,15 @@ <openfisca> <p>la variable - <input required type="text" name="query" placeholder="al.R1.taux1" value={ opts.value } onchange={ getDescription }> + <input required type="text" name="query" placeholder="nb_pac" value={ opts.value } onchange={ getDescription }> dans Openfisca ({ descripti...
a0abf6b63572189fe3e3c06cf6c89e621958cb40
app/reducers/frontpage.js
app/reducers/frontpage.js
import moment from 'moment-timezone'; import { Frontpage } from 'app/actions/ActionTypes'; import { fetching } from 'app/utils/createEntityReducer'; import { sortBy } from 'lodash'; import { createSelector } from 'reselect'; import { selectArticles } from './articles'; import { selectEvents } from './events'; export d...
import moment from 'moment-timezone'; import { Frontpage } from 'app/actions/ActionTypes'; import { fetching } from 'app/utils/createEntityReducer'; import { sortBy } from 'lodash'; import { createSelector } from 'reselect'; import { selectArticles } from './articles'; import { selectEvents } from './events'; export d...
Make event sorting stable and deterministic
Make event sorting stable and deterministic
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
--- +++ @@ -17,6 +17,7 @@ documentType: 'article' })); events = events.map(event => ({ ...event, documentType: 'event' })); + const now = moment(); return sortBy(articles.concat(events), [ // Always sort pinned items first: item => !item.pinned, @@ -24,7 +25,7 @@ // For...
4b09a703eecc3f5517dc70e51ee7abf8100fee87
src/util/update-notification.js
src/util/update-notification.js
const updateNotification = () => { document.addEventListener('DOMContentLoaded', () => { if (Notification.permission !== 'granted') { Notification.requestPermission() } }) if (!Notification) { alert( 'Desktop notifications not available in your browser. Try Ch...
const updateNotification = () => { browser.notifications.create({ type: 'basic', title: 'NEW FEATURE: Tagging', iconUrl: '/img/worldbrain-logo-narrow.png', message: 'Click for more Information', buttons: [{ title: 'Click for more Information' }], }) browser.notificat...
Change Notification API when extension updated
Change Notification API when extension updated
JavaScript
mit
WorldBrain/WebMemex,WorldBrain/WebMemex
--- +++ @@ -1,28 +1,16 @@ const updateNotification = () => { - document.addEventListener('DOMContentLoaded', () => { - if (Notification.permission !== 'granted') { - Notification.requestPermission() - } + browser.notifications.create({ + type: 'basic', + title: 'NEW FEATU...
3915cb47073b63826a539ef344b1580a4310dcc7
gatsby-browser.js
gatsby-browser.js
import { anchorate } from "anchorate"; const subRoutes = ["/", "/team", "/work", "/contact"]; const isHomeRoute = route => subRoutes.indexOf(route) !== -1; exports.onRouteUpdate = props => { // anchorate({ // scroller: el => el.scrollIntoView({ behavior: 'smooth' }) // }) // if (isHomeRoute(props.location....
import { anchorate } from "anchorate"; const subRoutes = ["/", "/team", "/work", "/contact"]; const isHomeRoute = route => subRoutes.indexOf(route) !== -1; exports.onRouteUpdate = props => { // anchorate({ // scroller: el => el.scrollIntoView({ behavior: 'smooth' }) // }) // if (isHomeRoute(props.location....
Bring back the IO polyfill.
Bring back the IO polyfill.
JavaScript
mit
makersden/homepage,makersden/homepage
--- +++ @@ -28,6 +28,6 @@ // return isHomeRoute(history.location.pathname) && isHomeRoute(location.pathname) // } -// exports.onClientEntry = () => { -// require("intersection-observer"); -// }; +exports.onClientEntry = () => { + require("intersection-observer"); +};
8906ef023343ac92cdb7eb0b2835acf1d06fbef2
bin/extract_references.js
bin/extract_references.js
#!/usr/bin/env node var readline = require('readline'); var bcv_parser = require('bible-passage-reference-parser/js/tr_bcv_parser').bcv_parser; var bcv = new bcv_parser(); bcv.set_options({ 'sequence_combination_strategy': 'separate' }); bcv.include_apocrypha(true); var rl = readline.createInterface({ input: pro...
#!/usr/bin/env node var readline = require('readline'); var bcv_parser = require('bible-passage-reference-parser/js/tr_bcv_parser').bcv_parser; var bcv = new bcv_parser(); var formatter = require('bible-reference-formatter/es6/en'); bcv.set_options({ 'sequence_combination_strategy': 'separate' }); bcv.include_apocr...
Add reformatted (EN) verse references to dump
Add reformatted (EN) verse references to dump
JavaScript
agpl-3.0
alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile
--- +++ @@ -3,6 +3,7 @@ var readline = require('readline'); var bcv_parser = require('bible-passage-reference-parser/js/tr_bcv_parser').bcv_parser; var bcv = new bcv_parser(); +var formatter = require('bible-reference-formatter/es6/en'); bcv.set_options({ 'sequence_combination_strategy': 'separate' @@ -23,6 ...
104b3f4f49f64fa66ef4bb03f0d01bb36013edfa
app/components/HomePage/ListView/ListViewport.js
app/components/HomePage/ListView/ListViewport.js
import {ToolViewport} from '../Tools'; import styled from 'styled-components'; export default styled(ToolViewport)` background-color: none; padding: 0 10px 0 50px; position: relative; &::before{ content: ' '; width: 53px; height: 1px; border-bottom: 2px solid; position: absolute; top: 0...
import {ToolViewport} from '../Tools'; import styled from 'styled-components'; export default styled(ToolViewport)` background-color: none; padding: 0; padding-${props=>props.theme.isArabic?'left':'right'}: 30px; padding-${props=>props.theme.isArabic?'right':'left'}: 17px; position: relative; &::before{ ...
Fix on List View issues
Fix on List View issues
JavaScript
mit
BeautifulTrouble/beautifulrising-client,BeautifulTrouble/beautifulrising-client
--- +++ @@ -2,7 +2,10 @@ import styled from 'styled-components'; export default styled(ToolViewport)` background-color: none; - padding: 0 10px 0 50px; + padding: 0; + padding-${props=>props.theme.isArabic?'left':'right'}: 30px; + padding-${props=>props.theme.isArabic?'right':'left'}: 17px; + position: re...
1118e45e1a3a9803244eede35f6bf786fa1b65ca
blockblockadblock.user.js
blockblockadblock.user.js
// ==UserScript== // @name blockblockadblock // @namespace Mechazawa // @include https://blockadblock.com/* // @version 1 // @grant none // @run-at document-start // ==/UserScript== // This is very dirty and should not be used // I've found a more reliable vuln that I'll be exploiting soo...
// ==UserScript== // @name blockblockadblock // @namespace Mechazawa // @include https://blockadblock.com/* // @include https://mindgamer.com/* // @version 1 // @grant none // @run-at document-start // ==/UserScript== // This is very dirty and should not be used // I've found a more r...
Check for identifier in BlockAdBlock source before deleteing
Check for identifier in BlockAdBlock source before deleteing
JavaScript
unlicense
Mechazawa/BlockBlockAdBlock
--- +++ @@ -2,6 +2,7 @@ // @name blockblockadblock // @namespace Mechazawa // @include https://blockadblock.com/* +// @include https://mindgamer.com/* // @version 1 // @grant none // @run-at document-start @@ -13,16 +14,32 @@ // I've found a more reliable vuln that I'll be explo...
6227f11cf2b3847d8e9b18abf4f449dccdec9009
postcss.config.js
postcss.config.js
const postcssImport = require('postcss-import'); const nesting = require('postcss-nesting'); const autoprefixer = require('autoprefixer'); const csswring = require('csswring'); module.exports = { plugins: [ postcssImport(), nesting(), autoprefixer({ browsers: [ 'last 2 versions', 'n...
const postcssImport = require('postcss-import'); const nesting = require('postcss-nesting'); const autoprefixer = require('autoprefixer'); const csswring = require('csswring'); module.exports = { plugins: [ postcssImport(), nesting(), autoprefixer({ browsers: [ 'last 1 version', 'no...
Set Autoprefixer's targets to 'last 1 version
Set Autoprefixer's targets to 'last 1 version
JavaScript
mit
nodaguti/word-quiz-generator-webapp,nodaguti/word-quiz-generator-webapp
--- +++ @@ -9,7 +9,7 @@ nesting(), autoprefixer({ browsers: [ - 'last 2 versions', + 'last 1 version', 'not ie <= 11', 'not ie_mob <= 11', ],
98548f8330696e009a1e81af2d9b234d950c1d3f
tasks/htmlmin.js
tasks/htmlmin.js
/* * grunt-contrib-htmlmin * http://gruntjs.com/ * * Copyright (c) 2012 Sindre Sorhus, contributors * Licensed under the MIT license. */ 'use strict'; module.exports = function (grunt) { var minify = require('html-minifier').minify; var helper = require('grunt-lib-contrib').init(grunt); grunt.registerMul...
/* * grunt-contrib-htmlmin * http://gruntjs.com/ * * Copyright (c) 2012 Sindre Sorhus, contributors * Licensed under the MIT license. */ 'use strict'; module.exports = function (grunt) { var minify = require('html-minifier').minify; var helper = require('grunt-lib-contrib').init(grunt); grunt.registerMul...
Stop executing when minify throws
Stop executing when minify throws Fixes #16
JavaScript
mit
gruntjs/grunt-contrib-htmlmin,gruntjs/grunt-contrib-htmlmin
--- +++ @@ -17,6 +17,7 @@ grunt.verbose.writeflags(options, 'Options'); this.files.forEach(function (file) { + var min; var max = file.src.filter(function (filepath) { // Warn on and remove invalid source files (if nonull was set). if (!grunt.file.exists(filepath)) { @@ -29,7...
49b917705a28898398b388e3398ac95c14636985
test/compiler.js
test/compiler.js
var should = require('should'); var QueryCompiler = require('../lib/compiler'); describe('QueryCompiler', function () { describe.only('compile', function () { it('compile ne null query', function () { var query = { attachmentId: { $ne: null } }; var compiler = new QueryCompiler(); ...
var should = require('should'); var QueryCompiler = require('../lib/compiler'); describe('QueryCompiler', function () { describe('compile', function () { it('compile ne null query', function () { var query = { attachmentId: { $ne: null } }; var compiler = new QueryCompiler(); shou...
Remove .only from test case
Remove .only from test case
JavaScript
mit
surikaterna/kuery
--- +++ @@ -2,7 +2,7 @@ var QueryCompiler = require('../lib/compiler'); describe('QueryCompiler', function () { - describe.only('compile', function () { + describe('compile', function () { it('compile ne null query', function () { var query = { attachmentId: { $ne: null }
a7dbce88aceca898c578a7fee62644feb9e07fd2
test/examples.js
test/examples.js
var polyline = require( '..' ) var assert = require( 'assert' ) suite( 'Google Polyline Example', function() { test( 'encode', function() { var points = [ [ 38.5, -120.2 ], [ 40.7, -120.95 ], [ 43.252, -126.453 ] ] var encoded = polyline.encode( points ) assert.equal( encoded, '...
var polyline = require( '..' ) var assert = require( 'assert' ) suite( 'Google Polyline Example', function() { test( 'encode', function() { var points = [ [ 38.5, -120.2 ], [ 40.7, -120.95 ], [ 43.252, -126.453 ] ] var encoded = polyline.encode( points ) assert.equal( encoded, '...
Update test: Add decoding test
Update test: Add decoding test
JavaScript
mit
code42day/google-polyline
--- +++ @@ -17,6 +17,17 @@ }) - test( 'decode' ) + test( 'decode', function() { + + var points = polyline.decode( '_p~iF~ps|U_ulLnnqC_mqNvxq`@' ) + var decoded = [ + [ 38.5, -120.2 ], + [ 40.7, -120.95 ], + [ 43.252, -126.453 ] + ] + + assert.deepEqual( points, decoded ) + + }) ...
753359fde8e0868df5a67e79e74c8ea5076c83aa
sort-stack.js
sort-stack.js
"use strict"; // Program that sorts a stack such that smallest items are on top // create Stack class function Stack() { this.top = null; } // push value into stack Stack.prototype.push = function(val) { this.top = { data: val, next: this.top }; }; // pop value from stack Stack.prototype.pop = function() { ...
"use strict"; // Program that sorts a stack such that smallest items are on top // create Stack class function Stack() { this.top = null; } // push value into stack Stack.prototype.push = function(val) { this.top = { data: val, next: this.top }; }; // pop value from stack Stack.prototype.pop = function() { ...
Add comments and pseudocode to sort function
Add comments and pseudocode to sort function
JavaScript
mit
derekmpham/interview-prep,derekmpham/interview-prep
--- +++ @@ -28,14 +28,18 @@ // sort stack in ascending order (main function in exercise) Stack.prototype.sort = function() { + // create output stack var stackTwo = new Stack(); + while(this.top) { var placeHolder = this.pop(); while(stackTwo.top && stackTwo.top.data > placeHolder) { + // push the...
7cfc6ee461d82c5ccc60d59d07daf99c392eb860
style.js
style.js
module.exports = { plugins: [ "filenames", "prettier" ], rules: { // ERRORS // No more bikeshedding on style; just use prettier // https://github.com/not-an-aardvark/eslint-plugin-prettier "prettier/prettier": ["error", { useTabs: true }], // enforce lowercase kebab case for filenames // we have ha...
module.exports = { plugins: [ "filenames", "prettier" ], rules: { // ERRORS // No more bikeshedding on style; just use prettier // https://github.com/not-an-aardvark/eslint-plugin-prettier "prettier/prettier": ["error", { useTabs: true }], // enforce lowercase kebab case for filenames // we have ha...
Add back missing comment rule
Add back missing comment rule Prettier doesn't enforce anything in regards to comments
JavaScript
mit
civicsource/eslint-config-civicsource
--- +++ @@ -19,6 +19,10 @@ // http://eslint.org/docs/rules/prefer-template "prefer-template": ["error"], + // put a space after the comment slashes + // http://eslint.org/docs/rules/spaced-comment + "spaced-comment": ["error", "always"], + // =============================================================...
75af8619cba3e665419965d4a4108e61d202e857
public/js/main.js
public/js/main.js
var server = io.connect('http://'+window.location.host); $('#name').on('submit', function(e){ e.preventDefault(); $(this).hide(); $('#chat_form').show(); var name = $('#name_input').val() server.emit('join', name) $('#status').text('Status: Connected to chat') }); $('#chat_form').on('submit', function(e){ ...
var server = io.connect('https://'+window.location.host); $('#name').on('submit', function(e){ e.preventDefault(); $(this).hide(); $('#chat_form').show(); var name = $('#name_input').val() server.emit('join', name) $('#status').text('Status: Connected to chat') }); $('#chat_form').on('submit', function(e){ ...
Change http back to https
Change http back to https
JavaScript
mit
lawyu89/Simple_Chatroom,lawyu89/Simple_Chatroom
--- +++ @@ -1,4 +1,4 @@ -var server = io.connect('http://'+window.location.host); +var server = io.connect('https://'+window.location.host); $('#name').on('submit', function(e){ e.preventDefault(); $(this).hide();
b3f0e0245ba31e22d21c42852c79ece24e052597
src/text/Text.js
src/text/Text.js
import React, { PropTypes } from 'react'; import { Text, StyleSheet, Platform } from 'react-native'; import fonts from '../config/fonts'; import normalize from '../helpers/normalizeText'; let styles = {}; const TextElement = ({style, children, h1, h2, h3, h4, fontFamily}) => ( <Text style={[ styles.text, ...
import React, { PropTypes } from 'react'; import { Text, StyleSheet, Platform } from 'react-native'; import fonts from '../config/fonts'; import normalize from '../helpers/normalizeText'; TextElement.propTypes = { style: PropTypes.any, h1: PropTypes.bool, h2: PropTypes.bool, h3: PropTypes.bool, h4: PropTypes.bool...
Use ES6 spread forf rest of the props
Use ES6 spread forf rest of the props In reference to #247
JavaScript
mit
kosiakMD/react-native-elements,martinezguillaume/react-native-elements,react-native-community/React-Native-Elements,kosiakMD/react-native-elements
--- +++ @@ -2,25 +2,6 @@ import { Text, StyleSheet, Platform } from 'react-native'; import fonts from '../config/fonts'; import normalize from '../helpers/normalizeText'; - -let styles = {}; - -const TextElement = ({style, children, h1, h2, h3, h4, fontFamily}) => ( - <Text - style={[ - styles.text, - ...
4516a7ced770f11f0febe8aec0615ddbb8f6674b
src/modules/ngSharepoint/app.js
src/modules/ngSharepoint/app.js
angular .module('ngSharepoint', []) .run(function($sp, $spLoader) { if ($sp.getAutoload()) { if ($sp.getConnectionMode() === 'JSOM') { $spLoader.loadScripts('SP.Core', ['//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js', 'SP.Runtime.js', 'SP.js']); ...
angular .module('ngSharepoint', []) .run(function($sp, $spLoader) { if ($sp.getAutoload()) { if ($sp.getConnectionMode() === 'JSOM') { var scripts = [ '//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js', 'SP.Runtime.js', ...
Define scripts in a array instead of inline
Define scripts in a array instead of inline
JavaScript
apache-2.0
maxjoehnk/ngSharepoint
--- +++ @@ -3,7 +3,12 @@ .run(function($sp, $spLoader) { if ($sp.getAutoload()) { if ($sp.getConnectionMode() === 'JSOM') { - $spLoader.loadScripts('SP.Core', ['//ajax.aspnetcdn.com/ajax/4.0/1/MicrosoftAjax.js', 'SP.Runtime.js', 'SP.js']); + ...
0168687fb0b9e599e5bf1f25627006531624d114
tests/docker.js
tests/docker.js
var assert = require("assert"); var spawn = require('child_process').spawn; describe('Start docker container', function () { it('should show M2 preamble', function (done) { // ssh localhost var docker = "docker"; var process = spawn(docker, ["run", "fhinkel/macaulay2", "M2"]); var...
var assert = require("assert"); var spawn = require('child_process').spawn; describe('Start docker container', function () { it('should show M2 preamble', function (done) { // ssh localhost var docker = "docker"; var process = spawn(docker, ["run", "fhinkel/macaulay2", "M2"]); var...
Fix test to wait for output
Fix test to wait for output
JavaScript
mit
fhinkel/InteractiveShell,antonleykin/InteractiveShell,antonleykin/InteractiveShell,antonleykin/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell
--- +++ @@ -10,17 +10,20 @@ var process = spawn(docker, ["run", "fhinkel/macaulay2", "M2"]); var encoding = "utf8"; process.stderr.setEncoding(encoding); + var result = ""; process.stderr.on('data', function (data) { console.log("Preamble: " + data); - ...
3cd394442a4eb3000c83e2a427e5c544d629e7a7
client/app/core/config.js
client/app/core/config.js
import { RootReducer } from '../reducers' var DEVEL_DOMAINS = [ 'localhost', '127.0.0.1', '[::1]' ] var isDevel = window._.includes(DEVEL_DOMAINS, window.location.hostname) const hasDevTools = angular.isDefined(window.__REDUX_DEVTOOLS_EXTENSION__) /** @ngInject */ export function configure ($logProvider, $compil...
import { RootReducer } from '../reducers' var DEVEL_DOMAINS = [ 'localhost', '127.0.0.1', '[::1]' ] var isDevel = window._.includes(DEVEL_DOMAINS, window.location.hostname) const hasDevTools = angular.isDefined(window.__REDUX_DEVTOOLS_EXTENSION__) /** @ngInject */ export function configure ($logProvider, $compil...
Revert "Disable $q unhandled rejection exceptions"
Revert "Disable $q unhandled rejection exceptions" This reverts commit abe7f7f7e646781fff0ddc242223da84e0bc38a3. Using Promise is wrong with angular, we should get all unhandled rejection errors, and fix them.
JavaScript
apache-2.0
ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-self_service
--- +++ @@ -8,10 +8,9 @@ var isDevel = window._.includes(DEVEL_DOMAINS, window.location.hostname) const hasDevTools = angular.isDefined(window.__REDUX_DEVTOOLS_EXTENSION__) /** @ngInject */ -export function configure ($logProvider, $compileProvider, $qProvider, $ngReduxProvider) { +export function configure ($logP...
4b1dc538fce1baba33efbc9f3b07ae0af3054eb7
app/components/query-widget/component.js
app/components/query-widget/component.js
import Ember from 'ember'; export default Ember.Component.extend({ init () { this._super(...arguments); this.set("query", this.get("parameters").query); }, actions: { transitionToFacet(parameter) { let queryParams = {}; queryParams["query"] = parameter; ...
import Ember from 'ember'; export default Ember.Component.extend({ init () { this._super(...arguments); this.set("query", this.get("parameters").query); }, actions: { transitionToFacet(parameter) { let queryParams = {}; queryParams["query"] = parameter; ...
Reset query parameter for page when hitting search
Reset query parameter for page when hitting search
JavaScript
apache-2.0
caneruguz/share-analytics,caneruguz/share-analytics,caneruguz/share-analytics
--- +++ @@ -12,6 +12,7 @@ transitionToFacet(parameter) { let queryParams = {}; queryParams["query"] = parameter; + queryParams["page"] = undefined; this.attrs.transitionToFacet(this.get('item.facetDash'), queryParams); }
2885aa520808d944b76387bc4f2dc8c9896c6dcf
src/transform/negate.js
src/transform/negate.js
var es = require("../es"); function Negate(transform, node) { var expr = transform(node.expr); if (typeof node.expr.data === "number") { var literal = es.Literal(node.loc, node.expr.data); return es.UnaryExpression(node.loc, true, "-", literal); } else { var negate = es.Identifier(n...
var es = require("../es"); function Negate(transform, node) { var expr = transform(node.expr); if (node.expr.type === "Number") { return es.UnaryExpression(node.loc, true, "-", transform(node.expr)); } else { var negate = es.Identifier(node.loc, "$negate"); return es.CallExpression(...
Use proper type checking and transform function
Use proper type checking and transform function As per Brians requests
JavaScript
mit
wavebeem/squiggle,saikobee/expr-lang,squiggle-lang/squiggle-lang,saikobee/expr-lang,squiggle-lang/squiggle-lang,wavebeem/squiggle,squiggle-lang/squiggle-lang,saikobee/squiggle,saikobee/squiggle,saikobee/expr-lang,wavebeem/squiggle,saikobee/squiggle
--- +++ @@ -2,9 +2,8 @@ function Negate(transform, node) { var expr = transform(node.expr); - if (typeof node.expr.data === "number") { - var literal = es.Literal(node.loc, node.expr.data); - return es.UnaryExpression(node.loc, true, "-", literal); + if (node.expr.type === "Number") { + ...
7f0af3ca94e821afe42d0b096c8a7b25d893920a
gulpfile.js
gulpfile.js
'use strict' var gulp = require('gulp'); var tsc = require('gulp-typescript'); gulp.task('copy', function () { gulp.src('src/html/**') .pipe(gulp.dest('dest/html')); }); gulp.task('build', [ 'copy' ]); gulp.task('test-build', ['build'], function () { gulp.src('test/src/ts/**/*.ts') .pipe...
'use strict' var gulp = require('gulp'); var tsc = require('gulp-typescript'); gulp.task('copy', function () { gulp.src('src/html/**') .pipe(gulp.dest('dest/html')); }); gulp.task('build', ['copy'], function () { gulp.src('src/ts/**/*.ts') .pipe(tsc()) .pipe(gulp.dest('dest/js')); });...
Edit task gulp.build: typescript build
Edit task gulp.build: typescript build
JavaScript
mit
yajamon/freedomWarsPlantSimulator,yajamon/freedomWarsPlantSimulator
--- +++ @@ -8,9 +8,11 @@ .pipe(gulp.dest('dest/html')); }); -gulp.task('build', [ - 'copy' -]); +gulp.task('build', ['copy'], function () { + gulp.src('src/ts/**/*.ts') + .pipe(tsc()) + .pipe(gulp.dest('dest/js')); +}); gulp.task('test-build', ['build'], function () { gulp.src(...
9a21a130e2ed9ae44ddf00ac367fdb66de81ce18
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var rirmaf = require('rimraf'); var lib = 'lib/**/*.js'; gulp.task('coverage', function(){ return gulp.src(lib) .pipe($.istanbul()); }); gulp.task('coverage:clean', function(callback){ rirmaf('coverage', callback); }); gulp.t...
var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var rirmaf = require('rimraf'); var lib = 'lib/**/*.js'; gulp.task('coverage', function(){ return gulp.src(lib) .pipe($.istanbul()) .pipe($.istanbul.hookRequire()); }); gulp.task('coverage:clean', function(callback){ rirmaf('coverage', c...
Fix gulp-istanbul 0.5.0 doesn't generate lcov file.
Fix gulp-istanbul 0.5.0 doesn't generate lcov file.
JavaScript
mit
hexojs/hexo-fs,hexojs/hexo-fs
--- +++ @@ -1,5 +1,3 @@ -'use strict'; - var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var rirmaf = require('rimraf'); @@ -8,7 +6,8 @@ gulp.task('coverage', function(){ return gulp.src(lib) - .pipe($.istanbul()); + .pipe($.istanbul()) + .pipe($.istanbul.hookRequire()); }); ...
f125ca538110ffed462a896e639b86e53d4492de
gulpfile.js
gulpfile.js
/// var pkg = require("./package.json") , gulp = require("gulp") , plumber = require("gulp-plumber") /// // Lint JS /// var jshint = require("gulp-jshint") , jsonFiles = [".jshintrc", "*.json"] , jsFiles = ["*.js", "src/**/*.js"] gulp.task("scripts.lint", function() { gulp.src([].concat(jsonFiles).concat(jsF...
/// var pkg = require("./package.json") , gulp = require("gulp") , plumber = require("gulp-plumber") /// // Lint JS /// var jshint = require("gulp-jshint") , jsonFiles = [".jshintrc", "*.json"] , jsFiles = ["*.js", "src/**/*.js"] gulp.task("scripts.lint", function() { gulp.src([].concat(jsonFiles).concat(jsF...
Improve build task to run test before
Improve build task to run test before
JavaScript
mit
MoOx/parallaxify,MoOx/parallaxify
--- +++ @@ -29,10 +29,12 @@ gulp.watch(jsFiles, ["scripts"]) }) -gulp.task("default", ["scripts", "watch"]) +gulp.task("dist", ["scripts"]) +gulp.task("test", ["dist"]) +gulp.task("default", ["test", "watch"]) var buildBranch = require("buildbranch") -gulp.task("publish", function(cb) { +gulp.task("publish",...
b7fca936a31175610262b51bf618465dd72babbb
gulpfile.js
gulpfile.js
var gulp = require('gulp'); var gulpTypescript = require('gulp-typescript'); var typescript = require('typescript'); var header = require('gulp-header'); var merge = require('merge2'); var pkg = require('./package.json'); var headerTemplate = '// <%= pkg.name %> v<%= pkg.version %>\n'; gulp.task('default', tscTask); ...
var gulp = require('gulp'); var gulpTypescript = require('gulp-typescript'); var typescript = require('typescript'); var header = require('gulp-header'); var merge = require('merge2'); var pkg = require('./package.json'); var headerTemplate = '// <%= pkg.name %> v<%= pkg.version %>\n'; gulp.task('default', tscTask); ...
Add "lib" to typescript defs
Add "lib" to typescript defs
JavaScript
mit
ceolter/angular-grid,ceolter/ag-grid,ceolter/angular-grid,ceolter/ag-grid
--- +++ @@ -24,7 +24,8 @@ declarationFiles: true, target: 'es5', noImplicitAny: true, - noEmitOnError: false + noEmitOnError: false, + lib: ["dom","es2015"] })); return merge([
2b57e2cf7ac3b3b20253f27c5adc98f58f77b6af
gulpfile.js
gulpfile.js
var gulp = require('gulp'); //var browserify = require('browserify'); var webpack = require('webpack'); var source = require('vinyl-source-stream'); var buffer = require('vinyl-buffer'); var mocha = require('gulp-mocha'); var rename = require('gulp-rename'); var uglify = require('gulp-uglify'); var ENTRY = './src/buil...
var gulp = require('gulp'); //var browserify = require('browserify'); var webpack = require('webpack'); var source = require('vinyl-source-stream'); var buffer = require('vinyl-buffer'); var mocha = require('gulp-mocha'); var rename = require('gulp-rename'); var uglify = require('gulp-uglify'); var ENTRY = './src/buil...
Make it easier to change the output module format
Make it easier to change the output module format
JavaScript
apache-2.0
jtsay362/solveforall-custom-mathjs-build
--- +++ @@ -10,13 +10,15 @@ var ENTRY = './src/build.js'; var DIST = './dist'; var FILE = 'math-light.js'; +// Could be 'amd' +var MODULE_FORMAT = 'commonjs2'; gulp.task('bundle', function (cb) { var webpackConfig = { entry: ENTRY, output: { library: 'math-light', - libraryTarget: 'com...
ebdefd648d4b5d143a25f2d1861de075f43b4fe1
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var paths = { js: ['./gulpfile.js', './test/**/*.js'], scss: ['./stylesheets/_sass-lib.scss'], test: ['./test/**/*.js'] }; var plumberOpts = {}; gulp.task('js-lint', function () { return gulp.src(paths.js) .pip...
'use strict'; var gulp = require('gulp'); var $ = require('gulp-load-plugins')(); var paths = { js: ['./gulpfile.js', './test/**/*.js'], scss: ['./stylesheets/_sass-lib.scss'], test: ['./test/**/*.js'] }; var plumberOpts = {}; gulp.task('js-lint', function () { return gulp.src(paths.js) .pip...
Fix mocha implementation in test task
Fix mocha implementation in test task
JavaScript
agpl-3.0
Bastly/sass-lib
--- +++ @@ -26,9 +26,9 @@ }); gulp.task('test', function () { - return gulp.src(paths.test) + return gulp.src(paths.test, {read: false}) .pipe($.plumber(plumberOpts)) - .pipe($.mocha()); + .pipe($.mocha({reporter: 'nyan'})); }); gulp.task('lint', ['scss-lint', 'js-lint']);
83743548c1cf5f3db5cf8a1405f2d432c62d7e1d
src/services/helpers/service.js
src/services/helpers/service.js
const randexp = require('randexp'); const promisify = require("es6-promisify"); const nodemailer = require('nodemailer'); module.exports = function(app) { class MailService { constructor() { } // POST create({email, subject, content}, params) { var transporter = nodemailer.createTransport(app.get("secre...
const randexp = require('randexp'); const promisify = require("es6-promisify"); const nodemailer = require('nodemailer'); module.exports = function(app) { class MailService { constructor() { } // POST create({email, subject, content}, params) { var transporter = nodemailer.createTransport(app.get("secre...
Fix nodemailer relying on unavailable secrets
Fix nodemailer relying on unavailable secrets
JavaScript
agpl-3.0
schul-cloud/schulcloud-server,schul-cloud/schulcloud-server,schul-cloud/schulcloud-server
--- +++ @@ -11,7 +11,7 @@ // POST create({email, subject, content}, params) { - var transporter = nodemailer.createTransport(app.get("secrets").smtp); + var transporter = nodemailer.createTransport(app.get("secrets").smtp || {}); var sendMail = promisify(transporter.sendMail, transporter); return ...
486968a19d4d7f05c33a0039c09f94006f885960
src/utilities.js
src/utilities.js
import R from 'ramda'; import { NpmConfig, httpsGetPromise } from './helpers'; const addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) }; const removeCaret = R.replace(/\^/, ''); const isNotPrivate = R.compose(R.not, R.prop('private')); const filterPrivate = R.filter(isNotPrivate); const de...
import R from 'ramda'; import { NpmConfig, httpsGetPromise } from './helpers'; const addVersionProp = (val, key, obj) => obj[key] = { 'version': removeCaret(val) }; const removeCaret = R.replace(/\^/, ''); const isNotPrivate = R.compose(R.not, R.prop('private')); const filterPrivate = R.filter(isNotPrivate); const pic...
Rewrite pickDownloads as Ramda function
refactor: Rewrite pickDownloads as Ramda function
JavaScript
mit
cachilders/backpat,churchie317/backpat
--- +++ @@ -5,17 +5,11 @@ const removeCaret = R.replace(/\^/, ''); const isNotPrivate = R.compose(R.not, R.prop('private')); const filterPrivate = R.filter(isNotPrivate); +const pickProps = R.curry(R.pick); const deeplyMerge = (obj1, obj2) => { return R.keys(obj1).reduce((result, key) => { result[key] =...
196c268ec7913ce0aba8afb6ec0eb27bc3abd325
src/promise-array.js
src/promise-array.js
import {Observable} from 'rx'; export function asyncMap(array, selector, maxConcurrency=4) { return Observable.from(array) .map((k) => Observable.defer(() => Observable.fromPromise(selector(k)) .map((v) => ({ k, v })))) .merge(maxConcurrency) .reduce((acc, kvp) => { acc[kvp....
import {Observable} from 'rx'; const spawnOg = require('child_process').spawn; export function asyncMap(array, selector, maxConcurrency=4) { return Observable.from(array) .map((k) => Observable.defer(() => Observable.fromPromise(selector(k)) .map((v) => ({ k, v })))) .merge(maxConcurr...
Copy over a promise version of spawn and delay
Copy over a promise version of spawn and delay
JavaScript
mit
surf-build/surf,surf-build/surf,surf-build/surf,surf-build/surf
--- +++ @@ -1,4 +1,5 @@ import {Observable} from 'rx'; +const spawnOg = require('child_process').spawn; export function asyncMap(array, selector, maxConcurrency=4) { return Observable.from(array) @@ -13,3 +14,51 @@ }, {}) .toPromise(); } + +export function delay(ms) { + return new Promise((resolve)...
578bfe10cb2dd434c36e837c0d4b687eb0d2a3ba
lib/autoupdate.js
lib/autoupdate.js
"use strict"; var path = require('path'); /** * Initializes the crx autoupdate grunt helper * * @param {grunt} grunt * @returns {{buildXML: Function, build: Function}} */ exports.init = function(grunt){ /** * Generates an autoupdate XML file * * @todo relocate that to {@link lib/crx.js} as it's totall...
"use strict"; var path = require('path'); /** * Initializes the crx autoupdate grunt helper * * @param {grunt} grunt * @returns {{buildXML: Function, build: Function}} */ exports.init = function(grunt){ /** * Generates an autoupdate XML file * * @todo relocate that to {@link lib/crx.js} as it's totall...
Fix buildXML() call for extension w/o update_url
Fix buildXML() call for extension w/o update_url
JavaScript
mit
oncletom/grunt-crx,oncletom/grunt-crx
--- +++ @@ -19,6 +19,7 @@ function buildXML(ChromeExtension, callback) { if (!ChromeExtension.manifest.update_url || !ChromeExtension.codebase){ callback(); + return; } ChromeExtension.generateUpdateXML();
accc090267f36417b578d1e3254ae2671599a62c
stream-meteor.js
stream-meteor.js
var apiKey = Meteor.settings.public.streamApiKey, apiAppId = Meteor.settings.public.streamApiAppId; var settings = _.clone(Config); settings['apiKey'] = apiKey; settings['apiAppId'] = apiAppId; if (Meteor.isServer) { Stream.stream = Npm.require('getstream'); settings['apiSecret'] = Meteor.settings.streamApi...
var apiKey = Meteor.settings.public.streamApiKey, apiAppId = Meteor.settings.public.streamApiAppId; var settings = _.clone(Config); if(! apiKey) { throw new Meteor.Error('misconfig', 'No getstream.io app api key found in your settings.json\n hint: Are you running meteor with --settings settings.json?'); } if(...
Check if correct settings are available
Check if correct settings are available
JavaScript
bsd-3-clause
GetStream/stream-meteor
--- +++ @@ -2,6 +2,14 @@ apiAppId = Meteor.settings.public.streamApiAppId; var settings = _.clone(Config); + +if(! apiKey) { + throw new Meteor.Error('misconfig', 'No getstream.io app api key found in your settings.json\n hint: Are you running meteor with --settings settings.json?'); +} + +if(! apiAppId) { ...
8bcd61b8cea323f6060b2d90ec94d3e1fb7190f4
src/add_days.js
src/add_days.js
var parse = require('./parse') /** * @category Day Helpers * @summary Get the day of the month * * Add the specified number of days to the given date. * * @param {Date|String|Number} date to be changed * @param {Number} amount of days to be added * @returns {Date} new date with the days added */ var addDays =...
var parse = require('./parse') /** * @category Day Helpers * @summary Get the day of the month. * * Add the specified number of days to the given date. * * @param {Date|String|Number} date to be changed * @param {Number} amount of days to be added * @returns {Date} new date with the days added */ var addDays ...
Add forgotten dot in addDays JSDoc block
Add forgotten dot in addDays JSDoc block
JavaScript
mit
js-fns/date-fns,date-fns/date-fns,date-fns/date-fns,date-fns/date-fns,js-fns/date-fns
--- +++ @@ -2,7 +2,7 @@ /** * @category Day Helpers - * @summary Get the day of the month + * @summary Get the day of the month. * * Add the specified number of days to the given date. *
31bd052a42f825f3dbc4b28fcd6d998db558f91e
ui/routes/api.js
ui/routes/api.js
var express = require('express'); var router = express.Router(); var sqlite3 = require('sqlite3').verbose(); var db = new sqlite3.Database('/home/pi/homeauto/backend/temp.db'); /* GET home page. */ router.get('/v1/temperature', function(req, res, next) { var filter = "WHERE sensor_fk = 1"; if(req.query.starttime ...
var express = require('express'); var router = express.Router(); var sqlite3 = require('sqlite3').verbose(); var db = new sqlite3.Database('/home/pi/homeauto/backend/temp.db'); /* GET home page. */ router.get('/v1/temperature', function(req, res, next) { var filter = "WHERE sensor_fk = 1"; if(req.query.starttime ...
Add response to sensor stream API handler
Add response to sensor stream API handler
JavaScript
mit
schmidtfx/homeauto,schmidtfx/homeauto,schmidtfx/homeauto
--- +++ @@ -31,6 +31,7 @@ router.get('/v1/sensorstream/:id', function(req, res, next) { var sensor_id = req.params.id; console.log("sensor id: " + id) + res.send({}) }); module.exports = router;
fbfb0324b04b8fd3c82f531dea9552abf1509eb9
lib/log-writer.js
lib/log-writer.js
var util = require('util'); var stream = require('stream'); var fs = require('fs'); var generateLogName = require('./logname').generate; module.exports = LogWriter; function LogWriter(worker, options) { if (!(this instanceof LogWriter)) return new LogWriter(worker, options); stream.PassThrough.call(this); th...
var util = require('util'); var stream = require('stream'); var fs = require('fs'); var spawn = require('child_process').spawn; var generateLogName = require('./logname').generate; module.exports = LogWriter; function LogWriter(worker, options) { if (!(this instanceof LogWriter)) return new LogWriter(worker, optio...
Add support for '| cmd' as log name for piping
Add support for '| cmd' as log name for piping Create a child process as described by the log parameter following the leading '|' and write all log events to that process's stdin stream. The command name supports %p and %w replacement for per-worker logging. If per-worker substitutions are made, each worker gets its...
JavaScript
artistic-2.0
shelbys/strong-supervisor
--- +++ @@ -1,6 +1,7 @@ var util = require('util'); var stream = require('stream'); var fs = require('fs'); +var spawn = require('child_process').spawn; var generateLogName = require('./logname').generate; @@ -17,7 +18,17 @@ pid: worker.pid || worker.process.pid } this.name = generateLogName(this.t...
7a0813a41afca49b7fe73367a6707f4379353009
test/findAssets.spec.js
test/findAssets.spec.js
const path = require('path'); const expect = require('chai').expect; const findAssets = require('../src/config/findAssets'); const mockFs = require('mock-fs'); const dependencies = require('./fixtures/dependencies'); describe('findAssets', () => { before(() => { mockFs({ testDir: dependencies }); }); it('s...
const path = require('path'); const expect = require('chai').expect; const findAssets = require('../src/config/findAssets'); const mockFs = require('mock-fs'); const dependencies = require('./fixtures/dependencies'); describe('findAssets', () => { before(() => { mockFs({ testDir: dependencies.withAssets }); }...
Use only fixtures we need
Use only fixtures we need
JavaScript
mit
rnpm/rnpm
--- +++ @@ -7,27 +7,20 @@ describe('findAssets', () => { before(() => { - mockFs({ testDir: dependencies }); + mockFs({ testDir: dependencies.withAssets }); }); it('should return an array of all files in given folders', () => { - const assets = findAssets( - path.join('testDir', 'withAsset...
b9913a7f583825b76da298d9d2275a5f1565f18e
test/reverse_urlSpec.js
test/reverse_urlSpec.js
(function () { 'use strict'; var reverseUrl, $route; var routeMock = {}; routeMock.routes = { '/testRoute1/': { controller: 'TestController1', originalPath: '/test-route-1/' }, '/testRoute1/:params/': { controller: 'TestController1', ...
(function () { 'use strict'; var reverseUrl, $route; var routeMock = {}; routeMock.routes = { '/testRoute1/': { controller: 'TestController1', originalPath: '/test-route-1/' }, '/testRoute1/:params/': { controller: 'TestController1', ...
Add assertions for error logging
Add assertions for error logging
JavaScript
mit
incuna/angular-reverse-url
--- +++ @@ -45,6 +45,12 @@ expect(reverseUrl('TestController1', {param: 'foobar'})).toEqual('#/test-route-1/foobar/'); }); + it('should log an error if a route is not found'); + + it('should log an error if params are required and missing'); + + it('sho...
b02b438bc187054eaa35d56afc51efdad69a889c
fetch-test.js
fetch-test.js
'use strict' const test = require('tape') const proxyquire = require('proxyquire') test('fetch', function (t) { t.plan(3) const fetch = proxyquire('./fetch', { 'simple-get': function (options, callback) { t.deepEqual(options, { url: 'https://host.co/path?page=2', headers: { fo...
'use strict' const test = require('tape') const proxyquire = require('proxyquire') test('fetch', function (t) { t.plan(4) const fetch = proxyquire('./fetch', { 'simple-get': function (options, callback) { t.deepEqual(options, { url: 'https://host.co/path?page=2', headers: { fo...
Replace noop w/ t.pass to assert call
Replace noop w/ t.pass to assert call
JavaScript
mit
bendrucker/http-app-router
--- +++ @@ -4,7 +4,7 @@ const proxyquire = require('proxyquire') test('fetch', function (t) { - t.plan(3) + t.plan(4) const fetch = proxyquire('./fetch', { 'simple-get': function (options, callback) { @@ -14,10 +14,11 @@ foo: 'bar' } }) + callback() } }) t....
53f0ee1ff11a92122bd905d587f88abc696b40de
test/index.js
test/index.js
import co from 'co'; import test from 'blue-tape'; import agent from 'promisify-supertest'; import createApplication from '../src'; const setup = () => { return agent(createApplication().callback()); }; test('GET /', (sub) => { sub.test('responds with OK status code', co.wrap(function* (assert) { const app =...
/* eslint-disable func-names, no-use-before-define */ import co from 'co'; import test from 'blue-tape'; import agent from 'promisify-supertest'; import createApplication from '../src'; const setup = () => { return agent(createApplication().callback()); }; test('GET /', (sub) => { sub.test('responds with OK sta...
Refactor root route test for readability.
Refactor root route test for readability.
JavaScript
isc
francisbrito/let-go-hold-on-api
--- +++ @@ -1,3 +1,5 @@ +/* eslint-disable func-names, no-use-before-define */ + import co from 'co'; import test from 'blue-tape'; import agent from 'promisify-supertest'; @@ -14,9 +16,13 @@ yield app .get('/') - .expect((response) => { - assert.equal(response.statusCode, 200, 'status code sho...
3052a38676e0c1066dfa145cc29370b762d6ea5b
test/rSpec.js
test/rSpec.js
const r = require('../'), expect = require('chai').expect; describe('RemoveTabs', function(){ it('should have not tabs.', function(){ var tests = [ r` remove tabs`, r` remove tabs tabs`, r` remove tabs` ]; var expected = [ 'remove\ntabs', 'remove\n\ttabs\n\t\ttabs', '...
const r = require('../'), expect = require('chai').expect; describe('RemoveTabs', function(){ it('should have not tabs.', function(){ var tests = [ r` remove tabs`, r` remove tabs tabs`, r` remove tabs`, r` remove remove tabs tabs`, r`remove${'\r\n\t'}t...
Add test specs for interpolations.
Add test specs for interpolations.
JavaScript
mit
Wooooo/remove-tabs
--- +++ @@ -13,17 +13,35 @@ tabs`, r` remove - tabs` + tabs`, + + r` + remove + remove + tabs + tabs`, + + r`remove${'\r\n\t'}tabs${'\r\n\t\t'}tabs`, //window + + r` + ${'remove'} + ${'tabs'} + ${'tabs'}` ]; var expected = [ 'remove\ntabs', 'rem...
fa2a3f0c689a6cedc86452665c338935a5b95574
src/javascript/binary/websocket_pages/user/new_account/virtual_acc_opening/virtual_acc_opening.data.js
src/javascript/binary/websocket_pages/user/new_account/virtual_acc_opening/virtual_acc_opening.data.js
var VirtualAccOpeningData = (function(){ "use strict"; function getDetails(password, residence, verificationCode){ var req = { new_account_virtual: 1, client_password: password, residence: residence, verification_code: veri...
var VirtualAccOpeningData = (function(){ "use strict"; function getDetails(password, residence, verificationCode){ var req = { new_account_virtual: 1, client_password: password, residence: residence, verification_code: veri...
Send source information on virtual account opening
Send source information on virtual account opening
JavaScript
apache-2.0
teo-binary/binary-static,binary-com/binary-static,ashkanx/binary-static,binary-static-deployed/binary-static,binary-static-deployed/binary-static,teo-binary/binary-static,binary-com/binary-static,negar-binary/binary-static,kellybinary/binary-static,raunakkathuria/binary-static,fayland/binary-static,teo-binary/binary-st...
--- +++ @@ -8,6 +8,14 @@ residence: residence, verification_code: verificationCode }; + + // Add AdWords parameters + // NOTE: following lines can be uncommented (Re-check property names) + // once these fields added to this ws call + ...
40bb555785978dcf6ac287aa10d6be6c17cf31e4
tests/src/test/javascript/components/basic/propvalidator.spec.js
tests/src/test/javascript/components/basic/propvalidator.spec.js
import {expect} from 'chai' import chai from 'chai' import spies from 'chai-spies' import { createAndMountComponent, destroyComponent, onGwtReady, onNextTick } from '../../vue-gwt-tests-utils' describe('@PropValidator', () => { let component; beforeEach(() => onGwtReady().then(() => { chai.use(spies); ...
import {expect} from 'chai' import chai from 'chai' import spies from 'chai-spies' import { createAndMountComponent, destroyComponent, onGwtReady, onNextTick } from '../../vue-gwt-tests-utils' describe('@PropValidator', () => { let component; beforeEach(() => onGwtReady().then(() => { chai.use(spies); ...
Fix PropValidator test to work with Vue in production mode
Fix PropValidator test to work with Vue in production mode PropValidator are only used in dev mode so the test should be ignored when running Vue in production mode.
JavaScript
mit
Axellience/vue-gwt,Axellience/vue-gwt,Axellience/vue-gwt,Axellience/vue-gwt
--- +++ @@ -30,10 +30,21 @@ }); }); - it('should fire an error if the value is incorrect', () => { - component.validatedPropParent = 106; - return onNextTick(() => { - expect(console.error).to.have.been.called.once; - }); + it('should fire an error if the value is incorrect in dev mode', () ...
c218e3ab8e4604b6949ba02deb7a5f1c0b9e32d7
fun-script.js
fun-script.js
#!/usr/bin/env node var fs = require('fs') var max = process.argv[2] playGame() function playGame() { var usedNumbers = [] var number = getRandomNumber(max) while (!isNewNumber(usedNumbers, number)) { number = getRandomNumber(max) } fs.writeFile(process.cwd() + '/_data/numbers/' + number + '.json', '...
#!/usr/bin/env node var fs = require('fs') var max = process.argv[2] var usedNumbers = [] playGame() function playGame() { var number = getRandomNumber(max) while (!isNewNumber(number)) { number = getRandomNumber(max) } fs.writeFile(process.cwd() + '/_data/numbers/' + number + '.json', '', function don...
Fix usedNumber bring resetted back to empty
Fix usedNumber bring resetted back to empty
JavaScript
mit
muan/bingo-board,jlord/bingo-board,muan/bingo-board,jlord/bingo-board
--- +++ @@ -2,14 +2,14 @@ var fs = require('fs') var max = process.argv[2] +var usedNumbers = [] playGame() function playGame() { - var usedNumbers = [] var number = getRandomNumber(max) - while (!isNewNumber(usedNumbers, number)) { + while (!isNewNumber(number)) { number = getRandomNumber(max)...
879626e9f315dc6069112a82f8b175660e1ff9f7
src/setupJest.js
src/setupJest.js
window.fetch = require('jest-fetch-mock'); // Mock the Date object and allows us to use Date.now() and get a consistent date back const mockedCurrentDate = new Date("2017-10-06T13:45:28.975Z"); require('jest-mock-now')(mockedCurrentDate); // Mock document functions (specifically for the CollectionsController componen...
window.fetch = require('jest-fetch-mock'); // Mock the Date object and allows us to use Date.now() and get a consistent date back const mockedCurrentDate = new Date("2017-10-06T13:45:28.975Z"); require('jest-mock-now')(mockedCurrentDate); // Mock document functions (specifically for the CollectionsController componen...
Fix breaking unit tests due to missing mock of scrollIntoView function
Fix breaking unit tests due to missing mock of scrollIntoView function Former-commit-id: fe6fd28df36626f4bb8efab9ba4a8c6c42cb2f5e Former-commit-id: ddf9c74bc8fa09ec14d3ec518ac7da745cfe3731 Former-commit-id: d14b02918458ccf1d54bb4bcf50faa0b4d487eef
JavaScript
mit
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
--- +++ @@ -9,7 +9,8 @@ getBoundingClientRect: () => ({ top: 0 }), - scrollTop: 0 + scrollTop: 0, + scrollIntoView: () => {} }); Object.defineProperty(document, 'getElementById', { value: mockedGetElement,
85108314aa89b401d505d047c070f51d5307ccc6
test/cli/myrmex-cheers.integ.js
test/cli/myrmex-cheers.integ.js
/*eslint-env mocha */ 'use strict'; const assert = require('assert'); const icli = require('../../packages/cli/src/bin/myrmex'); const showStdout = !!process.env.MYRMEX_SHOW_STDOUT; describe('The "cheers" sub-command', () => { before(() => { process.chdir(__dirname); }); beforeEach(() => { return icli...
/*eslint-env mocha */ 'use strict'; const assert = require('assert'); const icli = require('../../packages/cli/src/bin/myrmex'); const showStdout = !!process.env.MYRMEX_SHOW_STDOUT; describe('The "cheers" sub-command', () => { before(() => { process.chdir(__dirname); }); beforeEach(() => { return icli...
Fix test for travis execution context
Fix test for travis execution context
JavaScript
mit
myrmex-org/myrmex,myrmex-org/myrmex,lagerjs/lager,myrmex-org/myrmex,myrmx/myrmex,myrmx/myrmex,lagerjs/lager,myrmx/myrmex,myrmx/myrmex,lagerjs/lager,myrmex-org/myrmex,lagerjs/lager
--- +++ @@ -32,7 +32,8 @@ const stdout = icli.catchPrintStop(); assert.ok(stdout.indexOf('language: french') > -1); assert.ok(stdout.indexOf('font: Binary') > -1); - assert.ok(stdout.indexOf('01010011 01100001 01101110 01110100 01100101') > -1); + // Disable assertion because of travis ...
2c033eb71202c709bdbd45f4a64909b4b83e28be
lib/Avatar.js
lib/Avatar.js
import React, { Component, PropTypes, View, Image } from 'react-native'; import Icon from './Icon'; import { ICON_NAME } from './config'; export default class Avatar extends Component { static propTypes = { icon: PropTypes.string, src: PropTypes.string, size: PropTypes.number, colo...
import React, { Component, PropTypes, View, Image } from 'react-native'; import Icon from './Icon'; import { getColor } from './helpers'; export default class Avatar extends Component { static propTypes = { icon: PropTypes.string, src: PropTypes.string, size: PropTypes.number, colo...
Update default background color & formatting updates
Update default background color & formatting updates
JavaScript
mit
kenma9123/react-native-material-ui,blovato/sca-mobile-components,xotahal/react-native-material-ui,react-native-material-design/react-native-material-design,xvonabur/react-native-material-ui,thomasooo/react-native-material-design,ajaxangular/react-native-material-ui,mobileDevNativeCross/react-native-material-ui
--- +++ @@ -1,6 +1,6 @@ import React, { Component, PropTypes, View, Image } from 'react-native'; import Icon from './Icon'; -import { ICON_NAME } from './config'; +import { getColor } from './helpers'; export default class Avatar extends Component { @@ -15,7 +15,7 @@ static defaultProps = { size:...
6125f7cbbba04208cf4836539ca4f596a6cd6c93
test/helpers_test.js
test/helpers_test.js
/* vim: ts=4:sw=4 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the...
/* vim: ts=4:sw=4 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the...
Add basic test coverage of toArrayBuffer function
Add basic test coverage of toArrayBuffer function
JavaScript
agpl-3.0
nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop
--- +++ @@ -27,4 +27,21 @@ assert.equal(getString(b), "\x00\xff\x80"); }); }); + + describe("toArrayBuffer", function() { + it('returns undefined when passed undefined', function() { + assert.strictEqual(toArrayBuffer(undefined), undefined); + }); + it('returns ArrayBuffe...
0e7fb78882f5b0e78d3f544857d86717fead0cdb
Renderer/canvas-drawer.js
Renderer/canvas-drawer.js
var CanvasDrawer = (function () { var CanvasDrawer = function (params) { }; CanvasDrawer.prototype = { drawPlayer: { value: function (player) { } }, drawDisc :{ value: function (disc) { } } } }());
var CanvasDrawer = (function () { var CanvasDrawer = function (params) { var canvas = document.getElementById("canvas-field"); this.ctx = canvas.getContext("2d"); this.canvasWidth = canvas.width; this.canvasHeight = canvas.height; }; CanvasDrawer.prototype = { draw...
Add implement CanvasDrawer witch draw player and disc
Add implement CanvasDrawer witch draw player and disc
JavaScript
mit
TeamBarracuda-Telerik/JustDiscBattle,TeamBarracuda-Telerik/JustDiscBattle
--- +++ @@ -1,18 +1,35 @@ var CanvasDrawer = (function () { var CanvasDrawer = function (params) { - + var canvas = document.getElementById("canvas-field"); + this.ctx = canvas.getContext("2d"); + this.canvasWidth = canvas.width; + this.canvasHeight = canvas.height; }; + + ...
ff58d6e6788382e2468994f9550bcc1e8d103e49
utils/network-timing.js
utils/network-timing.js
const {hasAdRequestPath, isImplTag} = require('./resource-classification'); const {URL} = require('url'); /** * Returns end time of tag load (s) relative to system boot. * @param {LH.Artifacts.NetworkRequest[]} networkRecords * @return {number} */ function getTagEndTime(networkRecords) { const tagRecord = networ...
const {hasAdRequestPath, isImplTag} = require('./resource-classification'); const {URL} = require('url'); /** * Returns end time of tag load (s) relative to system boot. * @param {LH.Artifacts.NetworkRequest[]} networkRecords * @return {number} */ function getTagEndTime(networkRecords) { const tagRecord = networ...
Include defaultValue in getPageStartTime function.
Include defaultValue in getPageStartTime function. Change-Id: Ib25db9f76263ffcb907f1c04edb90e1c2c65e4cf
JavaScript
apache-2.0
googleads/publisher-ads-lighthouse-plugin,googleads/publisher-ads-lighthouse-plugin
--- +++ @@ -26,12 +26,13 @@ /** * Returns start time of page load (s) relative to system boot. * @param {LH.Artifacts.NetworkRequest[]} networkRecords + * @param {number=} defaultValue * @return {number} */ -function getPageStartTime(networkRecords) { +function getPageStartTime(networkRecords, defaultValue =...
dd03f8c7fa2499e6d121eea710d3cda9803f94a0
util/bind/bind.js
util/bind/bind.js
steal('can/util', function (can) { /** * @typedef {{bind:function():*,unbind:function():*}} can/util/bind * * Provides mixin-able bind and unbind methods. `bind()` calls `this._bindsetup` * when the first bind happens and. `unbind()` calls `this._bindteardown` when there * are no more event handlers. * ...
steal('can/util', function (can) { /** * @typedef {{bind:function():*,unbind:function():*}} can.util.bind * * Provides mixin-able bind and unbind methods. `bind()` calls `this._bindsetup` * when the first bind happens and. `unbind()` calls `this._bindteardown` when there * are no more event handlers. * ...
Fix @typedef name to be dot-separated.
Fix @typedef name to be dot-separated.
JavaScript
mit
whitecolor/canjs,asavoy/canjs,rjgotten/canjs,patrick-steele-idem/canjs,beno/canjs,patrick-steele-idem/canjs,asavoy/canjs,Psykoral/canjs,Psykoral/canjs,gsmeets/canjs,whitecolor/canjs,tracer99/canjs,patrick-steele-idem/canjs,rasjani/canjs,bitovi/canjs,rjgotten/canjs,bitovi/canjs,gsmeets/canjs,Psykoral/canjs,bitovi/canjs,...
--- +++ @@ -1,6 +1,6 @@ steal('can/util', function (can) { /** - * @typedef {{bind:function():*,unbind:function():*}} can/util/bind + * @typedef {{bind:function():*,unbind:function():*}} can.util.bind * * Provides mixin-able bind and unbind methods. `bind()` calls `this._bindsetup` * when the first bind...
8c3335cf84588aa2ccabe78a96bb668be74fd160
src/lib/mapper.js
src/lib/mapper.js
'use strict'; const _ = require('lodash'); const log = require('./log'); let nameToId = {}; let mapper = { /** * Add light name to identifier mapping. * * @param {string} id - Light identifier * @param {string} name - Light name mapping */ add: function addName(id, name) { if (!id || !name) ...
'use strict'; const _ = require('lodash'); const log = require('./log'); let nameToId = {}; let mapper = { /** * Add light name to identifier mapping. * * @param {string} id - Light identifier * @param {string} name - Light name mapping */ add: function addName(id, name) { if (!id || !name) ...
Fix crash on unknown light name
Fix crash on unknown light name
JavaScript
mit
ristomatti/lifxsh
--- +++ @@ -61,7 +61,7 @@ * Use lowercase keys. */ function getKey(name) { - return name.toLowerCase(); + return name ? name.toLowerCase() : null; } // Expose mapper
8d1a0fd2c8f3bf48b6effdbc656df3e6f904d949
examples/index.js
examples/index.js
#! /usr/bin/env node // Ref: http://docopt.org/ /* Chain commands Positional arguments Named arguments Required arguments Limit arguments options Set option type (e.g. string, number) Set number of options (exact, min, & max) Nest commands & arguments */ 'use strict'; (function () { var jargs = require('../src...
#! /usr/bin/env node // Ref: http://docopt.org/ /* Chain commands Positional arguments Named arguments Required arguments Limit arguments options Set option type (e.g. string, number) Set number of options (exact, min, & max) Nest commands & arguments */ 'use strict'; (function () { var jargs = require('../src...
Adjust API to be more "React-like"
Adjust API to be more "React-like"
JavaScript
mit
JakeSidSmith/jargs
--- +++ @@ -25,39 +25,30 @@ var Arg = jargs.Arg; var args = jargs.collect([ - Command({ - name: 'init', - children: [ - Arg({ - name: 'path', - required: true, - type: 'string' - }) - ] - }), - Command({ - name: 'build', - children: [ ...
b763199fe0d1b6920cd1827f16529ddc1e021422
gulpfile.babel.js
gulpfile.babel.js
'use strict'; import gulp from 'gulp'; import babel from 'gulp-babel'; import istanbul from 'gulp-istanbul'; import mocha from 'gulp-mocha'; gulp.task('pre-test', () => { return gulp.src(['dist/index.js']) // Covering files .pipe(istanbul()) // Force `require` to return covered files ...
'use strict'; import gulp from 'gulp'; import babel from 'gulp-babel'; import istanbul from 'gulp-istanbul'; import mocha from 'gulp-mocha'; gulp.task('pre-test', () => { return gulp.src(['dist/index.js']) // Covering files .pipe(istanbul()) // Force `require` to return covered files ...
Update coverage's minimum acceptable thresholds
Update coverage's minimum acceptable thresholds
JavaScript
mit
cheton/gcode-parser
--- +++ @@ -17,9 +17,18 @@ return gulp.src(['test/*.js']) .pipe(mocha()) // Creating the reports after tests ran - .pipe(istanbul.writeReports()); - // Enforce a coverage of at least 90% - //.pipe(istanbul.enforceThresholds({ thresholds: { global: 90 } })); + .pipe(i...
b73810201d3ef977e8322bc81594c779914eba10
examples/console/start.js
examples/console/start.js
const syrup = require('../../'); const _ = require('lodash'); syrup.scenario('array', `${__dirname}/test-array`); syrup.scenario('object', `${__dirname}/test-object`); syrup.scenario('save', `${__dirname}/test-save`); syrup.scenario('get', `${__dirname}/test-get`, ['save']); syrup.pour(function (error, results) { ...
const syrup = require('../../'); syrup.scenario('array', `${__dirname}/test-array`); syrup.scenario('object', `${__dirname}/test-object`); syrup.scenario('save', `${__dirname}/test-save`); syrup.scenario('get', `${__dirname}/test-get`, ['save']); syrup.pour(function (error, results) { console.log(JSON.stringify(r...
Remove the unneeded lodash require
Remove the unneeded lodash require
JavaScript
mpl-2.0
thejsninja/syrup
--- +++ @@ -1,5 +1,4 @@ const syrup = require('../../'); -const _ = require('lodash'); syrup.scenario('array', `${__dirname}/test-array`); syrup.scenario('object', `${__dirname}/test-object`);
9c02fcfd2c70299d7bb785e9ac2a299320bf83d1
src/components/ByLine.js
src/components/ByLine.js
/** * ByLine.js * Description: view component that makes up a news item preview * Modules: React and React Native Modules * Dependencies: styles.js SmallText * Author: Tiffany Tse */ //import modules import React, { PropTypes } from 'react'; import { StyleSheet, View } from 'react-native'; import SmallText from '...
/** * ByLine.js * Description: view component that makes up a news item preview * Modules: React and React Native Modules * Dependencies: styles.js SmallText * Author: Tiffany Tse */ //import modules import React, { PropTypes } from 'react'; import { StyleSheet, View } from 'react-native'; import SmallText from '...
Refactor date in Byline to use string
Refactor date in Byline to use string
JavaScript
mit
titse/NYTimes-Clone,titse/NYTimes-Clone,titse/NYTimes-Clone
--- +++ @@ -15,7 +15,7 @@ <View> <View style={style.row}> <SmallText> - {date.toLocaleDateString()} + {date} </SmallText> <SmallText> {author} @@ -34,7 +34,7 @@ //define propTypes Byline.propTypes = { - date: Pr...
47459be879b85fe9daedb2d57ff43c2619dd3620
packages/components/containers/domains/DomainsSection.js
packages/components/containers/domains/DomainsSection.js
import React from 'react'; import { c } from 'ttag'; import { useEventManager, useOrganization, useDomains, SubTitle, Alert, PrimaryButton, Button, Block, useModal } from 'react-components'; import DomainModal from './DomainModal'; import DomainsTable from './DomainsTable'; const D...
import React from 'react'; import { c } from 'ttag'; import { useEventManager, useOrganization, useDomains, SubTitle, Alert, PrimaryButton, Button, Block, useModal } from 'react-components'; import DomainModal from './DomainModal'; import DomainsTable from './DomainsTable'; const D...
Add link for domains section
Add link for domains section
JavaScript
mit
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
--- +++ @@ -24,8 +24,8 @@ return ( <> - <SubTitle>{c('Title').t`Domains`}</SubTitle> - <Alert learnMore="todo"> + <SubTitle>{c('Title').t`Manage custom domains`}</SubTitle> + <Alert learnMore="https://protonmail.com/support/categories/custom-domains/"> ...
32b688e53c0170f7e4f0c37d38d4b299bbf9cf66
grunt/scss-lint.js
grunt/scss-lint.js
// Check SCSS for code quality module.exports = function(grunt) { grunt.config('scsslint', { allFiles: [ 'scss/**/*.scss', ], options: { bundleExec: false, colorizeOutput: true, config: '.scss-lint.yml', exclude: [ '...
// Check SCSS for code quality module.exports = function(grunt) { grunt.config('scsslint', { allFiles: [ 'scss/**/*.scss', ], options: { bundleExec: false, colorizeOutput: true, config: '.scss-lint.yml', exclude: [ '...
Exclude forms partial as well.
Exclude forms partial as well.
JavaScript
mit
yellowled/yl-bp,yellowled/yl-bp
--- +++ @@ -14,6 +14,7 @@ 'scss/main/_oldie.scss', 'scss/mixins/_type.scss', 'scss/mixins/_units.scss', + 'scss/modules/_forms.scss', 'scss/modules/_images.scss' ], reporterOutput: null
49c7b952bd3db9d192ea3074d773c07ade791869
ghost/admin/tests/test-helper.js
ghost/admin/tests/test-helper.js
import resolver from './helpers/resolver'; import { setResolver } from 'ember-mocha'; setResolver(resolver); /* jshint ignore:start */ mocha.setup({ timeout: 5000, slow: 500 }); /* jshint ignore:end */
import resolver from './helpers/resolver'; import { setResolver } from 'ember-mocha'; setResolver(resolver); /* jshint ignore:start */ mocha.setup({ timeout: 15000, slow: 500 }); /* jshint ignore:end */
Increase timeout in ember tests
Increase timeout in ember tests no issue - increases individual test timeout from 5sec to 15sec It seems Travis is occasionally _very_ slow and will timeout on heavier acceptance tests resulting in random failures. Hopefully this will reduce the number of random test failures we see.
JavaScript
mit
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
--- +++ @@ -5,7 +5,7 @@ /* jshint ignore:start */ mocha.setup({ - timeout: 5000, + timeout: 15000, slow: 500 }); /* jshint ignore:end */
17f67a15419b45e90498982ba77c9d9083eda189
knexfile.js
knexfile.js
require('dotenv').config(); module.exports = { development: { client: 'postgresql', connection: { host : process.env.DB_HOST, user : process.env.DB_USER, password : process.env.DB_PASS, database : process.env.DB_NAME, port : process.env.DB_PORT, ssl : pro...
require('dotenv').config(); module.exports = { development: { client: 'postgresql', connection: { host : process.env.DB_HOST, user : process.env.DB_USER, password : process.env.DB_PASS, database : process.env.DB_NAME, port : process.env.DB_PORT, ssl : pro...
Change config of production server
Change config of production server
JavaScript
mit
potatowave/escolha,potatowave/escolha
--- +++ @@ -22,7 +22,7 @@ }, production: { client: 'postgresql', - connection: process.env.DATABASE_PRODUCTION + '?ssl=true', + connection: process.env.DATABASE_URL + '?ssl=true', pool: { min: 2, max: 10
5b204b9a00767a0844ce4e364b989b1adcd03360
lib/core/src/client/preview/url.js
lib/core/src/client/preview/url.js
import { history, document } from 'global'; import qs from 'qs'; import { toId } from '@storybook/router/utils'; export function pathToId(path) { const match = (path || '').match(/^\/story\/(.+)/); if (!match) { throw new Error(`Invalid path '${path}', must start with '/story/'`); } return match[1]; } ex...
import { history, document } from 'global'; import qs from 'qs'; import { toId } from '@storybook/router/utils'; export function pathToId(path) { const match = (path || '').match(/^\/story\/(.+)/); if (!match) { throw new Error(`Invalid path '${path}', must start with '/story/'`); } return match[1]; } ex...
Fix initial viewMode parsing typo
Fix initial viewMode parsing typo
JavaScript
mit
storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook
--- +++ @@ -39,5 +39,5 @@ setPath({ storyId, viewMode }); } } - return { storyId }; + return { storyId, viewMode }; };
1bbdb4ab27bf647f900d5908fab1aa3a6e660a42
scripts/clients/sonar_client.js
scripts/clients/sonar_client.js
const { spawn } = require("child_process"); const options = { sources: function (path) { return `-Dsonar.sources="${path}"`; }, projectName: function (name) { return `-Dsonar.projectName="${name}"`; }, projectKey: function (owner, name) { return `-Dsonar.projectKey="${ow...
Add sonar scanner client script
Add sonar scanner client script
JavaScript
mit
ovidiup13/L5-ProjectSource
--- +++ @@ -0,0 +1,26 @@ +const { + spawn +} = require("child_process"); + +const options = { + sources: function (path) { + return `-Dsonar.sources="${path}"`; + }, + projectName: function (name) { + return `-Dsonar.projectName="${name}"`; + }, + projectKey: function (owner, name) { +...
2a2ef17d85f9336799c3e39249f960f75cac7cf6
src/core-uri-handlers.js
src/core-uri-handlers.js
// Converts a query string parameter for a line or column number // to a zero-based line or column number for the Atom API. function getLineColNumber (numStr) { const num = parseInt(numStr || 0, 10) return Math.max(num - 1, 0) } function openFile (atom, {query}) { const {filename, line, column} = query atom.w...
const fs = require('fs-plus') // Converts a query string parameter for a line or column number // to a zero-based line or column number for the Atom API. function getLineColNumber (numStr) { const num = parseInt(numStr || 0, 10) return Math.max(num - 1, 0) } function openFile (atom, {query}) { const {filename, ...
Use containsLocation() for URL handler processing
Use containsLocation() for URL handler processing
JavaScript
mit
atom/atom,atom/atom,brettle/atom,brettle/atom,brettle/atom,Mokolea/atom,Mokolea/atom,PKRoma/atom,PKRoma/atom,Mokolea/atom,atom/atom,PKRoma/atom
--- +++ @@ -1,3 +1,5 @@ +const fs = require('fs-plus') + // Converts a query string parameter for a line or column number // to a zero-based line or column number for the Atom API. function getLineColNumber (numStr) { @@ -17,7 +19,14 @@ function windowShouldOpenFile ({query}) { const {filename} = query - re...
62d9fedc4b56f986d04480f9b342ae2ef5d37f60
scripts/actions/RepoActionCreators.js
scripts/actions/RepoActionCreators.js
'use strict'; var AppDispatcher = require('../dispatcher/AppDispatcher'), ActionTypes = require('../constants/ActionTypes'), RepoAPI = require('../utils/RepoAPI'), StarredReposByUserStore = require('../stores/StarredReposByUserStore'), RepoStore = require('../stores/RepoStore'); var RepoActionCreators...
'use strict'; var AppDispatcher = require('../dispatcher/AppDispatcher'), ActionTypes = require('../constants/ActionTypes'), RepoAPI = require('../utils/RepoAPI'), StarredReposByUserStore = require('../stores/StarredReposByUserStore'), RepoStore = require('../stores/RepoStore'); var RepoActionCreators...
Add a comment regarding unused action
Add a comment regarding unused action
JavaScript
mit
stylecoder/flux-react-router-example,AnthonyWhitaker/flux-react-router-example,machnicki/healthunlocked,goatslacker/flux-react-router-example,tiengtinh/flux-react-router-example,machnicki/healthunlocked,keshavnandan/flux-react-router-example,bertomartin/flux-react-router-example,ycavatars/flux-react-router-example,kesh...
--- +++ @@ -11,6 +11,10 @@ if (RepoStore.contains(fullName, fields)) { return; } + + // Although this action is currently not handled by any store, + // it is fired for consistency. You might want to use it later, + // e.g. to show a spinner or have a more detailed log. AppDispatc...
52a7d329dec734129cf130e79f7a1c4929d02ba7
app/authenticators/api.js
app/authenticators/api.js
import Ember from 'ember'; import Base from 'simple-auth/authenticators/base'; import ENV from 'wordset/config/environment'; export default Base.extend({ restore: function(properties) { var propertiesObject = Ember.Object.create(properties); return new Ember.RSVP.Promise(function(resolve, reject) { if...
import Ember from 'ember'; import Base from 'simple-auth/authenticators/base'; import ENV from 'wordset/config/environment'; export default Base.extend({ restore: function(properties) { var propertiesObject = Ember.Object.create(properties); return new Ember.RSVP.Promise(function(resolve, reject) { if...
Use new namespaced auth API methods
Use new namespaced auth API methods
JavaScript
mit
kaelig/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,wordset/wordset-ui,BryanCode/wordset-ui,kaelig/wordset-ui,wordset/wordset-ui
--- +++ @@ -38,7 +38,7 @@ }, makeRequest: function(data) { return Ember.$.ajax({ - url: ENV.api + '/login', + url: ENV.api + '/auth/login', type: 'POST', data: data, dataType: 'json',
002452c5b597e98408e5b28b6658f34e54a66500
app/public/sa-tracking.js
app/public/sa-tracking.js
'use strict'; var events = []; var requestInterval = 5000; window.addEventListener('click', function(e) { e = event || window.event; events.push(processEvent(e)); }); var processEvent = function(e) { // Event attributes var eventProps = ['type', 'timeStamp']; // Event target attributes var targetP...
'use strict'; var events = []; var requestInterval = 5000; window.addEventListener('click', function(e) { e = event || window.event; events.push(processEvent(e)); }); var processEvent = function(e) { // Event attributes var eventProps = ['type', 'timeStamp']; // Event target attributes var targetP...
Fix invalid state error by instantiating new XHR with each request
Fix invalid state error by instantiating new XHR with each request
JavaScript
mit
Sextant-WDB/sextant-ng
--- +++ @@ -44,11 +44,11 @@ return xhr; }; -var request = new PostRequest(); var sendEvents = setInterval(function() { if (!events.length) return; + var request = new PostRequest(); request.send(JSON.stringify(events)); events = [];
0b8920aea121ca1483e9cb32e55d4ba38ba2f4b7
src/utils/misc.js
src/utils/misc.js
/* @flow strict */ export const caseInsensitiveCompareFunc = (a: string, b: string): number => a.toLowerCase().localeCompare(b.toLowerCase()); export const numberWithSeparators = (value: number | string): string => value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); export function deeperMerge<K, V>(obj1: { ...
/* @flow strict */ export const caseInsensitiveCompareFunc = (a: string, b: string): number => a.toLowerCase().localeCompare(b.toLowerCase()); export const numberWithSeparators = (value: number | string): string => value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); export function deeperMerge<K, V>(obj1: { ...
Tweak type to accept read-only objects, too.
groupItemsById: Tweak type to accept read-only objects, too.
JavaScript
apache-2.0
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile
--- +++ @@ -21,7 +21,7 @@ export const initialsFromString = (name: string): string => (name.match(/\S+\s*/g) || []).map(x => x[0].toUpperCase()).join(''); -export function groupItemsById<T: { id: number }>(items: T[]): { [id: number]: T } { +export function groupItemsById<T: { +id: number }>(items: T[]): { [id:...
be686e0accb9e8facc652a559b1fb39a8508c97d
awx/ui/client/src/i18n.js
awx/ui/client/src/i18n.js
/* jshint ignore:start */ var sprintf = require('sprintf-js').sprintf; /** * @ngdoc method * @name function:i18n#N_ * @methodOf function:N_ * @description this function marks the translatable string with N_ * for 'grunt nggettext_extract' * */ export function N_(s) { return s; } export default angular...
/* jshint ignore:start */ var sprintf = require('sprintf-js').sprintf; /** * @ngdoc method * @name function:i18n#N_ * @methodOf function:N_ * @description this function marks the translatable string with N_ * for 'grunt nggettext_extract' * */ export function N_(s) { return s; } export default angular...
Tweak logic used by UI to detect language
Tweak logic used by UI to detect language Chromium and WebKit based browsers have the window.navigator.languages attribute, which is an ordered array of preferred languages as configured in the browser’s settings. Although changing the language in Chrome results in an Accept-Language header being added to requests, w...
JavaScript
apache-2.0
snahelou/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,snahelou/awx
--- +++ @@ -19,7 +19,8 @@ .factory('I18NInit', ['$window', 'gettextCatalog', function ($window, gettextCatalog) { return function() { - var langInfo = $window.navigator.language || + var langInfo = ($window.navigator.languages || [])[0] || + $window.navigato...
d2702efedfda3ffdb944a8118befc5d6409e8741
lib/visualizer.js
lib/visualizer.js
'use strict' const visualizeBoardS = Symbol('visualizeBoard') const visualizeOrdersS = Symbol('visualizeOrders') module.exports = class Visualizer { constructor (mapSvg, visualizeBoard, visualizeOrders) { this.map = mapSvg this[visualizeBoardS] = visualizeBoard this[visualizeOrdersS] = visualizeOrders ...
'use strict' module.exports = class Visualizer { constructor (mapSvg, visualizeBoard, visualizeOrders) { this.map = mapSvg } visualizeBoard (board) { } visualizeOrders (orders) { } addEventListenerForUnits (event, listener) { const units = this.map.querySelectorAll('.vizdip-unit') if (units...
Fix the signature of Visualizer
Fix the signature of Visualizer ref #1
JavaScript
mit
KarmaMi/vizdip,KarmaMi/vizdip,KarmaMi/vizdip,KarmaMi/vizdip
--- +++ @@ -1,20 +1,13 @@ 'use strict' - -const visualizeBoardS = Symbol('visualizeBoard') -const visualizeOrdersS = Symbol('visualizeOrders') module.exports = class Visualizer { constructor (mapSvg, visualizeBoard, visualizeOrders) { this.map = mapSvg - this[visualizeBoardS] = visualizeBoard - this...
893f7371ae0d2517d4276ab4e868ce03b0cf1dbe
lint/lib/linters/RuboCop.js
lint/lib/linters/RuboCop.js
"use strict"; function RuboCop(opts) { this.exe = "rubocop"; this.ext = process.platform === 'win32' ? ".bat" : ""; this.path = opts.path; this.responsePath = "stdout"; this.args = ["-s", "{path}", "-f", "json", "--force-exclusion"] ; if (opts.lint) this.args.push("-l"); if (opts.only) this.args = this.args.c...
"use strict"; function RuboCop(opts) { this.exe = "rubocop"; this.ext = process.platform === 'win32' ? ".bat" : ""; this.path = opts.path; this.responsePath = "stdout"; this.args = ["-s", "{path}", "-f", "json"] ; if (opts.lint) this.args.push("-l"); if (opts.only) this.args = this.args.concat("--only", opts....
Remove force exclusion for rubocop
Remove force exclusion for rubocop Fixes https://github.com/rubyide/vscode-ruby/issues/175
JavaScript
mit
rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby
--- +++ @@ -6,7 +6,7 @@ this.path = opts.path; this.responsePath = "stdout"; - this.args = ["-s", "{path}", "-f", "json", "--force-exclusion"] ; + this.args = ["-s", "{path}", "-f", "json"] ; if (opts.lint) this.args.push("-l"); if (opts.only) this.args = this.args.concat("--only", opts.only.join(','));
8fdece0b1a17c16ad3028befa34adb56d49c4203
lints/disallowFspathRule.js
lints/disallowFspathRule.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Lint = require("tslint"); class Rule extends Lint.Rules.AbstractRule { apply(sourceFile) { return this.applyWithWalker(new NoFsPathWalker(sourceFile, this.getOptions())); } } Rule.FAILURE_STRING = "Do not use Uri.fsPath (or fsPath...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Lint = require("tslint"); class Rule extends Lint.Rules.AbstractRule { apply(sourceFile) { return this.applyWithWalker(new NoFsPathWalker(sourceFile, this.getOptions())); } } Rule.FAILURE_STRING = "Do not use Uri.fsPath or TextDoc...
Fix typo and add TODO
Fix typo and add TODO
JavaScript
mit
Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code
--- +++ @@ -9,10 +9,11 @@ return this.applyWithWalker(new NoFsPathWalker(sourceFile, this.getOptions())); } } -Rule.FAILURE_STRING = "Do not use Uri.fsPath (or fsPath(document.uri)), use fsPath() instead"; +Rule.FAILURE_STRING = "Do not use Uri.fsPath or TextDocument.fileName because they lowercase Windows driv...
18dbfb541960465944971269a393af668ecbb33d
specs/database.js
specs/database.js
var chai = require('chai'); var expect = chai.expect; var db = require('../server/db/config'); var models = require('../server/db/models'); describe('database storage', function() { var testData = { x: 37.783599, y: -122.408974, z: 69, message: 'Brooks was here' }; var invalidTestData = { x: ...
var chai = require('chai'); var expect = chai.expect; var db = require('../server/db/config'); var models = require('../server/db/models'); describe('database storage', function() { var testData = { x: 37.783599, y: -122.408974, z: 69, message: 'Brooks was here' }; var invalidTestData = { x: ...
Add tests to confirm message retrieval
Add tests to confirm message retrieval
JavaScript
mit
team-oath/uncovery,team-oath/uncovery,team-oath/uncovery,team-oath/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery,scottdixon/uncovery
--- +++ @@ -15,6 +15,10 @@ y: -122.408974, z: 69 }; + var testLocation = { + x: 37.183549, + y: -122.108974, + }; it('should validate user input', function(done) { models.insert(invalidTestData, function(msg) { @@ -29,4 +33,11 @@ done(); }) }); + + it('should retrieve me...
d2adfb4288153b333a0aef69428a0312d163d085
Kinect2Scratch.js
Kinect2Scratch.js
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; // Block...
(function(ext) { // Cleanup function when the extension is unloaded ext._shutdown = function() {}; // Status reporting code // Use this to report missing hardware, plugin or unsupported browser ext._getStatus = function() { return {status: 2, msg: 'Ready'}; }; // Block...
Change boolean to reporter for block with dropdowns
Change boolean to reporter for block with dropdowns
JavaScript
bsd-3-clause
visor841/SkelScratch,Calvin-CS/SkelScratch
--- +++ @@ -14,7 +14,7 @@ blocks: [ ['', 'My First Block', 'my_first_block'], ['r', '%n ^ %n', 'power', 2, 3], - ['b', '%m.k', 'k', 'heady'] + ['r', '%m.k', 'k', 'heady'] ], menus: { @@ -32,10 +32,10 @@ ext.k = function(m) { switch(m){...
2b928608f1bad3f1721838afa00dccddb724f48b
util/schemesPreviewGenerator.js
util/schemesPreviewGenerator.js
const nunjucks = require('nunjucks'); const fs = require('fs-promise'); const path = require('path'); const yaml = require('js-yaml'); const Promise = require('bluebird'); const schemesDir = '../db/schemes'; fs .readdir(schemesDir) .then(function(schemeFileNames) { const promises = []; schemeFileNames.for...
const nunjucks = require('nunjucks'); const fs = require('fs-promise'); const path = require('path'); const yaml = require('js-yaml'); const Promise = require('bluebird'); const schemesDir = path.join(__dirname, '../db/schemes'); fs .readdir(schemesDir) .then(function(schemeFileNames) { const promises = []; ...
Read files relative from script's directory
fix(cli): Read files relative from script's directory
JavaScript
mit
base16-builder/base16-builder,aloisdg/base16-builder,base16-builder/base16-builder,aloisdg/base16-builder,aloisdg/base16-builder,base16-builder/base16-builder
--- +++ @@ -4,7 +4,7 @@ const yaml = require('js-yaml'); const Promise = require('bluebird'); -const schemesDir = '../db/schemes'; +const schemesDir = path.join(__dirname, '../db/schemes'); fs .readdir(schemesDir) @@ -16,12 +16,12 @@ Promise.all(promises).then(function(yamlSchemes) { yamlSchemes...
daeb051c4fba5603cad33cc414528052c09a0afd
src/geolocator.js
src/geolocator.js
angular.module('aGeolocator', []) .factory('Geolocator', ['$http', '$q', function($http, $q){ GEOIP_URL = "https://www.telize.com/geoip" _getIPLocation = function() { $http.get(GEOIP_URL).then(function(res) { return res.data; }).catch(function(err){ return $q.reject(err.data); ...
angular.module('aGeolocator', []) .factory('Geolocator', ['$http', '$q', function($http, $q){ var GEOIP_URL = "https://www.telize.com/geoip"; var _getIPLocation = function() { return $http.get(GEOIP_URL).then(function(res) { return res.data; }).catch(function(err){ return $q.rejec...
Fix returned result and variable declaration
Fix returned result and variable declaration
JavaScript
bsd-2-clause
asoesilo/geolocator
--- +++ @@ -1,9 +1,9 @@ angular.module('aGeolocator', []) .factory('Geolocator', ['$http', '$q', function($http, $q){ - GEOIP_URL = "https://www.telize.com/geoip" + var GEOIP_URL = "https://www.telize.com/geoip"; - _getIPLocation = function() { - $http.get(GEOIP_URL).then(function(res) { + var ...
966a743b8e9dd75cd68fde99686e12c889103e86
views/components/embed-image.js
views/components/embed-image.js
import React from "react-native"; const { Dimensions, Image } = React; export default class EmbedImage extends React.Component { shouldComponentUpdate(nextProps) { return ( this.props.height !== nextProps.height || this.props.width !== nextProps.width || this.props.uri !== nextProps.uri ); } render...
import React from "react-native"; const { Dimensions, Image } = React; export default class EmbedImage extends React.Component { shouldComponentUpdate(nextProps) { return ( this.props.height !== nextProps.height || this.props.width !== nextProps.width || this.props.uri !== nextProps.uri ); } render...
Fix image size in chat
Fix image size in chat
JavaScript
unknown
wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods,wesley1001/io.scrollback.neighborhoods,scrollback/io.scrollback.neighborhoods
--- +++ @@ -25,7 +25,7 @@ const ratio = (height && width) ? (height / width) : 1; // Determine the optimal height and width - const displayWidth = (height ? Math.min(width, win.width - 56) : 160); + const displayWidth = (height ? Math.min(width, win.width - 120) : 160); const displayHeight = displayWidth...
227b01b527deab80958e30bd8bf6a194b06317aa
src/components/Admin/Menubar.js
src/components/Admin/Menubar.js
import React from 'react'; import { Link } from 'react-router-dom'; export const Menubar = () => ( <div className="sub-navigation"> <div className="limit-width"> <Link className="sub-navigation__link" to="/admin/profile"><span>Profile</span></Link> <Link className="sub-navigation__l...
import React from 'react'; import { NavLink } from 'react-router-dom'; export const Menubar = () => ( <div className="sub-navigation"> <div className="limit-width"> <NavLink activeClassName="active" className="sub-navigation__link" to="/admin/profile"><span>Profile</span></NavLink> ...
Swap Link to Navlink for settings active class
Swap Link to Navlink for settings active class
JavaScript
apache-2.0
nahody/biografia,nahody/biografia
--- +++ @@ -1,12 +1,12 @@ import React from 'react'; -import { Link } from 'react-router-dom'; +import { NavLink } from 'react-router-dom'; export const Menubar = () => ( <div className="sub-navigation"> <div className="limit-width"> - <Link className="sub-navigation__link" to="/admin/pro...
d59767ea4bf2e0eeeb8537302d071284dc0459e6
src/constants/LanguageColors.js
src/constants/LanguageColors.js
const LANGUAGE_COLORS = { Scala: '#BB0017', Clojure: '#00AA00', JS: '#CCAA00', JavaScript: '#CCAA00', CoffeeScript: '#CCAA00', Ruby: '#9B111E', VB: '#663300', 'C#': '#7600BC', Go: '#996633', HTML5: '#FF0032', Swift: '#FC4831', Shell: '#03C103', Python: '#0000CC', 'C++': '#FF0099', Groovy: ...
import GITHUBCOLORS from '../config/github-colors.json'; const LANGUAGE_COLORS = GITHUBCOLORS; LANGUAGE_COLORS.DEFAULT= '#B3B3B3'; export default LANGUAGE_COLORS;
Add github programming language colrs
Add github programming language colrs
JavaScript
mit
zalando/zalando.github.io-dev,zalando/zalando.github.io-dev
--- +++ @@ -1,23 +1,6 @@ -const LANGUAGE_COLORS = { - Scala: '#BB0017', - Clojure: '#00AA00', - JS: '#CCAA00', - JavaScript: '#CCAA00', - CoffeeScript: '#CCAA00', - Ruby: '#9B111E', - VB: '#663300', - 'C#': '#7600BC', - Go: '#996633', - HTML5: '#FF0032', - Swift: '#FC4831', - Shell: '#03C103', - Python: ...
97f346c585a727806718db2b02bed6a9ca5ec5c9
src/js/cordova.js
src/js/cordova.js
'use strict'; // Load only within android app: cordova=android if (window.location.search.search('cordova') > 0) { (function(d, script) { script = d.createElement('script'); script.type = 'text/javascript'; script.src = 'js/cordova/cordova.js'; d.getElementsByTagName('head')[0].appendChild(script); ...
'use strict'; // Load only within android app: cordova=android if (window.location.search.search('cordova') > 0) { (function(d, script) { // When cordova is loaded function onLoad() { d.addEventListener('deviceready', onDeviceReady, false); } // Device APIs are available function onDeviceR...
Update application cache on device resume
Update application cache on device resume
JavaScript
agpl-3.0
P2Pvalue/teem,P2Pvalue/pear2pear,Grasia/teem,P2Pvalue/teem,Grasia/teem,Grasia/teem,P2Pvalue/teem,P2Pvalue/pear2pear
--- +++ @@ -3,7 +3,25 @@ // Load only within android app: cordova=android if (window.location.search.search('cordova') > 0) { (function(d, script) { + // When cordova is loaded + function onLoad() { + d.addEventListener('deviceready', onDeviceReady, false); + } + + // Device APIs are available +...
0448d3651cbf8df005ed20dd05ab1241ae940f76
app/helpers/moment-calendar.js
app/helpers/moment-calendar.js
export { default, momentCalendar } from 'ember-moment/helpers/moment-calendar';
import Ember from 'ember'; import config from '../config/environment'; import CalendarHelper from 'ember-moment/helpers/moment-calendar'; export default CalendarHelper.extend({ globalAllowEmpty: !!Ember.get(config, 'moment.allowEmpty') });
Extend the CalendarHelper with global allowEmpty from config.
Extend the CalendarHelper with global allowEmpty from config.
JavaScript
mit
exop-group/ember-moment,stefanpenner/ember-moment,exop-group/ember-moment,stefanpenner/ember-moment
--- +++ @@ -1 +1,7 @@ -export { default, momentCalendar } from 'ember-moment/helpers/moment-calendar'; +import Ember from 'ember'; +import config from '../config/environment'; +import CalendarHelper from 'ember-moment/helpers/moment-calendar'; + +export default CalendarHelper.extend({ + globalAllowEmpty: !!Ember.get...
753171601f3471320ac3ec560b5148f9da687622
app/scripts/src/content/item.js
app/scripts/src/content/item.js
'use strict'; /* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003). I left this object because it could be useful for other movies/shows */ var fullTitles = { 'Star Wars: The Clone Wars': '"Star Wars: The Clone Wars"', 'The Office (U.S.)': 'The Office (US)' } func...
'use strict'; /* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003). I left this object because it could be useful for other movies/shows */ var fullTitles = { 'Star Wars: The Clone Wars': '"Star Wars: The Clone Wars"', 'The Office (U.S.)': 'The Office (US)', 'The...
Add more fullTitles for Item - The Blind Side was returing Blind Side - The Avengers was returning Avenged
Add more fullTitles for Item - The Blind Side was returing Blind Side - The Avengers was returning Avenged
JavaScript
mit
MrMamen/traktNRK,MrMamen/traktNRK,tegon/traktflix,MrMamen/traktflix,MrMamen/traktflix,tegon/traktflix
--- +++ @@ -4,7 +4,9 @@ I left this object because it could be useful for other movies/shows */ var fullTitles = { 'Star Wars: The Clone Wars': '"Star Wars: The Clone Wars"', - 'The Office (U.S.)': 'The Office (US)' + 'The Office (U.S.)': 'The Office (US)', + 'The Blind Side': '"The Blind Side"', + 'The Av...
15df89b668ce34c7d7e0cec6d44471baf031eb24
www/js/proj4.js
www/js/proj4.js
var proj4 = require('proj4'); proj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs'); var lat = 59.932624; var lng = 10.734738; var xy = proj4('EPSG:25832', { x: lng, y: lat }) console.log(xy);
var proj4 = require('proj4'); proj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs'); var lat = 59.932624; var lng = 10.734738; var xy = proj4('EPSG:25832', { x: lng, y: lat }) console.log(xy); // Fetch closest stations: http://reis.ruter.no/reisrest/stop/getcloseststopsbycoordinates/?coordina...
Add note on how to fetch closest stations from the ruter API
Add note on how to fetch closest stations from the ruter API
JavaScript
mit
hkwaller/next,hkwaller/next,hkwaller/next,hkwaller/next
--- +++ @@ -6,3 +6,6 @@ var xy = proj4('EPSG:25832', { x: lng, y: lat }) console.log(xy); + +// Fetch closest stations: http://reis.ruter.no/reisrest/stop/getcloseststopsbycoordinates/?coordinates=(x=596948,y=6645178)&proposals=7 +// NB. xy above must be piped through Math.round before being used in the api reque...
e8ca95728951c633891fe8920f1bd450bf84364d
scripts/footer.js
scripts/footer.js
var months = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"]; var footer = document.getElementById("footer"); var div = document.createElement("DIV"); var update = new Date(document.lastModified); var day = update.getDate(); var month = upda...
var months = ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"]; var footer = document.getElementById("footer"); var div = document.createElement("DIV"); var update = new Date(document.lastModified); var day = update.getDate(); var month = upda...
Fix month of last update
Fix month of last update
JavaScript
mit
nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io
--- +++ @@ -9,5 +9,5 @@ var day = update.getDate(); var month = update.getMonth(); var year = update.getFullYear(); -div.innerHTML = "<p>ültima actualización: " + day + " de " + month[months] + " de " + year + "</p>" +div.innerHTML = "<p>ültima actualización: " + day + " de " + months[month] + " de " + year + "</p...