commit stringlengths 40 40 | old_file stringlengths 4 236 | new_file stringlengths 4 236 | old_contents stringlengths 1 3.26k | new_contents stringlengths 16 4.43k | subject stringlengths 16 624 | message stringlengths 17 3.29k | lang stringclasses 5
values | license stringclasses 13
values | repos stringlengths 5 91.5k |
|---|---|---|---|---|---|---|---|---|---|
a6fff91c97fadbdc1bc7ee7cf59134d371f5afe7 | lib/passport.js | lib/passport.js | let passport = require('passport');
let LocalStrategy = require('passport-local').Strategy;
let bcrypt = require('bcrypt-nodejs');
let _ = require('lodash');
let uuid = require('uuid/v1');
module.exports = (app, db, log) => {
app.use(passport.initialize());
app.use(passport.session());
passport.serializeUser((u... | let passport = require('passport');
let LocalStrategy = require('passport-local').Strategy;
let bcrypt = require('bcrypt-nodejs');
let _ = require('lodash');
let uuid = require('uuid/v1');
module.exports = (app, db, log) => {
app.use(passport.initialize());
app.use(passport.session());
passport.serializeUser((u... | Remove user password from req.user | Remove user password from req.user
| JavaScript | mit | dhjohn0/express-yourself,dhjohn0/express-yourself |
39877901da6be7b8fd9a2cc65a8e7ad6e9572f32 | lib/index.js | lib/index.js | /**
* Created by Umayr Shahid on 4/28/16.
*/
'use strict';
const ParenthesisRegex = /\([^()"]*(?:"[^"]*"[^()"]*)*\)/;
const Dictionary = Object.freeze({
'AND': '&&',
'OR': '||'
});
const evaluate = require('safe-eval');
class Slq {
constructor(target) {
this.target = target;
}
query(q) {
let ma... | /**
* Created by Umayr Shahid on 4/28/16.
*/
'use strict';
const ParenthesisRegex = /\([^()"]*(?:"[^"]*"[^()"]*)*\)/;
const Dictionary = Object.freeze({
'AND': '&&',
'OR': '||'
});
const evaluate = require('safe-eval');
class Slq {
constructor(target) {
this.target = target;
}
query(q) {
if (q ... | Throw error at invalid inputs | Throw error at invalid inputs
| JavaScript | mit | umayr/slq |
609599ec193656cf4501b5af47ab2a181343a591 | lib/index.js | lib/index.js | 'use strict';
const Glue = require('glue');
const Package = require('../package.json');
const internals = {
manifest: {
connections: [
{
host: process.env.LOG_SERVER_HOST || 'localhost',
port: process.env.LOG_SERVER_PORT || 8080,
labels: ['api'],... | 'use strict';
const Glue = require('glue');
const Package = require('../package.json');
const internals = {
manifest: {
connections: [
{
host: process.env.LOG_SERVER_HOST || 'localhost',
port: process.env.LOG_SERVER_PORT || 8080,
labels: ['api'],... | Fix title of swagger api | Fix title of swagger api
Used swagger options from different project (shame on me). Change title
to ‘Microbrew.it Log Server’.
| JavaScript | mit | Microbrewit/microbrewit-logserver |
b718ae78b8cbc0c728966ef0c38942e5f0f5ac62 | lib/index.js | lib/index.js | const fetchQueryColors = require('./bing').fetchQueryColors;
const createDefaultPalette = require('./palette').createDefaultPalette;
const matchTermToColor = require('./matcher').matchTermToColor;
const ColorClassifier = {
classify: (term, options) => {
if (!term || (typeof term !== 'string') || term.length === ... | const Color = require('color');
const fetchQueryColors = require('./bing').fetchQueryColors;
const createDefaultPalette = require('./palette').createDefaultPalette;
const matchTermToColor = require('./matcher').matchTermToColor;
const ColorClassifier = {
classify: (term, options) => {
if (!term || (typeof term !... | Check for correct palette type and map to color objects in classify function | Check for correct palette type and map to color objects in classify function
| JavaScript | mit | malwilley/color-of |
689b2c5a9d9a060a72594f518ecc4a1fb55d6160 | test/main-test.js | test/main-test.js | require.config({
paths: {
"goo": "src/goo",
"test": "test"
},
waitSeconds: 5
});
require(['test/mathTest'], function(mathTest) {
window.__testacular__.start();
});
| require.config({
paths: {
"goo": "src/goo",
"test": "test"
},
waitSeconds: 5
});
require([
'test/mathTest',
'test/shapesTest'
],
function(mathTest) {
window.__testacular__.start();
});
| Add shape tests to main testacular run. | Add shape tests to main testacular run.
rherlitz/GooEngine#51
| JavaScript | mit | GooTechnologies/goojs,GooTechnologies/goojs,GooTechnologies/goojs |
55d8371104cb6afb8dbb299999cfc4790103e1be | app/components/iframe.js | app/components/iframe.js | const React = require('react')
const IFrame = ({ css, html, id }) => {
const content = '<style>' + css + '</style>' + html
return React.createElement('iframe', {
id,
src: 'data:text/html;charset=utf-8,' + encodeURI(content),
})
}
IFrame.propTypes = {
id: React.PropTypes.string.isRequired,
css: React... | const React = require('react')
const IFrame = ({ css, html, id }) => {
const content = '<style>' + css + '</style>' + html
return React.createElement('iframe', {
id,
key: html,
src: 'data:text/html;charset=utf-8,' + encodeURI(content),
})
}
IFrame.propTypes = {
id: React.PropTypes.string.isRequire... | Fix preview from not updating. | Fix preview from not updating.
| JavaScript | mit | tinytacoteam/zazu,tinytacoteam/zazu |
ee732c24c47ae45d07dcf36c38205eb0dac6b9e9 | src/focus/setting.js | src/focus/setting.js | console.log( "==== simpread focus setting load ====" )
import Dialog, { getDialogBackground } from 'dialog'
function Render() {
ReactDOM.render(
<Dialog />,
getDialogBackground()
)
}
module.exports.Render = Render; | console.log( "==== simpread focus setting load ====" )
import Dialog, { getDialogBackground } from 'dialog'
/**
* Setting Render
*/
function Render() {
ReactDOM.render(
<Dialog />,
getDialogBackground()
)
}
module.exports.Render = Render; | Add same comment to dialog.jsx. | Add same comment to dialog.jsx.
| JavaScript | mit | ksky521/simpread,ksky521/simpread |
90a3fdb8fce4a6f7f98d1b969715451236ac9a2d | app/components/AddInput.js | app/components/AddInput.js | // @flow
import React, { Component } from "react";
import { connect } from "react-redux";
import { addTask } from "../actions/task";
import type { actionType } from "../reducers/task";
type Props = {
cancel: () => void,
dispatch: (action: actionType) => void
};
type State = {
pomodoros: number
};
class AddInput... | // @flow
import React, { Component } from "react";
import { connect } from "react-redux";
import { addTask } from "../actions/task";
import type { actionType } from "../reducers/task";
type Props = {
cancel: () => void,
dispatch: (action: actionType) => void
};
type State = {
pomodoros: number
};
class AddInput... | Add Pomodoro and remove pomodoro functionality | Add Pomodoro and remove pomodoro functionality
| JavaScript | mit | Zyst/Aergia,Zyst/Aergia |
1841359684d67c4d2be8411dd68b949c9315eca2 | js/models/transform/Isolate.js | js/models/transform/Isolate.js | /**
* Focus on a single presentation.
*/
ds.models.transform.Isolate = function(options) {
'use strict'
var self =
limivorous.observable()
.extend(ds.models.transform.transform, {
display_name: 'Isolate',
transform_name: 'isolate',
transform_type:... | /**
* Focus on a single presentation.
*/
ds.models.transform.Isolate = function(options) {
'use strict'
var self =
limivorous.observable()
.extend(ds.models.transform.transform, {
display_name: 'Isolate',
transform_name: 'isolate',
transform_type:... | Allow setting cell style on isolate override | Allow setting cell style on isolate override
| JavaScript | apache-2.0 | aalpern/tessera,section-io/tessera,section-io/tessera,aalpern/tessera,tessera-metrics/tessera,aalpern/tessera,tessera-metrics/tessera,section-io/tessera,filippog/tessera,urbanairship/tessera,aalpern/tessera,urbanairship/tessera,filippog/tessera,urbanairship/tessera,filippog/tessera,aalpern/tessera,Slach/tessera,tessera... |
ba749475e17abf7854d51583c62e33da200db654 | app/weaponDataRefresher.js | app/weaponDataRefresher.js | const postal = require('postal');
const logger = require('logger');
const md5 = require('md5');
let rawWeaponDataMD5;
function onLoadHandler(response) {
logger.log('weaponDataRefresher.js: Weapon data fetched');
const responseText = response.responseText;
if (rawWeaponDataMD5 === md5(responseText)) {
logg... | const postal = require('postal');
const logger = require('logger');
const md5 = require('md5');
let rawWeaponDataMD5;
function onLoadHandler(response) {
logger.log('weaponDataRefresher.js: Weapon data fetched');
const responseText = response.responseText;
if (rawWeaponDataMD5 === md5(responseText)) {
logg... | Switch to using fatebus for publishing | Switch to using fatebus for publishing
| JavaScript | mit | rslifka/fate_of_all_fools,rslifka/fate_of_all_fools |
ace7948cc517ab05f4d44e77d0293bb1e512a4d6 | src/runner/runner.js | src/runner/runner.js | "use strict";
const runall = async function(commands, state, model) {
for (let idx = 0 ; idx != commands.length ; ++idx) {
const cm = commands[idx];
if (cm.command.check(model)) {
cm.hasStarted = true;
try {
if (! await cm.command.run(state, model)) {... | "use strict";
const runall = async function(commands, state, model) {
for (let idx = 0 ; idx != commands.length ; ++idx) {
const cm = commands[idx];
if (cm.command.check(model)) {
cm.hasStarted = true;
try {
const status = await cm.command.run(state, mod... | Allow no return from run | Allow no return from run
| JavaScript | mit | dubzzz/jsverify-commands |
3c30f54884743cdb5bfacde3242ebd2a7019d8a3 | lib/plugins/stylus-includes.js | lib/plugins/stylus-includes.js | var Async = require('async'),
Fs = require('fs'),
Glob = require('glob'),
Path = require('path'),
RawSource = require('webpack-core/lib/RawSource');
module.exports = function(options) {
this.options = options;
};
module.exports.prototype.apply = function(compiler) {
var options = this.options;
c... | var Async = require('async'),
Fs = require('fs'),
Glob = require('glob'),
Path = require('path'),
RawSource = require('webpack-core/lib/RawSource');
module.exports = function(options) {
this.options = options;
};
module.exports.prototype.apply = function(compiler) {
var options = this.options;
c... | Resolve includeDir relative to the project context | Resolve includeDir relative to the project context | JavaScript | mit | walmartlabs/circus-stylus |
90e68fa5a3e0e8a05637ed3778b4327917be237e | models/index.js | models/index.js | const env = require('../lib/environment');
const crypto = require('crypto');
const mongoose = require('mongoose');
const opts = env.get('mongo');
const authOpts = {};
if (opts.pass){
authOpts.pass = opts.pass;
}
if (opts.user){
authOpts.user = opts.user;
}
const connection = module.exports = Object.create(
mong... | const env = require('../lib/environment');
const crypto = require('crypto');
const mongoose = require('mongoose');
const opts = env.get('mongo');
const util = require('../lib/util');
const authOpts = {};
if (opts.pass){
authOpts.pass = opts.pass;
}
if (opts.user){
authOpts.user = opts.user;
}
const connection = m... | Use pseudorandom characters in generateId | Use pseudorandom characters in generateId
| JavaScript | mpl-2.0 | bdgio/msol-site,mozilla/openbadger,kayaelle/msol-badger,mozilla/openbadger,kayaelle/msol-badger,kayaelle/msol-badger,bdgio/msol-site,bdgio/msol-site |
b78e15bebd88072a05e82ab99b475d3a606d09e6 | spec/javascripts/spec/licensing/preprocessors/spec.partial_experience_warning.js | spec/javascripts/spec/licensing/preprocessors/spec.partial_experience_warning.js | define(['licensing/controllers/preprocessors/partial_experience_warning'],
function (preprocessor) {
describe("whatever", function () {
afterEach(function () {
$('#global-browser-prompt').remove();
});
it ("blah", function () {
$('body').append('<div id="global-browser-prompt"><p>Foo</p></div... | define(['licensing/controllers/preprocessors/partial_experience_warning'],
function (preprocessor) {
describe("whatever", function () {
afterEach(function () {
$('#global-browser-prompt').remove();
});
it ("blah", function () {
$('body').append('<div id="global-browser-prompt"><p>Foo</p></div... | Fix test for browser warning preprocessor | Fix test for browser warning preprocessor
| JavaScript | mit | gds-attic/limelight,gds-attic/limelight,gds-attic/limelight |
f550fea9c29bca3c9536bc646a9f89d5fe621b36 | models/photo.js | models/photo.js | // grab the things we need
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// create a schema
var photoSchema = new Schema({
title: String,
slug: String,
status: String,
description: String,
author: {
name: String,
email: String,
username: String
},
meta: {
year: Number,... | /*
|--------------------------------------------------------------------------
| Imports
|--------------------------------------------------------------------------
*/
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
/*
|--------------------------------------------------------------------------
| Def... | Update comments in Photo model | Update comments in Photo model
| JavaScript | mit | mhovey/photos-api,mhovey/photos |
7e32b26d1ce84f5d8f4a73e9415fc818f998f4aa | is-implemented.js | is-implemented.js | 'use strict';
module.exports = function () {
var map, iterator, result;
if (typeof Map !== 'function') return false;
if (String(Map.prototype) !== '[object Map]') return false;
try {
// WebKit doesn't support arguments and crashes
map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
} catch (e)... | 'use strict';
module.exports = function () {
var map, iterator, result;
if (typeof Map !== 'function') return false;
if (String(Map.prototype) !== '[object Map]') return false;
try {
// WebKit doesn't support arguments and crashes
map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
} catch (e)... | Remove leftovers after logic cleanup | Remove leftovers after logic cleanup
| JavaScript | mit | medikoo/es6-map |
cfc8fa9c7fa087a57a629083458049bfa8201298 | jquery.if-else.js | jquery.if-else.js | /**
* jQuery if-else plugin
*
* Creates if(), else() and fi() methods that can be used in
* a chain of methods on jQuery objects
*
* @author Vegard Løkken <vegard@headspin.no>
* @copyright 2013
* @version 0.1
* @licence MIT
*/
;(function( $ ) {
/* Undef object that all chained jQuery methods work on
... | /**
* jQuery if-else plugin
*
* Creates if(), else() and fi() methods that can be used in
* a chain of methods on jQuery objects
*
* @author Vegard Løkken <vegard@headspin.no>
* @copyright 2013
* @version 0.2
* @licence MIT
*/
;(function( $ ) {
/* Undef object that all chained jQuery methods work on
... | Make it possible to chain if's | Make it possible to chain if's | JavaScript | mit | veloek/jquery.if-else |
71579d4fed47212f6e5a9b7514b491290e8bffed | js/jqplot-behaviors.js | js/jqplot-behaviors.js | Drupal.behaviors.jqPlot = function(context) {
var replace = ['renderer', 'markerRenderer', 'labelRenderer', 'parseX',
'parseY', 'scrapeSingle', 'scrapeMultiple', 'processSeries'];
$.each(Drupal.settings.jqPlot, function(selector, settings) {
settings = Drupal.jqPlot.replaceFunctions(settings, replace);
... | Drupal.behaviors.jqPlot = function(context) {
if (Drupal.settings.jqPlot) {
var replace = ['renderer', 'markerRenderer', 'labelRenderer', 'parseX',
'parseY', 'scrapeSingle', 'scrapeMultiple', 'processSeries'];
$.each(Drupal.settings.jqPlot, function(selector, settings) {
settings = Drupal.jqPlot.... | Add conditional in case no settings exist. | Add conditional in case no settings exist.
| JavaScript | bsd-3-clause | ecenter/jqplot |
ba323797eb475c1203b44a16a4a881582fcc769f | js/models/Repo.js | js/models/Repo.js | define(
[
'jquery',
'backbone',
'underscore',
'moment'
],
function ($, Backbone, _, moment) {
"use strict";
return Backbone.Model.extend({
url : function() {
var base = $('body').data('api-url') + '/repos';
return... | define(
[
'jquery',
'backbone',
'underscore',
'moment'
],
function ($, Backbone, _, moment) {
"use strict";
return Backbone.Model.extend({
url : function() {
var base = $('body').data('api-url') + '/repos';
return... | Fix getter if no date found | Fix getter if no date found
| JavaScript | mit | willdurand/TravisLight,willdurand/TravisLight,willdurand/TravisLight |
c3b6928b7abd44c7dc6f63a3b23ce709c9464a08 | src/client/gral/constants.js | src/client/gral/constants.js | // @flow
import tinycolor from 'tinycolor2';
const BASE_COLOR = tinycolor('aliceblue')
.spin(40)
.toHexString();
const BASE_COLOR2 = tinycolor('aliceblue')
.spin(10)
.toHexString();
const COLORS = {
light: BASE_COLOR,
lightAlt: BASE_COLOR2,
medium: tinycolor(BASE_COLOR)
.darken(5)
.toHexString()... | // @flow
/* eslint-env browser */
import tinycolor from 'tinycolor2';
// Detect theme
let THEME;
try {
THEME = new URL(document.location).searchParams.get('theme');
} catch (err) {
/* ignore */
}
const BASE_COLOR = tinycolor('aliceblue')
.spin(40)
.toHexString();
const BASE_COLOR2 = tinycolor('aliceblue')
... | Allow some theming via URL | Allow some theming via URL
| JavaScript | mit | guigrpa/mady,guigrpa/mady,guigrpa/mady |
e50c447484e0190c6adde372f7ae7efb0f11cd48 | src/commands/common-yargs.js | src/commands/common-yargs.js | import yargs from 'yargs';
import { version } from '../../package.json';
export default function appendCommon() {
yargs.usage(`CSS Band Aid v${version}`.magenta + ` - Tools to ensure CSS files meet IE 6-9 selector limit restrictions.`)
.epilogue('For additional information see http://blesscss.com')
.wrap(nul... | import yargs from 'yargs';
import { version } from '../../package.json';
export default function appendCommon() {
yargs.usage(`BlessCSS v${version}`.magenta + ` - Tools to ensure CSS files meet IE 6-9 selector limit restrictions.`)
.epilogue('For additional information see http://blesscss.com')
.wrap(null);
... | Fix Missed CSS Band-aid to BlessCSS | Fix Missed CSS Band-aid to BlessCSS
| JavaScript | apache-2.0 | BlessCSS/bless |
9e8f9b86a4551c3975d8e6b5ceff4b145f02b830 | src/components/PlayerList.js | src/components/PlayerList.js | import React from 'react'
import PlayerListRow from './PlayerListRow'
import UserColor from './UserColor'
import UserName from './Username'
import './PlayerList.css'
const colors = [
'firebrick',
'hotpink',
'tomato',
'peachpuff',
'thistle',
'darkorchid',
'plategreen',
'mediumaquamarine',
'plateturquo... | import React from 'react'
import PlayerListRow from './PlayerListRow'
import './PlayerList.css'
/*const colors = [
'firebrick',
'hotpink',
'tomato',
'peachpuff',
'thistle',
'darkorchid',
'plategreen',
'mediumaquamarine',
'plateturquoise',
'lightsteelblue',
'wheat',
'mistyrose'
]*/
const Player... | Fix some warnings about playerlist | Fix some warnings about playerlist
| JavaScript | mit | hostables/musicquiz,hostables/musicquiz |
d4f1387bf2728df3f7b3606d90a1c97040aeda1c | webpack.config.js | webpack.config.js | var pkg = require('./package.json');
var node_modules = __dirname + '/node_modules';
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var environment = process.env.NODE_ENV;
module.exports = {
devtool: 'inline-source-map',
cache: true,
resolve: {
extensions: ['', '.jsx', '.scss', '.js', '.json... | var pkg = require('./package.json');
var node_modules = __dirname + '/node_modules';
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var environment = process.env.NODE_ENV;
module.exports = {
cache: true,
resolve: {
extensions: ['', '.jsx', '.scss', '.js', '.json']
},
context: __dirname,
... | Disable source mapping to speed up build time | Disable source mapping to speed up build time
| JavaScript | mit | showings/react-toolbox,showings/react-toolbox,react-toolbox/react-toolbox,soyjavi/react-toolbox,react-toolbox/react-toolbox,KerenChandran/react-toolbox,rubenmoya/react-toolbox,rubenmoya/react-toolbox,soyjavi/react-toolbox,DigitalRiver/react-atlas,jasonleibowitz/react-toolbox,rubenmoya/react-toolbox,KerenChandran/react-... |
e9f72fc8fead6bbf5192fdf01afd8c71bb6dda9e | webpack.config.js | webpack.config.js | // webpack.config.js
var Encore = require('@symfony/webpack-encore');
Encore
// directory where all compiled assets will be stored
.setOutputPath('web/assets/js/')
// what's the public path to this directory (relative to your project's document root dir)
.setPublicPath('/js')
// empty the outputPat... | // webpack.config.js
var Encore = require('@symfony/webpack-encore');
Encore
// directory where all compiled assets will be stored
.setOutputPath('web/assets/js')
// what's the public path to this directory (relative to your project's document root dir)
.setPublicPath('/assets/js')
// empty the out... | Create shared global js/css via webpack | Create shared global js/css via webpack
| JavaScript | mit | molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec |
e32d3f94b994e4994f9ddd8fbee4db2ded2a7f4a | webpack.config.js | webpack.config.js | 'use strict'
var webpack = require('webpack')
var reactExternal = {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
}
module.exports = {
externals: {
'react': reactExternal
},
module: {
loaders: [
{ test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ }
... | 'use strict'
var webpack = require('webpack')
var reactExternal = {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
}
var reduxExternal = {
root: 'Redux',
commonjs2: 'redux',
commonjs: 'redux',
amd: 'redux'
}
var reactReduxExternal = {
root: 'ReactRedux',
commonjs2: 'react-redu... | Add Redux and React Redux as external dependencies | Add Redux and React Redux as external dependencies
| JavaScript | mit | erikras/redux-form,erikras/redux-form |
2ef1ab53bf407d857f31504fd8233d9f8f293b4c | lib/WebSocketServer.js | lib/WebSocketServer.js | var ws = require('nodejs-websocket');
/**
* Triggers when connections is established
* @param connection
* @private
*/
function _onConnection(connection) {
connection.on('close', console.log.bind(console.log, 'Connection is closed -'));
}
/**
* Returns Server
* @param {String} port
* @returns {Object}
*/
fu... | var ws = require('nodejs-websocket');
/**
* Triggers when connections is established
* @param connection
* @private
*/
function _onConnection(connection) {
console.log('Connections is established');
connection.on('error', console.error.bind(console.error));
connection.on('close', console.log.bind(console.log... | Add error listeners to socket server | Add error listeners to socket server
| JavaScript | mit | ghaiklor/tessel-vesnasoft-2015 |
f1e5096e706a4f96b59aaeee420e9c223a95df5c | app/assets/javascripts/channels/messages.js | app/assets/javascripts/channels/messages.js | //= require action_cable
//= require_self
//= require_tree .
this.App = {};
App.cable = ActionCable.createConsumer();
App.messages = App.cable.subscriptions.create('MessagesChannel', {
received: function(data) {
console.log(data)
$('#messages').removeClass('hidden')
// append message
$('#messages')... | //= require action_cable
//= require_self
//= require_tree .
this.App = {};
App.cable = ActionCable.createConsumer();
App.messages = App.cable.subscriptions.create('MessagesChannel', {
received: function(data) {
console.log(data)
$('#messages').removeClass('hidden')
// append message
$('#messages')... | Clear input field when receiving | Clear input field when receiving | JavaScript | mit | elgrillo83/cfb-hasenheide,cfb-hasenheide/cfb-hasenheide,elgrillo83/cfb-hasenheide,cfb-hasenheide/cfb-hasenheide,elgrillo83/cfb-hasenheide,cfb-hasenheide/cfb-hasenheide,elgrillo83/cfb-hasenheide,cfb-hasenheide/cfb-hasenheide |
9fd2085b9958c06b0521853bd2f41fd0c5dc8be5 | helpers/gh-format-markdown.js | helpers/gh-format-markdown.js | /* global Showdown, Handlebars, html_sanitize*/
import cajaSanitizers from 'ghost/utils/caja-sanitizers';
var showdown,
formatMarkdown;
showdown = new Showdown.converter({extensions: ['ghostimagepreview', 'ghostgfm']});
formatMarkdown = Ember.Handlebars.makeBoundHelper(function (markdown) {
var escapedhtml =... | /* global Showdown, Handlebars, html_sanitize*/
import cajaSanitizers from 'ghost/utils/caja-sanitizers';
var showdown,
formatMarkdown;
showdown = new Showdown.converter({extensions: ['ghostimagepreview', 'ghostgfm', 'footnotes']});
formatMarkdown = Ember.Handlebars.makeBoundHelper(function (markdown) {
var ... | Add footnotes extension to showdown | Add footnotes extension to showdown
refs 1318
- based on Markdown Extra https://michelf.ca/projects/php-markdown/extra/
- allows [^n] for automatic numbering based on sequence
| JavaScript | mit | kevinansfield/Ghost-Admin,JohnONolan/Ghost-Admin,dbalders/Ghost-Admin,TryGhost/Ghost-Admin,acburdine/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin |
df30ef2e122da9bc3be684e451d840bfed631a83 | bin/server.js | bin/server.js | var Express = require('express');
var FS = require('fs');
var HTTP = require('http');
require('../lib/config');
var app = Express();
var server = HTTP.createServer(app);
app.use(require('body-parser').json());
require('../lib/control/cookbook').attach(app);
require('../lib/control/directory').attach(app);
require('... | var Express = require('express');
var FS = require('fs');
var HTTP = require('http');
require('../lib/config');
var app = Express();
var server = HTTP.createServer(app);
// Convert true, false, and null to primatives
app.use(function(req, res, next) {
Object.keys(req.query).forEach(function(key) {
switch(req.q... | Add middleware to convert true/false query parameters to respective boolean values | Add middleware to convert true/false query parameters to respective boolean values
| JavaScript | mit | jmanero/menagerie,jmanero/menagerie,jmanero/menagerie |
a9bd2a73ee178326d12406b5deb81e0f589277eb | src/Store.js | src/Store.js | /**
* Store
* Used to provide default values for a store configuration
*/
let skip = i => i
function Store (config, id) {
// Fold configuration over self
for (var i in config) {
this[i] = config[i]
}
this.toString = () => id
}
Store.prototype = {
getInitialState : skip,
serialize : skip,
... | /**
* Store
* Used to provide default values for a store configuration
*/
let identity = i => i
function Store (config, id) {
// Fold configuration over self
for (var i in config) {
this[i] = config[i]
}
this.toString = () => id
}
Store.prototype = {
getInitialState : identity,
serialize : ... | Rename skip function to identity for clarity | [update] Rename skip function to identity for clarity
| JavaScript | mit | leobauza/microcosm,vigetlabs/microcosm,vigetlabs/microcosm,despairblue/microcosm,leobauza/microcosm,leobauza/microcosm,despairblue/microcosm,vigetlabs/microcosm |
80e560d9d0233beb0721a6754ef7b9f2cfcfc0a6 | common/models/subcampaign.js | common/models/subcampaign.js | module.exports = function (campaign) {
// Should Add Some Validation Methods
campaign.beforeRemote('prototype.__create__setting', function (ctx, modelInstance, next) {
if (!ctx.args.options.accessToken)
return next()
ctx.args.data.clientId = ctx.args.options.accessToken.userId
next()
})
c... | module.exports = function (subcampaign) {
var subPlan = require('../../config/subPlan')
var subStyle = require('../../config/planStyle')
subcampaign.validatesInclusionOf('style', {in: subStyle})
subcampaign.validatesInclusionOf('plan', {in: subPlan})
subcampaign.beforeRemote('prototype.__create__setting'... | Fix Some Typo and Add Validation to Subcampaign.Js | Fix Some Typo and Add Validation to Subcampaign.Js
| JavaScript | mit | Flieral/Announcer-Service-LB,Flieral/Announcer-Service-LB |
cc3eb6a6655ed10dcb10aac4fa0a9b1dc500c297 | components/calendar/event.js | components/calendar/event.js | import Remarkable from 'remarkable';
const markdown = (text) => {
var md = new Remarkable();
return {
__html: md.render(text)
};
};
const Event = ({ title, start_time, end_time, content, eventClickHandler, index, active }) => {
const classes = (index === active) ? 'cal-event-content-active' : '';
retur... | import Remarkable from 'remarkable';
const markdown = (text) => {
var md = new Remarkable();
return {
__html: md.render(text)
};
};
const Event = ({ title, start_time, end_time, content, eventClickHandler, index, active }) => {
const classes = (index === active) ? 'cal-event-content-active' : '';
retur... | Add endtime class to endtime element | Add endtime class to endtime element
| JavaScript | mit | dotKom/glowing-fortnight,dotKom/glowing-fortnight |
0a725584d7676a7009946d3ef9fb1e3d4693bbe3 | content_scripts/observers.js | content_scripts/observers.js | /// </// <reference path="data_functions.js" />
function getAnalysisNavtab() {
return document.getElementsByClassName("nav")[0].getElementsByTagName("li")[0];
}
var svgObserver = new MutationObserver(function (mutations) {
//console.log({ svg: mutations });
var button = null;
for (var i = 0; i < mutations[0]... | /// <reference path="data_functions.js" />
/// <reference path="events_listeners.js" />
function getAnalysisNavtab() {
return document.getElementsByClassName("nav")[0].getElementsByTagName("li")[0];
}
var svgObserver = new MutationObserver(function (mutations) {
//console.log({ svg: mutations });
var button = n... | Remove event listeners if the analysis tab is not active and add them otherwise. | Remove event listeners if the analysis tab is not active and add them otherwise.
| JavaScript | mit | mcibor/speedomondo |
6d0ff0db91ba3e87988992fa68b1a6f54a25be4c | src/index.js | src/index.js | import EsaQuiver from './esa-quiver';
const config = {
esaTeam: process.env['ESA_CURRENT_TEAM'],
esaToken: process.env['ESA_ACCESS_TOKEN'],
quiverDir: process.env['QUIVER_NOTEBOOK_DIR']
};
const app = EsaQuiver.init(config);
if (!app) {
console.error("Failed to initialize EsaQuiver.");
process.exit(1);
}
app.fe... | import EsaQuiver from './esa-quiver';
const config = {
esaTeam: process.env['ESA_CURRENT_TEAM'],
esaToken: process.env['ESA_ACCESS_TOKEN'],
quiverDir: process.env['QUIVER_NOTEBOOK_DIR'],
tagPrefix: ''
};
const app = EsaQuiver.init(config);
if (!app) {
console.error("Failed to initialize EsaQuiver.");
process.ex... | Add tagPrefix option to test | chore: Add tagPrefix option to test
| JavaScript | mit | stak/esa-quiver |
5179b182aef39a1f164091cc91cb724154a80f9f | src/index.js | src/index.js | 'use strict';
const pkg = require('../package.json');
const localRunner = require('./local');
const remoteRunner = require('./remote');
module.exports = {
name: pkg.name,
version: pkg.version,
plugins: ['group-step'],
local: [
{
type: 'function',
fn(opts) {
// simulate pre-processing s... | 'use strict';
const FreeSurfer = require('freesurfer-parser');
const pkg = require('../package.json');
const localRunner = require('./local');
const remoteRunner = require('./remote');
module.exports = {
name: pkg.name,
version: pkg.version,
plugins: ['group-step', 'inputs'],
local: [
{
type: 'funct... | Add inputs plugin to computation. | Add inputs plugin to computation.
| JavaScript | mit | MRN-Code/decentralized-laplacian-ridge-regression |
2d74156d1fc4ff3a68a0b2c8ad1fe5c61ba778c4 | routes/index.js | routes/index.js | var express = require('express');
var router = express.Router();
var nodemailer = require('nodemailer');
// create reusable transporter object using the default SMTP transport
var smtp = process.env.SMTPCREDENTIALS || '';
var transporter = nodemailer.createTransport(smtp);
var SECRET = process.env.SPASECRET || '';
r... | var express = require('express');
var router = express.Router();
var nodemailer = require('nodemailer');
// create reusable transporter object using the default SMTP transport
var smtp = process.env.SMTPCREDENTIALS || '';
var transporter = nodemailer.createTransport(smtp);
var SECRET = process.env.SPASECRET || '';
r... | Move callback to return a 201 status code | Move callback to return a 201 status code
| JavaScript | mit | gnomex/spa-form-deliver,gnomex/spa-form-deliver |
e709d21654d829f117c1df4464bf48fb36ff3633 | sampleConfig.js | sampleConfig.js | var global = {
domain: 'http://subdomain.yourdomain.com/',
secretUrlSuffix: 'putSomeAlphanumericSecretCharsHere'
};
var projects = [
{
repo: {
owner: 'yourbitbucketusername',
slug: 'your-bitbucket-source-repo-name',
sshPrivKeyPath: '/home/youruser/.ssh/id_rsa'
},
dest: {
host:... | var global = {
host: 'http://subdomain.yourdomain.com',
port: 8461,
secretUrlSuffix: 'putSomeAlphanumericSecretCharsHere'
};
var projects = [
{
repo: {
owner: 'yourbitbucketusername',
slug: 'your-bitbucket-source-repo-name',
sshPrivKeyPath: '/home/youruser/.ssh/id_rsa'
},
dest: {
... | Change to host+port from domain | Change to host+port from domain
| JavaScript | mit | mplewis/statichook |
b40fc9bba94b203c72ab20a031335fc7d99ecc71 | client/reducers/index.js | client/reducers/index.js | import { combineReducers } from 'redux';
import { routerReducer } from 'react-router-redux';
import { reducer as formReducer } from 'redux-form';
const rootReducer = combineReducers({
form: formReducer,
routing: routerReducer
});
export default rootReducer; | import { combineReducers } from 'redux';
import { routerReducer } from 'react-router-redux';
import { reducer as formReducer } from 'redux-form';
import auth from './userSignUp';
const rootReducer = combineReducers({
form: formReducer,
auth,
routing: routerReducer
});
export default rootReducer; | Add signUp action reducer to root reducer | Add signUp action reducer to root reducer
| JavaScript | mit | amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books |
36c29e5a31b1e47ebed839cefb3f1e4d1cb9ac73 | bin/generate.js | bin/generate.js | 'use strict';
const childProcess = require('child_process');
const fs = require('fs');
module.exports = function(type) {
process.argv.shift();
process.argv.shift();
var path = process.argv.length < 1 ? '.' : process.argv[0];
var process_generate = childProcess.spawn('./node_modules/podigg/bin/generat... | 'use strict';
const childProcess = require('child_process');
const fs = require('fs');
module.exports = function(type) {
process.argv.shift();
process.argv.shift();
var path = process.argv.length < 1 ? 'output_data' : process.argv[0];
var process_generate = childProcess.spawn('./node_modules/podigg/b... | Set default output dir to output_data | Set default output dir to output_data
| JavaScript | mit | PoDiGG/podigg-lc |
5e45445939848091cac5c9c24d9d40b9ecc1cf65 | Example/components/Login2.js | Example/components/Login2.js | import React from 'react';
import {View, Text, StyleSheet} from "react-native";
import Button from "react-native-button";
import {Actions} from "react-native-router-flux";
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgr... | import React from 'react';
import {View, Text, StyleSheet} from "react-native";
import Button from "react-native-button";
import {Actions} from "react-native-router-flux";
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
backgr... | Add button that navigate to login 3 from login 2 | Add button that navigate to login 3 from login 2 | JavaScript | mit | mcabs3/react-native-router-flux,peteychuk/react-native-router-flux,peteychuk/react-native-router-flux,gijoehosaphat/react-native-router-flux,hungtn/react-native-router-flux,Swordsman-Inaction/react-native-router-flux,Wondermall/react-native-router-flux,gectorat/react-native-router-flux,mcabs3/react-native-router-flux,m... |
5a46befdd83306016e6394c71d92404e586a1d12 | src/js/icons.js | src/js/icons.js | import icons from './generated/icons.js';
import { draw } from './draw.js';
function initIcons(state) {
const $right = $('#right');
$.each(icons, (index, icon) => {
const $iconOuter = $('<div>')
.addClass('icon_outer')
.data('ix', icon.ix);
const styleClass = icon.st + ' fa-' + icon.id;
... | import icons from './generated/icons.js';
import { draw } from './draw.js';
function initIcons(state) {
const $right = $('#right');
$.each(icons, (index, icon) => {
const $iconOuter = $('<div>')
.addClass('icon_outer')
.data('ix', icon.ix);
const styleClass = icon.st + ' fa-' + icon.id;
... | Make event handler passive for better scrolling | Make event handler passive for better scrolling
| JavaScript | mit | devgg/FontIcon,devgg/FontIcon,devgg/FontIcon |
a694958d927ae10990fcec235d95bee88edda53e | build/cssmin.js | build/cssmin.js | module.exports = {
all: {
files: {
'dist/css/binary.min.css': ['src/css/external/**/*.css', 'dist/css/binary.css']
}
}
}; | module.exports = {
all: {
files: {
'dist/css/binary.min.css': ['src/css/external/**/*.css', 'dist/css/binary.css'],
'dist/css/binary_rtl.min.css': ['src/css/external/**/*.css', 'dist/css/binary_rtl.css']
}
}
};
| Add rtl css file for minification | Add rtl css file for minification
| JavaScript | apache-2.0 | animeshsaxena/binary-static,borisyankov/binary-static,borisyankov/binary-static,tfoertsch/binary-static,einhverfr/binary-static,einhverfr/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,brodiecapel16/binary-static,massihx/binary-static,massihx/binary-static,animeshsaxena/binary-static,junbon/binar... |
7e1f07aa4ab252670557981843fb06bbcdfe7c33 | expectations/expected-inline-source-maps.js | expectations/expected-inline-source-maps.js | "use strict";
var x = 0;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpeHR1cmVzLmpzIl0sIm5hbWVzIjpbIngiXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBTUEsSUFBSSxDQUFWIiwiZmlsZSI6ImZpeHR1cmVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgeCA9IDA7XG4iXX0= | "use strict";
var x = 0;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpeHR1cmVzLmpzIl0sIm5hbWVzIjpbIngiXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBTUEsSUFBSSxDQUFWIiwiZmlsZSI6ImZpeHR1cmVzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgeCA9IDA7XG4iXX0= | Fix test failure from upstream change in convert-source-map. | Fix test failure from upstream change in convert-source-map.
See conversation in https://github.com/babel/babel/pull/5302 for
details.
| JavaScript | mit | rwjblue/broccoli-babel-transpiler,babel/broccoli-babel-transpiler,kellyselden/broccoli-babel-transpiler |
5d50097618c3d933e6313c65c79076c8ca88dcd3 | src/passport.js | src/passport.js |
var mongo = require('./mongo');
var passport = require('passport');
var FacebookStrategy = require('passport-facebook').Strategy;
var uuid = require('uuid');
passport.use(new FacebookStrategy({
clientID: process.env.FB_APP_ID,
clientSecret: process.env.FB_APP_SECRET,
callbackURL: 'http://localhost:180... |
var mongo = require('./mongo');
var passport = require('passport');
var FacebookStrategy = require('passport-facebook').Strategy;
var uuid = require('uuid');
passport.use(new FacebookStrategy({
clientID: process.env.FB_APP_ID,
clientSecret: process.env.FB_APP_SECRET,
callbackURL: 'http://localhost:180... | Fix bug on account update | Fix bug on account update
| JavaScript | mit | kt3k/pomodoro-meter,kt3k/pomodoro-meter,kt3k/pomodoro-meter |
2b6ac64317af5ee0e01f732da3a31602cc803fdb | src/routes/onboarding/index.js | src/routes/onboarding/index.js | function getRoute(path, subComponentName) {
return {
path: path,
subComponentName: subComponentName,
onEnter() {
require('../../networking/auth')
},
getComponents(location, cb) {
// require.ensure([], (require) => {
cb(null, require('../../components/views/OnboardingView'))
... | function getRoute(path, subComponentName) {
return {
path: path,
subComponentName: subComponentName,
getComponents(location, cb) {
// require.ensure([], (require) => {
cb(null, require('../../components/views/OnboardingView'))
// })
},
}
}
export default {
path: 'onboarding',
... | Remove the require of auth in onboarding routes. | Remove the require of auth in onboarding routes. | JavaScript | mit | ello/webapp,ello/webapp,ello/webapp |
13b5d034cda4ba068d8e48a95e7c8a33e18288df | app/javascript/app/reducers/index.js | app/javascript/app/reducers/index.js | import { combineReducers } from 'redux';
const rootReducer = combineReducers({
app: (state = {}) => (state)
});
export default rootReducer; | import { combineReducers } from 'redux';
import { reducer as formReducer } from 'redux-form';
const rootReducer = combineReducers({
form: formReducer
});
export default rootReducer; | Configure reducer to work with redux-form | Configure reducer to work with redux-form
| JavaScript | mit | GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app |
213ddebd53a77b0c53c19b6dade7fb496af66b18 | app/src/sagas/sagas.js | app/src/sagas/sagas.js | import { delay } from 'redux-saga'
import { put, call, takeEvery } from 'redux-saga/effects'
import request from 'axios'
// Our worker Saga: will perform the async increment task
export function * incrementAsync () {
yield call(delay, 1000)
yield put({type: 'INCREMENT'})
}
// Our watcher Saga: spawn a new increme... | import { delay } from 'redux-saga'
import { put, call, takeEvery } from 'redux-saga/effects'
import request from 'axios'
// Our worker Saga: will perform the async increment task
export function * incrementAsync () {
yield call(delay, 1000)
yield put({type: 'INCREMENT'})
}
// Our watcher Saga: spawn a new increme... | Fix DOM update upon create user | Fix DOM update upon create user
| JavaScript | mit | joedunu/react-redux-example,joedunu/react-redux-example |
849375d5bd920c84fa860f0dd6f510513ef61327 | src/client.js | src/client.js | import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { fromJS } from 'immutable';
import configureSt... | import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { fromJS } from 'immuta... | Fix the error from react-router | Fix the error from react-router
| JavaScript | mit | wellyshen/react-cool-starter,not-bad-react/not-bad-react-starter,wellyshen/react-cool-starter,zolcman/calendartest,wellyshen/react-cool-starter |
c3242831e37b28ed661fa6edd3d7a08ca9d5a6b4 | src/is-abn.js | src/is-abn.js | function isABN(input, strictFormat) {
if(strictFormat && !/^\d{2} \d{3} \d{3} \d{3}$/.test(input)) {
return false;
}
var abnStr = input.replace(' ', '');
if(abnStr.length !== 11) {
return false;
}
var abn = abnStr.split('');
var weight = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17,... | 'use strict';
(function() {
var context = this;
function isABN(input, strictFormat) {
if(strictFormat && !/^\d{2} \d{3} \d{3} \d{3}$/.test(input)) {
return false;
}
var abnStr = input.replace(' ', '');
if(abnStr.length !== 11) {
return false;
}... | Support calling from browser or as node module | Support calling from browser or as node module
| JavaScript | mit | thefallofbecause/is-abn |
62ae45d73505d4ccbbf54163c5f1149600c2d93d | bin/mixedindentlint.js | bin/mixedindentlint.js | #!/usr/bin/env node
var fs = require( 'fs' );
var IndentChecker = require( '../lib/indent-checker' );
var files = process.argv.slice( 2 );
var messages = files.reduce( function( warnings, file ) {
var input = fs.readFileSync( file, 'utf8' );
warnings[ file ] = IndentChecker.getLinesWithLessCommonType( input );
ret... | #!/usr/bin/env node
var fs = require( 'fs' );
var IndentChecker = require( '../lib/indent-checker' );
var args = process.argv.slice( 2 );
var files = args.filter( function( arg ) {
return arg.substr( 0, 2 ) !== '--';
} );
if ( args[0] === '--version' ) {
var version = require( '../package.json' ).version;
console... | Update executable to exit with error code when there are warnings | Update executable to exit with error code when there are warnings
| JavaScript | mit | sirbrillig/mixedindentlint |
0d543aafbd5f88b4f820218b18bdb8c7c9e61398 | app/assets/javascripts/spree/money.js | app/assets/javascripts/spree/money.js | Spree.Money = {}
Spree.Money.format = function(amount) {
// Round up to 2 decimal places.
amount = parseFloat(amount).toFixed(2)
if (Spree.Money.Settings.symbol_position == "before") {
return Spree.Money.Settings.symbol + amount;
} else {
return amount + ' ' + Spree.Money.Settings.symbol;
}
} | Spree.Money = {}
Spree.Money.Settings = {}
// Some default settings for money formatting in case API request fails
Spree.Money.Settings.symbol_position = "before"
Spree.Money.Settings.symbol = "$"
Spree.Money.format = function(amount) {
// Round up to 2 decimal places.
amount = parseFloat(amount).toFixed(2)
if (... | Set some defaults for Spree.Money in case API request fails for whatever reason | Set some defaults for Spree.Money in case API request fails for whatever reason
| JavaScript | bsd-3-clause | njaw/spree,njaw/spree,njaw/spree |
e613f9a1d342742b4b57aba9ec0c0e0c9dc425d6 | test/unit/base/Context.spec.js | test/unit/base/Context.spec.js | /**
* Context.spec.js
* (c) 2015~ Summernote Team
* summernote may be freely distributed under the MIT license./
*/
/* jshint unused: false */
define([
'chai',
'spies',
'helper',
'jquery',
'summernote/lite/settings',
'summernote/base/core/agent',
'summernote/base/core/dom',
'summernote/base/Context'... | /**
* Context.spec.js
* (c) 2015~ Summernote Team
* summernote may be freely distributed under the MIT license./
*/
/* jshint unused: false */
define([
'chai',
'spies',
'helper',
'jquery',
'summernote/lite/settings',
'summernote/base/core/agent',
'summernote/base/core/dom',
'summernote/base/Context'... | Update comment and test code. | Update comment and test code.
| JavaScript | mit | bebeeteam/summernote,AshDevFr/winternote,bebeeteam/summernote,summernote/summernote,summernote/summernote,AshDevFr/winternote,bebeeteam/summernote,AshDevFr/winternote,summernote/summernote |
88b0ca86586ab40b76b02da4b54b2562d4449dac | test/index.js | test/index.js | var test = require('tape');
var mercury = require('../index');
// FFFfffff--- phantomJS.
if (!Function.prototype.bind) {
Function.prototype.bind = require('function-bind');
}
test('mercury is a object', function t(assert) {
assert.equal(typeof mercury, 'object');
assert.end();
});
require('./synthetic-e... | var test = require('tape');
var mercury = require('../index');
// FFFfffff--- phantomJS.
if (!Function.prototype.bind) {
Function.prototype.bind = require('function-bind');
}
test('mercury is a object', function t(assert) {
assert.equal(typeof mercury, 'object');
assert.end();
});
require('./synthetic-e... | Add time-travel test to suite. | Add time-travel test to suite.
| JavaScript | mit | tommymessbauer/mercury,mpal9000/mercury,staltz/mercury,vlad-x/mercury,beni55/mercury,eightyeight/mercury,eriser/mercury,staltz/mercury,Raynos/mercury,jxson/mercury,martintietz/mercury |
2905137db53276a30b6e2d07c11d1d82d9d1e8c1 | typescript.js | typescript.js | module.exports = {
extends: [
require.resolve('.'),
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
settings: {
'import/extensions': ['.js', '.ts', '.tsx'],
'import/parsers': {
'@typescri... | module.exports = {
extends: [
require.resolve('.'),
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
settings: {
'import/extensions': ['.js', '.ts', '.tsx'],
'import/parsers': {
'@typescri... | Disable TS rule covered by type checker | Disable TS rule covered by type checker
| JavaScript | mit | kensho/eslint-config-kensho,kensho/eslint-config-kensho |
63b54689f4369783478abffde27a1ebd2b41ecf7 | lib/utilities.js | lib/utilities.js | import _ from 'lodash';
import Promise from 'bluebird';
export function ensureArray(value) {
if (!_.isUndefined(value)) {
return [].concat(value);
}
}
export function chainThenables(thenables, data) {
return _.reduce(thenables,
(previous, current) => previous.map(current).then(_.flattenDeep),
Promise.resolve... | import _ from 'lodash';
import Promise from 'bluebird';
export function ensureArray(value) {
if (!_.isUndefined(value)) {
return [].concat(value);
}
}
export function chainThenables(thenables, data) {
return _.reduce(thenables,
(previous, current) => previous.map(current).then(_.compact).then(_.flattenDeep),
... | Remove falsey values before continuing to the next thenable | Remove falsey values before continuing to the next thenable
| JavaScript | mit | siddharthkchatterjee/graph-resolver |
c2d8d9ef7eb737b10738d0438ed436d373f6cffe | bench/main.js | bench/main.js | requirejs.config({
baseUrl: "../lib",
paths: {
"src": "../src"
}
});
(function() {
function unitConversion(Qty) {
return function() {
new Qty("2500 m/h").to("ft/s");
};
}
require(["src/quantities"], function(Qty) {
var convert = unitConversion(Qty);
JSLitmus.test('Unit conversion... | /* global requirejs, JSLitmus */
requirejs.config({
baseUrl: "../lib",
paths: {
"src": "../src"
}
});
(function() {
"use strict";
function unitConversion(Qty) {
return function() {
new Qty("2500 m/h").to("ft/s");
};
}
require(["src/quantities"], function(Qty) {
var convert = unitCo... | Fix JSHint errors in bench script | Fix JSHint errors in bench script
| JavaScript | mit | dubejf/js-quantities,gentooboontoo/js-quantities,mickeyreiss/js-quantities,mickeyreiss/js-quantities,gentooboontoo/js-quantities,jhericks/js-quantities,dubejf/js-quantities,mickeyreiss/js-quantities,dubejf/js-quantities,gentooboontoo/js-quantities,jhericks/js-quantities,gentooboontoo/js-quantities,glassbead0/js-quantit... |
87f5a93c0c1caa31770d9f72a1fc07ca1574fedd | scripts/posttoggle.js | scripts/posttoggle.js | $("#post_link6").click(function() {
event.preventDefault();
$( ".post.6" ).slideToggle( "slow" );
});
$("#post_link5").click(function() {
event.preventDefault();
$( ".post.5" ).slideToggle( "slow" );
});
$("#post_link4").click(function() {
event.preventDefault();
$( ".post.4" ).slideToggle( "slow... | $(function () {
$("img").not(":visible").each(function () {
$(this).data("src", this.src);
this.src = "";
});
var reveal = function (selector) {
var img = $(selector);
img[0].src = img.data("src");
}
});
$("#post_link6").click(function() {
event.preventDefault();
... | Add JS to not load hidden divs | Add JS to not load hidden divs
| JavaScript | mit | sspread/sspread.github.io,sspread/sspread.github.io |
ba1628ea8a0c0cdbc4bc3ce8f58a792394f27aad | app/widgets/browser-tabview.js | app/widgets/browser-tabview.js | 'use strict';
/**
* Provides new tab and tabview widgets with some additional functions for
* jujugui.
*
* @namespace juju
* @module browser
* @submodule widgets
*/
YUI.add('browser-tabview', function(Y) {
var ns = Y.namespace('juju.widgets.browser');
/**
* Tabview provides extra rendering options--it ... | 'use strict';
/**
* Provides new tab and tabview widgets with some additional functions for
* jujugui.
*
* @namespace juju
* @module browser
* @submodule widgets
*/
YUI.add('browser-tabview', function(Y) {
var ns = Y.namespace('juju.widgets.browser');
/**
* Tabview provides extra rendering options--it ... | Add back base per review | Add back base per review | JavaScript | agpl-3.0 | CanonicalJS/juju-gui,CanonicalJS/juju-gui,jrwren/juju-gui,mitechie/juju-gui,bac/juju-gui,CanonicalJS/juju-gui,jrwren/juju-gui,bac/juju-gui,mitechie/juju-gui,jrwren/juju-gui,bac/juju-gui,jrwren/juju-gui,mitechie/juju-gui,bac/juju-gui,mitechie/juju-gui |
e387936c9179fb55f2c6800c9da2fc413ec9f758 | client/app.js | client/app.js | 'use strict';
import './main.less';
import 'file!./favicon.ico';
import 'file!./favicon-32.ico';
import 'file!./favicon-152.png';
// 123
import angular from 'angular';
import ngRouter from 'angular-route';
import ngSanitize from 'angular-sanitize';
import ngCookies from 'angular-cookies';
import angularFilter from... | 'use strict';
import './main.less';
// favicons
import 'file!./favicon.ico';
import 'file!./favicon-32.ico';
import 'file!./favicon-152.png';
// main angular module
import angular from 'angular';
// router
import ngRouter from 'angular-route';
// sanitize module
import ngSanitize from 'angular-sanitize';
// cookies... | Add comments to main client file | Add comments to main client file
| JavaScript | mit | flareair/hr_app,flareair/hr_app |
bcdc07bb50684015e401b574a74ee1a0e3254c6c | app/js/App.js | app/js/App.js | (function() {
var app, k, v,
__slice = [].slice;
app = angular.module("app", [
"ionic",
"restangular",
"ngAnimate",
'ngGPlaces',
'classy',
"fx.animations",
"google-maps",
"ion-google-place",
"app.modules",
"app.directives",
"app.filters",
"app.models"
]);
... | (function() {
var app, k, v,
__slice = [].slice;
app = angular.module("app", [
"ionic",
"restangular",
"ngAnimate",
'ngGPlaces',
'classy',
"fx.animations",
"google-maps",
"ion-google-place",
"app.modules",
"app.directives",
"app.filters",
"app.models"
]);
... | Use localhost for development server | Use localhost for development server
| JavaScript | mit | Plateful/plateful-mobile,Plateful/plateful-mobile |
e9f1cca64fb359cbf9ba953942623d4b7994f8c6 | app/errors/handler.js | app/errors/handler.js | module.exports = function(app) {
app.use(function(err, _req, res, _next) { // eslint-disable-line no-unused-vars
/**
* Error messages may be split into a head and a body. The head part
* contains the descriptor for the error. The body part contains extra
* information for the API user.
*/
... | module.exports = function(app) {
app.use(function(err, _req, res, _next) { // eslint-disable-line no-unused-vars
/**
* Error messages may be split into a head and a body. The head part
* contains the descriptor for the error. The body part contains extra
* information for the API user.
*/
... | Add missing events and locations to error handling | Add missing events and locations to error handling
| JavaScript | mit | volontario/volontario-server |
a90a98b50e0c4e3d94d5b31ce93558c776b8a8ec | scripts/deploy.js | scripts/deploy.js | const { exec } = require('child_process')
const ora = require('ora')
const config = require('../config')
const spinner = ora('Deploy to gh-pages...')
spinner.start()
function execute (cmd) {
return new Promise((resolve, reject) => {
exec(cmd, (err, stdout, stderr) => {
if (err) return reject(err)
if... | const { exec } = require('child_process')
const ora = require('ora')
const config = require('../config')
const spinner = ora('Deploy to gh-pages...')
spinner.start()
function execute (cmd) {
return new Promise((resolve, reject) => {
exec(cmd, (err, stdout, stderr) => {
if (err) return reject(err)
if... | Update @ Sat Mar 11 2017 17:01:59 GMT+0800 (CST) | Update @ Sat Mar 11 2017 17:01:59 GMT+0800 (CST)
| JavaScript | mit | zce/dashboard,zce/dashboard,zce/dashboard |
be26038f2eff514e9bece1fd5e0cd4e3bac61e94 | src/styles/globals.js | src/styles/globals.js | import { createGlobalStyle } from 'styled-components';
import 'sanitize.css/sanitize.css';
import theme from './theme';
export const GlobalStyle = createGlobalStyle`
html{
font-size: 10px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: ${theme.font.sans};
}
body {
font-family: ${theme.font.... | import { createGlobalStyle } from 'styled-components';
import 'sanitize.css/sanitize.css';
import theme from './theme';
export const GlobalStyle = createGlobalStyle`
html{
font-size: 10px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: ${theme.font.sans};
}
body {
font-family: ${theme.font.... | Reset margin of text elements and add line-height to make it easier to read | Reset margin of text elements and add line-height to make it easier to read
| JavaScript | mit | raulfdm/cv |
e542ac17780ad1aaaef453cb17b51a695f117f93 | jest.config.js | jest.config.js | module.exports = {
transform: {
"^.+\\.tsx?$": "ts-jest",
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
moduleFileExtensions: [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
moduleNameMapper: {
"\\.(png|css)$": "<... | module.exports = {
transform: {
"^.+\\.tsx?$": "ts-jest",
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
moduleFileExtensions: [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
moduleNameMapper: {
"\\.(png|css)$": "<... | Exclude generated files from testing | Exclude generated files from testing
| JavaScript | mit | na2hiro/Kifu-for-JS,na2hiro/Kifu-for-JS,na2hiro/Kifu-for-JS |
955899ebc99410594d9c13915257ac34cb523e91 | tasks/watch-server.js | tasks/watch-server.js | 'use strict';
var argv = require('yargs').argv;
var path = require('path');
module.exports = function(gulp, plugins, config) {
return function() {
function getSources(root, filter) {
if (root instanceof Array) {
return root.map(function(item) {
return item + filter;
}... | 'use strict';
var argv = require('yargs').argv;
var path = require('path');
module.exports = function(gulp, plugins, config) {
return function() {
function getSources(root, filter) {
if (root instanceof Array) {
return root.map(function(item) {
return item + filter;
}... | Fix start/watch issues for server | Fix start/watch issues for server
| JavaScript | mit | drioemgaoin/AngularMicroServicesBoilerplate,drioemgaoin/AngularMicroServicesBoilerplate |
62e7e0462c9cfd955eae49dbac53d978a642a7e0 | src/katagroups.js | src/katagroups.js | export default class KataGroups {
static fromRawKataData(rawGroups) {
let kataGroups = new KataGroups();
kataGroups.groups = Object
.keys(rawGroups)
.map(groupName => new KataGroup(groupName, rawGroups[groupName].items));
return kataGroups;
}
get firstGroup() {
return this.groups[0];
... | export default class KataGroups {
constructor() {
this._selectedGroup = void 0;
this._selectedKata = void 0;
}
static fromRawKataData(rawGroups) {
let kataGroups = new KataGroups();
kataGroups.groups = Object
.keys(rawGroups)
.map(groupName => new KataGroup(groupName, rawGroups[group... | Use getters to make the provided interface more visible. | Use getters to make the provided interface more visible. | JavaScript | mit | wolframkriesing/es6-react-workshop,wolframkriesing/es6-react-workshop |
296810c4e0e6a3b1c203b0ef2a17e02f698d970c | server/routes.js | server/routes.js | /**
* Main application routes
*/
'use strict';
var errors = require('./components/errors');
module.exports = function(app) {
// Insert routes below
app.use('/api/helpForums', require('./api/helpForum'));
app.use('/api/loggers', require('./api/logger'));
app.use('/api/clis', require('./api/cli'));
app.us... | /**
* Main application routes
*/
'use strict';
var errors = require('./components/errors');
var path = require('path');
module.exports = function(app) {
// Insert routes below
app.use('/api/helpForums', require('./api/helpForum'));
app.use('/api/loggers', require('./api/logger'));
app.use('/api/clis', req... | Upgrade sendfile api to sendFile | Upgrade sendfile api to sendFile
| JavaScript | mit | celinaberg/BitFit,celinaberg/BitFit,celinaberg/BitFit |
de7962db1faf9f29dbaab8e6104e6c806f2a442c | server/routes.js | server/routes.js | // @flow
/**
* Main application routes
*/
import type { $Application, $Request, $Response } from "express";
import Api from "./api";
import Auth from "./auth";
import { pageNotFound } from "./components/errors";
import path from "path";
const indexHtml =
process.env.NODE_ENV === "development"
? path.join(__... | // @flow
/**
* Main application routes
*/
import type { $Application, $Request, $Response } from "express";
import Api from "./api";
import Auth from "./auth";
import { pageNotFound } from "./components/errors";
import path from "path";
function defaultRouteHandler(req: $Request, res: $Response) {
res.render(pa... | Rollback index html path update | Rollback index html path update
| JavaScript | mit | celinaberg/BitFit,celinaberg/BitFit,celinaberg/BitFit |
9c4a3c617cb29020c04877ab7ddb1992f8724b49 | media/boom-templates/js/boom.templates.js | media/boom-templates/js/boom.templates.js | /**
@fileOverview Template manager UI.
*/
$.extend($.boom, {
/**
* @class
* @name $.boom.templates
*/
templates :
/** @lends $.boom.templates */
{
/** @function */
init : function(config) {
var self = this;
this.bind();
$.boom.log('Template manager init');
},
/** @function */
bind : fu... | /**
@fileOverview Template manager UI.
*/
$.extend($.boom, {
/**
* @class
* @name $.boom.templates
*/
templates :
/** @lends $.boom.templates */
{
/** @function */
init : function(config) {
var self = this;
this.bind();
$.boom.log('Template manager init');
},
/** @function */
bind : fu... | Remove calls to $.boom.loader.show() and $.boom.loader.hide() | Remove calls to $.boom.loader.show() and $.boom.loader.hide()
| JavaScript | mit | boomcms/boom-core,boomcms/boom-core,boomcms/boom-core |
0d470cd85775a7b61d9496fa6eac24ac499dbad4 | src/expression/column.js | src/expression/column.js |
import Expression from './base'
/**
* @class ColumnExpression
*/
export default class Column extends Expression {
/**
*
* @param {String} name
* @param {String} table
* @param {String} as
* @constructor
*/
constructor(name, table = '', as = '') {
super()
if ( !as && name.toLow... |
import Expression from './base'
/**
* @class ColumnExpression
*/
export default class Column extends Expression {
/**
*
* @param {String} name
* @constructor
*/
constructor(value) {
super()
var as = ''
var table = ''
if ( !as && value.toLowerCase().indexOf(' as ') > 0 )... | Update expression/aggregate.js - change the constructor signature | Update expression/aggregate.js
- change the constructor signature
| JavaScript | mit | vitaminjs/query-builder,vitaminjs/query-builder |
e8696d55455e108bd7bafdd9b9ddf0fb32e80138 | line-simplification/js/main.js | line-simplification/js/main.js | (function( window, document, undefined ) {
'use strict';
var canvas = document.getElementById( 'canvas' ),
context = canvas.getContext( '2d' );
var points = [];
function midpointDisplacement( options ) {
options = options || {};
var width = options.width || 2,
count = options.count ||... | /*jshint bitwise: false*/
(function( window, document, undefined ) {
'use strict';
var canvas = document.getElementById( 'canvas' ),
context = canvas.getContext( '2d' );
var points = [];
function log2( n ) {
return Math.log( n ) / Math.LN2;
}
function randomSignedFloat( n ) {
return Math.... | Add implementation of midpointDisplacement function. | line-simplification: Add implementation of midpointDisplacement function.
| JavaScript | mit | razh/experiments,razh/experiments,razh/experiments |
0e9e68232687b34b75e4d29e5540e57ad6bd21ab | tests/integration/components/progress-bar/component-test.js | tests/integration/components/progress-bar/component-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('progress-bar', 'Integration | Component | progress bar', {
integration: true
});
test('it renders with correct width', function(assert) {
this.set('pageNumber', 1);
this.render(hbs`{{progres... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('progress-bar', 'Integration | Component | progress bar', {
integration: true
});
test('it renders with correct width', function(assert) {
this.set('pageNumber', 1);
this.render(hbs`{{progres... | Test progress bar width changes on page change | Test progress bar width changes on page change
| JavaScript | apache-2.0 | CenterForOpenScience/isp,CenterForOpenScience/isp,CenterForOpenScience/isp |
6bd1772c5884413e57ded1cc702884ae2cdd4709 | test/readUntil.js | test/readUntil.js | var test = require('tap').test;
var streamBuffers = require("stream-buffers");
var UntilStream = require('../');
test("read until pattern", function (t) {
t.plan(2);
var us = new UntilStream({ pattern: 'World'});
us.on('finish', function () {
sourceStream.destroy();
});
var sourceStream = new streamBuff... | var test = require('tap').test;
var streamBuffers = require("stream-buffers");
var UntilStream = require('../');
test("read until pattern", function (t) {
t.plan(2);
var us = new UntilStream({ pattern: 'World'});
us.once('readable', function() {
var data = us.read();
t.equal(data.toString(), 'Hello ');
... | Simplify read until pattern test | Simplify read until pattern test
| JavaScript | mit | EvanOxfeld/until-stream |
8d33507c0fd5ad6959e323bdebb7533086017ebd | app/scripts/flashcards/directives/markdownEditorDirective.js | app/scripts/flashcards/directives/markdownEditorDirective.js | 'use strict';
angular
.module('flashcardModule.directives')
.directive('markdownEditor', function() {
var converter = new Showdown.converter();
var previewTemplate = '<div ng-hide="isEditMode" ng-dblclick="toEditMode()" class="preview"></div>';
var editorTemplate = '<textarea ng-show="i... | 'use strict';
angular
.module('flashcardModule.directives')
.directive('markdownEditor', function() {
var converter = new Showdown.converter();
var previewTemplate = '<div ng-hide="isEditMode" ng-dblclick="toEditMode()" class="preview"></div>';
var editorTemplate = '<textarea ng-show="i... | Add nicer style for editor | Add nicer style for editor
| JavaScript | bsd-3-clause | mhaligowski/fishkees-ui |
7e8552216b600189dfa62ef7298dca789889440c | src/operations/delete.js | src/operations/delete.js | /**
* Jatabase
*
* @author Gabriel Jacinto <gamjj74@hotmail.com>
* @license MIT License
* @package jatabase
*/
'use strict';
var utils = require('../utils');
module.exports = function (Model) {
return function (where) {
let db = require(Model.file),
collection = db[Model.collection];
if (typeo... | /**
* Jatabase
*
* @author Gabriel Jacinto <gamjj74@hotmail.com>
* @license MIT License
* @package jatabase
*/
'use strict';
var utils = require('../utils');
module.exports = function (Model) {
return function (where) {
let db = require(Model.file),
collection = db[Model.collection];
if (typeo... | Add exception for unregistred IDs | Add exception for unregistred IDs
| JavaScript | mit | gabrieljmj/jatabase |
b03edc8db8eacad8fe25d2bcd5e8c7cdfffe2a7b | schema/me/save_artwork.js | schema/me/save_artwork.js | import gravity from '../../lib/loaders/gravity';
import { GraphQLString, GraphQLBoolean } from 'graphql';
import { mutationWithClientMutationId } from 'graphql-relay';
import { artworkFields } from '../artwork/index';
export default mutationWithClientMutationId({
name: 'SaveArtwork',
decription: 'Save (or remove) ... | import gravity from '../../lib/loaders/gravity';
import { GraphQLString, GraphQLBoolean } from 'graphql';
import { mutationWithClientMutationId } from 'graphql-relay';
import { artworkFields } from '../artwork/index';
export default mutationWithClientMutationId({
name: 'SaveArtwork',
decription: 'Save (or remove) ... | Throw an error instead of returning null | Throw an error instead of returning null
| JavaScript | mit | artsy/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,mzikherman/metaphysics-1,artsy/metaphysics,craigspaeth/metaphysics,mzikherman/metaphysics-1,craigspaeth/metaphysics,broskoski/metaphysics |
98ddf09a802b9ad25dcafbd046bb3be749881005 | test/components/room_test.js | test/components/room_test.js | import React from "react"
import { shallow } from "enzyme"
import { expect } from "chai"
import sinon from "sinon"
import Room from "../../web/static/js/components/room"
import CategoryColumn from "../../web/static/js/components/category_column"
describe("Room component", () => {
const mockRetroChannel = { push: si... | import React from "react"
import { shallow } from "enzyme"
import { expect } from "chai"
import sinon from "sinon"
import Room from "../../web/static/js/components/room"
import CategoryColumn from "../../web/static/js/components/category_column"
describe("Room component", () => {
const mockRetroChannel = { push: si... | Add test to check that Action Item column is displayed on toggle | Add test to check that Action Item column is displayed on toggle
| JavaScript | mit | tnewell5/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro |
e14869d8b92e721a459fb88c6afc5cfbc29e1f67 | frontend/src/app/index.route.js | frontend/src/app/index.route.js | (function() {
'use strict';
angular
.module('afterHeap')
.config(routerConfig);
/** @ngInject */
function routerConfig($stateProvider, $urlRouterProvider) {
$stateProvider
.state('city', {
abstract: true,
url: '/:cityId',
template: '<ui-view/>'
})
.state('... | (function() {
'use strict';
angular
.module('afterHeap')
.config(routerConfig);
/** @ngInject */
function routerConfig($stateProvider, $urlRouterProvider) {
$stateProvider
.state('city', {
abstract: true,
url: '/:cityId',
template: '<ui-view/>'
})
.state('... | Revert "Test that typo in sources break the CI build" | Revert "Test that typo in sources break the CI build"
This reverts commit 78e3eda95cfe36ed811aa35ba90424a6f7503f4f.
| JavaScript | mit | Vilsepi/after,Vilsepi/after,Vilsepi/after,Vilsepi/after,Vilsepi/after |
021cf78cbb22abbf073b32e5ce006d975e6a8ff5 | src/core/recovery.js | src/core/recovery.js | var zoomextent = require('../lib/zoomextent'),
qs = require('../lib/querystring');
module.exports = function(context) {
d3.select(window).on('unload', onunload);
context.dispatch.on('change', onchange);
var query = qs.stringQs(location.hash.split('#')[1] || '');
if (location.hash !== '#new' && !... | var zoomextent = require('../lib/zoomextent'),
qs = require('../lib/querystring');
module.exports = function(context) {
d3.select(window).on('unload', onunload);
context.dispatch.on('change', onchange);
var query = qs.stringQs(location.hash.split('#')[1] || '');
if (location.hash !== '#new' && !... | Handle quota storage exceeded error | Handle quota storage exceeded error
| JavaScript | isc | mobixio/geojson.io,moravianlibrary/geojson.io,entylop/geojson.io,entylop/geojson.io,mapbox/geojson.io,mobixio/geojson.io,Carlowahlen/geojsoniocw,dakotabenjamin/geojson.io,Loufylouf/geojson.io,Carlowahlen/geojsoniocw,datadesk/geojson.io,mapbox/geojson.io,snkashis/geojson.io,SpaceKnow/geojson.io,bmcbride/geojson.io,entyl... |
eccde189fb52f7456144d9c3436de16e301c9cbc | src/server/chatParser.js | src/server/chatParser.js | /* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80; */
"use strict";
var mona = require("./mona");
var parsers = {
dialogue: require("./parsers/dialogue")()
};
function parse(type, content) {
return parsers[type] && mona.run(parsers[type], content).val;
}
modu... | /* -*- js2-basic-offset: 2; indent-tabs-mode: nil; -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80; */
"use strict";
var mona = require("./mona");
var parsers = {
dialogue: require("./parsers/dialogue")()
};
function parse(type, content) {
var parser = parsers[type];
if (!parser) { throw new Error("No pars... | Throw an error if an invalid input type is getting parsed | Throw an error if an invalid input type is getting parsed
| JavaScript | agpl-3.0 | zkat/storychat |
83d5707990c619a40a8efdea57ccf4ebe95c0cf6 | webpack.config.js | webpack.config.js | const webpack = require('webpack');
const env = process.env.NODE_ENV;
const config = {
devtool: 'source-map',
output: {
libraryTarget: 'umd',
library: 'Pic'
},
plugins: [],
module: {
loaders: [
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
... | const webpack = require('webpack');
const env = process.env.NODE_ENV;
const config = {
devtool: 'source-map',
output: {
libraryTarget: 'umd',
library: 'Pic'
},
plugins: [],
module: {
loaders: [
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
... | Remove react warnings by properly defining externals | Remove react warnings by properly defining externals
| JavaScript | mit | benox3/react-pic |
c84dd7ff24455bc875955261ece980a581683fd9 | grunt/config/openui5_connect.js | grunt/config/openui5_connect.js | // configure the openui5 connect server
module.exports = function(grunt, config) {
// libraries are sorted alphabetically
var aLibraries = config.allLibraries.slice();
aLibraries.sort(function(a, b) {
return a.name.localeCompare(b.name);
});
var openui5_connect = {
options: {
contextpath: config.testsui... | // configure the openui5 connect server
module.exports = function(grunt, config) {
// libraries are sorted alphabetically
var aLibraries = config.allLibraries.slice();
aLibraries.sort(function(a, b) {
return a.name.localeCompare(b.name);
});
var openui5_connect = {
options: {
contextpath: config.testsui... | Disable proxy "secure" option for better local testing | [INTERNAL] Grunt: Disable proxy "secure" option for better local testing
As the "grunt serve" server is only intended to be used for local
testing it is fine to allow insecure connections.
Change-Id: I7141af5d6340340f27ce80ecc7413f50ee553408
| JavaScript | apache-2.0 | SQCLabs/openui5,cschuff/openui5,nzamani/openui5,cschuff/openui5,nzamani/openui5,cschuff/openui5,nzamani/openui5,SAP/openui5,SAP/openui5,SQCLabs/openui5,SQCLabs/openui5,SAP/openui5,SAP/openui5 |
c28af041049ad0c5b122ba5b598a5830d9769af4 | app/announcer/routes.js | app/announcer/routes.js | var utils = require("radiodan-client").utils,
settingsRoutes = require("../settings/routes"),
logger = utils.logger(__filename);
module.exports = routes;
function routes(app, states, Settings) {
var settings = Settings.build(
"announcer",
{ speak: false, announcer: "marvin" }
);
... | var utils = require('radiodan-client').utils,
settingsRoutes = require('../settings/routes'),
logger = utils.logger(__filename);
module.exports = routes;
function routes(app, states, Settings) {
var settings = Settings.build(
'announcer',
{ speak: false, announcer: 'marvin' }
);
... | Add boilerplate for announcer route | Add boilerplate for announcer route
| JavaScript | apache-2.0 | radiodan/magic-button,radiodan/magic-button |
243cfdb488a5ebadb64bd2060d19e602caf3e01e | src/reader/components/ReaderXrefComponent.js | src/reader/components/ReaderXrefComponent.js | import { NodeComponent } from 'substance'
import { getXrefLabel, getXrefTargets } from '../../editor/util/xrefHelpers'
export default class ReaderXrefComponent extends NodeComponent {
render($$) {
let node = this.props.node
let refType = node.getAttribute('ref-type')
let label = getXrefLabel(node)
... | import { NodeComponent } from 'substance'
import { getXrefLabel, getXrefTargets } from '../../editor/util/xrefHelpers'
export default class ReaderXrefComponent extends NodeComponent {
render($$) {
let node = this.props.node
let refType = node.getAttribute('ref-type')
let label = getXrefLabel(node)
l... | Implement xref tooltip using ReferencesAPI. | Implement xref tooltip using ReferencesAPI.
| JavaScript | mit | substance/texture,substance/texture |
11c2fcee44f202c046f5439d95c914e96c29eebc | webpack.config.js | webpack.config.js | var path = require('path');
var webpack = require('webpack');
var BundleTracker = require('webpack-bundle-tracker');
module.exports = {
context: __dirname,
entry: './scrappyr/static/js/index',
output: {
path: path.resolve('./scrappyr/static/webpack_bundles/'),
filename: "[name]-[hash].js"
},
plug... | var path = require('path');
var webpack = require('webpack');
var BundleTracker = require('webpack-bundle-tracker');
module.exports = {
context: __dirname,
entry: './scrappyr/static/js/index',
output: {
path: path.resolve('./scrappyr/static/webpack_bundles/'),
filename: "[name]-[hash].js"
},
devt... | Add sourcemaps for easier debugging | Add sourcemaps for easier debugging
| JavaScript | mit | tonysyu/scrappyr-app,tonysyu/scrappyr-app,tonysyu/scrappyr-app,tonysyu/scrappyr-app |
7bcb3de05362591df410b24bb4c587c29ef1cf6c | webpack.config.js | webpack.config.js | 'use strict';
let webpack = require('webpack');
let ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: [`${__dirname}/src/main.js`],
output: {
path: `${__dirname}/dist`,
publicPath: '/dist/',
filename: 'all.js'
},
module: {
loaders: [... | 'use strict';
let webpack = require('webpack');
let ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: [`${__dirname}/src/main.js`],
output: {
path: `${__dirname}/dist`,
publicPath: '/dist/',
filename: 'all.js'
},
module: {
loaders: [... | Change asset naming of Webpack | Change asset naming of Webpack
| JavaScript | mit | hyjk2000/party-lottery,hyjk2000/party-lottery,hyjk2000/party-lottery |
e494cab7c4715ec048f945976196429304e8508c | src/layout/header.js | src/layout/header.js | import m from 'mithril';
import attributes from '../attributes';
export let Header = {
view(ctrl, args, ...children) {
args = args || {};
let attr = attributes(args);
let {scroll, waterfall, transparent} = args;
attr.class.push('mdl-layout__header');
if(scroll) attr.class.push('mdl-layout__header--scroll'... | import m from 'mithril';
import attributes from '../attributes';
export let Header = {
view(ctrl, args, ...children) {
args = args || {};
let attr = attributes(args);
let {scroll, waterfall, transparent, castShadow} = args;
attr.class.push('mdl-layout__header');
if(scroll) attr.class.push('mdl-layout__hea... | Add is-casting-shadow to Layout Header. | Add is-casting-shadow to Layout Header.
| JavaScript | bsd-3-clause | PaulAvery/mithril-mdl,PaulAvery/node-mithril-mdl,boazy/node-mithril-mdl |
db594aeaf3d73b2668715b0887a634c10fe0c01f | assets/scripts/_main.js | assets/scripts/_main.js | (function ($) {
var Sinistrocular = {
'common': {
init: function () {
console.log('common.init');
Utility.header.init();
Animation.init();
Video.init();
Nav.init();
},
finalize: function () {
}
},
'page': {
init: function () {
console.log('the body has class ... | (function ($) {
var Sinistrocular = {
'common': {
init: function () {
console.log('common.init');
Utility.header.init();
Animation.init();
Video.init();
Nav.init();
$(document.links).filter(function() {
return this.hostname != window.location.hostname;
... | Add target="_blank" to external links with JS | Add target="_blank" to external links with JS
| JavaScript | mit | cozywigwam/sinistrocular,cozywigwam/sinistrocular |
b7e9f3834ad8a66c35e8c053b1a6a62548ee5dd2 | flow-typed/src/messages.js | flow-typed/src/messages.js | /* eslint-disable no-unused-vars */
type ConnectMessage = {
type: 'CONNECT',
chorusClientId: string,
description: string,
}
type PublishStepMessage = {
type: 'PUBLISH_STEP',
chorusClientId: string,
stepId: string,
pattern: string,
pendingMessage?: string,
technicalDescription?: string,
}
type StepsAlignedMe... | /* eslint-disable no-unused-vars */
type ConnectMessage = {|
type: 'CONNECT',
chorusClientId: string,
description: string,
|}
type PublishStepMessage = {|
type: 'PUBLISH_STEP',
chorusClientId: string,
stepId: string,
pattern: string,
pendingMessage?: string,
technicalDescription?: string,
|}
type StepsAlign... | Make message object types strict | Make message object types strict
| JavaScript | mit | Chorus-bdd/chorus-js,Chorus-bdd/chorus-js,Chorus-bdd/chorus-js |
59421d9ef6d1521f19b83a8409934682592ccae6 | tests/documents.tests.js | tests/documents.tests.js | var assert = require("assert");
var documents = require("../lib/documents");
var DocumentConverter = documents.DocumentConverter;
var test = require("./testing").test;
describe('DocumentConverter', function() {
test('should convert document containing one paragraph to single p element', function() {
var ... | var assert = require("assert");
var documents = require("../lib/documents");
var DocumentConverter = documents.DocumentConverter;
var test = require("./testing").test;
describe('DocumentConverter', function() {
test('should convert document containing one paragraph to single p element', function() {
var ... | Remove duplicate usage of describe | Remove duplicate usage of describe
| JavaScript | bsd-2-clause | mwilliamson/mammoth.js,mwilliamson/mammoth.js |
ac26971e9ddd113ff86e8e67f5be48949f8e4f2d | src/api-components/Run.js | src/api-components/Run.js | import React, { Component } from 'react';
import SearchActions from '../actions/SearchActions.js';
class Run extends Component {
componentDidMount() {
SearchActions.nsearch(this.props.namespace);
}
componentWillUnmount() {
SearchActions.nsearch(this.props.namespace);
}
render() {
return null;
... | import React, { Component } from 'react';
import SearchActions from '../actions/SearchActions.js';
class Run extends Component {
componentDidMount() {
SearchActions.nsearch(this.props.namespace || 'default');
}
componentWillUnmount() {
SearchActions.nsearch(this.props.namespace || 'default');
}
re... | Make run default to default namespace | Make run default to default namespace
| JavaScript | mit | sajari/sajari-sdk-react,sajari/sajari-sdk-react |
6e678e645d2d70fc64fdf8b3a5cd89b1d4b3b26c | src/docs/js/_load-data.js | src/docs/js/_load-data.js | import { hierarchy } from "d3-hierarchy";
const JSON_PATH = "http://rawgit.com/interlockjs/interlock/master/docs/compilation.json";
function orderChildren (node, anscestors) {
if (node.children) {
node.children = node.children.map((child, idx) => {
const childAnscestors = anscestors.concat(node);
... | import { hierarchy } from "d3-hierarchy";
const JSON_PATH = "http://rawgit.com/interlockjs/interlock/master/docs/compilation.json";
function orderChildren (datum) {
if (datum.children) {
datum.children = datum.children.map((child, idx) => {
child = orderChildren(child);
child.position = idx;
... | Fix ordering and breadcrumb generation for interactive doc. | Fix ordering and breadcrumb generation for interactive doc.
| JavaScript | mit | interlockjs/www |
cbc939c94a3ab53b7950437600a10f7cff0cd62f | modules/helma/webapp/request.js | modules/helma/webapp/request.js | require('core.string');
import('helma.system', 'system');
system.addHostObject(org.helma.web.Request);
system.addHostObject(org.helma.web.Session);
var log = require('helma.logging').getLogger(__name__);
(function() {
function cachedGetter(name, fn) {
return function() {
// make sure to neve... | require('core.string');
import('helma.system', 'system');
system.addHostObject(org.helma.web.Request);
system.addHostObject(org.helma.web.Session);
var log = require('helma.logging').getLogger(__name__);
(function() {
/**
* Return true if this is a HTTP POST request.
*/
this.isPost = function() {
... | Remove complex getter code - this stuff is now implemented in Java (ParameterMap) | Remove complex getter code - this stuff is now implemented in Java (ParameterMap)
git-svn-id: fac99be8204c57f0935f741ea919b5bf0077cdf6@9481 688a9155-6ab5-4160-a077-9df41f55a9e9
| JavaScript | apache-2.0 | Transcordia/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,oberhamsi/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs |
341b9d6359bb530ea958f7f19d1620f500937e6d | scripts/script.js | scripts/script.js | var animationDuration = 1000;
var fadeInDelay = animationDuration;
var openFirstCategoryDelay = 2*fadeInDelay;
jQuery.fn.extend({
fadeInOpacity: function() {
$( this ).animate( { opacity: 1 }, animationDuration );
}
});
$( document ).ready( function() {
// Fade in the whole shebang after the DOM is ready
... | var animationDuration = 800;
var fadeInDelay = animationDuration;
jQuery.fn.extend({
fadeInOpacity: function() {
$( this ).animate( { opacity: 1 }, animationDuration );
}
});
$( document ).ready( function() {
// Fade in the whole shebang after the DOM is ready
$( '#wrapper ').fadeIn( animationDuration, fu... | Make more generic to allow easily adding more contact-items in the future | Make more generic to allow easily adding more contact-items in the future
| JavaScript | mit | hanshenrik/hakonhammer.no,hanshenrik/hakonhammer.no |
4084ef4a28e579e7c77c1f5626fd433259ccc78a | js/news.ycombinator.com.js | js/news.ycombinator.com.js | $(function() {
// move form to header
$('form:last')
.css({ 'color': 'black', 'position': 'absolute', 'right': '400px' })
.prependTo('body');
});
| $(function() {
// move form to header
$('span.yclinks').parent().find('form')
.css({ 'color': 'black', 'position': 'absolute', 'right': '400px' })
.prependTo('body');
});
| Make sure it's the search form and not any other. | Make sure it's the search form and not any other.
| JavaScript | mit | geetarista/dotfiles,quzar/dotfiles,quzar/dotfiles,quzar/dotfiles,geetarista/dotfiles,geetarista/dotfiles |
7d3e20bcabed11c4ea69a6ae0c10a515855d1fb1 | rollup.config.js | rollup.config.js | import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import postcss from 'rollup-plugin-postcss';
import uglify from 'rollup-plugin-uglify';
import autoprefixer from 'autoprefixer';
import cssnano from 'cssnano';
import pkg from './pac... | import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import postcss from 'rollup-plugin-postcss';
import uglify from 'rollup-plugin-uglify';
import autoprefixer from 'autoprefixer';
import cssnano from 'cssnano';
import pkg from './pac... | Format rollbar, add sourcemap in DEV env | Format rollbar, add sourcemap in DEV env
| JavaScript | mit | michalsnik/aos |
00d9499d18237a9a7c64a79b5d9bb85e9e58c462 | packages/size-limit/load-plugins.js | packages/size-limit/load-plugins.js | function toArray (obj) {
return typeof obj === 'object' ? Object.keys(obj) : []
}
module.exports = function loadPlugins (pkg) {
if (!pkg || !pkg.packageJson) return []
let list = toArray(pkg.packageJson.dependencies)
.concat(toArray(pkg.packageJson.devDependencies))
.filter(i => i.startsWith('@size-limi... | function toArray (obj) {
return typeof obj === 'object' ? Object.keys(obj) : []
}
class Plugins {
constructor (list) {
this.list = list
this.isEmpty = list.length === 0
}
has (type) {
return this.list.some(i => i.name === `@size-limit/${ type }`)
}
}
module.exports = function loadPlugins (pkg) ... | Add class for plugin list | Add class for plugin list
| JavaScript | mit | ai/size-limit,ai/size-limit |
208d4dc3d11776a021438489ee343a5134efcbac | lib/feed/featured-image.js | lib/feed/featured-image.js | /**
* To retrieve the picture of the day for a given date.
*/
'use strict';
const BBPromise = require('bluebird');
const dateUtil = require('../dateUtil');
const sUtil = require('../util');
const imageinfo = require('../imageinfo');
const HTTPError = sUtil.HTTPError;
/**
* Get imageinfo data for featured image (P... | /**
* To retrieve the picture of the day for a given date.
*/
'use strict';
const BBPromise = require('bluebird');
const dateUtil = require('../dateUtil');
const imageinfo = require('../imageinfo');
/**
* Get imageinfo data for featured image (Picture of the day)
* @param {Object} req req Server request
*... | Stop limiting error handling for aggregated requests | Featured-image: Stop limiting error handling for aggregated requests
Several feed endpoints have graceful error handling for aggregated
requests, meant to allow RESTBase to gracefully omit featured feed
content where the underlying content is not found as expected.
For the featured image endpoint, this is limited to ... | JavaScript | apache-2.0 | wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps |
8c5217fee7d47105a1280a1879dd2f651f63bfea | lib/modules/fields/enum.js | lib/modules/fields/enum.js | import _ from 'lodash';
import Type from './type.js';
import Validators from '../validators/validators.js';
const enumDefinitionPattern = {
name: String,
options: Object
};
const Enum = {
create(definition) {
check(definition, enumDefinitionPattern);
// Get options.
const options = definition.optio... | import _ from 'lodash';
import Type from './type.js';
import Validators from '../validators/validators.js';
import { check, Match } from 'meteor/check';
const enumDefinitionPattern = {
name: String,
identifiers: Match.OneOf(Array, Object)
};
const Enum = {
create(definition) {
check(definition, enumDefiniti... | Improve ENUMs - getIdentifier(s) methods | Improve ENUMs - getIdentifier(s) methods
| JavaScript | mit | jagi/meteor-astronomy |
2acb1a8eb662e494c49561c08b91206f4f992f2a | src/__tests__/utils.js | src/__tests__/utils.js | const fs = require('fs');
export const makeAsyncCallback = (callbackValue) => {
let promiseResolve;
const promise = new Promise((resolve) => {
promiseResolve = resolve;
});
const func = jest.fn(
callbackValue
? () => promiseResolve(callbackValue)
: (...args) => promiseResolve(args.length ==... | const fs = require('fs');
export const makeAsyncCallback = (callbackValue) => {
let promiseResolve;
const promise = new Promise((resolve) => {
promiseResolve = resolve;
});
const func = jest.fn(
callbackValue
? () => promiseResolve(callbackValue)
: (...args) => promiseResolve(args.length ==... | Update muteConsole & restoreConsole functions | Update muteConsole & restoreConsole functions
| JavaScript | mit | wojtekmaj/react-pdf,wojtekmaj/react-pdf,wojtekmaj/react-pdf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.