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 |
|---|---|---|---|---|---|---|---|---|---|---|
f555d3422ada1c77e7c36d88b6b96d962b8b5f76 | ckanext/nhm/theme/public/scripts/modules/iframe-resize.js | ckanext/nhm/theme/public/scripts/modules/iframe-resize.js | // Track iframe content height changes and resize element accordingly
this.ckan.module('iframe-resize', function(jQuery, _) {
return {
initialize: function() {
var $iframe = this.el;
var i_window = $iframe.get(0).contentWindow;
var i_doc = i_window.document;
jQuery(i_window).resize(functio... | // Track iframe content height changes and resize element accordingly
this.ckan.module('iframe-resize', function(jQuery, _) {
return {
initialize: function() {
var $iframe = this.el;
$iframe.ready(function(){
var i_window = $iframe.get(0).contentWindow;
var set_height = function(){
... | Improve iframe height change tracking | Improve iframe height change tracking
| JavaScript | mit | NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm | ---
+++
@@ -3,10 +3,22 @@
return {
initialize: function() {
var $iframe = this.el;
- var i_window = $iframe.get(0).contentWindow;
- var i_doc = i_window.document;
- jQuery(i_window).resize(function(){
- $iframe.height(jQuery(i_doc).height);
+ $iframe.ready(function(){
+ ... |
5d7866930a492909ea703ba5343b8f028a5763b5 | app/utils/i18n/missing-message.js | app/utils/i18n/missing-message.js | import Ember from 'ember';
import Locale from 'ember-i18n/utils/locale';
import config from '../../config/environment';
const DEFAULT_LOCALE = config.i18n.defaultLocale;
let missingMessage = function(locale, key, data) {
console.log(locale)
if (locale === DEFAULT_LOCALE || window.env === 'development') {
re... | import Ember from 'ember';
import Locale from 'ember-i18n/utils/locale';
import config from '../../config/environment';
const DEFAULT_LOCALE = config.i18n.defaultLocale;
let missingMessage = function(locale, key, data) {
if (locale === DEFAULT_LOCALE || window.env === 'development') {
return `Missing translatio... | Tidy up missing message util linting issues | Tidy up missing message util linting issues
| JavaScript | mit | HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend | ---
+++
@@ -5,23 +5,20 @@
const DEFAULT_LOCALE = config.i18n.defaultLocale;
let missingMessage = function(locale, key, data) {
-
- console.log(locale)
-
if (locale === DEFAULT_LOCALE || window.env === 'development') {
return `Missing translation: ${key}`;
} else {
- Ember.Logger.warn("Missing tra... |
bbb30eace3a304a423b1b1fe47c8f0130e216865 | app/modules/clock/clock.js | app/modules/clock/clock.js | export default class Clock {
getTime() {
var date = new Date();
return date.getTime();
}
}
| export default class {
getTime() {
var date = new Date();
return date.getTime();
}
}
| Remove redundant class name from export | Remove redundant class name from export
| JavaScript | mit | Voles/es2015-modules,Voles/es2015-modules | ---
+++
@@ -1,4 +1,4 @@
-export default class Clock {
+export default class {
getTime() {
var date = new Date();
return date.getTime(); |
529c57c39a28bb6343230c52345cac29aa1c2226 | app/src/js/modules/buic.js | app/src/js/modules/buic.js | /**
* Main mixin for the Bolt buic module.
*
* @mixin
* @namespace Bolt.buic
*
* @param {Object} bolt - The Bolt module.
* @param {Object} $ - jQuery.
*/
(function (bolt, $) {
'use strict';
/**
* Bolt.buic mixin container.
*
* @private
* @type {Object}
*/
var buic = {};
... | /**
* Main mixin for the Bolt buic module.
*
* @mixin
* @namespace Bolt.buic
*
* @param {Object} bolt - The Bolt module.
* @param {Object} $ - jQuery.
*/
(function (bolt, $) {
'use strict';
/**
* Bolt.buic mixin container.
*
* @private
* @type {Object}
*/
var buic = {};
... | Make sure the widget is initialized only once (although the widget factory does something similar) | Make sure the widget is initialized only once (although the widget factory does something similar) | JavaScript | mit | joshuan/bolt,one988/cm,rossriley/bolt,Raistlfiren/bolt,bolt/bolt,joshuan/bolt,electrolinux/bolt,romulo1984/bolt,HonzaMikula/masivnipostele,cdowdy/bolt,lenvanessen/bolt,rossriley/bolt,one988/cm,nantunes/bolt,bolt/bolt,romulo1984/bolt,Raistlfiren/bolt,CarsonF/bolt,electrolinux/bolt,nikgo/bolt,rarila/bolt,electrolinux/bol... | ---
+++
@@ -32,7 +32,9 @@
// Widgets initialisations
$('[data-widget]', context).each(function () {
- $(this)[$(this).data('widget')]();
+ $(this)[$(this).data('widget')]()
+ .removeAttr('data-widget')
+ .removeData('widget');
});
}... |
11ce50309b409bb9003adc82a0c4785a35d04b67 | src/js/inject.js | src/js/inject.js | (() => {
'use strict';
chrome.storage.sync.get(function(storage) {
let execFlag = true;
for (var i = 0; i < storage.excludeURL.length; i++) {
if (parseURL(location.href).match(RegExp(parseURL(storage.excludeURL[i])))) {
execFlag = false;
}
}
if (execFlag) {
disableReferre... | (() => {
'use strict';
chrome.storage.sync.get(function(storage) {
let execFlag = true;
if (storage.excludeURL !== undefined) {
for (var i = 0; i < storage.excludeURL.length; i++) {
if (parseURL(location.href).match(RegExp(parseURL(storage.excludeURL[i])))) {
execFlag = false;
... | Fix error when never load options page | :bug: Fix error when never load options page
| JavaScript | mit | noraworld/no-more-referrer,noraworld/no-more-referrer | ---
+++
@@ -4,9 +4,11 @@
chrome.storage.sync.get(function(storage) {
let execFlag = true;
- for (var i = 0; i < storage.excludeURL.length; i++) {
- if (parseURL(location.href).match(RegExp(parseURL(storage.excludeURL[i])))) {
- execFlag = false;
+ if (storage.excludeURL !== undefined) {
+ ... |
440d1c9fd5833bca5c746b9f6787eaa9993643dc | test/spec/windshaft/map-serializer/anonymous-map-serializer/dataviews-serializer.spec.js | test/spec/windshaft/map-serializer/anonymous-map-serializer/dataviews-serializer.spec.js | // var Backbone = require('backbone');
// var DataviewsSerializer = require('../../../../../src/windshaft/map-serializer/anonymous-map-serializer/dataviews-serializer');
// var HistogramDataviewModel = require('../../../../../src/dataviews/histogram-dataview-model');
fdescribe('dataviews-serializer', function () {
i... | Add pending tests for dataviews-serializer | Add pending tests for dataviews-serializer
| JavaScript | bsd-3-clause | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js | ---
+++
@@ -0,0 +1,9 @@
+// var Backbone = require('backbone');
+// var DataviewsSerializer = require('../../../../../src/windshaft/map-serializer/anonymous-map-serializer/dataviews-serializer');
+// var HistogramDataviewModel = require('../../../../../src/dataviews/histogram-dataview-model');
+
+fdescribe('dataviews... | |
31b86c877b4a8a6f61d3dd096d3d6967a00154a5 | lib/util/index.js | lib/util/index.js | import * as distance from './distance'
import * as geocode from './geocode'
import * as itinerary from './itinerary'
import * as map from './map'
import * as profile from './profile'
import * as query from './query'
import * as reverse from './reverse'
import * as state from './state'
import * as time from './time'
imp... | import * as distance from './distance'
import * as geocoder from './geocoder'
import * as itinerary from './itinerary'
import * as map from './map'
import * as profile from './profile'
import * as query from './query'
import * as reverse from './reverse'
import * as state from './state'
import * as time from './time'
i... | Fix error with bundling geocoder utils for export as part of api | fix(api): Fix error with bundling geocoder utils for export as part of api
| JavaScript | mit | opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux | ---
+++
@@ -1,5 +1,5 @@
import * as distance from './distance'
-import * as geocode from './geocode'
+import * as geocoder from './geocoder'
import * as itinerary from './itinerary'
import * as map from './map'
import * as profile from './profile'
@@ -11,7 +11,7 @@
const OtpUtils = {
distance,
- geocode,
+... |
37771b1cb803e09c51f20305d52fd4df246172a0 | packages/@sanity/core/src/actions/graphql/listApisAction.js | packages/@sanity/core/src/actions/graphql/listApisAction.js | module.exports = async function listApisAction(args, context) {
const {apiClient, output, chalk} = context
const client = apiClient({
requireUser: true,
requireProject: true
})
let endpoints
try {
endpoints = await client.request({
url: `/apis/graphql`,
method: 'GET'
})
} catch... | module.exports = async function listApisAction(args, context) {
const {apiClient, output, chalk} = context
const client = apiClient({
requireUser: true,
requireProject: true
})
let endpoints
try {
endpoints = await client.request({
url: `/apis/graphql`,
method: 'GET'
})
} catch... | Remove in-line mock data when testing graphql list CLI command | [core] GraphQL: Remove in-line mock data when testing graphql list CLI command
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -20,18 +20,6 @@
}
}
- endpoints = [{
- dataset: 'production',
- tag: 'default',
- generation: 'gen1',
- playgroundEnabled: false
- }, {
- dataset: 'staging',
- tag: 'next',
- generation: 'gen2',
- playgroundEnabled: true
- }]
-
if (endpoints && endpoints.length > 0) ... |
59c2a76434297f7d6ae2389f693a3b4fd484a5f5 | api/src/lib/logger.js | api/src/lib/logger.js | const winston = require('winston');
const util = require('util');
const transports = [new winston.transports.Console()];
const Rollbar = require('rollbar');
const rollbar = new Rollbar('ff3ef8cca74244eabffb17dc2365e7bb');
const rollbarLogger = winston.transports.CustomLogger = function () {
this.name = 'rollbarLogg... | const winston = require('winston');
const util = require('util');
const transports = [new winston.transports.Console()];
if (process.env.SENTRY_DSN) {
const Raven = require('raven');
const sentryLogger = winston.transports.CustomLogger = function () {
this.name = 'sentryLogger';
this.level = 'error';
};
... | Change rollbarLogger & sentryLogger to be conditionally used | Change rollbarLogger & sentryLogger to be conditionally used
| JavaScript | mit | synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform | ---
+++
@@ -2,34 +2,37 @@
const util = require('util');
const transports = [new winston.transports.Console()];
-const Rollbar = require('rollbar');
-const rollbar = new Rollbar('ff3ef8cca74244eabffb17dc2365e7bb');
-
-const rollbarLogger = winston.transports.CustomLogger = function () {
- this.name = 'rollbarLogg... |
9f720da6aa6d4f72e9c3a6f26389f95eadf30cf6 | src/dom-utils/getWindow.js | src/dom-utils/getWindow.js | // @flow
/*:: import type { Window } from '../types'; */
/*:: declare function getWindow(node: Node | Window): Window; */
export default function getWindow(node) {
if (node.toString() !== '[object Window]') {
const ownerDocument = node.ownerDocument;
return ownerDocument ? ownerDocument.defaultView : window;... | // @flow
/*:: import type { Window } from '../types'; */
/*:: declare function getWindow(node: Node | Window): Window; */
export default function getWindow(node) {
if (node.toString() !== '[object Window]') {
const ownerDocument = node.ownerDocument;
return ownerDocument ? ownerDocument.defaultView || window... | Fix errors when iFrames are destroyed | Fix errors when iFrames are destroyed
Errors are thrown when an iFrame is destroyed because the popper's reference node's document no longer has a `defaultView`. The errors being thrown are:
> Cannot read property 'Element' of null
and
> Cannot read property 'HTMLElement' of null
from within `update`.
| JavaScript | mit | FezVrasta/popper.js,floating-ui/floating-ui,floating-ui/floating-ui,FezVrasta/popper.js,floating-ui/floating-ui,FezVrasta/popper.js,FezVrasta/popper.js | ---
+++
@@ -5,7 +5,7 @@
export default function getWindow(node) {
if (node.toString() !== '[object Window]') {
const ownerDocument = node.ownerDocument;
- return ownerDocument ? ownerDocument.defaultView : window;
+ return ownerDocument ? ownerDocument.defaultView || window : window;
}
return n... |
f535468595a036df443c95a84e9a182fd572115c | reverse-words.js | reverse-words.js | // Reverse Words
/*RULES:
Function takes a string parameter
Reverse every word in the string
Return new string
NOTE:
Order of words shouldn't change
Can't use the array.reverse() method
*/
/*PSEUDOCODE
1) Split array by words
2) For each word,
2a) Push last letter of each individual elem... | // Reverse Words
/*RULES:
Function takes a string parameter
Reverse every word in the string
Return new string
NOTE:
Order of words shouldn't change
Can't use the array.reverse() method
*/
/*PSEUDOCODE
1) Split array by words
2) For each word,
2a) Push last letter of each individual elem... | Comment out initial response to include refactored answer | Comment out initial response to include refactored answer
| JavaScript | mit | benjaminhyw/javascript_algorithms | ---
+++
@@ -21,21 +21,25 @@
4) Return new string
*/
-function reverseWords(str){
- var strArr = str.split(" ");
- var emptyWordArr = [];
- var emptyStrArr = [];
- var index = 0;
+// This was my initial response, and it works fine! But could be slightly refactored for cleaner code.
- strArr.forEach(funct... |
bf33bafd03eb1265a7b10468b4a9a74f80d5adca | rollup.config.js | rollup.config.js | import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import json from '@rollup/plugin-json';
import { terser } from 'rollup-plugin-terser';
import peggy from 'rollup-plugin-peggy';
import copy from 'rollup-plugin-copy';
import scss from 'rollup-plugin-scss';
import serve fr... | import path from 'path';
import glob from 'glob';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import json from '@rollup/plugin-json';
import { terser } from 'rollup-plugin-terser';
import peggy from 'rollup-plugin-peggy';
import copy from 'rollup-plugin-copy';
impo... | Fix watching of stylesheets and static assets | Fix watching of stylesheets and static assets
| JavaScript | mit | caleb531/truthy,caleb531/truthy | ---
+++
@@ -1,3 +1,5 @@
+import path from 'path';
+import glob from 'glob';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import json from '@rollup/plugin-json';
@@ -7,6 +9,20 @@
import scss from 'rollup-plugin-scss';
import serve from 'rollup-plugin-serve';
... |
f3d336e625f576c47c4803051e63934f10e9b3ff | packages/machinomy/migrations/sqlite/20180325060555-add-created-at.js | packages/machinomy/migrations/sqlite/20180325060555-add-created-at.js | 'use strict';
var dbm;
var type;
var seed;
/**
* We receive the dbmigrate dependency from dbmigrate initially.
* This enables us to not have to rely on NODE_PATH.
*/
exports.setup = function(options, seedLink) {
dbm = options.dbmigrate;
type = dbm.dataType;
seed = seedLink;
};
exports.up = function(db) {... | 'use strict';
var dbm;
var type;
var seed;
/**
* We receive the dbmigrate dependency from dbmigrate initially.
* This enables us to not have to rely on NODE_PATH.
*/
exports.setup = function(options, seedLink) {
dbm = options.dbmigrate;
type = dbm.dataType;
seed = seedLink;
};
exports.up = function(db) {... | Remove call of not implemented method removeColumn in SQLite migration. | Remove call of not implemented method removeColumn in SQLite migration.
| JavaScript | apache-2.0 | machinomy/machinomy,machinomy/machinomy,machinomy/machinomy | ---
+++
@@ -21,7 +21,6 @@
};
exports.down = function(db) {
- return db.removeColumn('payment', 'createdAt');
};
exports._meta = { |
77f9ca109a9b9f84d8d9837b8dc743b902115392 | packages/rekit-core/templates/jest/ConnectedComponent.test.js | packages/rekit-core/templates/jest/ConnectedComponent.test.js | import React from 'react';
import { shallow } from 'enzyme';
import { ${_.pascalCase(component)} } from '../../../src/features/${_.kebabCase(feature)}/${_.pascalCase(component)}';
describe('${_.kebabCase(feature)}/${_.pascalCase(component)}', () => {
it('renders node with correct class name', () => {
const props... | Add connected component tpl for jest. | Add connected component tpl for jest.
| JavaScript | mit | supnate/rekit | ---
+++
@@ -0,0 +1,19 @@
+import React from 'react';
+import { shallow } from 'enzyme';
+import { ${_.pascalCase(component)} } from '../../../src/features/${_.kebabCase(feature)}/${_.pascalCase(component)}';
+
+describe('${_.kebabCase(feature)}/${_.pascalCase(component)}', () => {
+ it('renders node with correct cla... | |
89a27fac6b191459d63d90a63b29da691f823879 | rollup.config.js | rollup.config.js | import buble from 'rollup-plugin-buble'
import inject from 'rollup-plugin-inject'
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import builtins from 'builtin-modules'
const pkg = require('./package.json')
export default {
input: 'src/index.js',
output: [
{ form... | import buble from 'rollup-plugin-buble'
import inject from 'rollup-plugin-inject'
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import builtins from 'builtin-modules'
const pkg = require('./package.json')
export default {
input: 'src/index.js',
output: [
{ form... | Disable CJS→ES interop in CommonJS build. | Disable CJS→ES interop in CommonJS build.
| JavaScript | mit | goto-bus-stop/miniplug | ---
+++
@@ -9,7 +9,7 @@
export default {
input: 'src/index.js',
output: [
- { format: 'cjs', file: pkg.main, sourcemap: true, exports: 'default' },
+ { format: 'cjs', file: pkg.main, sourcemap: true, exports: 'default', interop: false },
{ format: 'es', file: pkg.module, sourcemap: true }
],
e... |
19878840876fc3d85b169b3a02fff412d7d80b95 | rollup.config.js | rollup.config.js | export default [
{
input: './src/index.js',
treeshake: false,
external: p => /^three/.test( p ),
output: {
name: 'MeshBVHLib',
extend: true,
format: 'umd',
file: './umd/index.js',
sourcemap: true,
globals: p => /^three/.test( p ) ? 'THREE' : null,
},
},
{
input: './src/index.j... | export default [
{
input: './src/index.js',
treeshake: false,
external: p => /^three/.test( p ),
output: {
name: 'MeshBVHLib',
extend: true,
format: 'umd',
file: './umd/index.js',
sourcemap: true,
globals: p => /^three/.test( p ) ? 'THREE' : null,
},
},
{
input: './src/index.j... | Remove `name`, `extend` and `globals` options. | Remove `name`, `extend` and `globals` options.
| JavaScript | mit | gkjohnson/three-mesh-bvh,gkjohnson/three-mesh-bvh,gkjohnson/three-mesh-bvh | ---
+++
@@ -24,13 +24,9 @@
output: {
- name: 'MeshBVHLib',
- extend: true,
format: 'esm',
file: './esm/index.js',
sourcemap: true,
-
- globals: p => /^three/.test( p ) ? 'THREE' : null,
},
|
4a991cfec283699e1c10070b89fc797c6e6320a5 | js/components/DropTarget.js | js/components/DropTarget.js | import React from "react";
import { connect } from "react-redux";
import { loadFilesFromReferences } from "../actionCreators";
export class DropTarget extends React.Component {
constructor(props) {
super(props);
this.handleDrop = this.handleDrop.bind(this);
}
supress(e) {
e.stopPropagation();
e... | import React from "react";
export default class DropTarget extends React.Component {
constructor(props) {
super(props);
this.handleDrop = this.handleDrop.bind(this);
this._ref = this._ref.bind(this);
}
supress(e) {
e.stopPropagation();
e.preventDefault();
}
handleDrop(e) {
this.supr... | Add coords to drop handle call | Add coords to drop handle call
| JavaScript | mit | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js | ---
+++
@@ -1,12 +1,10 @@
import React from "react";
-import { connect } from "react-redux";
-import { loadFilesFromReferences } from "../actionCreators";
-
-export class DropTarget extends React.Component {
+export default class DropTarget extends React.Component {
constructor(props) {
super(props);
... |
90effe78be49943827057b60ee6dc0b6c4ce086a | app/js/controllers.js | app/js/controllers.js | 'use strict';
/* Controllers */
var cvAppControllers = angular.module('cvAppControllers', []);
cvAppControllers.controller('HomeController', ['$scope', function($scope) {
$scope.name = 'Elias';
}]);
cvAppControllers.controller('AboutController', ['$scope', function($scope) {
$scope.name = 'Elias';
}]); | 'use strict';
/* Controllers */
var cvAppControllers = angular.module('cvAppControllers', []);
cvAppControllers.controller('HomeController', ['$scope', function($scope) {
$scope.name = 'Elias';
}]);
cvAppControllers.controller('AboutController', ['$scope', function($scope) {
$scope.name = 'Elias';
}]);
/*
phone... | Add tutorial http controller for reference (commented) | Add tutorial http controller for reference (commented)
| JavaScript | mit | RegularSvensson/cvApp,RegularSvensson/cvApp | ---
+++
@@ -11,3 +11,14 @@
cvAppControllers.controller('AboutController', ['$scope', function($scope) {
$scope.name = 'Elias';
}]);
+
+
+/*
+phonecatApp.controller('PhoneListCtrl', function ($scope, $http) {
+ $http.get('phones/phones.json').success(function(data) {
+ $scope.phones = data;
+ });
+
+ $scope.... |
4a704fb65343f43945ac623abf6706b24ed5b9ea | brunch-config.js | brunch-config.js | 'use strict';
module.exports = {
files: {
javascripts: {
joinTo: {
'app.js': /^app\//,
'vendor.js': /^node_modules\//
}
},
stylesheets: {
joinTo: {
'app.css': /^app\//
}
}
},
plugins: {
babel: {
presets: ['es2015', 'react']
}
},
... | 'use strict';
module.exports = {
files: {
javascripts: {
joinTo: {
'app.js': /^app\//,
'vendor.js': /^node_modules\//
}
},
stylesheets: {
joinTo: {
'app.css': /^app\//
}
}
},
plugins: {
babel: {
presets: ['es2015', 'react']
}
},
... | Allow PORT env variable to specify server port number | Allow PORT env variable to specify server port number
| JavaScript | mit | ryansobol/with-react,ryansobol/with-react | ---
+++
@@ -23,6 +23,6 @@
},
server: {
- port: 8000
+ port: Number.parseInt(process.env.PORT) || 8000
}
}; |
7a6fb64b30513b987e59965a948a681037f406e9 | src/utils/index.js | src/utils/index.js | const { parse } = require('url')
const UrlPattern = require('url-pattern')
const patternOpts = {
segmentNameCharset: 'a-zA-Z0-9_-',
}
const isPattern = pattern => pattern instanceof UrlPattern
const getParamsAndQuery = (pattern, url) => {
const { query, pathname } = parse(url, true)
const route = isPattern(pat... | const { parse } = require('url')
const UrlPattern = require('url-pattern')
const patternOpts = {
segmentNameCharset: 'a-zA-Z0-9_-',,
segmentValueCharset: 'a-zA-Z0-9@\.\+\-\_'
}
const isPattern = pattern => pattern instanceof UrlPattern
const getParamsAndQuery = (pattern, url) => {
const { query, pathname } = p... | Allow some more chars in url as pattern value | Allow some more chars in url as pattern value
Allow character @, dot, +, _ and - as url pattern value, so email address can be passed as url parameter. | JavaScript | mit | pedronauck/micro-router | ---
+++
@@ -2,7 +2,8 @@
const UrlPattern = require('url-pattern')
const patternOpts = {
- segmentNameCharset: 'a-zA-Z0-9_-',
+ segmentNameCharset: 'a-zA-Z0-9_-',,
+ segmentValueCharset: 'a-zA-Z0-9@\.\+\-\_'
}
const isPattern = pattern => pattern instanceof UrlPattern |
943a6c173c366dad1207b53d79b35e4f97ed0062 | src/server/handlers/badge.js | src/server/handlers/badge.js | import path from 'path';
import logging from '../logging';
const logger = logging.getLogger('express');
import {
internalFindSnap,
internalGetSnapBuilds
} from './launchpad';
import { getGitHubRepoUrl } from '../../common/helpers/github-url';
import { snapBuildFromAPI } from '../../common/helpers/snap-builds';
c... | import path from 'path';
import logging from '../logging';
const logger = logging.getLogger('express');
import {
internalFindSnap,
internalGetSnapBuilds
} from './launchpad';
import { getGitHubRepoUrl } from '../../common/helpers/github-url';
import { snapBuildFromAPI } from '../../common/helpers/snap-builds';
c... | Add Extra Cache Headers To Build Badge Response | Add Extra Cache Headers To Build Badge Response
Add extra cache prevention headers to the build badge response. This should help
reduce caching on GitHub README's. | JavaScript | agpl-3.0 | canonical-ols/build.snapcraft.io,canonical-ols/build.snapcraft.io,canonical-ols/build.snapcraft.io | ---
+++
@@ -30,7 +30,9 @@
}
}
- res.setHeader('Cache-Control', 'no-cache');
+ res.setHeader('Cache-Control', 'no-cache, no-store, max-age=0, must-revalidate, value');
+ res.setHeader('Expires', 'Thu, 01 Jan 1970 00:00:00 GMT');
+ res.setHeader('Pragma', 'no-cache');
return res.sendFile(... |
6d9d315ca741f5472902c0f961591fdff9bbf946 | src/js/utils/time.js | src/js/utils/time.js | // ==========================================================================
// Time utils
// ==========================================================================
import is from './is';
// Time helpers
export const getHours = value => parseInt((value / 60 / 60) % 60, 10);
export const getMinutes = value => par... | // ==========================================================================
// Time utils
// ==========================================================================
import is from './is';
// Time helpers
export const getHours = value => Math.trunc((value / 60 / 60) % 60, 10);
export const getMinutes = value => M... | Use Math.trunc instead of parseInt | fix: Use Math.trunc instead of parseInt
| JavaScript | mit | dacostafilipe/plyr,dacostafilipe/plyr,sampotts/plyr,Selz/plyr | ---
+++
@@ -5,9 +5,9 @@
import is from './is';
// Time helpers
-export const getHours = value => parseInt((value / 60 / 60) % 60, 10);
-export const getMinutes = value => parseInt((value / 60) % 60, 10);
-export const getSeconds = value => parseInt(value % 60, 10);
+export const getHours = value => Math.trunc((va... |
5ea305a1fa5591bb50d1b180546ce1e8efa4b258 | scripts/chris.js | scripts/chris.js | var audio = document.getElementById("chris");
function pauseChris() {
if (audio.currentTime >= 331000) {
audio.pause();
}
}
function playChris() {
audio.currentTime = 952;
audio.play();
var interval = setInterval(pauseChris, 1000);
alert(interval);
}
function addChrisButton() {
var div = document.getElement... | var audio = document.getElementById("chris");
function pauseChris() {
if (audio.currentTime >= 331000) {
audio.pause();
alert(interval);
}
}
function playChris() {
audio.currentTime = 952;
audio.play();
var interval = setInterval(pauseChris, 1000);
}
function addChrisButton() {
var div = document.getElemen... | Test with alert in pause | Test with alert in pause
| JavaScript | mit | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | ---
+++
@@ -3,6 +3,7 @@
function pauseChris() {
if (audio.currentTime >= 331000) {
audio.pause();
+ alert(interval);
}
}
@@ -10,7 +11,6 @@
audio.currentTime = 952;
audio.play();
var interval = setInterval(pauseChris, 1000);
- alert(interval);
}
function addChrisButton() { |
ae8d93f223107d6fde7c1426187ac36e4747b010 | src/utils/isReactModuleName.js | src/utils/isReactModuleName.js | /*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*
*/
var ... | /*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*
*/
var ... | Add support for PropTypes import from react-native | Add support for PropTypes import from react-native
See issue #43 | JavaScript | mit | fkling/react-docgen,reactjs/react-docgen,janicduplessis/react-docgen,reactjs/react-docgen,reactjs/react-docgen | ---
+++
@@ -10,7 +10,7 @@
*
*/
-var reactModules = ['react', 'react/addons'];
+var reactModules = ['react', 'react/addons', 'react-native'];
/**
* Takes a module name (string) and returns true if it refers to a root react |
453c689050e6cb8277f47eed16035b7cd608f262 | server/server.js | server/server.js | 'use strict';
var loopback = require('loopback');
var boot = require('loopback-boot');
var path = require('path');
var bodyParser = require('body-parser');
var app = module.exports = loopback();
// configure view handler
app.set('view engine', 'ejs');
app.set('views', path.join(__dirname, 'views'));
// configure bo... | 'use strict'
var loopback = require('loopback')
var boot = require('loopback-boot')
var path = require('path')
var bodyParser = require('body-parser')
var app = module.exports = loopback()
// configure body parser
app.use(bodyParser.urlencoded({extended: true}))
app.use(loopback.token({
model: app.models.access... | Remove Extra EJS Routes Handler and Add Caching Process to AccessToken | Remove Extra EJS Routes Handler and Add Caching Process to AccessToken
| JavaScript | mit | Flieral/Publisher-Service,Flieral/Publisher-Service | ---
+++
@@ -1,40 +1,39 @@
-'use strict';
+'use strict'
-var loopback = require('loopback');
-var boot = require('loopback-boot');
-var path = require('path');
-var bodyParser = require('body-parser');
+var loopback = require('loopback')
+var boot = require('loopback-boot')
+var path = require('path')
+var bodyParse... |
5db936da218aafcb5480119c655fbb9dc4071b94 | lib/text-align.js | lib/text-align.js | var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-text-align/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-text-align/tachyons-text-align.min.css', 'utf8')
var mod... | var _ = require('lodash')
var fs = require('fs')
var gzip = require('gzip-size')
var filesize = require('filesize')
var cssstats = require('cssstats')
var module = require('tachyons-text-align/package.json')
var moduleCss = fs.readFileSync('node_modules/tachyons-text-align/tachyons-text-align.min.css', 'utf8')
var mod... | Update with reference to global nav partial | Update with reference to global nav partial
| JavaScript | mit | getfrank/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,matyikriszta/moonlit-landing-page,fenderdigital/css-utilities,tachyons-css/tachyons,fenderdigital/css-utilities,cwonrails/tachyons,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio | ---
+++
@@ -10,6 +10,8 @@
var moduleSize = filesize(moduleObj.gzipSize)
var srcCSS = fs.readFileSync('./src/_text-align.css', 'utf8')
+var navDocs = fs.readFileSync('./templates/nav_docs.html', 'utf8')
+
var template = fs.readFileSync('./templates/docs/text-align/index.html', 'utf8')
var tpl = _.template(temp... |
d4f7822658f0c67952bc861f8efc10431c481cb1 | put_comma.js | put_comma.js | var num;
var num_str;
var result = '';
// check args
if (process.argv.length < 3) { // sample value
num = Math.floor(Math.random() * 1000000000) + 1;
} else {
num = process.argv[2];
}
num_str = num.toString();
console.log('input: ' + num_str);
while (num_str.length > 0) {
var three_digits = num_str.slice(-3); ... | var num;
var num_str;
var result = '';
// check args
if (process.argv.length < 3) { // sample value
num = Math.floor(Math.random() * 1000000000) + 1;
} else {
num = process.argv[2];
}
console.log('input: ' + num);
num_str = Number(num).toString();
while (num_str.length > 0) {
var three_digits = num_str.slice(-... | Deal with a case starting 0, e.g. input: 01234, output: 1,234 | Deal with a case starting 0, e.g. input: 01234, output: 1,234
| JavaScript | mit | moji29nabe/quiz | ---
+++
@@ -8,9 +8,9 @@
} else {
num = process.argv[2];
}
-num_str = num.toString();
+console.log('input: ' + num);
-console.log('input: ' + num_str);
+num_str = Number(num).toString();
while (num_str.length > 0) {
var three_digits = num_str.slice(-3); // get 3 digits |
020d181694878a374fa1ae8606942a0b77d40ae7 | app/js/pointer-lock.js | app/js/pointer-lock.js | import THREE from 'three';
export default function pointerLock( controls ) {
const hasPointerLock = 'pointerLockElement' in document ||
'mozPointerLockElement' in document ||
'webkitPointerLockElement' in document;
if ( !hasPointerLock ) {
return;
}
const element = document.body;
const dispatch... | import THREE from 'three';
export default function pointerLock( controls, element = document.body ) {
const hasPointerLock = (
'pointerLockElement' in document ||
'mozPointerLockElement' in document ||
'webkitPointerLockElement' in document
);
if ( !hasPointerLock ) {
return;
}
const dispat... | Add pointerLock() custom element support. | Add pointerLock() custom element support.
Increase readability.
| JavaScript | mit | razh/third-person-camera-tests,razh/third-person-camera-tests | ---
+++
@@ -1,25 +1,24 @@
import THREE from 'three';
-export default function pointerLock( controls ) {
- const hasPointerLock = 'pointerLockElement' in document ||
+export default function pointerLock( controls, element = document.body ) {
+ const hasPointerLock = (
+ 'pointerLockElement' in document ||
... |
e215805c984d8f3da9e5b4380ddf20ea76a88e9e | app/routes/accounts.js | app/routes/accounts.js | import Ember from 'ember';
export default Ember.Route.extend({
model: function(params) {
return this.store.find('namespace', btoa(params.namespace));
}
});
| import Ember from 'ember';
export default Ember.Route.extend({
setupController: function(controller, model) {
// Model Hook is called only when the page is accessed via direct
// navigation
var namespace = this.store.fetch('namespace', btoa(model.namespace));
controller.set('model', namespace);
},
... | Fix model hook not being called when performing 'transitionToRoute' | Fix model hook not being called when performing 'transitionToRoute'
| JavaScript | mit | nihey/firehon,nihey/firehon | ---
+++
@@ -1,7 +1,10 @@
import Ember from 'ember';
export default Ember.Route.extend({
- model: function(params) {
- return this.store.find('namespace', btoa(params.namespace));
- }
+ setupController: function(controller, model) {
+ // Model Hook is called only when the page is accessed via direct
+ ... |
833e6dc23b1d9d2b6d81cd0c68654a904f045578 | src/modules/gallery-lazy-load.js | src/modules/gallery-lazy-load.js | import axios from 'axios';
function Loader(options = {}) {
this.page = options.page || 0;
this.limit = options.limit || 1;
this.url = options.url || '';
this.nextPage = () => {
this.page += 1;
return axios.get(this.url, {
params: {
page: this.page,
limit: this.limit,
},
... | import Loader from 'src/modules/lazy-loader';
let observer;
let galleryContainer;
const loader = new Loader({
url: '/api/gallery',
page: 2,
limit: 1,
});
function lastPost() {
const posts = document.querySelectorAll('.gallery-post');
return posts[posts.length - 1];
}
function observeLastPost() {
if (!ob... | Add old browser compat routine for loading pictures | Add old browser compat routine for loading pictures
| JavaScript | mit | tuelsch/bolg,tuelsch/bolg | ---
+++
@@ -1,59 +1,62 @@
-import axios from 'axios';
+import Loader from 'src/modules/lazy-loader';
-function Loader(options = {}) {
- this.page = options.page || 0;
- this.limit = options.limit || 1;
- this.url = options.url || '';
+let observer;
+let galleryContainer;
- this.nextPage = () => {
- this.pa... |
616cfb178b1af953a73e01febef0bc8aac6017f3 | templates/footer.handlebars.js | templates/footer.handlebars.js | let tpl = `
</body>
</html>
`;
exports.tpl = () => tpl;
| let tpl = `
<hr />
<address>MirrorJson version 0.90. Idea, design and implementation by Arne Bakkebø, Making Waves in 2017.</address>
</body>
</html>
`;
exports.tpl = () => tpl;
| Add footer info and version number | Add footer info and version number
| JavaScript | mit | makingwaves/mirrorjson,makingwaves/mirrorjson | ---
+++
@@ -1,4 +1,6 @@
let tpl = `
+ <hr />
+ <address>MirrorJson version 0.90. Idea, design and implementation by Arne Bakkebø, Making Waves in 2017.</address>
</body>
</html>
`; |
4f6b6937c7f67aa02898478e34506ed80c9e33a4 | resources/public/js/monitor.js | resources/public/js/monitor.js | var maxColumns = 3
var buildStatusPadding = 10
var fontResizeFactor = 1.6
function buildStatusCount() {
return $('li').size()
}
function numberOfColumns() {
return Math.min(maxColumns, buildStatusCount())
}
function numberOfRows() {
return Math.ceil(buildStatusCount() / maxColumns)
}
function buildStatu... | function Styler() {
this.maxColumns = 3
this.buildStatusPadding = 10
this.fontResizeFactor = 1.6
function buildStatusCount() {
return $('li').size()
}
function numberOfColumns() {
return Math.min(maxColumns, buildStatusCount())
}
function numberOfRows() {
retur... | Introduce JS enclosing functions to separate Styling from DOM manipulation | Introduce JS enclosing functions to separate Styling from DOM manipulation
| JavaScript | epl-1.0 | antoniou/nevergreen-standalone,cburgmer/nevergreen,darrenhaken/nevergreen,darrenhaken/nevergreen,cburgmer/nevergreen,darrenhaken/nevergreen,antoniou/nevergreen-standalone,build-canaries/nevergreen,build-canaries/nevergreen,cburgmer/nevergreen,antoniou/nevergreen-standalone,build-canaries/nevergreen,build-canaries/never... | ---
+++
@@ -1,53 +1,59 @@
-var maxColumns = 3
-var buildStatusPadding = 10
-var fontResizeFactor = 1.6
+function Styler() {
+ this.maxColumns = 3
+ this.buildStatusPadding = 10
+ this.fontResizeFactor = 1.6
-function buildStatusCount() {
- return $('li').size()
-}
+ function buildStatusCount() {
+ ... |
4d3fd2b55084f8033cad20ee5e939b0bdbac25a5 | blob-feature-check.js | blob-feature-check.js | var svg = new Blob(
["<svg xmlns='http://www.w3.org/2000/svg'></svg>"],
{type: "image/svg+xml;charset=utf-8"}
);
var img = new Image();
var featureDiv = document.getElementById("blob-urls");
img.onload = function() {
featureDiv.className += " feature-supported";
};
img.onerror = function() {
featureDiv.classNa... | var svg = new Blob(
["<svg xmlns='http://www.w3.org/2000/svg'></svg>"],
{type: "image/svg+xml;charset=utf-8"}
);
var img = new Image();
var featureDiv = document.getElementById("blob-urls");
img.onload = function() {
featureDiv.className += " feature-supported";
};
img.onerror = function() {
featureDiv.classNa... | Use webkitURL for Safari 6 | Use webkitURL for Safari 6
Other browsers use window.URL, but Safari 6 namespaced it to "webkit".
| JavaScript | mit | ssorallen/blob-feature-check,ssorallen/blob-feature-check | ---
+++
@@ -11,4 +11,7 @@
img.onerror = function() {
featureDiv.className += " feature-unsupported";
};
-img.src = URL.createObjectURL(svg);
+
+// Safari 6 uses "webkitURL".
+var url = window.webkitURL || window.URL;
+img.src = url.createObjectURL(svg); |
8c03d3e088db12b410cdc6d7e301a05b6ebd8745 | js/views/conversation_list_view.js | js/views/conversation_list_view.js | /*
* vim: ts=4:sw=4:expandtab
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ConversationListView = Whisper.ListView.extend({
tagName: 'div',
itemView: Whisper.ConversationListItemView,
sort: function(conversation) {
console.log('sorting... | /*
* vim: ts=4:sw=4:expandtab
*/
(function () {
'use strict';
window.Whisper = window.Whisper || {};
Whisper.ConversationListView = Whisper.ListView.extend({
tagName: 'div',
itemView: Whisper.ConversationListItemView,
sort: function(conversation) {
console.log('sorting... | Fix sorting of the last element | Fix sorting of the last element
// FREEBIE
| JavaScript | agpl-3.0 | nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop,nrizzio/Signal-Desktop | ---
+++
@@ -13,10 +13,12 @@
var $el = this.$('.' + conversation.cid);
if ($el && $el.length > 0) {
var index = getInboxCollection().indexOf(conversation);
- if (index > 0) {
+ if (index === 0) {
+ this.$el.prepend($el);
+ ... |
589baa87b799e86d070c3c446e32c21e193b9c61 | test/app.js | test/app.js | /**
* @license
* Copyright (c) 2016 The IBM Research Emergent Solutions authors. All rights reserved.
* This code may only be used under the MIT style license found at https://ibmresearch.github.io/LICENSE.txt
* The complete set of authors may be found at https://ibmresearch.github.io/AUTHORS.txt
* The complete se... | /**
* @license
* Copyright (c) 2016 The IBM Research Emergent Solutions authors. All rights reserved.
* This code may only be used under the MIT style license found at https://ibmresearch.github.io/LICENSE.txt
* The complete set of authors may be found at https://ibmresearch.github.io/AUTHORS.txt
* The complete se... | Add missed file to the test | Add missed file to the test
| JavaScript | mit | IBMResearch/generator-polymer-init-ibm-element,IBMResearch/generator-polymer-init-ibm-element | ---
+++
@@ -30,8 +30,9 @@
'test/ibm-element.html',
'test/index.html',
'.gitignore',
+ '.eslintrc.json',
+ 'bower.json',
'ibm-element.html',
- 'bower.json',
'index.html',
'LICENSE',
'README.md' |
681d637a01145bb623f035b9dec7a1fe5a1d7255 | lib/matchers/hashmap.js | lib/matchers/hashmap.js | var _ = require('lodash');
var Matcher = require('../matcher');
var factory = require('../factory');
var compile = require('../compile');
var s = require('../strummer');
module.exports = factory({
initialize: function(opts) {
var matchers = { keys: null, values: null };
if (opts instanceof Matche... | var _ = require('lodash');
var Matcher = require('../matcher');
var factory = require('../factory');
var compile = require('../compile');
var s = require('../strummer');
module.exports = factory({
initialize: function(opts) {
var matchers = { keys: null, values: null };
if (opts instanceof Matche... | Fix error with lodash map | Fix error with lodash map
| JavaScript | mit | TabDigital/strummer | ---
+++
@@ -30,9 +30,10 @@
errors.push(keyErrors);
}
if (this.matchers.values) {
+ var self = this;
errors.push(_.map(obj, function(val, key) {
- return this.matchers.values.match(path + '[' + key + ']', val);
- }, this));
+ return self.matchers.values.match(path + '[' ... |
aa5fe28d4a40438849c88ff067b072cb78ae7940 | src/server/routes.js | src/server/routes.js | 'use strict';
const router = require('express').Router();
const authRouter = require('./auth/authRouter');
const trackRouter = require('./track/trackRouter');
router.get('/', function(req, res) {
res.send('Scrawble dat track j0!');
});
router.use('/auth', authRouter);
router.use('/scrobbles', trackRouter);
modul... | 'use strict';
const router = require('express').Router();
const authRouter = require('./auth/authRouter');
const trackRouter = require('./track/trackRouter');
router.get('/', function(req, res) {
res.send(`Your token is ${req.query.token}. Scrawble dat track j0!`);
});
router.use('/auth', authRouter);
router.use(... | Send back token as part of response | Send back token as part of response
| JavaScript | mit | FTLam11/Audio-Station-Scrobbler,FTLam11/Audio-Station-Scrobbler | ---
+++
@@ -5,7 +5,7 @@
const trackRouter = require('./track/trackRouter');
router.get('/', function(req, res) {
- res.send('Scrawble dat track j0!');
+ res.send(`Your token is ${req.query.token}. Scrawble dat track j0!`);
});
router.use('/auth', authRouter); |
49c6c49ad5934b45de95571a6ecb31223cda589a | run/index.js | run/index.js | var path = require('path')
var command = process.argv[2]
var restArguments = process.argv.slice(2)
var root = path.join(__dirname, '..')
var execute = require('./execute')({
BIN: path.join(root, 'node_modules', '.bin'),
JS_INPUT: path.join(root, 'src', 'app.js'),
JS_OUTPUT: path.join(root, 'dist', 'bundle.js')
... | var path = require('path')
var [ command, ...restArguments ] = process.argv.slice(2)
var root = path.join(__dirname, '..')
var execute = require('./execute')({
BIN: path.join(root, 'node_modules', '.bin'),
JS_INPUT: path.join(root, 'src', 'app.js'),
JS_OUTPUT: path.join(root, 'dist', 'bundle.js')
})
var format... | Improve parsing of cli arguments | Improve parsing of cli arguments
| JavaScript | mit | scriptype/salinger,scriptype/salinger | ---
+++
@@ -1,6 +1,5 @@
var path = require('path')
-var command = process.argv[2]
-var restArguments = process.argv.slice(2)
+var [ command, ...restArguments ] = process.argv.slice(2)
var root = path.join(__dirname, '..')
|
b865cafc14bf29b97b5fea9484f3730c2772d0ec | mix/lib/stream.js | mix/lib/stream.js | 'use strict';
var Kefir = require('kefir');
module.exports = Stream;
function Stream(value) {
if (typeof value === 'function') {
var subscribe = value;
this._observable = Kefir.fromBinder(function (sink) {
return subscribe({
push: sink,
close: function ... | 'use strict';
var Kefir = require('kefir');
module.exports = Stream;
function Stream(value) {
if (typeof value === 'function') {
var subscribe = value;
this._observable = Kefir.fromBinder(function (sink) {
return subscribe({
push: sink,
close: function ... | Fix accidental global variable assignment | Fix accidental global variable assignment
| JavaScript | mit | byggjs/bygg-plugins,byggjs/bygg | ---
+++
@@ -34,7 +34,7 @@
Stream.prototype.pipe = function (sink) {
this._consumers++;
return new Stream(this._observable.flatMap(function (input) {
- output = sink(input);
+ var output = sink(input);
if (output instanceof Stream) {
return output._observable;
} ... |
f8b68dae34c8f3308531bb2c28a3ff7047c0f4e1 | tests/bind.spec.js | tests/bind.spec.js | import { Vue, firebase, firestore, VueTick, randomString } from './TestCase'
let vm, collection, doc
let collectionName = randomString()
let documentName = randomString()
describe('Manual binding', () => {
beforeEach(async () => {
collection = firestore.collection('items')
doc = firestore.doc('collectionOfDo... | import { Vue, firebase, firestore, VueTick, randomString } from './TestCase'
let vm, collection, doc
let collectionName = randomString()
let documentName = randomString()
describe('Manual binding', () => {
beforeEach(async () => {
collection = firestore.collection('items')
doc = firestore.doc('collectionOfDo... | Add tests for update doc in collection | Add tests for update doc in collection
| JavaScript | mit | gdg-tangier/vue-firestore | ---
+++
@@ -21,6 +21,10 @@
await vm.$firestore[collectionName].add({name: 'item'})
expect(vm[collectionName].length).toEqual(1)
expect(vm[collectionName][0].name).toEqual('item')
+ let updatedItem = vm[collectionName][0]
+ await vm.$firestore[collectionName].doc(updatedItem['.key']).update({name:... |
49006a90b6ed3184f706a2688b3a51fa34de8d8f | routerpwn.js | routerpwn.js | var csv = require('./lib/csv.js');
//Object to hold all the data
var vendors = {};
var init = function(callback) {
csv.each(__dirname + '/macVendor/vendors.csv').on('data', function(data) {
vendors[data[1]] = {
'prefix': data[1],
'manufacturer': data[2],
'manufacturerAdress': data[3]
};
}).on('end', f... | var csv = require('./lib/csv.js');
//Object to hold all the data
var vendors = {};
var init = function(callback) {
csv.each(__dirname + '/macVendor/vendors.csv').on('data', function(data) {
vendors[data[1]] = {
'prefix': data[1],
'manufacturer': data[2],
'manufacturerAdress': data[3]
};
}).on('end', f... | Replace ':' and '-' to check the MAC-prefix | Replace ':' and '-' to check the MAC-prefix
| JavaScript | mit | jannickfahlbusch/node-routerpwn | ---
+++
@@ -28,7 +28,7 @@
};
var pwn = function(macAddress) {
- var vendor = getVendorForMac(macAddress);
+ var vendor = getVendorForMac(macAddress.replace(/:/g, '').replace(/-/g, ''));
switch (vendor.manufacturer) {
case 'Arcadyan Technology Corporation': |
3be1f95dcaafb09e8836979d79b02aeede891487 | routes/index.js | routes/index.js | var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index');
});
/* Mode selection page. */
router.get('/select', function(req, res, next) {
res.render('select');
});
/* Page to start a new room with friends. */
router.get('... | var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index');
});
/* Mode selection page. */
router.get('/select', function(req, res, next) {
res.render('select');
});
/* Page to start a new room with friends. */
router.g... | Fix indentation on routes page. | Fix indentation on routes page.
| JavaScript | mit | nashkevin/Turing-Party,nashkevin/Turing-Party | ---
+++
@@ -3,38 +3,38 @@
/* GET home page. */
router.get('/', function(req, res, next) {
- res.render('index');
+ res.render('index');
});
/* Mode selection page. */
router.get('/select', function(req, res, next) {
- res.render('select');
+ res.render('select');
});
/* Page to start a new room w... |
5c110374d1c75c8892f074a9ea15dbb73744924e | .eslintrc.js | .eslintrc.js | module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'svelte3',
],
overrides: [
{
files: ['**/*.svelte'],
... | module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard',
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'svelte3',
],
overrides: [
{
files: ['**/*.svelte'],
... | Allow dangling commas and warn about console statements | eslint: Allow dangling commas and warn about console statements
| JavaScript | mit | peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag | ---
+++
@@ -24,6 +24,8 @@
},
],
rules: {
- indent: ['error', 4],
+ 'comma-dangle': ['off', 'always'],
+ 'indent': ['error', 4],
+ 'no-console': ['warn', {}],
}
} |
87b264835136852a5aa0832d1ea75a04a0172817 | app/assets/javascripts/alchemy/alchemy.page_sorter.js | app/assets/javascripts/alchemy/alchemy.page_sorter.js | Alchemy.PageSorter = function () {
var $sortables = $("ul#sitemap").find("ul.level_1_children")
$sortables.nestedSortable({
disableNesting: "no-nest",
forcePlaceholderSize: true,
handle: ".handle",
items: "li",
listType: "ul",
opacity: 0.5,
placeholder: "placeholder",
tabSize: 16,
... | Alchemy.PageSorter = function () {
var $sortables = $("ul#sitemap").find("ul.level_0_children")
$sortables.nestedSortable({
disableNesting: "no-nest",
forcePlaceholderSize: true,
handle: ".handle",
items: "li",
listType: "ul",
opacity: 0.5,
placeholder: "placeholder",
tabSize: 16,
... | Fix page sorting after root page removal | Fix page sorting after root page removal
Since we removed the root page we need to adjust the sortable items
class.
| JavaScript | bsd-3-clause | mamhoff/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,robinboening/alchemy_cms,AlchemyCMS/alchemy_cms,mamhoff/alchemy_cms,mamhoff/alchemy_cms | ---
+++
@@ -1,5 +1,5 @@
Alchemy.PageSorter = function () {
- var $sortables = $("ul#sitemap").find("ul.level_1_children")
+ var $sortables = $("ul#sitemap").find("ul.level_0_children")
$sortables.nestedSortable({
disableNesting: "no-nest", |
da6a95170c50d33180da30775d460ce160f2101b | app/assets/javascripts/views/dashboard_report_view.js | app/assets/javascripts/views/dashboard_report_view.js | // ELMO.Views.DashboardReport
//
// View model for the dashboard report
ELMO.Views.DashboardReportView = class DashboardReportView extends ELMO.Views.ApplicationView {
get el() {
return '.report';
}
get events() {
return {
'change .report-chooser': 'handleReportChange',
'click .action-link-cl... | // ELMO.Views.DashboardReport
//
// View model for the dashboard report
ELMO.Views.DashboardReportView = class DashboardReportView extends ELMO.Views.ApplicationView {
get el() {
return '.report';
}
get events() {
return {
'change .report-chooser': 'handleReportChange',
'click .action-link-cl... | Abort running request if new one fired | 11239: Abort running request if new one fired
| JavaScript | apache-2.0 | thecartercenter/elmo,thecartercenter/elmo,thecartercenter/elmo | ---
+++
@@ -26,12 +26,21 @@
}
changeReport(id, name) {
+ if (this.request) {
+ this.request.abort();
+ }
this.toggleLoader(true);
this.$('.report-title-text').html(name);
this.$('.report-chooser').find('option').attr('selected', false);
this.$('.report-output-and-modal').empty()... |
d88889401bf3f1532ee55eb3cf3f157fb4a47719 | BikeMates/BikeMates.Web/Scripts/App_Scripts/ProfileScript.js | BikeMates/BikeMates.Web/Scripts/App_Scripts/ProfileScript.js | $(document).ready(function () {
function AppViewModel() {
var self = this;
self.FirstName = ko.observable("");
self.SecondName = ko.observable("");
self.About = ko.observable("");
self.Picture = ko.observable("");
self.fullName = ko.computed(function () {
return self.FirstName()... | $(document).ready(function () {
var tokenKey = sessionStorage.getItem()
function AppViewModel() {
var self = this;
self.FirstName = ko.observable("");
self.SecondName = ko.observable("");
self.About = ko.observable("");
self.Picture = ko.observable("");
self.fullName = ko.computed(f... | Create BLL for profile - edit js files | Create BLL for profile - edit js files
| JavaScript | mit | BikeMates/bike-mates,BikeMates/bike-mates,BikeMates/bike-mates | ---
+++
@@ -1,5 +1,6 @@
$(document).ready(function () {
+ var tokenKey = sessionStorage.getItem()
function AppViewModel() {
var self = this;
@@ -17,10 +18,10 @@
$.ajax({
- url: "http://localhost:51952/api/profile",
+ url: "api/profile",
contentType:... |
bdeeb9cc823025cfed65340caeb69ae6cde91e22 | server/index.js | server/index.js | var gpio = require('pi-gpio');
gpio.open(7, "in");
setInterval(function () {
gpio.read(7, function (err, value) {
if(err) {
console.log(err);
}
else {
console.log(value);
}
});
}, 5000);
process.on('SIGINT', function() {
console.log('Shutting down ... | var gpio = require('pi-gpio');
gpio.open(7, "in");
setInterval(function () {
gpio.read(7, function (err, value) {
if(err) {
console.log(err);
}
else {
console.log(value);
}
});
}, 5000);
process.on('SIGINT', function() {
console.log('Shutting down ... | Add missing process exit call | Add missing process exit call
| JavaScript | mit | Sephizor/openboiler,Sephizor/openboiler,Sephizor/openboiler | ---
+++
@@ -17,4 +17,5 @@
process.on('SIGINT', function() {
console.log('Shutting down GPIO');
gpio.close(7);
+ process.exit();
}); |
f696511e83678c4fcc7fd78b8590ef859c61f8ac | src/js/_fontawesome-collection.js | src/js/_fontawesome-collection.js | import fontawesome from '@fortawesome/fontawesome'
import faCustomIcons from './_fontawesome-harrix-icons.js'
//import fontawesomeFreeRegular from '@fortawesome/fontawesome-free-regular'
import faSearch from '@fortawesome/fontawesome-free-solid/faSearch'
import faGithub from '@fortawesome/fontawesome-free-brands/faGi... | import fontawesome from '@fortawesome/fontawesome'
import faCustomIcons from './_fontawesome-harrix-icons.js'
import faSearch from '@fortawesome/fontawesome-free-solid/faSearch'
import faGithub from '@fortawesome/fontawesome-free-brands/faGithub'
fontawesome.library.add(faSearch);
fontawesome.library.add(faGithub); | Delete unnecessary lines in the code | Delete unnecessary lines in the code
| JavaScript | mit | Harrix/Harrix-Html-Template | ---
+++
@@ -2,7 +2,6 @@
import faCustomIcons from './_fontawesome-harrix-icons.js'
-//import fontawesomeFreeRegular from '@fortawesome/fontawesome-free-regular'
import faSearch from '@fortawesome/fontawesome-free-solid/faSearch'
import faGithub from '@fortawesome/fontawesome-free-brands/faGithub'
|
db872fe4b98311d5ee3e459268e9d2ec133871b5 | tasks/check_clean.js | tasks/check_clean.js | /*
* grunt-check-clean
* https://github.com/the-software-factory/grunt-check-clean
*
* Copyright (c) 2015 Stéphane Bisinger
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Please see the Grunt documentation for more information regarding task
// creation: http://gru... | /*
* grunt-check-clean
* https://github.com/the-software-factory/grunt-check-clean
*
* Copyright (c) 2015 Stéphane Bisinger
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
// Please see the Grunt documentation for more information regarding task
// creation: http://gru... | Fix check on error messages. | Fix check on error messages.
| JavaScript | mit | the-software-factory/grunt-check-clean | ---
+++
@@ -20,7 +20,9 @@
args: ['status', '--porcelain']
}, function(error, result) {
var ret = 0;
- if (error !== 0 || result.stdout.length > 0) {
+ if (error || result.stdout.length > 0) {
+ console.log(error);
+ console.log(result.stdout);
ret = new Error("The g... |
6306c7760de7e15a3e32143e19c0662d554d2091 | test/ios/findProject.spec.js | test/ios/findProject.spec.js | jest.autoMockOff();
const findProject = require('../../src/config/ios/findProject');
const mockFs = require('mock-fs');
const projects = require('../fixtures/projects');
describe('ios::findProject', () => {
beforeEach(() => {
mockFs({ testDir: projects });
});
it('should return path to xcodeproj if found'... | jest.autoMockOff();
const findProject = require('../../src/config/ios/findProject');
const mockFs = require('mock-fs');
const projects = require('../fixtures/projects');
const userConfig = {};
describe('ios::findProject', () => {
beforeEach(() => {
mockFs({ testDir: projects });
});
it('should return path... | Cover null case in ios/findProject | Cover null case in ios/findProject
| JavaScript | mit | rnpm/rnpm | ---
+++
@@ -3,6 +3,7 @@
const findProject = require('../../src/config/ios/findProject');
const mockFs = require('mock-fs');
const projects = require('../fixtures/projects');
+const userConfig = {};
describe('ios::findProject', () => {
@@ -11,16 +12,17 @@
});
it('should return path to xcodeproj if foun... |
82c8799e9ae313c00e042d9943855bea9ee3e5c2 | src/index.js | src/index.js | try {
require('external:electron-react-devtools').install();
} catch (e) {}
import React from 'react';
import ReactDOM from 'react-dom';
import RecorderUI from './ui/RecorderUI';
ReactDOM.render(
<div>
<RecorderUI />
</div>,
document.querySelector('main')
);
| if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
try {
require('external:electron-react-devtools').install();
} catch (e) {
console.error(e);
}
}
import React from 'react';
import ReactDOM from 'react-dom';
import RecorderUI from './ui/RecorderUI';
ReactDOM.render(
<div>
... | Fix for noisy console warning | Fix for noisy console warning
| JavaScript | mit | mattbasta/pinecast-studio,mattbasta/pinecast-studio | ---
+++
@@ -1,6 +1,10 @@
-try {
- require('external:electron-react-devtools').install();
-} catch (e) {}
+if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
+ try {
+ require('external:electron-react-devtools').install();
+ } catch (e) {
+ console.error(e);
+ }
+}
import React f... |
117753105085c46615ff9de6ed273df200abb8fa | src/index.js | src/index.js | import fetch from 'isomorphic-fetch'
export default function fetchDispatch(url, action) {
return (dispatch) => {
return fetch(url, {
credentials: 'include'
})
.then( (response) => {
return response.json()
})
.then( (json) => {
dispatch(action(json))
})
.catch( (error) => {
console.lo... | import fetch from 'isomorphic-fetch'
export default function fetchDispatch(url, options = {}, actions = {}) {
return (dispatch) => {
if (typeof actions.request === 'function') {
actions.request()
}
return fetch(url, options)
.then( (response) => {
return response.json()
})
.then( (json) => {
... | Add options and actions to fetchDispatch | Add options and actions to fetchDispatch
| JavaScript | mit | KaleoSoftware/redux-fetch-dispatch | ---
+++
@@ -1,18 +1,27 @@
import fetch from 'isomorphic-fetch'
-export default function fetchDispatch(url, action) {
+export default function fetchDispatch(url, options = {}, actions = {}) {
return (dispatch) => {
- return fetch(url, {
- credentials: 'include'
- })
+
+ if (typeof actions.request === 'functi... |
90af5bbbf68e061030a8b671978d7999f9088c4c | src/Index.js | src/Index.js | module.exports = {
BarChart: require('./components/BarChart'),
Button: require('./components/Button'),
ButtonGroup: require('./components/ButtonGroup'),
Calendar: require('./components/Calendar'),
Column: require('./components/grid/Column'),
DatePicker: require('./components/DatePicker'),
DatePickerFullSc... | module.exports = {
BarChart: require('./components/BarChart'),
Button: require('./components/Button'),
ButtonGroup: require('./components/ButtonGroup'),
Calendar: require('./components/Calendar'),
Column: require('./components/grid/Column'),
DatePicker: require('./components/DatePicker'),
DatePickerFullSc... | Add Gauge component to src/index | Add Gauge component to src/index
| JavaScript | mit | mxenabled/mx-react-components,derek-boman/mx-react-components | ---
+++
@@ -12,6 +12,7 @@
DonutChart: require('./components/DonutChart'),
Drawer: require('./components/Drawer'),
FileUpload: require('./components/FileUpload'),
+ Gauge: require('./components/Gauge'),
Icon: require('./components/Icon'),
Loader: require('./components/Loader'),
Modal: require('./com... |
e024d3c5e62e12ee6c6081280188ad73b9144da2 | src/js/helpers/keyboard_navigation.js | src/js/helpers/keyboard_navigation.js | (function() {
var $body = $('body'),
$document = $(document);
$body.on('keydown', function(e) {
var keyCode = (window.event) ? e.which : e.keyCode;
if (!$body.attr('data-state')) {
if (keyCode === 9 || keyCode === 13 || keyCode === 37 || keyCode === 38 || keyCode === 39 || ... | (function() {
var $body = $('body'),
$document = $(document);
$body.on('keydown', function(e) {
var keyCode = (window.event) ? e.which : e.keyCode;
if (!$body.attr('data-state')) {
if (keyCode === 9 || keyCode === 13 || keyCode === 37 || keyCode === 38 || keyCode === 39 || ... | Fix eslint warning 'e' is defined but never used | Fix eslint warning 'e' is defined but never used | JavaScript | agpl-3.0 | libeo-vtt/vtt,libeo-vtt/vtt | ---
+++
@@ -13,7 +13,7 @@
}
});
- $body.on('mousemove.LibeoDataState', function(e) {
+ $body.on('mousemove.LibeoDataState', function() {
if ($body.attr('data-state')) {
$body.removeAttr('data-state');
} |
56c7c34c64b3fac897c02e583562f2472319dadb | src/matchNode.js | src/matchNode.js | /*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'us... | /*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
'us... | Allow matching nodes with a function | Allow matching nodes with a function
| JavaScript | mit | fkling/jscodeshift,facebook/jscodeshift | ---
+++
@@ -17,10 +17,13 @@
* Checks whether needle is a strict subset of haystack.
*
* @param {Object} haystack The object to test
- * @param {Object} needle The properties to look for in test
+ * @param {Object|Function} needle The properties to look for in test
* @return {bool}
*/
function matchNode(hay... |
49f59fea35e8753ebeca12b88ab2cf5d54bc8cfc | test/helpers/auth.js | test/helpers/auth.js | module.exports.getUser = function(name) {
return {
username: name,
password: name,
};
};
module.exports.login = function(user) {
browser.driver.manage().window().setSize(1600, 900);
browser.get('/#/login/');
element(by.css('div.login-form a[data-role="switch-login-form"]')).click();
element(by.mod... | module.exports.getUser = function(name) {
return {
username: name,
password: name,
};
};
module.exports.login = function(user) {
browser.driver.manage().window().setSize(1600, 900);
browser.get('/#/login/');
element(by.model('auth.user.username')).sendKeys(user.username);
element(by.model('auth.us... | Fix test after changed of login page (SAAS-256) | Fix test after changed of login page (SAAS-256)
Upgrated css paths in auth helper.
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -9,10 +9,9 @@
browser.driver.manage().window().setSize(1600, 900);
browser.get('/#/login/');
- element(by.css('div.login-form a[data-role="switch-login-form"]')).click();
element(by.model('auth.user.username')).sendKeys(user.username);
element(by.model('auth.user.password')).sendKeys(user.pa... |
cffe6c5880fec9e421bd2d9cc654ae91b1536d16 | src/outro.js | src/outro.js |
// get at whatever the global object is, like window in browsers
}( (function() {return this;}.call()) ));
|
// Get a reference to the global object, like window in browsers
}( (function() {
return this;
}.call()) ));
| Fix formatting and improve the comment | Outro: Fix formatting and improve the comment
| JavaScript | mit | qunitjs/qunit,qunitjs/qunit,danielgindi/qunit | ---
+++
@@ -1,3 +1,5 @@
-// get at whatever the global object is, like window in browsers
-}( (function() {return this;}.call()) ));
+// Get a reference to the global object, like window in browsers
+}( (function() {
+ return this;
+}.call()) )); |
c3d816f009b81291a93d3d3c8d976c37e537d67a | test/writeNewHtml.js | test/writeNewHtml.js | var assert = require('assert')
var fs = require('fs')
var writeNewHtml = require('./../writeNewHtml')
describe('writeNewHtml', () => {
it('should write html file to wf/',done => {
var html = `<!DOCTYPE>
<html>
<body>
<script class="923ad49f0ca1962716d34bd60433de8a207570f7"></script>
</body>
</html>`
... | var assert = require('assert')
var fs = require('fs')
var writeNewHtml = require('./../writeNewHtml')
describe('writeNewHtml', () => {
it('should write html file to wf/',done => {
var html = `<!DOCTYPE>
<html>
<body>
<script class="923ad49f0ca1962716d34bd60433de8a207570f7"></script>
</body>
</html>`
... | Test for write new html | Test for write new html
| JavaScript | mit | CarolAG/WebFlight,coryc5/WebFlight | ---
+++
@@ -13,17 +13,13 @@
fs.mkdir(__dirname + '/wf', err => {
writeNewHtml(html, 'test/wf/index');
-
- setTimeout(() => {
- var wroteHtml = fs.statSync(__dirname + '/wt/index.html').isFile()
- fs.unlink(__dirname + '/wf/index.html', err => {
- console.log('unlinking.... |
cf2487ba7929bf33695a16aebdc98f5e0ee412d0 | src/pages/App.js | src/pages/App.js | import React, { Component, PropTypes } from 'react'
import { Link } from 'react-router'
import 'normalize.css/normalize.css'
import '../styles/defaults.scss'
import classNames from './App.scss'
import { trackTiming } from '../analytics'
import { APP_NAME, AUTHOR_URL, SOURCE_URL, SEPARATOR } from '../config'
export de... | import React, { Component, PropTypes } from 'react'
import { Link } from 'react-router'
import 'normalize.css/normalize.css'
import '../styles/defaults.scss'
import classNames from './App.scss'
import { trackTiming } from '../analytics'
import { APP_NAME, AUTHOR_URL, SOURCE_URL, SEPARATOR } from '../config'
export de... | Reorder source and author links | Reorder source and author links
| JavaScript | cc0-1.0 | CookPete/reddit-player,CookPete/rplayr,CookPete/rplayr,CookPete/reddit-player | ---
+++
@@ -26,9 +26,9 @@
</Link>
</h1>
{SEPARATOR}
+ by <a href={AUTHOR_URL} target='_blank'>CookPete</a>
+ {SEPARATOR}
<a href={SOURCE_URL} target='_blank'>Source</a>
- {SEPARATOR}
- by <a href={AUTHOR_URL} target='_blank'>CookPete</a... |
d24f4d335470d664a019763e9f3780f339120de2 | packages/example-usecase/webpack.config.js | packages/example-usecase/webpack.config.js | const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: './src/index.js',
output: {
filename: './bundle.js',
path: path.resolve('public')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
... | const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: './src/index.js',
output: {
filename: './bundle.js',
path: path.resolve('public')
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader'
}
... | Remove dev code in production | feat(example): Remove dev code in production
| JavaScript | mit | lingui/js-lingui,lingui/js-lingui | ---
+++
@@ -24,7 +24,8 @@
'NODE_ENV': JSON.stringify('production')
}
}),
- new webpack.IgnorePlugin(/(languageData|compile).*\.dev$/)
+ new webpack.optimize.UglifyJsPlugin(),
+ new webpack.IgnorePlugin(/\.dev$/, /lingui-i18n/)
],
devServer: { |
007c357d7f3fe9a8e14e495fab5f166ac4c9b84a | packages/vega-scenegraph/src/Scenegraph.js | packages/vega-scenegraph/src/Scenegraph.js | import Bounds from './Bounds';
import GroupItem from './GroupItem';
export default function Scenegraph() {
this.root = createMark({
marktype: 'group',
interactive: false
});
this.root.items = [new GroupItem(this.root)];
}
var prototype = Scenegraph.prototype;
prototype.select = function(path, markdef) ... | import Bounds from './Bounds';
import GroupItem from './GroupItem';
export default function Scenegraph() {
this.root = createMark({
marktype: 'group',
interactive: false
});
this.root.items = [new GroupItem(this.root)];
}
var prototype = Scenegraph.prototype;
prototype.select = function(path, markdef) ... | Add group reference to new mark instances. | Add group reference to new mark instances.
| JavaScript | bsd-3-clause | vega/vega,vega/vega,vega/vega,lgrammel/vega,vega/vega | ---
+++
@@ -12,31 +12,38 @@
var prototype = Scenegraph.prototype;
prototype.select = function(path, markdef) {
- var items = this.root.items[0],
- node, i, n;
+ var group = this.root.items[0],
+ mark = group.items[path[0]],
+ i, n;
- for (i=0, n=path.length-1; i<n; ++i) {
- items = items.it... |
b2fd712c21080cd38d367ee856f3212a21aa7340 | src/store.js | src/store.js | import { createStore, applyMiddleware, compose } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducers'
// create the saga middleware
export const sagaMiddleware = createSagaMiddleware()
const composeEnhancers =
process.env.NODE_ENV !== 'production' &&
typeof window === 'obje... | import { createStore, applyMiddleware, compose } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducers'
// create the saga middleware
export const sagaMiddleware = createSagaMiddleware()
const composeEnhancers =
process.env.NODE_ENV !== 'production' &&
typeof window === 'obje... | Remove brackets for correct function of devel mode | Remove brackets for correct function of devel mode
| JavaScript | apache-2.0 | mkrajnak/ovirt-web-ui,mareklibra/userportal,oVirt/ovirt-web-ui,oVirt/ovirt-web-ui,matobet/userportal,matobet/userportal,mkrajnak/ovirt-web-ui,mkrajnak/ovirt-web-ui,mareklibra/userportal,matobet/userportal,mkrajnak/ovirt-web-ui,oVirt/ovirt-web-ui,mareklibra/userportal,matobet/userportal,mareklibra/userportal | ---
+++
@@ -10,7 +10,7 @@
process.env.NODE_ENV !== 'production' &&
typeof window === 'object' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
- ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__()
+ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
: compose
// mount it on the Store |
14d6537cd2000ae28320366934d769846f3610cf | src/index.js | src/index.js | import React, { Component, PropTypes } from 'react'
import ReactDOM from 'react-dom'
import ReactDOMServer from 'react-dom/server'
import SVGInjector from 'svg-injector'
export default class ReactSVG extends Component {
static defaultProps = {
callback: () => {},
className: '',
evalScripts: 'once',
... | import React, { Component, PropTypes } from 'react'
import ReactDOMServer from 'react-dom/server'
import SVGInjector from 'svg-injector'
export default class ReactSVG extends Component {
static defaultProps = {
callback: () => {},
className: '',
evalScripts: 'once',
style: {}
}
static propTypes... | Handle mounting and unmounting via ref callback | Handle mounting and unmounting via ref callback
| JavaScript | mit | atomic-app/react-svg | ---
+++
@@ -1,5 +1,4 @@
import React, { Component, PropTypes } from 'react'
-import ReactDOM from 'react-dom'
import ReactDOMServer from 'react-dom/server'
import SVGInjector from 'svg-injector'
@@ -20,6 +19,16 @@
style: PropTypes.object
}
+ refCallback = (container) => {
+ if (!container) {
+ ... |
d8aac8b081f5df7c7c331d78d25e25958cfe5676 | src/index.js | src/index.js | /**
* External imports
*/
import koa from 'koa';
import route from 'koa-route';
import libdebug from 'debug';
// create debug logger
const debug = libdebug('lgho:root');
/**
* Routes
*/
function* root() {
this.response.status = 200;
}
export default function create(options = {}) {
debug('options %j', options... | /**
* External imports
*/
import route from 'koa-route';
import createDebugLogger from 'debug';
import createKoaApplication from 'koa';
// create debug logger
const log = createDebugLogger('lgho:root');
/**
* Routes
*/
function* root() {
this.response.body = {
'let go': null,
'hold on': null,
};
thi... | Update root route to respond with hold-on/let-go object. | Update root route to respond with hold-on/let-go object.
| JavaScript | isc | francisbrito/let-go-hold-on-api | ---
+++
@@ -1,23 +1,27 @@
/**
* External imports
*/
-import koa from 'koa';
import route from 'koa-route';
-import libdebug from 'debug';
+import createDebugLogger from 'debug';
+import createKoaApplication from 'koa';
// create debug logger
-const debug = libdebug('lgho:root');
+const log = createDebugLogge... |
5ce278078201707cd8f308e06475f55c7793c8fd | src/index.js | src/index.js | import pluralize, { singular } from 'pluralize';
function normalize(slug: string): string {
return singular(slug.toLowerCase()).replace(/(-|_|\.|\s)+/g, '_');
}
function urlify(slug: string): string {
return pluralize(slug).replace('_', '-');
}
const formats = {
pascal(slug: string): string {
return slug
... | import pluralize, { singular } from 'pluralize';
function normalize(slug: string): string {
return singular(slug.toLowerCase()).replace(/(-|_)+/g, '_');
}
function urlify(slug: string): string {
return pluralize(slug).replace('_', '-');
}
const formats = {
pascal(slug: string): string {
return slug
.... | Remove whitespace and '.' delims | refactor(src): Remove whitespace and '.' delims
| JavaScript | mit | mb3online/slugizoid | ---
+++
@@ -1,7 +1,7 @@
import pluralize, { singular } from 'pluralize';
function normalize(slug: string): string {
- return singular(slug.toLowerCase()).replace(/(-|_|\.|\s)+/g, '_');
+ return singular(slug.toLowerCase()).replace(/(-|_)+/g, '_');
}
function urlify(slug: string): string { |
295e757a4b9b1f0947a89bca41ac0e777deeac9f | src/index.js | src/index.js | import express from 'express';
import leagueTips from 'league-tooltips';
import runTask from './cronTask';
import taskGenerator from './cronTasks/generator';
import config from './config';
import routes from './routes';
// ==== Server ====
const app = express();
app.use(leagueTips(config.key.riot, 'euw', {
url: '/... | import express from 'express';
import leagueTips from 'league-tooltips';
import runTask from './cronTask';
import taskGenerator from './cronTasks/generator';
import config from './config';
import routes from './routes';
// ==== Server ====
const app = express();
app.use(leagueTips(config.key.riot, 'euw', {
url: '/... | Fix CORS allowed origin typo. | Fix CORS allowed origin typo.
| JavaScript | mit | league-of-legends-devs/feeder.lol-item-sets-generator.org,league-of-legends-devs/feeder.lol-item-sets-generator.org | ---
+++
@@ -14,7 +14,7 @@
fileName: 'league-tips.min.js',
protocol: 'https',
cors: {
- origin: 'https://lol-item-sets-generator.org/',
+ origin: 'https://lol-item-sets-generator.org',
methods: 'GET',
headers: 'Content-Type'
} |
decd9e03343b62f2de598bbdb2a51794b71176f0 | src/index.js | src/index.js | import fs from 'fs'
import _ from 'lodash'
import postcss from 'postcss'
import stylefmt from 'stylefmt'
import defaultConfig from './defaultConfig'
import mergeConfig from './util/mergeConfig'
import generateUtilities from './lib/generateUtilities'
import substituteHoverableAtRules from './lib/substituteHoverableAtR... | import fs from 'fs'
import _ from 'lodash'
import postcss from 'postcss'
import stylefmt from 'stylefmt'
import defaultConfig from './defaultConfig'
import mergeConfig from './util/mergeConfig'
import generateUtilities from './lib/generateUtilities'
import substituteHoverableAtRules from './lib/substituteHoverableAtR... | Revert "Allow passing config as lazy-evaluated function" | Revert "Allow passing config as lazy-evaluated function"
This reverts commit 1819cf67d3f24ebe055b4c54b4e037a6621b3734.
| JavaScript | mit | tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss | ---
+++
@@ -13,10 +13,6 @@
import substituteClassApplyAtRules from './lib/substituteClassApplyAtRules'
const plugin = postcss.plugin('tailwind', (options = {}) => {
- if (_.isFunction(options)) {
- options = options()
- }
-
const config = mergeConfig(defaultConfig, options)
return postcss([ |
e3038c549a27d65ace8e4dcf69ba18cddd70ccc3 | src/index.js | src/index.js | 'use strict';
import 'source-map-support/register';
import http from 'http';
import express from 'express';
import RED from 'node-red';
// Create an Express app
let app = express();
// Create a server
let server = http.createServer(app);
// Create the settings object - see default settings.js file for other options... | 'use strict';
import 'source-map-support/register';
import http from 'http';
import express from 'express';
import RED from 'node-red';
// Exit handler
process.stdin.resume();
function exitHandler(err) {
if (err instanceof Error) {
console.log(err.stack);
process.exit(1);
} else if (isNaN(err)) {
proc... | Add the process exit handler to perform finalization process | Add the process exit handler to perform finalization process
| JavaScript | unknown | dbaba/candy-red,dbaba/candy-red,CANDY-LINE/candy-red,dbaba/candy-red,CANDY-LINE/candy-red,CANDY-LINE/candy-red | ---
+++
@@ -4,6 +4,22 @@
import http from 'http';
import express from 'express';
import RED from 'node-red';
+
+// Exit handler
+process.stdin.resume();
+function exitHandler(err) {
+ if (err instanceof Error) {
+ console.log(err.stack);
+ process.exit(1);
+ } else if (isNaN(err)) {
+ process.exit();
+ ... |
a7848664c8c5d80f8bf98e93523daec60c54512b | src/Store.js | src/Store.js | import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
import reducers fr... | import AsyncStorage from '@react-native-community/async-storage';
import { persistStore, persistReducer } from 'redux-persist';
import { applyMiddleware, createStore } from 'redux';
import thunk from 'redux-thunk';
import { createReactNavigationReduxMiddleware } from 'react-navigation-redux-helpers';
import reducers fr... | Add insurance shape to blacklist | Add insurance shape to blacklist
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | ---
+++
@@ -22,6 +22,7 @@
'prescriber',
'wizard',
'payment',
+ 'insurance',
],
};
|
ee0297dc6068c1e0cdec22e73f84cb6dfae2cde6 | src/store.js | src/store.js | import _merge from 'lodash/merge'
import moment from 'moment'
let today = moment().format('YYYY-MM-DD')
export default {
loading: true,
schedule: {},
// Restore saved preferences to over default lunches and classes
lunches: _merge({ 'Monday': 1, 'Tuesday': 1, 'Wednesday': 1, 'Thursday': 1, 'Friday': 1 },
... | import _merge from 'lodash/merge'
import moment from 'moment'
let today = moment().format('YYYY-MM-DD')
export default {
loading: true,
schedule: {},
// Restore saved preferences to over default lunches and classes
lunches: _merge({ 'Monday': 1, 'Tuesday': 1, 'Wednesday': 1, 'Thursday': 1, 'Friday': 1 },
... | Modify block colors for greater contrast | Modify block colors for greater contrast
| JavaScript | mit | Foo-Bear/beartime-web,Foo-Bear/beartime-web | ---
+++
@@ -12,7 +12,7 @@
classes: _merge({ 1: '', 2: '', 3: '', 4: '', 5: '', 6: '', 7: '' },
JSON.parse(localStorage.getItem('classes')) || {}),
// Design constants
- colors: ['#3F51B5', '#1976D2', '#03A9F4', '#00BCD4', '#009688', '#4CAF50', '#8BC34A'],
+ colors: ['#3F51B5', '#1976D2', '#039BE5', '#00B... |
9e50914060d36a4f6836280ba1d70d08e255ff23 | tests/jest.config.js | tests/jest.config.js | const baseConfig = require('tdd-buffet/config/jest.config');
const path = require('path');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('../tsconfig');
const rootDir = path.join(__dirname, '../');
module.exports = {
...baseConfig,
rootDir,
// For some reason... | const baseConfig = require('tdd-buffet/config/jest.config');
const path = require('path');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('../tsconfig');
const rootDir = path.join(__dirname, '../');
module.exports = {
...baseConfig,
rootDir,
// For some reason... | Check coverage at the end | Check coverage at the end
| JavaScript | mit | uberVU/mugshot,uberVU/mugshot | ---
+++
@@ -15,5 +15,10 @@
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/packages/' }),
// For some reason the ts-jest helper doesn't pick this one up.
'^mugshot/(.*)$': '<rootDir>/packages/mugshot/$1'
- }
+ },
+
+ // We're doing multiple coverage runs so we don't want to pr... |
bfc138deca8d789387fb12e91a874948c440b29c | src/index.js | src/index.js | import * as components from './components'
import config, { setOptions } from './utils/config'
import { use, registerComponentProgrammatic } from './utils/plugins'
const Buefy = {
install(Vue, options = {}) {
// Options
setOptions(Object.assign(config, options))
// Components
for (... | import * as components from './components'
import config, { setOptions } from './utils/config'
import { use, registerComponentProgrammatic } from './utils/plugins'
const Buefy = {
install(Vue, options = {}) {
// Options
setOptions(Object.assign(config, options))
// Components
for (... | Add export all components in src | Add export all components in src
| JavaScript | mit | rafaelpimpa/buefy,rafaelpimpa/buefy,rafaelpimpa/buefy | ---
+++
@@ -24,3 +24,5 @@
use(Buefy)
export default Buefy
+
+export * from './components' |
ceb46510b3dba3846a51ea9a96983338ac349250 | src/index.js | src/index.js | var coffeeScript = require("coffee-script");
var commands = codebox.require("core/commands");
var File = codebox.require("models/file");
commands.register({
id: "coffeescript.preview",
title: "CoffeeScript: Preview",
context: ["editor"],
shortcuts: [
"ctrl+shift+c"
],
run: function(arg... | var coffeeScript = require("coffee-script");
var commands = codebox.require("core/commands");
var File = codebox.require("models/file");
commands.register({
id: "coffeescript.preview",
title: "CoffeeScript: Preview",
context: ["editor"],
shortcuts: [
"ctrl+shift+c"
],
run: function(arg... | Use new multiple cmd contexts | Use new multiple cmd contexts
| JavaScript | apache-2.0 | CodeboxIDE/package-coffeescript | ---
+++
@@ -10,12 +10,12 @@
shortcuts: [
"ctrl+shift+c"
],
- run: function(args, context) {
- var name = context.model.get("name").replace(context.model.getExtension(), ".js");
+ run: function(args, ctx) {
+ var name = ctx.editor.model.get("name").replace(ctx.editor.model.getExt... |
abea4b81b50c55fa2fdda58804dcab30a4c5d65e | src/index.js | src/index.js | import React from "react";
import ReactDOM from "react-dom";
import { RoutingApp } from "./modules/RoutingApp";
import store from "./store";
import { Provider } from "react-redux";
import { STUY_SPEC_API_URL } from "./constants";
import { ApolloProvider } from "react-apollo";
import { ApolloClient } from "apollo-clien... | import React from "react";
import ReactDOM from "react-dom";
import { RoutingApp } from "./modules/RoutingApp";
import store from "./store";
import { Provider } from "react-redux";
import { STUY_SPEC_API_URL } from "./constants";
import { ApolloProvider } from "react-apollo";
import { ApolloClient } from "apollo-clien... | Enable Apollo devtools in production | Enable Apollo devtools in production | JavaScript | mit | stuyspec/client-app | ---
+++
@@ -15,6 +15,7 @@
const apolloClient = new ApolloClient({
link: new HttpLink({ uri: `${STUY_SPEC_API_URL}/graphql` }),
cache: new InMemoryCache(),
+ connectToDevTools: true
});
Object.filter = objectFilter; |
7abca73b600af4152b0108cd44767dbd5fbc0980 | react-github-battle/webpack.config.js | react-github-battle/webpack.config.js | var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: __dirname + '/app/index.html',
filename: 'index.html',
inject: 'body'
});
module.exports = {
entry: [
'./app/index.js'
],
output: {
path: __dirname + '/dist',
filename: "index... | var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: __dirname + '/app/index.html',
filename: 'index.html',
inject: 'body'
});
module.exports = {
entry: [
'./app/index.js'
],
output: {
path: __dirname + '/dist',
filename: "index... | Load style-loader and css-loader into webpack making require css possible | Load style-loader and css-loader into webpack making require css possible
| JavaScript | mit | guilsa/javascript-stuff,guilsa/javascript-stuff | ---
+++
@@ -15,7 +15,8 @@
},
module: {
loaders: [
- { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }
+ { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" },
+ { test: /\.css$/, loader: "style-loader!css-loader" }
]
},
plugins: [HtmlWebpackPluginConf... |
95a364f75062d73bc219c21debb69de7ca2c016c | test/spec/leafbird.spec.js | test/spec/leafbird.spec.js | /*
Copyright 2015 Leafbird
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | /*
Copyright 2015 Leafbird
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | Verify if leafbird variable has defined on the global scope | Verify if leafbird variable has defined on the global scope
| JavaScript | apache-2.0 | bscherer/leafbird,bscherer/leafbird,lucasb/leafbird,lucasb/leafbird,leafbirdjs/leafbird,leafbirdjs/leafbird | ---
+++
@@ -20,4 +20,8 @@
leafbrd.configure({});
expect(leafbrd.config).toEqual(undefined);
});
+
+ it('verify if a leafbird global object has defined', function(){
+ expect(leafbird).toBeDefined();
+ });
}); |
bab883be3f5f8eb4969021fe4924253090d58614 | js/application.js | js/application.js | $(document).ready(function(){
var arrayOfColumnNames = [
"c0",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
];
for (var i=0; i<7; i++) {
$("#board").append("<div class='column-div' id=" + arrayOfColumnNames[i] + "></div>");
// console.log($('#' + arrayOfColumnNames[i]));
var thisC... | $(document).ready(function(){
var arrayOfColumnNames = [
"c0",
"c1",
"c2",
"c3",
"c4",
"c5",
"c6",
];
for (var i=0; i<7; i++) {
$("#board").append("<div class='column-div' id=" + arrayOfColumnNames[i] + "></div>");
// console.log($('#' + arrayOfColumnNames[i]));
var thisC... | Add pieces to the board | Add pieces to the board
| JavaScript | mit | RNBrandt/Connect-4,RNBrandt/Connect-4 | ---
+++
@@ -15,11 +15,36 @@
// console.log($('#' + arrayOfColumnNames[i]));
var thisColumn = $('#' + arrayOfColumnNames[i]);
- for (var j=0; j<6; j++) {
+ for (var j=5; j>=0; j--) {
$('#' + arrayOfColumnNames[i]).append("<div class='row-div' id=" + arrayOfColumnNames[i] + "-" + j + "></div>")... |
7b7c5befdb6404705ca905bf3e2ae8c8aebe4271 | source/setup/components/VaultPage.js | source/setup/components/VaultPage.js | import React, { Component } from "react";
import PropTypes from "prop-types";
import BUI, { VaultProvider, VaultUI } from "@buttercup/ui";
class VaultPage extends Component {
static propTypes = {
sourceID: PropTypes.string.isRequired,
vault: PropTypes.object
};
state = {
masterPass... | import React, { Component } from "react";
import PropTypes from "prop-types";
import { VaultProvider, VaultUI } from "@buttercup/ui";
class VaultPage extends Component {
static propTypes = {
sourceID: PropTypes.string.isRequired,
vault: PropTypes.object
};
state = {
masterPassword:... | Remove testing for vault ui | Remove testing for vault ui
| JavaScript | mit | buttercup-pw/buttercup-browser-extension,buttercup-pw/buttercup-browser-extension,perry-mitchell/buttercup-chrome,perry-mitchell/buttercup-chrome | ---
+++
@@ -1,6 +1,6 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
-import BUI, { VaultProvider, VaultUI } from "@buttercup/ui";
+import { VaultProvider, VaultUI } from "@buttercup/ui";
class VaultPage extends Component {
static propTypes = {
@@ -17,7 +17,6 @@
}
... |
03f2023117163b855f447ef842712f549e6235a4 | lib/webrat/selenium/location_strategy_javascript/webratlink.js | lib/webrat/selenium/location_strategy_javascript/webratlink.js | var links = inDocument.getElementsByTagName('a');
var candidateLinks = $A(links).select(function(candidateLink) {
var textMatched = PatternMatcher.matches(locator, getText(candidateLink));
var idMatched = PatternMatcher.matches(locator, candidateLink.id);
var titleMatched = PatternMatcher.matches(locator,... | var links = inDocument.getElementsByTagName('a');
var candidateLinks = $A(links).select(function(candidateLink) {
var textMatched = false;
var titleMatched = false;
var idMatched = false;
if (getText(candidateLink).toLowerCase().indexOf(locator.toLowerCase()) != -1) {
textMatched = true;
}
if (candid... | Make link location in Selenium more reliable and consistent with non-Selenium | Make link location in Selenium more reliable and consistent with non-Selenium
| JavaScript | mit | brynary/webrat,jacksonfish/webrat,irfanah/webrat,johnbintz/webrat,jacksonfish/webrat,irfanah/webrat,johnbintz/webrat,irfanah/webrat,brynary/webrat | ---
+++
@@ -1,9 +1,21 @@
var links = inDocument.getElementsByTagName('a');
var candidateLinks = $A(links).select(function(candidateLink) {
- var textMatched = PatternMatcher.matches(locator, getText(candidateLink));
- var idMatched = PatternMatcher.matches(locator, candidateLink.id);
- var titleMatched ... |
282a542462c9a738aa150c8fe785e264f42cf98a | src/geo/leaflet/leaflet-cartodb-webgl-layer-group-view.js | src/geo/leaflet/leaflet-cartodb-webgl-layer-group-view.js | var TC = require('tangram.cartodb');
var LeafletLayerView = require('./leaflet-layer-view');
var LeafletCartoDBVectorLayerGroupView = window.L.TileLayer.extend({
includes: [
LeafletLayerView.prototype
],
options: {
minZoom: 0,
maxZoom: 28,
tileSize: 256,
zoomOffset: 0,
tileBuffer: 50
}... | var TC = require('tangram.cartodb');
var LeafletLayerView = require('./leaflet-layer-view');
var L = require('leaflet');
var LeafletCartoDBVectorLayerGroupView = L.Layer.extend({
includes: [
LeafletLayerView.prototype
],
options: {
minZoom: 0,
maxZoom: 28,
tileSize: 256,
zoomOffset: 0,
t... | Extend from the proper layer | Extend from the proper layer
| JavaScript | bsd-3-clause | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js | ---
+++
@@ -1,7 +1,8 @@
var TC = require('tangram.cartodb');
var LeafletLayerView = require('./leaflet-layer-view');
+var L = require('leaflet');
-var LeafletCartoDBVectorLayerGroupView = window.L.TileLayer.extend({
+var LeafletCartoDBVectorLayerGroupView = L.Layer.extend({
includes: [
LeafletLayerView.pr... |
17d2056799f9560f0340efa18447a6ea7dd52e56 | src/mixin.js | src/mixin.js | function Mixin(proto, properties) {
for (const property in properties) {
const value = properties[property];
if (proto[property] && typeof value == "function") {
inherit(proto, property, value);
} else {
proto[property] = value;
}
}
}
function inherit(proto, name, func) {
var parentFu... | function Mixin(proto, properties) {
for (const property in properties) {
const value = properties[property];
if (proto[property] && typeof value == "function") {
inherit(proto, property, value);
} else {
proto[property] = value;
}
}
}
function inherit(proto, property, func) {
var pare... | Make name `name` match in `inherit` helper | Make name `name` match in `inherit` helper
This function uses approximately the same variable names to add to the
prototype. Lets match `Mixin`.
| JavaScript | mit | iFixit/node-markup,iFixit/node-markup,iFixit/node-markup | ---
+++
@@ -9,9 +9,9 @@
}
}
-function inherit(proto, name, func) {
- var parentFunc = proto[name];
- proto[name] = function () {
+function inherit(proto, property, func) {
+ var parentFunc = proto[property];
+ proto[property] = function () {
var old = this.callParent;
this.callParent = parentFunc;... |
ce62829374960f487c98c974be3725b244fc1ff6 | LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js | LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js | importScripts('common.js');
function continuouslyGenerateRsaKey()
{
var extractable = false;
var usages = ['encrypt', 'decrypt'];
// Note that the modulus length is small.
var algorithm = {name: "RSAES-PKCS1-v1_5", modulusLength: 512, publicExponent: hexStringToUint8Array("010001")};
return crypto... | importScripts('common.js');
function continuouslyGenerateRsaKey()
{
var extractable = false;
var usages = ['sign', 'verify'];
// Note that the modulus length is small.
var algorithm = {name: "RSASSA-PKCS1-v1_5", modulusLength: 512, publicExponent: hexStringToUint8Array("010001"), hash: {name: 'sha-1'}}... | Remove a lingering usage of RSA-ES. | [webcrypto] Remove a lingering usage of RSA-ES.
TBR=jww
BUG=372920,245025
Review URL: https://codereview.chromium.org/344503003
git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@176389 bbb929c8-8fbe-4397-9dbb-9b2b20218538
| JavaScript | bsd-3-clause | primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs | ---
+++
@@ -3,9 +3,9 @@
function continuouslyGenerateRsaKey()
{
var extractable = false;
- var usages = ['encrypt', 'decrypt'];
+ var usages = ['sign', 'verify'];
// Note that the modulus length is small.
- var algorithm = {name: "RSAES-PKCS1-v1_5", modulusLength: 512, publicExponent: hexStringTo... |
86e7de3cb692cc025512546876e4bb733f130d7c | packages/pundle-transformer-js/lib/plugin-remove-dead-nodes.js | packages/pundle-transformer-js/lib/plugin-remove-dead-nodes.js | // @flow
import * as t from '@babel/types'
// Empty out bodies of falsy parts of if/else statements
// to avoid requiring modules that aren't needed aka
// if (process.env.NODE_ENV === 'production') module.exports = require('./prod-version') else module.exports = require('./dev-version')
// OR
// module.exports = pro... | // @flow
import * as t from '@babel/types'
// Empty out bodies of falsy parts of if/else statements
// to avoid requiring modules that aren't needed aka
// if (process.env.NODE_ENV === 'production') module.exports = require('./prod-version') else module.exports = require('./dev-version')
// OR
// module.exports = pro... | Fix issue with non-block if/else blocks | :bug: Fix issue with non-block if/else blocks
| JavaScript | mit | steelbrain/pundle,motion/pundle,steelbrain/pundle,steelbrain/pundle | ---
+++
@@ -15,17 +15,21 @@
function visitIfNode(leafNode) {
if (!t.isBooleanLiteral(leafNode.test)) return
- const { test, consequent, alternate } = node
+ const { test, consequent, alternate } = leafNode
if (test.value) {
- path.replaceWithMultiple(consequent.body)
+ if (t.isBlockSt... |
8cd66a00388b06bf6744c0be19eb38a20bc7fc59 | src/validators/ValidationError.js | src/validators/ValidationError.js | /**
* Copyright 2015 Jaime Pajuelo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | /**
* Copyright 2015 Jaime Pajuelo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | Change 'div' element of validation error to 'p' | Change 'div' element of validation error to 'p'
| JavaScript | apache-2.0 | jpajuelo/js-form-validator | ---
+++
@@ -29,7 +29,7 @@
this.message = message;
- this.element = document.createElement('div');
+ this.element = document.createElement('p');
this.element.className = "control-error";
this.element.textContent = message;
}; |
fa1bcd93bb50dfed00a56e908270a1338ca36b67 | src/xmlWriter.js | src/xmlWriter.js | /* global jasmineImporter */
const {GLib} = imports.gi;
const Utils = jasmineImporter.utils;
function Node(name) {
this.name = name;
this.attrs = {};
this.children = [];
this.text = '';
}
function _attrsToString(attrs) {
return Object.keys(attrs).map(key => {
const value = attrs[key].toS... | /* global jasmineImporter */
/* exported Node */
const {GLib} = imports.gi;
const Utils = jasmineImporter.utils;
var Node = class Node {
constructor(name) {
this.name = name;
this.attrs = {};
this.children = [];
this.text = '';
}
toString() {
return `<?xml version... | Change XMLWriter.Node to an ES6 class | Change XMLWriter.Node to an ES6 class
This was still using the old way without syntactic sugar.
| JavaScript | mit | ptomato/jasmine-gjs,ptomato/jasmine-gjs | ---
+++
@@ -1,15 +1,22 @@
/* global jasmineImporter */
+/* exported Node */
const {GLib} = imports.gi;
const Utils = jasmineImporter.utils;
-function Node(name) {
- this.name = name;
- this.attrs = {};
- this.children = [];
- this.text = '';
-}
+var Node = class Node {
+ constructor(name) {
+ ... |
fa4465e3705fd2d75011401a9ec2167842d4f5ce | static/js/vcs.js | static/js/vcs.js | var $ = $ || function() {}; // Keeps from throwing ref errors.
function swapselected(from, to) {
$(to).html(options[$(from).val()]);
}
function detailselected(from, to) {
$(to).text(details[$(from).val()]);
}
$(function() {
$("#grp-slct").change(
function() {
swapselected("#grp-slct", "#subgrp-slct");
});
... | var $ = $ || function() {}; // Keeps from throwing ref errors.
function swapselected(from, to) {
$(to).html(options[$(from).val()]);
}
function detailselected(from, to) {
$(to).text(details[$(from).val()]);
}
$(function() {
$("#grp-slct").change(
function() {
swapselected("#grp-slct", "#subgrp-slct");
});
... | Add the hidden activity value to the form so we know which activity has been selected. | Add the hidden activity value to the form so we know which activity has been selected.
| JavaScript | bsd-3-clause | AeroNotix/django-timetracker,AeroNotix/django-timetracker,AeroNotix/django-timetracker | ---
+++
@@ -16,6 +16,7 @@
$("#subgrp-slct").change(
function() {
detailselected("#subgrp-slct", "#detail-msg");
+ $("#activity_key").attr("value", $("#subgrp-slct").val());
});
}); |
4bc5e394580543c2f31ac2d4d7424fef6e47a21a | .eslintrc.js | .eslintrc.js | module.exports = {
extends: "eslint:recommended",
rules: {
"no-console": 0,
"object-curly-spacing": ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
quotes: ["error", "backtick"],
semi: ["error", "never"],
},
env: {
node: true,
},
parserOptions: {
ecmaVersion: ... | module.exports = {
extends: "eslint:recommended",
rules: {
"no-console": 0,
"object-curly-spacing": ["error", "always"],
"comma-dangle": ["error", "always-multiline"],
quotes: ["error", "backtick"],
semi: ["error", "never"],
"arrow-body-style": [
"error",
"as-needed",
{ req... | Add explicit rule for arrow functions and add support for es6 globals | Add explicit rule for arrow functions and add support for es6 globals
| JavaScript | mit | mattdean1/contentful-text-search | ---
+++
@@ -6,9 +6,15 @@
"comma-dangle": ["error", "always-multiline"],
quotes: ["error", "backtick"],
semi: ["error", "never"],
+ "arrow-body-style": [
+ "error",
+ "as-needed",
+ { requireReturnForObjectLiteral: true },
+ ],
},
env: {
node: true,
+ es6: true,
},
... |
a2603a86697b856749a1df9027505adf11908cad | src/components/ReviewRecipe.js | src/components/ReviewRecipe.js | import React from 'react';
import { Link } from 'react-router-dom';
import { Button } from 'react-bootstrap';
import ModifyTitle from '../containers/ModifyTitle';
import ModifyIngredients from '../containers/ModifyIngredients';
import PropTypes from 'prop-types';
const ReviewRecipe = (props) => {
return (
<div>
... | import React from 'react';
import { Link } from 'react-router-dom';
import { Button } from 'react-bootstrap';
import ModifyTitle from '../containers/ModifyTitle';
import ModifyIngredients from '../containers/ModifyIngredients';
import PropTypes from 'prop-types';
const ReviewRecipe = (props) => {
return (
<div>
... | Refactor if statement for clarity. | Refactor if statement for clarity.
| JavaScript | mit | phuchle/recipeas,phuchle/recipeas | ---
+++
@@ -22,9 +22,11 @@
bsSize="large"
style={props.buttonStyle}
onClick={() => {
- props.tempRecipe.editMode ?
- props.editRecipe(props.tempRecipe.id, props.tempRecipe)
- : props.addRecipe(props.tempRecipe);
+ if (props.tempRecipe.editMode) {
+ ... |
0a3273bbb40e2c7c9c84f2df01ce53a8b379a86e | app/components/common/cityModule/cityElectionsController.js | app/components/common/cityModule/cityElectionsController.js | 'use strict';
function cityElectionsController($scope, ballot) {
$scope.ballot = ballot;
$scope.isOffice = isOffice;
$scope.isReferendum = isReferendum;
function isOffice(contest) {
return contest.type === 'office';
}
function isReferendum(contest) {
return contest.type === 'referendum';
}
}
... | 'use strict';
function cityElectionsController($scope, ballot) {
$scope.ballot = ballot;
$scope.isOffice = isOffice;
$scope.isReferendum = isReferendum;
function isOffice(contest) {
return contest.contest_type === 'office';
}
function isReferendum(contest) {
return contest.contest_type === 'refe... | Fix the contest type property | Fix the contest type property
| JavaScript | mit | KyleW/disclosure-frontend,caciviclab/disclosure-frontend,caciviclab/disclosure-frontend,KyleW/disclosure-frontend,caciviclab/disclosure-frontend-alpha,KyleW/disclosure-frontend,caciviclab/disclosure-frontend,caciviclab/disclosure-frontend-alpha,caciviclab/disclosure-frontend-alpha | ---
+++
@@ -7,11 +7,11 @@
$scope.isReferendum = isReferendum;
function isOffice(contest) {
- return contest.type === 'office';
+ return contest.contest_type === 'office';
}
function isReferendum(contest) {
- return contest.type === 'referendum';
+ return contest.contest_type === 'referendu... |
8c999c55254a61185589743e2e8aebf4e71bca06 | modules/data-selection/components/formatter/formatter.component.js | modules/data-selection/components/formatter/formatter.component.js | (function () {
'use strict';
angular
.module('dpDataSelection')
.component('dpDataSelectionFormatter', {
bindings: {
variables: '<',
formatter: '@',
useInline: '<'
},
templateUrl: 'modules/data-selection/compone... | (function () {
'use strict';
angular
.module('dpDataSelection')
.component('dpDataSelectionFormatter', {
bindings: {
variables: '<',
formatter: '@',
useInline: '<'
},
templateUrl: 'modules/data-selection/compone... | Debug thing pushing to adw.. | Debug thing pushing to adw..
| JavaScript | mpl-2.0 | DatapuntAmsterdam/atlas_prototype,Amsterdam/atlas,DatapuntAmsterdam/atlas_prototype,DatapuntAmsterdam/atlas,DatapuntAmsterdam/atlas,Amsterdam/atlas,Amsterdam/atlas,Amsterdam/atlas,DatapuntAmsterdam/atlas | ---
+++
@@ -36,5 +36,7 @@
return variable.value;
}).join(' ');
}
+
+ console.log(formattedValue);
}
})(); |
0165ba27355a4ea2125abf4875a212257bf2567e | lib/flux_mixin.js | lib/flux_mixin.js | module.exports = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
};
| var FluxMixin = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
},
childContextTypes: {
flux: React.PropTypes.object
},
getChildContext: function() {
return {
flux: this.props.flux
};
}
};
};
FluxMixin.componentWillMount = fu... | Throw if Fluxbox.FluxMixin used as a mixin instead of a function | Throw if Fluxbox.FluxMixin used as a mixin instead of a function
| JavaScript | mit | hoanglamhuynh/fluxxor,STRML/fluxxor,alcedo/fluxxor,davesag/fluxxor,nagyistoce/fluxxor,BinaryMuse/fluxxor,VincentHoang/fluxxor,davesag/fluxxor,chimpinano/fluxxor,davesag/fluxxor,dantman/fluxxor,nagyistoce/fluxxor,andrewslater/fluxxor,webcoding/fluxxor,chimpinano/fluxxor,SqREL/fluxxor,dantman/fluxxor,hoanglamhuynh/fluxxo... | ---
+++
@@ -1,4 +1,4 @@
-module.exports = function(React) {
+var FluxMixin = function(React) {
return {
propTypes: {
flux: React.PropTypes.object.isRequired
@@ -15,3 +15,10 @@
}
};
};
+
+FluxMixin.componentWillMount = function() {
+ throw new Error("Fluxbox.FluxMixin is a function that takes ... |
b32b1eb4acda8ea21328f8056666ec22421a038e | lib/web-server.js | lib/web-server.js | #!/usr/bin/env node
// Modules
var connect = require('connect'),
fs = require('fs'),
http = require('http'),
path = require('path'),
serveStatic = require('serve-static'),
serveIndex = require('serve-index');
// Variables
var app = connect(),
hookFile = 'web-server-hook.js';
function main(por... | #!/usr/bin/env node
// Modules
var connect = require('connect'),
fs = require('fs'),
http = require('http'),
path = require('path'),
serveStatic = require('serve-static'),
serveIndex = require('serve-index');
// Variables
var app = connect(),
hookFile = 'web-server-hook.js';
function main(por... | Fix inclusion of server hook to use proper relative path | Fix inclusion of server hook to use proper relative path
| JavaScript | mit | itsananderson/node-web-server-cli | ---
+++
@@ -21,7 +21,7 @@
rootPath = path.resolve(rootPath);
if (fs.existsSync(path.resolve(hookFile))) {
- hook = require(hookFile);
+ hook = require('./' + hookFile);
}
if (undefined !== hook.config) { |
d0c8e97a68089b2fcd94b9921b976a4ff9619fad | tool/src/main/webapp/static/lib/serverDate.js | tool/src/main/webapp/static/lib/serverDate.js | // Small jQuery plugin to get dates from server.
(function($){
var serverDate;
var init = function(){
if (!serverDate) {
$.ajax({
"url": "/course-signup/rest/user/current",
"type": "GET",
"async": false,
"dataType": "json",
... | // Small jQuery plugin to get dates from server.
(function($){
// Work out the difference between client time and server time.
var adjustment;
var init = function(){
if (!adjustment) {
$.ajax({
"url": "/course-signup/rest/user/current",
"type": "GET",
... | Make sure serverdate updates using the client clock. | Make sure serverdate updates using the client clock. | JavaScript | apache-2.0 | ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup,ox-it/wl-course-signup | ---
+++
@@ -1,16 +1,20 @@
// Small jQuery plugin to get dates from server.
(function($){
- var serverDate;
+ // Work out the difference between client time and server time.
+ var adjustment;
+
var init = function(){
- if (!serverDate) {
+ if (!adjustment) {
$.ajax({
... |
865c601b1b0fb542733e854087581f12b142c59e | src/components/App/components/UserInputError/UserInputError.js | src/components/App/components/UserInputError/UserInputError.js | import styles from './UserInputError.less';
import React, { Component, PropTypes } from 'react';
import { MIN_FONT_SIZE, MAX_FONT_SIZE } from 'flux/constants/config';
export default class UserInputError extends Component {
static propTypes = {
areColorsValid: PropTypes.bool.isRequired,
isFontSizeValid: Prop... | import styles from './UserInputError.less';
import React, { Component, PropTypes } from 'react';
import { MIN_FONT_SIZE } from 'flux/constants/config';
export default class UserInputError extends Component {
static propTypes = {
areColorsValid: PropTypes.bool.isRequired,
isFontSizeValid: PropTypes.bool.isRe... | Update font size error message | Update font size error message
| JavaScript | mit | moroshko/accessible-colors,moroshko/accessible-colors | ---
+++
@@ -1,7 +1,7 @@
import styles from './UserInputError.less';
import React, { Component, PropTypes } from 'react';
-import { MIN_FONT_SIZE, MAX_FONT_SIZE } from 'flux/constants/config';
+import { MIN_FONT_SIZE } from 'flux/constants/config';
export default class UserInputError extends Component {
stat... |
29d0e65927d34f8077c56321c4c145b0fd9d87b3 | test/gameSpec.js | test/gameSpec.js | var game = require('../game.js');
var chai = require('chai');
chai.should();
describe('Game', function() {
describe('createPack', function() {
it('has 52 cards', function() {
var p = game.createPack();
p.should.have.lengthOf(52);
});
});
describe('shuffle', function() {
it('should have ... | var game = require('../game.js');
var chai = require('chai');
chai.should();
describe('Game', function() {
describe('createPack', function() {
it('has 52 cards', function() {
var p = game.createPack();
p.should.have.lengthOf(52);
});
});
describe('shuffle', function() {
it('should have ... | Add some tests for drawing cards | Add some tests for drawing cards
| JavaScript | mit | psmarshall/500,psmarshall/500 | ---
+++
@@ -18,4 +18,23 @@
p.should.have.lengthOf(s.length);
});
})
+
+ describe('draw', function() {
+ describe('one card', function() {
+ it('should draw the requested number', function() {
+ var pack = game.createPack();
+ var cards = game.draw(pack, 1, [], false);
+ ca... |
f9f7ba4eb96ff7bcadfd2c7859d315ff3418e084 | src/components/LastHarvestStatus/LastHarvestStatus.js | src/components/LastHarvestStatus/LastHarvestStatus.js | import React from 'react'
import moment from 'moment'
import { theme } from '../../tools'
let styles = {
chip: {},
}
const LastHarvestStatus = ({harvest}) => {
const date = new Date(harvest.finished || harvest.finishedAt).getTime()
const hoursDifference = moment(date).fromNow()
let status
if (harvest.statu... | import React from 'react'
import moment from 'moment'
import { theme } from '../../tools'
let styles = {
chip: {},
}
const LastHarvestStatus = ({harvest}) => {
const date = new Date(harvest.finished || harvest.finishedAt).getTime()
const hoursDifference = moment(date).fromNow()
let status
if (harvest.statu... | Fix color on last harvested | Fix color on last harvested
| JavaScript | mit | sgmap/inspire,sgmap/inspire | ---
+++
@@ -12,6 +12,7 @@
let status
if (harvest.status === 'successful') {
+ styles.chip.color = theme.highlightblue
status = 'Réussi'
} else {
styles.chip.color = theme.red |
b60d3007afcddbe61f1aa3a78bacf284907ffcf6 | src/plugins/configure/index.js | src/plugins/configure/index.js | const { next, hookStart, hookEnd } = require('hooter/effects')
const assignDefaults = require('./assignDefaults')
const validateConfig = require('./validateConfig')
const EVENTS_WITH_CONFIG = ['start', 'execute', 'process', 'handle', 'error']
module.exports = function* configurePlugin() {
let schema, config
fu... | const { next, hook, hookStart, hookEnd } = require('hooter/effects')
const assignDefaults = require('./assignDefaults')
const validateConfig = require('./validateConfig')
const EVENTS_WITH_CONFIG = ['start', 'execute', 'process', 'handle', 'error']
module.exports = function* configurePlugin() {
let schema, config... | Use 'hook' to assign defaults | Use 'hook' to assign defaults
| JavaScript | isc | alex-shnayder/comanche | ---
+++
@@ -1,4 +1,4 @@
-const { next, hookStart, hookEnd } = require('hooter/effects')
+const { next, hook, hookStart, hookEnd } = require('hooter/effects')
const assignDefaults = require('./assignDefaults')
const validateConfig = require('./validateConfig')
@@ -30,7 +30,7 @@
return yield next(schema, _conf... |
6629bedfc4b561b3fbacdb5042b7538f6ad3ac80 | app/assets/javascripts/lib/requests.js | app/assets/javascripts/lib/requests.js | import Axios from 'axios';
export function request (url, method, data = {}, options = {scroll: true}) {
let promise = Axios.post(url, data, {
headers: {
'X-HTTP-Method-Override': method,
'X-CSRF-Token': document.querySelector('meta[name=csrf-token]').getAttribute('content')
}
});
... | import Axios from 'axios';
export function request (url, method, data = {}, options = {scroll: true}) {
let promise = Axios.post(url, data, {
headers: {
'X-HTTP-Method-Override': method,
'X-CSRF-Token': document.querySelector('meta[name=csrf-token]').getAttribute('content')
}
});
... | Save scroll position in Firefox. | Save scroll position in Firefox.
| JavaScript | agpl-3.0 | harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o | ---
+++
@@ -17,7 +17,13 @@
let location = response.request.responseURL;
if ((window.location.href == location) || (method == 'delete')){
- window.location.reload(true); // save scroll position for annotations
+ // saving scroll position
+ if (navigator.userAgent.match('Firefox') ... |
37952efe4b53a791028e72ac9419864fcaf6a4f8 | tests/dummy/app/services/store.js | tests/dummy/app/services/store.js | import Ember from 'ember';
import DS from 'ember-data';
import { Offline } from 'ember-flexberry-data';
export default Offline.Store.extend({
init() {
this._super(...arguments);
let owner = Ember.getOwner(this);
let Store = DS.Store;
let onlineStore = Store.create(owner.ownerInjection());
this.se... | import Ember from 'ember';
import DS from 'ember-data';
import { Offline } from 'ember-flexberry-data';
export default Offline.Store.extend({
init() {
this.set('offlineSchema', {
TestDB: {
0.1: {
'ember-flexberry-dummy-suggestion': 'id,address,text,date,votes,moderated,type,author,editor1... | Test dummy-app add offline schema for tests | Test dummy-app add offline schema for tests
| JavaScript | mit | Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data | ---
+++
@@ -4,10 +4,22 @@
export default Offline.Store.extend({
init() {
- this._super(...arguments);
+ this.set('offlineSchema', {
+ TestDB: {
+ 0.1: {
+ 'ember-flexberry-dummy-suggestion': 'id,address,text,date,votes,moderated,type,author,editor1,*files,*userVotes,*comments',
+ ... |
a51a480ac80d7123451ed45dca816d445c92d20e | src/routes/control.js | src/routes/control.js | // Manage the SHA of the latest control repository commit.
var restify = require('restify');
var storage = require('../storage');
var log = require('../logging').getLogger();
exports.store = function (req, res, next) {
if (req.params.sha === undefined) {
return next(new restify.InvalidContentError('Missing req... | // Manage the SHA of the latest control repository commit.
var restify = require('restify');
var storage = require('../storage');
var log = require('../logging').getLogger();
exports.store = function (req, res, next) {
if (req.params.sha === undefined) {
return next(new restify.InvalidContentError('Missing req... | Remove a misleading log message. | Remove a misleading log message.
| JavaScript | mit | deconst/content-service,deconst/content-service | ---
+++
@@ -31,10 +31,6 @@
next.ifError(err);
res.json(200, {sha: sha});
-
- log.info('Got control repository SHA', {
- sha: sha
- });
next();
});
}; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.