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 |
|---|---|---|---|---|---|---|---|---|---|---|
58dd0255dc16aea48eedc2bee64da922a9e8d394 | src/server/action/Executor.js | src/server/action/Executor.js | import ExecutorBase from '../../action/Executor';
import types from '../../action/types';
export default class Executor extends ExecutorBase {
_onAttack(action, world) {
}
} | import ExecutorBase from '../../action/Executor';
export default class Executor extends ExecutorBase {
}
| Remove empty code to prevent jslint errors | Remove empty code to prevent jslint errors
| JavaScript | mit | DirtyHairy/mayrogue-deathmatch,DirtyHairy/mayrogue-deathmatch | ---
+++
@@ -1,10 +1,5 @@
import ExecutorBase from '../../action/Executor';
-import types from '../../action/types';
export default class Executor extends ExecutorBase {
- _onAttack(action, world) {
-
- }
-
} |
571376913b7b8c9d8ea329c6865cd8869c954b25 | karma.conf.js | karma.conf.js | // Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... | // Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... | Increase browser inactivity timeout for test runs. | Increase browser inactivity timeout for test runs.
| JavaScript | mpl-2.0 | thehyve/glowing-bear,thehyve/glowing-bear,thehyve/glowing-bear,thehyve/glowing-bear | ---
+++
@@ -31,6 +31,7 @@
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
- singleRun: false
+ singleRun: false,
+ browserNoActivityTimeout: 30000
});
}; |
7be59a49cb351dcfa4874c885ba017277027849b | karma.conf.js | karma.conf.js | /* eslint-env node */
module.exports = function (config) {
config.set({
basePath: 'public',
browsers: ['ChromeHeadlessCustom'],
files: [
'styles/index.css',
'scripts/mithril.min.js',
'scripts/underscore-min.js',
'scripts/tinyemitter.min.js',
'scripts/sw-update-manager.js',
... | /* eslint-env node */
module.exports = function (config) {
config.set({
basePath: 'public',
browsers: ['ChromeHeadlessCustom'],
files: [
'styles/index.css',
'scripts/mithril.min.js',
'scripts/underscore-min.js',
'scripts/tinyemitter.min.js',
'scripts/sw-update-manager.js',
... | Correct SocketIO path for Karma tests | Correct SocketIO path for Karma tests
The tests should no longer be erroring out.
| JavaScript | mit | caleb531/connect-four | ---
+++
@@ -10,7 +10,7 @@
'scripts/underscore-min.js',
'scripts/tinyemitter.min.js',
'scripts/sw-update-manager.js',
- 'scripts/socket.io.slim.js',
+ 'scripts/socket.io.min.js',
'scripts/clipboard.min.js',
'scripts/test.js'
], |
050359c7399b9e8905d114a2438fa7e374da9811 | tests/collect.test.js | tests/collect.test.js | 'use strict';
(function () {
var expect = require('chai').expect;
var collect = require('../src/collect');
describe('collect.js', function () {
it('should exist', function () {
expect(collect).to.be.ok;
expect(typeof collect).to.equal('function');
});
});
})();
| 'use strict';
(function () {
var expect = require('chai').expect;
var collect = require('../src/collect');
var Jarg = require('../src/jarg');
var Command = require('../src/command');
describe('collect.js', function () {
it('should exist', function () {
expect(collect).to.be.ok;
expect(typ... | Test that collect returns a Jarg instance | Test that collect returns a Jarg instance
| JavaScript | mit | JakeSidSmith/jargs | ---
+++
@@ -5,6 +5,8 @@
var expect = require('chai').expect;
var collect = require('../src/collect');
+ var Jarg = require('../src/jarg');
+ var Command = require('../src/command');
describe('collect.js', function () {
@@ -13,6 +15,18 @@
expect(typeof collect).to.equal('function');
});
... |
ebdaf4dd46279ee1650fd4fc1a5128f0c404ee79 | tests/compile/main.js | tests/compile/main.js | goog.provide('Main');
// Core
// Either require 'Blockly.requires', or just the components you use:
goog.require('Blockly');
goog.require('Blockly.FieldDropdown');
goog.require('Blockly.FieldImage');
goog.require('Blockly.FieldNumber');
goog.require('Blockly.FieldTextInput');
goog.require('Blockly.FieldVariable');
goog... | goog.provide('Main');
// Core
// Either require 'Blockly.requires', or just the components you use:
goog.require('Blockly');
goog.require('Blockly.geras.Renderer');
// Blocks
goog.require('Blockly.Constants.Logic');
goog.require('Blockly.Constants.Loops');
goog.require('Blockly.Constants.Math');
goog.require('Blockly.C... | Remove now unneeded requires from compile test. | Remove now unneeded requires from compile test.
| JavaScript | apache-2.0 | mark-friedman/blockly,picklesrus/blockly,google/blockly,picklesrus/blockly,mark-friedman/blockly,mark-friedman/blockly,google/blockly,mark-friedman/blockly,mark-friedman/blockly,mark-friedman/blockly,google/blockly,rachel-fenichel/blockly,rachel-fenichel/blockly,google/blockly,rachel-fenichel/blockly,google/blockly,rac... | ---
+++
@@ -2,11 +2,6 @@
// Core
// Either require 'Blockly.requires', or just the components you use:
goog.require('Blockly');
-goog.require('Blockly.FieldDropdown');
-goog.require('Blockly.FieldImage');
-goog.require('Blockly.FieldNumber');
-goog.require('Blockly.FieldTextInput');
-goog.require('Blockly.FieldVar... |
3c21402775b39586d62cc137f4832c3397192aac | public/javascripts/documents.js | public/javascripts/documents.js | $(document).ready(function(){
var i=0;
var $td;
var state;
function checkDocumentsStatuses(){
$.getJSON("/api/documents_states", function(data){
var $bars = $(".bar");
for(i=0;i<$bars.length;i++){
$($bars[i]).css("width", data[i] + "%");
}
});
setTimeout(checkDocumentsStat... | $(document).ready(function(){
var i=0;
var $td;
var state;
function checkDocumentsStatuses(){
$.getJSON("/api/documents_states", function(data){
var $bars = $(".bar");
for(i=0;i<$bars.length;i++){
$($bars[i]).css("width", data[i] + "%");
}
});
setTimeout(checkDocumentsStat... | Stop event bubbling when clicking on document toolbar | Stop event bubbling when clicking on document toolbar
| JavaScript | mit | analiceme/chaos | ---
+++
@@ -30,7 +30,7 @@
if($(".tablesorter").length !== 0) {
$(".tablesorter").tablesorter();
}
- $(".documents tbody tr").click(function() {
+ $(".documents tbody tr").click(function(e) {
$(this).siblings().removeClass("selected");
$(this).addClass("selected");
var url = "/api/" + $(thi... |
b6988ddfadcc5636fcdfff772715cd5199954f04 | tasks/lib/sigint-hook.js | tasks/lib/sigint-hook.js | var sigintHooked = false;
module.exports = function sigintHook( fn ) {
if ( sigintHooked ) {
return;
}
sigintHooked = true;
// ctrl+c should stop this task and quit grunt gracefully
// (process.on("SIGINT", fn) doesn't behave correctly on Windows):
var rl = require( "readline" ).createInterface( {
input: pro... | var sigintHooked = false;
module.exports = function sigintHook( fn ) {
if ( sigintHooked ) {
return;
}
sigintHooked = true;
// ctrl+c should stop this task and quit grunt gracefully
// (process.on("SIGINT", fn) doesn't behave correctly on Windows):
var rl = require( "readline" ).createInterface( {
input: pro... | Reset sigint hook when readline closes. | Reset sigint hook when readline closes.
| JavaScript | mit | peol/grunt-surveil | ---
+++
@@ -14,5 +14,6 @@
rl.on( "SIGINT", function() {
fn();
rl.close();
+ sigintHooked = false;
} );
}; |
6eb0da204f11a2396f1f663675c0e5406554ca9b | declarative-shadow-dom.js | declarative-shadow-dom.js | customElements.define('declarative-shadow-dom', class extends HTMLTemplateElement {
static get observedAttributes() {
return [];
}
constructor(self) {
// assignment required by polyfill
self = super(self);
}
connectedCallback(){
this.appendToParentsShadowRoot();
... | customElements.define('declarative-shadow-dom', class extends HTMLTemplateElement {
static get observedAttributes() {
return [];
}
constructor(self) {
// assignment required by polyfill
self = super(self);
}
connectedCallback(){
this.appendToParentsShadowRoot();
... | Fix check for ShadyCSS polyfill | Fix check for ShadyCSS polyfill
| JavaScript | mit | tomalec/declarative-shadow-dom,tomalec/declarative-shadow-dom | ---
+++
@@ -22,7 +22,7 @@
this.stampedNodes = Array.prototype.slice.call(fragment.childNodes);
parentElement.shadowRoot.appendChild(fragment);
// debugger
- ShadyCSS && ShadyCSS.styleElement(parentElement);
+ typeof ShadyCSS !== 'undefined' && ShadyCSS.styleElement(parentEleme... |
bd77652a50eb0feab274d65ed45a127ddf2402c7 | src/components/chat/AddChatMessage.js | src/components/chat/AddChatMessage.js | import React from 'react'
import PropTypes from 'prop-types'
/* Component with a state */
export default class AddChatMessage extends React.Component {
constructor(props) {
super(props)
this.state = {message: ''}
}
onChangeMessage = (e) => {
this.setState({message: e.target.value})
}
onSendCick = () => {
... | import React from 'react'
import PropTypes from 'prop-types'
/* Component with a state */
export default class AddChatMessage extends React.Component {
constructor(props) {
super(props)
this.state = {message: ''}
}
onChangeMessage = (e) => {
this.setState({message: e.target.value})
}
onSendCick = () => {
... | Set focus back to textarea after button was pressed | Set focus back to textarea after button was pressed
| JavaScript | mit | axax/lunuc,axax/lunuc,axax/lunuc | ---
+++
@@ -14,6 +14,7 @@
onSendCick = () => {
this.props.onClick({message: this.state.message})
this.setState({message:''})
+ this.textInput.focus()
}
handleKeyPress = (e) => {
@@ -27,7 +28,7 @@
render() {
return (
<div>
- <textarea onChange={this.onChangeMessage} onKeyPress={this.handleKe... |
594ece2b5001d39a2cd255c2a25829a1291cb75f | test/compare-versions.js | test/compare-versions.js | import test from 'ava';
import fn from '../source/libs/compare-versions';
test('Compare versions', t => {
t.is(-1, fn('1', '2'));
t.is(-1, fn('v1', '2'));
t.is(-1, fn('1.1', '1.2'));
t.is(-1, fn('1', '1.1'));
t.is(-1, fn('1', '1.0.1'));
t.is(-1, fn('2.0', '10.0'));
t.is(-1, fn('1.2.3', '1.22.3'));
t.is(-1, fn(... | import test from 'ava';
import fn from '../source/libs/compare-versions';
test('Compare versions', t => {
t.is(-1, fn('1', '2'));
t.is(-1, fn('v1', '2'));
t.is(-1, fn('1.1', '1.2'));
t.is(-1, fn('1', '1.1'));
t.is(-1, fn('1', '1.0.1'));
t.is(-1, fn('2.0', '10.0'));
t.is(-1, fn('1.2.3', '1.22.3'));
t.is(-1, fn(... | Add failing beta version test | Add failing beta version test
| JavaScript | mit | busches/refined-github,busches/refined-github,sindresorhus/refined-github,sindresorhus/refined-github | ---
+++
@@ -11,6 +11,9 @@
t.is(-1, fn('1.2.3', '1.22.3'));
t.is(-1, fn('1.1.1.1.1', '1.1.1.1.2'));
t.is(-1, fn('r1', 'r2'));
+});
+
+test.failing('Support beta versions', t => {
t.is(-1, fn('1.0-beta', '1.0'));
- t.is(-1, fn('v0.11-M4', 'v0.20'));
+ t.is(-1, fn('v2.0-RC4', 'v2.0'));
}); |
ee8ab3561b9722c327bac0b1ea082ab510156977 | test/mithril.withAttr.js | test/mithril.withAttr.js | describe("m.withAttr()", function () {
"use strict"
it("calls the handler with the right value/context without callbackThis", function () { // eslint-disable-line
var spy = sinon.spy()
var object = {}
m.withAttr("test", spy).call(object, {currentTarget: {test: "foo"}})
expect(spy).to.be.calledOn(object).and.... | describe("m.withAttr()", function () {
"use strict"
it("calls the handler with the right value/context without callbackThis", function () { // eslint-disable-line
var spy = sinon.spy()
var object = {}
m.withAttr("test", spy).call(object, {currentTarget: {test: "foo"}})
expect(spy).to.be.calledOn(object).and.... | Break a test of the new suite | Break a test of the new suite
| JavaScript | mit | MithrilJS/mithril.js,tivac/mithril.js,lhorie/mithril.js,impinball/mithril.js,barneycarroll/mithril.js,impinball/mithril.js,tivac/mithril.js,pygy/mithril.js,MithrilJS/mithril.js,pygy/mithril.js,barneycarroll/mithril.js,lhorie/mithril.js | ---
+++
@@ -12,6 +12,6 @@
var spy = sinon.spy()
var object = {}
m.withAttr("test", spy, object)({currentTarget: {test: "foo"}})
- expect(spy).to.be.calledOn(object).and.calledWith("foo")
+ expect(spy).to.be.calledOn(object).and.calledWith("Ofoo")
})
}) |
67b66b5568f264a9ed4b0940de406ed26797fd4e | test/specificity.test.js | test/specificity.test.js | var path = require('path'),
assert = require('assert'),
fs = require('fs');
var carto = require('../lib/carto');
var tree = require('../lib/carto').tree;
var helper = require('./support/helper');
function cleanupItem(key, value) {
if (key === 'rules') return;
else if (key === 'ruleIndex') return;
... | var path = require('path'),
assert = require('assert'),
fs = require('fs');
var carto = require('../lib/carto');
var tree = require('../lib/carto').tree;
var helper = require('./support/helper');
function cleanupItem(key, value) {
if (key === 'rules') return;
else if (key === 'ruleIndex') return;
... | Fix zoom interpretation in helper | Fix zoom interpretation in helper
| JavaScript | apache-2.0 | pnorman/carto,clhenrick/carto,CartoDB/carto,CartoDB/carto,gravitystorm/carto,stefanklug/carto,tomhughes/carto,whitelynx/carto,mapbox/carto,midnightcomm/carto,madeinqc/carto,1ec5/carto | ---
+++
@@ -17,7 +17,7 @@
}
else if (key === 'attachment' && value === '__default__') return;
else if (key === 'zoom') {
- if (value != tree.Zoom.all) return tree.Zoom.toString(value);
+ if (value != tree.Zoom.all) return (new tree.Zoom()).setZoom(value).toString();
}
else retur... |
e65b54770e47356e2aba9afc46b1551fa7ece6b0 | build/tasks/dev.js | build/tasks/dev.js | import gulp from 'gulp'
import path from 'path'
import BrowserSync from 'browser-sync'
import { compiler, handleWebpackResults } from '../webpack/compiler'
const browserSync = BrowserSync.create()
const args = global.__args
const themeDir = path.resolve(__pkg._themepath)
const themeRelPath = themeDir.replace(process.c... | import gulp from 'gulp'
import path from 'path'
import BrowserSync from 'browser-sync'
import { compiler, handleWebpackResults } from '../webpack/compiler'
const browserSync = BrowserSync.create()
const args = global.__args
const themeDir = path.resolve(__pkg._themepath)
const themeRelPath = themeDir.replace(process.c... | Make sure CSS files are watched | Make sure CSS files are watched
| JavaScript | mit | 3five/Rudiments-Stack,3five/Rudiments-Stack,3five/Rudiments-Stack,3five/Rudiments-Stack,3five/Rudiments-Stack | ---
+++
@@ -19,6 +19,7 @@
proxy: __pkg._criticalUrl,
files: [
`${themeRelPath}/assets/js/*.js`,
+ `${themeRelPath}/assets/css/*.css`,
`${themeRelPath}/**/*.php`
]
}) |
03217724b92da3636e1e8b81acd35d652a21bc57 | packages/expo/bin/commands/add-hook.js | packages/expo/bin/commands/add-hook.js | const prompts = require('prompts')
const addHook = require('../lib/add-hook')
const { onCancel } = require('../lib/utils')
const { blue, yellow } = require('kleur')
module.exports = async (argv, globalOpts) => {
const res = await prompts({
type: 'confirm',
name: 'addHook',
message: `This will modify your... | const prompts = require('prompts')
const addHook = require('../lib/add-hook')
const { onCancel } = require('../lib/utils')
const { blue, yellow } = require('kleur')
module.exports = async (argv, globalOpts) => {
const res = await prompts({
type: 'confirm',
name: 'addHook',
message,
initial: true
},... | Add API hook command should say what it's going to do | fix(expo-cli): Add API hook command should say what it's going to do
| JavaScript | mit | bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js,bugsnag/bugsnag-js | ---
+++
@@ -7,7 +7,7 @@
const res = await prompts({
type: 'confirm',
name: 'addHook',
- message: `This will modify your app.json. Is that ok?`,
+ message,
initial: true
}, { onCancel })
if (res.addHook) {
@@ -16,3 +16,5 @@
if (msg) console.log(yellow(` ${msg}`))
}
}
+
+const me... |
2fbf834731d37d53d81238f58866ff90edca5cbb | src/editor/components/RefComponent.js | src/editor/components/RefComponent.js | import { NodeComponent } from 'substance'
import { renderEntity } from '../../entities/entityHelpers'
export default class RefComponent extends NodeComponent {
render($$) {
const db = this.context.pubMetaDbSession.getDocument()
const ref = this.props.node
let label = _getReferenceLabel(ref)
let enti... | import { NodeComponent } from 'substance'
import { renderEntity } from '../../entities/entityHelpers'
export default class RefComponent extends NodeComponent {
render($$) {
const db = this.context.pubMetaDbSession.getDocument()
const ref = this.props.node
let label = _getReferenceLabel(ref)
let enti... | Set data-id on ref component. | Set data-id on ref component.
| JavaScript | mit | substance/texture,substance/texture | ---
+++
@@ -16,7 +16,7 @@
return $$('div').addClass('sc-ref-component').append(
$$('div').addClass('se-label').append(label),
$$('div').addClass('se-text').html(entityHtml)
- )
+ ).attr('data-id', ref.id)
}
}
|
eb3035ffcf0d68ad7477c0b25021fa46cbe32ab1 | templates/src/scripts/main.js | templates/src/scripts/main.js | var words = 'Hello Camp JS'.split(' ');
words.forEach((word) => document.body.innerHTML += '<p>' + word + '</p>');
| var words = 'Hello Camp JS'.split(' ');
words.forEach(word => document.body.innerHTML += '<p>' + word + '</p>');
| Drop parens for arrow function | Drop parens for arrow function
| JavaScript | mit | markdalgleish/slush-campjs-gulp | ---
+++
@@ -1,2 +1,2 @@
var words = 'Hello Camp JS'.split(' ');
-words.forEach((word) => document.body.innerHTML += '<p>' + word + '</p>');
+words.forEach(word => document.body.innerHTML += '<p>' + word + '</p>'); |
67098dc24693d31a34ac2fd78d9b145b4e8aee9a | bin/avails.js | bin/avails.js | #!/usr/bin/env node
var packageJson = require('../package.json');
var program = require('commander');
program
.version(packageJson.version)
.description(packageJson.description)
.command('convert', 'convert Avails between various formats', {
isDefault: true
})
.parse(process.argv);
| #!/usr/bin/env node
var packageJson = require('../package.json');
var program = require('commander');
program
.version(packageJson.version)
.description(packageJson.description)
.command('convert', 'convert Avails between various formats')
.command('merge', 'merge historical Avails into one')
.parse(proces... | Remove default setting for Avails command | Remove default setting for Avails command
| JavaScript | mit | pivotshare/avails | ---
+++
@@ -7,7 +7,6 @@
program
.version(packageJson.version)
.description(packageJson.description)
- .command('convert', 'convert Avails between various formats', {
- isDefault: true
- })
+ .command('convert', 'convert Avails between various formats')
+ .command('merge', 'merge historical Avails into o... |
225f12f2527e9d8d7d6d4b65da642375d31ffbcc | src/javascript/binary/static_pages/video_facility.js | src/javascript/binary/static_pages/video_facility.js | const BinaryPjax = require('../base/binary_pjax');
const Client = require('../base/client');
const defaultRedirectUrl = require('../base/url').defaultRedirectUrl;
const getLoginToken = require('../common_functions/common_functions').getLoginToken;
const DeskWidget = require('../common_f... | const BinaryPjax = require('../base/binary_pjax');
const Client = require('../base/client');
const localize = require('../base/localize').localize;
const defaultRedirectUrl = require('../base/url').defaultRedirectUrl;
const getLoginToken = require('../common_functions/common_functions... | Hide video facility contents from non-financial clients | Hide video facility contents from non-financial clients
| JavaScript | apache-2.0 | negar-binary/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,4p00rv/binary-static,ashkanx/binary-static,binary-com/binary-static,raunakkathuria/binary-static,binary-static-deployed/binary-static,kellybinary/binary-static,kellybinary/binary-static,4p00rv/binary-static,binary-com/binary-static,bi... | ---
+++
@@ -1,5 +1,6 @@
const BinaryPjax = require('../base/binary_pjax');
const Client = require('../base/client');
+const localize = require('../base/localize').localize;
const defaultRedirectUrl = require('../base/url').defaultRedirectUrl;
const getLoginToken = require('../co... |
2e4976b3515f7afda8275fe89b2ac16b3e2c4f2c | sections/faqs/when-to-use-attrs.js | sections/faqs/when-to-use-attrs.js | import md from 'components/md'
const WhenToUseAttrs = () => md`
## When to use attrs?
You can pass in attributes to styled components using \`attrs\`, but
it is not always sensible to do so.
The rule of thumb is to use \`attrs\` when you want every instance of a styled
component to have that prop, and pass... | import md from 'components/md'
const WhenToUseAttrs = () => md`
## When to use attrs?
You can pass in attributes to styled components using [attrs](/docs/basics#attaching-additional-props), but
it is not always sensible to do so.
The rule of thumb is to use \`attrs\` when you want every instance of a styled
... | Add a link to attrs in the docs | Add a link to attrs in the docs
| JavaScript | mit | styled-components/styled-components-website,styled-components/styled-components-website | ---
+++
@@ -3,7 +3,7 @@
const WhenToUseAttrs = () => md`
## When to use attrs?
- You can pass in attributes to styled components using \`attrs\`, but
+ You can pass in attributes to styled components using [attrs](/docs/basics#attaching-additional-props), but
it is not always sensible to do so.
The ru... |
cb68c4e32710ae8963df5f1b60d0b3bda6a61404 | server/controllers/eventPreview.js | server/controllers/eventPreview.js | import {
DEFAULT_LIMIT,
DEFAULT_OFFSET,
} from './base'
import {
EventBelongsToManyImage,
EventBelongsToPlace,
EventHasManySlots,
} from '../database/associations'
import Event from '../models/event'
export default {
findAll: (req, res, next) => {
const {
limit = DEFAULT_LIMIT,
offset = D... | import {
DEFAULT_LIMIT,
DEFAULT_OFFSET,
} from './base'
import {
EventBelongsToManyImage,
EventBelongsToPlace,
EventHasManySlots,
} from '../database/associations'
import Event from '../models/event'
export default {
findAll: (req, res, next) => {
const {
limit = DEFAULT_LIMIT,
offset = D... | Enable distinct results for calendar preview | Enable distinct results for calendar preview
| JavaScript | agpl-3.0 | adzialocha/hoffnung3000,adzialocha/hoffnung3000 | ---
+++
@@ -19,6 +19,7 @@
} = req.query
return Event.findAndCountAll({
+ distinct: true,
include: [
EventBelongsToManyImage,
EventHasManySlots, { |
69f93bb91f57900f337b6ba7c5d0602e6846cdd8 | lib/addMethod/validateRESTInput.js | lib/addMethod/validateRESTInput.js | var _ = require('lodash');
module.exports = function (methodName, config) {
// Ensure the minimum parameters have been passed
if (!methodName || !_.isString(methodName)) {
throw new Error('The first parameter passed to `addMethod` should be a string.');
}
// If a function is inputted as the `config`, then just ... | var _ = require('lodash');
module.exports = function (methodName, config) {
// Ensure the minimum parameters have been passed
if (!methodName || !_.isString(methodName)) {
throw new Error('The first parameter passed to `addMethod` should be a string.');
}
// If a function is inputted as the `config`, then just ... | Allow method URL to be an empty string | Allow method URL to be an empty string
| JavaScript | mit | trayio/threadneedle | ---
+++
@@ -21,7 +21,7 @@
}
// Ensure the config parameters have been specified correctly
- if (!config.url) {
+ if (!config.url && config.url !== '') {
throw new Error('The `url` config parameter should be declared.');
}
if (!config.method || !_.isString(config.method)) { |
be394881923665df48a9d9b82c290e2c8a03a41a | server/entities/team/team.model.js | server/entities/team/team.model.js | 'use strict';
let mongoose = require('mongoose');
let Schema = mongoose.Schema;
let teamSchema = new Schema({
name : {
type: String,
required: true,
unique: true
},
email : {
type: String,
required: true,
unique: true
},
description : {
type:... | 'use strict';
let mongoose = require('mongoose');
let Schema = mongoose.Schema;
let teamSchema = new Schema({
name : {
type: String,
required: true,
unique: true
},
email : {
type: String,
required: true
},
description : {
type: String
},
log... | Remove unique emails for teams | fix(server): Remove unique emails for teams
| JavaScript | apache-2.0 | asso-labeli/nuitinfo,asso-labeli/nuitinfo,asso-labeli/nuitinfo | ---
+++
@@ -11,8 +11,7 @@
},
email : {
type: String,
- required: true,
- unique: true
+ required: true
},
description : {
type: String |
16fa91c15f27843b8d947ca47fac4e50bd765d2f | lib/controllers/list_controller.js | lib/controllers/list_controller.js | ListController = RouteController.extend({
layoutTemplate: 'Layout',
subscriptions: function () {
this.subscribe('hosts');
},
action: function () {
this.render('HostList');
}
});
| ListController = RouteController.extend({
layoutTemplate: 'Layout',
subscriptions: function () {
this.subscribe('hosts', {
sort: {sort: 1}
});
},
action: function () {
this.render('HostList');
}
});
| Add sort for host list subscription. | Add sort for host list subscription.
| JavaScript | mit | steyep/syrinx,hb5co/syrinx,mikebarkas/syrinx,bfodeke/syrinx,bfodeke/syrinx,hb5co/syrinx,steyep/syrinx,shrop/syrinx,shrop/syrinx,mikebarkas/syrinx | ---
+++
@@ -2,7 +2,9 @@
layoutTemplate: 'Layout',
subscriptions: function () {
- this.subscribe('hosts');
+ this.subscribe('hosts', {
+ sort: {sort: 1}
+ });
},
action: function () { |
0889452062f149dbba5ce8acf005908fd7355b34 | app/assets/javascripts/_analytics.js | app/assets/javascripts/_analytics.js | (function() {
"use strict";
GOVUK.Tracker.load();
var cookieDomain = (document.domain === 'www.beta.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;
GOVUK.analytics = new GOVUK.Tracker({
universalId: 'UA-49258698-3',
cookieDomain: cookieDomain
});
GOVUK.a... | (function() {
"use strict";
GOVUK.Tracker.load();
var cookieDomain = (document.domain === 'www.beta.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;
var property = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? 'UA-49258698-1' : 'UA-49258698-3';
GO... | Use correct analytics properties for live/other | Use correct analytics properties for live/other
This commit makes the app select different Google analytics properties to track
against depending on which domain the user is browsing.
This will ensure continuity of analytics when we switch the DNS.
| JavaScript | mit | alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend,alphagov/digitalmarketplace-supplier-frontend | ---
+++
@@ -2,8 +2,9 @@
"use strict";
GOVUK.Tracker.load();
var cookieDomain = (document.domain === 'www.beta.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;
+ var property = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? 'UA-49258698-1' : 'UA-4... |
ea87c51a6de416f083d9015166db9008b800da61 | assets/js/components/Chip.stories.js | assets/js/components/Chip.stories.js | /**
* Chip Component Stories.
*
* Site Kit by Google, Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*... | /**
* Chip Component Stories.
*
* Site Kit by Google, Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*... | Add story for a selected chip. | Add story for a selected chip.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | ---
+++
@@ -23,11 +23,19 @@
const Template = ( args ) => <Chip { ...args } />;
-export const DefaultButton = Template.bind( {} );
-DefaultButton.storyName = 'Default Chip';
-DefaultButton.args = {
+export const DefaultChip = Template.bind( {} );
+DefaultChip.storyName = 'Default Chip';
+DefaultChip.args = {
id... |
cacebb76a7554c5713d4f88a8060969c0eea7d7c | app/scripts/filters/previewfilter.js | app/scripts/filters/previewfilter.js | 'use strict';
/**
* @ngdoc filter
* @name dockstore.ui.filter:PreviewFilter
* @function
* @description
* # PreviewFilter
* Filter in the dockstore.ui.
*/
angular.module('dockstore.ui')
.filter('PreviewFilter', [function () {
return function (containers, contLimit) {
if (!contLimit) return containers... | 'use strict';
/**
* @ngdoc filter
* @name dockstore.ui.filter:PreviewFilter
* @function
* @description
* # PreviewFilter
* Filter in the dockstore.ui.
*/
angular.module('dockstore.ui')
.filter('PreviewFilter', [function () {
return function (containers, contLimit) {
if (!contLimit) return containers... | Update PreviewFilter for invalid/non-returned timestamps (v3). | Update PreviewFilter for invalid/non-returned timestamps (v3).
| JavaScript | apache-2.0 | ga4gh/dockstore-ui,ga4gh/dockstore-ui,ga4gh/dockstore-ui | ---
+++
@@ -13,7 +13,7 @@
return function (containers, contLimit) {
if (!contLimit) return containers;
var sortedByBuildTime = containers.sort(function(a, b) {
- if (!a.lastBuild) a.lastBuild.lastBuild = Number.MAX_VALUE;
+ if (!a.lastBuild) a.lastBuild = Number.MAX_VALUE;
if (!... |
4ec65ebe85d0a1f74373840b5d3418888b30caf6 | lib/ext/function/promisify-sync.js | lib/ext/function/promisify-sync.js | // Promisify synchronous function
'use strict';
var callable = require('es5-ext/lib/Object/valid-callable')
, deferred = require('../../deferred')
, isPromise = require('../../is-promise')
, processArguments = require('../_process-arguments')
, apply = Function.prototype.apply
, app... | // Promisify synchronous function
'use strict';
var callable = require('es5-ext/lib/Object/valid-callable')
, deferred = require('../../deferred')
, isPromise = require('../../is-promise')
, processArguments = require('../_process-arguments')
, apply = Function.prototype.apply
, app... | Fix promisifySync case of promise arguments | Fix promisifySync case of promise arguments
| JavaScript | isc | medikoo/deferred | ---
+++
@@ -40,7 +40,7 @@
}
def = deferred();
args.end(function (args) {
- apply.call(this, fn, args, def.resolve);
+ applyFn.call(this, fn, args, def.resolve);
}.bind(this), def.resolve);
} else {
def = deferred(); |
a55921bc5ee2fa74ce11f8936121ec914240ee56 | createTest.js | createTest.js | var ACCEPTANCE_TESTS_ENDPOINT = 'http://paie.sgmap.fr/tests/api/acceptance-tests',
ACCEPTANCE_TESTS_GUI_URL = 'http://paie.sgmap.fr/tests/';
function createTest() {
var formattedResults = Object.keys(window.lastResult).map(function(key) {
return {
code: key,
expectedValue: window.lastResult[key]
}
});
v... | var ACCEPTANCE_TESTS_ENDPOINT = 'http://paie.sgmap.fr/tests/api/public/acceptance-tests',
ACCEPTANCE_TESTS_GUI_URL = 'http://paie.sgmap.fr/tests/';
function createTest() {
var formattedResults = Object.keys(window.lastResult).map(function(key) {
return {
code: key,
expectedValue: window.lastResult[key]
}
... | Use public API route to add tests | Use public API route to add tests
Avoid sending credentials | JavaScript | agpl-3.0 | sgmap/cout-embauche,sandcha/cout-embauche,sandcha/cout-embauche,sgmap/cout-embauche | ---
+++
@@ -1,4 +1,4 @@
-var ACCEPTANCE_TESTS_ENDPOINT = 'http://paie.sgmap.fr/tests/api/acceptance-tests',
+var ACCEPTANCE_TESTS_ENDPOINT = 'http://paie.sgmap.fr/tests/api/public/acceptance-tests',
ACCEPTANCE_TESTS_GUI_URL = 'http://paie.sgmap.fr/tests/';
function createTest() {
@@ -18,8 +18,6 @@
var reques... |
b7648a75e3fa793aedcbf902b11c64133b34a893 | auto-updater.js | auto-updater.js | const autoUpdater = require('electron').autoUpdater
const Menu = require('electron').Menu
var state = 'checking'
exports.initialize = function () {
autoUpdater.on('checking-for-update', function () {
state = 'checking'
exports.updateMenu()
})
autoUpdater.on('update-available', function () {
state =... | const app = require('electron').app
const autoUpdater = require('electron').autoUpdater
const Menu = require('electron').Menu
var state = 'checking'
exports.initialize = function () {
autoUpdater.on('checking-for-update', function () {
state = 'checking'
exports.updateMenu()
})
autoUpdater.on('update-a... | Add version to update url | Add version to update url
| JavaScript | mit | blep/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,electron/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,electron/electron-api-demos,electron/electron-api-demos | ---
+++
@@ -1,3 +1,4 @@
+const app = require('electron').app
const autoUpdater = require('electron').autoUpdater
const Menu = require('electron').Menu
@@ -29,7 +30,7 @@
exports.updateMenu()
})
- autoUpdater.setFeedURL('https://electron-api-demos.githubapp.com/updates')
+ autoUpdater.setFeedURL(`https:... |
854644f46cdc10387ef27399bbde7a61f835e9bf | scripts/grunt/default_task.js | scripts/grunt/default_task.js | // Lint and build CSS
module.exports = function (grunt) {
'use strict';
grunt.registerTask('default', [
'clean:build',
'phantomjs',
'webpack:dev',
]);
grunt.registerTask('test', [
'sasslint',
'tslint',
'typecheck',
"exec:jest",
'no-only-tests'
]);
grunt.registerTask('tslin... | // Lint and build CSS
module.exports = function (grunt) {
'use strict';
grunt.registerTask('default', [
'clean:build',
'phantomjs',
'webpack:dev',
]);
grunt.registerTask('test', [
'sasslint',
'tslint',
'typecheck',
"exec:jest",
'no-only-tests'
]);
grunt.registerTask('tslin... | Add more patterns to no-only-test task | Add more patterns to no-only-test task
| JavaScript | agpl-3.0 | grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana,grafana/grafana | ---
+++
@@ -34,14 +34,17 @@
]);
grunt.registerTask('no-only-tests', function () {
- var files = grunt.file.expand('public/**/*_specs\.ts', 'public/**/*_specs\.js');
+ var files = grunt.file.expand(
+ 'public/**/*@(_specs|\.test)\.@(ts|js|tsx|jsx)',
+ 'packages/grafana-ui/**/*@(_specs|\.test)\.... |
8d7f9f021d8fbd1469bd812591ff07be1262ac8e | .storybook/config.js | .storybook/config.js | import { configure, addDecorator } from '@storybook/react';
import { setDefaults } from '@storybook/addon-info';
import { setOptions } from '@storybook/addon-options';
import backgroundColor from 'react-storybook-decorator-background';
// addon-info
setDefaults({
header: false,
inline: true,
source: true,
prop... | import { configure, addDecorator } from '@storybook/react';
import { setDefaults } from '@storybook/addon-info';
import { setOptions } from '@storybook/addon-options';
import backgroundColor from 'react-storybook-decorator-background';
// addon-info
setDefaults({
header: true,
inline: true,
source: true,
propT... | Enable header for every story | Enable header for every story
| JavaScript | mit | teamleadercrm/teamleader-ui | ---
+++
@@ -5,7 +5,7 @@
// addon-info
setDefaults({
- header: false,
+ header: true,
inline: true,
source: true,
propTablesExclude: [], |
e1cbf4dbc5186e87a81d40b987f4944ddecfbee6 | babel.config.js | babel.config.js | const presets = [
[
"@babel/env",
{
targets: {
edge: "18",
firefox: "66",
chrome: "73",
safari: "12",
ie: "9"
}
},
],
];
module.exports = {presets};
| const presets = [
[
"@babel/env",
{
targets: {
edge: "18",
firefox: "66",
chrome: "73",
safari: "12",
ie: "11"
}
},
],
];
module.exports = {presets};
| Update babel IE target version to 11 | Update babel IE target version to 11
| JavaScript | mit | defunctzombie/commonjs-assert | ---
+++
@@ -7,7 +7,7 @@
firefox: "66",
chrome: "73",
safari: "12",
- ie: "9"
+ ie: "11"
}
},
], |
b79deb524fe24ae0e82bb1cf377b497657bba459 | public/scripts/run/visibilityEvents.js | public/scripts/run/visibilityEvents.js | "use strict";
angular
.module('app')
.run([
'$document',
'$rootScope',
function($document, $rootScope) {
function visibilitychanged() {
var d = $document[0],
isHidden = d.hidden || d.webkitHidden || d.mozHidden || d.msHidden;
$rootScope.$emit('visibility:change', isHid... | "use strict";
angular
.module('app')
.run([
'$document',
'$rootScope',
function($document, $rootScope) {
var last;
function visibilitychanged() {
var d = $document[0],
isHidden = d.hidden || d.webkitHidden || d.mozHidden || d.msHidden;
if (isHidden !== last) {
... | Fix doubled event of visibility change | Fix doubled event of visibility change
| JavaScript | mit | xemle/spop-web,Schnouki/spop-web,Schnouki/spop-web,xemle/spop-web | ---
+++
@@ -6,10 +6,15 @@
'$document',
'$rootScope',
function($document, $rootScope) {
+ var last;
+
function visibilitychanged() {
var d = $document[0],
isHidden = d.hidden || d.webkitHidden || d.mozHidden || d.msHidden;
- $rootScope.$emit('visibility:change', ... |
892a30519995cbbbb05beb80c405fae2c1ccf155 | webpack.config.js | webpack.config.js | const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
app: './app.js'
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
... | const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
app: './app.js'
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
... | Add source maps to get better debugging in the browser | Add source maps to get better debugging in the browser
| JavaScript | mit | javierportillo/webpack-starter,javierportillo/webpack-starter | ---
+++
@@ -59,5 +59,7 @@
devServer: {
publicPath: '/',
contentBase: path.join(__dirname, 'dist')
- }
+ },
+
+ devtool: "source-map"
} |
96d65ebacf80370c36ac80407ae38c3823294a0e | webpack.config.js | webpack.config.js | var webpack = require('webpack');
var fs = require('fs');
var config = {
entry: {
'app': './app/index.js'
},
devtool: 'source-map',
output: {
path: __dirname + '/dist',
filename: `[name].[hash].js`,
publicPath: __dirname + '/dist'
},
module: {
loaders: [
{
test: /(\.js)$/,... | var webpack = require('webpack');
var fs = require('fs');
var config = {
entry: {
'app': './app/index.js'
},
devtool: 'source-map',
output: {
path: __dirname + '/dist',
filename: `[name].[hash].js`,
publicPath: __dirname + '/dist'
},
module: {
loaders: [
{
test: /(\.js)$/,... | Clear dist on every build | Clear dist on every build
| JavaScript | mit | bsingr/mastermind,bsingr/mastermind | ---
+++
@@ -25,6 +25,9 @@
},
plugins: [
function() {
+ this.plugin("compile", function() {
+ require( 'child_process' ).exec('rm -rf ./dist');
+ });
this.plugin("done", function(stats) {
const hash = stats.toJson().hash;
fs.readFile('./index.html', 'utf8', fu... |
d0758e87e20d9a8996a648fa197c10aec62480ca | lib/server-factory-https.js | lib/server-factory-https.js | module.exports = ServerFactory => class HttpsServerFactory extends ServerFactory {
create (options) {
const fs = require('fs')
const https = require('https')
const t = require('typical')
const serverOptions = {}
if (options.pfx) {
serverOptions.pfx = fs.readFileSync(options.pfx)
} else {... | module.exports = ServerFactory => class HttpsServerFactory extends ServerFactory {
create (options) {
const fs = require('fs')
const https = require('https')
const t = require('typical')
const serverOptions = {}
if (options.pfx) {
serverOptions.pfx = fs.readFileSync(options.pfx)
} else {... | Fix key and cert file params when using personal version | Fix key and cert file params when using personal version
| JavaScript | mit | lwsjs/lws | ---
+++
@@ -10,9 +10,10 @@
if (!(options.key && options.cert)) {
serverOptions.key = this.getDefaultKeyPath()
serverOptions.cert = this.getDefaultCertPath()
+ } else {
+ serverOptions.key = fs.readFileSync(options.key, 'utf8')
+ serverOptions.cert = fs.readFileSync(options.... |
d8d9d6772e72e4d52245a233b1fa40f01d923b44 | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const Dotenv = require('dotenv-webpack');
module.exports = {
entry: {
'facebook-messenger/handler': './src/facebook-messenger/handler.js',
},
target: 'node',
externals: [
'aws-s... | const path = require('path');
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const Dotenv = require('dotenv-webpack');
module.exports = {
entry: {
'facebook-messenger/handler': './src/facebook-messenger/handler.js',
},
target: 'node',
externals: [
'aws-s... | Use full source map in production | Use full source map in production
| JavaScript | mit | kehitysto/coaching-chatbot,kehitysto/coaching-chatbot | ---
+++
@@ -49,5 +49,5 @@
path: path.join(__dirname, '.webpack'),
filename: '[name].js'
},
- devtool: "cheap-module-source-map"
+ devtool: "source-map"
}; |
112aec851eb4c6f85ee4c365f663adc2bc80cb0b | dangerfile.js | dangerfile.js | import { message, danger } from "danger"
message(":tada:, this worked @" + danger.github.pr.user.login)
| import { message, danger } from "danger";
import prettier from 'prettier';
const srcDir = `${__dirname}/src/**/*.js`;
const options = {
singleQuote: true,
printWidth: 100
};
if (prettier.check(srcDir, options)) {
message(':tada: Your code is formatted correctly');
} else {
warn('You haven\'t formated the code... | Check if src dir has been formatted | Check if src dir has been formatted
| JavaScript | mit | ldabiralai/simulado | ---
+++
@@ -1,2 +1,14 @@
-import { message, danger } from "danger"
-message(":tada:, this worked @" + danger.github.pr.user.login)
+import { message, danger } from "danger";
+import prettier from 'prettier';
+
+const srcDir = `${__dirname}/src/**/*.js`;
+const options = {
+ singleQuote: true,
+ printWidth: 100
+};
... |
a2940a6db57615f745b59e8e061ef48993de9918 | addon/index.js | addon/index.js | // this Proxy handler will be used to preserve the unaltered behavior of the window global by default
const doNothingHandler = {
get(target, prop) {
const value = Reflect.get(target, prop);
// make sure the function receives the original window as the this context! (e.g. alert will throw an invalid invocatio... | import { DEBUG } from '@glimmer/env';
let exportedWindow;
let _setCurrentHandler;
if (DEBUG) {
// this Proxy handler will be used to preserve the unaltered behavior of the window global by default
const doNothingHandler = {
get(target, prop) {
const value = Reflect.get(target, prop);
// make sure... | Exclude Proxy code from production build | Exclude Proxy code from production build
| JavaScript | mit | kaliber5/ember-window-mock,kaliber5/ember-window-mock | ---
+++
@@ -1,46 +1,54 @@
-// this Proxy handler will be used to preserve the unaltered behavior of the window global by default
-const doNothingHandler = {
- get(target, prop) {
- const value = Reflect.get(target, prop);
+import { DEBUG } from '@glimmer/env';
- // make sure the function receives the origina... |
876827176d608677adce254c9cc3c957abbcb5f2 | bin/sass-lint.js | bin/sass-lint.js | #!/usr/bin/env node
'use strict';
var program = require('commander'),
meta = require('../package.json'),
lint = require('../index');
var detects;
program
.version(meta.version)
.usage('[options] \'<file or glob>\'')
.option('-q, --no-exit', 'do not exit on errors')
.parse(process.argv);
detects = l... | #!/usr/bin/env node
'use strict';
var program = require('commander'),
meta = require('../package.json'),
lint = require('../index');
var detects,
formatted;
program
.version(meta.version)
.usage('[options] \'<file or glob>\'')
.option('-q, --no-exit', 'do not exit on errors')
.parse(process.argv)... | Fix fail on error for CLI | :bug: Fix fail on error for CLI
| JavaScript | mit | skovhus/sass-lint,benthemonkey/sass-lint,zallek/sass-lint,sasstools/sass-lint,MethodGrab/sass-lint,donabrams/sass-lint,zaplab/sass-lint,joshuacc/sass-lint,srowhani/sass-lint,sktt/sass-lint,carsonmcdonald/sass-lint,Snugug/sass-lint,bgriffith/sass-lint,DanPurdy/sass-lint,srowhani/sass-lint,sasstools/sass-lint,alansouzati... | ---
+++
@@ -5,7 +5,8 @@
meta = require('../package.json'),
lint = require('../index');
-var detects;
+var detects,
+ formatted;
program
.version(meta.version)
@@ -15,9 +16,9 @@
detects = lint.lintFiles(program.args[0]);
-detects = lint.format(detects);
+formatted = lint.format(detects);
-l... |
11a17e6f8655275a75fd0c9be796440e3a2d43c2 | browser/conn.js | browser/conn.js | const MuxDemux = require('mux-demux')
const debug = require('../debug').sub('shoe')
const pull = require('pull-stream')
const stps = require('stream-to-pull-stream')
const psts = require('pull-stream-to-stream')
const EE = require('events').EventEmitter
exports = module.exports = new EE
const con... | const MuxDemux = require('mux-demux')
const debug = require('../debug').sub('shoe')
const pull = require('pull-stream')
const stps = require('stream-to-pull-stream')
const psts = require('pull-stream-to-stream')
const EE = require('events').EventEmitter
exports = module.exports = new EE
const con... | Make the client use the reset channel (Let the server reload the client) | Make the client use the reset channel (Let the server reload the client)
| JavaScript | mit | CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js | ---
+++
@@ -33,5 +33,12 @@
return stps.source(stream)
})
+ pull(
+ mx.source('reset'),
+ pull.drain(function() {
+ window.location.reload()
+ })
+ )
+
exports.emit('connect', mx)
})).connect('/shoe') |
5cd8fcfc08aa1f68a3e7b07654bf9647e8b46032 | app/assets/javascripts/angular/services/url_config.js | app/assets/javascripts/angular/services/url_config.js | angular.module("Prometheus.services").factory('UrlConfigDecoder', function($location) {
return function(defaultHash) {
var hash = $location.hash() || defaultHash;
if (!hash) {
return {};
}
// Decodes UTF-8
// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64.btoa#Unicode_Strings
... | angular.module("Prometheus.services").factory('UrlConfigDecoder', function($location) {
return function(defaultHash) {
var hash = $location.hash() || defaultHash;
if (!hash) {
return {};
}
// Decodes UTF-8.
// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64.btoa#Unicode_Strings... | Add periods to end of encode/decode comments. | Add periods to end of encode/decode comments.
| JavaScript | apache-2.0 | thooams/promdash,alonpeer/promdash,lborguetti/promdash,jonnenauha/promdash,juliusv/promdash,jmptrader/promdash,alonpeer/promdash,prometheus/promdash,jonnenauha/promdash,thooams/promdash,thooams/promdash,jonnenauha/promdash,juliusv/promdash,thooams/promdash,jmptrader/promdash,alonpeer/promdash,juliusv/promdash,juliusv/p... | ---
+++
@@ -4,7 +4,7 @@
if (!hash) {
return {};
}
- // Decodes UTF-8
+ // Decodes UTF-8.
// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64.btoa#Unicode_Strings
var configJSON = unescape(decodeURIComponent(window.atob(hash)));
var config = JSON.parse(configJSON);
@@... |
dfb21cd44ae2c0d1dd70b4a2253839c98daa1683 | src/clusterpost-auth/index.js | src/clusterpost-auth/index.js | var Boom = require('boom');
exports.register = function (server, conf, next) {
const validate = function(req, decodedToken, callback){
var exs = server.methods.executionserver.getExecutionServer(decodedToken.executionserver);
if(exs){
exs.scope = ['executionserver'];
callback(undefined, true, exs);
... | var Boom = require('boom');
exports.register = function (server, conf, next) {
const validate = function(req, decodedToken, callback){
var exs = server.methods.executionserver.getExecutionServer(decodedToken.executionserver);
if(exs){
exs.scope = ['executionserver'];
callback(undefined, true, exs);
... | Use the register function from server when discovering the hapi-jwt-couch plugin | STYLE: Use the register function from server when discovering the hapi-jwt-couch plugin
| JavaScript | apache-2.0 | juanprietob/clusterpost,juanprietob/clusterpost,juanprietob/clusterpost | ---
+++
@@ -14,7 +14,24 @@
conf.validate = validate;
- return require('hapi-jwt-couch').register(server, conf, next);
+ server.register({
+ register: require('hapi-jwt-couch'),
+ options: conf
+ }, function(err){
+
+ if(err){
+ throw err;
+ }
+
+ server.method({
+ name: 'clusterpostauth.verify',
+ me... |
0719710c9d5c34be3a236028848db437269baf03 | server/plugins/bookmarks/validators.js | server/plugins/bookmarks/validators.js | // Validation for bookmark payloads.
'use strict';
var Hoek = require('hoek');
var Joi = require('joi');
var validators = {};
validators.bookmarkID = Joi.string().guid();
// Bookmark without ID. Used for the update and save payloads.
validators.bookmarkWithoutID = {
id: validators.bookmarkID.allow(null),
url: J... | // Validation for bookmark payloads.
'use strict';
var Hoek = require('hoek');
var Joi = require('joi');
var validators = {};
validators.bookmarkID = Joi.string().guid();
// Bookmark without ID. Used for the update and save payloads.
validators.bookmarkWithoutID = {
id: validators.bookmarkID.allow(null),
url: J... | Validate date fields as ISO-format dates. | Validate date fields as ISO-format dates.
| JavaScript | isc | mikl/bookmeister,mikl/bookmeister | ---
+++
@@ -18,9 +18,9 @@
.max(200, 'utf-8')
.allow(null),
description: Joi.string().allow(null),
- added_at: Joi.string().allow(null),
- created_at: Joi.string().allow(null),
- updated_at: Joi.string().allow(null),
+ added_at: Joi.date().iso().allow(null),
+ created_at: Joi.date().iso().allow(null)... |
8382d5c2147188eea4c1a78971a91abbfce32ef9 | src/app/auth/auth.controller.js | src/app/auth/auth.controller.js | (function() {
'use strict';
angular
.module('app.auth')
.controller('AuthController', AuthController);
AuthController.$inject = ['$location', 'authService'];
function AuthController($location, authService) {
var vm = this;
vm.user = {
email: '',
password: ''
};
vm.regist... | (function() {
'use strict';
angular
.module('app.auth')
.controller('AuthController', AuthController);
AuthController.$inject = ['$location', 'authService'];
function AuthController($location, authService) {
var vm = this;
vm.user = {
email: '',
password: ''
};
vm.error =... | Set vm.error in register and login on AuthController. | Set vm.error in register and login on AuthController.
| JavaScript | mit | anthonybrown/angular-course-demo-app-v2,anthonybrown/angular-course-demo-app-v2 | ---
+++
@@ -14,6 +14,7 @@
email: '',
password: ''
};
+ vm.error = null;
vm.register = register;
vm.login = login;
@@ -27,18 +28,17 @@
return authService.sendWelcomeEmail(user.email);
})
.catch(function(error) {
- console.log(error);
+ vm... |
b71557376bb31512ba96a81621b5051166b01f60 | public/js/channel.js | public/js/channel.js | $(function() {
var $loadMore = $('#load-more');
if ($loadMore.length) {
var $spinner = $('#spinner');
function init() {
$spinner.hide();
$.ajaxPrefilter(function(options, _, xhr) {
if (!xhr.crossDomain) {
xhr.setRequestHeader('X-CSRF-Token', securityToken);
}
}... | $(function() {
var $loadMore = $('#load-more');
if ($loadMore.length) {
var $spinner = $('#spinner');
var init = function() {
$spinner.hide();
$.ajaxPrefilter(function(options, _, xhr) {
if (!xhr.crossDomain) {
xhr.setRequestHeader('X-CSRF-Token', securityToken);
}
... | Change function declaration to function expression | Change function declaration to function expression
| JavaScript | mit | CreaturePhil/Usub,CreaturePhil/Usub | ---
+++
@@ -5,19 +5,19 @@
var $spinner = $('#spinner');
- function init() {
+ var init = function() {
$spinner.hide();
$.ajaxPrefilter(function(options, _, xhr) {
if (!xhr.crossDomain) {
xhr.setRequestHeader('X-CSRF-Token', securityToken);
}
});
- }
... |
d5855f3e4fc63f120af56a94f0842fae2ffd4871 | src/components/posts_index.js | src/components/posts_index.js | import _ from 'lodash';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchPosts } from '../actions';
class PostsIndex extends Component {
componentDidMount() {
this.props.fetchPosts();
}
renderPosts() {
return _.map(this.props.posts, post => {
return (
... | import _ from 'lodash';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchPosts } from '../actions';
import { Link } from 'react-router-dom';
class PostsIndex extends Component {
componentDidMount() {
this.props.fetchPosts();
}
renderPosts() {
return _.map(th... | Add button to new post page | Add button to new post page
| JavaScript | mit | heatherpark/blog,heatherpark/blog | ---
+++
@@ -2,6 +2,7 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchPosts } from '../actions';
+import { Link } from 'react-router-dom';
class PostsIndex extends Component {
componentDidMount() {
@@ -21,6 +22,11 @@
render() {
return (
<div>
+ ... |
de48510fa5b038cbdda7d2386bba0419af1b8542 | src/client/reducers/BoardReducer.js | src/client/reducers/BoardReducer.js | import initialState from './initialState';
import {
BOARD_REQUESTED,
BOARD_LOADED,
BOARD_DESTROYED,
BOARD_SCROLLED_BOTTOM
} from '../constants'
export default function (state = initialState.board, action) {
switch (action.type) {
case BOARD_REQUESTED:
return Object.assign({... | import initialState from './initialState';
import {
BOARD_REQUESTED,
BOARD_LOADED,
BOARD_DESTROYED,
BOARD_SCROLLED_BOTTOM,
BOARD_FILTER
} from '../constants'
export default function (state = initialState.board, action) {
switch (action.type) {
case BOARD_REQUESTED:
retu... | Add board reducer case for filtering | Add board reducer case for filtering
| JavaScript | mit | AdamSalma/Lurka,AdamSalma/Lurka | ---
+++
@@ -3,7 +3,8 @@
BOARD_REQUESTED,
BOARD_LOADED,
BOARD_DESTROYED,
- BOARD_SCROLLED_BOTTOM
+ BOARD_SCROLLED_BOTTOM,
+ BOARD_FILTER
} from '../constants'
export default function (state = initialState.board, action) {
@@ -31,6 +32,11 @@
limit: action.payload
... |
9a9c348c05850beb1f3ad7a73bde54eb2d45bab1 | service/load-schemas.js | service/load-schemas.js | // This module loads and exposes an object of all available schemas, using
// the schema key as the object key.
//
// The schemas are loaded from the extension plugin directory. We therefore need
// to have a checkout of the extension alongside the web service in order to use
// this module.
'use strict';
let jsonfile ... | // This module loads and exposes an object of all available schemas, using
// the schema key as the object key. It adds the site metadata to the schema
// header for convenient access.
//
// The schemas and site metadata are loaded from the extension plugin directory.
// We therefore need to have a checkout of the exte... | Use site metadata to find registered plugins/schemas. | Use site metadata to find registered plugins/schemas.
This simplifies loading schemas, and eliminates some dependencies.
We also stash site metadata in the schema object, since it's useful
for tests.
| JavaScript | cc0-1.0 | eloquence/freeyourstuff.cc,eloquence/freeyourstuff.cc | ---
+++
@@ -1,33 +1,27 @@
// This module loads and exposes an object of all available schemas, using
-// the schema key as the object key.
+// the schema key as the object key. It adds the site metadata to the schema
+// header for convenient access.
//
-// The schemas are loaded from the extension plugin directory... |
e53a2b05fc41bf36e85cc4a2fa297d77d29ed1d8 | app/assets/javascripts/home.js | app/assets/javascripts/home.js | <!--[if lt IE 9]>
document.createElement('video');
<!--[endif]-->
$(window).unload(function() {
$.rails.enableFormElements($($.rails.formSubmitSelector));
});
// Cool title effect for "community favorites"
$(window).load(function() {
// get the height of the hero
var pageHeight = $($('.hero')[0]).height();
/... | <!--[if lt IE 9]>
document.createElement('video');
<!--[endif]-->
$(window).unload(function() {
$.rails.enableFormElements($($.rails.formSubmitSelector));
});
// Cool title effect for "community favorites"
$(window).load(function() {
// get the height of the hero
var pageHeight = $($('.hero')[0]).height();
/... | Change var from jquery to normal js var | Change var from jquery to normal js var
| JavaScript | mit | tomazin/OpenFarm,tomazin/OpenFarm,roryaronson/OpenFarm,simonv3/OpenFarm,RickCarlino/OpenFarm,slacker87/OpenFarm,openfarmcc/OpenFarm,CloCkWeRX/OpenFarm,roryaronson/OpenFarm,tomazin/OpenFarm,roryaronson/OpenFarm,slacker87/OpenFarm,CloCkWeRX/OpenFarm,CloCkWeRX/OpenFarm,simonv3/OpenFarm,openfarmcc/OpenFarm,RickCarlino/Open... | ---
+++
@@ -26,13 +26,13 @@
// Darken the title background when the user scrolls to the featured crops header
function updateTitleBackground(scrollPos, pageHeight, titleHeight) {
- $exploreCommunityFavoritesTitle = $($('.explore-community-favorites')[0]);
+ var exploreCommunityFavoritesTitle = $($('.explore-com... |
69b467a039b0b8e9ae21d1d06025a793f6f7f865 | src/components/editor/EmbedBlock.js | src/components/editor/EmbedBlock.js | /* eslint-disable react/no-danger */
import React, { Component, PropTypes } from 'react'
import Block from './Block'
export function reloadPlayers() {
if (typeof window !== 'undefined' && window.embetter) {
window.embetter.reloadPlayers()
}
}
class EmbedBlock extends Component {
static propTypes = {
d... | /* eslint-disable react/no-danger */
import React, { Component, PropTypes } from 'react'
import Block from './Block'
export function reloadPlayers() {
if (typeof window !== 'undefined' && window.embetter) {
window.embetter.reloadPlayers()
}
}
class EmbedBlock extends Component {
static propTypes = {
d... | Fix an issue with embed previews. | Fix an issue with embed previews.
[Fixes #137488987](https://www.pivotaltracker.com/story/show/137488987)
[Fixes #137491203](https://www.pivotaltracker.com/story/show/137491203)
| JavaScript | mit | ello/webapp,ello/webapp,ello/webapp | ---
+++
@@ -28,7 +28,8 @@
}
render() {
- const { data: { service, url, thumbnailLargeUrl, id } } = this.props
+ const dataJS = this.props.data.toJS()
+ const { service, url, thumbnailLargeUrl, id } = dataJS
const children = typeof window !== 'undefined' ?
window.embetter.utils.playerHTML(... |
1dcacbc8a960279db61610185b7155719f5046d5 | find-core/src/main/public/static/js/find/app/pages.js | find-core/src/main/public/static/js/find/app/pages.js | /*
* Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
*/
define([
'find/app/find-pages',
'find/app/page/find-search',
'find/app/page/find-settings-page',
'i18n!find/nls/bun... | /*
* Copyright 2014-2015 Hewlett-Packard Development Company, L.P.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
*/
define([
'find/app/find-pages',
'find/app/page/find-settings-page',
'i18n!find/nls/bundle'
], function(FindPages, Setti... | Remove unnecessary import [rev: minor] | Remove unnecessary import [rev: minor]
| JavaScript | mit | hpautonomy/find,hpautonomy/find,LinkPowerHK/find,hpe-idol/find,hpe-idol/find,LinkPowerHK/find,hpe-idol/find,hpautonomy/find,LinkPowerHK/find,LinkPowerHK/find,hpe-idol/find,hpautonomy/find,hpe-idol/java-powerpoint-report,hpe-idol/java-powerpoint-report,LinkPowerHK/find,hpautonomy/find,hpe-idol/find | ---
+++
@@ -5,10 +5,9 @@
define([
'find/app/find-pages',
- 'find/app/page/find-search',
'find/app/page/find-settings-page',
'i18n!find/nls/bundle'
-], function(FindPages, FindSearch, SettingsPage) {
+], function(FindPages, SettingsPage) {
return FindPages.extend({
initializePages:... |
2e4fa079ee4b0a870ce3e1a530ffcfccecac7dfd | src/js/tael_sizing.js | src/js/tael_sizing.js | function resizeTaelContainer() {
$('.tael-container').css('bottom', 16);
}
$(document).ready(function () {
var header_bbox = $('.header')[0].getBoundingClientRect();
$('.tael-container').css('top', header_bbox.bottom + 8);
resizeTaelContainer();
$(window).resize(resizeTaelContainer);
});
| function resizeTaelContainer() {
var
header_bbox = $('.header')[0].getBoundingClientRect(),
tael_container = $('.tael-container');
tael_container.css('top', header_bbox.bottom);
tael_container.css('bottom', 16);
}
$(document).ready(function () {
resizeTaelContainer();
$(window).resi... | Fix Tael container top resizing | Fix Tael container top resizing
| JavaScript | mit | hinsley-it/maestro,hinsley-it/maestro | ---
+++
@@ -1,10 +1,12 @@
function resizeTaelContainer() {
- $('.tael-container').css('bottom', 16);
+ var
+ header_bbox = $('.header')[0].getBoundingClientRect(),
+ tael_container = $('.tael-container');
+ tael_container.css('top', header_bbox.bottom);
+ tael_container.css('bottom', 16);
... |
c9ecf996edac66be9997fccd353419a8e7f07235 | app/services/me.js | app/services/me.js | import Service from '@ember/service';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
export default Service.extend({
session: service(),
init() {
let routeName = window.location.href.split('/').pop();
if (routeName == 'logout') {
if (this.get('session.i... | import Service from '@ember/service';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
import ENV from '../config/environment';
import RSVP from 'rsvp';
export default Service.extend({
session: service(),
ajax: service(),
endpoint: `${ENV.APP.apiHost}/account/login`,
... | Add logged in user details | Add logged in user details
| JavaScript | agpl-3.0 | tenders-exposed/elvis-ember,tenders-exposed/elvis-ember | ---
+++
@@ -1,9 +1,29 @@
import Service from '@ember/service';
import { computed } from '@ember/object';
import { inject as service } from '@ember/service';
+import ENV from '../config/environment';
+import RSVP from 'rsvp';
export default Service.extend({
session: service(),
+ ajax: service(),
+ endpoint:... |
73cf297ca3b83bbdc73f8122423fba7d2ea95926 | src/containers/BoardSetContainer.js | src/containers/BoardSetContainer.js | import { connect } from 'react-redux';
import { buildJKFPlayerFromState } from "../playerUtils";
import { inputMove, changeComments } from '../actions';
import BoardSet from '../components/BoardSet';
const mapStateToProps = (state) => {
console.log(state);
const player = buildJKFPlayerFromState(state);
return ... | import { connect } from 'react-redux';
import { buildJKFPlayerFromState } from "../playerUtils";
import { inputMove, changeComments } from '../actions';
import BoardSet from '../components/BoardSet';
const mapStateToProps = (state) => {
//console.log(state);
const player = buildJKFPlayerFromState(state);
retur... | Comment out console.log for debug | Comment out console.log for debug
| JavaScript | mit | orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook,orangain/kifu-notebook | ---
+++
@@ -5,7 +5,7 @@
import BoardSet from '../components/BoardSet';
const mapStateToProps = (state) => {
- console.log(state);
+ //console.log(state);
const player = buildJKFPlayerFromState(state);
return { |
8e0c34795e11dc229a87277379de9b8da4afa9f4 | src-server/socket.io-wrapper/server.js | src-server/socket.io-wrapper/server.js | import SocketIONamespace from "./namespace";
export default class SocketIOServer {
constructor(io) {
this._io = io;
this._sockets = this.of("/");
this._nsps = Object.create(null);
}
get rawServer() {
return this._io;
}
//
// Delegation methods
//
of(n... | import SocketIONamespace from "./namespace";
export default class SocketIOServer {
constructor(io) {
this._io = io;
this._nsps = Object.create(null);
this._sockets = this.of("/");
}
get rawServer() {
return this._io;
}
//
// Delegation methods
//
of(n... | Fix annot read property '/' of undefined | Fix annot read property '/' of undefined
| JavaScript | mit | Ragg-/rektia,Ragg-/maya.js,Ragg-/rektia,Ragg-/rektia,Ragg-/maya.js | ---
+++
@@ -3,8 +3,8 @@
export default class SocketIOServer {
constructor(io) {
this._io = io;
+ this._nsps = Object.create(null);
this._sockets = this.of("/");
- this._nsps = Object.create(null);
}
|
37e4796c4fd9e7ac3c81f4e75ddebb29ad85c680 | tasks/register/linkAssetsBuildProd.js | tasks/register/linkAssetsBuildProd.js | /**
* `linkAssetsBuildProd`
*
* ---------------------------------------------------------------
*
* This Grunt tasklist is not designed to be used directly-- rather
* it is a helper called by the `buildProd` tasklist.
*
* For more information see:
* http://sailsjs.org/documentation/anatomy/my-app/tasks/regis... | /**
* `linkAssetsBuildProd`
*
* ---------------------------------------------------------------
*
* This Grunt tasklist is not designed to be used directly-- rather
* it is a helper called by the `buildProd` tasklist.
*
* For more information see:
* http://sailsjs.org/documentation/anatomy/my-app/tasks/regis... | Clean up some prod tasks | Clean up some prod tasks
| JavaScript | mit | pantsel/konga,pantsel/konga,pantsel/konga | ---
+++
@@ -14,9 +14,9 @@
grunt.registerTask('linkAssetsBuildProd', [
'sails-linker:prodJsRelative',
'sails-linker:prodStylesRelative',
- 'sails-linker:devTpl',
+ // 'sails-linker:devTpl',
'sails-linker:prodJsRelativeJade',
- 'sails-linker:prodStylesRelativeJade',
- 'sails-linker:devTplJ... |
12be4f8e9b60a9577246ed0fce6b5c47f28f01d3 | src/redux-dialog.js | src/redux-dialog.js | import React, { Component } from 'react';
import { connect } from 'react-redux'
import Modal from 'react-modal'
import { closeDialog } from './actions';
const reduxDialog = (dialogProps) => {
const {
name,
onAfterOpen = () => {},
onRequestClose = () => {}
} = dialogProps;
return((WrappedComponent) ... | import React, { Component } from 'react';
import { connect } from 'react-redux'
import Modal from 'react-modal'
import { closeDialog } from './actions';
const reduxDialog = (defaults) => {
const {
name,
onAfterOpen = () => {},
onRequestClose = () => {}
} = defaults;
return((WrappedComponent) => {
... | Allow an initial isOpen property to be set | Allow an initial isOpen property to be set
| JavaScript | mit | JakeDluhy/redux-dialog,JakeDluhy/redux-dialog | ---
+++
@@ -3,30 +3,37 @@
import Modal from 'react-modal'
import { closeDialog } from './actions';
-const reduxDialog = (dialogProps) => {
+const reduxDialog = (defaults) => {
const {
name,
onAfterOpen = () => {},
onRequestClose = () => {}
- } = dialogProps;
+ } = defaults;
return((Wrap... |
38b3c5224a33328a433d881a97be232c78983370 | database.js | database.js | var MongoClient = require('mongodb').MongoClient;
var URICS = "mongodb://tonyli139:RDyMScAWKpj0Fl1O@p2cluster-shard-00-00-ccvtw.mongodb.net:27017,p2cluster-shard-00-01-ccvtw.mongodb.net:27017,p2cluster-shard-00-02-ccvtw.mongodb.net:27017/<DATABASE>?ssl=true&replicaSet=p2Cluster-shard-0&authSource=admin";
var db;
conne... | var MongoClient = require('mongodb').MongoClient;
var URICS = "mongodb://tonyli139:RDyMScAWKpj0Fl1O@p2cluster-shard-00-00-ccvtw.mongodb.net:27017,p2cluster-shard-00-01-ccvtw.mongodb.net:27017,p2cluster-shard-00-02-ccvtw.mongodb.net:27017/<DATABASE>?ssl=true&replicaSet=p2Cluster-shard-0&authSource=admin";
var db;
conne... | Disable console log for server connection | Disable console log for server connection
| JavaScript | bsd-3-clause | aXises/portfolio-2,aXises/portfolio-2,aXises/portfolio-2 | ---
+++
@@ -6,7 +6,7 @@
MongoClient.connect(URICS, function(err, database) {
if (err) throw err;
db = database;
- console.log('connected');
+ //console.log('connected');
return callback(err);
});
} |
1bd8b3e2ac19e6f0dc36a0a1666b0a451e9d78c7 | js/src/forum/addFlagControl.js | js/src/forum/addFlagControl.js | import { extend } from 'flarum/extend';
import app from 'flarum/app';
import PostControls from 'flarum/utils/PostControls';
import Button from 'flarum/components/Button';
import FlagPostModal from './components/FlagPostModal';
export default function() {
extend(PostControls, 'userControls', function(items, post) {
... | import { extend } from 'flarum/extend';
import app from 'flarum/app';
import PostControls from 'flarum/utils/PostControls';
import Button from 'flarum/components/Button';
import FlagPostModal from './components/FlagPostModal';
export default function() {
extend(PostControls, 'userControls', function(items, post) {
... | Fix extension to work with latest state changes | Fix extension to work with latest state changes
| JavaScript | mit | flarum/flags,flarum/flags,flarum/flags | ---
+++
@@ -10,7 +10,7 @@
if (post.isHidden() || post.contentType() !== 'comment' || !post.canFlag()) return;
items.add('flag',
- <Button icon="fas fa-flag" onclick={() => app.modal.show(new FlagPostModal({post}))}>{app.translator.trans('flarum-flags.forum.post_controls.flag_button')}</Button>
+ ... |
e5f246b56bb3efe9567c587739dbb0c65032a57a | index.js | index.js | // Karme Edge Launcher
// =================
// Dependencies
// ------------
var urlparse = require('url').parse
var urlformat = require('url').format
var exec = require('child_process').exec
// Constants
// ---------
var PROCESS_NAME = 'spartan.exe'
var EDGE_COMMAND = [
'powershell',
'start',
'shell:AppsFold... | // Karme Edge Launcher
// =================
// Dependencies
// ------------
var urlparse = require('url').parse
var urlformat = require('url').format
// Constants
// ---------
var EDGE_COMMAND = [
'powershell',
'start',
'shell:AppsFolder\\Microsoft.Windows.Spartan_cw5n1h2txyewy!Microsoft.Spartan.Spartan'
]
/... | Remove variables that are defined but never used | Remove variables that are defined but never used
| JavaScript | mit | nicolasmccurdy/karma-edge-launcher,karma-runner/karma-edge-launcher | ---
+++
@@ -6,12 +6,9 @@
var urlparse = require('url').parse
var urlformat = require('url').format
-var exec = require('child_process').exec
// Constants
// ---------
-
-var PROCESS_NAME = 'spartan.exe'
var EDGE_COMMAND = [
'powershell',
@@ -20,10 +17,8 @@
]
// Constructor
-function EdgeBrowser (bas... |
0bc5a286de1afefc26b32599bfec8ff550a73cf8 | index.js | index.js | function renderCat(catGifId) {
var container = document.getElementById('cat');
container.innerHTML =
"<img " +
"src='http://iconka.com/wp-content/uploads/edd/2015/10/" + catGifId +".gif' " +
"style='width:90%'>";
}
Dashboard.registerWidget(function (dashboardAPI, registerWidgetAPI) {
dashboardAPI.set... | var listOfCatIds = ["purr", "meal", "knead"];
function renderCat(catGifId) {
var container = document.getElementById('cat');
container.innerHTML =
"<img " +
"src='http://iconka.com/wp-content/uploads/edd/2015/10/" + catGifId +".gif' " +
"style='width:90%'>";
}
function renderSelector(dashboardAPI) {
... | Save random; load random cat on 'random' option | Save random; load random cat on 'random' option
| JavaScript | apache-2.0 | mariyadavydova/youtrack-cats-widget,mariyadavydova/youtrack-cats-widget | ---
+++
@@ -1,3 +1,5 @@
+var listOfCatIds = ["purr", "meal", "knead"];
+
function renderCat(catGifId) {
var container = document.getElementById('cat');
container.innerHTML =
@@ -6,16 +8,46 @@
"style='width:90%'>";
}
+function renderSelector(dashboardAPI) {
+ var container = document.getElementById('ca... |
65ea3439f67a9081ff4fddd573f3505c01461253 | index.js | index.js | 'use strict';
/**
* Module dependenices
*/
const clone = require('shallow-clone');
const typeOf = require('kind-of');
function cloneDeep(val, instanceClone) {
switch (typeOf(val)) {
case 'object':
return cloneObjectDeep(val, instanceClone);
case 'array':
return cloneArrayDeep(val, instanceClo... | 'use strict';
/**
* Module dependenices
*/
const clone = require('shallow-clone');
const typeOf = require('kind-of');
function cloneDeep(val, instanceClone) {
switch (typeOf(val)) {
case 'object':
return cloneObjectDeep(val, instanceClone);
case 'array':
return cloneArrayDeep(val, instanceClo... | FIX - IE11 does not support inside loops | FIX - IE11 does not support inside loops
| JavaScript | mit | jonschlinkert/clone-deep | ---
+++
@@ -25,7 +25,7 @@
}
if (typeOf(val) === 'object') {
const res = new val.constructor();
- for (const key in val) {
+ for (let key in val) {
res[key] = cloneDeep(val[key], instanceClone);
}
return res; |
f65c93b109e2005bea1daaac1494a93f6fc5205b | index.js | index.js | #!/usr/bin/env iojs
var program = require('commander'),
fs = require('fs'),
sequoria = require('sequoria'),
createBot = require('./lib').createBot;
function main() {
program
.version(require('./package').version)
.usage('[configFile]')
.action(function(configFile){
// this module is being di... | #!/usr/bin/env iojs
var path = require('path'),
program = require('commander'),
fs = require('fs'),
sequoria = require('sequoria'),
createBot = require('./lib').createBot;
function main() {
program
.version(require('./package').version)
.usage('[configFile]')
.action(function(configFile){
... | Use path.resolve to resolve path | Use path.resolve to resolve path
| JavaScript | mit | elvinyung/botstrap,lvn/botstrap | ---
+++
@@ -1,6 +1,7 @@
#!/usr/bin/env iojs
-var program = require('commander'),
+var path = require('path'),
+ program = require('commander'),
fs = require('fs'),
sequoria = require('sequoria'),
createBot = require('./lib').createBot;
@@ -11,14 +12,7 @@
.usage('[configFile]')
.action(function(... |
89aa3813432083bc4bc192a27167f7a48d3a482f | index.js | index.js | module.exports = reviewersEditionCompare
var ordinal = require('number-to-words').toWordsOrdinal
var parse = require('reviewers-edition-parse')
var numbers = require('reviewers-edition-parse/numbers')
function reviewersEditionCompare (edition) {
var parsed = parse(edition)
if (parsed) {
return (
(parsed... | var ordinal = require('number-to-words').toWordsOrdinal
var parse = require('reviewers-edition-parse')
var numbers = require('reviewers-edition-parse/numbers')
module.exports = function reviewersEditionCompare (edition) {
var parsed = parse(edition)
if (parsed) {
return (
(parsed.draft ? (ordinal(parsed.... | Put module.exports and function on same line | Put module.exports and function on same line
| JavaScript | mit | kemitchell/reviewers-edition-spell.js | ---
+++
@@ -1,10 +1,8 @@
-module.exports = reviewersEditionCompare
-
var ordinal = require('number-to-words').toWordsOrdinal
var parse = require('reviewers-edition-parse')
var numbers = require('reviewers-edition-parse/numbers')
-function reviewersEditionCompare (edition) {
+module.exports = function reviewersEd... |
9310026c8cbc4af5f4326a27cfc27121e5636323 | index.js | index.js | var es = require('event-stream'),
clone = require('clone'),
path = require('path');
module.exports = function(opt){
// clone options
opt = opt ? clone(opt) : {};
if (!opt.splitter && opt.splitter !== "") opt.splitter = '\r\n';
if (!opt.fileName) throw new Error("Missing fileName option for gulp-concat");
... | var es = require('event-stream'),
clone = require('clone'),
path = require('path');
module.exports = function(opt){
// clone options
opt = opt ? clone(opt) : {};
if (typeof opt.splitter === 'undefined') opt.splitter = '\r\n';
if (!opt.fileName) throw new Error("Missing fileName option for gulp-concat");
... | Adjust opt.splitter to compare against undefined for the default value. | Adjust opt.splitter to compare against undefined for the default value.
| JavaScript | mit | wearefractal/gulp-concat,queckezz/gulp-concat,KenanY/gulp-concat,BinaryMuse/gulp-concat,contra/gulp-concat,colynb/gulp-concat,stevelacy/gulp-concat,callumacrae/gulp-concat,abdurrachman-habibi/gulp-concat | ---
+++
@@ -5,7 +5,7 @@
module.exports = function(opt){
// clone options
opt = opt ? clone(opt) : {};
- if (!opt.splitter && opt.splitter !== "") opt.splitter = '\r\n';
+ if (typeof opt.splitter === 'undefined') opt.splitter = '\r\n';
if (!opt.fileName) throw new Error("Missing fileName option for gulp-... |
4021d99786f51646633cf9d15fead8c3a58bef7c | index.js | index.js | var rimraf = require('rimraf')
var path = require('path');
var join = path.join;
function Plugin(paths) {
// determine webpack root
this.context = path.dirname(module.parent.filename);
// allows for a single string entry
if (typeof paths == 'string' || paths instanceof String){
paths = [paths];
}
// ... | var rimraf = require('rimraf')
var path = require('path');
var join = path.join;
function Plugin(paths, context) {
// determine webpack root
this.context = context || path.dirname(module.parent.filename);
// allows for a single string entry
if (typeof paths == 'string' || paths instanceof String){
paths =... | Add opportunity pass webpack root (context) | Add opportunity pass webpack root (context)
| JavaScript | mit | chrisblossom/clean-webpack-plugin,mhuggins/clean-webpack-plugin,johnagan/clean-webpack-plugin,chrisblossom/clean-webpack-plugin,johnagan/clean-webpack-plugin | ---
+++
@@ -2,9 +2,9 @@
var path = require('path');
var join = path.join;
-function Plugin(paths) {
+function Plugin(paths, context) {
// determine webpack root
- this.context = path.dirname(module.parent.filename);
+ this.context = context || path.dirname(module.parent.filename);
// allows for a single... |
f4d7e0d0917f7af388c75b4b4816591c4f7410b5 | src/utils/config.js | src/utils/config.js | import _ from 'lodash'
import defaultConfig from '../config/defaults'
let globalConfig = _.assign({}, _.cloneDeep(defaultConfig))
export default class Config {
static load(cfg) {
globalConfig = _.cloneDeep(cfg)
}
static get(item, defaultValue) {
if(item === '*') {
return _.cloneDeep(globalConfig)... | import _ from 'lodash'
import defaultConfig from '../config/defaults'
let globalConfig = _.assign({}, _.cloneDeep(defaultConfig))
export default class Config {
static load(cfg) {
globalConfig = _.merge(globalConfig, _.cloneDeep(cfg))
}
static overwrite(cfg) {
globalConfig = _.cloneDeep(cfg)
}
stat... | Add loading/merging methods to Config utility | Add loading/merging methods to Config utility
| JavaScript | mit | thinktopography/reframe,thinktopography/reframe | ---
+++
@@ -5,6 +5,10 @@
export default class Config {
static load(cfg) {
+ globalConfig = _.merge(globalConfig, _.cloneDeep(cfg))
+ }
+
+ static overwrite(cfg) {
globalConfig = _.cloneDeep(cfg)
}
|
73707d6455b0f4758c61a5c573aec6ad987259de | index.js | index.js | 'use strict';
module.exports = {
name: 'ember-cli-uglify',
included(app) {
this._super.included.apply(this, arguments);
const defaults = require('lodash.defaultsdeep');
let defaultOptions = {
enabled: app.env === 'production',
uglify: {
compress: {
// this is adversely... | 'use strict';
module.exports = {
name: 'ember-cli-uglify',
included(app) {
this._super.included.apply(this, arguments);
const defaults = require('lodash.defaultsdeep');
let defaultOptions = {
enabled: app.env === 'production',
uglify: {
compress: {
// this is adversely... | Add a fix for Safari to the default config | Add a fix for Safari to the default config
Uglifying ES6 doesn't work currently with Safari due to a webkit bug.
Adding this mangle option fixes that.
| JavaScript | mit | ember-cli/ember-cli-uglify,ember-cli/ember-cli-uglify | ---
+++
@@ -17,6 +17,9 @@
'negate_iife': false,
// limit sequences because of memory issues during parsing
sequences: 30,
+ },
+ mangle: {
+ safari10: true
},
output: {
// no difference in size and much easier to debug |
628a1e56241fd82104d69ac7e8e4b751ff85e34b | index.js | index.js | var addElevation = require('geojson-elevation').addElevation,
TileSet = require('node-hgt').TileSet,
express = require('express'),
bodyParser = require('body-parser'),
app = express(),
tiles = new TileSet('./data');
app.use(bodyParser.json());
app.use(function(req, res, next) {
res.header('Acce... | var addElevation = require('geojson-elevation').addElevation,
TileSet = require('node-hgt').TileSet,
ImagicoElevationDownloader = require('node-hgt').ImagicoElevationDownloader,
express = require('express'),
bodyParser = require('body-parser'),
app = express(),
tiles,
tileDownloader,
til... | Read environment variables for data directory and tile downloader | Read environment variables for data directory and tile downloader
| JavaScript | isc | perliedman/elevation-service,JesseCrocker/elevation-service | ---
+++
@@ -1,9 +1,24 @@
var addElevation = require('geojson-elevation').addElevation,
TileSet = require('node-hgt').TileSet,
+ ImagicoElevationDownloader = require('node-hgt').ImagicoElevationDownloader,
express = require('express'),
bodyParser = require('body-parser'),
app = express(),
- ... |
4bf4680c186dd7e21292e7efc2431547f51ac11b | index.js | index.js | function Alternate() {
this.values = arguments;
this.index = 0;
}
Alternate.prototype.next = function() {
var returnValue = this.values[this.index];
if (this.index < this.values.length) {
this.index++;
} else {
this.index = 0;
}
return returnValue;
};
Alternate.prototype.peek = function() {
... | function Alternate() {
this.values = arguments;
this.index = 0;
}
Alternate.prototype.next = function() {
var returnValue = this.values[this.index];
if (this.index < this.values.length - 1) {
this.index++;
} else {
this.index = 0;
}
return returnValue;
};
Alternate.prototype.peek = function() ... | Fix off by one bug | Fix off by one bug
| JavaScript | mit | sgnh/alternate | ---
+++
@@ -6,7 +6,7 @@
Alternate.prototype.next = function() {
var returnValue = this.values[this.index];
- if (this.index < this.values.length) {
+ if (this.index < this.values.length - 1) {
this.index++;
} else {
this.index = 0; |
43204c269a394d1805d9ddc208ea6a524729c7cf | index.js | index.js | /*!
* tweensy - Copyright (c) 2017 Jacob Buck
* https://github.com/jacobbuck/tweensy
* Licensed under the terms of the MIT license.
*/
'use strict';
var assign = require('lodash/assign');
var now = require('performance-now');
var rafq = require('rafq')();
var defaultOptions = {
duration: 0,
easing: function l... | /*!
* tweensy - Copyright (c) 2017 Jacob Buck
* https://github.com/jacobbuck/tweensy
* Licensed under the terms of the MIT license.
*/
'use strict';
var assign = require('lodash/assign');
var now = require('performance-now');
var rafq = require('rafq')();
var defaultOptions = {
duration: 0,
easing: function l... | Remove loop to keep scope small. Simplify some code, and pre calculate some things for perf | Remove loop to keep scope small. Simplify some code, and pre calculate some things for perf
| JavaScript | mit | jacobbuck/tweensy,jacobbuck/tweenie | ---
+++
@@ -13,7 +13,6 @@
duration: 0,
easing: function linear(t) { return t; },
from: 0,
- loop: 1,
onComplete: function() {},
onProgress: function() {},
to: 1
@@ -22,7 +21,7 @@
module.exports = function tween(instanceOptions) {
var options = assign({}, defaultOptions, instanceOptions);
var... |
7c953aa414ea16fd831a11b3be4d74f5c52b5653 | src/database/utilities/constants.js | src/database/utilities/constants.js | /* eslint-disable import/prefer-default-export */
/**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
const HOURS_PER_DAY = 24;
const MINUTES_PER_HOUR = 60;
const SECONDS_PER_MINUTE = 60;
const MILLISECONDS_PER_SECOND = 1000;
export const MILLISECONDS_PER_MINUTE = MILLISECONDS_PER_SECOND * SECONDS_PER_M... | /* eslint-disable import/prefer-default-export */
/**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
const HOURS_PER_DAY = 24;
const MINUTES_PER_HOUR = 60;
const SECONDS_PER_MINUTE = 60;
const MILLISECONDS_PER_SECOND = 1000;
export const MILLISECONDS_PER_MINUTE = MILLISECONDS_PER_SECOND * SECONDS_PER_M... | Add patient code number sequence | Add patient code number sequence
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | ---
+++
@@ -20,4 +20,5 @@
REQUISITION_REQUESTER_REFERENCE: 'requisition_requester_reference',
STOCKTAKE_SERIAL_NUMBER: 'stocktake_serial_number',
SUPPLIER_INVOICE_NUMBER: 'supplier_invoice_serial_number',
+ PATIENT_CODE: 'patient_code',
}; |
a4acc1c3dbd3d77104f39c957051f2f38884224c | server/app.js | server/app.js | var bodyParser = require('body-parser');
var express = require('express');
var app = express();
var router = express.Router();
var Sequelize = require('sequelize');
var sequelize = new Sequelize(process.env.DATABASE_URL);
var matchmaker = require('./controllers/Matchmaker');
var playController = require('./controllers... | var bodyParser = require('body-parser');
var express = require('express');
var app = express();
var router = express.Router();
var Sequelize = require('sequelize');
var sequelize = new Sequelize(process.env.DATABASE_URL);
var matchmaker = require('./controllers/Matchmaker');
var playController = require('./controllers... | Edit server route url to match client request | Edit server route url to match client request
| JavaScript | mit | andereld/progark,andereld/progark | ---
+++
@@ -19,7 +19,7 @@
router.route('/fire')
.post(playController.fire);
-router.route('/cancel/:username')
+router.route('/cancel')
.post(matchmaker.cancel);
router.route('/turn/:username') |
7af80538c9232f5bf0d929d4164076a44cb2b704 | render-mustache.js | render-mustache.js | /**
* render-mustache
*
* This module implements support for rendering [Mustache](http://mustache.github.com/)
* templates using [mustache.js](https://github.com/janl/mustache.js).
*/
define(['mustache'],
function(Mustache) {
/**
* Setup Mustache template engine.
*
* When rendering, this engine retur... | /**
* render-mustache
*
* This module implements support for rendering [Mustache](http://mustache.github.com/)
* templates using [mustache.js](https://github.com/janl/mustache.js).
*/
define(['mustache'],
function(Mustache) {
/**
* Setup Mustache template engine.
*
* When rendering, this engine retur... | Add documentation regarding MIME types. | Add documentation regarding MIME types.
| JavaScript | mit | sailjs/render-mustache | ---
+++
@@ -15,7 +15,25 @@
*
* Examples:
*
- * render.engine('text/template', mustache());
+ * render.engine('text/x-mustache-template', mustache());
+ *
+ * A Note on MIME Types:
+ *
+ * It has become common convention to include templates within HTML by
+ * enclosing them within sc... |
91e5e219929c894cb48391261cc38780c728b0d9 | src/cmd/main/music/handlers/YouTubeHandler.js | src/cmd/main/music/handlers/YouTubeHandler.js | /**
* @file Music handler for YouTube videos. Does not support livestreams.
* @author Ovyerus
*/
const ytdl = require('ytdl-core');
const got = require('got');
const ITAG = '251'; // Preferred iTag quality to get. Default: 251.
class YouTubeHandler {
constructor() {}
async getInfo(url) {
if (type... | /**
* @file Music handler for YouTube videos. Does not support livestreams.
* @author Ovyerus
*/
const ytdl = require('ytdl-core');
const got = require('got');
// List of all itag qualities can be found here: https://en.wikipedia.org/w/index.php?title=YouTube&oldid=800910021#Quality_and_formats.
const ITAG = '140'... | Change requested itag for YouTube music to a M4A+AAC stream, instead of a WebM+Opus stream in an attempt to fix issues | Change requested itag for YouTube music to a M4A+AAC stream, instead of a WebM+Opus stream in an attempt to fix issues
| JavaScript | unknown | awau/owo-whats-this,sr229/owo-whats-this,ClarityMoe/Clara,awau/Clara,owo-dev-team/owo-whats-this | ---
+++
@@ -6,7 +6,9 @@
const ytdl = require('ytdl-core');
const got = require('got');
-const ITAG = '251'; // Preferred iTag quality to get. Default: 251.
+// List of all itag qualities can be found here: https://en.wikipedia.org/w/index.php?title=YouTube&oldid=800910021#Quality_and_formats.
+const ITAG = '140';... |
3f96581aa2df3892d673a3ef175bf8e76f321075 | renderer/middleware/index.js | renderer/middleware/index.js | // @flow
import type {Store, Dispatch, Action} from 'redux';
export const save = (store: Store) => (next: Dispatch) => (action: Action) => {
setImmediate(() => {
localStorage.setItem('store', JSON.stringify(store.getState()));
});
next(action);
};
| // @flow
import type {Store, Dispatch, Action} from 'redux';
export const save = (store: Store) => (next: Dispatch) => (action: Action) => {
if (action.id) {
setImmediate(() => {
localStorage.setItem('store', JSON.stringify(store.getState()));
});
}
next(action);
};
| Update store at Only import change | Update store at Only import change
| JavaScript | mit | akameco/PixivDeck,akameco/PixivDeck | ---
+++
@@ -2,8 +2,10 @@
import type {Store, Dispatch, Action} from 'redux';
export const save = (store: Store) => (next: Dispatch) => (action: Action) => {
- setImmediate(() => {
- localStorage.setItem('store', JSON.stringify(store.getState()));
- });
+ if (action.id) {
+ setImmediate(() => {
+ localStorage.... |
546e2733e51106975f7b167f3b690771ebd6dcfb | lib/gcli/test/testFail.js | lib/gcli/test/testFail.js | /*
* Copyright 2012, Mozilla Foundation and contributors
*
* 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 applica... | /*
* Copyright 2012, Mozilla Foundation and contributors
*
* 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 applica... | Allow wider set of messages in exception tests | spawn-1007006: Allow wider set of messages in exception tests
If Task.spawn catches an exception message then it adds "Error: " onto
the front, so allow a slightly wider set of error messages when testing.
Signed-off-by: Joe Walker <7a17872fbb32c7d760c9a16ee3076daead11efcf@mozilla.com>
| JavaScript | apache-2.0 | mozilla/gcli,mozilla/gcli,joewalker/gcli,joewalker/gcli,mozilla/gcli | ---
+++
@@ -39,7 +39,7 @@
{
setup: 'tsfail throwerror',
exec: {
- output: 'thrown error',
+ output: /thrown error$/,
type: 'error',
error: true
} |
6288e418a248e997f1e6830d8bfa4e09d33a3717 | src/modules/getPrice/index.js | src/modules/getPrice/index.js | import module from '../../module'
import command from '../../components/command'
import axios from 'axios'
import humanize from '../../utils/humanize'
export default module(
command('getprice', 'Gets the Jita price of a given item.', async (state, message, args) => {
try {
const esiURL = 'https... | import module from '../../module'
import command from '../../components/command'
import axios from 'axios'
import humanize from '../../utils/humanize'
export default module(
command('getprice', 'Gets the Jita price of a given item.', async (state, message, args) => {
try {
const esiURL = 'https... | Modify getPrice to report name of item actually queried | Modify getPrice to report name of item actually queried
| JavaScript | mit | emensch/thonk9k | ---
+++
@@ -14,15 +14,16 @@
const itemid = itemData.inventorytype[0];
- const {data: priceData} = await axios.get(
- `http://api.eve-central.com/api/marketstat/json?typeid=${itemid}&usesystem=30000142`
- );
+ const [{data: [priceData]}, {data: {name: it... |
56e76553bb5a4f6e44a4739fb4f9eb46dfbfa463 | src/plugins/FileVersioningPlugin.js | src/plugins/FileVersioningPlugin.js | let chokidar = require('chokidar');
let glob = require('glob');
/**
* Create a new plugin instance.
*
* @param {Array} files
*/
function FileVersioningPlugin(files = []) {
this.files = files;
}
/**
* Apply the plugin.
*/
FileVersioningPlugin.prototype.apply = function () {
if (this.files && Mix.isWatch... | let chokidar = require('chokidar');
let glob = require('glob');
/**
* Create a new plugin instance.
*
* @param {Array} files
*/
function FileVersioningPlugin(files = []) {
this.files = files;
}
/**
* Apply the plugin.
*/
FileVersioningPlugin.prototype.apply = function () {
if (this.files && Mix.isWatch... | Clean up file versioning handler | Clean up file versioning handler
| JavaScript | mit | JeffreyWay/laravel-mix | ---
+++
@@ -19,19 +19,7 @@
this.watch(this.files);
}
- Mix.listen('files-concatenated', file => {
- file = new File(file);
-
- // Find and delete all matching versioned files in the directory.
- glob(path.join(file.base(), '**'), (err, files) => {
- files.filter(file... |
ad1554d353a332c2eed047b86c3ddbe5f4e3a6c4 | src/components/CenteredMap.js | src/components/CenteredMap.js | import React from 'react'
import PropTypes from 'prop-types'
import { Map, TileLayer, GeoJSON } from 'react-leaflet'
class CenteredMap extends React.PureComponent {
static propTypes = {
vectors: PropTypes.object.isRequired,
className: PropTypes.string,
frozen: PropTypes.bool,
lat: PropTypes.number,
... | import React from 'react'
import PropTypes from 'prop-types'
import { Map, TileLayer, GeoJSON } from 'react-leaflet'
class CenteredMap extends React.PureComponent {
static propTypes = {
vectors: PropTypes.object.isRequired,
className: PropTypes.string,
frozen: PropTypes.bool,
lat: PropTypes.number,
... | Allow double click zoom when map is not frozen | Allow double click zoom when map is not frozen
| JavaScript | mit | sgmap/inspire,sgmap/inspire | ---
+++
@@ -40,7 +40,7 @@
minZoom={zoom}
dragging={!frozen}
scrollWheelZoom={false}
- doubleClickZoom={false}
+ doubleClickZoom={!frozen}
zoomControl={!frozen}
>
<TileLayer |
6e95c2af465fc296984e86b73192eca1c32c8f9d | lib/rules/load-average.js | lib/rules/load-average.js | var util = require('util');
var Duplex = require('stream').Duplex;
var LoadAverage = module.exports = function LoadAverage(options) {
this.warn = options.warn;
this.critical = options.critical;
Duplex.call(this, { objectMode: true });
};
util.inherits(LoadAverage, Duplex);
LoadAverage.prototype._write = functi... | var util = require('util');
var Duplex = require('stream').Duplex;
var LoadAverage = module.exports = function LoadAverage(options) {
this.warn = options.warn;
this.critical = options.critical;
Duplex.call(this, { objectMode: true });
};
util.inherits(LoadAverage, Duplex);
LoadAverage.prototype._write = functi... | Use event name for incident name | Use event name for incident name
| JavaScript | isc | numbat-metrics/numbat-analyzer,ceejbot/numbat-analyzer | ---
+++
@@ -25,7 +25,7 @@
{
this.push(
{
- name: 'load-average',
+ name: chunk.name,
host: chunk.host,
message: message,
status: 'critical',
@@ -36,7 +36,7 @@
{
this.push(
{
- name: 'load-average',
+ name: chunk.name,
host: chun... |
fff63aaf393903aa0830f1cf521b3edc775a152e | sdk/src/Constants.js | sdk/src/Constants.js | export default class Constants {
static get USER_ACCOUNT_KEY() { return btoa('blipSdkUAccount'); }
static get IFRAMEURL_LOCAL() { return 'http://localhost:3000/'; }
static get IFRAMEURL_HMG() { return 'https://hmg-sdkcommon.blip.ai/'; }
static get IFRAMEURL_PRD() { return 'https://sdkcommon.blip.ai/'; }... | export default class Constants {
static get USER_ACCOUNT_KEY() { return btoa('blipSdkUAccount'); }
static get IFRAMEURL_LOCAL() { return 'http://localhost:3000/'; }
static get IFRAMEURL_HMG() { return 'https://hmg-sdkcommon.blip.ai/'; }
static get IFRAMEURL_PRD() { return 'https://sdkcommon.blip.ai/'; }... | Change constant value for backward compatibility | Change constant value for backward compatibility
| JavaScript | apache-2.0 | takenet/blip-chat-web,takenet/blip-chat-web,takenet/blip-sdk-web,takenet/blip-sdk-web | ---
+++
@@ -10,7 +10,7 @@
static get SDK_DEFAULT_WIDGET_COLOR() { return '#546E7A'; }
static get SDK_DEFAULT_Z_INDEX() { return 16000001; }
static get SDK_DEFAULT_HIDE_MENU() { return false; }
- static get REQUEST_POST_MESSAGE_CODE() { return 'RequestPostMessage'; }
+ static get REQUEST_POST_MESS... |
8a970c6b9bf037c10cdc55dc7fa27bcf20d393dc | test/config.spec.js | test/config.spec.js | 'use strict';
/*
config
->read from file, holds values and supplies as needed
*/
require('chai').should()
var config = require('../lib/config')()
describe('Config', () => {
describe('#getLayers', () => {
it('should return layers config array', () => {
//Given
//When
var layers = config.getL... | 'use strict';
/*
config
->read from file, holds values and supplies as needed
*/
require('chai').should()
var config = require('../lib/config')()
describe('Config', () => {
describe('#getLayers', () => {
it('should return layers config array', () => {
//Given
//When
var layers = config.getL... | Update test to reflect config file change | Update test to reflect config file change
| JavaScript | mit | mediasuitenz/mappy,mediasuitenz/mappy | ---
+++
@@ -32,7 +32,7 @@
//Then
map.should.be.an('object')
- map.tileLayers.should.be.an('array')
+ map.tileLayers.should.be.an('object')
})
})
|
60fbc2e4405a2168223266f950488dfacb8b2f0a | Player.js | Player.js | /* global Entity */
(function() {
'use strict';
function Player(x, y, speed) {
this.base = Entity;
this.base(
x,
y,
Player.width,
Player.height,
'public/images/sprites/heroes.png',
56,
12,
speed || 150
);
}
Player.width = 32;
Player.height = 52;
... | /* global Entity */
(function() {
'use strict';
function Player(x, y, speed) {
this.base = Entity;
this.base(
x,
y,
Player.width,
Player.height,
'public/images/sprites/heroes.png',
105,
142,
speed || 150
);
}
Player.width = 32;
Player.height = 48;
... | Change player sprite to show hero facing the zombies | Change player sprite to show hero facing the zombies
| JavaScript | mit | handrus/zombies-game,brunops/zombies-game,brunops/zombies-game | ---
+++
@@ -10,14 +10,14 @@
Player.width,
Player.height,
'public/images/sprites/heroes.png',
- 56,
- 12,
+ 105,
+ 142,
speed || 150
);
}
Player.width = 32;
- Player.height = 52;
+ Player.height = 48;
Player.prototype = new Entity();
|
dc9a45d38a5857472b7d9a72f7c2363276cc4efc | tdd/server/palindrome/test/palindrome-test.js | tdd/server/palindrome/test/palindrome-test.js | var expect = require('chai').expect;
var isPalindrome = require('../src/palindrome');
describe('palindrome-test', function() {
it('should pass the canary test', function() {
expect(true).to.be.true;
});
it('should return true when passed "mom"', function() {
expect(isPalindrome('mom')).to.be.true;
});
});
| /*
* Test ideas
*
* 'dad' is a palindrome
* 'dude' is not a palindrome
* 'mom mom' is a palindrome
* 'dad dae' is a palindrome'
*/
var expect = require('chai').expect;
var isPalindrome = require('../src/palindrome');
describe('palindrome-test', function() {
it('should pass the canary test', function() {
exp... | Add test: 'dad' is a palindrome | Add test: 'dad' is a palindrome
| JavaScript | apache-2.0 | mrwizard82d1/tdjsa | ---
+++
@@ -1,3 +1,12 @@
+/*
+ * Test ideas
+ *
+ * 'dad' is a palindrome
+ * 'dude' is not a palindrome
+ * 'mom mom' is a palindrome
+ * 'dad dae' is a palindrome'
+ */
+
var expect = require('chai').expect;
var isPalindrome = require('../src/palindrome');
@@ -9,4 +18,8 @@
it('should return true when passed "... |
aa9717b62f1a0c0e41f06e9f54393d8cd55769f9 | templates/demo/config/namesystem.js | templates/demo/config/namesystem.js | module.exports = {
default: {
available_providers: ["ens", "ipns"],
provider: "ens",
register: {
rootDomain: "embark.eth",
subdomains: {
'status': '0x1a2f3b98e434c02363f3dac3174af93c1d690914'
}
}
}
};
| module.exports = {
default: {
available_providers: ["ens", "ipns"],
provider: "ens"
},
development: {
register: {
rootDomain: "embark.eth",
subdomains: {
'status': '0x1a2f3b98e434c02363f3dac3174af93c1d690914'
}
}
}
};
| Move name config to development | [CHORES] Move name config to development
| JavaScript | mit | iurimatias/embark-framework,iurimatias/embark-framework | ---
+++
@@ -1,7 +1,10 @@
module.exports = {
default: {
available_providers: ["ens", "ipns"],
- provider: "ens",
+ provider: "ens"
+ },
+
+ development: {
register: {
rootDomain: "embark.eth",
subdomains: { |
2d14e852c9c833eeec7b63a76102ce4dc29bd2cb | angular/app-foundation.module.js | angular/app-foundation.module.js | /**
* Created by anonymous on 13/12/15 11:09.
*/
(function() {
'use strict';
angular
.module('appFoundation', [
/* Angularjs */
'ngMaterial',
'ngMessages',
'ngResource',
/* 3rd-party */
'ui.router',
'satellizer',
... | /**
* Created by anonymous on 13/12/15 11:09.
*/
(function() {
'use strict';
angular
.module('appFoundation', [
/* Angularjs */
'ngMaterial',
'ngMessages',
'ngResource',
/* 3rd-party */
'ui.router',
'satellizer',
... | Update bower @ Uninstall angular-material-data-table | Update bower @ Uninstall angular-material-data-table
| JavaScript | mit | onderdelen/app-foundation,componeint/app-foundation,onderdelen/app-foundation,onderdelen/app-foundation,componeint/app-foundation,componeint/app-foundation,consigliere/app-foundation,consigliere/app-foundation,consigliere/app-foundation | ---
+++
@@ -21,7 +21,6 @@
'ngMdIcons',
'toastr',
'vAccordion',
- 'md.data.table',
/* Intra-services */
'inServices.exception', |
fa449ed86a6bfde93654bba283a8c7cc4788bc61 | test/journals-getDokumenter-test.js | test/journals-getDokumenter-test.js | 'use strict'
const tap = require('tap')
const getDokumenter = require('../lib/journals/getDokumenter')
tap.test('Requires options to be specified', function (test) {
const options = false
const expectedErrorMessage = 'Missing required input: options object'
getDokumenter(options, function (error, data) {
ta... | 'use strict'
const tap = require('tap')
const getDokumenter = require('../lib/journals/getDokumenter')
tap.test('Requires options to be specified', function (test) {
const options = false
const expectedErrorMessage = 'Missing required input: options object'
getDokumenter(options, function (error, data) {
ta... | Replace test.done with test.end (patch) | Replace test.done with test.end (patch)
| JavaScript | mit | zrrrzzt/edemokrati | ---
+++
@@ -8,7 +8,7 @@
const expectedErrorMessage = 'Missing required input: options object'
getDokumenter(options, function (error, data) {
tap.equal(error.message, expectedErrorMessage, expectedErrorMessage)
- test.done()
+ test.end()
})
})
@@ -19,7 +19,7 @@
const expectedErrorMessage = '... |
0492af81a8140b89347ea721f46fcc71088466d8 | test/lib/api-util/api-util-test.js | test/lib/api-util/api-util-test.js | 'use strict';
const preq = require('preq');
const assert = require('../../utils/assert');
const mwapi = require('../../../lib/mwapi');
const logger = require('bunyan').createLogger({
name: 'test-logger',
level: 'warn'
});
logger.log = function(a, b) {};
describe('lib:apiUtil', function() {
this.timeo... | 'use strict';
const assert = require('../../utils/assert');
const mwapi = require('../../../lib/mwapi');
const logger = require('bunyan').createLogger({
name: 'test-logger',
level: 'warn'
});
logger.log = function(a, b) {};
describe('lib:apiUtil', () => {
it('checkForQueryPagesInResponse should return ... | Remove unnecessary API call in unit test | Remove unnecessary API call in unit test
We do not need to hit the API in this test. It's unnecessary and makes
the test harder to comprehend.
Instead of testing this way, simulate a promise that resolves without
pages.
(npm run test:unit should work without an internet connection)
Change-Id: Iee834114890a64c96ccf2... | JavaScript | apache-2.0 | wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps | ---
+++
@@ -1,6 +1,5 @@
'use strict';
-const preq = require('preq');
const assert = require('../../utils/assert');
const mwapi = require('../../../lib/mwapi');
@@ -11,26 +10,11 @@
logger.log = function(a, b) {};
-describe('lib:apiUtil', function() {
-
- this.timeout(20000); // eslint-disable-line no-... |
9eaa53c31ddb5170a9cd3d81e4fc4846a370b6ba | addon/change-gate.js | addon/change-gate.js | import Em from 'ember';
var get = Em.get;
var defaultFilter = function(value) { return value; };
export default function(dependentKey, filter) {
filter = filter || defaultFilter;
var computed = Em.computed(function handler(key) {
var meta = computed.meta();
meta.hasObserver = false;
meta.lastValue =... | import Em from 'ember';
var get = Em.get,
getMeta = Em.getMeta,
setMeta = Em.setMeta;
var defaultFilter = function(value) { return value; };
export default function(dependentKey, filter) {
filter = filter || defaultFilter;
return Em.computed(function(key) {
var hasObserverKey = '_changeGate:%@:hasOb... | Revert "Refactored macro to use ComputedProperty meta instead of object's meta" | Revert "Refactored macro to use ComputedProperty meta instead of object's meta"
| JavaScript | mit | givanse/ember-computed-change-gate,GavinJoyce/ember-computed-change-gate,givanse/ember-computed-change-gate,GavinJoyce/ember-computed-change-gate | ---
+++
@@ -1,39 +1,38 @@
import Em from 'ember';
-var get = Em.get;
+var get = Em.get,
+ getMeta = Em.getMeta,
+ setMeta = Em.setMeta;
var defaultFilter = function(value) { return value; };
export default function(dependentKey, filter) {
filter = filter || defaultFilter;
- var computed = Em.comp... |
daf08f7840abf24d076c604fb58ca0771c79a25c | snippets/device.js | snippets/device.js | const {TextView, device, ui} = require('tabris');
// Display available device information
['platform', 'version', 'model', 'language', 'orientation'].forEach((property) => {
new TextView({
id: property,
left: 10, right: 10, top: 'prev() 10',
text: property + ': ' + device[property]
}).appendTo(ui.cont... | const {TextView, device, ui} = require('tabris');
// Display available device information
['platform', 'version', 'model', 'vendor', 'language', 'orientation'].forEach((property) => {
new TextView({
id: property,
left: 10, right: 10, top: 'prev() 10',
text: property + ': ' + device[property]
}).append... | Add "vendor" to list of printed properties | Add "vendor" to list of printed properties
| JavaScript | bsd-3-clause | eclipsesource/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js | ---
+++
@@ -2,7 +2,7 @@
// Display available device information
-['platform', 'version', 'model', 'language', 'orientation'].forEach((property) => {
+['platform', 'version', 'model', 'vendor', 'language', 'orientation'].forEach((property) => {
new TextView({
id: property,
left: 10, right: 10, top: '... |
ced91cef769326b288b6741f3e1474ee9cb89a29 | core/providers/totalwind/extractor.js | core/providers/totalwind/extractor.js | 'use strict'
var extract = require('../../extract')
var lodash = require('lodash')
var CONST = {
SOURCE_NAME: 'totalwind',
IGNORE_LOG_PROPS: ['updatedAt', 'createdAt', 'link', 'title', 'provider']
}
function createExtractor (type, category) {
function extractor (data) {
data.type = type
data.provider =... | 'use strict'
var isBlacklisted = require('../../schema/is-blacklisted')
var extract = require('../../extract')
var lodash = require('lodash')
var CONST = {
SOURCE_NAME: 'totalwind',
IGNORE_LOG_PROPS: ['updatedAt', 'createdAt', 'link', 'title', 'provider']
}
function createExtractor (type, category) {
function ... | Check first censure words before analyze | Check first censure words before analyze
| JavaScript | mit | windtoday/windtoday-core,windtoday/windtoday-core | ---
+++
@@ -1,5 +1,6 @@
'use strict'
+var isBlacklisted = require('../../schema/is-blacklisted')
var extract = require('../../extract')
var lodash = require('lodash')
@@ -10,6 +11,8 @@
function createExtractor (type, category) {
function extractor (data) {
+ if (isBlacklisted(data.title)) return
+
... |
ea7bb1e48593306441da54337b82ba9b10452703 | bin/siteshooter.js | bin/siteshooter.js | #! /usr/bin/env node
'use strict';
var chalk = require('chalk'),
pkg = require('../package.json');
var nodeVersion = process.version.replace('v',''),
nodeVersionRequired = pkg.engines.node.replace('>=','');
// check node version compatibility
if(nodeVersion <= nodeVersionRequired){
console.log();
co... | #! /usr/bin/env node
'use strict';
var chalk = require('chalk'),
pkg = require('../package.json');
var nodeVersion = process.version.replace('v',''),
nodeVersionRequired = pkg.engines.node.replace('>=','');
// check node version compatibility
if(nodeVersion <= nodeVersionRequired){
console.log();
co... | Move update notifier to bin | Move update notifier to bin
| JavaScript | mpl-2.0 | devopsgroup-io/siteshooter | ---
+++
@@ -7,14 +7,20 @@
var nodeVersion = process.version.replace('v',''),
nodeVersionRequired = pkg.engines.node.replace('>=','');
+
// check node version compatibility
if(nodeVersion <= nodeVersionRequired){
+ console.log();
+ console.error(chalk.red.bold('✗ '), chalk.red.bold('NODE ' + process.ve... |
8506adb0cd6e8dc13a2deefcd349a1826be6f567 | src/aspects/equality.js | src/aspects/equality.js | // @flow
import { Record } from 'immutable';
import { Type } from './tm';
import EvaluationResult from './evaluation';
const EqualityShape = Record({
of: null, // Tm
type: Type.singleton,
}, 'equality');
// Propositional Equality type
export class Equality extends EqualityShape {
static arity = [0];
map()... | // @flow
import { Record } from 'immutable';
import { Type } from '../theory/tm';
import { EvaluationResult } from '../theory/evaluation';
const EqualityShape = Record({
of: null, // Tm
type: Type.singleton,
}, 'equality');
// Propositional Equality type
export class Equality extends EqualityShape {
static a... | Fix import errors flow found. | Fix import errors flow found.
| JavaScript | mit | joelburget/pigment | ---
+++
@@ -1,8 +1,8 @@
// @flow
import { Record } from 'immutable';
-import { Type } from './tm';
-import EvaluationResult from './evaluation';
+import { Type } from '../theory/tm';
+import { EvaluationResult } from '../theory/evaluation';
const EqualityShape = Record({ |
9ad30d7fb666403f0a74e5905ef928be13547a7b | gulpfile.js | gulpfile.js | 'use strict';
const path = require('path');
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const spawn = require('cross-spawn');
const excludeGitignore = require('gulp-exclude-gitignore');
const nsp = require('gulp-nsp');
gulp.task('nsp', nodeSecurityProtocol);
gulp.task('watch', watch);
gulp.ta... | 'use strict';
const path = require('path');
const gulp = require('gulp');
const eslint = require('gulp-eslint');
const spawn = require('cross-spawn');
const excludeGitignore = require('gulp-exclude-gitignore');
const nsp = require('gulp-nsp');
gulp.task('nsp', nodeSecurityProtocol);
gulp.task('watch', watch);
gulp.ta... | Disable lint for test assets | Disable lint for test assets
| JavaScript | mit | FountainJS/generator-fountain-systemjs,FountainJS/generator-fountain-systemjs | ---
+++
@@ -20,7 +20,7 @@
}
function eslintCheck() {
- return gulp.src(['**/*.js', '!**/templates/**'])
+ return gulp.src(['**/*.js', '!**/templates/**', '!test/assets/**'])
.pipe(excludeGitignore())
.pipe(eslint())
.pipe(eslint.format()) |
c62191bfcb066f9f544f3df019db32da48dbbeee | test/examples/Counter-test.js | test/examples/Counter-test.js | /** @jsx createElement */
const {createElement, createEventHandler, render} = Yolk
function Counter () {
const handlePlus = createEventHandler(1, 0)
const handleMinus = createEventHandler(-1, 0)
const count = handlePlus.merge(handleMinus).scan((x, y) => x+y, 0)
return (
<div>
<button id="plus" onCl... | /** @jsx createElement */
const {createElement, createEventHandler, render} = Yolk
function Counter () {
const handlePlus = createEventHandler(1)
const handleMinus = createEventHandler(-1)
const count = handlePlus.merge(handleMinus).scan((x, y) => x+y, 0).startWith(0)
return (
<div>
<button id="plu... | Update Counter test to no relying on initial values for event handlers | Update Counter test to no relying on initial values for event handlers
| JavaScript | mit | StateFarmIns/yolk,garbles/yolk,KenPowers/yolk,yolkjs/yolk,jadbox/yolk,brandonpayton/yolk,kamilogorek/yolk,BrewhouseTeam/yolk,knpwrs/yolk | ---
+++
@@ -3,9 +3,9 @@
const {createElement, createEventHandler, render} = Yolk
function Counter () {
- const handlePlus = createEventHandler(1, 0)
- const handleMinus = createEventHandler(-1, 0)
- const count = handlePlus.merge(handleMinus).scan((x, y) => x+y, 0)
+ const handlePlus = createEventHandler(1)
+... |
1ed8856f1a4861213c73b857582a18e6c836a7ef | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src(docsSrcDir)
.pipe(
jsdoc(docsDestDir,
{
path: './node_modules/jaguarjs-jsdoc',
applicatio... | var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
ghPages = require('gulp-gh-pages'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src(docsSrcDir)
.pipe(
jsdoc(docsDestDir,
{
path: './node_modul... | Add gulp task to deploy jsDocs | Add gulp task to deploy jsDocs
| JavaScript | mit | moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough | ---
+++
@@ -1,5 +1,6 @@
var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
+ ghPages = require('gulp-gh-pages'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
@@ -23,8 +24,17 @@
);
};
+gulp.task('deploy', function() {
+ return gulp.src(docsDestDir +... |
af37455fed835172c2e533a60f2e65f3833058a9 | gulpfile.js | gulpfile.js | var gulp = require("gulp");
var sass = require("gulp-sass");
var postcss = require("gulp-postcss");
var autoprefixer = require("autoprefixer");
var cssnano = require("cssnano");
var uglify = require("gulp-uglify");
var rename = require("gulp-rename");
var browserSync = require("browser-sync");
gulp.task("serve", ["css... | const gulp = require('gulp');
const sass = require('gulp-sass');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const uglify = require('gulp-uglify');
const rename = require('gulp-rename');
const browserSync = require('browser-sync');
gulp.tas... | Update Gulp file to use es6 syntax. | Update Gulp file to use es6 syntax. | JavaScript | mit | mohouyizme/minimado,mohouyizme/minimado | ---
+++
@@ -1,43 +1,46 @@
-var gulp = require("gulp");
-var sass = require("gulp-sass");
-var postcss = require("gulp-postcss");
-var autoprefixer = require("autoprefixer");
-var cssnano = require("cssnano");
-var uglify = require("gulp-uglify");
-var rename = require("gulp-rename");
-var browserSync = require("brows... |
ac04ecd69e559d018f7d9e24d7f6de617aac3a26 | src/apis/Dimensions/index.js | src/apis/Dimensions/index.js | /**
* Copyright (c) 2015-present, Nicolas Gallagher.
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* @flow
*/
import ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment'
import invariant from 'fbjs/lib/invariant'
const win = ExecutionEnvironment.canUseDOM ? window : { screen: {} }
... | /**
* Copyright (c) 2015-present, Nicolas Gallagher.
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* @flow
*/
import debounce from 'lodash.debounce'
import ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment'
import invariant from 'fbjs/lib/invariant'
const win = ExecutionEnvironmen... | Update Dimensions when window resizes | Update Dimensions when window resizes
| JavaScript | mit | necolas/react-native-web,necolas/react-native-web,necolas/react-native-web | ---
+++
@@ -6,31 +6,38 @@
* @flow
*/
+import debounce from 'lodash.debounce'
import ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment'
import invariant from 'fbjs/lib/invariant'
const win = ExecutionEnvironment.canUseDOM ? window : { screen: {} }
-const dimensions = {
- screen: {
- fontScale: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.