commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
3.26k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
624
message
stringlengths
15
4.7k
lang
stringclasses
3 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
86fd65dddd74cc679ca1dea3fcdbb36c3ed7e723
bin/cli.js
bin/cli.js
#!/usr/bin/env node console.log('hits cli.js file');
#!/usr/bin/env node var program = require('commander'); var prompt = require('inquirer'); var path = require('path'); var pkg = require(path.resolve(__dirname, '..', 'package.json')); program.version(pkg.version) program .command('new') .action(function() { console.log('hits new command'); }); ...
Add in base CLI interface
feat: Add in base CLI interface
JavaScript
mit
code-computerlove/quarry,code-computerlove/slate-cli,cartridge/cartridge-cli
964abe02bbcfa8db34d6886feb79088397da5700
build/concat.js
build/concat.js
module.exports = { all: { options: { separator: ';', }, files: { 'dist/js/binary.js': [ 'src/javascript/lib/jquery.js', 'src/javascript/lib/highstock/highstock.js', 'src/javascript/lib/highstock/highstock-exporting.js', ...
module.exports = { all: { options: { separator: ';', }, files: { 'dist/js/binary.js': [ 'src/javascript/lib/jquery.js', 'src/javascript/lib/highstock/highstock.js', 'src/javascript/lib/highstock/highstock-exporting.js', ...
Allow binary_japan to have dir
Allow binary_japan to have dir
JavaScript
apache-2.0
junbon/binary-static-www2,junbon/binary-static-www2
1a420d9d243983fad908021fc13e90a101f8e58b
src/anol/geocoder/base.js
src/anol/geocoder/base.js
anol.geocoder.Base = function(_options) { if(_options === undefined) { return; } this.url = _options.url; this.options = _options; }; anol.geocoder.Base.prototype = { CLASS_NAME: 'anol.geocoder.Base', handleResponse: function(response) { var self = this; var results = []...
anol.geocoder.Base = function(_options) { if(_options === undefined) { return; } this.url = _options.url; this.options = _options; }; anol.geocoder.Base.prototype = { CLASS_NAME: 'anol.geocoder.Base', handleResponse: function(response) { var self = this; var results = []...
Handle failed geocoder requests correct
Handle failed geocoder requests correct
JavaScript
mit
omniscale/anol,omniscale/anol
3209c40ebe0070a4430009f6f703cf3fcf95e6f8
assets/js/modules/pagespeed-insights/settings/index.js
assets/js/modules/pagespeed-insights/settings/index.js
/** * WordPress dependencies */ import { __, sprintf } from '@wordpress/i18n'; /** * External dependencies */ import { sanitizeHTML } from 'assets/js/util'; export const settingsDetails = () => { const { dashboardPermalink } = global.googlesitekit; /* translators: %s is the URL to the Site Kit dashboard. */ c...
/** * WordPress dependencies */ import { __, sprintf } from '@wordpress/i18n'; /** * External dependencies */ import { sanitizeHTML } from 'assets/js/util'; export const settingsDetails = () => { const { dashboardPermalink } = global.googlesitekit; const content = sprintf( /* translators: %s is the URL to th...
Fix placement of translators comment.
Fix placement of translators comment.
JavaScript
apache-2.0
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
f0c7e9ae7ee156ddce2ab5c715b0f281deb3e8b8
source/javascripts/octopress.js
source/javascripts/octopress.js
function renderDeliciousLinks(items) { var output = '<ul class="divided">'; for (var i = 0, l = items.length; i < l; i++) { output += '<li><a href="' + items[i].u + '" title="Tags: ' + (items[i].t == "" ? "" : items[i].t.join(', ')) + '">' + items[i].d + '</a></li>'; } output += '</ul>'; jQu...
function renderDeliciousLinks(items) { var output = '<ul class="divided">'; for (var i = 0, l = items.length; i < l; i++) { output += '<li><a href="' + items[i].u + '" title="Tags: ' + (items[i].t == "" ? "" : items[i].t.join(', ')) + '">' + items[i].d + '</a></li>'; } output += '</ul>'; jQu...
Fix reference to Gravatar img tag
Fix reference to Gravatar img tag
JavaScript
mit
coogie/oscailte,coogie/oscailte
ecd6381d3fa70c393aa8892ed696093600583111
src/App/Body/ErrorDialog.js
src/App/Body/ErrorDialog.js
import React from 'react'; import Dialog from 'material-ui/lib/dialog'; import FlatButton from 'material-ui/lib/flat-button'; export default ({ open, closeMe }) => ( <Dialog title="Error" open={open} actions={[ <FlatButton label="OK" primary={true} onTouchTap={this.closeErr...
Split out error dialog into component
Split out error dialog into component
JavaScript
cc0-1.0
ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer
c190d2d5317b6075a2a923bd6b61764c25fbd099
rollup.config.js
rollup.config.js
import uglify from 'rollup-plugin-uglify'; import commonjs from 'rollup-plugin-commonjs'; import resolve from 'rollup-plugin-node-resolve'; export default { name: 'KeyCode', input: 'index.js', output: { format: 'umd', file: 'dist/keycode.min.js' }, sourcemap: true, plugins: [ ...
import { uglify } from 'rollup-plugin-uglify'; import commonjs from 'rollup-plugin-commonjs'; import resolve from 'rollup-plugin-node-resolve'; export default { name: 'KeyCode', input: 'index.js', output: { format: 'umd', file: 'dist/keycode.min.js' }, sourcemap: true, plugins: ...
Use named import for uglify rollup plugin
Use named import for uglify rollup plugin
JavaScript
mit
kabirbaidhya/keycode-js,kabirbaidhya/keycode-js,kabirbaidhya/keycode-js,kabirbaidhya/keycode-js
cecc6b4c8ce022b874b63450005d2e52ddc9cde7
guts/router.js
guts/router.js
var routeList = require('../config/routeList'); var router = require('koa-router'); var controllers = require('./controllers') var views = require('./views'); module.exports = function(app){ app.use(views('./views', { map: { html: 'underscore' }, locals: { title: 'with underscore' }, ...
var routeList = require('../config/routeList'); var router = require('koa-router'); var controllers = require('./controllers') var views = require('./views'); module.exports = function(app){ app.use(views('./views', { map: { html: 'ejs', ejs: 'ejs' }, locals: { title: 'with underscor...
Make it so HTML and EJS are both rendering via EJS.
Make it so HTML and EJS are both rendering via EJS.
JavaScript
bsd-2-clause
Tombert/frameworkey
1d5fade0858d0c95b89dacd6db51c14250755f27
app/routes/interestgroups/InterestGroupDetailRoute.js
app/routes/interestgroups/InterestGroupDetailRoute.js
import { compose } from 'redux'; import { connect } from 'react-redux'; import prepare from 'app/utils/prepare'; import { joinGroup, leaveGroup, fetchGroup, fetchMemberships, } from 'app/actions/GroupActions'; import InterestGroupDetail from './components/InterestGroupDetail'; import { selectMembershipsForGroup...
import { compose } from 'redux'; import { connect } from 'react-redux'; import prepare from 'app/utils/prepare'; import { joinGroup, leaveGroup, fetchGroup, fetchAllMemberships, } from 'app/actions/GroupActions'; import InterestGroupDetail from './components/InterestGroupDetail'; import { selectMembershipsForGr...
Update interestGroup to fetch all members
Update interestGroup to fetch all members
JavaScript
mit
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
685f58c77394c593f9af98dd9dfbfea8bbc4c239
src/modules/controls/OrbitModule.js
src/modules/controls/OrbitModule.js
import {Vector3} from 'three'; import {ThreeOrbitControls} from './lib/ThreeOrbitControls'; export class OrbitModule { constructor(params = {}) { this.params = Object.assign({ target: new Vector3(0, 0, 0), follow: false }, params); } manager(manager) { this.controls = new ThreeOrbitContr...
import {Vector3} from 'three'; import {Loop} from '../../core/Loop'; import {ThreeOrbitControls} from './lib/ThreeOrbitControls'; export class OrbitModule { constructor(params = {}) { this.params = Object.assign({ target: new Vector3(0, 0, 0), follow: false }, params); } manager(manager) { ...
Fix Loop dependency in OrbitControls
Fix Loop dependency in OrbitControls Former-commit-id: 8a856c3abacefad6dd5679baa714fe7bc24446ee
JavaScript
mit
WhitestormJS/whs.js,WhitestormJS/whs.js
6a619aa2629dc6bc049e7209265d8ee2cb9b72b2
rollup.config.js
rollup.config.js
import babel from 'rollup-plugin-babel'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import { terser } from 'rollup-plugin-terser'; import pkg from './package.json'; const input = 'src/index.js'; const plugins = [ babel({ exclude: '**/node_modules/**' }), ]; con...
import babel from 'rollup-plugin-babel'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import { terser } from 'rollup-plugin-terser'; import pkg from './package.json'; const input = 'src/index.js'; const plugins = [ babel({ exclude: '**/node_modules/**' }), ]; con...
Fix umd and cjs export names
Fix umd and cjs export names
JavaScript
mit
perrin4869/react-stay-scrolled
7a47a3665290f18a51a13fb183e3c388bff83691
src/index.js
src/index.js
// Loaded ready states const loadedStates = ['interactive', 'complete']; // Return Promise module.exports = (cb, doc) => new Promise(resolve => { // Use global document if we don't have one doc = doc || document; // Handle DOM load const done = () => resolve(cb && cb()); // Resolve now if DOM has already loaded...
// Loaded ready states const loadedStates = ['interactive', 'complete']; // Return Promise module.exports = (cb, doc) => new Promise(resolve => { // Allow doc to be passed in as the lone first param if (cb && typeof cb !== 'function') { doc = cb; cb = null; } // Use global document if we don't have one doc =...
Allow doc to be passed in as the lone first param
Allow doc to be passed in as the lone first param
JavaScript
mit
lukechilds/when-dom-ready
ed3ec4d2b860c259bb4d50dc972a891f8e1492c8
src/components/Sidebar.js
src/components/Sidebar.js
import React, { Component } from 'react'; import GBox from 'grommet/components/Box'; import GParagraph from 'grommet/components/Paragraph'; import GHeading from 'grommet/components/Heading'; import CLineList from '../containers/CLineList'; const Sidebar = ({ mode, toggleMode, numberOfBends, totalLength }) => { con...
import React, { Component } from 'react'; import GBox from 'grommet/components/Box'; import GParagraph from 'grommet/components/Paragraph'; import GHeading from 'grommet/components/Heading'; import CLineList from '../containers/CLineList'; class Sidebar extends React.Component { constructor(props) { super(prop...
Transform sidebar into traditional class and add type and color selectors
Transform sidebar into traditional class and add type and color selectors
JavaScript
mit
rjbernaldo/lines,rjbernaldo/lines
eff5178476db5a6326312b5c4f6026d86c1546e5
lib/helpers.js
lib/helpers.js
var exec = require('child_process').exec module.exports.asyncIterate = function(array, callback, done) { function iterate(idx) { var current = array[idx] if (current) { callback(current, function() { iterate(idx+1) }, function(err) { done(err) }) } else { done() ...
var exec = require('child_process').exec, _ = require('lodash') module.exports.asyncIterate = function(array, callback, done) { function iterate(idx) { var current = array[idx] if (current) { callback(current, function() { iterate(idx+1) }, function(err) { done(err) }) ...
Fix “checkRunning” to return right container’s running status
Fix “checkRunning” to return right container’s running status
JavaScript
mit
mnylen/pig,mnylen/pig
2daafd8e8c94bb3baa6c3a0a92bfef469e237b34
contourd/recommendation/plugins/scripted/links/main.js
contourd/recommendation/plugins/scripted/links/main.js
index = 0; config = self.getConfig(); function add(url, title, description, icon) { if (config.BoolValue(url, false) == false) { self.addRecommendation(0.0, url, title, description, icon); } } add("http://www.kde.org/", "KDE community", "The people behind Plasma Active", "kde"); add("http://plasma.kde...
index = 0; config = self.getConfig(); function add(url, title, description, icon) { if (config.BoolValue(url, false) == false) { self.addRecommendation(0.0, url, title, description, icon); } } add("http://www.kde.org/", "KDE community", "The people behind Plasma Active", "kde"); add("http://community....
Change broken url for one with usefull info.
Change broken url for one with usefull info.
JavaScript
lgpl-2.1
KDE/contour,KDE/contour,KDE/contour
29ecf0322654ac415df36802f403dad414bc5afe
server/auth/index.js
server/auth/index.js
const logger = require('../logging'); const passport = require('passport'); const { setupOIDC } = require('./oidc'); const { deserializeUser } = require('./user'); module.exports = async (app) => { await setupOIDC(); passport.serializeUser((user, done) => { logger.silly('Serializing user', { userId: user.id }...
const passport = require('passport'); const { setupOIDC } = require('./oidc'); const { deserializeUser } = require('./user'); module.exports = async (app) => { await setupOIDC(); passport.serializeUser((user, done) => done(null, user.id)); passport.deserializeUser(deserializeUser); app.use(passport.initialize...
Simplify deserialization call and remove unnecessary logging.
Simplify deserialization call and remove unnecessary logging.
JavaScript
mit
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
d9b87491c95c1caaf6e14f31723ae3978babc918
lib/helpers.js
lib/helpers.js
'use babel' const COLOR_EXTRACTION_REGEXP = /rgb\(\d+, \d+, \d+\)|\#[0-9a-f]{3,6}/ export function isColor(textEditor, bufferPosition) { const lineText = textEditor.getTextInRange([[bufferPosition.row, 0], [bufferPosition.row, Infinity]]) const matches = COLOR_EXTRACTION_REGEXP.exec(lineText) if (matches === nu...
'use babel' const COLOR_EXTRACTION_REGEXP = /rgb\(\d+, ?\d+, ?\d+\)|rgba\(\d+, ?\d+, ?\d+, ?\d?\.?\d+\)|#[0-9a-f]{3,6}/ export function isColor(textEditor, bufferPosition) { const lineText = textEditor.getTextInRange([[bufferPosition.row, 0], [bufferPosition.row, Infinity]]) const matches = COLOR_EXTRACTION_REGEX...
Add rgba support to regex
:new: Add rgba support to regex
JavaScript
mit
steelbrain/intentions-colorpicker
e99b789a7086f889355edea3ab293640c3f719be
src/sass.js
src/sass.js
'use strict' let sass = require('node-sass') /* * Transform SASS to CSS. * @public * @param {string} folderPath - Path to the folder containing the SASS file. * @param {string} str - SASS. * @param {Object} opts - Options for the task. * @param {function} next - The callback that handles the response. Receives ...
'use strict' let sass = require('node-sass') /* * Transform SASS to CSS. * @public * @param {string} folderPath - Path to the folder containing the SASS file. * @param {string} str - SASS. * @param {Object} opts - Options for the task. * @param {function} next - The callback that handles the response. Receives ...
Disable inline source map when optimization enabled
Disable inline source map when optimization enabled
JavaScript
mit
electerious/rosid-handler-sass,electerious/rosid-handler-scss
5eeb17a1aff26aa6d6ed38534af134aea905c065
src/app/store/createDevStore.js
src/app/store/createDevStore.js
export default function createDevToolsStore(onDispatch) { let currentState = { committedState: {}, stagedActions: [], computedStates: [], skippedActions: {}, currentStateIndex: 0 }; let listeners = []; function dispatch(action) { if (action.type[0] !== '@') onDispatch(action); retur...
export default function createDevToolsStore(onDispatch) { let currentState = { committedState: {}, stagedActions: [], computedStates: [], skippedActions: {}, currentStateIndex: 0 }; let listeners = []; let initiated = false; function dispatch(action) { if (action.type[0] !== '@') onDi...
Check whether liftedStore is initiated
Check whether liftedStore is initiated
JavaScript
mit
zalmoxisus/redux-devtools-extension,zalmoxisus/redux-devtools-extension
e9cd59b69ecd25a80a71fdbbfdf2b96bcc1ff677
src/index.js
src/index.js
import { debug, context } from './utils' const version = require('../package.json').version import config from './config/config' import setup from './config/setup' import groups from './registry/registry' import { create, load } from './data/parser' if (debug) { console.warn('You are running the development build ...
import { debug, context } from './utils' const version = require('../package.json').version import config from './config/config' import setup from './config/setup' import groups from './registry/registry' import { create, load } from './data/parser' if (debug) { console.warn(`You are running the development build ...
Add version to debug info
Add version to debug info
JavaScript
mit
spirit/spirit
8675d11a8aafe341e3146bd42c90c8b794d61243
packages/reddio-ui/src/screens/ListingResolver.js
packages/reddio-ui/src/screens/ListingResolver.js
import React from "react"; import { View } from "react-native"; import { withRouter } from "react-router"; import ListingProvider from "../app/ListingProvider"; import PostListSort from "../components/PostListSort"; import PostList from "../components/PostList"; class ListingResolver extends React.Component { rende...
import React from "react"; import { View } from "react-native"; import { withRouter } from "react-router"; import ListingProvider from "../app/ListingProvider"; import PostListSort from "../components/PostListSort"; import PostList from "../components/PostList"; class ListingResolver extends React.Component { rende...
Use real pathname from location
Use real pathname from location
JavaScript
mit
yanglinz/reddio-next,yanglinz/reddio-next,yanglinz/reddio-next
909b2837f927a4b5afdcccc2cb6e29a5e4b278c1
app/client/admin/components/shared/toolbar/toolbar.controller.js
app/client/admin/components/shared/toolbar/toolbar.controller.js
'use strict'; /** * @module opa */ (function(app) { /** * Manages opaToolbar component. * * @class OpaToolbarController * @constructor * @param {Object} $scope opa-toolbar isolated scope * @param {Object} $window JQLite element of the window * @param {Object} $mdMedia AngularJS Material serv...
'use strict'; /** * @module opa */ (function(app) { /** * Manages opaToolbar component. * * @class OpaToolbarController * @constructor * @param {Object} $mdMedia AngularJS Material service to evaluate media queries */ function OpaToolbarController($mdMedia) { var ctrl = this; Object....
Remove unused dependencies from toolbar component
Remove unused dependencies from toolbar component
JavaScript
agpl-3.0
veo-labs/openveo-portal,veo-labs/openveo-portal,veo-labs/openveo-portal
c10cab06a2115995e818e4e7f8fde6882c554bed
test/all.js
test/all.js
/** * General test runner */ var fs = require('fs'); var files = fs.readdirSync(fs.realpathSync('./test')); console.log(files); for (var i in files) { var pattern = /^(test)\w*\.js$/; if (files.hasOwnProperty(i)) { pattern.lastIndex = 0; if (pattern.test(files[i])) { exports[files[i]] = require('...
/** * General test runner */ var fs = require('fs'); var files = fs.readdirSync(fs.realpathSync('./test')); for (var i in files) { var pattern = /^(test)\w*\.js$/; if (files.hasOwnProperty(i)) { pattern.lastIndex = 0; if (pattern.test(files[i])) { exports[files[i]] = require('./' + files[i].replac...
Clean up overly verbose test output
Clean up overly verbose test output
JavaScript
mit
jay-depot/turnpike,jay-depot/turnpike
f0c0b33c3e7c69bc8e1b704a18f8e206e346cb57
src/index.js
src/index.js
var speculation = function speculation (fn) { // Don't cancel by default: var cancel = ( arguments.length > 1 && arguments[1] !== undefined ) ? arguments[1] : Promise.reject(); return new Promise(function (resolve, reject) { var noop = function noop () {}; var onCancel = function onCancel (han...
var noop = function noop () {}; // HOF Wraps the native Promise API // to add take a shouldCancel promise and add // an onCancel() callback. var speculation = function speculation (fn) { // Don't cancel by default var cancel = ( arguments.length > 1 && arguments[1] !== undefined ) ? arguments[1] : Promis...
Add comments & cleanup formatting.
Add comments & cleanup formatting.
JavaScript
mit
ericelliott/speculation
1e6590e401dc544e7c6e3c608216124e240ee6ce
jest.config.js
jest.config.js
module.exports = { transform: { ".(ts|tsx)": "ts-jest" }, "testEnvironment": "node", "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", "moduleFileExtensions": [ "ts", "tsx", "js" ], "coveragePathIgnorePatterns": [ "/node_modules/", "/test/" ], "collectCoverageFrom": [ "src/*.{js,ts}" ...
module.exports = { transform: { ".(ts|tsx)": "ts-jest" }, "testEnvironment": "node", "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$", "moduleFileExtensions": [ "ts", "tsx", "js" ], "coveragePathIgnorePatterns": [ "/node_modules/", "/test/" ], "collectCoverageFrom": [ "src/**/*.{js,ts...
Include all TypeScript files in coverage
fix(tests): Include all TypeScript files in coverage
JavaScript
mit
aholstenson/transitory,aholstenson/transitory
a73de96c4707b91ea11f92889ada2124528161b9
lib/runtime/alterant/decode-alterant.js
lib/runtime/alterant/decode-alterant.js
/*jslint node: true*/ 'use strict'; /** * Decode the value. * * @param value The value. * @returns The value. */ module.exports = function (value) { // Check if the value is not a string. if (typeof value !== 'string') { // Return the value. return value; } // Return the value. return value.replace(/&#([...
/*jslint node: true*/ 'use strict'; /** * Decode the value. * * @param value The value. * @returns The value. */ module.exports = function (value) { // Check if the value is not a string. if (typeof value !== 'string') { // Return the value. return value; } // Return the value. return value.replace(/&#([...
Allow decode of characters between 1 and 3 digits long
Allow decode of characters between 1 and 3 digits long
JavaScript
mit
barringtonhaynes/gaikan
9b457064997fde1aa218bd65ce9bd04a8dcabddb
index.android.js
index.android.js
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import {Provider} from 'react-redux' import MatchView from './src/components/MatchView' import store from './src...
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry } from 'react-native'; import {Provider} from 'react-redux' import store from './src/store' import RootView from './src/components/RootView' const Fussbolito = Reac...
Use new RootView also on Android
Use new RootView also on Android
JavaScript
mit
asharov/fussbolito,asharov/fussbolito,asharov/fussbolito
f49e4db8c5be936ecf711a8cda3e86d425f7e96d
src/js/helpers/prepare.js
src/js/helpers/prepare.js
/* Clearing variables */ import { getPositionIn, getPositionOut } from './offsetCalculator'; import getInlineOption from './getInlineOption'; const prepare = function($elements, options) { $elements.forEach((el, i) => { const mirror = getInlineOption(el.node, 'mirror', options.mirror); const once = getInlin...
/* Clearing variables */ import { getPositionIn, getPositionOut } from './offsetCalculator'; import getInlineOption from './getInlineOption'; const prepare = function($elements, options) { $elements.forEach((el, i) => { const mirror = getInlineOption(el.node, 'mirror', options.mirror); const once = getInlin...
Remove redundant code breaking tests
Remove redundant code breaking tests
JavaScript
mit
michalsnik/aos
522968de5fe048b701f7cd6600f5592e44bc6a4f
src/index.js
src/index.js
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import Navbar from './components/Navbar.js'; import Header from './components/Header.js'; import Home from './components/Home.js'; import Instruction f...
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import Navbar from './components/Navbar.js'; import Header from './components/Header.js'; import Home from './components/Home.js'; import Instruction f...
Remove unused lines of code.
Remove unused lines of code.
JavaScript
mit
FilmonFeMe/coloreyes,FilmonFeMe/coloreyes
623926ce52dd881b9cec00c05b6c9a7996c9636c
lib/eval.js
lib/eval.js
var _ = require('underscore'); SYMBOL_TABLE = {} exports.define = function (sym, val) { SYMBOL_TABLE[sym] = val; } exports.eval = function eval(form, stack_frame) { if (typeof stack_frame == 'undefined') { stack_frame = SYMBOL_TABLE; } if (_.isEqual(form, null)) { return null; } if (form.type =...
var _ = require('underscore'); SYMBOL_TABLE = {} exports.define = function (sym, val) { SYMBOL_TABLE[sym] = val; } exports.apply = function (fn, args, stack_frame) { if (typeof fn != 'function') throw "cannot evaluate non-function value: " + fn; args.unshift(stack_frame); return fn.apply(undefined, args)...
Refactor out applying function. Throw if invalid.
Refactor out applying function. Throw if invalid.
JavaScript
mit
mikedouglas/conspiracy
8e4fbf59e00475f90dbf7d096550fa906db88370
src/fetch-feed.js
src/fetch-feed.js
var util = require('./util'); module.exports = function fetchFeed(delegate) { // delegate.url: a url string // delegate.verbose: a bool // delegate.onError: an error handler // delegate.onResponse: a response and data handler var request = util.request(delegate.url); request.on('error', function(e) { ...
var util = require('./util'); module.exports = function fetchFeed(delegate) { // delegate.url: a url string // delegate.verbose: a bool // delegate.onError: an error handler // delegate.onResponse: a response and data handler var request = util.request(delegate.url); request.on('error', function(e) { ...
Convert non-200 fetch responses into errors
Convert non-200 fetch responses into errors
JavaScript
mit
hlfcoding/custom-rss
fcde897bd7fbe28579e6a3c2307bd715da1a014f
.eslintrc.js
.eslintrc.js
module.exports = { root: true, env: { 'browser': true }, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, extends: 'airbnb', plugins: [ 'html' ], rules: { 'import/extensions': ['error', 'always', { 'js': 'never', 'vue': 'never' }], } };
module.exports = { root: true, env: { 'browser': true }, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, extends: 'airbnb', plugins: [ 'html' ], rules: { 'import/extensions': ['error', 'always', { 'js': 'never', 'vue': 'never' }], 'no-underscore-d...
Remove comma dangle rule from eslint rules (VueComponent methods use _comma dangle)
Remove comma dangle rule from eslint rules (VueComponent methods use _comma dangle)
JavaScript
mit
eddyerburgh/avoriaz,eddyerburgh/avoriaz,eddyerburgh/avoriaz
1bf03374b7edefdabacefbceb43ca02c6b702920
test/browser/browserstack-runner.js
test/browser/browserstack-runner.js
const reporter = require('mocha/lib/reporters').min; const bridgeTests = require('mocha-selenium-bridge'); const { Builder } = require('selenium-webdriver'); const bsConfig = { project: 'messageformat', 'browserstack.local': 'true', 'browserstack.user': process.env.BROWSERSTACK_USER, 'browserstack.key': proces...
const reporter = require('mocha/lib/reporters').min; const bridgeTests = require('mocha-selenium-bridge'); const { Builder } = require('selenium-webdriver'); const bsConfig = { project: 'messageformat', 'browserstack.local': 'true', 'browserstack.user': process.env.BROWSERSTACK_USER || process.env.BROWSERSTA...
Fix env var name for BrowserStack user
ci: Fix env var name for BrowserStack user
JavaScript
mit
SlexAxton/messageformat.js,SlexAxton/messageformat.js
8361884021d550d663afce82583f1d0cd6807283
neo4j-ogm-docs/src/main/resources/javascript/version.js
neo4j-ogm-docs/src/main/resources/javascript/version.js
window.docMeta = (function () { var version = '3.2'; var name = 'ogm-manual'; var href = window.location.href; return { name: name, version: version, availableDocVersions: ["2.0", "2.1", "3.0", "3.1"], thisPubBaseUri: href.substring(0, href.indexOf(name) + name.length) + '/' + version, unver...
window.docMeta = (function () { var version = '3.2'; var name = 'ogm-manual'; var href = window.location.href; return { name: name, version: version, availableDocVersions: ["2.1", "3.0", "3.1", "3.2"], thisPubBaseUri: href.substring(0, href.indexOf(name) + name.length) + '/' + version, unver...
Add link to 3.2 documentation and remove 2.0 link.
Add link to 3.2 documentation and remove 2.0 link.
JavaScript
apache-2.0
neo4j/neo4j-ogm,neo4j/neo4j-ogm,neo4j/neo4j-ogm,neo4j/neo4j-ogm
2da65957e020bab97b6f3c0ddb67bf291ed0f925
website/static/js/waterbutler.js
website/static/js/waterbutler.js
var $ = require('jquery'); var settings = require('settings'); function getCookie() { match = document.cookie.match(/osf=(.*?)(;|$)/); return match ? match[1] : null; } function buildUrl(metadata, path, provider, file) { path = path || '/'; var baseUrl = settings.WATERBUTLER_URL + (metadata ? 'data?'...
var $ = require('jquery'); var $osf = require('osfHelpers'); var settings = require('settings'); function getCookie() { match = document.cookie.match(/osf=(.*?)(;|$)/); return match ? match[1] : null; } function getViewOnly() { return $osf.urlParams().view_only; } function buildUrl(metadata, path, provide...
Include view-only key in WaterButler URLs.
Include view-only key in WaterButler URLs.
JavaScript
apache-2.0
hmoco/osf.io,amyshi188/osf.io,caseyrollins/osf.io,zkraime/osf.io,asanfilippo7/osf.io,monikagrabowska/osf.io,hmoco/osf.io,lyndsysimon/osf.io,dplorimer/osf,felliott/osf.io,samchrisinger/osf.io,crcresearch/osf.io,aaxelb/osf.io,reinaH/osf.io,Nesiehr/osf.io,sbt9uc/osf.io,cosenal/osf.io,HarryRybacki/osf.io,monikagrabowska/os...
09f98cd872a914cfeab6687ab009a145d5b4fbd9
week-7/group_project_solution.js
week-7/group_project_solution.js
// Release 1: Tests to User Stories /* As as user, I want to be able to do three things: (1) I want to be able to take a list of numbers and find their sum. (2) I want to be able to take a list of numbers and find their mean. (3) I want to be able to take a list of numbers and find their median. */ // Release 2:...
Add code for sum and mean to 7.8
Add code for sum and mean to 7.8
JavaScript
mit
SilverFox70/phase-0,SilverFox70/phase-0,SilverFox70/phase-0
75b115d9779d2f8826ad9c33bb73be80f02d8fe0
public/js/controllers/main.js
public/js/controllers/main.js
'use strict'; angular.module('velo-app').controller('MainCtrl', ['$scope', 'apiService', function ($scope, apiService) { $scope.initialize = function () { var map = L.mapbox.map('map', 'mapbox.streets'); var apiRequest = new XMLHttpRequest(); apiRequest.open('GET', '/api/cities/lyon/stati...
'use strict'; angular.module('velo-app').controller('MainCtrl', ['$scope', 'apiService', function ($scope, apiService) { $scope.initialize = function () { var map = L.mapbox.map('map', 'mapbox.streets'); apiService.getStations().then( function (response) { var stations ...
Use `$http` service to fetch stations data.
Use `$http` service to fetch stations data.
JavaScript
mit
jordanabderrachid/velo-app,jordanabderrachid/velo-app
c07cfefbf1093bfa52a206fae1126b29e29fdc21
.eslintrc.js
.eslintrc.js
module.exports = { "root": true, "env": { "es6": true, "browser": true }, "extends": "eslint:recommended", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "warn", "tab", { "SwitchCase": 1 } ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error"...
module.exports = { "root": true, "env": { "es6": true }, "extends": "eslint:recommended", "parserOptions": { "sourceType": "module" }, "rules": { "indent": [ "warn", "tab", { "SwitchCase": 1 } ], "linebreak-style": [ "error", "unix" ], "quotes": [ "error", "double" ], ...
Revert "Add browser: true to env map to suppress eslint errors for browser globals"
Revert "Add browser: true to env map to suppress eslint errors for browser globals" This reverts commit b314d1b8a1c2ec7c26600b4e7f39f83083a1b835. See commit 79167ab0f855beb6942d576735a19d65f0f503e2.
JavaScript
mit
to2mbn/skinview3d
fbfe04e6f6203394a98a2b246ecc721d8d1f5ec0
src/gm.typeaheadDropdown.js
src/gm.typeaheadDropdown.js
angular.module('gm.typeaheadDropdown', ['ui.bootstrap']) .directive('typeaheadDropdown', function() { return { templateUrl:'templates/typeaheadDropdown.tpl.html', scope: { model:'=ngModel', getOptions:'&options', config:'=?', required:'=?ngRequired' }, replace:true, controller: ['$scope', '$q', f...
angular.module('gm.typeaheadDropdown', ['ui.bootstrap']) .directive('typeaheadDropdown', function() { return { templateUrl:'templates/typeaheadDropdown.tpl.html', scope: { model:'=ngModel', getOptions:'&options', config:'=?', required:'=?ngRequired' }, replace:true, controller: ['$scope', '$q', f...
Fix bug if model is initially null.
Fix bug if model is initially null.
JavaScript
mit
spongessuck/gm.typeaheadDropdown,spongessuck/gm.typeaheadDropdown
5312be998369de295e0c9a4ea88338f8ca0a558b
lib/main.js
lib/main.js
var Watcher = require('large-watcher'); module.exports = function(codebox) { var events = codebox.events; codebox.logger.log("Starting the file watcher"); codebox.workspace.path() .then(function(path) { var watcher = Watcher(path, 2).start(); // Handle deleted files watcher....
var Watcher = require('large-watcher'); module.exports = function(codebox) { var events = codebox.events; codebox.logger.log("Starting the file watcher"); var watcher = Watcher(codebox.workspace.root(), 2).start(); // Handle deleted files watcher.on('deleted', function(files) { codebox....
Use workspace.root() instead of workspace.path()
Use workspace.root() instead of workspace.path()
JavaScript
apache-2.0
etopian/codebox-package-watcher,CodeboxIDE/package-watcher
ff70ff08b9a1f3c5f5c3bcd3966ff00aa91b8910
routes/index.js
routes/index.js
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function(req, res, next) { res.render('index', { title: "Dito's laboratory" }); }); module.exports = router;
var express = require('express'); var router = express.Router(); router.post('/postscore', function(req, res, next) { console.log("posting"); console.log(req); if (next) next(); }); router.get('/postscore', function(req, res, next) { console.log("getting"); console.log(req); if (next) next(); ...
Test commit for Unity WWW
Test commit for Unity WWW
JavaScript
mit
DominikDitoIvosevic/dito.ninja,DominikDitoIvosevic/dito.ninja
ce3a219b04f14d3629bd588ac8a60f004c6b61fd
routes/index.js
routes/index.js
/* * Controllers */ var homeController = require('../controllers/home_controller'); var authController = require('../controllers/authentication_controller'); /* * Routes */ module.exports = function(app, passport){ var authenticate = authController.setUp(authController, passport); app.get('/', homeControll...
/* * Controllers */ var homeController = require('../controllers/home_controller'); var pivotalController = require('../controllers/pivotal_controller'); var authController = require('../controllers/authentication_controller'); /* * Routes */ module.exports = function(app, passport){ var authenticate = ...
Build route for projects api
Build route for projects api
JavaScript
mit
tangosource/pokerestimate,tangosource/pokerestimate
cc5a2f0accc2e878e25066c76189e96f62208bf8
src/lib/guesstimator/samplers/DistributionBeta.js
src/lib/guesstimator/samplers/DistributionBeta.js
import math from 'mathjs'; import {Sample} from './Sampler.js' import {jStat} from 'jstat' export var Sampler = { sample({hits, total}, n) { // This treats your entry as a prior, and assumes you are 2 times more confident than // a raw beta would be. This gives your distribution more of a peak for small numb...
import {simulate} from './Simulator.js' export var Sampler = { sample({hits, total}, n) { // This treats your entry as a prior, and assumes you are 2 times more confident than // a raw beta would be. This gives your distribution more of a peak for small numbers. return simulate(`beta(${2*hits},${2*(total...
Fix beta with new sampling logic.
Fix beta with new sampling logic.
JavaScript
mit
getguesstimate/guesstimate-app
2251da40ce14576b49f05a7de92cf278bf300b1e
src/config/routes.js
src/config/routes.js
// This file defines all routes and function handling these routes. // All routes are accessible using GET and POST methods. const routes = { '/item': require('../controllers/items/byId.js'), '/item/:id': require('../controllers/items/byId.js'), '/items': require('../controllers/items/byIds.js'), '/items/all':...
// This file defines all routes and function handling these routes. // All routes are accessible using GET and POST methods. const routes = { '/item': require('../controllers/items/byId.js'), '/item/:id': require('../controllers/items/byId.js'), '/items': require('../controllers/items/byIds.js'), '/items/all':...
Fix route binding for nested recipes
Fix route binding for nested recipes
JavaScript
agpl-3.0
gw2efficiency/gw2-api.com
edd5d3098b12e6f91c89ffc5dc234b5026f52f51
lib/parsers/babylon.js
lib/parsers/babylon.js
"use strict"; const babylon = require("babylon"); exports.options = { allowImportExportEverywhere: true, allowReturnOutsideFunction: true, plugins: [ "*", "flow", "jsx", // The "*" glob no longer seems to include the following plugins: "objectRestSpread", "classProperties", "exportExtensions...
"use strict"; const babylon = require("babylon"); exports.options = { allowImportExportEverywhere: true, allowReturnOutsideFunction: true, plugins: [ "*", "flow", "jsx", // The "*" glob no longer seems to include the following plugins: "asyncGenerators", "classProperties", "decorators", ...
Enable the rest of Babylon's experimental plugins, for max tolerance.
Enable the rest of Babylon's experimental plugins, for max tolerance.
JavaScript
mit
benjamn/reify,benjamn/reify
51bcf356fc5459e9427dc46eb7abddc17f14f7e0
src/commands/find.js
src/commands/find.js
import moment from 'moment' import textTable from 'text-table' const find = (apiWrapper) => (search, options) => { const { startdate, enddate, businessunitids } = options return new Promise((resolve, reject) => { apiWrapper.getActivities({ startdate, enddate, businessunitids ...
import moment from 'moment' import textTable from 'text-table' const find = (apiWrapper) => (search, options) => { const { startdate, enddate, businessunitids } = options return new Promise((resolve, reject) => { apiWrapper.getActivities({ startdate, enddate, businessunitids ...
Put time and day in separate columns
Put time and day in separate columns
JavaScript
mit
gish/friskis-slack-booking
3421372936284eb4e143524e8ce2fcad9cc0d2ac
lib/sheets/comments.js
lib/sheets/comments.js
var utils = require('../utils/httpUtils.js'); var _ = require('underscore'); var constants = require('../utils/constants.js'); exports.create = function(options) { var optionsToSend = { accessToken : options.accessToken }; var getComment = function(getOptions, callback) { optionsToSend.url = buildUrl(ge...
var utils = require('../utils/httpUtils.js'); var _ = require('underscore'); var constants = require('../utils/constants.js'); exports.create = function(options) { var optionsToSend = { accessToken : options.accessToken }; var getComment = function(getOptions, callback) { optionsToSend.url = buildUrl(ge...
Fix options param names to match their requests.
Fix options param names to match their requests.
JavaScript
apache-2.0
smartsheet-platform/smartsheet-javascript-sdk
87cf5c61ea9a023d125b59688bd687d1d465d8c3
src/sagas.js
src/sagas.js
/** @babel */ /** global atom */ import { delay } from 'redux-saga' import { put, call, select, take, fork } from 'redux-saga/effects' import { run } from 'node-jq' import { ACTIONS as ACTION } from './constants' const ONE_SEC = 1000 // const jq = (filter) => { // return (dispatch, getState) => { // const { ac...
/** @babel */ /** global atom */ import { delay } from 'redux-saga' import { put, call, select, take, fork } from 'redux-saga/effects' import { run } from 'node-jq' import { ACTIONS as ACTION } from './constants' const ONE_SEC = 1000 function * jq () { while (true) { const action = yield take(ACTION.JQ_FILTER_...
Remove commented thunk code in saga
Remove commented thunk code in saga
JavaScript
mit
sanack/atom-jq
e1490ca31e8b47ebcf0c8480d6fbc758a81abe2e
packages/truffle-events/EventManager.js
packages/truffle-events/EventManager.js
const SubscriberAggregator = require("./SubscriberAggregator"); const Emittery = require("emittery"); class EventManager { constructor(eventManagerOptions) { const { logger, muteReporters, globalConfig } = eventManagerOptions; // Keep a reference to these so it can be cloned // if necessary in truffle-c...
const SubscriberAggregator = require("./SubscriberAggregator"); const Emittery = require("emittery"); class EventManager { constructor(eventManagerOptions) { const { logger, muteReporters, globalConfig } = eventManagerOptions; // Keep a reference to these so it can be cloned // if necessary in truffle-c...
Return the result of calling emit on emittery
Return the result of calling emit on emittery
JavaScript
mit
ConsenSys/truffle
e88e85110242e88aefa3e02d36737c09205c1253
lib/args.js
lib/args.js
"use strict"; /** * Handle arguments for backwards compatibility * @param {Object} args * @returns {{config: {}, cb: *}} */ module.exports = function (args) { var config = {}; var cb; switch (args.length) { case 1 : if (isFilesArg(args[0])) { config.files = args...
"use strict"; function isFilesArg (arg) { return Array.isArray(arg) || typeof arg === "string"; } /** * Handle arguments for backwards compatibility * @param {Object} args * @returns {{config: {}, cb: *}} */ module.exports = function (args) { var config = {}; var cb; switch (args.length) { ...
Move function out of the scope
Move function out of the scope
JavaScript
apache-2.0
chengky/browser-sync,nothiphop/browser-sync,pmq20/browser-sync,chengky/browser-sync,portned/browser-sync,schmod/browser-sync,schmod/browser-sync,pepelsbey/browser-sync,BrowserSync/browser-sync,pepelsbey/browser-sync,zhelezko/browser-sync,beni55/browser-sync,lookfirst/browser-sync,guiquanz/browser-sync,BrowserSync/brows...
51dc7616671e8bcfcab0c8067fc3d6364debdfa9
lib/init.js
lib/init.js
var copy = require("./copy"); var path = require("path"); var temp = require("temp").track(); var Config = require("./config"); var Init = function(destination, callback) { var example_directory = path.resolve(path.join(__dirname, "..", "example")); copy(example_directory, destination, callback); } Init.sandbox =...
var copy = require("./copy"); var path = require("path"); var temp = require("temp").track(); var Config = require("./config"); var Init = function(destination, callback) { var example_directory = path.resolve(path.join(__dirname, "..", "example")); copy(example_directory, destination, callback); } Init.sandbox =...
Make Init.sandbox() take an input configuration.
Make Init.sandbox() take an input configuration.
JavaScript
mit
DigixGlobal/truffle,prashantpawar/truffle
cd6a769dc0c6343047632179c2e6c34ea50768e7
lib/util.js
lib/util.js
'use strict'; /* global -Promise */ var Promise = require('bluebird'); var _ = require('underscore'); var glob = require('glob'); var getFileList = function getFileList (files) { var fileList = []; return new Promise(function (resolve, reject) { if (_.isString(files)) { glob(files, function (err, files...
'use strict'; /* global -Promise */ var Promise = require('bluebird'); var _ = require('underscore'); var glob = Promise.promisify(require("glob"));; var getFileList = function getFileList (files) { if (_.isString(files)) { return glob(files); } else if (_.isArray(files)) { var fileSubLists = _.map(files...
Use Promisify and add ability to get String/Array of globs in api
Use Promisify and add ability to get String/Array of globs in api
JavaScript
mit
caniuse-js/caniuse-js
863071cc834c0c9e3b17d668c37f4886da5bd932
test/specs/component/TextSpec.js
test/specs/component/TextSpec.js
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={144}>This is really...
import ReactDOM from 'react-dom'; import React from 'react'; import { shallow, render } from 'enzyme'; import { expect } from 'chai'; import { Text } from 'recharts'; describe('<Text />', () => { it('Does not wrap long text if enough width', () => { const wrapper = shallow( <Text width={200}>This is really...
Update <Text> tests so they are not as particular about browser differences
Update <Text> tests so they are not as particular about browser differences
JavaScript
mit
recharts/recharts,recharts/recharts,sdoomz/recharts,sdoomz/recharts,thoqbk/recharts,recharts/recharts,recharts/recharts,thoqbk/recharts,sdoomz/recharts,thoqbk/recharts
00a1e98c52d51b07a0c051dba6107bc6e99e8916
server/api/geometry/routes.js
server/api/geometry/routes.js
/* eslint-disable new-cap */ const router = require('express').Router(); const jsonParser = require('body-parser').json(); const handlers = require('./handlers'); // Geometry tools router.post('/', jsonParser, handlers.getInEverySystem); router.post('/parse', jsonParser, handlers.parseCoordinates); module.exports ...
/* eslint-disable new-cap */ const router = require('express').Router(); const jsonParser = require('body-parser').json(); const handlers = require('./handlers'); // Geometry tools router.post('/', jsonParser, handlers.getInEverySystem); router.get('/parse', handlers.parseCoordinates); module.exports = router;
Use GET method to parse coordinates
Use GET method to parse coordinates
JavaScript
mit
axelpale/tresdb,axelpale/tresdb
a3c781ff7ad00536ee3b70e93b5832ea4145b7aa
tools/build.conf.js
tools/build.conf.js
({ mainConfigFile: '../requirejs.conf.js', paths: { almond: 'lib/almond/almond' }, baseUrl: '..', name: "streamhub-permalink", include: [ 'almond', 'streamhub-permalink/default-permalink-content-renderer' ], stubModules: ['text', 'hgn', 'json'], out: "../dist/streamhub-permalink.min.js", ...
({ mainConfigFile: '../requirejs.conf.js', paths: { almond: 'lib/almond/almond' }, baseUrl: '..', name: "streamhub-permalink", include: [ 'almond', 'streamhub-permalink/default-permalink-content-renderer' ], stubModules: ['text', 'hgn', 'json'], out: "../dist/streamhub-permalink.min.js", ...
Add uglify2 minification to build
Add uglify2 minification to build
JavaScript
mit
Livefyre/streamhub-permalink,Livefyre/streamhub-permalink
c26eeac896b9a96a51a8ec9b6bb57ab429abda76
src/js/actions/asset-actions.js
src/js/actions/asset-actions.js
//note must be set in gulp .sh config. const ServiceURL = process.env.ASSET_PROCESSING_SERVICE const Endpoints = { imageTagging: ServiceURL + "/image/tags/" } var AssetActions = { getSuggestedTags(mediaObject, callback) { switch(mediaObject.type) { case "image": fetch...
//note must be set in gulp .sh config. const ServiceURL = process.env.ASSET_PROCESSING_SERVICE const Endpoints = { imageTagging: ServiceURL + "/image/tags/" } var AssetActions = { getSuggestedTags(mediaObject, callback) { switch(mediaObject.type) { case "image": fetch...
Fix for automatic tagging, needs to return an empty list instead of null.
Fix for automatic tagging, needs to return an empty list instead of null.
JavaScript
mit
UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy
c3001938537b7f5590d71e536653ebfd083ffa52
packages/react-native-codegen/src/generators/modules/Utils.js
packages/react-native-codegen/src/generators/modules/Utils.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; import type {ObjectTypeAliasTypeShape} from '../../CodegenSchema'; function getTypeA...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict * @format */ 'use strict'; import type { SchemaType, NativeModuleAliasMap, Required, NativeModuleObjectT...
Create utilities for module generators
Create utilities for module generators Summary: There are two operations we do in every NativeModule generator: - We convert the `SchemaType` into a map of NativeModule schemas - If the type-annotation is a TypeAliasTypeAnnotation, we resolve it by doing a lookup on the NativeModuleAliasMap. This is usually followed b...
JavaScript
mit
pandiaraj44/react-native,pandiaraj44/react-native,janicduplessis/react-native,arthuralee/react-native,facebook/react-native,pandiaraj44/react-native,javache/react-native,arthuralee/react-native,arthuralee/react-native,janicduplessis/react-native,facebook/react-native,janicduplessis/react-native,myntra/react-native,pand...
e1123e2de6d9542950967a4128e616ddcbad7259
src/react-chayns-openingtimes/utils/parseTimeString.js
src/react-chayns-openingtimes/utils/parseTimeString.js
export default function parseTimeString(str) { const regexRes = new RegExp('[0-9]{0,2}:[0-9]{0,2}').exec(str); let hours = null; let minutes = null; if (regexRes) { const parts = regexRes[0].split(':'); hours = parseInt(parts[0], 10) || 0; minutes = parseInt(parts[1], 10) || 0; ...
const TIME_STRING_REGEX = /([0-9]{0,2}):([0-9]{0,2})/; export default function parseTimeString(str) { const regexRes = TIME_STRING_REGEX.exec(str); let hours = null; let minutes = null; if (regexRes) { hours = parseInt(regexRes[1], 10) || 0; minutes = parseInt(regexRes[2], 10) || 0; ...
Use regex for parsing TimeString
:recycle: Use regex for parsing TimeString
JavaScript
mit
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
a1d7933c578882aa73b5855961ff8622119c4141
ui/src/data_explorer/components/RawQueryEditor.js
ui/src/data_explorer/components/RawQueryEditor.js
import React, {PropTypes} from 'react' const ENTER = 13 const ESCAPE = 27 const RawQueryEditor = React.createClass({ propTypes: { query: PropTypes.shape({ rawText: PropTypes.string.isRequired, id: PropTypes.string.isRequired, }).isRequired, onUpdate: PropTypes.func.isRequired, }, getInit...
import React, {PropTypes} from 'react' const ENTER = 13 const ESCAPE = 27 const RawQueryEditor = React.createClass({ propTypes: { query: PropTypes.shape({ rawText: PropTypes.string.isRequired, id: PropTypes.string.isRequired, }).isRequired, onUpdate: PropTypes.func.isRequired, }, getInit...
Allow user to type :)
Allow user to type :)
JavaScript
mit
nooproblem/influxdb,li-ang/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,ma...
1d1fdcb0bd822a1b30d9f76c1a37b529216293f2
src/client/react/admin/AdminNavbar/MainNavigation.js
src/client/react/admin/AdminNavbar/MainNavigation.js
import React from 'react'; class MainNavigation extends React.Component { render() { return ( <div> </div> ); } } export default MainNavigation;
import React from 'react'; import { Link } from 'react-router-dom'; const linkStyle = 'pt-button pt-minimal'; class MainNavigation extends React.Component { render() { return ( <div> <a className={linkStyle + ' pt-icon pt-icon-key-escape'} href='/'>Visit site</a> </div> ); } } export default MainN...
Add visit site link to navbar
[ADD] Add visit site link to navbar
JavaScript
mit
bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race
40d2bf71e8515d16866ab1a6f77d562d81bf5c6c
src/readFiles.js
src/readFiles.js
'use strict'; const fs = require('fs-extra'); const marked = require('marked'); const parser = require('./littlePostParser'); module.exports = function readFiles(path) { const posts = []; fs.ensureDirSync(path); fs.readdirSync(path).forEach(file => { let date = file.match(/^(\d{4})-(\d\d?)-(\d\d?)-(.+)\.(md|...
'use strict'; const fs = require('fs-extra'); const marked = require('marked'); const parser = require('./littlePostParser'); module.exports = function readFiles(path) { const posts = []; fs.ensureDirSync(path); fs.readdirSync(path).forEach(file => { let date = file.match(/^(\d{4})-(\d\d?)-(\d\d?)-(.+)\.(md|...
Add `date` to post meta-date-uh 😆
Add `date` to post meta-date-uh 😆
JavaScript
mit
corderophilosophy/tickle-js-ssg,corderophilosophy/tickle-js-ssg
9abe60c45aa83fbbf12553ea4af089ed685da08f
lib/GitterBot.js
lib/GitterBot.js
var Gitter = require('node-gitter'); var fs = require('fs'); var config = fs.existsSync('../config/local.js') ? require('../config/local.js') : {}; /** * Create new instance of GitterBot * @param {String} key Your API key * @constructor */ function GitterBot(key) { this.setApiKey(key); } GitterBot.prototype = {...
var Gitter = require('node-gitter'); /** * Create new instance of GitterBot * @param {String} config Configuration object with `apiKey` and `room` properties * @constructor */ function GitterBot(config) { config = config || {}; this.setApiKey(config.apiKey); this.setRoom(config.room); this.connect(); } G...
Add creating gitter client and listen message
Add creating gitter client and listen message
JavaScript
mit
ghaiklor/uwcua-vii
0bebc89c61b01f40587ac0820c0c3cbf80b63f6e
src/scripts/app/activities/sentences/editSentence.js
src/scripts/app/activities/sentences/editSentence.js
'use strict'; module.exports = /*@ngInject*/ function EditSentence( $scope, SentenceWritingService, $state, _ ) { SentenceWritingService.getSentenceWriting($state.params.id) .then(function(s) { s.category = _.findWhere($scope.availableCategories, function(o) { return o.$id == s.categoryId; ...
'use strict'; module.exports = /*@ngInject*/ function EditSentence( $scope, SentenceWritingService, $state, _ ) { SentenceWritingService.getSentenceWriting($state.params.id) .then(function(s) { s.category = _.findWhere($scope.availableCategories, function(o) { return o.$id == s.categoryId; ...
Add quantity into edit rules.
Add quantity into edit rules.
JavaScript
agpl-3.0
empirical-org/Quill-Grammar,ddmck/Quill-Grammar,empirical-org/Quill-Grammar,empirical-org/Quill-Grammar,ddmck/Quill-Grammar,ddmck/Quill-Grammar
d16d986edec59eed0a73490e4587efd5455e7b28
src/api/emit.js
src/api/emit.js
const CustomEvent = ((Event) => { if (Event) { try { new Event(); // eslint-disable-line no-new } catch (e) { return undefined; } } return Event; })(window.CustomEvent); function createCustomEvent(name, opts = {}) { let e; if (Event) { e = new Event(name, opts); if (opts.detai...
const CustomEvent = ((Event) => { if (Event) { try { new Event(); // eslint-disable-line no-new } catch (e) { return undefined; } } return Event; })(window.CustomEvent); function createCustomEvent(name, opts = {}) { let e; if (Event) { e = new Event(name, opts); if ('detail' i...
Allow detail to be falsy
Allow detail to be falsy
JavaScript
mit
chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs
2b8b8b78926aae2dc3c4a2140893f81a1ce9fb46
test/sapi.js
test/sapi.js
var bag = require('bagofholding'), sandbox = require('sandboxed-module'), should = require('should'), checks, mocks, sapi; describe('sapi', function () { function create(checks, mocks) { return sandbox.require('../lib/sapi', { requires: mocks ? mocks.requires : {}, globals: {} }); } ...
var bag = require('bagofholding'), sandbox = require('sandboxed-module'), should = require('should'), checks, mocks, sapi; describe('sapi', function () { function create(checks, mocks) { return sandbox.require('../lib/sapi', { requires: mocks ? mocks.requires : {}, globals: {} }); } ...
Add constructor and error callback tests.
Add constructor and error callback tests.
JavaScript
mit
cliffano/sapi
d7024ba7638a738d8e730a8663c5b474c16b2b00
components/typography/Text.js
components/typography/Text.js
import React, { PureComponent } from 'react'; import Box from '../box'; import PropTypes from 'prop-types'; import cx from 'classnames'; import theme from './theme.css'; const factory = (baseType, type, defaultElement) => { class Text extends PureComponent { render() { const { children, className, color, e...
import React, { PureComponent } from 'react'; import Box from '../box'; import PropTypes from 'prop-types'; import cx from 'classnames'; import { COLORS } from '../../constants'; import theme from './theme.css'; const factory = (baseType, type, defaultElement) => { class Text extends PureComponent { render() { ...
Use our new colors constant for the 'color' prop type
Use our new colors constant for the 'color' prop type
JavaScript
mit
teamleadercrm/teamleader-ui
f19d140732d9ab951849efdcd51b1fd3c3446226
models/index.js
models/index.js
var Sequelize = require('sequelize'); var inflection = require('inflection'); $config.database.logging = $config.database.log ? console.log : false; var sequelize = new Sequelize($config.database.name, $config.database.user, $config.database.pass, ...
var Sequelize = require('sequelize'); var inflection = require('inflection'); $config.database.logging = $config.database.log ? console.log : false; var sequelize = new Sequelize($config.database.name, $config.database.user, $config.database.pass, ...
Add LONGTEXT type for MySQL
Add LONGTEXT type for MySQL
JavaScript
mit
wikilab/wikilab-api
d1adefd5d3b4dd86afff010c3199864e61275bdb
app/js/arethusa.morph/directives/form_selector.js
app/js/arethusa.morph/directives/form_selector.js
'use strict'; angular.module('arethusa.morph').directive('formSelector', function () { return { restrict: 'A', link: function(scope, element, attrs) { var id = scope.id; function action(event) { event.stopPropagation(); scope.$apply(function() { if (scope.form.selected) ...
'use strict'; angular.module('arethusa.morph').directive('formSelector', function () { return { restrict: 'A', link: function(scope, element, attrs) { var id = scope.id; function action(event) { event.stopPropagation(); scope.$apply(function() { if (scope.form.selected) ...
Use icons and titles in formSelector
Use icons and titles in formSelector
JavaScript
mit
Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa
7d5e3d2f00c57856c5f1364d238e2ab7c3fe81dd
test/package.js
test/package.js
import fs from 'fs'; import test from 'ava'; import pify from 'pify'; import index from '../'; test('every rule should defined in the index file and recommended settings', async t => { const files = await pify(fs.readdir, Promise)('../rules/'); const rules = files.filter(file => file.indexOf('.js') === file.length...
import fs from 'fs'; import test from 'ava'; import pify from 'pify'; import index from '../'; test('every rule should defined in the index file and recommended settings', async t => { const files = await pify(fs.readdir, Promise)('../rules/'); const rules = files.filter(file => file.indexOf('.js') === file.length...
Add tests to make sure each rule has a recommended setting and a description
Add tests to make sure each rule has a recommended setting and a description
JavaScript
mit
eslint-plugin-cleanjs/eslint-plugin-cleanjs,jfmengels/eslint-plugin-fp
89ee84da83644dbdf1984da6f728ac549170d604
src/node/cable.js
src/node/cable.js
import EventEmitter from 'events'; const cable = { __proto__: EventEmitter.prototype, init(websocket) { if (this._websocket) { this._websocket.terminate(); } this._websocket = websocket; this.emit('ready'); }, get websocket() { return new Promise((resolve, reject) => { if (thi...
import EventEmitter from 'events'; const cable = { __proto__: EventEmitter.prototype, // Call as early as possible on new client connecting /* e.g. in a pre-routing http get middleware httpRouter.get('/', (ctx, next) => { peek42.cable.init0(); next(); }); */ init0() { this.init(null...
Tweak peek42 websocket node init code
Tweak peek42 websocket node init code
JavaScript
mit
rpeev/konsole,rpeev/konsole
97929daf840393df65574980362f235af4946545
src/main.js
src/main.js
/* ---------- Electron init ------------------------------------------------- */ import { app, BrowserWindow } from 'electron' /* ---------- Requires ------------------------------------------------------ */ import { host, port } from '../scripts/config' import { isDev } from '../scripts/env' import path from 'path' /*...
/* ---------- Electron init ------------------------------------------------- */ import { app, BrowserWindow } from 'electron' /* ---------- Requires ------------------------------------------------------ */ import { host, port } from '../scripts/config' import { isDev } from '../scripts/env' import path from 'path' /*...
Remove process.exit(0) when windows is closed
Remove process.exit(0) when windows is closed
JavaScript
mit
guillaumearm/react-redux-functional-boilerplate,guillaumearm/react-redux-functional-boilerplate
ed2256078319137956d4d90296a6b530115bf592
src/routes/api.js
src/routes/api.js
import express from 'express'; import eventsGetAll from '../middleware/api/eventsGetAll'; const router = express.Router(); router.get('/', (request, response) => { response.json({success: true}); }); // TODO // - Add GET for all data /data - return data + 200 router.get('/events', eventsGetAll); //router.get('/d...
import express from 'express'; import eventsGetAll from '../middleware/api/eventsGetAll'; const router = express.Router(); router.get('/', (request, response) => { response.json({success: true}); }); // TODO // - Add GET for all data /events - return data + 200 router.get('/events', eventsGetAll); //router.get('...
Refactor API names for future use
Refactor API names for future use
JavaScript
mit
MarcL/js-unit-testing-examples
324cffb9348053a54a5572fb008a38a934ab5aac
src/snake-case.js
src/snake-case.js
import R from 'ramda'; import spaceCase from './space-case.js'; import uncapitalize from './uncapitalize.js'; // a -> a const snakeCase = R.compose( uncapitalize, R.join('_'), R.split(' '), spaceCase ); export default snakeCase;
import R from 'ramda'; import compose from './util/compose.js'; import spaceCase from './space-case.js'; import uncapitalize from './uncapitalize.js'; // a -> a const snakeCase = compose( uncapitalize, R.join('_'), R.split(' '), spaceCase ); export default snakeCase;
Refactor snakeCase function to use custom compose function
Refactor snakeCase function to use custom compose function
JavaScript
mit
restrung/restrung-js
e426e9d0073b6e6fc0a79aacb9147bcb30bb3016
src/components/buttons/AuiButton.js
src/components/buttons/AuiButton.js
export default { render(createComponent) { const attrs = { disabled: this.disabled, href: this.href }; const elementType = this.href ? 'a' : 'button' return createComponent(elementType, { class: this.classObject, attrs }, this.$slots.default) }, props: { compact: ...
export default { render(createComponent) { const attrs = { disabled: this.disabled, href: this.href, target: this.target }; const elementType = this.href ? 'a' : 'button' return createComponent(elementType, { class: this.classObject, attrs }, this.$slots.default) }...
Add target to aui-button links
Add target to aui-button links
JavaScript
mit
spartez/vue-aui,spartez/vue-aui
0768c7bb8d211d2e7e63e91e553df0f2d796a92e
src/ti-console.js
src/ti-console.js
var util = require("util"); var assert = require("assert"); var now = require("date-now"); var _console = {}; var times = {}; var functions = [ ['log','info'], ['info','info'], ['warn','warn'], ['error','error'] ]; functions.forEach(function(tuple) { _console[tuple[0]] = function() { Ti.API[tuple[1]](util.for...
var util = require("util"); var assert = require("assert"); var now = require("date-now"); var _console = {}; var times = {}; var functions = [ ['log','info'], ['info','info'], ['warn','warn'], ['error','error'] ]; functions.forEach(function(tuple) { _console[tuple[0]] = function() { Ti.API[tuple[1]](util.for...
Use `_console` instead of `console`
Use `_console` instead of `console` So that we don’t have to rely on external `console.log` presence.
JavaScript
mit
tonylukasavage/ti-console
e4486f4c175353f4a204fe7d3f57216cbc573985
src/ws-proxy.js
src/ws-proxy.js
import assign from 'lodash.assign' import createDebug from 'debug' import WebSocket from 'ws' const debug = createDebug('xo:wsProxy') const defaults = { // Automatically close the client connection when the remote close. autoClose: true } // Proxy a WebSocket `client` to a remote server which has `url` as // add...
import assign from 'lodash.assign' import createDebug from 'debug' import WebSocket from 'ws' const debug = createDebug('xo:wsProxy') const defaults = { // Automatically close the client connection when the remote close. autoClose: true } // Proxy a WebSocket `client` to a remote server which has `url` as // add...
Fix send error messages in wsProxy.
Fix send error messages in wsProxy.
JavaScript
agpl-3.0
lmcro/xo-web,lmcro/xo-web,vatesfr/xo-web,lmcro/xo-web,vatesfr/xo-web
fb93c3f778bb021d2047138091082c6a0788398d
webapplication/indexing/transformations/split-tags.js
webapplication/indexing/transformations/split-tags.js
'use strict'; const fields = [ 'tags', 'tags_vision', 'tags_verified' ] module.exports = metadata => { fields.forEach(field => { const value = metadata[field]; if(typeof(value) === 'string' && value !== '') { metadata[field] = value.split(','); } else { metadata[field] = []; } })...
'use strict'; const fields = [ 'tags', 'tags_verified' ] module.exports = metadata => { fields.forEach(field => { const value = metadata[field]; if(typeof(value) === 'string' && value !== '') { metadata[field] = value.split(','); } else { metadata[field] = []; } }); return metada...
Remove tags_vision field from splitting of tags -- as it is empty it will have no effect
Remove tags_vision field from splitting of tags -- as it is empty it will have no effect
JavaScript
mit
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
2f36d03cda77a74fda5bd1883c0e7a2a7cb2ab36
api/services/formatter-service.js
api/services/formatter-service.js
let Config = require('../../config'); let url = require('url'); let webHook = url.resolve(Config.app.url, '/codeship/'); class FormatterService { format(type, build) { return defaultFormat(build) } getStartMessage(chatId) { let hook = this.getWebHook(chatId); return `${FormatterService.EMOJI.ship} Hi! I see...
let Config = require('../../config'); let url = require('url'); let webHook = url.resolve(Config.app.url, '/codeship/'); class FormatterService { format(type, build) { return defaultFormat(build) } getStartMessage(chatId) { let hook = this.getWebHook(chatId); return `${FormatterService.EMOJI.ship} Hi! I see...
Move build status to beginning of message
Move build status to beginning of message
JavaScript
mit
freshfox/codeship-telegram-bot,freshfox/codeship-telegram-bot
7f8ac834b5ac9e07f1624883cc399d62974b7226
website/src/app/models/api/public-tags-api.service.js
website/src/app/models/api/public-tags-api.service.js
class PublicTagsAPIService { constructor(publicAPIRoute) { this.publicAPIRoute = publicAPIRoute; } getPopularTags() { return this.publicAPIRoute('tags').one('popular').getList().then( (tags) => tags.plain() ); } } angular.module('materialscommons').service('publicTa...
class PublicTagsAPIService { constructor(Restangular) { this.Restangular = Restangular; } getPopularTags() { return this.Restangular.one('v3').one('getPopularTagsForPublishedDatasets').customPOST().then( (tags) => tags.plain().data ); } } angular.module('materialsco...
Switch to actionhero based API
Switch to actionhero based API
JavaScript
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
c6d10301951acdc6f49cb91b57dc29760b432d3e
types/secret.js
types/secret.js
'use strict'; const crypto = require('crypto'); const Network = require('./network'); const Witness = require('./witness'); const MAX_MEMORY = Math.pow(2, 21) + (64 * 1000); class Secret extends EncryptedPromise { constructor (settings = {}) { super(settings); // assign internal secret this._secret = (...
'use strict'; const EncryptedPromise = require('./promise'); class Secret extends EncryptedPromise { constructor (settings = {}) { super(settings); // assign internal secret this._secret = (typeof settings === 'string') ? settings : JSON.stringify(settings); // TODO: check and document upstream pa...
Add upstream EncryptedPromise class to Secret
Add upstream EncryptedPromise class to Secret
JavaScript
mit
martindale/fabric,martindale/fabric,martindale/fabric
cd365cca6365d2f3aea0f244d3276c0d5f8a6df1
syntax/index.js
syntax/index.js
var assign = require('lodash.assign'); var testrunner = require('../lib/testrunner').testRunner; var es2015 = require('./es2015.json'); var es2016 = require('./es2016.json'); var es2017 = require('./es2017.json'); function syntax() { var es2015Test = testrunner(es2015, 'es2015'); var es2016Test = testrunner(es201...
var testrunner = require('../lib/testrunner').testRunner; var assign = require('../lib/assign'); var es2015 = require('./es2015.json'); var es2016 = require('./es2016.json'); var es2017 = require('./es2017.json'); function syntax() { var es2015Test = testrunner(es2015, 'es2015'); var es2016Test = testrunner(es201...
Use new assign method instead of lodash
Syntax: Use new assign method instead of lodash
JavaScript
mit
Tokimon/es-feature-detection,Tokimon/es-feature-detection,Tokimon/es-feature-detection
be3bd7187ed33c14b590107198da71e6fba7aeef
app/presenters/taxon-presenter.js
app/presenters/taxon-presenter.js
var taxonHelpers = require('../helpers/taxon-helpers.js'); var filterHelpers = require('../helpers/filter-helpers.js'); function TaxonPresenter (taxonSlug, request) { this.taxonSlug = taxonSlug; // the slug of the taxon in the Content Store this.selectedTab = request.query.tab; if (this.selectedTab == undefined)...
var taxonHelpers = require('../helpers/taxon-helpers.js'); var filterHelpers = require('../helpers/filter-helpers.js'); function TaxonPresenter (taxonSlug, request) { this.taxonSlug = taxonSlug; // the slug of the taxon in the Content Store this.selectedTab = request.query.tab; if (this.selectedTab == undefined)...
Add function to TaxonPresenter to resolve view template path from request
Add function to TaxonPresenter to resolve view template path from request Still uses the selected tab for the template name, but now looks for the template in a directory names after the base path. e.g. - '/taxons/:taxonSlug' will render templates from 'app/views/taxons'
JavaScript
mit
alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype
475c73ef704c672965f8efad70334e202e483db0
src/js/index.js
src/js/index.js
"use strict"; var LocalStorageUtils = require("./utils/LocalStorageUtils"); var StateIds = require("./states/States"); var InitializeState = require("./states/InitializeState"); var MenuState = require("./states/MenuState"); var SettingsState = require("./states/SettingsState"); var LoadingState = require("./states/L...
"use strict"; var LocalStorageUtils = require("./utils/LocalStorageUtils"); var StateIds = require("./states/States"); var InitializeState = require("./states/InitializeState"); var MenuState = require("./states/MenuState"); var SettingsState = require("./states/SettingsState"); var LoadingState = require("./states/L...
Fix passed id of state add
Fix passed id of state add
JavaScript
mit
Morathil/ranggln,Morathil/ranggln,Morathil/ranggln,Morathil/ranggln
29e565d176c2a2cff221909fdb4c1fd566a0ddf3
test/spec/test_captcha.js
test/spec/test_captcha.js
/** * Created by sonja on 10/29/16. */
describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); });
Add first javascript test and make the test pass
Add first javascript test and make the test pass
JavaScript
mit
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
ccdb86e55c3dbfb673344e141bc068b83056c782
test/spec/test_captcha.js
test/spec/test_captcha.js
describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); var captcha = new Captcha(); it("Captcha object is not null", function(){ expect(captcha).not.toBeNull(); }); });
describe("The constructor is supposed a proper Captcha object", function() { it('Constructor Captcha exists', function(){ expect(Captcha).toBeDefined(); }); var captcha = new Captcha(); it("Captcha object is not null", function(){ expect(captcha).not.toBeNull(); }); it('captcha ob...
Add test if captcha is instance of Captcha class
Add test if captcha is instance of Captcha class
JavaScript
mit
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
c60b623bc4941fce71c1594db7a554d5ba42a5d4
webapp/src/components/molecules/highcharts/themes.js
webapp/src/components/molecules/highcharts/themes.js
export default { standard: { credits: { enabled: false }, chart: { style: { fontFamily: "'proxima', 'Helvetica', sans-serif' " } }, title: '' } }
export default { standard: { credits: { enabled: false }, chart: { style: { fontFamily: "'proxima', 'Helvetica', sans-serif' ", paddingTop: '20px' // Make room for buttons } }, exporting: { buttons: { contextButton: { symbol: null, text: '...
Move export button in all Highcharts
Move export button in all Highcharts
JavaScript
agpl-3.0
unicef/rhizome,unicef/rhizome,unicef/rhizome,unicef/rhizome
156200098a3e7feada08a41ea7c4da14f049f86d
src/desktop/apps/categories/components/FeaturedGenes.js
src/desktop/apps/categories/components/FeaturedGenes.js
import React from "react" import PropTypes from "prop-types" import styled from "styled-components" import FeaturedGene from "./FeaturedGene" const propTypes = { featuredGeneLinks: PropTypes.array, } const Layout = styled.div` display: none; @media (min-width: 768px) { display: block; padding-top: 1em...
import React from "react" import PropTypes from "prop-types" import styled from "styled-components" import FeaturedGene from "./FeaturedGene" const propTypes = { featuredGeneLinks: PropTypes.array, } const Layout = styled.div` display: none; @media (min-width: 768px) { display: block; padding-top: 1em...
Add valid key for .map'd FeaturedGene components
Add valid key for .map'd FeaturedGene components
JavaScript
mit
joeyAghion/force,oxaudo/force,artsy/force-public,artsy/force,eessex/force,eessex/force,oxaudo/force,joeyAghion/force,joeyAghion/force,artsy/force-public,artsy/force,oxaudo/force,eessex/force,joeyAghion/force,eessex/force,artsy/force,artsy/force,oxaudo/force
f92a511cd9e63e66bb92a1b68c9882ce567e5d11
src/reducers/PrescriptionReducer.js
src/reducers/PrescriptionReducer.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { ROUTES } from '../navigation/constants'; import { UIDatabase } from '../database'; import { PRESCRIPTION_ACTIONS } from '../actions/PrescriptionActions'; const initialState = () => ({ currentTab: 0, transaction: null, items: UIDatabase.o...
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import { ROUTES } from '../navigation/constants'; import { UIDatabase } from '../database'; import { PRESCRIPTION_ACTIONS } from '../actions/PrescriptionActions'; const initialState = () => ({ currentTab: 0, transaction: null, items: UIDatabase.o...
Remove vaccines from normal dispensing window
Remove vaccines from normal dispensing window
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
ed781120958633b55223525533b287964393dc49
plugins/wired.js
plugins/wired.js
var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Wired', version:'0.1', prepareImgLinks:function (callback) { var res = []; hoverZoom.urlReplace(res, 'img', /-\d+x\d+\./, '.' ); hoverZoom.urlReplace(res, ...
var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name:'Wired', version:'0.2', prepareImgLinks:function (callback) { var res = []; hoverZoom.urlReplace(res, 'img', /-\d+x\d+\./, '.' ); hoverZoom.urlReplace(res, ...
Update for plug-in : WiReD
Update for plug-in : WiReD
JavaScript
mit
extesy/hoverzoom,extesy/hoverzoom
f22843697d00cc4bf1c660b9a89fc8f136845d5c
src/views/loggedin/loggedin-view.js
src/views/loggedin/loggedin-view.js
import { View, __, Sidebar, ViewManager, NavBar } from 'erste'; import MainView from '../main-view'; class LoggedInView extends View { constructor() { super(); this.navBar = new NavBar({ title: __('Welcome to beveteran'), hasMenuButton: true, hasBackButton: true...
import { View, __, Sidebar, ViewManager, NavBar } from 'erste'; import MainView from '../main-view'; class LoggedInView extends View { constructor() { super(); this.navBar = new NavBar({ title: __('Welcome to beveteran'), hasMenuButton: true, hasBackButton: true...
Add hasSidebar to LoggedInView to use the drag gesture to reveal the menu
Add hasSidebar to LoggedInView to use the drag gesture to reveal the menu
JavaScript
mit
korayguney/veteranteam_project,zekicelik/veteranteam_project,zekicelik/veteranteam_project,korayguney/veteranteam_project
9733b718f083bf0d82ea0c75d957b81301ea8666
test/drag/drag.js
test/drag/drag.js
steal("../../browser/jquery", "jquerypp/index.js", function($){ window.jQuery = $; var hoveredOnce = false; $(".over").bind('mouseover',function(){ if (!hoveredOnce) { $(this).addClass('hover') $(document.body).append("<input type='text' id='typer' />") hoveredOnce = true; } }) $('#drag') .on("dra...
steal("jquerypp/index.js", function($){ window.jQuery = $; var hoveredOnce = false; $(".over").bind('mouseover',function(){ if (!hoveredOnce) { $(this).addClass('hover') $(document.body).append("<input type='text' id='typer' />") hoveredOnce = true; } }) $('#drag') .on("draginit", function(){}) ...
Fix the funcunit-syn integration “Drag To” test
Fix the funcunit-syn integration “Drag To” test Dragging & dropping works because of jQuery++, so its version of jQuery had to be referenced instead of the `browser/jquery` import.
JavaScript
mit
bitovi/funcunit,bitovi/funcunit,bitovi/funcunit
44e38454ad1412a798f1e25a56155458f788c953
test/lint-test.js
test/lint-test.js
import 'lint-tests'; // eslint-disable-line
import 'lint-tests'; // eslint-disable-line import assert from 'assert'; import Client from '../src/client'; suite('manual-lint-test', () => { const config = { domain: 'sendmecats.myshopify.com', storefrontAccessToken: 'abc123' }; test('it ensures that all Connections include pageInfo', () => { con...
Validate that all Connections include PageInfo
Validate that all Connections include PageInfo
JavaScript
mit
Shopify/js-buy-sdk,Shopify/js-buy-sdk
af4d63748c74c4d6105de099b3d7ff88af708d1b
src/app/modules/source-converter/source-converter.js
src/app/modules/source-converter/source-converter.js
define([ 'marked', 'to-markdown' ], function ( marked, tomarkdown ) { 'use strict'; return (function() { var toHTML = function(src) { marked.setOptions({ breaks: true, table: false }); return marked(src); }; var toMarkdown = function(src) { return tomarkd...
define([ 'marked', 'to-markdown' ], function ( marked, tomarkdown ) { 'use strict'; return (function() { var toHTML = function(src) { marked.setOptions({ breaks: true, tables: false }); return marked(src); }; var toMarkdown = function(src) { return tomark...
Fix marked table options setting
Fix marked table options setting
JavaScript
mit
moneyadviceservice/cms-editor,moneyadviceservice/cms-editor
6ebf3b012f41bc222ef96b22cb55b8398db313d5
route/index.js
route/index.js
'use strict'; module.exports = defineRoute; // Define the route function defineRoute (server, opts) { server.route({ method: 'GET', path: '/', handler: handler, config: { jsonp: 'callback', validate: { query: {}, payload: fal...
'use strict'; module.exports = defineRoute; // Define the route function defineRoute (server, opts) { server.route({ method: 'GET', path: '/', handler: handler, config: { jsonp: 'callback', validate: { query: {}, payload: fal...
Add examples to the endpoint documentation
Add examples to the endpoint documentation
JavaScript
mit
rowanmanning/thingme
a187f52b79e62b1d657bfa314c6c32847881f7a1
routes/item.js
routes/item.js
var Item = require('../models/item').Item; var ItemTypes = require('../models/item').ItemTypes; var ItemStates = require('../models/item').ItemStates; var ItemTypeIcons = require('../models/item').ItemTypeIcons; exports.changeState = function(req, res) { Item.findById(req.query.id, function(err, item) { if (err) { ...
var notifier = require('./notifier'); var xbmc = require('../notifiers/xbmc'); notifier.use(xbmc); var Item = require('../models/item').Item; var ItemTypes = require('../models/item').ItemTypes; var ItemStates = require('../models/item').ItemStates; var ItemTypeIcons = require('../models/item').ItemTypeIcons; export...
Update library on finish state manual set.
Update library on finish state manual set.
JavaScript
mit
ziacik/lumus,ziacik/lumus,ziacik/lumus
ca92ad2e97cde2a9e939abc7a12aa914970e0d9b
tests/helper.js
tests/helper.js
var bs = require('../lib/beanstalk_client'); var net = require('net'); var port = process.env.BEANSTALK_PORT || 11333; var mock = process.env.BEANSTALKD !== '1'; var mock_server; var connection; module.exports = { bind : function (fn, closeOnEnd) { if(!mock) { return false; } mock_server = net.createSer...
var bs = require('../lib/beanstalk_client'); var net = require('net'); var port = process.env.BEANSTALK_PORT || 11333; var mock = process.env.BEANSTALKD !== '1'; var mock_server; var connection; module.exports = { bind : function (fn, closeOnEnd) { if(!mock) { return false; } mock_server = net.createSer...
Add switch to activate debug in tests
Add switch to activate debug in tests Helpful in developing tests
JavaScript
mit
pascalopitz/nodestalker
1bbd54e1fbedeb337fd33610ead89d81e6ecf2c9
text/boolean.js
text/boolean.js
'use strict'; var d = require('es5-ext/lib/Object/descriptor') , Db = require('dbjs') , DOMText = require('./_text') , getValue = Object.getOwnPropertyDescriptor(DOMText.prototype, 'value').get , Base = Db.Base , Text; Text = function (document, ns) { this.document = document; this.ns = ns;...
'use strict'; var d = require('es5-ext/lib/Object/descriptor') , Db = require('dbjs') , DOMText = require('./_text') , getValue = Object.getOwnPropertyDescriptor(DOMText.prototype, 'value').get , Base = Db.Base , Text; Text = function (document, ns, options) { this.document = document; this...
Use labels definied on relation if available
Use labels definied on relation if available
JavaScript
mit
medikoo/dbjs-dom
21c51b43e81696fd90510a8690b0d86d2e03999f
app/users/user-links.directive.js
app/users/user-links.directive.js
{ angular .module('meganote.users') .directive('userLinks', [ 'CurrentUser', (CurrentUser) => { class UserLinksController { user() { return CurrentUser.get(); } signedIn() { return CurrentUser.signedIn(); } } ...
{ angular .module('meganote.users') .directive('userLinks', [ 'CurrentUser', (CurrentUser) => { class UserLinksController { user() { return CurrentUser.get(); } signedIn() { return CurrentUser.signedIn(); } } ...
Add sign up link that shows if no user is signed in
Add sign up link that shows if no user is signed in
JavaScript
mit
sbaughman/meganote,sbaughman/meganote
2ab9cc689d2c32c15565ea8a46d5ad8841ea5942
tests/plugins/markdown.js
tests/plugins/markdown.js
import test from 'ava'; import {fromString} from '../helpers/pipe'; import markdown from '../../lib/plugins/markdown'; test('Compiles Markdown - .md', t => { const input = '# Hello World'; const expected = '<h1>Hello World</h1>\n'; return fromString(input, 'markdown/hello.md', markdown) .then(output => { ...
import test from 'ava'; import {fromString, fromNull, fromStream} from '../helpers/pipe'; import markdown from '../../lib/plugins/markdown'; test('Compiles Markdown - .md', t => { const input = '# Hello World'; const expected = '<h1>Hello World</h1>\n'; return fromString(input, 'markdown/hello.md', markdown) ...
Add Custom Plugin and No Compile
:white_check_mark: Add Custom Plugin and No Compile * Make sure custom plugins are used when rendering Markdown * Add test for null file * Add test for streams that throw errors
JavaScript
mit
kellychurchill/gulp-armadillo,Snugug/gulp-armadillo
468fb779830bd727aef77d55e85942ee288fd0d9
src/components/Badge/index.js
src/components/Badge/index.js
import { h, Component } from 'preact'; import style from './style'; import Icon from '../Icon'; export default class Badge extends Component { render() { const { artist, event, small } = this.props; if (!event && !artist) { return; } if (artist && artist.onTourUntil) { return ( ...
import { h, Component } from 'preact'; import style from './style'; import Icon from '../Icon'; export default class Badge extends Component { render() { const { event, small } = this.props; if (!event) { return; } if (event.cancelled) { return ( <span class={`${style.badge} ${...
Remove some artist code in Badge component
Remove some artist code in Badge component
JavaScript
mit
zaccolley/songkick.pink,zaccolley/songkick.pink