commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
b622f48ea31587efdb7aff5c6746758fde5e192c
bin/mongodb-runner-worker.js
bin/mongodb-runner-worker.js
#!/usr/bin/env node var args = require('minimist')(process.argv.slice(2), {}); var run = require('../'); run.worker(args, function(err) { /* eslint no-console:0 */ if (err) { console.error(err); process.exit(1); return; } process.exit(0); });
#!/usr/bin/env node var args = require('minimist')(process.argv.slice(2), {}); var run = require('../'); run.worker(args, function(err) { /* eslint no-console:0 */ if (err) { console.error(err); process.exit(1); return; } });
Fix mongo processes not being stopped
bug: Fix mongo processes not being stopped The worker must not exit or the parent process wont be able to send `stop` that shuts down any mongo processes cleanly.
JavaScript
apache-2.0
mongodb-js/runner
d3d44017515759c7e751d91b75dc1971f57b6ca2
frontend/static/resources/javascript/pmg.js
frontend/static/resources/javascript/pmg.js
$(function() { $(".collapse-link").on("click", function(e) { e.preventDefault(); $(this).next(".collapse").toggle(400, function(test) { if ($(this).css("display") == "block") { $(this).prev(".collapse-link").find(".fa").removeClass("fa-caret-right").addClass("fa-caret-down"); } else { $(this).prev("....
$(function() { $(".collapse-link").on("click", function(e) { e.preventDefault(); $(this).next(".collapse").toggle(300, function(test) { if ($(this).css("display") == "block") { $(this).addClass("in"); $(this).prev(".collapse-link").find(".fa").removeClass("fa-caret-right").addClass("fa-caret-down"); ...
Fix toggling of collapse elements.
Fix toggling of collapse elements.
JavaScript
apache-2.0
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
f9dc378cfd2db6b647c8b2500ece282ab65b69ac
index.js
index.js
exports.express = function () { return require('./lib/express') } exports.koa = function () { return require('./lib/koa') }
exports = module.exports = require('./lib/express') exports.express = function () { return require('./lib/express') } exports.koa = function () { return require('./lib/koa') }
Load express implementation by default
Load express implementation by default
JavaScript
mit
woltemade/grant,bitinn/grant,jlabarbera11/grant,woltemade/grant,jcdenton/grant,bitinn/grant,fejalish/grant,jcdenton/grant,simov/grant,fejalish/grant
871863fdfde9635e2df9e4031066d2804fe115c8
index.js
index.js
/* global FileReader */ var methods = { arraybuffer: 'readAsArrayBuffer', dataurl: 'readAsDataURL', text: 'readAsText' }; function readBlob (blob, type, cb) { var promise; if (typeof type !== 'string') { cb = type; type = 'arraybuffer'; } if (!cb) { promise = new Promise(function (resolve,...
/* global FileReader */ var methods = { arraybuffer: 'readAsArrayBuffer', dataurl: 'readAsDataURL', text: 'readAsText' }; function readBlob (blob, type, cb) { var promise; if (typeof type !== 'string') { cb = type; type = 'arraybuffer'; } if (!cb) { promise = new Promise(function (resolve,...
Use loadend to capture error or result
Use loadend to capture error or result
JavaScript
mit
wbinnssmith/read-blob
1d77c73c5408a0141c0f531ecc6aec8c0fe4ee7e
index.js
index.js
'use strict'; var got = require('got'); var cheerio = require('cheerio'); var md = require('html-md'); module.exports = function(id, callback) { var url = 'http://www.stm.dk/_p_' + id + '.html'; got(url, function(err, data){ var $ = cheerio.load(data); var meta = $('meta[name="created"]'); var speec...
'use strict'; var got = require('got'); var cheerio = require('cheerio'); var md = require('html-md'); module.exports = function(id, callback) { var url = 'http://www.stm.dk/_p_' + id + '.html'; got(url, function(err, data){ var $ = cheerio.load(data); var meta = $('meta[name="created"]'); var speec...
Reorder callback data object construction
Reorder callback data object construction
JavaScript
mit
matiassingers/statsministeriet-speeches-scraper
171624227828c69015701f908923802a16a296f0
index.js
index.js
var Comments = require('./comments.js'); var config = require('./config.json'); exports.handler = function(event, context) { try { var comments = new Comments(config); comments.submit(event) .then(function(url) { context.succeed(url); }) .catch(function(err) { context.fail('Server err...
var Comments = require('./comments.js'); var config = require('./config.json'); exports.handler = function(event, context, callback) { try { var comments = new Comments(config); comments.submit(event) .then(function(url) { callback(null, url); }) .catch(function(err) { callback(err); ...
Use callback instead of context
Use callback instead of context
JavaScript
isc
ummels/jekyll-aws-comments,ummels/jekyll-aws-comments
0402f8be8de176e9ff7f495075d8674fbb30b534
index.js
index.js
var fs = require('fs'); var requireDirectory = function(m, path){ var retval = {}; fs.readdirSync(path).forEach(function(filename){ if(fs.statSync(path + filename).isDirectory()){ retval[filename] = requireDirectory(m, path + filename + '/'); }else{ var name = filename.substring(0, filename.las...
var fs = require('fs'); var join = require('path').join; var resolve = require('path').resolve; var requireDirectory = function(m, path){ var retval = {}; path = resolve(path); fs.readdirSync(path).forEach(function(filename){ var joined = join(path, filename); if(fs.statSync(joined).isDirectory()){ ...
Use path.join and path.resolve to create paths
Use path.join and path.resolve to create paths This allows passing directories without trailing '/' or without initial './'.
JavaScript
mit
troygoode/node-require-directory
5ddcc8b32ed914bd685647ba6dc2cadbd3a22af8
index.js
index.js
'use strict'; const os = require('os'); const path = require('path'); const alfy = require('alfy'); const dotenv = require('dotenv'); const imgur = require('imgur'); const clipboardy = require('clipboardy'); // Load config from ~/.alfred-imgur dotenv.config({path: path.join(os.homedir(), '.alfred-imgur.conf')}); // C...
'use strict'; const os = require('os'); const path = require('path'); const alfy = require('alfy'); const dotenv = require('dotenv'); const imgur = require('imgur'); const clipboardy = require('clipboardy'); // Load config from ~/.alfred-imgur dotenv.config({path: path.join(os.homedir(), '.alfred-imgur.conf')}); // C...
Disable "no-negated-condition" for if condition
Disable "no-negated-condition" for if condition
JavaScript
mit
frdmn/alfred-imgur
97c5ca6cad92445e66be72cdad945875db9e81db
index.js
index.js
var port = process.env.PORT || 3000 var githubBotUserId = process.env.GITHUB_BOT_USER_ID var giphyApiKey = process.env.GIPHY_API_KEY var cert = fs.readFileSync('./github.pem') var app = require('express')() var bodyParser = require('body-parser') app.use(bodyParser.json()) var server = require('http').Server(app) ser...
var port = process.env.PORT || 3000 var githubBotUserId = process.env.GITHUB_BOT_USER_ID var giphyApiKey = process.env.GIPHY_API_KEY var cert = fs.readFileSync('./github.pem') var app = require('express')() var bodyParser = require('body-parser') app.use(bodyParser.json()) var server = require('http').Server(app) ser...
Return 200 so github likes it
Return 200 so github likes it
JavaScript
mit
resmio/sombrero
531a1fd9ddd0ad2ca314ef9f11a23839f1b893b5
index.js
index.js
var config = require('./config.json'); var io = require('socket.io-client'); var socket = io.connect(config.serverUrl); socket.on('connect', function(){ console.log("Connecting Device"); socket.emit('deviceInfo', config.device); socket.on("execute",function(data){ console.log(data.runitem) console.log("...
var config = require('./config.json'); var io = require('socket.io-client'); var socket = io.connect(config.serverUrl); socket.on('connect', function(){ console.log("Connecting Device"); socket.emit('deviceInfo', config.device); socket.on("execute",function(data){ console.log(data.runitem) console.log("...
Exit process if server disconnects
Exit process if server disconnects
JavaScript
apache-2.0
jijeshmohan/mgrid-client
06d4a77614a4663d97ce916751ec74bdbf3f9098
index.js
index.js
'use strict'; var got = require('got'); var cheerio = require('cheerio'); var md = require('html-md'); module.exports = function(id, callback) { var url = 'http://www.stm.dk/_p_' + id + '.html'; got(url, function(err, data){ var $ = cheerio.load(data); var meta = $('meta[name="created"]'); var speec...
'use strict'; var got = require('got'); var cheerio = require('cheerio'); var md = require('html-md'); module.exports = function(id, callback) { var url = 'http://www.stm.dk/_p_' + id + '.html'; got(url, function(err, data){ var $ = cheerio.load(data); var meta = $('meta[name="created"]'); var speec...
Fix if no video link element in speech
Fix if no video link element in speech
JavaScript
mit
matiassingers/statsministeriet-speeches-scraper
2cb0a2c721e8a17e125f867f9feebfebbb9363c8
index.js
index.js
/* jshint node: true */ 'use strict'; const TransformFilter = require('./lib/transform-filter'); const fs = require('fs'); module.exports = { name: 'ember-form-for', included(app) { this._super.included.apply(this, arguments); var controlsDirectory = `${app.project.root}/addon/templates/components/contr...
/* jshint node: true */ 'use strict'; const TransformFilter = require('./lib/transform-filter'); const fs = require('fs'); module.exports = { name: 'ember-form-for', included(app) { this._super.included.apply(this, arguments); var controlsDirectory = `${__dirname}/addon/templates/components/controls`; ...
Use directory path in order to maintain relative path to addon templates
Use directory path in order to maintain relative path to addon templates
JavaScript
mit
Foodee/ember-foxy-forms,Foodee/ember-foxy-forms
e7fe2abc6dce6646d9d70b115df161d71c6c7e92
index.js
index.js
'use strict'; var async = require('async'); var plist = require('simple-plist'); var decompress = require('decompress-zip'); var provisioning = require('provisioning'); var entitlements = require('entitlements'); var rimraf = require('rimraf'); var tmp = require('temporary'); var glob = require("glob"); var output =...
'use strict'; var async = require('async'); var plist = require('simple-plist'); var decompress = require('decompress-zip'); var provisioning = require('provisioning'); var entitlements = require('entitlements'); var rimraf = require('rimraf'); var tmp = require('temporary'); var glob = require("glob"); var output =...
Add comment about running entitlements on OS X
Add comment about running entitlements on OS X
JavaScript
mit
matiassingers/ipa-metadata
d3c03ccdde06a351b3a7b1f1a72cfcc4d60f8750
index.js
index.js
'use strict'; var cheerio = require('cheerio'); var he = require('he'); var hl = require('highlight.js'); var highlightAuto = hl.highlightAuto; var highlight = hl.highlight; module.exports = function(input) { this.cacheable(); var $ = cheerio.load(input); $('code').replaceWith(function(i, e) { v...
'use strict'; var cheerio = require('cheerio'); var he = require('he'); var hl = require('highlight.js'); var highlightAuto = hl.highlightAuto; var highlight = hl.highlight; module.exports = function(input) { this.cacheable(); var $ = cheerio.load(input); $('code').replaceWith(function(i, e) { v...
Add the 'hljs' class to the pre tag
Add the 'hljs' class to the pre tag
JavaScript
mit
bebraw/highlight-loader
4fd749be54bde1749a5d43b92d8837a7fe50806c
index.js
index.js
var express = require('express'); var app = express(); var dominos = require('dominos'); app.use(require('body-parser').json()); app.get('/v1/stores', function(req, res) { var address = req.query.address; if (!address) { res.status(400).json({ code: 'MISSING_ADDRESS', title: 'M...
var express = require('express'); var app = express(); var dominos = require('dominos'); app.use(require('body-parser').json()); app.get('/v1/stores', function(req, res) { var address = req.query.address; if (!address) { res.status(400).json({ code: 'MISSING_ADDRESS', title: 'M...
Add store info and menue
Add store info and menue
JavaScript
mit
victorquinn/dominos
4a01f505b76c9914e1e85d41e2c7ad45370d3265
index.js
index.js
/* jshint node: true */ 'use strict'; var EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); var Funnel = require('broccoli-funnel'); module.exports = { name: 'ember-welcome-page', included: function(app) { this._super.included(app); if (this._isProduction()) { return; } app.import('vendor...
/* jshint node: true */ 'use strict'; module.exports = { name: 'ember-welcome-page', included: function(app) { this._super.included(app); if (this._isProduction()) { return; } app.import('vendor/welcome-page.css'); }, treeForPublic: function() { if (this._isProduction()) { return false; } ...
Remove eager requires when unneeded.
Remove eager requires when unneeded.
JavaScript
mit
locks/ember-welcome-page,locks/ember-welcome-page
4b5f056457fd9f74d277b22d767172199757d99c
index.js
index.js
function unsplay (items, key, parentKey) { var nodes = items.reduce(function (nodes, item) { nodes[item[key]] = {item: item, children: []}; return nodes; }, {}); var lastCount, count; do { lastCount = count; count = 0; nodes = Object.keys(nodes).reduce(function (newNodes, id) { var no...
function unsplay (items, key, parentKey) { var nodes = items.reduce(function (nodes, item) { nodes[item[key]] = {item: item, children: []}; return nodes; }, {}); do { var reparented = false; nodes = Object.keys(nodes).reduce(function (newNodes, id) { var node = nodes[id]; var parentId...
Replace count check with more correct reparent check
Replace count check with more correct reparent check
JavaScript
mit
dbkaplun/unsplay
51434f7864f909e0469883dd23add10162f9d5f2
index.js
index.js
/** * Remove initial and final spaces and tabs at the line breaks in `value`. * Does not trim initial and final spaces and tabs of the value itself. * * @param {string} value * Value to trim. * @returns {string} * Trimmed value. */ export function trimLines(value) { return String(value).replace(/[ \t]*(\r...
/** * Remove initial and final spaces and tabs at the line breaks in `value`. * Does not trim initial and final spaces and tabs of the value itself. * * @param {string} value * Value to trim. * @returns {string} * Trimmed value. */ export function trimLines(value) { const source = String(value) const se...
Fix to much improve performance
Fix to much improve performance Related-to: syntax-tree/mdast-util-to-hast#62. Co-authored-by: Nathaniel Hunter <77fd1ce3b5fe4bf20a364c9bd443082c90a7e35f@gmail.com>
JavaScript
mit
wooorm/trim-lines
5133be98f621849456758d3546b3ac233ef1f4ad
app/webpack/state.js
app/webpack/state.js
import moment from 'moment'; let state = window.state = { currentTime: moment('2013-01-12 16:30'), alarmRinging: true, bathroomTowel: "clean", garbageOutside: false, garageDoorOpen: false, inventory: [], wearing: "pajamas", luck: 10, confidence: 10, car: { running: false, atWork: false },...
import moment from 'moment'; let state = window.state = { currentTime: moment('2013-01-12 16:30'), alarmRinging: true, bathroomTowel: "clean", garbageOutside: false, garageDoorOpen: false, inventory: [], wearing: "pajamas", luck: 10, confidence: 10, car: { running: false, atWork: false },...
Add demerits() function for calculating report card
Add demerits() function for calculating report card
JavaScript
mit
TEAMBUTT/LD35
122b271049ffc76fce9be83e93951c98a1b000df
client/property.js
client/property.js
import React from 'react'; import {connect} from 'react-redux'; import socksend from './websocket'; export default connect()(class Property extends React.Component { update(e) { e.preventDefault(); socksend("bid", {name: this.props.name, value: this.refs.bid.value}); } render() { let minbid = this.props.bidd...
import React from 'react'; import {connect} from 'react-redux'; import socksend from './websocket'; export default connect()(class Property extends React.Component { update(e) { e.preventDefault(); socksend("bid", {name: this.props.name, value: this.refs.bid.value}); } render() { let minbid = this.props.bidd...
Tidy up the bidding when you're outbid
Tidy up the bidding when you're outbid
JavaScript
mit
Rosuav/monopoly-open-bid,Rosuav/monopoly-open-bid,Rosuav/monopoly-open-bid
7b88d6088d96541a9504d0a061ea220e49333b3c
app.js
app.js
'use strict'; const koa = require('koa'); const passport = require('./config/passport'); const webpack = require('webpack'); const webpackConfig = require('./webpack.config'); const compiler = webpack(webpackConfig); const logger = require('koa-logger'); const serve = require('koa-static'); const routes = require('./c...
'use strict'; const koa = require('koa'); const passport = require('./config/passport'); const webpack = require('webpack'); const webpackConfig = require('./webpack.config'); const compiler = webpack(webpackConfig); const logger = require('koa-logger'); const serve = require('koa-static'); const routes = require('./c...
Add koa-json module and koa-qs module
Add koa-json module and koa-qs module
JavaScript
mit
sunya9/follow-manager,sunya9/follow-manager
02634d0a7fd6cc63a59cf9d507f79186c5b055b7
index.js
index.js
// setup transform definition aliases import {definition} from 'vega-dataflow'; definition('Sort', definition('Collect')); definition('Formula', definition('Apply')); export {default as parse} from './src/parse'; export {default as selector} from './src/parsers/event-selector'; export {default as signal} from './src/...
// setup transform definition aliases import {definition} from 'vega-dataflow'; definition('Formula', definition('Apply')); export {default as parse} from './src/parse'; export {default as selector} from './src/parsers/event-selector'; export {default as signal} from './src/parsers/signal'; export {default as signalU...
Drop Sort alias for Collect.
Drop Sort alias for Collect.
JavaScript
bsd-3-clause
vega/vega-parser
3fb5617ea1d1e11b1dfa199849ce681bb1f39ec1
index.js
index.js
var exec = require('child_process').exec function _command (cmd, cb) { exec(cmd, { cwd: __dirname }, function (err, stdout, stderr) { cb(stdout.split('\n').join('')) }) } module.exports = { short : function (cb) { _command('git rev-parse --short HEAD', cb) } , long : function (cb) { _...
var exec = require('child_process').exec function _command (cmd, dir, cb) { if (typeof dir === 'function') cb = dir, dir = __dirname exec(cmd, { cwd: dir }, function (err, stdout, stderr) { cb(stdout.split('\n').join('')) }) } module.exports = { short : function (cb) { _command('git rev-parse --...
Allow passing in a custom directory.
Allow passing in a custom directory.
JavaScript
mit
yanatan16/git-rev
1dec70947842c3a374de465dc898532ee1572436
index.js
index.js
var mustache = require('mustache') mustache.tags = '% %' function render (template, view) { var KEYWORD_REGEX = /%(asset_name_linked|asset_short_name_linked)\b/g var _template = template.replace(KEYWORD_REGEX, '%&$1') var _view = { asset_name_linked: function nameLinked () { if (view.name && view.href...
var mustache = require('mustache') var defaultWriter = new mustache.Writer() mustache.tags = '% %' function unescapeKeywords (template) { var KEYWORD_REGEX = /%(asset_name_linked|asset_short_name_linked)\b/g return template.replace(KEYWORD_REGEX, '%&$1') } exports.clearCache = function clearCache () { return d...
Update API to expose: render, parse, and clearCache methods
Update API to expose: render, parse, and clearCache methods
JavaScript
mit
joshgillies/node-matrix-keywords
3d392b9834803704a43ed7410e727b39793d2e02
src/jquery-defer.js
src/jquery-defer.js
(function ($) { var slice = Array.prototype.slice; $.defer = function (func, delay) { var args = slice.call(arguments, 2), cancel = function (reject /* = true */) { clearTimeout(timerId); if ((!arguments.length || reject) && deferred.state() === "pending") { ...
(function ($) { var slice = Array.prototype.slice; $.defer = function (func, delay) { var args = slice.call(arguments, 2), isCancelled = false, cancel = function (reject /* = true */) { clearTimeout(timerId); isCancelled = true; if ...
Fix the initial cancel bug
Fix the initial cancel bug
JavaScript
mit
wilsonhut/jquery.whereas
101643192414a5e68dfd27ce5b08e3b6e044f5da
index.js
index.js
module.exports = function(handler) { if (!(handler instanceof Function || handler instanceof RegExp)) throw new Error('Unsupported param handler. Either function or Regexp expected') return function(req, res, next, val, name) { if (handler instanceof Function) { var newVal = handler(val) if (...
module.exports = function(handler) { if (!(handler instanceof Function || handler instanceof RegExp)) throw new Error('Unsupported param handler. Either function or Regexp expected') return function(req, res, next, val, name) { val = req.params[name] if (handler instanceof Function) { var newVa...
Use value from req.params rather than from fn arg
Use value from req.params rather than from fn arg
JavaScript
mit
Adslot/node-express-params-handler
3e6e426e1a0565cd69b041d27d8f566b7f15162e
index.js
index.js
module.exports = Ready function Ready() { var listeners = [] var args onready.emit = onready return onready function onready(callback) { if (typeof callback !== "function" && listeners) { args = arguments var list = listeners listeners = undefined ...
module.exports = Ready function Ready() { var ready = false var listeners = [] var args onready.emit = onready return onready function onready(callback) { if (typeof callback !== "function" && !ready) { ready = true args = arguments listeners.forEa...
Revert "refactor to remove ready variable"
Revert "refactor to remove ready variable" This reverts commit 75881f6adb2ac009210b2a720d6aac42628cb9fd.
JavaScript
mit
Raynos/ready-signal
3e1a493d935c77fd433a02d0d1d74779639e4034
index.js
index.js
module.exports = function shallowEqual(objA, objB, compare, compareContext) { let ret = compare ? compare.call(compareContext, objA, objB) : void 0; if(ret !== void 0) { return !!ret; } if(objA === objB) { return true; } if(typeof objA !== 'object' || !objA || typeof o...
module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if(ret !== void 0) { return !!ret; } if(objA === objB) { return true; } if(typeof objA !== 'object' || !objA || typeof o...
Use var in favour of let and const.
Use var in favour of let and const.
JavaScript
mit
Dashed/shallowequal,Dashed/shallowequal
cf6ffda466357f6dbc7ca54f9b4fb2d9267cd421
index.js
index.js
'use strict'; module.exports = { name: require('./package.json').name, version: require('./package.json').version, register: function (plugin, options, next) { plugin.ext('onPreResponse', function (request, reply) { var Hapi = plugin.hapi, response = request.response; if (response.variety...
'use strict'; module.exports = { name: require('./package.json').name, version: require('./package.json').version, register: function (plugin, options, next) { plugin.ext('onPreResponse', function (request, next) { var Hapi = plugin.hapi, response = request.response; if (response.variety ...
Switch request for next -- clearer terminology
Switch request for next -- clearer terminology
JavaScript
mit
bendrucker/hapi-as-promised
3eb6c78a568a1c1c5014079c6c82b8efd0779202
index.js
index.js
var chai = require('chai'); var should = chai.should(); describe('Number', function(){ it('should return number'); it('should be between 1 and 3999'); it('should not be null'); it('should not return an error'); }); describe('Roman Numeral', function(){ it('should return roman numeral'); it('should be betw...
var chai = require('chai'); var should = chai.should(); var expect = chai.expect; describe('Number', function(){ it('should return number', function() { var number = RomanNumber(20); expect(number.toInt()).to.equal(20); }); it('should be between 1 and 3999'); it('should not be null'); it('should no...
Create basic roman numeral class
Create basic roman numeral class
JavaScript
mit
jaredjohnson59/roman-numeral
e9f881a4fe521f64299e6d2c8b2890cbbdc329eb
index.js
index.js
#!/usr/bin/env node const inquirer = require('inquirer') const Listr = require('listr') const steps = [{ type: 'input', name: 'userName', message: 'Whats your name?' }] const tasks = [{ title: 'Preparing', task: (context, task) => new Promise((resolve, reject) => { setTimeout(() => resolve(), 1000) }...
#!/usr/bin/env node const inquirer = require('inquirer') const Listr = require('listr') const steps = [{ type: 'input', name: 'userName', message: 'Whats your name?' }] const tasks = [{ title: 'Preparing', task: (context, task) => new Promise((resolve, reject) => { setTimeout(() => resolve(), 1000) }...
Add test change for release
Add test change for release
JavaScript
mit
entwicklerstube/jscraftcamp-my-name-is
e7248ce92913eb7520d87cea253dd50aceca47a1
index.js
index.js
var DtsCreator = require('typed-css-modules'); var loaderUtils = require('loader-utils'); module.exports = function(source, map) { this.cacheable && this.cacheable(); this.addDependency(this.resourcePath); var callback = this.async(); // Pass on query parameters as an options object to the DtsCreator. This le...
var path = require('path'); var DtsCreator = require('typed-css-modules'); var loaderUtils = require('loader-utils'); module.exports = function(source, map) { this.cacheable && this.cacheable(); this.addDependency(this.resourcePath); var callback = this.async(); // Pass on query parameters as an options objec...
Use relative paths for emitted files
Use relative paths for emitted files
JavaScript
mit
olegstepura/typed-css-modules-loader
dbc80abffbbe5f97937f98c06226cb63c868274d
cli.js
cli.js
#!/usr/bin/env node var colors = require('colors'); var ghlint = require('./index'); function printResults(repo, results) { console.log(repo + ':'); results.forEach(function (result) { var color = result.result ? 'green' : 'red'; var mark = result.result ? '✓' : '✖'; console.log(' %s %s'[color], mark,...
#!/usr/bin/env node var colors = require('colors'); var ghlint = require('./index'); var util = require('util'); function printResults(repo, results) { console.log(repo + ':'); results.forEach(function (result) { var mark = result.result ? '✓' : '✖'; var output = util.format(' %s %s', mark, result.message...
Add support for the --no-color option
Add support for the --no-color option
JavaScript
mit
nicolasmccurdy/ghlint
dbe95b335cf378d8338705aefd46000e69b9ec55
cli.js
cli.js
#!/usr/bin/env node var tool = require('./') var through = require('through2') var split = require('split') var minimist = require('minimist') var argv = minimist(process.argv.slice(2)) var method = argv._[0] var params = argv._.slice(1) var operation = tool[method].apply(this, params) process.stdin.setEncoding('utf...
#!/usr/bin/env node var tool = require('./') var through = require('through2') var split = require('split') var minimist = require('minimist') var argv = minimist(process.argv.slice(2)) var method = argv._[0] var params = argv._.slice(1) var operation = tool[method].apply(this, params) process.stdin.setEncoding('utf...
Fix only JSON stringify objects, not strings
Fix only JSON stringify objects, not strings
JavaScript
mit
bmpvieira/tool-stream
23db2dc2b5683c8f6ee0441caf29577873e2f842
index.js
index.js
module.exports = function (string, preserve) { if (!preserve) { string = string.toLowerCase(); } return string.charAt(0).toUpperCase() + string.substring(1); } module.exports.words = function (string, preserve) { if (!preserve) { string = string.toLowerCase(); } return string.replace(/(?!^[0-9])(^|...
function capitalize (string, opts) { opts = normalizeOptions(opts) if (!opts.preserve) { string = string.toLowerCase(); } return string.charAt(0).toUpperCase() + string.substring(1); } capitalize.words = function (string, opts = {}) { opts = normalizeOptions(opts) if (!opts.preserve) { string = st...
Allow capitalize.words to accept an options object
Allow capitalize.words to accept an options object
JavaScript
mit
grncdr/js-capitalize
59c251814b4fa7757af89e6a4992f4fbb9315c23
index.js
index.js
#!/usr/bin/env node const program = require('commander') const { initCommand, runCommand, deployCommand } = require('./lib/index') const optionsFilePath = `${process.env.HOME}/.configfiles` program .version('1.0.0') .description('Config files manager') program .command('init') .alias('i') .description('a...
#!/usr/bin/env node const program = require('commander') const fs = require('fs') const path = require('path') const { initCommand, runCommand, deployCommand } = require('./lib/index') const optionsFilePath = `${process.env.HOME}/.configfiles` const packageData = JSON.parse(fs.readFileSync(path.join(__dirname, 'pack...
Use version of package.json for -v
Use version of package.json for -v
JavaScript
apache-2.0
Mindsers/configfile
fa23c12eaded3dfebe091a0a14589618aa09e74e
index.js
index.js
'use strict'; // Module dependencies var path = require('path'); // Set module root directory process.rootPublish = __dirname; process.requirePublish = function(filePath) { return require(path.normalize(process.rootPublish + '/' + filePath)); }; module.exports = process.requirePublish('app/server/PublishPlugin.js'...
'use strict'; // Module dependencies var path = require('path'); // Set module root directory process.rootPublish = __dirname; process.requirePublish = function(filePath) { return require(path.join(process.rootPublish, filePath)); }; module.exports = process.requirePublish('app/server/PublishPlugin.js');
Replace wrong use of path.normalize
Replace wrong use of path.normalize
JavaScript
agpl-3.0
veo-labs/openveo-publish,veo-labs/openveo-publish,veo-labs/openveo-publish
a0135de3a2cffa63c1ed40022e9b7df15fc44529
index.js
index.js
'use strict' // Defer function using native promises const defer = function() { let result = {} result.promise = new Promise(function(resolve, reject) { result.resolve = resolve result.reject = reject }) return result } // Make callback function const prepareCallback = function(deferred, withoutError...
'use strict' // Make callback function const prepare = function(resolve, reject, withoutErrorAttr) { // By default start with a second attribute let base = 2 // But if it's not node style callback switch to the first one if (withoutErrorAttr) --base return function () { // If node style function r...
Remove deffered and simplify script.
Remove deffered and simplify script.
JavaScript
mit
stojanovic/generatorify
924d376f6d3ac4da6b723463b4d805dd66837446
plugin/normalize-meta.js
plugin/normalize-meta.js
function forIn(object, callback) { for (const key in object) { if (!object.hasOwnProperty(key)) { continue; } callback(key); } } function normalize(metaInformation) { const normalized = {}; forIn(metaInformation, function cb(key) { if (typeof metaInformation[key] === 'object') { /...
function forIn(object, callback) { for (const key in object) { if (!object.hasOwnProperty(key)) { continue; } callback(key); } } function normalize(metaInformation) { const normalized = {}; forIn(metaInformation, function cb(key) { if (Array.isArray(metaInformation[key])) { // Nor...
Fix arrays being converted to objects
Fix arrays being converted to objects typeof new Array() is 'object', so the check if the thing was an array never hit
JavaScript
mit
carteb/carte-blanche,carteb/carte-blanche,pure-ui/styleguide,pure-ui/styleguide
4a395e364da31586e855c29de4ea28f1bf9dee00
client-vendor/after-body/promise-throttler/promise-throttler.js
client-vendor/after-body/promise-throttler/promise-throttler.js
/* * Author: CM */ (function(global) { var storage = {}; /** * @param {String} name * @param {Promise} promise * @returns {Promise} */ function promiseThrottler(name, promise) { if (!storage[name]) { storage[name] = promise.finally(function() { delete storage[name]; }); ...
/* * Author: CM */ (function(global) { var storage = {}; /** * @callback PromiseThrottled * @param {...Object|String|Number} any number of optional params * @return {Promise} */ /** * @param {PromiseThrottled} fn * @param {Boolean} cancel * @returns {PromiseThrottled} */ function p...
Update promiseThrottler for PromiseThrottled param.
Update promiseThrottler for PromiseThrottled param.
JavaScript
mit
zazabe/cm,zazabe/cm,tomaszdurka/CM,njam/CM,fauvel/CM,alexispeter/CM,vogdb/cm,cargomedia/CM,zazabe/cm,tomaszdurka/CM,tomaszdurka/CM,vogdb/cm,alexispeter/CM,fauvel/CM,njam/CM,cargomedia/CM,zazabe/cm,cargomedia/CM,alexispeter/CM,fauvel/CM,fauvel/CM,fauvel/CM,vogdb/cm,alexispeter/CM,cargomedia/CM,njam/CM,tomaszdurka/CM,vog...
c5abaaff803993163b55df309ca835995b53c0fb
app/main.js
app/main.js
import * as settings from './settings.js'; import { createView, getFrameRenderer, } from './view.js'; import { separateBodies, simulateFrame, } from './simulation.js'; import { getRandomBody, } from './meebas/bodies.js'; import { range, } from './utils/arrays.js'; const { width, height } = settings.tank; ...
import * as settings from './settings.js'; import { createView, getFrameRenderer, } from './view.js'; import { separateBodies, simulateFrame, } from './simulation.js'; import { getRandomBody, } from './meebas/bodies.js'; import { range, } from './utils/arrays.js'; const { width, height } = settings.tank; ...
Add global methods to pause and resume simulation
Add global methods to pause and resume simulation These will eventually be hooked up to buttons in the DOM. Signed-off-by: Zac Delventhal <593147d2808cd66b7e2ad59ca4b0c07d6c52cddd@gmail.com>
JavaScript
mit
meeba-farm/meeba-farm,meeba-farm/meeba-farm
931ec93d61cd9eb7f3b8c6e88fd717e97bcde4bd
client/sections/matches/containers/Matches.js
client/sections/matches/containers/Matches.js
import { connect } from 'react-redux'; import Matches from '../components/Matches.jsx'; import { unmountMatch, removeMatch, incrementOffset, addMatches } from '../actions/index.js'; const mapStateToProps = (state) => ( { matches: state.matches.values, offset: state.matches.offset, selfId: state.profile....
import { connect } from 'react-redux'; import Matches from '../components/Matches.jsx'; import { unmountMatch, removeMatch, incrementOffset, addMatches } from '../actions/index.js'; const mapStateToProps = (state) => ( { matches: state.matches.values, offset: state.matches.offset, selfId: state.profile....
Add photoUrl to sample data
Add photoUrl to sample data
JavaScript
mit
VictoriousResistance/iDioma,VictoriousResistance/iDioma
a37175ff95ce48a3ec1828a08826df1da3476382
packages/rear-core/__tests__/rear-error.spec.js
packages/rear-core/__tests__/rear-error.spec.js
const RearError = require('../rear-error'); it('Should have code, errno and other props', () => { const errMessage = 'Test error message'; const errProps = { code: 'ETEST', errno: 400, extras: ['rear-core', 'rear-logger'] }; const expectedErrProps = { extras: errProps.extras } const err = new Re...
const RearError = require('../rear-error'); describe('rear-error', () => { it('Should have message, code, errno and other props', () => { const message = 'Test error message'; const props = { code: 'ETEST', errno: 400, extras: ['rear-core'] }; const expectedProps = { extras: props.extras } const err...
Add rear-error stack trace test
Add rear-error stack trace test
JavaScript
mit
erremauro/rear,rearjs/rear
9619b96cf1ba015b3307943ca1d5a08475eb3b02
public/assets/wee/build/tasks/legacy-convert.js
public/assets/wee/build/tasks/legacy-convert.js
/* global legacy, legacyConvert */ module.exports = function(grunt) { grunt.registerTask('convertLegacy', function(task) { var dest = legacyConvert[task], css = grunt.file.read(dest); // Convert rem units to px var rootSize = legacy.rootSize, rootValue = 10; // Determine root value for unit conversion...
/* global legacy, legacyConvert */ module.exports = function(grunt) { grunt.registerTask('convertLegacy', function(task) { var dest = legacyConvert[task], css = grunt.file.read(dest); // Convert rem units to px var rootSize = legacy.rootSize, rootValue = 10; // Determine root value for unit conversion...
Fix legacy converter with proper regex to match opacity
Fix legacy converter with proper regex to match opacity
JavaScript
apache-2.0
weepower/wee,janusnic/wee,weepower/wee,janusnic/wee
7b80740b61a9e29a96e7e9d9c464e87ac5d5fe0b
config/config.js
config/config.js
var path = require('path'), rootPath = path.normalize(__dirname + '/..'), env = process.env.NODE_ENV || 'development'; var config = { development: { root: rootPath, app: { name: 'tweb' }, port: 3000, db: 'mongodb://localhost/tweb-development' }, test: { root: roo...
var path = require('path'), rootPath = path.normalize(__dirname + '/..'), env = process.env.NODE_ENV || 'development'; var config = { development: { root: rootPath, app: { name: 'tweb' }, port: process.env.PORT || 3000, db: 'mongodb://localhost/tweb-development' }, te...
Modify listening port (for heroku)
Modify listening port (for heroku)
JavaScript
mit
Kjnokeer/Teaching-HEIGVD-TWEB-2015-Project,Kjnokeer/Teaching-HEIGVD-TWEB-2015-Project
f627a17c19d45224ab2a0c722ed4fcd410aeb680
addon/components/radio-button-input.js
addon/components/radio-button-input.js
import Component from '@ember/component'; import { computed } from '@ember/object'; import { isEqual } from '@ember/utils'; import { run } from '@ember/runloop'; export default Component.extend({ tagName: 'input', type: 'radio', // value - required // groupValue - required // autofocus - boolean // disab...
import Component from '@ember/component'; import { computed } from '@ember/object'; import { isEqual } from '@ember/utils'; import { run } from '@ember/runloop'; export default Component.extend({ tagName: 'input', type: 'radio', // value - required // groupValue - required // autofocus - boolean // disab...
Add Aria checked attribute binding
Add Aria checked attribute binding
JavaScript
mit
yapplabs/ember-radio-button,yapplabs/ember-radio-button
73416df3db4de2f16c97ec876e376ea5ff617326
packages/transforms/__tests__/index-spec.js
packages/transforms/__tests__/index-spec.js
import TextDisplay from "../src/text"; import { richestMimetype, transforms } from "../src"; describe("richestMimetype", () => { it("picks the richest of the mimetypes from a bundle with defaults", () => { const mimeBundle = { "text/plain": "Hello World" }; expect(richestMimetype(mimeBundle)).toEqual("text...
import TextDisplay from "../src/text"; import { richestMimetype, transforms } from "../src"; describe("richestMimetype", () => { it("picks the richest of the mimetypes from a bundle with defaults", () => { const singleMimeBundle = { "text/plain": "Hello World" }; const mimeBundle = { "text/plain": "He...
Add tests to make sure transforms accept frozen objects
Add tests to make sure transforms accept frozen objects
JavaScript
bsd-3-clause
nteract/composition,jdfreder/nteract,nteract/nteract,nteract/composition,captainsafia/nteract,jdfreder/nteract,jdetle/nteract,rgbkrk/nteract,nteract/nteract,rgbkrk/nteract,jdetle/nteract,jdetle/nteract,captainsafia/nteract,temogen/nteract,jdfreder/nteract,rgbkrk/nteract,nteract/nteract,rgbkrk/nteract,captainsafia/ntera...
2abf6e70b34e5faa8059aae8bc3b375e1aba0443
api/controllers/MobileAppController.js
api/controllers/MobileAppController.js
module.exports = { updateInfo: function (req, res) { var result = {} /* Format for result: result = { type: 'force', // can be 'force' or 'suggest' title: 'A new version of the app is available', message: 'You can go to the App Store now to update', iTunesItemIdentifier: '10...
module.exports = { updateInfo: function (req, res) { var result = {} var iTunesItemIdentifier = '1002185140' var forceUpdate = { type: 'force', title: 'A new version of the app is available', iTunesItemIdentifier } var suggestUpdate = { type: 'suggest', title: 'An up...
Return object based on mobile version
Return object based on mobile version
JavaScript
apache-2.0
Hylozoic/hylo-node,Hylozoic/hylo-node
d7656b00ea177fa92388d2a0fadb1fd0d6b9a354
webpack.config.js
webpack.config.js
var path = require("path"); var webpack = require("webpack"); module.exports = { entry: "./src/main.ts", output: { filename: "bundle.js", path: path.resolve(__dirname, "dist") }, module: { rules: [ { test: /\.ts$/, exclude: /node_modules/, use: ["babel-loader", "ts-loa...
var path = require("path"); var webpack = require("webpack"); module.exports = { entry: "./src/main.ts", output: { filename: "bundle.js", path: path.resolve(__dirname, "dist"), libraryTarget: "commonjs2" }, module: { rules: [ { test: /\.ts$/, exclude: /node_modules/, ...
Make library importable using CommonJS and ES6 module system
Make library importable using CommonJS and ES6 module system
JavaScript
apache-2.0
ulshv/bank-message-parser,ulshv/bank-message-parser
a2e9d4499267016f7306ed33ca609dbf58a1daac
webpack.config.js
webpack.config.js
'use strict'; const path = require('path'); const MinifyPlugin = require('babel-minify-webpack-plugin'); module.exports = { devtool: 'source-map', entry: './lib/index.js', output: { path: path.resolve(__dirname, 'web'), filename: 'index.js' }, plugins: [ new MinifyPlugin() ], module: { rules: [ { ...
'use strict'; const path = require('path'); const MinifyPlugin = require('babel-minify-webpack-plugin'); const webpack = require('webpack'); module.exports = { devtool: 'source-map', entry: './lib/index.js', output: { path: path.resolve(__dirname, 'web'), filename: 'index.js' }, plugins: [ new webpack.opti...
Add module concatenation plugin and not transform to commonjs in web env
Add module concatenation plugin and not transform to commonjs in web env
JavaScript
mit
AfterShip/phone,AfterShip/node-phone,AfterShip/phone,Automattic/node-phone,AfterShip/phone,Automattic/node-phone
09aa92d45b37808d004e175a63acc7085126256b
src/region/regionNode.js
src/region/regionNode.js
/** * * Copyright 2016 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
/** * * Copyright 2016 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
Add ability to set specific nodes as focused nodes
Add ability to set specific nodes as focused nodes
JavaScript
apache-2.0
Netflix/vizceral
3c9fd3a222365f8badd133897c04e84d115c1121
webpack.config.js
webpack.config.js
const conf = module.exports = require('skatejs-build/webpack.config'); conf.devtool = 'source-map'; conf.entry = { 'dist/index-with-deps.js': './src/index.js', 'dist/index-with-deps.min.js': './src/index.js', };
const conf = module.exports = require('skatejs-build/webpack.config'); conf.devtool = 'source-map'; conf.entry = { 'dist/index-with-deps.js': './src/index.js', 'dist/index-with-deps.min.js': './src/index.js', }; conf.output.library = 'skate';
Fix webpacked dist so that it exports skate not skatejs to the global.
fix(dist): Fix webpacked dist so that it exports skate not skatejs to the global.
JavaScript
mit
skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs
c77e0e771350da9857caaa7ae8ade0b4d417215a
plugins/polyfill-CustomEvent/customEvent.js
plugins/polyfill-CustomEvent/customEvent.js
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. exports.CustomEvent = function(type, eventInitDict) { var newEvent = document.createEvent('CustomEvent'); newEvent.initCustomEvent(type, ...
// Copyright (c) 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. if (typeof window.CustomEvent !== 'function') { exports.CustomEvent = function(type, eventInitDict) { var newEvent = document.createEvent(...
Stop clobbering native CustomEvent constructor in polyfill.
Stop clobbering native CustomEvent constructor in polyfill.
JavaScript
bsd-3-clause
wudkj/mobile-chrome-apps,guozanhua/mobile-chrome-apps,chirilo/mobile-chrome-apps,hgl888/mobile-chrome-apps,hgl888/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,hgl888/mobile-chrome-apps,hgl888/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,chirilo/mobi...
1544c0910fd7cb5968740f59f2294eec144a421f
portal/services/boot/git/credentials.js
portal/services/boot/git/credentials.js
/* Copyright 2017 Agneta Network Applications, LLC. * * Source file: portal/services/boot/git/credentials.js * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
/* Copyright 2017 Agneta Network Applications, LLC. * * Source file: portal/services/boot/git/credentials.js * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
Use ENV variables for SSH
Use ENV variables for SSH
JavaScript
apache-2.0
agneta/platform,agneta/platform,agneta/platform
ad37733d66ae27707dc491823bb2cb0e83b9c357
app/libs/engine/methods/video-codec.js
app/libs/engine/methods/video-codec.js
'use strict'; // Assign the video codec to use module.exports = function(command, file, options, metadata, details) { return new Promise((resolve, reject) => { // Assign video codec command.videoCodec(options.video.codec); // Check for hardware acceleration // Detection not yet enabled if ( opt...
'use strict'; // Assign the video codec to use module.exports = function(command, file, options, metadata, details) { return new Promise((resolve, reject) => { // Check for hardware acceleration if ( options.hwAccel ) { // Enable x264 or hevc transcoding for nvidia 10 series cards options...
Update engine to check for valid video codec
Update engine to check for valid video codec
JavaScript
apache-2.0
transmutejs/core
f592f76220f446c9a5e1204e8b7cf5cae625c637
project/src/main/webapp/profile-edit.js
project/src/main/webapp/profile-edit.js
$(document).ready(function() { showCurrentUserInfo(); }); /** * Populates inputs with current user information. */ async function showCurrentUserInfo() { const response = await fetch('/profile-update'); const userData = await response.json(); const userName = userData['name']; const userInterests = userDa...
$(document).ready(function() { showCurrentUserInfo(); populatePrefilled('interests'); populatePrefilled('skills'); }); /** * Populates inputs with current user information. */ async function showCurrentUserInfo() { const response = await fetch('/profile-update'); const userData = await response.json(); ...
Add profile prefilled interests and skills
Add profile prefilled interests and skills
JavaScript
apache-2.0
googleinterns/step188-2020,googleinterns/step188-2020,googleinterns/step188-2020
625f5aec70557c114d9551c5c43bebd98d54fdec
commands/stor.js
commands/stor.js
var command = require('../lib/command'); var channel = require('../lib/datachannel'); var fs = require('../lib/fs'); command.add('STOR', 'STOR <sp> pathname', function (path, output, session) { var absolutePath = fs.toAbsolute(path, session.cwd); fs.open(absolutePath, 'w', function (err, fd) { if (err) {...
var command = require('../lib/command'); var channel = require('../lib/datachannel'); var fs = require('../lib/fs'); command.add('STOR', 'STOR <sp> pathname', function (path, output, session) { var absolutePath = fs.toAbsolute(path, session.cwd); var stream = fs.createWriteStream(absolutePath, { flags: ...
Use write streams for STOR
Use write streams for STOR
JavaScript
mit
brandonwamboldt/nodeftpd,brandonwamboldt/nodeftpd
2831b31cf38f294f4936ecd15b05426998ad322a
src/footer.js
src/footer.js
// Renamed functions dc.abstractBubbleChart = dc.bubbleMixin; dc.baseChart = dc.baseMixin; dc.capped = dc.capMixin; dc.colorChart = dc.colorMixin; dc.coordinateGridChart = dc.coordinateGridMixin; dc.marginable = dc.marginMixin; dc.stackableChart = dc.stackMixin; return dc;} if(typeof define === "function" && defi...
// Renamed functions dc.abstractBubbleChart = dc.bubbleMixin; dc.baseChart = dc.baseMixin; dc.capped = dc.capMixin; dc.colorChart = dc.colorMixin; dc.coordinateGridChart = dc.coordinateGridMixin; dc.marginable = dc.marginMixin; dc.stackableChart = dc.stackMixin; return dc;} if(typeof define === "function" && defi...
Make browserify case work both for npm and bower.
Make browserify case work both for npm and bower.
JavaScript
apache-2.0
arriqaaq/dc.js,AlanKavanagh/dc.js,witcxc/dc.js,davetaz/dc.js,AlanKavanagh/dc.js,Sweetymeow/dc.js,lzheng571/dc.js,remyyounes/dc.js,r4j4h/dc.js,dc-js/dc.js,mcanthony/dc.js,TheDataShed/dc.js,Maartenvm/dc.js,kidaa/dc.js,becompany/dc.js,Hauenstein/dc.js,dgerber/dc.js,alan-unravel/dc.js,dc-js/dc.js,lzheng571/dc.js,exsodus324...
f183e83d4bfaa98174e38754eb0808a918d7a053
tests/integration/components/organization-settings-menu-test.js
tests/integration/components/organization-settings-menu-test.js
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('organization-settings-menu', 'Integration | Component | organization settings menu', { integration: true }); test('it renders', function(assert) { // Set any properties with this.set('myProper...
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('organization-settings-menu', 'Integration | Component | organization settings menu', { integration: true }); test('it renders with all its required elements', function(assert) { assert.expect(...
Add organization settings menu test
Add organization settings menu test
JavaScript
mit
eablack/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember,eablack/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember
ede93bdfdf7eb6f1ce7f36a59833ea88e2fa8aac
BlazarUI/app/scripts/components/BuildsNotifier.js
BlazarUI/app/scripts/components/BuildsNotifier.js
import Notify from 'notifyjs'; import WatchingProvider from './WatchingProvider'; let lastModuleStates = {}; let BuildsNotifier = { updateModules: function(modules) { modules.forEach((module) => { let id = { repo: module.repository, branch: module.branch }; if (WatchingProvider.isWatching(id) === -...
import Notify from 'notifyjs'; import WatchingProvider from './WatchingProvider'; let lastModuleStates = {}; let BuildsNotifier = { updateModules: function(modules) { modules.forEach((module) => { if (WatchingProvider.isWatching({ repo: module.repository, branch: module.branch }) === -1) { return...
Fix bug causing extraneous notifications on repos with mixed-state modules
Fix bug causing extraneous notifications on repos with mixed-state modules
JavaScript
apache-2.0
HubSpot/Blazar,cgvarela/Blazar,HubSpot/Blazar,cgvarela/Blazar,HubSpot/Blazar,cgvarela/Blazar,HubSpot/Blazar,cgvarela/Blazar
bd6a720ade96c86f075d3f8608ec98d279cb1a06
lemon/extradmin/assets/extradmin/js/select.js
lemon/extradmin/assets/extradmin/js/select.js
$(function() { $('.field select') .width(function(index, width) { return $(this).attr('multiple') ? width + 150 : width + 50; }) .chosen({disable_search_threshold: 50}); });
$(function() { $('.b-admin-form-field select') .width(function(index, width) { return $(this).attr('multiple') ? width + 150 : width + 50; }) .chosen({disable_search_threshold: 50}); });
Fix chosen usage in admin
Fix chosen usage in admin
JavaScript
bsd-3-clause
trilan/lemon,trilan/lemon,trilan/lemon
5b8582e357716de2dd2a466a88261cc8e4a0fc73
source/no-concurrent-calls.js
source/no-concurrent-calls.js
"use strict"; /* * Creates a version of λ that cannot be executed concurrently. * * Expects λ to take no arguments and to return a Promise. * When concurrent calls get cancelled, the wrapping function returns * undefined. Otherwise, it returns the Promise returned by λ. */ module.exports = λ => { let locked = fals...
"use strict"; /* * Creates a version of λ that cannot be executed concurrently. * * Returns the Promise returned by λ. */ module.exports = λ => { let locked = false; let promise = null; return () => { if (locked) { return promise; } locked = true; promise = λ...
Change return value of noConcurrentCalls to make it return the promise return by λ
Change return value of noConcurrentCalls to make it return the promise return by λ
JavaScript
mit
tentwentyfour/helpbox
80f0dfa0b8d490c50c4a98815060e7de086e4c23
src/logger.js
src/logger.js
'use strict'; module.exports = function () { const WebSocket = require('ws'); var ws = new WebSocket(App.config.logserverIP, {headers: {'token': App.config.token}}); var self = this; ws.on('error', (e) => { console.log(e); }); ws.on('open', () => { self.log = (payload, logLevel) => { var ob...
'use strict'; module.exports = function () { const WebSocket = require('ws'); var ws = null; connect(); var self = this; function connect() { ws = new WebSocket(App.config.logserverIP, {headers: {'token': App.config.token}}); ws.on('error', (e) => { console.log(e); }); ws.on('close', ...
Reconnect to WS on close
Reconnect to WS on close
JavaScript
mit
MergHQ/KappaChan
7e39df5e58c73ca954248302aa4a6a93ec9c54f6
search/built-in-store.js
search/built-in-store.js
var SearchStore = require('../store/search'); module.exports = new SearchStore();
var SearchStore = require('../store/search'); var QueryStore = require('../store/query'); module.exports = { searchStore: new SearchStore(), queryStore: new QueryStore() };
Refactor built in search store
[query-sore] Refactor built in search store
JavaScript
mit
Jerom138/focus,Jerom138/focus,KleeGroup/focus-core,Jerom138/focus
5c42798364fda67a4719a99da972682969fd913d
samples/factorialweb/server.js
samples/factorialweb/server.js
var cobs = require('../..'), http = require('http'), fs = require('fs'); function compileFile(filename) { var text = fs.readFileSync(filename).toString(); var parser = new cobs.Parser(text); var program = parser.parseProgram(); program.text = program.command.compile(program); return progra...
var cobs = require('../..'), http = require('http'), fs = require('fs'); function compileFile(filename) { return cobs.compileProgramFile(filename); }; var program = compileFile('./factorial.cob'); http.createServer(function(req, res) { var runtime = { display: function() { if (ar...
Refactor factorial web sample to use compileProgramFile
Refactor factorial web sample to use compileProgramFile
JavaScript
mit
ajlopez/CobolScript
fb7e8422271d34fae6feab62f882a23c65287457
popup.js
popup.js
document.addEventListener("DOMContentLoaded", function () { var qr_cellsize = 8; var qr_margin = 2 * qr_cellsize; var qr_levels = ["M", "L"]; var createImage = function(payload) { for (var levelIndex in qr_levels) { for (var typeNum = 1; typeNum <= 10; typeNum++) { try { var qr = qr...
document.addEventListener("DOMContentLoaded", function () { var qr_cellsize = 8; var qr_margin = 2 * qr_cellsize; var qr_levels = ["M", "L"]; var createImage = function(payload) { for (var levelIndex in qr_levels) { for (var typeNum = 1; typeNum <= 10; typeNum++) { try { var qr = qr...
Select complete textbox content on click
Select complete textbox content on click
JavaScript
mit
fxkr/chrome-qrcode-extension,fnkr/chrome-qrcode-extension,fnkr/chrome-qrcode-extension,fxkr/chrome-qrcode-extension,fnkr/chrome-qrcode-extension,beatfreaker/Chrome-qrcode-extension,fxkr/chrome-qrcode-extension,beatfreaker/Chrome-qrcode-extension,beatfreaker/Chrome-qrcode-extension
927c9a6ec952b998dc0030c2e9b05278a43deedf
src/components/Graphs/BarGraph.js
src/components/Graphs/BarGraph.js
import React from "react"; import ReactDOM from "react-dom"; import tabify from "../../utils/tabify"; import * as d3 from "d3"; import "./BarGraph.css"; export default class BarGraph extends React.Component { render() { const { response, configuration, onBarClick } = this.props; if (!response ||...
import React from "react"; import ReactDOM from "react-dom"; import tabify from "../../utils/tabify"; import * as d3 from "d3"; import "./BarGraph.css"; export default class BarGraph extends React.Component { render() { const { response, configuration, onBarClick } = this.props; const { width, he...
Use JSX to render rectangles for bar chart
Use JSX to render rectangles for bar chart
JavaScript
bsd-3-clause
nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework
ef2dced11f26ba8f4060f6634673e6413033e11e
src/routes/index.js
src/routes/index.js
// We only need to import the modules necessary for initial render import CoreLayout from '../layouts/CoreLayout/CoreLayout' import Home from './Home' import CounterRoute from './Counter' import TogglRoute from './Toggl' /* Note: Instead of using JSX, we recommend using react-router PlainRoute objects to build ro...
// We only need to import the modules necessary for initial render import CoreLayout from '../layouts/CoreLayout/CoreLayout' import TogglRoute from './Toggl' /* Note: Instead of using JSX, we recommend using react-router PlainRoute objects to build route definitions. */ export const createRoutes = (store) => (...
Remove import of old routes
Remove import of old routes
JavaScript
mit
gazab/togglol,gazab/togglol
5403d8d02b3a00476453cccd902c82a07855ceae
spark.js
spark.js
/* * ASCII sparklines. */ (function(root) { var ticks = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█']; var spark = function (ints) { var max = Math.max.apply(null, ints), min = Math.min.apply(null, ints); var steps = ints.map(function (tick) { var index = Math.round((tick...
/* * ASCII sparklines. */ (function(root) { var ticks = ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█']; var spark = function (ints) { // Ignore impossible numbers when making graphs var pureNumbers = ints.filter(function (num) { return (!isNaN(num)) && (!(num === Infinity || num === -I...
Work around NaN, Infinity and -Infinity.
Work around NaN, Infinity and -Infinity.
JavaScript
bsd-3-clause
msiebuhr/node-textspark
ad0ea0376e07bd4938b58cbb24a4d696663e2410
start.js
start.js
var isWindows = /^win/.test(process.platform) if(isWindows){ spawn = require('child_process').exec spawn(__dirname + "/node_modules/.bin/cjsx.cmd -o build -cw source") spawn(__dirname + "/node_modules/.bin/cjsx.cmd -cw test/index.cjsx") spawn(__dirname + "/node_modules/.bin/watchify.cmd test/index.js -o test/b...
var isWindows = /^win/.test(process.platform) if(isWindows){ spawn = require('child_process').exec spawn(__dirname + "/node_modules/.bin/cjsx.cmd -o build -cw source") spawn(__dirname + "/node_modules/.bin/cjsx.cmd -cw test/index.cjsx") spawn(__dirname + "/node_modules/.bin/watchify.cmd test/index.js -o test/b...
Fix build process on linux
Fix build process on linux
JavaScript
mit
nic/react-credit-card,JohnyDays/react-credit-card,JohnyDays/react-credit-card,nic/react-credit-card
17a0245b958fa8dfb19d80a96a06b1470c427d6b
client/src/components/Header/styled.js
client/src/components/Header/styled.js
import styled from 'styled-components'; import { navbarHeight } from '../../common-styles/layout'; export const Wrapper = styled.nav` align-items: center; background-color: #fff; color: #666; display: flex; flex-direction: row; font-family: Raleway, 'Open Sans', Helvetica, sans-serif; font-size: 14px; ...
import styled from 'styled-components'; import { navbarHeight } from '../../common-styles/layout'; export const Wrapper = styled.nav` align-items: center; background-color: #fff; color: #666; display: flex; flex-direction: row; font-family: Raleway, 'Open Sans', Helvetica, sans-serif; font-size: 14px; ...
Add z-index to the Header
Add z-index to the Header
JavaScript
mit
jenovs/bears-team-14,jenovs/bears-team-14
856e6949a3839ce2ed3d9cf21fb0029ad9a61ec1
react.js
react.js
module.exports = { 'extends': './index.js', 'plugins': [ 'react' ], 'ecmaFeatures': { 'jsx': true }, 'rules': { 'react/display-name': 0, 'react/jsx-boolean-value': 2, 'react/jsx-no-undef': 2, 'react/jsx-uses-react': 1, 'react/jsx-uses-vars': 1, 'react/no-did-mount-set-stat...
module.exports = { 'extends': './index.js', 'plugins': [ 'react' ], 'ecmaFeatures': { 'jsx': true }, 'rules': { 'react/display-name': 0, 'react/forbid-prop-types': 0, 'react/jsx-boolean-value': [2, 'never'], 'react/jsx-curly-spacing': [2, 'never'], 'react/jsx-indent-props': [2...
Enable some new React rules
Enable some new React rules The newer version of the React plugin gives us some nice new rules that we want to enable.
JavaScript
mit
brigade/eslint-config-brigade
2b4b8e9c99e829679a1d505df44df1b3e74a092a
src/sputils.user.js
src/sputils.user.js
function $_global_sputils_user () { (function (window) { 'use strict'; var loginAsAnotherUser = function () { window.location.href = "/_layouts/closeconnection.aspx?loginasanotheruser=true"; }; var logoutUser = function () { window.location.href = "/_layouts/closeconnection.aspx"; };...
function $_global_sputils_user () { (function (window) { 'use strict'; var loginAsAnotherUser = function () { window.location.href = "/_layouts/closeconnection.aspx?loginasanotheruser=true"; }; var logoutUser = function () { window.location.href = "/_layouts/closeconnection.aspx"; };...
Add comments and tight-ify the code.
Add comments and tight-ify the code. :cookie: Updated Get Current User with comments and tighter code.
JavaScript
mit
roobie/sharepoint-utilities,BoolNordicAB/sharepoint-utilities,roobie/sharepoint-utilities
4adaa42a38211c361264d6e9c68f3ec44359c706
components/sections/hero/kap-window.js
components/sections/hero/kap-window.js
import screenSizes from '../../../lib/screen-sizes' const KapWindow = () => ( <div className="window"> <img src={require('../../../static/images/kap-3@2x.png?inline')} alt="The Kap Window" /> <style jsx>{` img { max-width: 464px; height: auto; opacity: 1; ...
import screenSizes from '../../../lib/screen-sizes' const KapWindow = () => ( <div className="window"> <img src={require('../../../static/images/kap-3@2x.png?inline')} alt="The Kap Window" /> <style jsx>{` img { max-width: 464px; height: auto; opacity: 1; ...
Set max height for kap window
Set max height for kap window
JavaScript
mit
wulkano/getkap.co,wulkano/kap-website,wulkano/kap-website,wulkano/getkap.co
752f96110d35b422fa655192ad9262f5a4ebe754
src/js/components/PoemList.js
src/js/components/PoemList.js
import React from 'react' const PoemList = (props) => { return ( <ul> {props.store.poems.map((poem, i) => { return ( <li key={i}>{poem.body} <button onClick={() => { props.actions.delete(poem) }}> delete </button> </li> ) })} ...
import React from 'react' const PoemList = (props) => { return ( <div> {props.store.poems.map((poem, i) => { return ( <p key={i}>{poem.body} <button onClick={() => { props.actions.delete(poem) }}> delete </button> </p> ) })} ...
Change list tag to div
Change list tag to div
JavaScript
mit
tanaka0325/manday_web,tanaka0325/manday_web
0a48cbe988214cf93410271f1f7a189d73d9c51b
src/js/structs/Application.js
src/js/structs/Application.js
import Service from './Service'; module.exports = class Application extends Service { get isApplication() { return !this.labels.DCOS_PACKAGE_IS_FRAMEWORK; } };
import Service from './Service'; module.exports = class Application extends Service {};
Remove application struct type getter
Remove application struct type getter
JavaScript
apache-2.0
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
730460ac7ec5afba874cafd3dcc6b27aca257b27
ui/js/factories/toast.js
ui/js/factories/toast.js
import isNumber from 'lodash/lang/isNumber'; function ToastFactory($mdToast) { return { hide() { $mdToast.hide(); }, show(message, delay) { let toast = $mdToast.simple() .content(message) .action('OK') .position('bottom...
function ToastFactory($mdToast) { return { hide() { $mdToast.hide(); }, show(message, delay) { let toast = $mdToast.simple() .content(message) .action('OK') .position('bottom right') .hideDelay(angular.is...
Replace Lodash isNumber with Angular isNumber
Replace Lodash isNumber with Angular isNumber
JavaScript
mit
mjhasbach/material-qna,mjhasbach/material-qna
3f8c97bd525b7b708e9207f5c1e6c13d5b60de96
lib/auth/auth-key.js
lib/auth/auth-key.js
// telegram.link // Copyright 2014 Enrico Stara 'enrico.stara@gmail.com' // Released under the MIT License // https://github.com/enricostara/telegram-mt-node // AuthKey class // // This class represents the Authentication Key function AuthKey(id, value, serverSalt) { this._id = id; this._v...
// telegram.link // Copyright 2014 Enrico Stara 'enrico.stara@gmail.com' // Released under the MIT License // https://github.com/enricostara/telegram-mt-node // AuthKey class // // This class represents the Authentication Key function AuthKey(id, value, serverSalt) { this.id = id; this.val...
Remove the getters from the AuthKey class
Remove the getters from the AuthKey class
JavaScript
mit
enricostara/telegram.link,cgvarela/telegram.link,lukefx/telegram.link,m4h4n/telegram.link
f5a5bc7a9f665d745ccf6d72e44b39a9b77d4167
src/browser/chromeApp/index.js
src/browser/chromeApp/index.js
chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('window.html', { 'state': 'maximized' // More parameters: https://developer.chrome.com/apps/app_window#CreateWindowOptions }); });
import configureStore from '../../app/store/configureStore'; const store = configureStore({counter: {count: 0}}, true); chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('window.html', { 'state': 'maximized' // More parameters: https://developer.chrome.com/apps/app_window#Create...
Use redux store in chrome app
Use redux store in chrome app
JavaScript
mit
jordanco/drafter-frontend,zalmoxisus/browser-redux,jordanco/drafter-frontend,zalmoxisus/browser-redux,zalmoxisus/browser-redux,zalmoxisus/crossbuilder,zalmoxisus/crossbuilder,jordanco/drafter-frontend,zalmoxisus/crossbuilder
dd7f84bb7165d2c12388a429329d6e490a8cbe26
src/components/ForecastItem.js
src/components/ForecastItem.js
import React, { Component } from 'react'; import moment from 'moment'; import { kelvinToFahrenheit } from '../util'; import 'weather-icons-tmp/css/weather-icons-wind.css'; import 'weather-icons-tmp/css/weather-icons.css'; import '../stylesheets/components/ForecastItem.scss'; class ForecastItem extends Component {...
import React, { Component } from 'react'; import moment from 'moment'; import { kelvinToFahrenheit } from '../util'; import 'weather-icons-tmp/css/weather-icons.css'; import '../stylesheets/components/ForecastItem.scss'; class ForecastItem extends Component { render() { let temperature = kelvinToFahren...
Remove wind-related weathericons css rules
Remove wind-related weathericons css rules Doing so removes hundreds upon hundreds of unused rules, reducing the size of the main css file by more than half (~12kb to ~4kb).
JavaScript
unlicense
frostiebot/whether,frostiebot/whether
3780cf3a5f4e59c3fc08e095983b02e03fc7676a
test/mock-server.js
test/mock-server.js
const assert = require('assert'); const http = require('http'); const concat = require('concat-stream'); function createServer() { return http.createServer((req, res) => { const {method, url, headers} = req; if (method === 'GET' && url === '/') { res.statusCode = 200; res.setHeader('FoO', 'bar');...
const assert = require('assert'); const http = require('http'); const concat = require('concat-stream'); function createServer() { return http.createServer((req, res) => { if (req.method === 'GET' && req.url === '/') { res.statusCode = 200; res.setHeader('FoO', 'bar'); res.end('body'); re...
Fix tests on node v4
Fix tests on node v4
JavaScript
mit
then/then-request,then/then-request
e3272e44f9c7090e37032805d3ecb9b6dc50b96d
src/gfx/meshes/ZClippedMesh.js
src/gfx/meshes/ZClippedMesh.js
import * as THREE from 'three'; import UberObject from './UberObject'; const Mesh = UberObject(THREE.Mesh); class ZClippedMesh extends Mesh { constructor(geometry, material) { super(geometry, material); this.castShadow = true; this.receiveShadow = true; } static _mvLength = new THREE.Vector3(); ...
import * as THREE from 'three'; import UberObject from './UberObject'; const Mesh = UberObject(THREE.Mesh); class ZClippedMesh extends Mesh { constructor(geometry, material) { super(geometry, material); this.castShadow = true; this.receiveShadow = true; } static _mvLength = new THREE.Vector3(); ...
Remove unnecessary assignment of static variables
Remove unnecessary assignment of static variables
JavaScript
mit
epam/miew,epam/miew,epam/miew,epam/miew,epam/miew
05a2ddbfddd59c9fca9263620555c16c16150e19
public/src/js/controllers/search.js
public/src/js/controllers/search.js
/** * public/src/js/controllers/search.js - delish * * Licensed under MIT license. * Copyright (C) 2017 Karim Alibhai. */ import sock from '../socket' import debounce from 'debounce' import getCurrentLocation from '../location' export default ['$scope', '$searchParams', ($scope, $searchParams) => { $scope.sea...
/** * public/src/js/controllers/search.js - delish * * Licensed under MIT license. * Copyright (C) 2017 Karim Alibhai. */ import sock from '../socket' import debounce from 'debounce' import { getCurrentLocation } from '../location' import { getMap } from '../map' export default ['$scope', ($scope) => { $scope...
Update autocomplete feature with API changes
Update autocomplete feature with API changes
JavaScript
mit
karimsa/delish,karimsa/delish,karimsa/delish
d12c5e3d0a019ca264c0defb808f04f39a3f3b1f
lib/shared/addon/components/schema/input-hostname/component.js
lib/shared/addon/components/schema/input-hostname/component.js
import Component from '@ember/component'; import { next } from '@ember/runloop'; import { get, set, observer } from '@ember/object' import layout from './template'; import { inject as service } from '@ember/service'; import C from 'shared/utils/constants'; export default Component.extend({ settings: service(), la...
import Component from '@ember/component'; import { get, set, observer } from '@ember/object' import layout from './template'; import { inject as service } from '@ember/service'; import C from 'shared/utils/constants'; export default Component.extend({ settings: service(), layout, value: '', mode: 'automatic...
Fix hostname answer issue in catalog
Fix hostname answer issue in catalog https://github.com/rancher/rancher/issues/17058
JavaScript
apache-2.0
rancherio/ui,westlywright/ui,rancher/ui,westlywright/ui,rancher/ui,lvuch/ui,rancherio/ui,vincent99/ui,vincent99/ui,vincent99/ui,lvuch/ui,rancherio/ui,rancher/ui,lvuch/ui,westlywright/ui
8ce0c5a9b57a79b5a9b5b9e5b3c248bb551380b9
lib/assets/javascripts/new-dashboard/store/notifications/index.js
lib/assets/javascripts/new-dashboard/store/notifications/index.js
const notifications = { namespaced: true, state: { isFetching: false, isErrored: false, error: [], notifications: [] }, computed: {}, getters: {}, mutations: { setNotifications (state, notifications) { state.notifications = notifications; state.isFetching = false; stat...
const notifications = { namespaced: true, state: { isFetching: false, isErrored: false, error: [], notifications: [] }, computed: {}, getters: {}, mutations: { setNotifications (state, notifications) { state.notifications = notifications; state.isFetching = false; stat...
Use spread operator to copy notification
refactor: Use spread operator to copy notification
JavaScript
bsd-3-clause
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
791c738df7208d31ef11eb3e183ea78471c9df91
test/queue/with_delay_test.js
test/queue/with_delay_test.js
'use strict'; require('../helpers'); const assert = require('assert'); const Ironium = require('../..'); describe('Queue with delay', function() { const captureQueue = Ironium.queue('capture'); // Capture processed jobs here. const processed = []; before(function() { captureQueue.eachJob(function(job)...
'use strict'; require('../helpers'); const assert = require('assert'); const Ironium = require('../..'); describe('Queue with delay', function() { const captureQueue = Ironium.queue('capture'); // Capture processed jobs here. const processed = []; before(function() { Ironium.configure({ concurrency: 1...
Fix configuration leaking out from another test.
Fix configuration leaking out from another test.
JavaScript
mit
assaf/ironium
28aba70fa45d36c923ee6a27a6d47862babd819c
test/react-test/post-likes.js
test/react-test/post-likes.js
import test from 'tape'; import React from 'react'; import {PostLikes} from 'src/components/post-likes'; import sd from 'skin-deep'; const renderLikes = (likes, omittedLikes = 0) => { const post = {omittedLikes}; const me = {id: 123}; const tree = sd.shallowRender(React.createElement(PostLikes, {likes, post, m...
import test from 'tape'; import React from 'react'; import {PostLikes} from 'src/components/post-likes'; import sd from 'skin-deep'; const renderLikes = (likes, omittedLikes = 0) => { const post = {omittedLikes}; const me = {id: 123}; const tree = sd.shallowRender(React.createElement(PostLikes, {likes, post, m...
Fix tests for post likes
Fix tests for post likes
JavaScript
mit
clbn/freefeed-gamma,clbn/freefeed-gamma,clbn/freefeed-gamma
e48ab7122d16ded11847460f73ea13a6a33fa38c
tests/testrunner.js
tests/testrunner.js
( function () { // Extend QUnit.module to provide a fixture element. This used to be in tests/index.html, but // dynamic test runners like Karma build their own web page. ( function () { var orgModule = QUnit.module; QUnit.module = function ( name, localEnv ) { localEnv = localEnv || {}; orgModule( name, ...
( function () { // Extend QUnit.module to provide a fixture element. This used to be in tests/index.html, but // dynamic test runners like Karma build their own web page. ( function () { var orgModule = QUnit.module; QUnit.module = function ( name, localEnv ) { localEnv = localEnv || {}; orgModule( name, ...
Fix broken setup/teardown in tests/index.html
tests: Fix broken setup/teardown in tests/index.html In QUnit 1.16, module setup/teardown was renamed to beforeEach and afterEach (old names kept for back-compat). The back-compat aliases were removed in QUnit 2.0. This didn't break the karma run because we only used setup/teardown to create an element qunit-fixture...
JavaScript
mit
wikimedia/oojs,wikimedia/oojs
72ab36671522ceddcbfc3ab753d25d905815603a
tests/docx/style-map.tests.js
tests/docx/style-map.tests.js
var assert = require("assert"); var JSZip = require("jszip"); var zipfile = require("../../lib/zipfile"); var styleMap = require("../../lib/docx/style-map"); var test = require("../testing").test; describe("zipfile", function() { test('embedded style map can be read after being written', function() { var...
var assert = require("assert"); var JSZip = require("jszip"); var zipfile = require("../../lib/zipfile"); var styleMap = require("../../lib/docx/style-map"); var test = require("../testing").test; describe("zipfile", function() { test('embedded style map can be read after being written', function() { var...
Test that embedded style map is written to separate file
Test that embedded style map is written to separate file
JavaScript
bsd-2-clause
mwilliamson/mammoth.js,mwilliamson/mammoth.js
bc5123c2cc2d53976d9fec6f0fb65e60062e31c2
tests/dummy/config/targets.js
tests/dummy/config/targets.js
const browsers = [ 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions' ]; const isCI = !!process.env.CI; const isProduction = process.env.EMBER_ENV === 'production'; if (isCI || isProduction) { browsers.push('ie 11'); } module.exports = { browsers };
'use strict'; const browsers = [ 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions' ]; const isCI = !!process.env.CI; const isProduction = process.env.EMBER_ENV === 'production'; if (isCI || isProduction) { browsers.push('ie 11'); } module.exports = { browsers };
Fix 'use strict' linting error NotLikeThis
Fix 'use strict' linting error NotLikeThis
JavaScript
mit
elwayman02/ember-user-activity,elwayman02/ember-user-activity
60b261d8455b08c6fb61c45afaa108078e0f349c
addon/mixins/serializer.js
addon/mixins/serializer.js
import Ember from 'ember'; export default Ember.Mixin.create({ /** Parse the links in the JSONAPI response and convert to a meta-object */ normalizeQueryResponse(store, clazz, payload) { const result = this._super(...arguments); result.meta = result.meta || {}; if (payload.links) { re...
import Ember from 'ember'; export default Ember.Mixin.create({ /** Parse the links in the JSONAPI response and convert to a meta-object */ normalizeQueryResponse(store, clazz, payload) { const result = this._super(...arguments); result.meta = result.meta || {}; if (payload.links) { resu...
Add parsing of simple key-value query params (sort, filter, etc.)
Add parsing of simple key-value query params (sort, filter, etc.)
JavaScript
mit
mu-semtech/ember-data-table,mu-semtech/ember-data-table,erikap/ember-data-table,erikap/ember-data-table
8d0ae139ca8f1d7244a6405317c95e8f8629508b
lib/rules/security/compiler-version.js
lib/rules/security/compiler-version.js
const semver = require('semver') const BaseChecker = require('./../base-checker') const ruleId = 'compiler-version' const meta = { type: 'security', docs: { description: `Compiler version must satisfy a semver requirement.`, category: 'Security Rules' }, isDefault: false, recommended: true, defau...
const semver = require('semver') const BaseChecker = require('./../base-checker') const ruleId = 'compiler-version' const meta = { type: 'security', docs: { description: `Compiler version must satisfy a semver requirement.`, category: 'Security Rules' }, isDefault: false, recommended: true, defau...
Change class name to CompilerVersionChecker and add space in the description error
Change class name to CompilerVersionChecker and add space in the description error
JavaScript
mit
protofire/solhint
12aaee70bf5ce9a19c76a42f6a785141b46b12e9
lib/node_modules/@stdlib/array/int16/lib/index.js
lib/node_modules/@stdlib/array/int16/lib/index.js
'use strict'; /** * Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order. * * @module @stdlib/array/int16 * * @example * var ctor = require( '@stdlib/array/int16' ); * * var arr = new ctor( 10 ); * // returns <Int16Array> */ // ...
'use strict'; /** * Typed array constructor which returns a typed array representing an array of twos-complement 16-bit signed integers in the platform byte order. * * @module @stdlib/array/int16 * * @example * var ctor = require( '@stdlib/array/int16' ); * * var arr = new ctor( 10 ); * // returns <Int16Array> */ // ...
Refactor to avoid dynamic module resolution
Refactor to avoid dynamic module resolution
JavaScript
apache-2.0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
0c39f2afe0c5fabf7432e12559efe49fe6fa676f
lib/ModalFooter/ModalFooter.js
lib/ModalFooter/ModalFooter.js
/** * Modal Footer * * This is the default modal footer of a typical <Modal /> in the folio system. */ import React from 'react'; import PropTypes from 'prop-types'; import { deprecated } from 'prop-types-extra'; import Button, { propTypes as buttonPropTypes } from '../Button/Button'; import css from './ModalFoote...
/** * Modal Footer * * This is the default modal footer of a typical <Modal /> in the folio system. */ import React from 'react'; import PropTypes from 'prop-types'; import { deprecated } from 'prop-types-extra'; import Button, { propTypes as buttonPropTypes } from '../Button/Button'; import css from './ModalFoote...
Improve children prop validation in modal footer
Improve children prop validation in modal footer
JavaScript
apache-2.0
folio-org/stripes-components,folio-org/stripes-components
82f6682faf9e977a0df5d07b5e0a7b0a2d0749ef
lib/Util.js
lib/Util.js
function assert(assertion, msg) { if (!assertion) { throw new Error(msg); } } function isUndefOrNull(val) { return val === null || (typeof val === 'undefined'); } function isString(val) { return typeof val === 'string'; } var nowOffset = Date.now(); if (window.performance.timing && window.per...
exports.assert = assert; exports.isUndefOrNull = isUndefOrNull; exports.isString = isString; exports.nowOffset = nowOffset; function assert(assertion, msg) { if (!assertion) { throw new Error(msg); } } function isUndefOrNull(val) { return val === null || (typeof val === 'undefined'); } function i...
Put 'module.exports' in the beginning of the file
Put 'module.exports' in the beginning of the file
JavaScript
mit
yanenkoa/jstimevirtualizer,eabatalov/jstimevirtualizer,eabatalov/jstimevirtualizer,yanenkoa/jstimevirtualizer
4d8fb814f77a44a42797438cd39b3ded45ec445c
bin/cli-cordova-android.js
bin/cli-cordova-android.js
#!/usr/bin/env node var cordova = require(process.env.framework + '/bin/cli-cordova'); var global = require(process.env.framework + '/bin/cli-global'); var shell = require('shelljs'); module.exports = { /** * @method build */ build: function() { if (this.isInstalled()) { cordova....
#!/usr/bin/env node var cordova = require(process.env.framework + '/bin/cli-cordova'); var global = require(process.env.framework + '/bin/cli-global'); var shell = require('shelljs'); module.exports = { /** * @method build */ build: function() { if (this.isInstalled()) { cordova....
Copy application specific cordova config.xml on build.
Copy application specific cordova config.xml on build.
JavaScript
mit
mcfarljw/backbone-gelato,mcfarljw/gelato-framework,jernung/gelato,mcfarljw/gelato-framework,mcfarljw/backbone-gelato,jernung/gelato
dabce1d4034e9aad458706b10823e56dc33ca2fd
buildScripts/distServer.js
buildScripts/distServer.js
import compression from 'compression'; import express from 'express'; import path from 'path'; import open from 'open'; // tslint:disable:no-console const port = 3000; const app = express(); app.use(express.static('dist')); app.use(compression()); app.get('*', function(req, res) { res.sendFile(path.join(__dirna...
import compression from 'compression'; import express from 'express'; import path from 'path'; import open from 'open'; // tslint:disable:no-console const port = 3000; const app = express(); app.use(compression()); app.use(express.static('dist')); app.get('*', function(req, res) { res.sendFile(path.join(__dirna...
Fix GZip issue in script.
Fix GZip issue in script.
JavaScript
mit
BlauDrachen/js-dev-environment,BlauDrachen/js-dev-environment
8f73a907354ba92289c48e301b642bc6f72dd1cd
commonjs/frontend-form/field/text-area.js
commonjs/frontend-form/field/text-area.js
var $ = require('jQuery'); var fieldRegistry = require('kwf/frontend-form/field-registry'); var Field = require('kwf/frontend-form/field/field'); var kwfExtend = require('kwf/extend'); var TextArea = kwfExtend(Field, { initField: function() { this.el.select('textarea').each((function(index, input) { ...
var $ = require('jQuery'); var fieldRegistry = require('kwf/frontend-form/field-registry'); var Field = require('kwf/frontend-form/field/field'); var kwfExtend = require('kwf/extend'); var TextArea = kwfExtend(Field, { initField: function() { var input = this.el.find('textarea'); if (input) { ...
Fix textarea in frontend port to jquery
Fix textarea in frontend port to jquery
JavaScript
bsd-2-clause
koala-framework/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework
af84d5cd4bde99981ebef291fcf7da3d446722da
pg.js
pg.js
var path = require('path') var pgPath; //support both pg & pg.js //this will eventually go away when i break native bindings //out into their own module try { pgPath = path.dirname(require.resolve('pg')) } catch(e) { pgPath = path.dirname(require.resolve('pg.js')) + '/lib' } module.exports.Result = require(path.jo...
//support both pg & pg.js //this will eventually go away when i break native bindings //out into their own module try { module.exports.Result = require('pg/lib/result.js') module.exports.prepareValue = require('pg/lib/utils.js').prepareValue } catch(e) { module.exports.Result = require('pg.js/lib/result.js') mo...
Fix require for webpack compatibility
Fix require for webpack compatibility
JavaScript
mit
brianc/node-postgres,brianc/node-postgres
d2eebf323d04df3607e1d2d7cb60aca2c73c021c
js/test/core/inputscanner.js
js/test/core/inputscanner.js
var assert = require('assert'); var InputScanner = require('../../src/core/inputscanner').InputScanner; describe('IndexScanner', function() { describe('new', function() { it('should return empty scanner when input is not present', function() { assert.equal(new InputScanner().hasNext(), false); }); })...
var assert = require('assert'); var InputScanner = require('../../src/core/inputscanner').InputScanner; describe('IndexScanner', function() { describe('new', function() { it('should return empty scanner when input is not present', function() { assert.equal(new InputScanner().hasNext(), false); }); })...
Add unit tests for input scanner
Add unit tests for input scanner
JavaScript
mit
bitwiseman/js-beautify,beautify-web/js-beautify,bitwiseman/js-beautify,beautify-web/js-beautify,bitwiseman/js-beautify,beautify-web/js-beautify,beautify-web/js-beautify,bitwiseman/js-beautify