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 |
|---|---|---|---|---|---|---|---|---|---|---|
007bd9cd36f3d2069f5681245f4c80d28c3e0841 | packages/core/database/lib/lifecycles.js | packages/core/database/lib/lifecycles.js | 'use strict';
const createLifecyclesManager = db => {
let subscribers = [];
const lifecycleManager = {
subscribe(subscriber) {
// TODO: verify subscriber
subscribers.push(subscriber);
return () => {
subscribers.splice(subscribers.indexOf(subscriber), 1);
};
},
createE... | 'use strict';
const createLifecyclesManager = db => {
let subscribers = [];
const lifecycleManager = {
subscribe(subscriber) {
// TODO: verify subscriber
subscribers.push(subscriber);
return () => {
subscribers.splice(subscribers.indexOf(subscriber), 1);
};
},
createE... | Fix return in for loop instead of continue | Fix return in for loop instead of continue
| JavaScript | mit | wistityhq/strapi,wistityhq/strapi | ---
+++
@@ -27,7 +27,8 @@
for (const subscriber of subscribers) {
if (typeof subscriber === 'function') {
const event = this.createEvent(action, uid, properties);
- return await subscriber(event);
+ await subscriber(event);
+ continue;
}
const ... |
3789c3c739f450188cdb50ffd25fe3099f8b458c | react/components/UI/LoadingIndicator/index.js | react/components/UI/LoadingIndicator/index.js | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { space, width, height } from 'styled-system';
import { preset } from 'react/styles/functions';
import Text from 'react/components/UI/Text';
const Container = styled.div`
box-sizing: border-... | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { space, width, height } from 'styled-system';
import { preset } from 'react/styles/functions';
import Text from 'react/components/UI/Text';
const Container = styled.div`
box-sizing: border-... | Support color/font size in loading indicator | Support color/font size in loading indicator
| JavaScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | ---
+++
@@ -14,7 +14,6 @@
align-items: center;
justify-content: center;
user-select: none;
-
${space}
${preset(width, { width: '100%' })}
${preset(height, { height: '100%' })}
@@ -24,6 +23,8 @@
static propTypes = {
frames: PropTypes.arrayOf(PropTypes.string),
interval: PropTypes.number,... |
753c56b41f2d7564dd660995d24606f17b0ffbbd | assets/src/stories-editor/helpers/test/addAMPExtraProps.js | assets/src/stories-editor/helpers/test/addAMPExtraProps.js | /**
* Internal dependencies
*/
import { addAMPExtraProps } from '../';
describe( 'addAMPExtraProps', () => {
it( 'does not modify non-child blocks', () => {
const props = addAMPExtraProps( {}, { name: 'foo/bar' }, {} );
expect( props ).toStrictEqual( {} );
} );
it( 'generates a unique ID', () => {
const p... | /**
* Internal dependencies
*/
import { addAMPExtraProps } from '../';
describe( 'addAMPExtraProps', () => {
it( 'does not modify non-child blocks', () => {
const props = addAMPExtraProps( {}, { name: 'foo/bar' }, {} );
expect( props ).toStrictEqual( {} );
} );
it( 'adds a font family attribute', () => {
... | Remove tests that are not relevant anymore. | Remove tests that are not relevant anymore.
| JavaScript | apache-2.0 | ampproject/amp-toolbox-php,ampproject/amp-toolbox-php | ---
+++
@@ -8,18 +8,6 @@
const props = addAMPExtraProps( {}, { name: 'foo/bar' }, {} );
expect( props ).toStrictEqual( {} );
- } );
-
- it( 'generates a unique ID', () => {
- const props = addAMPExtraProps( {}, { name: 'amp/amp-story-text' }, {} );
-
- expect( props ).toHaveProperty( 'id' );
- } );
-
- it( ... |
0a77c621aed25a004b0347bf8adfdf1888dc554f | app-frontend/src/app/components/channelHistogram/channelHistogram.controller.js | app-frontend/src/app/components/channelHistogram/channelHistogram.controller.js | export default class ChannelHistogramController {
constructor() {
'ngInject';
}
$onInit() {
this.histOptions = {
chart: {
type: 'lineChart',
showLegend: false,
showXAxis: false,
showYAxis: false,
mar... | export default class ChannelHistogramController {
constructor() {
'ngInject';
}
$onInit() {
this.histOptions = {
chart: {
type: 'lineChart',
showLegend: false,
showXAxis: false,
showYAxis: false,
int... | Remove interactivity from cc histogram | Remove interactivity from cc histogram
| JavaScript | apache-2.0 | azavea/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry,aaronxsu/raster-foundry,raster-foundry/raster-foundry,raster-foundry/raster-foundry,aaronxsu/raster-foundry,aaronxsu/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,raster-foundry/raster-foundry | ---
+++
@@ -10,6 +10,7 @@
showLegend: false,
showXAxis: false,
showYAxis: false,
+ interactive: false,
margin: {
top: 0,
right: 0, |
f3d1753ded9f0ecf6c88252db1efa652e2ab632f | app/App.js | app/App.js | import React, { PropTypes } from 'react';
import { Link, IndexLink } from 'react-router';
import { Login } from 'auth';
import { ErrorHandler } from 'error';
import { rendered } from 'lib/fetchData';
export default class App extends React.Component {
static propTypes = {
children: PropTypes.object,
};
comp... | import React, { PropTypes } from 'react';
import { Link, IndexLink } from 'react-router';
import { Login } from 'auth';
import { ErrorHandler } from 'error';
import { rendered } from 'lib/fetchData';
export default class App extends React.Component {
static propTypes = {
children: PropTypes.object,
};
comp... | Add comment as to how important the call to render() is | Add comment as to how important the call to render() is
| JavaScript | mit | terribleplan/isomorphic-redux-plus,isogon/isomorphic-redux-plus | ---
+++
@@ -11,6 +11,10 @@
};
componentDidMount() {
+ /* This is one of the most important lines of the app,
+ * it is where we start triggering loading of data
+ * on the client-side
+ */
rendered();
}
|
ffeca8d1b1e312864f75e859babbc3a5abb53d8f | web/gulpfile.babel.js | web/gulpfile.babel.js | import bg from 'gulp-bg';
import eslint from 'gulp-eslint';
import gulp from 'gulp';
import runSequence from 'run-sequence';
import webpackBuild from './webpack/build';
const runEslint = () => {
return gulp.src([
'gulpfile.babel.js',
'src/**/*.js',
'webpack/*.js'
// '!**/__tests__/*.*'
])
.pipe(e... | import bg from 'gulp-bg';
import eslint from 'gulp-eslint';
import gulp from 'gulp';
import runSequence from 'run-sequence';
import webpackBuild from './webpack/build';
import os from 'os';
const runEslint = () => {
return gulp.src([
'gulpfile.babel.js',
'src/**/*.js',
'webpack/*.js'
// '!**/__tests_... | Fix gulp nodemon commang for windows environments | Fix gulp nodemon commang for windows environments
original fix by @mannro
| JavaScript | mit | Brainfock/este | ---
+++
@@ -3,6 +3,7 @@
import gulp from 'gulp';
import runSequence from 'run-sequence';
import webpackBuild from './webpack/build';
+import os from 'os';
const runEslint = () => {
return gulp.src([
@@ -37,6 +38,7 @@
gulp.task('server-hot', bg('node', './webpack/server'));
-gulp.task('server', ['set-dev... |
981d520b780cbe87d05bca2448d6495ee15650aa | js/console-notes.js | js/console-notes.js | /**
* Handles writting the notes to the browser console in synchronization with the reveal.js
*/
var ConsoleNotes = (function() {
function log(event) {
// event.previousSlide, event.currentSlide, event.indexh, event.indexv
var notes = event.currentSlide.querySelector(".notes");
if (not... | /**
* Handles writting the notes to the browser console in synchronization with the reveal.js
*/
var ConsoleNotes = (function() {
function log(event) {
// event.previousSlide, event.currentSlide, event.indexh, event.indexv
var notes = event.currentSlide.querySelector(".notes");
if (not... | Remove load event handler for browser console speaker notes plugin | Remove load event handler for browser console speaker notes plugin
| JavaScript | mit | itkoren/revealular,itkoren/revealular | ---
+++
@@ -13,7 +13,7 @@
}
// Fires when reveal.js has loaded all (synchronous) dependencies and is ready to start navigating
- Reveal.addEventListener("ready", log);
+ //Reveal.addEventListener("ready", log);
// Fires when slide is changed
Reveal.addEventListener("slidechanged", log); |
cd3230171aa42b3eb574da1d06c0488face95001 | tests/dummy/app/snippets/config-bootstrap-v4.js | tests/dummy/app/snippets/config-bootstrap-v4.js | const ENV = {
// ...
"ember-validated-form": {
label: {
submit: "Go for it!"
},
css: {
// bootstrap classes
group: "form-group",
radio: "radio",
control: "form-control",
label: "col-form-label",
help: "small form-text text-danger",
hint: "small form-text t... | const ENV = {
// ...
"ember-validated-form": {
label: {
submit: "Go for it!"
},
css: {
// bootstrap classes
group: "form-group",
radio: "radio",
control: "form-control",
label: "col-form-label",
help: "small form-text text-danger",
hint: "small form-text t... | Update bootstrap 4 config error class | Update bootstrap 4 config error class
The error class used in `error`, not `invalid`. | JavaScript | mit | adfinis-sygroup/ember-validated-form,adfinis-sygroup/ember-validated-form,adfinis-sygroup/ember-validated-form | ---
+++
@@ -17,7 +17,7 @@
submit: "btn btn-primary",
loading: "loading",
valid: "is-valid",
- invalid: "is-invalid"
+ error: "is-invalid"
}
}
// ... |
66ce8257b0164f8618b53d2fbe15bda4fa73fb33 | src/prototype/off.js | src/prototype/off.js | define([
'jquery',
'var/eventStorage',
'prototype/var/EmojioneArea'
],
function($, eventStorage, EmojioneArea) {
EmojioneArea.prototype.off = function(events, handler) {
if (events) {
var id = this.id;
$.each(events.toLowerCase().replace(/_/g, '.').split(' '), function(i,... | define([
'jquery',
'var/eventStorage',
'prototype/var/EmojioneArea'
],
function($, eventStorage, EmojioneArea) {
EmojioneArea.prototype.off = function(events, handler) {
if (events) {
var id = this.id;
$.each(events.toLowerCase().replace(/_/g, '.').split(' '), function(i,... | Fix typo which causes memory leak. | Fix typo which causes memory leak.
| JavaScript | mit | mervick/emojionearea | ---
+++
@@ -12,7 +12,7 @@
if (handler) {
$.each(eventStorage[id][event], function(j, fn) {
if (fn === handler) {
- eventStorage[id][event] = eventStorage[id][event].splice(j, 1);
+ ... |
45255860bc78e5a90d7f6b3938c213628d8d6609 | lib/bin.js | lib/bin.js | #!/usr/bin/env node
var argv = require('argv');
var polyjuice = require('./polyjuice');
var options = [
{
name: 'jshint',
type: 'string',
description: 'Defines the source file for jshint',
example: '\'polyjuice --jshint .jshintrc\''
},
{
name: 'jscs',
type: 'string',
description: 'De... | #!/usr/bin/env node
var argv = require('argv');
var polyjuice = require('./polyjuice');
var options = [
{
name: 'jshint',
type: 'string',
description: 'Defines the source file for jshint',
example: '\'polyjuice --jshint=.jshintrc\''
},
{
name: 'jscs',
type: 'string',
description: 'De... | Fix --help examples to include '=' | Fix --help examples to include '='
Fixes #9 | JavaScript | mit | brenolf/polyjuice | ---
+++
@@ -8,13 +8,13 @@
name: 'jshint',
type: 'string',
description: 'Defines the source file for jshint',
- example: '\'polyjuice --jshint .jshintrc\''
+ example: '\'polyjuice --jshint=.jshintrc\''
},
{
name: 'jscs',
type: 'string',
description: 'Defines the source file fo... |
07059d2cc11db8cdddedc82de931c2c80d4faff4 | lib/cli.js | lib/cli.js | 'use strict';
const _ = require('lodash');
const updateNotifier = require('update-notifier');
/**
* Expose a CLI with given actions as subcommands
* @param {Array} actions Array of subclasses of Action
* @param {Object} pkg The package.json contents
* @returns {Array}
*/
module.exports = function (a... | 'use strict';
const _ = require('lodash');
const updateNotifier = require('update-notifier');
/**
* Expose a CLI with given actions as subcommands
* @param {Array} actions Array of subclasses of Action
* @param {Object} pkg The package.json contents
* @returns {Array}
*/
module.exports = function (a... | Fix error caused by aliasing "v" to "version" on yargs | Fix error caused by aliasing "v" to "version" on yargs
| JavaScript | mit | launchdeckio/shipment | ---
+++
@@ -21,6 +21,5 @@
.help('h')
.version()
.alias('h', 'help')
- .alias('v', 'version')
.argv;
}; |
0785140b62ddd655c4f472a157022b2c5a11164d | lib/git.js | lib/git.js | const spawn = require("./spawn");
module.exports = function(workDir, isDebug){
function git() {
var len = arguments.length;
var args = new Array(len);
for (var i = 0; i < len; i++) {
args[i] = arguments[i];
}
return spawn('git', args, {
cwd: workDir... | const spawn = require("./spawn");
module.exports = function(workDir, isDebug){
function git() {
var len = arguments.length;
var args = new Array(len);
for (var i = 0; i < len; i++) {
args[i] = arguments[i];
}
return spawn('git', args, {
cwd: workDir... | Remove force as it may overwrite somthing unwanted. | Remove force as it may overwrite somthing unwanted.
| JavaScript | bsd-3-clause | NoahDragon/update-forked-repo | ---
+++
@@ -23,7 +23,7 @@
.then(() => git('fetch', 'upstream'))
.then(() => git('checkout', 'origin/' + forkedDefaultBranch))
.then(() => git('merge', 'upstream/' + sourceDefaultBranch))
- .then(() => git('push', 'origin', 'HEAD:' + forkedDefaultBranch, '--force'))
+ ... |
554d3977a180989956124761c4178fc01f69ed78 | lib/client/hooks.js | lib/client/hooks.js | Router.hooks = {
dataNotFound: function (pause) {
var data = this.data();
var tmpl;
if (data === null || typeof data === 'undefined') {
tmpl = this.lookupProperty('notFoundTemplate');
if (tmpl) {
this.render(tmpl);
this.renderRegions();
pause();
}
}
},
... | Router.hooks = {
dataNotFound: function (pause) {
var data = this.data();
var tmpl;
if (!this.ready())
return;
if (data === null || typeof data === 'undefined') {
tmpl = this.lookupProperty('notFoundTemplate');
if (tmpl) {
this.render(tmpl);
this.renderRegions();
... | Make dataNotFoundHook return if data not ready. | Make dataNotFoundHook return if data not ready.
| JavaScript | mit | firdausramlan/iron-router,Aaron1992/iron-router,TechplexEngineer/iron-router,abhiaiyer91/iron-router,tianzhihen/iron-router,ecuanaso/iron-router,DanielDornhardt/iron-router-2,Aaron1992/iron-router,jg3526/iron-router,assets1975/iron-router,leoetlino/iron-router,TechplexEngineer/iron-router,Sombressoul/iron-router,appoet... | ---
+++
@@ -2,6 +2,9 @@
dataNotFound: function (pause) {
var data = this.data();
var tmpl;
+
+ if (!this.ready())
+ return;
if (data === null || typeof data === 'undefined') {
tmpl = this.lookupProperty('notFoundTemplate'); |
37b8b0c2a0c887b942653eaa832c5c4d15e3b205 | test/Client.connect.js | test/Client.connect.js |
var Client = require('../index').Client;
var Transport = require('./mock/Transport');
var OutgoingFrameStream = require('./mock/OutgoingFrameStream');
var assert = require('assert');
describe('Client.connect', function() {
var client, transport, framesOut, framesIn;
beforeEach(function() {
transport = new ... |
var Client = require('../index').Client;
var Transport = require('./mock/Transport');
var OutgoingFrameStream = require('./mock/OutgoingFrameStream');
var assert = require('assert');
describe('Client.connect', function() {
var client, transport, framesOut, framesIn;
beforeEach(function() {
transport = new ... | Test for heart-beat header handling | Test for heart-beat header handling
| JavaScript | mit | gdaws/node-stomp | ---
+++
@@ -35,4 +35,19 @@
done();
});
+ it('should parse the heart-beat header and call setHeartbeat', function(done) {
+
+ client.connect({
+ 'heart-beat': '1,2'
+ });
+
+ var heartbeat = client.getHeartbeat();
+
+ assert.equal(heartbeat[0], 1);
+ assert.equal(heartbeat[1], 2);
+
+ ... |
fa6f1f516775a84db71769b07f11fd23d5b39f7e | addon/helpers/-ui-component-class.js | addon/helpers/-ui-component-class.js | import Ember from 'ember';
export default Ember.Helper.helper(function ([prefix, ...classNames]) {
var classString = '';
classNames.forEach(function(name) {
if (!name) return;
var trimmedName = name.replace(/\s/g, '');
if (trimmedName === '') return;
if (trimmedName === ':component') {
cla... | import Ember from 'ember';
const FONT_SIZE_PATTERN = /font-size/;
export default Ember.Helper.helper(function ([prefix, ...classNames]) {
return classNames.reduce(function(string, name) {
if (!name) return string;
let trimmedName = name.replace(/\s/g, '');
if (trimmedName === '') return string;
sw... | Whitelist font-size classes from prefixing | Whitelist font-size classes from prefixing
| JavaScript | mit | prototypal-io/untitled-ui,prototypal-io/untitled-ui,prototypal-io/ui-base-theme,prototypal-io/ui-base-theme | ---
+++
@@ -1,20 +1,21 @@
import Ember from 'ember';
+const FONT_SIZE_PATTERN = /font-size/;
+
export default Ember.Helper.helper(function ([prefix, ...classNames]) {
- var classString = '';
+ return classNames.reduce(function(string, name) {
+ if (!name) return string;
- classNames.forEach(function(name)... |
f0aad1536f204a108876fea8bbda7aa8ba102749 | server/mappings/windowslive.js | server/mappings/windowslive.js | module.exports = profile => {
return {
uid: profile.username || profile.id,
mail: profile.emails && profile.emails[0] && profile.emails[0].value,
cn: profile.displayName,
displayName: profile.displayName,
givenName: profile.name.familyName,
sn: profile.name.givenName
}
}
| module.exports = profile => {
return {
uid: profile.username || profile.id,
mail: profile.emails && profile.emails[0] && profile.emails[0].value,
cn: profile.displayName,
displayName: profile.displayName,
givenName: profile.name.givenName,
sn: profile.name.familyName
}
}
| Fix typo in windows live mapping | Fix typo in windows live mapping
| JavaScript | apache-2.0 | GluuFederation/gluu-passport,GluuFederation/gluu-passport | ---
+++
@@ -4,7 +4,7 @@
mail: profile.emails && profile.emails[0] && profile.emails[0].value,
cn: profile.displayName,
displayName: profile.displayName,
- givenName: profile.name.familyName,
- sn: profile.name.givenName
+ givenName: profile.name.givenName,
+ sn: profile.name.familyName
}
} |
3617df199a77a9758b391615ec12e6ab0ae6362e | content.js | content.js | // Obtain ALL anchors on the page.
var links = document.links;
// The previous/next urls if they exist.
var prev = findHref("prev");
var next = findHref("next");
/**
* Find the href for a given name.
* @param {String} The name of the anchor to search for.
* @return {String} The href for a given tag, otherwise an e... | // Obtain ALL anchors on the page.
var links = document.links;
// The previous/next urls if they exist.
var prev = findHref("prev");
var next = findHref("next");
/**
* Find the href for a given name.
* @param {String} name - The name of the anchor to search for.
* @return {String} The href for a given tag, otherwi... | Refactor repeated checking to a helper method. | Refactor repeated checking to a helper method.
| JavaScript | mit | jawrainey/leftyrighty | ---
+++
@@ -7,21 +7,32 @@
/**
* Find the href for a given name.
- * @param {String} The name of the anchor to search for.
+ * @param {String} name - The name of the anchor to search for.
* @return {String} The href for a given tag, otherwise an empty string.
*/
function findHref(name) {
for (var index = ... |
394ccb91c645cab13fbd2681cfdac3dd3bbaa602 | app/contentModule.js | app/contentModule.js | app.module("ContentModule", function(ContentModule, app){
ContentModule.listTemplate = "<div>List</div>";
ContentModule.showTemplate = "<div>Show <%= id %></div>";
ContentModule.ListView = Marionette.ItemView.extend({
template: _.template(ContentModule.listTemplate),
className: 'content list'
});
... | app.module("ContentModule", function(ContentModule, app){
ContentModule.itemTemplate = "Item";
ContentModule.listTemplate = "<div>List</div><ul></ul>";
ContentModule.showTemplate = "<div>Show <%= id %></div>";
ContentModule.ItemView = Marionette.ItemView.extend({
template: _.template(ContentModule.itemT... | Change list view to be a composite view | Change list view to be a composite view
| JavaScript | mit | Gerg/marionette-boilerplate | ---
+++
@@ -1,10 +1,18 @@
app.module("ContentModule", function(ContentModule, app){
- ContentModule.listTemplate = "<div>List</div>";
+ ContentModule.itemTemplate = "Item";
+ ContentModule.listTemplate = "<div>List</div><ul></ul>";
ContentModule.showTemplate = "<div>Show <%= id %></div>";
- ContentModul... |
e7fba0907c173ee96a277f3d75e894e886f38c5b | markovChain.js | markovChain.js | 'use strict';
function randomIntFromInterval(min,max){return Math.floor(Math.random()*(max-min+1)+min);};
var markovGenerator = {
order: 2,
table:{},
load:function(text){
text = text.toLowerCase();
//text.replace(/[^a-z ]/, '');
for (var i = this.settings.order; i < text.length; i++){
var entry = text.sl... | 'use strict';
function randomIntFromInterval(min,max){return Math.floor(Math.random()*(max-min+1)+min);};
var markovGenerator = {
order: 2,
table:{},
load:function(text){
text = text.toLowerCase();
//text.replace(/[^a-z ]/, '');
for (var i = this.order; i < text.length; i++){
var entry = text.slice(i-thi... | Fix for a wrongly named variable introduced when cleaning up | Fix for a wrongly named variable introduced when cleaning up
| JavaScript | bsd-3-clause | Albertoni/JavascriptMarkovChain,Albertoni/JavascriptMarkovChain | ---
+++
@@ -9,7 +9,7 @@
text = text.toLowerCase();
//text.replace(/[^a-z ]/, '');
- for (var i = this.settings.order; i < text.length; i++){
+ for (var i = this.order; i < text.length; i++){
var entry = text.slice(i-this.order, i);
if(Array.isArray(this.table[entry])){
this.table[entry].push(te... |
1a8061be07063cb673b603ada0e2742e0b3cfa0c | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
grunt.initConfig({
connect: {
server: {
options: {
port: 8000,
useAvailablePort: true,
hostname: '*',
keepalive: true
}
}
},
uglify: {
dist: {
files: {
'dist/angular-local-storag... | module.exports = function(grunt) {
grunt.initConfig({
connect: {
server: {
options: {
port: 8000,
useAvailablePort: true,
hostname: '*',
keepalive: true
}
}
},
uglify: {
dist: {
files: {
'dist/angular-local-storag... | Change config uglify task grunt | Change config uglify task grunt
| JavaScript | mit | krescruz/angular-local-storage | ---
+++
@@ -14,7 +14,7 @@
uglify: {
dist: {
files: {
- 'dist/angular-local-storage.min.min.js': ['src/angular-local-storage.min.js']
+ 'dist/angular-local-storage.min.js': ['src/angular-local-storage.js']
}
}
} |
a40f8e8464462e96cf78314098122bef99b2479f | client/src/components/ArticleCard.js | client/src/components/ArticleCard.js | import React from 'react'
import {Link} from 'react-router-dom'
function setArticleUrl(title) {
var sanitizedTitle = title.replace(/%/g, "[percent]")
debugger
return encodeURIComponent(sanitizedTitle)
}
const ArticleCard = ({channel, article}) => {
return (
<Link to={`/newsfeed/${channel.source_id}/${setA... | import React from 'react'
import {Link} from 'react-router-dom'
const ArticleCard = ({channel, article, setArticleUrl}) => {
return (
<Link to={`/newsfeed/${channel.source_id}/${setArticleUrl(article.title)}`} className="article-link">
<div className="card">
<h3>{article.title}</h3>
<img ... | Move setUrl functoin to parent | Move setUrl functoin to parent
| JavaScript | mit | kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed | ---
+++
@@ -1,13 +1,9 @@
import React from 'react'
import {Link} from 'react-router-dom'
-function setArticleUrl(title) {
- var sanitizedTitle = title.replace(/%/g, "[percent]")
- debugger
- return encodeURIComponent(sanitizedTitle)
-}
-const ArticleCard = ({channel, article}) => {
+
+const ArticleCard = ({c... |
cb839f6dd5000d1acfb62332344cf4d36e4df676 | config/http-get-param-interceptor.js | config/http-get-param-interceptor.js | 'use strict';
angular.module('gc.ngHttpGetParamInterceptor', [
'gc.utils'
]).factory('httpGetParamInterceptor', [
'utils',
function httpGetParamInterceptor(utils) {
return {
request: function(config) {
// Manually build query params using custom logic because Angular and
// Rails do not... | 'use strict';
angular.module('gc.ngHttpGetParamInterceptor', [
'gc.utils'
]).factory('httpGetParamInterceptor', [
'utils',
function httpGetParamInterceptor(utils) {
function deleteUndefinedValues(obj) {
_.keys(obj).forEach(function(key) {
if (_.isUndefined(obj[key])) {
delete obj[key... | Revert "Revert "delete undefined properties from http config params"" | Revert "Revert "delete undefined properties from http config params""
This reverts commit f2875d45257f892607df8a460b253cd35fb0900a.
| JavaScript | mit | gocardless-ng/ng-gc-base-app-service | ---
+++
@@ -5,11 +5,23 @@
]).factory('httpGetParamInterceptor', [
'utils',
function httpGetParamInterceptor(utils) {
+
+ function deleteUndefinedValues(obj) {
+ _.keys(obj).forEach(function(key) {
+ if (_.isUndefined(obj[key])) {
+ delete obj[key];
+ } else if (_.isObject(obj[key... |
08b96b29e385b58fb09e8c5bc197c17492f1c9d4 | examples/test-runner/mocha-controls.js | examples/test-runner/mocha-controls.js | "use strict";
var exampleTests = require('../example-tests');
function Controls(mochaRunner) {
this._mochaRunner = mochaRunner;
}
Controls.prototype = {
connectButtons: function(passingButtonId, failingButtonId, manyButtonId) {
function connect(id, fn) {
document.getElementById(id).addEventListener('cl... | "use strict";
var exampleTests = require('../example-tests');
function Controls(mochaRunner) {
this._mochaRunner = mochaRunner;
}
Controls.prototype = {
connectButtons: function(passingButtonId, failingButtonId, manyButtonId) {
function connect(id, fn) {
document.getElementById(id).addEventListener('cl... | Use the proper test code. | Use the proper test code. | JavaScript | mit | tddbin/tddbin-frontend,tddbin/tddbin-frontend,tddbin/tddbin-frontend | ---
+++
@@ -19,7 +19,7 @@
this._postTestSourceCode(exampleTests.simplePassingTestCode);
},
_postFailingTest: function() {
- this._postTestSourceCode(exampleTests.simplePassingTestCode);
+ this._postTestSourceCode(exampleTests.simpleFailingTestCode);
},
_postManyTests: function() {
this._po... |
d804e831b659c5ad23b398df1f7d9198026d32d6 | src/main/webapp/components/BuildSnapshotContainer.js | src/main/webapp/components/BuildSnapshotContainer.js | import * as React from "react";
import {BuildSnapshot} from "./BuildSnapshot";
/**
* Container Component for BuildSnapshots.
*
* @param {*} props input property containing an array of build data to be
* rendered through BuildSnapshot.
*/
export const BuildSnapshotContainer = React.memo((props) =>
{
const S... | import * as React from "react";
import {BuildSnapshot} from "./BuildSnapshot";
/**
* Container Component for BuildSnapshots.
*
* @param {*} props input property containing an array of build data to be
* rendered through BuildSnapshot.
*/
export const BuildSnapshotContainer = React.memo((props) =>
{
const N... | Update fetch source, add parameters | Update fetch source, add parameters
| JavaScript | apache-2.0 | googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020 | ---
+++
@@ -9,7 +9,11 @@
*/
export const BuildSnapshotContainer = React.memo((props) =>
{
- const SOURCE = '/builders';
+ const NUMBER = 2;
+ const OFFSET = 3;
+
+ const SOURCE = `/builders/number=${NUMBER}/offset=${OFFSET}`;
+
const [data, setData] = React.useState([]);
/** |
bb0c2f4f9f7a227820308f0802c062520b0f6a00 | stockflux-launcher/src/app-shortcuts/AppShortcuts.js | stockflux-launcher/src/app-shortcuts/AppShortcuts.js | import React, { useEffect, useState } from 'react';
import { OpenfinApiHelpers } from 'stockflux-core';
import Components from 'stockflux-components';
import './AppShortcuts.css';
export default () => {
const [apps, setApps] = useState([]);
useEffect(() => {
const options = {
method: 'GET'
};
O... | import React, { useEffect, useState } from 'react';
import { OpenfinApiHelpers } from 'stockflux-core';
import Components from 'stockflux-components';
import './AppShortcuts.css';
export default () => {
const [apps, setApps] = useState([]);
useEffect(() => {
const options = {
method: 'GET'
};
O... | Rename stockflux-search to stockflux-launcher in package.json and remove console.log | Rename stockflux-search to stockflux-launcher in package.json and remove console.log
| JavaScript | mit | owennw/OpenFinD3FC,owennw/OpenFinD3FC,ScottLogic/bitflux-openfin,ScottLogic/StockFlux,ScottLogic/StockFlux,ScottLogic/bitflux-openfin | ---
+++
@@ -16,10 +16,7 @@
.then(options => options.customData.apiBaseUrl)
.then(baseUrl => fetch(`${baseUrl}/apps/v1`, options))
.then(response => response.json())
- .then(results => {
- console.log('results', results);
- setApps(results);
- })
+ .then(results => set... |
7e019de783a757fdeb5fc5babb05b297defb6b46 | src/client/es6/controller/cart-blog-create.js | src/client/es6/controller/cart-blog-create.js | import CartBlogEditorCtrl from './base/cart-blog-editor.js';
class CartBlogCreateCtrl extends CartBlogEditorCtrl {
constructor(...args) {
super(...args);
this.logInit('CartBlogCreateCtrl');
this.init();
}
init() {
this.apiService.postDefaultCategory().then(
(category) => {
this.ca... | import CartBlogEditorCtrl from './base/cart-blog-editor.js';
class CartBlogCreateCtrl extends CartBlogEditorCtrl {
constructor(...args) {
super(...args);
this.logInit('CartBlogCreateCtrl');
this.init();
}
init() {
this.apiService.postDefaultCategory().then(
(category) => {
this.ca... | Remove uuid in constructor, since strong loop server will see null as value provided, there won't be any defaultFn called. Otherwise you can give uuid "undefined", it's OK. | Remove uuid in constructor, since strong loop server will see null as value provided, there won't be any defaultFn called. Otherwise you can give uuid "undefined", it's OK.
| JavaScript | mit | agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart | ---
+++
@@ -19,6 +19,7 @@
this.tags = [];
this.attachments = [];
this.post = {
+ uuid: undefined, // have to be "undefined" to make stongloop server recognize this property shall apply defaultFn
driveId: null,
title: '',
created: new Date(), |
e6fd0e7eb621d549d231b9435ed3f7974f368f10 | notifications/content.js | notifications/content.js | var baseUrl = process.env.BASE_URI || "localdocker:4000";
module.exports = {
approveFeed: function(message, recipient, group) {
return "<p>" + message["user"]["userName"] + " has approved the feed for their " + message["election"].date.substring(0,10) + " " +
message["election"].election_type + " election ... | var baseUrl = process.env.BASE_URI || "localdocker:4000";
module.exports = {
approveFeed: function(message, recipient, group) {
return "<p>" + message["user"]["userName"] + " has approved the feed for their " + message["election"].date.substring(0,10) + " " +
message["election"].election_type + " election ... | Add missing space in email template. | [CS] Add missing space in email template.
| JavaScript | bsd-3-clause | votinginfoproject/Metis,votinginfoproject/Metis,votinginfoproject/Metis | ---
+++
@@ -3,7 +3,7 @@
module.exports = {
approveFeed: function(message, recipient, group) {
return "<p>" + message["user"]["userName"] + " has approved the feed for their " + message["election"].date.substring(0,10) + " " +
- message["election"].election_type + " election for publication. It was appro... |
ee12708d43ff22bc9d9c9ea5a36011ee66fdd69a | tasks/autoprefixer.js | tasks/autoprefixer.js | /*
* grunt-autoprefixer
*
*
* Copyright (c) 2013 Dmitry Nikitenko
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
var autoprefixer = require('autoprefixer');
grunt.registerMultiTask('autoprefixer', 'Parse CSS and add prefixed properties and values by Can I Use d... | /*
* grunt-autoprefixer
*
*
* Copyright (c) 2013 Dmitry Nikitenko
* Licensed under the MIT license.
*/
'use strict';
module.exports = function (grunt) {
var autoprefixer = require('autoprefixer');
grunt.registerMultiTask('autoprefixer', 'Parse CSS and add vendor prefixes to CSS rules using values fro... | Update the description of the task. | Update the description of the task.
| JavaScript | mit | nqdy666/grunt-autoprefixer,nDmitry/grunt-autoprefixer,yuhualingfeng/grunt-autoprefixer | ---
+++
@@ -12,7 +12,7 @@
var autoprefixer = require('autoprefixer');
- grunt.registerMultiTask('autoprefixer', 'Parse CSS and add prefixed properties and values by Can I Use database for actual browsers.', function () {
+ grunt.registerMultiTask('autoprefixer', 'Parse CSS and add vendor prefixes to CS... |
7645de616768d37c3589609d347e1566be48634a | plugins/index.js | plugins/index.js | 'use strict';
let telegram = require( './telegram.js' );
let urlchecker = require( './urlchecker.js' );
let github = require( './github.js' );
let rss = require( './rss.js' );
let dagensmix = require( './dagensmix.js' );
let pushbullet = require( './pushbullet.js' );
let httpcat = require( './httpcat.js' );
module.ex... | 'use strict';
let telegram = require( './telegram.js' );
let urlchecker = require( './urlchecker.js' );
let github = require( './github.js' );
let rss = require( './rss.js' );
let dagensmix = require( './dagensmix.js' );
// let pushbullet = require( './pushbullet.js' );
let httpcat = require( './httpcat.js' );
module... | Disable pushbullet because we don't use it anymore :D | Disable pushbullet because we don't use it anymore :D
| JavaScript | mit | kokarn/KokBot | ---
+++
@@ -5,7 +5,7 @@
let github = require( './github.js' );
let rss = require( './rss.js' );
let dagensmix = require( './dagensmix.js' );
-let pushbullet = require( './pushbullet.js' );
+// let pushbullet = require( './pushbullet.js' );
let httpcat = require( './httpcat.js' );
module.exports.telegram = tele... |
a5440e93f7550b2c107ffbf831a616938d90cbe7 | desktop/reactified/client/src/App.js | desktop/reactified/client/src/App.js | import React, { Component } from 'react';
import { Route, BrowserRouter as Router } from 'react-router-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import injectTapEventPlugin from 'react-tap-event-plugin';
import { blue500 } from... | import React, { Component } from 'react';
import { Redirect, Route, BrowserRouter as Router } from 'react-router-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import injectTapEventPlugin from 'react-tap-event-plugin';
import { blue... | Add default route from / to /tasks | Add default route from / to /tasks
| JavaScript | mit | mkermani144/wanna,mkermani144/wanna | ---
+++
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
-import { Route, BrowserRouter as Router } from 'react-router-dom';
+import { Redirect, Route, BrowserRouter as Router } from 'react-router-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'materi... |
0369aa8e1381c1d98f7049268f6275342017b9e0 | src/components/with-drag-and-drop/item-target/item-target.js | src/components/with-drag-and-drop/item-target/item-target.js | import React from 'react';
import ReactDOM from 'react-dom';
const ItemTarget = {
hover(props, monitor, component) {
const dragIndex = monitor.getItem().index;
const hoverIndex = props.index;
// Don't replace items with themselves
if (dragIndex === hoverIndex) {
console.log(1);
return;
... | import ReactDOM from 'react-dom';
const ItemTarget = {
hover(props, monitor, component) {
const dragIndex = monitor.getItem().index;
const hoverIndex = props.index;
// Don't replace items with themselves
if (dragIndex === hoverIndex) {
return;
}
// Determine rectangle on screen
co... | Remove unused var and console statements | Remove unused var and console statements
| JavaScript | apache-2.0 | Sage/carbon,Sage/carbon,Sage/carbon | ---
+++
@@ -1,4 +1,3 @@
-import React from 'react';
import ReactDOM from 'react-dom';
const ItemTarget = {
@@ -8,7 +7,6 @@
// Don't replace items with themselves
if (dragIndex === hoverIndex) {
- console.log(1);
return;
}
@@ -30,13 +28,11 @@
// Dragging downwards
if (dra... |
042737ff4aad71ec237b8565e59a1fb988c1b7f3 | lib/node_modules/@stdlib/random/base/improved-ziggurat/lib/ratio_array.js | lib/node_modules/@stdlib/random/base/improved-ziggurat/lib/ratio_array.js | /**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | /**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | Fix example and dynamically resize array | Fix example and dynamically resize array
| JavaScript | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | ---
+++
@@ -28,14 +28,16 @@
* @returns {NumberArray} ratio array
*
* @example
-* var R = ratioArray( [ 1, 2, 5 ] );
-* // returns [ 0.5, 0.4 ]
+* var R = ratioArray( [ 1.0, 2.0, 5.0 ] );
+* // returns [ 2.0, 2.5 ]
*/
function ratioArray( X ) {
- var R = new Array( X.length-1 );
+ var R;
var i;
- for ( i = 0; i... |
0ff964092fda25483633ce0fd4494b1bdf0858b0 | public/js/app.js | public/js/app.js | $(".up-button").mousedown(function(){
$.get("/movecam/moveUp");
}).mouseup(function(){
$.get("/movecam/moveStop");
});
$(".left-button").mousedown(function(){
$.get("/movecam/moveLeft");
}).mouseup(function(){
$.get("/movecam/moveStop");
});
$(".right-button").mousedown(function(){
$.get("/movecam/moveRight... | $(".up-button").bind("mousedown touchstart", function(){
$.get("/movecam/moveUp");
}).bind("mouseup touchend", function(){
$.get("/movecam/moveStop");
});
$(".left-button").bind("mousedown touchstart", function(){
$.get("/movecam/moveLeft");
}).bind("mouseup touchend", function(){
$.get("/movecam/moveStop");
}... | Enable touch use with jQuery element. | Enable touch use with jQuery element.
| JavaScript | mit | qrila/khvidcontrol,qrila/khvidcontrol | ---
+++
@@ -1,35 +1,35 @@
-$(".up-button").mousedown(function(){
+$(".up-button").bind("mousedown touchstart", function(){
$.get("/movecam/moveUp");
-}).mouseup(function(){
+}).bind("mouseup touchend", function(){
$.get("/movecam/moveStop");
});
-$(".left-button").mousedown(function(){
+$(".left-button").bin... |
f336097b6a75ac819d934dbc0db0f6901c4ad464 | randombytes.js | randombytes.js | var assert = require('nanoassert')
var randombytes = (function () {
var QUOTA = 65536 // limit for QuotaExceededException
var crypto = typeof window !== 'undefined' ? (window.crypto || window.msCrypto) : null
function windowBytes (out, n) {
for (var i = 0; i < n; i += QUOTA) {
crypto.getRandomValues(ou... | var assert = require('nanoassert')
var randombytes = (function () {
var QUOTA = 65536 // limit for QuotaExceededException
var crypto = typeof global !== 'undefined' ? crypto = (global.crypto || global.msCrypto) : null
function browserBytes (out, n) {
for (var i = 0; i < n; i += QUOTA) {
crypto.getRando... | Fix bug with undefined window in web workers | Fix bug with undefined window in web workers
Fixes #8
| JavaScript | mit | sodium-friends/sodium-javascript | ---
+++
@@ -1,9 +1,9 @@
var assert = require('nanoassert')
var randombytes = (function () {
var QUOTA = 65536 // limit for QuotaExceededException
- var crypto = typeof window !== 'undefined' ? (window.crypto || window.msCrypto) : null
+ var crypto = typeof global !== 'undefined' ? crypto = (global.crypto || gl... |
d14f4976cba654e91753d4f290c339fd11891c88 | frontend/common/directives/competition-infos/competitionInfos.controller.js | frontend/common/directives/competition-infos/competitionInfos.controller.js | 'use strict';
angular.module('konehuone.competitionInfos')
.controller('CompetitionInfosCtrl', function ($scope, lodash, apiService) {
var _ = lodash;
// # Variables
$scope.uiClosed = {
jj1: true,
jj2: true,
rc: true
};
$scope.compData = {};
$scope.igImages = [];
... | 'use strict';
angular.module('konehuone.competitionInfos')
.controller('CompetitionInfosCtrl', function ($scope, lodash, apiService) {
var _ = lodash;
// # Variables
$scope.uiClosed = {
jj1: false,
jj2: false,
rc: false
};
$scope.compData = {};
$scope.igImages = [];
... | Set comp info boxes opened as default | Set comp info boxes opened as default
| JavaScript | mit | miro/konehuone,miro/konehuone | ---
+++
@@ -7,9 +7,9 @@
// # Variables
$scope.uiClosed = {
- jj1: true,
- jj2: true,
- rc: true
+ jj1: false,
+ jj2: false,
+ rc: false
};
$scope.compData = {};
$scope.igImages = []; |
446458ad0ea88c40f6b0ebffe083c509a4fddb0c | resources/titleManager.js | resources/titleManager.js | /*
* Title module displaying title tag based on current view
*/
var EngineJS_titleManager = {
content: {},
titleDefault: "",
titleSuffix: "",
init: function(content, titleDefault, titleSuffix) {
this.content = content;
this.titleDefault = titleDefault;
this.titleSuffix = titleSuffix... | /*
* Title module displaying title tag based on current view
*/
var EngineJS_titleManager = {
content: {},
titleDefault: "",
titleSuffix: "",
init: function(content, titleDefault, titleSuffix) {
this.content = content;
this.titleDefault = titleDefault;
this.titleSuffix = titleSuffix... | Fix typo from previous commit | Fix typo from previous commit
| JavaScript | mit | enginejs/libs | ---
+++
@@ -17,7 +17,7 @@
if(title === undefined) {
title = this.titleDefault;
} else {
- title + ' - ' + this.titleSuffix;
+ title += ' - ' + this.titleSuffix;
}
document.title = title; |
b2e9a173ccf695fceed5a2689e0b7dfce4d5f810 | package.js | package.js | Package.describe({
summary: "Ravelry OAuth flow",
name: "amschrader:ravelry",
git: "git@github.com:amschrader/meteor-ravelry.git",
version: "0.1.0"
});
Package.onTest(function(api) {
api.use('tinytest');
api.use('amschrader:ravelry');
api.addFiles('ravelry-tests.js');
});
Package.on_use(function(api) {
... | Package.describe({
summary: "Ravelry OAuth flow",
name: "amschrader:ravelry",
git: "https://github.com/amschrader/meteor-ravelry.git",
version: "0.1.2"
});
Package.onTest(function(api) {
api.use('tinytest');
api.use('amschrader:ravelry');
api.addFiles('ravelry-tests.js');
});
Package.onUse(function(api)... | Update git url, formatting nits | Update git url, formatting nits
| JavaScript | mit | amschrader/meteor-ravelry | ---
+++
@@ -1,8 +1,8 @@
Package.describe({
summary: "Ravelry OAuth flow",
name: "amschrader:ravelry",
- git: "git@github.com:amschrader/meteor-ravelry.git",
- version: "0.1.0"
+ git: "https://github.com/amschrader/meteor-ravelry.git",
+ version: "0.1.2"
});
Package.onTest(function(api) {
@@ -11,7 +11,7... |
56e32f674d211ab1d94afd97660c0c28a82a621f | step_definitions/lib/navigation/link/index.js | step_definitions/lib/navigation/link/index.js | module.exports = {
validateAnchorText: validateAnchorText,
click: click,
};
/**
*
* @param {WebdriverIO} browser Instance of web driver
* @param {String} anchorText The anchor text to target by
*/
function click (browser, anchorText) {
return browser.click('a=' + anchorText);
}
/**
* Sets the client's ... | var interaction = require('../../interaction');
module.exports = {
validateAnchorText: validateAnchorText,
click: click,
};
/**
* Clicks an anchor element with the given anchor text
* @param {WebdriverIO} browser Instance of web driver
* @param {String} anchorText The anchor text to target by
*/
function ... | Refactor click link to use click element method | Refactor click link to use click element method
| JavaScript | mit | sudokrew/krewcumber,sudokrew/krewcumber | ---
+++
@@ -1,15 +1,17 @@
+var interaction = require('../../interaction');
+
module.exports = {
validateAnchorText: validateAnchorText,
click: click,
};
/**
- *
+ * Clicks an anchor element with the given anchor text
* @param {WebdriverIO} browser Instance of web driver
* @param {String} anchorText ... |
2d311ac85665a5edef7a4aab7c8efaac43426201 | lab10/public/js/l10.js | lab10/public/js/l10.js | /**
* Created by curtis on 3/28/16.
*/
angular.module('clusterApp', [])
.controller('MainCtrl', [
'$scope',
'$http',
function($scope, $http) {
var completed = 0,
timesToQuery = 100,
pids = [];
$scope.cluster = [];
$scope.b... | /**
* Created by curtis on 3/28/16.
*/
angular.module('clusterApp', [])
.controller('MainCtrl', [
'$scope',
'$http',
function($scope, $http) {
var completed = 0,
timesToQuery = 100;
$scope.cluster = [];
$scope.busy = false;
$... | Clean up the lab10 code a bit. | Clean up the lab10 code a bit.
| JavaScript | mit | chocklymon/CS360,chocklymon/CS360,chocklymon/CS360,chocklymon/CS360 | ---
+++
@@ -7,8 +7,7 @@
'$http',
function($scope, $http) {
var completed = 0,
- timesToQuery = 100,
- pids = [];
+ timesToQuery = 100;
$scope.cluster = [];
$scope.busy = false;
@@ -17,10 +16,9 @@
f... |
1890cfca8065635ced6755524d468614dead23f5 | src/services/GetCharityData.js | src/services/GetCharityData.js | class GetCharityData {
getData(){
var CHARITY_DATA = [
{amount: '41,234', month: 'January', year: '2015', name: 'Charity:Water', description: 'Cool description that was so hard to come up with. Hence I ended up writing some random text that dosent make much text' ,imageSource: 'https://s3.amazonaws.com/moveit-mul... | class GetCharityData {
getData(){
var CHARITY_DATA_ARRAY = [];
var spreadsheetID = "1f1tFr7y62QS7IRWOC2nNR5HWsTO99Bna3d0Xv1PTPiY";
var url = "https://spreadsheets.google.com/feeds/list/" + spreadsheetID + "/od6/public/values?alt=json";
fetch(url).then((response) => response.json())
.then((respon... | Implement service to fetch charity data from spreadsheet | Implement service to fetch charity data from spreadsheet
https://trello.com/c/wjthoHP0/28-user-sbat-view-the-charity-contributions-done-per-month-by-the-company
| JavaScript | mit | multunus/moveit-mobile,multunus/moveit-mobile,multunus/moveit-mobile | ---
+++
@@ -1,12 +1,19 @@
class GetCharityData {
- getData(){
- var CHARITY_DATA = [
- {amount: '41,234', month: 'January', year: '2015', name: 'Charity:Water', description: 'Cool description that was so hard to come up with. Hence I ended up writing some random text that dosent make much text' ,imageSource: 'htt... |
ad44e79d9f69feea484f72c44c55853f144fb6b8 | lib/get-youtube-url.js | lib/get-youtube-url.js | const Request = require('sdk/request').Request;
const qs = require('sdk/querystring');
const baseURL = 'http://www.youtube.com/get_video_info';
module.exports = getYouTubeUrl;
function getYouTubeUrl(videoId, cb) {
Request({
url: baseURL + '?' + qs.stringify({video_id: videoId}),
onComplete: function (resp)... | const Request = require('sdk/request').Request;
const qs = require('sdk/querystring');
const baseURL = 'https://www.youtube.com/get_video_info';
module.exports = getYouTubeUrl;
function getYouTubeUrl(videoId, cb) {
Request({
url: baseURL + '?' + qs.stringify({video_id: videoId}),
onComplete: function (resp... | Convert YouTube link to HTTPS | Convert YouTube link to HTTPS
| JavaScript | mpl-2.0 | meandavejustice/min-vid,meandavejustice/min-vid,meandavejustice/min-vid | ---
+++
@@ -1,7 +1,7 @@
const Request = require('sdk/request').Request;
const qs = require('sdk/querystring');
-const baseURL = 'http://www.youtube.com/get_video_info';
+const baseURL = 'https://www.youtube.com/get_video_info';
module.exports = getYouTubeUrl;
|
74aa179b5e16f5456a7529326820aba1a97bbb1e | server/middleware/auth.js | server/middleware/auth.js | const session = require('express-session');
const RedisStore = require('connect-redis')(session);
const redisClient = require('redis').createClient();
module.exports.verify = (req, res, next) => {
if (req.isAuthenticated()) {
return next();
}
res.redirect('/login');
};
module.exports.profileRedirect = (req,... | const session = require('express-session');
const RedisStore = require('connect-redis')(session);
const redisClient = require('redis').createClient(process.env.REDIS_URL) || require('redis').createClient;
module.exports.verify = (req, res, next) => {
if (req.isAuthenticated()) {
return next();
}
res.redirect... | Add REDIS_URL to createClient as an argument | Add REDIS_URL to createClient as an argument
| JavaScript | mit | FuriousFridges/FuriousFridges,FuriousFridges/FuriousFridges | ---
+++
@@ -1,6 +1,6 @@
const session = require('express-session');
const RedisStore = require('connect-redis')(session);
-const redisClient = require('redis').createClient();
+const redisClient = require('redis').createClient(process.env.REDIS_URL) || require('redis').createClient;
module.exports.verify = (req,... |
9960f49700f7793c93295240481ef1fcb7080a93 | troposphere/static/js/stores/HelpLinkStore.js | troposphere/static/js/stores/HelpLinkStore.js | import Dispatcher from "dispatchers/Dispatcher";
import BaseStore from "stores/BaseStore";
import HelpLinkCollection from "collections/HelpLinkCollection";
var HelpLinkStore = BaseStore.extend({
collection: HelpLinkCollection,
queryParams: {
page_size: 100
},
});
var store = new HelpLinkStore();... | import _ from "underscore";
import Dispatcher from "dispatchers/Dispatcher";
import BaseStore from "stores/BaseStore";
import HelpLinkCollection from "collections/HelpLinkCollection";
var HelpLinkStore = BaseStore.extend({
collection: HelpLinkCollection,
queryParams: {
page_size: 100
},
});
var ... | Fix error when updateImageAttributes dispatched | Fix error when updateImageAttributes dispatched
An uncaught error has been occurring when an image creator saves any
changes to image attributes:
```
Uncaught TypeError: Cannot read property 'silent' of undefined
```
It turns out that the HelpLinkStore is performing check for an option,
`option.silent`, to determine... | JavaScript | apache-2.0 | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend | ---
+++
@@ -1,3 +1,4 @@
+import _ from "underscore";
import Dispatcher from "dispatchers/Dispatcher";
import BaseStore from "stores/BaseStore";
import HelpLinkCollection from "collections/HelpLinkCollection";
@@ -16,7 +17,7 @@
Dispatcher.register(function(dispatch) {
var options = dispatch.action.options || ... |
0393c02cf549c8ee3bc09278153208702ec2b25a | lib/app/store/geoip.js | lib/app/store/geoip.js | module.exports = function geoip (ip) {
return (state, emitter) => {
state.geoip = {
ip: ip,
isLoading: false
}
emitter.on('geoip:fetch', () => {
if (state.geoip.isLoading) return
state.geoip.isLoading = true
window.fetch('//api.ipify.org?format=json')
.then(body => ... | module.exports = function geoip (ip) {
return (state, emitter) => {
state.geoip = {
ip: ip,
isLoading: false
}
emitter.on('geoip:fetch', () => {
if (state.geoip.isLoading) return
state.geoip.isLoading = true
window.fetch('https://freegeoip.net/json/').then(body => {
... | Remove use of ipify.org service | Remove use of ipify.org service
| JavaScript | apache-2.0 | CIVIS-project/BRFApp | ---
+++
@@ -9,20 +9,18 @@
if (state.geoip.isLoading) return
state.geoip.isLoading = true
- window.fetch('//api.ipify.org?format=json')
- .then(body => body.json())
- .then(resp => window.fetch(`//freegeoip.net/json/${resp.ip}`))
- .then(body => body.json())
- .then(dat... |
d34142022ccee2c72cf99430bba1ad3446061294 | public/js/script.js | public/js/script.js | //Client-side JS goes here.
(function () {
var locale = APP.intl.locale,
baseUrl = 'http://yui.yahooapis.com/combo?platform/intl/0.1.2/Intl.min.js&platform/intl/0.1.2/locale-data/jsonp/',
comboUrl = baseUrl + locale + '.js';
yepnope({
test : !!window.Intl,
nope : comboUrl
... | //Client-side JS goes here.
(function () {
var locale = APP.intl.locale,
// TODO: expose these URLs through Express State instead
baseUrl = 'http://yui.yahooapis.com/combo?platform/intl/0.1.2/Intl.min.js&platform/intl/0.1.2/locale-data/jsonp/',
comboUrl = baseUrl + locale + '.js',
... | Load in `intl-messageformat` after Intl | Load in `intl-messageformat` after Intl
| JavaScript | bsd-3-clause | okuryu/formatjs-site,ericf/formatjs-site,ericf/formatjs-site | ---
+++
@@ -1,14 +1,17 @@
//Client-side JS goes here.
(function () {
var locale = APP.intl.locale,
- baseUrl = 'http://yui.yahooapis.com/combo?platform/intl/0.1.2/Intl.min.js&platform/intl/0.1.2/locale-data/jsonp/',
- comboUrl = baseUrl + locale + '.js';
+ // TODO: expose these URLs through ... |
6f7ef8765f1919c1ad9471d031bd3d6cb1f6937f | lib/middleware/cors.js | lib/middleware/cors.js | /**
* Adds CORS headers to the response
*
* ####Example:
*
* app.all('/api*', keystone.middleware.cors);
*
* @param {app.request} req
* @param {app.response} res
* @param {function} next
* @api public
*/
// The exported function returns a closure that retains
// a reference to the keystone instance, so ... | /**
* Adds CORS headers to the response
*
* ####Example:
*
* app.all('/api*', keystone.middleware.cors);
*
* @param {app.request} req
* @param {app.response} res
* @param {function} next
* @api public
*/
// The exported function returns a closure that retains
// a reference to the keystone instance, so ... | Add OPTIONS to CORS allowed methods | Add OPTIONS to CORS allowed methods
| JavaScript | mit | creynders/keystone,creynders/keystone | ---
+++
@@ -24,7 +24,7 @@
}
if (keystone.get('cors allow methods') !== false) {
- res.header('Access-Control-Allow-Methods', keystone.get('cors allow methods') || 'GET,PUT,POST,DELETE');
+ res.header('Access-Control-Allow-Methods', keystone.get('cors allow methods') || 'GET,PUT,POST,DELETE,OPTIONS');
}... |
53db1031477a5f159feeb90dfb30a51a83093840 | components/layout/layout-panel-header.directive.js | components/layout/layout-panel-header.directive.js | export default ['config', 'Core', function (config, Core) {
return {
template: require('components/layout/partials/panel-header.directive.html'),
transclude: {
'extraButtons': '?extraButtons',
'extraTitle': '?extraTitle'
},
scope: {
panelName: "@",... | export default ['config', 'Core', function (config, Core) {
return {
template: require('components/layout/partials/panel-header.directive.html'),
transclude: {
'extraButtons': '?extraButtons',
'extraTitle': '?extraTitle'
},
scope: {
panelName: "@",... | Fix incorrect injection of $scope for minification | Fix incorrect injection of $scope for minification
| JavaScript | mit | hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng,hslayers/hslayers-ng | ---
+++
@@ -9,8 +9,8 @@
panelName: "@",
panelTitle: "=panelTitle"
},
- controller: function ($scope) {
+ controller: ['$scope', function ($scope) {
$scope.closePanel = Core.closePanel;
-... |
84e900f20bc6738ca5f71d9346254a5f8322f5eb | examples/node-browser/tracer-init.js | examples/node-browser/tracer-init.js | /*
* Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://w... | /*
* Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://w... | Add deployment meta data to example app | Add deployment meta data to example app
| JavaScript | apache-2.0 | hawkular/hawkular-apm-opentracing-javascript | ---
+++
@@ -25,6 +25,7 @@
recorder: new hawkularAPM.HttpRecorder('http://localhost:8080', 'jdoe', 'password'),
// recorder: new hawkularAPM.ConsoleRecorder(),
sampler: new hawkularAPM.AlwaysSample(),
+ deploymentMetaData: new hawkularAPM.DeploymentMetaData('node-browser-service'),
... |
523cdd46d039ad2a581a08f6da6438e7c72df472 | bi-platform-v2-plugin/cdf/js/components/simpleautocomplete.js | bi-platform-v2-plugin/cdf/js/components/simpleautocomplete.js |
var SimpleAutoCompleteComponent = BaseComponent.extend({
ph: undefined,
completionCallback: undefined,
update: function() {
this.ph = $("#" + this.htmlObject).empty();
this.input = $("<input type='text'>").appendTo(this.ph);
this.query = new Query(this.queryDefinition);
var myself... |
var SimpleAutoCompleteComponent = BaseComponent.extend({
ph: undefined,
completionCallback: undefined,
update: function() {
var myself = this;
this.ph = $("#" + this.htmlObject).empty();
this.input = $("<input type='text'>").appendTo(this.ph);
this.query = new Query(this.queryDefi... | Fix some bugs with simple autocomplete | Fix some bugs with simple autocomplete | JavaScript | mpl-2.0 | Tiger66639/cdf,pamval/cdf,krivera-pentaho/cdf,davidmsantos90/cdf,diogofscmariano/cdf,eliofreitas/cdf,jvelasques/cdf,Aliaksandr-Kastenka/cdf,pedrofvteixeira/cdf,pamval/cdf,jvelasques/cdf,diogofscmariano/cdf,diogofscmariano/cdf,Tiger66639/cdf,e-cuellar/cdf,afrjorge/cdf,afrjorge/cdf,webdetails/cdf,eliofreitas/cdf,scottyas... | ---
+++
@@ -5,12 +5,20 @@
completionCallback: undefined,
update: function() {
+ var myself = this;
this.ph = $("#" + this.htmlObject).empty();
this.input = $("<input type='text'>").appendTo(this.ph);
this.query = new Query(this.queryDefinition);
var myself = this;
t... |
77cd76c4e97c2cdc895e0fba1f1207f4c6c7623d | lib/transport/index.js | lib/transport/index.js | 'use strict';
var EventEmitter = require('events').EventEmitter;
var AbstractTransport = require('./abstract_transport.js');
var NetTransport = require('./net_transport.js');
var TlsTransport = require('./tls_transport.js');
function TransportProvider() {
this._transports = {};
}
TransportProvider.prototype.regist... | 'use strict';
var EventEmitter = require('events').EventEmitter;
var AbstractTransport = require('./abstract_transport.js');
var NetTransport = require('./net_transport.js');
var TlsTransport = require('./tls_transport.js');
function TransportProvider() {
this._transports = {};
}
TransportProvider.prototype.regist... | Fix jshint errors in transport | Fix jshint errors in transport
| JavaScript | mit | noodlefrenzy/node-amqp10 | ---
+++
@@ -16,14 +16,14 @@
for(var member in AbstractTransport.prototype) {
if (AbstractTransport.prototype.hasOwnProperty(member))
- if (typeof AbstractTransport.prototype[member] != typeof transport[member]) {
+ if (typeof AbstractTransport.prototype[member] !== typeof transport[member]) {... |
f60c3859905ed939366800d3adf71ec7e1da3a4b | eloquent_js/chapter12/ch12_ex03.js | eloquent_js/chapter12/ch12_ex03.js | function skipSpace(string) {
let toRemove = string.match(/^(?:\s|#.*)*/);
return string.slice(toRemove[0].length);
}
| function skipSpace(string) {
let match = string.match(/^(\s+|#.*)*/);
return string.slice(match[0].length);
}
| Add chapter 12, exercise 3 | Add chapter 12, exercise 3
| JavaScript | mit | bewuethr/ctci | ---
+++
@@ -1,4 +1,4 @@
function skipSpace(string) {
- let toRemove = string.match(/^(?:\s|#.*)*/);
- return string.slice(toRemove[0].length);
+ let match = string.match(/^(\s+|#.*)*/);
+ return string.slice(match[0].length);
} |
f98cf367c1d9fa9ca2516ab0d2dead2b80f7848a | test/test-issue-85.js | test/test-issue-85.js | var common = require("./common")
, odbc = require("../")
, db = new odbc.Database()
, assert = require("assert")
, util = require('util')
, count = 0
;
var sql = (common.dialect == 'sqlite' || common.dialect =='mysql')
? 'select cast(-1 as signed) as test;'
: 'select cast(-1 as int) as test;'
;
db.... | var common = require("./common")
, odbc = require("../")
, db = new odbc.Database()
, assert = require("assert")
, util = require('util')
, count = 0
;
var sql = (common.dialect == 'sqlite' || common.dialect =='mysql')
? 'select cast(-1 as signed) as test, cast(-2147483648 as signed) as test2, cast(2147... | Update test to include min and max of integer range | Update test to include min and max of integer range
| JavaScript | mit | jbaxter0810/node-odbc,gmahomarf/node-odbc,dfbaskin/node-odbc,bzuillsmith/node-odbc,Papercloud/node-odbc,bustta/node-odbc,gmahomarf/node-odbc,Papercloud/node-odbc,bzuillsmith/node-odbc,wankdanker/node-odbc,wankdanker/node-odbc,jbaxter0810/node-odbc,gmahomarf/node-odbc,dfbaskin/node-odbc,bustta/node-odbc,Papercloud/node-... | ---
+++
@@ -7,8 +7,8 @@
;
var sql = (common.dialect == 'sqlite' || common.dialect =='mysql')
- ? 'select cast(-1 as signed) as test;'
- : 'select cast(-1 as int) as test;'
+ ? 'select cast(-1 as signed) as test, cast(-2147483648 as signed) as test2, cast(2147483647 as signed) as test3;'
+ : 'select cast(-1... |
32912d1ef7ede8ffc7722a15fa7eeba0751319a0 | example/app/models/post.js | example/app/models/post.js | module.exports = function () {
this.string('name', {
required: true,
minLength: 5
});
this.string('title', {
required: true,
minLength: 5
});
this.string('content');
this.timestamps();
this.filter('all', {
map: function (doc) {
if (doc.resource === 'Post') {
var x = ... | module.exports = function () {
this.string('name', {
required: true,
minLength: 5
});
this.string('title', {
required: true,
minLength: 5
});
this.string('content');
this.timestamps();
this.filter('all', {
map: function (doc) {
if (doc.resource === 'Post') {
emit(doc... | Change view based on fixes in resourceful | Change view based on fixes in resourceful
| JavaScript | mit | pksunkara/bullet | ---
+++
@@ -17,9 +17,7 @@
this.filter('all', {
map: function (doc) {
if (doc.resource === 'Post') {
- var x = doc._id;
- doc._id = doc._id.split('/').slice(1).join('/');
- emit(x, doc);
+ emit(doc._id, doc);
}
}
}); |
92254b47944a101e37444aa4aea7f2ddb840cf38 | waltz-ng/client/extensions/extensions.js | waltz-ng/client/extensions/extensions.js | // extensions initialisation
import {registerComponents} from '../common/module-utils';
import {dynamicSections, dynamicSectionsByKind} from "../dynamic-section/dynamic-section-definitions";
import dbChangeInitiativeBrowser from './components/change-initiative/change-initiative-browser/db-change-initiative-browser';
... | // extensions initialisation
import _ from "lodash";
import {registerComponents} from '../common/module-utils';
import {dynamicSections, dynamicSectionsByKind} from "../dynamic-section/dynamic-section-definitions";
import dbChangeInitiativeBrowser from './components/change-initiative/change-initiative-browser/db-chan... | Fix change initiative section - Override GH section with DB specific one | Fix change initiative section - Override GH section with DB specific one
CTCTOWALTZ-706
| JavaScript | apache-2.0 | davidwatkins73/waltz-dev,kamransaleem/waltz,khartec/waltz,rovats/waltz,rovats/waltz,rovats/waltz,khartec/waltz,kamransaleem/waltz,khartec/waltz,rovats/waltz,davidwatkins73/waltz-dev,kamransaleem/waltz,kamransaleem/waltz,khartec/waltz,davidwatkins73/waltz-dev,davidwatkins73/waltz-dev | ---
+++
@@ -1,5 +1,6 @@
// extensions initialisation
+import _ from "lodash";
import {registerComponents} from '../common/module-utils';
import {dynamicSections, dynamicSectionsByKind} from "../dynamic-section/dynamic-section-definitions";
@@ -13,11 +14,11 @@
dbChangeInitiativeSection
]);
- ... |
8a779ce56482ab429172aa05c49d36d500bfea16 | public/backbone-marionette/js/router.js | public/backbone-marionette/js/router.js | /*global BackboneWizard, Backbone*/
BackboneWizard.Routers = BackboneWizard.Routers || {};
(function () {
'use strict';
BackboneWizard.Routers.WizardRouter = Backbone.Router.extend({
routes: {
'': 'index',
'verify': 'showVerify',
'payment': 'showPayment',
... | /*global BackboneWizard, Marionette*/
BackboneWizard.Routers = BackboneWizard.Routers || {};
(function () {
'use strict';
BackboneWizard.Routers.WizardRouter = Marionette.AppRouter.extend({
appRoutes: {
'': 'index',
'verify': 'showVerify',
'payment': 'showPayment',... | Use Marionette.AppRouter for the Router. | Use Marionette.AppRouter for the Router.
| JavaScript | mit | jonkemp/wizard-mvc | ---
+++
@@ -1,32 +1,16 @@
-/*global BackboneWizard, Backbone*/
+/*global BackboneWizard, Marionette*/
BackboneWizard.Routers = BackboneWizard.Routers || {};
(function () {
'use strict';
- BackboneWizard.Routers.WizardRouter = Backbone.Router.extend({
- routes: {
+ BackboneWizard.Routers.Wiza... |
8ca18ff251f2f44b93ebb9050931c542628fc8d1 | app/assets/javascripts/representativeSelector.js | app/assets/javascripts/representativeSelector.js | var HDO = HDO || {};
(function (H, $) {
H.representativeSelector = {
init: function (opts) {
var districtSelect, representativeSelect, representatives, selectedRepresentatives;
districtSelect = opts.districtSelect;
representativeSelect = opts.representativeSelect;
representatives ... | var HDO = HDO || {};
(function (H, $) {
H.representativeSelector = {
init: function (opts) {
var districtSelect, representativeSelect, representatives, selectedRepresentatives;
districtSelect = opts.districtSelect;
representativeSelect = opts.representativeSelect;
representatives ... | Disable district search + use contains filter for representatives. | Disable district search + use contains filter for representatives.
| JavaScript | bsd-3-clause | holderdeord/hdo-site,holderdeord/hdo-site,holderdeord/hdo-site,holderdeord/hdo-site | ---
+++
@@ -39,9 +39,8 @@
districtSelect.val(opts.selectedDistrict).change();
}
- representativeSelect.chosen({});
- districtSelect.chosen({});
-
+ representativeSelect.chosen({search_contains: true});
+ districtSelect.chosen({disable_search: true});
}
};
}(HDO, window.j... |
728693fbf3fbad513fec2d1bee6aeabe4e5caf91 | frontend/src/components/ViewActivities/activityday.js | frontend/src/components/ViewActivities/activityday.js | import React from 'react';
import Accordion from 'react-bootstrap/Accordion';
import Card from 'react-bootstrap/Card';
import Activity from './activity';
import * as activityFns from './activityfns';
import * as utils from '../Utils/utils.js'
class ActivityDay extends React.Component {
/** @inheritdoc */
construct... | import React from 'react';
import Accordion from 'react-bootstrap/Accordion';
import Card from 'react-bootstrap/Card';
import Activity from './activity';
import * as activityFns from './activityfns';
import * as utils from '../Utils/utils.js'
class ActivityDay extends React.Component {
/** @inheritdoc */
construct... | Remove state variable where it can be removed. | Remove state variable where it can be removed.
| JavaScript | apache-2.0 | googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP | ---
+++
@@ -9,14 +9,12 @@
/** @inheritdoc */
constructor(props) {
super(props);
- this.state = {
- date: props.date,
- activities: Array.from(props.activities).sort(activityFns.compareActivities)
- };
}
/** @inheritdoc */
render() {
+ const sortedActivities = Array.from(this.... |
1649c411366e12bc338b3486b82b0d109f97d6f0 | src/modules/unit/components/UnitsOnMap.js | src/modules/unit/components/UnitsOnMap.js | import React from 'react';
import isEmpty from 'lodash/isEmpty';
import SingleUnitOnMap from './SingleUnitOnMap';
import {sortByCondition} from '../helpers';
export const UnitsOnMap = ({units, selectedUnitId, openUnit}) => {
let unitsInOrder = units.slice();
// Draw things in condition order
unitsInOrder = sort... | import React from 'react';
import isEmpty from 'lodash/isEmpty';
import SingleUnitOnMap from './SingleUnitOnMap';
import {sortByCondition} from '../helpers';
export const UnitsOnMap = ({units, selectedUnitId, openUnit}) => {
let unitsInOrder = units.slice();
// Draw things in condition order
unitsInOrder = sort... | Add comment to fix a bug | Add comment to fix a bug
| JavaScript | mit | nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map | ---
+++
@@ -11,7 +11,7 @@
if(!isEmpty(unitsInOrder) && selectedUnitId) {
const index = unitsInOrder.findIndex((unit) => unit.id === selectedUnitId);
- const selectedUnit = unitsInOrder[index];
+ const selectedUnit = unitsInOrder[index]; //FIXME: This fails if url parameter unitId does not exist
... |
d6090f49d653d76a65696e3c5fe8417c673c398a | auto-bind.js | auto-bind.js | 'use strict';
var copy = require('es5-ext/object/copy')
, map = require('es5-ext/object/map')
, callable = require('es5-ext/object/valid-callable')
, validValue = require('es5-ext/object/valid-value')
, bind = Function.prototype.bind, defineProperty = Object.defineProperty
, hasOwnProperty = ... | 'use strict';
var copy = require('es5-ext/object/copy')
, ensureCallable = require('es5-ext/object/valid-callable')
, map = require('es5-ext/object/map')
, callable = require('es5-ext/object/valid-callable')
, validValue = require('es5-ext/object/valid-value')
, bind = Functio... | Reconfigure bindTo support into options.resolveContext | Reconfigure bindTo support into options.resolveContext
| JavaScript | isc | medikoo/d | ---
+++
@@ -1,31 +1,32 @@
'use strict';
-var copy = require('es5-ext/object/copy')
- , map = require('es5-ext/object/map')
- , callable = require('es5-ext/object/valid-callable')
- , validValue = require('es5-ext/object/valid-value')
+var copy = require('es5-ext/object/copy')
+ , ensur... |
79e5bd95684823ee41af1d35474cb29a627328d2 | example/index.js | example/index.js | var express = require('express'),
app = express(),
kaching = require('kaching');
app.set('views', __dirname);
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser());
app.use(express.session({ secret: 'se... | var express = require('express'),
app = express(),
PaypalStrategy = require('kaching-paypal'),
kaching = require('kaching');
app.set('views', __dirname);
app.set('view engine', 'jade');
/**
* Test account: kaching@gmail.com
* Password: kachingtest
*/
kaching.use(new PaypalStrategy({
'client_id': 'AVN... | Use paypal strategy for testing. | Use paypal strategy for testing.
| JavaScript | mit | gregwym/kaching | ---
+++
@@ -1,9 +1,19 @@
var express = require('express'),
app = express(),
+ PaypalStrategy = require('kaching-paypal'),
kaching = require('kaching');
app.set('views', __dirname);
app.set('view engine', 'jade');
+
+/**
+ * Test account: kaching@gmail.com
+ * Password: kachingtest
+ */
+kaching.use(... |
d769d4b6df913d6b4e32e1e4b44d4f69d9f926ca | bin/cli.js | bin/cli.js | var program = require('commander');
program
.description('Generate random documents, numbers, names, address, etc.')
.version('0.0.1')
.option('-f, --cpf', 'Select CPF')
.option('-j, --cnpj', 'Select CNPJ')
.option('-n, --name [gender]', 'Select Name')
.option('-c, --creditCard <type>', 'Select... | var program = require('commander');
program
.description('Generate random documents, numbers, names, address, etc.')
.version('0.0.1')
.option('-f, --cpf', 'Select CPF')
.option('-j, --cnpj', 'Select CNPJ')
.option('-c, --creditCard <type>', 'Select Credit Card. Types: maestro, dinersclub, laser, j... | Remove --name feature as it's not working at the moment | Remove --name feature as it's not working at the moment
| JavaScript | mit | lvendrame/dev-util-cli,lagden/dev-util-cli | ---
+++
@@ -5,7 +5,6 @@
.version('0.0.1')
.option('-f, --cpf', 'Select CPF')
.option('-j, --cnpj', 'Select CNPJ')
- .option('-n, --name [gender]', 'Select Name')
.option('-c, --creditCard <type>', 'Select Credit Card. Types: maestro, dinersclub, laser, jcb, unionpay, discover, mastercard, amex,... |
c553b7303421701a87f84d506643e88dafab7798 | client/app/pages/admin/outdated-queries/index.js | client/app/pages/admin/outdated-queries/index.js |
import moment from 'moment';
import { Paginator } from '@/lib/pagination';
import template from './outdated-queries.html';
function OutdatedQueriesCtrl($scope, $http, $timeout) {
$scope.autoUpdate = true;
this.queries = new Paginator([], { itemsPerPage: 50 });
const refresh = () => {
if ($scope.autoUpdat... | import moment from 'moment';
import { Paginator } from '@/lib/pagination';
import template from './outdated-queries.html';
function OutdatedQueriesCtrl($scope, $http, $timeout) {
$scope.autoUpdate = true;
this.queries = new Paginator([], { itemsPerPage: 50 });
const refresh = () => {
if ($scope.autoUpdate... | Test line end carriages redo. | Test line end carriages redo.
| JavaScript | bsd-2-clause | moritz9/redash,moritz9/redash,moritz9/redash,moritz9/redash | ---
+++
@@ -1,4 +1,3 @@
-
import moment from 'moment';
import { Paginator } from '@/lib/pagination'; |
764061b8b87ff137633089f17f14e954f995cd8d | bin/cli.js | bin/cli.js | var program = require('commander');
var pkg = require('../package.json');
program
.version(pkg.version)
.description('Gitter bot for evaluating expressions')
.usage('<room-name>')
.parse(process.argv);
if (!program.args[0]) {
throw new Error('You must supply room');
}
| var program = require('commander');
var pkg = require('../package.json');
program
.version(pkg.version)
.description('Gitter bot for evaluating expressions')
.usage('[options] <room-name>')
.option('-k, --key', 'Override API key by default')
.parse(process.argv);
| Add option for override default API key | Add option for override default API key
| JavaScript | mit | ghaiklor/uwcua-vii | ---
+++
@@ -4,9 +4,6 @@
program
.version(pkg.version)
.description('Gitter bot for evaluating expressions')
- .usage('<room-name>')
+ .usage('[options] <room-name>')
+ .option('-k, --key', 'Override API key by default')
.parse(process.argv);
-
-if (!program.args[0]) {
- throw new Error('You must supply ... |
8102b934e3aa9386d2dd68acb7cb5985c68684b8 | test/promises-tests.js | test/promises-tests.js | var path = require('path');
var fs = require('fs');
global.adapter = require('./adapter-a');
describe('promises-tests', function () {
var testsDir = path.join(path.dirname(require.resolve('promises-aplus-tests/lib/programmaticRunner.js')), 'tests');
var testFileNames = fs.readdirSync(testsDir);
testFileNames.f... | var tests = require('promises-aplus-tests');
var adapter = require('./adapter-a');
tests.mocha(adapter); | Use newer system for programatic runner | Use newer system for programatic runner
| JavaScript | mit | nodegit/promise,slang800/promise,then/promise,vigetlabs/promise,taylorhakes/promise,JoshuaWise/jellypromise,implausible/promise,ljharb/promise,npmcomponent/then-promise,astorije/promise,Bacra/promise,cpojer/promise | ---
+++
@@ -1,16 +1,4 @@
-var path = require('path');
-var fs = require('fs');
+var tests = require('promises-aplus-tests');
+var adapter = require('./adapter-a');
-global.adapter = require('./adapter-a');
-
-describe('promises-tests', function () {
- var testsDir = path.join(path.dirname(require.resolve('promises... |
ec3d29cdb3231abc1bed89d5fc5a02f29addb392 | examples/todo/webpack.config.js | examples/todo/webpack.config.js | var path = require('path');
module.exports = {
entry: path.resolve(__dirname, 'lib', 'client.js'),
output: {
filename: 'app.js',
path: path.resolve(__dirname, 'lib'),
},
};
| var path = require('path');
module.exports = {
entry: [
'babel-core/polyfill',
path.resolve(__dirname, 'lib', 'client.js'),
],
output: {
filename: 'app.js',
path: path.resolve(__dirname, 'lib'),
},
};
| Load babel-core/polyfill in the example (thanks to @DylanSale) | Load babel-core/polyfill in the example (thanks to @DylanSale)
| JavaScript | bsd-2-clause | AndriyShepitsen/react-relay-cbi,denvned/isomorphic-relay-router | ---
+++
@@ -1,7 +1,10 @@
var path = require('path');
module.exports = {
- entry: path.resolve(__dirname, 'lib', 'client.js'),
+ entry: [
+ 'babel-core/polyfill',
+ path.resolve(__dirname, 'lib', 'client.js'),
+ ],
output: {
filename: 'app.js',
path: path.resolve(__dir... |
9e4798c05b4b8bbb90b448121e606263afe1aced | server/hueRoutes.js | server/hueRoutes.js | const Debug = require('debug')('iot-home:server:hue')
var HueServer = {}
function HueRoutes (server, middleware) {
server.get('/hue/bridges', middleware.findBridge)
server.get('/hue/lights', middleware.findAllLights)
server.get('/hue/light/:light', middleware.getState)
server.get('/hue/light/:light/on', middl... | const Debug = require('debug')('iot-home:server:hue')
var HueServer = {}
function HueRoutes (server, middleware) {
server.get('/hue/bridges', middleware.findBridge)
server.get('/hue/lights', middleware.findAllLights)
server.get('/hue/lights/:light', middleware.getState)
server.get('/hue/lights/:light/on', mid... | Make routes follow JSON API standards | Make routes follow JSON API standards
| JavaScript | mit | harlanj/iot-home,theworkflow/iot-home | ---
+++
@@ -5,14 +5,14 @@
function HueRoutes (server, middleware) {
server.get('/hue/bridges', middleware.findBridge)
server.get('/hue/lights', middleware.findAllLights)
- server.get('/hue/light/:light', middleware.getState)
- server.get('/hue/light/:light/on', middleware.on)
- server.get('/hue/light/:light... |
d6e9f814bde9c63af95ec9220c768ab477b2dc5a | app/assets/javascripts/routes/sign_in_route.js | app/assets/javascripts/routes/sign_in_route.js | HB.SignInRoute = Ember.Route.extend({
beforeModel: function() {
if (this.get('currentUser.isSignedIn')) {
this.transitionTo('dashboard');
}
}
});
| HB.SignInRoute = Ember.Route.extend({
beforeModel: function() {
if (this.get('currentUser.isSignedIn')) {
this.transitionTo('dashboard');
}
},
setupController: function(controller, model) {
controller.set('username', '');
controller.set('password', '');
controller.set('errorMessage', '')... | Reset login form on setupController | Reset login form on setupController
| JavaScript | apache-2.0 | saintsantos/hummingbird,MiLk/hummingbird,sidaga/hummingbird,jcoady9/hummingbird,sidaga/hummingbird,wlads/hummingbird,jcoady9/hummingbird,erengy/hummingbird,erengy/hummingbird,synthtech/hummingbird,hummingbird-me/hummingbird,vevix/hummingbird,MiLk/hummingbird,Snitzle/hummingbird,saintsantos/hummingbird,paladique/humming... | ---
+++
@@ -3,5 +3,10 @@
if (this.get('currentUser.isSignedIn')) {
this.transitionTo('dashboard');
}
+ },
+ setupController: function(controller, model) {
+ controller.set('username', '');
+ controller.set('password', '');
+ controller.set('errorMessage', '');
}
}); |
b5e62cd5dfaef3a3c9266e1ce6581830957c60dd | app/pages/browser-warning/BrowserWarning.spec.js | app/pages/browser-warning/BrowserWarning.spec.js | import React from 'react';
import BrowserWarning from './BrowserWarning';
import { shallowWithIntl } from 'utils/testUtils';
describe('pages/browser-warning/BrowserWarning', () => {
function getWrapper() {
return shallowWithIntl(<BrowserWarning />);
}
test('renders a browser warning div', () => {
const... | import React from 'react';
import BrowserWarning from './BrowserWarning';
import { shallowWithIntl } from '../../utils/testUtils';
describe('pages/browser-warning/BrowserWarning', () => {
function getWrapper() {
return shallowWithIntl(<BrowserWarning />);
}
test('renders a browser warning div', () => {
... | Change import paths to relative for files in ./app/pages/browser-warning/ folder | Change import paths to relative for files in ./app/pages/browser-warning/ folder
| JavaScript | mit | fastmonkeys/respa-ui | ---
+++
@@ -1,7 +1,7 @@
import React from 'react';
import BrowserWarning from './BrowserWarning';
-import { shallowWithIntl } from 'utils/testUtils';
+import { shallowWithIntl } from '../../utils/testUtils';
describe('pages/browser-warning/BrowserWarning', () => {
function getWrapper() { |
0813ec552b2bbf3e3b781b0a4ccb81d142a8adb1 | blueprints/ember-cli-table-pagination/index.js | blueprints/ember-cli-table-pagination/index.js | /*jshint node:true*/
module.exports = {
description: 'install the addon'// ,
// locals: function(options) {
// // Return custom template variables here.
// return {
// foo: options.entity.options.foo
// };
// }
// afterInstall: function(options) {
// // Perform extra work here.
// }
... | /*jshint node:true*/
module.exports = {
description: 'install the addon',
// locals: function(options) {
// // Return custom template variables here.
// return {
// foo: options.entity.options.foo
// };
// }
// afterInstall: function(options) {
// // Perform extra work here.
// }
nor... | Revert "try changing the blueprint" | Revert "try changing the blueprint"
This reverts commit 9f6815ed2ef27ef7898fe5f2f444d2b5af1e816a.
| JavaScript | mit | jking6884/ember-cli-table-pagination,gte451f/ember-cli-table-pagination,jking6884/ember-cli-table-pagination,gte451f/ember-cli-table-pagination | ---
+++
@@ -1,6 +1,6 @@
/*jshint node:true*/
module.exports = {
- description: 'install the addon'// ,
+ description: 'install the addon',
// locals: function(options) {
// // Return custom template variables here.
@@ -12,9 +12,9 @@
// afterInstall: function(options) {
// // Perform extra work h... |
c63270920685755f00bf4df93734d5e4753ea798 | data/panel.js | data/panel.js | let selectElm = document.getElementById("switchy-panel-select");
selectElm.onchange = function() {
self.port.emit("changeProfile", selectElm.value);
}
let buttons = [ 'add', 'manager', 'settings', 'about' ];
for (let i = 0; i < buttons.length; ++i) {
createButton(buttons[i]);
}
function createButton(name) {
let... | let selectElm = document.getElementById("switchy-panel-select");
let buttons = [ 'add', 'manager', 'settings', 'about' ];
for (let i = 0; i < buttons.length; ++i) {
createButton(buttons[i]);
}
function createButton(name) {
let button = document.getElementById('switchy-panel-' + name + '-button');
button.onclick... | Select profile with 1 element in the select | Select profile with 1 element in the select
| JavaScript | mpl-2.0 | bakulf/switchy | ---
+++
@@ -1,7 +1,4 @@
let selectElm = document.getElementById("switchy-panel-select");
-selectElm.onchange = function() {
- self.port.emit("changeProfile", selectElm.value);
-}
let buttons = [ 'add', 'manager', 'settings', 'about' ];
for (let i = 0; i < buttons.length; ++i) {
@@ -30,6 +27,9 @@
let opt = ... |
9186287a7e1881eb051fada1d782e4118804c2af | simpyapp/static/sim.js | simpyapp/static/sim.js | $(document).ready(function() {
init();
$.ajaxSetup({
crossDomain: false, // obviates need for sameOrigin test
beforeSend: function(xhr, settings) {
if (!csrfSafeMethod(settings.type)) {
xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
}
}
});
});
function init() {
$(... | $(document).ready(function() {
init();
});
function init() {
$('#compare').click(function() {
$.ajax({
url: '/compare/',
type: 'post',
data: {
doc1: $('#doc1').val(),
doc2: $('#doc2').val(),
},
success: function(data){
$('#result').html(data);
},
... | Clean up csrf helper functions | Clean up csrf helper functions
| JavaScript | mit | initrc/simpy,initrc/simpy | ---
+++
@@ -1,13 +1,5 @@
$(document).ready(function() {
init();
- $.ajaxSetup({
- crossDomain: false, // obviates need for sameOrigin test
- beforeSend: function(xhr, settings) {
- if (!csrfSafeMethod(settings.type)) {
- xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
- }
- ... |
b6d910a90dfec796752c91b21014073f02618b01 | js/containers/makeSortable.js | js/containers/makeSortable.js | 'use strict';
var React = require('react');
var Sortable = require('../views/Sortable');
var {deepPureRenderMixin} = require('../react-utils');
// We skip the first column to keep 'samples' on the left.
function makeSortable(Component) {
return React.createClass({
displayName: 'SpreadsheetSortable',
mixins: [deep... | 'use strict';
var React = require('react');
var Sortable = require('../views/Sortable');
var {deepPureRenderMixin} = require('../react-utils');
// We skip the first column to keep 'samples' on the left.
function makeSortable(Component) {
return React.createClass({
displayName: 'SpreadsheetSortable',
mixins: [deep... | Enable tooltip freeze on samples. | Enable tooltip freeze on samples.
| JavaScript | apache-2.0 | ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client,acthp/ucsc-xena-client,ucscXena/ucsc-xena-client | ---
+++
@@ -13,7 +13,9 @@
[first, ...rest] = React.Children.toArray(children);
return (
<Component {...otherProps}>
- {first}
+ <div onClick={onClick}>
+ {first}
+ </div>
<Sortable onClick={onClick} onReorder={order => onReorder([first.props.actionKey, ...order])}>
{rest}
... |
0098c64ebf6ecddabd6516901b986b86be3e6620 | js/src/common/extend/Model.js | js/src/common/extend/Model.js | export default class Routes {
type;
attributes = [];
hasOnes = [];
hasManys = [];
constructor(type, model = null) {
this.type = type;
this.model = model;
}
attribute(name) {
this.attributes.push(name);
return this;
}
hasOne(type) {
this.hasOnes.push(type);
return this;
}... | export default class Model {
type;
attributes = [];
hasOnes = [];
hasManys = [];
constructor(type, model = null) {
this.type = type;
this.model = model;
}
attribute(name) {
this.attributes.push(name);
return this;
}
hasOne(type) {
this.hasOnes.push(type);
return this;
}
... | Fix an irrelevant export name :P | Fix an irrelevant export name :P
| JavaScript | mit | flarum/core,flarum/core,flarum/core | ---
+++
@@ -1,4 +1,4 @@
-export default class Routes {
+export default class Model {
type;
attributes = [];
hasOnes = []; |
b91aee96a7e3ecb45e1b70e7bb54c1c4e32547a5 | src/exports.js | src/exports.js | var Game = require('./game');
var GameArtist = require('./artists/gameartist');
var EventDispatcher = require('./eventdispatcher');
var utils = require('./utils');
var EventLogger = require('./eventLogger');
var PlaybackDispatcher = require('./playbackdispatcher');
var Landmine = window.Landmine || {};
Landmine.start... | var Game = require('./game');
var GameArtist = require('./artists/gameartist');
var EventDispatcher = require('./eventdispatcher');
var utils = require('./utils');
var EventLogger = require('./eventlogger');
var PlaybackDispatcher = require('./playbackdispatcher');
var Landmine = window.Landmine || {};
Landmine.start... | Fix typo in requrie that breaks on case-sensitive FS | Fix typo in requrie that breaks on case-sensitive FS
| JavaScript | mit | akatakritos/Landmine.js | ---
+++
@@ -2,7 +2,7 @@
var GameArtist = require('./artists/gameartist');
var EventDispatcher = require('./eventdispatcher');
var utils = require('./utils');
-var EventLogger = require('./eventLogger');
+var EventLogger = require('./eventlogger');
var PlaybackDispatcher = require('./playbackdispatcher');
var L... |
a1ed0a17b3604cd150ed653c1beb4f21d725034c | src/globals.js | src/globals.js | var base = require('jsio.base');
GLOBAL.Class = base.Class;
GLOBAL.merge = base.merge;
GLOBAL.bind = base.bind;
// catch SIGTERM and SIGINT so `exit` events properly trigger on the process
// object (e.g. killing child processes)
process.on('SIGTERM', function () {
process.exit(1);
});
process.on('SIGINT', functio... | var base = require('jsio.base');
GLOBAL.Class = base.Class;
GLOBAL.merge = base.merge;
GLOBAL.bind = base.bind;
// catch SIGTERM and SIGINT so `exit` events properly trigger on the process
// object (e.g. killing child processes)
process.on('SIGTERM', function () {
process.exit(1);
});
process.on('SIGINT', functio... | Print devkit header and version info when tracing | Print devkit header and version info when tracing
| JavaScript | mpl-2.0 | gameclosure/devkit,gameclosure/devkit,gameclosure/devkit | ---
+++
@@ -25,3 +25,13 @@
}
Promise = require('bluebird');
+
+/**
+ * Show devkit trace information
+ */
+var version = require(__dirname + '/../package.json').version;
+trace('--------------------------------------------------------------------------------');
+trace('------------------------- GAME CLOSURE DEVKI... |
5305aea90d10ba8c89422ccae0d75a8b22baa806 | src/lib/run.js | src/lib/run.js | const path = require('path');
const babelOptions = {
presets: ['es2015', 'stage-0'],
plugins: ['transform-decorators-legacy', 'transform-runtime']
};
exports.module = function runModule(modulePath) {
/* eslint-disable lines-around-comment, global-require */
const packageJson = require(path.resolve('package.js... | const path = require('path');
const babelOptions = {
presets: ['es2015', 'stage-0'],
plugins: ['transform-decorators-legacy', 'transform-runtime']
};
exports.module = function runModule(modulePath) {
/* eslint-disable lines-around-comment, global-require */
const packageJson = require(path.resolve('package.js... | Remove src/ from package.json in development | Remove src/ from package.json in development
| JavaScript | mit | vinsonchuong/dist-es6 | ---
+++
@@ -11,7 +11,9 @@
require('register-module')({
name: packageJson.name,
path: path.resolve('src'),
- main: packageJson.main || 'index.js'
+ main: packageJson.main ?
+ packageJson.main.replace('src/', '') :
+ 'index.js'
});
require('babel-register')(babelOptions);
require(m... |
96e2badfc4d6a3bbdabe220cdbb6dd3851a6b6fc | src/global/style/utils.js | src/global/style/utils.js | //@flow
export function baseAdjust(n: number): string {
return `
padding-top: calc(${n}em / 16) !important;
margin-bottom: calc(-${n}em / 16) !important;
`;
}
| //@flow
import { css } from "styled-components";
export const baseAdjust = (n: number) => css`
padding-top: calc(${n}em / 16) !important;
margin-bottom: calc(-${n}em / 16) !important;
`;
| Edit baseAdjust to ()=> and include css`` in styled components output | Edit baseAdjust to ()=> and include css`` in styled components output
| JavaScript | mit | slightly-askew/portfolio-2017,slightly-askew/portfolio-2017 | ---
+++
@@ -1,8 +1,8 @@
//@flow
-export function baseAdjust(n: number): string {
- return `
- padding-top: calc(${n}em / 16) !important;
- margin-bottom: calc(-${n}em / 16) !important;
- `;
-}
+import { css } from "styled-components";
+
+export const baseAdjust = (n: number) => css`
+ padding-top: c... |
b9805279764f6fa4c3a50a4e3b9dbca7a40156c0 | addon/instance-initializers/body-class.js | addon/instance-initializers/body-class.js | import Ember from 'ember';
export function initialize(instance) {
const config = instance.container.lookupFactory('config:environment');
// Default to true when not set
let _includeRouteName = true;
if (config['ember-body-class'] && config['ember-body-class'].includeRouteName === false) {
_includeRouteNam... | import Ember from 'ember';
export function initialize(instance) {
var config;
if (instance.resolveRegistration) {
// Ember 2.1+
// http://emberjs.com/blog/2015/08/16/ember-2-1-beta-released.html#toc_registry-and-container-reform
config = instance.resolveRegistration('config:environment');
} else {
... | Use updated registry in Ember 2.1 | Use updated registry in Ember 2.1
| JavaScript | mit | AddJam/ember-body-class,AddJam/ember-body-class | ---
+++
@@ -1,7 +1,14 @@
import Ember from 'ember';
export function initialize(instance) {
- const config = instance.container.lookupFactory('config:environment');
+ var config;
+ if (instance.resolveRegistration) {
+ // Ember 2.1+
+ // http://emberjs.com/blog/2015/08/16/ember-2-1-beta-released.html#toc_... |
8767bd64bad5313a86dca9b44c227e1b688a9d81 | webpack-prod.config.js | webpack-prod.config.js | var config = module.exports = require("./webpack.config.js");
var webpack = require('webpack');
var _ = require('lodash');
config = _.merge(config, {
externals : {
"react" : "React"
}
});
var StringReplacePlugin = require("string-replace-webpack-plugin");
config.module.loaders.push({
test: /inde... | var config = module.exports = require("./webpack.config.js");
var webpack = require('webpack');
var _ = require('lodash');
config = _.merge(config, {
externals : {
"react" : "React",
"react-dom" : "ReactDOM"
}
});
var StringReplacePlugin = require("string-replace-webpack-plugin");
config.mod... | Update production build for react-0.14 | Update production build for react-0.14
| JavaScript | mit | payalabs/scalajs-react-bridge-example,payalabs/scalajs-react-bridge-example | ---
+++
@@ -4,7 +4,8 @@
config = _.merge(config, {
externals : {
- "react" : "React"
+ "react" : "React",
+ "react-dom" : "ReactDOM"
}
});
@@ -18,7 +19,7 @@
{
pattern: /<!-- externals to be replaced by webpack StringReplacePlugin -->/ig,
... |
5408013ea3ade16bd810f418d1e6e6cea992a841 | db/config.js | db/config.js | //For Heroku Deployment
var URI = require('urijs');
var config = URI.parse(process.env.DATABASE_URL);
module.exports = config;
// module.exports = {
// database: 'sonder',
// user: 'postgres',
// //password: 'postgres',
// port: 32769,
// host: '192.168.99.100'
// };
| //For Heroku Deployment
var URI = require('urijs');
var config = URI.parse(process.env.DATABASE_URL);
config['ssl'] = true;
module.exports = config;
// module.exports = {
// database: 'sonder',
// user: 'postgres',
// //password: 'postgres',
// port: 32769,
// host: '192.168.99.100'
// };
| Enforce SSL connection to Postgres | Enforce SSL connection to Postgres
| JavaScript | mit | MapReactor/SonderServer,aarontrank/SonderServer,aarontrank/SonderServer,MapReactor/SonderServer | ---
+++
@@ -1,6 +1,7 @@
//For Heroku Deployment
var URI = require('urijs');
var config = URI.parse(process.env.DATABASE_URL);
+config['ssl'] = true;
module.exports = config;
// module.exports = { |
485f1e8443bee8dd5f7116112f98717edbc49a08 | examples/ably.js | examples/ably.js | 'use strict';
require.config({
paths: {
Ably: '/ably.min'
}
});
define(['Ably'], function(Ably) {
var ably = new Ably();
return ably;
});
| 'use strict';
require.config({
paths: {
Ably: '/ably.min'
}
});
/* global define */
define(['Ably'], function(Ably) {
var ably = new Ably();
return ably;
});
| Allow "define" in examples (no-undef) | Allow "define" in examples (no-undef)
| JavaScript | mit | vgno/ably | ---
+++
@@ -6,6 +6,7 @@
}
});
+/* global define */
define(['Ably'], function(Ably) {
var ably = new Ably();
return ably; |
e5a8b77baea9eca2a44fb043dcff28e73177f8a6 | src/js/models.js | src/js/models.js |
var Pomodoro = Backbone.Model.extend({
defaults: {
isStarted: false,
duration: 25 * 60,
remainingSeconds: null
},
initialize: function() {
this.listenTo(this, 'finished', this.finish);
},
start: function(duration){
if (duration) {
this.set('dur... |
var Pomodoro = Backbone.Model.extend({
defaults: {
isStarted: false,
duration: 25 * 60,
remainingSeconds: null
},
initialize: function() {
this.listenTo(this, 'finished', this.finish);
},
start: function(duration){
if (duration) {
this.set('dur... | Fix bug when starting pmdr multiple times | Fix bug when starting pmdr multiple times
| JavaScript | mit | namlook/pmdr | ---
+++
@@ -18,13 +18,15 @@
this.set('isStarted', true);
this.set('remainingSeconds', this.get('duration'));
+ this.trigger('countedDown', this.get('remainingSeconds'));
var that = this;
+ clearInterval(this._interval);
this._interval = setInterval(function(){
... |
8552314ec2908bd82723ba50d406c48d4a0a6b59 | devServer.js | devServer.js | /* eslint no-var: 0, func-names: 0 , no-console: 0 */
/**
* Development Server
* - See https://github.com/gaearon/react-transform-boilerplate
*/
var path = require('path');
var express = require('express');
var webpack = require('webpack');
var config = require('./webpack.config.dev');
var app = express();
var co... | /* eslint no-var: 0, func-names: 0 , no-console: 0 */
/**
* Development Server
* - See https://github.com/gaearon/react-transform-boilerplate
*/
var path = require('path');
var express = require('express');
var webpack = require('webpack');
var config = require('./webpack.config.dev');
var app = express();
var co... | Read dev server port from env if its there | [cleanup] Read dev server port from env if its there | JavaScript | mit | jackp/finance-tracker,jackp/finance-tracker | ---
+++
@@ -13,6 +13,8 @@
var app = express();
var compiler = webpack(config);
+var PORT = process.env.PORT || 3000;
+
app.use(require('webpack-dev-middleware')(compiler, {
noInfo: true,
publicPath: config.output.publicPath,
@@ -24,11 +26,11 @@
res.sendFile(path.join(__dirname, 'src/index.html'));
});
... |
a73841eb0191f1585affb4228e05af6e2e503291 | shallowEqualImmutable.js | shallowEqualImmutable.js | var Immutable = require('immutable');
var is = Immutable.is.bind(Immutable),
getKeys = Object.keys.bind(Object);
function shallowEqualImmutable(objA, objB) {
if (is(objA, objB)) {
return true;
}
var keysA = getKeys(objA),
keysB = getKeys(objB),
keysAlength = keysA.length,
keysBlength =... | var Immutable = require('immutable');
var is = Immutable.is.bind(Immutable);
function shallowEqualImmutable(objA, objB) {
if (objA === objB || is(objA, objB)) {
return true;
}
if (typeof objA !== 'object' || objA === null ||
typeof objB !== 'object' || objB === null) {
return false;
}
var ... | Make more similar to original version | Make more similar to original version | JavaScript | mit | steffenmllr/react-immutable-render-mixin,jurassix/react-immutable-render-mixin | ---
+++
@@ -1,30 +1,32 @@
var Immutable = require('immutable');
-var is = Immutable.is.bind(Immutable),
- getKeys = Object.keys.bind(Object);
+var is = Immutable.is.bind(Immutable);
function shallowEqualImmutable(objA, objB) {
- if (is(objA, objB)) {
+ if (objA === objB || is(objA, objB)) {
return tru... |
926caeb0c32c3130945b2e5ba0753a989b5f1035 | app/components/select-year/component.js | app/components/select-year/component.js | import Ember from 'ember';
function range(start, end) {
return Array(end-start).join(0).split(0).map((val, id) => id + start);
}
export default Ember.Component.extend({
years: range(new Date().getFullYear(), new Date().getFullYear() + 6)
});
| import Ember from 'ember';
function range(start, end) {
return new Array(end-start).join(0).split(0).map((val, id) => id + start);
}
export default Ember.Component.extend({
years: range(new Date().getFullYear(), new Date().getFullYear() + 6)
});
| Use new for Array construction | Use new for Array construction
Fixes issue with jshint.
| JavaScript | mit | blakepettersson/dashboard.aptible.com,blakepettersson/dashboard.aptible.com,aptible/dashboard.aptible.com,chasballew/dashboard.aptible.com,chasballew/dashboard.aptible.com,aptible/dashboard.aptible.com,aptible/dashboard.aptible.com,blakepettersson/dashboard.aptible.com,chasballew/dashboard.aptible.com | ---
+++
@@ -1,7 +1,7 @@
import Ember from 'ember';
function range(start, end) {
- return Array(end-start).join(0).split(0).map((val, id) => id + start);
+ return new Array(end-start).join(0).split(0).map((val, id) => id + start);
}
export default Ember.Component.extend({
years: range(new Date().getFullYear... |
15cb0b67e0850945fc3c505e902b9984c67e4923 | src/components/Menu.js | src/components/Menu.js | import React from 'react';
import {
Link
} from 'react-router';
import './Menu.css';
import User from './User';
import language from '../language/language';
const menuLanguage = language.components.menu;
let Menu = React.createClass ({
getInitialState() {
return { showUser: false };
},
toggleUser() {
... | import React from 'react';
import {
Link
} from 'react-router';
import './Menu.css';
import User from './User';
import language from '../language/language';
const menuLanguage = language.components.menu;
let Menu = React.createClass ({
getInitialState() {
return { showUser: false };
},
toggleUser() {
... | Add id the link where the toggleUser is bind | Add id the link where the toggleUser is bind
| JavaScript | bsd-3-clause | jeromelachaud/Last.fm-Activities-React,jeromelachaud/Last.fm-Activities-React | ---
+++
@@ -54,7 +54,7 @@
<li
className="Menu__item">
<Link
- to="#0"
+ id="toggleUser"
onClick={this.toggleUser}>
{menuLanguage.userInfo}
</Link> |
f76fe4e96d4c637c10d11e80a73c280c28113550 | src/minipanel.js | src/minipanel.js | MiniPanel = function (game, text, x, y) {
Phaser.Group.call(this, game);
text = "TESTING"
var style = { font: "25px Arial", align: "center" };
this.label = game.add.text(x, y, text, style)
this.label.anchor.setTo(0.5)
var middle = this.game.add.tileSprite(x, y, this.label.width-50,
50,... | MiniPanel = function (game, text, x, y) {
Phaser.Group.call(this, game);
var style = { font: "25px Arial", align: "center" };
this.label = game.add.text(x, y, text, style)
this.label.anchor.setTo(0.5)
var middle = this.game.add.tileSprite(x, y, this.label.width-50,
50, 'sprites',
'be... | Remove "Testing" as best word every time | Remove "Testing" as best word every time
Signed-off-by: Reicher <d5b86a7882b5bcb4262a5e66c6cf4ed497795bc7@gmail.com>
| JavaScript | mit | Reicher/Lettris,Reicher/Lettris | ---
+++
@@ -1,7 +1,5 @@
MiniPanel = function (game, text, x, y) {
Phaser.Group.call(this, game);
-
- text = "TESTING"
var style = { font: "25px Arial", align: "center" };
this.label = game.add.text(x, y, text, style) |
8de3db905a598cc1fea5476eaa8ba7109f0ef6be | src/App.js | src/App.js | import React from 'react';
import './App.css';
import Clock from './Clock.js';
function App() {
return (
<div className="App">
<Clock></Clock>
{/*
If you add a Weatherclock launcher to your home screen on an iPhone,
the page opened will not be in a web-browser (or at least look like
... | import React from 'react';
import './App.css';
import Clock from './Clock.js';
function App() {
return (
<div className="App">
<Clock></Clock>
{/*
If you add a Weatherclock launcher to your home screen on an iPhone,
the page opened will not be in a web-browser (or at least look like
... | Add missing whitespace around link | Add missing whitespace around link
| JavaScript | mit | walles/weatherclock,walles/weatherclock,walles/weatherclock,walles/weatherclock | ---
+++
@@ -17,9 +17,9 @@
{/* FIXME: Should be "onClick" not "onclick, then read console messages for further inspiration" */}
<button type="button" onclick="location.reload();">Update forecast FIXME: Handler doesnt work</button>
- <p>Weather forecast from <a href="yr.no">yr.no</a>, delivered by ... |
652d9409708510ddcfdf3c73c92205345ef3710c | generators/needle/needle-client-base.js | generators/needle/needle-client-base.js | const needleBase = require('./needle-base');
module.exports = class extends needleBase {
addStyle(style, comment, filePath, needle) {
const styleBlock = this.mergeStyleAndComment(style, comment);
this.addBlockContentToFile(filePath, styleBlock, needle);
}
mergeStyleAndComment(style, commen... | const needleBase = require('./needle-base');
module.exports = class extends needleBase {
addStyle(style, comment, filePath, needle) {
const styleBlock = this.mergeStyleAndComment(style, comment);
const rewriteFileModel = this.generateFileModel(filePath, needle, styleBlock);
this.addBlockCo... | Use needleNase API in clientBase | Use needleNase API in clientBase
| JavaScript | apache-2.0 | gmarziou/generator-jhipster,pascalgrimaud/generator-jhipster,mosoft521/generator-jhipster,wmarques/generator-jhipster,pascalgrimaud/generator-jhipster,mosoft521/generator-jhipster,gmarziou/generator-jhipster,jhipster/generator-jhipster,atomfrede/generator-jhipster,liseri/generator-jhipster,vivekmore/generator-jhipster,... | ---
+++
@@ -3,7 +3,9 @@
module.exports = class extends needleBase {
addStyle(style, comment, filePath, needle) {
const styleBlock = this.mergeStyleAndComment(style, comment);
- this.addBlockContentToFile(filePath, styleBlock, needle);
+ const rewriteFileModel = this.generateFileModel(file... |
30d333b4b38cc94b4cfad7d98b113cd949a3d248 | gulp/tasks/assets.js | gulp/tasks/assets.js | import gulp from 'gulp';
import plumber from 'gulp-plumber';
import filter from 'gulp-filter';
import changed from 'gulp-changed';
import imagemin from 'gulp-imagemin';
import { plumberConfig, imageminConfig } from '../config';
export const assets = () => {
const imageFilter = filter('**/*.{jpg,gif,svg,png}', { resto... | import gulp from 'gulp';
import plumber from 'gulp-plumber';
import filter from 'gulp-filter';
import changed from 'gulp-changed';
import imagemin from 'gulp-imagemin';
import { plumberConfig, imageminConfig } from '../config';
export const assets = () => {
const imageFilter = filter('**/*.{jpg,gif,svg,png}', { resto... | Add return for async task cmpletition | Add return for async task cmpletition
| JavaScript | mit | Zoxon/gulp-front,Zoxon/gulp-front,bkzhn/gulp-front,bkzhn/gulp-front | ---
+++
@@ -8,7 +8,7 @@
export const assets = () => {
const imageFilter = filter('**/*.{jpg,gif,svg,png}', { restore: true });
- gulp.src([ '**/*.*', '!**/_*.*' ], { cwd: 'source/static/assets' })
+ return gulp.src([ '**/*.*', '!**/_*.*' ], { cwd: 'source/static/assets' })
.pipe(plumber(plumberConfig))
.pi... |
f2b9463ee744299caaae1f936003e53ae0e826a6 | tasks/style.js | tasks/style.js | /*eslint-disable no-alert, no-console */
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import * as paths from './paths';
const $ = gulpLoadPlugins();
gulp.task('compile:styles', () => {
const AUTOPREFIXER_BROWSERS = [
'ie >= 10',
'ie_mob >= 10',
'ff >= 30',
'chrome >= ... | /*eslint-disable no-alert, no-console */
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import * as paths from './paths';
const $ = gulpLoadPlugins();
gulp.task('compile:styles', () => {
// See https://github.com/ai/browserslist for more details on how to set
// browser versions
co... | Simplify browser version selection for autoprefixer | Simplify browser version selection for autoprefixer
| JavaScript | unlicense | gsong/es6-jspm-gulp-starter,gsong/es6-jspm-gulp-starter | ---
+++
@@ -9,17 +9,9 @@
gulp.task('compile:styles', () => {
- const AUTOPREFIXER_BROWSERS = [
- 'ie >= 10',
- 'ie_mob >= 10',
- 'ff >= 30',
- 'chrome >= 34',
- 'safari >= 7',
- 'opera >= 23',
- 'ios >= 7',
- 'android >= 4.4',
- 'bb >= 10'
- ];
+ // See https://github.com/ai/browser... |
bbae0e095d80a174275d9d20bd23728f6d9b5f5b | test/buster.js | test/buster.js | exports["Buster terminal tests"] = {
environment: "node",
tests: ["test/**/*.js"]
};
| exports["Buster terminal tests"] = {
environment: "node",
tests: ["**/*.js"]
};
| Update configuration file according to new API | Update configuration file according to new API
| JavaScript | bsd-3-clause | busterjs/ansi-grid,busterjs/ansi-colorizer | ---
+++
@@ -1,4 +1,4 @@
exports["Buster terminal tests"] = {
environment: "node",
- tests: ["test/**/*.js"]
+ tests: ["**/*.js"]
}; |
e3859a6937aa4848c9940f7e6bbecfa35bd845bc | src/cli.js | src/cli.js | #!/usr/bin/env node
var _ = require('lodash')
var yargs = require('yargs')
var installer = require('./installer')
var pkg = require('../package.json')
var argv = yargs
.version(pkg.version)
.usage(pkg.description + '\n\nUsage: $0 --src <inputdir> --dest <outputdir>')
.option('src', {
describe: 'Directory t... | #!/usr/bin/env node
var _ = require('lodash')
var yargs = require('yargs')
var installer = require('./installer')
var pkg = require('../package.json')
var argv = yargs
.version(pkg.version)
.usage(pkg.description + '\n\nUsage: $0 --src <inputdir> --dest <outputdir>')
.option('src', {
describe: 'Directory t... | Use promise installer when using CLI | Use promise installer when using CLI
| JavaScript | mit | unindented/electron-installer-windows,unindented/electron-installer-windows | ---
+++
@@ -29,11 +29,10 @@
console.log('Creating package (this may take a while)')
var options = _.omit(argv, ['$0', '_', 'version'])
-installer(options, function (err) {
- if (err) {
+
+installer(options)
+ .then(() => console.log(`Successfully created package at ${argv.dest}`))
+ .catch(err => {
consol... |
a7c81ff7bb40623991cbec24777f7f2fae31a2d8 | plugins/async-await.js | plugins/async-await.js | module.exports = function (babel) {
var t = babel.types;
return {
visitor: {
Function: function (path) {
var node = path.node;
if (! node.async) {
return;
}
node.async = false;
node.body = t.blockStatement([
t.expressionStatement(t.stringLiter... | "use strict";
module.exports = function (babel) {
const t = babel.types;
return {
visitor: {
Function: {
exit: function (path) {
const node = path.node;
if (! node.async) {
return;
}
// The original function becomes a non-async function that
... | Enable native async/await in Node 8. | Enable native async/await in Node 8.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | ---
+++
@@ -1,41 +1,64 @@
+"use strict";
+
module.exports = function (babel) {
- var t = babel.types;
+ const t = babel.types;
return {
visitor: {
- Function: function (path) {
- var node = path.node;
- if (! node.async) {
+ Function: {
+ exit: function (path) {
+ ... |
abd2538246f0e1f38a110efa84d973dfa6118b86 | lib/collections/checkID.js | lib/collections/checkID.js | Meteor.methods({
checkHKID: function (hkid) {
var hkidPat = /^([A-Z]{1,2})([0-9]{6})([A0-9])$/;
var matchArray = hkid.match(hkidPat);
if(matchArray == null){throw new Meteor.Error('invalid', 'The HKID entered is invalid')} else {
var checkSum = 0;
var charPart = match... | Meteor.methods({
checkHKID: function (hkid) {
var hkidPat = /^([A-Z]{1,2})([0-9]{6})([A0-9])$/; // HKID format = 1 or 2 letters followed by 6 numbers and 1 checksum digit.
var matchArray = hkid.match(hkidPat);
if(matchArray == null){idError()}
var checkSum = 0;
var charPart =... | Clean up HKID verification code | Clean up HKID verification code
| JavaScript | agpl-3.0 | gazhayes/Popvote-HK,gazhayes/Popvote-HK | ---
+++
@@ -1,27 +1,30 @@
Meteor.methods({
checkHKID: function (hkid) {
- var hkidPat = /^([A-Z]{1,2})([0-9]{6})([A0-9])$/;
+ var hkidPat = /^([A-Z]{1,2})([0-9]{6})([A0-9])$/; // HKID format = 1 or 2 letters followed by 6 numbers and 1 checksum digit.
var matchArray = hkid.match(hkidPat);... |
af64cda5c55b48be439bce1457016248a28d2d82 | Gruntfile.js | Gruntfile.js | /*jshint camelcase:false */
module.exports = function (grunt) {
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
release: {
options: {
bump: true, //default: true
file: 'package.json', //default: package.json
add: true, ... | /*jshint camelcase:false */
module.exports = function (grunt) {
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
release: {
options: {
bump: true, //default: true
file: 'package.json', //default: package.json
add: true, ... | Create unit watcher grunt task | Create unit watcher grunt task
| JavaScript | mit | thanpolas/kansas-metrics | ---
+++
@@ -35,6 +35,13 @@
],
tasks: ['mochaTest:spec'],
},
+ unit: {
+ files: [
+ 'lib/**/*.js',
+ 'test/**/*.js',
+ ],
+ tasks: ['mochaTest:unit'],
+ },
},
mochaTest: {
options: {
@@ -42,6 +49,9 @@
},
spec: {
... |
c4cd0f33a0d83d83f32016088ada70bb4401458e | Gruntfile.js | Gruntfile.js | /*jshint node:true */
"use strict";
var fs = require("fs"),
async = require("async");
module.exports = function(grunt) {
var nwDir = grunt.option("nwdir") || "./bin/node-webkit-v0.5.0-win-ia32/";
grunt.loadNpmTasks("grunt-contrib-compress");
grunt.loadNpmTasks("grunt-mkdir");
grunt.lo... | /*jshint node:true */
"use strict";
module.exports = function(grunt) {
var nwDir = grunt.option("nwdir") || "./bin/node-webkit-v0.5.1-win-ia32/";
grunt.loadNpmTasks("grunt-contrib-compress");
grunt.loadNpmTasks("grunt-mkdir");
grunt.loadNpmTasks("grunt-shell");
grunt.loadTasks("./bui... | Clean up & node-webkit version bump | Clean up & node-webkit version bump
| JavaScript | mit | tivac/falco,tivac/falco | ---
+++
@@ -1,12 +1,9 @@
/*jshint node:true */
"use strict";
-var fs = require("fs"),
- async = require("async");
-
module.exports = function(grunt) {
- var nwDir = grunt.option("nwdir") || "./bin/node-webkit-v0.5.0-win-ia32/";
+ var nwDir = grunt.option("nwdir") || "./bin/node-webkit-v0.5.1-wi... |
ef5f7fef4b715561983945604118bc27bb257d28 | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function(grunt) {
// Load all tasks
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pck: grunt.file.readJSON('package.json'),
clean: {
all: ['typebase.css']
},
watch: {
less: {
files: ['src/{,*/}*.less'],
tasks: ['less:dev']
... | 'use strict';
module.exports = function(grunt) {
// Load all tasks
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pck: grunt.file.readJSON('package.json'),
clean: {
all: ['typebase.css']
},
watch: {
less: {
files: ['src/{,*/}*.less'],
tasks: ['less:dev']
... | Add a grunt task to translipe stylus | Add a grunt task to translipe stylus
| JavaScript | mit | devinhunt/typebase.css,devinhunt/typebase.css,aoimedia/typebase.css,Calinou/typebase.css,Calinou/typebase.css,aoimedia/typebase.css | ---
+++
@@ -32,6 +32,14 @@
"typebase-sass.css": "src/typebase.sass"
}
}
+ },
+
+ stylus: {
+ dev: {
+ files: {
+ "typebase-stylus.css":"src/typebase.stylus"
+ }
+ }
}
});
|
c3fe78a28501479a475de075ebdb707821255e83 | karma.conf.js | karma.conf.js | module.exports = function(karma) {
const rollupConfig = require("./rollup.config")[0];
karma.set({
frameworks: ["mocha", "chai", "chai-dom", "sinon-chai"],
files: [
{ pattern: "src/**/!(cli|webpack).js", included: false },
"spec/**/*.spec.js"
],
preprocessors: {
"src/**/!(cli).j... | module.exports = function(karma) {
const rollupConfig = require("./rollup.config")[0];
karma.set({
frameworks: ["mocha", "chai", "chai-dom", "sinon-chai"],
files: [
{ pattern: "src/**/!(cli|webpack).js", included: false },
"spec/**/*.spec.js"
],
preprocessors: {
"src/**/!(cli|ta... | Fix Karma trying to compile files that should not be compiled | Fix Karma trying to compile files that should not be compiled
Perhaps we need another strategy here. Basically only 'frontend' files
need to be compiled.
| JavaScript | mit | kabisa/maji,kabisa/maji,kabisa/maji | ---
+++
@@ -10,7 +10,7 @@
],
preprocessors: {
- "src/**/!(cli).js": ["rollup"],
+ "src/**/!(cli|tasks|utils).js": ["rollup"],
"spec/**/*.spec.js": ["rollup"]
},
|
5e167fb98b87c1f21ef6787dda245560fbc786f6 | lib/config.js | lib/config.js | /**
* Configuration library
*
* On start-up:
* - load a configuration file
* - validate the configuration
* - populate configuration secrets from environment variables
*
* On configuration:
* - register authenticators
*/
'use strict';
module.exports = {
_safeGetEnvString: safeGetEnvString,
load,
popul... | 'use strict';
module.exports = {
_safeGetEnvString: safeGetEnvString,
load,
populateEnvironmentVariables,
};
/**
* Module dependencies.
*/
const { check, mapValuesDeep } = require('./utils');
const { flow } = require('lodash');
const read = require('read-data');
/**
* Assemble a configuration
*
* @return... | Remove old and incorrect workflow docs | Remove old and incorrect workflow docs
| JavaScript | mit | HiFaraz/identity-desk | ---
+++
@@ -1,15 +1,3 @@
-/**
- * Configuration library
- *
- * On start-up:
- * - load a configuration file
- * - validate the configuration
- * - populate configuration secrets from environment variables
- *
- * On configuration:
- * - register authenticators
- */
-
'use strict';
module.exports = { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.