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 |
|---|---|---|---|---|---|---|---|---|---|---|
1dd85270c63f069d6ef2e1e36213df1d148e5ff2 | tests/lib/randoport-test.js | tests/lib/randoport-test.js | "use strict";
const test = require('tape');
const randoPort = require('../../lib/randoport');
const _ = require('lodash');
test('empty object', t => {
t.plan(1);
const emptyObject = {};
const r = randoPort(emptyObject);
t.equal(typeof r.port, 'number');
});
test('object with other properties', t => {
t.... | "use strict";
const test = require('tape');
const randoPort = require('../../lib/randoport');
const _ = require('lodash');
test('empty object', t => {
t.plan(1);
const emptyObject = {};
const r = randoPort(emptyObject);
t.equal(typeof r.port, 'number');
});
test('object with other properties', t => {
t.... | Test against testting as default ember port. | Test against testting as default ember port.
| JavaScript | mit | ryanlabouve/ember-cli-randoport,ryanlabouve/ember-cli-randoport | ---
+++
@@ -37,15 +37,17 @@
t.notEqual(o, randoPort(o));
});
-test('object with existing port', t => {
- t.plan(5000);
+test('object with existing port or blacklisted port', t => {
+ t.plan(10000);
let i = 0;
for(i; i < 5000; i +=1) {
const o = {
"port": _.random(4000, 4999)
};
- t... |
b6a901df37b79b9d3342380b1b7d99f82009df77 | gradient-scanner.js | gradient-scanner.js | /*
* Copyright (c) 2011 Kevin Decker (http://www.incaseofstairs.com/)
* See LICENSE for license information
*/
$(document).ready(function() {
var canvas = document.getElementById("imageDisplay"),
linePreview = document.getElementById("linePreview"),
context = canvas.getContext("2d");
var dra... | /*
* Copyright (c) 2011 Kevin Decker (http://www.incaseofstairs.com/)
* See LICENSE for license information
*/
$(document).ready(function() {
var canvas = document.getElementById("imageDisplay"),
linePreview = document.getElementById("linePreview"),
context = canvas.getContext("2d");
var dra... | Store the line data that is collected while dragging. | Store the line data that is collected while dragging. | JavaScript | bsd-3-clause | kpdecker/gradient-scanner,leonardohipolito/gradient-scanner,leonardohipolito/gradient-scanner | ---
+++
@@ -7,17 +7,22 @@
linePreview = document.getElementById("linePreview"),
context = canvas.getContext("2d");
- var dragStart, dragEnd;
+ var dragStart, dragEnd, imageData;
+
$(canvas).mousedown(function(event) {
dragStart = {x: event.offsetX, y: event.offsetY};
}).mo... |
c5d16b8a771a186d6bfabe536636b7425cad8fc8 | js/main.js | js/main.js | document.getElementById('generate').onclick = genPassword;
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function genPassword() {
var passLength = document.getElementById('length').value;
var pass="";
for (i = 0; i < passLength; i++) {
var a = []... | document.getElementById('generate').onclick = genPassword;
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function genPassword() {
var pass = "";
for (i = 0; i < document.getElementById('length').value; i++) {
var a = [];
if (document.getElem... | Remove console log and rework vars. | Remove console log and rework vars.
| JavaScript | mit | Carlgo11/password,Carlgo11/password | ---
+++
@@ -5,9 +5,8 @@
}
function genPassword() {
- var passLength = document.getElementById('length').value;
- var pass="";
- for (i = 0; i < passLength; i++) {
+ var pass = "";
+ for (i = 0; i < document.getElementById('length').value; i++) {
var a = [];
if (document.getEleme... |
d11f5f7a893051771fcee1d84fe4b4a1d79a296b | gulp/core/templates/browser-sync-snippet.js | gulp/core/templates/browser-sync-snippet.js | module.exports = [
'\n\n\n',
'/**',
' * DEVELOPMENT MODE ONLY',
' *',
' * Browser-sync script loader',
' * to enable script/style injection',
' *',
' * Run "gulp build" to generate the theme',
' * for production before deploying!',
' *',
' */',
'add_action( \'wp_head\', function () { ?>',
'\t<script type="... | var bsConfig = require('../config/browser-sync');
var port = bsConfig.port || 3000;
module.exports = [
'\n\n\n',
'/**',
' * DEVELOPMENT MODE ONLY',
' *',
' * Browser-sync script loader',
' * to enable script/style injection',
' *',
' * Run "gulp build" to generate the theme',
' * for production before deployi... | Allow bs snippet to read the port from config | Allow bs snippet to read the port from config | JavaScript | mit | tylershuster/wp-theme-starter,tylershuster/wp-theme-starter | ---
+++
@@ -1,3 +1,6 @@
+var bsConfig = require('../config/browser-sync');
+var port = bsConfig.port || 3000;
+
module.exports = [
'\n\n\n',
'/**',
@@ -12,7 +15,7 @@
' */',
'add_action( \'wp_head\', function () { ?>',
'\t<script type="text/javascript" id="__bs_script__">//<![CDATA[',
- '\t\tdocument.write(... |
779efe4ae9a6af8bf0ef8280e2e3968ed18f51f3 | public/js/app.js | public/js/app.js | var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
);
}
});
React.render(
<CommentBox />,
document.getElementById('content')
);
| /*
CommentBox
*/
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
<h1>Comments</h1>
<CommentList />
<CommentForm />
</div>
);
}
});
/*
CommentList
*/
var CommentList = React.createClass({
render: function() {
r... | Build CommentList and CommentForm components | Build CommentList and CommentForm components
| JavaScript | mit | thinkswan/react-comments,thinkswan/react-comments | ---
+++
@@ -1,13 +1,51 @@
+/*
+ CommentBox
+ */
+
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
- Hello, world! I am a CommentBox.
+ <h1>Comments</h1>
+ <CommentList />
+ <CommentForm />
</div>
);
}
});
+/... |
9e1cf07dba6e93f0e397a0c6005b38867fb0c569 | lib/user-support-helper.js | lib/user-support-helper.js | 'use babel';
let InteractiveConfigurationPanel = null;
export default {
initialize() {
if (InteractiveConfigurationPanel !== null) return ;
InteractiveConfigurationPanel = require('./interactive-configuration-panel');
this.configurationPanel = new InteractiveConfigurationPanel();
},
activate(state... | 'use babel';
let InteractiveConfigurationPanel = null;
let RandomTipPanel = null;
export default {
tips: [],
initializeInteractiveConfiguration() {
if (InteractiveConfigurationPanel !== null) return ;
InteractiveConfigurationPanel = require('./interactive-configuration-panel');
this.configurationPan... | Enable other packages to use random tips feature | Enable other packages to use random tips feature
ref #6
| JavaScript | mit | HiroakiMikami/atom-user-support-helper | ---
+++
@@ -1,13 +1,20 @@
'use babel';
let InteractiveConfigurationPanel = null;
+let RandomTipPanel = null;
export default {
- initialize() {
+ tips: [],
+
+ initializeInteractiveConfiguration() {
if (InteractiveConfigurationPanel !== null) return ;
InteractiveConfigurationPanel = require('./in... |
2791f5415e74395067d5251991c7b347386a6aab | project/frontend/src/components/HeaderBar/HeaderBar.js | project/frontend/src/components/HeaderBar/HeaderBar.js | import React from "react"
import classes from "./HeaderBar.module.css"
import Logo from "../../assets/sGonksLogo.png"
import { Link, NavLink } from "react-router-dom"
import LinkButton from "../UI/LinkButton/LinkButton"
import LoginButtonSet from "../UI/LoginButtonSet/LoginButtonSet";
const HeaderBar = (props) => {
... | import React from "react"
import classes from "./HeaderBar.module.css"
import Logo from "../../assets/sGonksLogo.png"
import { Link, NavLink } from "react-router-dom"
import LinkButton from "../UI/LinkButton/LinkButton"
import LoginButtonSet from "../UI/LoginButtonSet/LoginButtonSet";
const HeaderBar = (props) => {
... | Add key to list to optimise rendering | Add key to list to optimise rendering
| JavaScript | apache-2.0 | googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks | ---
+++
@@ -7,9 +7,9 @@
const HeaderBar = (props) => {
let innerNavLinks = [
- { linkTo: "/", display: "My sGonks" },
- { linkTo: "/", display: "Competition" },
- { linkTo: "/", display: "Marketplace" },
+ { linkTo: "/", display: "My sGonks", key: "mysgonks"},
+ { linkTo: "/", display: "Competiti... |
b89730069ce4a894305f37d19dbf88de486b4bea | lib/dom.js | lib/dom.js | var $ = require('jquery');
module.exports = {
$doc: $(document),
setupDom: function () {
this.$el = $(this.element);
this.$el.addClass(this.options.classes.originalSelect);
// Setup wrapper
this.$wrapper = $('<div />', {
'class': this.options.classes.wrapper
});
// Setup select
this.$select = ... | var $ = require('jquery');
module.exports = {
$doc: $(document),
setupDom: function () {
this.$el = $(this.element);
this.$el.addClass(this.options.classes.originalSelect);
// Setup wrapper
this.$wrapper = $('<div />', {
'class': this.options.classes.wrapper
});
// Setup select
this.$select = ... | Add button type to select | Add button type to select
| JavaScript | mit | niksy/kist-selectdown,niksy/kist-selectdown | ---
+++
@@ -17,6 +17,7 @@
// Setup select
this.$select = $('<button />', {
+ type: 'button',
'class': this.options.classes.select
});
|
8516e9394955de86c7e46bc39a94c0afe50ab258 | mac/filetypes/open_MMSD.js | mac/filetypes/open_MMSD.js | define(['itemObjectModel'], function(itemOM) {
'use strict';
function open(item) {
function onSubitem(subitem) {
switch(subitem.dataset.resourceType) {
case 'STR ':
subitem.getDataObject()
.then(function(names) {
names = names.split(/;/g);
});... | define(['itemObjectModel'], function(itemOM) {
'use strict';
function open(item) {
function onSubitem(subitem) {
switch(subitem.dataset.resourceType) {
case 'STR ':
subitem.getDataObject()
.then(function(names) {
names = names.split(/;/g);
f... | Move named item loop to the right scope | Move named item loop to the right scope | JavaScript | mit | radishengine/drowsy,radishengine/drowsy | ---
+++
@@ -10,11 +10,11 @@
subitem.getDataObject()
.then(function(names) {
names = names.split(/;/g);
+ for (var i = 0; i < names.length; i++) {
+ var namedItem = itemOM.createItem(names[i]);
+ item.addItem(namedItem);
+ }... |
16145e3e2d5d8599201187638181802c4c503be5 | app/http/resources/protected/appointment-items.js | app/http/resources/protected/appointment-items.js | // Module dependencies.
var express = require('express');
var router = express.Router();
var api = {};
// ALL
api.appointmentItems = function(req) {
return req.store.recordCollection('AppointmentItem');
};
// GET
api.appointmentItem = function(req) {
return req.store.recordItemById('AppointmentItem', req.params.i... | // Module dependencies.
var express = require('express');
var router = express.Router();
var api = {};
// ALL
api.appointmentItems = function(req) {
return req.store.recordCollection('AppointmentItem', {include: ['service']});
};
// GET
api.appointmentItem = function(req) {
return req.store.recordItemById('Appoin... | Load service w/ apt items | Load service w/ apt items
| JavaScript | mit | pixiestix826/schedule-me-api,pixiestix826/schedule-me-api | ---
+++
@@ -5,17 +5,18 @@
// ALL
api.appointmentItems = function(req) {
- return req.store.recordCollection('AppointmentItem');
+ return req.store.recordCollection('AppointmentItem', {include: ['service']});
};
// GET
api.appointmentItem = function(req) {
- return req.store.recordItemById('AppointmentItem... |
22df5bce43549e73744220fb1ef40f1d0f7b00ff | corehq/apps/toggle_ui/static/toggle_ui/js/flags.js | corehq/apps/toggle_ui/static/toggle_ui/js/flags.js | hqDefine('toggle_ui/js/flags', [
'jquery',
'knockout',
'reports/js/config.dataTables.bootstrap',
'hqwebapp/js/components.ko', // select toggle widget
], function (
$,
ko,
datatablesConfig
) {
var dataTableElem = '.datatable';
var viewModel = {
tagFilter: ko.observable(null... | hqDefine('toggle_ui/js/flags', [
'jquery',
'knockout',
'reports/js/config.dataTables.bootstrap',
'hqwebapp/js/components.ko', // select toggle widget
], function (
$,
ko,
datatablesConfig
) {
var dataTableElem = '.datatable';
var viewModel = {
tagFilter: ko.observable(null... | Fix UI filters on Feature Flags page | Fix UI filters on Feature Flags page
| JavaScript | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | ---
+++
@@ -17,7 +17,7 @@
if (viewModel.tagFilter() === 'all') {
return true;
}
- var tag = aData[0].replace(/\n/g," ").replace(/<.*?>/g, "");
+ var tag = aData[0].replace(/\s+/g," ").replace(/<.*?>/g, "").replace(/^\d+ /, "");
if (viewMode... |
a0271b0d7df25e39e063ab435ffaff6cb2b75bde | lib/sqs.js | lib/sqs.js |
exports.init = init;
function init(genericAWSClient) {
return createSimpleQueueServiceClient;
function createSimpleQueueServiceClient(accessKeyId, secretAccessKey, options) {
options = options || {};
var client = genericAWSClient({
host: options.host || "sqs.us-east-1.amazonaws.com",
path: op... |
exports.init = init;
function init(genericAWSClient) {
return createSimpleQueueServiceClient;
function createSimpleQueueServiceClient(accessKeyId, secretAccessKey, options) {
options = options || {};
var client = genericAWSClient({
host: options.host || "sqs.us-east-1.amazonaws.com",
path: op... | Fix error with undeclared variable | Fix error with undeclared variable
Looks like a simple missprint for me | JavaScript | mit | mirkokiefer/aws-lib,livelycode/aws-lib,pnedunuri/aws-lib | ---
+++
@@ -17,7 +17,7 @@
});
return {
- client: aws,
+ client: client,
call: call
};
|
80b2f631edd3c5a62859b4df1da087e94ee13da5 | blueprints/ember-web-app/files/config/manifest.js | blueprints/ember-web-app/files/config/manifest.js | /*jshint node:true*/
'use strict';
module.exports = function(/* environment, appConfig */) {
return {
name: "<%= name %>",
short_name: "<%= name %>",
description: "",
start_url: "/",
display: "standalone",
background_color: "#fff",
theme_color: "#fff",
icons: [
]
};
}
| /*jshint node:true*/
'use strict';
module.exports = function(/* environment, appConfig */) {
// See https://github.com/san650/ember-web-app#documentation for a list of
// supported properties
return {
name: "<%= name %>",
short_name: "<%= name %>",
description: "",
start_url: "/",
display: "... | Add link to documentation in blueprint | Add link to documentation in blueprint
| JavaScript | mit | san650/ember-web-app,san650/ember-web-app | ---
+++
@@ -2,6 +2,9 @@
'use strict';
module.exports = function(/* environment, appConfig */) {
+ // See https://github.com/san650/ember-web-app#documentation for a list of
+ // supported properties
+
return {
name: "<%= name %>",
short_name: "<%= name %>", |
e92c57af03c2319b5e313faa8df9c5969a2c2164 | commands/builds/output.js | commands/builds/output.js | 'use strict';
let cli = require('heroku-cli-util');
let request = require('request');
module.exports = {
topic: 'builds',
command: 'output',
needsAuth: true,
needsApp: true,
description: 'show build output',
help: 'Show build output for a Heroku app',
variableArgs: true,
run: cli.command(showOutpu... | 'use strict';
let cli = require('heroku-cli-util');
let request = require('request');
module.exports = {
topic: 'builds',
command: 'output',
needsAuth: true,
needsApp: true,
description: 'show build output',
help: 'Show build output for a Heroku app',
args: [
{
name: 'id',
optional: ... | Leverage command line validation via @dickeyxxx | Leverage command line validation via @dickeyxxx
| JavaScript | isc | heroku/heroku-builds | ---
+++
@@ -10,17 +10,18 @@
needsApp: true,
description: 'show build output',
help: 'Show build output for a Heroku app',
- variableArgs: true,
+ args: [
+ {
+ name: 'id',
+ optional: false,
+ hidden: false
+ }
+ ],
run: cli.command(showOutput)
};
function showOutput(context, h... |
ab1b26745e10b897b8f556db35688b8fce61c47b | test/config.js | test/config.js | import mix from '../src/index';
import test from 'ava';
test('that it can merge config', t => {
Config.merge({
versioning: true,
foo: 'bar'
});
t.is('bar', Config.foo);
t.true(Config.versioning);
});
test('that it intelligently builds the Babel config', t => {
// Given the user h... | import mix from '../src/index';
import test from 'ava';
test('that it can merge config', t => {
Config.merge({
versioning: true,
foo: 'bar'
});
t.is('bar', Config.foo);
t.true(Config.versioning);
});
test('that it intelligently builds the Babel config', t => {
// Given the user h... | Fix failing test by adapting it to new conditions | Fix failing test by adapting it to new conditions
The test failed, because there were two entries
'transform-object-rest-spread' in the options.plugins array.
This has most likely to do with src/config.js which declares
'transform-object-rest-spread' as a default plugin.
| JavaScript | mit | JeffreyWay/laravel-mix | ---
+++
@@ -15,14 +15,14 @@
test('that it intelligently builds the Babel config', t => {
// Given the user has a custom .babelrc file...
new File('.babelrc').write({
- 'plugins': ['transform-object-rest-spread']
+ 'plugins': ['arbitrary-plugin']
});
// And we construct the Babel c... |
04fe6402efb63c476ce24b86bab60b1a1e218903 | rollup.config.js | rollup.config.js | import babel from 'rollup-plugin-babel'
import resolve from '@rollup/plugin-node-resolve'
import json from '@rollup/plugin-json'
import autoExternal from 'rollup-plugin-auto-external'
import pkg from './package.json'
import fs from 'fs'
import gitrev from 'git-rev-promises'
Promise.all([
gitrev.long(),
gitrev.bran... | /* eslint-disable no-console */
import json from '@rollup/plugin-json'
import resolve from '@rollup/plugin-node-resolve'
import fs from 'fs'
import gitrev from 'git-rev-promises'
import autoExternal from 'rollup-plugin-auto-external'
import babel from 'rollup-plugin-babel'
import pkg from './package.json'
Promise.all(... | Fix issue caused by Rollup.js having a nervous breakdown if an import from a dependency includes a forward flash. | Fix issue caused by Rollup.js having a nervous breakdown if an import from a dependency includes a forward flash.
| JavaScript | bsd-3-clause | FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com | ---
+++
@@ -1,23 +1,24 @@
-import babel from 'rollup-plugin-babel'
+/* eslint-disable no-console */
+import json from '@rollup/plugin-json'
import resolve from '@rollup/plugin-node-resolve'
-import json from '@rollup/plugin-json'
-import autoExternal from 'rollup-plugin-auto-external'
-import pkg from './package.jso... |
1a4c15d6ebbb3034624cea353cc177d8e029f70b | package.js | package.js | Package.describe({
name: 'klaussner:svelte',
version: '0.0.1',
summary: 'Use the magical disappearing UI framework in Meteor',
git: 'https://github.com/klaussner/meteor-svelte.git'
});
Package.registerBuildPlugin({
name: 'svelte-compiler',
use: ['caching-compiler@1.1.9', 'babel-compiler@6.13.0', 'ecmascrip... | Package.describe({
name: 'klaussner:svelte',
version: '1.0.0',
summary: 'Use the magical disappearing UI framework in Meteor',
git: 'https://github.com/klaussner/meteor-svelte.git'
});
Package.registerBuildPlugin({
name: 'svelte-compiler',
use: ['caching-compiler@1.1.9', 'babel-compiler@6.13.0', 'ecmascrip... | Bump version to 1.0.0 for first release | Bump version to 1.0.0 for first release
| JavaScript | mit | meteor-svelte/meteor-svelte | ---
+++
@@ -1,6 +1,6 @@
Package.describe({
name: 'klaussner:svelte',
- version: '0.0.1',
+ version: '1.0.0',
summary: 'Use the magical disappearing UI framework in Meteor',
git: 'https://github.com/klaussner/meteor-svelte.git'
}); |
bdbdb92fddc8b893721e6cccfee55d54dfad284d | package.js | package.js | Package.describe({
name: 'extremeandy:es6-promisify',
version: '0.1.2',
summary: 'es6-promisify for Meteor',
git: 'https://github.com/extremeandy/meteor-es6-promisify',
documentation: 'README.md'
});
Package.onUse(function(api) {
api.versionsFrom('1.2.0.1');
api.use('ecmascript');
api.use('cosmos:brows... | Package.describe({
name: 'extremeandy:es6-promisify',
version: '0.1.3',
summary: 'es6-promisify for Meteor',
git: 'https://github.com/extremeandy/meteor-es6-promisify',
documentation: 'README.md'
});
Package.onUse(function(api) {
api.versionsFrom('1.2.0.1');
api.use('ecmascript');
api.use('cosmos:brows... | Change version number to 0.1.3 | Change version number to 0.1.3
| JavaScript | mit | extremeandy/meteor-es6-promisify | ---
+++
@@ -1,6 +1,6 @@
Package.describe({
name: 'extremeandy:es6-promisify',
- version: '0.1.2',
+ version: '0.1.3',
summary: 'es6-promisify for Meteor',
git: 'https://github.com/extremeandy/meteor-es6-promisify',
documentation: 'README.md' |
33934113874f74b65232045e7a5bb764aea85c00 | test/string.js | test/string.js | describe('String#trim', function () {
it('should be defined', function () {
assert('Some text').should(respondTo, 'trim');
});
it('should remove spaces at end and start of string', function () {
var strings = ['Some text', ' Some text', 'Some text ', ' Some text '];
for (var ... | describe('String.prototype.trim ( )', function () {
it('should be defined', function () {
assert('Some text').should(respondTo, 'trim');
});
it('should remove whitespace from both ends of the string', function () {
var strings = ['Some text', ' Some text', 'Some text ', ' Some text ']... | Fix describtion of String.prototype.trim examples | Fix describtion of String.prototype.trim examples
| JavaScript | mit | shuaiyunzhang/es5-shim,shuaiyunzhang/es5-shim,lewisje/es5-shim,fashionsun/es5-shim,ljharb/es5-shim,imsun/es5-shim,goodbedford/es5-shim,lewisje/es5-shim,sky-uk/es5-shim,meteor/es5-shim,sky-uk/es5-shim,ljharb/es5-shim,meteor/es5-shim,es-shims/es5-shim,9040044/es5-shim,matthewjh/es5-shim,es-shims/es5-shim,9040044/es5-shim... | ---
+++
@@ -1,10 +1,10 @@
-describe('String#trim', function () {
+describe('String.prototype.trim ( )', function () {
it('should be defined', function () {
assert('Some text').should(respondTo, 'trim');
});
- it('should remove spaces at end and start of string', function () {
+ it('should... |
4d6d8d46257be9b507aa5fd739b0c9a8332bbc1f | rollup.config.js | rollup.config.js | import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import pug from 'rollup-plugin-pug';
import babel from 'rollup-plugin-babel';
export default {
entry: 'src/index.js',
format: 'umd',
moduleName: 'XpClient',
plugins: [resolve(), commonjs(), pug(), babel({
exclu... | import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import pug from 'rollup-plugin-pug';
import babel from 'rollup-plugin-babel';
export default {
entry: 'src/index.js',
format: 'umd',
moduleName: 'XpClient',
plugins: [resolve(), commonjs(), pug(), babel({
exclu... | Add spin to rollup's externals. | Add spin to rollup's externals.
| JavaScript | mit | QuentinRoy/lightmill-js,QuentinRoy/lightmill-js | ---
+++
@@ -10,11 +10,12 @@
plugins: [resolve(), commonjs(), pug(), babel({
exclude: 'node_modules/**' // only transpile our source code
})],
- external: ['unfetch', 'javascript-state-machine'],
+ external: ['unfetch', 'javascript-state-machine', 'spin'],
dest: 'lib/xpclient.js',
sourceMap: true,
... |
a1245fe762cefd1b0e144624fe7e1c54a8c39438 | Code/src/src/components/LetterComponent.js | Code/src/src/components/LetterComponent.js | import React, { Component } from 'react';
class Letters extends Component {
constructor(props) {
super(props);
this.state = { type: props.statement };
}
render() {
return (
<div className="userInput">
<button className="entry row1 col1">a</button>
<button className="entry row... | import React, { Component } from 'react';
class Letters extends Component {
constructor(props) {
super(props);
this.state = { type: props.statement };
this.createButtons = this.createButtons.bind(this);
}
createButtons() {
let buttons = [];
for (let i = 0; i < 26; i++) {
var rowNum = ... | Refactor creating buttons for letters | Refactor creating buttons for letters
| JavaScript | agpl-3.0 | neurotechuoft/MindType,neurotechuoft/MindType,neurotechuoft/MindType,neurotechuoft/MindType,neurotechuoft/MindType,neurotechuoft/MindType | ---
+++
@@ -5,45 +5,29 @@
constructor(props) {
super(props);
this.state = { type: props.statement };
+ this.createButtons = this.createButtons.bind(this);
+ }
+
+ createButtons() {
+ let buttons = [];
+ for (let i = 0; i < 26; i++) {
+ var rowNum = i / 6 + 1;
+ var colNum = i % 6 + 1... |
fc83f0e13b2cc7bfefad70b127875fff00b24ef1 | cd/src/pipeline-events-handler/etc/execution-emoji.js | cd/src/pipeline-events-handler/etc/execution-emoji.js | // These should be easily identifiable and both visually and conceptually unique
// Don't include symbols that could be misconstrued to have some actual meaning
// (like a warning sign)
const emojis =
'🦊🐸🦉🦄🐙🐳🌵🍀🍁🍄🌍⭐️🔥🌈🍎🥯🌽🥞🥨🍕🌮🍦🎂🍿🏈🛼🏆🎧🎺🎲🚚✈️🚀⛵️⛺️📻💰💎🧲🔭🪣🧸';
module.exports = {
emoji(e... | // These should be easily identifiable and both visually and conceptually unique
// Don't include symbols that could be misconstrued to have some actual meaning
// (like a warning sign)
const emojis = [
'🦊',
'🐸',
'🦉',
'🦄',
'🐙',
'🐳',
'🌵',
'🍀',
'🍁',
'🍄',
'🌍',
'⭐️',
'🔥',
'🌈',
'�... | Fix emoji byte length issue | Fix emoji byte length issue
| JavaScript | mit | PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure | ---
+++
@@ -1,8 +1,51 @@
// These should be easily identifiable and both visually and conceptually unique
// Don't include symbols that could be misconstrued to have some actual meaning
// (like a warning sign)
-const emojis =
- '🦊🐸🦉🦄🐙🐳🌵🍀🍁🍄🌍⭐️🔥🌈🍎🥯🌽🥞🥨🍕🌮🍦🎂🍿🏈🛼🏆🎧🎺🎲🚚✈️🚀⛵️⛺️📻💰💎🧲🔭🪣🧸... |
f81ecc0d6d05b9e10d80da70a193cf9601b5f069 | script/stageprompt.js | script/stageprompt.js | var GOVUK = GOVUK || {};
GOVUK.performance = GOVUK.performance || {};
GOVUK.performance.stageprompt = (function () {
var setup, setupForGoogleAnalytics, splitAction;
splitAction = function (action) {
var parts = action.split(':');
if (parts.length <= 3) return parts;
return [parts.shift(), parts.shi... | /* Stageprompt 2.0.1
* =================
*
* What is it? Stageprompt is code for wiring up an analytics service to a user journey
* How does it work? The user journey is described by adding data-journey attributes to tags in the html
* the attribute values are then parsed and use to fire a c... | Add documentation comment at top of file | Add documentation comment at top of file
| JavaScript | mit | alphagov/stageprompt,alphagov/stageprompt | ---
+++
@@ -1,3 +1,16 @@
+/* Stageprompt 2.0.1
+* =================
+*
+* What is it? Stageprompt is code for wiring up an analytics service to a user journey
+* How does it work? The user journey is described by adding data-journey attributes to tags in the html
+* the attribute values ar... |
c92368448bc56cff32f747927c315eeaa32706fb | scripts/ariaCurrent.js | scripts/ariaCurrent.js | function setAriaCurrent() {
var title = document.title;
if title== "Comunidad hispanohablante de NVDA " {
var id = "inicio"
}
document.getElementById(id).removeAttribute("accesskey");
document.getElementById(id).setAttribute("aria-current", "page");
}
setAriaCurrent();
| function setAriaCurrent() {
var title = document.title.trim();
if title === "Comunidad hispanohablante de NVDA") {
document.getElementById("inicio".setAttribute("aria-current", "page");
} else if title.includes("- Ayuda y descarga") {
document.getElementById("ayuda").setAttribute("aria-current", "page")
}
}
se... | Use trim method in javascript | Use trim method in javascript
| JavaScript | mit | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | ---
+++
@@ -1,10 +1,10 @@
function setAriaCurrent() {
- var title = document.title;
- if title== "Comunidad hispanohablante de NVDA " {
- var id = "inicio"
+ var title = document.title.trim();
+ if title === "Comunidad hispanohablante de NVDA") {
+ document.getElementById("inicio".setAttribute("aria-current", "pag... |
1daa9dd1c6d29178fcbbdbfdb4e1e024b9fb6428 | lib/odd-even-sort.js | lib/odd-even-sort.js | /**
* @license
* js-sorting <http://github.com/Tyriar/js-sorting>
* Copyright 2014-2015 Daniel Imms <http://www.growingwiththeweb.com>
* Released under the MIT license <http://github.com/Tyriar/js-sorting/blob/master/LICENSE>
*/
'use strict';
var defaultCompare = require('./common/default-compare');
var defaultSw... | /**
* @license
* js-sorting <http://github.com/Tyriar/js-sorting>
* Copyright 2014-2015 Daniel Imms <http://www.growingwiththeweb.com>
* Released under the MIT license <http://github.com/Tyriar/js-sorting/blob/master/LICENSE>
*/
'use strict';
var defaultCompare = require('./common/default-compare');
var defaultSw... | Refactor odd even sort to reduce duplication | Refactor odd even sort to reduce duplication
| JavaScript | mit | Tyriar/js-sorting | ---
+++
@@ -9,27 +9,23 @@
var defaultCompare = require('./common/default-compare');
var defaultSwap = require('./common/default-swap');
-function sort(array, compare, swap) {
- var i;
- var sorted = false;
-
- while(!sorted) {
- sorted = true;
- for (i = 1; i < array.length - 1; i += 2) {
- if (comp... |
b68c4d6afe2b6d081a6afe47f3a3fd97db2b2f22 | lib/uglify-worker.js | lib/uglify-worker.js | var uglify;
try {
uglify = require('uglify-js');
} catch (err) { /* NOP */ }
process.on('message', function(msg) {
var outputFile = msg.output,
data = msg.data,
sourceMap = msg.sourceMap,
warnings = [];
try {
var warnFunction;
try {
warnFunction = uglify.AST_Node.warn_function;
... | var uglify;
try {
uglify = require('uglify-js');
} catch (err) { /* NOP */ }
process.on('message', function(msg) {
var outputFile = msg.output,
data = msg.data,
sourceMap = msg.sourceMap,
warnings = [];
try {
var warnFunction;
try {
warnFunction = uglify.AST_Node.warn_function;
... | Improve error logging in uglify worker | Improve error logging in uglify worker
| JavaScript | mit | walmartlabs/lumbar | ---
+++
@@ -46,6 +46,6 @@
uglify.AST_Node.warn_function = warnFunction;
}
} catch (err) {
- process.send({err: err.toString()});
+ process.send({err: err.stack || err.msg || err.toString()});
}
}); |
62319bbf125884872143583d2ff79d317936b7e4 | scripts/index.js | scripts/index.js | /** @jsx React.DOM */
'use strict';
var React = require('react'),
App = require('./App');
React.renderComponent(<App />, document.body); | /** @jsx React.DOM */
'use strict';
var React = require('react'),
App = require('./App');
if ('production' !== process.env.NODE_ENV) {
// Enable React devtools
window['React'] = React;
}
React.renderComponent(<App />, document.body);
| Add code to enable React devtools | Add code to enable React devtools | JavaScript | mit | msikma/react-hot-boilerplate,amysimmons/mememe,mikeastock/LonelyKnight,JulianSamarjiev/redux-friendlist,jonboerner/flipturn,nataly87s/follow-mouse,fatrossy/color_palette,gonardfreeman/moviesDB,prathamesh-sonpatki/openlib-react,gordon2012/friendlist,saitodisse/react-for-idiots,OlehHappy/oleh_011-DnD_React_Native_Box,cha... | ---
+++
@@ -3,5 +3,10 @@
var React = require('react'),
App = require('./App');
+
+if ('production' !== process.env.NODE_ENV) {
+ // Enable React devtools
+ window['React'] = React;
+}
React.renderComponent(<App />, document.body); |
a182de7f1e534ec62694222c9acc71cad9de7ad2 | server/config.js | server/config.js | const config = {
nodeEnv: process.env.NODE_ENV,
webConcurrency: process.env.WEB_CONCURRENCY || 1,
port: process.env.PORT || 1337,
apiUrl: process.env.API_URL || 'http://localhost:3000',
authPort: process.env.AUTH_PORT || 3005,
appDomain: `app.${process.env.APP_DOMAIN}` || 'localhost',
timeout: 60000
}
mo... | const config = {
nodeEnv: process.env.NODE_ENV,
webConcurrency: process.env.WEB_CONCURRENCY || 1,
port: process.env.PORT || 1337,
apiUrl: process.env.API_URL || 'http://localhost:3000',
authPort: process.env.AUTH_PORT || 3005,
appDomain: process.env.APP_DOMAIN || 'localhost',
timeout: 60000
}
module.expo... | Fix app_domain env for build app | Fix app_domain env for build app
| JavaScript | agpl-3.0 | nossas/bonde-client,nossas/bonde-client,nossas/bonde-client | ---
+++
@@ -4,7 +4,7 @@
port: process.env.PORT || 1337,
apiUrl: process.env.API_URL || 'http://localhost:3000',
authPort: process.env.AUTH_PORT || 3005,
- appDomain: `app.${process.env.APP_DOMAIN}` || 'localhost',
+ appDomain: process.env.APP_DOMAIN || 'localhost',
timeout: 60000
}
|
99db69c79b3fe7e4ab659c8cd1e67787d538162b | package.js | package.js | Package.describe({
name: 'metemq:metemq',
version: '0.3.2',
// Brief, one-line summary of the package.
summary: 'MeteMQ',
// URL to the Git repository containing the source code for this package.
git: '',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting doc... | Package.describe({
name: 'metemq:metemq',
version: '0.3.3',
// Brief, one-line summary of the package.
summary: 'MeteMQ',
// URL to the Git repository containing the source code for this package.
git: '',
// By default, Meteor will default to using README.md for documentation.
// To avoid submitting doc... | Bump version to 0.3.3 & update mosca version to 2.1.0 | Bump version to 0.3.3 & update mosca version to 2.1.0
| JavaScript | mit | metemq/metemq,metemq/metemq | ---
+++
@@ -1,6 +1,6 @@
Package.describe({
name: 'metemq:metemq',
- version: '0.3.2',
+ version: '0.3.3',
// Brief, one-line summary of the package.
summary: 'MeteMQ',
// URL to the Git repository containing the source code for this package.
@@ -13,7 +13,7 @@
Npm.depends({
'mqtt': '1.12.0',
'mqt... |
f81347d9fb7f1ea6c75aaf17bc6f8d5bf5851236 | package.js | package.js | Package.describe({
summary: "A meteorite package that makes building dynamic two way forms easy",
version: '0.2.1',
name: "joshowens:simple-form",
git: 'https://github.com/MeteorClub/simple-form'
});
Package.onUse(function(api) {
api.versionsFrom("METEOR@0.9.0");
api.use(['ui', 'templating', 'underscore', ... | Package.describe({
summary: "A meteorite package that makes building dynamic two way forms easy",
version: '0.2.2',
name: "joshowens:simple-form",
git: 'https://github.com/MeteorClub/simple-form'
});
Package.onUse(function(api) {
api.versionsFrom("METEOR@0.9.0");
api.use(['ui', 'templating', 'underscore', ... | Add uploaded as a dep. | Add uploaded as a dep.
| JavaScript | mit | meteorclub/simple-form | ---
+++
@@ -1,13 +1,13 @@
Package.describe({
summary: "A meteorite package that makes building dynamic two way forms easy",
- version: '0.2.1',
+ version: '0.2.2',
name: "joshowens:simple-form",
git: 'https://github.com/MeteorClub/simple-form'
});
Package.onUse(function(api) {
api.versionsFrom("MET... |
3e4891edc2982234affe74f36e1b16062b8a72d5 | packages/mjml-cli/src/commands/outputToConsole.js | packages/mjml-cli/src/commands/outputToConsole.js | export default ({ compiled: { html }, file }) =>
new Promise(resolve => {
// eslint-disable-next-line
console.log(`<!-- FILE: ${file} -->\n${html}`)
resolve()
})
| export default ({ compiled: { html }, file }) =>
new Promise(resolve => {
process.stdout.write(`<!-- FILE: ${file} -->\n${html}\n`, resolve);
})
| Use `process.stdout.write()` instead of `console.log()` so output is flushed. | Use `process.stdout.write()` instead of `console.log()` so output is flushed.
| JavaScript | mit | mjmlio/mjml | ---
+++
@@ -1,6 +1,4 @@
export default ({ compiled: { html }, file }) =>
new Promise(resolve => {
- // eslint-disable-next-line
- console.log(`<!-- FILE: ${file} -->\n${html}`)
- resolve()
+ process.stdout.write(`<!-- FILE: ${file} -->\n${html}\n`, resolve);
}) |
ebdcf420ff5ddbded791456f7e5f17f8bc328ea3 | src/app/router/handlers/ToggleSubredditSubscription.js | src/app/router/handlers/ToggleSubredditSubscription.js | import { BaseHandler, METHODS } from '@r/platform/router';
import * as subredditActions from 'app/actions/subreddits';
export default class ToggleSubredditSubscription extends BaseHandler {
async [METHODS.POST](dispatch) {
dispatch(subredditActions.toggleSubscription(this.bodyParams));
}
}
| import { BaseHandler, METHODS } from '@r/platform/router';
import * as subscriptionActions from 'app/actions/subscribedSubreddits';
export default class ToggleSubredditSubscription extends BaseHandler {
async [METHODS.POST](dispatch) {
dispatch(subscriptionActions.toggleSubscription(this.bodyParams));
}
}
| Fix subscription handler from refactor | Fix subscription handler from refactor
| JavaScript | mit | ajacksified/reddit-mobile,ajacksified/reddit-mobile,ajacksified/reddit-mobile,ajacksified/reddit-mobile | ---
+++
@@ -1,8 +1,8 @@
import { BaseHandler, METHODS } from '@r/platform/router';
-import * as subredditActions from 'app/actions/subreddits';
+import * as subscriptionActions from 'app/actions/subscribedSubreddits';
export default class ToggleSubredditSubscription extends BaseHandler {
async [METHODS.POST](d... |
ba4738a3246f53c944e84a37ce3ba2f5bc30f20c | www/discography/js/models/artist.js | www/discography/js/models/artist.js | Artist = (function(){
// Artist constructor. Given an object describing an artist, copy
// all of its local properties into `this'.
var Artist = function(record) {
};
Artist.prototype = {
// Create a new record if the `id' property is `undefined',
// otherwise update an existing record. Return a p... | Artist = (function(){
// Artist constructor. Given an object describing an artist, copy
// all of its local properties into `this'.
var Artist = function(record) {
};
Artist.prototype = {
// Create a new record if the `id' property is `undefined',
// otherwise update an existing record. Return a p... | Fix code after a bad rebase/merge | Fix code after a bad rebase/merge
| JavaScript | bsd-2-clause | rm-training/advanced-js,rm-training/advanced-js | ---
+++
@@ -25,6 +25,7 @@
// Should fetch all artists via Ajax. Return a promise that
// resolves to an array of Artist objects.
+ var fetchAll = function() {
};
// Public interface: |
e6acbd0c0e537061373cc8f877264681c5b9b476 | test/locales.js | test/locales.js | import test from "ava";
const fs = require("fs");
const path = require("path");
const localesPath = path.join(__dirname, "..", "locales");
fs.readdir(localesPath, (err, filenames) => {
if (err) throw err;
const filenameRegex = /^[a-z][a-z](_[A-Z]+)*\.json$/;
filenames.forEach(filename => {
test(`locale f... | import test from "ava";
const fs = require("fs");
const path = require("path");
const localesPath = path.join(__dirname, "..", "locales");
const filenameRegex = /^[a-z][a-z](_[A-Z]+)*\.json$/;
test("locale files are valid", t => {
const filenames = fs.readdirSync(localesPath);
filenames.forEach(filename => {
... | Make locale tests into one test | Make locale tests into one test
| JavaScript | apache-2.0 | z-------------/cumulonimbus,z-------------/cumulonimbus,z-------------/cumulonimbus | ---
+++
@@ -4,23 +4,23 @@
const path = require("path");
const localesPath = path.join(__dirname, "..", "locales");
-fs.readdir(localesPath, (err, filenames) => {
- if (err) throw err;
-
- const filenameRegex = /^[a-z][a-z](_[A-Z]+)*\.json$/;
+const filenameRegex = /^[a-z][a-z](_[A-Z]+)*\.json$/;
+
+test("loca... |
1d28b0b58b0dca8aeb81afc182a53686e09b211b | app/components/Footer/messages.js | app/components/Footer/messages.js | /*
* Footer Messages
*
* This contains all the text for the Footer component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.components.Footer.header',
defaultMessage: 'This is the Footer component !',
},
});
| /*
* Footer Messages
*
* This contains all the text for the Footer component.
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
header: {
id: 'app.components.Footer.header',
defaultMessage: 'made by Tim Arioto',
},
});
| Add name to footer message | Add name to footer message
| JavaScript | mit | tarioto/Portfolio,tarioto/Portfolio | ---
+++
@@ -8,6 +8,6 @@
export default defineMessages({
header: {
id: 'app.components.Footer.header',
- defaultMessage: 'This is the Footer component !',
+ defaultMessage: 'made by Tim Arioto',
},
}); |
d9cc135578fe736adb5fc3d407ae3ea94a76b066 | tests/router.js | tests/router.js | "use strict";
var Router = require("../router");
exports.testValidAcceptHeader = function (test) {
var results = Router.prototype._parseAcceptHeader("application/json");
test.deepEqual([{
"type": "application",
"subtype": "json",
"params": {}
}], results);
test.done();
};
| "use strict";
var Router = require("../router");
exports.testValidAcceptHeader = function (test) {
var results = Router.prototype._parseAcceptHeader("application/json");
test.deepEqual([{
"type": "application",
"subtype": "json",
"params": {}
}], results);
test.done();
};
exports.testValidAcceptHeaderWithP... | Add test for media type w/ params | Add test for media type w/ params
| JavaScript | isc | whymarrh/mattress | ---
+++
@@ -11,3 +11,16 @@
}], results);
test.done();
};
+
+exports.testValidAcceptHeaderWithParams = function (test) {
+ var results = Router.prototype._parseAcceptHeader("application/json;q=3;v=1");
+ test.deepEqual([{
+ "type": "application",
+ "subtype": "json",
+ "params": {
+ "q": "3",
+ "v": "1"
+ ... |
eb45903f169d27dc361488556a3b508ed98cbf86 | src/icon.js | src/icon.js | /**
* Simple component to display a font icon (i.e. glyphicon or fontawesome)
*/
const React = require('react');
const classNames = require('classnames');
class Icon extends React.Component {
render() {
const cx = classNames({
[this.props.type]: true,
[`${this.props.type}-${this.props.name}`]: true... | /**
* Simple component to display a font icon (i.e. glyphicon or fontawesome)
*/
const React = require('react');
const classNames = require('classnames');
class Icon extends React.Component {
render() {
const cx = classNames(
this.props.type,
`${this.props.type}-${this.props.name}`
);
retu... | Fix computed properties were causing some issues with duplicated data props | Fix computed properties were causing some issues with duplicated data props
| JavaScript | mit | Opstarts/opstarts-ui | ---
+++
@@ -6,10 +6,10 @@
class Icon extends React.Component {
render() {
- const cx = classNames({
- [this.props.type]: true,
- [`${this.props.type}-${this.props.name}`]: true
- });
+ const cx = classNames(
+ this.props.type,
+ `${this.props.type}-${this.props.name}`
+ );
... |
915030ff1fa7c525dee93488d8adcf76cc53dea1 | src/sync.js | src/sync.js | import { createTransform } from 'redux-persist';
import CryptoJSCore from 'crypto-js/core';
import AES from 'crypto-js/aes';
import { makeEncryptor, makeDecryptor } from './helpers';
const makeSyncEncryptor = secretKey =>
makeEncryptor(state => AES.encrypt(state, secretKey).toString());
const makeSyncDecryptor = (s... | import { createTransform } from 'redux-persist';
import CryptoJSCore from 'crypto-js/core';
import AES from 'crypto-js/aes';
import { makeEncryptor, makeDecryptor } from './helpers';
const makeSyncEncryptor = secretKey =>
makeEncryptor(state => AES.encrypt(state, secretKey).toString());
const makeSyncDecryptor = (s... | Use try/catch to handle cases where the decryption could fail | Use try/catch to handle cases where the decryption could fail
| JavaScript | mit | maxdeviant/redux-persist-transform-encrypt,maxdeviant/redux-persist-transform-encrypt | ---
+++
@@ -8,15 +8,16 @@
const makeSyncDecryptor = (secretKey, onError) =>
makeDecryptor(state => {
- const bytes = AES.decrypt(state, secretKey);
- const decryptedString = bytes.toString(CryptoJSCore.enc.Utf8);
- if (!decryptedString) {
+ try {
+ const bytes = AES.decrypt(state, secretKey);
+... |
4a658134c6d2e8ef5a4b7092dcf56a1ce602dcaf | app/assets/javascripts/student_profile/service_color.js | app/assets/javascripts/student_profile/service_color.js | export default function serviceColor(serviceTypeId) {
const Colors = {
purple: '#e8e9fc',
orange: '#ffe7d6',
green: '#e8fce8',
gray: '#eee'
};
const map = {
507: Colors.orange,
502: Colors.green,
503: Colors.green,
504: Colors.green,
505: Colors.gray,
506: Colors.gray,
... | export default function serviceColor(serviceTypeId) {
const Colors = {
purple: '#e8e9fc',
orange: '#ffe7d6',
green: '#e8fce8',
gray: '#eee'
};
const map = {
507: Colors.orange,
502: Colors.green,
503: Colors.green,
504: Colors.green,
505: Colors.gray,
506: Colors.gray,
... | Remove extra semicolon to appease the linter | Remove extra semicolon to appease the linter
| JavaScript | mit | studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights | ---
+++
@@ -17,4 +17,4 @@
};
return map[serviceTypeId] || null;
-};
+} |
77f8b1e5e48505856f1a3729a0067cc0673d5016 | app/scripts/components/resource/resource-breadcrumbs.js | app/scripts/components/resource/resource-breadcrumbs.js | export const resourceBreadcrumbs = {
template: '<breadcrumbs items="$ctrl.items" active-item="$ctrl.activeItem"/>',
bindings: {
resource: '<'
},
controller: class ResourceBreadcrumbsController {
constructor(ResourceBreadcrumbsService) {
this.ResourceBreadcrumbsService = ResourceBreadcrumbsService;... | export const resourceBreadcrumbs = {
template: '<breadcrumbs items="$ctrl.items" active-item="$ctrl.activeItem"/>',
bindings: {
resource: '<'
},
controller: class ResourceBreadcrumbsController {
constructor(ResourceBreadcrumbsService) {
this.ResourceBreadcrumbsService = ResourceBreadcrumbsService;... | Update resource name in breadcrumbs if it has been changed (WAL-347) | Update resource name in breadcrumbs if it has been changed (WAL-347)
| JavaScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -22,5 +22,11 @@
this.activeItem = this.resource.name;
}
+
+ $doCheck() {
+ if (this.activeItem !== this.resource.name) {
+ this.activeItem = this.resource.name;
+ }
+ }
}
}; |
39c3c82c0c07df59d05b3b07c5d711d7274696a1 | rollup.config.js | rollup.config.js | import commonjs from '@rollup/plugin-commonjs';
import glslify from 'rollup-plugin-glslify';
import resolve from '@rollup/plugin-node-resolve';
import copy from "rollup-plugin-copy";
export default {
input: ['source/gltf-sample-viewer.js'],
output: [
{
file: 'dist/gltf-viewer.js',
... | import commonjs from '@rollup/plugin-commonjs';
import glslify from 'rollup-plugin-glslify';
import resolve from '@rollup/plugin-node-resolve';
import copy from "rollup-plugin-copy";
export default {
input: ['source/gltf-sample-viewer.js'],
output: [
{
file: 'dist/gltf-viewer.js',
... | Revert "Remove commonjs in top level" | Revert "Remove commonjs in top level"
This reverts commit a2690e601c457d27966adc6d074b9966f906e1b7.
| JavaScript | apache-2.0 | KhronosGroup/glTF-Sample-Viewer,KhronosGroup/glTF-Sample-Viewer | ---
+++
@@ -32,5 +32,6 @@
{ src: ["source/libs/*", "!source/libs/hdrpng.js"], dest: "dist/libs" }
]
}),
+ commonjs(),
]
}; |
ac129d269eea79c21f763c2060a663513d5d9043 | rollup.config.js | rollup.config.js | import { terser } from "rollup-plugin-terser";
import filesize from "rollup-plugin-filesize";
import license from "rollup-plugin-license";
export default [
{
input: "src/js.cookie.mjs",
output: [
// config for <script type="module">
{
dir: "dist",
entryFileNames: "[name].mjs",
... | import { terser } from "rollup-plugin-terser";
import filesize from "rollup-plugin-filesize";
import license from "rollup-plugin-license";
export default [
{
input: "src/js.cookie.mjs",
output: [
// config for <script type="module">
{
dir: "dist",
entryFileNames: "[name].mjs",
... | Bring back noConflict functionality for umd module | Bring back noConflict functionality for umd module
Rollup provides an out-of-the-box option for this, thus not going to
test (generated).
| JavaScript | mit | carhartl/js-cookie,js-cookie/js-cookie,carhartl/js-cookie,js-cookie/js-cookie | ---
+++
@@ -17,7 +17,8 @@
dir: "dist",
name: "Cookies",
entryFileNames: "[name].js",
- format: "umd"
+ format: "umd",
+ noConflict: true
}
]
},
@@ -35,7 +36,8 @@
dir: "dist",
name: "Cookies",
entryFileNames: "[name].min.js",
- ... |
81567300e298d9cee47866b66561667b75f0f25c | .wdio/ci.conf.js | .wdio/ci.conf.js | exports.config = {
specs: [ './test/**/*.js' ],
exclude: [ ],
sync: true,
logLevel: 'silent',
coloredLogs: true,
bail: 0,
screenshotPath: 'screenshots',
baseUrl: 'http://localhost:3000',
framework: 'mocha',
mochaOpts: {
ui: 'bdd',
},
reporters: [ 'spec' ],
waitforTimeout: 30000,
co... | exports.config = {
specs: [ './test/**/*.js' ],
exclude: [ ],
sync: true,
logLevel: 'silent',
coloredLogs: true,
bail: 0,
screenshotPath: 'screenshots',
baseUrl: 'http://localhost:3000',
framework: 'mocha',
mochaOpts: {
ui: 'bdd',
},
reporters: [ 'spec' ],
waitforTimeout: 60000,
co... | Increase waitforTimeout to 60 seconds | Increase waitforTimeout to 60 seconds
| JavaScript | mpl-2.0 | chameleoid/telepathy-web,chameleoid/telepathy-web,chameleoid/telepathy-web | ---
+++
@@ -18,7 +18,7 @@
reporters: [ 'spec' ],
- waitforTimeout: 30000,
+ waitforTimeout: 60000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
|
b017d2d324a5c0ad8b116eee2ff09c48a4925491 | spec/api-global-shortcut-spec.js | spec/api-global-shortcut-spec.js | const {globalShortcut} = require('electron').remote
const assert = require('assert')
describe('globalShortcut module', () => {
beforeEach(() => {
globalShortcut.unregisterAll()
})
it('can register and unregister accelerators', () => {
const accelerator = 'CommandOrControl+A+B+C'
assert.equal(global... | const {globalShortcut} = require('electron').remote
const assert = require('assert')
const isCI = require('electron').remote.getGlobal('isCi')
describe('globalShortcut module', () => {
if (isCI && process.platform === 'win32') {
return
}
beforeEach(() => {
globalShortcut.unregisterAll()
})
it('can... | Disable globalShortcut spec on Windows CI | Disable globalShortcut spec on Windows CI
| JavaScript | mit | wan-qy/electron,kokdemo/electron,deed02392/electron,miniak/electron,thomsonreuters/electron,electron/electron,rreimann/electron,biblerule/UMCTelnetHub,noikiy/electron,leethomas/electron,miniak/electron,leethomas/electron,gerhardberger/electron,deed02392/electron,tinydew4/electron,dongjoon-hyun/electron,tonyganch/electr... | ---
+++
@@ -1,7 +1,13 @@
const {globalShortcut} = require('electron').remote
const assert = require('assert')
+const isCI = require('electron').remote.getGlobal('isCi')
+
describe('globalShortcut module', () => {
+ if (isCI && process.platform === 'win32') {
+ return
+ }
+
beforeEach(() => {
globalS... |
b69f528b0251817b8a4349b7ddccdf9bf29adb39 | source/Button.js | source/Button.js | /**
_moon.Button_ is an <a href="#enyo.Button">enyo.Button</a> with Moonstone
styling applied. The color of the button may be customized by specifying a
background color.
For more information, see the documentation on
<a href='https://github.com/enyojs/enyo/wiki/Buttons'>Buttons</a> in the
Enyo Developer Guide.
... | /**
_moon.Button_ is an <a href="#enyo.Button">enyo.Button</a> with Moonstone
styling applied. The color of the button may be customized by specifying a
background color.
For more information, see the documentation on
<a href='https://github.com/enyojs/enyo/wiki/Buttons'>Buttons</a> in the
Enyo Developer Guide.
... | Add a call for changed method in create time | GF-5039: Add a call for changed method in create time
Enyo-DCO-1.1-Signed-off-by: David Um <david.um@lge.com>
| JavaScript | apache-2.0 | mcanthony/moonstone,enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone | ---
+++
@@ -29,6 +29,11 @@
onSpotlightKeyUp : 'undepress'
},
+ create: function() {
+ this.inherited(arguments);
+ this.smallChanged();
+ },
+
depress: function() {
this.addClass('pressed');
},
@@ -38,6 +43,6 @@
},
smallChanged: function() {
- this.addRemoveClass(this.small, 'small');
+ this.a... |
334f2cfdded8f73ea4647e3c115d357403fa1299 | i18n/jquery.spectrum-pt-br.js | i18n/jquery.spectrum-pt-br.js | // Spectrum Colorpicker
// Brazilian (pt-br) localization
// https://github.com/bgrins/spectrum
(function ( $ ) {
var localization = $.spectrum.localization["pt-br"] = {
cancelText: "Cancelar",
chooseText: "Escolher"
};
$.extend($.fn.spectrum.defaults, localization);
})( jQuery );
| // Spectrum Colorpicker
// Brazilian (pt-br) localization
// https://github.com/bgrins/spectrum
(function ( $ ) {
var localization = $.spectrum.localization["pt-br"] = {
cancelText: "Cancelar",
chooseText: "Escolher",
clearText: "Limpar cor selecionada",
noColorSelectedText: "Nenhu... | Update Brazilian Portuguese language file. | Update Brazilian Portuguese language file.
| JavaScript | mit | GerHobbelt/spectrum,liitii/spectrum,ajssd/spectrum,armanforghani/spectrum,GerHobbelt/spectrum,armanforghani/spectrum,safareli/spectrum,maurojs25/spectrum,shawinder/spectrum,kotmatpockuh/spectrum,ginlime/spectrum,ginlime/spectrum,liitii/spectrum,shawinder/spectrum,maurojs25/spectrum,safareli/spectrum,c9s/spectrum,kotmat... | ---
+++
@@ -6,7 +6,11 @@
var localization = $.spectrum.localization["pt-br"] = {
cancelText: "Cancelar",
- chooseText: "Escolher"
+ chooseText: "Escolher",
+ clearText: "Limpar cor selecionada",
+ noColorSelectedText: "Nenhuma cor selecionada",
+ togglePaletteMoreTex... |
cb8df8f1f2eaf047f21421bbbf53a95d6e162d12 | shared/model/status.js | shared/model/status.js | /*
* Copyright (c) 2017 Bonnie Schulkin. All Rights Reserved.
*
* This file is part of BoxCharter.
*
* BoxCharter is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, ... | /*
* Copyright (c) 2017 Bonnie Schulkin. All Rights Reserved.
*
* This file is part of BoxCharter.
*
* BoxCharter is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, ... | Clean up syntax for JSDoc and ESLint | Clean up syntax for JSDoc and ESLint
| JavaScript | agpl-3.0 | flyrightsister/boxcharter,flyrightsister/boxcharter | ---
+++
@@ -18,25 +18,41 @@
*
*/
-class Status {
- constructor(type, msg) {
- this.alertType = type
- this.text = msg
- this.clrAlertClosed = false // for ui
- }
-}
+/**
+ * Class for status passed from server to client.
+ * @module status
+ */
const adminEmail = 'admin@boxcharter.com'
const cont... |
7c4b3a088e9ccd1d6378010887e7ae795589cb0d | source/mapKeys/test.js | source/mapKeys/test.js | /* eslint-disable flowtype/require-parameter-type, flowtype/require-return-type */
import {same} from "tap"
import {replace} from "ramda"
import mapKeys from "./"
same(
mapKeys(replace(/new/, ""))({
newLabel: "1",
newValue: "2",
}),
{
Label: "1",
Value: "2",
}
)
| /* eslint-disable flowtype/require-parameter-type, flowtype/require-return-type */
import {same} from "tap"
import {replace} from "ramda"
import mapKeys from "./"
same(
mapKeys(
replace(/new/)("")
)({
newLabel: "1",
newValue: "2",
}),
{
Label: "1",
Value: "2",
}
)
| Test is a little bit cleaner | Test is a little bit cleaner
| JavaScript | isc | krainboltgreene/ramda-extra.js,krainboltgreene/unction.js | ---
+++
@@ -5,7 +5,9 @@
import mapKeys from "./"
same(
- mapKeys(replace(/new/, ""))({
+ mapKeys(
+ replace(/new/)("")
+ )({
newLabel: "1",
newValue: "2",
}), |
ee95e86ea6b836b13fb3c512997aa5c5d5f377e2 | addon/mixpanel.js | addon/mixpanel.js | import Ember from 'ember';
var mixpanel = window.mixpanel;
export default Ember.Mixin.create({
content: mixpanel,
people: function() {
return Ember.ObjectProxy.extend({
content: function() {
if (mixpanel) {
return mixpanel.people;
}
}.property(),
set: function() {... | import Ember from 'ember';
var mixpanel = window.mixpanel;
export default Ember.Mixin.create({
content: mixpanel,
people: function() {
return Ember.ObjectProxy.extend({
content: function() {
if (mixpanel) {
return mixpanel.people;
}
}.property(),
set: function() {... | Use Ember.K instead of defining our own empty function | Use Ember.K instead of defining our own empty function
| JavaScript | mit | minichate/ember-mixpanel | ---
+++
@@ -23,7 +23,7 @@
unknownProperty: function(key) {
if (!this.get('content')) {
- return function() {};
+ return Ember.K;
}
return this.get('content')[key].bind(this.get('content'));
@@ -33,7 +33,7 @@
unknownProperty: function(key) {
if (!this.c... |
ebd8a166cecbdb0945fb18008a8becc17f22358d | cla_public/static-src/javascripts/modules/currencyInputValidation.js | cla_public/static-src/javascripts/modules/currencyInputValidation.js | // ($(this).val() && Number($(this).val()) > 0)
function isValidAmount(input) {
var maxVal = 100000000
var minVal = 0
var value = input.split('.')
var pounds = value[0]
var pence = value[1]
pounds = pounds.replaceAll(/^£|[\s,]+/g, "")
if(pence) {
var lengthOfPence = pence.length
... | // ($(this).val() && Number($(this).val()) > 0)
function isValidAmount(input) {
var maxVal = 100000000
var minVal = 0
var pounds;
var pence;
var trimmedInput = input.trim()
var decimalPointPosition = trimmedInput.indexOf('.')
if(decimalPointPosition === -1) {
pounds = trimmedInput... | Refactor and split input amount into pounds and pence | Refactor and split input amount into pounds and pence | JavaScript | mit | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | ---
+++
@@ -3,15 +3,22 @@
function isValidAmount(input) {
var maxVal = 100000000
var minVal = 0
+ var pounds;
+ var pence;
- var value = input.split('.')
- var pounds = value[0]
- var pence = value[1]
- pounds = pounds.replaceAll(/^£|[\s,]+/g, "")
+ var trimmedInput = input.trim()
+
... |
6942733ea789cd8b6b56021633ddf89d9e3a923c | src/component.js | src/component.js | import R from 'ramda';
import React from 'react';
const getDisplayName = (Component) => (
Component.displayName || Component.name || 'Component'
);
const subscribe = (component, store, name) => (
// subscribe to a store.
store.getProperty().onValue((state) => {
// pass its state to the react component.
... | import R from 'ramda';
import React from 'react';
const getDisplayName = (Component) => (
Component.displayName || Component.name || 'Component'
);
const subscribe = (component, store, name) => (
// subscribe to a store.
store.getProperty().onValue((state) => {
// pass its state to the react component.
... | Switch form didMount to willMount for server side render | Switch form didMount to willMount for server side render
| JavaScript | isc | Intai/bdux | ---
+++
@@ -28,7 +28,7 @@
getDefaultProps: () => ({}),
getInitialState: () => ({}),
- componentDidMount: function() {
+ componentWillMount: function() {
// pipe all dispose functions.
this.dispose = pipeFuncs(
// get the array of dispose functions. |
39c89de8dc47d3e66c33e74d8c28c32cde002cc6 | packages/test-studio/src/dashboardConfig.js | packages/test-studio/src/dashboardConfig.js | export default {
widgets: [
{name: 'sanity-tutorials', layout: {width: 'full'}},
{name: 'document-list'},
{name: 'document-count'},
// {name: 'cats', layout: {width: 'medium'}, options: {imageWidth: 50}},
// {name: 'cats', layout: {width: 'medium'}, options: {imageWidth: 150}},
{
name: '... | export default {
widgets: [
{name: 'sanity-tutorials', layout: {width: 'full'}},
{name: 'document-list'},
{name: 'document-count'},
{name: 'project-users'},
{
name: 'project-info',
layout: {
width: 'medium'
},
options: {
data: [
{title: 'Frontend',... | Add project-users widget to test-studio dashboard config | [test-studio] Add project-users widget to test-studio dashboard config
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -3,8 +3,7 @@
{name: 'sanity-tutorials', layout: {width: 'full'}},
{name: 'document-list'},
{name: 'document-count'},
- // {name: 'cats', layout: {width: 'medium'}, options: {imageWidth: 50}},
- // {name: 'cats', layout: {width: 'medium'}, options: {imageWidth: 150}},
+ {name: 'proje... |
23e2b3915bcd6fcbcac715742c8cf87ec3e84263 | lib/botUtils.js | lib/botUtils.js | /*
* Copyright (c) 2014-2020 Bjoern Kimminich.
* SPDX-License-Identifier: MIT
*/
const models = require('../models/index')
const fuzz = require('fuzzball')
async function productPrice (query, user) {
const [products] = await models.sequelize.query('SELECT * FROM Products')
const queriedProducts = products
.... | /*
* Copyright (c) 2014-2020 Bjoern Kimminich.
* SPDX-License-Identifier: MIT
*/
const models = require('../models/index')
const fuzz = require('fuzzball')
async function productPrice (query, user) {
const [products] = await models.sequelize.query('SELECT * FROM Products')
const queriedProducts = products
.... | Use more natural language for price information | Use more natural language for price information
| JavaScript | mit | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop | ---
+++
@@ -9,11 +9,10 @@
const [products] = await models.sequelize.query('SELECT * FROM Products')
const queriedProducts = products
.filter((product) => fuzz.partial_ratio(query, product.name) > 75)
- .map((product) => `${product.name}: ${product.price}¤`)
+ .map((product) => `${product.name} costs ... |
078e578f2202f1be416799326506c605693adb71 | www/static/models/setupPouch.js | www/static/models/setupPouch.js | define([
"backbone"
, "pouchdb"
, "backbone-pouch"
], function(
Backbone
, PouchDB
, BackbonePouch
) {
function setup(currentUser) {
if (!currentUser.isLoggedIn())
return
var dbname = 'todos-' + currentUser.id
// Save all of the todo items in the `"todos-backbone"` database.
Backbone.sync... | define([
"backbone"
, "pouchdb"
, "backbone-pouch"
], function(
Backbone
, PouchDB
, BackbonePouch
) {
function setup(currentUser) {
if (!currentUser.isLoggedIn())
return
var dbName = 'todos-' + currentUser.id
// Save all of the todo items in the `"todos-backbone"` database.
Backbone.sync... | Add replication to local couchdb. | Add replication to local couchdb.
We want this to replicate via a proxy to a per-user db on Cloudant.
| JavaScript | apache-2.0 | backblend/todos-offline,backblend/todos-offline | ---
+++
@@ -12,16 +12,25 @@
if (!currentUser.isLoggedIn())
return
- var dbname = 'todos-' + currentUser.id
+ var dbName = 'todos-' + currentUser.id
// Save all of the todo items in the `"todos-backbone"` database.
Backbone.sync = BackbonePouch.sync({
// We currently suffix by th... |
f84d03b1bec6f30fd3c906a8add346d6c1de0586 | lib/pkgcloud/amazon/client.js | lib/pkgcloud/amazon/client.js | /*
* client.js: Base client from which all AWS clients inherit from
*
* (C) 2012 Nodejitsu Inc.
*
*/
var utile = require('utile'),
request = require('request'),
base = require('../core/base');
var Client = exports.Client = function (options) {
base.Client.call(this, options);
// Allow overriding ser... | /*
* client.js: Base client from which all AWS clients inherit from
*
* (C) 2012 Nodejitsu Inc.
*
*/
var utile = require('utile'),
request = require('request'),
base = require('../core/base');
var Client = exports.Client = function (options) {
base.Client.call(this, options);
// Allow overriding ser... | Return empty array when passed `undefined` or `null` in amazon.Client.prototype._toArray | [fix] Return empty array when passed `undefined` or `null` in amazon.Client.prototype._toArray
| JavaScript | mit | songanbui/pkgcloud,DonSchenck/pkgcloud,mdsummers/pkgcloud,Hopebaytech/pkgcloud,hacor/pkgcloud,Phanatic/pkgcloud,bunglestink/pkgcloud,apla/pkgcloud,andrewsomething/pkgcloud,dionjwa/pkgcloud,Phanatic/pkgcloud,pkgcloud/pkgcloud,mcanthony/pkgcloud,temka1234/pkgcloud | ---
+++
@@ -27,6 +27,10 @@
utile.inherits(Client, base.Client);
Client.prototype._toArray = function toArray(obj) {
+ if (typeof obj === 'undefined') {
+ return [];
+ }
+
return Array.isArray(obj) ? obj : [obj];
};
|
02b7610b6acc81a911e1bdb055be830f955ad6da | client.js | client.js | Wizard.registerRouter('iron:router', {
go: function(name, stepId) {
Router.go(name, this.getParams(stepId));
},
getParams: function(stepId) {
return Tracker.nonreactive(function() {
var route = Router.current()
, params = route.params || {};
return _.extend(params, {step: stepId})... | Wizard.registerRouter('iron:router', {
go: function(name, stepId) {
var p = {};
if( !!this.getParams(stepId).query && $.param(this.getParams(stepId).query) != "" ) p.query = $.param(this.getParams(stepId).query);
if( !!this.getParams(stepId).hash ) p.hash = this.getParams(stepId).hash;
Router.go(name,... | Fix for query and hash string consistency in url | Fix for query and hash string consistency in url
| JavaScript | mit | forwarder/autoform-wizard-iron-router | ---
+++
@@ -1,6 +1,9 @@
Wizard.registerRouter('iron:router', {
go: function(name, stepId) {
- Router.go(name, this.getParams(stepId));
+ var p = {};
+ if( !!this.getParams(stepId).query && $.param(this.getParams(stepId).query) != "" ) p.query = $.param(this.getParams(stepId).query);
+ if( !!this.getPa... |
df5a7e0a5eaba7e6d49a4507a2763ca4a634b3e8 | app/controllers/resources.js | app/controllers/resources.js | import { Controller } from "controllers/controller.js";
import { mapName } from "utils.js";
import { Ajax } from "ajax.js";
export class ResourcesController extends Controller {
constructor(base) {
super(base);
this.model = {
selected: "0"
};
}
/**
* Retrieves the list of available resource... | import { Controller } from "controllers/controller.js";
import { mapName } from "utils.js";
import { Ajax } from "ajax.js";
export class ResourcesController extends Controller {
constructor(base) {
super(base);
this.model = {
selected: "0"
};
}
/**
* Retrieves the list of available resource... | Reset page number when selecting a different resource | Reset page number when selecting a different resource
| JavaScript | mit | marriola/SWAPI-demo,marriola/SWAPI-demo | ---
+++
@@ -37,16 +37,21 @@
});
}
+
/**
* Returns the resource currently selected by the select#resources element
*/
getSelected() {
return this.model.store[this.model.selected];
}
+
+ /**
+ * Resets search results when selecting a different resource.
+ *... |
40004498a04d8e7e87faa69a63b2b69741159045 | src/js/select.js | src/js/select.js | 'use strict';
import $ from 'jquery';
export default class BasisSelect {
constructor() {
this.select = $('[data-c="select"]');
this.select.each((i, e) => {
const selectWrapper = $(e);
const select = selectWrapper.find('select');
const label = selectWrapper.find('[data-c="select__label"]')... | 'use strict';
import $ from 'jquery';
export default class BasisSelect {
constructor() {
this.select = $('[data-c="select"]');
this.select.each((i, e) => {
const selectWrapper = $(e);
const select = selectWrapper.find('select');
const label = selectWrapper.find('[data-c="select__label"]')... | Set text of option tag | Set text of option tag
When value attribute is set, display after selection becomes value value | JavaScript | mit | sass-basis/basis | ---
+++
@@ -9,10 +9,10 @@
const selectWrapper = $(e);
const select = selectWrapper.find('select');
const label = selectWrapper.find('[data-c="select__label"]');
- label.text(select.children('option:selected').val());
+ label.text(select.children('option:selected').text());
sel... |
8918b858a8d8ab583756bdae3f6ccf2d010a7c8c | src/adjustArgs/extractFromDOM.js | src/adjustArgs/extractFromDOM.js | const numberRegex = /_number$/
export default function extractFromDOM(args) {
const targetProperty = 'currentTarget'
// If being passed an event with DOM element that has a dataset
if (args[0] && args[0][targetProperty] && args[0][targetProperty].dataset) {
const event = args[0]
const element = event[tar... | import extractValuesFromDOMEvent from 'awareness/es/extractValuesFromDOMEvent'
export default function extractFromDOM(args) {
if (args[0]) {
const values = extractValuesFromDOMEvent(args[0])
// Place extracted dataset values first, followed by original arguments
args = [values].concat(args)
}
retur... | Use awareness’s event values extraction | Use awareness’s event values extraction
| JavaScript | mit | RoyalIcing/react-organism | ---
+++
@@ -1,58 +1,8 @@
-const numberRegex = /_number$/
+import extractValuesFromDOMEvent from 'awareness/es/extractValuesFromDOMEvent'
export default function extractFromDOM(args) {
- const targetProperty = 'currentTarget'
- // If being passed an event with DOM element that has a dataset
- if (args[0] && args... |
14c3009f4899e9400e5e533062b877feec1fc3c7 | app/data/sagas.js | app/data/sagas.js | import { takeLatest } from 'redux-saga';
import HttpService from '../services/HttpService';
import { ProfileTypes } from './profile/redux';
import profileRequest from './profile/sagas';
import { UserRepositoriesTypes } from './user_repositories/redux';
import userRepositoriesRequest from './user_repositories/sagas';
... | import { takeLatest } from 'redux-saga/effects';
import HttpService from '../services/HttpService';
import { ProfileTypes } from './profile/redux';
import profileRequest from './profile/sagas';
import { UserRepositoriesTypes } from './user_repositories/redux';
import userRepositoriesRequest from './user_repositories/... | Change deprecated Redux Saga function | Change deprecated Redux Saga function
| JavaScript | mit | matheusmariano/react-fission,matheusmariano/react-fission | ---
+++
@@ -1,4 +1,4 @@
-import { takeLatest } from 'redux-saga';
+import { takeLatest } from 'redux-saga/effects';
import HttpService from '../services/HttpService';
import { ProfileTypes } from './profile/redux'; |
26e0dfeeb66076d33c83336e4c701417a2e11c35 | client/src/components/ArticleCard.js | client/src/components/ArticleCard.js | import React from 'react'
import {Link} from 'react-router-dom'
function setArticleLink(title) {
return encodeURIComponent(title)
}
const ArticleCard = ({channel, article}) => {
return (
<div className="card">
<Link to={`/newsfeed/${channel.source_id}/${setArticleLink(article.title)}`} className="articl... | import React from 'react'
import {Link} from 'react-router-dom'
function setArticleLink(title) {
return encodeURIComponent(title)
}
const ArticleCard = ({channel, article}) => {
return (
<Link to={`/newsfeed/${channel.source_id}/${setArticleLink(article.title)}`} className="article-link">
<div className... | Refactor link to cover entire card | Refactor link to cover entire card
| JavaScript | mit | kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed | ---
+++
@@ -7,12 +7,12 @@
const ArticleCard = ({channel, article}) => {
return (
- <div className="card">
- <Link to={`/newsfeed/${channel.source_id}/${setArticleLink(article.title)}`} className="article-link">
+ <Link to={`/newsfeed/${channel.source_id}/${setArticleLink(article.title)}`} className="... |
1a1096598fa72fb308965e4a9854418710038621 | src/apiRoutes.js | src/apiRoutes.js | /**
* API routes for interacting with the database
*/
import express from 'express';
const router = express.Router();
router.get("/", function(req, res) {
// res.sendFile(__dirname + "/public/index.html");
res.send('API Routes');
});
export default router; | /**
* API routes for interacting with the database
*/
import express from 'express';
import bodyParser from 'body-parser';
import mongoose from 'mongoose';
import User from './data/models/User';
const router = express.Router();
router.get('/', function(req, res) {
// res.sendFile(__dirname + "/publ... | Set up signup post express route | Set up signup post express route
| JavaScript | mit | Keitarokido/tiles,Keitarokido/tiles | ---
+++
@@ -3,11 +3,44 @@
*/
import express from 'express';
+import bodyParser from 'body-parser';
+import mongoose from 'mongoose';
+import User from './data/models/User';
+
const router = express.Router();
-router.get("/", function(req, res) {
+router.get('/', function(req, res) {
// res.sendFile(__dir... |
e8a0872e2d8a0b28ce8718bc754f205ab289d98f | lib/util/browserManager.js | lib/util/browserManager.js | /*jslint forin:true sub:true anon:true, sloppy:true, stupid:true nomen:true, node:true continue:true*/
/*
* Copyright (c) 2014, Yahoo! Inc. All rights reserved.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*
*
*/
var
SelLib = require('../../arrow_selenium/sel... | /*jslint forin:true sub:true anon:true, sloppy:true, stupid:true nomen:true, node:true continue:true*/
/*
* Copyright (c) 2014, Yahoo! Inc. All rights reserved.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*
*
*/
var
SelLib = require('../../arrow_selenium/sel... | Use default browser if browser is not passed for reuseSession | Use default browser if browser is not passed for reuseSession
| JavaScript | bsd-3-clause | yahoo/arrow,yahoo/arrow,proverma/arrow,proverma/arrow,proverma/arrow,yahoo/arrow | ---
+++
@@ -22,6 +22,12 @@
BrowserManager.openBrowsers = function (browser, config, capabilities, cb) {
var selLib = new SelLib(config);
+
+ // Use default browser if browser not passed
+ if (!browser || browser === null) {
+ browser = config.browser;
+ logger.info('No browser passed. Defa... |
31f32e4a63597ae481d6b23fa5101a23d75148a7 | src/components/Filters/Filter.js | src/components/Filters/Filter.js | import React, { Component } from 'react';
import classnames from 'classnames';
class Filter extends Component {
constructor(props) {
super(props);
this.state = {
active: false,
};
}
render() {
return (
<div
className={classnames('ui-filter')}
onClick={() => {
... | import React, { Component } from 'react';
import classnames from 'classnames';
class Filter extends Component {
static propTypes = {
title: React.PropTypes.string.isRequired,
onChange: React.PropTypes.func.isRequired,
active: React.PropTypes.bool,
};
static defaultProps = {
active: false,
};
... | Introduce an active prop for filters | Introduce an active prop for filters
| JavaScript | mit | wundery/wundery-ui-react,wundery/wundery-ui-react | ---
+++
@@ -2,36 +2,51 @@
import classnames from 'classnames';
class Filter extends Component {
+
+ static propTypes = {
+ title: React.PropTypes.string.isRequired,
+ onChange: React.PropTypes.func.isRequired,
+ active: React.PropTypes.bool,
+ };
+
+ static defaultProps = {
+ active: false,
+ };
+... |
be292399cd4a6d528fae5b1b5cd0b7443f71f79c | app/validators/date-range.js | app/validators/date-range.js | import moment from 'moment'
export default function validateDateRange(options) {
return (key, newValue) => {
let date = moment(newValue)
return date >= moment(options.min) && date <= moment(options.max)
}
}
| import moment from 'moment'
export default function validateDateRange(options) {
return (key, newValue) => {
let date = moment.utc(newValue)
return date >= moment.utc(options.min) && date <= moment.utc(options.max)
}
}
| Validate dates using UTC timezone | Validate dates using UTC timezone
Fixes #57
| JavaScript | mit | opensource-challenge/opensource-challenge-client,opensource-challenge/opensource-challenge-client | ---
+++
@@ -2,8 +2,8 @@
export default function validateDateRange(options) {
return (key, newValue) => {
- let date = moment(newValue)
+ let date = moment.utc(newValue)
- return date >= moment(options.min) && date <= moment(options.max)
+ return date >= moment.utc(options.min) && date <= moment.ut... |
ff911f95e7a1b53be6c9e1a1685b6dcf5cc62f73 | codebrag-ui/test/common/directives/savingStatus-spec.js | codebrag-ui/test/common/directives/savingStatus-spec.js | ddescribe('Dynamic favicon directive', function() {
var $rootScope, $scope, el, $compile;
var statusClasses = ['pending', 'success', 'failed'];
beforeEach(module('codebrag.common.directives'));
beforeEach(inject(function (_$rootScope_, _$compile_) {
$compile = _$compile_;
$rootScope =... | describe('Saving status indicator directive', function() {
var $rootScope, $scope, el, $compile;
var statusClasses = ['pending', 'success', 'failed'];
beforeEach(module('codebrag.common.directives'));
beforeEach(inject(function (_$rootScope_, _$compile_) {
$compile = _$compile_;
$root... | Fix - run all tests, not only those for saving status directive. | Fix - run all tests, not only those for saving status directive.
| JavaScript | agpl-3.0 | cazacugmihai/codebrag,cazacugmihai/codebrag,softwaremill/codebrag,softwaremill/codebrag,softwaremill/codebrag,softwaremill/codebrag,cazacugmihai/codebrag,cazacugmihai/codebrag,cazacugmihai/codebrag | ---
+++
@@ -1,4 +1,4 @@
-ddescribe('Dynamic favicon directive', function() {
+describe('Saving status indicator directive', function() {
var $rootScope, $scope, el, $compile;
var statusClasses = ['pending', 'success', 'failed']; |
0db4c9a76a63ac417004b0899f43902ffc9aebf0 | lib/ribosome.js | lib/ribosome.js | var path = require('path')
var tmp = require('tmp')
var html = require('./html.js')
var pdf = require('./pdf.js')
module.exports = ribosome = {}
ribosome.translate = function(url, success, error, license) {
tmp.dir(function(err, dirPath) {
if (err) {
error(err)
} else {
var htmlPath = path.join(... | var path = require('path')
var tmp = require('tmp')
var html = require('./html.js')
var pdf = require('./pdf.js')
module.exports = ribosome = {}
ribosome.translate = function(url, success, error, license) {
tmp.dir(function(err, dirPath) {
if (err) {
error(err)
} else {
var htmlPath = path.join(... | Fix a bug not passing license properly | Fix a bug not passing license properly
| JavaScript | apache-2.0 | color/ribosome,ColorGenomics/ribosome | ---
+++
@@ -17,10 +17,10 @@
success(pdfContent)
}, function(err) {
error(err)
- })
+ }, license)
}, function(err) {
error(err)
})
}
- }, license)
+ })
} |
cdebb9acdc409af5f55a224f374bc3f25b04877f | app/containers/main/MainContainer.js | app/containers/main/MainContainer.js | import React from 'react'
import { Navigation } from 'components'
import { connect } from 'react-redux'
import { container, innerContainer } from './styles.css'
const MainContainer = React.createClass({
render () {
// console.log('props', this.props);
return (
<div className={container}>
<Navig... | import React, { PropTypes } from 'react'
import { Navigation } from 'components'
import { connect } from 'react-redux'
import { container, innerContainer } from './styles.css'
const MainContainer = React.createClass({
propTypes: {
isAuthed: PropTypes.bool.isRequired,
},
render () {
// console.log('props'... | Add proptypes, navbar changes on isAuthed true | Add proptypes, navbar changes on isAuthed true
| JavaScript | mit | guilsa/ducker,guilsa/ducker | ---
+++
@@ -1,9 +1,12 @@
-import React from 'react'
+import React, { PropTypes } from 'react'
import { Navigation } from 'components'
import { connect } from 'react-redux'
import { container, innerContainer } from './styles.css'
const MainContainer = React.createClass({
+ propTypes: {
+ isAuthed: PropTypes.... |
d4a4377e96babe1137e08b281aa774936655383b | fan/views/Checkbox.js | fan/views/Checkbox.js | jsio('from shared.javascript import Class, bind')
jsio('import fan.views.Value')
exports = Class(fan.views.Value, function(supr){
this._domTag = 'input'
this._domType = 'checkbox'
this._className += ' Checkbox'
this._createContent = function() {
supr(this, '_createContent')
this._on('change', bind(this, '_... | jsio('from shared.javascript import Class, bind')
jsio('import fan.views.Value')
exports = Class(fan.views.Value, function(supr){
this._domTag = 'input'
this._domType = 'checkbox'
this._className += ' Checkbox'
this._createContent = function() {
supr(this, '_createContent')
this._on('change', bind(this, '_... | Handle keyboard select for checkbox views | Handle keyboard select for checkbox views
| JavaScript | mit | marcuswestin/Focus | ---
+++
@@ -13,6 +13,11 @@
this._makeFocusable()
}
+ this.handleKeyboardSelect = function() {
+ this.setValue(!this._value)
+ fin.set(this._itemId, this._property, this._value)
+ }
+
this.setValue = function(value) {
if (typeof value == 'undefined') { return }
this._element.checked = this._value = ... |
a9dbed5c5a866bb48377e63b8cf1d8b6ac8af165 | _site/js/controllers/AnalyzerCtrl.js | _site/js/controllers/AnalyzerCtrl.js |
function AnalyzerCtrl($scope, $http, Analyzer, Data){
$scope.analyzer = Analyzer;
$scope.data = Data;
$scope.atext = {};
$scope.$watch('analyzer.query', function(value){
for (i in $scope.analyzer.analyzers){
$scope.analyze($scope.analyzer.analyzers[i]);
}
});
$sc... |
function AnalyzerCtrl($scope, $http, Analyzer, Data){
$scope.analyzer = Analyzer;
$scope.data = Data;
$scope.$watch('analyzer.query', function(value){
for (i in $scope.analyzer.analyzers){
$scope.analyze($scope.analyzer.analyzers[i]);
}
});
$scope.analyze = function(a... | Remove unused variable in $scope | Remove unused variable in $scope
| JavaScript | apache-2.0 | polyfractal/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor,polyfractal/elasticsearch-inquisitor | ---
+++
@@ -3,8 +3,6 @@
function AnalyzerCtrl($scope, $http, Analyzer, Data){
$scope.analyzer = Analyzer;
$scope.data = Data;
-
- $scope.atext = {};
$scope.$watch('analyzer.query', function(value){
for (i in $scope.analyzer.analyzers){ |
3a344d3a91172115dca758974ee6608bb67549d3 | spec/javascripts/lib/jasmine/conf/init_local_fixtures.js | spec/javascripts/lib/jasmine/conf/init_local_fixtures.js | if(typeof jasmine !== "undefined") {
jasmine.getFixtures().fixturesPath = '/spec/javascripts/specs/fixtures';
} | if(typeof jasmine !== "undefined") {
jasmine.getFixtures().fixturesPath = '/src/main/javascript/tetra/spec/javascripts/specs/fixtures';
} | Fix local conf for jasmine tests | Fix local conf for jasmine tests
| JavaScript | mit | viadeo/tetra,viadeo/tetra | ---
+++
@@ -1,3 +1,3 @@
if(typeof jasmine !== "undefined") {
- jasmine.getFixtures().fixturesPath = '/spec/javascripts/specs/fixtures';
+ jasmine.getFixtures().fixturesPath = '/src/main/javascript/tetra/spec/javascripts/specs/fixtures';
} |
36216b3dc083b9ef0c6d9ce1d2c7cf01848cf120 | public/js/url-formatter.js | public/js/url-formatter.js | (function (doc) {
"use strict";
var REGEX_URL = /^(https?):\/\/(?:gist|raw)\.github(?:usercontent)?\.com\/([^\/]+\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\//i;
var devEl = doc.getElementById('url-dev'),
prodEl = doc.getElementById('url-prod'),
urlEl = doc.getElementById('url');
urlEl.addEventListene... | (function (doc) {
"use strict";
var REGEX_URL = /^(https?):\/\/(?:gist|raw\.)?github(?:usercontent)?\.com\/([^\/]+\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\/(.+)/i;
var devEl = doc.getElementById('url-dev'),
prodEl = doc.getElementById('url-prod'),
urlEl = doc.getElementById('url');
urlEl.addEventLi... | Make the URL formatter friendlier. | Make the URL formatter friendlier.
| JavaScript | mit | cnbin/rawgit,rgrove/rawgit,ssddi456/rawgit,rgrove/rawgit,cnbin/rawgit,ssddi456/rawgit,cnbin/rawgit,matsmith/rawgit,gnowxilef/rawgit,raimo/livegit,ddtxra/rawgit,matsmith/rawgit,gnowxilef/rawgit,ssddi456/rawgit,matsmith/rawgit,sereepap2029/rawgit,ddtxra/rawgit,sereepap2029/rawgit,gnowxilef/rawgit,sereepap2029/rawgit,ddtx... | ---
+++
@@ -2,7 +2,7 @@
"use strict";
-var REGEX_URL = /^(https?):\/\/(?:gist|raw)\.github(?:usercontent)?\.com\/([^\/]+\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\//i;
+var REGEX_URL = /^(https?):\/\/(?:gist|raw\.)?github(?:usercontent)?\.com\/([^\/]+\/[^\/]+\/[^\/]+|[0-9A-Za-z-]+\/[0-9a-f]+\/raw)\/(.+)/i;
... |
fad95a6071d39e649916f534f8561bd1fadd8a4a | packages/fela-bindings/src/ThemeProviderFactory.js | packages/fela-bindings/src/ThemeProviderFactory.js | /* @flow */
import { shallowEqual } from 'recompose'
import { objectEach } from 'fela-utils'
import createTheme from './createTheme'
export default function ThemeProviderFactory(
BaseComponent: any,
renderChildren: Function,
statics?: Object
): any {
class ThemeProvider extends BaseComponent {
theme: Obje... | /* @flow */
import { shallowEqual } from 'recompose'
import { objectEach } from 'fela-utils'
import createTheme from './createTheme'
export default function ThemeProviderFactory(
BaseComponent: any,
renderChildren: Function,
statics?: Object
): any {
class ThemeProvider extends BaseComponent {
theme: Obje... | Use shallowEqual to prevent false-positive values | Use shallowEqual to prevent false-positive values
| JavaScript | mit | derek-duncan/fela,rofrischmann/fela,risetechnologies/fela,risetechnologies/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,risetechnologies/fela,rofrischmann/fela,rofrischmann/fela | ---
+++
@@ -20,7 +20,7 @@
}
componentWillReceiveProps(nextProps: Object): void {
- if (this.props.theme !== nextProps.theme) {
+ if (shallowEqual(this.props.theme, nextProps.theme) === false) {
this.theme.update(nextProps.theme)
}
} |
ac4df0c99a4ccab30d8f3d242211c0155ebb619f | app/components/x-toggle.js | app/components/x-toggle.js | import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
theme: 'default',
off: 'Off',
on: 'On',
toggled: false,
inputClasses: Ember.observer('themeClass', 'inputCheckbox', function () {
var themeClass = this.get('themeClass');
var input = this.get('inputCheckbox');
... | import Ember from 'ember';
var observer = Ember.observer;
var on = Ember.on;
var computed = Ember.computed;
export default Ember.Component.extend({
tagName: 'span',
theme: 'default',
off: 'Off',
on: 'On',
toggled: false,
inputClasses: on('init', observer('themeClass', 'inputCheckbox', function () {
v... | Use local variables to make methods parse easier. | Use local variables to make methods parse easier.
* Stash local variables, and use them inline (seems to be easier to read to me).
* Do not require function prototype extensions (`Function.prototype.on` was used before). | JavaScript | mit | knownasilya/ember-toggle,knownasilya/ember-toggle,lifegadget/ember-cli-toggle,paulkogel/ember-cli-toggle,lifegadget/ember-cli-toggle,knownasilya/ember-cli-toggle,paulkogel/ember-cli-toggle,knownasilya/ember-cli-toggle | ---
+++
@@ -1,4 +1,8 @@
import Ember from 'ember';
+
+var observer = Ember.observer;
+var on = Ember.on;
+var computed = Ember.computed;
export default Ember.Component.extend({
tagName: 'span',
@@ -7,7 +11,7 @@
on: 'On',
toggled: false,
- inputClasses: Ember.observer('themeClass', 'inputCheckbox', fun... |
7ff065c62c1d1a1ab0665e4f71967dc9ef5e2c0f | src/app/components/players/player/playerModel.service.js | src/app/components/players/player/playerModel.service.js | export class PlayerModelService {
constructor($log, $http, $localStorage, $q, _, playersApi) {
'ngInject';
this.$log = $log;
this.$http = $http;
this.$localStorage = $localStorage;
this.$q = $q;
this._ = _;
this.playersApi = playersApi;
this.model = {
player: null
};
this.numDrawCards = 7;
... | export class PlayerModelService {
constructor($log, $http, $localStorage, $q, _, playersApi) {
'ngInject';
this.$log = $log;
this.$http = $http;
this.$localStorage = $localStorage;
this.$q = $q;
this._ = _;
this.playersApi = playersApi;
this.model = {
player: null
};
this.numDrawCards = 7;
... | Add 'cardsSelected' property to the PlayerModelService | Add 'cardsSelected' property to the PlayerModelService
| JavaScript | unlicense | ejwaibel/squarrels,ejwaibel/squarrels | ---
+++
@@ -20,7 +20,8 @@
insert(data) {
let pl = Object.assign({}, {
isCurrent: true,
- cardsInHand: []
+ cardsInHand: [],
+ cardsSelected: []
}, data
);
|
932899a1363cc02acb113ea7dc2984e966a79d88 | drupal-themes/nceas_adaptive/js/include.js | drupal-themes/nceas_adaptive/js/include.js | /*************************************
* Include.js
* A Javascript file that contains functions specific to the NCEAS website
* This file will be included in every page on NCEAS
*
* Author: Lauren Walker laurennwalker@gmail.com
* 2015
*************************************/
// Check if a slider/slideshow is on thi... | /*************************************
* Include.js
* A Javascript file that contains functions specific to the NCEAS website
* This file will be included in every page on NCEAS
*
* Author: Lauren Walker laurennwalker@gmail.com
* 2015
*************************************/
jQuery(window).load(function(){
//Make... | Use jQuery(window).load to avoid interference with other Drupal modules and libraries. Also use the flexslider API to start the Flexslider instead of manually starting it | Use jQuery(window).load to avoid interference with other Drupal modules
and libraries. Also use the flexslider API to start the Flexslider
instead of manually starting it | JavaScript | artistic-2.0 | NCEAS/nceas-web,NCEAS/nceas-web,NCEAS/nceas-web | ---
+++
@@ -7,19 +7,10 @@
* 2015
*************************************/
-
-// Check if a slider/slideshow is on this page and make sure it has started (i.e. all images are hidden).
-jQuery(document).ready(function($) {
-
- (function startSlider(){
- $(window).load(function(){
- //Is there a slider on this pa... |
18f75fe27652ab3c1c9d8cbe53b28e6363ea23e7 | api/db/rescue.js | api/db/rescue.js | 'use strict'
module.exports = function (sequelize, DataTypes) {
let Rescue = sequelize.define('Rescue', {
id: {
type: DataTypes.UUID,
primaryKey: true,
defaultValue: DataTypes.UUIDV4
},
active: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: true
},
... | 'use strict'
module.exports = function (sequelize, DataTypes) {
let Rescue = sequelize.define('Rescue', {
id: {
type: DataTypes.UUID,
primaryKey: true,
defaultValue: DataTypes.UUIDV4
},
active: {
type: DataTypes.BOOLEAN,
allowNull: false,
defaultValue: true
},
... | Add back unknown platform type | Add back unknown platform type
| JavaScript | bsd-3-clause | FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com | ---
+++
@@ -41,7 +41,7 @@
defaultValue: ''
},
platform: {
- type: DataTypes.ENUM('xb', 'pc'),
+ type: DataTypes.ENUM('xb', 'pc', 'unknown'),
allowNull: true,
defaultValue: 'pc'
}, |
ad4a9ae6a9ab32e14ff45e532cf79b613e8e2b91 | assets/script/test/ped2/onColided.js | assets/script/test/ped2/onColided.js |
logger.println(text(translate("se.pop2")).color(GameColor.static.green));
// test(function(ch) { logger.println(text(new String(ch))); });
var c_1 = choice('a', "Demo", function(ch) {
logger.println(text("You choiced " + ch));
player.getMessage().replace(message().println("You choiced [" + ch + "]\n ").println("... |
logger.println(text(translate("se.pop2")).color(GameColor.static.green));
// test(function(ch) { logger.println(text(new String(ch))); });
var c_1 = choice('a', "Demo", function(ch) {
logger.println(text("You choiced " + ch));
player.getMessage().replace(message().println("You choiced [" + ch + "]\n ").println("... | Fix text: not 'one' but 'two' | Fix text: not 'one' but 'two' | JavaScript | apache-2.0 | kanomiya/Steward,kanomiya/Steward | ---
+++
@@ -17,7 +17,7 @@
});
// showMessage(message().print("aiu"));
-showMessage(message().println("This book has one choice.\n ").println(c_1).println(c_2));
+showMessage(message().println("This book has two choices.\n ").println(c_1).println(c_2));
|
4693d84d058bc1dc79842bbb11e0c9126c59bf4a | app/assets/js/component/Combobox.js | app/assets/js/component/Combobox.js | /**
* Created by dungvn3000 on 2/18/14.
*/
Ext.define('sunerp.component.Combobox', {
extend: 'Ext.form.field.ComboBox',
alias: 'widget.comboboxx',
triggerAction: 'all',
forceSelection: true,
queryMode: 'local',
listeners: {
afterRender: function() {
this.store.reload();
... | /**
* Created by dungvn3000 on 2/18/14.
*/
Ext.define('sunerp.component.Combobox', {
extend: 'Ext.form.field.ComboBox',
alias: 'widget.comboboxx',
triggerAction: 'all',
forceSelection: true,
queryMode: 'local',
config: {
modelName: null
},
listeners: {
afterRender: fun... | Rename method getSelect to getSelectData. Add config modelName. | Rename method getSelect to getSelectData.
Add config modelName.
| JavaScript | apache-2.0 | SunriseSoftVN/sunerp,SunriseSoftVN/sunerp,SunriseSoftVN/sunerp | ---
+++
@@ -8,12 +8,15 @@
triggerAction: 'all',
forceSelection: true,
queryMode: 'local',
+ config: {
+ modelName: null
+ },
listeners: {
afterRender: function() {
this.store.reload();
}
},
- getSelected: function() {
+ getSelectedData: functi... |
ef492df0704426dd6db760e76d1a3179a20cac3d | app/scripts/nuswhispers.js | app/scripts/nuswhispers.js | 'use strict';
var App = require('./app');
App.request('addNavigationItem', {
name: 'NUSWhispers',
icon: 'heart',
url: 'http://nuswhispers.com/',
target: '_blank',
newLabel: true
});
| 'use strict';
var App = require('./app');
App.request('addNavigationItem', {
name: 'NUSWhispers',
icon: 'heart',
url: 'https://nuswhispers.com/',
target: '_blank',
newLabel: true
});
| Update NUSWhispers URL for HTTPS | Update NUSWhispers URL for HTTPS | JavaScript | mit | mauris/nusmods,nusmodifications/nusmods,nusmodifications/nusmods,mauris/nusmods,mauris/nusmods,nusmodifications/nusmods,mauris/nusmods,nusmodifications/nusmods | ---
+++
@@ -5,7 +5,7 @@
App.request('addNavigationItem', {
name: 'NUSWhispers',
icon: 'heart',
- url: 'http://nuswhispers.com/',
+ url: 'https://nuswhispers.com/',
target: '_blank',
newLabel: true
}); |
6e910d50ad8929802dded0279037a436f60ba67a | src/menus/scaleDown.js | src/menus/scaleDown.js | 'use strict';
import menuFactory from '../menuFactory';
const styles = {
pageWrap(isOpen, width) {
return {
transform: isOpen ? 'translate3d(0, 0, 1px)' : `translate3d(0, 0, -${width}px)`,
transformOrigin: '100%',
transformStyle: 'preserve-3d',
transition: 'all 0.5s'
};
},
oute... | 'use strict';
import menuFactory from '../menuFactory';
const styles = {
pageWrap(isOpen, width) {
return {
transform: isOpen ? 'translate3d(0, 0, -1px)' : `translate3d(0, 0, -${width}px)`,
transformOrigin: '100%',
transformStyle: 'preserve-3d',
transition: 'all 0.5s'
};
},
out... | Fix icon disappearing bug in Safari | Fix icon disappearing bug in Safari
| JavaScript | mit | negomi/react-burger-menu,hedgehog34/react-burger-menu,hedgehog34/react-burger-menu,negomi/react-burger-menu | ---
+++
@@ -6,7 +6,7 @@
pageWrap(isOpen, width) {
return {
- transform: isOpen ? 'translate3d(0, 0, 1px)' : `translate3d(0, 0, -${width}px)`,
+ transform: isOpen ? 'translate3d(0, 0, -1px)' : `translate3d(0, 0, -${width}px)`,
transformOrigin: '100%',
transformStyle: 'preserve-3d',
... |
304cbd60f2c06ed863ef06ce6bde79b7bb613889 | server/src/seeders/20171202141325-existing-memberships.js | server/src/seeders/20171202141325-existing-memberships.js | module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.bulkInsert('Memberships',
[
{
id: new Sequelize.UUIDV1(),
memberId: '75b936c0-ba72-11e7-84e1-058ffffd96c5',
groupId: 'c46ebe90-bd68-11e7-922f-4d48c5331440',
userRole: 'admin',
... | module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.bulkInsert('Memberships',
[
{
id: '047fbd50-2d5a-4800-86f0-05583673fd7f',
memberId: '75b936c0-ba72-11e7-84e1-058ffffd96c5',
groupId: 'c46ebe90-bd68-11e7-922f-4d48c5331440',
userRole:... | Fix UUID column error in membership seeder | Fix UUID column error in membership seeder
| JavaScript | mit | Philipeano/post-it,Philipeano/post-it | ---
+++
@@ -3,7 +3,7 @@
return queryInterface.bulkInsert('Memberships',
[
{
- id: new Sequelize.UUIDV1(),
+ id: '047fbd50-2d5a-4800-86f0-05583673fd7f',
memberId: '75b936c0-ba72-11e7-84e1-058ffffd96c5',
groupId: 'c46ebe90-bd68-11e7-922f-4d48c5331440',
... |
cca9a07602ed6ab2b534dfc3e4680d8c35dff142 | packages/vega-parser/src/parsers/guides/legend-gradient-labels.js | packages/vega-parser/src/parsers/guides/legend-gradient-labels.js | import {Perc, Label} from './constants';
import guideMark from './guide-mark';
import {TextMark} from '../marks/marktypes';
import {LegendLabelRole} from '../marks/roles';
var alignExpr = 'datum.' + Perc + '<=0?"left"'
+ ':datum.' + Perc + '>=1?"right":"center"';
export default function(spec, config, userEncode, da... | import {Perc, Label} from './constants';
import guideMark from './guide-mark';
import {TextMark} from '../marks/marktypes';
import {LegendLabelRole} from '../marks/roles';
var alignExpr = 'datum.' + Perc + '<=0?"left"'
+ ':datum.' + Perc + '>=1?"right":"center"';
export default function(spec, config, userEncode, da... | Update gradient labels to use signal directive. | Update gradient labels to use signal directive.
| JavaScript | bsd-3-clause | vega/vega,lgrammel/vega,vega/vega,vega/vega,vega/vega | ---
+++
@@ -37,7 +37,7 @@
offset: config.gradientLabelOffset
};
- enter.align = update.align = {expr: alignExpr};
+ enter.align = update.align = {signal: alignExpr};
return guideMark(TextMark, LegendLabelRole, Label, dataRef, encode, userEncode);
} |
4ef11b0788bcbd870df8da6283878f9e50f867cd | app/transforms/appearance-status.js | app/transforms/appearance-status.js | import DS from 'ember-data';
export default DS.Transform.extend({
deserialize: function(serialized) {
var map = {
0: 'New',
7: 'Built',
10: 'Started',
20: 'Finished',
30: 'Verified',
};
return map[serialized];
},
serialize: function(deserialized) {
var map = {
... | import DS from 'ember-data';
export default DS.Transform.extend({
deserialize: function(serialized) {
var map = {
0: 'New',
7: 'Built',
10: 'Started',
20: 'Finished',
25: 'Variance',
30: 'Verified',
};
return map[serialized];
},
serialize: function(deserialized) {... | Add new `variance` state to appearance | Add new `variance` state to appearance
| JavaScript | bsd-2-clause | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web | ---
+++
@@ -7,6 +7,7 @@
7: 'Built',
10: 'Started',
20: 'Finished',
+ 25: 'Variance',
30: 'Verified',
};
return map[serialized];
@@ -18,6 +19,7 @@
'Built': 7,
'Started': 10,
'Finished': 20,
+ 'Variance': 25,
'Verified': 30,
};
return... |
e79ddb8d651e07fe0fc95ce297e60afc2546ec37 | src/helpers.js | src/helpers.js | import { matchPath } from 'react-router'
export const getRouteMatch = (routes, pathname) =>
!routes ? null : routes
.map(r => matchPath(pathname, r.path, { exact: true }))
.filter(r => r !== null)[0] || nulle
| import { matchPath } from 'react-router'
export const getRouteMatch = (routes, pathname) =>
!routes ? null : routes
.map(r => matchPath(pathname, r.path, { exact: true }))
.filter(r => r !== null)[0] || null
| Fix type error in getRouteMatch | Fix type error in getRouteMatch
| JavaScript | mit | MaxSvargal/react-router-redux-bind | ---
+++
@@ -3,4 +3,4 @@
export const getRouteMatch = (routes, pathname) =>
!routes ? null : routes
.map(r => matchPath(pathname, r.path, { exact: true }))
- .filter(r => r !== null)[0] || nulle
+ .filter(r => r !== null)[0] || null |
00c8e59af411093c58f0673e1959a2edc59e2d24 | src/scripts/app/cms/grammarActivities/edit.controller.js | src/scripts/app/cms/grammarActivities/edit.controller.js | 'use strict';
module.exports =
/*@ngInject*/
function GrammarActivitiesEditCmsCtrl (
$scope, GrammarActivity, $state, _
) {
$scope.grammarActivity = {};
$scope.grammarActivity.concepts = [];
GrammarActivity.getOneByIdFromFB($state.params.id).then(function (ga) {
$scope.grammarActivity = ga;
$scope.gr... | 'use strict';
module.exports =
/*@ngInject*/
function GrammarActivitiesEditCmsCtrl (
$scope, GrammarActivity, $state, _, ConceptsFBService
) {
$scope.grammarActivity = {};
$scope.grammarActivity.concepts = [];
GrammarActivity.getOneByIdFromFB($state.params.id).then(function (ga) {
$scope.grammarActivity ... | Load level 2,1,0 concepts into question model for qs | Load level 2,1,0 concepts into question model for qs
| JavaScript | agpl-3.0 | ddmck/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,empirical-org/Quill-Grammar | ---
+++
@@ -4,7 +4,7 @@
/*@ngInject*/
function GrammarActivitiesEditCmsCtrl (
- $scope, GrammarActivity, $state, _
+ $scope, GrammarActivity, $state, _, ConceptsFBService
) {
$scope.grammarActivity = {};
$scope.grammarActivity.concepts = [];
@@ -13,6 +13,13 @@
$scope.grammarActivity = ga;
$scop... |
ed208bea3775153854a3f614b9a31b73670a8d83 | src/app/settings/settings.component.spec.js | src/app/settings/settings.component.spec.js | describe('Settings component', () => {
let ctrl;
let speechService;
let stopwatchService;
let timerService;
beforeEach(angular.mock.module('app'));
beforeEach(inject(($rootScope, $componentController, _speechService_,
_stopwatchService_, _timerService_) => {
let scope = $rootScope.$new();
... | Add settings component unit tests | Add settings component unit tests
| JavaScript | mit | JavierPDev/AudioTime,JavierPDev/AudioTime | ---
+++
@@ -0,0 +1,84 @@
+describe('Settings component', () => {
+ let ctrl;
+ let speechService;
+ let stopwatchService;
+ let timerService;
+
+ beforeEach(angular.mock.module('app'));
+ beforeEach(inject(($rootScope, $componentController, _speechService_,
+ _stopwatchService_, _timerService_) => {
+ ... | |
16df59f1a7c8df7624fb084891ee2d00587ad489 | test/javascripts/unit/double_click_protection_test.js | test/javascripts/unit/double_click_protection_test.js | module("Double click protection", {
setup: function(){
this.$form = $('<form action="/go" method="POST"><input type="submit" name="input_name" value="Save" /></form>');
$('#qunit-fixture').append(this.$form);
}
});
test('clicking submit input disables the button', function() {
GOVUK.doubleClickProtectio... | module("Double click protection", {
setup: function(){
this.$form = $('<form action="/go" method="POST"><input type="submit" name="input_name" value="Save" /></form>');
$('#qunit-fixture').append(this.$form);
}
});
test('clicking submit input disables the button', function() {
GOVUK.doubleClickProtectio... | Fix JS test causing navigation away from tests | Fix JS test causing navigation away from tests
| JavaScript | mit | YOTOV-LIMITED/whitehall,alphagov/whitehall,hotvulcan/whitehall,alphagov/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,ggoral/whitehall,robinwhittleton/whitehall,askl56/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,askl56/whitehall,ggoral/whitehall,askl56/whitehall,alphagov/whi... | ---
+++
@@ -12,7 +12,7 @@
var $submit_tag = this.$form.find('input[type=submit]');
ok(!$submit_tag.prop('disabled'));
- $submit_tag.on('click', function (e) {
+ this.$form.on('submit', function (e) {
e.preventDefault();
ok($submit_tag.prop('disabled'));
});
@@ -25,7 +25,7 @@
var $submit_ta... |
02b36658cf08a87717860f7b7de3f08aad92d364 | resources/assets/components/CampaignOverview/index.js | resources/assets/components/CampaignOverview/index.js | import React from 'react';
import { map } from 'lodash';
import CampaignTable from '../CampaignTable';
class CampaignOverview extends React.Component {
render() {
const causeData = this.props;
const causeTables = map(causeData, (data, cause) => (
<CampaignTable
key={cause}
cause={caus... | import React from 'react';
import { map } from 'lodash';
import CampaignTable from '../CampaignTable';
class CampaignOverview extends React.Component {
render() {
const causeData = this.props;
const causeTables = map(causeData, (data, cause) => (
<CampaignTable
key={cause}
cause={caus... | Fix missing heading for cause-less campaigns. | Fix missing heading for cause-less campaigns.
| JavaScript | mit | DoSomething/rogue,DoSomething/rogue,DoSomething/rogue | ---
+++
@@ -10,7 +10,7 @@
const causeTables = map(causeData, (data, cause) => (
<CampaignTable
key={cause}
- cause={cause}
+ cause={cause || 'Uncategorized'}
campaigns={data}
causeData={causeData}
/> |
136dd3ead528a087571bba104ffde9fe02de44ca | minimal-carousel.js | minimal-carousel.js | function Carousel(settings){
'use strict';
this.carousel = document.querySelector(settings.carousel || '.carousel');
this.slides = this.carousel.querySelectorAll('ul li');
this.delay = settings.delay || 2.5;
this.autoplay = settings.autoplay === undefined ? true : settings.autoplay;
this.slides_total = thi... | function Carousel(settings){
'use strict';
settings = settings || {};
this.carousel = document.querySelector(settings.carousel || '.carousel');
this.slides = this.carousel.querySelectorAll('ul li');
this.delay = settings.delay || 2.5;
this.autoplay = settings.autoplay === undefined ? true : settings.autopla... | Allow no setting parameter at all. | Allow no setting parameter at all.
| JavaScript | mit | jhderojasUVa/minimal-carousel,wecodeio/minimal-carousel,wecodeio/minimal-carousel,jhderojasUVa/minimal-carousel | ---
+++
@@ -1,5 +1,6 @@
function Carousel(settings){
'use strict';
+ settings = settings || {};
this.carousel = document.querySelector(settings.carousel || '.carousel');
this.slides = this.carousel.querySelectorAll('ul li');
this.delay = settings.delay || 2.5; |
844342dd5e458e3ac677e5491384526059b69577 | models/userModel.js | models/userModel.js | var bcrypt = require('bcrypt');
var mongoose = require('mongoose');
const saltRounds = 10;
var userSchema = new mongoose.Schema({
signupDate: { type: Date, default: Date.now },
username: { type: String, required: true },
password: { type: String, required: true },
email: { type: String, required: true },
nam... | var bcrypt = require('bcrypt');
var mongoose = require('mongoose');
const saltRounds = 10;
var userSchema = new mongoose.Schema({
signupDate: { type: Date, default: Date.now },
username: { type: String, required: true, unique: true },
email: { type: String, required: true, unique: true },
password: { type: Str... | Add unique index to username and email for Users | Add unique index to username and email for Users
| JavaScript | mit | heymanhn/journey-backend | ---
+++
@@ -4,9 +4,9 @@
var userSchema = new mongoose.Schema({
signupDate: { type: Date, default: Date.now },
- username: { type: String, required: true },
+ username: { type: String, required: true, unique: true },
+ email: { type: String, required: true, unique: true },
password: { type: String, require... |
4031aab3317a8932334b8c036517b2330701f06b | addon/-private/closure-action.js | addon/-private/closure-action.js | import Ember from 'ember';
const ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action');
export default ClosureActionModule.ACTION;
| import Ember from 'ember';
let ClosureActionModule;
if ('ember-htmlbars/keywords/closure-action' in Ember.__loader.registry) {
ClosureActionModule = Ember.__loader.require('ember-htmlbars/keywords/closure-action');
} else {
ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-acti... | Fix loading ACTION symbol on canary | Fix loading ACTION symbol on canary
| JavaScript | mit | DockYard/ember-functional-helpers,DockYard/ember-functional-helpers | ---
+++
@@ -1,5 +1,11 @@
import Ember from 'ember';
-const ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action');
+let ClosureActionModule;
+
+if ('ember-htmlbars/keywords/closure-action' in Ember.__loader.registry) {
+ ClosureActionModule = Ember.__loader.require('ember-h... |
d6e540590d07e6160f3544dafcb951e52a64eb5a | module/htdocs/js/bootstrap-tab-bookmark.js | module/htdocs/js/bootstrap-tab-bookmark.js | function bootstrap_tab_bookmark (selector) {
if (selector == undefined) {
selector = "";
}
var bookmark_switch = function () {
url = document.location.href.split('#');
if(url[1] != undefined) {
$(selector + '[href=#'+url[1]+']').tab('show');
}
}
/* Autom... | function bootstrap_tab_bookmark (selector) {
if (selector == undefined) {
selector = "";
}
var bookmark_switch = function () {
url = document.location.href.split('#');
if(url[1] != undefined) {
$(selector + '[href="#'+url[1]+'"]').tab('show');
}
}
/* Aut... | Fix Js error on tab refresh in element view | Fix Js error on tab refresh in element view
| JavaScript | agpl-3.0 | mohierf/mod-webui,mohierf/mod-webui,rednach/mod-webui,shinken-monitoring/mod-webui,shinken-monitoring/mod-webui,shinken-monitoring/mod-webui,mohierf/mod-webui,rednach/mod-webui,rednach/mod-webui | ---
+++
@@ -6,7 +6,7 @@
var bookmark_switch = function () {
url = document.location.href.split('#');
if(url[1] != undefined) {
- $(selector + '[href=#'+url[1]+']').tab('show');
+ $(selector + '[href="#'+url[1]+'"]').tab('show');
}
}
|
95acc8ea8150029259389d360be4aeeba143e045 | blueprints/ember-cli-paint/index.js | blueprints/ember-cli-paint/index.js | 'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'broccoli-sass', target: '0.6.6' }
]).then(function() {
return this.addBowerPackagesToProject([
{ name: 'paint', target: '0.7.22' },
{ name... | 'use strict';
module.exports = {
normalizeEntityName: function() {},
afterInstall: function() {
return this.addPackagesToProject([
{ name: 'broccoli-sass', target: '0.6.6' }
]).then(function() {
return this.addBowerPackagesToProject([
{ name: 'paint', target: '0.9.0' },
{ name:... | Update blueprints to include latest package versions | Update blueprints to include latest package versions
| JavaScript | mit | alphasights/ember-cli-paint,alphasights/ember-cli-paint | ---
+++
@@ -8,7 +8,8 @@
{ name: 'broccoli-sass', target: '0.6.6' }
]).then(function() {
return this.addBowerPackagesToProject([
- { name: 'paint', target: '0.7.22' },
+ { name: 'paint', target: '0.9.0' },
+ { name: 'modernizr', target: '2.8.3' },
{ name: 'spinjs', targ... |
4ba0fc51dfe71d37fd3ac7937f2d6438f3ce70a9 | .eslintrc.js | .eslintrc.js | module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module"
},
... | module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
},
"sourceType": "module"
},
"plugins": [
... | Add support for JSX *within* .vue files | Add support for JSX *within* .vue files | JavaScript | mit | kepler-12/code-standards | ---
+++
@@ -8,7 +8,6 @@
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
- "jsx": true
},
"sourceType": "module"
},
@@ -31,6 +30,7 @@
"semi": [
"error",
"always"
- ]
+ ],
+ "v... |
a27f0313356287605e808957f20e6dd47b51a92e | client/components/RecipeListEntry.js | client/components/RecipeListEntry.js | import React from 'react';
import { Link } from 'react-router';
import moment from 'moment';
moment().format();
const RecipeListEntry = (props) => {
const createdTime = moment(props.recipe.created_at).fromNow();
return (
<div className="recipe-list-entry">
<Link to={`/recipe/${props.recipe.recipe_id || ... | import React from 'react';
import { Link } from 'react-router';
import moment from 'moment';
moment().format();
const RecipeListEntry = (props) => {
const createdTime = moment(props.recipe.created_at).fromNow();
return (
<div className="recipe-list-entry">
<Link to={`/recipe/${props.recipe.recipe_id || ... | Change class name for recipe entry title | Change class name for recipe entry title
| JavaScript | mit | rompingstalactite/rompingstalactite,forkful/forkful,rompingstalactite/rompingstalactite,forkful/forkful,rompingstalactite/rompingstalactite,forkful/forkful | ---
+++
@@ -8,7 +8,7 @@
const createdTime = moment(props.recipe.created_at).fromNow();
return (
<div className="recipe-list-entry">
- <Link to={`/recipe/${props.recipe.recipe_id || props.recipe.id || 1}`} className="recipe-title">{props.recipe.title}</Link>
+ <Link to={`/recipe/${props.recipe.rec... |
8e275a22aa419297eee0acc5ef65fc0cce4aa3cb | clients/web/test/spec/swaggerSpec.js | clients/web/test/spec/swaggerSpec.js | function jasmineTests() {
var jasmineEnv = jasmine.getEnv();
var consoleReporter = new jasmine.ConsoleReporter();
window.jasmine_phantom_reporter = consoleReporter;
jasmineEnv.addReporter(consoleReporter);
function waitAndExecute() {
if (!jasmineEnv.currentRunner().suites_.length) {
... | function jasmineTests() {
var jasmineEnv = jasmine.getEnv();
var consoleReporter = new jasmine.ConsoleReporter();
window.jasmine_phantom_reporter = consoleReporter;
jasmineEnv.addReporter(consoleReporter);
function waitAndExecute() {
if (!jasmineEnv.currentRunner().suites_.length) {
... | Update web client swagger test for swagger-ui 2.1.4 | Update web client swagger test for swagger-ui 2.1.4
| JavaScript | apache-2.0 | adsorensen/girder,kotfic/girder,data-exp-lab/girder,jbeezley/girder,Kitware/girder,jbeezley/girder,adsorensen/girder,RafaelPalomar/girder,kotfic/girder,girder/girder,sutartmelson/girder,Xarthisius/girder,sutartmelson/girder,sutartmelson/girder,manthey/girder,data-exp-lab/girder,RafaelPalomar/girder,data-exp-lab/girder,... | ---
+++
@@ -22,19 +22,19 @@
$('li#resource_system.resource .heading h2 a').click();
});
waitsFor(function () {
- return $('#system_getVersion:visible').length > 0;
+ return $('#system_system_getVersion:visible').length > 0;
}, 'end ... |
899d3164f322abce2c287a4a315f82d7ad869cc0 | test/num-test.js | test/num-test.js | const chai = require('chai');
const assert = chai.assert;
// const stub = require('./support/stub')
const Num = require("../lib/num")
describe("Num", function(){
context("with calculated attributes", function(){
it("instantiates", function(){
assert.isObject(new Num(10));
})
it('has a decimal a... | const chai = require('chai');
const assert = chai.assert;
// const stub = require('./support/stub')
const Num = require("../lib/num")
describe("Num", function(){
context("with calculated attributes", function(){
it("instantiates", function(){
assert.isObject(new Num(10));
})
it('has a decimal a... | Add test for Num method translating a decimal to binary | Add test for Num method translating a decimal to binary
| JavaScript | mit | kjs222/gametime,kjs222/gametime | ---
+++
@@ -25,3 +25,13 @@
})
})
})
+
+describe("translateToBinary", function(){
+
+ it("translate a decimal number to binary", function(){
+ let num = new Num(2);
+ num.decimal = 2;
+ assert.equal(num.decimal, 2);
+ assert.equal(num.translateToBinary(), 10);
+ })
+}) |
fcb643f589b4168405bfe6d6b85ee9ad0aa29682 | tests/cleanup.js | tests/cleanup.js | /**
* @author EmmanuelOlaojo
* @since 8/13/16
*/
module.exports = function(){
return Promise.all([
utils.dropCollection(TEST_COLLECTION_A)
, utils.dropCollection(TEST_COLLECTION_B)
]);
};
| /**
* @author EmmanuelOlaojo
* @since 8/13/16
*/
module.exports = function(){
return Promise.all([
utils.dropCollection(TEST_COLLECTION_A)
, utils.dropCollection(TEST_COLLECTION_B)
, utils.dropCollection("fs.files")
, utils.dropCollection("fs.chunks")
]);
};
| Drop files collection after tests | Drop files collection after tests
| JavaScript | mit | e-oj/Fawn | ---
+++
@@ -7,5 +7,7 @@
return Promise.all([
utils.dropCollection(TEST_COLLECTION_A)
, utils.dropCollection(TEST_COLLECTION_B)
+ , utils.dropCollection("fs.files")
+ , utils.dropCollection("fs.chunks")
]);
}; |
5143eb144f27717d152cefd32a3fc1f703d20a72 | code/schritte/5-redux/src/Counter.js | code/schritte/5-redux/src/Counter.js | import React from 'react';
import {connect} from 'react-redux';
import {filterGreetings} from './selectors';
const Counter = ({greetings, filteredGreetings}) => (
<div className="Counter">Showing {filteredGreetings.length} of {greetings.length} Greetings</div>
);
export default connect(
state => ({
g... | import React from 'react';
import {connect} from 'react-redux';
import {filterGreetings} from './selectors';
const Counter = ({greetingCount, filteredGreetingsCount}) => (
<div className="Counter">Showing {filteredGreetingsCount} of {greetingCount} Greetings</div>
);
export default connect(
state => ({
... | Determine counter numbers in connect | Determine counter numbers in connect
| JavaScript | mit | st-he/react-workshop,st-he/react-workshop,DJCordhose/react-workshop,st-he/react-workshop,DJCordhose/react-workshop,DJCordhose/react-workshop,st-he/react-workshop,DJCordhose/react-workshop | ---
+++
@@ -3,13 +3,13 @@
import {filterGreetings} from './selectors';
-const Counter = ({greetings, filteredGreetings}) => (
- <div className="Counter">Showing {filteredGreetings.length} of {greetings.length} Greetings</div>
+const Counter = ({greetingCount, filteredGreetingsCount}) => (
+ <div className=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.