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 |
|---|---|---|---|---|---|---|---|---|---|---|
bab8097c98d3d07b10ab096b9445f8585f416e69 | app/components/dashboard/unified-view/component.js | app/components/dashboard/unified-view/component.js | import Ember from 'ember';
import layout from './template';
export default Ember.Component.extend({
layout,
store: Ember.inject.service(),
internalState: Ember.inject.service(),
leftTitle: null,
leftView: null,
leftPanelColor: null,
leftModel: null,
rightTitle: null,
rightView: ... | import Ember from 'ember';
import layout from './template';
export default Ember.Component.extend({
layout,
store: Ember.inject.service(),
internalState: Ember.inject.service(),
leftTitle: null,
leftView: null,
leftPanelColor: null,
leftModel: null,
rightTitle: null,
rightView: ... | Update work around for disabling store caching | Update work around for disabling store caching
| JavaScript | mit | whole-tale/dashboard,whole-tale/dashboard,whole-tale/dashboard | ---
+++
@@ -30,11 +30,11 @@
this.set("leftModel", model);
},
taleLaunched: function() {
- // TODO convert this interaction to use the wholetale events service instead
- // Update model and test if the interface updates automatically
+ // TODO convert this interaction to use... |
e4bdc029ca5e0345077de8fd2620638f30b20eee | lib/cli.js | lib/cli.js | /**
* Terminal client for the Ma3Route REST API
*/
"use strict";
// npm-installed modules
var decamelize = require("decamelize");
var parser = require("simple-argparse");
// own modules
var lib = require(".");
var pkg = require("../package.json");
parser
.version(pkg.version)
.description("ma3route", ... | /**
* Terminal client for the Ma3Route REST API
*/
"use strict";
// npm-installed modules
var decamelize = require("decamelize");
var parser = require("simple-argparse");
// own modules
var lib = require("../lib");
var pkg = require("../package.json");
parser
.version(pkg.version)
.description("ma3rou... | Add backwards compatibility for Node 0.x series | Add backwards compatibility for Node 0.x series
| JavaScript | mit | GochoMugo/ma3route-cli | ---
+++
@@ -12,7 +12,7 @@
// own modules
-var lib = require(".");
+var lib = require("../lib");
var pkg = require("../package.json");
|
0cca0f1f63b05f4a61696e97a14b95add3538129 | src/addable.js | src/addable.js | udefine(function() {
return function(Factory, groupInstance) {
return function() {
var child = arguments[0];
var args = 2 <= arguments.length ? [].slice.call(arguments, 1) : [];
if (!( child instanceof Factory)) {
if ( typeof child === 'string') {
if (Object.hasOwnProperty.ca... | udefine(function() {
return function(Factory, groupInstance) {
return function() {
var child = arguments[0];
var args = 2 <= arguments.length ? [].slice.call(arguments, 1) : [];
if (!( child instanceof Factory)) {
if ( typeof child === 'string') {
if (Object.hasOwnProperty.ca... | Call descriptor when a child is added | Call descriptor when a child is added
| JavaScript | mit | freezedev/flockn,freezedev/flockn | ---
+++
@@ -8,14 +8,16 @@
if (!( child instanceof Factory)) {
if ( typeof child === 'string') {
if (Object.hasOwnProperty.call(store, child)) {
- child = new Factory(Factory.store[child], args);
+ child = new Factory(Factory.store[child]);
}
} else ... |
98cd42daefdafef5d0125ca33b8fca73905cb621 | app/core/directives/ext-href.js | app/core/directives/ext-href.js | /* global angular */
angular.module('app')
.directive('extHref', function (platformInfo) {
'use strict';
return {
restrict: 'A',
link: link
};
function link(scope, element, attributes) {
const url = attributes.extHref;
if (platformInfo.isCordova) {
element[0].onclick = onclick;
} else {
element[0... | /* global angular, require */
angular.module('app')
.directive('extHref', function (platformInfo) {
'use strict';
return {
restrict: 'A',
link: link
};
function link(scope, element, attributes) {
const url = attributes.extHref;
element[0].onclick = () => {
if (platformInfo.isCordova) {
window.ope... | Clean up, and use electron functions to open urls | Clean up, and use electron functions to open urls
| JavaScript | agpl-3.0 | johansten/stargazer,johansten/stargazer,johansten/stargazer | ---
+++
@@ -1,4 +1,4 @@
-/* global angular */
+/* global angular, require */
angular.module('app')
.directive('extHref', function (platformInfo) {
@@ -10,16 +10,15 @@
};
function link(scope, element, attributes) {
+
const url = attributes.extHref;
- if (platformInfo.isCordova) {
- element[0].onclick =... |
3a111bbc81c4a424b002b0ec00f473c4451097f0 | app/controllers/settings/theme/uploadtheme.js | app/controllers/settings/theme/uploadtheme.js | import Controller from '@ember/controller';
import {inject as service} from '@ember/service';
export default class UploadThemeController extends Controller {
@service config;
get isAllowed() {
return !this.config.get('hostSettings')?.limits?.customThemes;
}
}
| import Controller from '@ember/controller';
import {inject as service} from '@ember/service';
export default class UploadThemeController extends Controller {
@service config;
get isAllowed() {
return (!this.config.get('hostSettings')?.limits?.customThemes) || this.config.get('hostSettings').limits.cus... | Fix UploadThemeController to support disable:true customThemes flag | Fix UploadThemeController to support disable:true customThemes flag
no issue
| JavaScript | mit | TryGhost/Ghost-Admin,TryGhost/Ghost-Admin | ---
+++
@@ -5,6 +5,6 @@
@service config;
get isAllowed() {
- return !this.config.get('hostSettings')?.limits?.customThemes;
+ return (!this.config.get('hostSettings')?.limits?.customThemes) || this.config.get('hostSettings').limits.customThemes.disabled;
}
} |
e5f1a0e1bd72d7f48a263532d18a4564bdf6d4b9 | client/templates/register/registrant/registrant.js | client/templates/register/registrant/registrant.js | Template.registrantDetails.helpers({
'registrationTypeOptions': function () {
// registration types used on the registration form
return [
{label: "Commuter", value: "commuter"},
{label: "Daily", value: "daily"},
{label: "Full Week", value: "weekly"}
];
... | Template.registrantDetails.helpers({
'registrationTypeOptions': function () {
// registration types used on the registration form
return [
{label: "Commuter", value: "commuter"},
{label: "Daily", value: "daily"},
{label: "Full Week", value: "weekly"}
];
... | Add school age group template helper. | Add school age group template helper.
| JavaScript | agpl-3.0 | quaker-io/pym-online-registration,quaker-io/pym-online-registration,quaker-io/pym-2015,quaker-io/pym-2015 | ---
+++
@@ -6,6 +6,32 @@
{label: "Daily", value: "daily"},
{label: "Full Week", value: "weekly"}
];
+ },
+ /*
+ Determine if registrant is school aged
+ by checking age group
+ return true if age group is child, youth, or teen
+ */
+ 'schoolAgeGroup': function (... |
63d2a9cd58d424f13a38e8a078f37f64565a2771 | components/dashboards-web-component/jest.config.js | components/dashboards-web-component/jest.config.js | /*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/... | /*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/... | Set test regex to select only *.test.js/jsx files in the test directory. | Set test regex to select only *.test.js/jsx files in the test directory.
And add the root directory as a module directory so that file imports
will be absolute.
| JavaScript | apache-2.0 | wso2/carbon-dashboards,ksdperera/carbon-dashboards,lasanthaS/carbon-dashboards,wso2/carbon-dashboards,ksdperera/carbon-dashboards,ksdperera/carbon-dashboards,lasanthaS/carbon-dashboards,lasanthaS/carbon-dashboards | ---
+++
@@ -18,5 +18,6 @@
module.exports = {
verbose: true,
- testRegex: 'test/.*\\.(js|jsx)$',
+ testRegex: 'test/(.+)(.test.)(js|jsx)$',
+ moduleDirectories: ['node_modules', '<rootDir>'],
}; |
1f7a5c9aa26d4752336fb5cd9e651f52c0d72253 | module/javascript/module.js | module/javascript/module.js | forge['contact'] = {
'select': function (success, error) {
forge.internal.call("contact.select", {}, success, error);
},
'selectById': function (id, success, error) {
forge.internal.call("contact.selectById", {id: id}, success, error);
},
'selectAll': function (fields, success, error) {
if (typeof fields ===... | /* global forge */
forge['contact'] = {
'select': function (success, error) {
forge.internal.call("contact.select", {}, success, error);
},
'selectById': function (id, success, error) {
forge.internal.call("contact.selectById", {id: id}, success, error);
},
'selectAll': function (fi... | Test failure on iOS13 when adding contacts with null property fields. | Fixed: Test failure on iOS13 when adding contacts with null property fields.
| JavaScript | bsd-2-clause | trigger-corp/trigger.io-contact,trigger-corp/trigger.io-contact | ---
+++
@@ -1,29 +1,33 @@
+/* global forge */
+
forge['contact'] = {
- 'select': function (success, error) {
- forge.internal.call("contact.select", {}, success, error);
- },
- 'selectById': function (id, success, error) {
- forge.internal.call("contact.selectById", {id: id}, success, error);
- },
- 'selectAll': f... |
a96bd4f6c0063039b96d6e332fa6556b6f26d3ec | app/services/additional-data.js | app/services/additional-data.js | import Service from '@ember/service';
import Evented from '@ember/object/evented';
export default Service.extend(Evented, {
showWindow: false,
shownComponents: null,
popupContent: null,
addComponent(path) {
if (this.get('shownComponents') == null) {
this.set('shownComponents', []);
}
if (!t... | import Service from '@ember/service';
import Evented from '@ember/object/evented';
export default Service.extend(Evented, {
showWindow: false,
shownComponents: null,
popupContent: null,
addComponent(path) {
if (this.get('shownComponents') == null) {
this.set('shownComponents', []);
}
if (!t... | Add new components to top of sidebar | Add new components to top of sidebar
| JavaScript | apache-2.0 | ExplorViz/explorviz-ui-frontend,ExplorViz/explorviz-ui-frontend,ExplorViz/explorviz-ui-frontend | ---
+++
@@ -12,7 +12,7 @@
this.set('shownComponents', []);
}
if (!this.get('shownComponents').includes(path)) {
- this.get('shownComponents').push(path);
+ this.get('shownComponents').unshift(path);
this.notifyPropertyChange('shownComponents');
}
}, |
fba75405f7c3e2f206a62e890a5a74e8ceaa153c | app/src/presenters/Flashcard.js | app/src/presenters/Flashcard.js | // import node packages
import React from 'react';
function Flashcard(props) {
return (
<li>
Question: <span>{this.props.question}</span><br />
Answer: <span>{this.props.answer}</span>
</li>
);
}
export default Flashcard;
| // import node packages
import React from 'react';
function Flashcard(props) {
return (
<li>
Question: <span>{props.question}</span><br />
Answer: <span>{props.answer}</span>
</li>
);
}
export default Flashcard;
| Fix props usage for function vs class | Fix props usage for function vs class
| JavaScript | mit | subnotes/gemini,subnotes/gemini,subnotes/gemini | ---
+++
@@ -4,8 +4,8 @@
function Flashcard(props) {
return (
<li>
- Question: <span>{this.props.question}</span><br />
- Answer: <span>{this.props.answer}</span>
+ Question: <span>{props.question}</span><br />
+ Answer: <span>{props.answer}</span>
</li>
);
} |
d2b8d6ddd32ae28d2487f0d97848851e3b246626 | lib/url.js | lib/url.js | "use strict";
// considered using the node url library, but couldn't resolve dependencies
// without serious modifications, leading to maintenance nightmares
module.exports = {
parse: function(url) {
// rudimentary URL regex, could use some improvement
// but should suffice for now. capturing pare... | "use strict";
// considered using the node url library, but couldn't resolve dependencies
// without serious modifications, leading to maintenance nightmares
module.exports = {
parse: function(url) {
// rudimentary URL regex, could use some improvement
// but should suffice for now. capturing pare... | Allow capture of relative URLs by making regex host segment optional | Allow capture of relative URLs by making regex host segment optional
| JavaScript | mit | 2sidedfigure/ouija | ---
+++
@@ -11,7 +11,7 @@
// 2: host
// 3: path
// 4: query
- var re = /^(?:([^:]+)?:?\/\/\/?)?([^\/]+)(?:(\/[^\?]*)(?:\??(.*))?)?$/,
+ var re = /^(?:([^:]+)?:?\/\/\/?)?([^\/]+)?(?:(\/[^\?]*)(?:\??(.*))?)?$/,
match = re.exec(url) || [];
return { |
91a94b95e13b0a4187c0b86a95a770e64cbc3000 | js/config.js | js/config.js | 'use strict';
(function(exports) {
exports.API_URL = '/';
}(window));
| 'use strict';
(function(exports) {
exports.API_URL = 'http://api.sensorweb.io/';
}(window));
| Switch to use real APIs on SensorWeb platform | Switch to use real APIs on SensorWeb platform
| JavaScript | mit | sensor-web/sensorweb-frontend,sensor-web/sensorweb-frontend,evanxd/sensorweb-frontend,evanxd/sensorweb-frontend | ---
+++
@@ -1,5 +1,5 @@
'use strict';
(function(exports) {
- exports.API_URL = '/';
+ exports.API_URL = 'http://api.sensorweb.io/';
}(window)); |
931155cd03d8ce9581240f3a68fd39a52160f0f9 | lib/networking/rest/channels/deleteMessages.js | lib/networking/rest/channels/deleteMessages.js | "use strict";
const Constants = require("../../../Constants");
const Events = Constants.Events;
const Endpoints = Constants.Endpoints;
const apiRequest = require("../../../core/ApiRequest");
module.exports = function(channelId, messages) {
console.log("deletes", messages)
return new Promise((rs, rj) => {
apiR... | "use strict";
const Constants = require("../../../Constants");
const Events = Constants.Events;
const Endpoints = Constants.Endpoints;
const apiRequest = require("../../../core/ApiRequest");
module.exports = function(channelId, messages) {
return new Promise((rs, rj) => {
apiRequest
.post(this, {
url:... | Remove log message on bulk delete | Remove log message on bulk delete
| JavaScript | bsd-2-clause | qeled/discordie | ---
+++
@@ -6,7 +6,6 @@
const apiRequest = require("../../../core/ApiRequest");
module.exports = function(channelId, messages) {
- console.log("deletes", messages)
return new Promise((rs, rj) => {
apiRequest
.post(this, { |
dca9db5e0efbdbf529c1fc15d6cf1121c8692822 | public/core.js | public/core.js | var muchTodo = angular.module('muchTodo', []);
function mainController($scope, $http) {
$scope.formData = {};
$http.get('/api/todos')
.success(function(data) {
$scope.todos = data;
console.log(data);
})
.error(function(data){
console.log(Error(data));
});
$scope.createTodo = f... | Write CRD todo module for angular. | Write CRD todo module for angular.
| JavaScript | mit | lukert33/luke_gets_mean,lukert33/luke_gets_mean | ---
+++
@@ -0,0 +1,38 @@
+var muchTodo = angular.module('muchTodo', []);
+
+function mainController($scope, $http) {
+ $scope.formData = {};
+
+ $http.get('/api/todos')
+ .success(function(data) {
+ $scope.todos = data;
+ console.log(data);
+ })
+ .error(function(data){
+ console.log(Error(d... | |
3971842dc0f01025ba280ff7c3900ea35f36ee6e | test/api.js | test/api.js | var chai = require('chai');
var expect = chai.expect;
/* fake api server */
var server = require('./server');
var api = server.createServer();
var clubs = [
{
id: '205',
name: 'SURTEX',
logo: 'http://121.199.38.39/hphoto/logoclub/NewClub.jpgw76_h76.jpg'
}
];
var responses = {
'clubs/': server.crea... | var chai = require('chai');
var expect = chai.expect;
/* fake api server */
var server = require('./server');
var api = server.createServer();
var clubs = [
{
id: '205',
name: 'SURTEX',
logo: 'http://121.199.38.39/hphoto/logoclub/NewClub.jpgw76_h76.jpg'
}
];
var responses = {
'clubs/': server.crea... | Fix test error (still failing) | Fix test error (still failing)
| JavaScript | bsd-3-clause | rogerz/wechat-letsface-api | ---
+++
@@ -31,20 +31,20 @@
/* test cases */
-describe('letsface api', function (done) {
- var req = {
- weixin: {
- MsgType: 'text',
- Content: 'clubs'
- }
- };
- var res = {
- reply: function (result) {
- expect(result).to.equal('1 clubs');
- done();
- }
- };
- it('should r... |
b91805c6d29d1afcd532666a9230c05ef2903bd1 | internals/testing/test-bundler.js | internals/testing/test-bundler.js | import 'babel-polyfill';
import sinon from 'sinon';
import chai from 'chai';
import chaiEnzyme from 'chai-enzyme';
import factory from 'fixture-factory';
chai.use(chaiEnzyme());
global.chai = chai;
global.sinon = sinon;
global.expect = chai.expect;
global.should = chai.should();
/**
* Register the story as factory... | import 'babel-polyfill';
import sinon from 'sinon';
import chai from 'chai';
import chaiEnzyme from 'chai-enzyme';
import factory from 'fixture-factory';
chai.use(chaiEnzyme());
global.chai = chai;
global.sinon = sinon;
global.expect = chai.expect;
global.should = chai.should();
/**
* Register the story as factory... | Add excerpt to the story factor & add category factory | Add excerpt to the story factor & add category factory
| JavaScript | mit | reauv/persgroep-app,reauv/persgroep-app | ---
+++
@@ -18,11 +18,18 @@
factory.register('story', {
id: 'random.number',
title: 'random.words',
+ excerpt: 'random.words',
body: 'random.words',
liked: false,
author: {
name: 'random.words',
},
+ created_at: 'date.recent.value',
+});
+
+factory.register('category', {
+ id: 'random.number',
+ name:... |
3ce1e166c2b114a3f87111e8e1b68e8c238990fe | src/utils/quote-style.js | src/utils/quote-style.js | /**
* As Recast is not preserving original quoting, we try to detect it.
* See https://github.com/benjamn/recast/issues/171
* and https://github.com/facebook/jscodeshift/issues/143
* @return 'double', 'single' or null
*/
export default function detectQuoteStyle(j, ast) {
let detectedQuoting = null;
ast
... | /**
* As Recast is not preserving original quoting, we try to detect it.
* See https://github.com/benjamn/recast/issues/171
* and https://github.com/facebook/jscodeshift/issues/143
* @return 'double', 'single' or null
*/
export default function detectQuoteStyle(j, ast) {
let doubles = 0;
let singles = 0;
... | Improve detectQuoteStyle (needed when adding imports and requires) | Improve detectQuoteStyle (needed when adding imports and requires)
| JavaScript | mit | skovhus/jest-codemods,skovhus/jest-codemods,skovhus/jest-codemods | ---
+++
@@ -5,7 +5,8 @@
* @return 'double', 'single' or null
*/
export default function detectQuoteStyle(j, ast) {
- let detectedQuoting = null;
+ let doubles = 0;
+ let singles = 0;
ast
.find(j.Literal, {
@@ -14,14 +15,17 @@
})
.forEach(p => {
// The raw v... |
39be85fb0ff6be401a17c92f2d54befbe612115a | plugins/treeview/web_client/routes.js | plugins/treeview/web_client/routes.js | import router from 'girder/router';
import events from 'girder/events';
import { exposePluginConfig } from 'girder/utilities/PluginUtils';
exposePluginConfig('treeview', 'plugins/treeview/config');
import ConfigView from './views/ConfigView';
router.route('plugins/treeview/config', 'treeviewConfig', function () {
... | /* eslint-disable import/first */
import router from 'girder/router';
import events from 'girder/events';
import { exposePluginConfig } from 'girder/utilities/PluginUtils';
exposePluginConfig('treeview', 'plugins/treeview/config');
import ConfigView from './views/ConfigView';
router.route('plugins/treeview/config', '... | Fix style for compatibility with eslint rule changes | Fix style for compatibility with eslint rule changes
| JavaScript | apache-2.0 | Xarthisius/girder,kotfic/girder,RafaelPalomar/girder,jbeezley/girder,Xarthisius/girder,Kitware/girder,data-exp-lab/girder,Xarthisius/girder,RafaelPalomar/girder,manthey/girder,data-exp-lab/girder,kotfic/girder,kotfic/girder,data-exp-lab/girder,data-exp-lab/girder,girder/girder,Kitware/girder,manthey/girder,girder/girde... | ---
+++
@@ -1,3 +1,4 @@
+/* eslint-disable import/first */
import router from 'girder/router';
import events from 'girder/events';
import { exposePluginConfig } from 'girder/utilities/PluginUtils'; |
01e2eab387d84a969b87c45f795a5df1335f3f30 | src/ui/DynamicPreview.js | src/ui/DynamicPreview.js | import React, { PropTypes } from 'react'
import styled from 'styled-components'
import AceEditor from 'react-ace'
const PreviewContainer = styled.div`
align-self: center;
padding: 28px;
width: 100%;
height: 400px;
background-color: white;
border: 1px solid rgba(0, 0, 0, 0.35);
box-shadow: 0 2px 16px 2px ... | import React, { PropTypes } from 'react'
import styled from 'styled-components'
import AceEditor from 'react-ace'
const PreviewContainer = styled.div`
align-self: center;
padding: 28px;
width: 100%;
height: 400px;
background-color: white;
border: 1px solid rgba(0, 0, 0, 0.35);
box-shadow: 0 2px 16px 2px ... | Remove gutter to match the output | Remove gutter to match the output
| JavaScript | mpl-2.0 | okonet/codestage,okonet/codestage | ---
+++
@@ -19,7 +19,13 @@
require(`brace/theme/${theme}`) // eslint-disable-line
return (
<PreviewContainer>
- <AceEditor mode={language} theme={theme} value={value} style={{ fontFamily: fontface }} />
+ <AceEditor
+ mode={language}
+ theme={theme}
+ value={value}
+ s... |
7b9157180348613bd529e3ef21137d98f6c82c7f | lib/streams.js | lib/streams.js | /**
* Created by austin on 9/24/14.
*/
var streams = function (client) {
this.client = client;
};
var _qsAllowedProps = [
'resolution'
, 'series_type'
];
//===== streams endpoint =====
streams.prototype.activity = function(args,done) {
var endpoint = 'activities';
this._typeHelper(en... | /**
* Created by austin on 9/24/14.
*/
var streams = function (client) {
this.client = client;
};
var _qsAllowedProps = [
'resolution'
, 'series_type'
];
//===== streams endpoint =====
streams.prototype.activity = function(args,done) {
var endpoint = 'activities';
return this._typeHe... | Return value for client.stream.* calls | Return value for client.stream.* calls
These endpoints didn’t return anything, making them unusable with the
promises version of the API.
| JavaScript | mit | UnbounDev/node-strava-v3 | ---
+++
@@ -15,25 +15,25 @@
streams.prototype.activity = function(args,done) {
var endpoint = 'activities';
- this._typeHelper(endpoint,args,done);
+ return this._typeHelper(endpoint,args,done);
};
streams.prototype.effort = function(args,done) {
var endpoint = 'segment_efforts';
- this._t... |
771173699d6ec245c336d451601e6bf65d1f6058 | src/js/main.js | src/js/main.js | /* global console, Calendar, vis */
(function() {
"use strict";
var calendar = new Calendar();
calendar.init(document.getElementById('visualization'),
{
height: "100vh",
orientation: "top",
zoomKey: 'shiftKey',
zoomMax: 315360000000,
zoomMin: 600000,
editable: {
... | /* global console, Calendar, vis */
(function() {
"use strict";
var calendar = new Calendar();
calendar.init(document.getElementById('visualization'),
{
height: "100vh",
orientation: "top",
zoomKey: 'shiftKey',
zoomMax: 315360000000,
zoomMin: 86400000,
editable: {
... | Update minimun zoom to 24 hours | Update minimun zoom to 24 hours
| JavaScript | apache-2.0 | fidash/widget-calendar,fidash/widget-calendar | ---
+++
@@ -10,7 +10,7 @@
orientation: "top",
zoomKey: 'shiftKey',
zoomMax: 315360000000,
- zoomMin: 600000,
+ zoomMin: 86400000,
editable: {
add: false,
updateTime: true, |
0469f03e2f8cd10e2fc0e158c48b2f11b2e30e24 | src/loading.js | src/loading.js |
'use strict';
var EventEmitter = require('events'),
util = require('util');
/**
* The emitter returned by methods that load data from an external source.
* @constructor
* @fires Loading#error
* @fires Loading#loaded
*/
function Loading(config) {
EventEmitter.call(this);
}
util.inherits(Loading, EventEmi... |
'use strict';
var EventEmitter = require('events'),
util = require('util');
/**
* The emitter returned by methods that load data from an external source.
* @constructor
* @fires Loading#error
* @fires Loading#loaded
*/
function Loading(config) {
EventEmitter.call(this);
}
util.inherits(Loading, EventEmi... | Return Loading from Loading methods. | Return Loading from Loading methods.
| JavaScript | mit | mattunderscorechampion/uk-petitions,mattunderscorechampion/uk-petitions | ---
+++
@@ -16,29 +16,33 @@
util.inherits(Loading, EventEmitter);
Loading.prototype.loaded = function(data) {
this.emit('loaded', data);
+ return this;
};
Loading.prototype.error = function(error) {
if (typeof error === 'string') {
this.emit('error', new Error(error));
- return;
+ ... |
303d211596c8ed7f48297198477d2f6054854f88 | test/spec/spec-helper.js | test/spec/spec-helper.js | "use strict";
// Angular is refusing to recognize the HawtioNav stuff
// when testing even though its being loaded
beforeEach(module(function ($provide) {
$provide.provider("HawtioNavBuilder", function() {
function Mocked() {}
this.create = function() {return this;};
this.id = function() {return this;};
... | "use strict";
beforeEach(module(function ($provide) {
$provide.factory("HawtioExtension", function() {
return {
add: function() {}
};
});
}));
// Make sure a base location exists in the generated test html
if (!$('head base').length) {
$('head').append($('<base href="/">'));
}
angular.module... | Remove HawtioNav* mocks (no longer used) | Remove HawtioNav* mocks (no longer used)
We're using Patternfly nav now.
| JavaScript | apache-2.0 | openshift/origin-web-console,openshift/origin-web-console,openshift/origin-web-console,openshift/origin-web-console | ---
+++
@@ -1,32 +1,11 @@
"use strict";
-// Angular is refusing to recognize the HawtioNav stuff
-// when testing even though its being loaded
beforeEach(module(function ($provide) {
- $provide.provider("HawtioNavBuilder", function() {
- function Mocked() {}
- this.create = function() {return this;};
- t... |
0edcb9fd044cc56799184b8d6740e1b5894d75bf | src/methods/avatars/get.js | src/methods/avatars/get.js | import connection from '../../config/database';
module.exports.register = (server, options, next) => {
async function getAvatar(userid, next) {
try {
const employee = await connection
.table('avatars')
.filter({ userid: userid.toUpperCase() })
.nth(0)
.run();
next(nul... | import connection from '../../config/database';
module.exports.register = (server, options, next) => {
async function getAvatar(userid, next) {
try {
const employee = await connection
.table('avatars')
.filter({ userid: userid.toUpperCase() })
.orderBy(connection.desc('taken'))
... | Add sort by "taken" date to avatar query, so the most recent image is returned for the person. | Add sort by "taken" date to avatar query, so the most recent
image is returned for the person.
| JavaScript | mit | ocean/higgins,ocean/higgins | ---
+++
@@ -6,6 +6,7 @@
const employee = await connection
.table('avatars')
.filter({ userid: userid.toUpperCase() })
+ .orderBy(connection.desc('taken'))
.nth(0)
.run();
|
9c225d0f19b19657b86a153f93562881048510b4 | lib/xpi.js | lib/xpi.js | var join = require("path").join;
var console = require("./utils").console;
var fs = require("fs-promise");
var zip = require("./zip");
var all = require("when").all;
var tmp = require('./tmp');
var bootstrapSrc = join(__dirname, "../data/bootstrap.js");
/**
* Takes a manifest object (from package.json) and build opti... | var join = require("path").join;
var console = require("./utils").console;
var fs = require("fs-promise");
var zip = require("./zip");
var all = require("when").all;
var tmp = require('./tmp');
var bootstrapSrc = join(__dirname, "../data/bootstrap.js");
/**
* Takes a manifest object (from package.json) and build opti... | Remove extra createBuildOptions for now | Remove extra createBuildOptions for now
| JavaScript | mpl-2.0 | Medeah/jpm,rpl/jpm,guyzmuch/jpm,wagnerand/jpm,guyzmuch/jpm,Medeah/jpm,matraska23/jpm,nikolas/jpm,freaktechnik/jpm,matraska23/jpm,alexduch/jpm,mozilla-jetpack/jpm,jsantell/jpm,Gozala/jpm,freaktechnik/jpm,rpl/jpm,nikolas/jpm,mozilla-jetpack/jpm,kkapsner/jpm,mozilla/jpm,mozilla-jetpack/jpm,jsantell/jpm,johannhof/jpm,alexd... | ---
+++
@@ -22,7 +22,6 @@
var cwd = process.cwd();
var xpiName = (manifest.name || "jetpack") + ".xpi";
var xpiPath = join(cwd, xpiName);
- var buildOptions = createBuildOptions(options);
return doFinalZip(cwd, xpiPath);
} |
e9e5f9f971c2acec8046002308857512836cdb07 | library.js | library.js | (function () {
"use strict";
var Frame = function (elem) {
if (typeof elem === 'string') {
elem = document.getElementById(elem);
}
var height = elem.scrollHeight;
var width = elem.scrollWidth;
var viewAngle = 45;
var aspect = width / (1.0 * height);... | (function () {
"use strict";
var Frame = function (elem) {
if (typeof elem === 'string') {
elem = document.getElementById(elem);
}
var height = elem.scrollHeight;
var width = elem.scrollWidth;
var viewAngle = 45;
var aspect = width / (1.0 * height);... | Add a shortcut method on node to add to frame | Add a shortcut method on node to add to frame
| JavaScript | mpl-2.0 | frewsxcv/graphosaurus | ---
+++
@@ -42,4 +42,8 @@
this.mesh.position = {x: x, y: y, z: z};
};
window.Node = Node;
+
+ Node.prototype.addTo = function (frame) {
+ frame.addNode(this);
+ };
}()); |
1693507cc26a2e273981edbd85c18d34019a170f | lib/cli.js | lib/cli.js | #! /usr/bin/env node
var program = require('commander'),
fs = require('fs'),
path = require('path'),
polish = require('./polish');
program
.version('1.0.0')
.option('-s, --stylesheet <path>', 'Path to a stylesheet (in CSS, SCSS, Sass, or Less).')
.option('-P, --plugins-directory <pat... | #! /usr/bin/env node
var program = require('commander'),
fs = require('fs'),
path = require('path'),
polish = require('./polish');
program
.version('1.0.0')
.option('-s, --stylesheet <path>', 'Path to a stylesheet (in CSS, SCSS, Sass, or Less).')
.option('-P, --plugins-directory <pat... | Print results when using the CLI. Can be turned off with `-q` or `--quiet`. | Print results when using the CLI. Can be turned off with `-q` or `--quiet`.
| JavaScript | mit | brendanlacroix/polish-css | ---
+++
@@ -8,17 +8,24 @@
program
.version('1.0.0')
.option('-s, --stylesheet <path>', 'Path to a stylesheet (in CSS, SCSS, Sass, or Less).')
- .option('-P, --plugins-directory <path>', 'Path to a directory of linting plugins')
- .option('-p, --plugins <modules>', 'Comma-separated list of lin... |
3b9971fa4a272c3aaac06cc1541c5ff5b9b9c409 | lib/jwt.js | lib/jwt.js | const fs = require('fs');
const process = require('process');
const jwt = require('jsonwebtoken');
// sign with RSA SHA256
// FIXME: move to env var
const cert = fs.readFileSync('private-key.pem'); // get private key
module.exports = generate;
function generate() {
const payload = {
// issued at time
iat:... | const fs = require('fs');
const process = require('process');
const jwt = require('jsonwebtoken');
const cert = process.env.PRIVATE_KEY || fs.readFileSync('private-key.pem');
module.exports = generate;
function generate() {
const payload = {
// issued at time
iat: Math.floor(new Date() / 1000),
// JWT ... | Load private key from env if possible | Load private key from env if possible
| JavaScript | isc | bkeepers/PRobot,probot/probot,pholleran-org/probot,pholleran-org/probot,pholleran-org/probot,probot/probot,probot/probot,bkeepers/PRobot | ---
+++
@@ -2,9 +2,7 @@
const process = require('process');
const jwt = require('jsonwebtoken');
-// sign with RSA SHA256
-// FIXME: move to env var
-const cert = fs.readFileSync('private-key.pem'); // get private key
+const cert = process.env.PRIVATE_KEY || fs.readFileSync('private-key.pem');
module.exports ... |
50ff490252eaa57c7858758cd8dbdc67a5dfe09c | app/js/root.js | app/js/root.js | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route, Redirect } from 'react-router';
import { syncReduxAndRouter } from 'redux-simple-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import createStore from './store';
i... | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, Route, Redirect } from 'react-router';
import { syncReduxAndRouter } from 'redux-simple-router';
import createHashHistory from 'history/lib/createHashHistory';
import createStore from './store';
import ... | Switch to hash-based history, fix redirect to /build on boot | Switch to hash-based history, fix redirect to /build on boot
| JavaScript | mit | maxmechanic/resumaker,maxmechanic/resumaker | ---
+++
@@ -3,7 +3,7 @@
import { Provider } from 'react-redux';
import { Router, Route, Redirect } from 'react-router';
import { syncReduxAndRouter } from 'redux-simple-router';
-import createBrowserHistory from 'history/lib/createBrowserHistory';
+import createHashHistory from 'history/lib/createHashHistory';
im... |
4033d8d6106842797b477edce3b333b987e749d2 | lib/index.js | lib/index.js | exports.initialize = require('./Bootstrapper')
exports.dep = require('./DependencySpec')
exports.events = require('../sdk/Events')
exports.iterable = require('../sdk/Iterable')
exports.decorators = require('./DecoratorManager')
exports.testable = require('./Testable') | exports.bootstrap = require('./Bootstrapper')
exports.dep = require('./DependencySpec')
exports.events = require('../sdk/Events')
exports.iterable = require('../sdk/Iterable')
exports.decorators = require('./DecoratorManager')
exports.testable = require('./Testable') | Update exports to match bootstrap naming convention | Update exports to match bootstrap naming convention
| JavaScript | mit | bsgbryan/madul | ---
+++
@@ -1,4 +1,4 @@
-exports.initialize = require('./Bootstrapper')
+exports.bootstrap = require('./Bootstrapper')
exports.dep = require('./DependencySpec')
exports.events = require('../sdk/Events')
exports.iterable = require('../sdk/Iterable') |
b1fe753d47c00b293432d80de98a1c8b76b811e3 | lib/index.js | lib/index.js | var Sequelize = require('sequelize'),
_ = require('lodash');
module.exports = function(target) {
if (target instanceof Sequelize.Model) {
// Model
createHook(target);
} else {
// Sequelize instance
target.afterDefine(createHook);
}
}
function createHook(model) {
model.addHook('beforeFindA... | var Sequelize = require('sequelize'),
_ = require('lodash');
module.exports = function(target) {
if (target instanceof Sequelize.Model) {
// Model
createHook(target);
} else {
// Sequelize instance
target.afterDefine(createHook);
}
}
function createHook(model) {
model.addHook('beforeFindA... | Replace usage of deprecated model.attributes | Replace usage of deprecated model.attributes | JavaScript | mit | ackerdev/sequelize-attribute-roles | ---
+++
@@ -30,7 +30,7 @@
}
function attrProtected(model, role) {
- return _.keys(_.pickBy(model.attributes, function(attr, name) {
+ return _.keys(_.pickBy(model.rawAttributes, function(attr, name) {
return !_.isUndefined(attr.access) && ( attr.access === false || attr.access[role] === false );
}));
} |
5d4acafb8b9ec0814c147a10c1a2bafc653a4afa | static/chat.js | static/chat.js | $(function() {
// When we're using HTTPS, use WSS too.
var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";
var chatsock = new ReconnectingWebSocket(ws_scheme + '://' + window.location.host + "/chat" + window.location.pathname);
chatsock.onmessage = function(message) {
var d... | $(function() {
// When we're using HTTPS, use WSS too.
var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";
var chatsock = new ReconnectingWebSocket(ws_scheme + '://' + window.location.host + "/chat" + window.location.pathname);
chatsock.onmessage = function(message) {
var d... | Fix XSS issue in demo | Fix XSS issue in demo
| JavaScript | bsd-3-clause | TranDinhKhang/funkychat,jacobian/channels-example,jacobian/channels-example,ZipoZ/chatapp,cloud-fire/signalnews,cloud-fire/signalnews,cloud-fire/signalnews,ZipoZ/chatapp,davidkjtoh/GlorgoChat,TranDinhKhang/funkychat,TranDinhKhang/funkychat,jacobian/channels-example,ZipoZ/chatapp,davidkjtoh/GlorgoChat,davidkjtoh/GlorgoC... | ---
+++
@@ -5,11 +5,20 @@
chatsock.onmessage = function(message) {
var data = JSON.parse(message.data);
- $("#chat").append('<tr>'
- + '<td>' + data.timestamp + '</td>'
- + '<td>' + data.handle + '</td>'
- + '<td>' + data.message + ' </td>'
- + '</t... |
72c2a692ac1a6c123328413bb35ddb7dd648691e | client/views/rooms/room_view.js | client/views/rooms/room_view.js | Template.roomView.helpers({
room: function () {
return Rooms.findOne({_id: Session.get('currentRoom')});
},
roomUsers: function () {
var room = Rooms.findOne({_id: Session.get('currentRoom')});
return Meteor.users.find({_id: {$in: room.users}});
},
currentRooms: function () {... | Template.roomView.helpers({
room: function () {
return Rooms.findOne({_id: Session.get('currentRoom')});
},
roomUsers: function () {
var room = Rooms.findOne({_id: Session.get('currentRoom')});
if(room) {
return Meteor.users.find({_id: {$in: room.users}});
}
... | Handle room users case when not in room | Handle room users case when not in room
| JavaScript | mit | mattfeldman/nullchat,mattfeldman/nullchat,coreyaus/nullchat,praneybehl/nullchat,katopz/nullchat,katopz/nullchat,coreyaus/nullchat,praneybehl/nullchat | ---
+++
@@ -4,7 +4,12 @@
},
roomUsers: function () {
var room = Rooms.findOne({_id: Session.get('currentRoom')});
- return Meteor.users.find({_id: {$in: room.users}});
+ if(room) {
+ return Meteor.users.find({_id: {$in: room.users}});
+ }
+ else{
+ ... |
a9d315cb1305ba4d5941767a03c452edfb3ed2ea | app.js | app.js | var express = require('express');
var http = require('http');
var socketIO = require('socket.io');
var path = require('path');
var game = require('./game.js');
var app = express();
var server = http.Server(app);
var io = socketIO(server);
app.set('views', path.join(__dirname, 'templates'));
app.set('view engine', 'ja... | var express = require('express');
var http = require('http');
var socketIO = require('socket.io');
var path = require('path');
var game = require('./game.js');
var app = express();
var server = http.Server(app);
var io = socketIO(server);
app.set('views', path.join(__dirname, 'templates'));
app.set('view engine', 'ja... | Handle incoming card click event with simple logger | Handle incoming card click event with simple logger
| JavaScript | mit | vakila/net-set,vakila/net-set | ---
+++
@@ -31,6 +31,9 @@
socket.on('disconnect', function(){
console.log('DISCONNECT', socket.id);
});
+ socket.on('card click', function(click){
+ console.log('CARD CLICK', click.user, click.card);
+ });
});
server.listen(3000, function() { |
f10a56b256cf34a8932c93b62af12d0e70babd19 | lib/cli.js | lib/cli.js | "use strict";
const generate = require("./generate");
const log = require("./log");
const init = require("./init");
const program = require("commander");
module.exports = function() {
program.version("0.0.1");
program.command("generate")
.description("Generate site.")
.option("-v, --verbose",... | "use strict";
const generate = require("./generate");
const log = require("./log");
const init = require("./init");
const program = require("commander");
const version = require("../package.json").version;
module.exports = function() {
program.version(version);
program.command("generate")
.descriptio... | Make lerret -V return the actual version number. | Make lerret -V return the actual version number.
| JavaScript | apache-2.0 | jgrh/lerret | ---
+++
@@ -4,9 +4,10 @@
const log = require("./log");
const init = require("./init");
const program = require("commander");
+const version = require("../package.json").version;
module.exports = function() {
- program.version("0.0.1");
+ program.version(version);
program.command("generate")
... |
bbddd52a58e0762324f281c22f9f4c876285b21b | app.js | app.js | var express = require('express');
var http = require('http');
var path = require('path');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
var spotify = r... | var express = require('express');
var http = require('http');
var path = require('path');
var app = express();
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
var spotify = r... | Remove dev logging, don't need it. Console.log like in the old days! | Remove dev logging, don't need it. Console.log like in the old days!
| JavaScript | mit | david-crowell/spotify-remote,rmehner/spotify-remote | ---
+++
@@ -15,12 +15,7 @@
app.configure(function() {
app.set('port', process.env.PORT || 3000);
app.use(express.favicon());
- app.use(express.logger('dev'));
app.use(express.static(path.join(__dirname, 'public')));
-});
-
-app.configure('development', function() {
- app.use(express.errorHandler());
});
... |
fe9e1a025037fabbc2f4db1473537e42bfb5ecd9 | app.js | app.js | var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World from iojs ' + process.version + '!\n');
}).listen(process.env.port); | const http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(`Hello World from iojs ${process.version}!\n`);
}).listen(process.env.port); | Use const and string template | Use const and string template
| JavaScript | mit | felixrieseberg/iojs-azure,felixrieseberg/iojs-azure,thewazir/iojs-azure | ---
+++
@@ -1,6 +1,6 @@
-var http = require('http');
+const http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
- res.end('Hello World from iojs ' + process.version + '!\n');
+ res.end(`Hello World from iojs ${process.version}!\n`);
}).listen(pr... |
865a1835651ee0c9223013b7b56ce07d4c9d25ae | module/index.js | module/index.js | const ifElse = require('1-liners/ifElse');
const isFunction = require('1-liners/isFunction');
const filter = require('1-liners/filter');
const compose = require('1-liners/compose');
const castBool = (val) => val === true;
const throwError = (msg) => () => { throw new Error(msg); };
const filterCurried = (filterFn) =>... | const ifElse = require('1-liners/ifElse');
const isFunction = require('1-liners/isFunction');
const filter = require('1-liners/filter');
const throwError = (msg) => () => { throw new Error(msg); };
const filterCurried = (filterFn) => ifElse(
Array.isArray,
(arr) => filter(filterFn, arr),
throwError('Filter expe... | Update logic to fixed test | Update logic to fixed test
| JavaScript | mit | studio-b12/doxie.filter | ---
+++
@@ -1,14 +1,12 @@
const ifElse = require('1-liners/ifElse');
const isFunction = require('1-liners/isFunction');
const filter = require('1-liners/filter');
-const compose = require('1-liners/compose');
-const castBool = (val) => val === true;
const throwError = (msg) => () => { throw new Error(msg); };
... |
c0bc950791feae6b5b81b5e08f5fb125ec0616bb | src/vs/editor/buildfile.js | src/vs/editor/buildfile.js | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | Exclude `simpleWorker` from `editorSimpleWorker` in bundling | Exclude `simpleWorker` from `editorSimpleWorker` in bundling
| JavaScript | mit | williamcspace/vscode,0xmohit/vscode,hoovercj/vscode,0xmohit/vscode,DustinCampbell/vscode,KattMingMing/vscode,stringham/vscode,radshit/vscode,stringham/vscode,edumunoz/vscode,Zalastax/vscode,mjbvz/vscode,cleidigh/vscode,Zalastax/vscode,bsmr-x-script/vscode,edumunoz/vscode,SofianHn/vscode,microlv/vscode,hashhar/vscode,si... | ---
+++
@@ -32,6 +32,6 @@
createModuleDescription('vs/editor/common/worker/editorWorkerServer', ['vs/base/common/worker/workerServer']),
'vs/base/common/severity'
),
- createModuleDescription('vs/editor/common/services/editorSimpleWorker'),
+ createModuleDescription('vs/editor/common/services/editorSimpl... |
e227cf88360aab1c5a617df46aada1cd34a4aba0 | client/modules/core/components/.stories/poll_buttons.js | client/modules/core/components/.stories/poll_buttons.js | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { withKnobs, text, boolean, number, object } from '@kadira/storybook-addon-knobs';
import { setComposerStub } from 'react-komposer';
import PollButtons from '../poll_buttons.jsx';
import palette from '../../libs/palette';
storiesO... | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { withKnobs, text, boolean, number, object } from '@kadira/storybook-addon-knobs';
import { setComposerStub } from 'react-komposer';
import PollButtons from '../poll_buttons.jsx';
import palette from '../../libs/palette';
storiesO... | Add isLoggedIn knob to story for pollButtons | Add isLoggedIn knob to story for pollButtons
| JavaScript | mit | thancock20/voting-app,thancock20/voting-app | ---
+++
@@ -26,11 +26,13 @@
}
]
});
+ const isLoggedIn = boolean('isLoggedIn', true);
const colorScale = palette([ 'tol', 'tol-rainbow' ], poll.options.length);
return (
<PollButtons
poll={poll}
colorScale={colorScale}
+ isLoggedIn={isLoggedIn}
... |
5db4e14f5e228390520605e6123e86a6ce199dd2 | cli/run-yeoman-process.js | cli/run-yeoman-process.js | /**
* Copyright 2013-2020 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... | /**
* Copyright 2013-2020 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... | Change another options log from info to debug | Change another options log from info to debug | JavaScript | apache-2.0 | PierreBesson/generator-jhipster,ctamisier/generator-jhipster,mraible/generator-jhipster,wmarques/generator-jhipster,atomfrede/generator-jhipster,pascalgrimaud/generator-jhipster,vivekmore/generator-jhipster,ctamisier/generator-jhipster,mraible/generator-jhipster,liseri/generator-jhipster,atomfrede/generator-jhipster,mr... | ---
+++
@@ -27,7 +27,7 @@
const command = process.argv[2];
const options = getCommandOptions(packageJson, process.argv.slice(3));
logger.info(chalk.yellow(`Executing ${command} on ${process.cwd()}`));
-logger.info(chalk.yellow(`Options: ${toString(options)}`));
+logger.debug(chalk.yellow(`Options: ${toString(optio... |
d927838b6cfaa68c198a27eb23bc2447db9db819 | client/.storybook/main.js | client/.storybook/main.js | module.exports = {
"stories": [
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials"
],
"core": {
"builder": "webpack5"
}
}
| module.exports = {
"stories": [
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials"
],
"core": {
"builder": "webpack5"
},
"webpackFinal": (config) => {
config.resolve.fallback.crypto = false;
return config;
},
}
| Add crypto to storybook fallbacks | Add crypto to storybook fallbacks
| JavaScript | bsd-3-clause | gasman/wagtail,jnns/wagtail,rsalmaso/wagtail,rsalmaso/wagtail,jnns/wagtail,wagtail/wagtail,torchbox/wagtail,mixxorz/wagtail,gasman/wagtail,rsalmaso/wagtail,wagtail/wagtail,wagtail/wagtail,thenewguy/wagtail,gasman/wagtail,thenewguy/wagtail,zerolab/wagtail,mixxorz/wagtail,zerolab/wagtail,thenewguy/wagtail,thenewguy/wagta... | ---
+++
@@ -8,5 +8,9 @@
],
"core": {
"builder": "webpack5"
- }
+ },
+ "webpackFinal": (config) => {
+ config.resolve.fallback.crypto = false;
+ return config;
+ },
} |
bb8c64b15782626e15bf87a8d990dbefaf796791 | server/app/scripts/services/stdout.js | server/app/scripts/services/stdout.js | 'use strict';
angular.module('app').service('stdout', ['$window', function($window) {
var callback = undefined;
var websocket = undefined;
this.subscribe = function(path, _callback) {
callback = _callback;
var proto = ($window.location.protocol == 'https:' ? 'wss' : 'ws');
var route = [proto, "://", $window... | 'use strict';
angular.module('app').service('stdout', ['$window', function($window) {
var callback = undefined;
var websocket = undefined;
this.subscribe = function(path, _callback) {
callback = _callback;
var proto = ($window.location.protocol == 'https:' ? 'wss' : 'ws');
var route = [proto, "://", $window... | Update API endpoint for websockets | Update API endpoint for websockets
| JavaScript | apache-2.0 | armab/drone,dtan4/drone,Clever/drone,mvdkleijn/drone,reinbach/drone,feelobot/drone,pombredanne/drone,armab/drone,feelobot/drone,lins05/drone,gpndata/drone,olalonde/drone,oliveiradan/drone,opavader/drone,shift/drone,mikaelhg/drone,mvdkleijn/drone,nils-werner/drone,rancher/drone,carnivalmobile/drone,armab/drone,simonoff/... | ---
+++
@@ -8,7 +8,7 @@
callback = _callback;
var proto = ($window.location.protocol == 'https:' ? 'wss' : 'ws');
- var route = [proto, "://", $window.location.host, '/api/feed/stdout/', path].join('');
+ var route = [proto, "://", $window.location.host, '/api/stream/stdout/', path].join('');
websocket... |
d937ed31d5e106b0216a6007a095a92356474b3d | lib/cartodb/models/aggregation/aggregation-proxy.js | lib/cartodb/models/aggregation/aggregation-proxy.js | const RasterAggregation = require('./raster-aggregation');
const VectorAggregation = require('./vector-aggregation');
const RASTER_AGGREGATION = 'RasterAggregation';
const VECTOR_AGGREGATION = 'VectorAggregation';
module.exports = class AggregationProxy {
constructor (mapconfig, resolution = 256, threshold = 10e5,... | const RasterAggregation = require('./raster-aggregation');
const VectorAggregation = require('./vector-aggregation');
const RASTER_AGGREGATION = 'RasterAggregation';
const VECTOR_AGGREGATION = 'VectorAggregation';
module.exports = class AggregationProxy {
constructor (mapconfig, { resolution = 256, threshold = 10e... | Add params to instantiate aggregation | Add params to instantiate aggregation
| JavaScript | bsd-3-clause | CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb | ---
+++
@@ -4,11 +4,12 @@
const VECTOR_AGGREGATION = 'VectorAggregation';
module.exports = class AggregationProxy {
- constructor (mapconfig, resolution = 256, threshold = 10e5, placement = 'centroid') {
+ constructor (mapconfig, { resolution = 256, threshold = 10e5, placement = 'centroid', columns = {}} = ... |
96bb0cbda0c92478633b3537b2593e81603aaa54 | src/browser/todos/Page.react.js | src/browser/todos/Page.react.js | import Buttons from './Buttons.react';
import Component from 'react-pure-render/component';
import DocumentTitle from 'react-document-title';
import List from './List.react';
import NewTodo from './NewTodo.react';
import React, {PropTypes} from 'react';
import fetch from '../../common/components/fetch';
import {fetchUs... | import Buttons from './Buttons.react';
import Component from 'react-pure-render/component';
import DocumentTitle from 'react-document-title';
import List from './List.react';
import NewTodo from './NewTodo.react';
import React, {PropTypes} from 'react';
import fetch from '../../common/components/fetch';
import {fetchUs... | Change mention of client to browser to match src structure | Change mention of client to browser to match src structure
| JavaScript | mit | GarrettSmith/schizophrenia,abelaska/este,langpavel/este,este/este,XeeD/este,TheoMer/este,estaub/my-este,TheoMer/Gyms-Of-The-World,skyuplam/debt_mgmt,syroegkin/mikora.eu,christophediprima/este,estaub/my-este,este/este,puzzfuzz/othello-redux,skallet/este,steida/este,sikhote/davidsinclair,este/este,robinpokorny/este,abela... | ---
+++
@@ -7,8 +7,8 @@
import fetch from '../../common/components/fetch';
import {fetchUserTodos} from '../../common/todos/actions';
-// This decorator (higher order component) fetches todos both on client and
-// server side. It's true isomorphic data fetching and rendering.
+// This decorator (higher order com... |
ccee089077bcf796f74b98421ec0f891da249382 | test/integration/sync_corpus.js | test/integration/sync_corpus.js | var test = require('tap').test;
var corpus = require('../fixtures/corpus');
var Sentiment = require('../../lib/index');
var sentiment = new Sentiment();
var dataset = corpus;
var result = sentiment.analyze(dataset);
test('synchronous corpus', function (t) {
t.type(result, 'object');
t.equal(result.score, -4);... | var test = require('tap').test;
var corpus = require('../fixtures/corpus');
var Sentiment = require('../../lib/index');
var sentiment = new Sentiment();
var dataset = corpus;
var result = sentiment.analyze(dataset);
test('synchronous corpus', function (t) {
t.type(result, 'object');
t.equal(result.score, -4);... | Fix integration test based on updates to tokenizer | Fix integration test based on updates to tokenizer
| JavaScript | mit | thisandagain/sentiment | ---
+++
@@ -9,7 +9,7 @@
test('synchronous corpus', function (t) {
t.type(result, 'object');
t.equal(result.score, -4);
- t.equal(result.tokens.length, 1426);
+ t.equal(result.tokens.length, 1428);
t.equal(result.words.length, 74);
t.end();
}); |
163482c08cb10b39decc90759a9c75a3d20677ea | test/common.js | test/common.js | /*global unexpected:true, expect:true, expectWithUnexpectedMagicPen:true, setImmediate:true, weknowhow*/
/* eslint no-unused-vars: "off" */
unexpected = typeof weknowhow === 'undefined' ?
require('../lib/').clone() :
weknowhow.expect.clone();
unexpected.output.preferredWidth = 80;
unexpected.addAssertion('<an... | /*global unexpected:true, expect:true, expectWithUnexpectedMagicPen:true, setImmediate:true, weknowhow, jasmine*/
/* eslint no-unused-vars: "off" */
unexpected = typeof weknowhow === 'undefined' ?
require('../lib/').clone() :
weknowhow.expect.clone();
unexpected.output.preferredWidth = 80;
unexpected.addAsser... | Set the Jest timeout to one minute | Set the Jest timeout to one minute
| JavaScript | mit | unexpectedjs/unexpected,alexjeffburke/unexpected,alexjeffburke/unexpected | ---
+++
@@ -1,4 +1,4 @@
-/*global unexpected:true, expect:true, expectWithUnexpectedMagicPen:true, setImmediate:true, weknowhow*/
+/*global unexpected:true, expect:true, expectWithUnexpectedMagicPen:true, setImmediate:true, weknowhow, jasmine*/
/* eslint no-unused-vars: "off" */
unexpected = typeof weknowhow === 'u... |
6d0ecec3d5e6d233dd50bd69554e1943256e6ed6 | tests/utils.js | tests/utils.js | const each = require('lodash/each');
function captureError(fn) {
try {
fn();
}
catch (e) {
return e;
}
return null;
}
function restore(obj) {
each(obj, v => {
if (v && v.toString() === 'stub') v.restore();
});
}
module.exports = {
captureError,
restore
};
| const each = require('lodash/each');
function captureError(fn) {
try {
fn();
}
catch (e) {
return e;
}
return null;
}
module.exports = {
captureError
};
| Remove unused restore() test util | Remove unused restore() test util
| JavaScript | bsd-3-clause | praekelt/numi-api | ---
+++
@@ -13,14 +13,6 @@
}
-function restore(obj) {
- each(obj, v => {
- if (v && v.toString() === 'stub') v.restore();
- });
-}
-
-
module.exports = {
- captureError,
- restore
+ captureError
}; |
94e033902bac9c948ff0cfb72576a8e6c7c3cdce | root/scripts/gebo/perform.js | root/scripts/gebo/perform.js | // For testing
if (typeof module !== 'undefined') {
$ = require('jquery');
gebo = require('../config').gebo;
FormData = require('./__mocks__/FormData');
}
/**
* Send a request to the gebo. The message can be sent
* as FormData or JSON.
*
* @param object
* @param FormData - optional
... | // For testing
if (typeof module !== 'undefined') {
$ = require('jquery');
gebo = require('../config').gebo;
FormData = require('./__mocks__/FormData');
}
/**
* Send a request to the gebo. The message can be sent
* as FormData or JSON.
*
* @param object
* @param FormData - optional
... | Add processData and contentType properties to ajax call | Add processData and contentType properties to ajax call
| JavaScript | mit | RaphaelDeLaGhetto/grunt-init-gebo-react-hai,RaphaelDeLaGhetto/grunt-init-gebo-react-hai | ---
+++
@@ -41,6 +41,8 @@
url: gebo + '/perform',
type: 'POST',
data: data,
+ processData: false,
+ contentType: false,
success: function(data) {
done();
}, |
6988301e982506f361933b25149b89f2ceb3e54c | react/components/UI/Modal/Modal.js | react/components/UI/Modal/Modal.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import ModalDialog from 'react/components/UI/ModalDialog';
const ModalBackdrop = styled.div`
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
right: 0;... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import ModalDialog from 'react/components/UI/ModalDialog';
const ModalBackdrop = styled.div`
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
right: 0;... | Make sure modal dialog appears over topbar header | Make sure modal dialog appears over topbar header
| JavaScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | ---
+++
@@ -15,6 +15,7 @@
left: 0;
background-color: rgba(255, 255, 255, 0.9);
z-index: 6001;
+ transform: translate3d(0, 0, 1px);
`;
export default class Modal extends Component { |
57835d31ab5419fcadfad2a06a63be11ae2796bb | list-sources.js | list-sources.js | const {readdirSync} = require('fs');
function listDir(dir) {
readdirSync(dir)
.filter(f => f.endsWith('.cc'))
.forEach(f => console.log(dir + '/' + f));
}
listDir('src');
listDir('src/UiArea');
listDir('src/arch/win32');
| const readdirSync = require('fs').readdirSync;
function listDir(dir) {
readdirSync(dir)
.filter(f => f.endsWith('.cc'))
.forEach(f => console.log(dir + '/' + f));
}
listDir('src');
listDir('src/UiArea');
listDir('src/arch/win32');
| Fix unsupported syntax in node 4 | Fix unsupported syntax in node 4
| JavaScript | mit | parro-it/libui-node,parro-it/libui-node,parro-it/libui-node,parro-it/libui-node | ---
+++
@@ -1,4 +1,4 @@
-const {readdirSync} = require('fs');
+const readdirSync = require('fs').readdirSync;
function listDir(dir) {
readdirSync(dir)
@@ -9,5 +9,3 @@
listDir('src');
listDir('src/UiArea');
listDir('src/arch/win32');
-
- |
9d46ac9ff9a7bfe0f2f661675d67243f851f5f7a | src/OAuth/Request.js | src/OAuth/Request.js | /**
* Factory object for XMLHttpRequest
*/
function Request(debug) {
var XMLHttpRequest;
switch (true)
{
case typeof global.Titanium.Network.createHTTPClient != 'undefined':
XMLHttpRequest = global.Titanium.Network.createHTTPClient();
break;
// CommonJS require
case typeof require != 'un... | /**
* Factory object for XMLHttpRequest
*/
function Request(debug) {
var XHR;
switch (true)
{
case typeof global.Titanium != 'undefined' && typeof global.Titanium.Network.createHTTPClient != 'undefined':
XHR = global.Titanium.Network.createHTTPClient();
break;
// CommonJS require
case ty... | Rename to XHR to avoid clashes, added extra check for Titanium object first | Rename to XHR to avoid clashes, added extra check for Titanium object first
| JavaScript | mit | maxogden/jsOAuth,aoman89757/jsOAuth,cklatik/jsOAuth,bytespider/jsOAuth,aoman89757/jsOAuth,cklatik/jsOAuth,bytespider/jsOAuth | ---
+++
@@ -2,24 +2,24 @@
* Factory object for XMLHttpRequest
*/
function Request(debug) {
- var XMLHttpRequest;
+ var XHR;
switch (true)
{
- case typeof global.Titanium.Network.createHTTPClient != 'undefined':
- XMLHttpRequest = global.Titanium.Network.createHTTPClient();
+ case typeof glo... |
39e652b50a44fdea520d5b97a3cc305d008c409e | src/actions/index.js | src/actions/index.js | import { ReadingRecord, ChapterCache } from 'actions/ConfigActions';
export const markNotificationSent = async ({comicID, chapterID}) => {
try {
const readingRecord = await ReadingRecord.get(comicID);
ReadingRecord.put({
...readingRecord,
[chapterID]: 'notification_sent'
});
} catch(err) {
ReadingRecor... | import { ReadingRecord, ChapterCache } from 'actions/ConfigActions';
export const markNotificationSent = async ({comicID, chapterID}) => {
try {
const readingRecord = await ReadingRecord.get(comicID);
ReadingRecord.put({
...readingRecord,
[chapterID]: 'notification_sent'
});
} catch(err) {
ReadingRecor... | Fix wrong model for replaceChapterCache | Fix wrong model for replaceChapterCache
| JavaScript | mit | ComicsReader/reader,ComicsReader/reader,ComicsReader/app,ComicsReader/app | ---
+++
@@ -18,7 +18,7 @@
export const replaceChapterCache = async ({comicID, chapters}) => {
try {
const chapterCache = await ChapterCache.get(comicID);
- ReadingRecord.put({
+ ChapterCache.put({
...chapterCache,
chapters
}); |
168ad7c6ee4e2e92db03e2061f4f5c1fb86a89a8 | src/reducers.js | src/reducers.js | import { combineReducers } from 'redux';
// import constellations from './constellations/reducers';
import core from './core/reducers';
// import galaxies from './galaxies/reducers';
// import universe from './universe/reducers';
const appReducer = combineReducers({
// constellations,
core,
// galaxies,
// un... | import { combineReducers } from 'redux';
// import constellations from './constellations/reducers';
import core from './core/reducers';
// import galaxies from './galaxies/reducers';
// import universe from './universe/reducers';
// import metaverse from './metaverse/reducers';
// import userprofiles from './userprofi... | Add user profiles and metaverse | Add user profiles and metaverse
| JavaScript | mit | GetGee/G,GetGee/G | ---
+++
@@ -4,12 +4,16 @@
import core from './core/reducers';
// import galaxies from './galaxies/reducers';
// import universe from './universe/reducers';
+// import metaverse from './metaverse/reducers';
+// import userprofiles from './userprofiles/reducers';
const appReducer = combineReducers({
// constel... |
8881105f02d5ea1e7e67ee66c2c3972e7ecaa32e | package.js | package.js | Package.describe({
name: 'metemq:metemq',
version: '0.3.1',
// Brief, one-line summary of the package.
summary: 'MeteMQ',
// URL to the Git repository containing the source code for this package.
git: '',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting doc... | Package.describe({
name: 'metemq:metemq',
version: '0.3.2',
// Brief, one-line summary of the package.
summary: 'MeteMQ',
// URL to the Git repository containing the source code for this package.
git: '',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting doc... | Update meteor version to 1.4.1, bump version to 0.3.2 | Update meteor version to 1.4.1, bump version to 0.3.2
| JavaScript | mit | metemq/metemq,metemq/metemq | ---
+++
@@ -1,6 +1,6 @@
Package.describe({
name: 'metemq:metemq',
- version: '0.3.1',
+ version: '0.3.2',
// Brief, one-line summary of the package.
summary: 'MeteMQ',
// URL to the Git repository containing the source code for this package.
@@ -19,7 +19,7 @@
});
Package.onUse(function(api) {
- ap... |
8d6af60aa805576907834e57f8e02b593775d2b1 | server/interests/interestsController.js | server/interests/interestsController.js | var Interests = require('./interests.server.model.js');
var Q = require('q');
module.exports = {
add: function (req, res, next) {
var interest = {};
interest.id = req.body.id;
//interest.user = req.user._id;
var addInterest = Q.nbind(Interests.create, Interests);
addInterest(interest)
.t... | var Interests = require('./interests.server.model.js');
var Q = require('q');
module.exports = {
add: function (req, res, next) {
var interest = {};
interest.id = req.body.id;
interest.user = req.user._id;
var addInterest = Q.nbind(Interests.create, Interests);
addInterest(interest)
.the... | Add user._id to interest document. | Add user._id to interest document.
| JavaScript | mit | HRR2-Brainstorm/Brainstorm,JulieMarie/Brainstorm,JulieMarie/Brainstorm,plauer/Brainstorm,drabinowitz/Brainstorm,ekeric13/Brainstorm,EJJ-Brainstorm/Brainstorm,EJJ-Brainstorm/Brainstorm,ekeric13/Brainstorm | ---
+++
@@ -5,7 +5,7 @@
add: function (req, res, next) {
var interest = {};
interest.id = req.body.id;
- //interest.user = req.user._id;
+ interest.user = req.user._id;
var addInterest = Q.nbind(Interests.create, Interests);
|
4499e00b0d4f12afa60be3cf57baf1362385cf2d | src/Plugins/Client/PrettyBrowserConsoleErrors.js | src/Plugins/Client/PrettyBrowserConsoleErrors.js | const JSONRPC = {};
JSONRPC.ClientPluginBase = require("../../ClientPluginBase");
/**
* PrettyBrowserConsoleErrors plugin.
* @class
* @extends JSONRPC.ClientPluginBase
*/
module.exports =
class PrettyBrowserConsoleErrors extends JSONRPC.ClientPluginBase
{
/**
* Catches the exception and prints it.
... | const JSONRPC = {};
JSONRPC.ClientPluginBase = require("../../ClientPluginBase");
JSONRPC.Exception = require("../../Exception");
/**
* PrettyBrowserConsoleErrors plugin.
* @class
* @extends JSONRPC.ClientPluginBase
*/
module.exports =
class PrettyBrowserConsoleErrors extends JSONRPC.ClientPluginBase
{
... | Add missing require in client plugin | Add missing require in client plugin
| JavaScript | mit | oxygen/jsonrpc-bidirectional,bigstepinc/jsonrpc-bidirectional,oxygen/jsonrpc-bidirectional,bigstepinc/jsonrpc-bidirectional | ---
+++
@@ -1,5 +1,6 @@
const JSONRPC = {};
JSONRPC.ClientPluginBase = require("../../ClientPluginBase");
+JSONRPC.Exception = require("../../Exception");
/**
* PrettyBrowserConsoleErrors plugin. |
5f823f52edc5ad4e9652e75f9474ba327a8e346d | src/api.js | src/api.js | import fetch from 'unfetch'
const apiBase = 'https://api.hackclub.com/'
const methods = ['get', 'put', 'post', 'patch']
const generateMethod = method => (path, options) => {
// authToken is shorthand for Authorization: Bearer `authtoken`
let filteredOptions = {}
for (let [key, value] of Object.entries(options))... | import fetch from 'unfetch'
const apiBase = 'https://api.hackclub.com/'
const methods = ['get', 'put', 'post', 'patch']
const generateMethod = method => (path, options) => {
// authToken is shorthand for Authorization: Bearer `authtoken`
let filteredOptions = {}
for (let [key, value] of Object.entries(options))... | Fix missing request body in API client | Fix missing request body in API client
| JavaScript | mit | hackclub/website,hackclub/website,hackclub/website | ---
+++
@@ -9,19 +9,13 @@
for (let [key, value] of Object.entries(options)) {
switch (key) {
case 'authToken':
- filteredOptions = {
- ...filteredOptions,
- ...{ headers: { Authorization: `Bearer ${value}` } }
- }
+ filteredOptions.headers = filteredOptions.header... |
a7683d7f2b3611dd1429fd5725a32f12b78ba7d9 | src/app.js | src/app.js | const {
getQueryStringParam,
substanceGlobals,
platform
} = window.substance
const {
StencilaDesktopApp
} = window.stencila
const ipc = require('electron').ipcRenderer
const darServer = require('dar-server')
const { FSStorageClient } = darServer
const url = require('url')
const path = require('path')
const re... | const {
getQueryStringParam,
substanceGlobals,
platform
} = window.substance
const {
StencilaDesktopApp
} = window.stencila
const ipc = require('electron').ipcRenderer
const darServer = require('dar-server')
const { FSStorageClient } = darServer
const url = require('url')
const path = require('path')
const re... | Stop the host on window unload | Stop the host on window unload
| JavaScript | apache-2.0 | stencila/electron | ---
+++
@@ -44,3 +44,8 @@
}, window.document.body)
})
})
+
+window.addEventListener('beforeunload', () => {
+ // Stop the host (and any peer hosts that it has spawned)
+ host.stop()
+}) |
890aaddbf06a41a7daa2cec0b1f6a6f1a4a1cc78 | test/flora-cluster.spec.js | test/flora-cluster.spec.js | 'use strict';
var expect = require('chai').expect;
var floraCluster = require('../');
describe('flora-cluster', function () {
it('should be an object', function () {
expect(floraCluster).to.be.an('object');
});
});
| 'use strict';
var expect = require('chai').expect;
var floraCluster = require('../');
describe('flora-cluster', function () {
it('should be an object', function () {
expect(floraCluster).to.be.an('object');
});
it('should expose master and worker objects', function () {
expect(floraClust... | Add some interface tests for flora-cluster | Add some interface tests for flora-cluster
| JavaScript | mit | godmodelabs/flora-cluster | ---
+++
@@ -8,4 +8,22 @@
it('should be an object', function () {
expect(floraCluster).to.be.an('object');
});
+
+ it('should expose master and worker objects', function () {
+ expect(floraCluster).to.have.property('master');
+ expect(floraCluster).to.have.property('worker');
+ }... |
96c3b3745357d6cd31d0ecf0e8512413b0b82bb3 | src/constants/defaults.js | src/constants/defaults.js | export const ROWS = 10;
export const COLUMNS = 8;
export const SECTOR_LIMIT = 10;
export const MIN_DIMENSION = 5;
export const MAX_DIMENSION = 20;
export const LAYER_NAME_LENGTH = 30;
export const DEFAULT_HEX_WIDTH = 50; // Hex width when not rendering sector
export const HEX_PADDING = 2; // Pixels between hexes
export... | export const ROWS = 10;
export const COLUMNS = 8;
export const SECTOR_LIMIT = 10;
export const MIN_DIMENSION = 5;
export const MAX_DIMENSION = 20;
export const LAYER_NAME_LENGTH = 40;
export const DEFAULT_HEX_WIDTH = 50; // Hex width when not rendering sector
export const HEX_PADDING = 2; // Pixels between hexes
export... | Increase faction name length back up to 40 | Increase faction name length back up to 40
| JavaScript | mit | mpigsley/sectors-without-number,mpigsley/sectors-without-number | ---
+++
@@ -3,7 +3,7 @@
export const SECTOR_LIMIT = 10;
export const MIN_DIMENSION = 5;
export const MAX_DIMENSION = 20;
-export const LAYER_NAME_LENGTH = 30;
+export const LAYER_NAME_LENGTH = 40;
export const DEFAULT_HEX_WIDTH = 50; // Hex width when not rendering sector
export const HEX_PADDING = 2; // Pixels ... |
b1eddfe37d30a653ebb23a2807eba407cea847de | src/javascripts/frigging_bootstrap/components/select.js | src/javascripts/frigging_bootstrap/components/select.js | var React = require("react/addons")
var {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
var {div, select, option} = React.DOM
var cx = require("classnames")
export default class extends React.Component {
displayName = "Frig.friggingBootstrap.Select"
static default... | let React = require("react/addons")
let cx = require("classnames")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, select, option} = React.DOM
export default class ext... | Change _inputHtml Into Function Call In Select | Change _inputHtml Into Function Call In Select
Change _inputHtml from just passing the function to calling it in the
Select Component when the select is rendered out. This allows the merge
props to be the default props of the select.
| JavaScript | mit | TouchBistro/frig,TouchBistro/frig,frig-js/frig,frig-js/frig | ---
+++
@@ -1,7 +1,8 @@
-var React = require("react/addons")
-var {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
-var {div, select, option} = React.DOM
-var cx = require("classnames")
+let React = require("react/addons")
+let ... |
9b02c4e166444a0f33126812506b6b5dbffa6655 | src/request/stores/request-detail-store.js | src/request/stores/request-detail-store.js | 'use strict';
var glimpse = require('glimpse');
var requestRepository = require('../repository/request-repository');
// TODO: Not sure I need to store the requests
var _requests = {};
var _viewModel = {
selectedId: null,
request: null
};
function requestChanged(targetRequests) {
glimpse.emit('shell.reque... | 'use strict';
var glimpse = require('glimpse');
var requestRepository = require('../repository/request-repository');
// TODO: Not sure I need to store the requests
var _requests = {};
var _viewModel = {
selectedId: null,
request: null
};
function requestChanged(targetRequests) {
glimpse.emit('shell.reque... | Update comments to be clearer | Update comments to be clearer
| JavaScript | unknown | Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype | ---
+++
@@ -26,7 +26,7 @@
glimpse.on('shell.request.detail.closed', clearRequest);
})();
-// Found Data
+// Found Request
(function () {
function dataFound(payload) {
var newRequest = payload.newRequest;
@@ -44,7 +44,7 @@
glimpse.on('data.request.detail.found', dataFound);
})();
-// Tri... |
e111d680ac821e2f61bc405872caa4d29566b1c4 | src/components/logo.js | src/components/logo.js | export default class Logo {
render() {
return (
<div id="branding">
<a href="index.php" title="CosmoWiki.de" rel="home">
<img src="http://cosmowiki.de/img/cw_header.jpg" width="500" height="75" alt="CosmoWiki.de"/>
</a>
</div>
);
}
} | export default class Logo {
render() {
return (
<div id="branding">
<a href="/" title="CosmoWiki.de" rel="home">
<img src="/img/cw_header.jpg" width="500" height="75" alt="CosmoWiki.de"/>
</a>
</div>
);
}
} | Replace hard coded refs by relative. | Replace hard coded refs by relative. | JavaScript | mit | cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki | ---
+++
@@ -3,8 +3,8 @@
render() {
return (
<div id="branding">
- <a href="index.php" title="CosmoWiki.de" rel="home">
- <img src="http://cosmowiki.de/img/cw_header.jpg" width="500" height="75" alt="CosmoWiki.de"/>
+ <a href="/" title="CosmoWiki.de" rel="home">
+ <img sr... |
d76a165efef5ce03cbc5eda8161288d85519d78a | lib/build/tasks/jasmine.js | lib/build/tasks/jasmine.js | var js_files = require('../files/js_files');
module.exports = {
cartodbui: {
src: js_files.all.concat([
'lib/build/user_data.js',
'<%= assets_dir %>/javascripts/templates_mustache.js',
'<%= assets_dir %>/javascripts/templates.js',
'lib/build/test_init.js']),
options: {
keepRunne... | var js_files = require('../files/js_files');
module.exports = {
cartodbui: {
src: js_files.all.concat([
'lib/build/user_data.js',
'<%= assets_dir %>/javascripts/templates_mustache.js',
'<%= assets_dir %>/javascripts/templates.js',
'lib/build/test_init.js']),
options: {
keepRunne... | Increase timeout to 20 seconds (previously 10) | Increase timeout to 20 seconds (previously 10)
| JavaScript | bsd-3-clause | CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb | ---
+++
@@ -20,6 +20,7 @@
affected: {
options: {
+ timeout: 20000,
keepRunner: true,
outfile: '_SpecRunner-affected.html',
summary: true, |
d99736f34d2001921c487fd987ae55e3b6c05a29 | lib/parse/block-element.js | lib/parse/block-element.js | import Set from 'es6-set';
import blockElements from 'block-elements';
const BLOCK_ELEMENTS = new Set(blockElements);
const TEXT_ELEMENTS = {
h1: 'header1',
h2: 'header2',
h3: 'header3',
h4: 'header4',
h5: 'header5',
h6: 'header6',
p: 'paragraph',
blockquote: 'blockquote'
};
const isPullQuote = (elm) ... | import Set from 'es6-set';
import blockElements from 'block-elements';
const BLOCK_ELEMENTS = new Set(blockElements);
const TEXT_ELEMENTS = {
h1: 'header1',
h2: 'header2',
h3: 'header3',
h4: 'header4',
h5: 'header5',
h6: 'header6',
p: 'paragraph',
blockquote: 'blockquote'
};
const isPullQuote = (elm) ... | Create new object instead of modifying, to make sure they are optimized by V8 | Create new object instead of modifying, to make sure they are optimized by V8
| JavaScript | mit | micnews/html-to-article-json,micnews/html-to-article-json | ---
+++
@@ -17,6 +17,21 @@
return elm.classList.contains('q');
};
+const createBlockElement = (type, elm) => {
+ if (type === 'blockquote') {
+ return {
+ type,
+ pullQuote: isPullQuote(elm),
+ children: []
+ };
+ } else {
+ return {
+ type,
+ children: []
+ };
+ }
+};
+
... |
87f3710f43e5fd2d899de6b1b74cad716e154b5b | addon/components/lt-row.js | addon/components/lt-row.js | import Ember from 'ember';
import layout from 'ember-light-table/templates/components/lt-row';
const {
Component,
computed
} = Ember;
const Row = Component.extend({
layout,
tagName: 'tr',
classNames: ['lt-row'],
classNameBindings: ['isSelected', 'isExpanded', 'canExpand:is-expandable', 'canSelect:is-selec... | import Ember from 'ember';
import layout from 'ember-light-table/templates/components/lt-row';
const {
Component,
computed
} = Ember;
const Row = Component.extend({
layout,
tagName: 'tr',
classNames: ['lt-row'],
classNameBindings: ['isSelected', 'isExpanded', 'canExpand:is-expandable', 'canSelect:is-selec... | Fix typo for default colspan | Fix typo for default colspan | JavaScript | mit | offirgolan/ember-light-table,offirgolan/ember-light-table | ---
+++
@@ -18,7 +18,7 @@
tableActions: null,
canExpand: false,
canSelect: false,
- colpan: 1,
+ colspan: 1,
isSelected: computed.readOnly('row.selected'),
isExpanded: computed.readOnly('row.expanded') |
95c064b50ff7d7d174b778a4f50dc1a9fca83925 | src/activities/pizza/shared/parameters.js | src/activities/pizza/shared/parameters.js | define({
RoundCount: 2,
MinPlayers: 4,
RoundDuration: 90000
});
| define({
RoundCount: 4,
MinPlayers: 4,
RoundDuration: 90000
});
| Increase round count for Pizza Productivity | Increase round count for Pizza Productivity
| JavaScript | mpl-2.0 | councilforeconed/interactive-activities,jugglinmike/cee,councilforeconed/interactive-activities,jugglinmike/cee,councilforeconed/interactive-activities | ---
+++
@@ -1,5 +1,5 @@
define({
- RoundCount: 2,
+ RoundCount: 4,
MinPlayers: 4,
RoundDuration: 90000
}); |
2127952f1775686e8da53a55e23b236e0d6e67d0 | src/modules/Assetic.js | src/modules/Assetic.js | import layout from '../../config/layout'
const fixLocalAsset = assets => (
(Array.isArray(assets) ? assets : [assets]).map(asset => `/${asset}`)
)
export const getAssets = (localAssets = []) => (
Array.concat(
layout.script.map(item => item.src),
layout.link.map(item => item.href),
localAssets.map(ass... | import layout from '../../config/layout'
const fixLocalAsset = assets => (
(Array.isArray(assets) ? assets : [assets]).map(asset => `/${asset}`)
)
const normalizeAssets = assets => {
let normalized = []
assets.forEach(item => {
if (Array.isArray(item)) {
item.forEach(asset => {
normalized.pus... | Fix issue with multi dimensional arrays | Fix issue with multi dimensional arrays
| JavaScript | mit | janoist1/universal-react-redux-starter-kit | ---
+++
@@ -4,11 +4,27 @@
(Array.isArray(assets) ? assets : [assets]).map(asset => `/${asset}`)
)
+const normalizeAssets = assets => {
+ let normalized = []
+
+ assets.forEach(item => {
+ if (Array.isArray(item)) {
+ item.forEach(asset => {
+ normalized.push(asset)
+ })
+ } else {
+ ... |
2dd837ca80ea7ff8f357de0408c41f9f1cd627be | tests/functional/routes.js | tests/functional/routes.js | 'use strict';
/*global describe, it*/
var path = require('path');
var request = require('supertest');
var utils = require('../../lib/utils');
var app = require('../../app');
var routes = utils.requireDir(path.join(__dirname, '../../routes/'));
var host = process.env.manhattan_context__instance_hostname ||
... | 'use strict';
/*global describe, it*/
var path = require('path');
var request = require('supertest');
var utils = require('../../lib/utils');
var app = require('../../app');
var routes = utils.requireDir(path.join(__dirname, '../../routes/'));
var host = process.env.manhattan_context__instance_hostname || '... | Revert "Log which host is being functionally tested" | Revert "Log which host is being functionally tested"
This reverts commit 824ec144553499911160779833d978d282e88be6.
| JavaScript | bsd-3-clause | ericf/formatjs-site,ericf/formatjs-site | ---
+++
@@ -7,12 +7,9 @@
var app = require('../../app');
var routes = utils.requireDir(path.join(__dirname, '../../routes/'));
-var host = process.env.manhattan_context__instance_hostname ||
- 'http://localhost:' + app.get('port');
+var host = process.env.manhattan_context__instance_hostname || 'http://lo... |
e55ba7f94a1e71c372881c423c7256b4acf0eba6 | web/webpack/plugins/recipes.js | web/webpack/plugins/recipes.js | const config = require('./config');
const pwaOptions = require('./pwaConfig');
const PUBLIC_PATH = config.PUBLIC_PATH;
/**
* optional plugins enabled by enabling their recipe.
* once enabled they succeed being required and get added to plugin list.
* order them in the order they should be added to the plugin lists... | const config = require('./config');
const pwaOptions = require('./pwaConfig');
const PUBLIC_PATH = config.PUBLIC_PATH;
/**
* optional plugins enabled by enabling their recipe.
* once enabled they succeed being required and get added to plugin list.
* order them in the order they should be added to the plugin lists... | Fix using preload-webpack-plugin, not resource-hints-plugin | Fix using preload-webpack-plugin, not resource-hints-plugin
| JavaScript | mit | c-h-/universal-native-boilerplate,c-h-/universal-native-boilerplate,c-h-/universal-native-boilerplate,c-h-/universal-native-boilerplate,c-h-/universal-native-boilerplate | ---
+++
@@ -11,7 +11,7 @@
const optionalPlugins = [
{
recipe: 'hints',
- name: 'resource-hints-webpack-plugin',
+ name: 'preload-webpack-plugin',
prodOnly: false,
},
{ |
55a1f8d049c622edd4f68a6d9189c92e4adfe674 | lib/normalize-condition.js | lib/normalize-condition.js | var buildMoldsSelector = require('./build-molds-selector');
module.exports = function normalizeCondition(condition, alias) {
var moldsSelector = buildMoldsSelector(alias);
var moldSelected;
var normalized;
while(moldSelected = moldsSelector.exec(condition)) {
normalized = condition.replace(
moldSelected[0],... | var buildMoldsSelector = require('./build-molds-selector');
module.exports = function normalizeCondition(condition, alias) {
var moldsSelector = buildMoldsSelector(alias);
var moldSelected;
while(moldSelected = moldsSelector.exec(condition)) {
condition = condition.replace(
new RegExp(moldSelected[0], 'g'),
... | Add support of multiple molds per condition | Add support of multiple molds per condition
| JavaScript | mit | qron/ongine | ---
+++
@@ -4,15 +4,14 @@
var moldsSelector = buildMoldsSelector(alias);
var moldSelected;
- var normalized;
while(moldSelected = moldsSelector.exec(condition)) {
- normalized = condition.replace(
- moldSelected[0],
+ condition = condition.replace(
+ new RegExp(moldSelected[0], 'g'),
'fillers.' + ... |
b91f38017839b3ca0928cf3f145a71f172efd49f | src/components/Header.js | src/components/Header.js | import React, { Component } from 'react';
import Button from './Button';
export default class Header extends Component {
render() {
return (
<div className="App-header">
<div className="header-wrap">
<div className="header-content">
<h1>Connect. Collaborate. Create.</h... | import React, { Component } from 'react';
import Button from './Button';
export default class Header extends Component {
render() {
return (
<div className="App-header">
<div className="header-wrap">
<div className="header-content">
<h1>Connect. Collaborate. Create.</h... | Add slashes to buttons on homepage | Add slashes to buttons on homepage
| JavaScript | mit | theCoolKidsJavaScriptMeetup/cuddlyGuacamole,theCoolKidsJavaScriptMeetup/PeoriaHackathon,theCoolKidsJavaScriptMeetup/PeoriaHackathon,theCoolKidsJavaScriptMeetup/cuddlyGuacamole | ---
+++
@@ -11,8 +11,8 @@
<h2>August 12, 2017 <br/> 8am - 8pm</h2>
<h3>Peoria Civic Center (Verizon Lounge)<br></br><i>In Partnership with <a className="headerLink" href="http://www.ignitepeoria.com/" target="blank">Ignite Peoria</a></i></h3>
<div className="butto... |
662b688b40b49f0d2300f935502891dc55289541 | public/docs.js | public/docs.js | var showing = null
function hashChange() {
var hash = document.location.hash.slice(1)
var found = document.getElementById(hash), prefix, sect
if (found && (prefix = /^([^\.]+)/.exec(hash)) && (sect = document.getElementById("part_" + prefix[1]))) {
if (!sect.style.display) {
sect.style.display = "block... | var showing = null
function hashChange() {
var hash = decodeURIComponent(document.location.hash.slice(1))
var found = document.getElementById(hash), prefix, sect
if (found && (prefix = /^([^\.]+)/.exec(hash)) && (sect = document.getElementById("part_" + prefix[1]))) {
if (!sect.style.display) {
sect.st... | Fix problem with navigating to static methods in the reference guide | Fix problem with navigating to static methods in the reference guide
| JavaScript | mit | ProseMirror/website,ProseMirror/website | ---
+++
@@ -1,7 +1,7 @@
var showing = null
function hashChange() {
- var hash = document.location.hash.slice(1)
+ var hash = decodeURIComponent(document.location.hash.slice(1))
var found = document.getElementById(hash), prefix, sect
if (found && (prefix = /^([^\.]+)/.exec(hash)) && (sect = document.getEle... |
b08a4b1fe56352ad9dc30ef1a8dbc1498db46261 | core/client/components/gh-notification.js | core/client/components/gh-notification.js | var NotificationComponent = Ember.Component.extend({
classNames: ['js-bb-notification'],
typeClass: function () {
var classes = '',
message = this.get('message'),
type,
dismissible;
// Check to see if we're working with a DS.Model or a plain JS object
... | var NotificationComponent = Ember.Component.extend({
classNames: ['js-bb-notification'],
typeClass: function () {
var classes = '',
message = this.get('message'),
type,
dismissible;
// Check to see if we're working with a DS.Model or a plain JS object
... | Check the end of notification fade-out animation | Check the end of notification fade-out animation
| JavaScript | mit | javorszky/Ghost,allanjsx/Ghost,francisco-filho/Ghost,mlabieniec/ghost-env,Sebastian1011/Ghost,metadevfoundation/Ghost,lanffy/Ghost,Kikobeats/Ghost,zeropaper/Ghost,v3rt1go/Ghost,epicmiller/pages,smaty1/Ghost,panezhang/Ghost,gabfssilva/Ghost,bsansouci/Ghost,thinq4yourself/Unmistakable-Blog,arvidsvensson/Ghost,Jai-Chaudha... | ---
+++
@@ -31,7 +31,9 @@
self.$().on('animationend webkitAnimationEnd oanimationend MSAnimationEnd', function (event) {
/* jshint unused: false */
- self.notifications.removeObject(self.get('message'));
+ if (event.originalEvent.animationName === 'fade-out') {
+ ... |
8fe37e614d9848352258d60339c7415bdee12a5c | tests/Resources/minify/expected/regexes.js | tests/Resources/minify/expected/regexes.js | function testIssue74(){return/'/;}
!function(s){return/^[£$€?.]/.test(s);}();typeof
/ ' /;x=/ [/] /;1/foo;(2)/foo;function(){return/foo/};function(){return typeof/foo/};
| function testIssue74(){return/'/;}
!function(s){return/^[£$€?.]/.test(s);}();typeof/ ' /;x=/ [/] /;1/foo;(2)/foo;function(){return/foo/};function(){return typeof/foo/};
| Remove line break between typedef and regexp to be consistent with the other code places. | Remove line break between typedef and regexp to be consistent with the other
code places.
| JavaScript | bsd-3-clause | mrclay/jsmin-php,mrclay/jsmin-php | ---
+++
@@ -1,3 +1,2 @@
function testIssue74(){return/'/;}
-!function(s){return/^[£$€?.]/.test(s);}();typeof
-/ ' /;x=/ [/] /;1/foo;(2)/foo;function(){return/foo/};function(){return typeof/foo/};
+!function(s){return/^[£$€?.]/.test(s);}();typeof/ ' /;x=/ [/] /;1/foo;(2)/foo;function(){return/foo/};function(){return ... |
e5c1148583b076e9bdfb1c35e02c579ade240e3c | index.js | index.js | var doc = require('doc-js');
module.exports = function(hoverClass, selector){
var down = [],
selector = selector || 'button, a',
hoverClass = hoverClass || 'hover';
doc(document).on('touchstart mousedown', selector, function(event){
var target = doc(event.target).closest(selector);
... | var doc = require('doc-js');
module.exports = function(hoverClass, selector){
var down = [],
selector = selector || 'button, a',
hoverClass = hoverClass || 'hover';
function setClasses(){
for(var i = 0; i < down.length; i++){
doc(down[i]).addClass(hoverClass);
}
... | Allow hover to be canceled by a scroll | Allow hover to be canceled by a scroll
| JavaScript | mit | KoryNunn/hoverclass | ---
+++
@@ -5,14 +5,26 @@
selector = selector || 'button, a',
hoverClass = hoverClass || 'hover';
+ function setClasses(){
+ for(var i = 0; i < down.length; i++){
+ doc(down[i]).addClass(hoverClass);
+ }
+ }
+
doc(document).on('touchstart mousedown', selector, f... |
acb81229c6f704e0962bf102eb17f8cc479b9862 | src/mmw/js/src/data_catalog/controllers.js | src/mmw/js/src/data_catalog/controllers.js | "use strict";
var App = require('../app'),
router = require('../router').router,
coreUtils = require('../core/utils'),
models = require('./models'),
views = require('./views');
var DataCatalogController = {
dataCatalogPrepare: function() {
if (!App.map.get('areaOfInterest')) {
... | "use strict";
var App = require('../app'),
router = require('../router').router,
coreUtils = require('../core/utils'),
models = require('./models'),
views = require('./views');
var DataCatalogController = {
dataCatalogPrepare: function() {
if (!App.map.get('areaOfInterest')) {
... | Clear results from map on datacatalog cleanup | BiGCZ: Clear results from map on datacatalog cleanup
| JavaScript | apache-2.0 | WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed | ---
+++
@@ -48,6 +48,13 @@
collection: catalogs
});
App.rootView.sidebarRegion.show(view);
+ },
+
+ dataCatalogCleanUp: function() {
+ App.map.set({
+ dataCatalogResults: null,
+ dataCatalogActiveResult: null,
+ });
}
};
|
a15fd27717ca924eac15cda65148b691d2dc5ed7 | index.js | index.js | exports.transform = require('./lib/transform')
exports.estimate = require('./lib/estimate')
exports.version = require('./lib/version')
exports.createFromArray = function (arr) {
// Create a nudged.Transform instance from an array that was
// previously created with nudged.Transform#toArray().
//
// Together wi... | exports.transform = require('./lib/transform')
exports.estimate = require('./lib/estimate')
exports.version = require('./lib/version')
exports.estimate = function (type, domain, range, pivot) {
// Parameter
// type
// string. One of the following:
// 'I', 'L', 'X', 'Y', 'T', 'S', 'R', 'TS', 'TR', '... | Remove nudged.createFromArray in favor of transform.createFromArray | Remove nudged.createFromArray in favor of transform.createFromArray
| JavaScript | mit | axelpale/nudged | ---
+++
@@ -1,24 +1,6 @@
exports.transform = require('./lib/transform')
exports.estimate = require('./lib/estimate')
exports.version = require('./lib/version')
-
-exports.createFromArray = function (arr) {
- // Create a nudged.Transform instance from an array that was
- // previously created with nudged.Transfor... |
eab61d3f8fc076b2672cb31cce5e11fc9e5f3381 | web_external/Datasets/selectDatasetView.js | web_external/Datasets/selectDatasetView.js | import View from '../view';
import SelectDatasetPageTemplate from './selectDatasetPage.pug';
// View for a collection of datasets in a select tag. When user selects a
// dataset, a 'changed' event is triggered with the selected dataset as a
// parameter.
const SelectDatasetView = View.extend({
events: {
'... | import View from '../view';
import SelectDatasetPageTemplate from './selectDatasetPage.pug';
// View for a collection of datasets in a select tag. When user selects a
// dataset, a 'changed' event is triggered with the selected dataset as a
// parameter.
const SelectDatasetView = View.extend({
events: {
'... | Use a more specific event selector in SelectDatasetView | Use a more specific event selector in SelectDatasetView
| JavaScript | apache-2.0 | ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive | ---
+++
@@ -7,7 +7,7 @@
// parameter.
const SelectDatasetView = View.extend({
events: {
- 'change': 'datasetChanged'
+ 'change #isic-select-dataset-select': 'datasetChanged'
},
/** |
1d601875f9335bf59636cd6ecbef65c8f89d17c4 | index.js | index.js | // @flow
import { AppRegistry } from 'react-native';
import App from './app/App';
// import App from './app/playground/src/Navigation';
AppRegistry.registerComponent('reactNativeApp', () => App);
| // @flow
import { AppRegistry, YellowBox } from 'react-native';
// TODO: please check if it's still needed
YellowBox.ignoreWarnings([
'Warning: isMounted(...) is deprecated in plain JavaScript React classes.',
'Module R', // ... requires main queue setup since it overrides ...
]);
import App from './app/App';
//... | Hide warnings from the React core | Hide warnings from the React core
| JavaScript | mit | mrtnzlml/native,mrtnzlml/native | ---
+++
@@ -1,6 +1,12 @@
// @flow
-import { AppRegistry } from 'react-native';
+import { AppRegistry, YellowBox } from 'react-native';
+
+// TODO: please check if it's still needed
+YellowBox.ignoreWarnings([
+ 'Warning: isMounted(...) is deprecated in plain JavaScript React classes.',
+ 'Module R', // ... requi... |
07efe8f7cdec6b9213668a0a9bd010beae6d689f | index.js | index.js | var bodyParser = require('body-parser')
var dataUriToBuffer = require('data-uri-to-buffer')
var express = require('express')
var app = express()
var transform = require("./transformer")
// Set up some Express settings
app.use(bodyParser.json({ limit: '2mb' }))
app.use(express.static(__dirname + '/public'))
/**
* Ho... | var bodyParser = require('body-parser')
var dataUriToBuffer = require('data-uri-to-buffer')
var express = require('express')
var app = express()
/**
* This is your custom transform function
* move it wherever, call it whatever
*/
var transform = require("./transformer")
// Set up some Express settings
app.use(body... | Change image size limit down to 1mb per @ednapiranha | Change image size limit down to 1mb per @ednapiranha
| JavaScript | mit | jasonrhodes/revisit-gifplay,revisitors/revisit.link-quickstart,florida/put-a-bird-on-it-revisit-service,jasonrhodes/H4UNT3D-H4U5 | ---
+++
@@ -3,10 +3,14 @@
var express = require('express')
var app = express()
+/**
+ * This is your custom transform function
+ * move it wherever, call it whatever
+ */
var transform = require("./transformer")
// Set up some Express settings
-app.use(bodyParser.json({ limit: '2mb' }))
+app.use(bodyParser.js... |
c78023ffd19f78cc9b753bcda96623323008ca08 | index.js | index.js | 'use strict';
var rework = require('broccoli-rework');
module.exports = {
name: 'ember-cli-rework',
included: function(app) {
this.app = app;
this.plugins = this.app.options.reworkPlugins;
},
postprocessTree: function(type, tree) {
if (type === 'all' || type === 'styles') {
tree = autopref... | 'use strict';
var rework = require('broccoli-rework');
module.exports = {
name: 'ember-cli-rework',
included: function(app) {
this.app = app;
this.plugins = this.app.options.reworkPlugins;
},
postprocessTree: function(type, tree) {
if (type === 'all' || type === 'styles') {
tree = rework(t... | Return the tree after postprocess | Return the tree after postprocess
| JavaScript | mit | johnotander/ember-cli-rework,johnotander/ember-cli-rework | ---
+++
@@ -12,11 +12,13 @@
postprocessTree: function(type, tree) {
if (type === 'all' || type === 'styles') {
- tree = autoprefixer(tree, { use:function(css) {
+ tree = rework(tree, { use:function(css) {
this.plugins.forEach(function(plugin) {
css.use(plugin);
});
... |
e6b264d0e331489d7f713bc2e821ccc3c624158f | index.js | index.js | /*jslint node: true*/
function getCookie(req, cookieName) {
var cookies = {},
output;
if (req.headers.cookie) {
req.headers.cookie.split(';').forEach(function (cookie) {
var parts = cookie.split('=');
cookies[parts[0].trim()] = parts[1].trim();
});
output ... | /*jslint node: true*/
function getCookie(req, cookieName) {
var cookies = {},
cn,
output;
if (req.headers.cookie) {
req.headers.cookie.split(';').forEach(function (cookie) {
var parts = cookie.split('=');
if (parts.length > 1) {
cn = parts[0].trim(... | Handle domain, secure and httpOnly flags | Handle domain, secure and httpOnly flags
| JavaScript | mit | Ajnasz/ajncookie | ---
+++
@@ -1,20 +1,37 @@
/*jslint node: true*/
function getCookie(req, cookieName) {
var cookies = {},
+ cn,
output;
if (req.headers.cookie) {
req.headers.cookie.split(';').forEach(function (cookie) {
var parts = cookie.split('=');
- cookies[parts[0].trim(... |
8c181f8385742ead72b4ebce3bdfd14786756162 | index.js | index.js | 'use strict';
const crypto = require('crypto');
// User ARN: arn:aws:iam::561178107736:user/prx-upload
// Access Key ID: AKIAJZ5C7KQPL34SQ63Q
const key = process.env.ACCESS_KEY;
exports.handler = (event, context, callback) => {
try {
if (!event.queryStringParameters || !event.queryStringParameters.to_sign) {
... | 'use strict';
const crypto = require('crypto');
// User ARN: arn:aws:iam::561178107736:user/prx-upload
// Access Key ID: AKIAJZ5C7KQPL34SQ63Q
const key = process.env.ACCESS_KEY;
exports.handler = (event, context, callback) => {
try {
if (!event.queryStringParameters || !event.queryStringParameters.to_sign) {
... | Add CORS headers to GET response | Add CORS headers to GET response
| JavaScript | agpl-3.0 | PRX/upload.prx.org,PRX/upload.prx.org | ---
+++
@@ -16,7 +16,10 @@
callback(null, {
statusCode: 200,
headers: {
- 'Content-Type': 'text/plain'
+ 'Content-Type': 'text/plain',
+ 'Access-Control-Allow-Headers': 'Content-Type,X-Amz-Date,Authorization,X-Api-Key,X-Amz-Security-Token',
+ 'Access-Contro... |
dc5cf611c89c6bb4f9466f1afe0b0f81bd65ddf9 | src/resolve.js | src/resolve.js | function resolve({
columns,
method = () => rowData => rowData,
indexKey = '_index'
}) {
if (!columns) {
throw new Error('resolve - Missing columns!');
}
return (rows = []) => {
const methodsByColumnIndex = columns.map(column => method({ column }));
return rows.map((rowData, rowIndex) => {
... | function resolve({
columns,
method = () => rowData => rowData,
indexKey = '_index'
}) {
if (!columns) {
throw new Error('resolve - Missing columns!');
}
return (rows = []) => {
const methodsByColumnIndex = columns.map(column => method({ column }));
return rows.map((rowData, rowIndex) => {
... | Set indexKey once per row, not per column. | Set indexKey once per row, not per column.
The performance improvement depends on the number of columns, but on a
real data set of 5000 rows and 11 resolved columns this improves
performance by 8.7%.
This does not change the result since the order of keys in the spread is
unchanged.
| JavaScript | mit | reactabular/table-resolver | ---
+++
@@ -11,7 +11,10 @@
const methodsByColumnIndex = columns.map(column => method({ column }));
return rows.map((rowData, rowIndex) => {
- let ret = {};
+ let ret = {
+ [indexKey]: rowIndex,
+ ...rowData
+ };
columns.forEach((column, columnIndex) => {
cons... |
90fc4c61301c9fd6270821e3b4af6150e8006bec | src/middleware/auth/processJWTIfExists.js | src/middleware/auth/processJWTIfExists.js | const
nJwt = require('njwt'),
config = require('config.js'),
errors = require('feathers-errors');
function processJWTIfExists (req, res, next) {
req.feathers = req.feathers || {};
let token = req.headers['authorization'];
if (token == null) {
let cookies = req.cookies;
token = cookies.id... | const
nJwt = require('njwt'),
config = require('config.js'),
errors = require('feathers-errors');
function processJWTIfExists (req, res, next) {
req.feathers = req.feathers || {};
let token = req.headers['authorization'];
console.log('line-1 ', token);
if (token == null) {
let cookies = r... | Add temporary console logs to help track down an auth bug sometimes found in mobile iOS Safari | Add temporary console logs to help track down an auth bug sometimes found in mobile iOS Safari
| JavaScript | agpl-3.0 | podverse/podverse-web,podverse/podverse-web,podverse/podverse-web,podverse/podverse-web | ---
+++
@@ -11,20 +11,29 @@
let token = req.headers['authorization'];
+ console.log('line-1 ', token);
+
if (token == null) {
let cookies = req.cookies;
token = cookies.idToken;
}
+
+ console.log('line-2', token);
if (token == null) {
next();
return;
}
+ console.log('line... |
3cec9422a0bdfccd16f22fa1424a1bdc5a644a30 | src/util/validators.js | src/util/validators.js | import validator from 'validator'
import Player from '../models/player'
const isValidIdForPlatform = (input, platform) => {
const platformId = Player.getPlatformIdFromString(platform)
return platformId !== -1 &&
((platformId === 0 && isValidSteamId(input)) ||
(platformId === 1 && isValidPSNId(input)) ||
(pla... | import validator from 'validator'
import Player from '../models/player'
const isValidIdForPlatform = (input, platform) => {
const platformId = Player.getPlatformIdFromString(platform)
return platformId !== -1 &&
((platformId === 0 && isValidSteamId(input)) ||
(platformId === 1 && isValidPSNId(input)) ||
(pla... | Update name validation to meet steam criteria: 2 <= length <= 32 | Update name validation to meet steam criteria: 2 <= length <= 32
| JavaScript | mit | hugogrochau/SAM-rank-api | ---
+++
@@ -22,6 +22,6 @@
validator.isAlphanumeric(input.trim()) && input.length >= 3 && input.length <= 15
const isValidName = (input) =>
-validator.isLength(input, { min: 1, max: 30 })
+validator.isLength(input, { min: 2, max: 32 })
export default { isValidIdForPlatform, isValidPlatform, isValidSteamId, isVa... |
5970b784543cfedc8aa09dd405ab79d50e327bdb | index.js | index.js | 'use strict';
var commentMarker = require('mdast-comment-marker');
module.exports = commentconfig;
/* Modify `processor` to read configuration from comments. */
function commentconfig() {
var Parser = this.Parser;
var Compiler = this.Compiler;
var block = Parser && Parser.prototype.blockTokenizers;
var inlin... | 'use strict';
var commentMarker = require('mdast-comment-marker');
module.exports = commentconfig;
/* Modify `processor` to read configuration from comments. */
function commentconfig() {
var proto = this.Parser && this.Parser.prototype;
var Compiler = this.Compiler;
var block = proto && proto.blockTokenizers;... | Fix for non-remark parsers or compilers | Fix for non-remark parsers or compilers
| JavaScript | mit | wooorm/mdast-comment-config,wooorm/remark-comment-config | ---
+++
@@ -6,11 +6,11 @@
/* Modify `processor` to read configuration from comments. */
function commentconfig() {
- var Parser = this.Parser;
+ var proto = this.Parser && this.Parser.prototype;
var Compiler = this.Compiler;
- var block = Parser && Parser.prototype.blockTokenizers;
- var inline = Parser &&... |
4ae6c11508a002c4adcf23f20af5e7c8f1eb7dc3 | index.js | index.js | // Constructor
var RegExpParser = module.exports = {};
/**
* parse
* Parses a string input
*
* @name parse
* @function
* @param {String} input the string input that should be parsed as regular
* expression
* @return {RegExp} The parsed regular expression
*/
RegExpParser.parse = function (input) {
// Vali... | // Constructor
var RegExpParser = module.exports = {};
/**
* parse
* Parses a string input
*
* @name parse
* @function
* @param {String} input the string input that should be parsed as regular
* expression
* @return {RegExp} The parsed regular expression
*/
RegExpParser.parse = function(input) {
// Valid... | Use a regular expression to parse regular expressions :smile: | Use a regular expression to parse regular expressions :smile:
| JavaScript | mit | IonicaBizau/regex-parser.js | ---
+++
@@ -11,19 +11,14 @@
* expression
* @return {RegExp} The parsed regular expression
*/
-RegExpParser.parse = function (input) {
+RegExpParser.parse = function(input) {
// Validate input
if (typeof input !== "string") {
throw new Error("Invalid input. Input must be a string");
}
... |
fee5fbe024705c8b2409b1c207f40d7bb3bc1fbe | src/js/graph/modules/focuser.js | src/js/graph/modules/focuser.js | webvowl.modules.focuser = function () {
var focuser = {},
focusedElement;
focuser.handle = function (clickedElement) {
if (focusedElement !== undefined) {
focusedElement.toggleFocus();
}
if (focusedElement !== clickedElement) {
clickedElement.toggleFocus();
focusedElement = clickedElement;
} else... | webvowl.modules.focuser = function () {
var focuser = {},
focusedElement;
focuser.handle = function (clickedElement) {
if (d3.event.defaultPrevented) {
return;
}
if (focusedElement !== undefined) {
focusedElement.toggleFocus();
}
if (focusedElement !== clickedElement) {
clickedElement.toggleFo... | Disable focusing on after dragging a node | Disable focusing on after dragging a node | JavaScript | mit | leshek-pawlak/WebVOWL,leshek-pawlak/WebVOWL,MissLoveWu/webvowl,VisualDataWeb/WebVOWL,VisualDataWeb/WebVOWL,MissLoveWu/webvowl | ---
+++
@@ -3,6 +3,10 @@
focusedElement;
focuser.handle = function (clickedElement) {
+ if (d3.event.defaultPrevented) {
+ return;
+ }
+
if (focusedElement !== undefined) {
focusedElement.toggleFocus();
} |
f0396b7679f471738e47b434543604b0ada00462 | index.js | index.js | var _ = require('lodash');
var map = require('map-stream');
var pp = require('preprocess');
var path = require('path');
module.exports = function (options) {
var opts = _.merge({}, options);
var context = _.merge({}, process.env, opts.context);
function ppStream(file, callback) {
var contents, ... | var _ = require('lodash');
var map = require('map-stream');
var pp = require('preprocess');
var path = require('path');
module.exports = function (context, options) {
function ppStream(file, callback) {
var contents, extension;
// TODO: support streaming files
if (file.isNull()) return callbac... | Upgrade to new preprocess API | Upgrade to new preprocess API
| JavaScript | mit | yesmeck/gulp-preprocess,patlux/gulp-preprocess,patlux/gulp-preprocess,yesmeck/gulp-preprocess | ---
+++
@@ -3,10 +3,7 @@
var pp = require('preprocess');
var path = require('path');
-module.exports = function (options) {
- var opts = _.merge({}, options);
- var context = _.merge({}, process.env, opts.context);
-
+module.exports = function (context, options) {
function ppStream(file, callback) {
... |
8d60c1b35b9b946915b67e9fa88107bdb22e13da | karma.conf.js | karma.conf.js | module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['mocha', 'chai-jquery', 'jquery-2.1.0', 'chai', 'sinon-chai', 'fixture'],
files: [
'public/javascripts/vendor/d3.v3.min.js',
'public/javascripts/vendor/raphael-min.js',
'public/javascripts/vendor/morris.min.js',
... | module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['mocha', 'chai-jquery', 'jquery-2.1.0', 'chai', 'sinon-chai', 'fixture'],
files: [
'public/javascripts/vendor/d3.v3.min.js',
'public/javascripts/vendor/raphael-min.js',
'public/javascripts/vendor/morris.min.js',
... | Remove sparkline from spec (not needed anymore) | Remove sparkline from spec (not needed anymore)
| JavaScript | mit | codeforamerica/city-analytics-dashboard,codeforamerica/city-analytics-dashboard,codeforamerica/city-analytics-dashboard | ---
+++
@@ -8,7 +8,6 @@
'public/javascripts/vendor/morris.min.js',
'public/javascripts/helpers/helper.js',
'public/javascripts/traffic.js',
- 'public/javascripts/sparkline.js',
'tests/**/*Spec.js',
'tests/fixtures/**/*'
], |
53d55efbe820f9e4e8469992e2b2f193bd4de345 | src/write-to-server.js | src/write-to-server.js | 'use strict';
var env = require('./env.json');
function httpPost(req, cb) {
var https = req.deps.https;
console.log('env:', env);
var postData = JSON.stringify({
metadata: req.data.s3Object.Metadata,
sizes: req.data.sizes
});
var options = {
hostname: 'plaaant.com',
port: 443,
path: '/... | 'use strict';
var env = require('./env.json');
function httpPost(req, cb) {
var https = req.deps.https;
console.log('env:', env);
var postData = JSON.stringify({
metadata: req.data.s3Object.Metadata,
sizes: req.data.sizes
});
var options = {
hostname: 'plaaant.com',
port: 443,
path: '/... | Add some logging to https.request | Add some logging to https.request
| JavaScript | mit | guyellis/plant-image-lambda,guyellis/plant-image-lambda | ---
+++
@@ -23,9 +23,16 @@
};
console.log('About to PUT to server...');
- var request = https.request(options, function() {});
+ var request = https.request(options, function(res) {
+ console.log('response from https.request:', res);
+ });
request.write(postData);
request.end();
+
+ req.on('error... |
831714e2bf0c396c0adcb0fe069f4d998e340889 | index.js | index.js | /**
* index.js
* Client entry point.
*
* @author Francis Brito <fr.br94@gmail.com>
* @license MIT
*/
'use strict';
/**
* Client
* Provides methods to access PrintHouse's API.
*
* @param {String} apiKey API key identifying account owner.
* @param {Object} opts Contains options to be passed to the clien... | /**
* index.js
* Client entry point.
*
* @author Francis Brito <fr.br94@gmail.com>
* @license MIT
*/
'use strict';
/**
* Client
* Provides methods to access PrintHouse's API.
*
* @param {String} apiKey API key identifying account owner.
* @param {Object} opts Contains options to be passed to the clien... | Add default API URL for client. | Add default API URL for client.
| JavaScript | mit | francisbrito/ph-node | ---
+++
@@ -20,6 +20,14 @@
}
};
+/**
+ * Default API endpoint.
+ * Used if no API endpoint is passed in opts parameter when constructing a client.
+ *
+ * @type {String}
+ */
+Client.DEFAULT_API_URL = 'http://printhouse.io/api';
+
module.exports = {
Client: Client
}; |
4e543c02c682320aa46e4a90fa8fd4183e6b2588 | index.js | index.js | module.exports = function() {
let subscribers = [], self
return self = {
// remove all subscribers
clear: (eventName) => {
subscribers = eventName != null
? subscribers.filter(subscriber => subscriber.eventName !== eventName)
: []
return self // return self to support chaining... | module.exports = function() {
let subscribers = [], self
return self = {
// remove all subscribers
clear: (eventName) => {
subscribers = eventName != null
? subscribers.filter(subscriber => subscriber.eventName !== eventName)
: []
return self // return self to support chaining... | Fix trigger not returning itself, but undefined | Fix trigger not returning itself, but undefined
`Array.prototype.forEach` returns `undefined`
| JavaScript | isc | metaraine/emitter20 | ---
+++
@@ -34,5 +34,6 @@
.forEach(subscriber => subscriber.callback(data))
return self
}
+
}
} |
8924f0f00493b836e81c09db2e161bf70a5fda48 | index.js | index.js | var VOWELS = /[aeiou]/gi;
var VOWELS_AND_SPACE = /[aeiou\s]/g;
exports.parse = function parse(string, join){
if(typeof string !== 'string'){
throw new TypeError('Expected a string as the first option');
}
var replacer = VOWELS;
if (join) {
replacer = VOWELS_AND_SPACE;
}
return string.replace(... | var VOWELS = /[aeiou]/gi;
var VOWELS_AND_SPACE = /[aeiou\s]/g;
exports.parse = function parse(string, join){
if(typeof string !== 'string'){
throw new TypeError('Expected a string as the first option');
}
return string.replace(join ? VOWELS_AND_SPACE : VOWELS, '');
};
| Move to more functional, expression-based conditionals | Move to more functional, expression-based conditionals
| JavaScript | mit | lestoni/unvowel | ---
+++
@@ -6,10 +6,5 @@
throw new TypeError('Expected a string as the first option');
}
- var replacer = VOWELS;
- if (join) {
- replacer = VOWELS_AND_SPACE;
- }
-
- return string.replace(replacer, '');
+ return string.replace(join ? VOWELS_AND_SPACE : VOWELS, '');
}; |
3ca40e5d48afa58abeb523ebf9e35b7c0e7c27a2 | index.js | index.js | var express = require('express');
var app = express();
var image_utils = require('./image_utils.js');
app.set('port', (process.env.PORT || 5001));
/*
Search latest images search
*/
app.get("/api/latest/imagesearch", function(req, res)
{
res.end("api/latest/imagesearch/");
});
app.get("/api/imagesearch/:searchQ... | var express = require('express');
var app = express();
var image_utils = require('./image_utils.js');
app.set('port', (process.env.PORT || 5001));
/*
Search latest images search
*/
app.get("/api/latest/imagesearch", function(req, res)
{
res.end("api/latest/imagesearch/");
});
app.get("/api/imagesearch/:searchQ... | Test google api on server | Test google api on server
| JavaScript | mit | diegoingaramo/img-search-al | ---
+++
@@ -18,7 +18,7 @@
var offset = req.params.offset;
image_utils.searchImage(searchQuery,offset,function (data){
-
+ console.log(data);
res.writeHead(200, { 'Content-Type': 'application/json' });
res.end(JSON.stringify(data));
|
63a5bc853e2073ee7fecb3699d69ab6e6d19e5ad | index.js | index.js | 'use strict';
// Global init
global.Promise = require('babel-runtime/core-js/promise').default = require('bluebird');
// Exports
module.exports = require('./dist/index').default; | 'use strict';
// Global init
global.Promise = require('babel-runtime/core-js/promise').default = require('bluebird');
// Exports
module.exports = require('./dist/index').default; // eslint-disable-line import/no-unresolved | Fix failed linting during npm test on a clean directory | Fix failed linting during npm test on a clean directory
| JavaScript | mit | komapijs/komapi,komapijs/komapi | ---
+++
@@ -4,4 +4,4 @@
global.Promise = require('babel-runtime/core-js/promise').default = require('bluebird');
// Exports
-module.exports = require('./dist/index').default;
+module.exports = require('./dist/index').default; // eslint-disable-line import/no-unresolved |
e53519bbbbf593e9ec5e9ac2ce6386f12760020f | index.js | index.js | 'use strict';
var fileType = require('file-type');
var through = require('through2');
var uuid = require('uuid');
var Vinyl = require('vinyl');
module.exports.file = function (buf, name) {
var ext = fileType(buf) ? fileType(buf).ext : null;
return new Vinyl({
contents: buf,
path: (name || uuid.v4()) + (ext ||... | 'use strict';
var fileType = require('file-type');
var through = require('through2');
var uuid = require('uuid');
var Vinyl = require('vinyl');
module.exports.file = function (buf, name) {
var ext = fileType(buf) ? '.' + fileType(buf).ext : null;
return new Vinyl({
contents: buf,
path: (name || uuid.v4()) + (... | Fix missing dot before extension. | Fix missing dot before extension.
| JavaScript | mit | kevva/buffer-to-vinyl | ---
+++
@@ -6,7 +6,7 @@
var Vinyl = require('vinyl');
module.exports.file = function (buf, name) {
- var ext = fileType(buf) ? fileType(buf).ext : null;
+ var ext = fileType(buf) ? '.' + fileType(buf).ext : null;
return new Vinyl({
contents: buf, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.