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 |
|---|---|---|---|---|---|---|---|---|---|
27e591f9b15c2b73b3f1ddef7c7c61208f90b53c | karma.config.js | karma.config.js | var _ = require('lodash'),
path = require('path'),
webpackConfig = require('./webpack.config.js');
_.merge(webpackConfig, {
devtool: 'inline-source-map',
module: {
preLoaders: [
{
test: /\.(js|jsx)?$/,
include: path.resolve('src/'),
loader: 'babel-istanbul-in... | var _ = require('lodash'),
path = require('path'),
webpackConfig = require('./webpack.config.js');
_.merge(webpackConfig, {
devtool: 'inline-source-map',
module: {
postLoaders: [
{
test: /\.(js|jsx)?$/,
include: path.resolve('src/'),
loader: 'babel-istanbul-i... | Change from `preLoaders` to `postLoaders` | Change from `preLoaders` to `postLoaders`
| JavaScript | mit | ufocoder/WebsocketUI,ufocoder/WebsocketUI |
ecf867bf88ddd300d4dab1ad978db8d0554258d7 | app/assets/javascripts/browser-check.js | app/assets/javascripts/browser-check.js | /*globals $, GOVUK, suchi */
/*jslint
white: true,
browser: true */
$(function() {
"use strict";
function browserWarning() {
var container = $('<div id="global-browser-prompt"></div>'),
text = $('<p><a href="/help/browsers">Upgrade your web browser</a> (the software you use to access the internet), i... | /*globals $, GOVUK, suchi */
/*jslint
white: true,
browser: true */
$(function() {
"use strict";
function browserWarning() {
var container = $('<div id="global-browser-prompt"></div>'),
text = $('<p><a href="/help/browsers">Upgrade your web browser</a> (the software you use to access the internet), i... | Increase the browser upgrade dismissal duration | Increase the browser upgrade dismissal duration
As some users are not in a position to upgrade, eg, anywhere with restrictive IT policies and slow update rollout.
While we still want to re-remind users, we shouldn't do it too often. A month seems reasonable
| JavaScript | mit | kalleth/static,alphagov/static,tadast/static,alphagov/static,robinwhittleton/static,alphagov/static,robinwhittleton/static,tadast/static,kalleth/static,kalleth/static,tadast/static,tadast/static,kalleth/static,robinwhittleton/static,robinwhittleton/static |
4a4a71225c39f12c981f8c1b5962f05154496fa3 | app/common/modules/single-timeseries.js | app/common/modules/single-timeseries.js | define([
'common/collections/single-timeseries'
],
function (Collection) {
return {
requiresSvg: true,
hasDatePicker: true,
collectionClass: Collection,
collectionOptions: function () {
return {
numeratorMatcher: new RegExp(this.model.get('numerator-matcher')),
denominatorMatc... | define([
'common/collections/single-timeseries'
],
function (Collection) {
return {
requiresSvg: true,
hasDatePicker: true,
collectionClass: Collection,
collectionOptions: function () {
var options = {};
options.numeratorMatcher = new RegExp(this.model.get('numerator-matcher')),
o... | Switch to using options, as with newer module definitions | Switch to using options, as with newer module definitions
- Also allows easier extension of existing objects within the option set
| JavaScript | mit | tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,alphagov/spotlight,tijmenb/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight,alphagov/spotlight |
133bf86bf81ca9d00acfc33fa62d85cdf04c7598 | src/server/greenlock.js | src/server/greenlock.js | import env from 'dotenv';
import { log, logErr } from './app/shared/utils';
import * as greenlockExpress from 'greenlock-express';
env.config();
let greenlock;
// API_DOMAINS environment variable is a comma-delimited string of domains
if (process.env.API_DOMAINS && process.env.API_DOMAINS.split(",").length > 0) {
l... | import env from 'dotenv';
import { log, logErr } from './app/shared/utils';
import * as greenlockExpress from 'greenlock-express';
env.config();
let greenlock;
// API_DOMAINS environment variable is a comma-delimited string of domains
if (process.env.API_DOMAINS && process.env.API_DOMAINS.split(",").length > 0) {
l... | Add comments, remove debug, use process.env email | Add comments, remove debug, use process.env email
| JavaScript | agpl-3.0 | Cosecha/redadalertas-api |
ba6e39146412a83443c0110af7d77e642c747115 | src/field-inputs/Url.js | src/field-inputs/Url.js | import React, {PropTypes} from 'react'
import FormBuilderPropTypes from '../FormBuilderPropTypes'
import Str from './String'
export default React.createClass({
propTypes: {
field: FormBuilderPropTypes.field.isRequired,
value: PropTypes.string,
onChange: PropTypes.func
},
getDefaultProps() {
retu... | import React, {PropTypes} from 'react'
import FormBuilderPropTypes from '../FormBuilderPropTypes'
import Str from './String'
export default React.createClass({
propTypes: {
field: FormBuilderPropTypes.field.isRequired,
value: PropTypes.string,
onChange: PropTypes.func
},
getDefaultProps() {
retu... | Set type on url field | Set type on url field
| JavaScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity |
1c93e4d142284de9508da497003bcb34f7ed87b8 | src/data/SubtitlePiece.js | src/data/SubtitlePiece.js | const striptags = require('striptags');
const { convertFormatToSeconds, convertSecondsToFormat, normalizeString } = require('../utils');
class SubtitlePiece {
static fromSubtitlesParserItem(item) {
return new SubtitlePiece(item);
}
constructor({ id, startTime, endTime, text, data }) {
if ... | const striptags = require('striptags');
const { convertFormatToSeconds, convertSecondsToFormat, normalizeString } = require('../utils');
class SubtitlePiece {
static fromSubtitlesParserItem(item) {
return new SubtitlePiece(item);
}
constructor({ id, startTime, endTime, text, data }) {
if ... | Fix wrong text splitting to words | Fix wrong text splitting to words
| JavaScript | mit | CLUG-kr/ming,CLUG-kr/ming |
25b6134a2ced438ec2ab2dbfde6ff7a3003c1ab7 | src/routes/names.js | src/routes/names.js | const thesaurus = require('powerthesaurus-api')
module.exports = (router) => {
router.use('/v1/names', (req, res, next) => {
Promise.all(req.query.bandname.split(' ').map((name) => thesaurus(name)))
.then((results) => {
const wordlist = results.map((item) => {
return item.map((data) => {
... | const thesaurus = require('powerthesaurus-api')
const ignore = [
'a',
'the',
'of',
'in',
]
module.exports = (router) => {
router.use('/v1/names', (req, res, next) => {
Promise.all(req.query.bandname.split(' ').map((name) => {
if (ignore.indexOf(name) !== -1) return name
return thesaurus(name... | Add ignore list for common words | Add ignore list for common words
| JavaScript | mit | signup-from-bandname/banGen,signup-from-bandname/banGen,signup-from-bandname/banGen |
a8857834ca63ead1d53c7136ada3f27d77bc7a99 | src/store.js | src/store.js | //@flow
import { createStore, compose, applyMiddleware } from "redux";
import { routerMiddleware } from "react-router-redux";
import createHistory from "history/createBrowserHistory";
import reducers from "./data/reducers";
const defaultState = {};
export const history = createHistory();
const middlewares = [routerM... | //@flow
import { createStore, compose, applyMiddleware } from "redux";
import { routerMiddleware } from "react-router-redux";
import createHistory from "history/createBrowserHistory";
import reducers from "./data/reducers";
import cards from "./data/state/cards";
const defaultState = { cards };
export const history =... | Add cards to default state and hot reload reducers | Add cards to default state and hot reload reducers
| JavaScript | mit | slightly-askew/portfolio-2017,slightly-askew/portfolio-2017 |
35e083ed2ae2c8e2d0ba286303ee8f3ab120ff2e | src/store.js | src/store.js | // @flow
import type { ThunkOrActionType } from "./actionCreators";
import type { ActionType } from "./actionTypes";
import type { AppState } from "./reducers";
import type { Store as ReduxStore } from "redux";
import { browserHistory } from "react-router";
import { routerMiddleware } from "react-router-redux";
import... | // @flow
import type { ThunkOrActionType } from "./actionCreators";
import type { ActionType } from "./actionTypes";
import type { AppState } from "./reducers";
import type { Store as ReduxStore } from "redux";
import { browserHistory } from "react-router";
import { routerMiddleware } from "react-router-redux";
import... | Add AppState annotation to slicer | Add AppState annotation to slicer
| JavaScript | mit | captbaritone/markdown.today,captbaritone/markdown.today,captbaritone/markdown.today |
809aaa2d1cd4007e36c1518d8a44944e3b88a9d6 | src/modules/mymodule.js | src/modules/mymodule.js | // ------------------------------------
// Constants
const COUNTER_INCREMENT = 'COUNTER_INCREMENT';
// ------------------------------------
// Action creators
export function increment(value = 1) {
return {
type: COUNTER_INCREMENT,
payload: value
};
}
// ------------------------------------
// Selectors... | // ------------------------------------
// Constants
const COUNTER_INCREMENT = 'COUNTER_INCREMENT';
// ------------------------------------
// Action creators
export function increment(value = 1) {
return {
type: COUNTER_INCREMENT,
payload: value
};
}
// ------------------------------------
// Selectors... | Replace Object.assign with the spread object operator (supported by CRA) | Replace Object.assign with the spread object operator (supported by CRA)
Signed-off-by: Gianni Valdambrini <c5d749f9a9fad12805bcb3c96e57c90355771f56@develer.com>
| JavaScript | mit | nbschool/ecommerce_web,nbschool/ecommerce_web |
d78e7efdadd90cb3a167fce2d60043693e4c32e9 | server/init/default-users.js | server/init/default-users.js | var mongoose = require('mongoose'),
User = mongoose.model('User'),
constants = require('../common/constants'),
SHA256 = require('crypto-js/sha256');
User.findOne({username: 'admin'})
.exec(function (err, user) {
'use strict';
if (!user && !err) {
User({
user... | var mongoose = require('mongoose'),
User = mongoose.model('User'),
constants = require('../common/constants'),
SHA256 = require('crypto-js/sha256');
User.findOne({username: 'admin'})
.exec(function (err, user) {
'use strict';
if (!user && !err) {
User({
user... | Fix default-user to have adequate length for username and password. | Fix default-user to have adequate length for username and password.
| JavaScript | mit | TA-2016-NodeJs-Team2/Telerik-Racer,TA-2016-NodeJs-Team2/Telerik-Racer |
2ae406a61f6bbe200c7e5a4c6fcb1d6422d32fc9 | tools/tool-env/install-runtime.js | tools/tool-env/install-runtime.js | // Install ES2015-complaint polyfills for Object, Array, String, Function,
// Symbol, Map, Set, and Promise, patching the native implementations when
// they are available.
require("./install-promise.js");
var Mp = module.constructor.prototype;
var moduleLoad = Mp.load;
Mp.load = function (filename) {
var result = m... | // Install ES2015-complaint polyfills for Object, Array, String, Function,
// Symbol, Map, Set, and Promise, patching the native implementations when
// they are available.
require("./install-promise.js");
// Enable the module.{watch,export,...} runtime API needed by Reify.
require("reify/lib/runtime").enable(module.c... | Enable the Reify runtime API even if meteor-babel/register does not. | Enable the Reify runtime API even if meteor-babel/register does not.
| JavaScript | mit | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor |
4de0a8456b92488180954f2994f987bdb5798256 | resources/assets/js/services/info/song.js | resources/assets/js/services/info/song.js | import http from '../http';
import albumInfo from './album';
import artistInfo from './artist';
export default {
/**
* Get extra song information (lyrics, artist info, album info).
*
* @param {Object} song
* @param {?Function} cb
*/
fetch(song, cb = null) {
// Check if ... | import http from '../http';
import albumInfo from './album';
import artistInfo from './artist';
export default {
/**
* Get extra song information (lyrics, artist info, album info).
*
* @param {Object} song
* @param {?Function} cb
*/
fetch(song, cb = null) {
// Check if ... | Fix the artist loading & info bug | Fix the artist loading & info bug
| JavaScript | mit | X-Ryl669/kutr,phanan/koel,alex-phillips/koel,X-Ryl669/kutr,phanan/koel,mikifus/koel,mikifus/koel,phanan/koel,alex-phillips/koel,alex-phillips/koel,mikifus/koel,X-Ryl669/kutr |
36c5d3a4f84a02c2ae467fb09e57e9db4f6c36dc | lib/bindings.js | lib/bindings.js | var fs = require('fs'),
path = require('path');
// normalize node 0.6 and 0.8
fs.existsSync || (fs.existsSync = path.existsSync);
var platforms = {
win32: function(folder){
process.env.PATH += ';' + folder;
}
};
// derive a distributable path from the node version, platform, and arch
function distribPa... | var fs = require('fs'),
path = require('path');
// normalize node 0.6 and 0.8
fs.existsSync || (fs.existsSync = path.existsSync);
var platforms = {
win32: function(folder, file){
process.env.PATH += ';' + folder;
}
};
// derive a distributable path from the node version, platform, and arch
function dis... | Check that the .node file actually exists | Check that the .node file actually exists
| JavaScript | mit | modulexcite/appjs,appjs/appjs,eric-seekas/appjs,appjs/appjs,reekoheek/appjs,SaravananRajaraman/appjs,SaravananRajaraman/appjs,milani/appjs,tempbottle/appjs,tempbottle/appjs,SaravananRajaraman/appjs,yuhangwang/appjs,eric-seekas/appjs,reekoheek/appjs,reekoheek/appjs,milani/appjs,imshibaji/appjs,modulexcite/appjs,yuhangwa... |
e356d1dda09d7303b8fead6c158c308a154607ee | client/app/i18n/container_helper.service.js | client/app/i18n/container_helper.service.js | 'use strict';
angular.module('arethusaTranslateGuiApp').service('containerHelper', [
function() {
var self = this;
var DIRTY = 'dirty-bg';
var CLEAN = 'clean-bg';
function stats(scope) {
return scope.getStats(scope.container);
}
this.checkStatus = function(scope) {
var cont = s... | 'use strict';
angular.module('arethusaTranslateGuiApp').service('containerHelper', [
function() {
var self = this;
var DIRTY = 'dirty-bg';
var CLEAN = 'clean-bg';
function stats(scope) {
return scope.getStats(scope.container);
}
function isDirty(scope) {
return stats(scope).dir... | Fix dirty check in containerHelper | Fix dirty check in containerHelper
| JavaScript | mit | LFDM/angular-translate-gui |
beffff1c70d6bc7b7dfd56144d98f3f37fd179dd | client/src/components/HopscotchLauncher.js | client/src/components/HopscotchLauncher.js | import React from 'react'
import {Button} from 'react-bootstrap'
import tourIcon from 'resources/tour-icon.svg'
import ReactSVG from 'react-svg'
export default function HopscotchLauncher(props) {
return <Button bsStyle="link" className="persistent-tour-launcher" onClick={props.onClick}>
New to ANET? Take a... | import React from 'react'
import {Button} from 'react-bootstrap'
import tourIcon from 'resources/tour-icon.svg'
import ReactSVG from 'react-svg'
export default function HopscotchLauncher(props) {
return <Button bsStyle="link" className="persistent-tour-launcher" onClick={props.onClick}>
New to ANET? Take a... | Remove period from "Take a guided tour" | Remove period from "Take a guided tour"
| JavaScript | mit | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet |
e189c3bef0dfa572e4d966635475d8c23bfda79e | client/src/components/forms/FormActions.js | client/src/components/forms/FormActions.js | import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import Button from 'react-bootstrap/lib/Button';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
const ActionsButtons = ({ t, resetForm, saving }) => (
<p>
<Button bsStyle="danger" onClick={resetForm}... | import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import Button from 'react-bootstrap/lib/Button';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
const ActionsButtons = ({ t, saving }) => (
<p>
{/* Bug for the moment */}
{/* <Button bsStyle="dan... | Disable reset for the moment | [Client] Disable reset for the moment
| JavaScript | mit | DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager |
0da020c61817474e15c63bd6dc40d4b65a40fda9 | web/src/js/components/General/Fireworks.js | web/src/js/components/General/Fireworks.js | import React, { useRef } from 'react'
import * as FireworksCanvas from 'fireworks-canvas'
import { withStyles } from '@material-ui/core/styles'
import FadeInDashboardAnimation from 'js/components/General/FadeInDashboardAnimation'
const styles = {
container: {
position: 'absolute',
zIndex: 5000,
top: 0,
... | import React, { useRef, useState } from 'react'
import * as FireworksCanvas from 'fireworks-canvas'
import { withStyles } from '@material-ui/core/styles'
import FadeInDashboardAnimation from 'js/components/General/FadeInDashboardAnimation'
import IconButton from '@material-ui/core/IconButton'
import CloseIcon from '@ma... | Add a close button to the fireworks | Add a close button to the fireworks
| JavaScript | mpl-2.0 | gladly-team/tab,gladly-team/tab,gladly-team/tab |
cf269a26ac586a948b7cbb332e1f88113f15221b | src/routes/index.js | src/routes/index.js | const router = require('express').Router()
const nonUser = require('./non-user')
const user = require('./user-only')
router.use('/', nonUser)
router.use('/', user)
module.exports = router
| const router = require('express').Router()
const nonUser = require('./non-user')
const user = require('./user-only')
router.use((req, res, next) => {
console.log('middleware stuff')
next()
})
router.use('/', nonUser)
router.use('/', user)
module.exports = router
| Add middleware function that's console logging to make sure it's working | Add middleware function that's console logging to make sure it's working
| JavaScript | mit | Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge |
a9e219a5e5be3b18335b5031b5c0450b1e54bd5b | src/text-grabber.js | src/text-grabber.js | ;(function(exports) {
var TextGrabber = function() {
this.submittedText = "";
this.currentLine = "";
};
TextGrabber.prototype = {
write: function(e) {
if (e.event === "submit") {
this.submittedText += e.text + "\n";
this.currentLine = "";
} else {
this.currentLine ... | ;(function(exports) {
var TextGrabber = function() {
this.submittedText = [];
this.currentLine = {};
};
TextGrabber.prototype = {
write: function(e) {
if (e.event === "permanent") {
var lines = e.text.split("\n");
for (var i = 0; i < lines.length; i++) {
if (lines[i] !... | Make text grabber categorise text in input and output. | Make text grabber categorise text in input and output. | JavaScript | mit | maryrosecook/codewithisla |
b62d9b600dda1e65bf23aeaa1eb5578acfbd9f6d | start.js | start.js | #!/usr/bin/env node
var cp = require('child_process')
var BIN = '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'
var ARGS = ['--load-and-launch-app=chrome']
var child = cp.spawn(BIN, ARGS)
// Nodemon is trying to kill us, so kill Chrome
process.once('SIGUSR2', function () {
child.kill(... | #!/usr/bin/env node
var cp = require('child_process')
var BIN = process.platform=='linux' ? '/bin/google-chrome' : '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary';
var ARGS = ['--load-and-launch-app=chrome']
var child = cp.spawn(BIN, ARGS)
// Nodemon is trying to kill us, so kill Chrome... | Improve the accessibility of the project for linux users. | Improve the accessibility of the project for linux users.
| JavaScript | mit | feross/webtorrent-cli,feross/webtorrent-cli |
b163c12143f332b276cd1104ab42598489994c6e | client/lecturer/app/courses.factory.js | client/lecturer/app/courses.factory.js | (function() {
'use strict';
angular
.module('lecturer')
.factory('coursesFactory', coursesFactory);
/* @ngInject */
function coursesFactory(coursesService) {
var selectedCourse = {};
var Course = false;
var service = {
getCourses: getCou... | (function() {
'use strict';
angular
.module('lecturer')
.factory('coursesFactory', coursesFactory);
/* @ngInject */
function coursesFactory(coursesService, lecturerFactory) {
var selectedCourse = {};
var Course = false;
var service = {
g... | Fix all courses being displayed for all lecturers | Fix all courses being displayed for all lecturers
| JavaScript | mit | MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS |
e6a72cd9754ea4bf2332c8a5262614295f10ebef | bot.js | bot.js | var telegramBot = require('node-telegram-bot-api');
var twitter = require('twitter');
var aws = require('aws-sdk');
var nconf = require('nconf');
var log4js = require('log4js');
nconf.file('config', __dirname + '/config/config.json');
var botToken = nconf.get('telegram').bot_token;
var bot = new TelegramBot(botToken,... | var telegramBot = require('node-telegram-bot-api');
var twitter = require('twitter');
var aws = require('aws-sdk');
var nconf = require('nconf');
var log4js = require('log4js');
nconf.file('config', __dirname + '/config/config.json');
var botToken = nconf.get('telegram').bot_token;
var bot = new TelegramBot(botToken,... | Add dydb object and put updateUserList function again | Add dydb object and put updateUserList function again
| JavaScript | mit | dollars0427/mtrupdate-bot |
962b29531ef90a415ee062a45b81c5dd927e3f18 | app/js/components/Alert.js | app/js/components/Alert.js | 'use strict'
import {Component} from 'react'
import {Link} from 'react-router'
import Countdown from 'react-countdown-now';
import CountdownTimer from './CountdownTimer'
const registrationEndDate = "Wednesday, November 15 2017 15:00:00 EST"
class Alert extends Component {
constructor(props) {
super(props)
... | 'use strict'
import {Component} from 'react'
import {Link} from 'react-router'
import Countdown from 'react-countdown-now';
import CountdownTimer from './CountdownTimer'
const registrationEndDate = "Wednesday, November 15 2017 15:00:00 EST"
class Alert extends Component {
constructor(props) {
super(props)
... | Correct token sale banner timezone. | Correct token sale banner timezone.
| JavaScript | mit | blockstack/blockstack-site,blockstack/blockstack-site |
86a611bf64d3fb18bde62e3457c1c09953c4b158 | test/file-collection.js | test/file-collection.js | import test from 'ava';
import '../src/index';
import FileCollection from '../src/FileCollection';
test('that it sets the output file if a src file and output directory are provided', t => {
let src = new File('src/file.txt').parsePath();
let files = new FileCollection(src.path);
files.destination = 'outpu... | import test from 'ava';
import '../src/index';
import FileCollection from '../src/FileCollection';
test('that it sets the output file if a src file and output directory are provided', t => {
let src = new File('src/file.txt').parsePath();
let files = new FileCollection(src.path);
files.destination = 'outpu... | Add test for file collection | Add test for file collection
| JavaScript | mit | JeffreyWay/laravel-mix |
c4e98094e2250d556566d76512f502e382d05ae5 | test/functional/conf.js | test/functional/conf.js | exports.config = {
baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/',
specs: ['cucumber/*.feature'],
allScriptsTimeout: 30000,
getPageTimeout: 30000,
capabilities: {
browserName: 'chrome'
},
framework: 'cucumber',
cucumberOpts: {
require: 'cucumber/step_definitions/*.j... | 'use strict';
exports.config = {
baseUrl: 'http://dev.hmda-pilot.ec2.devis.com/',
specs: ['cucumber/*.feature'],
allScriptsTimeout: 30000,
getPageTimeout: 30000,
capabilities: {
browserName: 'chrome'
},
framework: 'cucumber',
cucumberOpts: {
require: 'cucumber/step_... | Set the browser size to 1280x1024 | Set the browser size to 1280x1024
| JavaScript | cc0-1.0 | cfpb/hmda-pilot,LinuxBozo/hmda-pilot,LinuxBozo/hmda-pilot,cfpb/hmda-pilot,cfpb/hmda-pilot,LinuxBozo/hmda-pilot |
122abc843a93c20ccaa48deea0675cbd281f3c41 | sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js | sencha-workspace/SlateAdmin/app/view/progress/NavPanel.js | Ext.define('SlateAdmin.view.progress.NavPanel', {
extend: 'SlateAdmin.view.LinksNavPanel',
xtype: 'progress-navpanel',
title: 'Student Progress',
data: true,
applyData: function(data) {
if (data !== true) {
return data;
}
return [
{
... | Ext.define('SlateAdmin.view.progress.NavPanel', {
extend: 'SlateAdmin.view.LinksNavPanel',
xtype: 'progress-navpanel',
title: 'Student Progress',
data: true,
applyData: function(data) {
if (data !== true) {
return data;
}
return [
{
... | Use consistent naming for 'Print / Export' section | Use consistent naming for 'Print / Export' section
| JavaScript | mit | SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin |
796a9e6f66b019fbe102c79ed2c0836369cde36f | src/sw-precache-config.js | src/sw-precache-config.js | /* eslint-env node */
'use strict';
module.exports = {
staticFileGlobs: [
'index.html',
'bower_components/webcomponentsjs/webcomponents-*.js',
'images/*',
'favicon.ico'
],
navigateFallback: 'index.html'
};
| /* eslint-env node */
'use strict';
module.exports = {
staticFileGlobs: [
'index.html',
'bower_components/webcomponentsjs/webcomponents-*.js',
'images/*',
'favicon.ico'
],
navigateFallback: 'index.html',
navigateFallbackWhitelist: [/^\/(projects|posts|impress)\//]
};
| Exclude "/demo" from SW navigateFallback. | Exclude "/demo" from SW navigateFallback.
| JavaScript | mit | frigus02/website,frigus02/website |
9e7379f863ab7bb8b4ae2fd39530692a427df5a1 | test/loader.js | test/loader.js | /*globals mocha*/
require.config({
baseUrl: '/',
paths: {
'tabler': '../',
'jquery': 'test/lib/jquery-1.7.1',
'underscore': 'test/lib/underscore'
}
});
mocha.setup({
ui: 'bdd',
globals: ['jQuery']
});
require(['jquery',
'test/tabler.tests',
'test/tabler.aggreg... | /*globals mocha*/
require.config({
baseUrl: '/',
paths: {
'tabler': '../',
'jquery': 'test/lib/jquery-1.7.1',
'underscore': 'test/lib/underscore'
}
});
mocha.setup({
ui: 'bdd',
globals: ['jQuery']
});
require(['jquery',
'test/tabler.tests',
'test/tabler.aggreg... | Add removeColumns plugin to the test suite | Add removeColumns plugin to the test suite
| JavaScript | mit | BrandwatchLtd/tabler,BrandwatchLtd/tabler,BrandwatchLtd/tabler |
cd2e472740ea42928b635d79a22d71d1f24024d9 | src/activity-logger/index.js | src/activity-logger/index.js | export const PAUSE_STORAGE_KEY = 'is-logging-paused'
export function isLoggable({ url }) {
// Just remember http(s) pages, ignoring data uris, newtab, ...
const loggableUrlPattern = /^https?:\/\/\w+([-/.#=$^@&%?+(),]\w*\/?([-/.#=$^@&:%?+(),]\w*\/?)*)*$/
const urlEndings = ['.svg', '.jpg', '.png', '.jpeg', ... | export const PAUSE_STORAGE_KEY = 'is-logging-paused'
export function isLoggable({ url }) {
// Just remember http(s) pages, ignoring data uris, newtab, ...
const loggableUrlPattern = /^https?:\/\/\w+(?:[-/.#=$^@&%?+(),]\w*\/?(?:[-/.#=$^@&:%?+(),]\w*\/?)*)*$/
const urlEndings = ['.svg', '.jpg', '.png', '.jpe... | Make loggability regex groups non-capturing | Make loggability regex groups non-capturing
- captured groups have a performance overhead, which we seem to have been impacted by through the addition of this nested group when it comes to its use in imports calculations
- we never actually attempt any matches with the pattern, only test it against strings, so there's... | JavaScript | mit | WorldBrain/WebMemex,WorldBrain/WebMemex |
b08269f679a78d1f24774a687706927a8b00bd57 | tests/index.js | tests/index.js | 'use strict';
var path = require('path');
var expect = require('expect.js');
var walkSync = require('walk-sync');
var broccoli = require('broccoli');
var fs = require('fs');
// require('mocha-jshint')();
var Tar = require('..');
describe('broccoli-targz', function(){
var fixturePath = path.join(__dirname, 'fixtur... | 'use strict';
var path = require('path');
var expect = require('expect.js');
var walkSync = require('walk-sync');
var broccoli = require('broccoli');
var fs = require('fs');
// require('mocha-jshint')();
var Tar = require('..');
describe('broccoli-targz', function(){
var fixturePath = path.join(__dirname, 'fixtur... | Add tests for non-constructor pattern. | Add tests for non-constructor pattern. | JavaScript | mit | trek/broccoli-tar,vasman/broccoli-zip |
d938dec90ecc359be562851b91223e3512dd0dea | src/ui/mixin/element.js | src/ui/mixin/element.js | /** section: scripty2 ui
* mixin S2.UI.Mixin.Element
*
* Provides a few convenience methods for widgets that map easily to a
* single element.
**/
(function() {
var METHODS = $w('observe stopObserving show hide ' +
'addClassName removeClassName hasClassName setStyle getStyle' +
'writeAttribute readAt... | /** section: scripty2 ui
* mixin S2.UI.Mixin.Element
*
* Provides a few convenience methods for widgets that map easily to a
* single element.
**/
(function() {
var METHODS = $w('observe stopObserving show hide ' +
'addClassName removeClassName hasClassName setStyle getStyle' +
'writeAttribute readAt... | Redefine `S2.UI.Mixin.Element.on` so that it caches its observers. | Redefine `S2.UI.Mixin.Element.on` so that it caches its observers. | JavaScript | mit | madrobby/scripty2,madrobby/scripty2 |
8b5a0f5a1d7f435d23e3c220a85e4180531f3aeb | Kwc/Basic/LinkTag/Extern/Component.defer.js | Kwc/Basic/LinkTag/Extern/Component.defer.js | $(document).on('click', 'a', function(event) {
var lnk = event.currentTarget;
//for backwards compatibility
var rels = lnk.rel.split(' ');
$.each(rels, function() {
if (this.match(/^popup/)) {
var relProperties = this.split('_');
//$(lnk).addClass('webLinkPopup');
... | $(document).on('click', 'a', function(event) {
var lnk = event.currentTarget;
//for backwards compatibility
var rels = lnk.rel.split(' ');
$.each(rels, function() {
if (this.match(/^popup/)) {
var relProperties = this.split('_');
//$(lnk).addClass('webLinkPopup');
... | Fix data attribute usage for external links | Fix data attribute usage for external links
| JavaScript | bsd-2-clause | kaufmo/koala-framework,nsams/koala-framework,koala-framework/koala-framework,nsams/koala-framework,kaufmo/koala-framework,nsams/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework |
cb68b3bb815013c4f933665da4d1c9805e64b899 | examples/webpack.config.js | examples/webpack.config.js | var webpack = require("webpack");
var path = require("path");
module.exports = {
devtool: "source-map",
entry: path.join(__dirname, "src/main.js"),
output: {
path: path.join(__dirname, "build"),
publicPath: "/js/",
filename: "main.js"
},
resolve: { extensions: ["", ".js"] },
module: {
lo... | var webpack = require("webpack");
var path = require("path");
module.exports = {
devtool: "source-map",
entry: path.join(__dirname, "src/main.js"),
output: {
path: "./built/js",
publicPath: "/js/",
filename: "main.js"
},
resolve: { extensions: ["", ".js"] },
module: {
loaders: [{
t... | Return to the right build dir | Return to the right build dir
| JavaScript | mit | gpbl/react-day-picker,saenglert/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker |
e25af70c3c3043e7028fa6c85d06ea976c35997e | server/votes/countVotes.js | server/votes/countVotes.js | var countVotes = function () {
"use strict";
// find votes for object
var deltaVotesQuery = {
delta: {
$exists: true
}
};
var deltaVotes = Votes.find(deltaVotesQuery).fetch();
var voteTable = {};
// count how many votes each object has
_.forEach(deltaVotes, function (vote) {
var p... | var countVotes = function () {
"use strict";
// find votes for object
var deltaVotesQuery = {
delta: {
$exists: true
}
};
var deltaVotes = Votes.find(deltaVotesQuery).fetch();
var voteTable = {};
// count how many votes each object has
_.forEach(deltaVotes, function (vote) {
var p... | Apply votes quietly every 5 seconds | Apply votes quietly every 5 seconds
| JavaScript | mit | rrevanth/news,rrevanth/news |
2a146bcf5e104d9d35874858380c5ae29cfcd845 | business-processes/index.js | business-processes/index.js | // Collection of all business processes which where made online
'use strict';
module.exports = require('./resolve')(require('../db').BusinessProcess);
| // Collection of all business processes which where made online
'use strict';
var isFalsy = require('../utils/is-falsy');
module.exports = require('../db').BusinessProcess.instances
.filter(function (obj) {
if (obj.master !== obj) return false;
return (obj.constructor.prototype !== obj);
})
.filterByKey('isF... | Update up to changes in resolver | Update up to changes in resolver
| JavaScript | mit | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations |
e6080452d70ad2b16ab3fac3a93f1816549b57c1 | test/featherlight_test.js | test/featherlight_test.js | if(!this.chai) { chai = require("chai"); }
var expect = chai.expect;
(function($) {
var cleanupDom = function(){
$('body >:not(#mocha)').remove()
};
describe('Featherlight', function() {
afterEach(cleanupDom);
it ('works on items with data-featherlight by default', function(done) {
var $bound = $('#auto-... | if(!this.chai) { chai = require("chai"); }
var expect = chai.expect;
(function($) {
var cleanupDom = function(){
$('body >:not(#mocha)').remove()
};
$.fx.off = true;
describe('Featherlight', function() {
afterEach(cleanupDom);
it ('works on items with data-featherlight by default', function() {
var $boun... | Simplify tests by turning off effects | Simplify tests by turning off effects
| JavaScript | mit | xStrom/featherlight,danielchikaka/featherlight,noelboss/featherlight,noelboss/featherlight,danielchikaka/featherlight,getprodigy/featherlight,xStrom/featherlight,hnkent/featherlight,minervaproject/featherlight,beeseenmedia/featherlight,n7best/featherlight,n7best/featherlight,minervaproject/featherlight,hnkent/featherli... |
f77d3a06aa7fe7413296f91c7c6ae82c74b4c807 | src/constants/actionTypes.js | src/constants/actionTypes.js | import constanst from 'flux-constants'
export default constants([
'ON_CLICK_MENU_BUTTON',
'POSTS_REQUEST',
'POSTS_SUCCESS',
'POSTS_FAILURE',
]) | Create action types for Redux | Create action types for Redux
| JavaScript | mit | nomkhonwaan/nomkhonwaan.github.io | |
0f309adcd9742f4d2a7c4f85cdaf852f19552436 | test/onPort.test.js | test/onPort.test.js | 'use strict'
const t = require('tap')
const spawn = require('child_process').spawn
const split = require('split2')
const autocannon = require.resolve('../autocannon')
const target = require.resolve('./targetProcess')
const lines = [
/Running 1s test @ .*$/,
/10 connections.*$/,
/$/,
/Stat.*Avg.*Stdev.*Max.*$/... | 'use strict'
const t = require('tap')
const spawn = require('child_process').spawn
const split = require('split2')
const autocannon = require.resolve('../autocannon')
const target = require.resolve('./targetProcess')
const lines = [
/Running 1s test @ .*$/,
/10 connections.*$/,
/$/,
/Stat.*Avg.*Stdev.*Max.*$/... | Revert "add debug line for travis bc this is passing locally" | Revert "add debug line for travis bc this is passing locally"
This reverts commit c930369362fa9c68e8f44296617695fc804e141d.
| JavaScript | mit | mcollina/autocannon |
1dec88178c4a0c939cd21045d3584a9429d702bf | app/main/plugins/hain-plugin-math/index.js | app/main/plugins/hain-plugin-math/index.js | 'use strict';
const lo_isNumber = require('lodash.isnumber');
const lo_isString = require('lodash.isstring');
const lo_isObject = require('lodash.isobject');
const lo_has = require('lodash.has');
const math = require('mathjs');
module.exports = ({ app }) => {
function search(query, res) {
try {
const an... | 'use strict';
const lo_isNumber = require('lodash.isnumber');
const lo_isString = require('lodash.isstring');
const lo_isObject = require('lodash.isobject');
const lo_has = require('lodash.has');
const math = require('mathjs');
module.exports = (context) => {
const app = context.app;
const clipboard = context.cl... | Copy result into clipboard on execute equation | hain-plugin-math: Copy result into clipboard on execute equation
| JavaScript | mit | appetizermonster/hain,hainproject/hain,hainproject/hain,hainproject/hain,appetizermonster/hain,hainproject/hain,appetizermonster/hain,appetizermonster/hain |
6d505a32934e0cadf929accb8cebfce40ef63b68 | test/stories/frontPage.js | test/stories/frontPage.js | var basePage = require('../pages/Base');
describe('Main page', function() {
basePage.go();
it('should be at the correct URL', function() {
expect(basePage.currentUrl).toEqual(browser.baseUrl + basePage.url);
});
});
| var basePage = require('../pages/Base');
var expect = require('./setupExpect').expect;
describe('Main page', function() {
basePage.go();
it('should be at the correct URL', function() {
expect(basePage.currentUrl).to.eventually.equal(browser.baseUrl + basePage.url);
});
});
| Use mocha in spec files. | Use mocha in spec files.
| JavaScript | mit | Droogans/ProtractorPageObjects |
8048e4007edd44d2299945fc4802a7cb525bf053 | app/javascript/packs/components/dashboard/Header.js | app/javascript/packs/components/dashboard/Header.js | import React from 'react';
import styles from './Header.sass';
import classNames from 'classnames';
import { Link } from 'react-router-dom';
export default function Head() {
const button = classNames('waves-effect', 'waves-light', 'btn', styles.button);
return (
<div className={styles.container}>
<div cl... | import { isEmpty } from 'lodash';
import React from 'react';
import classNames from 'classnames';
import { Link } from 'react-router-dom';
import styles from './Header.sass';
import User from '../../models/user';
export default function Head() {
const button = classNames('waves-effect', 'waves-light', 'btn', styles.... | Hide links for sign in and sign up if already exists user token. | Hide links for sign in and sign up if already exists user token.
| JavaScript | agpl-3.0 | GuHoo/Kunto-Backend,GuHoo/Kunto-Backend,GuHoo/Kunto-Backend |
a72de95ffbd59cc74a6dd9607f28a8ec04b3315f | src/encoded/static/server.js | src/encoded/static/server.js | // Entry point for server rendering subprocess
/* jshint strict: false */
if (process.env.NODE_ENV === undefined) {
require("babel-core/register")({
only: ['react-forms', 'src/encoded/static'],
});
} else {
require('source-map-support').install();
}
require('./libs/react-patches');
var argv = proc... | // Entry point for server rendering subprocess
/* jshint strict: false */
if (process.env.NODE_ENV === undefined) {
require("babel-core/register")({
only: ['react-forms', 'src/encoded/static'],
});
} else {
require('source-map-support').install();
}
require('./libs/react-patches');
var argv = proc... | Add ability to specify input from file for debugging. | Add ability to specify input from file for debugging.
| JavaScript | mit | ENCODE-DCC/snovault,4dn-dcic/fourfront,ENCODE-DCC/encoded,4dn-dcic/fourfront,hms-dbmi/fourfront,ENCODE-DCC/snovault,ENCODE-DCC/encoded,ENCODE-DCC/snovault,ENCODE-DCC/snovault,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,ENCODE-DCC/encoded,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,hms-dbmi/fourfront,hms-dbmi/fourfr... |
9aa3a785ca1dd35c4402e6d1e655f9be30288383 | src/endpoints/auth/accept.js | src/endpoints/auth/accept.js | 'use strict';
/**
* Module dependencies
*/
import rndstr from 'rndstr';
import AuthSess from '../../models/auth-session';
import Userkey from '../../models/userkey';
/**
* Accept
*
* @param {Object} params
* @param {Object} user
* @return {Promise<object>}
*/
module.exports = (params, user) =>
new Promise(as... | 'use strict';
/**
* Module dependencies
*/
import rndstr from 'rndstr';
import AuthSess from '../../models/auth-session';
import Userkey from '../../models/userkey';
/**
* Accept
*
* @param {Object} params
* @param {Object} user
* @return {Promise<object>}
*/
module.exports = (params, user) =>
new Promise(as... | Add missing semicolon and bracket | Add missing semicolon and bracket | JavaScript | mit | syuilo/misskey-core,syuilo/misskey-core,syuilo/misskey-core,syuilo/misskey-core |
7c333b1ea5ffa23334d81e125a87841c91c719ae | config/front.prod.config.js | config/front.prod.config.js | const merge = require('webpack-merge');
const webpack = require('webpack');
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const baseConfig = require('./base.config... | const merge = require('webpack-merge');
const webpack = require('webpack');
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const frontConfig = require('./front.config');
const devConfig = merge(frontConfig, {
output: {... | Update paths and remove dupl. plugins from front prod | Update paths and remove dupl. plugins from front prod
| JavaScript | mit | tuelsch/bolg,tuelsch/bolg |
172ec0b4c753fc6a99eb7912cf9fca06d71103fa | test/api/getLanguage.js | test/api/getLanguage.js | 'use strict';
var hljs = require('../../build');
describe('.getLanguage', function() {
it('should get an existing language', function() {
var result = hljs.getLanguage('python');
result.should.be.instanceOf(Object);
});
it('should be case insensitive', function() {
var result = hljs.getLanguage('p... | 'use strict';
var hljs = require('../../build');
var should = require('should');
describe('.getLanguage', function() {
it('should get an existing language', function() {
var result = hljs.getLanguage('python');
result.should.be.instanceOf(Object);
});
it('should be case insensitive', function() {
... | Make testing for undefined more clear | Make testing for undefined more clear
| JavaScript | bsd-3-clause | Sannis/highlight.js,dbkaplun/highlight.js,sourrust/highlight.js,bluepichu/highlight.js,bluepichu/highlight.js,isagalaev/highlight.js,palmin/highlight.js,palmin/highlight.js,StanislawSwierc/highlight.js,carlokok/highlight.js,teambition/highlight.js,teambition/highlight.js,dbkaplun/highlight.js,Sannis/highlight.js,highli... |
587dc3f78c3b100ed84476849de7fc9d59a2a865 | src/app/constants/index.js | src/app/constants/index.js | // Workflow State
export const WORKFLOW_STATE_RUNNING = 'running';
export const WORKFLOW_STATE_PAUSED = 'paused';
export const WORKFLOW_STATE_IDLE = 'idle';
| // Workflow State
export const WORKFLOW_STATE_RUNNING = 'running';
export const WORKFLOW_STATE_PAUSED = 'paused';
export const WORKFLOW_STATE_IDLE = 'idle';
// Macro action
export const MACRO_ACTION_START = 'start';
export const MACRO_ACTION_STOP = 'stop';
| Define constants for macro actions | Define constants for macro actions
| JavaScript | mit | cheton/cnc.js,cheton/cnc,cncjs/cncjs,cheton/cnc.js,cheton/piduino-grbl,cheton/cnc.js,cncjs/cncjs,cncjs/cncjs,cheton/piduino-grbl,cheton/piduino-grbl,cheton/cnc,cheton/cnc |
60248caad30d984b8879d260b0a3d1c2a1105565 | server/api.js | server/api.js | var express = require('express');
var app = express();
var fb = require("./firebaselogin.js");
var db = fb.database();
var ref = db.ref();
var glob = require('glob');
exports.test = function(req, res) {
ref.on("value", function(snapshot) {
res.send(snapshot.val());
}, function (errorObject) {
... | var express = require('express');
var app = express();
var fb = require("./firebaselogin.js");
var db = fb.database();
var ref = db.ref();
var glob = require('glob');
exports.test = function(req, res) {
ref.on("value", function(snapshot) {
res.send(snapshot.val());
}, function (errorObject) {
... | Make sure only files below src/ are included with glob. | Security: Make sure only files below src/ are included with glob.
| JavaScript | mit | hookbot/multi-player,hookbot/multi-player |
26f807c3687ceac296280c2918f0e7b67526da38 | test/functional/user.js | test/functional/user.js | user_pref("media.peerconnection.default_iceservers", "[]");
user_pref("media.peerconnection.use_document_iceservers", false);
user_pref("social.activeProviders", "{\"http://localhost:3000\":1}");
user_pref("social.enabled", true);
user_pref("social.manifest.tests", "{\"name\":\"Talkilla Functional tests\",\"iconURL\":\... | user_pref("browser.dom.window.dump.enabled", true);
user_pref("media.peerconnection.default_iceservers", "[]");
user_pref("media.peerconnection.use_document_iceservers", false);
user_pref("social.activeProviders", "{\"http://localhost:3000\":1}");
user_pref("social.enabled", true);
user_pref("social.manifest.tests", "{... | Enable console output of dump by default in selenium tests | Enable console output of dump by default in selenium tests
| JavaScript | mpl-2.0 | mozilla/talkilla,mozilla/talkilla,mozilla/talkilla |
54dbeb7bef3f31244dc4ca6f5b0ab5ff71c2bb3e | src/patch/operators/array.js | src/patch/operators/array.js | 'use strict';
const ANY_ARRAY = [
'boolean[]',
'integer[]',
'number[]',
'string[]',
'object[]',
'null[]',
];
// `_slice` patch operator
const sliceOperator = {
attribute: ANY_ARRAY,
argument: ['integer[]'],
check (opVal) {
if (opVal.length <= 2) { return; }
return 'the argument must be an... | 'use strict';
const ANY_ARRAY = [
'boolean[]',
'integer[]',
'number[]',
'string[]',
'object[]',
'null[]',
];
// `_push` patch operator
const pushOperator = {
attribute: ANY_ARRAY,
argument: ANY_ARRAY,
apply (attrVal, opVal) {
return [...attrVal, ...opVal];
},
};
// `_unshift` patch operator... | Add _push and _unshift patch operators | Add _push and _unshift patch operators
| JavaScript | apache-2.0 | autoserver-org/autoserver,autoserver-org/autoserver |
22ba78f09327a540e3d5f49509906989aeb6ce4a | app/bootstrap.js | app/bootstrap.js | module.exports = (function() {
var Router = require('router'),
Connection = require('lib/connection');
// App namespace.
window.Boards = {
Models: {},
Collections: {}
};
// Load helpers.
require('lib/helpers');
// Register Swag Helpers.
Swag.registerHelpers();
// Initialize Router.
... | module.exports = (function() {
var Router = require('router'),
Connection = require('lib/connection');
// App namespace.
window.Boards = {
Models: {},
Collections: {}
};
// Load helpers.
require('lib/helpers');
$.ajaxSetup({
beforeSend: function(xhr, settings) {
xhr.setRequestHe... | Send JWT auth token on the as an authorization header of every HTTP request. | Send JWT auth token on the as an authorization header of every HTTP request.
| JavaScript | agpl-3.0 | GetBlimp/boards-web,jessamynsmith/boards-web,jessamynsmith/boards-web |
b5e9d9134e49a3e467921c07f967e0c7e5e6ab0b | test/unit/views/base.js | test/unit/views/base.js | import {createContainer} from 'stardux'
import View from '../../../src/dragon/views/base'
describe('Unit: View', function() {
/*
TODO: what happens if:
- there is no container?
- there is no template?
*/
it.skip('should initialize', function(done) {
var view = new View({
})
exp... | import {createContainer} from 'stardux'
import View from '../../../src/dragon/views/base'
describe('Unit: View', function() {
/*
TODO: what happens if:
- there is no container?
- there is no template?
*/
it.skip('should initialize', function(done) {
var view = new View({
})
exp... | Add unit test for tagName | Add unit test for tagName
| JavaScript | mit | chrisabrams/dragon,chrisabrams/dragon |
9673596b7c313b8544c51f0053131008909de6dc | server/middleware/requireEmailWithDomains.js | server/middleware/requireEmailWithDomains.js | module.exports = (req, res, next, {
/**
* @param acceptableDomains
*
* List of fully qualified accceptable domain names.
* Should be for example 'safaricom.co.ke', not just 'safaricom' or 'co.ke'
*
* IMPORTANT!!
* If you use this middleware and add other acceptableDomains, make sure to
* add '... | let acceptableDomainsFromEnv = process.env.ACCEPTABLE_DOMAINS;
if (acceptableDomainsFromEnv) {
acceptableDomainsFromEnv = acceptableDomainsFromEnv.split(',').filter(
domain => !!domain // Remove any empty items from the list.
);
}
module.exports = (req, res, next, {
/**
* @param acceptableDomains
*
... | Make `acceptableDomains` configurable without editing source code. | Make `acceptableDomains` configurable without editing source code.
A list of available domains is now being read in from the env and
added to the default list.
| JavaScript | mit | Waiyaki/provisioning-scheduler,Waiyaki/provisioning-scheduler,Waiyaki/provisioning-scheduler |
14213152b43a4b9d6be88e161b0d9fb2e56d9a0c | src/mist/io/static/js/app/views/delete_tag.js | src/mist/io/static/js/app/views/delete_tag.js | define('app/views/delete_tag', [
'ember',
'jquery'
],
/**
*
* Delete tag view
*
* @returns Class
*/
function() {
return Ember.View.extend({
tagName: false,
didInsertElement: function(e){
$("a.tagButton").button();
... | define('app/views/delete_tag', [
'ember',
'jquery'
],
/**
*
* Delete tag view
*
* @returns Class
*/
function() {
return Ember.View.extend({
tagName: false,
didInsertElement: function(e){
$("a.tagButton").button();
... | Delete tag only on success | Delete tag only on success
| JavaScript | agpl-3.0 | Lao-liu/mist.io,munkiat/mist.io,DimensionDataCBUSydney/mist.io,afivos/mist.io,kelonye/mist.io,johnnyWalnut/mist.io,zBMNForks/mist.io,johnnyWalnut/mist.io,DimensionDataCBUSydney/mist.io,zBMNForks/mist.io,Lao-liu/mist.io,DimensionDataCBUSydney/mist.io,munkiat/mist.io,munkiat/mist.io,Lao-liu/mist.io,DimensionDataCBUSydney... |
fc7023dcefd21b3e376e63facdb94d3dde8b3bf0 | evently/finder/loggedIn/data.js | evently/finder/loggedIn/data.js | function(resp) {
var flights = resp.rows.map(function(r) {
return {
flight : r.key[0]
};
});
flights.unshift({"flight": "All"});
return {flights:flights};
}
//@ sourceURL=/finder/data.js
| function(resp) {
var flights = resp.rows.map(function(r) {
return {
flight : r.key[1]
};
});
flights.unshift({"flight": "All"});
return {flights:flights};
}
//@ sourceURL=/finder/data.js
| Fix index in flight filter. | Fix index in flight filter.
| JavaScript | apache-2.0 | shmakes/hf-basic,shmakes/hf-basic |
20fa652bb202bd6d0b02e0fe56ccdff2b47ba29d | cordova/scripts/replace-config-env-vars.js | cordova/scripts/replace-config-env-vars.js | module.exports = function(context) {
const fs = context.requireCordovaModule('fs');
const cordova_util = context.requireCordovaModule('cordova-lib/src/cordova/util');
let projectRoot = cordova_util.isCordova();
let configXML = cordova_util.projectConfig(projectRoot);
let data = fs.readFileSync(configXML, 'u... | module.exports = function(context) {
const fs = require('fs');
const cordova_util = context.requireCordovaModule('cordova-lib/src/cordova/util');
let projectRoot = cordova_util.isCordova();
let configXML = cordova_util.projectConfig(projectRoot);
let data = fs.readFileSync(configXML, 'utf8');
for (var env... | Fix loading non-cordova modules in scripts | Fix loading non-cordova modules in scripts
Loading non-cordova modules with `requireCordovaModule` is not
supported. | JavaScript | epl-1.0 | eclipsesource/tabris-js-hello-world,eclipsesource/tabris-js-hello-world,eclipsesource/tabris-js-hello-world |
d87ae0303852f1021f76200c062a0bf666a645e3 | examples/sources/ImageSource.js | examples/sources/ImageSource.js | import PropTypes from 'prop-types';
import React from 'react';
import { AtomicBlockUtils } from 'draft-js';
class ImageSource extends React.Component {
componentDidMount() {
const { editorState, options, onUpdate } = this.props;
const url = window.prompt('Link URL');
if (url) {
... | import PropTypes from 'prop-types';
import React from 'react';
import { AtomicBlockUtils } from 'draft-js';
class ImageSource extends React.Component {
componentDidMount() {
const { editorState, options, onUpdate } = this.props;
const url = window.prompt('Link URL');
if (url) {
... | Create images as MUTABLE, like a paste would | Create images as MUTABLE, like a paste would
| JavaScript | mit | springload/draftail,springload/draftail,springload/draftail,springload/draftail |
9cbfc459fd163d79d7e8e99e339a05f04377cb66 | src/classes/modifiers/outlets-receivable.js | src/classes/modifiers/outlets-receivable.js | class OutletsReceivable {
static transform(modified, ...names) {
modified.outlets = names;
modified._argsTransformFns.push(this.filterOutlets.bind(null, modified));
}
static filterOutlets(modified, opts, ...args) {
let names = modified.outlets;
let outlets = opts.outlets || ... | class OutletsReceivable {
static transform(modified, ...names) {
modified.outlets = names;
modified._argsTransformFns.push(this.filterOutlets.bind(null, modified));
}
static filterOutlets(modified, opts, ...args) {
let names = modified.outlets;
let outlets = opts.outlets || ... | Use JSON.stringify to stringify Array | Use JSON.stringify to stringify Array
| JavaScript | mit | darvelo/ether,darvelo/ether,darvelo/ether |
81dc99e8e63041c57c477fda1c56da228c259fcf | fan/tasks/views/TaskItemView.js | fan/tasks/views/TaskItemView.js | jsio('from shared.javascript import Class')
jsio('import fan.ui.Button')
jsio('import fan.ui.RadioButtons')
jsio('import fan.tasks.views.View')
exports = Class(fan.tasks.views.View, function(supr) {
this._className += ' TaskItemView'
this._minWidth = 390
this._maxWidth = 740
this._headerHeight = 0
this.init =... | jsio('from shared.javascript import Class')
jsio('import fan.ui.Button')
jsio('import fan.ui.RadioButtons')
jsio('import fan.tasks.views.View')
exports = Class(fan.tasks.views.View, function(supr) {
this._className += ' TaskItemView'
this._minWidth = 390
this._maxWidth = 740
this._headerHeight = 0
this.init =... | Comment out unused buildHeader code in taskItemView | Comment out unused buildHeader code in taskItemView
| JavaScript | mit | marcuswestin/Focus |
a4f0ef9e898417a51bcc7a92c1e81605b62df5ce | tests/features/api/02-import-json_spec.js | tests/features/api/02-import-json_spec.js | describe('Import JSON', () => {
it('should work properly', () => {
cy.loginVisit('/')
cy.fixture('import.json').then(IMPORT_API => {
// Click [Import JSON] button
cy.get('.j-buttons__wrapper > a[href="/new"] + div > button')
.click()
// Prepare file upload
const file = JSON.s... | describe('Import JSON', () => {
it('should work properly', () => {
cy.loginVisit('/')
cy.fixture('import.json').then(IMPORT_API => {
// Click [Import JSON] button
cy.get('.j-buttons__wrapper > a[href="/new"] + div > button')
.click()
// Prepare file upload
const file = JSON.s... | Fix tests failing on cypress 3.1.0 | Fix tests failing on cypress 3.1.0
| JavaScript | mit | hellofresh/janus-dashboard,hellofresh/janus-dashboard |
3abc44cceb5d10905092384b98a6d1c51a267180 | src/lights/AmbientLight.js | src/lights/AmbientLight.js | import { Light } from './Light';
/**
* @author mrdoob / http://mrdoob.com/
*/
function AmbientLight( color, intensity ) {
Light.call( this, color, intensity );
this.type = 'AmbientLight';
this.castShadow = undefined;
}
AmbientLight.prototype = Object.assign( Object.create( Light.prototype ), {
constructor... | import { Light } from './Light';
/**
* @author mrdoob / http://mrdoob.com/
*/
function AmbientLight( color, intensity ) {
Light.call( this, color, intensity );
this.type = 'AmbientLight';
this.castShadow = undefined;
}
AmbientLight.prototype = Object.assign( Object.create( Light.prototype ), {
constructor... | Remove unneeded comma in AmbiantLight | Remove unneeded comma in AmbiantLight
| JavaScript | mit | spite/three.js,ndebeiss/three.js,TristanVALCKE/three.js,kaisalmen/three.js,sasha240100/three.js,amakaroff82/three.js,jostschmithals/three.js,mese79/three.js,aardgoose/three.js,Ludobaka/three.js,rlugojr/three.js,Jozain/three.js,matgr1/three.js,WestLangley/three.js,fraguada/three.js,nhalloran/three.js,nhalloran/three.js,... |
f418d87d1c57b19ac5fb85ab14fa2f57db63ac06 | content/menu-fill.js | content/menu-fill.js | console.log("menu-fill");
var menu_env = $("#menu-env");
var item1 = menu_env_data[0];
var item2 = menu_env_data[1];
function createLinkItem (item) {
var _a = $("<a/>", { href: item.link });
$("<i/>", { class: item.icon }).appendTo(_a);
$("<span/>", { text: " " + item.name }).appendTo(_a);
return _a;
}
fu... | console.log("menu-fill");
var menu_env = $("#menu-env");
function createLinkItem (item) {
var _a = $("<a/>", { href: item.link });
$("<i/>", { class: item.icon }).appendTo(_a);
$("<span/>", { text: " " + item.name }).appendTo(_a);
return _a;
}
function createSingleLevelMenuItem (item) {
return $("<li/>").... | Fix the order issue of menu items | Fix the order issue of menu items
| JavaScript | mit | vejuhust/yet-another-monitoring-dashboard,vejuhust/yet-another-monitoring-dashboard |
7c42661294649483a283fc6d15866ea044da9bc4 | test/functional/initialize_map.js | test/functional/initialize_map.js | module.exports = {
before : function(client) {
console.log('Setting up functional tests...');
client
.url('http://localhost:3000')
.pause(1000);
},
after : function(client) {
console.log('Closing down functional tests...');
client.end();
},
'HTML body is present' : function(clien... | module.exports = {
before : function(client) {
console.log('Setting up functional tests...');
client
.url('http://localhost:3000')
.pause(1000);
},
after : function(client) {
console.log('Closing down functional tests...');
client.end();
},
'Basic HTML loads' : function(client) {... | Add tests for panes loading in app. | Add tests for panes loading in app.
| JavaScript | mit | coshx/cmv-app,coshx/cmv-app |
c35453c01ded83c521c1b953a3830185aa9bd74c | lib/rules/mixins-before-declarations.js | lib/rules/mixins-before-declarations.js | 'use strict';
var helpers = require('../helpers');
module.exports = {
'name': 'mixins-before-declarations',
'defaults': {
'exclude': [
'breakpoint',
'mq'
]
},
'detect': function (ast, parser) {
var result = [],
error;
ast.traverseByType('include', function (node, i, parent... | 'use strict';
var helpers = require('../helpers');
module.exports = {
'name': 'mixins-before-declarations',
'defaults': {
'exclude': [
'breakpoint',
'mq'
]
},
'detect': function (ast, parser) {
var result = [],
error;
ast.traverseByType('include', function (node, i, parent... | Fix mixin before declaration issues | :bug: Fix mixin before declaration issues
Add check for declaration node content type
Fixes #227
Fixes #230
| JavaScript | mit | sktt/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,srowhani/sass-lint,sasstools/sass-lint,donabrams/sass-lint,ngryman/sass-lint,Dru89/sass-lint,bgriffith/sass-lint,flacerdk/sass-lint,benthemonkey/sass-lint,sasstools/sass-lint |
1836d5b36ad6185e1152de0b11be07c2f10d629f | webpack.config.babel.js | webpack.config.babel.js | import Bootstrap from 'bootstrap-webpack-plugin'
import Path from 'path'
const path = Path.join.bind(null, __dirname)
const outputDir = path(`build`)
export default {
entry: {
playground: `./examples/playground/main.js`,
multipleTriggers: `./examples/multiple-triggers/main.js`,
},
output: {
path: ... | import Bootstrap from 'bootstrap-webpack-plugin'
import Path from 'path'
const path = Path.join.bind(null, __dirname)
const outputDirName = `build`
const outputDir = path(outputDirName)
export default {
entry: {
playground: `./examples/playground/main.js`,
multipleTriggers: `./examples/multiple-triggers/m... | Make a part of webpack config consistent with gh-pages branch variant for simpler future conflict resolutions. | Make a part of webpack config consistent with gh-pages branch variant for simpler future conflict resolutions.
| JavaScript | mit | gregory90/react-popover,littlebits/react-popover,clara-labs/react-popover |
02be6197ffec6c3f6d0214617c815423c6b8c4d4 | voice/proxy-call.js | voice/proxy-call.js | /* Voice Tutorial 4: Making a Proxy Call
API Reference: https://docs.nexmo.com/voice/voice-api/api-reference
*/
'use strict';
require('dotenv').config({path: __dirname + '/../.env'});
const app = require('express')();
const bodyParser = require('body-parser');
app.use(bodyParser.json());
app.use(bodyParser.urlenco... | /* Voice Tutorial 4: Making a Proxy Call
API Reference: https://docs.nexmo.com/voice/voice-api/api-reference
*/
'use strict';
require('dotenv').config({path: __dirname + '/../.env'});
const app = require('express')();
const bodyParser = require('body-parser');
app.use(bodyParser.json());
app.use(bodyParser.urlenco... | Use `NEXMO_` prefixes in proxy example | Use `NEXMO_` prefixes in proxy example | JavaScript | mit | nexmo-community/nexmo-node-quickstart,nexmo-community/nexmo-node-quickstart |
432b6421bbf4d49d22747bb15f1d0d741c6b4265 | src/config.js | src/config.js | /* global process */
const nodeEnv = (process.env.NODE_ENV || 'development');
export default {
nodeEnv,
logReduxActions: () => Boolean(process.env.LOG_REDUX_ACTIONS),
warnOnDroppedErrors: nodeEnv === 'development',
stubSVGs: nodeEnv === 'test',
firebaseApp: process.env.FIREBASE_APP || 'blistering-inferno-9... | /* global process */
const nodeEnv = (process.env.NODE_ENV || 'development');
export default {
nodeEnv,
logReduxActions: () => process.env.LOG_REDUX_ACTIONS === 'true',
warnOnDroppedErrors: nodeEnv === 'development',
stubSVGs: nodeEnv === 'test',
firebaseApp: process.env.FIREBASE_APP || 'blistering-inferno... | Fix check for LOG_REDUX_ACTIONS environment variable | Fix check for LOG_REDUX_ACTIONS environment variable
Right now it’s on in production! : 0
| JavaScript | mit | popcodeorg/popcode,popcodeorg/popcode,jwang1919/popcode,jwang1919/popcode,outoftime/learnpad,jwang1919/popcode,popcodeorg/popcode,popcodeorg/popcode,jwang1919/popcode,outoftime/learnpad |
1bf0f61c03478a1e2277fecbdf770bcb2a920041 | src/notebook/api/kernel.js | src/notebook/api/kernel.js | import {
createControlSubject,
createStdinSubject,
createIOPubSubject,
createShellSubject,
} from 'enchannel-zmq-backend';
import * as fs from 'fs';
import * as uuid from 'uuid';
import { launch } from 'spawnteract';
export function launchKernel(kernelSpecName, spawnOptions) {
return launch(kernelSpecName, ... | import {
createControlSubject,
createStdinSubject,
createIOPubSubject,
createShellSubject,
} from 'enchannel-zmq-backend';
import * as fs from 'fs';
import * as uuid from 'uuid';
import { launch } from 'spawnteract';
export function launchKernel(kernelSpecName, spawnOptions) {
return launch(kernelSpecName, ... | Complete the control channel too. | Complete the control channel too.
| JavaScript | bsd-3-clause | rgbkrk/nteract,nteract/nteract,jdfreder/nteract,jdetle/nteract,nteract/nteract,0u812/nteract,rgbkrk/nteract,jdfreder/nteract,rgbkrk/nteract,0u812/nteract,captainsafia/nteract,nteract/nteract,nteract/nteract,jdetle/nteract,rgbkrk/nteract,jdfreder/nteract,0u812/nteract,nteract/composition,captainsafia/nteract,temogen/nte... |
15262b0348636af809d6c4b9240428412a367a96 | gulpfile.js/tasks/production.js | gulpfile.js/tasks/production.js | var gulp = require('gulp')
var gulpSequence = require('gulp-sequence')
var getEnabledTasks = require('../lib/getEnabledTasks')
var os = require('os')
var path = require('path')
var productionTask = function(cb) {
global.production = true
// Build to a temporary directory, the... | var gulp = require('gulp')
var gulpSequence = require('gulp-sequence')
var getEnabledTasks = require('../lib/getEnabledTasks')
var os = require('os')
var path = require('path')
var productionTask = function(cb) {
global.production = true
// Build to a temporary directory, the... | Fix bug when trying to "cross-link" between multiple devices | Fix bug when trying to "cross-link" between multiple devices
| JavaScript | mit | jakefleming/mezzotent,jakefleming/mezzotent,vigetlabs/gulp-starter,jakefleming/mezzotent,greypants/gulp-starter,greypants/gulp-starter,vigetlabs/gulp-starter,jakefleming/mezzotent,greypants/gulp-starter,greypants/gulp-starter,vigetlabs/gulp-starter,vigetlabs/gulp-starter |
da97d8885b8a9145c933d7cce7c713446f817f6c | src/components/views/messages/UnknownBody.js | src/components/views/messages/UnknownBody.js | /*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless require... | /*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2020 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless require... | Fix react error about functional components can't take props | Fix react error about functional components can't take props
| JavaScript | apache-2.0 | matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk |
385658e20f1f513a77ce34758d0e41f197a8a4ba | core/workers.js | core/workers.js | (function() {
'use strict';
self.addEventListener('message', function(obj) {
window.setInterval(function() {
console.log('worker: ' + obj.existence);
var limit = obj.existence - 1;
if (obj.isDead !== undefined) {
obj.isDead(limit);
... | (function() {
'use strict';
function calculateDeath(dead) {
setInterval(function() {
var limit = dead - 1;
if (limit === 0) {
self.postMessage(limit);
}
return (dead = limit);
}, 1000);
}
self.addEventListe... | Improve web worker with new dead calculate | Improve web worker with new dead calculate
| JavaScript | mit | AlbertoFuente/lab,AlbertoFuente/lab |
45df2186d52482b810fee9ef71179d46e4886ff8 | app/components/Settings/components/option.js | app/components/Settings/components/option.js | import React from 'react';
import PropTypes from 'prop-types';
import { InputGroup, Intent } from '@blueprintjs/core';
const Option = ({ intent, title, type, value, unit, onChange, inputStyles }) => (
<label className="pt-label pt-inline">
<div className="d-inline-block w-exact-225">{title} {unit && `(${unit})`}... | import React from 'react';
import PropTypes from 'prop-types';
import { InputGroup } from '@blueprintjs/core';
const Option = ({ intent, title, type, value, unit, onChange, inputStyles }) => (
<label className="pt-label pt-inline">
<div className="d-inline-block w-exact-225">{title} {unit && `(${unit})`}</div>
... | Remove intent warning and allow zero values for settings | Remove intent warning and allow zero values for settings
| JavaScript | mit | builtwithluv/ZenFocus,builtwithluv/ZenFocus |
994ab2e64b18199d9d0acd34de8cd442aff1841d | LockServer/controllers/health-controller.js | LockServer/controllers/health-controller.js | const lock = require('./lock-controller');
const utils = require('./utils');
function notify(text) {
console.info(text);
utils.notifySlack({
channel: '#alerts',
text: text,
username: 'Lock System Monitoring'
});
}
exports.checkHealth = function() {
if (!lock.isIndoorScannerHealthy()) {
notify(... | const lock = require('./lock-controller');
const utils = require('./utils');
function notify(text) {
console.info(text);
utils.notifySlack({
channel: '#alerts',
text: text,
username: 'Lock System Monitoring'
});
}
exports.checkHealth = function() {
if (!lock.isIndoorScannerHealthy()) {
notify(... | Increase timeout to 3 sec for health check. | Increase timeout to 3 sec for health check.
| JavaScript | mit | straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock,straylightlabs/hands-free-lock |
cb592c2306fbe401c13917a34f0813b5bcb5e04c | src/router.js | src/router.js | var express = require('express');
var parseCommand = require('./parse-command');
var router = express.Router();
router.post('/', (req, res) => {
parseCommand(req)
.then(res.send);
});
module.exports = router;
| const express = require('express');
const winston = require('winston');
const parseCommand = require('./parse-command');
const router = express.Router();
router.post('/', (req, res) => {
parseCommand(req)
.then((text) => {
res.status(200).send(text);
})
.catch((err) => {
winston.error(err);
res.se... | Add general handling of any rejections | feat: Add general handling of any rejections
| JavaScript | mit | NSAppsTeam/nickel-bot |
2df12a10c390da8bf0e886b7717b70126508aa41 | web/src/scripts/controller/CartOauthCtrl.js | web/src/scripts/controller/CartOauthCtrl.js | 'use strict';
module.exports = function ($scope, $location, $service) {
console.log('CartOauthCtrl');
$scope.hasBeenInited = false;
$scope.startOauthProcess = function() {
$service.getOauthUrl().then(function(result) {
window.location.href = result.url;
});
};
$servic... | 'use strict';
module.exports = function ($scope, $location, $accessService) {
console.log('CartOauthCtrl');
$scope.hasBeenInited = false;
$scope.startOauthProcess = function() {
$accessService.getOauthUrl().then(function(result) {
window.location.href = result.url;
});
};
... | Fix oauth page response, redirect user to login page, if site already authed, not throw user into error page. | Fix oauth page response, redirect user to login page, if site already authed, not throw user into error page.
| JavaScript | mit | agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart |
768ea00e7bee2b9de34d07b21fd18813cbdb6f2b | src/providers/weather/air-pollution-service.js | src/providers/weather/air-pollution-service.js | import { apiConstants, apiProvidersConst, httpService, newsModelFactory } from '../../common/common.js';
export default class AirPollution {
static getSummary() {
let options = httpService.clone(apiConstants.airPollution);
options.path = options.path.replace('{0}', options.token);
return ht... | import { apiConstants, apiProvidersConst, httpService, newsModelFactory } from '../../common/common.js';
export default class AirPollution {
static getSummary() {
let options = httpService.clone(apiConstants.airPollution);
options.path = options.path.replace('{0}', options.token);
return ht... | Enhance air pollution service formatting | Enhance air pollution service formatting
| JavaScript | mit | AlexanderAntov/scraper-js,AlexanderAntov/scraper-js |
f83b13af8fa49a500fd554a53ba800f999be5919 | lib/copy-sync/copy-file-sync.js | lib/copy-sync/copy-file-sync.js | var fs = require('graceful-fs')
var BUF_LENGTH = 64 * 1024
var _buff = new Buffer(BUF_LENGTH)
function copyFileSync (srcFile, destFile, options) {
var clobber = options.clobber
var preserveTimestamps = options.preserveTimestamps
if (fs.existsSync(destFile)) {
if (clobber) {
fs.chmodSync(destFile, par... | var fs = require('graceful-fs')
var BUF_LENGTH = 64 * 1024
var _buff = new Buffer(BUF_LENGTH)
function copyFileSync (srcFile, destFile, options) {
var clobber = options.clobber
var preserveTimestamps = options.preserveTimestamps
if (fs.existsSync(destFile)) {
if (clobber) {
fs.chmodSync(destFile, par... | Improve EEXIST error message for copySync | Improve EEXIST error message for copySync
| JavaScript | mit | jprichardson/node-fs-extra |
45ab550d51fddf10526996423e1bcd70169c3e6f | benchmark/sync-vs-async.js | benchmark/sync-vs-async.js | #!/usr/bin/env node
const crypto = require('crypto');
const b64 = require('../');
const prettyBytes = require('pretty-bytes');
const timer = {
reset: () => timer.startTime = process.hrtime(),
duration: () => process.hrtime(timer.startTime)[1] / 1000000
};
const bench = noOfBytes => Promise.resolve().then(async (... | #!/usr/bin/env node
const crypto = require('crypto');
const b64 = require('../');
const prettyBytes = require('pretty-bytes');
const bytesToBenchmark = [10000, 100000, 1000000, 10000000];
const timer = {
reset: () => timer.startTime = process.hrtime(),
duration: () => process.hrtime(timer.startTime)[1] / 1000000... | Use array for benchmark bytes | Use array for benchmark bytes
| JavaScript | mit | lukechilds/base64-async |
cfe552eaf0b7b036a7343da97080bf2660c03866 | src/helpers/junk_drawer.js | src/helpers/junk_drawer.js | import { decamelizeKeys } from 'humps'
import store from '../../store'
import { saveProfile } from '../../actions/profile'
export function preferenceToggleChanged(obj) {
const newObj = { ...obj }
if (newObj.hasOwnProperty('is_public')) {
if (!newObj.is_public) {
newObj.has_reposting_enabled = false
... | import { decamelizeKeys } from 'humps'
import store from '../store'
import { saveProfile } from '../actions/profile'
export function preferenceToggleChanged(obj) {
const newObj = { ...obj }
if (newObj.hasOwnProperty('is_public')) {
if (!newObj.is_public) {
newObj.has_reposting_enabled = false
newOb... | Fix a borked import statement | Fix a borked import statement | JavaScript | mit | ello/webapp,ello/webapp,ello/webapp |
ef93b58cecc433382f125702934e3ed30d995eb3 | www/android/FileSystem.js | www/android/FileSystem.js | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... | /*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); y... | Fix permission errors due to URI encoding inconsistency on Android | CB-9891: Fix permission errors due to URI encoding inconsistency on Android
| JavaScript | apache-2.0 | tripodsan/cordova-plugin-file,cadenasgmbh/cordova-plugin-file,tripodsan/cordova-plugin-file,macdonst/cordova-plugin-file,apache/cordova-plugin-file,macdonst/cordova-plugin-file,mnill/cordova-plugin-file,sanmeranam/cordova-file,cadenasgmbh/cordova-plugin-file,mnill/cordova-plugin-file,GenusAS/cordova-plugin-file,purplec... |
204053d95ffa1429288def46fa1e13941834e045 | addon-test-support/-private/is-focusable.js | addon-test-support/-private/is-focusable.js | export default function isFocusable(el) {
let focusableTags = ['INPUT', 'BUTTON', 'LINK', 'SELECT', 'A', 'TEXTAREA'];
let { tagName, type } = el;
if (type === 'hidden') {
return false;
}
return focusableTags.includes(tagName) || el.contentEditable;
}
| export default function isFocusable(el) {
let focusableTags = ['INPUT', 'BUTTON', 'LINK', 'SELECT', 'A', 'TEXTAREA'];
let { tagName, type } = el;
if (type === 'hidden') {
return false;
}
return focusableTags.indexOf(tagName) > -1 || el.contentEditable;
}
| Use indexOf instead of includes | Use indexOf instead of includes
| JavaScript | mit | cibernox/ember-native-dom-helpers,cibernox/ember-native-dom-helpers |
ccb8732f686b578c9f1d09c21f5498769f15bf01 | src/core/sfx.js | src/core/sfx.js | var Sfx = {
sounds: { },
preload: function() {
// Note to self: Do not preload "burning tomato". It doesn't work due to timing issues and just causes overhead.
},
load: function(fileName) {
if (typeof Sfx.sounds[fileName] != 'undefined') {
return Sfx.sounds[fileName];
... | var Sfx = {
sounds: { },
preload: function() {
// Note to self: Do not preload "burning tomato". It doesn't work due to timing issues and just causes overhead.
this.load('dialogue_tick.wav');
this.load('footstep_snow_1.wav');
this.load('footstep_snow_2.wav');
this.load('... | Update the preload list. Fixes issue with the first dialogue message glitching up with the ticking sound. | [SFX] Update the preload list. Fixes issue with the first dialogue message glitching up with the ticking sound.
| JavaScript | mit | burningtomatoes/CabinInTheSnow |
c4a345314585cd23d965d0e52441a275ae53f356 | test/lib/rules/disallow-objectcontroller.js | test/lib/rules/disallow-objectcontroller.js | describe('lib/rules/disallow-objectcontroller', function () {
var checker = global.checker({
plugins: ['./lib/index']
});
describe('not configured', function() {
it('should report with undefined', function() {
global.expect(function() {
checker.configure({disallowObjectCont... | describe('lib/rules/disallow-objectcontroller', function () {
var checker = global.checker({
plugins: ['./lib/index']
});
describe('not configured', function() {
it('should report with undefined', function() {
global.expect(function() {
checker.configure({disallowObjectCont... | Add additional assertions around objectcontroller errors | Add additional assertions around objectcontroller errors
| JavaScript | mit | minichate/jscs-ember-deprecations,minichate/jscs-ember-deprecations |
1a15c2bd96e4356fd5659e52380cc5e519cd2007 | Commands/Commands/utils.js | Commands/Commands/utils.js | var commands = []
commands.ping = {
adminOnly: true,
modOnly: false,
fn: function (client, message) {
message.reply('Pong!')
}
}
commands['admin-only'] = {
adminOnly: true,
modOnly: false,
fn: function (client, message, suffix) {
message.reply(suffix)
}
}
commands['mod-only'] = {
adminOnly:... | var commands = []
commands.ping = {
adminOnly: false,
modOnly: false,
fn: function (client, message) {
message.reply('Pong!')
}
}
commands['admin-only'] = {
adminOnly: true,
modOnly: false,
fn: function (client, message, suffix) {
message.reply(suffix)
}
}
commands['mod-only'] = {
adminOnly... | Make ping available to everyone | Make ping available to everyone
| JavaScript | unlicense | Dougley/DiscordFeedback |
9fd9751f875e2800672c12e66889234375deeb51 | __tests__/assets/js/util.spec.js | __tests__/assets/js/util.spec.js | import * as util from '~/assets/js/util'
describe('util', () => {
test('getRSSLink', () => {
expect(util.getRSSLink('foo')).toEqual({
hid: 'rss',
rel: 'alternate',
type: 'application/rss+xml',
href: 'foo'
})
})
})
| import * as util from '~/assets/js/util'
describe('util', () => {
test('getRSSLink', () => {
expect(util.getRSSLink('foo')).toEqual({
hid: 'rss',
rel: 'alternate',
type: 'application/rss+xml',
href: 'foo'
})
})
describe('getImageURLs', () => {
it('get from link', () => {
... | Add the getImageURLs test case | Add the getImageURLs test case
| JavaScript | mit | sunya9/beta,sunya9/beta,sunya9/beta |
7adc1e15da0b0e0c11b383758322e2ed3412486a | addon/components/object-list-view-input-cell.js | addon/components/object-list-view-input-cell.js | import BaseComponent from './flexberry-base';
export default BaseComponent.extend({
tagName: 'td',
classNames: [],
column: null,
record: null,
didInsertElement: function() {
var _this = this;
this.$('input').change(function() {
_this.record.set(_this.column.propName, _this.$(this).val());
... | import BaseComponent from './flexberry-base';
export default BaseComponent.extend({
tagName: 'td',
classNames: [],
column: null,
record: null,
didInsertElement: function() {
var _this = this;
this.$('input').change(function() {
_this._setValue();
});
this.$('input').keyup(function() {
... | Modify the way of two way binding | Modify the way of two way binding
in object-list-view-input-cell component. Add binding input value with
model on key press.
| JavaScript | mit | Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry |
420cda51273dd81b2d5eeff07400d23d31cc21c6 | src/store/api/playlists.js | src/store/api/playlists.js | import client from './client'
export default {
getPlaylists (production, callback) {
client.get(`/api/data/projects/${production.id}/playlists`, callback)
},
newPlaylist (playlist, callback) {
const data = {
name: playlist.name,
project_id: playlist.production_id
}
client.post('/api/... | import client from './client'
export default {
getPlaylists (production, callback) {
client.get(`/api/data/projects/${production.id}/playlists`, callback)
},
getPlaylist (production, playlist, callback) {
const path = `/api/data/projects/${production.id}/playlists/${playlist.id}`
client.get(path, ca... | Add functions to get details about preview files | Add functions to get details about preview files
| JavaScript | agpl-3.0 | cgwire/kitsu,cgwire/kitsu |
f0295c57ad4b607c0922ddfbfc1ee6f694d8a97c | src/legacy/js/functions/_loadEmbedIframe.js | src/legacy/js/functions/_loadEmbedIframe.js | /**
* Created by crispin on 10/12/2015.
*/
function loadEmbedIframe(onSave) {
// add modal window
$('.workspace-menu').append(templates.embedIframe());
// variables
var modal = $(".modal");
// modal functions
function closeModal() {
modal.remove();
}
function saveUrl() {
... | /**
* Created by crispin on 10/12/2015.
*/
function loadEmbedIframe(onSave) {
// add modal window
$('.workspace-menu').append(templates.embedIframe());
// variables
var modal = $(".modal");
// modal functions
function closeModal() {
modal.remove();
}
function saveUrl() {
... | Use host instead of hostname | Use host instead of hostname
| JavaScript | mit | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence |
361b2f3c3d871da640431e8cd24baeedda15707d | lib/github.js | lib/github.js | 'use strict';
var GitHubApi = require('github');
var githubapi = new GitHubApi({
// required
version: "3.0.0",
// optional
timeout: 3000
});
exports.getPackageJson = function (user, repo, callback) {
if (!user) {
callback('GitHub user not valid.');
return;
}
if (!repo) {
callba... | 'use strict';
var GitHubApi = require('github');
var githubapi = new GitHubApi({
// required
version: "3.0.0",
// optional
timeout: 3000
});
exports.getPackageJson = function (user, repo, callback) {
if (!user) {
callback('GitHub user not valid.');
return;
}
if (!repo) {
callba... | Add protection for empty GitHub url. | Add protection for empty GitHub url.
| JavaScript | mit | seriema/npmalerts,creationix/npmalerts |
6f1ba3e83d9375b92c63b3a5e43f0976eee5a0e8 | src/transformers/importExportDeclaration.js | src/transformers/importExportDeclaration.js | import replacePath from "../helpers/replacePath";
export default function (t, path, state, regexps) {
const sourcePath = path.get("source");
if(sourcePath) {
replacePath(t, sourcePath, state, regexps);
}
} | import replacePath from "../helpers/replacePath";
export default function (t, path, state, regexps) {
const sourcePath = path.get("source");
if(sourcePath.node) {
replacePath(t, sourcePath, state, regexps);
}
} | Fix noop export breaking on null source node | fix(transformers): Fix noop export breaking on null source node
| JavaScript | mit | Velenir/babel-plugin-import-redirect |
c3ff50a7013280fdc3686e9ca676882ceddeef7b | app/assets/javascripts/admin/application.js | app/assets/javascripts/admin/application.js | //= require trix
//= require jquery.geocomplete
//= require cleave
//= require ./trix_events
//= require ./trix_toolbar
//= require ./app/init
//= require_tree ./app
$(document).on('turbolinks:load', function() {
// Datepicker
$('.air-datepicker').datepicker({
autoClose: true,
onSelect: function onSelect(... | //= require trix
//= require jquery.geocomplete
//= require cleave
//= require ./trix_events
//= require ./trix_toolbar
//= require ./app/init
//= require_tree ./app
$(document).on('turbolinks:load', function() {
// Datepicker
$('.air-datepicker').datepicker({
autoClose: true,
minutesStep: 5,
onSelect... | Allow only 5 minute increments for date picker so we reduce the number of steps | Allow only 5 minute increments for date picker so we reduce the number of steps
| JavaScript | agpl-3.0 | PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev |
50994f200ef2241d7a393f21edf29f743c53db68 | app/adapters/user.js | app/adapters/user.js | import ApplicationAdapter from 'ghost/adapters/application';
export default ApplicationAdapter.extend({
find: function (store, type, id) {
return this.findQuery(store, type, {id: id, status: 'all'});
},
findAll: function (store, type, id) {
return this.query(store, type, {id: id, status: '... | import ApplicationAdapter from 'ghost/adapters/application';
export default ApplicationAdapter.extend({
find: function (store, type, id) {
return this.findQuery(store, type, {id: id, status: 'all'});
},
// TODO: This is needed because the API currently expects you to know the
// status of the ... | Fix "revoke invite" feature on /team page | Fix "revoke invite" feature on /team page
refs #5947
- override the `findRecord` method of the user adapter to always include "status=all" when querying by ID
| JavaScript | mit | airycanon/Ghost-Admin,kevinansfield/Ghost-Admin,acburdine/Ghost-Admin,JohnONolan/Ghost-Admin,TryGhost/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,airycanon/Ghost-Admin,dbalders/Ghost-Admin,acburdine/Ghost-Admin,JohnONolan/Ghost-Admin,dbalders/Ghost-Admin |
e236cc4ad3a91774da45230544c73dc68d88c204 | ui/src/auth/Authenticated.js | ui/src/auth/Authenticated.js | import React from 'react'
import {routerActions} from 'react-router-redux'
import {UserAuthWrapper} from 'redux-auth-wrapper'
export const UserIsAuthenticated = UserAuthWrapper({
authSelector: ({auth}) => ({auth}),
authenticatingSelector: ({auth: {isAuthLoading}}) => isAuthLoading,
LoadingComponent: (() => <div ... | import React from 'react'
import {routerActions} from 'react-router-redux'
import {UserAuthWrapper} from 'redux-auth-wrapper'
export const UserIsAuthenticated = UserAuthWrapper({
authSelector: ({auth}) => ({auth}),
authenticatingSelector: ({auth: {isMeLoading}}) => isMeLoading,
LoadingComponent: (() => <div clas... | Clarify and simplify authentication logic to predicate upon existence of 'me' object in 'auth' | Clarify and simplify authentication logic to predicate upon existence of 'me' object in 'auth'
| JavaScript | agpl-3.0 | brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf,brianbaker/chronograf |
c2abeaf62c7a8ec5b2435a579cc192a1edc58ceb | app/index-create-script.js | app/index-create-script.js | const bravePort = process.env.BRAVE_PORT || 8080
const createScript = function (scriptPath) {
return new Promise(function (resolve, reject) {
var script = document.createElement('script')
script.type = 'text/javascript'
script.src = scriptPath.replace(/\{port\}/, bravePort)
script.async = true
scr... | const bravePort = process.env.BRAVE_PORT || 8080
const createScript = function (scriptPath) {
return new Promise(function (resolve, reject) {
var script = document.createElement('script')
script.type = 'text/javascript'
script.src = scriptPath.replace(/\{port\}/, bravePort)
script.async = true
scr... | Fix dev app init for Windows | Fix dev app init for Windows
Having it load entry.js only after the other script is loading is
causing problems in init on slow machines (or my Windows VM).
The devserver doesn't need to be included first, it's just for live
realoading.
Auditors: da39a3ee5e6b4b0d3255bfef95601890afd80709@diracdeltas
| JavaScript | mpl-2.0 | MKuenzi/browser-laptop,Sh1d0w/browser-laptop,MKuenzi/browser-laptop,jonathansampson/browser-laptop,darkdh/browser-laptop,manninglucas/browser-laptop,manninglucas/browser-laptop,pmkary/braver,diasdavid/browser-laptop,MKuenzi/browser-laptop,Sh1d0w/browser-laptop,darkdh/browser-laptop,luixxiul/browser-laptop,pmkary/braver... |
061d5ff56ea10b8b1b6441bdfe6dd4c0751ce6b6 | app/updateChannel.js | app/updateChannel.js | 'use strict'
const TelegramBot = require('node-telegram-bot-api');
const config = require('../config');
const utils = require('./utils');
const Kinospartak = require('./Kinospartak/Kinospartak');
const bot = new TelegramBot(config.TOKEN);
const kinospartak = new Kinospartak();
/**
* updateSchedule - update schedu... | 'use strict'
const TelegramBot = require('node-telegram-bot-api');
const config = require('../config');
const utils = require('./utils');
const Kinospartak = require('./Kinospartak/Kinospartak');
const bot = new TelegramBot(config.TOKEN);
const kinospartak = new Kinospartak();
/**
* updateSchedule - update schedu... | Add error handling for channel updates | Add error handling for channel updates
| JavaScript | mit | TheBeastOfCaerbannog/kinospartak-bot |
8646b63a22e82765743b102c1665d5e97e831e75 | src/schema/defaultsetup.js | src/schema/defaultsetup.js | const {Plugin} = require("../edit")
const {menuBar} = require("../menu/menubar")
const {inputRules, allInputRules} = require("../inputrules")
const {defaultRules} = require("./inputrules")
const {defaultMenuItems} = require("./menu")
const {defaultSchemaKeymapPlugin} = require("./keymap")
const {defaultSchemaStyle} = r... | const {Plugin} = require("../edit")
const {menuBar} = require("../menu/menubar")
const {inputRules, allInputRules} = require("../inputrules")
const {defaultRules} = require("./inputrules")
const {defaultMenuItems} = require("./menu")
const {defaultSchemaKeymapPlugin} = require("./keymap")
const {defaultSchemaStyle} = r... | Replace the updateMenu option to defaultSetup with a menu option | Replace the updateMenu option to defaultSetup with a menu option
Much cleaner
| JavaScript | mit | kiejo/prosemirror,tzuhsiulin/prosemirror,tzuhsiulin/prosemirror,kiejo/prosemirror,kiejo/prosemirror,salzhrani/prosemirror,tzuhsiulin/prosemirror,salzhrani/prosemirror,salzhrani/prosemirror |
01c728ab907329058ad29b456a2e6eb3ee2cacb2 | example/src/__mocks__/react-native-i18n.js | example/src/__mocks__/react-native-i18n.js | // @flow
import I18nJs from 'i18n-js';
I18nJs.locale = 'en'; // a locale from your available translations
export const getLanguages = () => Promise.resolve('en');
export default I18nJs;
| // @flow
import I18nJs from 'i18n-js';
I18nJs.locale = 'en'; // a locale from your available translations
export const getLanguages = () => Promise.resolve(['en']);
export default I18nJs;
| Fix test - getLanguages is a Promise<Array<string>> | Fix test - getLanguages is a Promise<Array<string>> | JavaScript | mit | AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n |
08289ce0e335bffcb0126fc940660c465cf13d98 | addon/initializers/responsive.js | addon/initializers/responsive.js | import Media from 'ember-responsive/media';
/**
* An initializer that sets up `ember-responsive`.
*
* Refer to {{#crossLink "Ember.Application.responsive"}}{{/crossLink}}
* for examples of how to configure this library before the initializer
* before it's run by Ember.
*
* @static
* @constructor
* @module ... | import Media from 'ember-responsive/media';
/**
* An initializer that sets up `ember-responsive`.
*
* Refer to {{#crossLink "Ember.Application.responsive"}}{{/crossLink}}
* for examples of how to configure this library before the initializer
* before it's run by Ember.
*
* @static
* @constructor
* @module ... | Add a warning if breakpoints are still define in app.js | Add a warning if breakpoints are still define in app.js
| JavaScript | mit | topaxi/ember-responsive,jasonmit/ember-responsive,jasonmit/ember-responsive,jherdman/ember-responsive,topaxi/ember-responsive,freshbooks/ember-responsive,salzhrani/ember-responsive,salzhrani/ember-responsive,elwayman02/ember-responsive,f3ndot/ember-responsive,freshbooks/ember-responsive,f3ndot/ember-responsive,jherdman... |
8094fb5d78b8fecc3a45a0bd7771b034888bd41a | app/server/server.js | app/server/server.js | import path from 'path';
import renderApp from './renderApp.js';
import express from 'express';
import compression from 'compression';
const server = express();
const port = process.env.PORT || 80;
server.use(compression());
server.use(express.static('public'));
server.use('/fireball-js', express.static(path.resolve(... | import path from 'path';
import renderApp from './renderApp.js';
import express from 'express';
import compression from 'compression';
const server = express();
const port = process.env.PORT || 80;
server.use(compression());
server.use(express.static('public', {maxAge: 31536000})); // 31536000 = one year
server.use('... | Add cache-control max age to static content | Add cache-control max age to static content
| JavaScript | mit | davidgilbertson/davidg-site,davidgilbertson/davidg-site |
f9639831d2d01cfad745f9355f76bd6bd305e932 | addon/components/file-renderer/component.js | addon/components/file-renderer/component.js | import Ember from 'ember';
import layout from './template';
import config from 'ember-get-config';
export default Ember.Component.extend({
layout,
download: null,
mfrUrl: Ember.computed('download', function() {
var base = config.OSF.renderUrl;
var download = this.get('download');
va... | import Ember from 'ember';
import layout from './template';
import config from 'ember-get-config';
export default Ember.Component.extend({
layout,
download: null,
width: '100%',
height: '100%',
mfrUrl: Ember.computed('download', function() {
var base = config.OSF.renderUrl;
var down... | Add height and width defaults for mfr renderer | Add height and width defaults for mfr renderer
| JavaScript | apache-2.0 | jamescdavis/ember-osf,crcresearch/ember-osf,CenterForOpenScience/ember-osf,samchrisinger/ember-osf,baylee-d/ember-osf,crcresearch/ember-osf,binoculars/ember-osf,hmoco/ember-osf,pattisdr/ember-osf,binoculars/ember-osf,hmoco/ember-osf,CenterForOpenScience/ember-osf,chrisseto/ember-osf,cwilli34/ember-osf,jamescdavis/ember... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.