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 |
|---|---|---|---|---|---|---|---|---|---|---|
2cdd4c7744783ee7dba209163a6d76c1b95f4df3 | test/e2e/complainSpec.js | test/e2e/complainSpec.js | 'use strict'
var config = require('config')
describe('/#/complain', function () {
protractor.beforeEach.login({ email: 'admin@' + config.get('application.domain'), password: 'admin123' })
describe('challenge "uploadSize"', function () {
it('should be possible to upload files greater 100 KB', function () {
... | 'use strict'
var config = require('config')
describe('/#/complain', function () {
protractor.beforeEach.login({ email: 'admin@' + config.get('application.domain'), password: 'admin123' })
describe('challenge "uploadSize"', function () {
it('should be possible to upload files greater 100 KB', function () {
... | Increase file size for upload-size test (to prevent occasional failure on some machines) | Increase file size for upload-size test
(to prevent occasional failure on some machines)
| JavaScript | mit | bkimminich/juice-shop,bonze/juice-shop,bkimminich/juice-shop,oviroman/disertatieiap2017,bkimminich/juice-shop,m4l1c3/juice-shop,bkimminich/juice-shop,bonze/juice-shop,m4l1c3/juice-shop,bonze/juice-shop,oviroman/disertatieiap2017,bonze/juice-shop,bonze/juice-shop,oviroman/disertatieiap2017,bkimminich/juice-shop,m4l1c3/j... | ---
+++
@@ -8,7 +8,7 @@
describe('challenge "uploadSize"', function () {
it('should be possible to upload files greater 100 KB', function () {
browser.executeScript(function () {
- var over100KB = Array.apply(null, new Array(10101)).map(String.prototype.valueOf, '1234567890')
+ var over10... |
a029cc96bcb46bbd4ae0fa54646962a835e0d106 | test/e2e/pages/invite.js | test/e2e/pages/invite.js | 'use strict';
var Chance = require('chance'),
chance = new Chance();
class InvitePage {
constructor () {
this.titleEl = element(by.css('.project-title'));
this.message = chance.sentence();
this.AddPeopleBtn = element(by.css('.invite-button'));
this.inviteBtn = element(by.css('[ng-click="invi... | 'use strict';
var Chance = require('chance'),
chance = new Chance();
class InvitePage {
constructor () {
this.titleEl = element(by.css('.project-title'));
this.message = chance.sentence();
this.AddPeopleBtn = element(by.css('.invite-button'));
this.inviteBtn = element(by.css('[ng-click="invi... | Use protractor EC.elementToBeClickable to fix the tests | Use protractor EC.elementToBeClickable to fix the tests
| JavaScript | agpl-3.0 | P2Pvalue/pear2pear,Grasia/teem,Grasia/teem,P2Pvalue/teem,Grasia/teem,P2Pvalue/teem,P2Pvalue/pear2pear,P2Pvalue/teem | ---
+++
@@ -46,7 +46,7 @@
// to blur input in email invite case.
this.inputInvite.sendKeys(protractor.Key.TAB);
- browser.wait(protractor.ExpectedConditions.visibilityOf(this.inviteBtn));
+ browser.wait(protractor.ExpectedConditions.elementToBeClickable(this.inviteBtn));
return this.inviteBtn... |
de1bdcd5b4a8f7336fbbe3b42bbf67a3bca2d1f0 | src/components/posts_index.js | src/components/posts_index.js | import React, { Component } from 'react';
class PostsIndex extends Component {
render() {
return (
<div>
Posts Index
</div>
);
}
}
export default PostsIndex; | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchPosts } from '../actions';
class PostsIndex extends Component {
componentDidMount() {
this.props.fetchPosts();
}
render() {
return (
<div>
Posts Index
</div>
);
}
}
export default ... | Connect fetchPosts action creator to PostsIndex | Connect fetchPosts action creator to PostsIndex
| JavaScript | mit | heatherpark/blog,heatherpark/blog | ---
+++
@@ -1,6 +1,12 @@
import React, { Component } from 'react';
+import { connect } from 'react-redux';
+import { fetchPosts } from '../actions';
class PostsIndex extends Component {
+ componentDidMount() {
+ this.props.fetchPosts();
+ }
+
render() {
return (
<div>
@@ -10,4 +16,5 @@
}
... |
640b87a80ce137fceab5410c5e431204e8e0aca0 | src/Atok_properties.js | src/Atok_properties.js | // Public properties
this.buffer = null
this.length = 0
this.offset = 0
this.markedOffset = -1 // Flag indicating whether the buffer should be kept when write() ends
// Private properties
this._tokenizing = false
this._ruleIndex = 0
this._resetRuleIndex = false
this._stringDecoder = this._encodi... | // Public properties
this.buffer = null
this.length = 0
this.offset = 0
this.markedOffset = -1 // Flag indicating whether the buffer should be kept when write() ends
// Private properties
this._tokenizing = false
this._ruleIndex = 0
this._resetRuleIndex = false
this._stringDecoder = new StringDe... | Set string decoder by default | Set string decoder by default
| JavaScript | mit | pierrec/node-atok | ---
+++
@@ -8,7 +8,7 @@
this._tokenizing = false
this._ruleIndex = 0
this._resetRuleIndex = false
- this._stringDecoder = this._encoding ? new StringDecoder(this._encoding) : null
+ this._stringDecoder = new StringDecoder(this._encoding)
this._rulesToResolve = false
this._group = -1
this._groupSta... |
29652896b0d2bccaa6b74cc11ff1ce2f154af330 | test/specs/4loop.spec.js | test/specs/4loop.spec.js | const FourLoop = require('../../index');
describe('4loop', () => {
it('callback executed on obj', (expect) => {
let wasCallbackHit = false;
const callback = function callback(){
wasCallbackHit = true;
};
FourLoop({ cats: 'rule' }, callback);
expect(wasCallbackHit... | const FourLoop = require('../../index');
describe('4loop', () => {
describe('ensures callbacks were executed', () => {
it('called the callback executed on obj', (expect) => {
let wasCallbackHit = false;
const callback = function callback(){
wasCallbackHit = true;
... | Add callback tests for map and sets | RB: Add callback tests for map and sets
| JavaScript | mit | raymondborkowski/4loop | ---
+++
@@ -1,28 +1,52 @@
const FourLoop = require('../../index');
describe('4loop', () => {
- it('callback executed on obj', (expect) => {
- let wasCallbackHit = false;
- const callback = function callback(){
- wasCallbackHit = true;
- };
- FourLoop({ cats: 'rule' }, cal... |
bcf5db2ca80da33637deafb80cdefdc813f29c80 | src/SMS/drivers/Log.js | src/SMS/drivers/Log.js | const CatLog = require('cat-log');
const logger = new CatLog('adonis:sms');
class Log {
constructor (Config) {
this.config = Config;
}
send (message, config) {
if (config) this.config = config;
logger.info(`SMS log driver send. from=${message.from} to=${message.to} text=${message.text}`);
return... | const CatLog = require('cat-log');
const logger = new CatLog('adonis:sms');
class Log {
constructor (Config) {
this.config = Config;
}
send (message, config) {
if (config) this.config = config;
logger.info(`SMS log driver send. from=${message.from} to=${message.to}`);
logger.info('ββββββββββββββ... | Change log output format for better legibility | Change log output format for better legibility
| JavaScript | mit | nrempel/adonis-sms | ---
+++
@@ -8,7 +8,10 @@
send (message, config) {
if (config) this.config = config;
- logger.info(`SMS log driver send. from=${message.from} to=${message.to} text=${message.text}`);
+ logger.info(`SMS log driver send. from=${message.from} to=${message.to}`);
+ logger.info('βββββββββββββββββββββββββ... |
158b0264092a458d26387a3c5b0a92253f7ee49a | knexfile.js | knexfile.js | import { merge } from 'lodash'
require('dotenv').load()
if (!process.env.DATABASE_URL) {
throw new Error('process.env.DATABASE_URL must be set')
}
const url = require('url').parse(process.env.DATABASE_URL)
var user, password
if (url.auth) {
const i = url.auth.indexOf(':')
user = url.auth.slice(0, i)
password ... | require('dotenv').load()
// LEJ: ES6 import not working for a commandline run of knex,
// replacing with require
// (e.g. knex seed:run)
//
// import { merge } from 'lodash'
const _ = require('lodash')
const merge = _.merge
if (!process.env.DATABASE_URL) {
throw new Error('process.env.DATABASE_URL must be set... | Make seeds runnable on CLI | Make seeds runnable on CLI
| JavaScript | apache-2.0 | Hylozoic/hylo-node,Hylozoic/hylo-node | ---
+++
@@ -1,5 +1,12 @@
-import { merge } from 'lodash'
require('dotenv').load()
+
+// LEJ: ES6 import not working for a commandline run of knex,
+// replacing with require
+// (e.g. knex seed:run)
+//
+// import { merge } from 'lodash'
+const _ = require('lodash')
+const merge = _.merge
if (!process.env.D... |
cf14244c4afcad892177ae0457ee256c0866a35e | share/spice/flash_version/flash_version.js | share/spice/flash_version/flash_version.js | (function(env) {
"use strict";
env.ddg_spice_flash_version = function() {
if(!FlashDetect) {
return Spice.failed('flash_version');
}
Spice.add({
data: {
installed: FlashDetect.installed,
raw: FlashDetect.raw
... | (function(env) {
"use strict";
env.ddg_spice_flash_version = function() {
DDG.require('flash_detect.js', function(){
if(!FlashDetect) {
return Spice.failed('flash_version');
}
Spice.add({
data: {
... | Use DDG.require for 'flash_detect.js' file | FlashVersion: Use DDG.require for 'flash_detect.js' file
| JavaScript | apache-2.0 | whalenrp/zeroclickinfo-spice,deserted/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,deserted/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,deserted/zeroclickinfo-spice,dogomedia/zero... | ---
+++
@@ -3,29 +3,33 @@
env.ddg_spice_flash_version = function() {
- if(!FlashDetect) {
- return Spice.failed('flash_version');
- }
-
- Spice.add({
- data: {
- installed: FlashDetect.installed,
- raw: FlashDetect.r... |
4b97b778be2513076d4e0820b8aa807b549372b6 | basic/scripts/presets.js | basic/scripts/presets.js | /**
* Basic presets: swiss direct matchings, round similar to chess, and ko
* with a matched cadrage. Simple rankings
*
* @return Presets
* @author Erik E. Lorenz <erik@tuvero.de>
* @license MIT License
* @see LICENSE
*/
define(function() {
var Presets;
Presets = {
target: 'basic',
systems: {
... | /**
* Basic presets: swiss direct matchings, round similar to chess, and ko
* with a matched cadrage. Simple rankings
*
* @return Presets
* @author Erik E. Lorenz <erik@tuvero.de>
* @license MIT License
* @see LICENSE
*/
define(function() {
var Presets;
Presets = {
target: 'basic',
systems: {
... | Enable twopoint in Tuvero Basic | Enable twopoint in Tuvero Basic
| JavaScript | mit | elor/tuvero | ---
+++
@@ -27,7 +27,7 @@
},
ranking: {
components: ['buchholz', 'finebuchholz', 'points', 'saldo', 'sonneborn',
- 'numgames', 'wins', 'headtohead', 'threepoint']
+ 'numgames', 'wins', 'headtohead', 'threepoint', 'twopoint']
},
registration: {
minteamsize: 1, |
a7505099d6cd97bbe9737abeb9cf45a9d0e4e0da | src/core/AudioletDestination.js | src/core/AudioletDestination.js | /**
* @depends AudioletGroup.js
*/
var AudioletDestination = new Class({
Extends: AudioletGroup,
initialize: function(audiolet, sampleRate, numberOfChannels, bufferSize) {
AudioletGroup.prototype.initialize.apply(this, [audiolet, 1, 0]);
this.device = new AudioletDevice(audiolet, sampleRate,... | /**
* @depends AudioletGroup.js
*/
var AudioletDestination = new Class({
Extends: AudioletGroup,
initialize: function(audiolet, sampleRate, numberOfChannels, bufferSize) {
AudioletGroup.prototype.initialize.apply(this, [audiolet, 1, 0]);
this.device = new AudioletDevice(audiolet, sampleRate,... | Make maximum buffer size larger. Should perform a little better, at the expense of higher memory usage, and a higher minimum delay length. | Make maximum buffer size larger. Should perform a little better, at the expense of higher memory usage, and a higher minimum delay length.
| JavaScript | apache-2.0 | Kosar79/Audiolet,Kosar79/Audiolet,mcanthony/Audiolet,kn0ll/Audiolet,oampo/Audiolet,oampo/Audiolet,bobby-brennan/Audiolet,mcanthony/Audiolet,bobby-brennan/Audiolet,kn0ll/Audiolet,Kosar79/Audiolet | ---
+++
@@ -14,7 +14,7 @@
audiolet.scheduler = this.scheduler; // Shortcut
this.blockSizeLimiter = new BlockSizeLimiter(audiolet,
- Math.pow(2, 12));
+ Math.pow(2, 15));
audiolet.blockS... |
b3760d224632e989dfdeb0b57755d30e87b2bbf2 | package.js | package.js | Package.describe({
name: 'sanjo:karma',
summary: 'Integrates Karma into Meteor',
version: '1.6.1',
git: 'https://github.com/Sanjo/meteor-karma.git'
})
Npm.depends({
'karma': '0.13.3',
'karma-chrome-launcher': '0.2.0',
'karma-firefox-launcher': '0.1.6',
'karma-jasmine': '0.3.6',
'karma-babel-preproces... | Package.describe({
name: 'sanjo:karma',
summary: 'Integrates Karma into Meteor',
version: '1.6.1',
git: 'https://github.com/Sanjo/meteor-karma.git'
})
Npm.depends({
'karma': '0.13.3',
'karma-chrome-launcher': '0.2.0',
'karma-firefox-launcher': '0.1.6',
'karma-jasmine': '0.3.6',
'karma-babel-preproces... | Remove unused dependencies and updates used dependencies | Remove unused dependencies and updates used dependencies
| JavaScript | mit | michelalbers/meteor-karma,Sanjo/meteor-karma | ---
+++
@@ -18,13 +18,10 @@
})
Package.onUse(function (api) {
- api.versionsFrom('1.0.3.2')
- api.use('coffeescript', 'server')
- api.use('underscore', 'server')
- api.use('check', 'server')
- api.use('practicalmeteor:loglevel@1.1.0_2', 'server')
- api.use('sanjo:meteor-files-helpers@1.1.0_2', 'server')
- ... |
12f58924dc7f0dc6644671a0f39d1df3678c0681 | lib/vain.js | lib/vain.js | 'use strict';
/*****
* Vain
*
* A view-first templating engine for Node.js.
*****/
var jsdom = require('jsdom'),
$ = require('jquery')(jsdom.jsdom().createWindow()),
snippetRegistry = {};
/**
* Register a snippet in the snippet registry.
**/
exports.registerSnippet = function(snippetName, snippetFn) {
s... | 'use strict';
/*****
* Vain
*
* A view-first templating engine for Node.js.
*****/
var jsdom = require('jsdom'),
$ = require('jquery')(jsdom.jsdom().createWindow()),
snippetRegistry = {};
/**
* Register a snippet in the snippet registry.
**/
exports.registerSnippet = function(snippetName, snippetFn) {
s... | Add handling of fn callback for render. | Add handling of fn callback for render.
| JavaScript | apache-2.0 | farmdawgnation/vain | ---
+++
@@ -27,6 +27,18 @@
options = options || {};
+ if ('function' === typeof fn) {
+ var result;
+
+ try {
+ result = exports.render(input, options);
+ } catch (exception) {
+ return fn(exception);
+ }
+
+ return fn(null, result);
+ }
+
var $template = $("<div />").append(input... |
6cfd4dcee23e66d1b454a53d572abe252f7af5ed | addon/components/bootstrap-datepicker.js | addon/components/bootstrap-datepicker.js | import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'input',
setupBootstrapDatepicker: function() {
var self = this,
element = this.$(),
value = this.get('value');
element.
datepicker({
autoclose: this.get('autoclose') || true,
format: this.ge... | import Ember from 'ember';
export default Ember.TextField.extend({
setupBootstrapDatepicker: function() {
var self = this,
element = this.$(),
value = this.get('value');
element.
datepicker({
autoclose: this.get('autoclose') || true,
format: this.get('format') || 'dd.mm... | Use Ember.TextField instead of generic Ember.Component | Use Ember.TextField instead of generic Ember.Component
Datepicker is an input field, so it much better to use Ember.TextField.
It automatically gives attributes like `name`, `size`, `placeholder` and etc.
This also closes #2
| JavaScript | mit | aravindranath/ember-cli-datepicker,aravindranath/ember-cli-datepicker,Hanastaroth/ember-cli-bootstrap-datepicker,aldhsu/ember-cli-bootstrap-datepicker,NichenLg/ember-cli-bootstrap-datepicker,jesenko/ember-cli-bootstrap-datepicker,aldhsu/ember-cli-bootstrap-datepicker,topaxi/ember-bootstrap-datepicker,jesenko/ember-cli-... | ---
+++
@@ -1,8 +1,6 @@
import Ember from 'ember';
-export default Ember.Component.extend({
- tagName: 'input',
-
+export default Ember.TextField.extend({
setupBootstrapDatepicker: function() {
var self = this,
element = this.$(), |
e725c9cd3df163549efda41a957a18e8ef3dba44 | src/plugins/canonize/index.js | src/plugins/canonize/index.js | const { next, hookEnd, call } = require('hooter/effects')
function canonize(command) {
let { fullName, config, options } = command
if (!config) {
return command
}
command = Object.assign({}, command)
command.outputName = fullName.slice(0, -1).concat(config.name)
if (options && options.length) {
... | const { next, hookEnd, call } = require('hooter/effects')
function canonize(command) {
let { fullName, config, options } = command
if (config) {
command = Object.assign({}, command)
command.outputName = fullName.slice(0, -1).concat(config.name)
}
if (options && options.length) {
command = config... | Rework canonize plugin so that it doesn't set output names when no config | Rework canonize plugin so that it doesn't set output names when no config
| JavaScript | isc | alex-shnayder/comanche | ---
+++
@@ -4,17 +4,21 @@
function canonize(command) {
let { fullName, config, options } = command
- if (!config) {
- return command
+ if (config) {
+ command = Object.assign({}, command)
+ command.outputName = fullName.slice(0, -1).concat(config.name)
}
- command = Object.assign({}, command)
-... |
0c1b581a46c5655b111ef7027ce2076bc4fe6162 | src/test/data/SimpleTestModelSchema.js | src/test/data/SimpleTestModelSchema.js | define([
], function (
) {
return {
"id": "TestData/SimpleTestModelSchema",
"description": "A simple model for testing",
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"modelNumber": {
"type":... | define({
"id": "TestData/SimpleTestModelSchema",
"description": "A simple model for testing",
"$schema": "http://json-schema.org/draft-03/schema",
"type": "object",
"properties": {
"modelNumber": {
"type": "string",
"maxLength": 4,
"description": ... | Add pattern validation to test model. | Add pattern validation to test model.
| JavaScript | apache-2.0 | atsid/schematic-js,atsid/schematic-js | ---
+++
@@ -1,24 +1,19 @@
-define([
-], function (
-) {
-
- return {
- "id": "TestData/SimpleTestModelSchema",
- "description": "A simple model for testing",
- "$schema": "http://json-schema.org/draft-03/schema",
- "type": "object",
- "properties": {
- "modelNumber... |
53ecb8eca3b8ecff7da77ece3b81bedf91d74674 | config/webpack.config.js | config/webpack.config.js | const webpack = require('webpack'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
path = require('path'),
babelCfg = require("./babel.config"),
paths = {
root: path.join(__dirname, '../'),
app: path.join(__dirname, '../app/'),
dist: path.join(__dirname, '../dist/')
};
... | const webpack = require('webpack'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
path = require('path'),
babelCfg = require("./babel.config"),
paths = {
root: path.join(__dirname, '../'),
app: path.join(__dirname, '../app/'),
dist: path.join(__dirname, '../dist/')
};
... | Use single dist js file | Use single dist js file
| JavaScript | mit | mstijak/tdo,mstijak/tdo,mstijak/tdo | ---
+++
@@ -28,7 +28,7 @@
}]
},
entry: {
- vendor: ['cx-react'],
+ //vendor: ['cx-react'],
app: paths.app + 'index.js'
},
output: {
@@ -36,10 +36,10 @@
filename: "[name].js"
},
plugins: [
- new webpack.optimize.CommonsChunkPlugin({
- ... |
ee05d7c98ef9052fa27cc78a517c861577369d89 | comparisons/utils/array_each/ie8.js | comparisons/utils/array_each/ie8.js | function forEach(array, fn) {
for (i = 0; i < array.length; i++)
fn(array[i], i);
}
forEach(array, function(item, i){
});
| function forEach(array, fn) {
for (var i = 0; i < array.length; i++)
fn(array[i], i);
}
forEach(array, function(item, i){
});
| Fix implicit creation of global variable | Fix implicit creation of global variable
| JavaScript | mit | faustinoloeza/youmightnotneedjquery,gnarf/youmightnotneedjquery,sirLisko/youmightnotneedjquery,prashen/youmightnotneedjquery,kk9599/youmightnotneedjquery,giacomocerquone/youmightnotneedjquery,sdempsey/youmightnotneedjquery,faustinoloeza/youmightnotneedjquery,prashen/youmightnotneedjquery,maxmaximov/youmightnotneedjquer... | ---
+++
@@ -1,5 +1,5 @@
function forEach(array, fn) {
- for (i = 0; i < array.length; i++)
+ for (var i = 0; i < array.length; i++)
fn(array[i], i);
}
|
029788ef9eab50ee2ebdbc76940898f4c85f63c1 | app/dashboard/concepts/concept/config.js | app/dashboard/concepts/concept/config.js | 'use strict';
angular
.module('report-editor')
.config(function ($stateProvider) {
$stateProvider
.state('dashboard.concepts.concept', {
url: '/:concepts/:label',
templateUrl: '/dashboard/concepts/concept/concept.html',
controller: 'DashboardC... | 'use strict';
angular
.module('report-editor')
.config(function ($stateProvider) {
$stateProvider
.state('dashboard.concepts.concept', {
url: '/:concepts/:label',
templateUrl: '/dashboard/concepts/concept/concept.html',
controller: 'DashboardC... | Add forecast dimensions to the dashboard | :new: Add forecast dimensions to the dashboard
| JavaScript | apache-2.0 | AndreSteenveld/cellstore,AndreSteenveld/cellstore,AndreSteenveld/cellstore | ---
+++
@@ -18,8 +18,18 @@
fiscalYear: 'ALL',
fiscalPeriod: 'FY',
'jppfs-cor:ConsolidatedOrNonConsolidatedAxis': 'ALL',
- 'jppfs-cor:ConsolidatedOrNonConsolidatedAxis::default': 'jppfs-cor:NonConsolidated... |
c3c93a694cdbb854da2211db6ce61826078dbfdc | mock/frame/api.js | mock/frame/api.js | const Router = require('express').Router(),
Util = require('../common/util.js');
// ε―Όθͺζ θε
Router.route('/navigation/menuTree')
.get(function(request, response) {
let protocal = Util.protocal();
protocal.head.status = 200;
protocal.head.message = 'http response sucess';
protocal.body = Util.json... | const Router = require('express').Router(),
Util = require('../common/util.js');
// ε―Όθͺζ θε
Router.route('/navigation/menuTree')
.get(function(request, response) {
let protocal = Util.protocal();
protocal.head.status = 200;
protocal.head.message = 'http response sucess';
protocal.body = Util.json... | Fix bug for API 404 error | Fix bug for API 404 error
| JavaScript | mit | uinika/saga,uinika/saga | ---
+++
@@ -13,10 +13,10 @@
// 注ιε½εη¨ζ·
Router.route('/logout')
- .get(function(request, response) {
- let protocal = Util.Protocal();
+ .post(function(request, response) {
+ let protocal = Util.protocal();
protocal.head.status = 200;
- protocal.head.message = 'http response sucess';
+ protocal.h... |
a388030c1974528db0c521ef61376d3152217a86 | prototype.spawn.js | prototype.spawn.js | module.exports = function () {
StructureSpawn.prototype.createCustomCreep =
function(energy, roleName) {
var numberOfParts = Math.floor(energy / 350);
var body = [];
for (let i = 0; i < numberOfParts; i++) {
body.push(WORK);
}
for (let i = 0; i < numb... | module.exports = function () {
StructureSpawn.prototype.createCustomCreep =
function(energy, roleName) {
var numberOfParts = Math.floor(energy / 350);
var body = [];
for (let i = 0; i < numberOfParts; i++) {
body.push(WORK);
}
for (let i = 0; i < numb... | WORK WORK CARRY MOVE MOVEx2+Bracket fixings | WORK WORK CARRY MOVE MOVEx2+Bracket fixings
| JavaScript | mit | Raltrwx/Ralt-Screeps | ---
+++
@@ -7,17 +7,17 @@
body.push(WORK);
}
for (let i = 0; i < numberOfParts; i++) {
- body.push(WORK);
- }
+ body.push(WORK);
+ }
for (let i = 0; i < numberOfParts; i++) {
- body.push(CARRY);
- ... |
541560e6b624119218729d70889197eddd184ca5 | server/trello-microservice/test/index.js | server/trello-microservice/test/index.js | import mongoose from 'mongoose';
import sinon from 'sinon';
import { dbTest } from '../src/config/database';
let isConnected;
const prepareServer = (user, done) => {
let passportMiddleweare = require('../src/utils/passportMiddleweare');
let stub = sinon.stub(passportMiddleweare, 'authenticatedWithToken');
st... | import mongoose from 'mongoose';
import sinon from 'sinon';
import { dbTest } from '../src/config/database';
import getLogger from '../src/libs/winston';
import { port } from '../src/config/config';
const log = getLogger(module);
const prepareServer = (user, done) => {
let passportMiddleweare = require('../src/uti... | Add logs to the test server | Add logs to the test server
| JavaScript | mit | Madmous/madClones,Madmous/Trello-Clone,Madmous/madClones,Madmous/Trello-Clone,Madmous/Trello-Clone,Madmous/madClones,Madmous/madClones | ---
+++
@@ -2,8 +2,10 @@
import sinon from 'sinon';
import { dbTest } from '../src/config/database';
+import getLogger from '../src/libs/winston';
+import { port } from '../src/config/config';
-let isConnected;
+const log = getLogger(module);
const prepareServer = (user, done) => {
let passportMiddleweare... |
abc62ab2de05943faec14b077590bb27994e984c | journal.js | journal.js |
function write(prefix, args) {
var timestamp = (new Date()).toString();
args.unshift(prefix, timestamp);
console.log.apply(this, args);
}
var debug = function() {
write("D", Array.prototype.slice.call(arguments));
};
var info = function() {
write("I", Array.prototype.slice.call(arguments));
};
var error =... |
// Total available default levels.
// logs are assigned as level to denote
// levels of importance of criticality.
var levels = {
DEBUG: 1,
INFO: 2,
ERROR: 3,
WARN: 4,
FAIL: 5
};
// What are we currently interested in?
var interest_ = 1;
// Line prefixes provide easy visual markers
// fo... | Implement support for setting interest level. | Implement support for setting interest level.
| JavaScript | mit | soondobu/journal.js | ---
+++
@@ -1,34 +1,80 @@
-function write(prefix, args) {
- var timestamp = (new Date()).toString();
- args.unshift(prefix, timestamp);
- console.log.apply(this, args);
+
+// Total available default levels.
+// logs are assigned as level to denote
+// levels of importance of criticality.
+var levels = {
+ DEBUG... |
6be2707275df736cff451e8f461e43073488d8df | src/browser/services/cookie-storage.js | src/browser/services/cookie-storage.js | export default class CookieStorage {
constructor(storageName = '_token') {
this.cache = {};
this.storageName = storageName;
}
getItem(key) {
if (this.cache[key]) {
return Promise.resolve(this.cache[key]);
}
const data = this._getCookie();
if (!data[key]) {
return Promise.rej... | export default class CookieStorage {
constructor(storageName = '_token') {
this.cache = {};
this.storageName = storageName;
}
getItem(key) {
if (this.cache[key]) {
return Promise.resolve(this.cache[key]);
}
const data = this._getCookie();
if (!data[key]) {
return Promise.rej... | Update cookie definition to use root path | Update cookie definition to use root path
| JavaScript | mit | uphold/uphold-sdk-javascript,uphold/uphold-sdk-javascript | ---
+++
@@ -54,6 +54,6 @@
}
_setCookie(data) {
- document.cookie = `${this.storageName}=${encodeURIComponent(JSON.stringify(data))}`;
+ document.cookie = `${this.storageName}=${encodeURIComponent(JSON.stringify(data))};path=/`;
}
} |
9d132a41b7a669ba3d06d7eb959b4ba2f370e766 | client/gulpfile.babel.js | client/gulpfile.babel.js | import gulp from 'gulp';
import defaults from 'lodash/defaults';
import plumber from 'gulp-plumber';
import webpack from 'webpack-stream';
import jscs from 'gulp-jscs';
import jshint from 'gulp-jshint';
import { JSXHINT as linter } from 'jshint-jsx';
import webpackPrd from './conf/webpack.prd.config';
import webpackDe... | import gulp from 'gulp';
import defaults from 'lodash/defaults';
import plumber from 'gulp-plumber';
import webpack from 'webpack-stream';
import jscs from 'gulp-jscs';
import jshint from 'gulp-jshint';
import { JSXHINT as linter } from 'jshint-jsx';
import webpackPrd from './conf/webpack.prd.config';
import webpackDe... | Add a ci gulp task | Add a ci gulp task
| JavaScript | bsd-2-clause | praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo | ---
+++
@@ -55,8 +55,8 @@
});
+gulp.task('test', []);
gulp.task('watch', ['watch:lint', 'watch:scripts']);
gulp.task('build', ['build:scripts']);
-
-
-gulp.task('default', ['build']);
+gulp.task('ci', ['lint', 'build', 'test']);
+gulp.task('default', ['build', 'test']); |
05c2639761fffe630ed36ff0724c5d1153a46c64 | test/local-state-test.js | test/local-state-test.js | var tape = require("tape"),
jsdom = require("jsdom"),
d3 = Object.assign(require("../"), require("d3-selection"));
/*************************************
************ Components *************
*************************************/
// Local state.
var spinnerCreated= false,
spinnerDestroyed = false,
... | var tape = require("tape"),
jsdom = require("jsdom"),
d3 = Object.assign(require("../"), require("d3-selection"));
/*************************************
************ Components *************
*************************************/
// Local state.
var spinnerCreated= false,
spinnerDestroyed = false,
... | Add test for local state | Add test for local state
| JavaScript | bsd-3-clause | curran/d3-component | ---
+++
@@ -38,5 +38,21 @@
tape("Local state.", function(test) {
var div = d3.select(jsdom.jsdom().body).append("div");
+ // Create.
+ div.call(spinner);
+ test.equal(spinnerCreated, true);
+ test.equal(spinnerDestroyed, false);
+ test.equal(spinnerTimerState = "running");
+ test.equal(spinnerText = "Time... |
74c1bd9785f65aaf88834dede0a4ab83a4f9827f | test/lib/parser/ftl/serializer_test.js | test/lib/parser/ftl/serializer_test.js | 'use strict';
import fs from 'fs';
import path from 'path';
import assert from 'assert';
import FTLParser from '../../../../src/lib/format/ftl/ast/parser';
import FTLSerializer from '../../../../src/lib/format/ftl/ast/serializer';
var parse = FTLParser.parseResource;
function readFile(path) {
return new Promise(f... | 'use strict';
import fs from 'fs';
import path from 'path';
import assert from 'assert';
import FTLParser from '../../../../src/lib/format/ftl/ast/parser';
import FTLSerializer from '../../../../src/lib/format/ftl/ast/serializer';
var parse = FTLParser.parseResource;
function readFile(path) {
return new Promise(f... | Fix serializer test with proper argument to FTLSerializer | Fix serializer test with proper argument to FTLSerializer
| JavaScript | apache-2.0 | projectfluent/fluent.js,zbraniecki/fluent.js,projectfluent/fluent.js,zbraniecki/fluent.js,l20n/l20n.js,stasm/l20n.js,projectfluent/fluent.js,zbraniecki/l20n.js | ---
+++
@@ -22,7 +22,7 @@
readFile(path1),
]).then(([source1]) => {
let ftl = parse(source1);
- let out = FTLSerializer.serialize(ftl);
+ let out = FTLSerializer.serialize(ftl.body);
let ftl2 = parse(out);
assert.deepEqual(ftl.body, ftl2.body, `Serialized output for ${path1} should be t... |
bbdbf72361d97bd9306fd46da28cb06565b14af6 | client/src/actions/fullListingActions.js | client/src/actions/fullListingActions.js | import { GET_CURRENT_LISTING_SUCCESS, FETCHING_LISTING, CHANGE_CONTACT_FIELD } from '../constants';
import { changeCenter, addMapMarker } from './googleMapActions';
import { fetchCurrentListing } from './api';
const startFetchListing = () =>
({
type: FETCHING_LISTING,
});
export const changeContactField = (f... | import { GET_CURRENT_LISTING_SUCCESS, FETCHING_LISTING, CHANGE_CONTACT_FIELD, POST_CONTACT_MESSAGE_SUCCESS } from '../constants';
import { changeCenter, addMapMarker } from './googleMapActions';
import { fetchCurrentListing, postContactMessage } from './api';
const startFetchListing = () =>
({
type: FETCHING_LI... | Add actions to handle posting a message | Add actions to handle posting a message
| JavaScript | mit | Velocies/raptor-ads,wolnewitz/raptor-ads,bwuphan/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads,wolnewitz/raptor-ads,Darkrender/raptor-ads,bwuphan/raptor-ads | ---
+++
@@ -1,6 +1,6 @@
-import { GET_CURRENT_LISTING_SUCCESS, FETCHING_LISTING, CHANGE_CONTACT_FIELD } from '../constants';
+import { GET_CURRENT_LISTING_SUCCESS, FETCHING_LISTING, CHANGE_CONTACT_FIELD, POST_CONTACT_MESSAGE_SUCCESS } from '../constants';
import { changeCenter, addMapMarker } from './googleMapAction... |
ab0306fd4c49f967bb1d21c9dd22042a26fb4812 | test/unit/testNewFile.js | test/unit/testNewFile.js | 'use strict';
var jf = require('../../'),
expect = require('chai').expect,
fs = require('fs');
const testFilePath = './' + Math.random() + '.json';
describe('The initialValue', function () {
it('should be equal to defined in json.filed.', function (done) {
jf
.newFile( testFilePath )
.io(
... | 'use strict';
var jf = require('../../'),
expect = require('chai').expect,
fs = require('fs');
const testFilePath = './' + Math.random() + '.json';
describe('newFile executer', function () {
it('should create new file and if already exists, raise error.', function (done) {
jf
.newFile( testFilePa... | Fix mistaken comment in test | Fix mistaken comment in test
| JavaScript | bsd-3-clause | 7k8m/json.filed,7k8m/json.filed | ---
+++
@@ -5,8 +5,8 @@
fs = require('fs');
const testFilePath = './' + Math.random() + '.json';
-describe('The initialValue', function () {
- it('should be equal to defined in json.filed.', function (done) {
+describe('newFile executer', function () {
+ it('should create new file and if already exists, rai... |
e2a2cded975f53463e2a83d2c38f0e285e186e7e | tests/Data.tests/testCookies/client.js | tests/Data.tests/testCookies/client.js | //test cookie passing
var http = require("http");
var fs = require("fs");
var querystring = require("querystring");
express = require('express'),
connect = require('connect'),
sys = require('sys'),
app = express.createServer();
var stdin = process.openStdin();
stdin.setEncoding('utf8');
stdin.on('data... | //test cookie passing
var http = require("http");
var fs = require("fs");
var querystring = require("querystring");
express = require('express'),
connect = require('connect'),
sys = require('sys'),
app = express.createServer();
var stdin = process.openStdin();
stdin.setEncoding('utf8');
stdin.on('data... | Return our actual port to avoid some potential conflicts | Return our actual port to avoid some potential conflicts
| JavaScript | bsd-3-clause | LockerProject/Locker,LockerProject/Locker,quartzjer/Locker,LockerProject/Locker,quartzjer/Locker,othiym23/locker,LockerProject/Locker,othiym23/locker,Singly/hallway,othiym23/locker,quartzjer/Locker,othiym23/locker,quartzjer/Locker,LockerProject/Locker,quartzjer/Locker,othiym23/locker,Singly/hallway | ---
+++
@@ -14,14 +14,14 @@
var processInfo = JSON.parse(chunk);
process.chdir(processInfo.workingDirectory);
app.listen(processInfo.port, function() {
- var returnedInfo = {port: processInfo.port};
- console.log(JSON.stringify(returnedInfo));
+ console.log(JSON.stringify({port: ap... |
6d1330848d4eb59b3308f5166b14dbb6de850869 | servers.js | servers.js | var fork = require('child_process').fork;
var async = require('async');
var amountConcurrentServers = process.argv[2] || 50;
var port = initialPortServer();
var servers = [];
var path = __dirname;
for(var i = 0; i < amountConcurrentServers; i++) {
var portForServer = port + i;
var serverIdentifier = i;
con... | var fork = require('child_process').fork;
var amountConcurrentServers = process.argv[2] || 50;
var port = initialPortServer();
var servers = [];
var path = __dirname;
for(var i = 0; i < amountConcurrentServers; i++) {
var portForServer = port + i;
var serverIdentifier = i;
console.log('Creating server: ' +... | Remove async library for server | Remove async library for server
| JavaScript | mit | eltortuganegra/server-websocket-benchmark,eltortuganegra/server-websocket-benchmark | ---
+++
@@ -1,5 +1,4 @@
var fork = require('child_process').fork;
-var async = require('async');
var amountConcurrentServers = process.argv[2] || 50;
var port = initialPortServer();
var servers = []; |
ac5bf5d50ac0213497d65ffd44264b5a860c2075 | src/posts/js/post.controller.js | src/posts/js/post.controller.js | /*global angular*/
angular.module('post')
/**
* @ngdoc controller
* @name post.controller:PostMainController
*
* @description
* # main post controller
*
* The main post controller
*
*/
.controller('PostMainController', ["PostManager", function (PostManager) {
"use strict";
v... | /*global angular*/
angular.module('post')
/**
* @ngdoc controller
* @name post.controller:PostMainController
*
* @description
* # main post controller
*
* The main post controller
*
*/
.controller('PostMainController', ["PostManager", function (PostManager) {
"use strict";
var scope = this;
scope.text ... | Indent code after changing editor to netbeans. | Indent code after changing editor to netbeans. | JavaScript | mit | anisdjer/angularjs-ci,anisdjer/angularjs-ci | ---
+++
@@ -1,16 +1,16 @@
/*global angular*/
angular.module('post')
/**
- * @ngdoc controller
- * @name post.controller:PostMainController
- *
- * @description
- * # main post controller
- *
- * The main post controller
- *
- */
- .controller('PostMainController', ["PostManager", fun... |
690ea735f598db2a605a012347e4b9f1b2490874 | new/src/config/.entry.js | new/src/config/.entry.js | /** DO NOT MODIFY **/
import React, { Component } from "react";
import { render } from "react-dom";
import { Root } from "gluestick-shared";
import routes from "./routes";
import store from "./.store";
// Make sure that webpack considers new dependencies introduced in the Index
// file
import "../../Index.js";
expor... | /** DO NOT MODIFY **/
import React, { Component } from "react";
import { render } from "react-dom";
import { Root } from "gluestick-shared";
import { match } from "react-router";
import routes from "./routes";
import store from "./.store";
// Make sure that webpack considers new dependencies introduced in the Index
/... | Add support for async routes | Add support for async routes
| JavaScript | mit | TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick | ---
+++
@@ -3,6 +3,7 @@
import { render } from "react-dom";
import { Root } from "gluestick-shared";
+import { match } from "react-router";
import routes from "./routes";
import store from "./.store";
@@ -29,6 +30,8 @@
}
Entry.start = function () {
- render(<Entry radiumConfig={{userAgent: window.navigat... |
52e2a715811dccdb3e6a0ab464e188f2dfc9c228 | extension/content/firebug/trace/debug.js | extension/content/firebug/trace/debug.js | /* See license.txt for terms of usage */
define([
"firebug/lib/trace"
],
function(FBTrace) {
// ********************************************************************************************* //
// Debug APIs
const Cc = Components.classes;
const Ci = Components.interfaces;
var consoleService = Cc["@mozilla.org/co... | /* See license.txt for terms of usage */
define([
"firebug/lib/trace"
],
function(FBTrace) {
// ********************************************************************************************* //
// Debug APIs
const Cc = Components.classes;
const Ci = Components.interfaces;
var consoleService = Cc["@mozilla.org/co... | Remove tracing helper it's already in StackFrame.getStackDump | [1.8] Remove tracing helper it's already in StackFrame.getStackDump
http://code.google.com/p/fbug/source/detail?r=10854
| JavaScript | bsd-3-clause | firebug/tracing-console,firebug/tracing-console | ---
+++
@@ -34,26 +34,6 @@
// ********************************************************************************************* //
-/**
- * Dump the current stack trace.
- * @param {Object} message displayed for the log.
- */
-Debug.STACK_TRACE = function(message)
-{
- var result = [];
- for (var frame = Compo... |
73deeee9d2741a156eaf3aebb9449efb9c7172c2 | src/services/contact-service.js | src/services/contact-service.js | import {HttpClient} from 'aurelia-http-client';
import {ContactModel} from 'src/models/contact-model';
var CONTACT_MANAGER_API_HOST = 'http://api-contact-manager.herokuapp.com';
var CONTACTS_URL = CONTACT_MANAGER_API_HOST + '/contacts';
var CONTACT_URL = CONTACT_MANAGER_API_HOST + '/contacts/${id}';
export class Cont... | import {HttpClient} from 'aurelia-http-client';
import {ContactModel} from 'src/models/contact-model';
var CONTACT_MANAGER_API_HOST = 'http://api-contact-manager.herokuapp.com';
var CONTACTS_URL = CONTACT_MANAGER_API_HOST + '/contacts';
var CONTACT_URL = CONTACT_MANAGER_API_HOST + '/contacts/${id}';
export class Cont... | Send requests with credentials to use session | Send requests with credentials to use session
| JavaScript | mit | dmytroyarmak/aurelia-contact-manager,dmytroyarmak/aurelia-contact-manager | ---
+++
@@ -9,6 +9,9 @@
static inject() { return [HttpClient]; }
constructor(http){
this.http = http;
+ this.http.configure((requestBuilder) => {
+ requestBuilder.withCredentials(true);
+ })
}
getAll(){ |
778095edb330788119b7bc839782934b3a8a1ac2 | gulpfile.js | gulpfile.js | 'use strict';
let gulp = require('gulp');
let server = require('gulp-express');
let paths = {
scripts: ['app.js', 'routes/**/*.js', 'public/**/*.js', 'gulpfile.js']
};
gulp.task('run', () => {
server.run(['bin/www']);
});
gulp.task('watch', () => {
gulp.watch([paths.scripts, ['run']]);
});
gulp.task('default'... | 'use strict';
let gulp = require('gulp');
let server = require('gulp-express');
let shell = require('gulp-shell');
let del = require('del');
let paths = {
scripts: ['app.js', 'routes/**/*.js', 'public/**/*.js', 'gulpfile.js']
};
gulp.task('clean', () => {
return del(['build']);
});
gulp.task('run', () => {
serve... | Add gulp electron and gulp clean | Add gulp electron and gulp clean
| JavaScript | mit | WithCampKr/annyang_node_demo,WithCampKr/annyang_node_demo | ---
+++
@@ -2,9 +2,16 @@
let gulp = require('gulp');
let server = require('gulp-express');
+let shell = require('gulp-shell');
+let del = require('del');
+
let paths = {
scripts: ['app.js', 'routes/**/*.js', 'public/**/*.js', 'gulpfile.js']
};
+
+gulp.task('clean', () => {
+ return del(['build']);
+});
gul... |
f56d7bce09119f7eebe82951107b651e47685e45 | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
tsc = require('gulp-tsc'),
tape = require('gulp-tape'),
tapSpec = require('tap-spec'),
del = require('del'),
runSequence = require('run-sequence'),
istanbul = require('gulp-istanbul');
gulp.task("test:clean", function(done) {
del(['build-test/**']).then(function(pa... | var gulp = require('gulp'),
tsc = require('gulp-tsc'),
tape = require('gulp-tape'),
tapSpec = require('tap-spec'),
del = require('del'),
runSequence = require('run-sequence'),
istanbul = require('gulp-istanbul');
gulp.task("test:clean", function(done) {
del(['build-test/**']).then(function(pa... | Use coverage summary rather than full coverage breakdown | Use coverage summary rather than full coverage breakdown
| JavaScript | mit | Jameskmonger/isaac-crypto | ---
+++
@@ -31,7 +31,9 @@
.pipe(tape({
reporter: tapSpec()
}))
- .pipe(istanbul.writeReports())
+ .pipe(istanbul.writeReports({
+ reporters: [ 'lcov', 'json', 'text-summary' ]
+ }))
.on('end', done);
});
|
21b0e4157e794d35a4868f3484966111882c70b4 | src/components/pages/PeoplePage/http.js | src/components/pages/PeoplePage/http.js | import _ from 'lodash';
import {API_PATH} from 'power-ui/conf';
import {urlToRequestObjectWithHeaders, isTruthy} from 'power-ui/utils';
// Handle all HTTP networking logic of this page
function PeoplePageHTTP(sources) {
const PEOPLE_URL = `${API_PATH}/people/`;
const atomicResponse$ = sources.HTTP
.filter(res... | import _ from 'lodash';
import {API_PATH} from 'power-ui/conf';
import {urlToRequestObjectWithHeaders, isTruthy} from 'power-ui/utils';
// Handle all HTTP networking logic of this page
function PeoplePageHTTP(sources) {
const PEOPLE_URL = `${API_PATH}/people/`;
const atomicResponse$ = sources.HTTP
.filter(res... | Add temporary selection of time range | Add temporary selection of time range
While we still don't have the time range filter
| JavaScript | apache-2.0 | petuomin/power-ui,futurice/power-ui,futurice/power-ui,petuomin/power-ui | ---
+++
@@ -15,7 +15,8 @@
const request$ = atomicResponse$
.filter(response => response.body.next)
.map(response => response.body.next.replace('limit=5', 'limit=40'))
- .startWith(PEOPLE_URL + '?limit=5')
+ // TODO get real time range from sources somehow
+ .startWith(PEOPLE_URL + '?limit=5&rang... |
5695fb2fde82b7e60c647ab60ef7d59f23ba48b3 | src/plugins/position/selectors/index.js | src/plugins/position/selectors/index.js | import { createSelector } from 'reselect';
import * as dataSelectors from '../../../selectors/dataSelectors';
export const positionSettingsSelector = state => state.get('positionSettings');
export const getRenderedDataSelector = state => state.get('renderedData');
/** Gets the number of viisble rows based on the he... | import { createSelector } from 'reselect';
import * as dataSelectors from '../../../selectors/dataSelectors';
export const positionSettingsSelector = state => state.get('positionSettings');
export const getRenderedDataSelector = state => state.get('renderedData');
/** Gets the number of viisble rows based on the he... | Add comment about how to proceed | Add comment about how to proceed
| JavaScript | mit | GriddleGriddle/Griddle,joellanciaux/Griddle,ttrentham/Griddle,joellanciaux/Griddle,GriddleGriddle/Griddle | ---
+++
@@ -17,3 +17,9 @@
return Math.ceil(height / rowHeight);
}
);
+
+// From what i can tell from the original virtual scrolling plugin...
+// 1. We want to get the visible record count
+// 2. Get the size of the dataset we're working with (whether thats local or remote)
+// 3. Figure out the renderedStar... |
5d894d920aad8d4a3cea7f40033899523d629e87 | src/services/video-catalog/get-video.js | src/services/video-catalog/get-video.js | import Promise from 'bluebird';
import { GetVideoResponse, VideoLocationType } from './protos';
import { toCassandraUuid, toProtobufTimestamp, toProtobufUuid } from '../common/protobuf-conversions';
import { NotFoundError } from '../common/grpc-errors';
import { getCassandraClient } from '../../common/cassandra';
/**
... | import Promise from 'bluebird';
import { GetVideoResponse, VideoLocationType } from './protos';
import { toCassandraUuid, toProtobufTimestamp, toProtobufUuid } from '../common/protobuf-conversions';
import { NotFoundError } from '../common/grpc-errors';
import { getCassandraClient } from '../../common/cassandra';
/**
... | Handle null tags when getting video | Handle null tags when getting video
- Grpc doesn't allow null for fields and cassandra may return null for tags
| JavaScript | apache-2.0 | KillrVideo/killrvideo-nodejs,KillrVideo/killrvideo-nodejs | ---
+++
@@ -30,7 +30,7 @@
description: row.description,
location: row.location,
locationType: row.location_type,
- tags: row.tags,
+ tags: row.tags === null ? [] : row.tags,
addedDate: toProtobufTimestamp(row.added_date)
});
}) |
bb106effe740a1c6f48408cf613257d07e154586 | test/Bugs/Bug_resetisdead.js | test/Bugs/Bug_resetisdead.js | //-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... | //-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... | Add an extra call in test script to trigger JIT | Add an extra call in test script to trigger JIT
| JavaScript | mit | mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore | ---
+++
@@ -16,5 +16,6 @@
test(1, 20, 3, -1);
test(5, 4, 2, -2);
+test(15, 3, -11, 4);
WScript.Echo("PASSED"); |
40cbe25e6da39e9261987f3e22fb4b3e00fb3d8c | test/features/router/misc.js | test/features/router/misc.js | 'use strict';
// mocha defines to avoid JSHint breakage
/* global describe, it, before, beforeEach, after, afterEach */
var assert = require('../../utils/assert.js');
var preq = require('preq');
var server = require('../../utils/server.js');
describe('router - misc', function() {
this.timeout(20000);
befo... | 'use strict';
// mocha defines to avoid JSHint breakage
/* global describe, it, before, beforeEach, after, afterEach */
var assert = require('../../utils/assert.js');
var preq = require('preq');
var server = require('../../utils/server.js');
describe('router - misc', function() {
this.timeout(20000);
bef... | Add tests for the request ID generation and retrieval | Add tests for the request ID generation and retrieval
| JavaScript | apache-2.0 | wikimedia/hyperswitch,wikimedia/mediawiki-services-restbase,cscott/restbase,milimetric/restbase,gwicke/restbase,inverno/restbase,Pchelolo/restbase,gwicke/restbase,d00rman/restbase,milimetric/restbase,cscott/restbase,eevans/restbase,wikimedia/restbase,physikerwelt/restbase,physikerwelt/restbase,wikimedia/mediawiki-servi... | ---
+++
@@ -8,10 +8,10 @@
var server = require('../../utils/server.js');
describe('router - misc', function() {
+
this.timeout(20000);
before(function () { return server.start(); });
-
it('should deny access to /{domain}/sys', function() {
return preq.get({
@@ -20,5 +20,45 @@
... |
e148ca00d64217fc7918dbdd7d5f6aaf5c6ac986 | app/server.js | app/server.js | /* eslint-disable no-console */
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const port = process.env.PORT || 3000;
const api = require('../lib/api');
app.all('/*', (req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access... | /* eslint-disable no-console */
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const port = process.env.PORT || 3000;
const api = require('../lib/api');
app.all('/*', (req, res, next) => {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access... | Update to use extra endpoints | Update to use extra endpoints
| JavaScript | mit | deseretdigital/embeddable-api | ---
+++
@@ -16,6 +16,8 @@
app.use(bodyParser.urlencoded({ extended: true }));
app.use('/api/v1', api);
+app.use('/embed/v1', api);
+app.use('/embed/api/v1', api);
app.listen(port, () => {
console.log(`Listening on port ${port}`); |
2f453b6c5b95b37218cd6d8dbb1ad9c1b5ed69ec | js/ector.js | js/ector.js | $(window).load(function () {
var Ector = require('ector');
ector = new Ector();
var previousResponseNodes = null;
var user = { username: "Guy"};
var msgtpl = $('#msgtpl').html();
var lastmsg = false;
$('#msgtpl').remove();
var message;
$('#send').on('click', function () {
va... | $(window).load(function () {
var Ector = require('ector');
ector = new Ector();
var previousResponseNodes = null;
var user = { username: "Guy"};
var msgtpl = $('#msgtpl').html();
var lastmsg = false;
$('#msgtpl').remove();
var message;
$('#send').on('click', function () {
va... | Remove the comment (line already fixed) | Remove the comment (line already fixed)
| JavaScript | mit | parmentf/browser-ector | ---
+++
@@ -17,7 +17,7 @@
h: d.getHours(),
m: d.getMinutes()
};
- $('#message').attr('value',''); // FIXME
+ $('#message').attr('value','');
$('#messages').append('<div class="message">' + Mustache.render(msgtpl, message) + '</div>');
$('#messages')... |
7ee39396d9b053e19a02eb538c757fede5a20ee2 | test/test.require-blocks-on-newline.js | test/test.require-blocks-on-newline.js | var Checker = require('../lib/checker');
var assert = require('assert');
describe('rules/require-blocks-on-newline', function() {
var checker;
beforeEach(function() {
checker = new Checker();
checker.registerDefaultRules();
});
it('should report missing newline after opening brace', fun... | var Checker = require('../lib/checker');
var assert = require('assert');
describe('rules/require-blocks-on-newline', function() {
var checker;
beforeEach(function() {
checker = new Checker();
checker.registerDefaultRules();
checker.configure({ requireBlocksOnNewline: true });
});
... | Move checker.configure(...) line to beforeeach | Move checker.configure(...) line to beforeeach
| JavaScript | mit | ValYouW/node-jscs,SimenB/node-jscs,natemara/node-jscs,pm5/node-jscs,hafeez-syed/node-jscs,ronkorving/node-jscs,allain/node-jscs,yous/node-jscs,paladox/node-jscs,romanblanco/node-jscs,lukeapage/node-jscs,markelog/node-jscs,kaicataldo/node-jscs,kadamwhite/node-jscs,yejodido/node-jscs,fishbar/node-jscs,zxqfox/node-jscs,yo... | ---
+++
@@ -6,25 +6,21 @@
beforeEach(function() {
checker = new Checker();
checker.registerDefaultRules();
+ checker.configure({ requireBlocksOnNewline: true });
});
it('should report missing newline after opening brace', function() {
- checker.configure({ requireBlocksO... |
23ee4cadc3fd6f7ffe86dcb2eddca59c8cea7920 | core/server/controllers/frontend.js | core/server/controllers/frontend.js | /**
* Main controller for Ghost frontend
*/
/*global require, module */
var Ghost = require('../../ghost'),
api = require('../api'),
ghost = new Ghost(),
frontendControllers;
frontendControllers = {
'homepage': function (req, res) {
// Parse the page number
var pageParam = req.para... | /**
* Main controller for Ghost frontend
*/
/*global require, module */
var Ghost = require('../../ghost'),
api = require('../api'),
ghost = new Ghost(),
frontendControllers;
frontendControllers = {
'homepage': function (req, res) {
// Parse the page number
var pageParam = req.para... | Fix redirect loop when no content | Fix redirect loop when no content
| JavaScript | mit | exsodus3249/Ghost,acburdine/Ghost,epicmiller/pages,virtuallyearthed/Ghost,memezilla/Ghost,veyo-care/Ghost,KnowLoading/Ghost,Brunation11/Ghost,camilodelvasto/herokughost,JonathanZWhite/Ghost,hnarayanan/narayanan.co,ghostchina/Ghost.zh,lukaszklis/Ghost,ignasbernotas/nullifer,mhhf/ghost-latex,Kaenn/Ghost,Yarov/yarov,situk... | ---
+++
@@ -21,9 +21,17 @@
}
api.posts.browse({page: pageParam}).then(function (page) {
+ var maxPage = page.pages;
+
+ // A bit of a hack for situations with no content.
+ if (maxPage === 0) {
+ maxPage = 1;
+ page.pages = 1;
+ ... |
72903d6e02d58b5e3441e302c0c7f253d2a7cc9e | test/color-finderSpec.js | test/color-finderSpec.js | /**
* Created by alex on 11/30/15.
*/
describe('ColorFinder class', function () {
it('should get default config value', function () {
expect(ColorFinder.getConfig('maxColorValue')).toBe(230);
});
it('should update config value', function () {
expect(ColorFinder.setConfig('maxColorValue'... | /**
* Created by alex on 11/30/15.
*/
describe('ColorFinder class', function () {
it('should get default config value', function () {
expect(ColorFinder.getConfig('maxColorValue')).toBe(230);
});
it('should update config value', function () {
expect(ColorFinder.setConfig('maxColorValue'... | Add one more test to init travis | Add one more test to init travis
| JavaScript | mit | gund/color-finder,gund/color-finder | ---
+++
@@ -12,4 +12,10 @@
expect(ColorFinder.setConfig('maxColorValue', 200).getConfig('maxColorValue')).toBe(200);
});
+ it('should throw error if config key unknown', function () {
+ expect(function () {
+ ColorFinder.setConfig('customConfig', 'OK?');
+ }).toThrow(new Er... |
8d5ea01c20eff5dcb344e51cfc422236c95ad789 | test/integration/ripple_transactions.js | test/integration/ripple_transactions.js | var RippleGateway = require('../../lib/http_client.js').Gateway;
var crypto = require('crypto');
var assert = require('assert');
function rand() { return crypto.randomBytes(32).toString('hex'); }
describe('RippleTransactions', function(){
describe('on behalf of a user', function(){
it.skip('should create a p... | var RippleGateway = require('../../lib/http_client.js').Gateway;
var crypto = require('crypto');
var assert = require('assert');
function rand() { return crypto.randomBytes(32).toString('hex'); }
describe('RippleTransactions', function(){
describe('on behalf of a user', function(){
before(function(done){
... | Add example test for sending payment. | [TEST] Add example test for sending payment.
| JavaScript | isc | crazyquark/gatewayd,xdv/gatewayd,zealord/gatewayd,xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,whotooktwarden/gatewayd | ---
+++
@@ -7,17 +7,42 @@
describe('on behalf of a user', function(){
- it.skip('should create a payment to a ripple account', function(){
+ before(function(done){
+ client = new RippleGateway.Client({
+ api: 'https://localhost:4000'
+ });
+ client.user = rand();
+ client.sec... |
fbfdc3d6eabd194d558717716b4397ad9f693dbc | controllers/api/posts.js | controllers/api/posts.js |
var router = require( 'express' ).Router()
var Post = require( '../../models/post' )
var websockets = require( '../../websockets' )
router.get( '/', function( req, res, next ) {
Post.find()
.sort( '-date' )
.exec( function( err, posts ) {
if ( err ) { return next( err ) }
res.json( posts )... |
var router = require( 'express' ).Router()
var Post = require( '../../models/post' )
var websockets = require( '../../websockets' )
router.get( '/', function( req, res, next ) {
Post.find()
.sort( '-date' )
.exec( function( err, posts ) {
if ( err ) { return next( err ) }
res.json( posts )... | Change post json handling on success | Change post json handling on success
| JavaScript | mit | Driftologist/texturepot,Driftologist/texturepot | ---
+++
@@ -20,7 +20,7 @@
post.save( function ( err, post ) {
if ( err ) { return next( err ) }
websockets.broadcast( 'new_post', post )
- res.json( 201, post )
+ res.status( 201).json( post )
})
})
|
289c01cbfffbafff6cf0d968e188730085015a39 | spec/baristaModelSpec.js | spec/baristaModelSpec.js | var Barista = require(process.cwd() + '/lib/barista.js'),
Backbone = require('backbone'),
ExampleApp = require(process.cwd() + '/spec/ex1/exampleApp1.js'),
context = describe;
describe('Barista.Model', function() {
var model;
beforeEach(function() {
Barista.config(ExampleApp);
});
des... | var Barista = require(process.cwd() + '/lib/barista.js'),
Backbone = require('backbone'),
ExampleApp = require(process.cwd() + '/spec/ex1/exampleApp1.js'),
context = describe;
describe('Barista.Model', function() {
var model;
beforeEach(function() {
Barista.config(ExampleApp);
});
des... | Add specs for the sync method of the model prototype | Add specs for the sync method of the model prototype
| JavaScript | mit | danascheider/barista,danascheider/barista,danascheider/barista | ---
+++
@@ -40,6 +40,12 @@
});
describe('get', function() {
-
+ beforeEach(function() {
+ model = new Barista.TaskModel({title: 'Foobar'});
+ });
+
+ it('retrieves the object\'s attribute', function() {
+ expect(model.get('title')).toBe('Foobar');
+ });
});
}); |
567d28fcdaf9215a446ddea7346cd12352090ee0 | config/test.js | config/test.js | module.exports = {
database: 'factory-girl-sequelize',
options: {
dialect: 'sqlite',
storage: 'test/tmp/test.db',
logging: null
}
};
| module.exports = {
database: 'factory-girl-sequelize',
options: {
dialect: 'sqlite',
storage: ':memory:',
logging: null
}
};
| Change to use in-memory SQLite | Change to use in-memory SQLite
| JavaScript | mit | aexmachina/factory-girl-sequelize | ---
+++
@@ -2,7 +2,7 @@
database: 'factory-girl-sequelize',
options: {
dialect: 'sqlite',
- storage: 'test/tmp/test.db',
+ storage: ':memory:',
logging: null
}
}; |
d81186e2455bcdb5dddf13953ed6a169ee951fde | tests/helpers/mock-bluetooth.js | tests/helpers/mock-bluetooth.js | /* global navigator, Promise*/
import Ember from 'ember';
const Mock = Ember.Object.extend({
available: true,
name: null,
value: null,
isAvailable(value) {
return this._setAndMock('available', value);
},
deviceName(deviceName) {
return this._setAndMock('name', deviceName);
},
characteristic... | /* global navigator, Promise*/
import Ember from 'ember';
const Mock = Ember.Object.extend({
available: true,
name: null,
value: null,
isAvailable(value) {
return this._setAndMock('available', value);
},
deviceName(deviceName) {
return this._setAndMock('name', deviceName);
},
characteristic... | Add connect function to mockBluetooth | Add connect function to mockBluetooth
| JavaScript | mit | wyeworks/ember-bluetooth,wyeworks/ember-bluetooth | ---
+++
@@ -39,24 +39,26 @@
requestDevice: function() {
return Promise.resolve({
name: deviceName,
- gatt: function() {
- return Promise.resolve({
- getPrimaryService: function() {
- return Promise.resolve({
- ... |
489ae0075ed61f524f6f716e08f7a9a25f5b5d4d | config/stage-disco.js | config/stage-disco.js | const amoCDN = 'https://addons-cdn.allizom.org';
const staticHost = 'https://addons-discovery-cdn.allizom.org';
module.exports = {
staticHost,
CSP: {
directives: {
scriptSrc: [staticHost],
styleSrc: [staticHost],
imgSrc: [
"'self'",
'data:',
amoCDN,
staticHost... | const amoCDN = 'https://addons-stage-cdn.allizom.org';
const staticHost = 'https://addons-discovery-cdn.allizom.org';
module.exports = {
staticHost,
CSP: {
directives: {
scriptSrc: [staticHost],
styleSrc: [staticHost],
imgSrc: [
"'self'",
'data:',
amoCDN,
stat... | Update amoCDN for disco stage config | Update amoCDN for disco stage config
| JavaScript | mpl-2.0 | squarewave/addons-frontend,tsl143/addons-frontend,jasonthomas/addons-frontend,aviarypl/mozilla-l10n-addons-frontend,mozilla/addons-frontend,aviarypl/mozilla-l10n-addons-frontend,squarewave/addons-frontend,tsl143/addons-frontend,tsl143/addons-frontend,muffinresearch/addons-frontend,kumar303/addons-frontend,kumar303/addo... | ---
+++
@@ -1,4 +1,4 @@
-const amoCDN = 'https://addons-cdn.allizom.org';
+const amoCDN = 'https://addons-stage-cdn.allizom.org';
const staticHost = 'https://addons-discovery-cdn.allizom.org';
module.exports = { |
8c7ee77516f4f07906be059edf20fc62d8716465 | src/server/utils/areObjectValuesDefined.js | src/server/utils/areObjectValuesDefined.js | export default function areObjectValuesDefined(obj) {
return Object.keys(obj)
.map((key) => obj[key])
.reduce((prev, value) => {
return prev && value !== undefined;
}, true);
}
| /**
* Checks if all values in a object are defined
* @param {Object} obj The object
* @return {boolean}
*/
export default function areObjectValuesDefined(obj) {
return Object.keys(obj)
.map((key) => obj[key])
.every(isDefined);
}
function isDefined(value) {
return value !== undefined;
}
| Use every() instead of reduce() | Use every() instead of reduce()
| JavaScript | mit | danistefanovic/hooka | ---
+++
@@ -1,7 +1,14 @@
+/**
+ * Checks if all values in a object are defined
+ * @param {Object} obj The object
+ * @return {boolean}
+ */
export default function areObjectValuesDefined(obj) {
return Object.keys(obj)
.map((key) => obj[key])
- .reduce((prev, value) => {
- return prev... |
693eb566a96d9d634b31d78a50305ef2efcfc724 | src/private/emscripten_api/emscripten_precache_api.js | src/private/emscripten_api/emscripten_precache_api.js |
function EmscriptenPrecacheApi(apiPointer, cwrap, runtime) {
var _apiPointer = apiPointer;
var _beginPrecacheOperation = null;
var _cancelPrecacheOperation = null;
var _cancelCallback = null;
var _completeCallback = null;
this.registerCallbacks = function(completeCallback, cancelCallback) {
... |
function EmscriptenPrecacheApi(apiPointer, cwrap, runtime) {
var _apiPointer = apiPointer;
var _beginPrecacheOperation = null;
var _cancelPrecacheOperation = null;
var _cancelCallback = null;
var _completeCallback = null;
this.registerCallbacks = function(completeCallback, cancelCallback) {
... | Test that a broken function binding is detected when testing interop, and halts deployment. | Test that a broken function binding is detected when testing interop, and halts deployment.
| JavaScript | bsd-2-clause | eegeo/eegeo.js,eegeo/eegeo.js | ---
+++
@@ -26,7 +26,7 @@
};
this.cancelPrecacheOperation = function(operationId) {
- _cancelPrecacheOperation = _cancelPrecacheOperation || cwrap("cancelPrecacheOperation", null, ["number", "number"]);
+ _cancelPrecacheOperation = _cancelPrecacheOperation || cwrap("cancelPrecacheOperation__... |
440977ecd2079e617f79793d88929127b1d9b23b | src-js/alltests.js | src-js/alltests.js | /*
* Copyright 2011 Johannes M. Schmitt <schmittjoh@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | /*
* Copyright 2011 Johannes M. Schmitt <schmittjoh@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | Remove references to filter tests | Remove references to filter tests
| JavaScript | apache-2.0 | br0wn/twig.js,basekit/twig.js,br0wn/twig.js,br0wn/twig.js,basekit/twig.js,schmittjoh/twig.js,basekit/twig.js,schmittjoh/twig.js,schmittjoh/twig.js | ---
+++
@@ -17,7 +17,6 @@
var _allTests = [
"twig_test.html",
"twig/environment_test.html",
- "twig/filter_test.html",
"twig/markup_test.html",
"templates/template_tests.html"
]; |
dac5dc426d678cfe7be6b9ca1a2d6c118949f77d | lib/middleware/legacy-account-upgrade.js | lib/middleware/legacy-account-upgrade.js | "use strict";
var format = require('util').format;
var config = require('config');
function upgradeLegacyAccount(req, res, next) {
if (!req.session.legacyInstanceId) {
return next();
}
// User is trying to upgrade their account
var instanceId = req.session.legacyInstanceId;
delete req.session.legacyInst... | "use strict";
var format = require('util').format;
var config = require('config');
function upgradeLegacyAccount(req, res, next) {
if (!req.session.legacyInstanceId) {
return next();
}
// User is trying to upgrade their account
var instanceId = req.session.legacyInstanceId;
delete req.session.legacyInst... | Fix legacy upgrade with missing instance | Fix legacy upgrade with missing instance
If the user is trying to upgrade their account and for some reason the
instance has been deleted in the meantime then we simply redirect to the
main listing of instances.
| JavaScript | agpl-3.0 | Sinar/popit,openstate/popit,Sinar/popit,Sinar/popit,mysociety/popit,mysociety/popit,Sinar/popit,openstate/popit,mysociety/popit,mysociety/popit,openstate/popit,mysociety/popit,openstate/popit | ---
+++
@@ -25,6 +25,9 @@
if (err) {
return next(err);
}
+ if (!instance) {
+ return res.redirect('/instances');
+ }
// Redirect to the instance the user was trying to log into
res.redirect(format(config.instance_server.base_url_format, instance.slug));
}); |
87e05a837d74c7a6c1cd566711d005b45089016b | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var jshint = require('gulp-jshint');
var jasmine = require('gulp-jasmine');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
gulp.task('lint', function () {
gulp.src('./*.js')
.pipe(jshint('jshintrc.json'))
.pipe(jshint.reporter('jshint-stylish')... | var gulp = require('gulp');
var jshint = require('gulp-jshint');
var jasmine = require('gulp-jasmine');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
gulp.task('lint', function () {
return gulp.src('./*.js')
.pipe(jshint('jshintrc.json'))
.pipe(jshint.reporter('jshint-st... | Return the stream for each task | Return the stream for each task
| JavaScript | mit | rbonvall/lambada | ---
+++
@@ -5,18 +5,18 @@
var rename = require('gulp-rename');
gulp.task('lint', function () {
- gulp.src('./*.js')
+ return gulp.src('./*.js')
.pipe(jshint('jshintrc.json'))
.pipe(jshint.reporter('jshint-stylish'));
});
gulp.task('test', function () {
- gulp.src('test.js')
+ ret... |
e59cd3ab355207093b86084c32fdcf29e7054cbc | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
eslint = require('gulp-eslint'),
mocha = require('gulp-mocha'),
flow = require('gulp-flowtype'),
babel = require('babel/register');
gulp.task('lint', function() {
return gulp.src(['src/*.js', 'src/__tests__/*.js'])
.pipe(eslint())
.pipe(eslint.format())
... | var gulp = require('gulp'),
eslint = require('gulp-eslint'),
mocha = require('gulp-mocha'),
flow = require('gulp-flowtype'),
babel = require('babel/register');
gulp.task('lint', function() {
return gulp.src(['src/*.js', 'src/__tests__/*.js'])
.pipe(eslint())
.pipe(eslint.format())
... | Add window and document to globals for tests | Add window and document to globals for tests
| JavaScript | mit | ameyms/switchboard | ---
+++
@@ -27,6 +27,15 @@
global.expect = require('chai').expect;
global.sinon = require('sinon');
+ global.document = {
+ location: {
+ pathname: ''
+ }
+ };
+
+ global.window = {
+ addEventListener() {}
+ };
return gulp.src(['src/__tests__/{,*/}*-test.... |
d41a53734f7577d1f64af7eceae523599a662669 | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
ghPages = require('gulp-gh-pages'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src(docsSrcDir)
.pipe(
jsdoc(docsDestDir,
{
path: './node_modul... | var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
ghPages = require('gulp-gh-pages'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src([docsSrcDir, './README.md'])
.pipe(
jsdoc(docsDestDir,
{
pa... | Use the Dough README on docs landing page | Use the Dough README on docs landing page
| JavaScript | mit | moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough | ---
+++
@@ -6,7 +6,7 @@
jsDocTask;
jsDocTask = function() {
- return gulp.src(docsSrcDir)
+ return gulp.src([docsSrcDir, './README.md'])
.pipe(
jsdoc(docsDestDir,
{ |
af6d16e6b6732b17365bae023b6990a15b4ec049 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var files = ['index.js', 'test/*.js', 'gulpfile.js'];
gulp.task('lint', function (done) {
var eslint = require('gulp-eslint');
return gulp.src(files)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError()).on('error', done);
});
gulp.task('test', function (do... | var gulp = require('gulp');
var files = ['index.js', 'lib/*.js', 'test/*.js', 'gulpfile.js'];
gulp.task('lint', function (done) {
var eslint = require('gulp-eslint');
return gulp.src(files)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError()).on('error', done);
});
gulp.task('test', ... | Split code into lib subfolder | Split code into lib subfolder
| JavaScript | mit | cbas/postcss-imperial | ---
+++
@@ -1,6 +1,6 @@
var gulp = require('gulp');
-var files = ['index.js', 'test/*.js', 'gulpfile.js'];
+var files = ['index.js', 'lib/*.js', 'test/*.js', 'gulpfile.js'];
gulp.task('lint', function (done) {
var eslint = require('gulp-eslint'); |
de0a700dabe20f24a9939c642977fda8a43353cc | gulpfile.js | gulpfile.js | var gulp= require('gulp')
var dts = require('dts-generator');
gulp.task('default', function(){
dts .generate({
name: 'uservice',
baseDir: './module',
excludes: ['./typings/node/node.d.ts', './typings/typescript/lib.es6.d.ts'],
files: [ './index.ts' ],
out: './uservice.d.ts'
});
})
| var gulp= require('gulp')
var dts = require('dts-generator');
gulp.task('default', function(){
dts .generate({
name: 'uservices',
baseDir: './module',
excludes: ['./typings/node/node.d.ts', './typings/typescript/lib.es6.d.ts'],
files: [ './index.ts' ],
out: './uservices.d.ts'
});
})
| Fix name to consistent uservices | Fix name to consistent uservices
| JavaScript | mit | christyharagan/uservices,christyharagan/uservices | ---
+++
@@ -3,10 +3,10 @@
gulp.task('default', function(){
dts .generate({
- name: 'uservice',
+ name: 'uservices',
baseDir: './module',
excludes: ['./typings/node/node.d.ts', './typings/typescript/lib.es6.d.ts'],
files: [ './index.ts' ],
- out: './uservice.d.ts'
+ out: './uservices.... |
2440066e35307d9f4b7d25b715150638c703166a | lib/validate/validate_layout_property.js | lib/validate/validate_layout_property.js | 'use strict';
var validate = require('./validate');
var ValidationError = require('../error/validation_error');
module.exports = function validateLayoutProperty(options) {
var key = options.key;
var style = options.style;
var styleSpec = options.styleSpec;
var value = options.value;
var propertyKe... | 'use strict';
var validate = require('./validate');
var ValidationError = require('../error/validation_error');
module.exports = function validateLayoutProperty(options) {
var key = options.key;
var style = options.style;
var styleSpec = options.styleSpec;
var value = options.value;
var propertyKe... | Fix exception caused by calling validateLayoutProperty without passing a style | Fix exception caused by calling validateLayoutProperty without passing a style
| JavaScript | isc | pka/mapbox-gl-style-spec,pka/mapbox-gl-style-spec | ---
+++
@@ -15,9 +15,9 @@
var errors = [];
if (options.layerType === 'symbol') {
- if (propertyKey === 'icon-image' && !style.sprite) {
+ if (propertyKey === 'icon-image' && style && !style.sprite) {
errors.push(new ValidationError(key, value, 'use of "icon-i... |
26b699534b64370c22cb6fbb99b0a9146111854d | ember-cli-build.js | ember-cli-build.js | /* eslint-env node */
'use strict'
const EmberApp = require('ember-cli/lib/broccoli/ember-app')
const cssnext = require('postcss-cssnext')
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
postcssOptions: {
compile: {
enabled: false
},
filter: {
enabled: ... | /* eslint-env node */
'use strict'
const EmberApp = require('ember-cli/lib/broccoli/ember-app')
const cssnext = require('postcss-cssnext')
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
postcssOptions: {
compile: {
enabled: false
},
filter: {
enabled: ... | Disable inline sourcemaps in postcss | Disable inline sourcemaps in postcss
| JavaScript | mit | opensource-challenge/opensource-challenge-client,opensource-challenge/opensource-challenge-client | ---
+++
@@ -12,6 +12,7 @@
},
filter: {
enabled: true,
+ map: { inline: false },
plugins: [
{
module: cssnext, |
819a6bf697b4c7c7c7b523be58be832a697a9b45 | lib/tasks/nodejs/NodeWatchBuildTask.js | lib/tasks/nodejs/NodeWatchBuildTask.js | "use strict";
const Task = require('../Task'),
gulp = require('gulp'),
path = require('path'),
nodemon = require('gulp-nodemon'),
ProjectType = require('../../ProjectType'),
_ = require('lodash');
class NodeWatchBuildTask extends Task {
constructor(buildManager, taskRunner) {
super(bu... | "use strict";
const Task = require('../Task'),
gulp = require('gulp'),
path = require('path'),
ProjectType = require('../../ProjectType'),
_ = require('lodash');
class NodeWatchBuildTask extends Task {
constructor(buildManager, taskRunner) {
super(buildManager, taskRunner);
this.c... | Fix double ctr+c when exiting watch-build | Fix double ctr+c when exiting watch-build
| JavaScript | mit | mtfranchetto/smild,mtfranchetto/smild,mtfranchetto/smild | ---
+++
@@ -3,7 +3,6 @@
const Task = require('../Task'),
gulp = require('gulp'),
path = require('path'),
- nodemon = require('gulp-nodemon'),
ProjectType = require('../../ProjectType'),
_ = require('lodash');
@@ -16,7 +15,7 @@
}
action() {
- return nodemon(_.merge({
+ ... |
0e8a21eea09024ba9fbfca0ac2efebc87253d46f | demo/assets/js/script.js | demo/assets/js/script.js | /*jslint devel: true, browser: true, indent: 2, nomen: true */
/*global define */
define([], function () {
'use strict';
console.log('it works');
}); | /*jslint devel: true, browser: true, indent: 2, nomen: true */
/*global define */
define([], function () {
'use strict';
// console.log('it works');
}); | Comment out annoying debug code. | Comment out annoying debug code.
| JavaScript | mit | brianmcallister/m | ---
+++
@@ -4,5 +4,5 @@
define([], function () {
'use strict';
- console.log('it works');
+ // console.log('it works');
}); |
ddaed5d7e81798b4ed4e5db2872469e4468db1b8 | server/common/set_language.js | server/common/set_language.js | // Store the preference locale in cookies and (if available) session to use
// on next requests.
'use strict';
var _ = require('lodash');
var LOCALE_COOKIE_MAX_AGE = 0xFFFFFFFF; // Maximum 32-bit unsigned integer.
module.exports = function (N, apiPath) {
N.validate(apiPath, {
locale: { type: 'string' }
... | // Store the preference locale in cookies and (if available) session to use
// on next requests.
'use strict';
var _ = require('lodash');
var LOCALE_COOKIE_MAX_AGE = 0xFFFFFFFF; // Maximum 32-bit unsigned integer.
module.exports = function (N, apiPath) {
N.validate(apiPath, {
locale: { type: 'string' }
... | Update user locale without fetching user's account. | Update user locale without fetching user's account.
| JavaScript | mit | nodeca/nodeca.users | ---
+++
@@ -34,7 +34,7 @@
}
if (env.session && env.session.user_id) {
- N.models.users.User.findByIdAndUpdate(env.session.user_id, { locale: locale }, callback);
+ N.models.users.User.update({ _id: env.session.user_id }, { locale: locale }, callback);
} else {
callback();
} |
d2d6fbddfbdfe74671f4813d7f3b80582ee11928 | gulpfile.js | gulpfile.js | var name = require('./package.json').moduleName,
fs = require('fs'),
gulp = require('gulp'),
plugins = require('gulp-load-plugins')()
var head = fs.readFileSync('./node_modules/@electerious/modulizer/head.js', { encoding: 'utf8' }),
foot = fs.readFileSync('./node_modules/@electerious/moduliz... | var name = require('./package.json').moduleName,
fs = require('fs'),
gulp = require('gulp'),
plugins = require('gulp-load-plugins')()
var head = fs.readFileSync('./node_modules/@electerious/modulizer/head.js', { encoding: 'utf8' }),
foot = fs.readFileSync('./node_modules/@electerious/moduliz... | Include sub-folders when watching for changes | Include sub-folders when watching for changes
| JavaScript | mit | electerious/scrollSnap,electerious/scrollSnap | ---
+++
@@ -30,6 +30,6 @@
gulp.task('watch', ['scripts'], function() {
- gulp.watch('./src/scripts/*.js', ['scripts'])
+ gulp.watch('./src/scripts/**/*.js', ['scripts'])
}) |
2c6bfb27c4b7122ac76db7bd5a1edc1939567fb7 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var mocha = require('gulp-mocha');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
require('coffee-script/register');
gulp.task('test', function(){
return gulp.src('./test/**/*.coffee')
.pipe(mocha());
});
gulp.task('bundle', function(done) {
gu... | var gulp = require('gulp');
var mocha = require('gulp-mocha');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
require('coffee-script/register');
gulp.task('test', ['bundle'], function(){
return gulp.src('./test/**/*.coffee')
.pipe(mocha());
});
gulp.task('bundle', function(... | Set 'bundle' as a dependency to 'test' | Set 'bundle' as a dependency to 'test'
Set 'bundle' as a dependency to 'test' | JavaScript | mit | casesandberg/react-map-styles | ---
+++
@@ -6,16 +6,15 @@
-gulp.task('test', function(){
+gulp.task('test', ['bundle'], function(){
return gulp.src('./test/**/*.coffee')
.pipe(mocha());
});
-gulp.task('bundle', function(done) {
- gulp.src('./src/**/*.coffee')
+gulp.task('bundle', function() {
+ return gulp.src('./src/**/... |
1ff930c6b1662558ad6f9ec5a400327f552e42b1 | lib/main.js | lib/main.js | const async = require('./async')
module.exports = function(providers, cb) {
function setup(values) {
const currentValues = results.reduce(( pre, cur ) => Object.assign(pre, cur), {})
cb(null,
{
get: key => currentValues[key],
getDynamic: key => () => currentValues[key],
all: c... | const async = require('./async')
module.exports = function(providers, cb) {
function setup(values) {
const currentValues = results.reduce(( pre, cur ) => Object.assign(pre, cur), {})
cb(null,
{
get: key => currentValues[key],
getDynamic: key => () => currentValues[key],
all: c... | Simplify passing read to merge call | Simplify passing read to merge call
| JavaScript | apache-2.0 | reneweb/dvar,reneweb/dvar | ---
+++
@@ -14,7 +14,7 @@
)
}
- async.merge(providers.map(provider => (cb) => provider.read(cb)), results => {
+ async.merge(providers.map(provider => provider.read), results => {
const errors = result.filter(r => r.err !== undefined)
if(errors.length > 0) { |
ddb525f99c03dd70c41325eca6e00ddfd454fcdd | middleware/get_macaroon_user_secret.js | middleware/get_macaroon_user_secret.js | var MacaroonAuthUtils = require("../utils/macaroon_auth.js");
module.exports = function(options) {
return function getMacaroonUserSecret(req, res, next) {
if(typeof options.collection !== "undefined" && options.collection !== ""){
var userId = "";
if(req.method == "GET" || req... | var mAuthMint = require("mauth").mAuthMint;
module.exports = function(options) {
return function getMacaroonUserSecret(req, res, next) {
if(typeof options.collection !== "undefined" && options.collection !== ""){
var userId = "";
if(req.method == "GET" || req.method == "DELETE"){
... | Fix require to use new mauth package | Fix require to use new mauth package
| JavaScript | bsd-3-clause | Saganus/macaroons-express-demo,Saganus/macaroons-express-demo | ---
+++
@@ -1,4 +1,4 @@
-var MacaroonAuthUtils = require("../utils/macaroon_auth.js");
+var mAuthMint = require("mauth").mAuthMint;
module.exports = function(options) {
return function getMacaroonUserSecret(req, res, next) {
@@ -17,7 +17,7 @@
.then(function(user){
... |
fc9513427abdd10d65fc2381c4a4945bbc32c9af | webpack/shared.config.js | webpack/shared.config.js | const CleanWebpackPlugin = require("clean-webpack-plugin")
const path = require("path")
const webpack = require("webpack")
const dist = path.join(process.cwd(), "public")
const src = path.join(process.cwd(), "src")
//module.exports = { dist, src }
module.exports = {
entry: [path.join(src, "index.js")],
module: {
... | const CleanWebpackPlugin = require("clean-webpack-plugin")
const path = require("path")
const webpack = require("webpack")
const dist = path.join(process.cwd(), "public")
const src = path.join(process.cwd(), "src")
//module.exports = { dist, src }
module.exports = {
entry: [path.join(src, "index.js")],
module: {
... | Change project root variable in clean plugin | Change project root variable in clean plugin
| JavaScript | mit | DevNebulae/ads-pt-api | ---
+++
@@ -35,8 +35,10 @@
},
output: { path: dist, filename: "server.js" },
plugins: [
- new CleanWebpackPlugin(dist),
- new webpack.IgnorePlugin(/vertx/),
+ new CleanWebpackPlugin(dist, {
+ root: process.cwd()
+ }),
+ new webpack.IgnorePlugin(/vertx/),
new webpack.NamedModulesPlugin(),... |
fefcc30a9cf75496f118c5cfaf09760297f319c7 | lib/pint.js | lib/pint.js | "use strict"
var _ = require('underscore'),
fs = require('fs'),
sys = require('sys'),
exec = require('child_process').exec,
program = require('commander');
var path = require('path'),
fs = require('fs'),
lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
// CLI
program.version('0.0.1')... | "use strict"
var _ = require('underscore'),
fs = require('fs'),
sys = require('sys'),
exec = require('child_process').exec,
program = require('commander'),
path = require('path');
var pintPath = path.join(__dirname, '..'),
targetPath = process.cwd()
// CLI
program.version('0.0.1')
.parse(process.argv);... | Change files to be Pintfiles so as not to conflict with Grunt | Change files to be Pintfiles so as not to conflict with Grunt
| JavaScript | mit | baer/pint | ---
+++
@@ -4,11 +4,11 @@
fs = require('fs'),
sys = require('sys'),
exec = require('child_process').exec,
- program = require('commander');
+ program = require('commander'),
+ path = require('path');
-var path = require('path'),
- fs = require('fs'),
- lib = path.join(path.dirname(fs.realpathSync(__fi... |
c4c331cbce72af7d298b8f221648bc2bd8a5c6e8 | wave/war/swellrt-beta.js | wave/war/swellrt-beta.js |
// SwellRT bootstrap script
// A fake SwellRT object to register on ready handlers
// before the GWT module is loaded
window.swellrt = {
onReady: function(handler) {
if (!handler || typeof handler !== "function")
return;
if (!window._lh)
window._lh = [];
wind... |
// SwellRT bootstrap script
// A fake SwellRT object to register on ready handlers
// before the GWT module is loaded
window.swellrt = {
onReady: function(handler) {
if (!handler || typeof handler !== "function")
return;
if (window.swellrt.runtime) {
handler.apply(window, window.s... | Fix code launching onReady() handlers | Fix code launching onReady() handlers | JavaScript | apache-2.0 | P2Pvalue/swellrt,P2Pvalue/swellrt,P2Pvalue/swellrt,Grasia/swellrt,P2Pvalue/swellrt,Grasia/swellrt,Grasia/swellrt,Grasia/swellrt | ---
+++
@@ -3,18 +3,20 @@
// A fake SwellRT object to register on ready handlers
// before the GWT module is loaded
-
window.swellrt = {
onReady: function(handler) {
if (!handler || typeof handler !== "function")
return;
-
- if (!window._lh)
- window._lh = [];
- ... |
1cba85bfc369fea8168ef3f7bed0d1747c131e8f | generator/index.js | generator/index.js |
var path = require('path');
var util = require('util');
var yeoman = require('yeoman-generator');
module.exports = TestGenerator;
// TestGenerator stubs out a very basic test suite during the generation
// process of a new generator.
//
// XXX:
// - consider adding _.string API to generators prototype
function... |
var path = require('path');
var util = require('util');
var yeoman = require('yeoman-generator');
module.exports = TestGenerator;
// TestGenerator stubs out a very basic test suite during the generation
// process of a new generator.
//
// XXX:
// - consider adding _.string API to generators prototype
function... | Update dasherized name to use this._ | Update dasherized name to use this._
| JavaScript | bsd-2-clause | yeoman/generator-mocha,yeoman/generator-mocha | ---
+++
@@ -15,7 +15,7 @@
yeoman.generators.NamedBase.apply(this, arguments);
// dasherize the thing
- this.filename = this.dasherize(this.name).replace(/:/, '-');
+ this.filename = this._.dasherize(this.name).replace(/:/, '-');
this.argument('files', {
type: Array, |
60bcaf4ec4f4ecf4f0add2d2823eaa8dbcfdb738 | lib/plugins/ticker/coinbase/coinbase.js | lib/plugins/ticker/coinbase/coinbase.js | const _ = require('lodash/fp')
const axios = require('axios')
const BN = require('../../../bn')
function getBuyPrice (obj) {
const currencyPair = obj.currencyPair
return axios({
method: 'get',
url: `https://api.coinbase.com/v2/prices/${currencyPair}/buy`,
headers: {'CB-Version': '2017-07-10'}
})
... | const _ = require('lodash/fp')
const axios = require('axios')
const BN = require('../../../bn')
function getBuyPrice (obj) {
const currencyPair = obj.currencyPair
return axios({
method: 'get',
url: `https://api.coinbase.com/v2/prices/${currencyPair}/buy`,
headers: {'CB-Version': '2017-07-10'}
})
... | Add DASH to Coinbase ticker | Add DASH to Coinbase ticker | JavaScript | unlicense | lamassu/lamassu-server,naconner/lamassu-server,naconner/lamassu-server,naconner/lamassu-server,lamassu/lamassu-server,lamassu/lamassu-server | ---
+++
@@ -28,7 +28,7 @@
function ticker (account, fiatCode, cryptoCode) {
return Promise.resolve()
.then(() => {
- if (!_.includes(cryptoCode, ['BTC', 'ETH', 'LTC', 'BCH', 'ZEC'])) {
+ if (!_.includes(cryptoCode, ['BTC', 'ETH', 'LTC', 'BCH', 'ZEC', 'DASH'])) {
throw new Error('Unsupporte... |
722a07de86d32807dd0968ff0cf0b7bb93f88d97 | spec/api-deprecations-spec.js | spec/api-deprecations-spec.js | const assert = require('assert')
const deprecations = require('electron').deprecations
describe('deprecations', function () {
beforeEach(function () {
deprecations.setHandler(null)
process.throwDeprecation = true
})
it('allows a deprecation handler function to be specified', function () {
var messag... | const assert = require('assert')
const deprecations = require('electron').deprecations
describe('deprecations', function () {
beforeEach(function () {
deprecations.setHandler(null)
process.throwDeprecation = true
})
it('allows a deprecation handler function to be specified', function () {
var messag... | Add explicit call to deprecate.log | Add explicit call to deprecate.log
| JavaScript | mit | electron/electron,aichingm/electron,tonyganch/electron,jhen0409/electron,the-ress/electron,brave/electron,tonyganch/electron,Gerhut/electron,leethomas/electron,dongjoon-hyun/electron,Gerhut/electron,thompsonemerson/electron,Gerhut/electron,miniak/electron,noikiy/electron,leethomas/electron,shiftkey/electron,dongjoon-hy... | ---
+++
@@ -14,9 +14,9 @@
messages.push(message)
})
- require('electron').webFrame.registerUrlSchemeAsSecure('some-scheme')
+ require('electron').deprecate.log('this is deprecated')
- assert.deepEqual(messages, ['registerUrlSchemeAsSecure is deprecated. Use registerURLSchemeAsSecure instead.'... |
76e5c44b4bfa07dceb8e5c2b24583334542ecd7c | services/user-service.js | services/user-service.js | var cote = require('cote'),
models = require('../models');
var userResponder = new cote.Responder({
name: 'user responder',
namespace: 'user',
respondsTo: ['create']
});
var userPublisher = new cote.Publisher({
name: 'user publisher',
namespace: 'user',
broadcasts: ['update']
});
userResp... | var cote = require('cote'),
models = require('../models');
var userResponder = new cote.Responder({
name: 'user responder',
namespace: 'user',
respondsTo: ['create']
});
var userPublisher = new cote.Publisher({
name: 'user publisher',
namespace: 'user',
broadcasts: ['update']
});
userResp... | Add get API to user service | Add get API to user service
| JavaScript | mit | dashersw/cote-workshop,dashersw/cote-workshop | ---
+++
@@ -26,6 +26,10 @@
models.User.find(query, cb);
});
+userResponder.on('get', function(req, cb) {
+ models.User.get(req.id, cb);
+});
+
function updateUsers() {
models.User.find(function(err, users) {
userPublisher.publish('update', users); |
a7d9fd9a03d96a517cdad5a4126c3b8f9db4b7b9 | .storybook/utils/index.js | .storybook/utils/index.js | export const INTRODUCTION = '1. Introduction';
export const PRIMITIVES = '2. Primitives';
export const FOUNDATION = '3. Foundation';
export const LOW_LEVEL_BLOCKS = '4. Low level blocks';
export const MID_LEVEL_BLOCKS = '5. Mid level blocks';
export const COMPOSITIONS = '6. Compositions';
export const PLAYGROUND = '7. ... | export const INTRODUCTION = '1. Introduction';
export const PRIMITIVES = '2. Primitives';
export const FOUNDATION = '3. Foundation';
export const LOW_LEVEL_BLOCKS = '4. Low level blocks';
export const MID_LEVEL_BLOCKS = '5. Mid level blocks';
export const COMPOSITIONS = '6. Compositions';
export const PLAYGROUND = '7. ... | Add function to compose the story title based on group name | Add function to compose the story title based on group name
| JavaScript | mit | teamleadercrm/teamleader-ui | ---
+++
@@ -5,3 +5,5 @@
export const MID_LEVEL_BLOCKS = '5. Mid level blocks';
export const COMPOSITIONS = '6. Compositions';
export const PLAYGROUND = '7. Playground';
+
+export const addStoryInGroup = (groupTitle, storyTitle) => `${groupTitle} / ${storyTitle}`; |
3838fc789467d5488623d79d986791c79a31134f | app/routes.js | app/routes.js | import React from 'react'
import { Router, Route, browserHistory } from 'react-router'
// views.
import Layout from './views/Layout'
import Home from './views/Home'
import About from './views/About'
const Routes = () => {
return (
<Router history={browserHistory}>
<Route component={Layout}>
<Route... | import React from 'react'
import { Router, Route, browserHistory } from 'react-router'
import Layout from './views/Layout'
import Home from './views/Home'
import About from './views/About'
const Routes = () => {
return (
<Router history={browserHistory}>
<Route component={Layout}>
<Route name='ho... | Remove the unnecessary comment from the store.js file. | Remove the unnecessary comment from the store.js file.
| JavaScript | mit | rhberro/the-react-client,rhberro/the-react-client | ---
+++
@@ -1,8 +1,8 @@
import React from 'react'
import { Router, Route, browserHistory } from 'react-router'
-// views.
import Layout from './views/Layout'
+
import Home from './views/Home'
import About from './views/About'
|
31f3e1b1fee376bde552365d92ec51211d1718ae | webpack.common.config.js | webpack.common.config.js | const {resolve} = require('path');
const webpack =require('webpack');
module.exports = {
entry: [
'./index.tsx'
],
output:{
filename: 'bundle.js',
path: resolve(__dirname, 'static'),
publicPath: ''
},
resolve:{
extensions: ['js', '.jsx', '.ts', '.tsx', '.css'... | const {resolve} = require('path');
const webpack =require('webpack');
module.exports = {
entry: [
'./index.tsx'
],
output:{
filename: 'bundle.js',
path: resolve(__dirname, 'static'),
publicPath: ''
},
resolve:{
extensions: ['.js', '.jsx', '.ts', '.tsx', '.css... | Fix typo for js file. | Fix typo for js file. | JavaScript | mit | bernalrs/react-typescript-webpack2,bernalrs/react-typescript-webpack2,bernalrs/react-typescript-webpack2 | ---
+++
@@ -11,7 +11,7 @@
publicPath: ''
},
resolve:{
- extensions: ['js', '.jsx', '.ts', '.tsx', '.css']
+ extensions: ['.js', '.jsx', '.ts', '.tsx', '.css']
},
context: resolve(__dirname, 'src'),
devtool: 'inline-source-map',
@@ -31,4 +31,4 @@
]
},
... |
88b940117ccc0ce7e88ed03f4e642f70b9835ee6 | gpm-dlv/js/main.js | gpm-dlv/js/main.js | (function() {
var element = null;
var nav_elements = document.querySelectorAll('li.nav-item-container');
for (var i = 0; i < nav_elements.length; i++) {
var current = nav_elements[i];
if (current.innerHTML == 'My Library') {
element = current;
break;
}
}
... | (function() {
var element = null;
var nav_elements = document.querySelectorAll('.nav-item-container');
for (var i = 0; i < nav_elements.length; i++) {
var current = nav_elements[i];
if (current.innerHTML == 'My Library') {
element = current;
break;
}
}
... | Fix selector after Google change | Fix selector after Google change | JavaScript | mit | bluekeyes/gpm-dlv,bluekeyes/gpm-dlv | ---
+++
@@ -1,6 +1,6 @@
(function() {
var element = null;
- var nav_elements = document.querySelectorAll('li.nav-item-container');
+ var nav_elements = document.querySelectorAll('.nav-item-container');
for (var i = 0; i < nav_elements.length; i++) {
var current = nav_elements[i]; |
a3f9c48c28f7d4ab46667b97f4c55123021c1c7d | bin/cliapp.js | bin/cliapp.js | #! /usr/bin/env node
var yargs = require("yargs");
console.log(yargs.parse(process.argv.slice(2)));
//var argv = require("yargs").argv;
//process.argv.slice(2).forEach(function (val, index, array) {
// console.log(index + ': ' + val);
//});
// function readStdIn(callback) {
// var called = false, data = "", fin... | #! /usr/bin/env node
var App = require("../lib/app").App;
var app = new App();
app.run();
| Clean up CLI entry point script. | Clean up CLI entry point script.
| JavaScript | mit | pjdietz/rester-client,pjdietz/rester-client | ---
+++
@@ -1,39 +1,6 @@
#! /usr/bin/env node
-var yargs = require("yargs");
-console.log(yargs.parse(process.argv.slice(2)));
+var App = require("../lib/app").App;
-//var argv = require("yargs").argv;
-//process.argv.slice(2).forEach(function (val, index, array) {
-// console.log(index + ': ' + val);
-//});
-
... |
9553367d007ad813bf42051af94bc671619fc308 | boot/redis.js | boot/redis.js | var URL = require('url')
, redis = require('redis');
module.exports = function (config) {
var client, url, port, host, db, pass;
if (config = config || {}) {
try {
url = URL.parse(config && config.url || process.env.REDIS_PORT || 'redis://localhost:6379');
port = url.port;
host ... | var URL = require('url')
, redis = require('redis');
module.exports = function (config) {
var client, url, port, host, db, auth, options;
if (config = config || {}) {
try {
url = URL.parse(config && config.url || process.env.REDIS_PORT || 'redis://localhost:6379');
port = url.port;
... | Define variables that are used but not defined | fix(boot): Define variables that are used but not defined
| JavaScript | mit | henrjk/connect,anvilresearch/connect,tonyevans/connect,henrjk/connect,tonyevans/connect,anvilresearch/connect,EternalDeiwos/connect,henrjk/connect,tonyevans/connect,jawaid/connect,EternalDeiwos/connect,EternalDeiwos/connect,anvilresearch/connect,jawaid/connect,msamblanet/connect,msamblanet/connect | ---
+++
@@ -2,7 +2,7 @@
, redis = require('redis');
module.exports = function (config) {
- var client, url, port, host, db, pass;
+ var client, url, port, host, db, auth, options;
if (config = config || {}) {
try {
@@ -15,7 +15,7 @@
options = {
no_ready_check: true
- }
+ ... |
33d56f057c974d466102b8bd05a7b0a99cbb0c5e | app/scripts/app/controllers/item/edit.js | app/scripts/app/controllers/item/edit.js | var ItemEditController = Em.ObjectController.extend({
setComplete: function () {
var complete = this.get('canonicalModel.complete');
this.set('model.complete', complete);
}.observes('canonicalModel.complete'),
actions: {
cancel: function () {
this.get('model').destroy();
this.transitionTo... | var ItemEditController = Em.ObjectController.extend({
setComplete: function () {
var model = this.get('model'),
complete;
// this observer fires even when this controller is not part of the active route.
// this is because route controllers are singletons and persist.
// since changing routes... | Fix ItemEditController observer accessing model when model was destroyed | Fix ItemEditController observer accessing model when model was destroyed
| JavaScript | mit | darvelo/wishlist,darvelo/wishlist | ---
+++
@@ -1,7 +1,18 @@
var ItemEditController = Em.ObjectController.extend({
setComplete: function () {
- var complete = this.get('canonicalModel.complete');
- this.set('model.complete', complete);
+ var model = this.get('model'),
+ complete;
+
+ // this observer fires even when this controll... |
9b7f8f849643c6503b3e78ba41525865ce0da91b | app/scripts/app/controllers/item/edit.js | app/scripts/app/controllers/item/edit.js | var ItemEditController = Em.ObjectController.extend({
complete: function (key, value) {
if (arguments.length > 1) {
return value;
}
return this.get('canonicalModel.complete');
}.property('canonicalModel.complete'),
actions: {
cancel: function () {
this.get('model').destroy();
t... | var ItemEditController = Em.ObjectController.extend({
setComplete: function () {
var complete = this.get('canonicalModel.complete');
this.set('model.complete', complete);
}.observes('canonicalModel.complete'),
actions: {
cancel: function () {
this.get('model').destroy();
this.transitionTo... | Fix saving item `complete` field | Fix saving item `complete` field
| JavaScript | mit | darvelo/wishlist,darvelo/wishlist | ---
+++
@@ -1,11 +1,8 @@
var ItemEditController = Em.ObjectController.extend({
- complete: function (key, value) {
- if (arguments.length > 1) {
- return value;
- }
-
- return this.get('canonicalModel.complete');
- }.property('canonicalModel.complete'),
+ setComplete: function () {
+ var complete... |
44b69f28d261efc2295cbc79b68b36471b53a3ca | webroot/js/elements/login-dialog.ctrl.js | webroot/js/elements/login-dialog.ctrl.js | (function() {
'use strict';
angular
.module('app')
.controller('LoginDialogController', ['$mdDialog', function($mdDialog) {
var vm = this;
vm.showDialog = showDialog;
///////////////////////////////////////////////////////////////////////////
... | (function() {
'use strict';
angular
.module('app')
.controller('LoginDialogController', ['$mdDialog', function($mdDialog) {
var vm = this;
vm.showDialog = showDialog;
///////////////////////////////////////////////////////////////////////////
... | Make login dialog fullscreen on -xs and -sm breakpoints | Make login dialog fullscreen on -xs and -sm breakpoints
| JavaScript | agpl-3.0 | Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2 | ---
+++
@@ -15,7 +15,8 @@
controller: DialogController,
templateUrl: get_tatoeba_root_url() + '/users/login_dialog_template?redirect=' + url,
parent: angular.element(document.body),
- clickOutsideToClose:true
+ clickO... |
bacbc61e1f74fc8e40544c7e6e2434d68509c773 | lib/exec.js | lib/exec.js | 'use strict';
const shell = require('shelljs');
const cmd = require('./cmd');
// Execute msbuild.exe with passed arguments
module.exports = function exec(args) {
process.exit(shell.exec(cmd(args)).code);
}
| 'use strict';
const shell = require('shelljs');
const cmd = require('./cmd');
// Execute msbuild.exe with passed arguments
module.exports = function exec(args) {
const result = shell.exec(cmd(args)).code;
if (result !== 0) {
console.log();
console.log(`MSBuild failed. ERRORLEVEL '${result}'.'`... | Fix handling of MSBuild errors | Fix handling of MSBuild errors
| JavaScript | mit | TimMurphy/npm-msbuild | ---
+++
@@ -5,5 +5,11 @@
// Execute msbuild.exe with passed arguments
module.exports = function exec(args) {
- process.exit(shell.exec(cmd(args)).code);
+ const result = shell.exec(cmd(args)).code;
+ if (result !== 0) {
+ console.log();
+ console.log(`MSBuild failed. ERRORLEVEL '${result}'.... |
0d705644e49cab96f5ffd4b4337d2ac8d5cbb053 | lib/deps.js | lib/deps.js | var canihaz = require('canihaz'),
fs = require('fs'),
p = require('path');
/**
* Install dependency modules that are not yet installed, and needed for executing the tasks.
*
* @param {Array} depNames: an array of dependency module names
* @param {String} dir: application directory where node_modules dir is loc... | var canihaz = require('canihaz'),
fs = require('fs'),
p = require('path');
/**
* Install dependency modules that are not yet installed, and needed for executing the tasks.
*
* @param {Array} depNames: an array of dependency module names
* @param {String} dir: application directory where node_modules dir is loc... | Add note that lazy-installed modules are once-off only. | Add note that lazy-installed modules are once-off only.
| JavaScript | mit | cliffano/bob | ---
+++
@@ -18,7 +18,7 @@
}
});
if (uninstalled.length > 0) {
- console.log('[deps] Installing modules: %s (might take a while)', uninstalled .join(', '));
+ console.log('[deps] Installing modules: %s (might take a while, once-off only)', uninstalled .join(', '));
canihaz({ key: 'opt... |
329ab24aed5a9848e98d6a504ad8b2997142c23b | lib/main.js | lib/main.js | var buffer = require("./buffer");
/**
* @namespace Splat
*/
module.exports = {
makeBuffer: buffer.makeBuffer,
flipBufferHorizontally: buffer.flipBufferHorizontally,
flipBufferVertically: buffer.flipBufferVertically,
ads: require("./ads"),
AStar: require("./astar"),
BinaryHeap: require("./binary-heap"),
... | var buffer = require("./buffer");
/**
* @namespace Splat
*/
module.exports = {
makeBuffer: buffer.makeBuffer,
flipBufferHorizontally: buffer.flipBufferHorizontally,
flipBufferVertically: buffer.flipBufferVertically,
ads: require("./ads"),
AStar: require("./astar"),
BinaryHeap: require("./binary-heap"),
... | Remove big export of components | Remove big export of components
| JavaScript | mit | SplatJS/splat-ecs | ---
+++
@@ -20,19 +20,5 @@
NinePatch: require("./ninepatch"),
Particles: require("./particles"),
saveData: require("./save-data"),
- Scene: require("./scene"),
-
- components: {
- animation: require("./components/animation"),
- camera: require("./components/camera"),
- friction: require("./compone... |
6f3d8b949133178a7f7202a060fcc35b19f4cac2 | src/root.js | src/root.js | import React from 'react';
const Root = (props) => {
return (
<div>{props.children}</div>
);
};
Root.displayName = 'Root';
export default Root; | import React, { Children } from 'react';
const Root = ({ children }) => Children.only(children);
Root.displayName = 'Root';
export default Root; | Remove <div/> from Root and add Children.only | Remove <div/> from Root and add Children.only
| JavaScript | artistic-2.0 | raulmatei/frux-table-test,raulmatei/frux-table-test | ---
+++
@@ -1,11 +1,6 @@
-import React from 'react';
+import React, { Children } from 'react';
-const Root = (props) => {
- return (
- <div>{props.children}</div>
- );
-};
+const Root = ({ children }) => Children.only(children);
Root.displayName = 'Root';
-
export default Root; |
1461598f43ec70e9cfea8313406b3c5482d7032b | src/image/transform/bitDepth.js | src/image/transform/bitDepth.js | import Image from '../image';
export default function bitDepth(newBitDepth = 8) {
this.checkProcessable('bitDepth', {
bitDepth: [8, 16]
});
if (![8,16].includes(newBitDepth)) throw Error('You need to specify the new bitDepth as 8 or 16');
if (this.bitDepth === newBitDepth) return this.clone(... | import Image from '../image';
export default function bitDepth(newBitDepth = 8) {
this.checkProcessable('bitDepth', {
bitDepth: [8, 16]
});
if (!~[8,16].indexOf(newBitDepth)) throw Error('You need to specify the new bitDepth as 8 or 16');
if (this.bitDepth === newBitDepth) return this.clone(... | Remove includes to be compatible with currently released chrome | Remove includes to be compatible with currently released chrome
| JavaScript | mit | image-js/ij,image-js/core,image-js/ij,image-js/image-js,image-js/core,image-js/image-js,image-js/ij | ---
+++
@@ -6,7 +6,7 @@
bitDepth: [8, 16]
});
- if (![8,16].includes(newBitDepth)) throw Error('You need to specify the new bitDepth as 8 or 16');
+ if (!~[8,16].indexOf(newBitDepth)) throw Error('You need to specify the new bitDepth as 8 or 16');
if (this.bitDepth === newBitDepth) return... |
7bed9dc2f607264f7499251119a36e9bd530b2f9 | HelloWorld/lib/myPanel.js | HelloWorld/lib/myPanel.js | /* See license.txt for terms of usage */
"use strict";
const self = require("sdk/self");
const { Cu, Ci } = require("chrome");
const { Panel } = require("dev/panel.js");
const { Class } = require("sdk/core/heritage");
const { Tool } = require("dev/toolbox");
/**
* This object represents a new {@Toolbox} panel
*/
... | /* See license.txt for terms of usage */
"use strict";
const self = require("sdk/self");
const { Cu, Ci } = require("chrome");
const { Panel } = require("dev/panel.js");
const { Class } = require("sdk/core/heritage");
const { Tool } = require("dev/toolbox");
/**
* This object represents a new {@Toolbox} panel
*/
... | Set debuggee in HelloWorld example | Set debuggee in HelloWorld example
| JavaScript | bsd-3-clause | firebug/devtools-extension-examples,firebug/devtools-extension-examples | ---
+++
@@ -42,8 +42,16 @@
* `debuggee` object
*/
setup: function(options) {
+ console.log("MyPanel.setup" + options.debuggee);
+
+ this.debuggee = options.debuggee;
+
// TODO: connect to backend using options.debuggee
},
+
+ onReady: function() {
+ console.log("MyPanel.onReady " + this.deb... |
ec86eded4c14b5b82a36dd731c272a43b8565ea6 | test/bin.js | test/bin.js | (function() {
'use strict';
var cli = require('casper').create().cli;
var parapsych = require(cli.raw.get('rootdir') + '/dist/parapsych').create(require);
parapsych.set('cli', cli)
.set('initUrl', '/')
.set('initSel', 'body');
describe('/', function() {
it('should pass --grep filter' , function... | (function() {
'use strict';
var cli = require('casper').create().cli;
var parapsych = require(cli.raw.get('rootdir') + '/dist/parapsych').create(require);
parapsych.set('cli', cli)
.set('initUrl', '/')
.set('initSel', 'body');
describe('group 1', function() {
it('should pass --grep filter' , fu... | Add a 2nd describe() block to auto-start logic | Add a 2nd describe() block to auto-start logic
| JavaScript | mit | codeactual/conjure,codeactual/conjure | ---
+++
@@ -8,7 +8,17 @@
.set('initUrl', '/')
.set('initSel', 'body');
- describe('/', function() {
+ describe('group 1', function() {
+ it('should pass --grep filter' , function() {
+ this.test.assertEquals(this.fetchText('body').trim(), 'Hello World');
+ });
+
+ it('should not pass --gre... |
aa3925cdf7d3427541d0d50a08bef0f628aabd2c | test/ResultItem.js | test/ResultItem.js | 'use strict';
var Component = require('../ui/Component');
function ResultItem() {
ResultItem.super.apply(this, arguments);
}
ResultItem.Prototype = function() {
this.shouldRerender = function() {
return false;
};
this.render = function($$) {
var test = this.props.test;
var result = this.props.r... | 'use strict';
var Component = require('../ui/Component');
function ResultItem() {
ResultItem.super.apply(this, arguments);
}
ResultItem.Prototype = function() {
this.shouldRerender = function() {
return false;
};
this.render = function($$) {
var test = this.props.test;
var result = this.props.r... | Fix in test result renderer. | Fix in test result renderer.
| JavaScript | mit | podviaznikov/substance,substance/substance,substance/substance,michael/substance-1,andene/substance,michael/substance-1,stencila/substance,podviaznikov/substance,andene/substance | ---
+++
@@ -25,7 +25,7 @@
header.append($$('span').addClass('se-status sm-not-ok').append("\u26A0"));
}
}
- header.append($$('span').addClass('se-description').append(result.name));
+ header.append($$('span').addClass('se-description').append(String(result.name)));
el.append(header);
... |
bd0b72d850975ba74e3b7eb785fc169ab08c4c8c | feature-detects/emoji.js | feature-detects/emoji.js | // Requires a Modernizr build with `canvastest` included
// http://www.modernizr.com/download/#-canvas-canvastext
Modernizr.addTest('emoji', function() {
if (!Modernizr.canvastext) return false;
var node = document.createElement('canvas'),
ctx = node.getContext('2d');
ctx.textBaseline = 'top';
ctx.font = ... | // Requires a Modernizr build with `canvastext` included
// http://www.modernizr.com/download/#-canvas-canvastext
Modernizr.addTest('emoji', function() {
if (!Modernizr.canvastext) return false;
var node = document.createElement('canvas'),
ctx = node.getContext('2d');
ctx.textBaseline = 'top';
ctx.font = ... | Fix longstanding typo. SORRY GUISE | Fix longstanding typo. SORRY GUISE | JavaScript | mit | Modernizr/Modernizr,Modernizr/Modernizr | ---
+++
@@ -1,4 +1,4 @@
-// Requires a Modernizr build with `canvastest` included
+// Requires a Modernizr build with `canvastext` included
// http://www.modernizr.com/download/#-canvas-canvastext
Modernizr.addTest('emoji', function() {
if (!Modernizr.canvastext) return false; |
d6b84881d747f2fe6f2fe61a5e762c04ac821ae5 | client/app/controllers/boltController.js | client/app/controllers/boltController.js | angular.module('bolt.controller', [])
.controller('BoltController', function($scope, Geo){
})
| angular.module('bolt.controller', [])
.controller('BoltController', function($scope, $window){
$scope.session = $window.localStorage;
})
| Add user session to bolt $scope | Add user session to bolt $scope
| JavaScript | mit | gm758/Bolt,boisterousSplash/Bolt,gm758/Bolt,thomasRhoffmann/Bolt,elliotaplant/Bolt,thomasRhoffmann/Bolt,boisterousSplash/Bolt,elliotaplant/Bolt | ---
+++
@@ -1,5 +1,5 @@
angular.module('bolt.controller', [])
-.controller('BoltController', function($scope, Geo){
-
+.controller('BoltController', function($scope, $window){
+ $scope.session = $window.localStorage;
}) |
113f8c74b6780af1def3c07d1c87b266223930dc | test/Voice-test.js | test/Voice-test.js | import Voice from '../lib/Voice';
import NexmoStub from './NexmoStub';
var voiceAPIs = [
'sendTTSMessage',
'sendTTSPromptWithCapture',
'sendTTSPromptWithConfirm',
'call'
];
describe('Voice Object', function () {
it('should implement all v1 APIs', function() {
NexmoStub.checkAllFunctionsAreDefined(... | import Voice from '../lib/Voice';
import NexmoStub from './NexmoStub';
var voiceAPIs = {
'sendTTSMessage': 'sendTTSMessage',
'sendTTSPromptWithCapture': 'sendTTSPromptWithCapture',
'sendTTSPromptWithConfirm': 'sendTTSPromptWithConfirm',
'call': 'call'
};
describe('Voice Object', function () {
it('shou... | Update Voice tests with mappings | Update Voice tests with mappings | JavaScript | mit | Nexmo/nexmo-node | ---
+++
@@ -2,12 +2,12 @@
import NexmoStub from './NexmoStub';
-var voiceAPIs = [
- 'sendTTSMessage',
- 'sendTTSPromptWithCapture',
- 'sendTTSPromptWithConfirm',
- 'call'
-];
+var voiceAPIs = {
+ 'sendTTSMessage': 'sendTTSMessage',
+ 'sendTTSPromptWithCapture': 'sendTTSPromptWithCapture',
+ 'sendTTSProm... |
eba9d1a3a4615726c2ef6db72bf9cd508c6a0489 | gulpfile.js/tasks/css.js | gulpfile.js/tasks/css.js | 'use strict';
// Modules
// ===============================================
var gulp = require('gulp'),
gutil = require('gulp-util'),
browserSync = require("browser-sync"),
paths = require('../paths');
// Copy CSS to build folder
// ===============================================
gulp.task('css', function() {
re... | 'use strict';
// Modules
// ===============================================
var gulp = require('gulp'),
paths = require('../paths'),
gutil = require('gulp-util'),
browserSync = require("browser-sync"),
debug = require('gulp-debug');
// Copy CSS to build folder
// ===============================================
g... | Add info about CSS files to console | Add info about CSS files to console
| JavaScript | mit | ilkome/front-end,ilkome/frontend,ilkome/front-end,ilkome/frontend | ---
+++
@@ -3,15 +3,19 @@
// Modules
// ===============================================
var gulp = require('gulp'),
+ paths = require('../paths'),
gutil = require('gulp-util'),
browserSync = require("browser-sync"),
- paths = require('../paths');
+ debug = require('gulp-debug');
// Copy CSS to build folde... |
32a0847fa95609901cb97ac28003a148e8ad559a | app/components/__tests__/Preview-test.js | app/components/__tests__/Preview-test.js | import React from 'react';
import { shallow, render } from 'enzyme';
import { expect } from 'chai';
// see: https://github.com/mochajs/mocha/issues/1847
const { describe, it } = global;
import Preview from '../Preview';
describe('<Preview />', () => {
it('renders a block with preview css class', () => {
cons... | import React from 'react';
import { shallow, render } from 'enzyme';
import { expect } from 'chai';
// see: https://github.com/mochajs/mocha/issues/1847
const { describe, it } = global;
import Preview from '../Preview';
describe('<Preview />', () => {
it('renders a block with preview css class', () => {
cons... | Add test for highlight.js rendering | Add test for highlight.js rendering
| JavaScript | mit | PaulDebus/monod,TailorDev/monod,TailorDev/monod,TailorDev/monod,PaulDebus/monod,PaulDebus/monod | ---
+++
@@ -28,7 +28,14 @@
it('converts Emoji', () => {
const wrapper = render(<Preview raw={" :)"} />);
expect(wrapper.find('.rendered').html()).to.contain(
- '<img align="absmiddle" alt=":smile:" class="emoji" src="https://github.global.ssl.fastly.net/images/icons/emoji//smile.png" title=":smile:"... |
4394772d90e017a0fad11f5292f819cd2790ae71 | api/app/features/events/eventHandler.js | api/app/features/events/eventHandler.js | const Boom = require('boom');
const hostService = require('../../domain/services/host-service');
const eventService = require('../../domain/services/event-service');
module.exports = {
create(request, reply) {
const { user } = request.payload;
const { event } = request.payload;
return host... | const Boom = require('boom');
const hostService = require('../../domain/services/host-service');
const eventService = require('../../domain/services/event-service');
module.exports = {
create(request, reply) {
return hostService
.createHost(request.payload.user)
.then(({ _id: userId... | Add little error management in event route | Add little error management in event route
| JavaScript | agpl-3.0 | Hypernikao/who-brings-what | ---
+++
@@ -4,14 +4,19 @@
module.exports = {
create(request, reply) {
- const { user } = request.payload;
- const { event } = request.payload;
-
return hostService
- .createHost(user)
- .then((userId) => {
- const eventDetails = Object.assign({}, { u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.