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
09f98cd872a914cfeab6687ab009a145d5b4fbd9
week-7/group_project_solution.js
week-7/group_project_solution.js
// Release 1: Tests to User Stories /* As as user, I want to be able to do three things: (1) I want to be able to take a list of numbers and find their sum. (2) I want to be able to take a list of numbers and find their mean. (3) I want to be able to take a list of numbers and find their median. */ // Release 2:...
Add code for sum and mean to 7.8
Add code for sum and mean to 7.8
JavaScript
mit
SilverFox70/phase-0,SilverFox70/phase-0,SilverFox70/phase-0
--- +++ @@ -0,0 +1,65 @@ +// Release 1: Tests to User Stories + +/* + +As as user, I want to be able to do three things: + +(1) I want to be able to take a list of numbers and find their sum. + +(2) I want to be able to take a list of numbers and find their mean. + +(3) I want to be able to take a list of numbers and...
75b115d9779d2f8826ad9c33bb73be80f02d8fe0
public/js/controllers/main.js
public/js/controllers/main.js
'use strict'; angular.module('velo-app').controller('MainCtrl', ['$scope', 'apiService', function ($scope, apiService) { $scope.initialize = function () { var map = L.mapbox.map('map', 'mapbox.streets'); var apiRequest = new XMLHttpRequest(); apiRequest.open('GET', '/api/cities/lyon/stati...
'use strict'; angular.module('velo-app').controller('MainCtrl', ['$scope', 'apiService', function ($scope, apiService) { $scope.initialize = function () { var map = L.mapbox.map('map', 'mapbox.streets'); apiService.getStations().then( function (response) { var stations ...
Use `$http` service to fetch stations data.
Use `$http` service to fetch stations data.
JavaScript
mit
jordanabderrachid/velo-app,jordanabderrachid/velo-app
--- +++ @@ -4,28 +4,28 @@ $scope.initialize = function () { var map = L.mapbox.map('map', 'mapbox.streets'); - var apiRequest = new XMLHttpRequest(); + apiService.getStations().then( + function (response) { + var stations = response.data; - apiRequest.o...
c07cfefbf1093bfa52a206fae1126b29e29fdc21
.eslintrc.js
.eslintrc.js
module.exports = { "root": true, "env": { "es6": true, "browser": true }, "extends": "eslint:recommended", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "warn", "tab", { "SwitchCase": 1 } ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error"...
module.exports = { "root": true, "env": { "es6": true }, "extends": "eslint:recommended", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "warn", "tab", { "SwitchCase": 1 } ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error", "double" ], ...
Revert "Add browser: true to env map to suppress eslint errors for browser globals"
Revert "Add browser: true to env map to suppress eslint errors for browser globals" This reverts commit b314d1b8a1c2ec7c26600b4e7f39f83083a1b835. See commit 79167ab0f855beb6942d576735a19d65f0f503e2.
JavaScript
mit
to2mbn/skinview3d
--- +++ @@ -1,8 +1,7 @@ module.exports = { "root": true, "env": { - "es6": true, - "browser": true + "es6": true }, "extends": "eslint:recommended", "parserOptions": {
fbfe04e6f6203394a98a2b246ecc721d8d1f5ec0
src/gm.typeaheadDropdown.js
src/gm.typeaheadDropdown.js
angular.module('gm.typeaheadDropdown', ['ui.bootstrap']) .directive('typeaheadDropdown', function() { return { templateUrl:'templates/typeaheadDropdown.tpl.html', scope: { model:'=ngModel', getOptions:'&options', config:'=?', required:'=?ngRequired' }, replace:true, controller: ['$scope', '$q', f...
angular.module('gm.typeaheadDropdown', ['ui.bootstrap']) .directive('typeaheadDropdown', function() { return { templateUrl:'templates/typeaheadDropdown.tpl.html', scope: { model:'=ngModel', getOptions:'&options', config:'=?', required:'=?ngRequired' }, replace:true, controller: ['$scope', '$q', f...
Fix bug if model is initially null.
Fix bug if model is initially null.
JavaScript
mit
spongessuck/gm.typeaheadDropdown,spongessuck/gm.typeaheadDropdown
--- +++ @@ -21,6 +21,8 @@ }); $scope.onSelect = function($item, $model, $label) { + if(!$scope.model) + $scope.model = {}; angular.extend($scope.model, $item); $scope.model[$scope.config.modelLabel] = $item[$scope.config.optionLabel]; }
5312be998369de295e0c9a4ea88338f8ca0a558b
lib/main.js
lib/main.js
var Watcher = require('large-watcher'); module.exports = function(codebox) { var events = codebox.events; codebox.logger.log("Starting the file watcher"); codebox.workspace.path() .then(function(path) { var watcher = Watcher(path, 2).start(); // Handle deleted files watcher....
var Watcher = require('large-watcher'); module.exports = function(codebox) { var events = codebox.events; codebox.logger.log("Starting the file watcher"); var watcher = Watcher(codebox.workspace.root(), 2).start(); // Handle deleted files watcher.on('deleted', function(files) { codebox....
Use workspace.root() instead of workspace.path()
Use workspace.root() instead of workspace.path()
JavaScript
apache-2.0
etopian/codebox-package-watcher,CodeboxIDE/package-watcher
--- +++ @@ -6,31 +6,27 @@ codebox.logger.log("Starting the file watcher"); - codebox.workspace.path() - .then(function(path) { - var watcher = Watcher(path, 2).start(); + var watcher = Watcher(codebox.workspace.root(), 2).start(); - // Handle deleted files - watcher.on('delete...
ff70ff08b9a1f3c5f5c3bcd3966ff00aa91b8910
routes/index.js
routes/index.js
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: "Dito's laboratory" }); }); module.exports = router;
var express = require('express'); var router = express.Router(); router.post('/postscore', function(req, res, next) { console.log("posting"); console.log(req); if (next) next(); }); router.get('/postscore', function(req, res, next) { console.log("getting"); console.log(req); if (next) next(); ...
Test commit for Unity WWW
Test commit for Unity WWW
JavaScript
mit
DominikDitoIvosevic/dito.ninja,DominikDitoIvosevic/dito.ninja
--- +++ @@ -1,9 +1,22 @@ var express = require('express'); var router = express.Router(); + +router.post('/postscore', function(req, res, next) { + console.log("posting"); + console.log(req); + if (next) next(); +}); + +router.get('/postscore', function(req, res, next) { + console.log("getting"); + c...
ce3a219b04f14d3629bd588ac8a60f004c6b61fd
routes/index.js
routes/index.js
/* * Controllers */ var homeController = require('../controllers/home_controller'); var authController = require('../controllers/authentication_controller'); /* * Routes */ module.exports = function(app, passport){ var authenticate = authController.setUp(authController, passport); app.get('/', homeControll...
/* * Controllers */ var homeController = require('../controllers/home_controller'); var pivotalController = require('../controllers/pivotal_controller'); var authController = require('../controllers/authentication_controller'); /* * Routes */ module.exports = function(app, passport){ var authenticate = ...
Build route for projects api
Build route for projects api
JavaScript
mit
tangosource/pokerestimate,tangosource/pokerestimate
--- +++ @@ -2,8 +2,9 @@ * Controllers */ -var homeController = require('../controllers/home_controller'); -var authController = require('../controllers/authentication_controller'); +var homeController = require('../controllers/home_controller'); +var pivotalController = require('../controllers/pivotal_contro...
cc5a2f0accc2e878e25066c76189e96f62208bf8
src/lib/guesstimator/samplers/DistributionBeta.js
src/lib/guesstimator/samplers/DistributionBeta.js
import math from 'mathjs'; import {Sample} from './Sampler.js' import {jStat} from 'jstat' export var Sampler = { sample({hits, total}, n) { // This treats your entry as a prior, and assumes you are 2 times more confident than // a raw beta would be. This gives your distribution more of a peak for small numb...
import {simulate} from './Simulator.js' export var Sampler = { sample({hits, total}, n) { // This treats your entry as a prior, and assumes you are 2 times more confident than // a raw beta would be. This gives your distribution more of a peak for small numbers. return simulate(`beta(${2*hits},${2*(total...
Fix beta with new sampling logic.
Fix beta with new sampling logic.
JavaScript
mit
getguesstimate/guesstimate-app
--- +++ @@ -1,12 +1,10 @@ -import math from 'mathjs'; -import {Sample} from './Sampler.js' -import {jStat} from 'jstat' +import {simulate} from './Simulator.js' export var Sampler = { sample({hits, total}, n) { // This treats your entry as a prior, and assumes you are 2 times more confident than // a ...
2251da40ce14576b49f05a7de92cf278bf300b1e
src/config/routes.js
src/config/routes.js
// This file defines all routes and function handling these routes. // All routes are accessible using GET and POST methods. const routes = { '/item': require('../controllers/items/byId.js'), '/item/:id': require('../controllers/items/byId.js'), '/items': require('../controllers/items/byIds.js'), '/items/all':...
// This file defines all routes and function handling these routes. // All routes are accessible using GET and POST methods. const routes = { '/item': require('../controllers/items/byId.js'), '/item/:id': require('../controllers/items/byId.js'), '/items': require('../controllers/items/byIds.js'), '/items/all':...
Fix route binding for nested recipes
Fix route binding for nested recipes
JavaScript
agpl-3.0
gw2efficiency/gw2-api.com
--- +++ @@ -16,7 +16,7 @@ '/items/:ids': require('../controllers/items/byIds.js'), '/skins/resolve': require('../controllers/skins/resolve.js'), '/skins/prices': require('../controllers/skins/prices.js'), - '/recipe/nested/:id': require('../controllers/recipes/nested.js'), + '/recipe/nested/:ids': require(...
edd5d3098b12e6f91c89ffc5dc234b5026f52f51
lib/parsers/babylon.js
lib/parsers/babylon.js
"use strict"; const babylon = require("babylon"); exports.options = { allowImportExportEverywhere: true, allowReturnOutsideFunction: true, plugins: [ "*", "flow", "jsx", // The "*" glob no longer seems to include the following plugins: "objectRestSpread", "classProperties", "exportExtensions...
"use strict"; const babylon = require("babylon"); exports.options = { allowImportExportEverywhere: true, allowReturnOutsideFunction: true, plugins: [ "*", "flow", "jsx", // The "*" glob no longer seems to include the following plugins: "asyncGenerators", "classProperties", "decorators", ...
Enable the rest of Babylon's experimental plugins, for max tolerance.
Enable the rest of Babylon's experimental plugins, for max tolerance.
JavaScript
mit
benjamn/reify,benjamn/reify
--- +++ @@ -8,10 +8,15 @@ plugins: [ "*", "flow", "jsx", // The "*" glob no longer seems to include the following plugins: + "asyncGenerators", + "classProperties", + "decorators", + "doExpressions", + "dynamicImport", + "exportExtensions", + "functionBind", + "functionSent", ...
51bcf356fc5459e9427dc46eb7abddc17f14f7e0
src/commands/find.js
src/commands/find.js
import moment from 'moment' import textTable from 'text-table' const find = (apiWrapper) => (search, options) => { const { startdate, enddate, businessunitids } = options return new Promise((resolve, reject) => { apiWrapper.getActivities({ startdate, enddate, businessunitids ...
import moment from 'moment' import textTable from 'text-table' const find = (apiWrapper) => (search, options) => { const { startdate, enddate, businessunitids } = options return new Promise((resolve, reject) => { apiWrapper.getActivities({ startdate, enddate, businessunitids ...
Put time and day in separate columns
Put time and day in separate columns
JavaScript
mit
gish/friskis-slack-booking
--- +++ @@ -26,11 +26,11 @@ const startTime = activity.start.timepoint.datetime const dayOfWeek = moment(startTime).format('dddd') const time = moment(startTime).format('HH:mm') - const formattedStartTime = `${dayOfWeek} ${time}` return [ activity.id, - ...
3421372936284eb4e143524e8ce2fcad9cc0d2ac
lib/sheets/comments.js
lib/sheets/comments.js
var utils = require('../utils/httpUtils.js'); var _ = require('underscore'); var constants = require('../utils/constants.js'); exports.create = function(options) { var optionsToSend = { accessToken : options.accessToken }; var getComment = function(getOptions, callback) { optionsToSend.url = buildUrl(ge...
var utils = require('../utils/httpUtils.js'); var _ = require('underscore'); var constants = require('../utils/constants.js'); exports.create = function(options) { var optionsToSend = { accessToken : options.accessToken }; var getComment = function(getOptions, callback) { optionsToSend.url = buildUrl(ge...
Fix options param names to match their requests.
Fix options param names to match their requests.
JavaScript
apache-2.0
smartsheet-platform/smartsheet-javascript-sdk
--- +++ @@ -12,19 +12,19 @@ return utils.get(_.extend(optionsToSend, getOptions), callback); }; - var deleteComment = function(getOptions, callback) { - optionsToSend.url = buildUrl(getOptions); - return utils.delete(_.extend(optionsToSend, getOptions), callback); + var deleteComment = function(dele...
87cf5c61ea9a023d125b59688bd687d1d465d8c3
src/sagas.js
src/sagas.js
/** @babel */ /** global atom */ import { delay } from 'redux-saga' import { put, call, select, take, fork } from 'redux-saga/effects' import { run } from 'node-jq' import { ACTIONS as ACTION } from './constants' const ONE_SEC = 1000 // const jq = (filter) => { // return (dispatch, getState) => { // const { ac...
/** @babel */ /** global atom */ import { delay } from 'redux-saga' import { put, call, select, take, fork } from 'redux-saga/effects' import { run } from 'node-jq' import { ACTIONS as ACTION } from './constants' const ONE_SEC = 1000 function * jq () { while (true) { const action = yield take(ACTION.JQ_FILTER_...
Remove commented thunk code in saga
Remove commented thunk code in saga
JavaScript
mit
sanack/atom-jq
--- +++ @@ -7,16 +7,6 @@ import { ACTIONS as ACTION } from './constants' const ONE_SEC = 1000 - -// const jq = (filter) => { -// return (dispatch, getState) => { -// const { activePaneItem } = getState() -// return run(filter, activePaneItem.getText(), { input: 'string' }).then( -// output => disp...
e1490ca31e8b47ebcf0c8480d6fbc758a81abe2e
packages/truffle-events/EventManager.js
packages/truffle-events/EventManager.js
const SubscriberAggregator = require("./SubscriberAggregator"); const Emittery = require("emittery"); class EventManager { constructor(eventManagerOptions) { const { logger, muteReporters, globalConfig } = eventManagerOptions; // Keep a reference to these so it can be cloned // if necessary in truffle-c...
const SubscriberAggregator = require("./SubscriberAggregator"); const Emittery = require("emittery"); class EventManager { constructor(eventManagerOptions) { const { logger, muteReporters, globalConfig } = eventManagerOptions; // Keep a reference to these so it can be cloned // if necessary in truffle-c...
Return the result of calling emit on emittery
Return the result of calling emit on emittery
JavaScript
mit
ConsenSys/truffle
--- +++ @@ -20,7 +20,7 @@ } emit(event, data) { - this.emitter.emit(event, data); + return this.emitter.emit(event, data); } initializeSubscribers(initializationOptions) {
e88e85110242e88aefa3e02d36737c09205c1253
lib/args.js
lib/args.js
"use strict"; /** * Handle arguments for backwards compatibility * @param {Object} args * @returns {{config: {}, cb: *}} */ module.exports = function (args) { var config = {}; var cb; switch (args.length) { case 1 : if (isFilesArg(args[0])) { config.files = args...
"use strict"; function isFilesArg (arg) { return Array.isArray(arg) || typeof arg === "string"; } /** * Handle arguments for backwards compatibility * @param {Object} args * @returns {{config: {}, cb: *}} */ module.exports = function (args) { var config = {}; var cb; switch (args.length) { ...
Move function out of the scope
Move function out of the scope
JavaScript
apache-2.0
chengky/browser-sync,nothiphop/browser-sync,pmq20/browser-sync,chengky/browser-sync,portned/browser-sync,schmod/browser-sync,schmod/browser-sync,pepelsbey/browser-sync,BrowserSync/browser-sync,pepelsbey/browser-sync,zhelezko/browser-sync,beni55/browser-sync,lookfirst/browser-sync,guiquanz/browser-sync,BrowserSync/brows...
--- +++ @@ -1,4 +1,8 @@ "use strict"; + +function isFilesArg (arg) { + return Array.isArray(arg) || typeof arg === "string"; +} /** * Handle arguments for backwards compatibility @@ -60,10 +64,6 @@ cb = args[2]; } - function isFilesArg (arg) { - return Array.isArray(arg) || type...
51dc7616671e8bcfcab0c8067fc3d6364debdfa9
lib/init.js
lib/init.js
var copy = require("./copy"); var path = require("path"); var temp = require("temp").track(); var Config = require("./config"); var Init = function(destination, callback) { var example_directory = path.resolve(path.join(__dirname, "..", "example")); copy(example_directory, destination, callback); } Init.sandbox =...
var copy = require("./copy"); var path = require("path"); var temp = require("temp").track(); var Config = require("./config"); var Init = function(destination, callback) { var example_directory = path.resolve(path.join(__dirname, "..", "example")); copy(example_directory, destination, callback); } Init.sandbox =...
Make Init.sandbox() take an input configuration.
Make Init.sandbox() take an input configuration.
JavaScript
mit
DigixGlobal/truffle,prashantpawar/truffle
--- +++ @@ -8,15 +8,17 @@ copy(example_directory, destination, callback); } -Init.sandbox = function(callback) { +Init.sandbox = function(extended_config, callback) { var self = this; + extended_config = extended_config || {} + temp.mkdir("truffle-sandbox-", function(err, dirPath) { if (err) return ...
cd6a769dc0c6343047632179c2e6c34ea50768e7
lib/util.js
lib/util.js
'use strict'; /* global -Promise */ var Promise = require('bluebird'); var _ = require('underscore'); var glob = require('glob'); var getFileList = function getFileList (files) { var fileList = []; return new Promise(function (resolve, reject) { if (_.isString(files)) { glob(files, function (err, files...
'use strict'; /* global -Promise */ var Promise = require('bluebird'); var _ = require('underscore'); var glob = Promise.promisify(require("glob"));; var getFileList = function getFileList (files) { if (_.isString(files)) { return glob(files); } else if (_.isArray(files)) { var fileSubLists = _.map(files...
Use Promisify and add ability to get String/Array of globs in api
Use Promisify and add ability to get String/Array of globs in api
JavaScript
mit
caniuse-js/caniuse-js
--- +++ @@ -2,27 +2,24 @@ /* global -Promise */ var Promise = require('bluebird'); + var _ = require('underscore'); -var glob = require('glob'); +var glob = Promise.promisify(require("glob"));; var getFileList = function getFileList (files) { - var fileList = []; + if (_.isString(files)) { + return glob(...
863071cc834c0c9e3b17d668c37f4886da5bd932
test/specs/component/TextSpec.js
test/specs/component/TextSpec.js
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={144}>This is really...
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={200}>This is really...
Update <Text> tests so they are not as particular about browser differences
Update <Text> tests so they are not as particular about browser differences
JavaScript
mit
recharts/recharts,recharts/recharts,sdoomz/recharts,sdoomz/recharts,thoqbk/recharts,recharts/recharts,recharts/recharts,thoqbk/recharts,sdoomz/recharts,thoqbk/recharts
--- +++ @@ -7,7 +7,7 @@ describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( - <Text width={144}>This is really long text</Text> + <Text width={200}>This is really long text</Text> ); expect(wrapper.instance().state.wordsByLines.len...
00a1e98c52d51b07a0c051dba6107bc6e99e8916
server/api/geometry/routes.js
server/api/geometry/routes.js
/* eslint-disable new-cap */ const router = require('express').Router(); const jsonParser = require('body-parser').json(); const handlers = require('./handlers'); // Geometry tools router.post('/', jsonParser, handlers.getInEverySystem); router.post('/parse', jsonParser, handlers.parseCoordinates); module.exports ...
/* eslint-disable new-cap */ const router = require('express').Router(); const jsonParser = require('body-parser').json(); const handlers = require('./handlers'); // Geometry tools router.post('/', jsonParser, handlers.getInEverySystem); router.get('/parse', handlers.parseCoordinates); module.exports = router;
Use GET method to parse coordinates
Use GET method to parse coordinates
JavaScript
mit
axelpale/tresdb,axelpale/tresdb
--- +++ @@ -8,6 +8,6 @@ // Geometry tools router.post('/', jsonParser, handlers.getInEverySystem); -router.post('/parse', jsonParser, handlers.parseCoordinates); +router.get('/parse', handlers.parseCoordinates); module.exports = router;
a3c781ff7ad00536ee3b70e93b5832ea4145b7aa
tools/build.conf.js
tools/build.conf.js
({ mainConfigFile: '../requirejs.conf.js', paths: { almond: 'lib/almond/almond' }, baseUrl: '..', name: "streamhub-permalink", include: [ 'almond', 'streamhub-permalink/default-permalink-content-renderer' ], stubModules: ['text', 'hgn', 'json'], out: "../dist/streamhub-permalink.min.js", ...
({ mainConfigFile: '../requirejs.conf.js', paths: { almond: 'lib/almond/almond' }, baseUrl: '..', name: "streamhub-permalink", include: [ 'almond', 'streamhub-permalink/default-permalink-content-renderer' ], stubModules: ['text', 'hgn', 'json'], out: "../dist/streamhub-permalink.min.js", ...
Add uglify2 minification to build
Add uglify2 minification to build
JavaScript
mit
Livefyre/streamhub-permalink,Livefyre/streamhub-permalink
--- +++ @@ -17,7 +17,7 @@ excludeHogan: true }, cjsTranslate: true, - optimize: "none", + optimize: "uglify2", preserveLicenseComments: false, uglify2: { compress: {
c26eeac896b9a96a51a8ec9b6bb57ab429abda76
src/js/actions/asset-actions.js
src/js/actions/asset-actions.js
//note must be set in gulp .sh config. const ServiceURL = process.env.ASSET_PROCESSING_SERVICE const Endpoints = { imageTagging: ServiceURL + "/image/tags/" } var AssetActions = { getSuggestedTags(mediaObject, callback) { switch(mediaObject.type) { case "image": fetch...
//note must be set in gulp .sh config. const ServiceURL = process.env.ASSET_PROCESSING_SERVICE const Endpoints = { imageTagging: ServiceURL + "/image/tags/" } var AssetActions = { getSuggestedTags(mediaObject, callback) { switch(mediaObject.type) { case "image": fetch...
Fix for automatic tagging, needs to return an empty list instead of null.
Fix for automatic tagging, needs to return an empty list instead of null.
JavaScript
mit
UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy
--- +++ @@ -14,7 +14,7 @@ fetchSuggestedImageTags(mediaObject, callback); break; default: - callback(); + callback([]); break; }; //todo could implement video tags through AWS and text through a NLP ser...
c3001938537b7f5590d71e536653ebfd083ffa52
packages/react-native-codegen/src/generators/modules/Utils.js
packages/react-native-codegen/src/generators/modules/Utils.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; import type {ObjectTypeAliasTypeShape} from '../../CodegenSchema'; function getTypeA...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; import type { SchemaType, NativeModuleAliasMap, Required, NativeModuleObjectT...
Create utilities for module generators
Create utilities for module generators Summary: There are two operations we do in every NativeModule generator: - We convert the `SchemaType` into a map of NativeModule schemas - If the type-annotation is a TypeAliasTypeAnnotation, we resolve it by doing a lookup on the NativeModuleAliasMap. This is usually followed b...
JavaScript
mit
pandiaraj44/react-native,pandiaraj44/react-native,janicduplessis/react-native,arthuralee/react-native,facebook/react-native,pandiaraj44/react-native,javache/react-native,arthuralee/react-native,arthuralee/react-native,janicduplessis/react-native,facebook/react-native,janicduplessis/react-native,myntra/react-native,pand...
--- +++ @@ -10,35 +10,43 @@ 'use strict'; -import type {ObjectTypeAliasTypeShape} from '../../CodegenSchema'; +import type { + SchemaType, + NativeModuleAliasMap, + Required, + NativeModuleObjectTypeAnnotation, + NativeModuleSchema, +} from '../../CodegenSchema'; -function getTypeAliasTypeAnnotation( - n...
e1123e2de6d9542950967a4128e616ddcbad7259
src/react-chayns-openingtimes/utils/parseTimeString.js
src/react-chayns-openingtimes/utils/parseTimeString.js
export default function parseTimeString(str) { const regexRes = new RegExp('[0-9]{0,2}:[0-9]{0,2}').exec(str); let hours = null; let minutes = null; if (regexRes) { const parts = regexRes[0].split(':'); hours = parseInt(parts[0], 10) || 0; minutes = parseInt(parts[1], 10) || 0; ...
const TIME_STRING_REGEX = /([0-9]{0,2}):([0-9]{0,2})/; export default function parseTimeString(str) { const regexRes = TIME_STRING_REGEX.exec(str); let hours = null; let minutes = null; if (regexRes) { hours = parseInt(regexRes[1], 10) || 0; minutes = parseInt(regexRes[2], 10) || 0; ...
Use regex for parsing TimeString
:recycle: Use regex for parsing TimeString
JavaScript
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
--- +++ @@ -1,12 +1,13 @@ +const TIME_STRING_REGEX = /([0-9]{0,2}):([0-9]{0,2})/; + export default function parseTimeString(str) { - const regexRes = new RegExp('[0-9]{0,2}:[0-9]{0,2}').exec(str); + const regexRes = TIME_STRING_REGEX.exec(str); let hours = null; let minutes = null; + if (regexRe...
a1d7933c578882aa73b5855961ff8622119c4141
ui/src/data_explorer/components/RawQueryEditor.js
ui/src/data_explorer/components/RawQueryEditor.js
import React, {PropTypes} from 'react' const ENTER = 13 const ESCAPE = 27 const RawQueryEditor = React.createClass({ propTypes: { query: PropTypes.shape({ rawText: PropTypes.string.isRequired, id: PropTypes.string.isRequired, }).isRequired, onUpdate: PropTypes.func.isRequired, }, getInit...
import React, {PropTypes} from 'react' const ENTER = 13 const ESCAPE = 27 const RawQueryEditor = React.createClass({ propTypes: { query: PropTypes.shape({ rawText: PropTypes.string.isRequired, id: PropTypes.string.isRequired, }).isRequired, onUpdate: PropTypes.func.isRequired, }, getInit...
Allow user to type :)
Allow user to type :)
JavaScript
mit
nooproblem/influxdb,li-ang/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,ma...
--- +++ @@ -24,9 +24,8 @@ }, handleKeyDown(e) { - e.preventDefault() - if (e.keyCode === ENTER) { + e.preventDefault() this.handleUpdate(); } else if (e.keyCode === ESCAPE) { this.setState({value: this.props.query.rawText}, () => {
1d1fdcb0bd822a1b30d9f76c1a37b529216293f2
src/client/react/admin/AdminNavbar/MainNavigation.js
src/client/react/admin/AdminNavbar/MainNavigation.js
import React from 'react'; class MainNavigation extends React.Component { render() { return ( <div> </div> ); } } export default MainNavigation;
import React from 'react'; import { Link } from 'react-router-dom'; const linkStyle = 'pt-button pt-minimal'; class MainNavigation extends React.Component { render() { return ( <div> <a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/'>Visit site</a> </div> ); } } export default MainN...
Add visit site link to navbar
[ADD] Add visit site link to navbar
JavaScript
mit
bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race
--- +++ @@ -1,10 +1,15 @@ import React from 'react'; +import { Link } from 'react-router-dom'; +const linkStyle = 'pt-button pt-minimal'; + class MainNavigation extends React.Component { + render() { return ( <div> + <a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/'>Visit site</a> ...
40d2bf71e8515d16866ab1a6f77d562d81bf5c6c
src/readFiles.js
src/readFiles.js
'use strict'; const fs = require('fs-extra'); const marked = require('marked'); const parser = require('./littlePostParser'); module.exports = function readFiles(path) { const posts = []; fs.ensureDirSync(path); fs.readdirSync(path).forEach(file => { let date = file.match(/^(\d{4})-(\d\d?)-(\d\d?)-(.+)\.(md|...
'use strict'; const fs = require('fs-extra'); const marked = require('marked'); const parser = require('./littlePostParser'); module.exports = function readFiles(path) { const posts = []; fs.ensureDirSync(path); fs.readdirSync(path).forEach(file => { let date = file.match(/^(\d{4})-(\d\d?)-(\d\d?)-(.+)\.(md|...
Add `date` to post meta-date-uh 😆
Add `date` to post meta-date-uh 😆
JavaScript
mit
corderophilosophy/tickle-js-ssg,corderophilosophy/tickle-js-ssg
--- +++ @@ -8,11 +8,13 @@ fs.ensureDirSync(path); fs.readdirSync(path).forEach(file => { let date = file.match(/^(\d{4})-(\d\d?)-(\d\d?)-(.+)\.(md|markdown|html)$/); - if (!date) + if (!date) { return; + } + const d = `${date[3]}.${date[2]}.${date[1]}` const post = parser(path + '/'...
9abe60c45aa83fbbf12553ea4af089ed685da08f
lib/GitterBot.js
lib/GitterBot.js
var Gitter = require('node-gitter'); var fs = require('fs'); var config = fs.existsSync('../config/local.js') ? require('../config/local.js') : {}; /** * Create new instance of GitterBot * @param {String} key Your API key * @constructor */ function GitterBot(key) { this.setApiKey(key); } GitterBot.prototype = {...
var Gitter = require('node-gitter'); /** * Create new instance of GitterBot * @param {String} config Configuration object with `apiKey` and `room` properties * @constructor */ function GitterBot(config) { config = config || {}; this.setApiKey(config.apiKey); this.setRoom(config.room); this.connect(); } G...
Add creating gitter client and listen message
Add creating gitter client and listen message
JavaScript
mit
ghaiklor/uwcua-vii
--- +++ @@ -1,14 +1,16 @@ var Gitter = require('node-gitter'); -var fs = require('fs'); -var config = fs.existsSync('../config/local.js') ? require('../config/local.js') : {}; /** * Create new instance of GitterBot - * @param {String} key Your API key + * @param {String} config Configuration object with `apiKey...
0bebc89c61b01f40587ac0820c0c3cbf80b63f6e
src/scripts/app/activities/sentences/editSentence.js
src/scripts/app/activities/sentences/editSentence.js
'use strict'; module.exports = /*@ngInject*/ function EditSentence( $scope, SentenceWritingService, $state, _ ) { SentenceWritingService.getSentenceWriting($state.params.id) .then(function(s) { s.category = _.findWhere($scope.availableCategories, function(o) { return o.$id == s.categoryId; ...
'use strict'; module.exports = /*@ngInject*/ function EditSentence( $scope, SentenceWritingService, $state, _ ) { SentenceWritingService.getSentenceWriting($state.params.id) .then(function(s) { s.category = _.findWhere($scope.availableCategories, function(o) { return o.$id == s.categoryId; ...
Add quantity into edit rules.
Add quantity into edit rules.
JavaScript
agpl-3.0
empirical-org/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,empirical-org/Quill-Grammar,ddmck/Quill-Grammar,ddmck/Quill-Grammar
--- +++ @@ -18,9 +18,15 @@ return String(s); }) .value(); - s.rules = _.filter($scope.availableRules, function(r) { - return _.contains(tempList, String(r.$id)); - }); + s.rules = _.chain($scope.availableRules) + .filter(function(r) { + return _.conta...
d16d986edec59eed0a73490e4587efd5455e7b28
src/api/emit.js
src/api/emit.js
const CustomEvent = ((Event) => { if (Event) { try { new Event(); // eslint-disable-line no-new } catch (e) { return undefined; } } return Event; })(window.CustomEvent); function createCustomEvent(name, opts = {}) { let e; if (Event) { e = new Event(name, opts); if (opts.detai...
const CustomEvent = ((Event) => { if (Event) { try { new Event(); // eslint-disable-line no-new } catch (e) { return undefined; } } return Event; })(window.CustomEvent); function createCustomEvent(name, opts = {}) { let e; if (Event) { e = new Event(name, opts); if ('detail' i...
Allow detail to be falsy
Allow detail to be falsy
JavaScript
mit
chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs
--- +++ @@ -13,7 +13,7 @@ let e; if (Event) { e = new Event(name, opts); - if (opts.detail) { + if ('detail' in opts) { Object.defineProperty(e, 'detail', { value: opts.detail }); } } else {
2b8b8b78926aae2dc3c4a2140893f81a1ce9fb46
test/sapi.js
test/sapi.js
var bag = require('bagofholding'), sandbox = require('sandboxed-module'), should = require('should'), checks, mocks, sapi; describe('sapi', function () { function create(checks, mocks) { return sandbox.require('../lib/sapi', { requires: mocks ? mocks.requires : {}, globals: {} }); } ...
var bag = require('bagofholding'), sandbox = require('sandboxed-module'), should = require('should'), checks, mocks, sapi; describe('sapi', function () { function create(checks, mocks) { return sandbox.require('../lib/sapi', { requires: mocks ? mocks.requires : {}, globals: {} }); } ...
Add constructor and error callback tests.
Add constructor and error callback tests.
JavaScript
mit
cliffano/sapi
--- +++ @@ -18,9 +18,47 @@ mocks = {}; }); - describe('bar', function () { + describe('sapi', function () { - it('should foo when bar', function () { + it('should set key and default url when url is not provided', function () { + sapi = new (create(checks, mocks))('somekey'); + sapi.para...
d7024ba7638a738d8e730a8663c5b474c16b2b00
components/typography/Text.js
components/typography/Text.js
import React, { PureComponent } from 'react'; import Box from '../box'; import PropTypes from 'prop-types'; import cx from 'classnames'; import theme from './theme.css'; const factory = (baseType, type, defaultElement) => { class Text extends PureComponent { render() { const { children, className, color, e...
import React, { PureComponent } from 'react'; import Box from '../box'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { COLORS } from '../../constants'; import theme from './theme.css'; const factory = (baseType, type, defaultElement) => { class Text extends PureComponent { render() { ...
Use our new colors constant for the 'color' prop type
Use our new colors constant for the 'color' prop type
JavaScript
mit
teamleadercrm/teamleader-ui
--- +++ @@ -2,6 +2,7 @@ import Box from '../box'; import PropTypes from 'prop-types'; import cx from 'classnames'; +import { COLORS } from '../../constants'; import theme from './theme.css'; const factory = (baseType, type, defaultElement) => { @@ -24,7 +25,7 @@ Text.propTypes = { children: PropTypes.n...
f19d140732d9ab951849efdcd51b1fd3c3446226
models/index.js
models/index.js
var Sequelize = require('sequelize'); var inflection = require('inflection'); $config.database.logging = $config.database.log ? console.log : false; var sequelize = new Sequelize($config.database.name, $config.database.user, $config.database.pass, ...
var Sequelize = require('sequelize'); var inflection = require('inflection'); $config.database.logging = $config.database.log ? console.log : false; var sequelize = new Sequelize($config.database.name, $config.database.user, $config.database.pass, ...
Add LONGTEXT type for MySQL
Add LONGTEXT type for MySQL
JavaScript
mit
wikilab/wikilab-api
--- +++ @@ -14,6 +14,11 @@ var modelName = inflection.classify(key); var modelInstance = sequelize.import(modelName , function(sequelize, DataTypes) { var definition = [modelName].concat(models[key](DataTypes)); + if (sequelize.options.dialect === 'mysql') { + DataTypes.LONGTEXT = 'LONGTEXT'; + ...
d1adefd5d3b4dd86afff010c3199864e61275bdb
app/js/arethusa.morph/directives/form_selector.js
app/js/arethusa.morph/directives/form_selector.js
'use strict'; angular.module('arethusa.morph').directive('formSelector', function () { return { restrict: 'A', link: function(scope, element, attrs) { var id = scope.id; function action(event) { event.stopPropagation(); scope.$apply(function() { if (scope.form.selected) ...
'use strict'; angular.module('arethusa.morph').directive('formSelector', function () { return { restrict: 'A', link: function(scope, element, attrs) { var id = scope.id; function action(event) { event.stopPropagation(); scope.$apply(function() { if (scope.form.selected) ...
Use icons and titles in formSelector
Use icons and titles in formSelector
JavaScript
mit
Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa
--- +++ @@ -17,7 +17,8 @@ } scope.$watch('form.selected', function(newVal, oldVal) { - scope.text = newVal ? 'D' : 'S'; + scope.iconClass = newVal ? 'minus' : 'plus'; + scope.title = newVal ? 'deselect' : 'select'; }); element.bind('click', action); @@ -25,8 +2...
7d5e3d2f00c57856c5f1364d238e2ab7c3fe81dd
test/package.js
test/package.js
import fs from 'fs'; import test from 'ava'; import pify from 'pify'; import index from '../'; test('every rule should defined in the index file and recommended settings', async t => { const files = await pify(fs.readdir, Promise)('../rules/'); const rules = files.filter(file => file.indexOf('.js') === file.length...
import fs from 'fs'; import test from 'ava'; import pify from 'pify'; import index from '../'; test('every rule should defined in the index file and recommended settings', async t => { const files = await pify(fs.readdir, Promise)('../rules/'); const rules = files.filter(file => file.indexOf('.js') === file.length...
Add tests to make sure each rule has a recommended setting and a description
Add tests to make sure each rule has a recommended setting and a description
JavaScript
mit
eslint-plugin-cleanjs/eslint-plugin-cleanjs,jfmengels/eslint-plugin-fp
--- +++ @@ -10,6 +10,8 @@ rules.forEach(file => { const name = file.slice(0, -3); t.truthy(index.rules[name], `'${name}' is not exported in 'index.js'`); + t.truthy(index.rules[name].meta.docs.description, `'${name}' does not have a description`); + t.truthy(index.rules[name].meta.docs.recommended,...
89ee84da83644dbdf1984da6f728ac549170d604
src/node/cable.js
src/node/cable.js
import EventEmitter from 'events'; const cable = { __proto__: EventEmitter.prototype, init(websocket) { if (this._websocket) { this._websocket.terminate(); } this._websocket = websocket; this.emit('ready'); }, get websocket() { return new Promise((resolve, reject) => { if (thi...
import EventEmitter from 'events'; const cable = { __proto__: EventEmitter.prototype, // Call as early as possible on new client connecting /* e.g. in a pre-routing http get middleware httpRouter.get('/', (ctx, next) => { peek42.cable.init0(); next(); }); */ init0() { this.init(null...
Tweak peek42 websocket node init code
Tweak peek42 websocket node init code
JavaScript
mit
rpeev/konsole,rpeev/konsole
--- +++ @@ -3,12 +3,42 @@ const cable = { __proto__: EventEmitter.prototype, + // Call as early as possible on new client connecting + /* e.g. in a pre-routing http get middleware + httpRouter.get('/', (ctx, next) => { + peek42.cable.init0(); + + next(); + }); + */ + init0() { + this.init...
97929daf840393df65574980362f235af4946545
src/main.js
src/main.js
/* ---------- Electron init ------------------------------------------------- */ import { app, BrowserWindow } from 'electron' /* ---------- Requires ------------------------------------------------------ */ import { host, port } from '../scripts/config' import { isDev } from '../scripts/env' import path from 'path' /*...
/* ---------- Electron init ------------------------------------------------- */ import { app, BrowserWindow } from 'electron' /* ---------- Requires ------------------------------------------------------ */ import { host, port } from '../scripts/config' import { isDev } from '../scripts/env' import path from 'path' /*...
Remove process.exit(0) when windows is closed
Remove process.exit(0) when windows is closed
JavaScript
mit
guillaumearm/react-redux-functional-boilerplate,guillaumearm/react-redux-functional-boilerplate
--- +++ @@ -28,7 +28,6 @@ // Emitted when the window is closed. window.on('closed', () => { - process.exit(0) window = null }) }
ed2256078319137956d4d90296a6b530115bf592
src/routes/api.js
src/routes/api.js
import express from 'express'; import eventsGetAll from '../middleware/api/eventsGetAll'; const router = express.Router(); router.get('/', (request, response) => { response.json({success: true}); }); // TODO // - Add GET for all data /data - return data + 200 router.get('/events', eventsGetAll); //router.get('/d...
import express from 'express'; import eventsGetAll from '../middleware/api/eventsGetAll'; const router = express.Router(); router.get('/', (request, response) => { response.json({success: true}); }); // TODO // - Add GET for all data /events - return data + 200 router.get('/events', eventsGetAll); //router.get('...
Refactor API names for future use
Refactor API names for future use
JavaScript
mit
MarcL/js-unit-testing-examples
--- +++ @@ -8,14 +8,14 @@ }); // TODO -// - Add GET for all data /data - return data + 200 +// - Add GET for all data /events - return data + 200 router.get('/events', eventsGetAll); -//router.get('/data/:id', dataGetById); +//router.get('/events/:id', dataGetById); -// - Add POST to add new data /data - retur...
324cffb9348053a54a5572fb008a38a934ab5aac
src/snake-case.js
src/snake-case.js
import R from 'ramda'; import spaceCase from './space-case.js'; import uncapitalize from './uncapitalize.js'; // a -> a const snakeCase = R.compose( uncapitalize, R.join('_'), R.split(' '), spaceCase ); export default snakeCase;
import R from 'ramda'; import compose from './util/compose.js'; import spaceCase from './space-case.js'; import uncapitalize from './uncapitalize.js'; // a -> a const snakeCase = compose( uncapitalize, R.join('_'), R.split(' '), spaceCase ); export default snakeCase;
Refactor snakeCase function to use custom compose function
Refactor snakeCase function to use custom compose function
JavaScript
mit
restrung/restrung-js
--- +++ @@ -1,9 +1,10 @@ import R from 'ramda'; +import compose from './util/compose.js'; import spaceCase from './space-case.js'; import uncapitalize from './uncapitalize.js'; // a -> a -const snakeCase = R.compose( +const snakeCase = compose( uncapitalize, R.join('_'), R.split(' '),
e426e9d0073b6e6fc0a79aacb9147bcb30bb3016
src/components/buttons/AuiButton.js
src/components/buttons/AuiButton.js
export default { render(createComponent) { const attrs = { disabled: this.disabled, href: this.href }; const elementType = this.href ? 'a' : 'button' return createComponent(elementType, { class: this.classObject, attrs }, this.$slots.default) }, props: { compact: ...
export default { render(createComponent) { const attrs = { disabled: this.disabled, href: this.href, target: this.target }; const elementType = this.href ? 'a' : 'button' return createComponent(elementType, { class: this.classObject, attrs }, this.$slots.default) }...
Add target to aui-button links
Add target to aui-button links
JavaScript
mit
spartez/vue-aui,spartez/vue-aui
--- +++ @@ -3,7 +3,8 @@ render(createComponent) { const attrs = { disabled: this.disabled, - href: this.href + href: this.href, + target: this.target }; const elementType = this.href ? 'a' : 'button' return createComponent(elementType, { @@ -18,6 +19,7 @@ href: String...
0768c7bb8d211d2e7e63e91e553df0f2d796a92e
src/ti-console.js
src/ti-console.js
var util = require("util"); var assert = require("assert"); var now = require("date-now"); var _console = {}; var times = {}; var functions = [ ['log','info'], ['info','info'], ['warn','warn'], ['error','error'] ]; functions.forEach(function(tuple) { _console[tuple[0]] = function() { Ti.API[tuple[1]](util.for...
var util = require("util"); var assert = require("assert"); var now = require("date-now"); var _console = {}; var times = {}; var functions = [ ['log','info'], ['info','info'], ['warn','warn'], ['error','error'] ]; functions.forEach(function(tuple) { _console[tuple[0]] = function() { Ti.API[tuple[1]](util.for...
Use `_console` instead of `console`
Use `_console` instead of `console` So that we don’t have to rely on external `console.log` presence.
JavaScript
mit
tonylukasavage/ti-console
--- +++ @@ -29,18 +29,18 @@ } var duration = now() - time; - console.log(label + ": " + duration + "ms"); + _console.log(label + ": " + duration + "ms"); }; _console.trace = function() { var err = new Error(); err.name = "Trace"; err.message = util.format.apply(null, arguments); - console.error(err.st...
e4486f4c175353f4a204fe7d3f57216cbc573985
src/ws-proxy.js
src/ws-proxy.js
import assign from 'lodash.assign' import createDebug from 'debug' import WebSocket from 'ws' const debug = createDebug('xo:wsProxy') const defaults = { // Automatically close the client connection when the remote close. autoClose: true } // Proxy a WebSocket `client` to a remote server which has `url` as // add...
import assign from 'lodash.assign' import createDebug from 'debug' import WebSocket from 'ws' const debug = createDebug('xo:wsProxy') const defaults = { // Automatically close the client connection when the remote close. autoClose: true } // Proxy a WebSocket `client` to a remote server which has `url` as // add...
Fix send error messages in wsProxy.
Fix send error messages in wsProxy.
JavaScript
agpl-3.0
lmcro/xo-web,lmcro/xo-web,vatesfr/xo-web,lmcro/xo-web,vatesfr/xo-web
--- +++ @@ -16,11 +16,15 @@ const autoClose = !!opts.autoClose delete opts.autoClose - function onClientSendError (error) { - debug('client send error', error) + function onClientSend (error) { + if (error) { + debug('client send error', error) + } } - function onRemoteSendError (error) { ...
fb93c3f778bb021d2047138091082c6a0788398d
webapplication/indexing/transformations/split-tags.js
webapplication/indexing/transformations/split-tags.js
'use strict'; const fields = [ 'tags', 'tags_vision', 'tags_verified' ] module.exports = metadata => { fields.forEach(field => { const value = metadata[field]; if(typeof(value) === 'string' && value !== '') { metadata[field] = value.split(','); } else { metadata[field] = []; } })...
'use strict'; const fields = [ 'tags', 'tags_verified' ] module.exports = metadata => { fields.forEach(field => { const value = metadata[field]; if(typeof(value) === 'string' && value !== '') { metadata[field] = value.split(','); } else { metadata[field] = []; } }); return metada...
Remove tags_vision field from splitting of tags -- as it is empty it will have no effect
Remove tags_vision field from splitting of tags -- as it is empty it will have no effect
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
--- +++ @@ -2,7 +2,6 @@ const fields = [ 'tags', - 'tags_vision', 'tags_verified' ]
2f36d03cda77a74fda5bd1883c0e7a2a7cb2ab36
api/services/formatter-service.js
api/services/formatter-service.js
let Config = require('../../config'); let url = require('url'); let webHook = url.resolve(Config.app.url, '/codeship/'); class FormatterService { format(type, build) { return defaultFormat(build) } getStartMessage(chatId) { let hook = this.getWebHook(chatId); return `${FormatterService.EMOJI.ship} Hi! I see...
let Config = require('../../config'); let url = require('url'); let webHook = url.resolve(Config.app.url, '/codeship/'); class FormatterService { format(type, build) { return defaultFormat(build) } getStartMessage(chatId) { let hook = this.getWebHook(chatId); return `${FormatterService.EMOJI.ship} Hi! I see...
Move build status to beginning of message
Move build status to beginning of message
JavaScript
mit
freshfox/codeship-telegram-bot,freshfox/codeship-telegram-bot
--- +++ @@ -35,7 +35,7 @@ }; function defaultFormat(build) { - return `${FormatterService.EMOJI.ship} <b>${build.project_name}</b> - <code>${build.branch}</code> ${FormatterService.EMOJI[build.status] || ''} + return `${FormatterService.EMOJI[build.status] || ''} <b>${build.project_name}</b> - <code>${build.branc...
7f8ac834b5ac9e07f1624883cc399d62974b7226
website/src/app/models/api/public-tags-api.service.js
website/src/app/models/api/public-tags-api.service.js
class PublicTagsAPIService { constructor(publicAPIRoute) { this.publicAPIRoute = publicAPIRoute; } getPopularTags() { return this.publicAPIRoute('tags').one('popular').getList().then( (tags) => tags.plain() ); } } angular.module('materialscommons').service('publicTa...
class PublicTagsAPIService { constructor(Restangular) { this.Restangular = Restangular; } getPopularTags() { return this.Restangular.one('v3').one('getPopularTagsForPublishedDatasets').customPOST().then( (tags) => tags.plain().data ); } } angular.module('materialsco...
Switch to actionhero based API
Switch to actionhero based API
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
--- +++ @@ -1,11 +1,11 @@ class PublicTagsAPIService { - constructor(publicAPIRoute) { - this.publicAPIRoute = publicAPIRoute; + constructor(Restangular) { + this.Restangular = Restangular; } getPopularTags() { - return this.publicAPIRoute('tags').one('popular').getList().then(...
c6d10301951acdc6f49cb91b57dc29760b432d3e
types/secret.js
types/secret.js
'use strict'; const crypto = require('crypto'); const Network = require('./network'); const Witness = require('./witness'); const MAX_MEMORY = Math.pow(2, 21) + (64 * 1000); class Secret extends EncryptedPromise { constructor (settings = {}) { super(settings); // assign internal secret this._secret = (...
'use strict'; const EncryptedPromise = require('./promise'); class Secret extends EncryptedPromise { constructor (settings = {}) { super(settings); // assign internal secret this._secret = (typeof settings === 'string') ? settings : JSON.stringify(settings); // TODO: check and document upstream pa...
Add upstream EncryptedPromise class to Secret
Add upstream EncryptedPromise class to Secret
JavaScript
mit
martindale/fabric,martindale/fabric,martindale/fabric
--- +++ @@ -1,9 +1,6 @@ 'use strict'; -const crypto = require('crypto'); -const Network = require('./network'); -const Witness = require('./witness'); -const MAX_MEMORY = Math.pow(2, 21) + (64 * 1000); +const EncryptedPromise = require('./promise'); class Secret extends EncryptedPromise { constructor (settin...
cd365cca6365d2f3aea0f244d3276c0d5f8a6df1
syntax/index.js
syntax/index.js
var assign = require('lodash.assign'); var testrunner = require('../lib/testrunner').testRunner; var es2015 = require('./es2015.json'); var es2016 = require('./es2016.json'); var es2017 = require('./es2017.json'); function syntax() { var es2015Test = testrunner(es2015, 'es2015'); var es2016Test = testrunner(es201...
var testrunner = require('../lib/testrunner').testRunner; var assign = require('../lib/assign'); var es2015 = require('./es2015.json'); var es2016 = require('./es2016.json'); var es2017 = require('./es2017.json'); function syntax() { var es2015Test = testrunner(es2015, 'es2015'); var es2016Test = testrunner(es201...
Use new assign method instead of lodash
Syntax: Use new assign method instead of lodash
JavaScript
mit
Tokimon/es-feature-detection,Tokimon/es-feature-detection,Tokimon/es-feature-detection
--- +++ @@ -1,5 +1,5 @@ -var assign = require('lodash.assign'); var testrunner = require('../lib/testrunner').testRunner; +var assign = require('../lib/assign'); var es2015 = require('./es2015.json'); var es2016 = require('./es2016.json');
be3bd7187ed33c14b590107198da71e6fba7aeef
app/presenters/taxon-presenter.js
app/presenters/taxon-presenter.js
var taxonHelpers = require('../helpers/taxon-helpers.js'); var filterHelpers = require('../helpers/filter-helpers.js'); function TaxonPresenter (taxonSlug, request) { this.taxonSlug = taxonSlug; // the slug of the taxon in the Content Store this.selectedTab = request.query.tab; if (this.selectedTab == undefined)...
var taxonHelpers = require('../helpers/taxon-helpers.js'); var filterHelpers = require('../helpers/filter-helpers.js'); function TaxonPresenter (taxonSlug, request) { this.taxonSlug = taxonSlug; // the slug of the taxon in the Content Store this.selectedTab = request.query.tab; if (this.selectedTab == undefined)...
Add function to TaxonPresenter to resolve view template path from request
Add function to TaxonPresenter to resolve view template path from request Still uses the selected tab for the template name, but now looks for the template in a directory names after the base path. e.g. - '/taxons/:taxonSlug' will render templates from 'app/views/taxons'
JavaScript
mit
alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype
--- +++ @@ -24,6 +24,11 @@ this.curatedContent = this.contentListToRender.slice(0,6); this.latestContent = this.contentListToRender.slice(0,3); + + this.resolveViewTemplateName = function () { + return request.path.replace(this.taxonSlug, '').replace(/^\//, '') + this.selectedTab; + }; + this.viewTempl...
475c73ef704c672965f8efad70334e202e483db0
src/js/index.js
src/js/index.js
"use strict"; var LocalStorageUtils = require("./utils/LocalStorageUtils"); var StateIds = require("./states/States"); var InitializeState = require("./states/InitializeState"); var MenuState = require("./states/MenuState"); var SettingsState = require("./states/SettingsState"); var LoadingState = require("./states/L...
"use strict"; var LocalStorageUtils = require("./utils/LocalStorageUtils"); var StateIds = require("./states/States"); var InitializeState = require("./states/InitializeState"); var MenuState = require("./states/MenuState"); var SettingsState = require("./states/SettingsState"); var LoadingState = require("./states/L...
Fix passed id of state add
Fix passed id of state add
JavaScript
mit
Morathil/ranggln,Morathil/ranggln,Morathil/ranggln,Morathil/ranggln
--- +++ @@ -20,4 +20,4 @@ game.state.add(StateIds.MENU_STATE_ID, new MenuState(game)); game.state.add(StateIds.SETTINGS_STATE_ID, new SettingsState(game)); game.state.add(StateIds.LOADING_STATE_ID, new LoadingState(game)); -game.state.add(StateIds.LOADING_STATE_ID, new GameState(game)); +game.state.add(StateIds.GA...
29e565d176c2a2cff221909fdb4c1fd566a0ddf3
test/spec/test_captcha.js
test/spec/test_captcha.js
/** * Created by sonja on 10/29/16. */
describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); });
Add first javascript test and make the test pass
Add first javascript test and make the test pass
JavaScript
mit
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
--- +++ @@ -1,3 +1,5 @@ -/** - * Created by sonja on 10/29/16. - */ +describe("The constructor is supposed a proper Captcha object", function() { + it('Constructor Captcha exists', function(){ + expect(Captcha).toBeDefined(); + }); +});
ccdb86e55c3dbfb673344e141bc068b83056c782
test/spec/test_captcha.js
test/spec/test_captcha.js
describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); var captcha = new Captcha(); it("Captcha object is not null", function(){ expect(captcha).not.toBeNull(); }); });
describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); var captcha = new Captcha(); it("Captcha object is not null", function(){ expect(captcha).not.toBeNull(); }); it('captcha ob...
Add test if captcha is instance of Captcha class
Add test if captcha is instance of Captcha class
JavaScript
mit
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
--- +++ @@ -6,4 +6,7 @@ it("Captcha object is not null", function(){ expect(captcha).not.toBeNull(); }); + it('captcha object should be an instance of Captcha class', function(){ + expect(captcha instanceof Captcha).toBeTruthy(); + }); });
c60b623bc4941fce71c1594db7a554d5ba42a5d4
webapp/src/components/molecules/highcharts/themes.js
webapp/src/components/molecules/highcharts/themes.js
export default { standard: { credits: { enabled: false }, chart: { style: { fontFamily: "'proxima', 'Helvetica', sans-serif' " } }, title: '' } }
export default { standard: { credits: { enabled: false }, chart: { style: { fontFamily: "'proxima', 'Helvetica', sans-serif' ", paddingTop: '20px' // Make room for buttons } }, exporting: { buttons: { contextButton: { symbol: null, text: '...
Move export button in all Highcharts
Move export button in all Highcharts
JavaScript
agpl-3.0
unicef/rhizome,unicef/rhizome,unicef/rhizome,unicef/rhizome
--- +++ @@ -3,7 +3,24 @@ credits: { enabled: false }, chart: { style: { - fontFamily: "'proxima', 'Helvetica', sans-serif' " + fontFamily: "'proxima', 'Helvetica', sans-serif' ", + paddingTop: '20px' // Make room for buttons + } + }, + exporting: { + buttons: { +...
156200098a3e7feada08a41ea7c4da14f049f86d
src/desktop/apps/categories/components/FeaturedGenes.js
src/desktop/apps/categories/components/FeaturedGenes.js
import React from "react" import PropTypes from "prop-types" import styled from "styled-components" import FeaturedGene from "./FeaturedGene" const propTypes = { featuredGeneLinks: PropTypes.array, } const Layout = styled.div` display: none; @media (min-width: 768px) { display: block; padding-top: 1em...
import React from "react" import PropTypes from "prop-types" import styled from "styled-components" import FeaturedGene from "./FeaturedGene" const propTypes = { featuredGeneLinks: PropTypes.array, } const Layout = styled.div` display: none; @media (min-width: 768px) { display: block; padding-top: 1em...
Add valid key for .map'd FeaturedGene components
Add valid key for .map'd FeaturedGene components
JavaScript
mit
joeyAghion/force,oxaudo/force,artsy/force-public,artsy/force,eessex/force,eessex/force,oxaudo/force,joeyAghion/force,joeyAghion/force,artsy/force-public,artsy/force,oxaudo/force,eessex/force,joeyAghion/force,eessex/force,artsy/force,artsy/force,oxaudo/force
--- +++ @@ -26,7 +26,7 @@ featuredGeneLinks.length > 0 && featuredGeneLinks .map(featuredGene => ( - <FeaturedGene key={featuredGene.id} {...featuredGene} /> + <FeaturedGene key={featuredGene.href} {...featuredGene} /> )) .slice(0, 3)} </La...
f92a511cd9e63e66bb92a1b68c9882ce567e5d11
src/reducers/PrescriptionReducer.js
src/reducers/PrescriptionReducer.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { ROUTES } from '../navigation/constants'; import { UIDatabase } from '../database'; import { PRESCRIPTION_ACTIONS } from '../actions/PrescriptionActions'; const initialState = () => ({ currentTab: 0, transaction: null, items: UIDatabase.o...
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { ROUTES } from '../navigation/constants'; import { UIDatabase } from '../database'; import { PRESCRIPTION_ACTIONS } from '../actions/PrescriptionActions'; const initialState = () => ({ currentTab: 0, transaction: null, items: UIDatabase.o...
Remove vaccines from normal dispensing window
Remove vaccines from normal dispensing window
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
--- +++ @@ -10,7 +10,7 @@ const initialState = () => ({ currentTab: 0, transaction: null, - items: UIDatabase.objects('Item'), + items: UIDatabase.objects('Item').filtered('isVaccine != true'), itemSearchTerm: '', commentModalOpen: false, });
ed781120958633b55223525533b287964393dc49
plugins/wired.js
plugins/wired.js
var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Wired', version:'0.1', prepareImgLinks:function (callback) { var res = []; hoverZoom.urlReplace(res, 'img', /-\d+x\d+\./, '.' ); hoverZoom.urlReplace(res, ...
var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Wired', version:'0.2', prepareImgLinks:function (callback) { var res = []; hoverZoom.urlReplace(res, 'img', /-\d+x\d+\./, '.' ); hoverZoom.urlReplace(res, ...
Update for plug-in : WiReD
Update for plug-in : WiReD
JavaScript
mit
extesy/hoverzoom,extesy/hoverzoom
--- +++ @@ -1,24 +1,47 @@ var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Wired', - version:'0.1', + version:'0.2', prepareImgLinks:function (callback) { var res = []; + hoverZoom.urlReplace(res, 'img', /-\d+x\d+\./, ...
f22843697d00cc4bf1c660b9a89fc8f136845d5c
src/views/loggedin/loggedin-view.js
src/views/loggedin/loggedin-view.js
import { View, __, Sidebar, ViewManager, NavBar } from 'erste'; import MainView from '../main-view'; class LoggedInView extends View { constructor() { super(); this.navBar = new NavBar({ title: __('Welcome to beveteran'), hasMenuButton: true, hasBackButton: true...
import { View, __, Sidebar, ViewManager, NavBar } from 'erste'; import MainView from '../main-view'; class LoggedInView extends View { constructor() { super(); this.navBar = new NavBar({ title: __('Welcome to beveteran'), hasMenuButton: true, hasBackButton: true...
Add hasSidebar to LoggedInView to use the drag gesture to reveal the menu
Add hasSidebar to LoggedInView to use the drag gesture to reveal the menu
JavaScript
mit
korayguney/veteranteam_project,zekicelik/veteranteam_project,zekicelik/veteranteam_project,korayguney/veteranteam_project
--- +++ @@ -11,6 +11,7 @@ hasBackButton: true }); + this.hasSidebar = true; } onActivation() {
9733b718f083bf0d82ea0c75d957b81301ea8666
test/drag/drag.js
test/drag/drag.js
steal("../../browser/jquery", "jquerypp/index.js", function($){ window.jQuery = $; var hoveredOnce = false; $(".over").bind('mouseover',function(){ if (!hoveredOnce) { $(this).addClass('hover') $(document.body).append("<input type='text' id='typer' />") hoveredOnce = true; } }) $('#drag') .on("dra...
steal("jquerypp/index.js", function($){ window.jQuery = $; var hoveredOnce = false; $(".over").bind('mouseover',function(){ if (!hoveredOnce) { $(this).addClass('hover') $(document.body).append("<input type='text' id='typer' />") hoveredOnce = true; } }) $('#drag') .on("draginit", function(){}) ...
Fix the funcunit-syn integration “Drag To” test
Fix the funcunit-syn integration “Drag To” test Dragging & dropping works because of jQuery++, so its version of jQuery had to be referenced instead of the `browser/jquery` import.
JavaScript
mit
bitovi/funcunit,bitovi/funcunit,bitovi/funcunit
--- +++ @@ -1,4 +1,4 @@ -steal("../../browser/jquery", "jquerypp/index.js", function($){ +steal("jquerypp/index.js", function($){ window.jQuery = $; var hoveredOnce = false;
44e38454ad1412a798f1e25a56155458f788c953
test/lint-test.js
test/lint-test.js
import 'lint-tests'; // eslint-disable-line
import 'lint-tests'; // eslint-disable-line import assert from 'assert'; import Client from '../src/client'; suite('manual-lint-test', () => { const config = { domain: 'sendmecats.myshopify.com', storefrontAccessToken: 'abc123' }; test('it ensures that all Connections include pageInfo', () => { con...
Validate that all Connections include PageInfo
Validate that all Connections include PageInfo
JavaScript
mit
Shopify/js-buy-sdk,Shopify/js-buy-sdk
--- +++ @@ -1 +1,22 @@ import 'lint-tests'; // eslint-disable-line + +import assert from 'assert'; +import Client from '../src/client'; + +suite('manual-lint-test', () => { + const config = { + domain: 'sendmecats.myshopify.com', + storefrontAccessToken: 'abc123' + }; + + test('it ensures that all Connectio...
af4d63748c74c4d6105de099b3d7ff88af708d1b
src/app/modules/source-converter/source-converter.js
src/app/modules/source-converter/source-converter.js
define([ 'marked', 'to-markdown' ], function ( marked, tomarkdown ) { 'use strict'; return (function() { var toHTML = function(src) { marked.setOptions({ breaks: true, table: false }); return marked(src); }; var toMarkdown = function(src) { return tomarkd...
define([ 'marked', 'to-markdown' ], function ( marked, tomarkdown ) { 'use strict'; return (function() { var toHTML = function(src) { marked.setOptions({ breaks: true, tables: false }); return marked(src); }; var toMarkdown = function(src) { return tomark...
Fix marked table options setting
Fix marked table options setting
JavaScript
mit
moneyadviceservice/cms-editor,moneyadviceservice/cms-editor
--- +++ @@ -10,7 +10,7 @@ var toHTML = function(src) { marked.setOptions({ breaks: true, - table: false + tables: false }); return marked(src); };
6ebf3b012f41bc222ef96b22cb55b8398db313d5
route/index.js
route/index.js
'use strict'; module.exports = defineRoute; // Define the route function defineRoute (server, opts) { server.route({ method: 'GET', path: '/', handler: handler, config: { jsonp: 'callback', validate: { query: {}, payload: fal...
'use strict'; module.exports = defineRoute; // Define the route function defineRoute (server, opts) { server.route({ method: 'GET', path: '/', handler: handler, config: { jsonp: 'callback', validate: { query: {}, payload: fal...
Add examples to the endpoint documentation
Add examples to the endpoint documentation
JavaScript
mit
rowanmanning/thingme
--- +++ @@ -19,27 +19,33 @@ }); function handler (req) { + var host = req.info.host; + var exampleId = (opts.things[0] ? opts.things[0].id : 1); req.reply({ endpoints: [ { method: 'GET', endpoint: '/' + opts.plu...
a187f52b79e62b1d657bfa314c6c32847881f7a1
routes/item.js
routes/item.js
var Item = require('../models/item').Item; var ItemTypes = require('../models/item').ItemTypes; var ItemStates = require('../models/item').ItemStates; var ItemTypeIcons = require('../models/item').ItemTypeIcons; exports.changeState = function(req, res) { Item.findById(req.query.id, function(err, item) { if (err) { ...
var notifier = require('./notifier'); var xbmc = require('../notifiers/xbmc'); notifier.use(xbmc); var Item = require('../models/item').Item; var ItemTypes = require('../models/item').ItemTypes; var ItemStates = require('../models/item').ItemStates; var ItemTypeIcons = require('../models/item').ItemTypeIcons; export...
Update library on finish state manual set.
Update library on finish state manual set.
JavaScript
mit
ziacik/lumus,ziacik/lumus,ziacik/lumus
--- +++ @@ -1,3 +1,8 @@ +var notifier = require('./notifier'); +var xbmc = require('../notifiers/xbmc'); + +notifier.use(xbmc); + var Item = require('../models/item').Item; var ItemTypes = require('../models/item').ItemTypes; var ItemStates = require('../models/item').ItemStates; @@ -10,10 +15,12 @@ } else { ...
ca92ad2e97cde2a9e939abc7a12aa914970e0d9b
tests/helper.js
tests/helper.js
var bs = require('../lib/beanstalk_client'); var net = require('net'); var port = process.env.BEANSTALK_PORT || 11333; var mock = process.env.BEANSTALKD !== '1'; var mock_server; var connection; module.exports = { bind : function (fn, closeOnEnd) { if(!mock) { return false; } mock_server = net.createSer...
var bs = require('../lib/beanstalk_client'); var net = require('net'); var port = process.env.BEANSTALK_PORT || 11333; var mock = process.env.BEANSTALKD !== '1'; var mock_server; var connection; module.exports = { bind : function (fn, closeOnEnd) { if(!mock) { return false; } mock_server = net.createSer...
Add switch to activate debug in tests
Add switch to activate debug in tests Helpful in developing tests
JavaScript
mit
pascalopitz/nodestalker
--- +++ @@ -39,5 +39,8 @@ }, getClient : function () { return bs.Client('127.0.0.1:' + port); + }, + activateDebug : function() { + bs.Debug.activate(); } }
1bbd54e1fbedeb337fd33610ead89d81e6ecf2c9
text/boolean.js
text/boolean.js
'use strict'; var d = require('es5-ext/lib/Object/descriptor') , Db = require('dbjs') , DOMText = require('./_text') , getValue = Object.getOwnPropertyDescriptor(DOMText.prototype, 'value').get , Base = Db.Base , Text; Text = function (document, ns) { this.document = document; this.ns = ns;...
'use strict'; var d = require('es5-ext/lib/Object/descriptor') , Db = require('dbjs') , DOMText = require('./_text') , getValue = Object.getOwnPropertyDescriptor(DOMText.prototype, 'value').get , Base = Db.Base , Text; Text = function (document, ns, options) { this.document = document; this...
Use labels definied on relation if available
Use labels definied on relation if available
JavaScript
mit
medikoo/dbjs-dom
--- +++ @@ -8,9 +8,10 @@ , Base = Db.Base , Text; -Text = function (document, ns) { +Text = function (document, ns, options) { this.document = document; this.ns = ns; + this.relation = options && options.relation; this.text = new DOMText(document, Base); this.dom = this.text.dom; }; @@ -18,13 +19,20 ...
21c51b43e81696fd90510a8690b0d86d2e03999f
app/users/user-links.directive.js
app/users/user-links.directive.js
{ angular .module('meganote.users') .directive('userLinks', [ 'CurrentUser', (CurrentUser) => { class UserLinksController { user() { return CurrentUser.get(); } signedIn() { return CurrentUser.signedIn(); } } ...
{ angular .module('meganote.users') .directive('userLinks', [ 'CurrentUser', (CurrentUser) => { class UserLinksController { user() { return CurrentUser.get(); } signedIn() { return CurrentUser.signedIn(); } } ...
Add sign up link that shows if no user is signed in
Add sign up link that shows if no user is signed in
JavaScript
mit
sbaughman/meganote,sbaughman/meganote
--- +++ @@ -22,8 +22,13 @@ controllerAs: 'vm', bindToController: true, template: ` - <div class="user-links" ng-show="vm.signedIn()"> - Signed in as {{ vm.user().name }} + <div class="user-links"> + <span ng-show="vm.signedIn()"> + ...
2ab9cc689d2c32c15565ea8a46d5ad8841ea5942
tests/plugins/markdown.js
tests/plugins/markdown.js
import test from 'ava'; import {fromString} from '../helpers/pipe'; import markdown from '../../lib/plugins/markdown'; test('Compiles Markdown - .md', t => { const input = '# Hello World'; const expected = '<h1>Hello World</h1>\n'; return fromString(input, 'markdown/hello.md', markdown) .then(output => { ...
import test from 'ava'; import {fromString, fromNull, fromStream} from '../helpers/pipe'; import markdown from '../../lib/plugins/markdown'; test('Compiles Markdown - .md', t => { const input = '# Hello World'; const expected = '<h1>Hello World</h1>\n'; return fromString(input, 'markdown/hello.md', markdown) ...
Add Custom Plugin and No Compile
:white_check_mark: Add Custom Plugin and No Compile * Make sure custom plugins are used when rendering Markdown * Add test for null file * Add test for streams that throw errors
JavaScript
mit
kellychurchill/gulp-armadillo,Snugug/gulp-armadillo
--- +++ @@ -1,5 +1,5 @@ import test from 'ava'; -import {fromString} from '../helpers/pipe'; +import {fromString, fromNull, fromStream} from '../helpers/pipe'; import markdown from '../../lib/plugins/markdown'; test('Compiles Markdown - .md', t => { @@ -22,6 +22,17 @@ }); }); +test('Compiles Markdown wit...
468fb779830bd727aef77d55e85942ee288fd0d9
src/components/Badge/index.js
src/components/Badge/index.js
import { h, Component } from 'preact'; import style from './style'; import Icon from '../Icon'; export default class Badge extends Component { render() { const { artist, event, small } = this.props; if (!event && !artist) { return; } if (artist && artist.onTourUntil) { return ( ...
import { h, Component } from 'preact'; import style from './style'; import Icon from '../Icon'; export default class Badge extends Component { render() { const { event, small } = this.props; if (!event) { return; } if (event.cancelled) { return ( <span class={`${style.badge} ${...
Remove some artist code in Badge component
Remove some artist code in Badge component
JavaScript
mit
zaccolley/songkick.pink,zaccolley/songkick.pink
--- +++ @@ -5,18 +5,10 @@ export default class Badge extends Component { render() { - const { artist, event, small } = this.props; + const { event, small } = this.props; - if (!event && !artist) { + if (!event) { return; - } - - if (artist && artist.onTourUntil) { - return ( - ...
fc03f5f65d40405c6b322c19114479bcc3e3cf12
website/addons/dropbox/static/dropboxFangornConfig.js
website/addons/dropbox/static/dropboxFangornConfig.js
'use strict'; var m = require('mithril'); var Fangorn = require('js/fangorn'); function _fangornLazyLoadError (item) { item.notify.update('Dropbox couldn\'t load, please try again later.', 'deleting', undefined, 3000); return true; } Fangorn.config.dropbox = { lazyLoadError : _fangornLazyLoadError };
'use strict'; var m = require('mithril'); var Fangorn = require('js/fangorn'); Fangorn.config.dropbox = {};
Remove notify from dropbox fangorn
Remove notify from dropbox fangorn [skip ci]
JavaScript
apache-2.0
KAsante95/osf.io,jmcarp/osf.io,reinaH/osf.io,cldershem/osf.io,ZobairAlijan/osf.io,abought/osf.io,danielneis/osf.io,wearpants/osf.io,cldershem/osf.io,emetsger/osf.io,brandonPurvis/osf.io,sloria/osf.io,ticklemepierce/osf.io,samchrisinger/osf.io,brandonPurvis/osf.io,icereval/osf.io,ticklemepierce/osf.io,haoyuchen1992/osf....
--- +++ @@ -3,11 +3,4 @@ var m = require('mithril'); var Fangorn = require('js/fangorn'); -function _fangornLazyLoadError (item) { - item.notify.update('Dropbox couldn\'t load, please try again later.', 'deleting', undefined, 3000); - return true; -} - -Fangorn.config.dropbox = { - lazyLoadError : _fango...
e7364f42d49f0e5cccef7da49d109418fe8b5c89
chrome-extension/mooch.js
chrome-extension/mooch.js
var MoochSentinel = { render: function(status) { document.getElementById("status").innerText = status.okay? "Okay!" : "Blocked"; }, requestStatus: function() { var user = localStorage['moochLogin']; if (!user) { document.getElementById("status").innerText = "Please, set u...
var MoochSentinel = { render: function(status) { if (status.okay) { var msg = "Okay"; var color = [255, 0, 0, 0]; } else { var msg = "Blocked"; var color = [0, 255, 0, 0]; } document.getElementById("status").innerText = msg; chrome.browserAction.s...
Print status at the extension's badge
Print status at the extension's badge
JavaScript
mit
asivokon/mooch-sentinel,asivokon/mooch-sentinel,asivokon/mooch-sentinel,asivokon/mooch-sentinel
--- +++ @@ -1,7 +1,17 @@ var MoochSentinel = { render: function(status) { - document.getElementById("status").innerText = status.okay? "Okay!" : "Blocked"; + if (status.okay) { + var msg = "Okay"; + var color = [255, 0, 0, 0]; + } else { + var msg = "Blocked"; + var ...
8be3fbee9a972a580058973ec7860d10492db38e
lib/asset.js
lib/asset.js
var fs = require('fs'), __bind = require('./helpers').bindFunctionToScope, escapeRegExp = require('./helpers').escapeRegExp, AssetDirectives = require('./asset_directives').AssetDirectives; /* * @class Asset */ exports.Asset = (function () { function Asset ( file_path, directory ) { /* ...
var fs = require('fs'), __bind = require('./helpers').bindFunctionToScope, escapeRegExp = require('./helpers').escapeRegExp, AssetDirectives = require('./asset_directives').AssetDirectives; /* * @class Asset */ exports.Asset = (function () { function Asset ( file_path, directory ) { /* ...
Add Asset mapping property (inherits from directory.mapping)
Add Asset mapping property (inherits from directory.mapping)
JavaScript
bsd-3-clause
jvatic/node-assets
--- +++ @@ -28,6 +28,8 @@ relative_path = file_path.replace(new RegExp("^" + escapeRegExp( directory.root.path ) + "/?"), '') this.name = relative_path.replace(/(\/?[^.]+)\..*$/, "$1") + this.mapping = directory.mapping; + this.directives = new AssetDirectives( this ); /*
3c109311a9cc2839e50f07cc5f31b1dfd599811e
examples/minimal.js
examples/minimal.js
var Connection = require('../lib/tedious').Connection; var Request = require('../lib/tedious').Request; var config = { server: '192.168.1.212', userName: 'test', password: 'test' /* ,options: { debug: { packet: true, data: true, payload: true, token: false, log: true } ...
var Connection = require('../lib/tedious').Connection; var Request = require('../lib/tedious').Request; var config = { server: '192.168.1.212', userName: 'test', password: 'test' /* ,options: { debug: { packet: true, data: true, payload: true, token: false, log: true }, ...
Clarify that options takes a database parameter
Clarify that options takes a database parameter Hi, First, many thanks for putting this together. I just got (stupidly) stuck on this for a bit until I read the docs a bit more closely and realized that the DB name is part of the options object. I figured I would add a couple of lines to this to clarify even fu...
JavaScript
mit
arthurschreiber/tedious,spanditcaa/tedious,LeanKit-Labs/tedious,pekim/tedious,tediousjs/tedious,tediousjs/tedious,Sage-ERP-X3/tedious
--- +++ @@ -13,7 +13,9 @@ payload: true, token: false, log: true - } + }, + database: 'DBName', + encrypt: true // for Azure users } */ };
73de73292533946a06f81af04727a4fade0a4a73
client/protractor-conf.js
client/protractor-conf.js
'use strict'; //var ScreenShotReporter = require('protractor-screenshot-reporter'); exports.config = { allScriptsTimeout: 30000, baseUrl: 'http://localhost:9090', params: { baseBackendUrl: 'http://localhost:5000/api/', username: 'admin', password: 'admin' }, specs: ['spec/s...
'use strict'; //var ScreenShotReporter = require('protractor-screenshot-reporter'); exports.config = { allScriptsTimeout: 30000, baseUrl: 'http://localhost:9090', params: { baseBackendUrl: 'http://localhost:5000/api/', username: 'admin', password: 'admin' }, specs: ['spec/s...
Revert "fix(client: spec): change jasmine timeout from 120 to 180 s"
Revert "fix(client: spec): change jasmine timeout from 120 to 180 s" This reverts commit a5f8f6d08b31d20dfec1cd89ada0b1b0b23c5b36.
JavaScript
agpl-3.0
plamut/superdesk,liveblog/superdesk,marwoodandrew/superdesk,mdhaman/superdesk,darconny/superdesk,sjunaid/superdesk,superdesk/superdesk,verifiedpixel/superdesk,superdesk/superdesk-ntb,akintolga/superdesk,marwoodandrew/superdesk,amagdas/superdesk,liveblog/superdesk,thnkloud9/superdesk,sivakuna-aap/superdesk,akintolga/sup...
--- +++ @@ -24,7 +24,7 @@ showColors: true, isVerbose: true, includeStackTrace: true, - defaultTimeoutInterval: 180000 + defaultTimeoutInterval: 120000 }, /* global jasmine */ onPrepare: function() {
87122e3056721999402f8b7cc9408b86de4719b1
client/src/utils/index.js
client/src/utils/index.js
export function diffObjects(prev, cur) { let newValues = Object.assign({}, prev, cur); let diff = {}; for (const [key, value] of Object.entries(newValues)) { if (prev[key] !== value) { diff[key] = value; } } return diff; } export function cloneObject(obj) { return Object.assig...
import React from 'react'; import { FormGroup, ControlLabel, FormControl, Col } from 'react-bootstrap'; export function diffObjects(prev, cur) { let newValues = Object.assign({}, prev, cur); let diff = {}; for (const [key, value] of Object.entries(newValues)) { if (prev[key] !== value) { diff...
Add method to render label + input
Add method to render label + input
JavaScript
mit
DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager
--- +++ @@ -1,3 +1,6 @@ +import React from 'react'; +import { FormGroup, ControlLabel, FormControl, Col } from 'react-bootstrap'; + export function diffObjects(prev, cur) { let newValues = Object.assign({}, prev, cur); let diff = {}; @@ -14,3 +17,12 @@ export function cloneObject(obj) { return Object.assig...
8b172631f2960b85d936f3b2c6b6e0c05b476830
lib/index.js
lib/index.js
var fs = require('fs') var documents = {} module.exports = { init: (config, callback) => { var directories = fs.readdirSync('.') if (directories.indexOf(config.directory) === -1) { fs.mkdirSync(config.directory) config.documents.forEach(document => { fs.writeFileSync(`${config.directory}...
var fs = require('fs') var documents = {} module.exports = { init: (config, callback) => { var directories = fs.readdirSync('.') if (directories.indexOf(config.directory) === -1) { fs.mkdirSync(config.directory) config.documents.forEach(document => { fs.writeFileSync(`${config.directory}...
Save parameter in init function
Save parameter in init function
JavaScript
mit
ItsJimi/store-data
--- +++ @@ -20,14 +20,16 @@ var file = fs.readFileSync(`${config.directory}/${document}.db`) documents[document] = JSON.parse(file.toString()) }) - var keys = Object.keys(documents) - setInterval(() => { - keys.forEach((key) => { - fs.writeFile(`${config.directory}/${key}.db`, JSO...
c5751e5933bce2ef2ac80527970868c2ed7fc71e
lib/index.js
lib/index.js
'use strict'; var path = require('path'); var BinWrapper = require('bin-wrapper'); var pkg = require('../package.json'); var url = 'https://raw.githubusercontent.com/imagemin/gifsicle-bin/' + pkg.version + '/vendor/'; module.exports = new BinWrapper() .src(url + 'osx/gifsicle', 'darwin') .src(url + 'linux/x86/gifsi...
'use strict'; var path = require('path'); var BinWrapper = require('bin-wrapper'); var pkg = require('../package.json'); var url = 'https://raw.githubusercontent.com/imagemin/gifsicle-bin/v' + pkg.version + '/vendor/'; module.exports = new BinWrapper() .src(url + 'osx/gifsicle', 'darwin') .src(url + 'linux/x86/gifs...
Use git tags prepended with v
Use git tags prepended with v This makes the script behave like other imagemin binary projects. Pull Request URL: https://github.com/imagemin/gifsicle-bin/pull/56
JavaScript
mit
imagemin/gifsicle-bin,jihchi/giflossy-bin
--- +++ @@ -3,7 +3,7 @@ var path = require('path'); var BinWrapper = require('bin-wrapper'); var pkg = require('../package.json'); -var url = 'https://raw.githubusercontent.com/imagemin/gifsicle-bin/' + pkg.version + '/vendor/'; +var url = 'https://raw.githubusercontent.com/imagemin/gifsicle-bin/v' + pkg.version +...
edcb529531029187b2a3a001fa2c631fd9693316
lib/index.js
lib/index.js
"use strict"; var sass = require("node-sass"); var through = require("through"); var path = require("path"); var extend = require('util')._extend; module.exports = function (fileName, globalOptions) { if (!/(\.scss|\.css)$/i.test(fileName)) { return through(); } var inputString = ""; return ...
"use strict"; var sass = require("node-sass"); var through = require("through"); var path = require("path"); var extend = require('util')._extend; module.exports = function (fileName, globalOptions) { if (!/(\.scss|\.css)$/i.test(fileName)) { return through(); } var inputString = ""; return ...
Handle baseDir option to resolve include paths before rendering;
Handle baseDir option to resolve include paths before rendering;
JavaScript
mit
davidguttman/sassify,oncletom/sassify
--- +++ @@ -23,6 +23,11 @@ options = extend({}, globalOptions || {}); options.includePaths = extend([], (globalOptions ? globalOptions.includePaths : {}) || []); + // Resolve include paths to baseDir + if(options.baseDir) { + options.includePaths = opti...
9d098f474ea4b39133d4ce422e725519498339c6
js/menu.js
js/menu.js
(function() { 'use strict'; program.prompt([ 'Hello—I\'m Prompt.' ]); }());
(function() { 'use strict'; const stdin = document.getElementById('stdin'); let lastKey; program.scrollBottom(); setTimeout(() => { program.prompt([ 'Hello—I\'m Prompt.' ]); setTimeout(() => { program.prompt([ 'I don\'t do anything yet, so you can send me messages and I won\'...
Add personality (like a homepage)
Add personality (like a homepage)
JavaScript
mit
jsejcksn/prompt,jsejcksn/prompt
--- +++ @@ -1,8 +1,46 @@ (function() { 'use strict'; - program.prompt([ - 'Hello—I\'m Prompt.' - ]); + const stdin = document.getElementById('stdin'); + let lastKey; + + program.scrollBottom(); + setTimeout(() => { + program.prompt([ + 'Hello—I\'m Prompt.' + ]); + setTimeout(() => { + ...
a73231ebed92a3f5409d033e59e9af20816e35b2
Gruntfile.js
Gruntfile.js
var path = require("path"); module.exports = function (grunt) { grunt.loadNpmTasks('grunt-gitbook'); grunt.loadNpmTasks('grunt-gh-pages'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.initConfig({ 'gitbook': { development: { input: "./", github: ...
var path = require("path"); module.exports = function (grunt) { grunt.loadNpmTasks('grunt-gitbook'); grunt.loadNpmTasks('grunt-gh-pages'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.initConfig({ 'gitbook': { development: { input: "./", github: ...
Remove silence to see what happen...
Remove silence to see what happen...
JavaScript
mit
daikeren/django_tutorial
--- +++ @@ -14,8 +14,7 @@ }, 'gh-pages': { options: { - base: '_book', - silent: true + base: '_book' }, src: ['**']
c21952e22109bc466cadf821bad3e3988b5653e7
Gruntfile.js
Gruntfile.js
module.exports = function(grunt) { var allSassFiles = []; var path = require('path'); grunt.file.recurse( "./stylesheets/", function(abspath, rootdir, subdir, filename) { if (filename.match(/\.scss/)) { allSassFiles.push("@import '" + abspath + "';"); } } ); grunt.file.write...
module.exports = function(grunt) { var allSassFiles = []; var path = require('path'); grunt.file.recurse( "./stylesheets/", function(abspath, rootdir, subdir, filename) { if(typeof subdir !== 'undefined'){ var relpath = subdir + '/' + filename; } else { var relpath = filename...
Make `@import` paths relative to `./stylesheets`
Make `@import` paths relative to `./stylesheets` The Load path is set to `govuk_frontend_toolkit/stylesheets` so having the `@import` paths relative to `govuk_frontend_toolkit` is breaking the tests.
JavaScript
mit
quis/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,alphagov/govuk_frontend_toolkit,alphagov/govuk_frontend_toolkit,alphagov/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,...
--- +++ @@ -6,8 +6,13 @@ grunt.file.recurse( "./stylesheets/", function(abspath, rootdir, subdir, filename) { + if(typeof subdir !== 'undefined'){ + var relpath = subdir + '/' + filename; + } else { + var relpath = filename; + } if (filename.match(/\.scss/)) { - ...
0170d8a7d0969c0e594aceb0c4dffb9c898db6ef
src/app/components/BookList/BookList.js
src/app/components/BookList/BookList.js
import styles from './BookList.css'; import classes from 'classnames'; export default ({title, zebra, children, className}) => ( <div> {title ? <h3 className={styles.listTitle}>{title}</h3> : ''} <ul className={classes(styles.bookList, className, zebra ? styles.alternating : "")}> {chil...
import styles from './BookList.css'; import classes from 'join-classnames'; export default ({title, zebra, children, className}) => ( <div> {title ? <h3 className={styles.listTitle}>{title}</h3> : ''} <ul className={classes(styles.bookList, className, zebra ? styles.alternating : "")}> ...
Fix improper import of join-classnames
Fix improper import of join-classnames
JavaScript
mit
mdjasper/React-Reading-List
--- +++ @@ -1,5 +1,5 @@ import styles from './BookList.css'; -import classes from 'classnames'; +import classes from 'join-classnames'; export default ({title, zebra, children, className}) => ( <div>
c4273c8ba589e57a36e1023229b229ee79c66e92
lib/App.js
lib/App.js
/* * boilerplate-redux-react * * Copyright(c) 2015 André König <andre.koenig@posteo.de> * MIT Licensed * */ /** * @author André König <andre.koenig@posteo.de> * */ import React, {Component} from 'react'; import {Provider} from 'react-redux'; import {createStore} from './store'; import {Welcome} from './con...
/* * boilerplate-redux-react * * Copyright(c) 2015 André König <andre.koenig@posteo.de> * MIT Licensed * */ /** * @author André König <andre.koenig@posteo.de> * */ import React from 'react'; import {Provider} from 'react-redux'; import {createStore} from './store'; import {Welcome} from './containers'; co...
Convert app component to function
[TASK] Convert app component to function
JavaScript
mit
akoenig/boilerplate-redux-react,akoenig/boilerplate-redux-react
--- +++ @@ -11,7 +11,7 @@ * */ -import React, {Component} from 'react'; +import React from 'react'; import {Provider} from 'react-redux'; import {createStore} from './store'; @@ -20,16 +20,7 @@ const store = createStore(); -class App extends Component { - - render() { - return ( - <Provider store={s...
028d511f2f663685999c8d6a7bbcb9ff5af865e9
library.js
library.js
"use strict"; var user = module.parent.require('./user'), db = module.parent.require('./database'), plugin = {}; plugin.init = function(params, callback) { var app = params.router, middleware = params.middleware, controllers = params.controllers; app.get('/admin/custom-topics', middleware.admin.build...
"use strict"; var user = module.parent.require('./user'), db = module.parent.require('./database'), plugin = {}; plugin.init = function(params, callback) { var app = params.router, middleware = params.middleware, controllers = params.controllers; app.get('/admin/custom-topics', middleware.admin.build...
Add ‘age’ to post content
Add ‘age’ to post content
JavaScript
bsd-2-clause
btw6391/nodebb-plugin-custom-topics
--- +++ @@ -33,7 +33,7 @@ // Now all you have to do is validate `data.myCustomField` and set it in data.topic. if (data.data.age) { - data.topic.age = data.data.age; + data.data.content += '<b>Age: </b>' + data.data.age + '</br>'; } console.dir(data);
86d0647a7daece3a28919b60ce71ea25bba6da4c
src/js/main.js
src/js/main.js
import * as Backbone from 'backbone'; import AppRouter from './routers/app-router'; let router = new AppRouter(); Backbone.history.start({pushState: true});
import * as Backbone from 'backbone'; import AppRouter from './routers/app-router'; new AppRouter(); Backbone.history.start({pushState: true});
Remove unused variable name for router
Remove unused variable name for router
JavaScript
mit
trevormunoz/katherine-anne,trevormunoz/katherine-anne,trevormunoz/katherine-anne
--- +++ @@ -1,5 +1,5 @@ import * as Backbone from 'backbone'; import AppRouter from './routers/app-router'; -let router = new AppRouter(); +new AppRouter(); Backbone.history.start({pushState: true});
2b5eaa2603849fb41838621fdc274e9c22f11dad
webpack.config.js
webpack.config.js
var path = require('path'); module.exports = { entry: './index.js', output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" } ] } };
var path = require('path'); module.exports = { entry: './index.js', output: { path: path.join(__dirname, 'dist'), filename: 'bundle.js' }, module: { loaders: [ { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }, { test: /\.scss$/, loaders: ['style', 'cs...
Add scss loader to webpack
Add scss loader to webpack
JavaScript
mit
dotKom/glowing-fortnight,dotKom/glowing-fortnight
--- +++ @@ -12,7 +12,14 @@ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" + }, + { + test: /\.scss$/, + loaders: ['style', 'css', 'sass'], } ] + }, + sassLoader: { + includePath: [path.resolve(__dirname, './styles')] } };
2b245f47e110f4191cd394e32a7933ffc991152f
assets/javascripts/toc.js
assets/javascripts/toc.js
$(document).ready(function() { var $toc = $('#toc'); function format (title) { var $title = $(title), txt = $title.text(), id = $title.attr('id'); return "<li> <a href=#" + id + ">" + txt + "</a></li>"; } // return; if($toc.length) { var $h3s = $('.container .col-md-9 :header'); ...
$(document).ready(function() { var $toc = $('#toc'); function format (item) { if (item.children && item.children.length > 0) { return "<li> <a href=#" + item.id + ">" + item.title + "</a><ul class='nav'>" + item.children.map(format).join('') + "</ul></li>"; } else { return "<li>...
Fix problem with TOC and nested tags
Fix problem with TOC and nested tags
JavaScript
epl-1.0
jbtv/sparkling,chrisbetz/sparkling,cswaroop/sparkling,cswaroop/sparkling,gorillalabs/sparkling,chrisbetz/sparkling,antonoal/sparkling,chrisbetz/sparkling,cswaroop/sparkling,jbtv/sparkling,gorillalabs/sparkling,gorillalabs/sparkling,antonoal/sparkling,jbtv/sparkling,gorillalabs/sparkling,antonoal/sparkling,chrisbetz/spa...
--- +++ @@ -1,22 +1,58 @@ $(document).ready(function() { var $toc = $('#toc'); - function format (title) { - var $title = $(title), - txt = $title.text(), - id = $title.attr('id'); - return "<li> <a href=#" + id + ">" + txt + "</a></li>"; + function format (item) { + if (item.children &...
4f906a4c1713ec52e27f3b499d7893642e51af02
analytics_dashboard/static/apps/learners/app/router.js
analytics_dashboard/static/apps/learners/app/router.js
define(function (require) { 'use strict'; var Marionette = require('marionette'), LearnersRouter; LearnersRouter = Marionette.AppRouter.extend({ // Routes intended to show a page in the app should map to method names // beginning with "show", e.g. 'showLearnerRosterPage'. ...
define(function (require) { 'use strict'; var Marionette = require('marionette'), LearnersRouter; LearnersRouter = Marionette.AppRouter.extend({ // Routes intended to show a page in the app should map to method names // beginning with "show", e.g. 'showLearnerRosterPage'. ...
Replace browser history on roster filter update
Replace browser history on roster filter update
JavaScript
agpl-3.0
edx/edx-analytics-dashboard,Stanford-Online/edx-analytics-dashboard,Stanford-Online/edx-analytics-dashboard,edx/edx-analytics-dashboard,Stanford-Online/edx-analytics-dashboard,edx/edx-analytics-dashboard,Stanford-Online/edx-analytics-dashboard,edx/edx-analytics-dashboard
--- +++ @@ -30,7 +30,7 @@ // Called on LearnerCollection update. Converts the state of the collection (including any filters, searchers, // sorts, or page numbers) into a url and then navigates the router to that url. updateUrl: function () { - this.navigate(this.learnerCollectio...
850d0f710336b0bdc91ca5d3440aaa8d499dc7ac
src/plugins.js
src/plugins.js
if (process.env.NODE_ENV !== 'production') { // we're importing script and styles from given plugin // this method should be only used in development // for production specify your plugin in package.json require('epl-plugin/dev'); require('epl-plugin/dev/style.css'); // add plugins in development mode here...
if (process.env.NODE_ENV !== 'production') { // we're importing script and styles from given plugin // this method should be only used in development // for production specify your plugin in package.json // require('epl-plugin/dev'); // require('epl-plugin/dev/style.css'); } // plugin handlers const plugins ...
Remove epl-plugin in development mode
Remove epl-plugin in development mode
JavaScript
apache-2.0
mkacper/erlangpl,Baransu/erlangpl,erlanglab/erlangpl-ui,Hajto/erlangpl,erlanglab/erlangpl,Baransu/erlangpl,erlanglab/erlangpl,Hajto/erlangpl,Hajto/erlangpl,mkacper/erlangpl,erlanglab/erlangpl-ui,erlanglab/erlangpl,Baransu/erlangpl,mkacper/erlangpl
--- +++ @@ -2,10 +2,6 @@ // we're importing script and styles from given plugin // this method should be only used in development // for production specify your plugin in package.json - require('epl-plugin/dev'); - require('epl-plugin/dev/style.css'); - - // add plugins in development mode here // requ...
dbcec2cbd00580ac81a3c3b9340da7cafb895928
next.config.js
next.config.js
const { join } = require('path') const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') module.exports = { webpack: function (config, { dev }) { if (!dev) { config.plugins.push(new BundleAnalyzerPlugin({ analyzerMode: 'static', openAnalyzer: false, reportFilename: join(...
const webpack = require('webpack') const { join } = require('path') const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') module.exports = { webpack: function (config, { dev }) { config.plugins.push( new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /fr/) ) if (!dev) { ...
Remove useless locales from moment
Remove useless locales from moment
JavaScript
mit
sgmap/inspire,sgmap/inspire
--- +++ @@ -1,8 +1,13 @@ +const webpack = require('webpack') const { join } = require('path') const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') module.exports = { webpack: function (config, { dev }) { + config.plugins.push( + new webpack.ContextReplacementPlugin(/moment[/\\]locale$/,...
6b9bfebcb7dd5759b19451a2f99a816388c86dfc
vector_2d.js
vector_2d.js
// Copyright 2013, odanielson@github.com // MIT-license var Norm = function(v) { return Math.sqrt(v[0] * v[0] + v[1] * v[1]); } var Normalize = function(v) { var norm = Norm(v); return [v[0] / norm, v[1] / norm]; } var Subtract = function(a, b) { return [a[0] - b[0], a[1] - b[1]]; } var Add = functi...
// https://github.com/odanielson/vector_2d.js // Copyright 2013, odanielson@github.com // MIT-license var Norm = function(v) { return Math.sqrt(v[0] * v[0] + v[1] * v[1]); } var Normalize = function(v) { var norm = Norm(v); return [v[0] / norm, v[1] / norm]; } var Subtract = function(a, b) { return [...
Add git src at top.
Add git src at top.
JavaScript
mit
odanielson/vector_2d.js
--- +++ @@ -1,3 +1,4 @@ +// https://github.com/odanielson/vector_2d.js // Copyright 2013, odanielson@github.com // MIT-license
d383cf564507d9b6c166f56321527e46b2fd732e
routes/index.js
routes/index.js
var express = require('express'), router = express.Router(), bcrypt = require('bcrypt'), db = require('../models/db'), index = {}; index.all = function(oauth){ /* GET home page. */ router.get('/', oauth.authorise(), function(req, res) { res.render('index', { title: 'Express' }); }); return...
var express = require('express'), router = express.Router(), bcrypt = require('bcrypt'), db = require('../models/db'), index = {}; index.all = function(oauth){ /* GET home page. */ router.get('/', oauth.authorise(), function(req, res) { res.render('index', { title: 'Express' }); }); /* GET...
Add /register route to redirect to users/new
Add /register route to redirect to users/new
JavaScript
apache-2.0
tessel/oauth,tessel/oauth,tessel/oauth
--- +++ @@ -10,6 +10,11 @@ res.render('index', { title: 'Express' }); }); + /* GET Register new user redirects to users/new. */ + router.get('/register', function(req, res) { + res.redirect('/users/new'); + }); + return router; };
75aabb93187c47d412f415f50671d72ea54ecbd6
app/views/lib/Charts/CanvasChart/__tests__/CanvasChart.spec.js
app/views/lib/Charts/CanvasChart/__tests__/CanvasChart.spec.js
import expect from 'expect'; import I from 'immutable'; import {Note} from '../../../../../reducers/chart'; import {NOTE_HEIGHT} from '../..//constants'; import { WIDTH, HEIGHT, renderNotes, } from '../'; class MockContext { constructor() { this.canvas = { width: WIDTH, height: HEIGHT, };...
import expect from 'expect'; import I from 'immutable'; import {Note} from '../../../../../reducers/chart'; import {NOTE_HEIGHT} from '../../constants'; import {playerColors} from '../../../../../config/constants'; import { WIDTH, HEIGHT, renderNotes, } from '../'; class MockContext { constructor() { thi...
Fix canvas chart test missing colors
Fix canvas chart test missing colors
JavaScript
mit
thomasboyt/bipp,thomasboyt/bipp
--- +++ @@ -2,7 +2,8 @@ import I from 'immutable'; import {Note} from '../../../../../reducers/chart'; -import {NOTE_HEIGHT} from '../..//constants'; +import {NOTE_HEIGHT} from '../../constants'; +import {playerColors} from '../../../../../config/constants'; import { WIDTH, @@ -37,6 +38,7 @@ const offs...
1e2295629b93eb5a3fec43541afe31dfeca417b2
public/script.js
public/script.js
function init() { test(); } function test() { const divObject = document.getElementById('content'); // create database reference const dbRefObject = firebase.database().ref().child('object'); // sync object data dbRefObject.on('value', snap => console.log(snap.val())); }
function init() { test(); } function test() { const divObject = document.getElementById('content'); // create database reference const dbRefObject = firebase.database().ref().child('object'); // sync object data dbRefObject.on('value', snap => { divObject.innerHTML = JSON.stringify(sn...
Write object data to div element as a JSON string.
Write object data to div element as a JSON string.
JavaScript
apache-2.0
googleinterns/step14-2020,googleinterns/step14-2020,googleinterns/step14-2020,googleinterns/step14-2020
--- +++ @@ -9,5 +9,7 @@ const dbRefObject = firebase.database().ref().child('object'); // sync object data - dbRefObject.on('value', snap => console.log(snap.val())); + dbRefObject.on('value', snap => { + divObject.innerHTML = JSON.stringify(snap.val(), null, 3); + }); }
36e5b580ba633a978ee24c92b70b170deee83d5c
client/templates/bookmark/bookmarks_list.js
client/templates/bookmark/bookmarks_list.js
Template.bookmarksList.helpers({ bookmarks: function() { if (Meteor.user()) { var searchTags = document.getElementById("tagSearch").value; if (searchTags != undefined) { return Bookmarks.find({ tags: searchTags }, { ...
Template.bookmarksList.helpers({ bookmarks: function() { if (Meteor.user()) { return (Bookmarks.find({ userId: Meteor.user()._id })) } } });
Fix bug of the last commit
Fix bug of the last commit
JavaScript
mit
blumug/georges,blumug/georges,blumug/georges
--- +++ @@ -1,20 +1,9 @@ Template.bookmarksList.helpers({ bookmarks: function() { if (Meteor.user()) { - var searchTags = document.getElementById("tagSearch").value; - if (searchTags != undefined) { - return Bookmarks.find({ - tags: searchTags - ...
83442c6ae8861702fdc49e286dd0afd4f8e86cf5
species-explorer/app/services/species.service.js
species-explorer/app/services/species.service.js
/* global angular */ angular .module('speciesApp') .factory('SpeciesService', [ 'API_BASE_URL', '$resource', SpeciesService ]) function SpeciesService (API_BASE_URL, $resource) { return $resource( API_BASE_URL, null, { getKingdoms: { method: 'GET', isArray: false,...
/* global angular */ angular .module('speciesApp') .factory('SpeciesService', [ 'API_BASE_URL', '$resource', SpeciesService ]) function SpeciesService (API_BASE_URL, $resource) { return $resource( API_BASE_URL, null, { getKingdoms: { method: 'GET', isArray: false,...
Add an action to get family names by class and kingdom
Add an action to get family names by class and kingdom
JavaScript
mit
stivaliserna/scripts,stivaliserna/scripts
--- +++ @@ -26,6 +26,13 @@ params: { op: 'getclassnames' } + }, + getFamilies: { + method: 'GET', + isArray: false, + params: { + op: 'getfamilynames' + } } } )
237db234a37b364a4271b9d87687985af0a11acc
server/index.js
server/index.js
// Main starting point of the application const express = require('express'); const path = require('path') const http = require('http'); const bodyParser = require('body-parser'); const morgan = require('morgan'); const app = express(); const router = require('./router'); const mongoose = require('mongoose'); const cor...
// Main starting point of the application const express = require('express'); const path = require('path') const http = require('http'); const bodyParser = require('body-parser'); const morgan = require('morgan'); const app = express(); const router = require('./router'); const mongoose = require('mongoose'); const cor...
Change mongodb uri to be an env var.
Change mongodb uri to be an env var.
JavaScript
apache-2.0
ryanthomas30/AudioNimbus,ryanthomas30/AudioNimbus
--- +++ @@ -10,7 +10,7 @@ const cors = require('cors'); // DB Setup -mongoose.connect('mongodb://localhost:auth/auth'); +mongoose.connect(process.env.MONGODB_URI); // App Setup app.use(morgan('combined'));
00cbe3a1649cb06d07157384ec5e9fbd52dfc2aa
server/index.js
server/index.js
require('babel-core/register'); require('dotenv').load(); const serverConfig = require('./config'); // To ignore webpack custom loaders on server. serverConfig.webpackStylesExtensions.forEach((ext) => { require.extensions[`.${ext}`] = () => {}; }); require('./main');
require('babel-core/register'); const path = require('path'); require('dotenv').load({ path: path.resolve(__dirname, '../.env') }); const serverConfig = require('./config'); // To ignore webpack custom loaders on server. serverConfig.webpackStylesExtensions.forEach((ext) => { require.extensions[`.${ext}`] = () => ...
Use absolute path to .env file just in case
Use absolute path to .env file just in case
JavaScript
mit
fastmonkeys/respa-ui
--- +++ @@ -1,5 +1,7 @@ require('babel-core/register'); -require('dotenv').load(); + +const path = require('path'); +require('dotenv').load({ path: path.resolve(__dirname, '../.env') }); const serverConfig = require('./config');
bb3d0364b782e9534b845981586d75d844918eba
src/model/scenario/state/pieces/TextExtractor.js
src/model/scenario/state/pieces/TextExtractor.js
/**@class A matcher piece that calls `compare` on its element's text. */ var TextExtractor = new Class( /** @lends matchers.TextExtractor# */ { /** The attribute that should be extracted from the element. * If not defined, defaults to using this class' `type` property. * *@type {String} */ attribute: null, onEl...
/**@class A matcher piece that calls `compare` on its element's text. */ var TextExtractor = new Class( /** @lends matchers.TextExtractor# */ { /** The attribute that should be extracted from the element. * If not defined, defaults to using this class' `type` property. * *@type {String} */ attribute: null, onEl...
Update text accessors for WD Pass all tests
Update text accessors for WD Pass all tests
JavaScript
agpl-3.0
MattiSG/Watai,MattiSG/Watai
--- +++ @@ -9,7 +9,7 @@ attribute: null, onElementFound: function(element) { - element.getText().then(this.compare, this.fail); + element.text().then(this.compare, this.fail); } });
a363aecf61ea49d67c3e3f74baa949e7e3e9f458
src/plots/frame_attributes.js
src/plots/frame_attributes.js
/** * Copyright 2012-2021, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; module.exports = { _isLinkedToArray: 'frames_entry', group: { valType: 'string', descri...
/** * Copyright 2012-2021, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; module.exports = { _isLinkedToArray: 'frames_entry', group: { valType: 'string', descri...
Revert "revert data and layout role to be object"
Revert "revert data and layout role to be object" This reverts commit 655508a7309da2bd89265c1ab469bae7034a56a4.
JavaScript
mit
plotly/plotly.js,plotly/plotly.js,plotly/plotly.js,etpinard/plotly.js,etpinard/plotly.js,plotly/plotly.js,etpinard/plotly.js
--- +++ @@ -39,7 +39,6 @@ }, data: { valType: 'any', - role: 'object', description: [ 'A list of traces this frame modifies. The format is identical to the', 'normal trace definition.' @@ -47,7 +46,6 @@ }, layout: { valType: 'any', - ...
28a1190d8232a73ada8da4f4b6d25658d71c74e0
update.local.js
update.local.js
var fs = require('fs'); var moment = require('moment'); var rank = require('librank').rank; // data backup path var data_path = "./data/talks/"; // read all files in the database var res = fs.readdirSync(data_path); // current timestamp var now = moment(); // calculate difference of hours between two timestamps fun...
var fs = require('fs'); var moment = require('moment'); var rank = require('librank').rank; // data backup path var data_path = "./data/talks/"; // read all files in the database var res = fs.readdirSync(data_path); // current timestamp var now = moment(); // calculate difference of hours between two timestamps fun...
Remove logic on update remote
Remove logic on update remote
JavaScript
mit
tlksio/db
--- +++ @@ -20,6 +20,7 @@ // calculate ranking for all elements in the database res.forEach(function(element) { + /* // full fs file path var talk_path = data_path + element; // get its data @@ -33,4 +34,5 @@ // ranking calculation var score = rank.rank(points, hours, gravity); co...
20147f80e8e917312f2f5961c1052c5ee17c0761
engines/quickjs/extract.js
engines/quickjs/extract.js
// Copyright 2019 Google 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 // <https://apache.org/licenses/LICENSE-2.0>. // // Unless required by applicable law or agreed to in writing...
// Copyright 2019 Google 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 // <https://apache.org/licenses/LICENSE-2.0>. // // Unless required by applicable law or agreed to in writing...
Update quickjs installer per latest upstream changes
Update quickjs installer per latest upstream changes Closes #87.
JavaScript
apache-2.0
GoogleChromeLabs/jsvu
--- +++ @@ -32,7 +32,7 @@ }); switch (os) { case 'linux64': { - installer.installBinary({ 'qjsbn': binary }); + installer.installBinary({ 'qjs': binary }); break; } }
262c982ce8734ce52df072a0ad536365d6f68924
js/copy.js
js/copy.js
$(function () { ZeroClipboard.config({swfPath: $('[data-swf-path]').data('swf-path')}); $('pre').each(function () { if (!$(this).find('code').length) { var code = $(this).html(); $(this).html(''); $('<code></code>').html(code).appendTo($(this)); } }).appe...
(function ($) { $(function () { ZeroClipboard.config({swfPath: $('[data-swf-path]').data('swf-path')}); $('pre').each(function () { if (!$(this).find('code').length) { var code = $(this).html(); $(this).html(''); $('<code></code>').html(c...
Fix conflict with jQuery and prototype
Fix conflict with jQuery and prototype
JavaScript
mit
wenzhixin/redmine-chrome,wenzhixin/redmine-chrome,wenzhixin/redmine-chrome
--- +++ @@ -1,26 +1,29 @@ -$(function () { - ZeroClipboard.config({swfPath: $('[data-swf-path]').data('swf-path')}); +(function ($) { - $('pre').each(function () { - if (!$(this).find('code').length) { - var code = $(this).html(); - $(this).html(''); - $('<code></code>'...
0141c2d96b8aa65dc58e739ffe90dcf3b73f964f
ember/app/components/plane-label-overlay.js
ember/app/components/plane-label-overlay.js
import Component from '@ember/component'; import $ from 'jquery'; import ol from 'openlayers'; export default class PlaneLabelOverlay extends Component { tagName = ''; map = null; flight = null; position = null; overlay = null; init() { super.init(...arguments); let badgeStyle = `display: inlin...
import Component from '@ember/component'; import $ from 'jquery'; import ol from 'openlayers'; export default class PlaneLabelOverlay extends Component { tagName = ''; map = null; flight = null; position = null; overlay = null; init() { super.init(...arguments); let badgeStyle = `display: inlin...
Use `offsetWidth` instead of jQuery
PlaneLabelOverlay: Use `offsetWidth` instead of jQuery
JavaScript
agpl-3.0
skylines-project/skylines,skylines-project/skylines,skylines-project/skylines,skylines-project/skylines
--- +++ @@ -39,7 +39,7 @@ let overlay = this.overlay; this.map.addOverlay(overlay); - let width = $(overlay.getElement()).width(); + let width = overlay.getElement().offsetWidth; overlay.setOffset([-width / 2, -40]); }