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 |
|---|---|---|---|---|---|---|---|---|---|---|
ddedb7d7f88553dfbfcbd494996c2b451997fac2 | app/lagniappe/dependencies/Composer.js | app/lagniappe/dependencies/Composer.js | import Dependency from './Dependency'
export default class Composer extends Dependency {
default()
{
this.dependencyName = 'PHP Composer'
this.required = true
}
mac() {
this.dependencyLink = 'https://github.com/laravel/valet'
this.dependencyDocumentation = 'https://la... | import Dependency from './Dependency'
export default class Composer extends Dependency {
default()
{
this.dependencyName = 'PHP Composer'
this.required = true
}
mac() {
this.dependencyLink = 'https://getcomposer.org/'
this.dependencyDocumentation = 'https://getcompose... | Add proper composer link and docs | Add proper composer link and docs
| JavaScript | mit | baublet/lagniappe,baublet/lagniappe | ---
+++
@@ -10,8 +10,8 @@
}
mac() {
- this.dependencyLink = 'https://github.com/laravel/valet'
- this.dependencyDocumentation = 'https://laravel.com/docs/5.4/valet'
+ this.dependencyLink = 'https://getcomposer.org/'
+ this.dependencyDocumentation = 'https://getcomposer.org/doc/... |
35ca195d9e207577f92e128a70f835949023b29c | test/unit/controllersSpec.js | test/unit/controllersSpec.js | 'use strict';
/* jasmine specs for controllers go here */
describe('RootCtrl', function(){
var scope;
beforeEach(module('swiftBrowser.controllers'));
beforeEach(inject(function($controller) {
scope = {};
$controller('RootCtrl', {$scope: scope});
}));
it('should list containers',... | 'use strict';
/* jasmine specs for controllers go here */
describe('RootCtrl', function(){
var scope;
beforeEach(module('swiftBrowser.controllers'));
beforeEach(inject(function($controller) {
scope = {};
$controller('RootCtrl', {$scope: scope});
}));
it('should list containers',... | Add unit test for ContainerCtrl | Add unit test for ContainerCtrl
| JavaScript | apache-2.0 | mindware/swift-browser,mgeisler/swift-browser,mindware/swift-browser,zerovm/swift-browser,zerovm/swift-browser,mgeisler/swift-browser | ---
+++
@@ -30,3 +30,26 @@
});
});
+
+
+describe('ContainerCtrl', function(){
+ var scope;
+
+ beforeEach(module('swiftBrowser.controllers'));
+
+ beforeEach(inject(function($controller) {
+ var params = {container: 'cont'};
+ scope = {};
+ $controller('ContainerCtrl',
+ ... |
c6650cbf672b4c5fc2e646e48ced5a0179b0292a | jest.config.js | jest.config.js | module.exports = {
testURL: 'http://localhost/',
moduleFileExtensions: ['js', 'jsx', 'json', 'styl'],
setupFiles: ['<rootDir>/test/jestLib/setup.js'],
moduleDirectories: ['src', 'node_modules'],
moduleNameMapper: {
'^redux-cozy-client$': '<rootDir>/src/lib/redux-cozy-client',
'\\.(png|gif|jpe?g|svg)$'... | module.exports = {
testURL: 'http://localhost/',
moduleFileExtensions: ['js', 'jsx', 'json', 'styl'],
setupFiles: ['<rootDir>/test/jestLib/setup.js'],
moduleDirectories: ['src', 'node_modules'],
moduleNameMapper: {
'^redux-cozy-client$': '<rootDir>/src/lib/redux-cozy-client',
'\\.(png|gif|jpe?g|svg)$'... | Add cozy-keys-lib exception to transformIgnorePatterns | test: Add cozy-keys-lib exception to transformIgnorePatterns
| JavaScript | agpl-3.0 | cozy/cozy-home,cozy/cozy-home,cozy/cozy-home | ---
+++
@@ -10,7 +10,9 @@
'.styl$': 'identity-obj-proxy',
'^cozy-client$': 'cozy-client/dist/index'
},
- transformIgnorePatterns: ['node_modules/(?!cozy-ui|cozy-harvest-lib)'],
+ transformIgnorePatterns: [
+ 'node_modules/(?!cozy-ui|cozy-harvest-lib|cozy-keys-lib)'
+ ],
globals: {
__ALLOW_H... |
243696b8ca118b29a2af95070b613800738b9cc2 | app/stores/RendererStore.js | app/stores/RendererStore.js | import EventEmitter from 'events';
import { RESIZE } from '../constants/AppConstants';
class RendererStore extends EventEmitter {
constructor(...args) {
super(...args);
this.data = {
width: 0,
height: 0,
stageWidth: 0,
stageHeight: 0,
stageCenter: {x: 0,y: 0},
resolution... | import EventEmitter from 'events';
import { RESIZE } from '../constants/AppConstants';
class RendererStore extends EventEmitter {
constructor(...args) {
super(...args);
this.data = {
width: 0,
height: 0,
stageWidth: 0,
stageHeight: 0,
stageCenter: {x: 0,y: 0},
resolution... | Add data to resize callback | Add data to resize callback
| JavaScript | mit | edwinwebb/pixi-seed,edwinwebb/pixi-seed,edwinwebb/three-seed | ---
+++
@@ -29,7 +29,7 @@
}
addChangeListener(callback) {
- this.on(RESIZE, callback);
+ this.on(RESIZE, callback, this.data);
}
}
|
68b599377c3906ea90c14957a5601cd57d6276a5 | app/templates/_bootstrap.js | app/templates/_bootstrap.js | 'use strict';
var sdk = require('flowxo-sdk'),
service = require('../');
var credentials = {};
try {
credentials = require('../credentials');
} catch(e) {}
beforeEach(function() {
this.service = service;
this.credentials = credentials;
this.runner = new sdk.ScriptRunner(service, {
credentials: credentia... | 'use strict';
var sdk = require('flowxo-sdk'),
service = require('../');
var credentials = {};
try {
credentials = require('../credentials');
} catch(e) {}
beforeEach(function() {
this.service = service;
// Clone the credentials so they can't be globally
// overwritten by a test spec
this.credentials ... | Clone credentials on each test run | Clone credentials on each test run
| JavaScript | mit | flowxo/generator-flowxo | ---
+++
@@ -1,6 +1,7 @@
'use strict';
+
var sdk = require('flowxo-sdk'),
- service = require('../');
+ service = require('../');
var credentials = {};
try {
@@ -9,8 +10,12 @@
beforeEach(function() {
this.service = service;
- this.credentials = credentials;
+
+ // Clone the credentials so they can't ... |
40e9232ec550c322153e4212344b9d35722cd2e7 | blueocean-web/gulpfile.js | blueocean-web/gulpfile.js | //
// See https://github.com/jenkinsci/js-builder
//
var builder = require('@jenkins-cd/js-builder');
// Disable js-builder based linting for now.
// Will get fixed with https://github.com/cloudbees/blueocean/pull/55
builder.lint('none');
// Explicitly setting the src paths in order to allow the rebundle task to
// w... | //
// See https://github.com/jenkinsci/js-builder
//
var builder = require('@jenkins-cd/js-builder');
// Disable js-builder based linting for now.
// Will get fixed with https://github.com/cloudbees/blueocean/pull/55
builder.lint('none');
// Explicitly setting the src paths in order to allow the rebundle task to
// w... | Watch for changes in the JDL package (rebundle) | Watch for changes in the JDL package (rebundle)
| JavaScript | mit | jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,ModuloM/blueocean-plugin,kzantow/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin,alvarolobato/blueocean-plugin,alvarolobato/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin,tfennelly/blueocean-plugi... | ---
+++
@@ -10,7 +10,7 @@
// Explicitly setting the src paths in order to allow the rebundle task to
// watch for changes in the JDL (js, css, icons etc).
// See https://github.com/jenkinsci/js-builder#setting-src-and-test-spec-paths
-builder.src(['src/main/js', 'src/main/less', 'node_modules/@jenkins-cd/design-la... |
8ab80e4c485ae19ad63704e3096492dc9426457f | blueprints/route/index.js | blueprints/route/index.js | var ancestralBlueprint = require('../../lib/ancestral-blueprint');
module.exports = {
description: 'Generates a route and registers it with the router',
availableOptions: [
{
name: 'type',
type: String,
values: ['route', 'resource'],
default: 'route',
aliases:[
{'route': ... | var ancestralBlueprint = require('../../lib/ancestral-blueprint');
module.exports = {
description: 'Generates a route and registers it with the router',
availableOptions: [
{
name: 'type',
type: String,
values: ['route', 'resource'],
default: 'route',
aliases:[
{'route': ... | Correct route blueprint mistakenly looking up wrong blueprint | Correct route blueprint mistakenly looking up wrong blueprint
| JavaScript | mit | ntippie/ember-cli-emblem,Vestorly/ember-cli-emblem,Vestorly/ember-cli-emblem,ntippie/ember-cli-emblem | ---
+++
@@ -22,21 +22,21 @@
],
_fixBlueprint: function(options) {
- var blueprint = ancestralBlueprint('component', this.project);
+ var blueprint = ancestralBlueprint('route', this.project);
blueprint.ui = options.ui;
return blueprint;
},
fileMapTokens: function() {
- return ancest... |
953a4fff7b28fb74e3ce862b480d89a675c32e12 | js/reducers.js | js/reducers.js | import { SET_SEARCH_TERM } from './actions'
const DEFAULT_STATE = {
searchTerm: ''
}
const setSearchTerm = (state, action) => {
const newState = {}
Object.assign(newState, state, {searchTerm: action.searchTerm})
}
const rootReducer = (state = DEFAULT_STATE, action) => {
switch (action.type) {
case SET_SE... | import { SET_SEARCH_TERM } from './actions'
const DEFAULT_STATE = {
searchTerm: ''
}
const setSearchTerm = (state, action) => {
const newState = {}
Object.assign(newState, state, {searchTerm: action.searchTerm})
return newState
}
const rootReducer = (state = DEFAULT_STATE, action) => {
switch (action.type)... | Add missing return statement in setSearchTerm | Add missing return statement in setSearchTerm
| JavaScript | mit | galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka | ---
+++
@@ -7,6 +7,7 @@
const setSearchTerm = (state, action) => {
const newState = {}
Object.assign(newState, state, {searchTerm: action.searchTerm})
+ return newState
}
const rootReducer = (state = DEFAULT_STATE, action) => { |
5313eb7bce2ebb1b8dae3c2359cc6520465e01c1 | ghost/admin/router.js | ghost/admin/router.js | /*global Ember */
// ensure we don't share routes between all Router instances
var Router = Ember.Router.extend();
Router.reopen({
//location: 'history', // use HTML5 History API instead of hash-tag based URLs
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
});
Router.map(functio... | /*global Ember */
// ensure we don't share routes between all Router instances
var Router = Ember.Router.extend();
Router.reopen({
location: 'history', // use HTML5 History API instead of hash-tag based URLs
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
});
Router.map(function ... | Add HTML5 pushState support for Ember | Add HTML5 pushState support for Ember
- also updates associated route
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ---
+++
@@ -4,7 +4,7 @@
var Router = Ember.Router.extend();
Router.reopen({
- //location: 'history', // use HTML5 History API instead of hash-tag based URLs
+ location: 'history', // use HTML5 History API instead of hash-tag based URLs
rootURL: '/ghost/ember/' // admin interface lives under sub-directo... |
66cc7304305fc034074b0c63a64437af2c9e3c0d | grunt/buildcontrol.js | grunt/buildcontrol.js | module.exports = {
options: {
dir: 'dist',
commit: true,
push: true,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
pages: {
options: {
remote: 'https://github.com/lewisnyman/lewisnyman.github.io.git',
branch: 'master'
}
},
local: {
... | module.exports = {
options: {
dir: 'dist',
commit: true,
push: true,
message: 'Built %sourceName% from commit %sourceCommit% on branch %sourceBranch%'
},
pages: {
options: {
remote: 'https://github.com/lewisnyman/lewisnyman.github.io.git',
branch: 'master',
config: {
... | Add username to deploy config | Add username to deploy config
| JavaScript | mit | lewisnyman/lewisnyman.co.uk-source,lewisnyman/lewisnyman.co.uk-source,lewisnyman/lewisnyman.co.uk-source | ---
+++
@@ -8,7 +8,10 @@
pages: {
options: {
remote: 'https://github.com/lewisnyman/lewisnyman.github.io.git',
- branch: 'master'
+ branch: 'master',
+ config: {
+ 'user.name': 'lewisnyman'
+ },
}
},
local: { |
54599eb33226086a80b233fc896785a55b16fa40 | src/api/__tests__/Killmail.spec.js | src/api/__tests__/Killmail.spec.js | jest.mock('../../internal/ESIAgent');
const Api = require('../../Api');
let api = new Api();
let agent = api._esiAgent;
afterEach(() => {
agent.__reset();
});
test('Killmail.get', () => {
agent.__expectRoute('get_killmails_killmail_id_killmail_hash', {'killmail_id': 1, 'killmail_hash': 'hash'});
return api.ki... | jest.mock('../../internal/ESIAgent');
const Api = require('../../Api');
let api = new Api();
let agent = api._esiAgent;
afterEach(() => {
agent.__reset();
});
test('Killmail.get', () => {
agent.__expectRoute('get_killmails_killmail_id_killmail_hash', {
'killmail_id': 1,
'killmail_hash': 'hash'
});
r... | Fix formatting in Killmail test | Fix formatting in Killmail test
| JavaScript | bsd-3-clause | lhkbob/eve-swagger-js,lhkbob/eve-swagger-js | ---
+++
@@ -10,7 +10,10 @@
});
test('Killmail.get', () => {
- agent.__expectRoute('get_killmails_killmail_id_killmail_hash', {'killmail_id': 1, 'killmail_hash': 'hash'});
+ agent.__expectRoute('get_killmails_killmail_id_killmail_hash', {
+ 'killmail_id': 1,
+ 'killmail_hash': 'hash'
+ });
return api.k... |
dcfd13351222b68e3647657ed3874ce189c45676 | namuhub/static/namuhub.js | namuhub/static/namuhub.js | var ContribBox = React.createClass({
render: function() {
return <div />;
}
});
var SearchBox = React.createClass({
getInitialState: function () {
console.log(this.props);
return {
user: this.props.user || ''
};
},
handleSubmit: function() {
},
... | var ContribBox = React.createClass({
handleLoad: function(user) {
alert(user);
},
render: function() {
return <div>asdf</div>;
}
});
var SearchBox = React.createClass({
getInitialState: function() {
return {
user: this.props.user || ''
};
},
s... | Make codes being close to React style | Make codes being close to React style
| JavaScript | apache-2.0 | ssut/namuhub,ssut/namuhub,ssut/namuhub | ---
+++
@@ -1,19 +1,18 @@
var ContribBox = React.createClass({
+ handleLoad: function(user) {
+ alert(user);
+ },
+
render: function() {
- return <div />;
+ return <div>asdf</div>;
}
});
var SearchBox = React.createClass({
- getInitialState: function () {
- console.... |
ce6c6d06b71fad04f7909ddf0d5a3fc7f13318cb | app/views/shuttle/ShuttleCard.js | app/views/shuttle/ShuttleCard.js | import React from 'react'
import { Text } from 'react-native'
import { withNavigation } from 'react-navigation'
import ShuttleOverview from './ShuttleOverview'
import ScrollCard from '../common/ScrollCard'
import Touchable from '../common/Touchable'
import css from '../../styles/css'
export const ShuttleCard = ({
na... | import React from 'react'
import { Text } from 'react-native'
import { withNavigation } from 'react-navigation'
import ShuttleOverview from './ShuttleOverview'
import ScrollCard from '../common/ScrollCard'
import Touchable from '../common/Touchable'
import css from '../../styles/css'
export const ShuttleCard = ({
na... | Add extra check in keyExtractor to prevent dublicate keys | Add extra check in keyExtractor to prevent dublicate keys
| JavaScript | mit | UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile,UCSD/now-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/campus-mobile,UCSD/now-mobile | ---
+++
@@ -22,7 +22,7 @@
action: gotoSavedList
}
]
-
+ console.log(savedStops)
return (
<ScrollCard
id="shuttle" |
0fce5bee89ea2a81a295a80531d42fef675dd02b | components/Footer.js | components/Footer.js | import React from 'react'
function Footer() {
return (
<div className="fix-bottom">
<p className="tc">All rigths reserved</p>
<style jsx>{`
.fix-bottom {
position: relative;
bottom: 0;
width: 100%;
height: auto;
color: #094E62;
}
... | import React from 'react'
function Footer() {
return (
<div className="fix-bottom">
<p className="tc f7">ยฉ 2017 All rigths reserved</p>
<style jsx>{`
.fix-bottom {
position: absolute;
bottom: 0;
width: 100%;
height: auto;
color: #094E62;
... | Replace all rights reserved at the bottom of the screen | Replace all rights reserved at the bottom of the screen
| JavaScript | mit | efleurine/alumnus | ---
+++
@@ -3,10 +3,10 @@
function Footer() {
return (
<div className="fix-bottom">
- <p className="tc">All rigths reserved</p>
+ <p className="tc f7">ยฉ 2017 All rigths reserved</p>
<style jsx>{`
.fix-bottom {
- position: relative;
+ position: absolute;
... |
7074918dbe7a713898a670b5e3f67441a89ac11a | topcube.js | topcube.js | var spawn = require('child_process').spawn;
var path = require('path');
module.exports = function (options) {
options = options || {};
options.url = options.url || 'http://nodejs.org';
options.name = options.name || 'nodejs';
var client;
switch (process.platform) {
case 'win32':
client... | var spawn = require('child_process').spawn;
var path = require('path');
module.exports = function (options) {
options = options || {};
options.url = options.url || 'http://nodejs.org';
options.name = options.name || 'nodejs';
var client;
switch (process.platform) {
case 'win32':
client... | Revert "Allow only name, url keys for win32." | Revert "Allow only name, url keys for win32."
This reverts commit 9ea03c29ffc1dac7f04f094433c9e47c2ba1c5ad.
| JavaScript | mit | creationix/topcube,creationix/topcube,creationix/topcube | ---
+++
@@ -21,13 +21,7 @@
}
var args = [];
- for (var key in options) {
- // Omit keys besides name & url for now until options
- // parsing bugs are resolved.
- if (process.platform === 'win32' &&
- (key !== 'name' || key !== 'url')) continue;
- args.push('--' +... |
046d25e5a18444acc9f745054b772ab5c316717d | server.js | server.js | var AlexaAppServer = require('alexa-app-server');
var MpdInterface = require('./apps/alexa-mpd-control/mpd_interface');
var mpd = new MpdInterface();
AlexaAppServer.start({
// server_root:__dirname, // Path to root
// public_html:"public_html", // Static content
// app_dir:"apps", // Where ... | var AlexaAppServer = require('alexa-app-server');
var MpdInterface = require('./apps/alexa-mpd-control/mpd_interface');
var mpd = new MpdInterface();
AlexaAppServer.start({
// server_root:__dirname, // Path to root
// public_html:"public_html", // Static content
// app_dir:"apps", // Where ... | Fix bad function name call | Fix bad function name call
| JavaScript | mit | guikubivan/alexa-mpd-control,guikubivan/alexa-mpd-control | ---
+++
@@ -17,7 +17,7 @@
var retPromise = new Promise(function(resolve, reject){
if(json.request.intent && json.request.intent.name === "randalbum"){
- mpd.getRandomAlbumName().then(function(albumInfo){
+ mpd.getRandomAlbum().then(function(albumInfo){
json[json.request.intent.... |
70ecffab32fb4106bbe8b1056ec864bbf5faf4e2 | src/styles/Illustrations/assets/tuttolino/index.js | src/styles/Illustrations/assets/tuttolino/index.js | export Tuttolino404 from "./tuttolino-404.png"
export TuttolinoCompetitor from "./tuttolino-competitor.svg"
export TuttolinoErrorMobile from "./tuttolino-error-mobile.png"
export TuttolinoError from "./tuttolino-error.svg"
export TuttolinoFamilySofa from "./tuttolino-family-sofa.svg"
export TuttolinoFamily from "./tutt... | export Tuttolino404 from "./tuttolino-404.png"
export TuttolinoCompetitor from "./tuttolino-competitor.svg"
export TuttolinoErrorMobile from "./tuttolino-error-mobile.png"
export TuttolinoError from "./tuttolino-error.svg"
export TuttolinoFamilySofa from "./tuttolino-family-sofa.svg"
export TuttolinoFamily from "./tutt... | Deploy to GitHub pages | Deploy to GitHub pages [ci skip]
| JavaScript | mit | tutti-ch/react-styleguide,tutti-ch/react-styleguide | ---
+++
@@ -9,7 +9,6 @@
export TuttolinoHey from "./tuttolino-hey.svg"
export TuttolinoHolmesNoCircle from "./tuttolino-holmes-no_circle.svg"
export TuttolinoHolmes from "./tuttolino-holmes.svg"
-export TuttolinoHolmes from "./tuttolino-holmes-no_circle.svg"
export TuttolinoIntroScreens from "./tuttolino-intro-sc... |
88fcafc8839304ca8bc3a77f74f25d5542cec342 | src/MessageStore.js | src/MessageStore.js | var Reflux = require('reflux');
var objectAssign = require('object-assign');
var MessageActions = require('./MessageActions');
var _stack = []; // Container for the each object of message
var _counter = 0;
/**
* Registry of all messages, mixin to manage all drawers.
* Contains add, flush, and remove to do the menti... | var Reflux = require('reflux');
var objectAssign = require('object-assign');
var MessageActions = require('./MessageActions');
var _stack = []; // Container for the each object of message
var _counter = 0;
/**
* Registry of all messages, mixin to manage all drawers.
* Contains add, flush, and remove to do the menti... | Clear instead of Flush. Clearing now allows for a certain type to be filtered out. | Clear instead of Flush. Clearing now allows for a certain type to be filtered out. | JavaScript | mit | srph/reflux-flash | ---
+++
@@ -50,7 +50,12 @@
/**
* Removes everything in the stack
*/
- onFlush: function() { this.trigger(_stack = []); }
+ onClear: function(filter) {
+ this.trigger(_stack = !!filter
+ ? _stack.filter(function(message) { return filter == message.type })
+ : []
+ );
+ }
};
module.exp... |
60a48a5a5cd959efccc3dfcbed735a1e8fc5e47a | server.js | server.js | var http = require('http')
, url = require('url')
, express = require('express')
, rest = express()
, path = require('path')
, server = http.createServer(rest)
, ap = require('argparse').ArgumentParser
, colors = require('colors')
, appium = require('./app/appium')
, parser = require('./app/parser');
... | var http = require('http')
, url = require('url')
, express = require('express')
, rest = express()
, path = require('path')
, server = http.createServer(rest)
, ap = require('argparse').ArgumentParser
, colors = require('colors')
, appium = require('./app/appium')
, parser = require('./app/parser');
... | Deal with invalid http POST more gracefully. | Deal with invalid http POST more gracefully.
| JavaScript | apache-2.0 | appium/appium,appium/appium,appium/appium,appium/appium,appium/appium,Sw0rdstream/appium,appium/appium | ---
+++
@@ -10,10 +10,19 @@
, parser = require('./app/parser');
rest.configure(function() {
+ var bodyParser = express.bodyParser()
+ , parserWrap = function(req, res, next) {
+ // wd.js sends us http POSTs with empty body which will make bodyParser fail.
+ if (parseInt(req.get('content-length... |
d419673a07062390431dd7ff4f5ac526b1c252bd | tests/content/script/breakpoints/5525/issue5525.js | tests/content/script/breakpoints/5525/issue5525.js | function runTest()
{
FBTest.sysout("issue5525.START");
FBTest.openNewTab(basePath + "script/breakpoints/5525/issue5525.html", function(win)
{
FBTest.openFirebug();
FBTest.enableScriptPanel()
FBTest.enableConsolePanel()
FBTest.selectPanel("console");
var config = {tag... | function runTest()
{
FBTest.sysout("issue5525.START");
FBTest.openNewTab(basePath + "script/breakpoints/5525/issue5525.html", function(win)
{
FBTest.openFirebug();
FBTest.enableScriptPanel()
FBTest.enableConsolePanel()
FBTest.selectPanel("console");
var config = {tag... | Fix test to pass also with Firefox 13 | Fix test to pass also with Firefox 13
| JavaScript | bsd-3-clause | firebug/tracing-console,firebug/tracing-console | ---
+++
@@ -12,7 +12,7 @@
FBTest.waitForDisplayedElement("console", config, function(row)
{
// Verify displayed text.
- var reTextContent = /ReferenceError\:\s*undefinedVariable is not defined\s*var test = undefinedVariable;\s*issue5525.html\s*\(line 10\)/;
+ var r... |
681dc926bcc021550d8b4fc13fc0136652a43c2c | src/extras/index.js | src/extras/index.js | export * from './controls/FirstPersonControls';
export * from './controls/OrbitControlsModule';
export * from './VirtualMouse';
| export * from './controls/FirstPersonControls';
export * from './controls/OrbitControlsModule';
export * from './pass/index';
export * from './shader/index';
export * from './VirtualMouse';
| Fix exporting pass & shaders | Fix exporting pass & shaders
| JavaScript | mit | WhitestormJS/whitestorm.js,WhitestormJS/whitestorm.js | ---
+++
@@ -1,3 +1,5 @@
export * from './controls/FirstPersonControls';
export * from './controls/OrbitControlsModule';
+export * from './pass/index';
+export * from './shader/index';
export * from './VirtualMouse'; |
3bf56355eee5d7091f1596f10efa404af28bbeb9 | src/handleGitHub.js | src/handleGitHub.js | String.prototype.replaceAll = function(search, replace)
{
//if replace is not sent, return original string otherwise it will
//replace search string with 'undefined'.
if (replace === undefined) {
return this.toString();
}
return this.replace(new RegExp('[' + search + ']', 'g'), replace);
};... | String.prototype.replaceAll = function(search, replace)
{
//if replace is not sent, return original string otherwise it will
//replace search string with 'undefined'.
if (replace === undefined) {
return this.toString();
}
return this.replace(new RegExp('[' + search + ']', 'g'), replace);
};... | Add support for multiple issue keywords in the same repo | Add support for multiple issue keywords in the same repo
| JavaScript | mit | NunoPinheiro/commitissuelinker,NunoPinheiro/commitissuelinker | ---
+++
@@ -13,21 +13,25 @@
var repoFromLink = window.location.pathname.split("/")[2];
listRepositories(function(repos){
- var repo = repos.find(repo => repo.scm == repoFromLink);
- if(repo){
- processRepo(repo);
+ var repos = repos.filter(repo => repo.scm == repoFromLink);
+ if(repos){
+ pr... |
22b0f1d407cceb44c7736dea7f42c9aa88d72f74 | components/date/fields.js | components/date/fields.js | 'use strict';
module.exports = key => ({
[`${key}-day`]: {
label: 'Day'
},
[`${key}-month`]: {
label: 'Month'
},
[`${key}-year`]: {
label: 'Year'
}
});
| 'use strict';
module.exports = key => ({
[`${key}-day`]: {
label: 'Day',
autocomplete: 'bday-day'
},
[`${key}-month`]: {
label: 'Month',
autocomplete: 'bday-month'
},
[`${key}-year`]: {
label: 'Year',
autocomplete: 'bday-year'
}
});
| Add autocomplete to date component to assist with accessibility | Add autocomplete to date component to assist with accessibility
| JavaScript | mit | UKHomeOfficeForms/hof-bootstrap,UKHomeOfficeForms/hof,UKHomeOfficeForms/hof-bootstrap,UKHomeOfficeForms/hof | ---
+++
@@ -2,12 +2,15 @@
module.exports = key => ({
[`${key}-day`]: {
- label: 'Day'
+ label: 'Day',
+ autocomplete: 'bday-day'
},
[`${key}-month`]: {
- label: 'Month'
+ label: 'Month',
+ autocomplete: 'bday-month'
},
[`${key}-year`]: {
- label: 'Year'
+ label: 'Year',
+ ... |
d9cc719e8c1eeb1290ba5df986d1b89050a3b12e | src/ie.js | src/ie.js | // Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function(){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector){... | // Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function($){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector)... | Make sure to properly patch the Zepto object in IE, not any global $ object. | Make sure to properly patch the Zepto object in IE, not any global $ object.
| JavaScript | mit | xuechunL/zepto,chenruixuan/zepto,zhengdai/zepto,SallyRice/zepto,JimmyVV/zepto,huaziHear/zepto,wyfyyy818818/zepto,yinchuandong/zepto,wanglam/zepto,nerdgore/zepto,zhangbg/zepto,mmcai/zepto,Genie77998/zepto,rayrc/zepto,wubian0517/zepto,alatvanas9/zepto,mscienski/zepto,webcoding/zepto,wubian0517/zepto,GerHobbelt/zepto,huaz... | ---
+++
@@ -2,7 +2,7 @@
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
-;(function(){
+;(function($){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
@@ -35,4 +35,4 @@
... |
72d15313741b7c06721c9f5638674e43a9a52cb6 | src/graphql.js | src/graphql.js | import Item from "./graphql/types/item"
import Update from "./graphql/types/update"
import { makeExecutableSchema } from "graphql-tools"
const RuneScapeQuery = `
type RuneScapeQuery {
items: [Item]
item(id: Int!): Item
updates: [Update]
}
`
const SchemaDefinition = `
schema {
query: RuneScapeQuery
... | import Item from "./graphql/types/item"
import Update from "./graphql/types/update"
import { makeExecutableSchema } from "graphql-tools"
const RuneScapeQuery = `
type RuneScapeQuery {
items: [Item]
item(id: Int!): Item
updates: [Update]
}
`
const SchemaDefinition = `
schema {
query: RuneScapeQuery
... | Fix issue in retrieval of transactions | Fix issue in retrieval of transactions
| JavaScript | mit | DevNebulae/ads-pt-api | ---
+++
@@ -28,8 +28,10 @@
models.updates.find({}, { _id: false })
},
Item: {
- rsbuddy: (root, args, { models }) =>
- models.items.findOne({ id: root.id }, { _id: false, rsbuddy: true })
+ rsbuddy: ({ id }, args, { models }) =>
+ models.items
+ .findOne({ id }, { _... |
af23ebea023e24437457d534c58f45e8ceffaeba | src/js/veturilo.js | src/js/veturilo.js | function findStations(callback) {
$.ajax({
type: 'GET',
url: 'http://localhost:8765/mockdata/veturilo.xml',
dataType: 'xml',
success: function (xml) {
var stations = [];
$(xml).find('place').each(function () {
var place = $(this);
... | function findStations(callback) {
$.ajax({
type: 'GET',
url: 'mockdata/veturilo.xml',
dataType: 'xml',
success: function (xml) {
var stations = [];
$(xml).find('place').each(function () {
var place = $(this);
var station = {
... | Use relative path to mock data | Use relative path to mock data
| JavaScript | mit | janisz/bikeday,janisz/bikeday,Freeport-Metrics/bikeday | ---
+++
@@ -1,7 +1,7 @@
function findStations(callback) {
$.ajax({
type: 'GET',
- url: 'http://localhost:8765/mockdata/veturilo.xml',
+ url: 'mockdata/veturilo.xml',
dataType: 'xml',
success: function (xml) {
var stations = []; |
93f5f27fd4c56ffc69be517f0fed021e9fcaefd8 | static/index.js | static/index.js | $(function(){
var url = 'https://storage.googleapis.com/rutracker-rss.appspot.com/category_map.json';
var url = 'https://dl.dropboxusercontent.com/u/660127/category_map.json'; // TODO
$.getJSON(url, {}, function(data, textStatus){
var tree = $('#ctree').treeview({
data: JSON.stringify... | $(function(){
var url = 'https://storage.googleapis.com/rutracker-rss.appspot.com/category_map.json';
$.getJSON(url, {}, function(data, textStatus){
var tree = $('#ctree').treeview({
data: JSON.stringify(data)
});
});
});
| Set correct JSON for production | Set correct JSON for production
| JavaScript | apache-2.0 | notapresent/rutracker_rss,notapresent/rutracker_rss,notapresent/rutracker_rss | ---
+++
@@ -1,6 +1,5 @@
$(function(){
var url = 'https://storage.googleapis.com/rutracker-rss.appspot.com/category_map.json';
- var url = 'https://dl.dropboxusercontent.com/u/660127/category_map.json'; // TODO
$.getJSON(url, {}, function(data, textStatus){
|
7492a1890a216e2cc72a57d7736932c490c21461 | src/redux/state/fakeEvents.test.js | src/redux/state/fakeEvents.test.js | /* global test, expect */
import fakeEvents from './fakeEvents';
test('calling fakeEvents should generate an array containing btw. 60 and 120 objects', () => {
expect(fakeEvents.length)
.toBeGreaterThanOrEqual(60);
expect(fakeEvents.length)
.toBeLessThanOrEqual(120);
});
| /* global test, expect */
import fakeEvents from './fakeEvents';
test('calling fakeEvents should generate an array containing btw. 60 and 120 objects', () => {
expect(fakeEvents.length)
.toBeGreaterThanOrEqual(60);
expect(fakeEvents.length)
.toBeLessThanOrEqual(120);
});
test('events generated with fakeEvents s... | Make sure events have the right keys and an id | Make sure events have the right keys and an id
| JavaScript | mit | vogelino/design-timeline,vogelino/design-timeline | ---
+++
@@ -7,3 +7,16 @@
expect(fakeEvents.length)
.toBeLessThanOrEqual(120);
});
+
+test('events generated with fakeEvents should include 3 major keys: id, data & state', () => {
+ fakeEvents.forEach((event) =>
+ expect(Object.keys(event)).toEqual(['id', 'data', 'state'])
+ );
+});
+
+test('all events should ... |
feb0ecd14c35c5694803db38e0d1f5644a5b7d3d | src/node/server.js | src/node/server.js | var http = require("http");
function onRequest(request, response) {
console.log("Request received.");
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}
http.createServer(onRequest).listen(8888);
console.log("Server has started.");
| var http = require("http");
function start() {
function onRequest(request, response) {
console.log("Request received.");
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}
http.createServer(onRequest).listen(8888);
console.log("Server has started.");
... | Package the script with a `start` function | Package the script with a `start` function | JavaScript | apache-2.0 | Rholais/txfs,Rholais/txfs,Rholais/txfs | ---
+++
@@ -1,12 +1,15 @@
var http = require("http");
-function onRequest(request, response) {
- console.log("Request received.");
- response.writeHead(200, {"Content-Type": "text/plain"});
- response.write("Hello World");
- response.end();
+function start() {
+ function onRequest(request, response) {
+ console.l... |
fdc725c500c0fe63a930dcee19d87bfc2831933a | Chapter-2-Exercises/jjhampton-ch2-ex3-chessboard.js | Chapter-2-Exercises/jjhampton-ch2-ex3-chessboard.js | 'use strict'
// Chess board
// Write a program that creates a string that represents an 8ร8 grid, using newline characters to separate lines. At each position of the grid there is either a space or a โ#โ character. The characters should form a chess board.
// Passing this string to console.log should show something l... | 'use strict'
// Chess board
// Write a program that creates a string that represents an 8ร8 grid, using newline characters to separate lines. At each position of the grid there is either a space or a โ#โ character. The characters should form a chess board.
// Passing this string to console.log should show something l... | Rename variable to avoid using reserved word `string` | Rename variable to avoid using reserved word `string`
| JavaScript | mit | OperationCode/eloquent-js | ---
+++
@@ -17,22 +17,22 @@
const size = 8; // this can be changed to any size grid
-let string = '';
+let outputString = '';
for (let i = 0; i < size; i++) {
for (let j = 0; j <= size; j ++) {
if (j === size) {
- string += '\n';
+ outputString += '\n';
... |
32f9c800025440756fa63211fc4c0e89c1ae4506 | src/store/index.js | src/store/index.js | import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import * as mutations from './mutations'
import * as getters from './getters'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
// Authentication state
token: sessionStorage.getItem('token') || '',
status: '',
//... | import Vue from 'vue'
import Vuex from 'vuex'
import * as actions from './actions'
import * as mutations from './mutations'
import * as getters from './getters'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
// Authentication state
token: sessionStorage.getItem('token') || '',
status: '',
//... | Change thinsList type to array | Change thinsList type to array
| JavaScript | agpl-3.0 | freedomotic/fd-vue-webapp,freedomotic/fd-vue-webapp | ---
+++
@@ -43,7 +43,7 @@
pluginsList: '',
rolesList: '',
roomsList: '',
- thingsList: '',
+ thingsList: [],
thingTemplatesList: '',
triggersList: '',
usersList: '' |
65e00c407ad40f279ca25aa0f54b1a753a5f593f | test/buster.js | test/buster.js | var config = module.exports;
config["Browser tests"] = {
rootPath: "../",
environment: "browser",
extensions: [require("buster-coffee")],
sources: [
"test/ext/*.js",
"dist/caman.full.js"
],
tests: ["test/browser/*.coffee"]
};
config["Node tests"] = {
rootPath: "../",
environment: "node",
ext... | var config = module.exports;
config["Browser tests"] = {
rootPath: "../",
environment: "browser",
extensions: [require("buster-coffee")],
sources: [
"test/ext/*.js",
"dist/caman.full.js"
],
tests: ["test/browser/*.coffee"]
};
// For some reason, Buster doesn't quit when you define two
// different... | Disable node tests for now | Disable node tests for now
| JavaScript | bsd-3-clause | prashen/CamanJS,purposeindustries/CamanJS,mcanthony/CamanJS,mcanthony/CamanJS,arschmitz/caman-dist-only,meltingice/CamanJS,ckfinder/CamanJS,rn2dy/CamanJS,rn2dy/CamanJS,purposeindustries/CamanJS,mcanthony/CamanJS,meltingice/CamanJS,prashen/CamanJS,rn2dy/CamanJS,meltingice/CamanJS,ckfinder/CamanJS,prashen/CamanJS,ckfinde... | ---
+++
@@ -11,9 +11,12 @@
tests: ["test/browser/*.coffee"]
};
-config["Node tests"] = {
- rootPath: "../",
- environment: "node",
- extensions: [require("buster-coffee")],
- tests: ["test/node/*.coffee"]
-};
+// For some reason, Buster doesn't quit when you define two
+// different testing groups. Fairly c... |
077e0ac53af3506f4d11d8bd157bf9de89761a9e | lib/adapter.js | lib/adapter.js | (function(karma, window) {
var createClojureScriptTest = function (tc, runnerPassedIn) {
return function () {
if (goog && goog.dependencies_ && goog.dependencies_.nameToPath) {
for(var namespace in goog.dependencies_.nameToPath)
goog.require(namespace);
}
circle.karma.run_test... | (function(karma, window) {
var createClojureScriptTest = function (tc, runnerPassedIn) {
return function () {
if ('undefined' !== typeof goog && goog.dependencies_ && goog.dependencies_.nameToPath) {
for(var namespace in goog.dependencies_.nameToPath)
goog.require(namespace);
}
... | Fix missing goog issue for real | Fix missing goog issue for real
| JavaScript | mit | circleci/karma-cljs.test | ---
+++
@@ -1,7 +1,7 @@
(function(karma, window) {
var createClojureScriptTest = function (tc, runnerPassedIn) {
return function () {
- if (goog && goog.dependencies_ && goog.dependencies_.nameToPath) {
+ if ('undefined' !== typeof goog && goog.dependencies_ && goog.dependencies_.nameToPath) {
... |
85d62a542b153523eba52ccf0b869b7c8fd64c87 | app/_reducers/marketsReducers.js | app/_reducers/marketsReducers.js | import { Map } from 'immutable';
import { FILTER_MARKETS, UPDATE_MARKETS, SERVER_DATA_ACTIVE_SYMBOLS } from '../_constants/ActionTypes';
const initialState = new Map({
active: [],
query: '',
shownMarkets: [],
});
export default (state = initialState, action) => {
const doFilter = (markets = state.allM... | import { Map } from 'immutable';
import { FILTER_MARKETS, UPDATE_MARKETS, SERVER_DATA_ACTIVE_SYMBOLS } from '../_constants/ActionTypes';
const initialState = new Map({
active: [],
tree: {},
query: '',
shownMarkets: [],
});
const generateTree = (symbols) => {
const tree = {};
symbols.forEach((s... | Add market tree built from active symbols | Add market tree built from active symbols
| JavaScript | mit | nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-next-gen,qingweibinary/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary-next-gen,binary-com/binary-n... | ---
+++
@@ -3,9 +3,20 @@
const initialState = new Map({
active: [],
+ tree: {},
query: '',
shownMarkets: [],
});
+
+const generateTree = (symbols) => {
+ const tree = {};
+ symbols.forEach((sym) => {
+ if (!tree[sym.market_display_name]) tree[sym.market_display_name] = {};
+ ... |
58366dc23b55c0256633d1d9abb4fba7e475a13c | resource/js/components/UserList.js | resource/js/components/UserList.js | import React from 'react';
import UserPicture from './User/UserPicture';
export default class UserList extends React.Component {
render() {
const users = this.props.users.map((user) => {
return (
<a data-user-id={user._id} href={'/user/' + user.username} title={user.name}>
<UserPicture u... | import React from 'react';
import UserPicture from './User/UserPicture';
export default class UserList extends React.Component {
render() {
const users = this.props.users.map((user) => {
return (
<a key={user._id} data-user-id={user._id} href={'/user/' + user.username} title={user.name}>
... | Add unique key to items | Add unique key to items
| JavaScript | mit | crow-misia/crowi,crowi/crowi,crowi/crowi,crow-misia/crowi,crowi/crowi | ---
+++
@@ -6,7 +6,7 @@
render() {
const users = this.props.users.map((user) => {
return (
- <a data-user-id={user._id} href={'/user/' + user.username} title={user.name}>
+ <a key={user._id} data-user-id={user._id} href={'/user/' + user.username} title={user.name}>
<UserPicture... |
3c5cf643d11d44ede31f212a5af683b4785d13bc | app/scenes/SearchScreen/index.js | app/scenes/SearchScreen/index.js | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
export default class SearchScreen extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<... | import React, { Component } from 'react';
import RepoSearchBar from './components/RepoSearchBar';
export default class SearchScreen extends Component {
render() {
return (
<RepoSearchBar />
);
}
}
| Remove boilerplate and render the search bar | Remove boilerplate and render the search bar
| JavaScript | mit | msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects | ---
+++
@@ -1,45 +1,11 @@
import React, { Component } from 'react';
-import {
- StyleSheet,
- Text,
- View
-} from 'react-native';
+import RepoSearchBar from './components/RepoSearchBar';
export default class SearchScreen extends Component {
render() {
return (
- <View style={styles.container}>
- ... |
f030906e54e9e569b7a12a05d369746a5fc7024f | app/scripts/hocs/with-pub-sub.js | app/scripts/hocs/with-pub-sub.js | import React from 'react';
import toVoid from '../utils/to-void';
const fake = {
__fake__: true,
publish: toVoid,
subscribe: toVoid,
unsubscribe: toVoid
};
const { Provider, Consumer } = React.createContext(fake);
// Higher order component
const withPubSub = Component => props => (
<Consumer>
{pubSub ... | import React from 'react';
import toVoid from '../utils/to-void';
const fake = {
__fake__: true,
publish: toVoid,
subscribe: toVoid,
unsubscribe: toVoid
};
const { Provider, Consumer } = React.createContext(fake);
// Higher order component
const withPubSub = Component => React.forwardRef((props, ref) => (
... | Fix regression (i.e., forward `key`) | Fix regression (i.e., forward `key`)
| JavaScript | mit | hms-dbmi/higlass,hms-dbmi/higlass,hms-dbmi/higlass,hms-dbmi/4DN_matrix-viewer,hms-dbmi/4DN_matrix-viewer,hms-dbmi/higlass,hms-dbmi/4DN_matrix-viewer | ---
+++
@@ -12,11 +12,11 @@
const { Provider, Consumer } = React.createContext(fake);
// Higher order component
-const withPubSub = Component => props => (
+const withPubSub = Component => React.forwardRef((props, ref) => (
<Consumer>
{pubSub => <Component {...props} pubSub={pubSub} />}
</Consumer>
-);... |
7069dd332481662adc09252ce65c9796c2d6abed | app/src/services/user.service.js | app/src/services/user.service.js | const logger = require('logger');
const ctRegisterMicroservice = require('ct-register-microservice-node');
class UserService {
static async getEmailById(userId) {
logger.info('Get user by user id', userId);
try {
const user = await ctRegisterMicroservice.requestToMicroservice({
uri: '/user/' + ... | const logger = require('logger');
const ctRegisterMicroservice = require('ct-register-microservice-node');
class UserService {
static async getEmailById(userId) {
logger.info('Get user by user id', userId);
try {
const user = await ctRegisterMicroservice.requestToMicroservice({
uri: '/user/' + ... | Fix the fix to fix the error | Fix the fix to fix the error
| JavaScript | mit | gfw-api/fw-teams,gfw-api/fw-teams | ---
+++
@@ -12,7 +12,7 @@
});
if (!user || !user.data) return null;
logger.info('Get user by user id', user);
- return user.data && user.data.attributes.email;
+ return user.data ? user.data.attributes.email : null;
}
catch (e) {
logger.info('Error finding user', e); |
f320562f84d8e23d8d78d7a01ab8464f69b135fc | apps-builtin/wifi-setup/index.js | apps-builtin/wifi-setup/index.js | var wifiManager = require('../../lib/WifiManager');
var hb = require('handlebars');
var fs = require('fs');
const path = require('path');
var subApp = function(){
this.staticFolder = "assets";
this.setup = function(router, express){
router.get('/', function(req, res) {
fs.readFile(path.join(__dirname, ... | var wifiManager = require('../../lib/WifiManager');
var hb = require('handlebars');
var fs = require('fs');
const path = require('path');
var subApp = function(){
this.staticFolder = "assets";
this.setup = function(router, express){
router.get('/', function(req, res) {
fs.readFile(path.join(__dirname, ... | Add check for wifi details | Add check for wifi details
| JavaScript | isc | headlessPi/headlessPi,headlessPi/headlessPi,headlessPi/headlessPi | ---
+++
@@ -32,8 +32,12 @@
});
router.post('/configure', function(req, res) {
- wifiManager.joinAccessPoint(req.body.ssid, req.body.password);
- res.sendStatus(200);
+ if(req.body && req.body.ssid && req.body.password){
+ wifiManager.joinAccessPoint(req.body.ssid, req.body.password);... |
f7c280b693f36b1a797bec51eea6eb139d5f1bc1 | lib/dashboard/repl.js | lib/dashboard/repl.js | const repl = require("repl");
class REPL {
constructor(options) {
this.env = options.env;
this.plugins = options.plugins;
}
start(done) {
this.replServer = repl.start({
prompt: "Embark (" + this.env + ") > ",
useGlobal: true
});
this.replServer.on("exit", () => {
process.e... | const repl = require("repl");
const Console = require('./console.js');
class REPL {
constructor(options) {
this.env = options.env;
this.plugins = options.plugins;
this.events = options.events;
this.console = new Console({
events: this.events,
plugins: this.plugins,
version: options... | Use console and override evaluator | Use console and override evaluator
| JavaScript | mit | iurimatias/embark-framework,iurimatias/embark-framework | ---
+++
@@ -1,32 +1,34 @@
const repl = require("repl");
+
+const Console = require('./console.js');
class REPL {
constructor(options) {
this.env = options.env;
this.plugins = options.plugins;
+ this.events = options.events;
+ this.console = new Console({
+ events: this.events,
+ plugi... |
c136fb4191a5e9e5052ef778dce1fb0bad785b2a | test/createMockRaf.js | test/createMockRaf.js | /* @flow */
type Callback = (now: number) => void;
export default function(): Object {
let allCallbacks = [];
let prevTime = 0;
const now = () => prevTime;
const raf = (cb: Callback) => {
allCallbacks.push(cb);
};
const defaultTimeInterval = 1000 / 60;
const _step = ms => {
const allCallbacks... | /* @flow */
type Callback = (now: number) => void;
export default function(): Object {
let allCallbacks = [];
let prevTime = 0;
let id = 0;
const now = () => prevTime;
const raf = (cb: Callback) => {
allCallbacks.push(cb);
return id++;
};
const defaultTimeInterval = 1000 / 60;
const _step =... | Implement rAF mock return correctly | Implement rAF mock return correctly
rAF should return a uuid. Components check the assigned id non-null-ness
for some purposes.
cc @bsansouci
| JavaScript | mit | keyanzhang/react-motion,threepointone/react-motion,chenglou/react-motion,BenoitZugmeyer/preact-motion,BenoitZugmeyer/preact-motion,chenglou/react-motion,threepointone/react-motion,keyanzhang/react-motion | ---
+++
@@ -5,11 +5,13 @@
export default function(): Object {
let allCallbacks = [];
let prevTime = 0;
+ let id = 0;
const now = () => prevTime;
const raf = (cb: Callback) => {
allCallbacks.push(cb);
+ return id++;
};
const defaultTimeInterval = 1000 / 60; |
812910a3916d73e4728bc483312bebe900b1d99c | lib/wrapper.js | lib/wrapper.js | 'use strict';
var through = require('through')
, loader = require('./loader')
, async = require('async');
function angularify() {
var buf = '';
return through(function(chunk) {
buf += chunk.toString();
}, function () {
var rexSingle = new RegExp(/require\('angula[^']+'\)[,;]/g)
, rexDouble = ... | 'use strict';
var through = require('through')
, loader = require('./loader')
, async = require('async');
function angularify() {
var buf = '';
return through(function(chunk) {
buf += chunk.toString();
}, function () {
var rexSingle = new RegExp(/require\('angula[^']+'\)[,;]/g)
, rexDouble = ... | Fix dollar sign issue in angular injection | Fix dollar sign issue in angular injection
| JavaScript | mit | evanshortiss/angularify | ---
+++
@@ -31,15 +31,17 @@
.split('@');
loader.getModule(modVer[0], modVer[1], function (err, module) {
+ module += 'module.exports = window.angular';
+
// JavaScript String.replace gives unexpected result with $ chars
// replace these temporarily...
- module = mod... |
790c99ea4cca145835d067ffe7c4052122c596fd | lib/composition/parsers/flow-component.js | lib/composition/parsers/flow-component.js | // Dependencies
var ParseMethod = require("./method")
, Enny = require("enny")
, Ul = require("ul")
, Typpy = require("typpy")
;
module.exports = function (_input, instName) {
var input = Ul.clone(_input);
if (Typpy(input, String)) {
input = [input];
}
var output = {}
, eP = nul... | // Dependencies
var ParseMethod = require("./method")
, Enny = require("enny")
, Ul = require("ul")
, Typpy = require("typpy")
;
module.exports = function (_input, instName) {
var input = Ul.clone(_input);
if (Typpy(input, String)) {
input = [input];
}
var output = {}
, eP = nul... | Append the event name in case of server methods too | Append the event name in case of server methods too
| JavaScript | mit | jillix/engine-builder | ---
+++
@@ -27,6 +27,7 @@
output = mP;
output.type = Enny.TYPES.link;
output.serverMethod = output.method;
+ output.event = output.method;
} else {
output = eP;
output.type = Enny.TYPES.emit; |
062daaef9cbe78a5f37874237c4f2e36dd43d3e4 | lib/EnvironmentPlugin.js | lib/EnvironmentPlugin.js | /*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Simen Brekken @simenbrekken
*/
var DefinePlugin = require("./DefinePlugin");
this.keys = Array.isArray(keys) ? keys : Object.keys(keys);
this.defaultValues = Array.isArray(keys) ? {} : keys;
}
EnvironmentPlugin.prototype.apply = function(co... | /*
MIT License http://www.opensource.org/licenses/mit-license.php
Authors Simen Brekken @simenbrekken, Einar Lรถve @einarlove
*/
var DefinePlugin = require("./DefinePlugin");
function EnvironmentPlugin(keys) {
if (typeof keys === 'string') {
throw new Error(
"Deprecation notice: EnvironmentPlugin now only takes... | Add drepecation notice for multiple arguments of strings | Add drepecation notice for multiple arguments of strings
| JavaScript | mit | SimenB/webpack,webpack/webpack,SimenB/webpack,ts-webpack/webpack,SimenB/webpack,webpack/webpack,NekR/webpack,rlugojr/webpack,ts-webpack/webpack,webpack/webpack,webpack/webpack,g0ddish/webpack,jescalan/webpack,ts-webpack/webpack,jescalan/webpack,jescalan/webpack,NekR/webpack,g0ddish/webpack,SimenB/webpack,g0ddish/webpac... | ---
+++
@@ -1,9 +1,17 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
- Author Simen Brekken @simenbrekken
+ Authors Simen Brekken @simenbrekken, Einar Lรถve @einarlove
*/
var DefinePlugin = require("./DefinePlugin");
+function EnvironmentPlugin(keys) {
+ if (typeof keys === 'string') {
+ ... |
afcbd88b545b285128ac7f8d4a8cff605edfb3d2 | docs/assets/js/docs.ad.js | docs/assets/js/docs.ad.js | var _kmq = _kmq || [];
$(function() {
// No need to do a timeout for default case, if KM times out just don't show ad.
_kmq.push(function(){
// Set up the experiment (this is the meat and potatoes)
var type = KM.ab("Foundation Docs Upsell Type", ["question", "directive"]);
// TODO: Add alternate bet... | $(function() {
// TODO: Add alternate between advanced and intro
var topic = $('h1.docs-page-title').text();
var header = 'Master ' + topic;
var body = 'Get up to speed FAST, learn straight from the experts who built Foundation.';
var link = 'http://zurb.com/university/foundation-intro?utm_source=Foundation%... | Update language to directive form | Update language to directive form
| JavaScript | mit | jeromelebleu/foundation-sites,Owlbertz/foundation,BerndtGroup/TBG-foundation-sites,IamManchanda/foundation-sites,DaSchTour/foundation-sites,jaylensoeur/foundation-sites-6,colin-marshall/foundation-sites,Owlbertz/foundation,zurb/foundation,abdullahsalem/foundation-sites,aoimedia/foundation,dragthor/foundation-sites,zurb... | ---
+++
@@ -1,29 +1,16 @@
-var _kmq = _kmq || [];
$(function() {
- // No need to do a timeout for default case, if KM times out just don't show ad.
- _kmq.push(function(){
- // Set up the experiment (this is the meat and potatoes)
- var type = KM.ab("Foundation Docs Upsell Type", ["question", "directive"... |
8edfdd9a267d30f667348f4806b330bb9b038b5b | app/assets/javascripts/renalware/behaviours.js | app/assets/javascripts/renalware/behaviours.js | $(document).ready(function() {
$("[data-behaviour='highlight'] tbody tr a").click(function(){
$(this).closest("tr").addClass("is-selected").siblings().removeClass("is-selected");
});
$("[data-behaviour='submit']").click(function(e) {
e.preventDefault();
$(this).closest('form').submit();
});
});
| $(document).ready(function() {
$("[data-behaviour='highlight'] tbody tr a").click(function(){
$(this).closest("tr").addClass("is-selected").siblings().removeClass("is-selected");
});
$("[data-behaviour='submit']").click(function(e) {
e.preventDefault();
$(this).closest('form').submit();
});
$(... | Add auto submit on change js behaviour | Add auto submit on change js behaviour
For submitting forms via ajax when eg dropdown changes
| JavaScript | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | ---
+++
@@ -7,4 +7,9 @@
e.preventDefault();
$(this).closest('form').submit();
});
+
+ $("[data-behaviour='submit_on_change']").on('change', function(e) {
+ e.preventDefault();
+ $(this).closest('form').submit();
+ });
}); |
4c0fbae213ddc64943b361ab000c63866a4c4863 | app/assets/javascripts/utilities/circular_buffer.js | app/assets/javascripts/utilities/circular_buffer.js | class CircularBuffer {
constructor(length){
this.buffer = new Int32Array(length);
this.maxSize = length;
this.currentSize = 0;
this.openIndex = 0;
this.lastFilledIndex = -1;
}
get(index){
return this.buffer[(this.lastFilledIndex+index)%this.maxSize];
}
size(){
return this.curren... | class CircularBuffer {
constructor(length){
this.buffer = new Int32Array(length);
this.maxSize = length;
this.currentSize = 0;
this.openIndex = 0;
this.lastFilledIndex = -1;
}
get(index){
return this.buffer[(this.lastFilledIndex+index)%this.maxSize];
}
size(){
return this.curren... | Add custom forEach function to Circular Buffer class | Add custom forEach function to Circular Buffer class
| JavaScript | mit | krauzer/canvas-sandbox,krauzer/canvas-sandbox | ---
+++
@@ -23,6 +23,12 @@
this.openIndex = (this.lastFilledIndex + 1)%this.maxSize;
}
+ forEach(callback){
+ for (let i = 0; i < this.currentSize; i++) {
+ callback(this.get(i));
+ }
+ }
+
}
|
616e06a8e1adacc5738f3ce67c234af20e87e4c0 | lib/connection-status.js | lib/connection-status.js | 'use strict';
const has = require('has');
function collectPoolStatus(stats, { type, host, pool }) {
const poolStats = [
['_allConnections', 'open'],
['_freeConnections', 'sleeping'],
['_acquiringConnections', 'waiting']
]
.filter(([mysqljsProp]) => has(pool, mysqljsProp) && Arr... | 'use strict';
const has = require('has');
function collectPoolStatus(stats, { type, host, pool }) {
const poolStats = [
['_allConnections', 'open'],
['_freeConnections', 'sleeping'],
['_acquiringConnections', 'waiting']
]
.filter(([mysqljsProp]) => has(pool, mysqljsProp) && Arr... | Rename master -> masters and slave -> slaves in server status | Rename master -> masters and slave -> slaves in server status
| JavaScript | mit | godmodelabs/flora-mysql,godmodelabs/flora-mysql | ---
+++
@@ -29,7 +29,7 @@
[database]: Object.entries(poolCluster._nodes)
.map(([identifier, { pool }]) => {
const [type, host] = identifier.split('_');
- return { type: type.toLowerCase(), host, pool };
+ return { type: `${type.toLowerCase()}s`, hos... |
e9dc82402fac6e17478f00fff1259b0b3bfe5197 | web/config.js | web/config.js | var config = {
// For internal server or proxying webserver.
url : {
configuration : 'up/configuration',
update : 'up/world/{world}/{timestamp}',
sendmessage : 'up/sendmessage'
},
// For proxying webserver through php.
// url: {
// configuration: 'up.php?path=configuration',
// update: 'up.php?path=world/... | var config = {
// For internal server or proxying webserver.
url : {
configuration : 'up/configuration',
update : 'up/world/{world}/{timestamp}',
sendmessage : 'up/sendmessage'
},
// For proxying webserver through php.
// url: {
// configuration: 'up.php?path=configuration',
// update: 'up.php?path=world/... | Fix caching issue in standalone | Fix caching issue in standalone | JavaScript | apache-2.0 | webbukkit/dynmap,webbukkit/dynmap,mg-1999/dynmap,KovuTheHusky/dynmap,webbukkit/dynmap,webbukkit/dynmap | ---
+++
@@ -23,7 +23,7 @@
// For standalone (jsonfile) webserver.
// url: {
// configuration: 'standalone/dynmap_config.json',
- // update: 'standalone/dynmap_{world}.json',
+ // update: 'standalone/dynmap_{world}.json?_={timestamp}',
// sendmessage: 'standalone/sendmessage.php'
// },
|
e9483a99ec4ff2b46df813cb3425cc2ef11d07ef | web/g-live.js | web/g-live.js | /**
* Keep live updates from service.
* @constructor
*/
g.live = function() {
var socket;
/**
* Open the websocket connection.
*/
var open = function() {
if (g.isEncrypted()) {
socket = new WebSocket('wss://' + g.getHost() + '/api/live');
} else {
socket... | /**
* Keep live updates from service.
* @constructor
*/
g.live = function() {
var socket;
/**
* Open the websocket connection.
*/
var open = function() {
if (g.isEncrypted()) {
socket = new WebSocket('wss://' + g.getHost() + '/api/live');
} else {
socket... | Support multiple subscribers in g.Live. | Support multiple subscribers in g.Live.
| JavaScript | mit | gansoi/gansoi,gansoi/gansoi,gansoi/gansoi,gansoi/gansoi | ---
+++
@@ -27,7 +27,10 @@
var data = JSON.parse(event.data);
if (subscriptions.hasOwnProperty(data.type)) {
- subscriptions[data.type].log(data);
+ subscriptions[data.type].forEach(function(collection) {
+ console.log(data, "to", collection);
+ ... |
a24950265ff87515da7bc6a0b306f8569707cabc | lib/experiments/index.js | lib/experiments/index.js | 'use strict';
let experiments = {
BUILD_INSTRUMENTATION: symbol('build-instrumentation'),
INSTRUMENTATION: symbol('instrumentation'),
ADDON_TREE_CACHING: symbol('addon-tree-caching'),
};
Object.freeze(experiments);
module.exports = experiments;
| 'use strict';
const symbol = require('../utilities/symbol');
let experiments = {
BUILD_INSTRUMENTATION: symbol('build-instrumentation'),
INSTRUMENTATION: symbol('instrumentation'),
ADDON_TREE_CACHING: symbol('addon-tree-caching'),
};
Object.freeze(experiments);
module.exports = experiments;
| Revert "Fix linting issue with beta branch." | Revert "Fix linting issue with beta branch."
This reverts commit 8122805c34524ac9ac98bfd5cb17380d9765cbb4.
| JavaScript | mit | gfvcastro/ember-cli,rtablada/ember-cli,calderas/ember-cli,elwayman02/ember-cli,thoov/ember-cli,asakusuma/ember-cli,HeroicEric/ember-cli,ef4/ember-cli,kanongil/ember-cli,twokul/ember-cli,kategengler/ember-cli,kanongil/ember-cli,Turbo87/ember-cli,twokul/ember-cli,buschtoens/ember-cli,akatov/ember-cli,mike-north/ember-cli... | ---
+++
@@ -1,4 +1,5 @@
'use strict';
+const symbol = require('../utilities/symbol');
let experiments = {
BUILD_INSTRUMENTATION: symbol('build-instrumentation'), |
27029f760791efd65c0008a9bdc4e13830d4cc1d | app/models/widgets/ticker_widget.js | app/models/widgets/ticker_widget.js | Dashboard.TickerWidget = Dashboard.Widget.extend({
sourceData: "",
templateName: 'ticker_widget',
classNames: ['widget', 'widget-ticker'],
widgetView: function() {
var widget = this;
return this._super().reopen({
didInsertElement: function() {
var scaleFactor = 0.5;
var scaleSourc... | Dashboard.TickerWidget = Dashboard.Widget.extend({
sourceData: "",
templateName: 'ticker_widget',
classNames: ['widget', 'widget-ticker'],
widgetView: function() {
var widget = this;
return this._super().reopen({
didInsertElement: function() {
var scaleFactor = 0.7;
var widgetHeig... | Change ticker font scale factor to 0.7 | Change ticker font scale factor to 0.7
| JavaScript | mit | ShiftForward/mucuchies,kloudsio/mucuchies,ShiftForward/mucuchies,kloudsio/mucuchies | ---
+++
@@ -9,10 +9,10 @@
return this._super().reopen({
didInsertElement: function() {
- var scaleFactor = 0.5;
- var scaleSource = this.$().height();
+ var scaleFactor = 0.7;
+ var widgetHeight = this.$().height();
- var fontSize = scaleSource * scaleFactor;
+ ... |
729e714347790520e0543d144704113f64aa167e | app/scripts/controllers/contract.js | app/scripts/controllers/contract.js | 'use strict';
angular.module('scratchApp')
.controller('ContractCtrl', function ($scope, $http, $location) {
var serversPublicKey,
wallet,
paymentTx,
refundTx,
signedTx;
$scope.generate = function () {
getServersPublicKey($scope.walet_pub... | 'use strict';
angular.module('scratchApp')
.controller('ContractCtrl', function ($scope, $http, $location) {
var serversPublicKey,
wallet,
paymentTx,
refundTx,
signedTx;
$scope.generate = function () {
getServersPublicKey($scope.walet_pub... | Modify request to add necessary header | Modify request to add necessary header
| JavaScript | mit | baleato/bitcoin-hackathon | ---
+++
@@ -15,13 +15,23 @@
}
function getServersPublicKey(clientsPublicKey) {
- $http.post("http://0.0.0.0:3000/wallet/create", {clientsPublicKey:"026477115981fe981a6918a6297d9803c4dc04f328f22041bedff886bbc2962e01"}).success(function (data, status, headers, config) {
+ var r... |
412466f9d11f229d5a118028292c69c2b1b3814f | commands/say.js | commands/say.js | var l10n_file = __dirname + '/../l10n/commands/say.yml';
var l10n = require('../src/l10n')(l10n_file);
var CommandUtil = require('../src/command_util').CommandUtil;
exports.command = function(rooms, items, players, npcs, Commands) {
return function(args, player) {
if (args) {
player.sayL10n(l10n, 'YOU_SAY',... | var l10n_file = __dirname + '/../l10n/commands/say.yml';
var l10n = require('../src/l10n')(l10n_file);
var CommandUtil = require('../src/command_util').CommandUtil;
exports.command = function(rooms, items, players, npcs, Commands) {
return function(args, player) {
if (args) {
player.sayL10n(l10n, 'YOU_SAY',... | Add conditional to avoid duplicate messages, fix EachIf block. | Add conditional to avoid duplicate messages, fix EachIf block.
| JavaScript | mit | seanohue/ranviermud,seanohue/ranviermud,shawncplus/ranviermud | ---
+++
@@ -6,9 +6,10 @@
if (args) {
player.sayL10n(l10n, 'YOU_SAY', args);
players.eachIf(function(p) {
- otherPlayersInRoom(p);
+ return otherPlayersInRoom(p);
}, function(p) {
- p.sayL10n(l10n, 'THEY_SAY', player.getName(), args);
+ if (p.getName() != player.ge... |
0ddb22881705535445aec6258da604278cac75e1 | src/modules/ngSharepoint/services/spProvider.js | src/modules/ngSharepoint/services/spProvider.js | angular
.module('ngSharepoint')
.provider('$sp', function() {
var siteUrl = '';
var connMode = 'JSOM'; //possible values: JSOM, REST
var token = '';
var autoload = true;
return {
setSiteUrl: function (newUrl) {
siteUrl = newUrl;
},
setConnectionMode: function(connMode) { //Only JSOM Supported ... | angular
.module('ngSharepoint')
.provider('$sp', function() {
var siteUrl = '';
var connMode = 'JSOM'; //possible values: JSOM, REST
var token = false;
var autoload = true;
return {
setSiteUrl: function (newUrl) {
siteUrl = newUrl;
},
setConnectionMode: function(connMode) { //Only JSOM Support... | Set token to false by default | Set token to false by default
| JavaScript | apache-2.0 | maxjoehnk/ngSharepoint | ---
+++
@@ -3,7 +3,7 @@
.provider('$sp', function() {
var siteUrl = '';
var connMode = 'JSOM'; //possible values: JSOM, REST
- var token = '';
+ var token = false;
var autoload = true;
return { |
cfd13a2df960ac6421d27651688b6dbd5f5f1030 | server/config/environment/index.js | server/config/environment/index.js | var _ = require('lodash');
var all = {
// define nodejs runtime environment
server: {
port : process.env.NODE_IP || 8080, //OPENSHIFT_NODEJS_PORT
host : process.env.NODE_PORT || '127.0.0.1', //OPENSHIFT_NODEJS_IP
staticDir : '/../../dist'
},
//secret encrypti... | var _ = require('lodash');
var all = {
// define nodejs runtime environment
server: {
port : process.env.OPENSHIFT_NODEJS_PORT || 8080, //OPENSHIFT_NODEJS_PORT //NODE_IP
host : process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1', //OPENSHIFT_NODEJS_IP //NODE_PORT
stati... | Change port and host var | Change port and host var
| JavaScript | mit | markoch/dev-news-os,markoch/dev-news-os | ---
+++
@@ -3,8 +3,8 @@
var all = {
// define nodejs runtime environment
server: {
- port : process.env.NODE_IP || 8080, //OPENSHIFT_NODEJS_PORT
- host : process.env.NODE_PORT || '127.0.0.1', //OPENSHIFT_NODEJS_IP
+ port : process.env.OPENSHIFT_NODEJS_PORT || 80... |
4adeb41a333ad6218fc8450b765c2afa33b20238 | babel.server.js | babel.server.js | require("babel-polyfill");
/**
* Configure babel using the require hook
* More details here: https://babeljs.io/docs/setup/#babel_register
*/
require("babel-core/register")({
only: /src/,
presets: ["es2015", "react", "stage-0"]
});
require('dotenv').load();
/**
* Define isomorphic constants.
*/
global.__... | require("babel-polyfill");
/**
* Configure babel using the require hook
* More details here: https://babeljs.io/docs/setup/#babel_register
*/
require("babel-core/register")({
only: /src/,
presets: ["es2015", "react", "stage-0"]
});
require('dotenv').load({path: process.env.NODE_ENV === "production" ? `.env... | Load production vars from .env.production | Load production vars from .env.production
| JavaScript | mit | alexchiri/minimalistic-blog,alexchiri/minimalistic-blog,alexchiri/minimalistic-blog | ---
+++
@@ -9,7 +9,7 @@
presets: ["es2015", "react", "stage-0"]
});
-require('dotenv').load();
+require('dotenv').load({path: process.env.NODE_ENV === "production" ? `.env.${process.env.NODE_ENV}` : '.env'});
/**
* Define isomorphic constants.
*/ |
491dce4e0a8e839ef375017ff77669fb06e482f4 | samples/electron/start.js | samples/electron/start.js | var app = require('app');
var BrowserWindow = require('browser-window');
var mainWindow = null;
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit();
});
app.on('ready', function() {
mainWindow = new BrowserWindow({width: 800, height: 600});
mainWindow.loadUrl('file://' + _... | const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;
var mainWindow = null;
app.on('window-all-closed', function() {
if (process.platform != 'darwin')
app.quit();
});
app.on(... | Upgrade to Electron 1.0 API | Upgrade to Electron 1.0 API
| JavaScript | mit | greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks,greenheartgames/greenworks | ---
+++
@@ -1,5 +1,8 @@
-var app = require('app');
-var BrowserWindow = require('browser-window');
+const electron = require('electron')
+// Module to control application life.
+const app = electron.app
+// Module to create native browser window.
+const BrowserWindow = electron.BrowserWindow;
var mainWindow = null... |
e35d2be4041b62ede59bbfd3ff9ea4016fc3582e | src/client/app/components/header/header.template.js | src/client/app/components/header/header.template.js | import { HeaderService } from "./header.service.js";
export class HeaderTemplate {
static update(render) {
const start = Date.now();
/* eslint-disable indent */
render`
<nav class="flex flex-row bt bb tc mw9 center shadow-2">
<div class="flex flex-wrap flex-row... | import { HeaderService } from "./header.service.js";
export class HeaderTemplate {
static update(render) {
const start = Date.now();
/* eslint-disable indent */
render`
<nav class="flex flex-row bt bb mw9 center shadow-2">
<div class="flex flex-wrap flex-row ju... | Remove text align center from status and toasts in the header. | Remove text align center from status and toasts in the header.
| JavaScript | mit | albertosantini/node-conpa,albertosantini/node-conpa | ---
+++
@@ -6,7 +6,7 @@
/* eslint-disable indent */
render`
- <nav class="flex flex-row bt bb tc mw9 center shadow-2">
+ <nav class="flex flex-row bt bb mw9 center shadow-2">
<div class="flex flex-wrap flex-row justify-around items-center min-w-70 logo">
... |
9bdf5459f7001353f779980ffabc24c470179cdc | example/webpack.config.js | example/webpack.config.js | var path = require('path');
var loader = path.join(__dirname, '..', '..', 'index.js');
var __DEV__ = process.env.NODE_ENV !== 'production';
module.exports = {
entry: path.join(__dirname, 'index.js'),
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
publicPath: __DEV__ ? '/public/'... | var path = require('path');
var loader = path.join(__dirname, '..', 'index.js');
var __DEV__ = process.env.NODE_ENV !== 'production';
module.exports = {
entry: path.join(__dirname, 'index.js'),
output: {
path: path.join(__dirname, 'public'),
filename: 'bundle.js',
publicPath: __DEV__ ? '/public/' : 'ht... | Fix example path which occured as a consequence of rename | Fix example path which occured as a consequence of rename
| JavaScript | apache-2.0 | boopathi/image-size-loader | ---
+++
@@ -1,5 +1,5 @@
var path = require('path');
-var loader = path.join(__dirname, '..', '..', 'index.js');
+var loader = path.join(__dirname, '..', 'index.js');
var __DEV__ = process.env.NODE_ENV !== 'production';
module.exports = { |
0f1db78ce5ed9370482331b8668aa7057384935c | packages/ember-utils/tests/assign_test.js | packages/ember-utils/tests/assign_test.js | import { assignPolyfill as assign } from '..';
QUnit.module('Ember.assign');
QUnit.test('Ember.assign', function() {
let a = { a: 1 };
let b = { b: 2 };
let c = { c: 3 };
let a2 = { a: 4 };
assign(a, b, c, a2);
deepEqual(a, { a: 4, b: 2, c: 3 });
deepEqual(b, { b: 2 });
deepEqual(c, { c: 3 });
dee... | import { assignPolyfill as assign } from '..';
QUnit.module('Ember.assign');
QUnit.test('merging objects', function() {
let trgt = { a: 1 };
let src1 = { b: 2 };
let src2 = { c: 3 };
assign(trgt, src1, src2);
deepEqual(trgt, { a: 1, b: 2, c: 3 }, 'assign copies values from one or more source objects to a ... | Add test coverage to Object.assign polyfill | Add test coverage to Object.assign polyfill
| JavaScript | mit | amk221/ember.js,qaiken/ember.js,nickiaconis/ember.js,patricksrobertson/ember.js,tildeio/ember.js,thoov/ember.js,amk221/ember.js,bantic/ember.js,nickiaconis/ember.js,jherdman/ember.js,mixonic/ember.js,xiujunma/ember.js,jasonmit/ember.js,thoov/ember.js,mfeckie/ember.js,csantero/ember.js,jherdman/ember.js,sandstrom/ember.... | ---
+++
@@ -2,16 +2,37 @@
QUnit.module('Ember.assign');
-QUnit.test('Ember.assign', function() {
- let a = { a: 1 };
- let b = { b: 2 };
- let c = { c: 3 };
- let a2 = { a: 4 };
+QUnit.test('merging objects', function() {
+ let trgt = { a: 1 };
+ let src1 = { b: 2 };
+ let src2 = { c: 3 };
- assign(a, ... |
1c2e692e5770bdf66f6801f90a6f7cbcaf048969 | client/assets/js/services/LandingPageService.js | client/assets/js/services/LandingPageService.js | (function () {
'use strict';
angular
.module('fusionSeedApp.services.landingPage', [])
.factory('LandingPageService', LandingPageService);
function LandingPageService($log, Orwell, $window, ConfigService) {
'ngInject';
activate();
var service = {
getLandingPagesFromData: getLandingPa... | (function () {
'use strict';
angular
.module('fusionSeedApp.services.landingPage', [])
.factory('LandingPageService', LandingPageService);
function LandingPageService($log, Orwell, $window, ConfigService) {
'ngInject';
activate();
var service = {
getLandingPagesFromData: getLandingPa... | Remove other landing pages service | Remove other landing pages service
| JavaScript | apache-2.0 | AlexKolonitsky/lucidworks-view,AlexKolonitsky/lucidworks-view,lucidworks/lucidworks-view,lucidworks/lucidworks-view,lucidworks/lucidworks-view,AlexKolonitsky/lucidworks-view | ---
+++
@@ -29,7 +29,6 @@
resultsObservable.addObserver(function (data) {
var landing_pages = service.getLandingPagesFromData(data);
- $log.debug('landing_pages', landing_pages);
if (angular.isArray(landing_pages) && ConfigService.getLandingPageRedirect()) {
$window.locati... |
4886982fa7108c0cc5aa68c43f75e8cbc3b1903e | getPlannedWork/crawler.js | getPlannedWork/crawler.js | const moment = require('moment');
const plannedWork = require('./plannedWork');
const { baseURL, routes, imgMap } = require('./constants.js');
function buildLink({ route, datetime }) {
const date = moment(datetime);
return `${baseURL}?tag=${route}&date=${date.format('MM/DD/YYYY')}&time=&method=getstatus4`;
}
fun... | const moment = require('moment');
const plannedWork = require('./plannedWork');
const DateRange = require('./DateRange');
const { baseURL, routes, imgMap } = require('./constants.js');
function buildLink({ route, datetime }) {
const date = moment(datetime);
return `${baseURL}?tag=${route}&date=${date.format('MM/D... | Implement crawling by date range | Implement crawling by date range
The website will display Service Advisories first by date range, then by
train route. Previous commits added methods for scraping all routes for
a particular date. This commit adds a method to invoke that method for
multiple date ranges.
| JavaScript | mit | geoffreyyip/mta-dashboard,geoffreyyip/mta-dashboard | ---
+++
@@ -1,6 +1,7 @@
const moment = require('moment');
const plannedWork = require('./plannedWork');
+const DateRange = require('./DateRange');
const { baseURL, routes, imgMap } = require('./constants.js');
function buildLink({ route, datetime }) {
@@ -23,6 +24,34 @@
messagesByRoute[route] = advis... |
5953b9dc1aeb7edc6b8b524870e70b6af83fb776 | test/support/assert-paranoid-equal/utilities.js | test/support/assert-paranoid-equal/utilities.js | 'use strict';
function isNothing(subject) {
return (undefined === subject) || (null === subject);
}
function isObject(subject) {
return ('object' === typeof subject) && (null !== subject);
}
function isNaNConstant(subject) {
// There is not Number.isNaN in Node 0.6.x
return ('number' === typeof subject) &... | 'use strict';
function isNothing(subject) {
return (undefined === subject) || (null === subject);
}
function isObject(subject) {
return ('object' === typeof subject) && (null !== subject);
}
function isNaNConstant(subject) {
if (undefined !== Number.isNaN) {
return Number.isNaN(subject);
} else {
... | Update the paranoid equal to the lastest version | Update the paranoid equal to the lastest version
| JavaScript | mit | cesarmarinhorj/js-yaml,doowb/js-yaml,djchie/js-yaml,jonnor/js-yaml,pombredanne/js-yaml,jonnor/js-yaml,jonnor/js-yaml,deltreey/js-yaml,nodeca/js-yaml,prose/js-yaml,denji/js-yaml,vogelsgesang/js-yaml,vogelsgesang/js-yaml,bjlxj2008/js-yaml,minj/js-yaml,bjlxj2008/js-yaml,denji/js-yaml,djchie/js-yaml,nodeca/js-yaml,doowb/js... | ---
+++
@@ -12,8 +12,12 @@
function isNaNConstant(subject) {
- // There is not Number.isNaN in Node 0.6.x
- return ('number' === typeof subject) && isNaN(subject);
+ if (undefined !== Number.isNaN) {
+ return Number.isNaN(subject);
+ } else {
+ // There is no Number.isNaN in Node 0.6.x
+ return ('nu... |
e8b67dea98931e469a1b1d741abbfbed73b2ec23 | app/js/arethusa.core/directives/arethusa_navbar.js | app/js/arethusa.core/directives/arethusa_navbar.js | 'use strict';
/* Configurable navbar
*
* The following variables can be declared in a conf file
* disable - Boolean
* search - Boolean
* navigation - Boolean
* notifier - Boolean
* template - String
*
* Example;
*
* {
* "navbar" : {
* "search" : true,
* "navigation" : true,
* "tem... | 'use strict';
/* Configurable navbar
*
* The following variables can be declared in a conf file
* disable - Boolean
* search - Boolean
* navigation - Boolean
* notifier - Boolean
* template - String
*
* Example;
*
* {
* "navbar" : {
* "search" : true,
* "navigation" : true,
* "tem... | Delete an empty line again... | Delete an empty line again...
| JavaScript | mit | fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa | |
c3907ccc5aa74b7186f020fa3671a2e66f2ef683 | nin/dasBoot/THREENode.js | nin/dasBoot/THREENode.js | class THREENode extends NIN.Node {
constructor(id, options) {
if(!('render' in options.outputs)) {
options.outputs.render = new NIN.TextureOutput();
}
super(id, {
inputs: options.inputs,
outputs: options.outputs,
});
this.options = options;
this.scene = new THREE.Scene();
... | class THREENode extends NIN.Node {
constructor(id, options) {
if(!('outputs' in options)) {
options.outputs = {};
}
if(!('render' in options.outputs)) {
options.outputs.render = new NIN.TextureOutput();
}
super(id, {
inputs: options.inputs,
outputs: options.outputs,
});... | Make sure nodes always have an output property | Make sure nodes always have an output property
4545fcdc1808618723a4f5cd8a228b5c0b121ab7 broke nodes that did not have
an output property specified at all, and that relied on NIN.Node to
provide the whole output setup for them. This made ninjadev/re stop
working, so here's a fix for that.
| JavaScript | apache-2.0 | ninjadev/nin,ninjadev/nin,ninjadev/nin | ---
+++
@@ -1,5 +1,8 @@
class THREENode extends NIN.Node {
constructor(id, options) {
+ if(!('outputs' in options)) {
+ options.outputs = {};
+ }
if(!('render' in options.outputs)) {
options.outputs.render = new NIN.TextureOutput();
} |
92aed6c12583ca9f56dd4bc703193beffed84da5 | feature-detects/css/transformstylepreserve3d.js | feature-detects/css/transformstylepreserve3d.js | /*!
{
"name": "CSS Transform Style preserve-3d",
"property": "preserve3d",
"authors": ["denyskoch", "aFarkas"],
"tags": ["css"],
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
},{
"name": "Related Github Issue",
"href": "https://git... | /*!
{
"name": "CSS Transform Style preserve-3d",
"property": "preserve3d",
"authors": ["denyskoch", "aFarkas"],
"tags": ["css"],
"notes": [{
"name": "MDN Docs",
"href": "https://developer.mozilla.org/en-US/docs/Web/CSS/transform-style"
},{
"name": "Related Github Issue",
"href": "https://git... | Fix preserve3d's IE11/Win10 false positive | Fix preserve3d's IE11/Win10 false positive
| JavaScript | mit | Modernizr/Modernizr,Modernizr/Modernizr | ---
+++
@@ -18,18 +18,24 @@
*/
define(['Modernizr', 'createElement', 'docElement'], function(Modernizr, createElement, docElement) {
Modernizr.addTest('preserve3d', function() {
- var outerDiv = createElement('div');
- var innerDiv = createElement('div');
+ var outerDiv, innerDiv;
+ var CSS = window.... |
0270da4122605fafc067c72091dc5836f5211f95 | src/app/templates.spec.js | src/app/templates.spec.js | describe('templates', function () {
beforeEach(module('prx', 'templates', function ($provide) {
$provide.decorator('$templateCache', function ($delegate) {
var put = $delegate.put;
$delegate.toTest = [];
$delegate.put = function (uri) {
this.toTest.push(uri);
return put.apply(thi... | describe('templates', function () {
var $scope, $compile;
beforeEach(module('prx', 'templates', function ($provide, $stateProvider) {
$stateProvider.state('fakeState', {});
$provide.decorator('$templateCache', function ($delegate) {
var put = $delegate.put;
$delegate.toTest = [];
$delega... | Set state context in test for template compilability with infinite lineage. | Set state context in test for template compilability with infinite lineage.
| JavaScript | agpl-3.0 | PRX/www.prx.org,PRX/www.prx.org,PRX/www.prx.org | ---
+++
@@ -1,5 +1,9 @@
describe('templates', function () {
- beforeEach(module('prx', 'templates', function ($provide) {
+ var $scope, $compile;
+
+ beforeEach(module('prx', 'templates', function ($provide, $stateProvider) {
+ $stateProvider.state('fakeState', {});
+
$provide.decorator('$templateCache', ... |
53ff5ddff1c8e95f74405cbbc557e02574c6557e | src/blocks/block-quote.js | src/blocks/block-quote.js | /*
Block Quote
*/
SirTrevor.Blocks.Quote = (function(){
var template = _.template([
'<blockquote class="st-required st-text-block" contenteditable="true"></blockquote>',
'<label class="st-input-label"> <%= i18n.t("blocks:quote:credit_field") %></label>',
'<input maxlength="140" name="cite" placeholder... | /*
Block Quote
*/
SirTrevor.Blocks.Quote = (function(){
var template = _.template([
'<blockquote class="st-required st-text-block" contenteditable="true"></blockquote>',
'<label class="st-input-label"> <%= i18n.t("blocks:quote:credit_field") %></label>',
'<input maxlength="140" name="cite" placeholder... | Fix quote block type property | Fix quote block type property
They're suppose to be capitalized
| JavaScript | mit | Shorthand/sir-trevor-js,Shorthand/sir-trevor-js,Shorthand/sir-trevor-js | ---
+++
@@ -13,7 +13,7 @@
return SirTrevor.Block.extend({
- type: "quote",
+ type: 'Quote',
title: function(){ return i18n.t('blocks:quote:title'); },
|
ff334dfa7d1687a923f476db1166acd47e7ee059 | src/javascripts/frigging_bootstrap/components/timepicker.js | src/javascripts/frigging_bootstrap/components/timepicker.js | let React = require("react")
let cx = require("classnames")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, input} = React.DOM
export default class extends React.Component {
static displayName = "Frig.friggingBootstrap.TimePicker"
static defaultProps = Object.assign(require(... | let React = require("react")
let cx = require("classnames")
let {errorList, sizeClassNames, formGroupCx, label} = require("../util.js")
let {div, input} = React.DOM
export default class extends React.Component {
static displayName = "Frig.friggingBootstrap.TimePicker"
static defaultProps = Object.assign(require(... | Add ValueLink To On Change For Timepicker | Add ValueLink To On Change For Timepicker
| JavaScript | mit | frig-js/frig,TouchBistro/frig,frig-js/frig,TouchBistro/frig | ---
+++
@@ -11,10 +11,17 @@
_input() {
return input(Object.assign({}, this.props.inputHtml, {
- valueLink: this.props.valueLink,
- className: cx(this.props.inputHtml.className, "form-control"),
+ valueLink: {
+ value: this.props.valueLink.value,
+ requestChange: this._... |
16d9bbe0e294d817a6cc6ce8b9db64049b317f75 | src/commands/dockerize.js | src/commands/dockerize.js | import { spawn } from "cross-spawn";
import path from "path";
import process from "process";
import commandExists from "command-exists";
module.exports = function (name) {
// Check if docker is installed first
commandExists("docker", function(err, commandExists) {
if(commandExists) {
spawn("docker", ["bu... | import { spawn } from "cross-spawn";
import path from "path";
import process from "process";
import commandExists from "command-exists";
import logger from "../lib/logger.js";
module.exports = function (name) {
// Check if docker is installed first
commandExists("docker", function(err, commandExists) {
if(comm... | Add logger for docker warning | Add logger for docker warning
| JavaScript | mit | TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick | ---
+++
@@ -2,6 +2,7 @@
import path from "path";
import process from "process";
import commandExists from "command-exists";
+import logger from "../lib/logger.js";
module.exports = function (name) {
// Check if docker is installed first
@@ -9,7 +10,7 @@
if(commandExists) {
spawn("docker", ["build... |
f6793e5fb331d1091702aa2055cb801e133c387f | js/directives/textarea.js | js/directives/textarea.js | webui.directive("textarea", function() {
return {
restrict: "E",
link: function(scope, element) {
element.attr(
"placeholder",
element.attr("placeholder").replace(/\\n/g, "\n")
).bind("keydown keypress", function(event) {
if (event.ctrlKey && event.which === 13) {
... | webui.directive("textarea", function() {
return {
restrict: "E",
link: function(scope, element) {
element.attr(
"placeholder",
function(index, placeholder) {
if (placeholder !== undefined) {
return placeholder.replace(/\\n/g, "\n");
} else {
re... | Fix "Cannot read property 'replace' of undefined" | Fix "Cannot read property 'replace' of undefined"
Signed-off-by: kuoruan <2b8c98b0b69c0b74bfe03cced5a9f738a15f1468@gmail.com>
| JavaScript | mit | ziahamza/webui-aria2,ghostry/webui-aria2,ghostry/webui-aria2,kuoruan/webui-aria2,kuoruan/webui-aria2,ziahamza/webui-aria2 | ---
+++
@@ -4,7 +4,13 @@
link: function(scope, element) {
element.attr(
"placeholder",
- element.attr("placeholder").replace(/\\n/g, "\n")
+ function(index, placeholder) {
+ if (placeholder !== undefined) {
+ return placeholder.replace(/\\n/g, "\n");
+ }... |
ebeeb1a8a0871467b9b7597c3bd82b8b67829364 | src/javascript/binary/components/trackjs_onerror.js | src/javascript/binary/components/trackjs_onerror.js | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | Add a general 'loading script' to ignore list | Add a general 'loading script' to ignore list
| JavaScript | apache-2.0 | borisyankov/binary-static,borisyankov/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,tfoertsch/binary-static,tfoertsch/binary-static,massihx/binary-static,massihx/binary-static,brodiecapel16/bi... | ---
+++
@@ -15,6 +15,8 @@
"[object Event]",
// General script error, not actionable
"Script error.",
+ // error when user interrupts script loading, nothing to fix
+ "Error loading script",
// an error caused by DealPly (http://www.dealply.com... |
3bd270f245b5e98a4784548d40959337dd050625 | src/javascript/binary/components/trackjs_onerror.js | src/javascript/binary/components/trackjs_onerror.js | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | window._trackJs = {
onError: function(payload, error) {
function itemExistInList(item, list) {
for (var i = 0; i < list.length; i++) {
if (item.indexOf(list[i]) > -1) {
return true;
}
}
return false;
}
... | Check for TrackJs already loaded and if yes, reinitialize it. Fixed version. | Check for TrackJs already loaded and if yes, reinitialize it. Fixed version.
| JavaScript | apache-2.0 | animeshsaxena/binary-static,tfoertsch/binary-static,einhverfr/binary-static,einhverfr/binary-static,tfoertsch/binary-static,borisyankov/binary-static,einhverfr/binary-static,massihx/binary-static,animeshsaxena/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,brodiecapel16/binary-static,borisyankov/... | ---
+++
@@ -41,3 +41,6 @@
return true;
}
};
+
+// if Track:js is already loaded, we need to initialize it
+if (typeof trackJs !== 'undefined') trackJs.configure(window._trackJs); |
ee0a0699a9804c485e464f521e5c95d506d0fa29 | app/components/audit_log/Export.js | app/components/audit_log/Export.js | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
const exampleQuery = (slug) => `query {
organization(slug: "${slug}") {
auditEvents(first: 500) {
edges {
node {
type
occurredAt
actor {
name
}... | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
const exampleQuery = (slug) => `query {
organization(slug: "${slug}") {
auditEvents(first: 500) {
edges {
node {
type
occurredAt
actor {
name
}... | Tweak layout of export component | Tweak layout of export component
| JavaScript | mit | buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend | ---
+++
@@ -35,12 +35,16 @@
return (
<div>
- <p>Your organizationสผs audit log can be queried and exported using the <a href="/docs/graphql-api" className={linkClassName}>GraphQL API</a>.</p>
+ <p>
+ Your organizationสผs audit log can be queried and exported using the <a href="/docs... |
3eed8db76786b5c9441cd76aadbf4f94c61ac421 | examples/inject_ol_cesium.js | examples/inject_ol_cesium.js | (function() {
const mode = window.location.href.match(/mode=([a-z0-9\-]+)\&?/i);
const DIST = false;
const isDev = mode && mode[1] === 'dev';
const cs = isDev ? 'CesiumUnminified/Cesium.js' : 'Cesium/Cesium.js';
const ol = (DIST && isDev) ? 'olcesium-debug.js' : '@loader';
if (!window.LAZY_CESIUM) {
do... | (function() {
const mode = window.location.href.match(/mode=([a-z0-9\-]+)\&?/i);
const DIST = false;
const isDev = mode && mode[1] === 'dev';
const cs = isDev ? 'CesiumUnminified/Cesium.js' : 'Cesium/Cesium.js';
const ol = (DIST && isDev) ? 'olcesium-debug.js' : '@loader';
if (!window.LAZY_CESIUM) {
do... | Fix lazy load of Cesium in examples | Fix lazy load of Cesium in examples
| JavaScript | bsd-2-clause | openlayers/ol-cesium,openlayers/ol-cesium,oterral/ol3-cesium,oterral/ol3-cesium,openlayers/ol3-cesium,openlayers/ol3-cesium | ---
+++
@@ -15,7 +15,7 @@
if (!s) {
s = document.createElement('script');
s.type = 'text/javascript';
- s.src = `../cesium/Build/${cs}`;
+ s.src = `../node_modules/@camptocamp/cesium/Build/${cs}`;
console.log('loading Cesium...');
document.body.appendChild(s);
} |
db978592bc49e4a1e2ea6a4ebb1921c2d2439db0 | src/getFilteredOptions.js | src/getFilteredOptions.js | import {find, isEqual, uniqueId} from 'lodash';
import getOptionLabel from './getOptionLabel';
/**
* Filter out options that don't match the input string or, if multiple
* selections are allowed, that have already been selected.
*/
function getFilteredOptions(options=[], text='', selected=[], props={}) {
const {a... | import {find, isEqual, uniqueId} from 'lodash';
import getOptionLabel from './getOptionLabel';
/**
* Filter out options that don't match the input string or, if multiple
* selections are allowed, that have already been selected.
*/
function getFilteredOptions(options=[], text='', selected=[], props={}) {
const {a... | Update how exact match is found | Update how exact match is found
| JavaScript | mit | ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,Neophy7e/react-bootstrap-typeahead | ---
+++
@@ -12,19 +12,17 @@
return [];
}
- let exactMatchFound = false;
let filteredOptions = options.filter(option => {
const labelString = getOptionLabel(option, labelKey);
-
- if (labelString === text) {
- exactMatchFound = true;
- }
-
return !(
labelString.toLowerCase().i... |
df5964d6f790513e9b3a8fd9311c1eec13b96b92 | Jakefile.js | Jakefile.js | /* globals desc:false, task: false, complete: fase, jake: false */
(function (desc, task, complete, jake) {
"use strict";
desc('The default task. Runs tests.');
task('default', ['tests'], function () {
});
desc('Run tests');
task('tests', [], function () {
jake.exec(["./node_modules/.b... | /* globals desc:false, task: false, complete: fase, jake: false */
(function (desc, task, complete, jake) {
"use strict";
desc('The default task. Runs tests.');
task('default', ['test'], function () {
});
desc('Run tests');
task('test', [], function () {
jake.exec(["./node_modules/.bin... | Set default jakefile task to 'test' so it gets executed by travis-ci.org | Set default jakefile task to 'test' so it gets executed by travis-ci.org
| JavaScript | mit | ustyme/site-manager,jolira/site-manager,ustyme/site-manager | ---
+++
@@ -3,11 +3,11 @@
"use strict";
desc('The default task. Runs tests.');
- task('default', ['tests'], function () {
+ task('default', ['test'], function () {
});
desc('Run tests');
- task('tests', [], function () {
+ task('test', [], function () {
jake.exec(["./node_... |
246e6599f31ef09f5de204f87d6b10d28e15bc58 | public/js/application.js | public/js/application.js | var mapSketcherClient;
jQuery(function() {
jQuery.getJSON('/config.json', function(config) {
config.hostname = window.location.hostname
mapSketcherClient = new MapSketcherClient(config);
mapSketcherClient.launch();
});
$("a[rel]").overlay({
mask: {
color: '#ebecff'
, loadSpeed: 200
, opaci... | var mapSketcherClient;
jQuery(function() {
jQuery.getJSON('/config.json', function(config) {
config.hostname = window.location.hostname
mapSketcherClient = new MapSketcherClient(config);
mapSketcherClient.launch();
});
$("a[rel]").overlay({
mask: {
color: '#ebecff'
, loadSpeed: 200
, opaci... | Fix enter key on Collaborative Room selection. | Fix enter key on Collaborative Room selection.
| JavaScript | mit | sagmor/mapsketcher | ---
+++
@@ -27,6 +27,23 @@
return e.preventDefault();
});
+ $(function() {
+ $("#collaborativeRoomSelection form input").keypress(function (e) {
+ if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
+ $('#collaborativeRoomSelection form').submit();
+ ret... |
aa32378fd966b72ec91fa440ba68c079c98e303b | lib/node/buffer/buffer.js | lib/node/buffer/buffer.js | 'use strict';
var Node = require('../node');
var TYPE = 'buffer';
var PARAMS = {
source: Node.PARAM.NODE,
radio: Node.PARAM.NUMBER
};
var Buffer = Node.create(TYPE, PARAMS);
module.exports = Buffer;
module.exports.TYPE = TYPE;
module.exports.PARAMS = PARAMS;
module.exports.create = require('./factory').crea... | 'use strict';
var Node = require('../node');
var TYPE = 'buffer';
var PARAMS = {
source: Node.PARAM.NODE,
radio: Node.PARAM.NUMBER
};
var Buffer = Node.create(TYPE, PARAMS);
module.exports = Buffer;
module.exports.TYPE = TYPE;
module.exports.PARAMS = PARAMS;
module.exports.create = require('./factory').crea... | Use columns from source node | Use columns from source node
| JavaScript | bsd-3-clause | CartoDB/camshaft | ---
+++
@@ -18,7 +18,7 @@
// ------------------------------ PUBLIC API ------------------------------ //
Buffer.prototype._getQuery = function() {
- return bufferQuery(this.source.getQuery(), this.columns, this.radio);
+ return bufferQuery(this.source.getQuery(), this.source.getColumns(), this.radio);
};
... |
af6a7b20d7332817af15c891d307ff262d886158 | core/devMenu.js | core/devMenu.js | "use strict";
const electron = require("electron");
const {app} = electron;
const {Menu} = electron;
const {BrowserWindow} = electron;
module.exports.setDevMenu = function () {
var devMenu = Menu.buildFromTemplate([{
label: "Development",
submenu: [{
label: "Reload",
accele... | "use strict";
const electron = require("electron");
const {app} = electron;
const {Menu} = electron;
const {BrowserWindow} = electron;
module.exports.setDevMenu = function () {
var devMenu = Menu.buildFromTemplate([{
label: "Development",
submenu: [{
label: "Reload",
accele... | Change reload accelerator to Ctrl+R | Change reload accelerator to Ctrl+R
| JavaScript | mit | petschekr/Chocolate-Shell,petschekr/Chocolate-Shell | ---
+++
@@ -10,7 +10,7 @@
label: "Development",
submenu: [{
label: "Reload",
- accelerator: "F5",
+ accelerator: "Ctrl+R",
click: function () {
BrowserWindow.getFocusedWindow().reload();
} |
a96ef266eaf8fe8b1248fe69a6cd51d790f170c0 | cypress/integration/list_spec.js | cypress/integration/list_spec.js | describe('The List Page', () => {
beforeEach(() => {
cy.visit('/list.html')
})
it('successfully loads', () => {})
context('navbar', () => {
it("the 'Home' link works", () => {
cy.contains('Home').click({force: true})
cy.title().should('not.equal', 'Error')
})
it("the 'About' link wor... | describe('The List Page', () => {
beforeEach(() => {
cy.visit('/list.html')
})
it('successfully loads', () => {})
context('navbar', () => {
it("the 'Home' link works", () => {
cy.contains('Home').click({force: true})
cy.title().should('not.equal', 'Error')
})
it("the 'About' link w... | Add tests for all current list items | Add tests for all current list items
| JavaScript | mit | itzsaga/slack-list | ---
+++
@@ -2,7 +2,9 @@
beforeEach(() => {
cy.visit('/list.html')
})
+
it('successfully loads', () => {})
+
context('navbar', () => {
it("the 'Home' link works", () => {
cy.contains('Home').click({force: true})
@@ -13,6 +15,7 @@
cy.title().should('not.equal', 'Error')
})
})... |
4ea7ec98ad1b490b3a031f183dab0efc2feaa1d7 | NotesApp.js | NotesApp.js | function NoteApplication (author) {
this.author = author;
this.notes = [];
this.create = function(note_content) {
if (note_content.length > 0) {
this.notes.push(note_content);
return "You have created a note";
}
else {
return "You haven't entered a valid note";
}
}
t... | function NoteApplication (author) {
this.author = author;
this.notes = [];
this.create = function(note_content) {
if (note_content.length > 0) {
this.notes.push(note_content);
return "You have created a note";
}
else {
return "You haven't entered a valid note";
}
}
t... | Add search, delete and edit methods | Add search, delete and edit methods
| JavaScript | mit | Mayowa-Adegbola/NotesApp,Mayowa-Adegbola/NotesApp | ---
+++
@@ -14,18 +14,37 @@
}
this.listNotes = function(){
- if(this.noteArray.length < 1){
+ if (this.noteArray.length < 1){
console.log("There are no notes in the collection.");
}
- else{for(let i = 0; i < this.notes.length; i++){
+ else {
+ for(let i... |
6e5d872baaa1e4e72bfe95a32e2ebf55ea594dde | public/app/config/translationConfig.js | public/app/config/translationConfig.js | angular.module('app').config(function ($translateProvider) {
$translateProvider.useStaticFilesLoader({
prefix: '/locale/locale-',
suffix: '.json'
});
$translateProvider.preferredLanguage('fr_FR');
}); | angular.module('app').config(function ($translateProvider) {
$translateProvider.useStaticFilesLoader({
prefix: '/locale/locale-',
suffix: '.json'
});
$translateProvider.useSanitizeValueStrategy('escape');
$translateProvider.determinePreferredLanguage();
}); | Determine preferred language and sanitizy stings | Determine preferred language and sanitizy stings
| JavaScript | mit | BenjaminBini/dilemme,BenjaminBini/dilemme | ---
+++
@@ -4,5 +4,7 @@
suffix: '.json'
});
- $translateProvider.preferredLanguage('fr_FR');
+ $translateProvider.useSanitizeValueStrategy('escape');
+
+ $translateProvider.determinePreferredLanguage();
}); |
85a03e97fa83d4fbb37c598db4272a5865b90520 | app/selectors/containers/reservationDeleteModalSelector.js | app/selectors/containers/reservationDeleteModalSelector.js | import { createSelector } from 'reselect';
import ActionTypes from 'constants/ActionTypes';
import ModalTypes from 'constants/ModalTypes';
import modalIsOpenSelectorFactory from 'selectors/factories/modalIsOpenSelectorFactory';
import requestIsActiveSelectorFactory from 'selectors/factories/requestIsActiveSelectorFact... | import { createSelector } from 'reselect';
import ActionTypes from 'constants/ActionTypes';
import ModalTypes from 'constants/ModalTypes';
import modalIsOpenSelectorFactory from 'selectors/factories/modalIsOpenSelectorFactory';
import requestIsActiveSelectorFactory from 'selectors/factories/requestIsActiveSelectorFact... | Fix typo in reservation delete modal selector | Fix typo in reservation delete modal selector
| JavaScript | mit | fastmonkeys/respa-ui | ---
+++
@@ -10,7 +10,7 @@
const reservationDeleteModalSelector = createSelector(
modalIsOpenSelectorFactory(ModalTypes.DELETE_RESERVATION),
- requestIsActiveSelectorFactory(ActionTypes.API.RESERVATIONS_DELETE_REQUEST),
+ requestIsActiveSelectorFactory(ActionTypes.API.RESERVATION_DELETE_REQUEST),
resourcesS... |
7003aada95cfe06d1a89843de4c09d1e4ceae3f4 | test/models/user.js | test/models/user.js | 'use strict'
let imponderous = require('../../index')
class User extends imponderous.Model {
static get schema () {
return {
name: {
index: true
},
email: {
unique: true,
required: true,
validator: 'email'
},
dob: {
type: Date
}
}
... | 'use strict'
let imponderous = require('../../index')
class User extends imponderous.Model {
static get schema () {
return {
name: {
index: true
},
email: {
unique: true,
required: true,
validator: 'email'
},
dob: {
type: Date
},
... | Make "spam" property on test User model a String. | Make "spam" property on test User model a String.
| JavaScript | mit | benhutchins/imponderous | ---
+++
@@ -15,6 +15,9 @@
},
dob: {
type: Date
+ },
+ spam: {
+ type: String
}
}
} |
982fb15759b79e9ec91799c0b841fdd65cf8ccc1 | examples/cli.js | examples/cli.js | #!/usr/bin/node
var convert = require('../'),
localProj = require('local-proj'),
fs = require('fs'),
geojson = JSON.parse(fs.readFileSync(process.argv[2])),
mtl = process.argv[3],
mtllibs = process.argv.slice(4),
options = {
projection: localProj.find(geojson),
mtllib: mtllibs
... | #!/usr/bin/env node
var convert = require('../'),
localProj = require('local-proj'),
fs = require('fs'),
geojson = JSON.parse(fs.readFileSync(process.argv[2])),
mtl = process.argv[3],
mtllibs = process.argv.slice(4),
options = {
projection: localProj.find(geojson),
mtllib: mtlli... | Use env to find node | Use env to find node
| JavaScript | isc | perliedman/geojson2obj | ---
+++
@@ -1,4 +1,4 @@
-#!/usr/bin/node
+#!/usr/bin/env node
var convert = require('../'),
localProj = require('local-proj'),
@@ -19,6 +19,6 @@
convert.toObj(geojson, process.stdout, function(err) {
if (err) {
- process.stderr.write(err + '\n');
+ process.stderr.write('Error: ' + JSON.s... |
063bf15bfa562f3708f8608c92095010b12180d5 | tests/chat_tests.js | tests/chat_tests.js | var helpers = require('./../helpers.js')
module.exports = {
'Test Sending Message' : function (browser) {
helpers.setupTest(browser)
helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)
browser.end();
}
}; | var helpers = require('./../helpers.js')
module.exports = {
'Test Sending Message' : function (browser) {
helpers.setupTest(browser)
helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)
browser.end();
},
'Check Sent Message' : function (browser) {
helpers.setupTest(browser)
... | Create test for checking sent message | Create test for checking sent message
| JavaScript | mit | TheLocust3/Drift-Nightwatch | ---
+++
@@ -5,5 +5,13 @@
helpers.setupTest(browser)
helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)
browser.end();
+ },
+ 'Check Sent Message' : function (browser) {
+ helpers.setupTest(browser)
+ helpers.enterText('textarea._1eY_aSnr3MDhZqacV8fugZ', 'test', browser)
+ ... |
2445cb9f2d7c216c357943932074c5b23b99ead3 | bin/eslint_d.js | bin/eslint_d.js | #!/usr/bin/env node
'use strict';
var net = require('net');
var fs = require('fs');
var eslint = require('eslint');
var engine = new eslint.CLIEngine();
var formatter = engine.getFormatter('compact');
var server = net.createServer({
allowHalfOpen: true
}, function (con) {
var data = '';
con.on('data', function... | #!/usr/bin/env node
'use strict';
var net = require('net');
var fs = require('fs');
var eslint = require('eslint');
var engine = new eslint.CLIEngine();
var formatter = engine.getFormatter('compact');
var server = net.createServer({
allowHalfOpen: true
}, function (con) {
var data = '';
con.on('data', function... | Remove port file on kill | Remove port file on kill
| JavaScript | mit | mantoni/eslint_d.js,mantoni/eslint_d.js,clessg/eslint_d.js,ruanyl/eslint_d.js | ---
+++
@@ -31,6 +31,9 @@
process.on('exit', function () {
fs.unlinkSync(portFile);
});
+process.on('SIGTERM', function () {
+ process.exit();
+});
process.on('SIGINT', function () {
process.exit();
}); |
617ea4b1ac424daddd02f75727c149b016a26c16 | client/tests/integration/components/f-account-test.js | client/tests/integration/components/f-account-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('f-account', 'Integration | Component | f account', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any act... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('f-account', 'Integration | Component | f account', {
integration: true
});
const accountStub = Ember.Object.create({
name: 'name',
email: 'email',
phone: 'phone'
});
test('it can be submi... | Add test suite for f-account component | Add test suite for f-account component
| JavaScript | mit | yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time | ---
+++
@@ -5,20 +5,27 @@
integration: true
});
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });
+const accountStub = Ember.Object.create({
+ name: 'name',
+ email: 'email',
+ phone:... |
955bd081bf37c5fd0aa336767766145197b0aeea | client/src/js/views/places-view.js | client/src/js/views/places-view.js | import View from '../base/view';
import Feed from '../models/feed';
import {capfirst} from '../utils';
import FeedView from './feed-view';
import itemTemplate from '../../templates/feed-place.ejs';
export default class PlacesView extends View {
constructor({app, model}) {
super({app, model});
this.feed =... | import View from '../base/view';
import Feed from '../models/feed';
import {capfirst} from '../utils';
import FeedView from './feed-view';
import itemTemplate from '../../templates/feed-place.ejs';
export default class PlacesView extends View {
constructor({app, model}) {
super({app, model});
this.feed =... | Exclude cafes from place list | Exclude cafes from place list
| JavaScript | mit | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics | ---
+++
@@ -13,8 +13,8 @@
this.feed = new Feed(
'/places/', {
- categories: 'theatre',
fields: 'images,title,id,address',
+ categories: 'theatre,-cafe',
expand: 'images',
order_by: '-favorites_count',
page_size: 24, |
197caf952390effc22aaa3c3d11acac23f46a677 | api/lib/domain/models/Assessment.js | api/lib/domain/models/Assessment.js | const _ = require('lodash');
const TYPES_OF_ASSESSMENT_NEEDING_USER = ['PLACEMENT', 'CERTIFICATION'];
const { ObjectValidationError } = require('../errors');
class Assessment {
constructor(attributes) {
Object.assign(this, attributes);
}
isCompleted() {
return this.state === 'completed';
}
getLast... | const _ = require('lodash');
const TYPES_OF_ASSESSMENT_NEEDING_USER = ['PLACEMENT', 'CERTIFICATION'];
const { ObjectValidationError } = require('../errors');
class Assessment {
constructor(attributes) {
Object.assign(this, attributes);
}
isCompleted() {
return this.state === 'completed';
}
getLast... | Add console.log to logs in RA with staging db | Add console.log to logs in RA with staging db
| JavaScript | agpl-3.0 | sgmap/pix,sgmap/pix,sgmap/pix,sgmap/pix | ---
+++
@@ -38,6 +38,9 @@
}
validate() {
+ console.log('Type of userId');
+ console.log(typeof this.userId);
+ console.log(this.userId);
if(TYPES_OF_ASSESSMENT_NEEDING_USER.includes(this.type) && typeof this.userId !== 'number') {
return Promise.reject(new ObjectValidationError(`Assessmen... |
5ddfe279f1e6d097113c303333198a741bf5f0dd | ghost/admin/models/tag.js | ghost/admin/models/tag.js | /*global Ghost */
(function () {
'use strict';
Ghost.Collections.Tags = Ghost.ProgressCollection.extend({
url: Ghost.paths.apiRoot + '/tags/'
});
}());
| /*global Ghost */
(function () {
'use strict';
Ghost.Collections.Tags = Ghost.ProgressCollection.extend({
url: Ghost.paths.apiRoot + '/tags/',
parse: function (resp) {
return resp.tags;
}
});
}());
| Tag API: Primary Document Format | Tag API: Primary Document Format
Closes #2605
- Change tags browse() response to { tags: [...] }
- Update client side collection to use nested tags document
- Update test references to use response.tags
| JavaScript | mit | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ---
+++
@@ -3,6 +3,10 @@
'use strict';
Ghost.Collections.Tags = Ghost.ProgressCollection.extend({
- url: Ghost.paths.apiRoot + '/tags/'
+ url: Ghost.paths.apiRoot + '/tags/',
+
+ parse: function (resp) {
+ return resp.tags;
+ }
});
}()); |
059c261d2b8bdce31133ac9875a59504d89c4f8f | app/routes/courses.server.routes.js | app/routes/courses.server.routes.js | 'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var courses = require('../../app/controllers/courses.server.controller');
var authorized = ['manager', 'admin'];
// Courses Routes
app.route('/courses')
.get(users.requiresLogin, users.ha... | 'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var courses = require('../../app/controllers/courses.server.controller');
var authorized = ['manager', 'admin'];
// Courses Routes
app.route('/courses')
.get(users.requiresLogin, users.ha... | Update permission to show course detail for teachers | Update permission to show course detail for teachers
| JavaScript | mit | combefis/ECM,combefis/ECM,combefis/ECM | ---
+++
@@ -15,7 +15,7 @@
app.route('/courses/:courseId')
.post(users.requiresLogin, users.hasAuthorization(authorized), courses.create)
- .get(users.requiresLogin, users.hasAuthorization(authorized), courses.read)
+ .get(users.requiresLogin, users.hasAuthorization(['manager', 'admin', 'teacher']), co... |
6594732058f60b90ebebbdd47070aa72c176b670 | src/components/home/HomePage.js | src/components/home/HomePage.js | import React from 'react';
import GithubAPI from '../../api/githubAPI';
class HomePage extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
showResult: "l"
};
this.invokeGitHubAPI = this.invokeGitHubAPI.bind(this);
}
invokeGitHubAPI(){
Github... | import React from 'react';
import GithubAPI from '../../api/githubAPI';
class HomePage extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
showResult: "l"
};
this.invokeGitHubAPI = this.invokeGitHubAPI.bind(this);
}
invokeGitHubAPI(){
Github... | Change display from updatedAt.toDateString to pushedAt.toTimeString | Change display from updatedAt.toDateString to pushedAt.toTimeString
| JavaScript | mit | compumike08/GitHub_Status_API_GUI,compumike08/GitHub_Status_API_GUI | ---
+++
@@ -15,7 +15,7 @@
invokeGitHubAPI(){
GithubAPI.testOctokat().then(testResult => {
- let parsedTestResult = testResult.updatedAt.toDateString();
+ let parsedTestResult = testResult.pushedAt.toTimeString();
console.log(testResult);
console.log(parsedTestResult);
this.set... |
f54d70fdd2c28ca99d94eb5e9cb10004418e7338 | allcount.js | allcount.js | #!/usr/bin/env node
var argv = require('minimist')(process.argv.slice(2));
var injection = require('./services/injection');
var _ = require('lodash');
var port = argv.port || process.env.PORT || 9080;
var gitUrl = argv.git || process.env.GIT_URL;
var dbUrl = argv.db || process.env.DB_URL;
if (!gitUrl || !dbUrl) {
... | #!/usr/bin/env node
var argv = require('minimist')(process.argv.slice(2));
var injection = require('./services/injection');
var _ = require('lodash');
var port = argv.port || process.env.PORT || 9080;
var gitUrl = argv.git || process.env.GIT_URL;
var dbUrl = argv.db || process.env.DB_URL;
if (!gitUrl || !dbUrl) {
... | Fix exception when one error is thrown during startup | Fix exception when one error is thrown during startup
| JavaScript | mit | allcount/allcountjs,chikh/allcountjs,allcount/allcountjs,chikh/allcountjs | ---
+++
@@ -27,10 +27,10 @@
var server = injection.inject('allcountServerStartup');
server.startup(function (errors) {
if (errors) {
- if (_.isObject(errors)) {
- throw new Error(errors);
+ if (_.isArray(errors)) {
+ throw new Error(errors.join('\n'));
} else {
- ... |
f92e1de51f035f660d7c736e2869d3c9fa9a53f8 | build/config.js | build/config.js | module.exports = {
assetPath: '{{govukAssetPath}}',
afterHeader: '{{$afterHeader}}{{/afterHeader}}',
bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',
bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}',
content: '{{$main}}{{/main}}',
cookieMessage: '{{$cookieMessage}}{{/cookieMessage}}',
footerSupportLinks: '{{$footerSup... | module.exports = {
htmlLang: '{{htmlLang}}',
assetPath: '{{govukAssetPath}}',
afterHeader: '{{$afterHeader}}{{/afterHeader}}',
bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',
bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}',
content: '{{$main}}{{/main}}',
cookieMessage: '{{$cookieMessage}}{{/cookieMessage}}',
foote... | Add local for htmlLang into template | Add local for htmlLang into template
| JavaScript | mit | UKHomeOffice/govuk-template-compiler,UKHomeOffice/govuk-template-compiler | ---
+++
@@ -1,4 +1,5 @@
module.exports = {
+ htmlLang: '{{htmlLang}}',
assetPath: '{{govukAssetPath}}',
afterHeader: '{{$afterHeader}}{{/afterHeader}}',
bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}', |
25b6749b21e4f4f17b7abb239ce2921d279b0ad3 | app/main.js | app/main.js | let http = require('http');
let url = require('url');
let fs = require('fs');
http.createServer(function (req, res) {
let q = url.parse(req.url, true);
let filename = "app/." + q.pathname;
fs.readFile(filename, function (err, data) {
if (err) {
res.writeHead(404, {'Content-Type': 'text/... | let http = require('http');
let url = require('url');
let fs = require('fs');
http.createServer(function (req, res) {
let q = url.parse(req.url, true);
let filename = "app/." + q.pathname;
fs.readFile(filename, function (err, data) {
if (err) {
res.writeHead(404, {'Content-Type': 'text/... | Add informational message when running server | Add informational message when running server
| JavaScript | mit | adilek/jirtdan,adilek/jirtdan | ---
+++
@@ -23,3 +23,6 @@
return res.end();
});
}).listen(8080);
+
+console.log("Web server is running...");
+console.log("URL to access the app: http://localhost:8080/app.html"); |
ec0c03368db293ede60115050bd201bfbd9566bc | rules/style.js | rules/style.js | module.exports = {
rules: {
// enforce spacing inside array brackets
'array-bracket-spacing': [ 'error', 'always', {
objectsInArrays: false,
arraysInArrays: false,
}],
// specify the maximum length of a line in your program
// https://github.com/eslint/eslint/blob/master/docs/rules/max... | module.exports = {
rules: {
// enforce spacing inside array brackets
'array-bracket-spacing': [ 'error', 'always', {
objectsInArrays: false,
arraysInArrays: false,
}],
// allow/disallow an empty newline after var statement
// https://github.com/eslint/eslint/blob/master/docs/rules/newl... | Remove `max-len` rule and fall back to AirBnb's (100 char) | Remove `max-len` rule and fall back to AirBnb's (100 char)
| JavaScript | mit | wyze/eslint-config-wyze | ---
+++
@@ -4,12 +4,6 @@
'array-bracket-spacing': [ 'error', 'always', {
objectsInArrays: false,
arraysInArrays: false,
- }],
- // specify the maximum length of a line in your program
- // https://github.com/eslint/eslint/blob/master/docs/rules/max-len.md
- 'max-len': [ 'error', 80, 2, ... |
b6abcef1e466aa09ab920cf56bfe806e71f727ad | src/javascript/binary/base/__tests__/storage.js | src/javascript/binary/base/__tests__/storage.js | var expect = require('chai').expect;
var storage = require('../storage');
var utility = require('../utility');
describe('text.localize', function() {
var text = new storage.Localizable({
key1: 'value',
key2: 'value [_1]',
});
it('should try to return a string from the localised texts', func... | var expect = require('chai').expect;
var storage = require('../storage');
var utility = require('../utility');
describe('text.localize', function() {
var text = new storage.Localizable({
key1: 'value',
key2: 'value [_1]',
'You_can_view_your_[_1]trading_limits_here_': 'Ihre [_1] Handelslimit... | Test with data from real localisation | Test with data from real localisation
| JavaScript | apache-2.0 | negar-binary/binary-static,negar-binary/binary-static,negar-binary/binary-static,4p00rv/binary-static,fayland/binary-static,fayland/binary-static,teo-binary/binary-static,teo-binary/binary-static,4p00rv/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,kellybinary/binary-... | ---
+++
@@ -6,10 +6,13 @@
var text = new storage.Localizable({
key1: 'value',
key2: 'value [_1]',
+ 'You_can_view_your_[_1]trading_limits_here_': 'Ihre [_1] Handelslimits sind hier ersichtlich.',
});
it('should try to return a string from the localised texts', function() {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.