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 |
|---|---|---|---|---|---|---|---|---|---|---|
6a8911b4c95529923a198c534c87615ed5833a18 | addon/components/mail-check.js | addon/components/mail-check.js | import Ember from 'ember';
import Mailcheck from 'mailcheck';
export default Ember.Component.extend({
type: 'email',
name: 'email',
value: '',
placeholder: '',
suggestion: '',
inputClass: 'mailcheck-input',
classNames: ['mailcheck'],
actions: {
mailcheck: function() {
var _this = this;
... | import Ember from 'ember';
import Mailcheck from 'mailcheck';
export default Ember.Component.extend({
type: 'email',
name: 'email',
value: '',
placeholder: '',
suggestion: '',
inputClass: 'mailcheck-input',
classNames: ['mailcheck'],
actions: {
mailcheck: function() {
var _this = this;
... | Hide hint when a valid email is input | Hide hint when a valid email is input
| JavaScript | mit | johnotander/ember-mailcheck,johnotander/ember-mailcheck | ---
+++
@@ -25,6 +25,8 @@
var email = _this.value;
if (isEmail(email)) {
+ _this.set('hint', null);
+ _this.set('suggestion', null);
return;
}
|
d8488c998a2094a1eaf44fcb2399f31b1491f8df | test/app.js | test/app.js | var request = require('supertest');
var app = require('../app.js');
describe('GET /', function() {
it('should return 200 OK', function(done) {
request(app)
.get('/')
.expect(200, done);
});
});
describe('GET /reset', function() {
it('should return 404', function(done) {
request(app)
.g... | var request = require('supertest');
var app = require('../app.js');
describe('GET /', function() {
it('should return 200 OK', function(done) {
request(app)
.get('/')
.expect(200, done);
});
});
describe('GET /login', function() {
it('should return 200 OK', function(done) {
request(app)
... | Add additional supertest tests for /signup, /api, /contact and /login | Add additional supertest tests for /signup, /api, /contact and /login
| JavaScript | mit | quazar11/portfolio,suamorales/course-registration,duchangyu/project-starter,bowdenk7/express-typescript-starter,jochan/mddb,dborncamp/shuttles,cmubick/sufficientlyridiculous,ahng1996/balloon-fight,gdiab/hackathon-starter,ColdMonkey/vcoin,loiralae/WaterlooHacks-Winter-2016-v2,pvijeh/node-express-mongo-api,peterblazejewi... | ---
+++
@@ -9,11 +9,42 @@
});
});
-describe('GET /reset', function() {
+describe('GET /login', function() {
+ it('should return 200 OK', function(done) {
+ request(app)
+ .get('/login')
+ .expect(200, done);
+ });
+});
+
+describe('GET /signup', function() {
+ it('should return 200 OK', function... |
570f3636195ebbd2a1e36210eecf85deb9556843 | js/components/developer/choose-job-type-screen/index.js | js/components/developer/choose-job-type-screen/index.js | import React, { Component } from 'react';
import { Container, Content } from 'native-base';
import JobTypeCard from './jobTypeCard';
import GlobalStyle from '../../common/globalStyle';
// Temporary constants. These will be moved and implemented in another way in the future!
const EXAMPLE_IMAGE_URL = 'https://facebook... | import React, { Component } from 'react';
import { Container, Content, List } from 'native-base';
import JobTypeCard from './jobTypeCard';
import GlobalStyle from '../../common/globalStyle';
// Temporary constants. These will be moved and implemented in another way in the future!
const EXAMPLE_IMAGE_URL = 'https://fa... | Use List from NativeBase to display job types in ChooseJobTypeScreen | Use List from NativeBase to display job types in ChooseJobTypeScreen
| JavaScript | mit | justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client | ---
+++
@@ -1,26 +1,30 @@
import React, { Component } from 'react';
-import { Container, Content } from 'native-base';
+import { Container, Content, List } from 'native-base';
import JobTypeCard from './jobTypeCard';
import GlobalStyle from '../../common/globalStyle';
// Temporary constants. These will be mov... |
db7bc3914c1d83f6998be5840fbf43afd977d6ec | src/js/components/ServiceSearchFilter.js | src/js/components/ServiceSearchFilter.js | import mixin from 'reactjs-mixin';
import React from 'react';
import FilterInputText from './FilterInputText';
import QueryParamsMixin from '../mixins/QueryParamsMixin';
import ServiceFilterTypes from '../constants/ServiceFilterTypes';
const METHODS_TO_BIND = ['setSearchString'];
class ServiceSearchFilter extends mi... | import mixin from 'reactjs-mixin';
import React from 'react';
import FilterInputText from './FilterInputText';
import QueryParamsMixin from '../mixins/QueryParamsMixin';
import ServiceFilterTypes from '../constants/ServiceFilterTypes';
const METHODS_TO_BIND = ['setSearchString'];
class ServiceSearchFilter extends mi... | Correct placeholder for input field | Correct placeholder for input field
| JavaScript | apache-2.0 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | ---
+++
@@ -52,8 +52,10 @@
render() {
return (
<FilterInputText
- searchString={this.state.searchString}
- handleFilterChange={this.setSearchString} />
+ handleFilterChange={this.setSearchString}
+ inverseStyle={true}
+ placeholder="Search"
+ searchString={this... |
ce99214f1f6285c0d631065cbb391f62a31ed31c | client/tests/end2end/protractor-sauce.config.js | client/tests/end2end/protractor-sauce.config.js | var fs = require('fs');
var specs = JSON.parse(fs.readFileSync('tests/end2end/specs.json'));
var browser_capabilities = JSON.parse(process.env.SELENIUM_BROWSER_CAPABILITIES);
browser_capabilities['name'] = 'GlobaLeaks-E2E';
browser_capabilities['tunnel-identifier'] = process.env.TRAVIS_JOB_NUMBER;
browser_capabilities... | var fs = require('fs');
var specs = JSON.parse(fs.readFileSync('tests/end2end/specs.json'));
var browser_capabilities = JSON.parse(process.env.SELENIUM_BROWSER_CAPABILITIES);
browser_capabilities['name'] = 'GlobaLeaks-E2E';
browser_capabilities['tunnel-identifier'] = process.env.TRAVIS_JOB_NUMBER;
browser_capabilities... | Add branch tag to saucelabs runs | Add branch tag to saucelabs runs
| JavaScript | agpl-3.0 | vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks | ---
+++
@@ -5,6 +5,7 @@
browser_capabilities['name'] = 'GlobaLeaks-E2E';
browser_capabilities['tunnel-identifier'] = process.env.TRAVIS_JOB_NUMBER;
browser_capabilities['build'] = process.env.TRAVIS_BUILD_NUMBER;
+browser_capabilities['tags'] = [process.env.TRAVIS_BRANCH];
exports.config = {
framework: 'jasm... |
e42b5abd256c9a6ef4a336985bd0de77759b4ef0 | src/SortOptions.js | src/SortOptions.js | 'use strict';
const ProgramError = require('./error/ProgramError');
class SortOptions
{
constructor(options = {})
{
this.path = 'sort';
this.unique = false;
this.numeric = false;
this.reverse = false;
this.stable = false;
this.merge = false;
this.ignoreCase = false;
this.sortByHash = false;
this.t... | 'use strict';
const ProgramError = require('./error/ProgramError');
class SortOptions
{
constructor(options = {})
{
this.path = 'sort';
this.unique = false;
this.numeric = false;
this.reverse = false;
this.stable = false;
this.merge = false;
this.ignoreCase = false;
this.sortByHash = false;
this.t... | Set default buffer size to 64M | Set default buffer size to 64M | JavaScript | mit | avz/node-jl-sql-api | ---
+++
@@ -15,7 +15,7 @@
this.ignoreCase = false;
this.sortByHash = false;
this.tmpDir = null;
- this.bufferSize = null;
+ this.bufferSize = 64 * 1024 * 1024;
this.separator = '\t';
this.threads = null;
this.keys = []; |
515bb10c47efffa3c6a6de09339774154bcb7506 | website/gatsby-config.js | website/gatsby-config.js | module.exports = {
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: `content`,
path: `${__dirname}/../content`,
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
icon: `${__dirname}/src/images/kitura.svg`
},
},
{
... | module.exports = {
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: `content`,
path: `${__dirname}/../content`,
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
icon: `src/images/kitura.svg`
},
},
{
resolve: `... | Update relative path for favicon | Update relative path for favicon
| JavaScript | apache-2.0 | IBM-Swift/kitura.io | ---
+++
@@ -10,7 +10,7 @@
{
resolve: `gatsby-plugin-manifest`,
options: {
- icon: `${__dirname}/src/images/kitura.svg`
+ icon: `src/images/kitura.svg`
},
},
{ |
ee2a5723a417eeac7609322cbd85b300cdd81cb7 | website/versionConfig.js | website/versionConfig.js | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 appli... | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 appli... | Update Litho version for Docusaurus | Update Litho version for Docusaurus
Reviewed By: muraziz
Differential Revision: D27236872
fbshipit-source-id: ccab5ed8a444cbf1027070a0261c108c307642f7
| JavaScript | apache-2.0 | facebook/litho,facebook/litho,facebook/litho,facebook/litho,facebook/litho,facebook/litho | ---
+++
@@ -22,8 +22,8 @@
// and refer to the version as: e.g. {{site.lithoVersion}}
export const site = {
- lithoVersion: '0.38.0',
- lithoSnapshotVersion: '0.38.1-SNAPSHOT',
+ lithoVersion: '0.40.0',
+ lithoSnapshotVersion: '0.40.1-SNAPSHOT',
soloaderVersion: '0.9.0',
flipperVersion: '0.46.0',
}; |
e22a2dd76a1f2329b981f3d6caa64e658ed0a16e | public/javascripts/DV/models/chapter.js | public/javascripts/DV/models/chapter.js | DV.model.Chapters = function(viewer) {
this.viewer = viewer;
this.loadChapters();
};
DV.model.Chapters.prototype = {
// Load (or reload) the chapter model from the schema's defined sections.
loadChapters : function() {
var sections = this.viewer.schema.data.sections;
var chapters = this.chapters = thi... | DV.model.Chapters = function(viewer) {
this.viewer = viewer;
this.loadChapters();
};
DV.model.Chapters.prototype = {
// Load (or reload) the chapter model from the schema's defined sections.
loadChapters : function() {
var sections = this.viewer.schema.data.sections;
var chapters = this.chapters = thi... | Remove duplicated _.each loop on sections | Remove duplicated _.each loop on sections
Looks like the original line got retained after
the move to "noConflict" underscore
| JavaScript | apache-2.0 | roberttdev/document-viewer4,roberttdev/document-viewer4,roberttdev/document-viewer4 | ---
+++
@@ -9,7 +9,6 @@
loadChapters : function() {
var sections = this.viewer.schema.data.sections;
var chapters = this.chapters = this.viewer.schema.data.chapters = [];
- _.each(sections, function(sec){ sec.id || (sec.id = parseInt(_.uniqueId())); });
DV._.each(sections, function(sec){ sec.id |... |
c524f8cc6533f28e9a0883b944d962bfc978c853 | app/assets/javascripts/osem-datatables.js | app/assets/javascripts/osem-datatables.js | $(function () {
$.extend(true, $.fn.dataTable.defaults, {
"stateSave": true,
"autoWidth": false,
"pagingType": "full_numbers",
"lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
});
$('.datatable:not([data-source])').DataTable();
$('.datatable').on('init.dt', function (e, settings, json)... | $(function () {
$.extend(true, $.fn.dataTable.defaults, {
"stateSave": true,
"autoWidth": false,
"pagingType": "full_numbers",
"lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
});
$('.datatable:not([data-source])').DataTable();
$('.datatable').on('init.dt', function (e, setting... | Add an option for shorter datatable pages | Add an option for shorter datatable pages
| JavaScript | mit | rishabhptr/osem,openSUSE/osem,hennevogel/osem,bear454/osem,AndrewKvalheim/osem,differentreality/osem,rishabhptr/osem,AndrewKvalheim/osem,SeaGL/osem,openSUSE/osem,openSUSE/osem,hennevogel/osem,bear454/osem,AndrewKvalheim/osem,differentreality/osem,differentreality/osem,bear454/osem,rishabhptr/osem,differentreality/osem,... | ---
+++
@@ -3,7 +3,7 @@
"stateSave": true,
"autoWidth": false,
"pagingType": "full_numbers",
- "lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
+ "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
});
$('.datatable:not([data-source])').DataTable(); |
ece010234d9b5de8ec4d90b9f8b30992baae9997 | jquery.instance.js | jquery.instance.js | /* jQuery.instance
* ---------------
*
* Quick guide:
*
* var $one = $("#sidebar").instance();
* var $two = $("#sidebar").instance();
* $one.abc = 42;
* $two.abc; //=> 42
*
* var Rule = {
* expand: function () { ... }
* };
*
* var $one = $("#sidebar").instance(Rule);
* $one.expand(... | // jQuery.instance
// ---------------
;(function($) {
$.fn.instance = function (type) {
var $this = this.first();
var $this = $this.data('instance') || ($this.data('instance', $this) && $this);
// Tip: Implement a 'klass' property to make sure extending doesn't happen twice.
if ((type) && ((!$this.k... | Make the JS file more readable by moving the comments. | Make the JS file more readable by moving the comments.
| JavaScript | mit | sinefunc/jquery.instance | ---
+++
@@ -1,7 +1,21 @@
-/* jQuery.instance
- * ---------------
- *
- * Quick guide:
+// jQuery.instance
+// ---------------
+
+;(function($) {
+ $.fn.instance = function (type) {
+ var $this = this.first();
+ var $this = $this.data('instance') || ($this.data('instance', $this) && $this);
+
+ // Tip: Imple... |
4edc55154305a022bf53c6015811d11ef38ce4ee | tests/docs.js | tests/docs.js | 'use strict';
var docs = require('../docs/src/js/docs');
var expect = require('chai').expect;
var sinon = require('sinon');
var stub = sinon.stub;
var utils = require('./helpers/utils');
var each = utils.each;
var any = utils.any;
var getContextStub = require('./helpers/get-context-stub');
var Canvas = require('../lib... | 'use strict';
var docs = require('../docs/src/js/docs');
var expect = require('chai').expect;
var sinon = require('sinon');
var stub = sinon.stub;
var utils = require('./helpers/utils');
var each = utils.each;
var any = utils.any;
var getContextStub = require('./helpers/get-context-stub');
var Canvas = require('../lib... | Add tests for description, arguments & returns | Add tests for description, arguments & returns
| JavaScript | mit | JakeSidSmith/canvasimo,JakeSidSmith/sensible-canvas-interface,JakeSidSmith/canvasimo | ---
+++
@@ -25,7 +25,7 @@
});
});
- it('should contain all of the canvasimo methods (or aliases)', function () {
+ it('should contain all of the canvasimo methods and aliases', function () {
each(canvas, function (value, key) {
var anyGroupContainsTheMethod = any(docs, function (group) {
... |
f7ea63cc1349b5abade097fa9bf83bf60fddae07 | src/js/settings.js | src/js/settings.js |
const os = require('os')
const prefix = 'webjcs:'
class Settings {
constructor (defaults = {}) {
this.defaults = defaults
}
set (key, value) {
window.localStorage.setItem(prefix + key, JSON.stringify(value))
}
setDefault (key) {
const def = this.defaults[key]
this.set(key, def)
return ... |
const os = require('os')
const prefix = 'webjcs:'
class Settings {
constructor (defaults = {}) {
this.defaults = defaults
}
set (key, value) {
window.localStorage.setItem(prefix + key, JSON.stringify(value))
}
setDefault (key) {
const def = this.defaults[key]
this.set(key, def)
return ... | Make normal WebGL the default renderer | Make normal WebGL the default renderer
| JavaScript | mit | daniel-j/webjcs,daniel-j/webjcs | ---
+++
@@ -25,7 +25,7 @@
}
module.exports = new Settings({
- renderer: 'webgl-advanced',
+ renderer: 'webgl',
paths: IS_ELECTRON && os.platform() === 'win32' ? ['C:\\Games\\Jazz2\\'] : [],
jj2_exe: IS_ELECTRON && os.platform() === 'win32' ? 'C:\\Games\\Jazz2\\Jazz2+.exe' : '', |
560831185980b3caffbe9365c45d73c468de67b3 | src/settings/LanguagePickerItem.js | src/settings/LanguagePickerItem.js | /* @flow */
import React, { PureComponent } from 'react';
import { StyleSheet, View } from 'react-native';
import type { Context } from '../types';
import { RawLabel, Touchable } from '../common';
import { BRAND_COLOR } from '../styles';
import { IconDone } from '../common/Icons';
const componentStyles = StyleSheet.c... | /* @flow */
import React, { PureComponent } from 'react';
import { StyleSheet, View } from 'react-native';
import type { Context } from '../types';
import { RawLabel, Touchable } from '../common';
import { BRAND_COLOR } from '../styles';
import { IconDone } from '../common/Icons';
const componentStyles = StyleSheet.c... | Define language list item style locally. | language-settings: Define language list item style locally.
This list is doing something idiosyncratic, following a particular iOS
settings-UI convention; so it won't necessarily follow our normal
style for a list.
This commit just copies the global style in, without yet changing it.
| JavaScript | apache-2.0 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile | ---
+++
@@ -13,6 +13,14 @@
},
language: {
flex: 1,
+ },
+ listItem: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ paddingTop: 8,
+ paddingBottom: 8,
+ paddingLeft: 16,
+ paddingRight: 16,
},
});
@@ -33,12 +41,11 @@
};
render() {
- const { styles } = this.context;
... |
0e105f32b829a7786fb860d4d6c5761b3a9980da | src/emitter.js | src/emitter.js | export default class Emitter {
constructor() {
this._events = {}
}
_event(name) {
return (this._events[name] = this._events[name] || new Set())
}
on(name, fn) {
this._event(name).add(fn)
}
off(name, fn) {
if (fn) this._event(name).delete(fn)
else this._event(name).clear()
}
onc... | import { EmitterError } from './error'
export default class Emitter {
constructor() {
this._events = {}
}
_event(name) {
return (this._events[name] = this._events[name] || new Set())
}
on(name, fn) {
if (typeof fn !== 'function') throw new EmitterError('requires function')
this._event(name)... | Check for fn in .on(), bail early in .off() | Check for fn in .on(), bail early in .off()
| JavaScript | mit | kroogs/yaemit | ---
+++
@@ -1,3 +1,5 @@
+import { EmitterError } from './error'
+
export default class Emitter {
constructor() {
this._events = {}
@@ -8,10 +10,12 @@
}
on(name, fn) {
+ if (typeof fn !== 'function') throw new EmitterError('requires function')
this._event(name).add(fn)
}
off(name, fn) ... |
59b277521b4dcecc917a57c920e13ba08cf532ba | lib/ember_orbit.js | lib/ember_orbit.js | import EO from './ember_orbit/main';
import Model from './ember_orbit/model';
import attr from './ember_orbit/attr';
import hasOne from './ember_orbit/relationships/has_one';
import hasMany from './ember_orbit/relationships/has_many';
EO.Model = Model;
EO.attr = attr;
EO.hasOne = hasOne;
EO.hasMany = hasMany;
export ... | import EO from './ember_orbit/main';
import Context from './ember_orbit/context';
import Model from './ember_orbit/model';
import RecordArrayManager from './ember_orbit/record_array_manager';
import Schema from './ember_orbit/schema';
import Source from './ember_orbit/source';
import Store from './ember_orbit/store';
i... | Expand top-level EO namespace members | Expand top-level EO namespace members
| JavaScript | mit | lytbulb/ember-orbit,pixelhandler/ember-orbit,gnarf/ember-orbit,ProlificLab/ember-orbit,orbitjs/ember-orbit,orbitjs/ember-orbit,gnarf/ember-orbit,pixelhandler/ember-orbit,greyhwndz/ember-orbit,opsb/ember-orbit,opsb/ember-orbit,lytbulb/ember-orbit,ProlificLab/ember-orbit,greyhwndz/ember-orbit,lytbulb/ember-orbit,orbitjs/... | ---
+++
@@ -1,11 +1,31 @@
import EO from './ember_orbit/main';
+import Context from './ember_orbit/context';
import Model from './ember_orbit/model';
+import RecordArrayManager from './ember_orbit/record_array_manager';
+import Schema from './ember_orbit/schema';
+import Source from './ember_orbit/source';
+import ... |
e590d56a96a189284347c47f793bf44bdf0b8a03 | lib/skype/setup.js | lib/skype/setup.js | 'use strict';
const skReply = require('./reply');
const skParse = require('./parse');
module.exports = function skSetup(api, bot, logError) {
api.post('/skype', request => {
let arr = [].concat.apply([], request.body),
skContextId = request.headers.contextid;
let skHandle = parsedMessage => {
... | 'use strict';
const skReply = require('./reply');
const skParse = require('./parse');
module.exports = function skSetup(api, bot, logError) {
api.post('/skype', request => {
let arr = [].concat.apply([], request.body),
skContextId = request.headers.contextid;
let skHandle = parsedMessage => {
... | Fix Skype postDeploy hook name | Fix Skype postDeploy hook name
| JavaScript | mit | IvanJov/claudia-bot-builder,claudiajs/claudia-bot-builder,jonjamz/claudia-bot-builder | ---
+++
@@ -20,7 +20,7 @@
.then(() => 'ok');
});
- api.addPostDeployStep('facebook', (options, lambdaDetails, utils) => {
+ api.addPostDeployStep('skype', (options, lambdaDetails, utils) => {
return utils.Promise.resolve().then(() => {
if (options['configure-skype-bot']) {
utils.Pro... |
ea70ec45b38ce982fd3ddf38fca5693018766306 | modules/ui/preset_favorite.js | modules/ui/preset_favorite.js | import {
event as d3_event,
select as d3_select
} from 'd3-selection';
import { t } from '../util/locale';
import { svgIcon } from '../svg';
export function uiPresetFavorite(preset, geom, context, klass) {
var presetFavorite = {};
var _button = d3_select(null);
presetFavorite.button = function... | import {
event as d3_event,
select as d3_select
} from 'd3-selection';
import { t } from '../util/locale';
import { svgIcon } from '../svg';
export function uiPresetFavorite(preset, geom, context, klass) {
var presetFavorite = {};
var _button = d3_select(null);
presetFavorite.button = function... | Update favorite preset button state automatically | Update favorite preset button state automatically
| JavaScript | isc | AndreasHae/iD,openstreetmap/iD,morray/iD,morray/iD,kartta-labs/iD,digidem/iD,digidem/iD,kartta-labs/iD,AndreasHae/iD,kartta-labs/iD,openstreetmap/iD,openstreetmap/iD,AndreasHae/iD | ---
+++
@@ -31,24 +31,24 @@
.merge(_button);
_button
- .classed('active', function() {
- return context.isFavoritePreset(preset, geom);
- })
.on('click', function () {
d3_event.stopPropagation();
d3_event.preve... |
4b7ad48004c7c7a26e79e031eb0032b208a24c51 | alexandria/static/js/services/domains.js | alexandria/static/js/services/domains.js | app.service('Domains', ['$rootScope', '$q', '$resource', '$log',
function($rootScope, $q, $resource, $log) {
var service = {};
return service;
}
]);
| app.service('Domains', ['$rootScope', '$q', '$resource', '$log',
function($rootScope, $q, $resource, $log) {
var service = {};
return service;
}
]);
app.factory('Domain', ['$resource', function($resource) {
return $resource('/domain/:id'{ id: '@_id' }, {
update: {
metho... | Add a new Domain factory that returns a $resource | Add a new Domain factory that returns a $resource
| JavaScript | isc | bertjwregeer/alexandria,cdunklau/alexandria,cdunklau/alexandria,cdunklau/alexandria,bertjwregeer/alexandria | ---
+++
@@ -6,3 +6,10 @@
}
]);
+app.factory('Domain', ['$resource', function($resource) {
+ return $resource('/domain/:id'{ id: '@_id' }, {
+ update: {
+ method: 'PUT'
+ }
+ });
+}]); |
3a55a3d40d59b5200a64df0f89d5297cdbbf13a2 | scripts/scheduleRun.js | scripts/scheduleRun.js | const initialize = require('../src/util/initialization.js')
const connectDatabase = require('../src/util/connectDatabase.js')
const ScheduleRun = require('../src/structs/ScheduleRun.js')
const setConfig = require('../src/config.js').set
async function testScheduleRun (userConfig) {
let config = setConfig(userConfig)... | const initialize = require('../src/util/initialization.js')
const connectDatabase = require('../src/util/connectDatabase.js')
const ScheduleRun = require('../src/structs/ScheduleRun.js')
const setConfig = require('../src/config.js').set
async function testScheduleRun (userConfig, callback) {
let config = setConfig(u... | Use callbacks for run schedule script (node exit before resolve) | Use callbacks for run schedule script (node exit before resolve)
| JavaScript | mit | synzen/Discord.RSS,synzen/Discord.RSS | ---
+++
@@ -3,7 +3,7 @@
const ScheduleRun = require('../src/structs/ScheduleRun.js')
const setConfig = require('../src/config.js').set
-async function testScheduleRun (userConfig) {
+async function testScheduleRun (userConfig, callback) {
let config = setConfig(userConfig)
config = setConfig({
...confi... |
819eb850191f68dc8667925a667f6763b2292347 | app/routes/project/tasks/task.js | app/routes/project/tasks/task.js | import Ember from 'ember';
const {
Route,
inject: { service }
} = Ember;
export default Route.extend({
currentUser: service(),
model(params) {
let projectId = this.modelFor('project').id;
let { number } = params;
return this.store.queryRecord('task', { projectId, number });
},
setupControll... | import Ember from 'ember';
const {
Route,
inject: { service }
} = Ember;
export default Route.extend({
currentUser: service(),
model(params) {
let projectId = this.modelFor('project').id;
let { number } = params;
return this.store.queryRecord('task', { projectId, number });
},
setupControll... | Simplify comments list behavior so API requests are consistent with other types of records. | Simplify comments list behavior so API requests are consistent with other types of records.
| JavaScript | mit | code-corps/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember,jderr-mx/code-corps-ember | ---
+++
@@ -18,7 +18,7 @@
setupController(controller, task) {
let user = this.get('currentUser.user');
let newComment = this.store.createRecord('comment', { user });
- return controller.setProperties({ newComment, task });
+ controller.setProperties({ newComment, task });
},
actions: { |
16de6e07a35f53bb580d3d912802a22c4b63020b | problems/kata/001-todo-backend/001/app.js | problems/kata/001-todo-backend/001/app.js | var express = require('express');
var cors = require('cors');
var bodyParser = require('body-parser');
var nano = require('nano')('http://localhost:5984');
var todo = nano.db.use('todo');
var app = express();
app.use(cors());
app.use(bodyParser.json());
app.get('/', function(req, res, next) {
console.log('get trig... | var express = require('express');
var cors = require('cors');
var bodyParser = require('body-parser');
var nano = require('nano')('http://localhost:5984');
var todo = nano.db.use('todo');
var app = express();
app.use(cors());
app.use(bodyParser.json());
app.get('/', function(req, res, next) {
console.log('get trig... | Delete now deletes from database (4/16). | Delete now deletes from database (4/16).
| JavaScript | mit | PurityControl/uchi-komi-js | ---
+++
@@ -32,6 +32,11 @@
app.delete('/', function(req, res, next) {
console.log('delete triggered');
+ todo.view('todos', 'all_todos', function(err, body) {
+ for (var row of body.rows) {
+ todo.destroy(row.value._id, row.value._rev);
+ }
+ });
res.json([]);
});
|
f9c6f64e390cdc09ab8a3f9bb28923d6cd2b6af6 | src/@data/withHomeFeed/homeFeedQuery.js | src/@data/withHomeFeed/homeFeedQuery.js | import gql from 'graphql-tag';
const contentFragment = gql`
fragment ContentForFeed on Content {
entryId: id
title
channelName
status
meta {
siteId
date
channelId
}
parent {
entryId: id
content {
isLight
colors {
value
desc... | import gql from 'graphql-tag';
const contentFragment = gql`
fragment ContentForFeed on Content {
entryId: id
title
channelName
status
meta {
siteId
date
channelId
}
parent {
entryId: id
content {
isLight
colors {
value
desc... | Remove $options from userFeed query | Remove $options from userFeed query
| JavaScript | mit | NewSpring/Apollos,NewSpring/Apollos,NewSpring/Apollos,NewSpring/Apollos,NewSpring/Apollos,NewSpring/Apollos | ---
+++
@@ -40,8 +40,8 @@
`;
export default gql`
- query HomeFeed($filters: [String]!, $options: String!, $limit: Int!, $skip: Int!, $cache: Boolean!) {
- feed: userFeed(filters: $filters, options: $options, limit: $limit, skip: $skip, cache: $cache) {
+ query HomeFeed($filters: [String]!, $limit: Int!, $ski... |
26bf7f873ecc19b7af2feb705ef63a00b9eed484 | src/content-script.js | src/content-script.js | /* global tabID */
"use strict";
const existingIframe = document.querySelector("iframe#dom-distiller-result-iframe");
if(existingIframe) {
existingIframe.remove();
} else {
const iframe = document.createElement("iframe");
iframe.src = chrome.runtime.getURL("dom-distiller/html/dom_distiller_viewer.html") + "... | /* global tabID */
"use strict";
var iframeID = "dom-distiller-result-iframe";
var existingIframe = document.getElementById(iframeID);
if(existingIframe) {
existingIframe.remove();
if("old" in window) {
document.title = window.old.title;
document.body.setAttribute("style", window.old.bodyStyle);... | Remove iframe and restore from hiding style | Remove iframe and restore from hiding style
| JavaScript | mit | metarmask/dom-distiller-reading-mode,metarmask/dom-distiller-reading-mode | ---
+++
@@ -1,10 +1,21 @@
/* global tabID */
"use strict";
-const existingIframe = document.querySelector("iframe#dom-distiller-result-iframe");
+var iframeID = "dom-distiller-result-iframe";
+var existingIframe = document.getElementById(iframeID);
if(existingIframe) {
existingIframe.remove();
+ if("old" i... |
f38a7692254a981ef1f761a41e76c88cd72355a7 | linkedin_client.js | linkedin_client.js | // Meteor.loginWithLinkedin = function (options, callback) {
// var credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(callback);
// LinkedIn.requestCredential(options, credentialRequestCompleteCallback);
// };
Meteor.loginWithLinkedIn = function(options, callback) {
// suppo... | // Meteor.loginWithLinkedin = function (options, callback) {
// var credentialRequestCompleteCallback = Accounts.oauth.credentialRequestCompleteHandler(callback);
// LinkedIn.requestCredential(options, credentialRequestCompleteCallback);
// };
Meteor.loginWithLinkedIn = function(options, callback) {
// suppo... | Add new capitalized version of loging in with linked in | Add new capitalized version of loging in with linked in | JavaScript | mit | PoBuchi/meteor-accounts-linkedin,PauliBuccini/meteor-accounts-linkedin | ---
+++
@@ -13,3 +13,5 @@
LinkedIn.requestCredential(options, credentialRequestCompleteCallback);
};
+ // Make it work with 0.9.3
+ Meteor.loginWithLinkedin = Meteor.loginWithLinkedIn; |
8e7f0194c0e97bebf62ac9a0af8f2b6d497347a0 | server/publications.js | server/publications.js | Meteor.publish('journalEntries', function (limit, skip) {
var filter = {}
var options = {
fields: {
'title': 1,
'teaser': 1,
'published': 1,
'createdAt': 1
},
sort: [['createdAt', 'desc']]
}
if(limit) options.limit = limit
if(skip) options.skip = skip
if(!this.userId) fil... | Meteor.publish('journalEntries', function (limit, skip) {
var filter = {}
var options = {
fields: {
'title': 1,
'teaser': 1,
'published': 1,
'createdAt': 1
},
sort: [['published', 'asc'], ['createdAt', 'desc']]
}
if(limit) options.limit = limit
if(skip) options.skip = skip
... | Sort the journal entries, so that unpublished entries are on top | Sort the journal entries, so that unpublished entries are on top
| JavaScript | mit | Kriegslustig/kriegslustig.me,Kriegslustig/kriegslustig.me,Kriegslustig/kriegslustig.me | ---
+++
@@ -7,7 +7,7 @@
'published': 1,
'createdAt': 1
},
- sort: [['createdAt', 'desc']]
+ sort: [['published', 'asc'], ['createdAt', 'desc']]
}
if(limit) options.limit = limit
if(skip) options.skip = skip |
83a7b99a5023bb137e99d9a430754c7411c53c9a | web/main.js | web/main.js | CenterScout.config(function($routeProvider) {
$routeProvider.when('/', {
controller: 'HomeController',
templateUrl: 'views/home.html'
});
$routeProvider.when('/home', {
controller: 'HomeController',
templateUrl: 'views/home.html'
});
$routeProvider.when('/class', {
... | CenterScout.config(function($routeProvider) {
$routeProvider.when('/', {
controller: 'HomeController',
templateUrl: 'views/home.html'
});
$routeProvider.when('/home', {
controller: 'HomeController',
templateUrl: 'views/home.html'
});
$routeProvider.when('/class', {
... | Change 404 route to index | Change 404 route to index
| JavaScript | mit | LFHS/CenterScout | ---
+++
@@ -25,7 +25,7 @@
});
$routeProvider.otherwise({
- redirectTo: '/404'
+ redirectTo: '/'
});
});
|
1b962f46de8797d7cd6a7b4ca934f4adb07fc601 | test/buster.js | test/buster.js | var config = module.exports;
config["fruitmachine"] = {
rootPath: '../',
environment: "browser",
sources: [
'build/fruitmachine.js',
'node_modules/hogan.js/lib/template.js',
'node_modules/hogan.js/lib/compiler.js',
'test/helpers/*.js'
],
tests: [
'test/tests/*.js'
]
};
| var config = module.exports;
config["fruitmachine"] = {
rootPath: '../',
environment: "browser",
sources: [
'build/fruitmachine.min.js',
'node_modules/hogan.js/lib/template.js',
'node_modules/hogan.js/lib/compiler.js',
'test/helpers/*.js'
],
tests: [
'test/tests/*.js'
]
};
| Use min version in test to make sure no compilation errors exist | Use min version in test to make sure no compilation errors exist
| JavaScript | mit | quarterto/fruitmachine,ftlabs/fruitmachine,quarterto/fruitmachine | ---
+++
@@ -4,7 +4,7 @@
rootPath: '../',
environment: "browser",
sources: [
- 'build/fruitmachine.js',
+ 'build/fruitmachine.min.js',
'node_modules/hogan.js/lib/template.js',
'node_modules/hogan.js/lib/compiler.js',
'test/helpers/*.js' |
7d511728d0b9dfcf440dfede353e27a38d79ea56 | share/spice/brainy_quote/brainy_quote.js | share/spice/brainy_quote/brainy_quote.js | function ddg_spice_brainy_quote (api_result) {
if (api_result.error) return;
Spice.render({
data : api_result,
force_big_header : true,
header1 : api_result.header1,
source_name : api_result.source_name, // More at ...
source_url ... | function ddg_spice_brainy_quote (api_result) {
if (api_result.error) return;
// Check if the result is a category search or not.
// We'll know that if the author is specified in the JSON response.
if(api_result.author) {
return;
}
Spice.render({
data : api_result,
... | Check if the result is a category or not. | BrainyQuote: Check if the result is a category or not.
Queries such as "quote mining", "financial quotations", or "lame quotes" should not show up.
| JavaScript | apache-2.0 | levaly/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,P71/zeroclickinfo-spice,digit4lfa1l... | ---
+++
@@ -1,5 +1,11 @@
function ddg_spice_brainy_quote (api_result) {
if (api_result.error) return;
+
+ // Check if the result is a category search or not.
+ // We'll know that if the author is specified in the JSON response.
+ if(api_result.author) {
+ return;
+ }
Spice.render({
... |
72d5d878435d13c67a8ef6c4148a9e28e13abbfa | app/assets/javascripts/ministerSelect.js | app/assets/javascripts/ministerSelect.js | //= require jquery.autocomplete
(function ($) {
$.fn.ministerSelect = function (options) {
var settings = $.extend({
inputClass: 'minister-select-input'
}, options);
return this.each(function () {
var $select = $(this),
$input = $('<input type="text... | //= require jquery.autocomplete
(function ($) {
$.fn.ministerSelect = function (options) {
var settings = $.extend({
inputClass: 'minister-select-input'
}, options);
return this.each(function () {
var $select = $(this),
$input = $('<input type="text... | Use the autocomplete lookup instead of traversing DOM elements | Use the autocomplete lookup instead of traversing DOM elements
| JavaScript | mit | ministryofjustice/parliamentary-questions,ministryofjustice/parliamentary-questions,ministryofjustice/parliamentary-questions,ministryofjustice/parliamentary-questions,ministryofjustice/parliamentary-questions | ---
+++
@@ -32,13 +32,13 @@
// when the input changes, the relevant select option has to be chosen
$input.on('change', function () {
- var text = $(this).val(),
- options = $select.find('option').filter(function () {
- return $(this)... |
9a340fa1ae05181b2dc2803cb485bbdcdf43ea0a | src/components/explorer/results/QueryResultsSelector.js | src/components/explorer/results/QueryResultsSelector.js | import PropTypes from 'prop-types';
import React from 'react';
class QueryResultsSelector extends React.Component {
state = {
selectedQueryIndex: 0,
}
render() {
const { options, onQuerySelected } = this.props;
if (options.length === 1) {
// if only one query don't show option to switch between... | import PropTypes from 'prop-types';
import React from 'react';
import { trimToMaxLength } from '../../../lib/stringUtil';
class QueryResultsSelector extends React.Component {
state = {
selectedQueryIndex: 0,
}
render() {
const { options, onQuerySelected } = this.props;
if (options.length === 1) {
... | Trim tab size for readability | Trim tab size for readability
| JavaScript | apache-2.0 | mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools | ---
+++
@@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
+import { trimToMaxLength } from '../../../lib/stringUtil';
class QueryResultsSelector extends React.Component {
state = {
@@ -26,7 +27,7 @@
onQuerySelected(q.index);
}}
>
- ... |
8e963c3216b074b979e7c4cf0c8f7a7bdc730590 | test/common.js | test/common.js | var warned = false
function testCommon (options) {
var factory = options.factory
var test = options.test
var clear = !!options.clear
if (typeof factory !== 'function') {
throw new TypeError('factory must be a function')
}
if (typeof test !== 'function') {
throw new TypeError('test must be a funct... | function testCommon (options) {
var factory = options.factory
var test = options.test
if (typeof factory !== 'function') {
throw new TypeError('factory must be a function')
}
if (typeof test !== 'function') {
throw new TypeError('test must be a function')
}
return {
test: test,
factory:... | Remove process.emitWarning because it breaks AppVeyor builds | Remove process.emitWarning because it breaks AppVeyor builds
See Level/leveldown#660
| JavaScript | mit | Level/abstract-leveldown | ---
+++
@@ -1,9 +1,6 @@
-var warned = false
-
function testCommon (options) {
var factory = options.factory
var test = options.test
- var clear = !!options.clear
if (typeof factory !== 'function') {
throw new TypeError('factory must be a function')
@@ -11,15 +8,6 @@
if (typeof test !== 'functio... |
994bff56468a68e780be77c262fbc2271232db45 | lit-config.js | lit-config.js | module.exports = {
"extends": "./index.js",
"parser": "babel-eslint",
"env": {
"browser": true
},
"plugins": [
"lit", "html"
],
"globals": {
"D2L": false,
"Promise": false
},
"rules": {
"strict": [2, "never"],
"lit/no-duplicate-template-bindings": 2,
"lit/no-legacy-template... | module.exports = {
"extends": "./index.js",
"parser": "babel-eslint",
"env": {
"browser": true
},
"plugins": [
"lit", "html"
],
"globals": {
"D2L": false,
"Promise": false
},
"rules": {
"no-var": 2,
"prefer-const": 2,
"strict": [2, "never"],
"lit/no-duplicate-template-b... | Add const and var rules to lit config | Add const and var rules to lit config
| JavaScript | apache-2.0 | Brightspace/eslint-config-brightspace | ---
+++
@@ -12,6 +12,8 @@
"Promise": false
},
"rules": {
+ "no-var": 2,
+ "prefer-const": 2,
"strict": [2, "never"],
"lit/no-duplicate-template-bindings": 2,
"lit/no-legacy-template-syntax": 2, |
6af4c07efaeeeb1efd3a78b0b6d8de5327e41276 | app/webroot/js/sentences.show_another.js | app/webroot/js/sentences.show_another.js | /**
* Tatoeba Project, free collaborative creation of multilingual corpuses project
* Copyright (C) 2009 HO Ngoc Phuong Trang <tranglich@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Sof... | /**
* Tatoeba Project, free collaborative creation of multilingual corpuses project
* Copyright (C) 2009 HO Ngoc Phuong Trang <tranglich@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Sof... | Fix sentence buttons on reloaded random sentence | Fix sentence buttons on reloaded random sentence
Closes #1658.
| JavaScript | agpl-3.0 | Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2 | ---
+++
@@ -37,7 +37,7 @@
type: "GET",
url: "/sentences/random/" + lang,
success: function (data){
- $("#random_sentence_display").html(data);
+ $("#random_sentence_display").watch("html", data);
$("#random-progress").hide();
$("#random_sentence_display").... |
fa72546b7d7b509b83c615ff23b5c73b55dfc450 | catwatch/assets/scripts/entry.js | catwatch/assets/scripts/entry.js | var moment = require('moment');
var coupon = require('./coupon');
var stripe = require('./stripe');
var BulkDelete = require('./bulk-delete');
var faye = require('./faye');
$(document).ready(function () {
coupon();
stripe();
var bulk_delete = new BulkDelete();
bulk_delete.listenForEvents();
if (... | var moment = require('moment');
var coupon = require('./coupon');
var stripe = require('./stripe');
var BulkDelete = require('./bulk-delete');
var faye = require('./faye');
$(document).ready(function () {
coupon();
stripe();
var bulk_delete = new BulkDelete();
bulk_delete.listenForEvents();
if (... | Add timezone output to the momentjs dates | Add timezone output to the momentjs dates
| JavaScript | mit | nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,nickjj/build-a-saas-app-with-flask,z123/build-a-saas-app-with-flask | ---
+++
@@ -20,7 +20,7 @@
(function updateTime() {
var time = moment($(e).data('datetime'));
$(e).text(time.fromNow());
- $(e).attr('title', time.format('MMMM Do YYYY, h:mm:ss a'));
+ $(e).attr('title', time.format('MMMM Do YYYY, h:mm:ss a Z'));
se... |
7b884fab3cc68b07f9e53edb69d014b1aeca46c2 | .eslintrc.js | .eslintrc.js | var path = require('path');
module.exports = {
env: {
es6: true,
browser: true,
node: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 7,
ecmaFeatures: {
impliedStrict: true,
experimentalObjectRestSpread: true,
},
},
globals: {
__version: true,
__co... | var path = require('path');
module.exports = {
env: {
es6: true,
browser: true,
node: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 7,
ecmaFeatures: {
impliedStrict: true,
experimentalObjectRestSpread: true,
},
},
globals: {
__version: true,
__co... | Fix eslint import resolver path. | Fix eslint import resolver path.
| JavaScript | mit | mrpau/kolibri,jonboiser/kolibri,learningequality/kolibri,lyw07/kolibri,DXCanas/kolibri,lyw07/kolibri,mrpau/kolibri,benjaoming/kolibri,learningequality/kolibri,DXCanas/kolibri,christianmemije/kolibri,indirectlylit/kolibri,benjaoming/kolibri,christianmemije/kolibri,mrpau/kolibri,jonboiser/kolibri,mrpau/kolibri,indirectly... | ---
+++
@@ -30,7 +30,9 @@
plugins: ['import', 'vue'],
settings: {
'import/resolver': {
- [path.resolve('./frontend_build/src/alias_import_resolver.js')]: {
+ [path.resolve(
+ path.join(path.dirname(__filename), './frontend_build/src/alias_import_resolver.js')
+ )]: {
extensio... |
77bba0f59fc33dd9de6875e63a7261bc156d5de5 | app/scripts/components/auth/auth-init.js | app/scripts/components/auth/auth-init.js | import template from './auth-init.html';
export const authInit = {
template,
controller: class AuthInitController {
constructor(usersService, $state, ENV, ncUtilsFlash) {
// @ngInject
this.usersService = usersService;
this.$state = $state;
this.ncUtilsFlash = ncUtilsFlash,
this.us... | import template from './auth-init.html';
export const authInit = {
template,
controller: class AuthInitController {
constructor(usersService, $state, ENV, ncUtilsFlash) {
// @ngInject
this.usersService = usersService;
this.$state = $state;
this.ncUtilsFlash = ncUtilsFlash,
this.us... | Copy user before update (WAl-383) | Copy user before update (WAl-383)
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -15,7 +15,7 @@
$onInit() {
this.loading = true;
this.usersService.getCurrentUser().then(user => {
- this.user = user;
+ this.user = angular.copy(user);
}).finally(() => {
this.loading = false;
}); |
e3df78442ee404e23a4683d4973bef29770f5609 | .eslintrc.js | .eslintrc.js | module.exports = {
extends: "eslint:recommended",
rules: {
"no-console": 0,
quotes: ["error", "backtick"],
semi: ["error", "never"]
},
env: {
node: true,
es6: true
},
parserOptions: {
ecmaFeatures: {
modules: "true"
},
sourceType: "module"
}
}
| module.exports = {
extends: "eslint:recommended",
rules: {
"no-console": 0,
"object-curly-spacing": ["error", "always"],
"comma-dangle": [
"error",
{
arrays: "always-multiline",
objects: "always-multiline",
imports: "always-multiline",
exports: "always-multili... | Configure ESLint to support ES2017 | Configure ESLint to support ES2017
| JavaScript | mit | mattdean1/contentful-text-search | ---
+++
@@ -2,17 +2,25 @@
extends: "eslint:recommended",
rules: {
"no-console": 0,
+ "object-curly-spacing": ["error", "always"],
+ "comma-dangle": [
+ "error",
+ {
+ arrays: "always-multiline",
+ objects: "always-multiline",
+ imports: "always-multiline",
+ expo... |
98ad4755ebcc123aa4a18441d8252dccef3d08c1 | .eslintrc.js | .eslintrc.js | module.exports = {
"env": {
"es6": true,
"node": true
},
"plugins": ["node"],
"extends": ["eslint:recommended", "plugin:node/recommended"],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"... | module.exports = {
"env": {
"es6": true,
"node": true
},
"plugins": ["node"],
"extends": ["eslint:recommended", "plugin:node/recommended"],
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2, {
"MemberExpression": 2
}
],
"linebr... | Add eslint rule for js2-mode | Add eslint rule for js2-mode
| JavaScript | apache-2.0 | fluent/fluent-logger-node | ---
+++
@@ -11,7 +11,9 @@
"rules": {
"indent": [
"error",
- 2
+ 2, {
+ "MemberExpression": 2
+ }
],
"linebreak-style": [
"error", |
9774591c0e0b1bd216332dea056ad6ca1c1d782b | src/converter/r2t/WrapAbstractContent.js | src/converter/r2t/WrapAbstractContent.js | import { unwrapChildren } from '../util/domHelpers'
const ABSTRACT_META = ['object-id','sec-meta', 'label', 'title'].reduce((m, n) => { m[n] = true; return m}, {})
const ABSTRACT_BACK = ['notes','fn-group','glossary','ref-list'].reduce((m, n) => { m[n] = true; return m}, {})
export default class WrapAbstractContent {... | import { unwrapChildren } from '../util/domHelpers'
const ABSTRACT_META = ['object-id','sec-meta', 'label', 'title'].reduce((m, n) => { m[n] = true; return m}, {})
const ABSTRACT_BACK = ['notes','fn-group','glossary','ref-list'].reduce((m, n) => { m[n] = true; return m}, {})
export default class WrapAbstractContent {... | Make sure that there is at least one p inside abstract. | Make sure that there is at least one p inside abstract.
| JavaScript | mit | substance/texture,substance/texture | ---
+++
@@ -24,6 +24,12 @@
})
abstract.empty()
abstract.append(meta)
+
+ // Make sure that there is at least one paragraph inside the abstract
+ if (content.length === 0) {
+ content.push(dom.createElement('p'))
+ }
+
abstract.append(dom.createElement('abstract-conten... |
8b2611a84cb507c68b89f36cf0f241a778b73f73 | tilehandler.js | tilehandler.js | var app = require('server'),
tl = require('tl');
app.get('/:scheme/:mapfile_64/:z/:x/:y.*', function(req, res) {
/*
* scheme: (xyz|tms|tile (tms))
*
* format:
* - Tile: (png|jpg)
* - Data Tile: (geojson)
* - Grid Tile: (*.grid.json)
*/
try {
var tile = new tl.Tile... | var app = require('server'),
_ = require('underscore')._,
tl = require('tl');
app.get('/:scheme/:mapfile_64/:z/:x/:y.*', function(req, res) {
/*
* scheme: (xyz|tms|tile (tms))
*
* format:
* - Tile: (png|jpg)
* - Data Tile: (geojson)
* - Grid Tile: (*.grid.json)
*/
try... | Add missing require for underscore. | Add missing require for underscore.
| JavaScript | bsd-3-clause | tomhughes/tilelive.js,mapbox/tilelive,paulovieira/tilelive,mapbox/tilelive.js,kyroskoh/tilelive,topwood/tilelive,gravitystorm/tilelive.js,nyurik/tilelive.js,Norkart/tilelive.js | ---
+++
@@ -1,4 +1,5 @@
var app = require('server'),
+ _ = require('underscore')._,
tl = require('tl');
app.get('/:scheme/:mapfile_64/:z/:x/:y.*', function(req, res) { |
8e2b2c414dd01aaa69a3cb1de4d7e5f838759c90 | src/database/DataTypes/TemperatureLog.js | src/database/DataTypes/TemperatureLog.js | /**
* Sustainable Solutions (NZ) Ltd. 2020
* mSupply Mobile
*/
import Realm from 'realm';
export class TemperatureLog extends Realm.Object {}
TemperatureLog.schema = {
name: 'TemperatureLog',
primaryKey: 'id',
properties: {
id: 'string',
temperature: 'double',
timestamp: 'date',
location: 'L... | /**
* Sustainable Solutions (NZ) Ltd. 2020
* mSupply Mobile
*/
import Realm from 'realm';
export class TemperatureLog extends Realm.Object {}
TemperatureLog.schema = {
name: 'TemperatureLog',
primaryKey: 'id',
properties: {
id: 'string',
temperature: 'double',
timestamp: 'date',
location: 'L... | Add update optional breach field | Add update optional breach field
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | ---
+++
@@ -15,7 +15,7 @@
temperature: 'double',
timestamp: 'date',
location: 'Location',
- breach: 'BreachLog',
+ breach: { type: 'BreachLog', optional: true },
},
};
|
5e3f0f88317e8c4dea16e2b60fecb911d73ce261 | code/js/controllers/SpotifyController.js | code/js/controllers/SpotifyController.js | ;(function() {
"use strict";
var BaseController = require("BaseController");
new BaseController({
siteName: "Spotify",
playPause: "[title='Pause'],[title='Play']",
playNext: "[title='Next']",
playPrev: "[title='Previous']",
playState: "[title='Pause']",
song: ".now-playing-bar div div [... | ;(function() {
"use strict";
var BaseController = require("BaseController"),
_ = require("lodash");
var multiSelectors = {
playPause: ["#play-pause", "#play", "[title='Pause'],[title='Play']"],
playNext: ["#next", "#next", "[title='Next']"],
playPrev: ["#previous", "#previous", "[title='Previo... | Fix spotify for older player versions. | Fix spotify for older player versions.
| JavaScript | mit | nemchik/streamkeys,nemchik/streamkeys,nemchik/streamkeys,ovcharik/streamkeys,ovcharik/streamkeys,alexesprit/streamkeys,berrberr/streamkeys,berrberr/streamkeys,berrberr/streamkeys,alexesprit/streamkeys | ---
+++
@@ -1,16 +1,38 @@
;(function() {
"use strict";
- var BaseController = require("BaseController");
+ var BaseController = require("BaseController"),
+ _ = require("lodash");
- new BaseController({
- siteName: "Spotify",
- playPause: "[title='Pause'],[title='Play']",
- playNext: "[title=... |
fb3f71b4e38d2d6196d2f157f30fd99188a29184 | src/react-redux.js | src/react-redux.js | /* @flow strict-local */
import type { ComponentType, ElementConfig } from 'react';
import { connect as connectInner } from 'react-redux';
import type { GlobalState } from './types';
export const connect: <
C: ComponentType<*>,
// S == GlobalState
SP: {},
RSP: {},
CP: $Diff<$Diff<ElementConfig<C>, { dispatc... | /* @flow strict-local */
import type { ComponentType, ElementConfig } from 'react';
import { connect as connectInner } from 'react-redux';
import type { GlobalState } from './types';
export const connect: <
C: ComponentType<*>,
// S == GlobalState
SP: {},
RSP: {},
CP: $Diff<$Diff<ElementConfig<C>, { dispatc... | Add a "fixme" version, `connectFlowFixMe`. | connect: Add a "fixme" version, `connectFlowFixMe`.
| JavaScript | apache-2.0 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile | ---
+++
@@ -14,3 +14,19 @@
>(
mapStateToProps?: (GlobalState, SP) => RSP,
) => C => ComponentType<CP & SP> = mapStateToProps => connectInner(mapStateToProps);
+
+/**
+ * DEPRECATED. Don't add new uses; and PRs to remove existing uses are welcome.
+ *
+ * This is exactly like `connect` except with type-checking ... |
11a944cb7881db56137e826c3529f2ccca5c226e | app/assets/javascripts/lesson_plan.js | app/assets/javascripts/lesson_plan.js | function LessonPlanEntryFormType(pickers) {
var self = this;
this.pickers = pickers;
pickers.forEach(function(picker) {
picker.onSelectionCompleted = function() { self.doneCallback.apply(self, arguments); }
});
}
LessonPlanEntryFormType.prototype.pick = function() {
var $modal = $('<div class="modal hide... | $(document).ready(function() {
function LessonPlanEntryFormType(pickers) {
var self = this;
this.pickers = pickers;
pickers.forEach(function(picker) {
picker.onSelectionCompleted = function() { self.doneCallback.apply(self, arguments); }
});
}
LessonPlanEntryFormType.prototype.pick = functi... | Define the lesson plan form type only on page load. | Define the lesson plan form type only on page load.
| JavaScript | mit | dariusf/coursemology.org,allenwq/coursemology.org,nnamon/coursemology.org,dariusf/coursemology.org,Coursemology/coursemology.org,dariusf/coursemology.org,nusedutech/coursemology.org,allenwq/coursemology.org,allenwq/coursemology.org,nnamon/coursemology.org,nusedutech/coursemology.org,nusedutech/coursemology.org,Coursemo... | ---
+++
@@ -1,34 +1,34 @@
-function LessonPlanEntryFormType(pickers) {
- var self = this;
- this.pickers = pickers;
- pickers.forEach(function(picker) {
- picker.onSelectionCompleted = function() { self.doneCallback.apply(self, arguments); }
- });
-}
+$(document).ready(function() {
+ function LessonPlanEntryF... |
292b7df5a8da7e74a1979e781ecf7a377da2876e | app/assets/javascripts/radioSlider.js | app/assets/javascripts/radioSlider.js | (function(global) {
"use strict";
global.GOVUK.Modules.RadioSlider = function() {
this.start = function(component) {
$(component)
.on('click', function() {
leftRight = $(this).find(':checked').next('label').text().split('/');
if (leftRight.length === 2) {
$(th... | (function(global) {
"use strict";
global.GOVUK.Modules.RadioSlider = function() {
this.start = function(component) {
$(component)
.on('click', function() {
valuesInLabel = $(this).find(':checked').next('label').text().split('/');
if (valuesInLabel.length === 2) {
... | Add named variables for clarity | Add named variables for clarity
| JavaScript | mit | alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin | ---
+++
@@ -9,11 +9,13 @@
$(component)
.on('click', function() {
- leftRight = $(this).find(':checked').next('label').text().split('/');
+ valuesInLabel = $(this).find(':checked').next('label').text().split('/');
- if (leftRight.length === 2) {
- $(this).find(... |
e45315ab54b014c5a4f529c22000ba0213cb376a | karma.conf.js | karma.conf.js | module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'dest/taggd.js',
'tests/functions.js',
'tests/units/*.js',
'tests/behavior/*.js',
{
pattern: 'tests/assets/**/*.jpg',
watched: false,
included: false,
... | module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
'dist/taggd.js',
'tests/functions.js',
'tests/units/*.js',
'tests/behavior/*.js',
{
pattern: 'tests/assets/**/*.jpg',
watched: false,
included: false,
... | Fix destination paths for tests | Fix destination paths for tests
| JavaScript | mit | timseverien/taggd,timseverien/taggd | ---
+++
@@ -3,7 +3,7 @@
basePath: '',
frameworks: ['jasmine'],
files: [
- 'dest/taggd.js',
+ 'dist/taggd.js',
'tests/functions.js',
'tests/units/*.js',
'tests/behavior/*.js',
@@ -25,7 +25,7 @@
singleRun: true,
concurrency: Infinity,
preprocessors: {
- ... |
770d2ce95f6dfcb557e4591eeee97cd96de191e1 | karma.conf.js | karma.conf.js | const webpack = require('./webpack.config')
module.exports = config => {
config.set({
frameworks: ['mocha', 'chai'],
files: [
{ pattern: 'test/components/*.js', watched: false }
],
preprocessors: {
'test/components/*.js': ['webpack']
},
webpack,
webpackMiddleware: {
stat... | const webpack = require('./webpack.config')
process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = config => {
config.set({
frameworks: ['mocha', 'chai'],
files: ['test/components/index.js', 'test/components/*.js'],
preprocessors: {
'test/components/*.js': ['webpack']
}... | Switch to headless chrome from chrome | Switch to headless chrome from chrome
| JavaScript | mit | sunya9/beta,sunya9/beta,sunya9/beta | ---
+++
@@ -1,11 +1,10 @@
const webpack = require('./webpack.config')
+process.env.CHROME_BIN = require('puppeteer').executablePath()
module.exports = config => {
config.set({
frameworks: ['mocha', 'chai'],
- files: [
- { pattern: 'test/components/*.js', watched: false }
- ],
+ files: ['test... |
408d4ecbd40aaf1de9ed439a1652606e0030acf5 | spec/bin/jasmine_spec.js | spec/bin/jasmine_spec.js | import path from 'path';
import {exec} from 'node-promise-es6/child-process';
async function cli(fixture, env = null) {
const child = await exec(
'jasmine',
{
cwd: path.resolve(`fixtures/${fixture}`),
env: Object.assign({}, process.env, env)
}
);
return child.stdout;
}
describe('jasmine-... | import path from 'path';
import {exec} from 'node-promise-es6/child-process';
async function cli(fixture, env = null) {
const child = await exec(
'jasmine',
{
cwd: path.resolve(__dirname, `../../fixtures/${fixture}`),
env: Object.assign({}, process.env, env)
}
);
return child.stdout;
}
d... | Remove calls to `path.resolve` with no root directory | Remove calls to `path.resolve` with no root directory
| JavaScript | mit | vinsonchuong/jasmine-es6,dongtong/jasmine-es6 | ---
+++
@@ -5,7 +5,7 @@
const child = await exec(
'jasmine',
{
- cwd: path.resolve(`fixtures/${fixture}`),
+ cwd: path.resolve(__dirname, `../../fixtures/${fixture}`),
env: Object.assign({}, process.env, env)
}
); |
a42a841fca52fc2dec520329ef1c32a97ab2dece | app/services/passwordCheckService.js | app/services/passwordCheckService.js | var app = angular.module("AdmissionsApp");
app.service("PasswordCheckService", ["$http", function ($http) {
var submitBaseUrl = "http://admissions.vschool.io/api/part";
this.checkPassword = function (password, partNumber) {
var submitData = {answer: password};
return $http.post(submitBaseUrl +... | var app = angular.module("AdmissionsApp");
app.service("PasswordCheckService", ["$http", function ($http) {
var submitBaseUrl = "http://admissions-qa.vschool.io/api/part";
this.checkPassword = function (password, partNumber) {
var submitData = {answer: password};
return $http.post(submitBaseUr... | Change subdomain to reflect that it's in a testing period still | Change subdomain to reflect that it's in a testing period still
| JavaScript | mit | bobziroll/admissions,bobziroll/admissions | ---
+++
@@ -1,7 +1,7 @@
var app = angular.module("AdmissionsApp");
app.service("PasswordCheckService", ["$http", function ($http) {
- var submitBaseUrl = "http://admissions.vschool.io/api/part";
+ var submitBaseUrl = "http://admissions-qa.vschool.io/api/part";
this.checkPassword = function (password,... |
034d845f47267d70a412dc98ea81e8bb3ab27d38 | mzalendo/map/static/js/map-drilldown.js | mzalendo/map/static/js/map-drilldown.js | (function () {
function initialize_map() {
var map_element = document.getElementById("map-drilldown-canvas");
if (!map_element) return false;
// start with the default bounds for kenya
var map_bounds = {
north: 5,
east: 44,
south: -5,
west: 33.5
};
var map_has_be... | (function () {
function initialize_map() {
var map_element = document.getElementById("map-drilldown-canvas");
if (!map_element) return false;
// start with the default bounds for kenya
var map_bounds = {
north: 5,
east: 44,
south: -5,
west: 33.5
};
var map_has_be... | Enable map controls, switch to terrain view | Enable map controls, switch to terrain view
| JavaScript | agpl-3.0 | mysociety/pombola,mysociety/pombola,hzj123/56th,patricmutwiri/pombola,hzj123/56th,geoffkilpin/pombola,geoffkilpin/pombola,patricmutwiri/pombola,geoffkilpin/pombola,mysociety/pombola,patricmutwiri/pombola,hzj123/56th,hzj123/56th,ken-muturi/pombola,mysociety/pombola,ken-muturi/pombola,ken-muturi/pombola,mysociety/pombola... | ---
+++
@@ -16,8 +16,7 @@
var map_has_been_located = false;
var myOptions = {
- mapTypeId: google.maps.MapTypeId.ROADMAP,
- disableDefaultUI: true,
+ mapTypeId: google.maps.MapTypeId.TERRAIN,
maxZoom: 10
};
|
f6278a3b08f23637bfc3d848f864dc971cfa94ce | lib/Events.js | lib/Events.js | module.exports = {
on: function(name, callback, context) {
var events = this._getEvents(name) || [];
this._events[name] = events.concat({
callback: callback,
context: context || this
});
return this;
},
off: function(name, callback, context) {
if (callback) {
var events = ... | var events = {};
function getEvents(name) {
events[name] = events[name] || [];
return events[name];
}
function setEvents(name, newEvents) {
events[name] = newEvents;
}
function addEvent(name, event) {
var newEvents = getEvents(name).concat(event);
setEvents(name, newEvents);
}
function removeEvent(name,... | Use private functions for implementation details of Event module | Use private functions for implementation details of Event module
| JavaScript | mit | dscout/immunid,dscout/immunid | ---
+++
@@ -1,51 +1,63 @@
+var events = {};
+
+function getEvents(name) {
+ events[name] = events[name] || [];
+
+ return events[name];
+}
+
+function setEvents(name, newEvents) {
+ events[name] = newEvents;
+}
+
+function addEvent(name, event) {
+ var newEvents = getEvents(name).concat(event);
+
+ setEvents(nam... |
638143097275249385dbe7f8c7287ec4a4039424 | src/rawTransaction.js | src/rawTransaction.js | import Tx from 'ethereumjs-tx'
import ethUtil from 'ethereumjs-util'
import web3 from './web3client'
import { coinbase, another, keys } from './keys'
export function signTransaction(rawTx) {
var account = keys[rawTx.from]
if(!account) {
throw new Error(`No private key for account "${from}"`)
}
var private... | import Tx from 'ethereumjs-tx'
import ethUtil from 'ethereumjs-util'
import web3 from './web3client'
import { coinbase, another, keys } from './keys'
export function signTransaction(rawTx) {
const account = keys[rawTx.from]
if(!account) {
throw new Error(`No private key for account "${from}"`)
}
const pri... | Add hex prefix to signed transaction | Add hex prefix to signed transaction
| JavaScript | mit | CBAInnovationLab/web3-sandbox | ---
+++
@@ -5,14 +5,14 @@
export function signTransaction(rawTx) {
- var account = keys[rawTx.from]
+ const account = keys[rawTx.from]
if(!account) {
throw new Error(`No private key for account "${from}"`)
}
- var privateKey = account.privateKey
- var tx = new Tx(rawTx)
+ const privateKey = accou... |
2501a700a90553786b122438a5cf9a6d46001ae8 | javascripts/background.js | javascripts/background.js | var githubFeed = ({
feedUrl: "",
loadFeedUrl: function() {
var self = this;
chrome.storage.local.get("current_user_url", function(data) {
self.feedUrl = data.current_user_url;
});
},
urlChanged: function() {
chrome.storage.onChanged.addListener(function(changes, namespace) {
for (v... | var githubFeed = ({
feedUrl: "",
loadFeedUrl: function() {
var self = this;
chrome.storage.local.get("current_user_url", function(data) {
self.feedUrl = data.current_user_url;
});
},
urlChanged: function() {
var self = this;
chrome.storage.onChanged.addListener(function(changes, name... | Call getUserFeed() when current user url is changed | Call getUserFeed() when current user url is changed
| JavaScript | mit | TAKAyukiatkwsk/github_feed_notifier | ---
+++
@@ -9,12 +9,14 @@
},
urlChanged: function() {
+ var self = this;
chrome.storage.onChanged.addListener(function(changes, namespace) {
for (var key in changes) {
if (key === "current_user_url") {
alert("!!!");
console.log(changes[key].newValue);
- t... |
bad3a8c822be9935fb7607212b7ddf639fe878b0 | docs/examples/AsyncPromises.js | docs/examples/AsyncPromises.js | import React, { Component } from 'react';
import AsyncSelect from '../../src/Async';
import { colourOptions } from '../data';
type State = {
inputValue: string,
};
const filterColors = (inputValue: string) => {
return colourOptions.filter(i =>
i.label.toLowerCase().includes(inputValue.toLowerCase())
);
}... | import React, { Component } from 'react';
import AsyncSelect from '../../src/Async';
import { colourOptions } from '../data';
const filterColors = (inputValue: string) => {
return colourOptions.filter(i =>
i.label.toLowerCase().includes(inputValue.toLowerCase())
);
};
const promiseOptions = inputValue =>
... | Remove dead code in example | Remove dead code in example | JavaScript | mit | JedWatson/react-select,JedWatson/react-select | ---
+++
@@ -2,10 +2,6 @@
import AsyncSelect from '../../src/Async';
import { colourOptions } from '../data';
-
-type State = {
- inputValue: string,
-};
const filterColors = (inputValue: string) => {
return colourOptions.filter(i =>
@@ -20,13 +16,7 @@
}, 1000);
});
-export default class WithPromi... |
d2710ff8b6bb406526e64b51268611de54979bc3 | src/modular.js | src/modular.js | /*-----------------------------------------------------------------
Modular - JS Extension
Made by @esr360
http://github.com/esr360/Modular/
-----------------------------------------------------------------*/
//-----------------------------------------------------------------
// Convert CSS config to JS
//---------... | /*-----------------------------------------------------------------
Modular - JS Extension
Made by @esr360
http://github.com/esr360/Modular/
-----------------------------------------------------------------*/
//-----------------------------------------------------------------
// Convert CSS config to JS
//---------... | Store configuartion data in a variable | Store configuartion data in a variable
| JavaScript | mit | esr360/Synergy,esr360/Modular,esr360/Modular | ---
+++
@@ -38,3 +38,6 @@
}
return JSON.parse(style);
}
+
+// Store configuartion data in a variable
+var module = getStylesConfig(); |
3c583ed9f61554c95450d007fef98c40180c829c | webpack.mix.js | webpack.mix.js | const
{ mix } = require('laravel-mix'),
webpack = require('webpack');
mix
.webpackConfig({
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
'Tether': 'tether',
'window.axios': 'axios'
})
]
})
.copy(
'node_modules/kent-bar/build/deploy... | const
{ mix } = require('laravel-mix'),
webpack = require('webpack');
mix
.webpackConfig({
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
'Tether': 'tether',
'window.axios': 'axios'
})
],
resolve: {
symlinks: false
}
})
.copy(
... | Make npm link work with babel-loader. | Make npm link work with babel-loader.
| JavaScript | mit | unikent/astro,unikent/astro,unikent/astro,unikent/astro,unikent/astro | ---
+++
@@ -12,7 +12,10 @@
'Tether': 'tether',
'window.axios': 'axios'
})
- ]
+ ],
+ resolve: {
+ symlinks: false
+ }
})
.copy(
'node_modules/kent-bar/build/deploy/assets/app.js',
@@ -24,4 +27,4 @@
)
.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss'... |
92e0a14a9a23ecf93399b5a0431ae6c12175ff29 | grunt_tasks/webpack.plugins.js | grunt_tasks/webpack.plugins.js | /**
* This file contains custom webpack plugins.
*/
// This plugin modifies the generated webpack code to execute a module within the DLL bundle
// in addition to preserving the default behavior of exporting the webpack require function
class DllBootstrapPlugin {
constructor(options) {
this.options = opt... | /**
* This file contains custom webpack plugins.
*/
'use strict';
// This plugin modifies the generated webpack code to execute a module within the DLL bundle
// in addition to preserving the default behavior of exporting the webpack require function
class DllBootstrapPlugin {
constructor(options) {
this... | Fix complaints about strict mode during build | Fix complaints about strict mode during build
| JavaScript | apache-2.0 | adsorensen/girder,sutartmelson/girder,Xarthisius/girder,data-exp-lab/girder,data-exp-lab/girder,Xarthisius/girder,Xarthisius/girder,RafaelPalomar/girder,kotfic/girder,adsorensen/girder,adsorensen/girder,manthey/girder,Kitware/girder,RafaelPalomar/girder,sutartmelson/girder,jbeezley/girder,girder/girder,data-exp-lab/gir... | ---
+++
@@ -1,6 +1,7 @@
/**
* This file contains custom webpack plugins.
*/
+'use strict';
// This plugin modifies the generated webpack code to execute a module within the DLL bundle
// in addition to preserving the default behavior of exporting the webpack require function
@@ -12,10 +13,9 @@
apply(com... |
5ecd470d6e1a937c54dd7eff28d44fe30c269506 | js/editor-libs/console.js | js/editor-libs/console.js | // Thanks in part to https://stackoverflow.com/questions/11403107/capturing-javascript-console-log
(function(global) {
'use strict';
var originalConsoleLogger = console.log; // eslint-disable-line no-console
var originalConsoleError = console.error;
var outputContainer = document.getElementById('output... | // Thanks in part to https://stackoverflow.com/questions/11403107/capturing-javascript-console-log
(function(global) {
'use strict';
var originalConsoleLogger = console.log; // eslint-disable-line no-console
var originalConsoleError = console.error;
var outputContainer = document.getElementById('output... | Format logged objects to indicate their type | Format logged objects to indicate their type
| JavaScript | cc0-1.0 | mdn/interactive-examples,mdn/interactive-examples,mdn/interactive-examples | ---
+++
@@ -17,6 +17,24 @@
};
/**
+ * Formats output to indicate its type:
+ * - quotes around strings
+ * - square brackets around arrays
+ * @param {any} input - The output to log.
+ */
+ function indicateType(input) {
+ switch (typeof(input)) {
+ case "string":
+ ... |
26bdb62478b910c70a50322c39ff02e8c88136a7 | lib/config.js | lib/config.js |
var config = {
defaultPort: process.env.PORT || 3000,
defaultLogLength: process.env.LOGLENGTH || 64,
defaultLogLines: process.env.LOGLINES || 10,
defaultSpacer: process.env.SPACER || ' | ',
defaultIdentifier: process.env.IDENTIFIER || '',
defaultLineCount: process.env.LINECOUNT || 1,
defaultLineDated: pr... |
var config = {
defaultPort: process.env.WEB_PORT || 3000,
defaultLogLength: process.env.LOGLENGTH || 64,
defaultLogLines: process.env.LOGLINES || 10,
defaultSpacer: process.env.SPACER || ' | ',
defaultIdentifier: process.env.IDENTIFIER || '',
defaultLineCount: process.env.LINECOUNT || 1,
defaultLineDated... | Change PORT to WEB_PORT env var | Change PORT to WEB_PORT env var
conflicts with `PORT` variable injected by Marathon making it unusable in bridge mode. | JavaScript | apache-2.0 | bryanlatten/docker-log-gen | ---
+++
@@ -1,6 +1,6 @@
var config = {
- defaultPort: process.env.PORT || 3000,
+ defaultPort: process.env.WEB_PORT || 3000,
defaultLogLength: process.env.LOGLENGTH || 64,
defaultLogLines: process.env.LOGLINES || 10,
defaultSpacer: process.env.SPACER || ' | ', |
9d8050243b0172973dd5f1a38e7126460c1cadd1 | wire/sizzle.js | wire/sizzle.js | /**
* @license Copyright (c) 2010-2011 Brian Cavalier
* LICENSE: see the LICENSE.txt file. If file is missing, this file is subject
* to the MIT License at: http://www.opensource.org/licenses/mit-license.php.
*/
/**
* sizzle.js
* Adds querySelectorAll functionality to wire using John Resig's Sizzle library.
* S... | /**
* @license Copyright (c) 2010-2011 Brian Cavalier
* LICENSE: see the LICENSE.txt file. If file is missing, this file is subject
* to the MIT License at: http://www.opensource.org/licenses/mit-license.php.
*/
/**
* sizzle.js
* Adds querySelectorAll functionality to wire using John Resig's Sizzle library.
* S... | Rename promise to resolver, which is what it is anyway | Rename promise to resolver, which is what it is anyway
| JavaScript | mit | cujojs/wire,cujojs/wire,designeng/wire,wilson7287/wire,designeng/wire | ---
+++
@@ -14,11 +14,11 @@
*/
define(['sizzle', 'wire/domReady'], function(sizzle, domReady) {
- function resolveQuery(promise, name, refObj /*, wire */) {
+ function resolveQuery(resolver, name, refObj /*, wire */) {
domReady(function() {
var result = sizzle(name);
- promise.resolve(typeof refObj.i ... |
17ad3c708178df8456a1788c5467d719f7a78746 | imports/companies/companies.js | imports/companies/companies.js | import * as dh from '/imports/both/docs-helpers.js';
import { Class as Model } from 'meteor/jagi:astronomy';
Companies = new Mongo.Collection('companies');
Company = Model.create({
name: 'Company',
collection: Companies,
fields: {
TaxId: String,
Name: String,
Rating: Number
}
});
Meteor.methods({... | import * as dh from '/imports/both/docs-helpers.js';
import { Class as Model } from 'meteor/jagi:astronomy';
Companies = new Mongo.Collection('companies');
Company = Model.create({
name: 'Company',
collection: Companies,
fields: {
TaxId: {
type: String,
validators: [
... | Add basic validations to the Company model | Add basic validations to the Company model | JavaScript | mit | jaumesola/invoices-mvp,jaumesola/invoices-mvp,jaumesola/invoices-mvp | ---
+++
@@ -4,13 +4,28 @@
Companies = new Mongo.Collection('companies');
Company = Model.create({
- name: 'Company',
- collection: Companies,
- fields: {
- TaxId: String,
- Name: String,
- Rating: Number
- }
+ name: 'Company',
+ collection: Companies,
+ fields: {
+ TaxId: {
+ ... |
879455cc5faf347d88581161085c65882fe3d6e6 | client/users/auth/register/check_nick.js | client/users/auth/register/check_nick.js | 'use strict';
/**
* client
**/
/**
* client.common
**/
/**
* client.common.auth
**/
/**
* client.common.auth.register
**/
/*global nodeca*/
/**
* client.common.auth.register.check_nick($elem, event)
*
* send nick value on server
* and show error if nick exists
**/
module.exports = function ... | 'use strict';
/**
* client
**/
/**
* client.common
**/
/**
* client.common.auth
**/
/**
* client.common.auth.register
**/
/*global nodeca*/
var DELAY = 500;
var start_point;
/**
* client.common.auth.register.check_nick($elem, event)
*
* send nick value on server
* and show error if nick exi... | Add delay on nick checking request | Add delay on nick checking request
| JavaScript | mit | nodeca/nodeca.users | ---
+++
@@ -20,6 +20,9 @@
/*global nodeca*/
+var DELAY = 500;
+
+var start_point;
/**
* client.common.auth.register.check_nick($elem, event)
@@ -27,35 +30,50 @@
* send nick value on server
* and show error if nick exists
**/
-module.exports = function ($elem /*, event*/) {
- var nick = $elem.val()... |
a6042a0774c703a338accdbd59898a5a1eb99d05 | app/models/polls.js | app/models/polls.js | 'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Vote = new Schema({
ip: String
});
var Options = new Schema({
name: String,
vote: [Vote]
});
var Poll = new Schema({
user: Number,
title: String,
date: Date,
options: [Options]
});
module.exports = mongoose.model('Poll', Pol... | 'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var Vote = new Schema({
ip: String
});
var Options = new Schema({
name: String,
votes: [Vote]
});
var Poll = new Schema({
user: Number,
title: String,
hash: String,
date: Date,
votes: Number,
options: [Options]
});
module.expo... | Modify model for add hash | Modify model for add hash
| JavaScript | mit | mirabalj/voting-camp,mirabalj/voting-camp | ---
+++
@@ -9,13 +9,15 @@
var Options = new Schema({
name: String,
- vote: [Vote]
+ votes: [Vote]
});
var Poll = new Schema({
user: Number,
title: String,
+ hash: String,
date: Date,
+ votes: Number,
options: [Options]
});
|
ebfc5a251e0c8a7524c0cc13d2a5df194a9aa09f | app/props/screen.js | app/props/screen.js | import canvas from 'canvas';
import Game from 'lib/game';
import Prop from 'props/prop';
import Button from 'props/button';
export default class Screen extends Prop {
constructor(cta, label) {
const buttonHeight = 100;
super(0, 0, canvas.width, canvas.height);
this.label = label;
this.button = new ... | import canvas from 'canvas';
import constants from '_constants';
import Game from 'lib/game';
import Prop from 'props/prop';
import Button from 'props/button';
export default class Screen extends Prop {
constructor(cta, label) {
const buttonHeight = 100;
super(0, 0, canvas.width, canvas.height);
this.la... | Fix label render issue due to typo | Fix label render issue due to typo
| JavaScript | mit | oliverbenns/pong,oliverbenns/pong | ---
+++
@@ -1,4 +1,5 @@
import canvas from 'canvas';
+import constants from '_constants';
import Game from 'lib/game';
import Prop from 'props/prop';
import Button from 'props/button';
@@ -31,7 +32,7 @@
canvas.context.font = `${fontSize}px Helvetica`;
canvas.context.textAlign = 'center';
- canvas.c... |
775c4a4ad5a553748804392899ee08ba6c2cc4e5 | src/middleware/auth/processJWTIfExists.js | src/middleware/auth/processJWTIfExists.js | const
nJwt = require('njwt'),
config = require('config.js'),
errors = require('feathers-errors');
function processJWTIfExists (req, res, next) {
req.feathers = req.feathers || {};
let token = req.headers['authorization'];
if (token == null) {
let cookies = req.cookies;
token = cookies.id... | const
nJwt = require('njwt'),
config = require('config.js'),
errors = require('feathers-errors');
function processJWTIfExists (req, res, next) {
req.feathers = req.feathers || {};
let token = req.headers['authorization'];
if (token == null) {
let cookies = req.cookies;
token = cookies.id... | Use a catch with the JWT verify function | Use a catch with the JWT verify function
| JavaScript | agpl-3.0 | podverse/podverse-web,podverse/podverse-web,podverse/podverse-web,podverse/podverse-web | ---
+++
@@ -21,8 +21,13 @@
return;
}
- const verifiedJwt = nJwt.verify(token, config.jwtSigningKey);
- req.feathers.userId = verifiedJwt.body.sub;
+ try {
+ const verifiedJwt = nJwt.verify(token, config.jwtSigningKey);
+ req.feathers.userId = verifiedJwt.body.sub;
+ } catch(e) {
+ next();
+ ... |
e7699d278aea82f2b10c07fbd028d35db704de94 | kuulemma/static/app/components/location-map/location-map-directive.js | kuulemma/static/app/components/location-map/location-map-directive.js | (function() {
'use strict';
angular.module('kuulemmaApp').directive('locationMap', function($window) {
return {
restrict: 'A',
scope: {
latitude: '@',
longitude: '@',
polygon: '@'
},
link: function(scope, element) {
var L = $window.L;
var map = L.m... | (function() {
'use strict';
angular.module('kuulemmaApp').directive('locationMap', function($window) {
return {
restrict: 'A',
scope: {
latitude: '@',
longitude: '@',
polygon: '@'
},
link: function(scope, element) {
var L = $window.L;
var map = L.m... | Use https to load openstreetmap data | Use https to load openstreetmap data
| JavaScript | agpl-3.0 | fastmonkeys/kuulemma,City-of-Helsinki/kuulemma,fastmonkeys/kuulemma,City-of-Helsinki/kuulemma,City-of-Helsinki/kuulemma,fastmonkeys/kuulemma | ---
+++
@@ -19,8 +19,8 @@
doubleClickZoom:false,
});
var zoom = 14;
- var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
- var osmAttribution = 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
+ var osmUrl = 'https://{s}.t... |
65d110d813abdd2a039d223c7ddd41a4cc857a8b | server/common/set_language.js | server/common/set_language.js | // Store the preference locale in cookies and (if available) session to use
// on next requests.
'use strict';
var _ = require('lodash');
var LOCALE_COOKIE_MAX_AGE = 0xFFFFFFFF; // Maximum 32-bit unsigned integer.
module.exports = function (N, apiPath) {
N.validate(apiPath, {
locale: { type: 'string' }
... | // Store the preference locale in cookies and (if available) session to use
// on next requests.
'use strict';
var _ = require('lodash');
var LOCALE_COOKIE_MAX_AGE = 0xFFFFFFFF; // Maximum 32-bit unsigned integer.
module.exports = function (N, apiPath) {
N.validate(apiPath, {
locale: { type: 'string' }
... | Simplify updating of locale field in user account. | Simplify updating of locale field in user account.
| JavaScript | mit | nodeca/nodeca.users | ---
+++
@@ -34,15 +34,7 @@
}
if (env.session && env.session.user_id) {
- N.models.users.User.findById(env.session.user_id, function (err, user) {
- if (err) {
- callback(err);
- return;
- }
-
- user.locale = locale;
- user.save(callback);
- });
+ ... |
a1aca964cc495ddde6401be94cb231810b53598d | src/news/__tests__/ArticlePreview-test.js | src/news/__tests__/ArticlePreview-test.js | import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import ArticlePreview from '../ArticlePreview';
describe('ArticlePreview', () => {
it('should render ArticlePreview component properly', () => {
const wrapper = shallow(<ArticlePreview description="Article Descripti... | import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import ArticlePreview from '../ArticlePreview';
describe('ArticlePreview', () => {
it('should render ArticlePreview component properly', () => {
const wrapper = shallow(<ArticlePreview description="Article Descripti... | Fix a bug, used .test instead of .test() | Fix a bug, used .test instead of .test()
| JavaScript | mit | qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary... | ---
+++
@@ -6,6 +6,6 @@
describe('ArticlePreview', () => {
it('should render ArticlePreview component properly', () => {
const wrapper = shallow(<ArticlePreview description="Article Description" title="Article title" />);
- expect(wrapper.render().text).to.contain('Article title');
+ expe... |
64167a5d7eba261f3f6c1b6e223d5f6b855b8df5 | examples/extent-interaction.js | examples/extent-interaction.js | import ExtentInteraction from '../src/ol/interaction/Extent.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol... | import ExtentInteraction from '../src/ol/interaction/Extent.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Map from '../src/ol/Map.js';
import View from '../src/ol/View.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol... | Use condition instead of setActive and listeners | Use condition instead of setActive and listeners | JavaScript | bsd-2-clause | stweil/ol3,adube/ol3,adube/ol3,openlayers/openlayers,stweil/ol3,oterral/ol3,ahocevar/openlayers,openlayers/openlayers,bjornharrtell/ol3,stweil/openlayers,stweil/ol3,ahocevar/ol3,ahocevar/openlayers,stweil/openlayers,openlayers/openlayers,stweil/openlayers,bjornharrtell/ol3,oterral/ol3,adube/ol3,ahocevar/ol3,ahocevar/op... | ---
+++
@@ -4,6 +4,7 @@
import View from '../src/ol/View.js';
import {OSM, Vector as VectorSource} from '../src/ol/source.js';
import {Tile as TileLayer, Vector as VectorLayer} from '../src/ol/layer.js';
+import {shiftKeyOnly} from '../src/ol/events/condition.js';
const vectorSource = new VectorSource({
url:... |
26fe7640b6ca46d053d5f9123f21411b3d739c80 | _admin/js/sold_tickets.js | _admin/js/sold_tickets.js | function short_hash(data, type, row, meta)
{
return data.substring(0,8);
}
function init_page()
{
$('#tickets').dataTable({
"ajax": '../api/v1/tickets?filter=sold eq 1 and year eq 2016',
columns: [
{'data': 'hash', 'render':short_hash},
{'data': 'firstName'},
... | function short_hash(data, type, row, meta)
{
return data.substring(0,8);
}
function init_page()
{
$('#tickets').dataTable({
"ajax": '../api/v1/tickets?filter=sold eq 1 and year eq 2016&fmt=data-table',
columns: [
{'data': 'hash', 'render':short_hash},
{'data': 'firstName... | Fix new API call for datatable consumer | Fix new API call for datatable consumer
| JavaScript | apache-2.0 | BurningFlipside/Tickets,BurningFlipside/Tickets,BurningFlipside/Tickets | ---
+++
@@ -6,7 +6,7 @@
function init_page()
{
$('#tickets').dataTable({
- "ajax": '../api/v1/tickets?filter=sold eq 1 and year eq 2016',
+ "ajax": '../api/v1/tickets?filter=sold eq 1 and year eq 2016&fmt=data-table',
columns: [
{'data': 'hash', 'render':short_hash},
... |
a55246c980e48e3ed4e19a332dbc9178d0cd9265 | static/sprints-new.js | static/sprints-new.js | $(document).ready(function() {
$('select').chosen();
$('input.date').datepicker({
beforeShowDay: $.datepicker.noWeekends
});
$('#save-button').savebutton($('#post-status'), '');
$('#cancel-button').cancelbutton();
});
| $(document).ready(function() {
$('select').chosen();
$('input.date').datepicker({
beforeShowDay: $.datepicker.noWeekends
});
$('#save-button').savebutton($('#post-status'), '');
$('#cancel-button').cancelbutton('/');
});
| Fix cancel button on new sprint page | Fix cancel button on new sprint page
| JavaScript | mit | mrozekma/Sprint,mrozekma/Sprint,mrozekma/Sprint | ---
+++
@@ -5,5 +5,5 @@
});
$('#save-button').savebutton($('#post-status'), '');
- $('#cancel-button').cancelbutton();
+ $('#cancel-button').cancelbutton('/');
}); |
cb87d72a356363cc7350ab3c2c06aeaa1967c846 | src/argsToFindOptions.js | src/argsToFindOptions.js | export default function argsToFindOptions(args, target) {
var result = {}
, targetAttributes = Object.keys(target.rawAttributes);
if (args) {
Object.keys(args).forEach(function (key) {
if (~targetAttributes.indexOf(key)) {
result.where = result.where || {};
result.where[key] = args[ke... | export default function argsToFindOptions(args, target) {
var result = {}
, targetAttributes = Object.keys(target.rawAttributes);
if (args) {
Object.keys(args).forEach(function (key) {
if (~targetAttributes.indexOf(key)) {
result.where = result.where || {};
result.where[key] = args[ke... | Allow "reverse:fieldname" for a descending sort | Allow "reverse:fieldname" for a descending sort
Closes #42
| JavaScript | mit | idris/graphql-sequelize,mickhansen/graphql-sequelize,janmeier/graphql-sequelize | ---
+++
@@ -18,8 +18,15 @@
}
if (key === 'order' && args[key]) {
+ var order;
+ if (args[key].indexOf('reverse:') === 0) {
+ order = [args[key].substring(8), 'DESC'];
+ } else {
+ order = [args[key], 'ASC'];
+ }
+
result.order = [
- [args... |
5b2ecde8e9cf8e4cc6e694ddfb6318ca47b342f5 | lib/mixins/soft-delete.js | lib/mixins/soft-delete.js | 'use strict';
const _ = require('lodash');
module.exports = function (Model, bootOptions = {}) {
Model.defineProperty('deleted', {
type: Boolean,
required: true,
default: false
});
/**
* @return {Promise<Model>}
*/
Model.prototype.softDelete = function () {
return this.updateAttribute('... | 'use strict';
const _ = require('lodash');
module.exports = function (Model, bootOptions = {}) {
Model.defineProperty('deleted', {
type: Boolean,
required: true,
default: false
});
/**
* @return {Promise<Model>}
*/
Model.prototype.softDelete = function () {
return this.updateAttribute('... | Use not equal filter instead. | Use not equal filter instead.
| JavaScript | mit | dynamoxteam/loopback-utilities | ---
+++
@@ -28,7 +28,7 @@
_.unset(ctx.args, 'filter.scope');
switch (scope) {
case 'active':
- _.set(ctx.args, 'filter.where.deleted', false);
+ _.set(ctx.args, 'filter.where.deleted.neq', true);
break;
case 'inactive':
_.set(ctx.args, 'filter.where.deleted', tr... |
d1bd53c204c816dc0cca0cb3a502d30971ddcbcb | extension/media-control-api.js | extension/media-control-api.js | // Tab registration by MediaControlled event
document.addEventListener("MediaControlled", function () {
chrome.runtime.sendMessage({command: "registerTab"});
});
// Tab unregistration by MediaUncontrolled event
document.addEventListener("MediaUncontrolled", function () {
chrome.runtime.sendMessage({command: "u... | // Media Events emmiter
chrome.runtime.onMessage.addListener(function(request) {
switch (request.command) {
case "play-pause":
document.dispatchEvent(new Event("MediaPlayPause"));
break;
case "stop":
document.dispatchEvent(new Event("MediaStop"));
... | Support for Web Page Media Control API v0.4 | Support for Web Page Media Control API v0.4
| JavaScript | apache-2.0 | kristianj/keysocket,Whoaa512/keysocket,ALiangLiang/keysocket,borismus/keysocket,chrisdeely/keysocket,feedbee/keysocket,borismus/keysocket,vladikoff/keysocket,iver56/keysocket,kristianj/keysocket,vinyldarkscratch/keysocket,legionaryu/keysocket,vinyldarkscratch/keysocket,feedbee/keysocket | ---
+++
@@ -1,13 +1,3 @@
-// Tab registration by MediaControlled event
-document.addEventListener("MediaControlled", function () {
- chrome.runtime.sendMessage({command: "registerTab"});
-});
-
-// Tab unregistration by MediaUncontrolled event
-document.addEventListener("MediaUncontrolled", function () {
- chro... |
5e93f2da4c204b82c81eacbd86ab6368b67331ca | scripts/collections/quizz-collection.js | scripts/collections/quizz-collection.js | var QuizzCollection = Backbone.Collection.extend({
model: QuizzModel,
url: './data/quizz.json'
});
| var QuizzCollection = Backbone.Collection.extend({
model: QuizzModel,
url: 'http://dcamilleri.com/wsf/api'
});
| Change JSON url to API url | Change JSON url to API url
| JavaScript | mit | KillianKemps/MovieQuizz,KillianKemps/MovieQuizz | ---
+++
@@ -1,4 +1,4 @@
var QuizzCollection = Backbone.Collection.extend({
model: QuizzModel,
- url: './data/quizz.json'
+ url: 'http://dcamilleri.com/wsf/api'
}); |
f4086f9dd9381da2179adc2254b03b81d2e4fbb7 | Smallstache.js | Smallstache.js | function Smallstache(source) {
this.template = source.match(/^[#|\.].*/g) ?
document.querySelector(source) : // source is selector
source; // source is template
}
Smallstache.prototype.render = function(obj) {
return this.template.replace(/{{\s*([\S|^}]+)\s*}}/g,
... | function Smallstache(source) {
this.template = source.match(/^[#|\.].*/g) ?
window.document.querySelector(source) : // source is selector
source; // source is template
}
Smallstache.prototype.render = function(obj) {
return this.template.replace(/{{\s*([\S|^}]+)\s*}}/... | Fix error with module export | Fix error with module export
| JavaScript | mit | macie/smallstache | ---
+++
@@ -1,10 +1,12 @@
function Smallstache(source) {
this.template = source.match(/^[#|\.].*/g) ?
- document.querySelector(source) : // source is selector
+ window.document.querySelector(source) : // source is selector
source; // source is template
}
Sm... |
ac852a0a4478362ef3ca076fd14bbd048f4bc038 | doc/components/CrossLinkComponent.js | doc/components/CrossLinkComponent.js | 'use strict';
var Component = require('../../ui/Component');
var $$ = Component.$$;
function CrossLinkComponent() {
Component.apply(this, arguments);
}
CrossLinkComponent.Prototype = function() {
this.render = function() {
var doc = this.context.doc;
var nodeId = this.props.nodeId;
var el;
if (no... | 'use strict';
var Component = require('../../ui/Component');
var $$ = Component.$$;
function CrossLinkComponent() {
Component.apply(this, arguments);
}
CrossLinkComponent.Prototype = function() {
this.render = function() {
var doc = this.context.doc;
var nodeId = this.props.nodeId;
var el;
if (no... | Fix display of return type. | Fix display of return type.
| JavaScript | mit | TypesetIO/substance,andene/substance,TypesetIO/substance,abhaga/substance,michael/substance-1,stencila/substance,substance/substance,andene/substance,michael/substance-1,substance/substance,jacwright/substance,abhaga/substance,podviaznikov/substance,podviaznikov/substance,jacwright/substance | ---
+++
@@ -22,7 +22,7 @@
} else {
el = $$('span');
}
- if (this.props.children) {
+ if (this.props.children.length > 0) {
el.append(this.props.children);
} else {
el.append(nodeId); |
a9661d03d234101bd51d8fd66ddab653797c4543 | lib/isomorphic/gatsby-helpers.js | lib/isomorphic/gatsby-helpers.js | import { config } from 'config'
import invariant from 'invariant'
import isString from 'lodash/isString'
function isDataURL (s) {
// Regex from https://gist.github.com/bgrins/6194623#gistcomment-1671744
// eslint-disable-next-line max-len
const regex = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a-z\-]+=[a-z0-9\-]+)?)?(;... | import { config } from 'config'
import invariant from 'invariant'
import isString from 'lodash/isString'
import path from 'path'
function isDataURL (s) {
// Regex from https://gist.github.com/bgrins/6194623#gistcomment-1671744
// eslint-disable-next-line max-len
const regex = /^\s*data:([a-z]+\/[a-z0-9\-\+]+(;[a... | Use path.join for link prefixing | Use path.join for link prefixing
| JavaScript | mit | mingaldrichgan/gatsby,mingaldrichgan/gatsby,gatsbyjs/gatsby,fabrictech/gatsby,rothfels/gatsby,gatsbyjs/gatsby,okcoker/gatsby,Khaledgarbaya/gatsby,ChristopherBiscardi/gatsby,danielfarrell/gatsby,fk/gatsby,ChristopherBiscardi/gatsby,gatsbyjs/gatsby,Khaledgarbaya/gatsby,rothfels/gatsby,0x80/gatsby,chiedo/gatsby,okcoker/ga... | ---
+++
@@ -1,6 +1,7 @@
import { config } from 'config'
import invariant from 'invariant'
import isString from 'lodash/isString'
+import path from 'path'
function isDataURL (s) {
// Regex from https://gist.github.com/bgrins/6194623#gistcomment-1671744
@@ -21,7 +22,7 @@
`
invariant(isString(config.l... |
dd81193bee7b57d2ff7c2f604a4ff37d629713bc | app/js/arethusa.core/dependency_loader.js | app/js/arethusa.core/dependency_loader.js | "use strict";
angular.module('arethusa.core').service('dependencyLoader', [
'$ocLazyLoad',
'$q',
'basePath',
function($ocLazyLoad, $q, basePath) {
function expand(p) {
return basePath.path + '/' + p;
}
function expandPath(path) {
var res = [];
if (angular.isArray(path)) {
... | "use strict";
angular.module('arethusa.core').service('dependencyLoader', [
'$ocLazyLoad',
'$q',
'basePath',
function($ocLazyLoad, $q, basePath) {
function expand(p) {
if (aU.isUrl(p)) {
return p;
} else {
return basePath.path + '/' + p;
}
}
function expandPath(pat... | Fix path handling in dependencyLoader | Fix path handling in dependencyLoader
| JavaScript | mit | fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa | ---
+++
@@ -6,7 +6,11 @@
'basePath',
function($ocLazyLoad, $q, basePath) {
function expand(p) {
- return basePath.path + '/' + p;
+ if (aU.isUrl(p)) {
+ return p;
+ } else {
+ return basePath.path + '/' + p;
+ }
}
function expandPath(path) {
var res = []; |
98ec5b6d04acd5410c71f84a4187c9ca7425defd | app/scripts/components/player-reaction.js | app/scripts/components/player-reaction.js | import m from 'mithril';
import classNames from '../classnames.js';
class PlayerReactionComponent {
oninit({ attrs: { session, player } }) {
session.on('send-reaction', ({ reactingPlayer, reaction }) => {
if (reactingPlayer.color === player.color) {
// Immediately update the reaction if another re... | import m from 'mithril';
import classNames from '../classnames.js';
class PlayerReactionComponent {
oninit({ attrs: { session, player } }) {
this.player = player;
session.on('send-reaction', ({ reactingPlayer, reaction }) => {
if (reactingPlayer.color === this.player.color) {
// Immediately up... | Fix bug where reactions would break after starting new game | Fix bug where reactions would break after starting new game
| JavaScript | mit | caleb531/connect-four | ---
+++
@@ -4,20 +4,29 @@
class PlayerReactionComponent {
oninit({ attrs: { session, player } }) {
+ this.player = player;
session.on('send-reaction', ({ reactingPlayer, reaction }) => {
- if (reactingPlayer.color === player.color) {
+ if (reactingPlayer.color === this.player.color) {
... |
7be6e466152261159d1b6971ba231fc32464fc10 | app/ui/browser/model/shared-prop-types.js | app/ui/browser/model/shared-prop-types.js | /*
Copyright 2016 Mozilla
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, software distributed
u... | /*
Copyright 2016 Mozilla
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, software distributed
u... | Add shared immutable prop types for Profile models | Add shared immutable prop types for Profile models
Signed-off-by: Victor Porof <7d8eebacd0931807085fa6b9af29638ed74e0886@mozilla.com>
| JavaScript | apache-2.0 | jsantell/tofino,mozilla/tofino,mozilla/tofino,jsantell/tofino,bgrins/tofino,victorporof/tofino,jsantell/tofino,victorporof/tofino,bgrins/tofino,mozilla/tofino,bgrins/tofino,bgrins/tofino,mozilla/tofino,jsantell/tofino | ---
+++
@@ -16,3 +16,6 @@
export const Page = PropTypes.instanceOf(Model.Page);
export const Pages = ImmutablePropTypes.listOf(Page.isRequired);
+
+export const Profile = PropTypes.instanceOf(Model.Profile);
+export const Profiles = ImmutablePropTypes.listOf(Profile.isRequired); |
5ca8e5f6c57387af132f56bd997a06ab60bfe01e | test/test-creation.js | test/test-creation.js | /*global describe, beforeEach, it*/
'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
describe('ink generator', function () {
beforeEach(function (done) {
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
... | /*global describe, beforeEach, it*/
'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
describe('ink generator', function () {
beforeEach(function (done) {
helpers.testDirectory(path.join(__dirname, 'temp'), function (err) {
if (err) {
return done(err);
... | Update test to check all files created | Update test to check all files created
| JavaScript | mit | rogeriopvl/generator-ink,rogeriopvl/generator-ink | ---
+++
@@ -22,6 +22,10 @@
it('creates expected files', function (done) {
var expected = [
// add files you expect to exist here.
+ 'package.json',
+ 'bower.json',
+ 'app',
+ 'app/index.html',
'.jshintrc',
'.editorconfig'
]; |
edb34ca791f133d22d27e00106e7351965c37152 | lints/disallowImportingNonSharedCodeRule.js | lints/disallowImportingNonSharedCodeRule.js | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Lint = require("tslint");
class Rule extends Lint.Rules.AbstractRule {
apply(sourceFile) {
if (sourceFile.fileName.indexOf("src/debug/") === -1) {
return this.applyWithWalker(new NoNonSharedCode(sourceFile, this.getOptions()));
... | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Lint = require("tslint");
class Rule extends Lint.Rules.AbstractRule {
apply(sourceFile) {
return this.applyWithWalker(new NoNonSharedCode(sourceFile, this.getOptions()));
}
}
Rule.DEBUG_FAILURE_STRING = "Do not import debugger co... | Enable more linting for shared imports | Enable more linting for shared imports
| JavaScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -6,9 +6,7 @@
class Rule extends Lint.Rules.AbstractRule {
apply(sourceFile) {
- if (sourceFile.fileName.indexOf("src/debug/") === -1) {
- return this.applyWithWalker(new NoNonSharedCode(sourceFile, this.getOptions()));
- }
+ return this.applyWithWalker(new NoNonSharedCode(sourceFile, this.getOpti... |
f85e476263ffad5ce682ff40faa4979a8facf820 | app/assets/javascripts/tagger/functions/setupDisplayFieldsEducation.js | app/assets/javascripts/tagger/functions/setupDisplayFieldsEducation.js |
function setupDisplayFieldsEducationTab(TempObject, selectBox){
// This code is needed to merge the multiselect field and the "other" input field per
if (typeof TempObject[selectBox] != 'undefined') {
if (TempObject[selectBox] != "") {
var optionsToSelect = TempObject[selectBox];
... | // Take the comma separated list for {field} from {item}.{field} and populate the select#{field} box
// Any of the values in the comma separated list for {field} that doesn't have an option in select#{field}
// Get stuffed into {field}Other as it's own comma separated list.
function setupDisplayFieldsEducationTab(item,... | Refactor of comma separated list to selectbox & other inputs. | Refactor of comma separated list to selectbox & other inputs.
| JavaScript | apache-2.0 | inbloom/APP-tagger,inbloom/APP-tagger | ---
+++
@@ -1,21 +1,23 @@
-
-function setupDisplayFieldsEducationTab(TempObject, selectBox){
- // This code is needed to merge the multiselect field and the "other" input field per
- if (typeof TempObject[selectBox] != 'undefined') {
- if (TempObject[selectBox] != "") {
- var optionsToSelect =... |
3a2c496d5d65d9e8dd01a09f03123b9b63853400 | src/pages/index.js | src/pages/index.js | import React from 'react'
import EventBets from '../templates/event-bets'
import EventHeading from '../templates/event-heading'
import styles from './index.module.styl'
export default ({ data }) => (
<ol className={styles['events-list']}>
{
data.allMongodbPlacardDevEvents.edges.map(({ node }, idx) => (
... | import React from 'react'
import EventBets from '../templates/event-bets'
import EventHeading from '../templates/event-heading'
import styles from './index.module.styl'
export default ({ data }) => (
<ol className={styles['events-list']}>
{
data.allMongodbPlacardDevEvents.edges.map(({ node }, idx) => (
... | Set default page size to 10 events. | Set default page size to 10 events.
| JavaScript | mit | LuisLoureiro/placard-wrapper | ---
+++
@@ -19,7 +19,7 @@
)
export const query = graphql`
- query EventsListQuery($sport: String, $country: String, $skip: Int = 0, $limit: Int = 20) {
+ query EventsListQuery($sport: String, $country: String, $skip: Int = 0, $limit: Int = 10) {
allMongodbPlacardDevEvents(
filter: { sport: { eq: $sp... |
1d8de6175eb5405f3e1d316cb8ba65f70791f45f | src/main.js | src/main.js | 'use babel'
export const compiler = false
export const minifier = false
export function process(contents) {
const chunks = contents.split(/\r?\n/)
if (chunks[chunks.length - 1] !== '') {
chunks.push('')
}
return chunks.join('\n')
}
| 'use babel'
import Path from 'path'
import {rollup} from 'rollup'
import {requireDependency} from './helpers'
export const preprocessor = true
export const compiler = false
export const minifier = false
export function process(contents, {rootDirectory, filePath, config, state}) {
const plugins = []
plugins.push... | Implement proper plugins, resolution and maps support | :new: Implement proper plugins, resolution and maps support
| JavaScript | mit | steelbrain/ucompiler-plugin-rollup | ---
+++
@@ -1,11 +1,65 @@
'use babel'
+import Path from 'path'
+import {rollup} from 'rollup'
+import {requireDependency} from './helpers'
+
+export const preprocessor = true
export const compiler = false
export const minifier = false
-export function process(contents) {
- const chunks = contents.split(/\r?\n/)... |
26c3cdec1c2eb9b39372da02e292d401e4eada6e | tests/WestleyTests.js | tests/WestleyTests.js | var lib = require("__buttercup/module.js"),
Westley = lib.Westley;
module.exports = {
setUp: function(cb) {
this.westley = new Westley();
(cb)();
},
_getCommandForName: {
cachesCommandWhenCalledTwice: function(test) {
var testCommandKey = 'tgr';
var firstCall = this.westley._getComm... | var lib = require("__buttercup/module.js"),
Westley = lib.Westley;
module.exports = {
setUp: function(cb) {
this.westley = new Westley();
(cb)();
},
_getCommandForName: {
cachesCommandWhenCalledTwice: function(test) {
var testCommandKey = 'tgr';
var f... | Correct indentation in westley tests | Correct indentation in westley tests
| JavaScript | mit | buttercup-pw/buttercup-core,buttercup-pw/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core | ---
+++
@@ -1,42 +1,54 @@
var lib = require("__buttercup/module.js"),
- Westley = lib.Westley;
+ Westley = lib.Westley;
module.exports = {
- setUp: function(cb) {
- this.westley = new Westley();
- (cb)();
- },
-
- _getCommandForName: {
-
- cachesCommandWhenCalledTwice: function(test) {
- va... |
0458137ee581e7b9ae4b63496c760fd964099271 | generators/app/templates/api/policies/isAuthenticated.js | generators/app/templates/api/policies/isAuthenticated.js | /**
* isAuthenticated
* @description :: Policy that inject user in `req` via JSON Web Token
*/
var passport = require('passport');
module.exports = function (req, res, next) {
passport.authenticate('jwt', function (error, user, info) {
if (error) return res.serverError(error);
if (!user) return res.unaut... | /**
* isAuthenticated
* @description :: Policy that inject user in `req` via JSON Web Token
*/
var _ = require('lodash');
var passport = require('passport');
module.exports = function (req, res, next) {
passport.authenticate('jwt', function (error, user, info) {
if (error || !user) return res.negotiate(_.ass... | Fix policy for new responses | Fix policy for new responses
| JavaScript | mit | konstantinzolotarev/generator-trails,italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,tnunes/generator-trails,italoag/generator-sails-rest-api,eithewliter5518/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,IncoCode/generator-sails-rest-api,jaumard/generator-trails | ---
+++
@@ -3,12 +3,12 @@
* @description :: Policy that inject user in `req` via JSON Web Token
*/
+var _ = require('lodash');
var passport = require('passport');
module.exports = function (req, res, next) {
passport.authenticate('jwt', function (error, user, info) {
- if (error) return res.serverErro... |
6f6df7a1cdda9445ac32813d77b5aadd09664f17 | lib/hooks.js | lib/hooks.js | 'use strict'
var shimmer = require('shimmer')
var modules = require('./instrumentation/modules')
module.exports = function (client) {
if (!client._ff_instrument) return
// TODO: This will actual just use the logger of the last client parsed in.
// In most use-cases this is a non-issue, but if someone tries to ... | 'use strict'
var shimmer = require('shimmer')
var modules = require('./instrumentation/modules')
module.exports = function (client) {
// TODO: This will actual just use the logger of the last client parsed in.
// In most use-cases this is a non-issue, but if someone tries to initiate
// multiple clients with di... | Allow simple shimming of http.Server if full instrumentation is disabled | Allow simple shimming of http.Server if full instrumentation is disabled
| JavaScript | bsd-2-clause | opbeat/opbeat-node,opbeat/opbeat-node | ---
+++
@@ -4,13 +4,16 @@
var modules = require('./instrumentation/modules')
module.exports = function (client) {
- if (!client._ff_instrument) return
-
// TODO: This will actual just use the logger of the last client parsed in.
// In most use-cases this is a non-issue, but if someone tries to initiate
... |
b1f3ef17d75d3539c02659cbf300cd913879ce36 | client/src/store.js | client/src/store.js | import {createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
import createLogger from 'redux-logger';
import reducer from './reducer';
const loggerMiddleware = createLogger();
const createStoreWithMiddleware = applyMiddleware(
thunkMiddleware,
loggerMiddleware
)(createStore);
e... | import {createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
import createLogger from 'redux-logger';
import reducer from './reducer';
const loggerMiddleware = createLogger();
const createStoreWithMiddleware = applyMiddleware(
thunkMiddleware,
loggerMiddleware //remove in produc... | Add comment to remove loggerMiddleware in production. | Add comment to remove loggerMiddleware in production.
| JavaScript | agpl-3.0 | mi-squared/volunteer-portal,mi-squared/volunteer-portal,mi-squared/volunteer-portal | ---
+++
@@ -7,7 +7,7 @@
const createStoreWithMiddleware = applyMiddleware(
thunkMiddleware,
- loggerMiddleware
+ loggerMiddleware //remove in production
)(createStore);
export default function makeStore(initialState) { |
7b7f5012a087f4454f81cecd1f7292d655265cdb | lib/index.js | lib/index.js | import Server from './server';
import Client from './client';
const debug = require('debug')('tinylr');
// Need to keep track of LR servers when notifying
const servers = [];
export default tinylr;
// Expose Server / Client objects
tinylr.Server = Server;
tinylr.Client = Client;
// and the middleware helpers
tinyl... | import Server from './server';
import Client from './client';
const debug = require('debug')('tinylr');
// Need to keep track of LR servers when notifying
const servers = [];
export default tinylr;
// Expose Server / Client objects
tinylr.Server = Server;
tinylr.Client = Client;
// and the middleware helpers
tinyl... | Fix changed done callback, missing typeof. | Fix changed done callback, missing typeof. | JavaScript | mit | mklabs/tiny-lr | ---
+++
@@ -35,7 +35,7 @@
// Changed helper, helps with notifying the server of a file change
function changed (done) {
const files = [].slice.call(arguments);
- if (files[files.length - 1] === 'function') done = files.pop();
+ if (typeof files[files.length - 1] === 'function') done = files.pop();
done = ty... |
64e7f7f2eef87d86393077ebab953c8954cccd0b | src/data-reader/local-json.js | src/data-reader/local-json.js | define([
'base/class',
'jquery',
'underscore',
'base/utils'
], function(Class, $, _, Util) {
var LocalJSONReader = Class.extend({
init: function(basepath) {
this.data = [];
this.basepath = basepath;
},
read: function(queries, language) {... | define([
'base/class',
'jquery',
'underscore',
'base/utils'
], function(Class, $, _, Util) {
var LocalJSONReader = Class.extend({
init: function(basepath) {
this.data = [];
this.basepath = basepath;
},
read: function(queries, language) {... | Fix Load multiple JSON bug using array of promises | Fix Load multiple JSON bug using array of promises
| JavaScript | bsd-3-clause | homosepian/vizabi,Gapminder/vizabi,acestudiooleg/vizabi,jdk137/vizabi,sergey-filipenko/vizabi,maximhristenko/vizabi,maximhristenko/vizabi,Gapminder/vizabi,vizabi/vizabi,alliance-timur/vizabi,buchslava/vizabi,logicerpsolution/vizabi,buchslava/vizabi,alliance-timur/vizabi,Rathunter/vizabi,dab2000/vizabi,Rathunter/vizabi,... | ---
+++
@@ -14,7 +14,8 @@
read: function(queries, language) {
var _this = this,
- defer = $.Deferred();
+ defer = $.Deferred(),
+ promises = [];
var path = this.basepath.replace("{{LANGUAGE}}", language);
@@ -28,13 +29,14 @@
... |
9d33aca502e70c3da99a66c98ce54e109dc336e0 | src/client/app/core/dataservice.spec.js | src/client/app/core/dataservice.spec.js | /* jshint -W117, -W030 */
describe('dataservice', function() {
beforeEach(function() {
bard.appModule('app.core');
bard.inject('$http','$httpBackend','$q','dataservice','$rootScope');
});
it('exists' , function(){
expect(dataservice).to.exist;
});
it('getMessageCount returns a value' , function(... | /* jshint -W117, -W030 */
describe('dataservice', function() {
beforeEach(function() {
bard.appModule('app.core');
bard.inject('$http','$httpBackend','$q','dataservice','$rootScope');
});
it('exists' , function(){
expect(dataservice).to.exist;
});
it('getMessageCount returns a value' , function(... | Fix test so that is uses regex to check the text returned. | Fix test so that is uses regex to check the text returned.
| JavaScript | mit | bitclaw/angularjs-testing,bitclaw/angularjs-testing | ---
+++
@@ -27,9 +27,9 @@
it('getPeople reports error if server fails' , function() {
$httpBackend
.when('GET', '/api/people')
- .respond(500,{data: {description: 'you fail'}});
+ .respond(500,{description: 'you fail'});
dataservice.getPeople().catch(function(error) {
- expect(true)... |
7464095a8f29a8e7630ac518a34c74ff1ed75c49 | src/js/components/CollapsibleContainer.js | src/js/components/CollapsibleContainer.js | import React, {Component} from 'react';
import Icon from './Icon';
class CollapsibleContainer extends Component {
constructor() {
super(...arguments);
this.state = {
toggle: false
};
this.toggleContainer = this.toggleContainer.bind(this);
}
toggleContainer() {
this.setState({toggle: ... | import React, {Component} from 'react';
import Icon from './Icon';
class CollapsibleContainer extends Component {
constructor() {
super(...arguments);
this.state = {
toggle: false
};
this.toggleContainer = this.toggleContainer.bind(this);
}
toggleContainer() {
this.setState({toggle: ... | Add required flag to label prop | Add required flag to label prop
| JavaScript | apache-2.0 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | ---
+++
@@ -51,7 +51,7 @@
};
CollapsibleContainer.propTypes = {
- label: React.PropTypes.string
+ label: React.PropTypes.string.isRequired
};
module.exports = CollapsibleContainer; |
a392c18f48b1af268e6882fde1ca09f75a87e73a | packages/pundle-chunk-transformer-js-uglify/src/index.js | packages/pundle-chunk-transformer-js-uglify/src/index.js | // @flow
import { minify as processUglify } from 'uglify-es'
import { minify as processTerser } from 'terser'
import { createChunkTransformer } from 'pundle-api'
import manifest from '../package.json'
// TODO: Fix source maps
const VALID_UGLIFIERS = new Set(['uglify', 'terser'])
function createComponent({ options = ... | // @flow
import { minify as processUglify } from 'uglify-es'
import { minify as processTerser } from 'terser'
import { createChunkTransformer } from 'pundle-api'
import manifest from '../package.json'
// TODO: Fix source maps
const VALID_UGLIFIERS = new Set(['uglify', 'terser'])
function createComponent({ options = ... | Tweak uglifyjs config to be faster | :racehorse: Tweak uglifyjs config to be faster
| JavaScript | mit | motion/pundle,steelbrain/pundle,steelbrain/pundle,steelbrain/pundle | ---
+++
@@ -22,6 +22,10 @@
const uglify = uglifier === 'terser' ? processTerser : processUglify
const { code, error } = uglify(typeof contents === 'string' ? contents : contents.toString(), {
...options,
+ compress: {
+ defaults: false,
+ ...options.compress,
+ ... |
91db0045d899443f5c18c0dc42b51b679abe3aa4 | ui/src/shared/middleware/resizeLayout.js | ui/src/shared/middleware/resizeLayout.js | // Trigger resize event to relayout the React Layout plugin
export default function resizeLayout() {
return next => action => {
next(action)
if (
action.type === 'ENABLE_PRESENTATION_MODE' ||
action.type === 'DISABLE_PRESENTATION_MODE'
) {
// Uses longer event object creation method due... | // Trigger resize event to relayout the React Layout plugin
import {enablePresentationMode} from '../actions/app'
export default function resizeLayout() {
return next => action => {
next(action)
if (
action.type === 'ENABLE_PRESENTATION_MODE' ||
action.type === 'DISABLE_PRESENTATION_MODE'
) {... | Add 'present' url query/search param to presentation mode middleware. | Add 'present' url query/search param to presentation mode middleware.
| JavaScript | mit | mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdata/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/inf... | ---
+++
@@ -1,4 +1,5 @@
// Trigger resize event to relayout the React Layout plugin
+import {enablePresentationMode} from '../actions/app'
export default function resizeLayout() {
return next => action => {
@@ -12,5 +13,9 @@
evt.initEvent('resize', false, true)
window.dispatchEvent(evt)
}
+ ... |
dd89728416e7078caf39b7dcb3182ab30d52e594 | web_modules/layouts/PageLoading/index.js | web_modules/layouts/PageLoading/index.js | import React, { Component } from "react"
import TopBarProgressIndicator from "react-topbar-progress-indicator"
import styles from "./index.css"
TopBarProgressIndicator.config({
barColors: {
"0": "#0085a1",
"1.0": "#0085a1",
},
shadowBlur: 5,
})
export default class PageLoading extends Component {
re... | import React, { Component } from "react"
import TopBarProgressIndicator from "react-topbar-progress-indicator"
import styles from "./index.css"
TopBarProgressIndicator.config({
barColors: {
"0": "#fff",
"1.0": "#fff",
},
shadowBlur: 5,
})
export default class PageLoading extends Component {
render()... | Update color to match with header | ui(topbar): Update color to match with header
| JavaScript | mit | thangngoc89/blog | ---
+++
@@ -5,8 +5,8 @@
TopBarProgressIndicator.config({
barColors: {
- "0": "#0085a1",
- "1.0": "#0085a1",
+ "0": "#fff",
+ "1.0": "#fff",
},
shadowBlur: 5,
}) |
1f1dfbc27a77fed2844a128c5dc38b1ffad3bab6 | gulpfile.js | gulpfile.js | var gulp = require('gulp');
var sass = require('gulp-sass');
var sasslint = require('gulp-sass-lint');
var sourcemaps = require('gulp-sourcemaps');
var rename = require('gulp-rename');
var header = require('gulp-header');
var pkg = require('./package.json');
var banner = '/*! <%= pkg.name %>: v.<%= pkg.version %>, las... | var gulp = require('gulp');
var sass = require('gulp-sass');
var sasslint = require('gulp-sass-lint');
var sourcemaps = require('gulp-sourcemaps');
var rename = require('gulp-rename');
var header = require('gulp-header');
var pkg = require('./package.json');
var banner = '/*! <%= pkg.name %>: v.<%= pkg.version %>, las... | Comment out missing call to notify plugin | Comment out missing call to notify plugin
| JavaScript | mit | TMG-88/TAH,TMG-88/TAH,TMG-88/hello-world,TMG-88/hello-world | ---
+++
@@ -31,7 +31,7 @@
.pipe(header(banner, {pkg : pkg}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./css'))
- .pipe(notify(notifyMsg));
+ //.pipe(notify(notifyMsg));
});
gulp.task('default', ['styles:dev']); |
33f7cbd804244528bce4286f7f8806feb6f8d159 | src/request/stores/request-entry-store.js | src/request/stores/request-entry-store.js | var glimpse = require('glimpse'),
_requests = [];
(function() {
function dataFound(payload) {
// TODO: Really bad hack to get things going atm
_requests = payload.allRequests;
glimpse.emit('shell.request.summary.changed', _requests);
}
// External data coming in
glimpse.on... | var glimpse = require('glimpse'),
_requests = [],
_filteredRequests = [],
_filters = {};
function requestsChanged(targetRequests) {
glimpse.emit('shell.request.summary.changed', targetRequests);
}
// TODO: This needs to be refactored to dynamically lookup records, etc
// TODO: Even at the moment this ... | Implement a basic version of filtering based on use selection | Implement a basic version of filtering based on use selection
| JavaScript | unknown | avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,avanderhoorn/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype,Glimpse/Glimpse.Client.Prototype | ---
+++
@@ -1,12 +1,73 @@
var glimpse = require('glimpse'),
- _requests = [];
+ _requests = [],
+ _filteredRequests = [],
+ _filters = {};
+
+function requestsChanged(targetRequests) {
+ glimpse.emit('shell.request.summary.changed', targetRequests);
+}
+
+// TODO: This needs to be refactored to dynami... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.