commit
stringlengths
40
40
old_file
stringlengths
4
236
new_file
stringlengths
4
236
old_contents
stringlengths
1
3.26k
new_contents
stringlengths
16
4.43k
subject
stringlengths
16
624
message
stringlengths
17
3.29k
lang
stringclasses
5 values
license
stringclasses
13 values
repos
stringlengths
5
91.5k
7b189c8929a7fc4803cd2cb033b21da2e80fb9cc
client/views/settings/users/new/autoform.js
client/views/settings/users/new/autoform.js
AutoForm.addHooks("newUserForm", { 'onSubmit': function (user) { // Get reference to form context var form = this; // Add user Meteor.call("addUser", user, function (error, userId) { if (error) { console.log(error); // Cancel form submission form.result(false); } ...
AutoForm.addHooks("newUserForm", { 'onSubmit': function (user) { // Get reference to form context var form = this; // Add user Meteor.call("addUser", user, function (error, userId) { if (error) { console.log(error); // Cancel form submission form.result(false); } ...
Fix modal name in onSuccess
Fix modal name in onSuccess
JavaScript
agpl-3.0
GeriLife/wellbeing,brylie/juhani-wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing,GeriLife/wellbeing,GeriLife/wellbeing,brylie/juhani-wellbeing
374a56603c5e06f8cc03e8ab3149d92cdd5a03d6
server/index.js
server/index.js
const express = require('express'); const graphqlHTTP = require('express-graphql'); const { buildSchema } = require('graphql'); // Construct a schema, using GraphQL schema language const schema = buildSchema(` type Query { hello: String } `); // The root provides a resolver function for each API endpoint cons...
const express = require('express'); const graphqlHTTP = require('express-graphql'); const { buildSchema } = require('graphql'); // Construct a schema, using GraphQL schema language const schema = buildSchema(` type Query { hello: String } `); // The root provides a resolver function for each API endpoint cons...
Move console log to listen callback
Move console log to listen callback
JavaScript
mit
Anserian/express-graphql-boilerplate-ES2017
34f9481ad457d730137dc44c7962748e253f61da
test/helpers.js
test/helpers.js
'use strict'; // init app (if not done already) before(function(doneBefore){ var self = this; self.timeout(30000); if (global.app) doneBefore(); else { global.app = require('../src/app'); self.server = app.listen(3030); self.server.once('listening', function() { doneBefore(); }); } });...
'use strict'; var chai = require('chai'); // init app (if not done already) before(function(doneBefore){ var self = this; self.timeout(30000); if (global.app) doneBefore(); else { global.app = require('../src/app'); self.server = app.listen(3030); self.server.once('listening', function() { ...
Make test suite wait for default user to be created
Make test suite wait for default user to be created
JavaScript
mit
aparabolica/DomeGIS,aparabolica/DomeGIS,ecodigital/DomeGIS,ecodigital/DomeGIS,aparabolica/DomeGIS,ecodigital/DomeGIS
d27ee10d4a564864acaefe1884d6418c476d149a
src/title/titleSelectors.js
src/title/titleSelectors.js
/* @flow */ import { createSelector } from 'reselect'; import type { Narrow } from '../types'; import { BRAND_COLOR } from '../styles'; import { getSubscriptions } from '../directSelectors'; import { foregroundColorFromBackground } from '../utils/color'; import { isStreamOrTopicNarrow } from '../utils/narrow'; import ...
/* @flow */ import { createSelector } from 'reselect'; import type { Narrow } from '../types'; import { BRAND_COLOR } from '../styles'; import { getSubscriptions } from '../directSelectors'; import { foregroundColorFromBackground } from '../utils/color'; import { isStreamOrTopicNarrow } from '../utils/narrow'; import ...
Add jsdoc explaining `getTitle*Color` selectors.
title: Add jsdoc explaining `getTitle*Color` selectors. Make clear why selectors are not subscribed to nav state change.
JavaScript
apache-2.0
vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile
498d47f0a91cb6521ad9bc66605e0fbc46e8f437
lib/server/index.js
lib/server/index.js
require('babel-register') require('css-modules-require-hook')({ rootDir: './lib/share' }) const fs = require('fs') const app = require('./app').default const config = require('../../config.json') app.set('config', config) app.listen(config.PORT, () => { // create repos directory if (!fs.existsSync(config.REPO_R...
require('babel-register') require('css-modules-require-hook')({ rootDir: './lib/share' }) const fs = require('fs') const app = require('./app').default const config = require('../../config.json') config.PORT = process.env.PORT || config.PORT app.set('config', config) app.listen(config.PORT, () => { // create repo...
Fix to use port in PORT environment variable
Fix to use port in PORT environment variable
JavaScript
mit
keik/gh,keik/gh,keik/gh
16b27d1c45399acf31768af677ef3cfd8a4af36e
app/containers/gif/sagas.js
app/containers/gif/sagas.js
import { call, put, takeLatest } from 'redux-saga/effects'; import GIF from './constants'; import SEARCH from '../search/constants'; import { result, error } from './actions'; import request from '../../utils/request'; export function* requestGif(action) { const requestURL = `http://api.giphy.com/v1/gifs/random?api_...
import { remote } from 'electron'; import { call, put, takeLatest } from 'redux-saga/effects'; import GIF from './constants'; import SEARCH from '../search/constants'; import { result, error, clear } from './actions'; import request from '../../utils/request'; export function* requestGif(action) { const requestURL =...
Clear any gif response if the window isn't visible
Clear any gif response if the window isn't visible
JavaScript
mit
astrogif/astrogif,astrogif/astrogif
0a50cc70ea11324428934c9db1608f137473d828
lib/ui/dashboard.js
lib/ui/dashboard.js
var express = require('express'); var less = require('less-middleware'); var path = require('path'); exports.register = function(application, params) { params = params || {}; var prefix = params.prefix || ''; prefix = prefix.replace(/\/$/, ''); var topDirectory = path.join(__dirname, '..', '..', '..'); app...
var express = require('express'); var less = require('less-middleware'); var path = require('path'); exports.register = function(application, params) { params = params || {}; var prefix = params.prefix || ''; prefix = prefix.replace(/\/$/, ''); var topDirectory = path.join(__dirname, '..', '..', '..'); ap...
Migrate code for express 4.0
Migrate code for express 4.0
JavaScript
mit
KitaitiMakoto/express-droonga,droonga/express-droonga,KitaitiMakoto/express-droonga,droonga/express-droonga
c5e45559354d7092de01c802bfba262ae627fec2
app/scripts/store.js
app/scripts/store.js
HighFidelity.ApplicationAdapter = DS.FixtureAdapter; // HighFidelity.ApplicationSerializer = DS.LSSerializer.extend(); // HighFidelity.ApplicationAdapter = DS.LSAdapter.extend({ // namespace: 'hifi' // });
HighFidelity.ApplicationAdapter = DS.FixtureAdapter; // Add ability to query fixtures in development mode. if (HighFidelity.ApplicationAdapter === DS.FixtureAdapter) { DS.FixtureAdapter.reopen({ queryFixtures: function(records, query, type) { return records.filter(function(record) { ...
Add ability to query fixtures
Add ability to query fixtures
JavaScript
mit
mozilla/high-fidelity,prateekjadhwani/high-fidelity,mozilla/high-fidelity,prateekjadhwani/high-fidelity,lmorchard/high-fidelity,lmorchard/high-fidelity
7d79561849f05be5d98bc45525b11012d5b6f232
app/store/projectReducer.js
app/store/projectReducer.js
import { combineReducers } from 'redux'; const context = require.context(__PROJECT__ + '/reducers', false, /.js$/); context.keys().forEach(context); const reducers = {}; const NAME_RE = /\/(.*)\.js$/; context.keys().forEach((key) => { const name = key.match(NAME_RE)[1]; reducers[name] = context(key).default; });...
import { combineReducers } from 'redux'; const context = require.context(__PROJECT__ + '/reducers', false, /.js$/); context.keys().forEach(context); const reducers = {}; const NAME_RE = /\/(.*)\.js$/; context.keys().forEach((key) => { const name = key.match(NAME_RE)[1]; if (name === 'index') { const indexRe...
Allow reducers/index to export object of reducers to merge in
Allow reducers/index to export object of reducers to merge in
JavaScript
mit
thomasboyt/earthling,thomasboyt/earthling
92511e31a0479ec82fce317b0b53e80d2eed44e8
src/createLambdaContext.js
src/createLambdaContext.js
const utils = require('./utils'); /* Mimicks the lambda context object http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html */ module.exports = function createLambdaContext(fun, provider, cb) { const functionName = fun.name; const timeout = (fun.timeout || provider.timeout || 6) * 1000; ...
const utils = require('./utils'); // https://docs.aws.amazon.com/lambda/latest/dg/limits.html // default function timeout in seconds const DEFAULT_TIMEOUT = 900; // 15 min /* Mimicks the lambda context object http://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-context.html */ module.exports = function c...
Use module constant for function timeout, increase to 900 sec (15 min)
Use module constant for function timeout, increase to 900 sec (15 min)
JavaScript
mit
dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline
7877529a278fab98abeb1dfa8a83b6d3802f8fd8
app.js
app.js
/*jslint nodejs: true*/ var express = require('express'), iefix = require('express-ie-cors'), bodyParser = require('body-parser'), cors = require('cors'), routes = require('./routes'), config = require('./config'), notSupported = require('./middleware/notSupported'), contentType = require('...
/*jslint nodejs: true*/ var express = require('express'), iefix = require('express-ie-cors'), bodyParser = require('body-parser'), cors = require('cors'), routes = require('./routes'), config = require('./config'), notSupported = require('./middleware/notSupported'), contentType = require('...
Increase entity size config limit. Default is too small. VAN API can return larger responses than will fit, which causes a 413 to OSDI clients even though the VAN api call was fine. Increased limit.
Increase entity size config limit. Default is too small. VAN API can return larger responses than will fit, which causes a 413 to OSDI clients even though the VAN api call was fine. Increased limit.
JavaScript
apache-2.0
joshco/osdi-service,NGPVAN/osdi-service
c9d116e5d7d589c5aa49fc5ffa1eb64736aa7887
assets/js/content.js
assets/js/content.js
// Define search and replace terms for image src link var search = "s100"; var replace = "s512"; function getProfileImageContainer() { // Get profile image containers return $(".channel-header-profile-image-container"); } function getProfileImage(container) { // Get profile image tag return container....
// Define search and replace terms for image src link var search = /s[0-9]+/g; var replace = 's512'; function getProfileImageContainer() { // Get profile image containers return $('#channel-header-container'); } function getProfileImage(container) { // Get profile image tag return container.find('img'...
Update extension to support new YouTube redesign
Update extension to support new YouTube redesign
JavaScript
apache-2.0
eladnava/enlarge-profile-image-for-youtube
0258254fbda26aa8a79d53d6b6c7c34d1920ee3a
src/app/components/players/player/player.controller.js
src/app/components/players/player/player.controller.js
export default class PlayerController { constructor($rootScope, $scope, $localStorage, $log, playersModel, websocket) { 'ngInject'; this.$rootScope = $rootScope; this.$scope = $scope; this.$localStorage = $localStorage; this.$log = $log; this.playerModel = playersModel; this.ws = websocket; this.$lo...
export default class PlayerController { constructor($rootScope, $scope, $localStorage, $log, playersStore, playerModel, websocket) { 'ngInject'; this.$rootScope = $rootScope; this.$scope = $scope; this.$log = $log; this.playerModel = playerModel; this.playersStore = playersStore; this.ws = websocket; ...
Fix incorrect reference to playerModel service
Fix incorrect reference to playerModel service
JavaScript
unlicense
ejwaibel/squarrels,ejwaibel/squarrels
a5e344aedcc47d035ce5b1d9e22ff17103bcef88
src/clincoded/static/components/page.js
src/clincoded/static/components/page.js
'use strict'; var React = require('react'); var globals = require('./globals'); var _ = require('underscore'); var Page = module.exports.Page = React.createClass({ render: function() { var context = this.props.context; var template = globals.cg_template.views[''][context.name]; var content...
'use strict'; var React = require('react'); var globals = require('./globals'); var _ = require('underscore'); var Page = module.exports.Page = React.createClass({ render: function() { var context = this.props.context; var Template = globals.cg_template.views[''][context.name]; var content...
Fix ReactJS warning console message
Fix ReactJS warning console message
JavaScript
mit
philiptzou/clincoded,philiptzou/clincoded,ClinGen/clincoded,philiptzou/clincoded,ClinGen/clincoded,ClinGen/clincoded,philiptzou/clincoded,philiptzou/clincoded,ClinGen/clincoded,ClinGen/clincoded
63e8b9f0bbf41bd53ba802cbd50ce9dc5f2de214
kolibri/plugins/audio_mp3_render/assets/test/views/audio-mp3-render.spec.js
kolibri/plugins/audio_mp3_render/assets/test/views/audio-mp3-render.spec.js
/* eslint-env mocha */ const Vue = require('vue-test'); const sinon = require('sinon'); const audioRenderer = require('../../src/views/index.vue'); function makeVm(propsData) { const Ctor = Vue.extend(audioRenderer); return new Ctor({ propsData }).$mount(); } describe('audio mp3 render component', () => { descr...
/* eslint-env mocha */ const Vue = require('vue-test'); const sinon = require('sinon'); const simulant = require('simulant'); const audioRenderer = require('../../src/views/index.vue'); function makeVm(propsData) { const Ctor = Vue.extend(audioRenderer); return new Ctor({ propsData }).$mount(); } describe('audio ...
Use simulant to do ‘timeupdate’ event; improve assertion
Use simulant to do ‘timeupdate’ event; improve assertion
JavaScript
mit
DXCanas/kolibri,DXCanas/kolibri,indirectlylit/kolibri,DXCanas/kolibri,jonboiser/kolibri,mrpau/kolibri,indirectlylit/kolibri,MingDai/kolibri,rtibbles/kolibri,rtibbles/kolibri,jonboiser/kolibri,learningequality/kolibri,rtibbles/kolibri,MingDai/kolibri,mrpau/kolibri,learningequality/kolibri,benjaoming/kolibri,DXCanas/koli...
990d50e57a07cd1add2be562ab66eedf758fea6e
src/peeracle.js
src/peeracle.js
'use strict'; (function () { var Peeracle = {}; Peeracle.Peer = require('./peer'); Peeracle.Tracker = require('./tracker'); module.exports = Peeracle; })();
'use strict'; (function () { var Peeracle = {}; Peeracle.Media = require('./media'); Peeracle.Peer = require('./peer'); Peeracle.Tracker = require('./tracker'); module.exports = Peeracle; })();
Load the media module inside node
Load the media module inside node
JavaScript
mit
peeracle/legacy
35b228e2d6dd797d177fc750cc610666ff32e6e0
share/spice/expatistan/expatistan.js
share/spice/expatistan/expatistan.js
(function(env){ env.ddg_spice_expatistan = function(api_result) { "use strict"; if(!api_result || api_result.status !== 'OK') { return Spice.failed('expatistan'); } Spice.add({ id: "expatistan", name: "Expatistan", data: api_result, ...
(function(env){ env.ddg_spice_expatistan = function(api_result) { "use strict"; if(!api_result || api_result.status !== 'OK') { return Spice.failed('expatistan'); } Spice.add({ id: "expatistan", name: "Expatistan", data: api_result, ...
Move to group "base" and enable "More at ..."
Expatistan: Move to group "base" and enable "More at ..."
JavaScript
apache-2.0
dogomedia/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,sevki/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,stennie/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,stennie/zeroclickinfo-spi...
fc4241c76fde64d182cf608b366bd198db71252c
src/store/modules/annotation/getters.js
src/store/modules/annotation/getters.js
export default { // Return the color in which an item should be drawn getColor: (state, getters, rootState) => { // Check if there is a default color for the step if (rootState.editor.steps[rootState.editor.activeStep].color) { return rootState.editor.steps[rootState.editor.activeStep].color //...
export default { // Return the color in which an item should be drawn getColor: (state, getters, rootState) => { // Check if there is a default color for the step if (rootState.editor.steps[rootState.editor.activeStep].color) { return rootState.editor.steps[rootState.editor.activeStep].color //...
Move default colors out of getter and into state
Move default colors out of getter and into state
JavaScript
mit
alanaberdeen/AIDA,alanaberdeen/annotate,alanaberdeen/AIDA,alanaberdeen/annotate
93b3f6bc5dc5fa9160efcf2f44a19340ce7c6149
next/pages/index.js
next/pages/index.js
import Layout from '../components/MyLayout' import Link from 'next/link' const PostLink = (props) => ( <li> <Link href={`/post?title=${props.title}`}> <a>{props.title}</a> </Link> </li> ) export default () => ( <Layout> <h1>My Blog</h1> <ul> <PostLink title="Hello Next.js"/> <P...
import Layout from '../components/MyLayout' import Link from 'next/link' const PostLink = (props) => ( <li> <Link as={`/p/${props.id}`} href={`/post?title=${props.title}`}> <a>{props.title}</a> </Link> </li> ) export default () => ( <Layout> <h1>My Blog</h1> <ul> <PostLink id="hello-...
Add as property to mask route
Add as property to mask route
JavaScript
mit
yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program,yukihirai0505/tutorial-program
d11789809c0b28427d0b6c046e4b33df2cab1f13
src/types/common.js
src/types/common.js
'use strict'; const common = module.exports = {}; common.getBasename = function (filename) { let base = filename.replace(/.*\//, ''); return base.replace(/\.[0-9]+$/, ''); }; common.getExtension = function (filename) { let extension = common.getBasename(filename); return extension.replace(/.*\./, '')...
'use strict'; const common = module.exports = {}; common.getBasename = function (filename) { let base = filename.replace(/.*\//, ''); return base.replace(/\.[0-9]+$/, ''); }; common.getExtension = function (filename) { let extension = common.getBasename(filename); return extension.replace(/.*\./, '')...
Add pdb and cif property
Add pdb and cif property
JavaScript
mit
cheminfo/eln-plugin
507a9780f76da0a444a1da7d0489005882364254
lib/APNNotification.js
lib/APNNotification.js
var apn = require('apn'); var _ = require('lodash'); var util = require('util'); var BaseNotification = require('./BaseNotification'); util.inherits(APNNotification, BaseNotification); /** * Create new APN service * @returns {APNNotification} * @constructor */ function APNNotification() { BaseNotification.apply...
var apn = require('apn'); var _ = require('lodash'); var util = require('util'); var BaseNotification = require('./BaseNotification'); util.inherits(APNNotification, BaseNotification); /** * Create new APN service * @returns {APNNotification} * @constructor */ function APNNotification() { BaseNotification.apply...
Implement methods for create device and notification for apn
Implement methods for create device and notification for apn
JavaScript
mit
ghaiklor/sails-service-pusher
db8019c53904ea8bf8e755d4ade5ef0691147f66
applications/firefox/user.js
applications/firefox/user.js
user_pref("browser.backspace_action", 2); user_pref("browser.ctrlTab.previews", true); user_pref("browser.fixup.alternate.enabled", false); user_pref("browser.newtab.url", "https://www.google.com"); user_pref("browser.sessionstore.warnOnQuit", true); user_pref("browser.showQuitWarning", true); user_pref("browser.tabs.l...
user_pref("browser.backspace_action", 2); user_pref("browser.ctrlTab.previews", true); user_pref("browser.fixup.alternate.enabled", false); user_pref("browser.newtab.url", "https://www.google.com"); user_pref("browser.sessionstore.warnOnQuit", true); user_pref("browser.showQuitWarning", true); user_pref("browser.tabs.t...
Revert "Stop FF/tabs stealing focus"
Revert "Stop FF/tabs stealing focus" This reverts commit 428a4e9dfc389b5fc30278b8bb736d23d4959d9d.
JavaScript
mit
craighurley/dotfiles,craighurley/dotfiles,craighurley/dotfiles
d5616049d3d0142dfe7b57593c909cbd666f7a13
app/assets/javascripts/tagger/onClick/addAlignment.js
app/assets/javascripts/tagger/onClick/addAlignment.js
$(function() { $(".add-alignment").live('click', function(obj) { $('#alignmentsModal').modal('show'); return false; }) });
$(function() { $(".add-alignment").click(function(obj) { $('#alignmentsModal').modal('show'); return false; }) document.onkeypress = function (e) { if(e.which == 13) { return false; } } });
Kill enter form submit firefox bug
Kill enter form submit firefox bug
JavaScript
apache-2.0
inbloom/APP-tagger,inbloom/APP-tagger
bf2a24ef01f79aab45d3b403372084797ff87b60
content/messenger-overlay.js
content/messenger-overlay.js
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ (function (aGlobal) { var Ci = Components.interfaces; var Cc = Components.classes; var ObserverService = Cc[...
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ (function (aGlobal) { var DeleteOnlyEmptyFolder = { isEmpty : function(aFolder) { return true; }, ...
Add code to block deletion of a folder
Add code to block deletion of a folder
JavaScript
mpl-2.0
clear-code/tb-delete-only-empty-folder
3e47f57b15327242af06d7b7eef4493aebb73108
Kwc/TextImage/Component.js
Kwc/TextImage/Component.js
Kwf.Utils.ResponsiveEl('.kwcTextImage', [420]); //remove largeText class if >55% of element is covered by image Kwf.onElementWidthChange('.kwcTextImage', function textImage(el) { var img = el.child('div.image img'); if (img) { if (img.getWidth() < (el.getWidth() * 0.55)) { el.removeClass('l...
Kwf.Utils.ResponsiveEl('.kwcTextImage', [420]); //remove largeText class if >55% of element is covered by image Kwf.onElementWidthChange('.kwcTextImage', function textImage(el) { var img = el.child('div.image .kwcAbstractImage .container'); if (img) { if (img.getWidth() < (el.getWidth() * 0.55)) { ...
Change selector for textImage to set/remove class largeImage and largeText
Change selector for textImage to set/remove class largeImage and largeText
JavaScript
bsd-2-clause
yacon/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,Ben-Ho/koala-framework,yacon/koala-framework,nsams/koala-framework,koala-framework/koala-framework,Sogl/koala-framework,nsams/koala-framework,yacon/koala-framework,kaufmo/koala-framework,nsams/koala-framework,kaufmo/koala-framework,Sogl/koala-...
f375f18def97a3a0fa5737485484e0f89f45d844
src/components/Activity.js
src/components/Activity.js
import React, { Component, PropTypes } from 'react'; import moment from 'moment'; import TagList from './TagList'; class Activity extends Component { render() { const { timestamp, activity, deleteActivity, editActivity, isEditing, cancelEdit } = this.props; const { description, tags = [] } = activity; ...
import React, { Component, PropTypes } from 'react'; import moment from 'moment'; import TagList from './TagList'; import Row from './layout/Row'; import Column from './layout/Column'; class Activity extends Component { render() { const { timestamp, activity, deleteActivity, editActivity, isEditing, cancelEdit...
Remove buttons/links on activity description
Remove buttons/links on activity description
JavaScript
mit
mknudsen01/today,mknudsen01/today
3de49ab6d297170c0a15fcde015bcc0616261492
webapp/index.js
webapp/index.js
import * as React from "react"; import {render} from "react-dom"; import {App} from "./App"; render( <App name="Sam"/>, document.getElementById("root") );
import * as React from "react"; import {render} from "react-dom"; import {App} from "./App"; // Render our App Component to element with ID == target const target = "root"; render ( <App name="Sam"/>, document.getElementById(target) );
Replace hardcoded string with constant and add comment
Replace hardcoded string with constant and add comment
JavaScript
apache-2.0
googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020
7e69d86730cd3d285ba20b550105f16e185bea1f
tasks/bundle.js
tasks/bundle.js
module.exports = function(grunt) { grunt.registerTask('bundleEPUB', function() { var done = this.async(); grunt.config.requires('akasha'); grunt.config.requires('config'); var akasha = grunt.config('akasha'); var config = grunt.config('config'); var epubversion = "ep...
module.exports = function(grunt) { grunt.registerTask('bundleEPUB', function() { var done = this.async(); grunt.config.requires('akasha'); // grunt.config.requires('config'); var akasha = grunt.config('akasha'); // var config = grunt.config('config'); var epubversion...
Resolve some error messages due to unnecessarily retrieved data
Resolve some error messages due to unnecessarily retrieved data
JavaScript
apache-2.0
akashacms/akashacms-epub
19b0b6e02e22b4973eefbc111087676a00c775c6
app/schema-generator.spec.js
app/schema-generator.spec.js
var schemaGenerator = require("./schema-generator.js"); describe("Schema Generation", function(){ it("Knows that strings should use the string Editor", function(){ var data = { greeting: "hi" }; var schema = schemaGenerator.generateSchema(data); expect(schema.greeting.e...
var schemaGenerator = require("./schema-generator.js"); describe("Schema Generation", function(){ it("Knows that strings should use the string Editor", function(){ var data = { greeting: "hi" }; var schema = schemaGenerator.generateSchema(data); expect(schema.greeting.e...
Add test for schema generation on nested objects.
Add test for schema generation on nested objects.
JavaScript
mit
mattzeunert/reagic,mattzeunert/reagic
eef1d8711523154e26532ef1437d44f52a73cbc8
resources/assets/js/app.js
resources/assets/js/app.js
'use strict'; // Declare app level modules angular.module( 'suitcase', ['ngResource', 'suitcase.controllers'], function($interpolateProvider) { // Customize the AngularJS symbols so they don't clash with the Blade // templating engine. $interpolateProvider.startSymbol('{%'); ...
'use strict'; // Declare app level modules angular.module( 'suitcase', ['ngResource', 'suitcase.controllers'], ['$interpolateProvider', function($interpolateProvider) { // Customize the AngularJS symbols so they don't clash with the Blade // templating engine. $interpolateProvider.s...
Fix the AngularJS module under minification
Fix the AngularJS module under minification
JavaScript
mit
aag/fillmysuitcase,aag/fillmysuitcase,aag/fillmysuitcase
4f800c8bd7af1a8e40859477dac75035886c3850
src/main/SchemaResolver.js
src/main/SchemaResolver.js
/** * @class SchemaResolver * Class exposing a method to resolve schema references to schema objects in a * schema. */ define([ ], function ( ) { return function(resolvers) { /** * Given the passed subobject walk its properties looking for $refs and * replace them with the loaded sche...
/** * @class SchemaResolver * Class exposing a method to resolve schema references to schema objects in a * schema. */ define([ ], function ( ) { return function(resolvers) { /** * Given the passed subobject walk its properties looking for $refs and * replace them with the loaded sche...
Fix missed resolve check on converted resolver.
Fix missed resolve check on converted resolver.
JavaScript
apache-2.0
atsid/schematic-js,atsid/schematic-js
15f41b47bc1ec00655c1f5f8aedcd52ea9205947
lib/middleware/response/header_remover.js
lib/middleware/response/header_remover.js
var config = require('../../util/config').config; /** * Return true if key starts with a prefixed defined in prefixes. * * @param {String} key Key name. * @param {Array} prefixes Prefixes. * @return {Boolean} true if the key starts with a prefix, false otherwise. */ function startsWithPrefix(key, prefixes) { ...
var config = require('../../util/config').config; /** * Return true if key starts with a prefixed defined in prefixes. * * @param {String} key Key name. * @param {Array} prefixes Prefixes. * @return {Boolean} true if the key starts with a prefix, false otherwise. */ function startsWithPrefix(key, prefixes) { ...
Make it more robust - don't error if setting is not present.
Make it more robust - don't error if setting is not present.
JavaScript
apache-2.0
racker/node-rproxy,racker/node-rproxy
8e52996aee757dfb80cb0002c0e74a9e7eef7748
test/sessionStores/cookie.spec.js
test/sessionStores/cookie.spec.js
import { createCookieStore } from '../../src/storage' import Cookie from 'js-cookie' describe('cookie store', () => { describe('#persist', () => { it('returns resolved promise', () => { const cookieStore = createCookieStore() expect(cookieStore.persist()).resolves }) it('saves data to cooki...
import { createCookieStore } from '../../src/storage' import Cookie from 'js-cookie' describe('cookie store', () => { describe('#persist', () => { it('returns resolved promise', () => { const cookieStore = createCookieStore() expect(cookieStore.persist()).resolves }) it('saves data to cooki...
Add test implementation for custom cookie name
Add test implementation for custom cookie name
JavaScript
mit
jerelmiller/redux-simple-auth
4e867768eef4a38858a3886b0a1ebcc010eccc23
server/public/scripts/controllers/login.controller.js
server/public/scripts/controllers/login.controller.js
app.controller('LoginController', ['$scope', '$mdDialog', '$firebaseAuth', 'AuthFactory', function($scope, $mdDialog, $firebaseAuth, AuthFactory){ console.log('login controller is running'); var auth = $firebaseAuth(); var self = this; self.logIn = function() { console.log('logging user in'); AuthFacto...
app.controller('LoginController', ['$scope', '$mdDialog', '$firebaseAuth', 'AuthFactory', function($scope, $mdDialog, $firebaseAuth, AuthFactory){ console.log('login controller is running'); var auth = $firebaseAuth(); var self = this; self.isLoggedIn = AuthFactory.userStatus.isLoggedIn; console.log(self.isL...
Add self.isLoggedIn and modify login function
Add self.isLoggedIn and modify login function
JavaScript
mit
STEMentor/STEMentor,STEMentor/STEMentor
695165c531e990562d0e3a15ebc50ad96b6a3318
extensions/documentation/targets/.FOO.js
extensions/documentation/targets/.FOO.js
'use strict'; function filter(creep, opts) { opts = opts || {}; return { filter: function(target) { // Insert code } }; } // Room === undefined -> get all function get(room, option) { } module.exports = { filter: filter, get: get };
'use strict'; // Filtering done relative to given object function filter(creep, options) { options = options || {}; return { filter: function(target) { // Insert code } }; } // Filtering done on global level function find(options) { options = options || {}; return { ...
Update documentation for target extension
Update documentation for target extension
JavaScript
mit
avdg/screeps
c53dd161edeeed4dfa78d575f2e5b692d446c70b
spec/javascripts/lib/widgets/travel_insurance_spec.js
spec/javascripts/lib/widgets/travel_insurance_spec.js
require([ "public/assets/javascripts/lib/widgets/travel_insurance" ], function(TravelInsurance) { "use strict"; describe("TravelInsurance", function() { define("wnmock", function() { return {}; }); it("pulls in the world nomad widget", function() { var ready = false; runs(function(...
define([ "public/assets/javascripts/lib/widgets/travel_insurance" ], function(TravelInsurance) { "use strict"; describe("TravelInsurance", function() { define("wnmock", function() { return {}; }); describe("pulling in the World Nomad widget", function() { var widget; beforeEach(fu...
Convert widget specs to jasmine 2.x syntax
Convert widget specs to jasmine 2.x syntax
JavaScript
mit
Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo
477c213a3126f7ee75a8fba2735244f7b9e4db85
src/token-auth-provider.js
src/token-auth-provider.js
/** * @module myModule * @summary: This module's purpose is to: * * @description: * * Author: Justin Mooser * Created On: 2015-05-15. * @license Apache-2.0 */ "use strict"; module.exports = function construct(config, $http) { var m = {}; config = config ? config : {}; config = _.defaults(config, {}); ...
/** * @module myModule * @summary: This module's purpose is to: * * @description: * * Author: Justin Mooser * Created On: 2015-05-15. * @license Apache-2.0 */ "use strict"; module.exports = function construct(config, $http) { var m = {}; config = config ? config : {}; config = _.defaults(config, {}); ...
Fix error message when logging in with locked account.
Fix error message when logging in with locked account.
JavaScript
mit
webinverters/win.robust-auth-client,webinverters/win.robust-auth-client,webinverters/win.robust-auth-client
67a4abc4cc0da7b90bdf193694f7df373b4d35fc
src/utils/parseReplaygg.js
src/utils/parseReplaygg.js
import _ from 'lodash'; function extractHrefs(htmlBody) { const matchHref = /href="([^\"]*)"/g; let results = []; let match; while (match = matchHref.exec(htmlBody)) { results.push(match[1]); } return results; } function toMatchInfo(hrefs) { const matchHistoryUrl = _.find(hrefs, href => { retu...
import _ from 'lodash'; function extractHrefs(htmlBody) { const matchHref = /href="([^\"]*)"/g; let results = []; let match; while (match = matchHref.exec(htmlBody)) { results.push(match[1]); } return results; } function toMatchInfo(hrefs) { const matchHistoryUrl = _.find(hrefs, href => { retu...
Replace HTML-encoded &amp; with &
Replace HTML-encoded &amp; with &
JavaScript
mit
zachallaun/archive.gg
364be1b1b573184d991e20624fb87016506da3ef
client/src/components/UserPage.js
client/src/components/UserPage.js
import React, { Component, PropTypes } from 'react' import { Container, Segment, Menu, Header } from 'semantic-ui-react' import { Link } from 'react-router' import moment from 'moment' const propTypes = { user: PropTypes.object } class UserPage extends Component { render() { const { user } = this.props if...
import React, { Component, PropTypes } from 'react' import { Container, Segment, Menu, Header, Label } from 'semantic-ui-react' import { Link } from 'react-router' import moment from 'moment' const propTypes = { user: PropTypes.object } class UserPage extends Component { render() { const { user } = this.props...
Add user page favorites and uploads number indicator
Add user page favorites and uploads number indicator
JavaScript
mit
kingdido999/atogatari,kingdido999/atogatari
68573f36116ad7f12b1244af8270863be5fc732b
test/main/launch.js
test/main/launch.js
import { expect } from 'chai'; import { launchNewNotebook } from '../../build/main/launch'; var ipc = require('ipc'); describe('launch', () => { describe('launchNewNotebook', () => { it('launches a window', function() { // The render window may take a while to display on slow machines. // Set the t...
import { expect } from 'chai'; import { launchNewNotebook } from '../../build/main/launch'; import {ipcMain as ipc} from 'electron'; describe('launch', () => { describe('launchNewNotebook', () => { it('launches a window', function() { // The render window may take a while to display on slow machines. ...
Update import in response to deprecation warning
Update import in response to deprecation warning
JavaScript
bsd-3-clause
0u812/nteract,captainsafia/nteract,jdetle/nteract,jdetle/nteract,rgbkrk/nteract,0u812/nteract,jdfreder/nteract,nteract/composition,captainsafia/nteract,nteract/nteract,0u812/nteract,jdfreder/nteract,rgbkrk/nteract,temogen/nteract,rgbkrk/nteract,nteract/nteract,captainsafia/nteract,jdetle/nteract,nteract/composition,cap...
15c66979b106ab38906ff68d341482cfc853a794
scripts/build-templates/standalone-template.js
scripts/build-templates/standalone-template.js
/** * Include this file _after_ the main backbone-forms file to override the default templates. * You only need to include templates you want to override. * * Requirements when customising templates: * - Each template must have one 'parent' element tag. * - "data-type" attributes are required. * - The main plac...
/** * Include this file _after_ the main backbone-forms file to override the default templates. * You only need to include templates you want to override. * * Requirements when customising templates: * - Each template must have one 'parent' element tag. * - "data-type" attributes are required. * - The main plac...
Replace template tags that were interfering
Replace template tags that were interfering
JavaScript
mit
wesvetter/backbone-forms,dmil/backbone-forms,goodwall/backbone-forms,iabw/fork_of_backbone-forms,AlJohri/backbone-forms,nareshv/backbone-forms,wesvetter/backbone-forms,bryce-gibson/backbone-forms,iabw/fork_of_backbone-forms,nareshv/backbone-forms,fonji/backbone-forms,powmedia/backbone-forms,bryce-gibson/backbone-forms,...
f1dbcc1e825cea11212a097e505088c08b92e709
test/server_test.js
test/server_test.js
/* eslint-disable max-len,func-names */ import { chai, expect } from './spec_helper' import app from '../src/server-iso' import { fetchOauthToken } from '../oauth' describe('isomorphically rendering on the server', function () { this.timeout(5000) it('isomorphically renders the homepage', (done) => { fetchOau...
/* eslint-disable max-len,func-names */ import { chai, expect } from './spec_helper' import app from '../src/server-iso' import { fetchOauthToken } from '../oauth' import jsdom from 'jsdom' describe('isomorphically rendering on the server', function () { this.timeout(5000) it('isomorphically renders the homepage'...
Move iso tests to jsdom
Move iso tests to jsdom
JavaScript
mit
ello/webapp,ello/webapp,ello/webapp
e13048dd5dc0fc1f69eb0e5c9f42efbfcb3bc664
source/adapter/response.js
source/adapter/response.js
module.exports = { handleResponseCode: function(response) { var status = parseInt(response.status, 10); if (status >= 400) { throw new Error(`Invalid response: ${status} ${response.statusText}`); } return response; } };
module.exports = { handleResponseCode: function(response) { var status = parseInt(response.status, 10); if (status >= 400) { throw new Error("Invalid response: " + status + " " + response.statusText); } return response; } };
Remove incompatible code for 0.12
Remove incompatible code for 0.12
JavaScript
mit
perry-mitchell/webdav-client,perry-mitchell/webdav-client
cae09209c25b49d7b30f39660062c0730f818c46
packages/rotonde-plugin-chat/src/index.js
packages/rotonde-plugin-chat/src/index.js
export { default as ChatClientPlugin } from './client'; export { default as ChatServerPlugin } from './server';
import { PLUGIN_TYPE } from 'rotonde-plugin'; export const TYPE = PLUGIN_TYPE.ISOMORPHIC; export { default as ChatClientPlugin } from './client'; export { default as ChatServerPlugin } from './server';
Set the type of rotonde-plugin-chat
Set the type of rotonde-plugin-chat
JavaScript
mit
merveilles/Rotonde,merveilles/Rotonde
2fad769c16cc5484e065bb3dec7944c348e7c1df
src/client/app/containers/groups/GroupMainContainer.js
src/client/app/containers/groups/GroupMainContainer.js
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ import _ from 'lodash'; import { connect } from 'react-redux'; import { fetchMetersDetailsIfNeeded } from '....
/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ import _ from 'lodash'; import { connect } from 'react-redux'; import { fetchMetersDetailsIfNeeded } from '....
Remove useless ternary operator over undefined
Remove useless ternary operator over undefined
JavaScript
mpl-2.0
OpenEnergyDashboard/OED,beloitcollegecomputerscience/OED,OpenEnergyDashboard/OED,beloitcollegecomputerscience/OED,OpenEnergyDashboard/OED,beloitcollegecomputerscience/OED,beloitcollegecomputerscience/OED,OpenEnergyDashboard/OED
31b76f71023572ab1f42af528536bb015cb8c074
test/abilities.test.js
test/abilities.test.js
var assert = require('assert'); require('./support/start')(function(command) { exports['test abilities endpoint'] = function() { assert.response(command.servers['Core'], { url: '/assets/tilemill/js/abilities.js' }, { status: 200 }, function(res) { var bod...
var assert = require('assert'); require('./support/start')(function(command) { exports['test abilities endpoint'] = function() { assert.response(command.servers['Core'], { url: '/assets/tilemill/js/abilities.js' }, { status: 200 }, function(res) { var bod...
Test for version strings in abilities.
Test for version strings in abilities.
JavaScript
bsd-3-clause
Teino1978-Corp/Teino1978-Corp-tilemill,fxtentacle/tilemill,nyimbi/tilemill,mbrukman/tilemill,tilemill-project/tilemill,Zhao-Qi/tilemill,mbrukman/tilemill,Teino1978-Corp/Teino1978-Corp-tilemill,tilemill-project/tilemill,florianf/tileoven,nyimbi/tilemill,nyimbi/tilemill,Zhao-Qi/tilemill,fxtentacle/tilemill,fxtentacle/til...
a2fba183ac2cb7f86dac93f15cb2d796962c8756
app/components/comments/CommentThreadEntity.js
app/components/comments/CommentThreadEntity.js
import React from 'react' import { connect } from 'react-redux' import { openCommentThreads, selectCommentThread } from 'redux/actions.js' function mapStateToProps(state, { contentState, children }) { let commentThreadId = getFirstThreadId(contentState, children[0]) return { cardId: state.commentThreadsById[co...
import React from 'react' import { connect } from 'react-redux' import { openCommentThreads, selectCommentThread } from 'redux/actions.js' function mapStateToProps(state, { contentState, children }) { let commentThreadId = getFirstThreadId(contentState, children[0]) return { cardId: state.commentThreadsById[co...
Disable clicking on thread underline when accepting selection
Disable clicking on thread underline when accepting selection
JavaScript
mit
michigan-sustainability-cases/gala,galahq/gala,galahq/gala,michigan-sustainability-cases/gala,michigan-sustainability-cases/gala,galahq/gala
3f2a9c5810425ae17073759dd993bfc8bbf01243
src/widgets/DataTable/TouchableNoFeedback.js
src/widgets/DataTable/TouchableNoFeedback.js
/* eslint-disable react/forbid-prop-types */ /* eslint-disable import/prefer-default-export */ /** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import React from 'react'; import { View, TouchableWithoutFeedback } from 'react-native'; import PropTypes from 'prop-types'; /** * TouchableWithoutFeedback...
/* eslint-disable react/forbid-prop-types */ /* eslint-disable import/prefer-default-export */ /** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import React from 'react'; import { View, TouchableWithoutFeedback } from 'react-native'; import PropTypes from 'prop-types'; /** * TouchableWithoutFeedback...
Add constant defined no op on press
Add constant defined no op on press
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
3a020bb12b6a87539823c5389f28782527c5689e
lib/rules/naming/const-name-snakecase.js
lib/rules/naming/const-name-snakecase.js
const BaseChecker = require('./../base-checker') const naming = require('./../../common/identifier-naming') const ruleId = 'const-name-snakecase' const meta = { type: 'naming', docs: { description: 'Constant name must be in capitalized SNAKE_CASE.', category: 'Style Guide Rules' }, isDefault: false, ...
const BaseChecker = require('./../base-checker') const naming = require('./../../common/identifier-naming') const ruleId = 'const-name-snakecase' const meta = { type: 'naming', docs: { description: 'Constant name must be in capitalized SNAKE_CASE.', category: 'Style Guide Rules' }, isDefault: false, ...
Use `VariableDeclaration` node type instead of `StateVariableDeclaration`
Use `VariableDeclaration` node type instead of `StateVariableDeclaration`
JavaScript
mit
protofire/solhint
216ecc4643ed1369a4aac8e5571a379ec26490ae
app/assets/javascripts/pulitzer.js
app/assets/javascripts/pulitzer.js
if (typeof wysihtml5ParserRules === 'undefined') { var wysihtml5ParserRules = { classes: { "wysiwyg-color-gold": 1 }, tags: { "b": 1, "strong": { "rename_tag": "b" }, "i": 1, "h1": 1, "p": 1, "span": 1, "ul": 1, "li": 1 } } } var Select2Trigger ...
if (typeof wysihtml5ParserRules === 'undefined') { var wysihtml5ParserRules = { classes: { "wysiwyg-color-gold": 1 }, tags: { "b": 1, "strong": { "rename_tag": "b" }, "i": 1, "h1": 1, "p": 1, "span": 1, "ul": 1, "li": 1 } } } if (typeof wysihtml...
Set default value for stylesheets
Set default value for stylesheets
JavaScript
mit
edraut/pulitzer,edraut/pulitzer,edraut/pulitzer
72900fc7ac21b7dab8d66dba949f193a0bfde1f5
app/test/notesTabControllerSpec.js
app/test/notesTabControllerSpec.js
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ (function () { 'use strict'; describe('Unit: NotesTabController', function () { //Load the module with NotesTabCo...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ (function () { 'use strict'; describe('Unit: NotesTabController', function () { //Load the module with NotesTabCo...
Add $httpbackend test to test notesTabController
Add $httpbackend test to test notesTabController
JavaScript
mit
tahminak/tracker_web,tahminak/tracker_web
2783cbe73001bff3819ff7a0666370dd9226ca16
src/collections/Program.js
src/collections/Program.js
define([ 'App.config', 'App.models.Program', 'backbone' ], function(config, ProgramModel, Backbone) { 'use strict'; return Backbone.Collection.extend({ model : ProgramModel, url : config.data.programs, parse: function(res) { return res.programs; }, findByCandidate: function(...
define([ 'backbone', 'App.config', 'App.models.Program' ], function(Backbone, config, ProgramModel) { 'use strict'; return Backbone.Collection.extend({ model : ProgramModel, url : config.data.programs, findByCandidate: function(id) { return this.find(function(model) { if (mod...
Remove parse in Progam collection.
Remove parse in Progam collection.
JavaScript
mit
gillesfabio/SLV2014
fe25e59198ab2978beb721a0115a4099fbea36d1
src/components/HomePage.js
src/components/HomePage.js
import React from 'react'; import { InitialSearchContainer } from '../containers'; const HomePage = () => ( <div className="landing-page"> <h1> <img src={require('../assets/images/logo.svg')} alt="El Solucionario" className="landing-page__logo"/> </h1> <div className="text--center"> <p classN...
import React from 'react'; import { InitialSearchContainer } from '../containers'; const HomePage = () => ( <div className="landing-page"> <h1> <img src={require('../assets/images/logo.svg')} alt="El Solucionario" className="landing-page__logo"/> </h1> <div className="text--center"> <p classN...
Change slogan y home page
Change slogan y home page
JavaScript
mit
jlmonroy13/solvingbooks-poison,jlmonroy13/solvingbooks-poison
6a5afa8a2ae1c166631a43a7f2ad6d4b90d4c8ac
src/components/Subtitle.js
src/components/Subtitle.js
import React from 'react'; import styled from '@emotion/styled'; const Content = styled.div` margin: 0 0 30px; text-align: center; color: #666; `; const Title = styled.h2` margin: 0 0 5px; text-align: center; font-family: 'noe', serif; font-size: 26px; font-weight: bold; color: #444; `; export defa...
import React from 'react'; import styled from '@emotion/styled'; const Content = styled.div` margin: 0 0 30px; padding: 0 10px; text-align: center; color: #666; `; const Title = styled.h2` margin: 0 0 5px; text-align: center; font-family: 'noe', serif; font-size: 26px; font-weight: bold; color: #4...
Add side padding to subtitles
Add side padding to subtitles
JavaScript
bsd-3-clause
mirego/mirego-open-web,mirego/mirego-open-web
323855eb83b3546a9eca6c3cd13d98430f8508d8
src/generators/textWrap.js
src/generators/textWrap.js
import defineClasses from '../util/defineClasses' export default function() { return defineClasses({ 'wrap': { 'white-space': 'normal' }, 'no-wrap': { 'white-space': 'nowrap' }, 'pre': { 'white-space': 'pre' }, 'pre-line': { 'white-space': 'pre-line' }, 'pre-wrap': { 'white-space': 'pre-wrap' }, ...
import defineClasses from '../util/defineClasses' export default function() { return defineClasses({ 'white-space-normal': { 'white-space': 'normal' }, 'white-space-nowrap': { 'white-space': 'nowrap' }, 'white-space-pre': { 'white-space': 'pre' }, 'white-space-pre-line': { 'white-space': 'pre-line' }...
Use grim uncreative white-space utility names
Use grim uncreative white-space utility names Because CSS is terrible and there's no way to pretty this up no matter how hard I try.
JavaScript
mit
tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss
c575404b12d3b3f7ce9906ae7b0edc243ccbe450
src/helpers/expeditions.js
src/helpers/expeditions.js
import { expeditions } from 'constants/expeditions'; const RECENT_EXPEDITIONS_LENGTH = 4; export function findExpedition(key) { return expeditions[key] ? expeditions[key] : expeditions.DEFAULT; } export const expeditionsInGroup = (group, allWorkflows) => allWorkflows.filter(e => e.display_name.startsWith(group))...
import { expeditions } from 'constants/expeditions'; const RECENT_EXPEDITIONS_LENGTH = 4; export function findExpedition(key) { return expeditions[key] ? expeditions[key] : expeditions.DEFAULT; } export const expeditionsInGroup = (group, allWorkflows) => allWorkflows.filter(e => e.display_name.startsWith(group))...
Add another check for missing workflow
Add another check for missing workflow
JavaScript
apache-2.0
zooniverse/notes-from-nature-landing,zooniverse/notes-from-nature-landing
0708a20adcd97fe493218b75cdad85052e007e8f
src/utils/helpers/text/__spec__.js
src/utils/helpers/text/__spec__.js
import Text from './text' import Browser from '../browser'; describe('Text', () => { describe('clearSelection', () => { describe('when document.body.createTextRange is defined', () => { it('calls collapse and select on the text range', () => { const mockTextRange = { collapse() { ...
import Text from './text' import Browser from '../browser'; describe('Text', () => { describe('clearSelection', () => { describe('when document.body.createTextRange is defined', () => { it('calls collapse and select on the text range', () => { const mockTextRange = { collapse() {}, ...
Remove console statements from tests
Remove console statements from tests Remove console statements from mock objects and functions.
JavaScript
apache-2.0
Sage/carbon,Sage/carbon,Sage/carbon
4e76d48554118e8bf5d0a97e49d0f5ed1455fb06
src/widgets/TemperatureSyncIcon.js
src/widgets/TemperatureSyncIcon.js
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import React from 'react'; import PropTypes from 'prop-types'; import { GREY, DARK_GREY } from '../globalStyles'; import { CloudIcon, ArrowIcon, TemperatureIcon } from './icons'; export const TemperatureSyncIcon = ({ isActive }) => { const iconColor...
/** * mSupply Mobile * Sustainable Solutions (NZ) Ltd. 2019 */ import React from 'react'; import PropTypes from 'prop-types'; import { GREY, DARK_GREY } from '../globalStyles'; import { CloudIcon, ArrowIcon, TemperatureIcon } from './icons'; export const TemperatureSyncIcon = React.memo(({ isActive }) => { cons...
Add memo temperature sync icon
Add memo temperature sync icon
JavaScript
mit
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
32654e73c391125a2de7de0ca6a2e1d04537fdd3
app/routes/network/show.js
app/routes/network/show.js
import Ember from 'ember'; import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; export default Ember.Route.extend(AuthenticatedRouteMixin, { activate() { this.notifications.clearAll(); }, model(params) { // alert('finding model'); return this.store.findRecord('ne...
import Ember from 'ember'; export default Ember.Route.extend({ activate() { this.notifications.clearAll(); }, model(params) { // alert('finding model'); return this.store.findRecord('network', params.id); }, setupController(controller, model) { // alert('found model'); controller.set('m...
Allow unauthenticated access to networks
Allow unauthenticated access to networks
JavaScript
agpl-3.0
tenders-exposed/elvis-ember,tenders-exposed/elvis-ember
618034d97045172af54f56069304efba2976dfb2
app/routes/posts-router.js
app/routes/posts-router.js
const express = require('express'); const Post = require('../models/post'); const postsRouter = express.Router(); postsRouter.get('/', (req, res, next) => { Post.find((err, posts) => { if (err) next(err); res.json({posts}); }); }); postsRouter.get('/:slug', (req, res, next) => { console.log(req.params...
const express = require('express'); const Post = require('../models/post'); const postsRouter = express.Router(); postsRouter.get('/', (req, res, next) => { Post.find((err, posts) => { if (err) next(err); return res.json({ posts }); }); }); module.exports = postsRouter;
Change formatting in Posts router
Change formatting in Posts router
JavaScript
mit
slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node
a7e8e27ca7e536e052459934be56e5f3eb9e5a21
tools/tests/standard-minification.js
tools/tests/standard-minification.js
import selftest, {Sandbox} from '../tool-testing/selftest.js'; selftest.define('standard-minifiers - CSS splitting', function (options) { const s = new Sandbox({ clients: options.clients }); s.createApp('myapp', 'minification-css-splitting'); s.cd('myapp'); s.testWithAllClients(function (run) { run...
import selftest, {Sandbox} from '../tool-testing/selftest.js'; selftest.define('standard-minifiers - CSS splitting', function (options) { const s = new Sandbox({ clients: options.clients }); s.createApp('myapp', 'minification-css-splitting'); s.cd('myapp'); s.testWithAllClients(function (run) { run...
Move standard-minifiers self-test timeout *after* slow run.match.
Move standard-minifiers self-test timeout *after* slow run.match.
JavaScript
mit
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
5ae3585eea773b4b3e64ff30ecc97ca156b1fa7c
assets/js/footer/footer.js
assets/js/footer/footer.js
import React, { PropTypes, Component } from "react"; import { LOGO_BACKGROUND_PATH } from "../constants/image_paths"; const BetterSelfAddress = () => ( <p className="address small"> BetterHealth, Inc.<br />99 St Marks, 3D<br />New York, NY, 10009 </p> ); export default class Footer extends Component { rende...
import React, { PropTypes, Component } from "react"; import { LOGO_BACKGROUND_PATH } from "../constants/image_paths"; const BetterSelfAddress = () => ( <p className="address small"> BetterHealth, Inc. <br /> 99 St Marks, 3D <br /> New York, NY, 10009 <br /> jeffshek@gmail.com </p> ); ...
Add Email Address for Contact
Add Email Address for Contact
JavaScript
mit
jeffshek/betterself,jeffshek/betterself,jeffshek/betterself,jeffshek/betterself
144773965e41b1d5172d801a29b130352e8adc62
src/js/app.js
src/js/app.js
import 'aframe'; import 'babel-polyfill'; import {Animation, Entity, Scene} from 'aframe-react'; import React from 'react'; import ReactDOM from 'react-dom'; import Camera from './components/Camera'; import Cursor from './components/Cursor'; import Sky from './components/Sky'; class SpaceScene extends React.Component...
import 'aframe'; import 'babel-polyfill'; import {Animation, Entity, Scene} from 'aframe-react'; import React from 'react'; import ReactDOM from 'react-dom'; import Camera from './components/Camera'; import Cursor from './components/Cursor'; import Sky from './components/Sky'; class SpaceScene extends React.Component...
Test basic a-frame tag (not react component)
Test basic a-frame tag (not react component)
JavaScript
mit
elliotaplant/celestial-dance,elliotaplant/celestial-dance
484c0c6e194fd4e1e4ba8228e9563c0b6fa77259
room-connections.js
room-connections.js
const url = require('url'); const WebSocket = require('ws'); var wss; /* Initializes the WebSocket on the given server. */ function start(server) { wss = new WebSocket.Server({ server, perMessageDeflate: false }); wss.on('connection', onConnection); } /* Called when a client connects to the WebSocket. */ function ...
const url = require('url'); const WebSocket = require('ws'); var wss; /* Initializes the WebSocket on the given server. */ function start(server) { wss = new WebSocket.Server({ server, perMessageDeflate: false }); wss.on('connection', onConnection); } /* Called when a client connects to the WebSocket. */ function ...
Include client's WebSocket in onMessage function.
Include client's WebSocket in onMessage function.
JavaScript
mit
nashkevin/Turing-Party,nashkevin/Turing-Party
f52dd1bf1abe01f4c6cf8057e472a9509453618a
routes/emoticons.js
routes/emoticons.js
const express = require('express'), router = express.Router({mergeParams: true}), db = require('../models'); router.get('/', function(req, res, next) { db.Emoticon.find({}).then(function(emoticons) { res.render('emoticons/index', {emoticons}); }).catch(function(err) { console.log(err); })...
const express = require('express'), router = express.Router({mergeParams: true}), db = require('../models'); router.get('/', function(req, res, next) { db.Emoticon.find({}).then(function(emoticons) { res.render('emoticons/index', {emoticons}); }).catch(function(err) { console.log(err); })...
Add GET request for page with form to add new emoticon
Add GET request for page with form to add new emoticon
JavaScript
mit
tymeart/mojibox,tymeart/mojibox
92af83866cbf2a71913ee104911f94bd61ccd92b
postbuild.js
postbuild.js
const fs = require('fs') const path = require('path') const promisify = require('util').promisify const writeFile = promisify(fs.writeFile) const globby = require('globby') ;(async () => { const posts = require('./dist/content/posts/index.json') const files = await globby('./dist/**/*.{css,mjs}') const headers =...
const fs = require('fs') const path = require('path') const promisify = require('util').promisify const writeFile = promisify(fs.writeFile) const globby = require('globby') ;(async () => { // const posts = require('./dist/content/posts/index.json') const files = await globby('./dist/**/*.{css,mjs}') const header...
Comment out preload as fetch headers
Comment out preload as fetch headers
JavaScript
mit
erickmerchant/erickmerchant.com-source,erickmerchant/erickmerchant.com-source
bc5027c9b84d8f1179bf61c7f1fdbd50d8832f92
text-run/does-make-target-exist.js
text-run/does-make-target-exist.js
// @flow import type { ActionArgs } from '../src/runners/action-args.js' const util = require('util') const exec = util.promisify(require('child_process').exec) module.exports = async function (args: ActionArgs) { const makeExpression = args.nodes.textInNodeOfType('code') const expected = makeExpression.split(' ...
// @flow import type { ActionArgs } from '../src/runners/action-args.js' const util = require('util') const exec = util.promisify(require('child_process').exec) const path = require('path') module.exports = async function (args: ActionArgs) { const makeExpression = args.nodes.text() const expected = makeExpressi...
Use code tags for Make script checks
Use code tags for Make script checks
JavaScript
isc
Originate/tutorial-runner,Originate/tutorial-runner
2ab144d4dadb17c8b00216efe9d989ca383d132b
entities/FieldConstraints.js
entities/FieldConstraints.js
modeule.exports = { SIDES = { x0: 700, y0: 300, x1: 2000, y1: 2000 }, CENTER = { x0: 700, y0: 301, x1: 602, y1: 700 }, SMALL_AREA = { x0: 150, y0: 301, x1: -700, y1: 602 } }
modeule.exports = { LEFT = { x0: 700, y0: -300, x1: 2000, y1: -2000 }, RIGHT = { x0: 700, y0: 300, x1: 2000, y1: 2000 }, CENTER = { x0: 700, y0: 301, x1: 602, y1: 700 }, SMALL_AREA = { x0: 150, y0: 301, x1: -700, y1: 602 } }
Split sides into left and right
Split sides into left and right
JavaScript
mit
UFABC-NoBox/NoPlan,UFABC-NoBox/NoPlan
87ee3e965f3028256522b14049915e05e81e2424
rollup.config.js
rollup.config.js
import { terser } from 'rollup-plugin-terser' import filesize from 'rollup-plugin-filesize' import license from 'rollup-plugin-license' export default [ { input: 'src/js.cookie.mjs', output: [ // config for <script type="module"> { dir: 'dist', entryFileNames: '[name].mjs', ...
import { terser } from 'rollup-plugin-terser' import filesize from 'rollup-plugin-filesize' import license from 'rollup-plugin-license' export default [ { input: 'src/js.cookie.mjs', output: [ // config for <script type="module"> { dir: 'dist', entryFileNames: '[name].mjs', ...
Fix problem with missing semicolon
Fix problem with missing semicolon The minified source was dealing with it, we need to deal with it only for the non-minified variant.
JavaScript
mit
js-cookie/js-cookie,js-cookie/js-cookie,carhartl/js-cookie,carhartl/js-cookie
472a2ac9886d64dea0fe290ef6f97375f654d0af
test/unit/svg-star.spec.js
test/unit/svg-star.spec.js
describe('svgStar', function () { var $compile, $rootScope; beforeEach(module('md5.svg-star')); beforeEach(inject(function (_$compile_, _$rootScope_) { $compile = _$compile_; $rootScope = _$rootScope_; })); it('should work as an element', function () { var elt = angular.element('<svg-star...
describe('svgStar', function () { var $compile, $rootScope; beforeEach(module('md5.svg-star')); beforeEach(inject(function (_$compile_, _$rootScope_) { $compile = _$compile_; $rootScope = _$rootScope_; })); it('should work as an element', function () { var elt = angular.element('<svg-star...
Use SVGPointList API in test
Use SVGPointList API in test
JavaScript
mit
astrifex/angular-svg-star-directive
7328393ac9694aeffa65179a13790654344615b2
awesomeshop/static/libs/angular-validation-match.min.js
awesomeshop/static/libs/angular-validation-match.min.js
/*! * angular-validation-match * Checks if one input matches another * @version v1.7.0 * @link https://github.com/TheSharpieOne/angular-validation-match * @license MIT License, http://www.opensource.org/licenses/MIT */ !function(e,a,t){"use strict";function i(e){return{require:"?ngModel",restrict:"A",link:functio...
/*! * angular-validation-match * Checks if one input matches another * @version v1.7.1 * @link https://github.com/TheSharpieOne/angular-validation-match * @license MIT License, http://www.opensource.org/licenses/MIT */ !function(e,a,t){"use strict";function i(e){return{require:"?ngModel",restrict:"A",link:functio...
Upgrade Angular Validation Match to 1.7.1
Upgrade Angular Validation Match to 1.7.1
JavaScript
agpl-3.0
tiramiseb/awesomeshop,tiramiseb/awesomeshop,tiramiseb/awesomeshop,tiramiseb/awesomeshop
0d5047bb06ddec4e5b24dd341db09ca2afa83434
jquery.dragster.js
jquery.dragster.js
(function ($) { $.fn.dragster = function (options) { var settings = $.extend({ enter: function () { }, leave: function () { } }, options); return this.each(function () { var first = false, second = false; $(this).on('dragente...
(function ($) { $.fn.dragster = function (options) { var settings = $.extend({ enter: function () { }, leave: function () { } }, options); return this.each(function () { var first = false, second = false; $(this).on('dragente...
Use the declared first and second variables
Use the declared first and second variables
JavaScript
mit
catmanjan/jquery-dragster
c794f7579856d3573283634b4567b76293798216
core/property/types/model.js
core/property/types/model.js
const Config = use('config'); const Errors = use('core/errors'); const DefaultProperty = require('./default'); const PrimaryKeyPattern = new RegExp('^'+Config.router.primaryKeyPattern + '$'); class ModelProperty extends DefaultProperty { constructor(modelNa...
const Config = use('config'); const Errors = use('core/errors'); const DefaultProperty = require('./default'); const PrimaryKeyPattern = new RegExp('^'+Config.router.primaryKeyPattern + '$'); class ModelProperty extends DefaultProperty { constructor(modelNa...
Allow Property Models to be undefined
Allow Property Models to be undefined
JavaScript
mit
yura-chaikovsky/dominion
b0a1cc95a08eed5d165a8282919102e62191edbc
server/session/set-returning-cookie.js
server/session/set-returning-cookie.js
module.exports = function(ctx) { ctx.cookies.set('returning', 'true', { maxAge: 10 * 365 * 24 * 60 * 60 * 1000 }) }
module.exports = function(ctx) { ctx.cookies.set('returning', 'true', { maxAge: 10 * 365 * 24 * 60 * 60 * 1000, httpOnly: false }) }
Fix returning user cookie to not be HTTP-only.
Fix returning user cookie to not be HTTP-only.
JavaScript
mit
ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery
8a2d4b50d916b7c32bf9d06cbb60ea486e7712a6
common.blocks/footer/footer.example_col_left.bemjson.js
common.blocks/footer/footer.example_col_left.bemjson.js
({ /* ... */ content: [ { block: 'logo' }, { block: 'social', providers: ['vk', 'facebook', 'twitter'] }, { block: 'copyright' } ] /* ... */ });
({ content: [ { block: 'logo', text: 'HTML Academy' }, { block: 'social', providers: ['vk', 'facebook', 'twitter'] }, { block: 'copyright'} ...
Refactor footer col left example
Refactor footer col left example
JavaScript
mit
alexbaumgertner/presentation-bem-stack,alexbaumgertner/presentation-bem-stack
df43e25b9a1adccc838972297e9f35d6302ea248
database/projects/project.model.js
database/projects/project.model.js
'use strict'; // External Modules ----------------------------------------------------- const mongoose = require('mongoose'); // My Modules ------------------------------------------------------- const projectSchema = require('./project.schema'); const Project = mongoose.model('Project', projectSchema); Project.getP...
'use strict'; // External Modules ----------------------------------------------------- const mongoose = require('mongoose'); // My Modules ------------------------------------------------------- const projectSchema = require('./project.schema'); const Project = mongoose.model('Project', projectSchema); Project.getP...
Add MAsterId to the dashboard projects query
Add MAsterId to the dashboard projects query
JavaScript
bsd-3-clause
hhefesto/jacobus,hhefesto/jacobus
c4a4ad1389fab75341675957bc9c1d948410feb5
client/app/scripts/controllers/showMeetingController.js
client/app/scripts/controllers/showMeetingController.js
'use strict'; angular.module('payMyMeetingApp') .controller('showMeetingController', function ($scope, $http, $routeParams, $log) { $scope.meetingId = $routeParams.meetingId; $http.get('/api/attendees/' + $scope.meetingId). success(function (data) { $scope.attendees = data; }). error(function () { }); var so...
'use strict'; angular.module('payMyMeetingApp') .controller('showMeetingController', function ($scope, $http, $routeParams, $log) { $scope.meetingId = $routeParams.meetingId; var loadAttendees = function(){ $http.get('/api/attendees/' + $scope.meetingId). success(function (data) { $scope.attendees = data; ...
Refresh attendees list when a new attendee join the meeting
Refresh attendees list when a new attendee join the meeting
JavaScript
mit
PythagoreLab/PayMyMeeting
42f8dac4c739984ba5af0f6e8dd5fbaacb64d668
src/plugins/validation/validateCommand.js
src/plugins/validation/validateCommand.js
const { findOneByName } = require('../../common') function validateOption(name, value, config) { if (config.required && typeof value === 'undefined') { throw new Error(`Option "${name}" is required`) } } function validateCommand(command, commandConfig, options, optionConfigs) { Object.keys(options).forEach...
const { findOneByName } = require('../../common') function validateOption(name, value, config) { if (config.required && typeof value === 'undefined') { throw new Error(`Option "${name}" is required`) } } function validateCommand(command, commandConfig, options, optionConfigs) { Object.keys(options).forEach...
Fix validation failing for unknown options
Fix validation failing for unknown options
JavaScript
isc
alex-shnayder/comanche
e7067b1492d92167a4b68107bbc7b5891cb5f9ff
ui/src/router/index.js
ui/src/router/index.js
import Vue from 'vue' import Router from 'vue-router' import index from '@/components/index' import four from '@/components/four' Vue.use(Router) export default new Router({ routes: [ { path: '/', name: 'github', component: index }, { path: '/streams/:stream_id', name: 'str...
import Vue from 'vue' import Router from 'vue-router' import index from '@/components/index' import four from '@/components/four' Vue.use(Router) export default new Router({ mode: 'history', routes: [ { path: '/', name: 'github', component: index }, { path: '/streams/:stream_id...
Change to history mode, v2
Change to history mode, v2
JavaScript
apache-2.0
nluedtke/linux_kernel_cves,nluedtke/linux_kernel_cves
efa1feeddbce45c75c069d0bb8565426fd516c7d
server-manager.js
server-manager.js
// Only create the Sharding Manager const config = require('./config.js') const DiscordRSS = require('./index.js') const Discord = require('discord.js') const shardingManager = new Discord.ShardingManager('./server-shard.js', { respawn: false }) const shardedDiscordRSSClient = new DiscordRSS.ClientSharded(shardingManag...
// Only create the Sharding Manager const config = require('./config.js') const DiscordRSS = require('./index.js') const Discord = require('discord.js') const shardingManager = new Discord.ShardingManager('./server-shard.js', { respawn: false }) const clientManager = new DiscordRSS.ClientManager(shardingManager, { read...
Update from ClientSharded to ClientManager
Update from ClientSharded to ClientManager
JavaScript
mit
synzen/Discord.RSS,synzen/Discord.RSS
36bb7be0318a0bf23fc24c220999638ca6bf5f1f
app/assets/javascripts/media_contents.js
app/assets/javascripts/media_contents.js
$(function() { var mediaDropzone; mediaDropzone = new Dropzone("#media-dropzone"); return mediaDropzone.on("success", function(file, responseText) { var imageUrl; imageUrl = responseText.file_name.url; $("#media-contents").append('<div class="col-lg-4"><div class="thumbnail"><img src="' + imageUrl + '...
$(function() { var mediaDropzone; mediaDropzone = new Dropzone("#media-dropzone"); return mediaDropzone.on("success", function(file, responseText) { var _this = this; appendContent(responseText.file_name.url, responseText.id); setTimeout(function(){ $('#myModal').modal('hide'); _this.remov...
Handle after dropzone upload completes
Handle after dropzone upload completes
JavaScript
mit
chandantiatros/dropzone-rails-demo,BoTreeConsultingTeam/dropzone-rails-demo,BoTreeConsultingTeam/dropzone-rails-demo,BoTreeConsultingTeam/dropzone-rails-demo,chandantiatros/dropzone-rails-demo,SoxFace/dropzone-rails-demo,sadiqmmm/dropzone-rails-demo,sadiqmmm/dropzone-rails-demo,sadiqmmm/dropzone-rails-demo,rememberlenn...
b4dfd2c4c4e1400d89063184e36c9481da43293c
lib/buster-node.js
lib/buster-node.js
require("referee-sinon"); require("buster-sinon"); var referee = require("referee"); var test = require("buster-test"); var formatio = require("formatio"); var stackFilter = require("stack-filter"); stackFilter.filters.push("buster-node/lib"); var formatter = formatio.configure({ quoteStrings: true }); referee.format ...
require("referee-sinon"); require("buster-sinon"); var referee = require("referee"); var test = require("buster-test"); var formatio = require("formatio"); var stackFilter = require("stack-filter").configure({ filters: ["buster-node/lib", "buster-node/node_modules"], cwd: process.cwd() }); var formatter = form...
Use the stack filter correctly
Use the stack filter correctly
JavaScript
bsd-3-clause
busterjs/buster-node
c9fe3432df14189fb9028053dadc34d658746624
modules/participants/client/controllers/tracker-participants.client.controller.js
modules/participants/client/controllers/tracker-participants.client.controller.js
(function () { 'use strict'; // Participants controller angular .module('participants') .controller('TrackerController', TrackerController); TrackerController.$inject = ['$scope', '$state', 'Authentication', 'participantResolve', '$timeout']; function TrackerController ($scope, $state, Authenticati...
(function () { 'use strict'; // Participants controller angular .module('participants') .controller('TrackerController', TrackerController); TrackerController.$inject = ['$scope', '$state', 'Authentication', 'participantResolve', 'TrackinginfosService', '$timeout']; function TrackerController ($sco...
Update tracker example to save values
Update tracker example to save values
JavaScript
mit
Buttyx/rennmeister,Buttyx/rennmeister,Buttyx/rennmeister
392d81ed7c3fc923122b1a6e69c82bcd29100bdf
routes/index.js
routes/index.js
/* jshint node: true */ /* jshint esnext: true */ 'use strict'; const router = require('express').Router(); router.get('/', (req, res) => { res.render('index', {}) console.log(res); } ); module.exports = router;
/* jshint node: true */ /* jshint esnext: true */ 'use strict'; const router = require('express').Router(); router.get('/', (req, res) => res.render('index', {}) ); module.exports = router;
Revert "debugging why we don't get cookies in aws"
Revert "debugging why we don't get cookies in aws" This reverts commit 3e84cd8ff25f961066799721cffa1e731090dca9.
JavaScript
apache-2.0
cz8s/pace,lplotni/pace,cz8s/pace,lplotni/pace,lplotni/pace,cz8s/pace
40e4332938a95f4b7b9e570ace947573823db5ba
routes/utils.js
routes/utils.js
import AccountSelectors from '~client/account/redux/selectors' import * as CommunitySelectors from '~client/community/selectors' import * as Paths from '~client/paths' export const showMobilizationPublicView = ({ host, domain }) => { return (isSubdomain(host, domain) || !isDomain(host, domain)) } // eslint-disable-...
import AccountSelectors from '~client/account/redux/selectors' import * as CommunitySelectors from '~client/community/selectors' import * as Paths from '~client/paths' export const showMobilizationPublicView = ({ host, domain }) => { return (isSubdomain(host, domain) || !isDomain(host, domain)) } // eslint-disable-...
Fix redirect for index when community in cookie
Fix redirect for index when community in cookie
JavaScript
agpl-3.0
nossas/bonde-client,nossas/bonde-client,nossas/bonde-client
11b101d3ae75764cef10a76b1b0521bbf8b3c3c6
app/scripts/components/shared/with-country.components.js
app/scripts/components/shared/with-country.components.js
import React from 'react'; const withCountry = component => class extends React.Component { static displayName = `withCountry(${component.displayName || component.name})`; constructor(props) { super(props); this.state = { country: 'US', }; } async componentDidMount() { try { const re...
import React from 'react'; const withCountry = component => class extends React.Component { static displayName = `withCountry(${component.displayName || component.name})`; constructor(props) { super(props); this.state = { country: 'US', }; } async componentDidMount() { try { const re...
Change endpoint for 2 other free services
Change endpoint for 2 other free services
JavaScript
mpl-2.0
byte-foundry/prototypo,byte-foundry/prototypo,byte-foundry/prototypo
368772dad203c5f7d997b99a2ef5f2ea66bee3cd
spec/support/fixtures/stripejs-mock.js
spec/support/fixtures/stripejs-mock.js
class Element { mount(el) { if (typeof el === "string") { el = document.querySelector(el); } el.innerHTML = ` <input id="stripe-cardnumber" name="cardnumber" placeholder="Card number" size="16" type="text"> <input name="exp-date" placeholder="MM / YY" size="6" type="text"> <input ...
class Element { mount(el) { if (typeof el === "string") { el = document.querySelector(el); } el.innerHTML = ` <input id="stripe-cardnumber" name="cardnumber" placeholder="Card number" size="16" type="text"> <input name="exp-date" placeholder="MM / YY" size="6" type="text"> <input ...
Add another missing method to StripeJS mock
Add another missing method to StripeJS mock Our Angular code calls this method in some tests and expects a Promise object with a hash describing a payment method.
JavaScript
agpl-3.0
openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt...
df08d65920e7f27bc357758a304cbcb7541f1ee6
Libraries/Animated/src/Animated.js
Libraries/Animated/src/Animated.js
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; import Platform from '../../Utilities/Platform'; import typeof AnimatedFlatList from './comp...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow * @format */ 'use strict'; import Platform from '../../Utilities/Platform'; import typeof AnimatedFlatList from './comp...
Disable animations on Android again
Disable animations on Android again Summary: We don't yet have native driver support for animations in bridgeless mode on Android, which leads to some weird bugs (like an overlay that never disappears). Let's just disable animations on Android again. Reviewed By: mdvacca Differential Revision: D21537982 fbshipit-so...
JavaScript
mit
javache/react-native,facebook/react-native,javache/react-native,janicduplessis/react-native,myntra/react-native,myntra/react-native,pandiaraj44/react-native,facebook/react-native,pandiaraj44/react-native,javache/react-native,pandiaraj44/react-native,arthuralee/react-native,hoangpham95/react-native,hoangpham95/react-nat...
e3c6ee671970d36994a998d7bd7433e1558358f8
src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/cell/string-cell.js
src/Oro/Bundle/DataGridBundle/Resources/public/js/datagrid/cell/string-cell.js
define([ 'backgrid', 'orodatagrid/js/datagrid/formatter/cell-formatter' ], function(Backgrid, CellFormatter) { 'use strict'; var StringCell; /** * String column cell. Added missing behaviour. * * @export oro/datagrid/cell/string-cell * @class oro.datagrid.cell.StringCell ...
define([ 'backgrid', 'orodatagrid/js/datagrid/formatter/cell-formatter' ], function(Backgrid, CellFormatter) { 'use strict'; var StringCell; /** * String column cell. Added missing behaviour. * * @export oro/datagrid/cell/string-cell * @class oro.datagrid.cell.StringCell ...
Add quantity validation - added support of editable flag for string cell
COM-214: Add quantity validation - added support of editable flag for string cell
JavaScript
mit
orocrm/platform,ramunasd/platform,Djamy/platform,trustify/oroplatform,orocrm/platform,ramunasd/platform,geoffroycochard/platform,geoffroycochard/platform,trustify/oroplatform,Djamy/platform,orocrm/platform,ramunasd/platform,trustify/oroplatform,Djamy/platform,geoffroycochard/platform
d453dbdb404d41200e8b657dbebaebc782950e8a
default_app/forkedProcess.js
default_app/forkedProcess.js
const os = require('os') const path = require('path') let productName = 'Child Product' let companyName = 'Child Company' let tmpPath = path.join(os.tmpdir(), productName + ' Crashes') process.crashReporter.start({ productName: productName, companyName: companyName, submitURL: 'http://localhost:1127/post', cr...
const os = require('os') const path = require('path') const {spawn} = require('child_process') let submitURL = 'http://localhost:1127/post' let productName = 'Child Product' let companyName = 'Child Company' let tmpPath = path.join(os.tmpdir(), productName + ' Crashes') if (process.platform === 'win32') { const arg...
Support crash reporting from child process in Windows
Support crash reporting from child process in Windows
JavaScript
mit
rajatsingla28/electron,rreimann/electron,wan-qy/electron,bpasero/electron,the-ress/electron,miniak/electron,tonyganch/electron,thomsonreuters/electron,twolfson/electron,joaomoreno/atom-shell,renaesop/electron,shiftkey/electron,shiftkey/electron,electron/electron,tonyganch/electron,Floato/electron,electron/electron,wan-...
6081ec0942047ead2515d797151260ff8efc6862
src/main.js
src/main.js
#!/usr/bin/env node "use strict"; var pkg = require("../package.json"); var fs = require("fs"); var path = require("path"); var argv = require("yargs") .usage("Usage: squiggle --input [file] --output [file]") .option("input", { alias: "i", describe: "Read Squiggle from this file", nargs...
#!/usr/bin/env node "use strict"; var pkg = require("../package.json"); var fs = require("fs"); var path = require("path"); var argv = require("yargs") .demand(1) .usage("Usage: squiggle [options] [file] --output [file]") .option("output", { alias: "o", describe: "Write JavaScript to this f...
Revert "Makes command line API more verbose"
Revert "Makes command line API more verbose" This reverts commit 1bdedb488d8455290af54bbc762c0d852cbb9058.
JavaScript
mit
saikobee/expr-lang,rdenmark/squiggle,saikobee/squiggle,saikobee/squiggle,squiggle-lang/squiggle-lang,rdenmark/squiggle,saikobee/expr-lang,rdenmark/squiggle,wavebeem/squiggle,wavebeem/squiggle,squiggle-lang/squiggle-lang,saikobee/expr-lang,saikobee/squiggle,wavebeem/squiggle,squiggle-lang/squiggle-lang
0a3bbdf0d1f8919bc72ccef9caab2067eb0c14c0
lib/utils/pipes.js
lib/utils/pipes.js
'use strict'; import {Pipe} from 'angular2/core'; import {JsonPointer} from './JsonPointer'; import marked from 'marked'; marked.setOptions({ renderer: new marked.Renderer(), gfm: true, tables: true, breaks: false, pedantic: false, smartLists: true, smartypants: false }); @Pipe({ name: 'keys' }) exp...
'use strict'; import {Pipe, InvalidPipeArgumentException} from 'angular2/core'; import {isString} from 'angular2/src/facade/lang'; import {JsonPointer} from './JsonPointer'; import marked from 'marked'; marked.setOptions({ renderer: new marked.Renderer(), gfm: true, tables: true, breaks: false, pedantic: fa...
Add error messages to Pipes
Add error messages to Pipes
JavaScript
mit
Rebilly/ReDoc,Rebilly/ReDoc,Rebilly/ReDoc,Rebilly/ReDoc
6f729e62da570d92e34836d402e97c43b0b083b1
core/public/javascripts/refinery/core.js
core/public/javascripts/refinery/core.js
$(document).ready(function(){ // focus first field in an admin form. $('form input[type=text]:first').focus(); init_flash_messages(); }); init_flash_messages = function(){ $('#flash').css({ 'opacity': 0 , 'visibility':'visible' }).animate({'opacity': '1'}, 550); $('#flash_close').click(function(e)...
$(document).ready(function(){ // focus first field in an admin form. $('form input[type=text]:first').focus(); init_flash_messages(); }); init_flash_messages = function(){ $('#flash').css({ 'opacity': 0 , 'visibility':'visible' }).animate({'opacity': '1'}, 550); $('#flash_close').click(function(e)...
Hide the flash completely when the animation is completed. Closes GH-539
Hide the flash completely when the animation is completed. Closes GH-539
JavaScript
mit
anitagraham/refinerycms,simi/refinerycms,bryanmtl/g-refinerycms,aguzubiaga/refinerycms,trevornez/refinerycms,donabrams/refinerycms,LytayTOUCH/refinerycms,hoopla-software/refinerycms,refinery/refinerycms,trevornez/refinerycms,pcantrell/refinerycms,aguzubiaga/refinerycms,LytayTOUCH/refinerycms,johanb/refinerycms,refinery...
22c8a3cdc5a9fc40b3e89d0acaed662debd2e82a
src/zinc.js
src/zinc.js
/** * Provides a global namespace for the Zinc javascript library and some default parameters for it. * * @namespace * @author Alan Wu */ var Zinc = function() { this.Revision = 29; this.defaultMaterialColor = 0xFFFFFF; this.defaultOpacity = 1.0; this.Geometry = require('./geometry').Geometry; this.G...
/** * Provides a global namespace for the Zinc javascript library and some default parameters for it. * * @namespace * @author Alan Wu */ var Zinc = function() { this.Revision = 29; this.defaultMaterialColor = 0xFFFFFF; this.defaultOpacity = 1.0; this.Geometry = require('./geometry').Geometry; this.G...
Add threejs library as one of the usable module for compatibility.
Add threejs library as one of the usable module for compatibility.
JavaScript
mit
alan-wu/Web-based-Zinc-Visualisation,alan-wu/Web-based-Zinc-Visualisation,alan-wu/Web-based-Zinc-Visualisation
ba1ea1a2ada1ca17e5ee94d21d632f2e9a6d3a53
app/assets/javascripts/threadable/realtime.js
app/assets/javascripts/threadable/realtime.js
Threadable.realtime.connect = function(currentUser) { var userId = currentUser.get('userId'); if (typeof io != 'undefined' && io !== null) { Threadable.realtime.socketIo = io.connect(Threadable.realtime.url + '/?userId=' + userId + '&token=' + Threadable.realtime.token); } if (Threadable.realtime.socketIo...
Threadable.realtime.connect = function(currentUser) { var userId = currentUser.get('userId'); if (typeof io != 'undefined' && io !== null) { Threadable.realtime.socketIo = io.connect(Threadable.realtime.url + '/?userId=' + userId + '&token=' + Threadable.realtime.token); } if (Threadable.realtime.socketIo...
Send ping/pong to keep the connection open.
Send ping/pong to keep the connection open.
JavaScript
apache-2.0
otherio/threadable.com,otherio/threadable.com,otherio/threadable.com,otherio/threadable.com
76bd0c3ed561a887c31a6b315d175c67e2a7c9a8
node_modules/sampleModules/umd/defineFunctionWithDep.js
node_modules/sampleModules/umd/defineFunctionWithDep.js
/* * Copyright(c) 2014, Unional (https://github.com/unional) * @license Licensed under the MIT License (https://github.com/unional/umd/LICENSE)). * Created by unional on 9/21/14. */ umd(function(define) { define(function(require) { var func = require('sampleModules/umd/defineFunction'); var func...
/* * Copyright(c) 2014, Unional (https://github.com/unional) * @license Licensed under the MIT License (https://github.com/unional/umd/LICENSE)). * Created by unional on 9/21/14. */ umd(function(define) { define(function(require) { var func = require('sampleModules/umd/defineFunction'); var func...
Add return to definition function. The return value will be used to map the require calls. Not implemented yet.
Add return to definition function. The return value will be used to map the require calls. Not implemented yet.
JavaScript
mit
unional/unional-umd,unional/unional-umd
3f46f76454b7c2f00d0bc6ee6eaf166726cb5a2f
src/class.js
src/class.js
'use strict'; // changeable contants var C = 'constructor', // name of the constructor method X = 'extend'; // name of extend method function Class() {} Class[X] = function(subclass) { var prototype = Object.create(this.prototype); subclass.call(prototype, this.prototype); var Extended = prototype.hasOwnPrope...
'use strict'; // changeable contants var C = 'constructor', // name of the constructor method X = 'extend'; // name of extend method function Class() {} Class[X] = function(subclass) { var prototype = Object.create(this.prototype); subclass.call(prototype, this.prototype); function Extended() { prototype[C]....
Remove unnecessary own property check
Remove unnecessary own property check
JavaScript
mit
koffeine/class-256.js
d5eb6ace9c8048286daf24552ea9d5f9604533cf
src/index.js
src/index.js
/** * Detects if only the primary button has been clicked in mouse events. * @param {MouseEvent} e Event instance (or Event-like, i.e. `SyntheticEvent`) * @return {Boolean} */ export const isPrimaryClick = e => !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) && (!("buttons" in e) || e.buttons === 0 || e.but...
/** * Detects if only the primary button has been clicked in mouse events. * @param {MouseEvent} e Event instance (or Event-like, i.e. `SyntheticEvent`) * @return {Boolean} */ export const isPrimaryClick = e => !(e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) && (e.buttons == null || e.buttons === 0 || e.but...
Use `== null` check instead of `in` because jQuery.Event defaults to undefined
Use `== null` check instead of `in` because jQuery.Event defaults to undefined
JavaScript
mit
jacobbuck/primary-click
9d96d0c574ed076faf03af85d97746d04baa83b5
src/index.js
src/index.js
import fs from 'fs' import _ from 'lodash' import postcss from 'postcss' import stylefmt from 'stylefmt' import defaultConfig from './defaultConfig' import mergeConfig from './util/mergeConfig' import generateUtilities from './lib/generateUtilities' import substituteHoverableAtRules from './lib/substituteHoverableAtR...
import fs from 'fs' import _ from 'lodash' import postcss from 'postcss' import stylefmt from 'stylefmt' import defaultConfig from './defaultConfig' import mergeConfig from './util/mergeConfig' import generateUtilities from './lib/generateUtilities' import substituteHoverableAtRules from './lib/substituteHoverableAtR...
Revert "Make config loading even lazier"
Revert "Make config loading even lazier" This reverts commit be7f9963eab041026853df68c4b9eeed46bf730d.
JavaScript
mit
tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss
5f277abe6c4f35b75306adf39d66cefb47b89348
src/app.js
src/app.js
/*global Modernizr: true*/ var REIN = (function () { var modules = {}, events = {}, init, module, View; _.extend(events, Backbone.Events, { onMultiple: function (eNameToFnMap, ctx) { _.each(eNameToFnMap, function (fn, eventName) { this.on(eventName, fn, ctx); }, ...
/*global Modernizr: true*/ var REIN = (function () { var modules = {}, events = {}, init, module, View; _.extend(events, Backbone.Events, { onMultiple: function (eNameToFnMap, ctx) { _.each(eNameToFnMap, function (fn, eventName) { this.on(eventName, fn, ctx); }, ...
Remove touch delay iPhone fix
Remove touch delay iPhone fix Due to click event firing at touchend, the UX is kind of broken when scrolling and the finger ends up on top of something 'clickable'. Awaiting https://github.com/madrobby/zepto/pull/494
JavaScript
agpl-3.0
ruudud/ReindeerFinder,ruudud/ReindeerFinder,ruudud/ReindeerFinder