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 |
|---|---|---|---|---|---|---|---|---|---|---|
012942d0f2d13ce7e3fe20b1fadecbf57248ce9f | src/space-case.js | src/space-case.js | const spaceCase = (a) => {
return a
.replace(/(_|-|\.)/g, ' ')
.replace(/([A-Z])/g, ' $1')
.replace(/\s+/g, ' ')
.replace(/^\s+/, '')
.replace(/\s$/, '');
};
export default spaceCase;
| const spaceCase = (a) => {
return a
.replace(/(_|-|\.)/g, ' ')
.replace(/([A-Z])/g, ' $1')
.replace(/\s+/g, ' ')
.replace(/(^\s|\s$)/g, '');
};
export default spaceCase;
| Refactor spaceCase to combine "ltrim/rtrim" into one regex | Refactor spaceCase to combine "ltrim/rtrim" into one regex
| JavaScript | mit | restrung/restrung-regex | ---
+++
@@ -3,8 +3,7 @@
.replace(/(_|-|\.)/g, ' ')
.replace(/([A-Z])/g, ' $1')
.replace(/\s+/g, ' ')
- .replace(/^\s+/, '')
- .replace(/\s$/, '');
+ .replace(/(^\s|\s$)/g, '');
};
export default spaceCase; |
d6cb6adf103ace89ee6a3ab8c249a953cc0052ba | bin/bot.js | bin/bot.js | // Include needed files
var fluffbot = require('../lib/fluffbot')
var discord = require('discord.js')
var event = require('../lib/event')
// Instantiate bots
var fluffbot = new fluffbot()
discord = new discord.Client({autoReconnect:true})
discord.login(fluffbot.settings.bot_token)
// Initiate the playing game to say... | // Include needed files
var fluffbot = require('../lib/fluffbot')
var discord = require('discord.js')
var event = require('../lib/event')
// Instantiate bots
var fluffbot = new fluffbot()
discord = new discord.Client({autoReconnect:true})
discord.login(fluffbot.settings.bot_token)
// Initiate the playing game to say... | Use method instead of property | Use method instead of property
| JavaScript | mit | FluffyMatt/fluffbot | ---
+++
@@ -11,7 +11,7 @@
// Initiate the playing game to say the current version
discord.on('ready', function(event) {
- this.status('online', 'Alpha v2.0.4 by FluffyMatt');
+ this.setStatus('online', 'Alpha v2.0.4 by FluffyMatt');
})
// Event listener when bot is added to a server |
bf7e23827e2aa912b6431e906763ceaa871f7640 | commands/sa.js | commands/sa.js | 'use strict';
var exec = require('child_process').exec;
module.exports = function reboot(controller) {
controller.hears('technical assessment', ['direct_message','mention','direct_mention', 'message_received'], function(bot, message) {
bot.reply(message, 'May god have mercy on your souls...');
// console.lo... | 'use strict';
var exec = require('child_process').exec;
module.exports = function reboot(controller) {
controller.hears('technical assessment', ['direct_message','mention','direct_mention', 'message_received'], function(bot, message) {
bot.reply(message, 'no comment');
// console.log(message._client.channel... | Revert "Fixed the response to any mention of the technical (summary) assessment." | Revert "Fixed the response to any mention of the technical (summary) assessment."
This reverts commit 36ab954db67f20fbb0612d10d2017bb4df893878.
| JavaScript | mit | remotebeta/codybot | ---
+++
@@ -4,7 +4,7 @@
module.exports = function reboot(controller) {
controller.hears('technical assessment', ['direct_message','mention','direct_mention', 'message_received'], function(bot, message) {
- bot.reply(message, 'May god have mercy on your souls...');
+ bot.reply(message, 'no comment');
... |
86d34450e5e0268e24b86aadf23ca1182fd7f06e | modules/authorization/route.js | modules/authorization/route.js | var Series = require('hapi-next'),
Validator = require('modules/authorization/validator'),
Controller = require('modules/authorization/controller');
module.exports = {
login : {
method : 'POST',
path : '/login',
config : {
validate : Validator.validateReqLogin(),
handler : function(request,reply... | var Series = require('hapi-next'),
Validator = require('modules/authorization/validator'),
Controller = require('modules/authorization/controller');
module.exports = {
login : {
method : 'POST',
path : '/login',
config : {
validate : Validator.validateReqLogin(),
handler : function... | Update indentation to 2 spaces | Update indentation to 2 spaces
| JavaScript | mit | Pranay92/lets-chat,Pranay92/collaborate | ---
+++
@@ -3,37 +3,37 @@
Controller = require('modules/authorization/controller');
module.exports = {
-
- login : {
- method : 'POST',
- path : '/login',
- config : {
- validate : Validator.validateReqLogin(),
- handler : function(request,reply) {
+
+ login : {
+ method : 'POST',
+ path : '/... |
a416b0a1f674d8ab05472c961da780d69df8aa5b | packages/lambda/src/api/dbCreateItems/index.js | packages/lambda/src/api/dbCreateItems/index.js | import response from 'cfn-response'
import SNS from 'aws/sns'
import { Settings } from 'model/settings'
export async function handle (event, context, callback) {
if (event.RequestType === 'Update' || event.RequestType === 'Delete') {
response.send(event, context, response.SUCCESS)
return
}
const {
A... | import response from 'cfn-response'
import SNS from 'aws/sns'
import { Settings } from 'model/settings'
export async function handle (event, context, callback) {
if (event.RequestType === 'Update' || event.RequestType === 'Delete') {
response.send(event, context, response.SUCCESS)
return
}
const {
A... | Create new API key on launching a new stack | Create new API key on launching a new stack
| JavaScript | apache-2.0 | ks888/LambStatus,ks888/LambStatus,ks888/LambStatus | ---
+++
@@ -21,7 +21,8 @@
await settings.setStatusPageURL(statusPageURL)
}
} catch (error) {
- // failed due to the unknown SNS topic.
+ // setStatusPageURL always fails due to the unknown SNS topic. So ignore the error here.
+ // TODO: improve error handling. There may be other kinds of error... |
f01dc34ca41fcd59afd5da35b46b35659a835f55 | test/conductor.js | test/conductor.js | // Test runner
var runTests = require('./affixing-header-specs'),
browsers = [
{browserName: 'chrome'},
{browserName: 'firefox'}
];
// var browserConfig = require('./helpers/browser-config');
if (process.env.TRAVIS_JOB_NUMBER) {
browsers.push(
{browserName: 'Safari', version: '7'},... | // Test runner
var runTests = require('./affixing-header-specs'),
browsers = [
{browserName: 'chrome'},
{browserName: 'firefox'}
];
// var browserConfig = require('./helpers/browser-config');
if (process.env.TRAVIS_JOB_NUMBER) {
browsers.push(
{browserName: 'Safari', version: '7'},... | Use generic Android Emulator, add device-orientation | Use generic Android Emulator, add device-orientation
| JavaScript | cc0-1.0 | acusti/affixing-header,acusti/affixing-header | ---
+++
@@ -10,9 +10,9 @@
if (process.env.TRAVIS_JOB_NUMBER) {
browsers.push(
{browserName: 'Safari', version: '7'},
- {browserName: 'Safari', deviceName: 'iPhone Simulator', platformName: 'iOS', platformVersion: '8.2', appiumVersion: '1.3.7'},
- {browserName: 'Safari', devi... |
ca33d145097d8c7bb4c022be010d0f939250bccc | workflows/createDeployment.js | workflows/createDeployment.js | 'use strict';
// workflows/createDeployment
var Joi = require('joi');
module.exports = {
schema: Joi.object({
deployerId: Joi.string().required(),
name: Joi.string().min(1).required(),
}).required().unknown(true),
version: '1.0',
decider: function(args) {
return {
createDeploymentDo... | 'use strict';
// workflows/createDeployment
var Joi = require('joi');
module.exports = {
schema: Joi.object({
deployerId: Joi.string().required(),
name: Joi.string().min(1).required(),
}).required().unknown(true),
version: '1.0',
decider: function(args) {
return {
createDeploymentDo... | Update examples to return env from output defined on parent workflow | Update examples to return env from output defined on parent workflow
| JavaScript | mit | f5itc/swf-graph,f5itc/swf-graph,f5itc/swf-graph | ---
+++
@@ -17,12 +17,16 @@
createDeploymentDoc: {
activity: 'createDeploymentDoc',
input: (env) => ({}),
- output: (env) => ({ theId: env.id, newValueThatIWant: env.newValueThatIWant })
+ output: (env) => {
+ return { env: { theId: env.id, newValueThatIWant: env... |
093ab10177a6a70fdf073c63421346c442613647 | src/modules/spaceshipsDataReducer.js | src/modules/spaceshipsDataReducer.js | import { createAction, handleActions } from 'redux-actions'
export const INITIAL_DATA = 'INITIAL_DATA'
export const initialData = createAction(INITIAL_DATA)
const spaceshipsDataReducer = handleActions({
[INITIAL_DATA]: (state, action) => {
const { payload } = action
return {
...state,
spaceship... | import { createAction, handleActions } from 'redux-actions'
export const selectSpaceshipsData = state => state.spaceshipsData.spaceships
export const INITIAL_DATA = 'INITIAL_DATA'
export const initialData = createAction(INITIAL_DATA)
const spaceshipsDataReducer = handleActions({
[INITIAL_DATA]: (state, action) =>... | Move selectSpaceshipsData to global reducer | Move selectSpaceshipsData to global reducer
| JavaScript | mit | billdevcode/spaceship-emporium,billdevcode/spaceship-emporium | ---
+++
@@ -1,4 +1,6 @@
import { createAction, handleActions } from 'redux-actions'
+
+export const selectSpaceshipsData = state => state.spaceshipsData.spaceships
export const INITIAL_DATA = 'INITIAL_DATA'
|
39d5e9f4be50ba9ec8ca0bff4138c26e8ddeefe8 | lib/archive-tree.js | lib/archive-tree.js | module.exports = {
sortChildren (data) {
data.forEach((el) => {
if (el.parent) {
this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);
}
});
return this.arrangeChildren(data[0]);
},
findNestedObject (objects, id) {
var found;
for (var i = 0; i < objects.le... | module.exports = {
sortChildren (data) {
data.forEach((el) => {
if (el.parent) {
if (this.findNestedObject(data, el.parent[0].admin.uid)) {
this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);
}
}
});
return this.arrangeChildren(data[0]);
},
fin... | Check for element before tryign to retrive an attibiute of that element | Check for element before tryign to retrive an attibiute of that element
| JavaScript | mit | TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline | ---
+++
@@ -2,7 +2,9 @@
sortChildren (data) {
data.forEach((el) => {
if (el.parent) {
- this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);
+ if (this.findNestedObject(data, el.parent[0].admin.uid)) {
+ this.findNestedObject(data, el.parent[0].admin.uid).childr... |
c3b367a8c05ae7e21701c8d487d9e9e70f95d7f0 | lib/orbit-common.js | lib/orbit-common.js | import OC from 'orbit-common/main';
import Cache from 'orbit-common/cache';
import IdMap from 'orbit-common/id-map';
import Schema from 'orbit-common/schema';
import Serializer from 'orbit-common/serializer';
import Source from 'orbit-common/source';
import MemorySource from 'orbit-common/memory-source';
import { Opera... | import OC from 'orbit-common/main';
import Cache from 'orbit-common/cache';
import Schema from 'orbit-common/schema';
import Serializer from 'orbit-common/serializer';
import Source from 'orbit-common/source';
import MemorySource from 'orbit-common/memory-source';
import { OperationNotAllowed, RecordNotFoundException, ... | Remove IdMap from Orbit exports. | Remove IdMap from Orbit exports.
| JavaScript | mit | orbitjs/orbit.js,beni55/orbit.js,jpvanhal/orbit-core,opsb/orbit.js,orbitjs/orbit-core,ProlificLab/orbit.js,lytbulb/orbit.js,orbitjs/orbit.js,lytbulb/orbit.js,rollokb/orbit.js,jpvanhal/orbit.js,opsb/orbit-firebase,opsb/orbit-firebase,opsb/orbit-firebase,lytbulb/orbit-firebase,gnarf/orbit.js,ProlificLab/orbit.js,beni55/o... | ---
+++
@@ -1,6 +1,5 @@
import OC from 'orbit-common/main';
import Cache from 'orbit-common/cache';
-import IdMap from 'orbit-common/id-map';
import Schema from 'orbit-common/schema';
import Serializer from 'orbit-common/serializer';
import Source from 'orbit-common/source'; |
3fba933315cc62c0255ae52936f5e375813fbd3b | Omise/Payment/view/frontend/web/js/view/payment/method-renderer/omise-cc-method.js | Omise/Payment/view/frontend/web/js/view/payment/method-renderer/omise-cc-method.js | define(
[
'Magento_Payment/js/view/payment/cc-form'
],
function (Component) {
'use strict';
return Component.extend({
defaults: {
template: 'Omise_Payment/payment/omise-cc-form'
},
});
}
);
| define(
[
'Magento_Payment/js/view/payment/cc-form'
],
function (Component) {
'use strict';
return Component.extend({
defaults: {
template: 'Omise_Payment/payment/omise-cc-form'
},
getCode: function() {
return 'omis... | Add client side script functions to display the checkout form | Add client side script functions to display the checkout form | JavaScript | mit | omise/omise-magento,omise/omise-magento,omise/omise-magento | ---
+++
@@ -8,6 +8,14 @@
defaults: {
template: 'Omise_Payment/payment/omise-cc-form'
},
+
+ getCode: function() {
+ return 'omise';
+ },
+
+ isActive: function() {
+ return true;
+ }
});
... |
c808428d7a8ff3accab13f944e62573a3ee38128 | registrar/models/university.js | registrar/models/university.js | 'use strict';
module.exports = function(sequelize, DataTypes) {
var University = sequelize.define("University", {
name: {
type: DataTypes.STRING,
allowNull: false,
},
country: {
type: DataTypes.STRING,
allowNull: false,
},
}, {
... | 'use strict';
module.exports = function(sequelize, DataTypes) {
var University = sequelize.define("University", {
name: {
type: DataTypes.STRING,
allowNull: false,
},
country: {
type: DataTypes.STRING,
allowNull: false,
},
}, {
... | Add University associations with User, School | Add University associations with User, School
| JavaScript | mit | dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet | ---
+++
@@ -14,6 +14,12 @@
indexes: [
{unique: true, fields: ['name']}
],
+ classMethods: {
+ associate: (models) => {
+ University.hasMany(models.User);
+ University.hasMany(models.School);
+ }
+ }
});
return... |
e96036e8dc450b8ddfccbda9c9c831aed64735d4 | functions/index.js | functions/index.js | const functions = require('firebase-functions');
const { getPullRequestsForUser } = require('./github.js');
exports.user = functions.https.onRequest(async (request, response) => {
try {
const data = await getPullRequestsForUser(request.params[0]);
response.send({
...data,
config: process.env.FIRE... | const functions = require('firebase-functions');
const { getPullRequestsForUser } = require('./github.js');
exports.user = functions.https.onRequest(async (request, response) => {
try {
const data = await getPullRequestsForUser(request.params[0]);
response.send(data);
} catch(error) {
response.send({
... | Remove firebase config from resp | Remove firebase config from resp
| JavaScript | mit | karanjthakkar/showmyprs.com | ---
+++
@@ -4,15 +4,11 @@
exports.user = functions.https.onRequest(async (request, response) => {
try {
const data = await getPullRequestsForUser(request.params[0]);
- response.send({
- ...data,
- config: process.env.FIREBASE_CONFIG
- });
+ response.send(data);
} catch(error) {
res... |
5dcbf8c82bec5ccc94a1a3ee209697bfae0bc45c | js/components/content-header.js | js/components/content-header.js | (function(app) {
'use strict';
var jCore = require('jcore');
var helper = app.helper || require('../helper.js');
var ContentHeader = helper.inherits(function() {
ContentHeader.super_.call(this);
}, jCore.Component);
if (typeof module !== 'undefined' && module.exports)
module.exports = ContentHead... | (function(app) {
'use strict';
var jCore = require('jcore');
var helper = app.helper || require('../helper.js');
var ContentHeader = helper.inherits(function(props) {
ContentHeader.super_.call(this);
this.element = this.prop(props.element);
}, jCore.Component);
if (typeof module !== 'undefined' ... | Add property to access element of the content header | Add property to access element of the content header
| JavaScript | mit | ionstage/modular,ionstage/modular | ---
+++
@@ -4,8 +4,10 @@
var jCore = require('jcore');
var helper = app.helper || require('../helper.js');
- var ContentHeader = helper.inherits(function() {
+ var ContentHeader = helper.inherits(function(props) {
ContentHeader.super_.call(this);
+
+ this.element = this.prop(props.element);
}, jC... |
8eb04e26730dbaa622140a90b0d1f63bdbd5c65b | samples/templateweb/server.js | samples/templateweb/server.js |
var cobs = require('../..'),
http = require('http'),
fs = require('fs');
function compileFile(filename) {
var content = fs.readFileSync(filename).toString();
var code = cobs.compileTemplate(content);
var parser = new cobs.Parser(code);
var program = parser.parseProgram();
program.text = pr... |
var cobs = require('../..'),
http = require('http'),
fs = require('fs');
var program = cobs.compileTemplateFile('./factorial.cobp');
http.createServer(function(req, res) {
var runtime = {
display: function() {
if (arguments && arguments.length)
for (var k = 0; k < argu... | Refactor template web sample to use compileTemplateFile | Refactor template web sample to use compileTemplateFile
| JavaScript | mit | ajlopez/CobolScript | ---
+++
@@ -3,16 +3,7 @@
http = require('http'),
fs = require('fs');
-function compileFile(filename) {
- var content = fs.readFileSync(filename).toString();
- var code = cobs.compileTemplate(content);
- var parser = new cobs.Parser(code);
- var program = parser.parseProgram();
- program.tex... |
c47361846c3a0e8051f7e08fa5bc0478b8104bce | server/methods/residencies.js | server/methods/residencies.js | import newResidentAndResidencySchema from '/both/schemas/newResidentAndResidencySchema';
Meteor.methods({
addNewResidentAndResidency (document) {
// set up validation context based on new resident and residency schama
const validationContext = newResidentAndResidencySchema.newContext();
// Check if subm... | import newResidentAndResidencySchema from '/both/schemas/newResidentAndResidencySchema';
Meteor.methods({
addNewResidentAndResidency (document) {
// set up validation context based on new resident and residency schama
const validationContext = newResidentAndResidencySchema.newContext();
// Check if subm... | Use object destructuring for resident attributes | Use object destructuring for resident attributes
| JavaScript | agpl-3.0 | brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing | ---
+++
@@ -10,10 +10,7 @@
if (documentIsValid) {
// Get fields from object
- firstName = document.firstName;
- lastInitial = document.lastInitial;
- homeId = document.homeId;
- moveIn = document.moveIn;
+ const { firstName, lastInitial, homeId, moveIn } = document;
// ... |
cdeca36337d76404cb8ea02f90e84ed9d0ca0c4e | scripts/models/graphs-model.js | scripts/models/graphs-model.js | // TODO: This is not a real model or controller
App.Graphs = Ember.Controller.extend({
graph: function(emberId, entityName, entityType, numSeries) {
entityName = entityName.replace(/\./g, '-');
var url = ((!localStorage.apiDomain) ? '' : '//' + localStorage.apiDomain) + '/api/v1/graphs?entityType=' + entityTy... | // TODO: This is not a real model or controller
App.Graphs = Ember.Controller.extend({
graph: function(emberId, entityName, entityType, numSeries) {
entityName = entityName.replace(/\./g, '-');
var url = ((!localStorage.apiDomain) ? '' : '//' + localStorage.apiDomain) + '/api/v1/graphs?entityType=' + entityTy... | Use brighter colors in contextual Graphite graphs | Use brighter colors in contextual Graphite graphs
| JavaScript | apache-2.0 | vine77/saa-ui,vine77/saa-ui,vine77/saa-ui | ---
+++
@@ -2,7 +2,7 @@
App.Graphs = Ember.Controller.extend({
graph: function(emberId, entityName, entityType, numSeries) {
entityName = entityName.replace(/\./g, '-');
- var url = ((!localStorage.apiDomain) ? '' : '//' + localStorage.apiDomain) + '/api/v1/graphs?entityType=' + entityType + '&entityName=... |
0c02a02ce126113e7ea3a36a571f326b9c186cab | webpack.config.js | webpack.config.js | const path = require('path');
const context = path.join(__dirname, 'site');
const public = path.join(__dirname, 'public');
module.exports = {
context,
devServer: {
contentBase: public,
historyApiFallback: true,
open: true
},
devtool: 'source-map',
entry: './index.js',
module: {
rules: [
... | const path = require('path');
const context = path.join(__dirname, 'site');
const public = path.join(__dirname, 'public');
const webpack = require('webpack');
module.exports = {
context,
devServer: {
contentBase: public,
historyApiFallback: true,
open: true
},
devtool: 'source-map',
entry: './ind... | Add common chunks to dedupe common deps between lazy components. | Add common chunks to dedupe common deps between lazy components.
| JavaScript | mit | skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs | ---
+++
@@ -1,6 +1,7 @@
const path = require('path');
const context = path.join(__dirname, 'site');
const public = path.join(__dirname, 'public');
+const webpack = require('webpack');
module.exports = {
context,
@@ -41,5 +42,13 @@
filename: '[name].js',
path: public,
publicPath: '/'
- }
+ },... |
bdb390a1adfae17297c11de4395dca0c5fe7d9eb | app/scripts/components/openstack/openstack-tenant/appstore-field-select-openstack-tenant.js | app/scripts/components/openstack/openstack-tenant/appstore-field-select-openstack-tenant.js | import template from './appstore-field-select-openstack-tenant.html';
class AppstoreFieldSelectOpenstackTenantController {
// @ngInject
constructor(ncUtilsFlash, openstackTenantsService, currentStateService) {
this.ncUtilsFlash = ncUtilsFlash;
this.openstackTenantsService = openstackTenantsService;
thi... | import template from './appstore-field-select-openstack-tenant.html';
class AppstoreFieldSelectOpenstackTenantController {
// @ngInject
constructor(ncUtilsFlash, openstackTenantsService, currentStateService) {
this.ncUtilsFlash = ncUtilsFlash;
this.openstackTenantsService = openstackTenantsService;
thi... | Use backend_id instead of Waldur UUID for OpenStack | Use backend_id instead of Waldur UUID for OpenStack
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -17,7 +17,7 @@
}).then(tenants => {
this.choices = tenants.map(tenant => ({
display_name: tenant.name,
- value: `UUID: ${tenant.uuid}. Name: ${tenant.name}`
+ value: `Tenant UUID: ${tenant.backend_id}. Name: ${tenant.name}`
}));
this.loading = ... |
242705eae5ed23fbc1b10c7e3b6dc1f187433082 | webpack.config.js | webpack.config.js | module.exports = {
entry: "./src/ko-calendar.js",
output: {
filename: "./ko-calendar.js",
libraryTarget: "commonjs2"
}
} | module.exports = {
entry: "./src/ko-calendar.js",
output: {
filename: "./ko-calendar.js",
libraryTarget: "commonjs"
}
} | Change webpack library target to commonjs | Change webpack library target to commonjs
| JavaScript | mit | Seikho/ko-calendar,Seikho/ko-calendar,Seikho/ko-calendar | ---
+++
@@ -2,6 +2,6 @@
entry: "./src/ko-calendar.js",
output: {
filename: "./ko-calendar.js",
- libraryTarget: "commonjs2"
+ libraryTarget: "commonjs"
}
} |
5e5072ced3b8fcec76b91f6fa7addaedb6702a35 | configs/biomes.js | configs/biomes.js | var biomes = {
"riverLand": {
probability: 0.8,
tiles: {
"bambooBush": 0.8,
"rockCluster": 0.2
}
},
"forest": {
probability: 0.5,
tiles: {
"loneTree": 0.25,
"rockCluster": 0.75
}
},
"desert": {
probabilit... | var biomes = {
"riverLand": {
probability: 0,
tiles: {
"bambooBush": 0,
"rockCluster": 0.2
}
},
"forest": {
probability: 0.5,
tiles: {
"loneTree": 0.25,
"rockCluster": 0.75
}
},
"desert": {
probability: 0... | Set bamboo generation percent to 0 until water is ready | Set bamboo generation percent to 0 until water is ready
| JavaScript | mit | zkingston/coroga,zkingston/coroga | ---
+++
@@ -1,8 +1,8 @@
var biomes = {
"riverLand": {
- probability: 0.8,
+ probability: 0,
tiles: {
- "bambooBush": 0.8,
+ "bambooBush": 0,
"rockCluster": 0.2
}
}, |
cace74599168013eb66cf9e9ab2623fb1ad392e3 | webpack.config.js | webpack.config.js | /* eslint-env node */
/* eslint-disable no-console */
const webpack = require('webpack');
const debug = require('debug')('app:webpack');
const isDev = process.env.NODE_ENV !== 'production';
debug(`Running in ${(isDev ? 'development' : 'production')} mode`);
module.exports = {
entry: {
'main': './src/browser/ma... | /* eslint-env node */
/* eslint-disable no-console */
const webpack = require('webpack');
const debug = require('debug')('app:webpack');
const isDev = process.env.NODE_ENV !== 'production';
debug(`Running in ${(isDev ? 'development' : 'production')} mode`);
module.exports = {
entry: {
'main': './src/browser/ma... | Fix error "The provided value ... is not an absolute path!" | Fix error "The provided value ... is not an absolute path!"
| JavaScript | mit | frosas/lag,frosas/lag,frosas/lag | ---
+++
@@ -13,7 +13,7 @@
'service-worker': './src/browser/service-worker.js',
},
output: {
- path: './public/compiled/scripts',
+ path: `${__dirname}/public/compiled/scripts`,
filename: '[name].js',
},
module: { |
2b29a5df0e61f49dcf2875b89b93c0dcfca13daf | webpack.config.js | webpack.config.js | const fs = require('fs');
const Encore = require('@symfony/webpack-encore');
const { paths, js: { entries, vendor } } = JSON.parse(fs.readFileSync('./package.json')).config;
const env = process.env.NODE_ENV === 'production' ? 'production' : 'dev';
Encore.configureRuntimeEnvironment(env);
Encore
// directory where ... | const fs = require('fs');
const Encore = require('@symfony/webpack-encore');
const { paths, js: { entries, vendor } } = JSON.parse(fs.readFileSync('./package.json')).config;
const env = process.env.NODE_ENV === 'production' ? 'production' : 'dev';
Encore.configureRuntimeEnvironment(env);
Encore
// directory whe... | Exit the process if there is a compile error in a production build | Exit the process if there is a compile error in a production build
| JavaScript | mit | e-sites/fe-boilerplate-poc,e-sites/fe-boilerplate-poc | ---
+++
@@ -1,10 +1,13 @@
const fs = require('fs');
const Encore = require('@symfony/webpack-encore');
+
const { paths, js: { entries, vendor } } = JSON.parse(fs.readFileSync('./package.json')).config;
const env = process.env.NODE_ENV === 'production' ? 'production' : 'dev';
+
Encore.configureRuntimeEnvironm... |
b766115ed6f960d5b488857129725a4faf5bec7c | src/SumoCoders/FrameworkCoreBundle/Resources/assets/js/Framework/Slider.js | src/SumoCoders/FrameworkCoreBundle/Resources/assets/js/Framework/Slider.js | import {PluginNotFound} from 'Exception/PluginNotFound';
export class Slider
{
constructor(element)
{
if (!$.isFunction($.fn.slider)) {
throw new PluginNotFound('Slider');
}
this.element = element;
this.initSlider();
}
initSlider()
{
this.element.slider(
{
min: 0,
... | import {PluginNotFound} from 'Exception/PluginNotFound';
export class Slider
{
constructor(element, min = 0, max = 50, values = [10, 40], range = true)
{
if (!$.isFunction($.fn.slider)) {
throw new PluginNotFound('Slider');
}
this.element = element;
this.min = min;
this.max = max;
th... | Set default values for slider | Set default values for slider
| JavaScript | mit | jonasdekeukelaere/Framework,sumocoders/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework | ---
+++
@@ -2,13 +2,17 @@
export class Slider
{
- constructor(element)
+ constructor(element, min = 0, max = 50, values = [10, 40], range = true)
{
if (!$.isFunction($.fn.slider)) {
throw new PluginNotFound('Slider');
}
this.element = element;
+ this.min = min;
+ this.max = max;... |
c223f86f6878dc77a89ea64bb41811eac842e964 | packages/react-scripts/template/src/App.js | packages/react-scripts/template/src/App.js | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import { version, name } from '../package.json';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo... | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... | Remove import package.json from template | Remove import package.json from template
| JavaScript | bsd-3-clause | iamdoron/create-react-app,iamdoron/create-react-app,iamdoron/create-react-app | ---
+++
@@ -1,7 +1,6 @@
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
-import { version, name } from '../package.json';
class App extends Component {
render() {
@@ -10,7 +9,6 @@
<div className="App-header">
<img src={logo} className="App-logo... |
3e7b6c1be45cfa4adce0e3b6dfed80357ba5470d | webpack.config.js | webpack.config.js | const path = require('path')
module.exports = {
context: __dirname,
entry: './src/index.js',
devtool: 'source-map',
output: {
library: 'es2016-starter',
libraryTarget: 'umd',
path: path.resolve('dist'),
filename: 'es2015-starter.js',
},
resolve: {
extensions: ['.js'],
modules: [
... | const path = require('path')
const webpack = require('webpack')
module.exports = {
context: __dirname,
entry: './src/index.js',
devtool: 'source-map',
output: {
library: 'es2015-starter',
libraryTarget: 'umd',
path: path.resolve('dist'),
filename: 'es2015-starter.js',
},
resolve: {
ex... | Fix typo on output name, add module concat plugin. | Fix typo on output name, add module concat plugin.
| JavaScript | mit | kroogs/scanty,kroogs/yaemit | ---
+++
@@ -1,4 +1,5 @@
const path = require('path')
+const webpack = require('webpack')
module.exports = {
context: __dirname,
@@ -6,7 +7,7 @@
devtool: 'source-map',
output: {
- library: 'es2016-starter',
+ library: 'es2015-starter',
libraryTarget: 'umd',
path: path.resolve('dist'),
... |
7d9539421b17495570f779494d81ebb0b5cda7f8 | webpack.config.js | webpack.config.js | const { resolve } = require('path')
module.exports = {
mode: 'production',
entry: './dist.browser/index.js',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.js$/,
loader: 'file-replace-loader',
opt... | const { resolve } = require('path')
module.exports = {
mode: 'production',
entry: './dist.browser/browser/index.js',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
test: /\.js$/,
loader: 'file-replace-loader',
... | Revert webpack entry point change | Revert webpack entry point change
| JavaScript | mpl-2.0 | ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereum/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm,ethereumjs/ethereumjs-vm | ---
+++
@@ -2,7 +2,7 @@
module.exports = {
mode: 'production',
- entry: './dist.browser/index.js',
+ entry: './dist.browser/browser/index.js',
module: {
rules: [
{ |
a3b622643e4fcc2edc62327e8c9a33b2c6d419fa | ember-cli-build.js | ember-cli-build.js | /* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon')
module.exports = function (defaults) {
const app = new EmberAddon(defaults, {
babel: {
optional: ['es7.decorators']
},
'ember-cli-mocha': {
useLintTree: false
},
sassOptions: {
includePaths: [... | /* eslint-env node */
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon')
module.exports = function (defaults) {
const app = new EmberAddon(defaults, {
babel: {
optional: ['es7.decorators']
},
sassOptions: {
includePaths: [
'node_modules/ember-frost-css-core/scss',
... | Remove ember-cli-mocha useLintTree configuration option | Remove ember-cli-mocha useLintTree configuration option
| JavaScript | mit | ciena-blueplanet/ember-test-utils,sophypal/ember-test-utils,ciena-blueplanet/ember-test-utils,ciena-blueplanet/ember-test-utils,sophypal/ember-test-utils,sophypal/ember-test-utils | ---
+++
@@ -5,9 +5,6 @@
const app = new EmberAddon(defaults, {
babel: {
optional: ['es7.decorators']
- },
- 'ember-cli-mocha': {
- useLintTree: false
},
sassOptions: {
includePaths: [ |
3e887dd433998679c673b3900857d5e13d6dfbeb | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
home: path.join(__dirname, 'app/src/home'),
},
module: {
loaders: [
{
test: /\.sass$/,
loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'],
},
{
te... | const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: {
home: path.join(__dirname, 'app/src/home'),
},
module: {
loaders: [
{
test: /\.sass$/,
loaders: ['style-loader', 'css-loader', 'postcss-loader', 'sass-loader'],
},
{
te... | Remove inline serving from webpack dev server | Remove inline serving from webpack dev server
| JavaScript | mit | arkis/arkis.io,arkis/arkis.io | ---
+++
@@ -50,6 +50,5 @@
devServer: {
contentBase: path.join(__dirname, 'app/build'),
- inline: true,
},
}; |
072dbae8e4fb273a34a4c1d0ece641805d813fcc | webpack.config.js | webpack.config.js | var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require('path');
module.exports = [{
entry: {
horizontal: './shim/horizontal.js',
vertical: './shim/vertical.js'
},
output: {
library: 'ScratchBlocks',
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, 'dist'),
fil... | var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require('path');
module.exports = [{
entry: {
horizontal: './shim/horizontal.js',
vertical: './shim/vertical.js'
},
output: {
library: 'ScratchBlocks',
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, 'dist'),
fil... | Add UMD target for use without "require"/"import" | Add UMD target for use without "require"/"import"
| JavaScript | apache-2.0 | griffpatch/scratch-blocks,griffpatch/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,griffpatch/scratch-blocks,LLK/scratch-blocks,griffpatch/scratch-blocks,griffpatch/scratch-blocks | ---
+++
@@ -13,6 +13,18 @@
filename: '[name].js'
}
}, {
+ entry: {
+ horizontal: './shim/horizontal.js',
+ vertical: './shim/vertical.js'
+ },
+ output: {
+ library: 'Blockly',
+ libraryTarget: 'umd',
+ path: path.resolve(__dirname, 'dist', 'web'),
+ filename: '[name].js'
+ }
+},
+{
... |
a846b2b8aa57aa0e31080d10e6e92b793f19fb95 | webpack.config.js | webpack.config.js | const webpack = require('webpack');
module.exports = {
entry: `${__dirname}/src/index.js`,
output: {
path: `${__dirname}/build`,
publicPath: '/build/',
filename: 'bundle.js',
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
],
},
plugins:... | const webpack = require('webpack');
module.exports = {
entry: `${__dirname}/src/index.js`,
output: {
path: `${__dirname}/build`,
publicPath: '/build/',
filename: 'bundle.js',
},
module: {
rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
],
},
plugins:... | Remove webpack plugin for node env production | Remove webpack plugin for node env production
Webpack 2 sets this automatically with the -p flag
| JavaScript | mit | ambershen/ambershen.github.io,ambershen/ambershen.github.io | ---
+++
@@ -15,9 +15,6 @@
},
plugins: process.argv.indexOf('-p') === -1 ? [] : [
- new webpack.DefinePlugin({
- 'process.env.NODE_ENV': JSON.stringify('production'),
- }),
new webpack.optimize.UglifyJsPlugin({
output: {
comments: false, |
7922d5ea742c9e7eef5c317394b126bc5dc33784 | webpack.config.js | webpack.config.js | var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: {
'tree-chooser': './src/index.js',
'tree-chooser.min': './src/index.js'
},
output: {
path: './dist',
filename: '[name].js'
},
externals: {
... | var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: {
'tree-chooser': './src/index.js',
'tree-chooser.min': './src/index.js'
},
output: {
path: './dist',
filename: '[name].js',
library: 'tree-choo... | Make lodash an external for real | Make lodash an external for real
| JavaScript | apache-2.0 | randdusing/tree-chooser,albertian/tree-chooser,albertian/tree-chooser,randdusing/tree-chooser | ---
+++
@@ -9,11 +9,15 @@
},
output: {
path: './dist',
- filename: '[name].js'
+ filename: '[name].js',
+ library: 'tree-chooser',
+ libraryTarget: 'commonjs'
},
externals: {
angular: 'angular',
- lodash: '_'
+ lodash : {
+ 'commonjs': 'lodash'
+ }
},
module: {
... |
4fd065919b64297536ddbceed9d52aed81fa4b0e | yarn-recursive.js | yarn-recursive.js | #!/usr/bin/env node
const path = require('path');
const shell = require('shelljs');
const argv = require('yargs').argv;
const clc = require('cli-color');
function packageJsonLocations(dirname) {
return shell.find(dirname)
.filter(fname => !(fname.indexOf('node_modules') > -1 || fname[0] === '.') && path.basenam... | #!/usr/bin/env node
const path = require('path');
const shell = require('shelljs');
const argv = require('yargs').argv;
const clc = require('cli-color');
function packageJsonLocations(dirname) {
return shell.find(dirname)
.filter(fname => !(fname.indexOf('node_modules') > -1 || fname[0] === '.') && path.basenam... | Use platform-specific path separator in log messages. | Use platform-specific path separator in log messages.
| JavaScript | mit | nrigaudiere/yarn-recursive | ---
+++
@@ -20,7 +20,7 @@
if (argv.opt)
command += ' ' + argv.opt;
- console.log(clc.blueBright('Current yarn path: ' + directoryName + '/package.json...'));
+ console.log(clc.blueBright('Current yarn path: ' + directoryName + path.sep + 'package.json...'));
shell.cd(directoryName);
let result ... |
3914130255de502902fe35893fb435cbeb94e8c4 | .storybook/main.js | .storybook/main.js | module.exports = {
stories: ['../components/*.stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/storyshots'],
};
| module.exports = {
stories: ['../components/*.stories.js'],
addons: ['@storybook/addon-actions', '@storybook/addon-links'],
};
| Remove redundant storyshot plugin configuration | Remove redundant storyshot plugin configuration
| JavaScript | mit | cofacts/rumors-site,cofacts/rumors-site | ---
+++
@@ -1,4 +1,4 @@
module.exports = {
stories: ['../components/*.stories.js'],
- addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/storyshots'],
+ addons: ['@storybook/addon-actions', '@storybook/addon-links'],
}; |
74bd30e8deee50bdc41fc21f9616df76ceb7a994 | www/js/BeerTap.js | www/js/BeerTap.js | define(['Twitter', 'TwitterConfirmer', 'TapsModel', 'JQMListView', 'ListPresenter', 'JQMEditView', 'EditPresenter', 'FollowingPresenter', 'SettingsPage'],
function(Twitter, TwitterConfirmer, TapsModel, JQMListView, ListPresenter, JQMEditView, EditPresenter, FollowingPresenter, SettingsPage) {
function BeerTap(twit... | define(['Twitter', 'TwitterConfirmer', 'TapsModel', 'JQMListView', 'ListPresenter', 'JQMEditView', 'EditPresenter', 'FollowingPresenter', 'SettingsPage'],
function(Twitter, TwitterConfirmer, TapsModel, JQMListView, ListPresenter, JQMEditView, EditPresenter, FollowingPresenter, SettingsPage) {
function BeerTap(twit... | Revert previous change to changePage() call - it's causing problems. | Revert previous change to changePage() call - it's causing problems.
| JavaScript | mit | coolhandmook/BeerTap,coolhandmook/BeerTap | ---
+++
@@ -21,7 +21,7 @@
$(document).ajaxStop(function() { $.mobile.loading( 'hide' ); });
$(document).ajaxError(function() { alert("Error fetching data"); });
- $.mobile.changePage("#main", { changeHash:false });
+ $.mobile.changePage("#main");
}
return BeerTap; |
f6524d0f0f092258ff5d491138b6a78c4e4dc3b8 | example/app.js | example/app.js | var express = require('express');
var http = require('http');
var routes = require('./routes');
var app = express();
app.set('views', __dirname);
app.set('view engine', 'ejs');
if (app.get('env') === 'development') {
var browserSync = require('browser-sync');
var bs = browserSync({ logSnippet: false });
app.use... | var express = require('express');
var http = require('http');
var routes = require('./routes');
var app = express();
app.set('views', __dirname);
app.set('view engine', 'ejs');
if (app.get('env') === 'development') {
var browserSync = require('browser-sync');
var bs = browserSync.create().init({ logSnippet: false... | Use BrowserSync 2.0 form of initialization. | Use BrowserSync 2.0 form of initialization.
| JavaScript | mit | schmich/connect-browser-sync,schmich/connect-browser-sync | ---
+++
@@ -8,7 +8,7 @@
if (app.get('env') === 'development') {
var browserSync = require('browser-sync');
- var bs = browserSync({ logSnippet: false });
+ var bs = browserSync.create().init({ logSnippet: false });
app.use(require('connect-browser-sync')(bs));
}
|
aca697b17742b680cc6732ec2a9adae951b01ea0 | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const buildEntryPoint = entryPoint => {
return [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
entryPoint
];
};
const plugins = [
new webpack.optimize.CommonsChunkPlugi... | const path = require('path');
const webpack = require('webpack');
const buildEntryPoint = entryPoint => {
return [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:3000',
'webpack/hot/only-dev-server',
entryPoint
];
};
const plugins = [
new webpack.optimize.CommonsChunkPlugi... | Clean up Webpack Dev Server Logs | Clean up Webpack Dev Server Logs
| JavaScript | mit | ibleedfilm/fcc-react-project,ibleedfilm/recipe-box,ibleedfilm/recipe-box,ibleedfilm/fcc-react-project | ---
+++
@@ -52,7 +52,13 @@
hot: true,
inline: true,
stats: {
- colors: true
+ assets: true,
+ colors: true,
+ version: false,
+ hash: false,
+ timings: true,
+ chunks: false,
+ chunkModules: false
},
port: 3000
}, |
f6af9188e6bbac4f9231fcceecf53c125e520ec7 | webpack.config.js | webpack.config.js | const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const WebpackAutoInject = require('webpack-auto-inject-version');
module.exports = {
entry: {
'typedjson': './src/typedjson.ts',
'typedjson.min': './src/typedjson.ts',
},
devtool: 'source-map',
module: {
rules:... | const path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const WebpackAutoInject = require('webpack-auto-inject-version');
module.exports = {
entry: {
'typedjson': './src/typedjson.ts',
'typedjson.min': './src/typedjson.ts',
},
devtool: 'source-map',
module: {
rules:... | Change global to node compatible | Change global to node compatible
| JavaScript | mit | JohnWhiteTB/TypedJSON,JohnWhiteTB/TypedJSON,JohnWeisz/TypedJSON,JohnWeisz/TypedJSON,JohnWhiteTB/TypedJSON | ---
+++
@@ -26,6 +26,7 @@
library: 'typedjson',
libraryTarget: 'umd',
umdNamedDefine: true,
+ globalObject: `(typeof self !== 'undefined' ? self : this)`,
},
optimization: {
minimizer: [ |
8c075d8c2dd3231309cdff9d9363fcd9b8cb5457 | webpack.config.js | webpack.config.js | module.exports = {
devtool: 'source-map',
entry: './src/Home.jsx',
output: {
path: './public',
filename: './js/app.js',
publicPath: '/'
},
devServer: {
inline: true,
contentBase: './public',
},
module: {
loaders: [
{
... | module.exports = {
devtool: 'source-map',
entry: './src/browser.jsx',
output: {
path: './public',
filename: './js/app.js',
publicPath: '/'
},
devServer: {
inline: true,
contentBase: './public',
},
module: {
loaders: [
{
... | Include browser file as entry point | Include browser file as entry point
| JavaScript | mit | Juan1ll0/es6-react-server-side-render,Juan1ll0/es6-react-server-side-render | ---
+++
@@ -1,6 +1,6 @@
module.exports = {
devtool: 'source-map',
- entry: './src/Home.jsx',
+ entry: './src/browser.jsx',
output: {
path: './public',
filename: './js/app.js', |
288ce5205edcf7e6c1afda5fa62d95c479aa6c30 | src/components/ProfilePage.js | src/components/ProfilePage.js | import React from 'react';
import { connect } from 'react-redux';
class ProfilePage extends React.Component {
constructor(props){
super(props);
this.logoff = this.logoff.bind(this);
}
logoff(){
localStorage.setItem('token', '');
this.props.history.push('/login');
}
render(){
return (
... | import React from 'react';
import { connect } from 'react-redux';
import { setChartAction } from '../actions/chartActions';
class ProfilePage extends React.Component {
constructor(props){
super(props);
this.logoff = this.logoff.bind(this);
}
logoff(){
localStorage.setItem('token', '');
this.prop... | Delete charts in store on logout | Delete charts in store on logout
| JavaScript | mit | MouseZero/voting-app,MouseZero/voting-app | ---
+++
@@ -1,5 +1,6 @@
import React from 'react';
import { connect } from 'react-redux';
+import { setChartAction } from '../actions/chartActions';
class ProfilePage extends React.Component {
constructor(props){
@@ -9,6 +10,7 @@
logoff(){
localStorage.setItem('token', '');
+ this.props.logout();... |
ddeb0918712169f45f744682279440d0a317032e | src/ol/format/XLink.js | src/ol/format/XLink.js | /**
* @module ol/format/XLink
*/
/**
* @const
* @type {string}
*/
const NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
/**
* @param {Node} node Node.
* @return {boolean|undefined} Boolean.
*/
export function readHref(node) {
return node.getAttributeNS(NAMESPACE_URI, 'href');
}
| /**
* @module ol/format/XLink
*/
/**
* @const
* @type {string}
*/
const NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
/**
* @param {Node} node Node.
* @return {string|undefined} href.
*/
export function readHref(node) {
return node.getAttributeNS(NAMESPACE_URI, 'href');
}
| Fix wrong return type for readHref function | Fix wrong return type for readHref function
| JavaScript | bsd-2-clause | mzur/ol3,fredj/ol3,tschaub/ol3,geekdenz/ol3,oterral/ol3,bjornharrtell/ol3,fredj/ol3,mzur/ol3,stweil/ol3,mzur/ol3,adube/ol3,tschaub/ol3,ahocevar/ol3,tschaub/ol3,geekdenz/openlayers,geekdenz/ol3,geekdenz/ol3,adube/ol3,ahocevar/openlayers,oterral/ol3,stweil/ol3,ahocevar/openlayers,stweil/openlayers,openlayers/openlayers,a... | ---
+++
@@ -12,7 +12,7 @@
/**
* @param {Node} node Node.
- * @return {boolean|undefined} Boolean.
+ * @return {string|undefined} href.
*/
export function readHref(node) {
return node.getAttributeNS(NAMESPACE_URI, 'href'); |
9da51749c48c09bcd443b3a32ea51734dc34d60a | src/pages/_document.js | src/pages/_document.js | /* eslint-disable react/no-danger */
import Document, { Head, Main, NextScript } from 'next/document'
import React from 'react'
// The document (which is SSR-only) needs to be customized to expose the locale
// data for the user's locale for React Intl to work in the browser.
export default class IntlDocument extends... | /* eslint-disable react/no-danger */
import Document, { Head, Main, NextScript } from 'next/document'
import React from 'react'
// The document (which is SSR-only) needs to be customized to expose the locale
// data for the user's locale for React Intl to work in the browser.
export default class IntlDocument extends... | Update polyfill url to include default | Update polyfill url to include default | JavaScript | agpl-3.0 | uzh-bf/klicker-react,uzh-bf/klicker-react | ---
+++
@@ -22,7 +22,7 @@
render() {
// Polyfill Intl API for older browsers
const polyfill = `https://cdn.polyfill.io/v2/polyfill.min.js
- ?features=Intl.~locale.${this.props.locale}`
+ ?features=default,fetch,Intl,Intl.~locale.de,Intl.~locale.en`
return (
<html lang={this.props.... |
423bbaf03c83313d327b6c84e6b77ad6787de9e4 | generators/client/templates/src/main/webapp/app/account/social/_social.service.js | generators/client/templates/src/main/webapp/app/account/social/_social.service.js | (function() {
'use strict';
angular
.module('<%=angularAppName%>')
.factory('SocialService', SocialService);
SocialService.$inject = ['$document'];
function SocialService ($document) {
var socialService = {
getProviderSetting: getProviderSetting,
getPro... | (function() {
'use strict';
angular
.module('<%=angularAppName%>')
.factory('SocialService', SocialService);
SocialService.$inject = ['$document', '$http', '$cookies'];
function SocialService ($document, $http, $cookies) {
var socialService = {
getProviderSetting: ... | Use $cookies to retrive CSRF cookie token value | Use $cookies to retrive CSRF cookie token value
| JavaScript | apache-2.0 | rifatdover/generator-jhipster,baskeboler/generator-jhipster,JulienMrgrd/generator-jhipster,ziogiugno/generator-jhipster,vivekmore/generator-jhipster,vivekmore/generator-jhipster,mosoft521/generator-jhipster,gmarziou/generator-jhipster,baskeboler/generator-jhipster,dimeros/generator-jhipster,PierreBesson/generator-jhips... | ---
+++
@@ -5,9 +5,9 @@
.module('<%=angularAppName%>')
.factory('SocialService', SocialService);
- SocialService.$inject = ['$document'];
+ SocialService.$inject = ['$document', '$http', '$cookies'];
- function SocialService ($document) {
+ function SocialService ($document, $http, $... |
a47277dc01719beb91bbe71e5bfcf33eefbfa2b9 | server.js | server.js | const Hapi = require('@hapi/hapi');
const routes = require('./routes');
const auth = require('./auth');
module.exports = async (elastic, config, cb) => {
const server = new Hapi.Server({ port: config.port, routes: { cors: true, log: { collect: true } } });
server.route(routes(elastic, config));
if (config.auth... | const Hapi = require('@hapi/hapi');
const routes = require('./routes');
const auth = require('./auth');
module.exports = async (elastic, config, cb) => {
const server = new Hapi.Server({ port: config.port, routes: { cors: { origin: "ignore" }, log: { collect: true } } });
server.route(routes(elastic, config));
... | Enable CORS ignore orgin header | Enable CORS ignore orgin header
| JavaScript | mit | TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline | ---
+++
@@ -3,7 +3,7 @@
const auth = require('./auth');
module.exports = async (elastic, config, cb) => {
- const server = new Hapi.Server({ port: config.port, routes: { cors: true, log: { collect: true } } });
+ const server = new Hapi.Server({ port: config.port, routes: { cors: { origin: "ignore" }, log: { co... |
9ba37879aab75e4817ab7673a144521a86464580 | src/server/xhr-proxy.js | src/server/xhr-proxy.js | // Copyright (c) Microsoft Corporation. All rights reserved.
var http = require('http'),
url = require('url');
module.exports.attach = function (app) {
app.all('/xhr_proxy', function proxyXHR(request, response) {
var requestURL = url.parse(unescape(request.query.rurl));
request.headers.host =... | // Copyright (c) Microsoft Corporation. All rights reserved.
var http = require('http'),
https = require('https'),
url = require('url');
module.exports.attach = function (app) {
app.all('/xhr_proxy', function proxyXHR(request, response) {
var requestURL = url.parse(unescape(request.query.rurl));
... | Support for HTTPS in XHR proxy. | Support for HTTPS in XHR proxy.
| JavaScript | mit | TimBarham/cordova-simulate,Microsoft/taco-simulate-server,Microsoft/taco-simulate-server,TimBarham/cordova-simulate | ---
+++
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
var http = require('http'),
+ https = require('https'),
url = require('url');
module.exports.attach = function (app) {
@@ -22,7 +23,11 @@
var proxyCallback = function (proxyReponse) {
proxyReponse... |
44d44c1a110f66a5cfd51608d3fb463cc87705f0 | gulpfile.js | gulpfile.js | var gulp = require("gulp");
var browserify = require("browserify");
var source = require("vinyl-source-stream");
var buffer = require("vinyl-buffer");
var reactify = require("reactify");
var watch = require("gulp-watch");
var plumber = require("gulp-plumber");
var uglify = require('gulp-uglify');
gulp.task("browserify... | var gulp = require("gulp");
var browserify = require("browserify");
var source = require("vinyl-source-stream");
var buffer = require("vinyl-buffer");
var reactify = require("reactify");
var watch = require("gulp-watch");
var plumber = require("gulp-plumber");
var uglify = require('gulp-uglify');
gulp.task("browserify... | Change to show error message when browserify failed | Change to show error message when browserify failed
| JavaScript | mit | Sixeight/iwai,Sixeight/iwai,Sixeight/iwai | ---
+++
@@ -13,7 +13,7 @@
transform: [reactify]
});
bs.bundle()
- .on("error", function() {})
+ .on("error", function(e) { console.log(e.message) })
.pipe(plumber())
.pipe(source("app.js"))
.pipe(buffer()) |
7c867bc44d695ab15ecf63bdcf71db4088893551 | sketch.js | sketch.js | const WIDTH = 800;
const HEIGHT = 600;
var setup = function() {
createCanvas(WIDTH, HEIGHT);
background(0);
fill(255);
angleMode(DEGREES);
stroke(255);
strokeWeight(1);
strokeCap(SQUARE);
}
var draw = function() {
translate(200, 200);
rotate(45);
rect(-50, -25, 100, 50);
}
| const WIDTH = 800;
const HEIGHT = 600;
var setup = function() {
createCanvas(WIDTH, HEIGHT);
background(0);
fill(255);
angleMode(DEGREES);
stroke(255);
strokeWeight(1);
strokeCap(SQUARE);
}
var draw = function() {
push();
translate(200, 200);
rotate(45);
rect(-50, -25, 100, 50);
pop();
pu... | Use push and pop for different rectangles | Use push and pop for different rectangles
| JavaScript | mit | SimonHFrost/my-p5,SimonHFrost/my-p5 | ---
+++
@@ -14,7 +14,21 @@
}
var draw = function() {
+ push();
translate(200, 200);
rotate(45);
rect(-50, -25, 100, 50);
+ pop();
+
+ push();
+ translate(100, 300);
+ rotate(45);
+ rect(-50, -25, 100, 50);
+ pop();
+
+ push();
+ translate(300, 100);
+ rotate(45);
+ rect(-50, -25, 100, 50);
+ ... |
dbc8ad8b2a0bcd6229585910611808ae7c29791d | js/songz.js | js/songz.js | const songs = [...document.querySelectorAll('.songList li')];
const currentSong = document.querySelector('#currentSong');
songs.map((s) => {
s.addEventListener('click', () => {
currentSong.setAttribute('src', "https://archive.org/download/plays_some_standards/" + s.textContent.toLowerCase().replace(/\s/g, '_') + ... | const songs = [...document.querySelectorAll('.songList li')];
const currentSong = document.querySelector('#currentSong');
songs.map((s) => {
s.addEventListener('click', () => {
currentSong.setAttribute('src', "https://archive.org/download/plays_some_standards/" + s.textContent.toLowerCase().replace(/\s/g, '_') + ... | Add underline to playing song. | Add underline to playing song. | JavaScript | mpl-2.0 | ryanpcmcquen/ryanpcmcquen.github.io,ryanpcmcquen/ryanpcmcquen.github.io | ---
+++
@@ -3,5 +3,9 @@
songs.map((s) => {
s.addEventListener('click', () => {
currentSong.setAttribute('src', "https://archive.org/download/plays_some_standards/" + s.textContent.toLowerCase().replace(/\s/g, '_') + ".mp3");
+ songs.map((i) => {
+ i.style.textDecoration = 'none';
+ });
+ s.styl... |
46bf3ad1bee7ac96ccf23c26033b69b2d6394220 | src/utils/convertToMoment.js | src/utils/convertToMoment.js | import moment from 'moment';
import {has} from 'ramda';
export default (newProps, momentProps) => {
const dest = {};
momentProps.forEach(key => {
const value = newProps[key];
if (value === null || value === undefined) {
dest[key] = null;
if (key === 'initial_visible_m... | import moment from 'moment';
import {has} from 'ramda';
export default (newProps, momentProps) => {
const dest = {};
momentProps.forEach(key => {
const value = newProps[key];
if (value === null || value === undefined) {
dest[key] = null;
if (key === 'initial_visible_m... | Fix problem with moment conversion | Fix problem with moment conversion
| JavaScript | mit | plotly/dash-core-components | ---
+++
@@ -20,7 +20,7 @@
);
}
} else if (Array.isArray(value)) {
- dest[key] = value.map(moment);
+ dest[key] = value.map(d => moment(d));
} else {
dest[key] = moment(value);
|
0825096862510c43b937ddac5c83b58a7a133f47 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sh = require('shelljs');
var del = require('del');
var copyHTML = require('ionic-gulp-html-copy');
var requireDir = require('require-dir');
var gulpTask = requireDir('./gulp');
gulp.task... | var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sh = require('shelljs');
var del = require('del');
var copyHTML = require('ionic-gulp-html-copy');
var requireDir = require('require-dir');
var gulpTask = requireDir('./gulp');
gulp.task... | Add watch task to default | Add watch task to default
| JavaScript | mit | naratipud/ionic-ts-sample,naratipud/ionic-ts-sample,naratipud/ionic-ts-sample | ---
+++
@@ -9,7 +9,7 @@
var gulpTask = requireDir('./gulp');
gulp.task('default', ['clean'], function() {
- gulp.start('build');
+ gulp.start('build', 'watch');
});
gulp.task('install', ['git-check'], function() { |
14537e283e19802f2decfae2f269caf0c8860b20 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var elm = require('gulp-elm');
var plumber = require('gulp-plumber');
var del = require('del');
var browserSync = require('browser-sync');
// builds elm files and static resources (i.e. html and css) from src to dist folder
var paths = {
dest: 'dist',
elm: 'src/*.elm',
staticAss... | var gulp = require('gulp');
var elm = require('gulp-elm');
var plumber = require('gulp-plumber');
var del = require('del');
var browserSync = require('browser-sync');
// builds elm files and static resources (i.e. html and css) from src to dist folder
var paths = {
dest: 'dist',
elm: 'src/*.elm',
staticAss... | Disable notification in browser-sync as it caused issues with layout | Disable notification in browser-sync as it caused issues with layout
| JavaScript | mit | martin-kolinek/elm-dashboard,martin-kolinek/elm-dashboard | ---
+++
@@ -36,7 +36,8 @@
browserSync.init({
server: {
baseDir: "dist/"
- }
+ },
+ notify: false
});
});
|
14909c3d779edddad99b5f08ad5b17a4802abc13 | app/assets/javascripts/profile.js | app/assets/javascripts/profile.js | const checkStatus = () => {
fetch("/load_status", {
credentials: "same-origin"
})
.then(response => {
return response.text();
})
.then(data => {
document.getElementById("repo-alert").style.display = "block";
if (data === "true") {
document.getElementById("repo-load-info").i... | const checkStatus = () => {
fetch("/repositories/load_status", {
credentials: "same-origin"
})
.then(response => {
return response.text();
})
.then(data => {
document.getElementById("repo-alert").style.display = "block";
if (data === "true") {
document.getElementById("repo-... | Use correct load_status path in JS | Use correct load_status path in JS
| JavaScript | mit | schneidmaster/gitreports.com,schneidmaster/gitreports.com,schneidmaster/gitreports.com | ---
+++
@@ -1,5 +1,5 @@
const checkStatus = () => {
- fetch("/load_status", {
+ fetch("/repositories/load_status", {
credentials: "same-origin"
})
.then(response => { |
c67221a0661795471bc5c650292d3e6321e623a8 | gulpfile.js | gulpfile.js | var gulp = require('gulp')
var browserify = require('browserify')
var source = require('vinyl-source-stream')
var serve = require('gulp-serve')
var concat = require('gulp-concat')
// Static file server
gulp.task('server', serve({
root: ['example', 'dist'],
port: 7000
}))
gulp.task('build', function () {
return ... | var gulp = require('gulp')
var source = require('vinyl-source-stream')
var serve = require('gulp-serve')
var rename = require('gulp-rename')
var browserify = require('browserify')
var buffer = require('vinyl-buffer')
var uglify = require('gulp-uglify')
var taskListing = require('gulp-task-listing')
// Static file serv... | Add gulp release script to generate minified build. | Add gulp release script to generate minified build. | JavaScript | mit | opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-js-core,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-js-core,jahtalab/opbeat-js,jahtalab/opbeat-js,opbeat/opbeat-angular | ---
+++
@@ -1,14 +1,29 @@
var gulp = require('gulp')
-var browserify = require('browserify')
var source = require('vinyl-source-stream')
var serve = require('gulp-serve')
-var concat = require('gulp-concat')
+var rename = require('gulp-rename')
+var browserify = require('browserify')
+var buffer = require('vinyl-b... |
b9f206997eed1fbadfdeea81dd165fb17750f6a4 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var less = require('gulp-less');
var plumber = require("gulp-plumber");
var browserSync = require('browser-sync').create();
gulp.task('run', function() {
browserSync.init({
server: "./"
});
gulp.watch(['komforta.less', 'less/*.less'], ['compile']);
gulp.watch('*.css').on('change... | var gulp = require('gulp');
var less = require('gulp-less');
var plumber = require("gulp-plumber");
var browserSync = require('browser-sync').create();
gulp.task('run', function() {
browserSync.init({
server: "./"
});
gulp.watch(['komforta.less', 'less/*.less'], ['compile']);
gulp.watch('*.css').on('change... | Add settings when error occured | Add settings when error occured
| JavaScript | mit | rochefort/hatena-blog-theme-komforta,rochefort/hatena-blog-theme-komforta | ---
+++
@@ -13,10 +13,13 @@
gulp.task('compile', function() {
return gulp.src('./komforta.less')
- .pipe(plumber())
- .pipe(less({
- paths: ['./']
+ .pipe(plumber({
+ errorHandler: function(error) {
+ console.log(error.message);
+ this.emit('end');
+ }
}))
+ .pipe(l... |
9f4144ee6c33e14aa5e824b117450083c3296ec9 | target.js | target.js | Target = function(x, y) {
this.x = x;
this.y = y;
this.life = 11;
this.size = 12;
return this;
}
Target.prototype.render = function() {
var x = this.x - gCamera.x;
var y = this.y - gCamera.y;
// Only render if within the camera's bounds
if (gCamera.isInView(this)) {
renderPath([['a... | Target = function(x, y, type) {
this.x = x;
this.y = y;
this.life = 11;
this.size = 12;
this.type = typeof type === 'string' ? type : 'circle';
return this;
}
Target.prototype.render = function() {
var x = this.x - gCamera.x;
var y = this.y - gCamera.y;
// Only render if within the came... | Update Target to accept different types | Update Target to accept different types
| JavaScript | mit | peternatewood/shmup,peternatewood/shmup,peternatewood/shmup | ---
+++
@@ -1,8 +1,9 @@
-Target = function(x, y) {
+Target = function(x, y, type) {
this.x = x;
this.y = y;
this.life = 11;
this.size = 12;
+ this.type = typeof type === 'string' ? type : 'circle';
return this;
}
@@ -12,10 +13,14 @@
// Only render if within the camera's bounds
if (gCamera.i... |
89ad381b6aa24b12ab02c3de9a049806bd1bd20a | patches/promise.js | patches/promise.js | 'use strict';
function PromiseWrap() {}
module.exports = function patchPromise() {
const hooks = this._hooks;
const state = this._state;
const Promise = global.Promise;
const oldThen = Promise.prototype.then;
Promise.prototype.then = wrappedThen;
function makeWrappedHandler(fn, handle, uid) {
if ('f... | 'use strict';
function PromiseWrap() {}
module.exports = function patchPromise() {
const hooks = this._hooks;
const state = this._state;
const Promise = global.Promise;
/* As per ECMAScript 2015, .catch must be implemented by calling .then, as
* such we need needn't patch .catch as well. see:
* http:/... | Add comment explaining why it is unnecessary to patch .catch | Add comment explaining why it is unnecessary to patch .catch
| JavaScript | mit | AndreasMadsen/async-hook | ---
+++
@@ -7,6 +7,11 @@
const state = this._state;
const Promise = global.Promise;
+
+ /* As per ECMAScript 2015, .catch must be implemented by calling .then, as
+ * such we need needn't patch .catch as well. see:
+ * http://www.ecma-international.org/ecma-262/6.0/#sec-promise.prototype.catch
+ */
... |
d2d24f2c3a0daf1db0bc75f598fce9e17d87e675 | tests/dummy/app/app.js | tests/dummy/app/app.js | import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
let App;
Ember.MODEL_FACTORY_INJECTIONS = true;
App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePre... | import Ember from 'ember';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';
let App;
App = Ember.Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});
loadInitializers(Ap... | Fix Model Factory Injections Deprecation | Fix Model Factory Injections Deprecation
Fix ember-metal.model-factory-injections deprecation by removing
code that set the MODEL_FACTORY_INJECTIONS flag, which is no longer
needed.
| JavaScript | mit | OCTRI/ember-i18next,OCTRI/ember-i18next | ---
+++
@@ -4,8 +4,6 @@
import config from './config/environment';
let App;
-
-Ember.MODEL_FACTORY_INJECTIONS = true;
App = Ember.Application.extend({
modulePrefix: config.modulePrefix, |
a08eccf9b84b5754f7cf09c06292a76ea3f1a6bb | testem.js | testem.js | 'use strict';
let isCI = !!process.env.CI;
let smokeTests = !!process.env.SMOKE_TESTS;
let config = {
framework: 'qunit',
test_page: smokeTests ? 'tests/index.html?smoke_tests=true' : 'tests/index.html?hidepassed',
disable_watching: true,
browser_start_timeout: smokeTests ? 300000 : 30000,
browser_args: {
... | 'use strict';
let isCI = !!process.env.CI;
let smokeTests = !!process.env.SMOKE_TESTS;
let config = {
framework: 'qunit',
test_page: smokeTests ? 'tests/index.html?smoke_tests=true' : 'tests/index.html?hidepassed',
disable_watching: true,
browser_start_timeout: smokeTests ? 300000 : 30000,
browser_disconnec... | Increase browser disconnect timeout in smoke tests | Increase browser disconnect timeout in smoke tests
| JavaScript | mit | glimmerjs/glimmer-vm,tildeio/glimmer,glimmerjs/glimmer-vm,tildeio/glimmer,tildeio/glimmer,glimmerjs/glimmer-vm | ---
+++
@@ -8,6 +8,7 @@
test_page: smokeTests ? 'tests/index.html?smoke_tests=true' : 'tests/index.html?hidepassed',
disable_watching: true,
browser_start_timeout: smokeTests ? 300000 : 30000,
+ browser_disconnect_timeout: smokeTests ? 120 : 10,
browser_args: {
Chrome: {
mode: 'ci', |
ca287bf5f22637d98af2ea9c78b499c7fc058766 | busstops/static/js/global.js | busstops/static/js/global.js | /*jslint browser: true*/
if (navigator.serviceWorker && location.protocol === 'https://') {
try {
navigator.serviceWorker.register('/serviceworker.js', {
scope: '/'
});
window.addEventListener('load', function () {
if (navigator.serviceWorker.controller) {
... | /*jslint browser: true*/
if (navigator.serviceWorker && location.host !== 'localhost:8000') {
navigator.serviceWorker.register('/serviceworker.js', {
scope: '/'
});
window.addEventListener('load', function () {
if (navigator.serviceWorker.controller) {
navigator.serviceWorker.co... | Revert "catch service worker error?" | Revert "catch service worker error?"
This reverts commit c14cfe8917c1f1c23ccd4bbd25a7b40d6c5d6b2b.
| JavaScript | mpl-2.0 | jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk,jclgoodwin/bustimes.org.uk | ---
+++
@@ -1,16 +1,14 @@
/*jslint browser: true*/
-if (navigator.serviceWorker && location.protocol === 'https://') {
- try {
- navigator.serviceWorker.register('/serviceworker.js', {
- scope: '/'
- });
- window.addEventListener('load', function () {
- if (navigator.s... |
96a7e42c5ee0226dee571e9aa0ef9774d2eb4c77 | topics/about_numbers.js | topics/about_numbers.js |
module("About Numbers (topics/about_numbers.js)");
test("types", function() {
var typeOfIntegers = typeof(6);
var typeOfFloats = typeof(3.14159);
equal(__, typeOfIntegers === typeOfFloats, 'are ints and floats the same type?');
equal(__, typeOfIntegers, 'what is the javascript numeric type?');
equ... |
module("About Numbers (topics/about_numbers.js)");
test("types", function() {
var typeOfIntegers = typeof(6);
var typeOfFloats = typeof(3.14159);
equal(true, typeOfIntegers === typeOfFloats, 'are ints and floats the same type?');
equal('number', typeOfIntegers, 'what is the javascript numeric type?');... | Complete numbers tests to pass | Complete numbers tests to pass
| JavaScript | mit | supportbeam/javascript_koans,supportbeam/javascript_koans | ---
+++
@@ -4,13 +4,13 @@
test("types", function() {
var typeOfIntegers = typeof(6);
var typeOfFloats = typeof(3.14159);
- equal(__, typeOfIntegers === typeOfFloats, 'are ints and floats the same type?');
- equal(__, typeOfIntegers, 'what is the javascript numeric type?');
- equal(__, 1.0, 'what i... |
6c66286a761072fd7b69aabd85a7d75a93b7c80c | lib/initial.js | lib/initial.js | /*!
* stylus-initial
* Copyright (c) 2014 Pierre-Antoine "Leny" Delnatte <info@flatland.be>
* (Un)Licensed
*/
"use strict";
var utils = require( "stylus" ).utils,
rInitial = /([a-z\-]+)\s*:\s*(initial);/gi,
oInitialValues = require( "./values.json" );
var plugin = function() {
return function( stylus... | /*!
* stylus-initial
* Copyright (c) 2014 Pierre-Antoine "Leny" Delnatte <info@flatland.be>
* (Un)Licensed
*/
"use strict";
var utils = require( "stylus" ).utils,
rInitial = /([a-z\-]+)\s*:\s*(initial);/gi,
oInitialValues = require( "./values.json" );
var plugin = function() {
return function( stylus... | Refactor the code to be a pre-processing task. | Refactor the code to be a pre-processing task.
| JavaScript | unlicense | leny/stylus-initial | ---
+++
@@ -12,15 +12,21 @@
var plugin = function() {
return function( stylus ) {
- stylus.on( "end", function( err, css ) {
- return css.replace( rInitial, function( sRule, sProperty ) {
- var mInitialValue;
- if( ( mInitialValue = oInitialValues[ sProperty ] )... |
28141a5f615c5d11151e850beb7b6541045daeab | src/utils/general.js | src/utils/general.js | const getTaggedTemplateLiteralContent = require('./tagged-template-literal').getTaggedTemplateLiteralContent
const getCSS = (node) => `
.selector {
${getTaggedTemplateLiteralContent(node)}
}
`
const getKeyframes = (node) => `
@keyframes {
${getTaggedTemplateLiteralContent(node)}
}
`
exports.getKeyframes = getKey... | const getTaggedTemplateLiteralContent = require('./tagged-template-literal').getTaggedTemplateLiteralContent
const getCSS = (node) => `.selector {${getTaggedTemplateLiteralContent(node)}}\n`
const getKeyframes = (node) => `@keyframes {${getTaggedTemplateLiteralContent(node)}}\n`
exports.getKeyframes = getKeyframes
e... | Fix whitespace in generated CSS | Fix whitespace in generated CSS
| JavaScript | mit | styled-components/stylelint-processor-styled-components | ---
+++
@@ -1,16 +1,8 @@
const getTaggedTemplateLiteralContent = require('./tagged-template-literal').getTaggedTemplateLiteralContent
-const getCSS = (node) => `
-.selector {
- ${getTaggedTemplateLiteralContent(node)}
-}
-`
+const getCSS = (node) => `.selector {${getTaggedTemplateLiteralContent(node)}}\n`
-cons... |
92510dc784b2ee72684b33668614d43e278542f5 | src/lib/config.example.js | src/lib/config.example.js | module.exports = {
SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY',
backend: {
hapiRemote: true,
hapiLocal: false,
parseRemote: false,
parseLocal: false
},
HAPI: {
local: {
url: 'http://localhost:5000'
},
remote: {
url: 'https://snowflakeserver-bartonhammond.rhcloud.com/'
}
... | module.exports = {
SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY',
backend: {
hapiRemote: false,
hapiLocal: false,
parseRemote: true,
parseLocal: false
},
HAPI: {
local: {
url: 'http://localhost:5000'
},
remote: {
url: 'https://snowflakeserver-bartonhammond.rhcloud.com/'
}
... | Change default remote server to a working one | Change default remote server to a working one
| JavaScript | mit | mkurutin/snowflake,mkurutin/snowflake,mkurutin/snowflake,mkurutin/snowflake | ---
+++
@@ -1,9 +1,9 @@
module.exports = {
SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY',
backend: {
- hapiRemote: true,
+ hapiRemote: false,
hapiLocal: false,
- parseRemote: false,
+ parseRemote: true,
parseLocal: false
},
HAPI: { |
56f1f0c255d80f21d55828ba0c7d40bdeb62431b | src/main/webapp/js/app.js | src/main/webapp/js/app.js | 'use strict';
/* App Module */
angular.module('nestorshop', ['nestorshopServices']).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/products', {templateUrl: 'partials/product-list.html', controller: ProductListCtrl}).
when('/products/:productId', {templateUrl: 'partials/... | 'use strict';
/* App Module */
angular.module('nestorshop', ['nestorshopServices'], function($httpProvider) {
// Use x-www-form-urlencoded Content-Type
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
// Override $http service's default transformReques... | Change POST of angular to send values in FormData (for jersey to read) | Change POST of angular to send values in FormData (for jersey to read)
By default it sends parameters as Request Payload, and jersey ignores
them.
Read :
http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/
| JavaScript | apache-2.0 | nestorpina/nestor-shop,IGZnestorpina/nestor-shop,nestorpina/nestor-shop,IGZnestorpina/nestor-shop,nestorpina/nestor-shop,IGZnestorpina/nestor-shop | ---
+++
@@ -2,7 +2,15 @@
/* App Module */
-angular.module('nestorshop', ['nestorshopServices']).
+angular.module('nestorshop', ['nestorshopServices'], function($httpProvider) {
+ // Use x-www-form-urlencoded Content-Type
+ $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded... |
ed1ef7efea65c12f77551044f11feab4f4aeb291 | src/main/webapp/search.js | src/main/webapp/search.js | // Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | // Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | Change response to text instead of json | Change response to text instead of json
| JavaScript | apache-2.0 | googleinterns/step132-2020,googleinterns/step132-2020,googleinterns/step132-2020 | ---
+++
@@ -16,7 +16,7 @@
var topic = document.getElementById("topic-search-box").value;
- fetch("/search?topic="+topic).then(response => response.json()).then((results) => {
+ fetch("/search?topic="+topic).then(response => response.text()).then((results) => {
console.log(results);
});
|
93c7fafada259af365e9f98a2d9a139f528052ae | config/dev.js | config/dev.js | // Rollup plugins.
import babel from 'rollup-plugin-babel'
import cjs from 'rollup-plugin-commonjs'
import globals from 'rollup-plugin-node-globals'
import replace from 'rollup-plugin-replace'
import resolve from 'rollup-plugin-node-resolve'
export default {
dest: 'build/app.js',
entry: 'src/index.js',
format: '... | // Rollup plugins.
import babel from 'rollup-plugin-babel'
import cjs from 'rollup-plugin-commonjs'
import globals from 'rollup-plugin-node-globals'
import replace from 'rollup-plugin-replace'
import resolve from 'rollup-plugin-node-resolve'
export default {
dest: 'build/app.js',
entry: 'src/index.js',
format: '... | Include create-react-class in Rollup configuration :newspaper:. | Include create-react-class in Rollup configuration :newspaper:.
| JavaScript | mit | yamafaktory/babel-react-rollup-starter,yamafaktory/babel-react-rollup-starter | ---
+++
@@ -19,6 +19,7 @@
cjs({
exclude: 'node_modules/process-es6/**',
include: [
+ 'node_modules/create-react-class/**',
'node_modules/fbjs/**',
'node_modules/object-assign/**',
'node_modules/react/**', |
a65fae011bce4e2ca9a920b51a0fc681ee21c178 | components/hoc/with-errors.js | components/hoc/with-errors.js | import React from 'react'
import PropTypes from 'prop-types'
import hoist from 'hoist-non-react-statics'
import ErrorPage from '../../pages/_error'
export default Page => {
const Extended = hoist(class extends React.Component {
static propTypes = {
error: PropTypes.object
}
static defaultProps = ... | import React from 'react'
import PropTypes from 'prop-types'
import hoist from 'hoist-non-react-statics'
import ErrorPage from '../../pages/_error'
export default Page => {
const Extended = hoist(class extends React.Component {
static propTypes = {
error: PropTypes.object
}
static defaultProps = ... | Set server statusCode on error | Set server statusCode on error
| JavaScript | mit | sgmap/inspire,sgmap/inspire | ---
+++
@@ -42,16 +42,22 @@
}
}, Page)
- if (Page.getInitialProps) {
- Extended.getInitialProps = async context => {
+ Extended.getInitialProps = async context => {
+ if (Page.getInitialProps) {
try {
return await Page.getInitialProps(context)
} catch (error) {
+ if (co... |
29211d88af3f1820293637f23680a4f24656c32e | src/models/send-to-api.js | src/models/send-to-api.js | 'use strict';
const { addOauthHeader } = require('@clevercloud/client/cjs/oauth.node.js');
const { prefixUrl } = require('@clevercloud/client/cjs/prefix-url.js');
const { request } = require('@clevercloud/client/cjs/request.request.js');
const { conf, loadOAuthConf } = require('../models/configuration.js');
async fun... | 'use strict';
const { addOauthHeader } = require('@clevercloud/client/cjs/oauth.node.js');
const { prefixUrl } = require('@clevercloud/client/cjs/prefix-url.js');
const { request } = require('@clevercloud/client/cjs/request.superagent.js');
const { conf, loadOAuthConf } = require('../models/configuration.js');
async ... | Use @clevercloud/client superagent helper instead of request | Use @clevercloud/client superagent helper instead of request
| JavaScript | apache-2.0 | CleverCloud/clever-tools,CleverCloud/clever-tools,CleverCloud/clever-tools | ---
+++
@@ -2,7 +2,7 @@
const { addOauthHeader } = require('@clevercloud/client/cjs/oauth.node.js');
const { prefixUrl } = require('@clevercloud/client/cjs/prefix-url.js');
-const { request } = require('@clevercloud/client/cjs/request.request.js');
+const { request } = require('@clevercloud/client/cjs/request.sup... |
106c51e36add35f2b98bcf940c98363e707d2acb | public/javascripts/labelingGuidePanelResize.js | public/javascripts/labelingGuidePanelResize.js | function checkWindowSize(){
var w = document.documentElement.clientWidth;
var panel = document.getElementById("help-panel");
if (w < 978) {
panel.style.position = "static";
panel.style.width = "auto";
} else if (w >= 978 && w < 1184) {
panel.style.position = "fixed";
pane... | function checkWindowSize(){
var w = document.documentElement.clientWidth;
var panel = document.getElementById("help-panel");
if (w < 978) {
panel.style.position = "static";
panel.style.width = "auto";
} else if (w >= 978 && w < 1184) {
panel.style.position = "fixed";
pane... | Add newline to end of file | Add newline to end of file
| JavaScript | mit | ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage | |
870c1e1c0b1fa98430331689da51fb15c563895a | test/unitSpecs/commonSpec.js | test/unitSpecs/commonSpec.js | /**
* Created by rgwozdz on 8/15/15.
*/
var moduleUnderTest = require("../../app/common.js")
var assert = require('chai').assert;
var equal = require('deep-equal');
describe('common.js module', function() {
describe('parseQueryOptions', function () {
it('should return expected Object with properties and... | /**
* Created by rgwozdz on 8/15/15.
*/
var moduleUnderTest = require("../../app/common.js")
var assert = require('chai').assert;
var equal = require('deep-equal');
describe('common.js module', function() {
describe('parseQueryOptions', function () {
it('should return expected Object with properties and... | Adjust unit test expected result. | Adjust unit test expected result.
| JavaScript | apache-2.0 | Cadasta/cadasta-api,Cadasta/cadasta-api,Cadasta/cadasta-api | ---
+++
@@ -17,7 +17,7 @@
columns: 'a,b',
geometryColumn: null,
limit: 'LIMIT 2',
- order_by: 'ORDER BY a,b'
+ order_by: 'ORDER BY a,b DESC'
};
assert.equal(equal(result,expectedResult), true); |
d6a80dc1d374a88d771c3bd7aad0cad91c67bd03 | core/server/api/sandstorm.js | core/server/api/sandstorm.js | // # Sandstorm API
// RESTful API for the Sandstorm resource
var capnp = require('capnp'),
url = require('url'),
sandstorm;
var HackSession = capnp.importSystem("hack-session.capnp");
var publicIdPromise;
var initPromise = function () {
if (!publicIdPromise) {
var connection =... | // # Sandstorm API
// RESTful API for the Sandstorm resource
var capnp = require('capnp'),
url = require('url'),
_ = require('lodash'),
sandstorm;
var HackSession = capnp.importSystem("hack-session.capnp");
var publicIdPromise;
var initPromise = function () {
if (!pub... | Fix bug in returning autoUrl for Sandstorm | Fix bug in returning autoUrl for Sandstorm
| JavaScript | mit | jparyani/GhostSS,jparyani/GhostSS,jparyani/GhostSS | ---
+++
@@ -2,6 +2,7 @@
// RESTful API for the Sandstorm resource
var capnp = require('capnp'),
url = require('url'),
+ _ = require('lodash'),
sandstorm;
var HackSession = capnp.importSystem("hack-session.capnp");
@@ -47,8 +48,9 @@
faq: function browse() {
... |
f95b32c8678ca2814dca9b502a7bb592fb287c24 | web/static/js/reducers/idea.js | web/static/js/reducers/idea.js | const idea = (state = [], action) => {
switch (action.type) {
case "SET_IDEAS":
return action.ideas
case "ADD_IDEA":
return [...state, action.idea]
case "UPDATE_IDEA":
return state.map(idea => {
return (idea.id === action.ideaId) ? Object.assign({}, idea, action.newAttributes) : ... | const idea = (state = [], action) => {
switch (action.type) {
case "SET_IDEAS":
return action.ideas
case "ADD_IDEA":
return [...state, action.idea]
case "UPDATE_IDEA":
return state.map(idea => {
return (idea.id === action.ideaId) ? { ...idea, ...action.newAttributes } : idea
... | Use spread operator rather than Object.assign | Use spread operator rather than Object.assign
| JavaScript | mit | stride-nyc/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,tnewell5/remote_retro | ---
+++
@@ -6,7 +6,7 @@
return [...state, action.idea]
case "UPDATE_IDEA":
return state.map(idea => {
- return (idea.id === action.ideaId) ? Object.assign({}, idea, action.newAttributes) : idea
+ return (idea.id === action.ideaId) ? { ...idea, ...action.newAttributes } : idea
}... |
34049a1d776a4bb7c9b397fee63da30faa2bc30b | api/actions/boardgames/loadFromBGG.js | api/actions/boardgames/loadFromBGG.js | import request from 'request';
import { parseString } from 'xml2js';
export default function loadFromBGG(req) {
return new Promise((resolve, reject) => {
request({
url: `http://www.boardgamegeek.com/xmlapi2/search?query=${req.query.q}&type=boardgame`,
timeout: 10000
}, (error, response, body) => ... | import request from 'request';
import { parseString } from 'xml2js';
export default function loadFromBGG(req) {
return new Promise((resolve, reject) => {
request({
url: `http://www.boardgamegeek.com/xmlapi2/search?query=${req.query.q}&type=boardgame`,
timeout: 10000
}, (error, response, body) => ... | Comment out sorting function for now | Comment out sorting function for now
| JavaScript | mit | fuczak/pipsy | ---
+++
@@ -24,7 +24,8 @@
return el.type === 'boardgame';
})
.sort((prev, current) => {
- return current.year - prev.year;
+ // TODO: Should the items be sorted by year?
+ // return current.year - prev.year;
}));
} e... |
35ad895d4885e3caf9cc7c3073c78bd2c13ad32d | samples/VanillaJSTestApp/app/b2c/authConfig.js | samples/VanillaJSTestApp/app/b2c/authConfig.js | // Config object to be passed to Msal on creation
const msalConfig = {
auth: {
clientId: "e760cab2-b9a1-4c0d-86fb-ff7084abd902",
authority: "https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/b2c_1_susi",
knownAuthorities: ["fabrikamb2c.b2clogin.com"]
},
cache: {
ca... | // Config object to be passed to Msal on creation
const msalConfig = {
auth: {
clientId: "5dac5d6d-225c-4a98-a5e4-e29c82c0c4c9",
authority: "https://public.msidlabb2c.com/tfp/cpimtestpartners.onmicrosoft.com/b2c_1_signupsignin_userflow",
knownAuthorities: ["public.msidlabb2c.com"]
},
... | Update with lab app registration | Update with lab app registration
| JavaScript | mit | AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication... | ---
+++
@@ -1,9 +1,9 @@
// Config object to be passed to Msal on creation
const msalConfig = {
auth: {
- clientId: "e760cab2-b9a1-4c0d-86fb-ff7084abd902",
- authority: "https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/b2c_1_susi",
- knownAuthorities: ["fabrikamb2c.b2clogin.com"... |
109da2da9a35318d59060400833d4378c7622b6f | app/assets/javascripts/application.js | app/assets/javascripts/application.js | /* global $ */
/* global GOVUK */
// Warn about using the kit in production
if (
window.sessionStorage && window.sessionStorage.getItem('prototypeWarning') !== 'false' &&
window.console && window.console.info
) {
window.console.info('GOV.UK Prototype Kit - do not use for production')
window.sessionStorage.setI... | /* global $ */
/* global GOVUK */
// Warn about using the kit in production
if (window.console && window.console.info) {
window.console.info('GOV.UK Prototype Kit - do not use for production')
}
$(document).ready(function () {
// Use GOV.UK shim-links-with-button-role.js to trigger a link styled to look like a bu... | Fix JS error in Safari’s Private Browsing mode | Fix JS error in Safari’s Private Browsing mode
Safari in Private Browsing mode sets a session storage quota of 0 which means that attempts to write to it result in a QuotaExceededError being thrown, breaking JavaScript on the rest of the page.
The existing code is flawed in that it sets `prototypeWarning` to true but... | JavaScript | mit | dwpdigitaltech/hrt-prototype,gavinwye/govuk_prototype_kit,dwpdigitaltech/hrt-prototype,joelanman/govuk_prototype_kit,benjeffreys/hmcts-idam-proto,joelanman/govuk_prototype_kit,benjeffreys/hmcts-idam-proto,alphagov/govuk_prototype_kit,alphagov/govuk_prototype_kit,hannalaakso/accessible-timeout-warning,joelanman/govuk_pr... | ---
+++
@@ -2,12 +2,8 @@
/* global GOVUK */
// Warn about using the kit in production
-if (
- window.sessionStorage && window.sessionStorage.getItem('prototypeWarning') !== 'false' &&
- window.console && window.console.info
-) {
+if (window.console && window.console.info) {
window.console.info('GOV.UK Protot... |
3d782cc9f93ae645ef9eb4f8fafbf57117aa111c | lib/init.js | lib/init.js | var _ = require('lodash');
module.exports = function(grunt) {
var module = {};
module.domain = function() {
return process.env.GRUNT_DRUPAL_DOMAIN || grunt.config('config.domain') || require('os').hostname();
};
// Ensure a default URL for the project.
module.siteUrls = function() {
return grunt.co... | var _ = require('lodash');
module.exports = function(grunt) {
var module = {};
module.domain = function() {
return process.env.GRUNT_DRUPAL_DOMAIN || grunt.config('config.domain') || require('os').hostname();
};
// Ensure a default URL for the project.
module.siteUrls = function() {
return grunt.co... | Remove stray variable breaking defaultUrl calculation. | Remove stray variable breaking defaultUrl calculation.
| JavaScript | mit | AndBicScadMedia/grunt-drupal-tasks,EvanLovely/grunt-drupal-tasks,phase2/grunt-drupal-tasks,EvanLovely/grunt-drupal-tasks,AndBicScadMedia/grunt-drupal-tasks,phase2/grunt-drupal-tasks,EvanLovely/grunt-drupal-tasks,phase2/grunt-drupal-tasks,AndBicScadMedia/grunt-drupal-tasks,AndBicScadMedia/grunt-drupal-tasks,EvanLovely/g... | ---
+++
@@ -31,7 +31,7 @@
grunt.config('config.siteUrls', {});
grunt.config('config.domain', module.domain());
- grunt.config('config.siteUrls.default', module.siteUrls(defaultUrl));
+ grunt.config('config.siteUrls.default', module.siteUrls());
grunt.config('config.buildPaths', module.buildPa... |
980fc6cfc3702645eafd18dc46d9a399ca7fb3ad | lib/mime.js | lib/mime.js | /*!
* YUI Mocha
* Copyright 2011 Yahoo! Inc.
* Licensed under the BSD license.
*/
/**
* @module mime
*/
/**
* File extension to MIME type map.
*
* Used by `serve.js` when streaming files from disk.
*
* @property contentTypes
* @type object
*/
this.contentTypes = {
"css": "text/css",
"html": "text/htm... | /*!
* YUI Mocha
* Copyright 2011 Yahoo! Inc.
* Licensed under the BSD license.
*/
/**
* @module mime
*/
/**
* File extension to MIME type map.
*
* Used by `serve.js` when streaming files from disk.
*
* @property contentTypes
* @type object
*/
this.contentTypes = {
"css": "text/css",
"html": "text/htm... | Use same .xml MIME type as rgrove/combohandler. | Use same .xml MIME type as rgrove/combohandler.
| JavaScript | bsd-3-clause | reid/onyx,reid/onyx | ---
+++
@@ -30,5 +30,5 @@
"swf": "application/x-shockwave-flash",
"tiff": "image/tiff",
"txt": "text/plain",
- "xml": "text/xml"
+ "xml": "application/xml"
}; |
1b3faf12cf97bc2a534c941a59ac026ab49e0565 | src/numbers.js | src/numbers.js | 'use strict';
/**
*
* @param {integer } digit
* @returns {string} Returns Nepali converted string of given digit or numbers.
* @example
*
* numbers(2090873)
* // => २०९०८७३
*
* numbers()
* // => false
*
*/
function numbers (digit) {
if(!digit) {
console.log("@numbers: Yuck, got nothin... | 'use strict';
/**
*
* @param {integer } digit
* @returns {string} Returns Nepali converted string of given digit or numbers.
* @example
*
* numbers(2090873)
* // => २०९०८७३
*
* numbers()
* // => false
*
*/
function numbers (digit) {
const isdigit = parseInt(digit, 10);
if(typeof isdigit !... | Check typeof of given value | Check typeof of given value
| JavaScript | mit | shekhardesigner/NepaliDateConverter | ---
+++
@@ -15,12 +15,13 @@
function numbers (digit) {
- if(!digit) {
+ const isdigit = parseInt(digit, 10);
+ if(typeof isdigit !== "number") {
console.log("@numbers: Yuck, got nothing");
return false;
}
- if(isNaN(parseInt(digit, 10))) {
+ if(isNaN(isdigit)) {
... |
452ff1c3ce7ae04695f640b8b4e642f724d6be55 | lib/util.js | lib/util.js | 'use strict';
/**
* Retrieve a localized configuration value or the default if the localization
* is unavailable.
*
* @param {String} configuration value
* @param {String} language
* @param {Object} Hexo configuration object
* @param {String} Hexo locals object
* @returns {*} localized or default configuratio... | 'use strict';
/**
* Retrieve a localized configuration value or the default if the localization
* is unavailable.
*
* @param {String} configuration value
* @param {String} language
* @param {Object} Hexo configuration object
* @param {String} Hexo locals object
* @returns {*} localized or default configuratio... | Check for undefined localized values | Check for undefined localized values
Fixes #2.
| JavaScript | mit | ahaasler/hexo-multilingual | ---
+++
@@ -12,7 +12,8 @@
*/
exports._c = function _c(value, lang, config, locals) {
if (locals.data['config_' + lang] != null) {
- return retrieveItem(locals.data['config_' + lang], value) || retrieveItem(config, value);
+ var localized = retrieveItem(locals.data['config_' + lang], value)
+ return localized ... |
3984d6e214a81837361a3a65a405b84344b54120 | app/modules/main/directives/Header.js | app/modules/main/directives/Header.js | 'use strict';
header.$inject = ['$rootScope', '$state', 'AuthService'];
function header($rootScope, $state, AuthService) {
return {
name: 'header',
template: require('./templates/header.html'),
scope: true,
link: function link(scope) {
scope.toggled = false;
... | 'use strict';
header.$inject = ['$rootScope', '$state', 'AuthService'];
function header($rootScope, $state, AuthService) {
return {
name: 'header',
template: require('./templates/header.html'),
scope: true,
link: function link(scope) {
scope.toggled = false;
... | Set logout button to reload state if current state is 'home' | Set logout button to reload state if current state is 'home'
| JavaScript | mit | zdizzle6717/hapi-angular-stack,zdizzle6717/hapi-angular-stack | ---
+++
@@ -22,7 +22,7 @@
function logout() {
AuthService.logout();
- $state.go('home');
+ $state.go('home', {}, {reload: true});
}
}
}; |
1ef82c281c5df2ded7dd4f1954fc0beb34e53899 | tasks/sismd.js | tasks/sismd.js | /* task for generating html from sisdocs markdown */
module.exports = function(grunt) {
'use strict';
var marked = require('marked');
var hljs = require('highlight.js');
marked.setOptions({
breaks : true,
highlight: function(code, lang) {
var result = hljs.highlight(lang, co... | /* task for generating html from sisdocs markdown */
module.exports = function(grunt) {
'use strict';
var marked = require('marked');
var hljs = require('highlight.js');
var renderer = new marked.Renderer();
var oldLink = renderer.link;
renderer.link = function(href, title, text) {
if (... | Fix a bug in documentation generation | Fix a bug in documentation generation
| JavaScript | bsd-3-clause | sis-cmdb/sis-ui,sis-cmdb/sis-ui | ---
+++
@@ -3,12 +3,23 @@
'use strict';
var marked = require('marked');
var hljs = require('highlight.js');
+ var renderer = new marked.Renderer();
+
+ var oldLink = renderer.link;
+ renderer.link = function(href, title, text) {
+ if (href[0] === '#' && text.indexOf('.') !== -1) {
+ ... |
ad25532c3601d23df11a23b8295cfc753a79e2ec | spec/javascripts/fixtures/educatorsViewJson.js | spec/javascripts/fixtures/educatorsViewJson.js | export default {
"id": 101,
"email": "hugo@demo.studentinsights.org",
"admin": false,
"full_name": "Teacher, Hugo",
"staff_type": null,
"schoolwide_access": false,
"grade_level_access": [],
"restricted_to_sped_students": false,
"restricted_to_english_language_learners": false,
"can_view_restricted_n... | export default {
"id": 101,
"email": "hugo@demo.studentinsights.org",
"admin": false,
"full_name": "Teacher, Hugo",
"staff_type": null,
"schoolwide_access": false,
"grade_level_access": [],
"restricted_to_sped_students": false,
"restricted_to_english_language_learners": false,
"can_view_restricted_n... | Fix lint error in JS fixture | Fix lint error in JS fixture
| JavaScript | mit | studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights | ---
+++
@@ -10,7 +10,6 @@
"restricted_to_english_language_learners": false,
"can_view_restricted_notes": false,
"districtwide_access": false,
- "labels": [],
"school": {
"id": 9,
"name": "Somerville High" |
cbec8ddeaa98e7510e2616f18f64df8340dd97e0 | src/item-button.js | src/item-button.js | import { select } from 'd3';
import Item from './item';
export default class ButtonItem extends Item {
constructor() {
super();
this._root
.classed('button', true)
.styles({
'background': '#FFF',
'cursor': 'pointer',
'height': '3em',
'justify-content': 'center'
... | import Item from './item';
export default class ButtonItem extends Item {
constructor() {
super();
this._root
.classed('button', true)
.styles({
'background': '#FFF',
'cursor': 'pointer',
'height': '3em',
'justify-content': 'center',
'padding': '0.5em 0'
... | Add padding to button item | Add padding to button item
| JavaScript | mit | scola84/node-d3-list | ---
+++
@@ -1,4 +1,3 @@
-import { select } from 'd3';
import Item from './item';
export default class ButtonItem extends Item {
@@ -11,7 +10,8 @@
'background': '#FFF',
'cursor': 'pointer',
'height': '3em',
- 'justify-content': 'center'
+ 'justify-content': 'center',
+ ... |
e0b595bb8e631c29add7d486db9dc84285bab3f3 | public/js/admin.js | public/js/admin.js | window.admin = {};
$(document).ready(function() {
$("#admin-feedback").on("tabOpened", function() {
window.api.get("admin/feedback/getList", function(resp) {
$("#admin-feedback-list").text("");
for (var feedbackIndex in resp.feedback) {
var feedbackItem = resp.feedback[feedbackIndex];
var $feedbackLi ... | window.admin = {};
$(document).ready(function() {
$("#admin-feedback").on("tabOpened", function() {
window.api.get("admin/feedback/getList", function(resp) {
$("#admin-feedback-list").text("");
for (var feedbackIndex in resp.feedback) {
var feedbackItem = resp.feedback[feedbackIndex];
var $feedbackLi ... | Add username to feedback entries | Add username to feedback entries | JavaScript | mit | MyHomeworkSpace/MyHomeworkSpace,PlanHubMe/PlanHub,MyHomeworkSpace/MyHomeworkSpace,PlanHubMe/PlanHub,MyHomeworkSpace/MyHomeworkSpace | ---
+++
@@ -20,7 +20,7 @@
$feedbackDesc.prepend($icon);
$feedbackLi.append($feedbackDesc);
var $feedbackName = $('<div></div>');
- $feedbackName.text(feedbackItem.name);
+ $feedbackName.text(feedbackItem.name + " (" + feedbackItem.username + ")");
$feedbackLi.append($feedbackName);
... |
44d11c878d7085b3ec320041f3182156497be91b | src/tests/setup.js | src/tests/setup.js | import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import 'jest-enzyme'; // better matchers
Enzyme.configure({
adapter: new Adapter(),
});
| import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import 'jest-enzyme'; // better matchers
Enzyme.configure({
adapter: new Adapter(),
});
if (process.env.CI) {
// Hide all console output
console.log = jest.fn();
console.warn = jest.fn();
console.error = jest.fn();
}
| Disable console output in Travis | Disable console output in Travis
| JavaScript | agpl-3.0 | sMteX/WoWAnalyzer,fyruna/WoWAnalyzer,enragednuke/WoWAnalyzer,ronaldpereira/WoWAnalyzer,anom0ly/WoWAnalyzer,sMteX/WoWAnalyzer,Juko8/WoWAnalyzer,hasseboulen/WoWAnalyzer,FaideWW/WoWAnalyzer,yajinni/WoWAnalyzer,Juko8/WoWAnalyzer,hasseboulen/WoWAnalyzer,Juko8/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,sMteX/WoWAnalyzer,ronaldperei... | ---
+++
@@ -5,3 +5,10 @@
Enzyme.configure({
adapter: new Adapter(),
});
+
+if (process.env.CI) {
+ // Hide all console output
+ console.log = jest.fn();
+ console.warn = jest.fn();
+ console.error = jest.fn();
+} |
22098b256358982f8a845b05242465db33edd008 | src/utils/fetch.js | src/utils/fetch.js | /**
* Fetch module.
* @module base/utils/fetch
*/
import fetchJsonP from 'fetch-jsonp'
export var defaultOptions = {
credentials: 'same-origin'
}
export var defaultJsonpOptions = {
timeout: 5000,
jsonpCallback: 'callback',
jsonpCallbackFunction: null
}
export function checkStatus(response) {
if (respon... | /**
* Fetch module.
* @module base/utils/fetch
*/
import fetchJsonP from 'fetch-jsonp'
export var defaultOptions = {
credentials: 'same-origin',
headers: {
'http_x_requested_with': 'fetch'
}
}
export var defaultJsonpOptions = {
timeout: 5000,
jsonpCallback: 'callback',
jsonpCallbackFunction: null
... | Send http_x_requested_with header to be able to check for ajax request | Send http_x_requested_with header to be able to check for ajax request
| JavaScript | mit | Goldinteractive/js-base,Goldinteractive/js-base | ---
+++
@@ -6,7 +6,10 @@
import fetchJsonP from 'fetch-jsonp'
export var defaultOptions = {
- credentials: 'same-origin'
+ credentials: 'same-origin',
+ headers: {
+ 'http_x_requested_with': 'fetch'
+ }
}
export var defaultJsonpOptions = {
@@ -27,6 +30,12 @@
export function url(u, opts = {}) {
op... |
36dfe83249242444a747a2c97c1febce3b0c173b | lib/job.js | lib/job.js | var events = require('events');
var util = require('util');
module.exports = Job;
function Job(collection, data) {
this.collection = collection;
if(data){
data.__proto__ = JobData.prototype; //Convert plain object to JobData type
this.data = data;
} else {
this.data = new JobData()... | var events = require('events');
var util = require('util');
module.exports = Job;
function Job(collection, data) {
this.collection = collection;
if(data){
data.__proto__ = JobData.prototype; //Convert plain object to JobData type
this.data = data;
} else {
this.data = new JobData()... | Use toString instead of toHexString | Use toString instead of toHexString
| JavaScript | mit | trsouz/monq,dhritzkiv/monq,dioscouri/nodejs-monq,arifsetiawan/monq,saintedlama/monq,Santinell/monq,deployable/monq,scttnlsn/monq | ---
+++
@@ -45,6 +45,6 @@
Object.defineProperty(JobData.prototype, 'id', {
get: function(){
- return this._id && this._id.toHexString && this._id.toHexString();
+ return this._id && this._id.toString && this._id.toString();
}
}); |
a0bfebc24d8eec171cbca7696a3823c388b543c1 | src/components/Activity.js | src/components/Activity.js | import React, { Component, PropTypes } from 'react';
import moment from 'moment';
class Activity extends Component {
render() {
const { timestamp, activity, deleteActivity } = this.props;
return (
<div className="row row--middle">
<div className="col--2">
<p>{moment(+timestamp).form... | import React, { Component, PropTypes } from 'react';
import moment from 'moment';
class Activity extends Component {
render() {
const { timestamp, activity, deleteActivity } = this.props;
return (
<div className="row row--middle">
<div className="col--4">
<p>
{activity.d... | Remove date string from activity | Remove date string from activity
| JavaScript | mit | mknudsen01/today,mknudsen01/today | ---
+++
@@ -8,12 +8,11 @@
return (
<div className="row row--middle">
- <div className="col--2">
- <p>{moment(+timestamp).format('MMMM DD, YYYY')}</p>
- </div>
<div className="col--4">
- <span>{activity.description}</span>
- <span className="pl" onClick={... |
9a26b6c509419f91726a4b31c93931540ddd33f0 | src/components/GameList.js | src/components/GameList.js | import React from 'react';
import '../styles/games.css';
export default class GameList extends React.Component {
constructor(props) {
super(props);
this.state = {games: []};
}
componentWillReceiveProps(nextProps) {
let games = [];
nextProps.games.forEach(game => {
... | import React from 'react';
import '../styles/games.css';
export default class GameList extends React.Component {
constructor(props) {
super(props);
this.state = {games: []};
}
componentWillReceiveProps(nextProps) {
let games = [];
nextProps.games.forEach(game => {
... | Call onSelect event when a game is clicked. | Call onSelect event when a game is clicked.
| JavaScript | mit | Julzso23/player.me-one-click-share,Julzso23/player.me-one-click-share | ---
+++
@@ -11,9 +11,13 @@
componentWillReceiveProps(nextProps) {
let games = [];
nextProps.games.forEach(game => {
- games.push(<li key={game.id}>{game.title}</li>);
+ games.push(<li key={game.id} data-id={game.id} onClick={this.handleClick.bind(this)}>{game.title}</li>);... |
2e0235e8495dd47dcbf15fd2bd6e012d5d615054 | bin/codeclimate.js | bin/codeclimate.js | #!/usr/bin/env node
var Formatter = require("../formatter");
var client = require('../http_client');
process.stdin.resume();
process.stdin.setEncoding("utf8");
var input = "";
process.stdin.on("data", function(chunk) {
input += chunk;
});
process.stdin.on("end", function() {
formatter = new Formatter... | #!/usr/bin/env node
var Formatter = require("../formatter");
var client = require('../http_client');
process.stdin.resume();
process.stdin.setEncoding("utf8");
var input = "";
process.stdin.on("data", function(chunk) {
input += chunk;
});
process.stdin.on("end", function() {
formatter = new Formatter... | Add ability to print to stdout instead of POSTing | Add ability to print to stdout instead of POSTing
| JavaScript | mit | kyroskoh/javascript-test-reporter,therebelbeta/javascript-test-reporter,codeclimate/javascript-test-reporter,buildkite/javascript-test-reporter | ---
+++
@@ -18,8 +18,12 @@
if (err) {
console.error("A problem occurred parsing the lcov data", err);
} else {
- json['repo_token'] = process.env.CODECLIMATE_REPO_TOKEN;
- client.postJson(json);
+ if (process.env.CC_OUTPUT == "stdout") {
+ console.log(json);
+ } else {
+ ... |
6b701f707390938a069ab5742a15668e5c03f91d | src/custom-rx-operators.js | src/custom-rx-operators.js | import {Observable, Disposable} from 'rx';
Observable.prototype.subUnsub = function(onSub=null, onUnsub=null) {
return Observable.create((subj) => {
if (onSub) onSub();
let d = this.subscribe(subj);
return Disposable.create(() => {
if (onUnsub) onUnsub();
d.dispose();
});
});
};
... | import {Observable, Disposable} from 'rx';
Observable.prototype.subUnsub = function(onSub=null, onUnsub=null) {
return Observable.create((subj) => {
if (onSub) onSub();
let d = this.subscribe(subj);
return Disposable.create(() => {
if (onUnsub) onUnsub();
d.dispose();
});
});
};
... | Add an operator to delay failures | Add an operator to delay failures
| JavaScript | mit | surf-build/surf,surf-build/surf,surf-build/surf,surf-build/surf | ---
+++
@@ -22,3 +22,11 @@
return d;
});
};
+
+Observable.prototype.delayFailures = function(source, delayTime) {
+ return source
+ .catch((e) => {
+ return Observable.timeout(delayTime)
+ .flatMap(() => Observable.throw(e));
+ });
+}; |
18a6a22170a2f0d4adb304351cd2c073942586b1 | reporters/tap.js | reporters/tap.js | /**
* Results formatter for --format=tap
*
* @see http://podwiki.hexten.net/TAP/TAP.html?page=TAP
* @see https://github.com/isaacs/node-tap
*/
var Producer = require('tap').Producer;
module.exports = function(results) {
// public API
return {
render: function() {
var metrics = results.getMetricsNames(),
... | /**
* Results formatter for --format=tap
*
* @see http://podwiki.hexten.net/TAP/TAP.html?page=TAP
* @see https://github.com/isaacs/node-tap
*/
var Producer = require('tap').Producer;
module.exports = function(results) {
// public API
return {
render: function() {
var metrics = results.getMetricsNames(),
... | Format YAMLish properly to make it work in Jenkins | Format YAMLish properly to make it work in Jenkins
| JavaScript | bsd-2-clause | william-p/phantomas,ingoclaro/phantomas,william-p/phantomas,gmetais/phantomas,ingoclaro/phantomas,william-p/phantomas,macbre/phantomas,ingoclaro/phantomas,macbre/phantomas,gmetais/phantomas,gmetais/phantomas,macbre/phantomas | ---
+++
@@ -39,6 +39,11 @@
// add offenders
var offenders = results.getOffenders(metric);
if (offenders) {
+ // properly encode YAML to make it work in Jenkins
+ offenders = offenders.map(function(entry) {
+ return '"' + entry.replace(/"/g, '') + '"';
+ });
+
entry.offenders = of... |
0d1917939110865a62136dc6d66fac5749574881 | app/controllers/application.js | app/controllers/application.js | import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service(),
isExpanded: true,
isNotLogin: Ember.computed('this.currentPath', function() {
if (this.currentPath !== 'login') {
return true;
} else {
return false;
}
})... | import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service(),
isExpanded: true,
isNotLogin: Ember.computed('currentPath', function() {
return this.get('currentPath') !== 'login';
}),
sizeContainer: function() {
var winWidth = Ember.$(window).wi... | Fix display artifact that prevented sidebar from showing after login, until page was refreshed | Fix display artifact that prevented sidebar from showing after login, until page was refreshed
[#LEI-294]
| JavaScript | apache-2.0 | abought/experimenter,abought/experimenter | ---
+++
@@ -3,12 +3,8 @@
export default Ember.Controller.extend({
session: Ember.inject.service(),
isExpanded: true,
- isNotLogin: Ember.computed('this.currentPath', function() {
- if (this.currentPath !== 'login') {
- return true;
- } else {
- return false;
- ... |
268db5ed4558028c630c3b03bcd9b5cd4a578686 | app/js/services.js | app/js/services.js | (function() {
'use strict';
/* Services */
angular.module('myApp.services', [])
// put your services here!
// .service('serviceName', ['dependency', function(dependency) {}]);
.service('messageList', ['fbutil', function(fbutil) {
return fbutil.syncArray('messages', {limit: 10, endAt... | (function() {
'use strict';
/* Services */
angular.module('myApp.services', [])
// put your services here!
// .service('serviceName', ['dependency', function(dependency) {}]);
.factory('messageList', ['fbutil', function(fbutil) {
return fbutil.syncArray('messages', {limit: 10, endAt... | Switch service with factory (it's not a Class called with new) | Switch service with factory (it's not a Class called with new)
| JavaScript | mit | birdwell/Fantasy-Football,kmarwah/Seed,rawrsome/angularfire-seed,harish-myaccount/vigilante,russellf9/diary,u910328/Coding-Parrot-2.1,timothy-clifford/dashshelf,snowpeame/snowpeas,JonBergman/angularfire-seed,morganric/wildfirio,morganric/wildfirio,robotnoises/angularfire-seed,pmconnolly80/angularfire-seed,dialectica/an... | ---
+++
@@ -8,7 +8,7 @@
// put your services here!
// .service('serviceName', ['dependency', function(dependency) {}]);
- .service('messageList', ['fbutil', function(fbutil) {
+ .factory('messageList', ['fbutil', function(fbutil) {
return fbutil.syncArray('messages', {limit: 10, endAt:... |
319871c7b722c2a540ba48c9fe0fdfe07df9fef5 | app/assets/javascripts/sw.js | app/assets/javascripts/sw.js | console.log('Started', self);
self.addEventListener('install', function(event) {
self.skipWaiting();
console.log('Installed', event);
});
self.addEventListener('activate', function(event) {
console.log('Activated', event);
});
self.addEventListener('push', function(event) {
if (event.data) {
var json = even... | console.log('Started', self);
self.addEventListener('install', function(event) {
self.skipWaiting();
console.log('Installed', event);
});
self.addEventListener('activate', function(event) {
console.log('Activated', event);
});
self.addEventListener('push', function(event) {
if (event.data) {
var json = even... | Add ability to launch arb url from push | Add ability to launch arb url from push
| JavaScript | mit | coreyja/glassy-collections,coreyja/glassy-collections,coreyja/glassy-collections | ---
+++
@@ -18,7 +18,7 @@
var action = event.action || 'open-app';
- var url = false;
+ var url = event.url;
if (action === 'open-app') {
url = '//glassycollections.com/'; |
f9faf808f414ae53d372fe3ad5b4c6ca9b6e86c9 | src/webroot/js/fancybox.js | src/webroot/js/fancybox.js | /**
* Call the fancybox for displaying organism details in a lightbox
*/
$(".fancybox").fancybox({
maxWidth: 1000,
maxHeight: 800
}); | /**
* Call the fancybox for displaying organism details in a lightbox
*/
$(".fancybox").fancybox({
minWidth: 1000,
maxWidth: 1000,
maxHeight: 800,
minHeight: 800
}); | Set size of fancy box | Set size of fancy box
| JavaScript | mit | molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec | ---
+++
@@ -2,6 +2,8 @@
* Call the fancybox for displaying organism details in a lightbox
*/
$(".fancybox").fancybox({
+ minWidth: 1000,
maxWidth: 1000,
- maxHeight: 800
+ maxHeight: 800,
+ minHeight: 800
}); |
88207533c117a9ccc89f0d0b0e4a74fb97b6c821 | scripts/offsets.js | scripts/offsets.js | 'use strict';
const exec = require('child_process').execSync;
const ios = require('./contours-ios.json');
const web = require('./contours-web.json');
const fs = require('fs');
var offsets = {};
for (let font in web) {
const offset = {
x: web[font].x - ios[font].x,
y: web[font].y - ios[font].y
... | "use strict";
const exec = require("child_process").execSync;
const ios = require("./contours-ios.json");
const web = require("./contours-web.json");
const fs = require("fs");
var offsets = {};
for (let font in web) {
const offset = {
x: web[font].x - ios[font].x,
y: web[font].y - ios[font].y,
... | Update script to add top inset | Update script to add top inset
| JavaScript | mit | ninjaprox/TextContour,ninjaprox/TextContour,ninjaprox/TextContour,ninjaprox/TextContour | ---
+++
@@ -1,19 +1,20 @@
-'use strict';
+"use strict";
-const exec = require('child_process').execSync;
-const ios = require('./contours-ios.json');
-const web = require('./contours-web.json');
-const fs = require('fs');
+const exec = require("child_process").execSync;
+const ios = require("./contours-ios.json");
... |
f486e827dbfa258cbb051fd0ba08da86940ba066 | test/tests-test.js | test/tests-test.js | var buster = require("buster");
var firestarter = require('../')();
buster.testCase('Test testing framework', {
'Test' : function(){
'use strict';
assert(firestarter.config.testValue);
}
}); | var buster = require("buster");
var firestarter = require('../')();
buster.testCase('Test testing framework', {
'Test' : function(){
'use strict';
assert(!firestarter.config.testValue);
}
}); | Test of Travis failing build | Test of Travis failing build
| JavaScript | mit | davewilliamson/firestarter | ---
+++
@@ -7,6 +7,6 @@
'Test' : function(){
'use strict';
- assert(firestarter.config.testValue);
+ assert(!firestarter.config.testValue);
}
}); |
0c0fa72464530d3a9896a18d9b752626835dc1b2 | ui/src/registrator/PrihlaskyDohlasky/Platby/NovaPlatbaInputContainer.js | ui/src/registrator/PrihlaskyDohlasky/Platby/NovaPlatbaInputContainer.js | import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import InputContainer from '../Input/InputContainer';
import { inputChanged } from './PlatbyActions';
import {
formatValue,
inputOptions,
inputValid,
isInputEnabled,
isInputVisible
} from './platbyReducer';
const mapStateToProps = (st... | import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import InputContainer from '../Input/InputContainer';
import { inputChanged } from './PlatbyActions';
import {
formatValue,
inputOptions,
inputValid,
isInputEnabled,
isInputVisible
} from './platbyReducer';
const mapStateToProps = (st... | Unify component name and filename. | Unify component name and filename.
| JavaScript | mit | ivosh/jcm2018,ivosh/jcm2018,ivosh/jcm2018 | ---
+++
@@ -29,10 +29,10 @@
};
};
-const PlatbyInputContainer = connect(mapStateToProps, {})(InputContainer);
+const NovaPlatbaInputContainer = connect(mapStateToProps, {})(InputContainer);
-PlatbyInputContainer.propTypes = {
+NovaPlatbaInputContainer.propTypes = {
name: PropTypes.string.isRequired
};
-... |
4ed6fd92ad2f2b3b4088842d544e2154c4302b49 | src/rules/accessible-emoji.js | src/rules/accessible-emoji.js | /**
* @fileoverview Enforce emojis are wrapped in <span> and provide screenreader access.
* @author Ethan Cohen
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
import emojiRegex fro... | /**
* @fileoverview Enforce emojis are wrapped in <span> and provide screenreader access.
* @author Ethan Cohen
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
import emojiRegex fro... | Return just a boolean from find | Return just a boolean from find
| JavaScript | mit | evcohen/eslint-plugin-jsx-a11y,jessebeach/eslint-plugin-jsx-a11y | ---
+++
@@ -24,12 +24,9 @@
create: context => ({
JSXOpeningElement: (node) => {
- const literalChildValue = node.parent.children.find((child) => {
- if (child.type === 'Literal') {
- return child.value;
- }
- return false;
- });
+ const literalChildValue = node.p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.