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 |
|---|---|---|---|---|---|---|---|---|---|
fec84bbeaaca6f18f1a73124535c133116b1ff4d | client/app/controllers/navbar.js | client/app/controllers/navbar.js | "use strict";
angular.module("myApp.navbar", ["myApp.services.authenticationHandler"])
.controller("NavbarController", function($scope, authenticationHandler) {
$scope.valid = false;
$scope.logout = function() {
authenticationHandler.logout();
};
authenticationHandler.watchLogin(function(logge... | "use strict";
angular.module("myApp.navbar", ["myApp.services.authenticationHandler"])
.controller("NavbarController", function($scope, authenticationHandler) {
$scope.valid = !!authenticationHandler.token;
$scope.logout = function() {
authenticationHandler.logout();
};
authenticationHandler.w... | Fix login button on refresh | Fix login button on refresh
| JavaScript | apache-2.0 | pmaidens/CMPUT404-project,pmaidens/CMPUT404-project,pmaidens/CMPUT404-project,pmaidens/CMPUT404-project |
22f6c57e5d047cb1e3d041430fbfa0c986f09f26 | client/main.js | client/main.js | addEventListener('load', function () {
if(reqUri = getRequestURIFromString(location.href))
readWSStream(reqUri, appendToBody)
else
appendToBody('No URL given <br>')
})
function readWSStream (requestURI, callback) {
var conn = new WebSocket('ws://' + requestURI, 'echo-protocol')
conn.onmessage = callerW... | addEventListener('load', function () {
if(reqParams = getRequestParamsFromString(location.href)) {
readWSStream(reqParams[0], reqParams[1], appendToBody)
} else {
appendToBody('No URL given <br>')
}
})
function readWSStream (requestURI, socketProto, callback) {
var conn = new WebSocket(socketProto + ':... | Add a second param for the protocol | Add a second param for the protocol
| JavaScript | mit | Kriegslustig/websocket-test,Kriegslustig/websocket-test |
72c07bf11a70a2191b03bdcf50557b3c03193165 | app/components/footballModule/footballController.js | app/components/footballModule/footballController.js | angular.module('notificationApp.footballController', []).
controller('footballController', function($scope, $interval, $timeout, footballFactory) {
$scope.currentTeam = footballFactory.getCurrentTeam();
$scope.rowClick = function(inputTeam) {
$scope.currentTeam = inputTeam;
footballFactory.set... | angular.module('notificationApp.footballController', []).
controller('footballController', function($scope, $interval, $timeout, footballFactory) {
$scope.currentTeam = footballFactory.getCurrentTeam();
$scope.rowClick = function(inputTeam) {
$scope.currentTeam = inputTeam;
footballFactory.set... | Fix bug in football module caching | Fix bug in football module caching
| JavaScript | mit | callumdmay/pi-notification-app,callumdmay/pi-notification-app,callumdmay/pi-notification-app,callumdmay/pi-notification-app |
115e20162d92b679a8bed1ce41198cc89b47c594 | app/routes/page.create.route.js | app/routes/page.create.route.js |
'use strict';
// Modules
var fs = require('fs');
var get_filepath = require('../functions/get_filepath.js');
function route_page_create (config) {
return function (req, res, next) {
var filepath = get_filepath({
content : config.content_dir,
category : req.body.category,
filename ... |
'use strict';
// Modules
var fs = require('fs');
var get_filepath = require('../functions/get_filepath.js');
function route_page_create (config) {
return function (req, res, next) {
var filepath = get_filepath({
content : config.content_dir,
category : req.body.category,
filename ... | Move file save response into close callback. | Move file save response into close callback.
| JavaScript | mit | gilbitron/Raneto,gilbitron/Raneto,indigostudio/Raneto,indigostudio/Raneto |
d1d813bf161eb28dc95852d519cf8fe274b3d12a | client/views/posts/posts_list.js | client/views/posts/posts_list.js | Template.postsList.helpers({
posts: function() {
return Posts.find();
}
}); | Template.postsList.helpers({
posts: function() {
return Posts.find({}, {sort: {submitted: -1}});
}
}); | Sort posts by submitted timestamp. | Sort posts by submitted timestamp.
chapter7-7
| JavaScript | mit | scimusmn/sd-waw,scimusmn/sd-waw |
c1f7d0478c618ab37bcfc28c190f9238157c6ba8 | Source/Core/parseResponseHeaders.js | Source/Core/parseResponseHeaders.js | /*global define*/
define([], function() {
"use strict";
/**
* @private
*
* Parses the result of XMLHttpRequest's getAllResponseHeaders() method into
* a dictionary.
*
* @exports parseResponseHeaders
*
* @param {String} headerString The header string returned by getAllRes... | /*global define*/
define([], function() {
"use strict";
/**
* Parses the result of XMLHttpRequest's getAllResponseHeaders() method into
* a dictionary.
*
* @exports parseResponseHeaders
*
* @param {String} headerString The header string returned by getAllResponseHeaders(). The fo... | Move @private to the end of the jsdoc | Move @private to the end of the jsdoc | JavaScript | apache-2.0 | likangning93/cesium,NaderCHASER/cesium,omh1280/cesium,CesiumGS/cesium,AnalyticalGraphicsInc/cesium,YonatanKra/cesium,kiselev-dv/cesium,oterral/cesium,kiselev-dv/cesium,aelatgt/cesium,geoscan/cesium,denverpierce/cesium,jason-crow/cesium,omh1280/cesium,esraerik/cesium,ggetz/cesium,ggetz/cesium,emackey/cesium,kaktus40/ces... |
6917f99574655e76d33f8ada125a9aef28193c7a | src/external-example.js | src/external-example.js | var readFileSync = require("fs").readFileSync;
exports.defineTags = function(dictionary) {
dictionary.defineTag("externalExample", {
mustHaveValue: true,
isNamespace: false,
canHaveType: true,
defaultValue: [],
onTagged: function(doclet, tag) {
var examples = doclet.externalExamples;
var example = {};... | var readFileSync = require("fs").readFileSync;
var baseDir = env.opts.query.externalExBase;
exports.defineTags = function(dictionary) {
dictionary.defineTag("externalExample", {
mustHaveValue: true,
isNamespace: false,
canHaveType: true,
defaultValue: [],
onTagged: function(doclet, tag) {
var examples = ... | Make base directory configurable from command line | Make base directory configurable from command line
| JavaScript | mit | jugglinmike/jsdoc-external-example |
07dcab9ebc08c5138c072e891e9c73c0ad133df0 | src/cli.js | src/cli.js | #! /usr/bin/env node
'use strict';
(function () {
var yargs = require('yargs');
var packageJson = require('../package.json');
var version = packageJson.version;
var argv = yargs
.usage('Usage: $0 <command> [options]')
.command('crawl', 'Crawl a domain')
.example('$0 crawl domain.com --depth 100', '(Cra... | #! /usr/bin/env node
'use strict';
(function () {
var yargs = require('yargs');
var packageJson = require('../package.json');
var version = packageJson.version;
var argv = yargs
.usage('Usage: $0 <command> [options]')
.command('crawl', 'Crawl a domain')
.example('$0 crawl domain.com --depth 100', '(Cra... | Move crawl options to crawl command | Move crawl options to crawl command
| JavaScript | mit | JakeSidSmith/krawala,JakeSidSmith/krawala,JakeSidSmith/krawala |
f352e5f6bd4c129ba65314dd9532056055ca00fb | src/validations/html.js | src/validations/html.js | var Promise = require('es6-promise').Promise;
var groupBy = require('lodash/groupBy');
var values = require('lodash/values');
var flatten = require('lodash/flatten');
var flatMap = require('lodash/flatMap');
var sortBy = require('lodash/sortBy');
var omit = require('lodash/omit');
var validateWithHtmllint = require('./... | var Promise = require('es6-promise').Promise;
var groupBy = require('lodash/groupBy');
var values = require('lodash/values');
var flatten = require('lodash/flatten');
var flatMap = require('lodash/flatMap');
var sortBy = require('lodash/sortBy');
var omit = require('lodash/omit');
var trim = require('lodash/trim');
var... | Trim surrounding whitespace before validating HTML with slowparse | Trim surrounding whitespace before validating HTML with slowparse
Slowparse incorrectly reports an error if the `DOCTYPE` is preceded by a
line of whitespace.
| JavaScript | mit | jwang1919/popcode,popcodeorg/popcode,jwang1919/popcode,outoftime/learnpad,jwang1919/popcode,outoftime/learnpad,popcodeorg/popcode,popcodeorg/popcode,jwang1919/popcode,popcodeorg/popcode |
873e6c0588bf51b3d821fd8f6d2b6f77b9fd4038 | app/components/container-dot/component.js | app/components/container-dot/component.js | import Ember from 'ember';
import { isAlternate } from 'ui/utils/platform';
export default Ember.Component.extend({
resourceActions: Ember.inject.service('resource-actions'),
model: null,
tagName: 'I',
classNames: ['dot','hand'],
classNameBindings: ['model.stateColor','model.stateIcon'],
attributeBinding... | import Ember from 'ember';
import { isAlternate } from 'ui/utils/platform';
export default Ember.Component.extend({
resourceActions: Ember.inject.service('resource-actions'),
model: null,
tagName: 'I',
classNames: ['dot','hand'],
classNameBindings: ['model.stateColor','model.stateIcon'],
attributeBinding... | Fix container dot click for VM | Fix container dot click for VM
| JavaScript | apache-2.0 | ubiquityhosting/rancher_ui,westlywright/ui,nrvale0/ui,ubiquityhosting/rancher_ui,pengjiang80/ui,rancherio/ui,vincent99/ui,lvuch/ui,nrvale0/ui,rancher/ui,rancher/ui,lvuch/ui,ubiquityhosting/rancher_ui,westlywright/ui,rancherio/ui,pengjiang80/ui,vincent99/ui,lvuch/ui,vincent99/ui,rancherio/ui,rancher/ui,pengjiang80/ui,nr... |
e1cc0bfadbe41c954f39373ed6d12f35dcb96d04 | lib/loaders/saved_artwork.js | lib/loaders/saved_artwork.js | import DataLoader from 'dataloader';
import gravity from './gravity';
import {
map,
find,
extend,
first,
} from 'lodash';
const savedArtworkLoader = new DataLoader(keys => {
const keyObjs = map(keys, JSON.parse);
const { accessToken, userID } = first(keyObjs);
const ids = map(keyObjs, 'id');
return gra... | import DataLoader from 'dataloader';
import gravity from '../apis/gravity';
import { toKey } from '../helpers';
import {
map,
find,
extend,
first,
} from 'lodash';
const savedArtworkLoader = new DataLoader(keys => {
const keyObjs = map(keys, JSON.parse);
const { accessToken, userID } = first(keyObjs);
co... | Update gravity dependency and add spec | Update gravity dependency and add spec
| JavaScript | mit | mzikherman/metaphysics-1,craigspaeth/metaphysics,artsy/metaphysics,artsy/metaphysics,broskoski/metaphysics,mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,craigspaeth/metaphysics,mzikherman/metaphysics-1 |
1020f7c52ec2bbb6279fad59d9fbca9e150a0fae | lib/streams/cleanupStream.js | lib/streams/cleanupStream.js | const logger = require('pelias-logger').get('openaddresses');
const through2 = require( 'through2' );
const _ = require('lodash');
const cleanup = require( '../cleanup' );
/*
* create a stream that performs any needed cleanup on a record
*/
function createCleanupStream() {
return through2.obj(function( record, e... | const through2 = require( 'through2' );
const cleanup = require( '../cleanup' );
/*
* create a stream that performs any needed cleanup on a record
*/
function createCleanupStream() {
return through2.obj(function( record, enc, next ) {
record.STREET = cleanup.streetName( record.STREET );
// csvParse will... | Remove very verbose importer log | Remove very verbose importer log
This line was causing many thousands of log entries to be printed during
every import.
| JavaScript | mit | pelias/openaddresses,pelias/openaddresses |
4458638eb53a079e701d2b1b03615f0130b4d0e8 | load/mediator/tcp-handler.js | load/mediator/tcp-handler.js | 'use strict'
const DELAY = parseInt(process.env.DELAY, 10) || 2000
const bigBuff = Buffer.alloc(2 * 1024 * 1024, 'HellWorld ')
exports.handleBodyRequest = (conn) => {
conn.end(bigBuff)
}
exports.handleDelayRequest = (conn) => {
conn.write('Delay start')
setTimeout(() => {
conn.end(`Waited for ${DELAY}ms`)... | 'use strict'
const DELAY = parseInt(process.env.DELAY, 10) || 2000
const bigBuff = Buffer.alloc(2 * 1024 * 1024, 'HellWorld ')
function sendHttpHeaders (conn) {
conn.write('HTTP/1.1 200 OK\n')
conn.write('Content-Type: text/plain\n')
conn.write('\n')
}
exports.handleBodyRequest = (conn) => {
sendHttpHeaders... | Send HTTP response on TCP channels | Send HTTP response on TCP channels
The load testing tools don't support plain TCP.
OHM-556
| JavaScript | mpl-2.0 | jembi/openhim-core-js,jembi/openhim-core-js |
ce562d2baddfb8ec7e7bbda8d4a53d5a0526a50c | rollup.config.js | rollup.config.js | const fs = require('fs');
const pathModule = require('path');
const plugins = [
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
require('rollup-plugin-commonjs')({
// leave the os require in the tree as that codepath is not
// taken when executed in Deno after magicpen ... | const fs = require('fs');
const pathModule = require('path');
const plugins = [
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
require('rollup-plugin-commonjs')({
// leave the os require in the tree as that codepath is not
// taken when executed in Deno after magicpen ... | Set preferBuiltins to silence a rollup warning. | Set preferBuiltins to silence a rollup warning.
| JavaScript | mit | unexpectedjs/unexpected |
4231bdf7bb274fdf49d5c33b7a06d99f48f7502f | modules/map/vessel_source.js | modules/map/vessel_source.js | /**
* Copyright 2019 Google LLC
*
* 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 required by applicable law or agreed to... | /**
* Copyright 2019 Google LLC
*
* 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 required by applicable law or agreed to... | Work around sometimes getting invalid coordinates | Work around sometimes getting invalid coordinates
| JavaScript | apache-2.0 | GoogleChromeLabs/web-ais-viewer,GoogleChromeLabs/web-ais-viewer |
a05454d4dcbc2cc9cb2f7f358e9104a537bd0860 | app/aboutDialog.js | app/aboutDialog.js | const electron = require('electron')
const app = require('electron').app
const dialog = electron.dialog
const Channel = require('./channel')
const path = require('path')
module.exports.showAbout = function () {
dialog.showMessageBox({
title: 'Brave',
message: 'Brave: ' + app.getVersion() + '\n' +
'Elec... | const electron = require('electron')
const app = require('electron').app
const dialog = electron.dialog
const Channel = require('./channel')
const path = require('path')
module.exports.showAbout = function () {
dialog.showMessageBox({
title: 'Brave',
message: 'Brave: ' + app.getVersion() + '\n' +
'Elec... | Remove OpenSSL from about dialog | Remove OpenSSL from about dialog
it is implied by the Node version
| JavaScript | mpl-2.0 | MKuenzi/browser-laptop,MKuenzi/browser-laptop,diasdavid/browser-laptop,darkdh/browser-laptop,manninglucas/browser-laptop,luixxiul/browser-laptop,diasdavid/browser-laptop,jonathansampson/browser-laptop,willy-b/browser-laptop,pmkary/braver,darkdh/browser-laptop,willy-b/browser-laptop,manninglucas/browser-laptop,dcposch/b... |
a9a4baa3660da1ad1c2a713a8d8896be40dbac3d | src/__tests__/index.spec.js | src/__tests__/index.spec.js | const fs = require('fs');
const xsd = require('libxml-xsd');
const cwd = process.cwd();
const reporter = require('../../index');
const { failedCase, pendingCase, passingCase } = require('./fixtures/testcase');
const junitXsd = fs.readFileSync(`${__dirname}/fixtures/junit.xsd`, {encoding: 'utf-8'});
const mock = {
"su... | const fs = require('fs');
const xsd = require('libxml-xsd');
const cwd = process.cwd();
const reporter = require('../../index');
const { failedCase, pendingCase, passingCase } = require('./fixtures/testcase');
const junitXsd = fs.readFileSync(`${__dirname}/fixtures/junit.xsd`, {encoding: 'utf-8'});
const mock = {
"su... | Add test for ensuring non-zero return code on test failures | Add test for ensuring non-zero return code on test failures
| JavaScript | mit | michaelleeallen/jest-junit-reporter |
ae62259ada6ba0e6024bb15ca8a59decd38d8aeb | app/scripts/services/bitcoindata.js | app/scripts/services/bitcoindata.js | 'use strict';
angular.module('stockApp')
.factory('bitcoinData', function ($http, YAHOO_API, BITCOIN_CSV) {
var bitcoinData = {
yql: function () {
var query = 'select * from csv where url = "' + BITCOIN_CSV + '"';
// yql config
var FORMAT = 'json';
var ENV = 'store://data... | 'use strict';
angular.module('stockApp')
.factory('bitcoinData', function ($http, YAHOO_API, BITCOIN_CSV) {
var bitcoinData = {
yql: function () {
var query = 'select * from csv where url = "' + BITCOIN_CSV + '"';
// yql config
var FORMAT = 'json';
var ENV = 'store://data... | Fix firefox Date.parse() problem with iso dates | Fix firefox Date.parse() problem with iso dates
| JavaScript | mit | cebor/gui-project,cebor/PEM,cebor/PEM,cebor/gui-project,cebor/gui-project,cebor/PEM |
87f928396e789c8f7064e832ef42674a239b1d04 | utils/setup-client-query-handler.js | utils/setup-client-query-handler.js | // Handle search query states
// Listens for changes in query string, then ensures that provided values are coherent,
// and if all is fine emits valid query objects
// (which are usually consumed by list managers to update state of tables)
'use strict';
var ensureObject = require('es5-ext/object/valid-object')
... | // Handle search query states
// Listens for changes in query string, then ensures that provided values are coherent,
// and if all is fine emits valid query objects
// (which are usually consumed by list managers to update state of tables)
'use strict';
var ensureObject = require('es5-ext/object/valid-object')
... | Update up to changes to QueryHandler | Update up to changes to QueryHandler
| JavaScript | mit | egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations |
cd8d02e180c5ce7c7a3c5b94affdb4f7c81f6595 | model/google-maps-handler.js | model/google-maps-handler.js | // Google Maps JavaScript API is referenced by <script> tag below in index.html
// <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
exports.render = function(locations) {
const map = new google.maps.Map(document.getElementById('map'), {
mapTypeId: google.maps.Ma... | // Google Maps JavaScript API is referenced by <script> tag below in index.html
// <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
exports.render = function(locations) {
if(locations.length === 0) {
renderInitialState();
} else {
renderWithLocations(loc... | Handle the case of rendering Google Maps without any location. | Handle the case of rendering Google Maps without any location.
| JavaScript | mit | TomoyukiAota/electron-directory-treeview,TomoyukiAota/electron-directory-treeview |
627ebc219a58b0b098e57620c4fb1f35c6e60aed | app/controllers/api/v2/GroupsController.js | app/controllers/api/v2/GroupsController.js | import _ from 'lodash'
import { dbAdapter } from '../../../models'
import exceptions from '../../../support/exceptions'
export default class GroupsController {
static async groupRequests(req, res) {
if (!req.user)
return res.status(401).jsonp({ err: 'Unauthorized', status: 'fail'})
try {
let m... | import _ from 'lodash'
import { dbAdapter } from '../../../models'
import exceptions from '../../../support/exceptions'
export default class GroupsController {
static async groupRequests(req, res) {
if (!req.user)
return res.status(401).jsonp({ err: 'Unauthorized', status: 'fail'})
try {
let m... | Add image fields to v2/groupRequests response | Add image fields to v2/groupRequests response
| JavaScript | mit | FreeFeed/freefeed-server,SiTLar/freefeed-server,FreeFeed/freefeed-server,golozubov/freefeed-server,SiTLar/freefeed-server,golozubov/freefeed-server |
57c4343a2ab530c06fdd8d48f9961feaad3a7338 | app/controllers/api/v2/SearchController.js | app/controllers/api/v2/SearchController.js | import compose from 'koa-compose';
import { dbAdapter } from '../../../models';
import { serializeFeed } from '../../../serializers/v2/post';
import { monitored } from '../../middlewares';
export default class SearchController {
search = compose([
monitored('search'),
async (ctx) => {
const DEFAULT_L... | import compose from 'koa-compose';
import { dbAdapter } from '../../../models';
import { serializeFeed } from '../../../serializers/v2/post';
import { monitored } from '../../middlewares';
import { ORD_CREATED, ORD_UPDATED } from './TimelinesController';
export default class SearchController {
search = compose([
... | Handle 'sort' parametr of search endpoint | Handle 'sort' parametr of search endpoint
| JavaScript | mit | FreeFeed/freefeed-server,FreeFeed/freefeed-server |
bcc56e343db42852842915e1a08f23fae2ef3fae | scripts/jest/preprocessor.js | scripts/jest/preprocessor.js | /**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
co... | /**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
co... | Use fbjs preset in jest cache key | Use fbjs preset in jest cache key
| JavaScript | bsd-3-clause | yungsters/fbjs,cpojer/fbjs,facebook/fbjs,chicoxyzzy/fbjs |
e62afed6841de1bfb9b50d3ed098bb2089c14da5 | app/models/pokemonSighting.js | app/models/pokemonSighting.js | "use strict";
let mongoose = require('mongoose');
var Schema = mongoose.Schema;
let pokemonSighting = new Schema({
source : {type: String},
location : {type: {type: String, default: 'Point'}, coordinates: {type: [Number]}},
pokemonId : {type: Number},
appearedOn : {type: Date}
});... | "use strict";
let mongoose = require('mongoose');
var Schema = mongoose.Schema;
let pokemonSighting = new Schema({
source : {type: String},
location : {type: {type: String, default: 'Point'}, coordinates: {type: [Number]}},
pokemonId : {type: Number},
appearedOn : {type: Date}
});... | Fix for inserting null locations(in case of twitter) for indexed field | Fix for inserting null locations(in case of twitter) for indexed field
| JavaScript | apache-2.0 | PokemonGoers/PokeData |
7509525978129d6b8536e3a4411503134aeb48d2 | app/routes/problems/manage.js | app/routes/problems/manage.js | import Ember from 'ember';
export default Ember.Route.extend({
actions: {
removeMember: function(problem) {
var adapter = this.store.adapterFor('problem');
console.log(adapter);
adapter.ajax("https://api.parse.com/1/classes/Problem/" + problem.id, 'PUT', {
data: {
'member1': {... | import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return this.store.findAll('problem');
},
actions: {
removeMember: function(problem) {
var adapter = this.store.adapterFor('problem');
console.log(adapter);
adapter.ajax("https://api.parse.com/1/classes/Pr... | Add problem.set call in removeMember ajax callback to set store value to null (without saving) so data on page simulates Parse data | Add problem.set call in removeMember ajax callback to set store value to null (without saving) so data on page simulates Parse data
| JavaScript | mit | jjhampton/cross-pollinate,jjhampton/cross-pollinate |
1d73c86cb225a4b4b1c61a9631fa1d1845d07d74 | nodes/core/core/25-status.js | nodes/core/core/25-status.js | /**
* Copyright 2015 IBM Corp.
*
* 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 required by applicable law or agreed to in wr... | /**
* Copyright 2015 IBM Corp.
*
* 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 required by applicable law or agreed to in wr... | Add scope to status node | Add scope to status node
| JavaScript | apache-2.0 | kanki8086/node-red,knolleary/node-red,wajnberg/node-red,ddm/node-red,augustnmonteiro/skills-visual-programming,estbeetoo/beetoo-controller,giovannicuriel/mashup,MaxXx1313/my-node-red,namgk/node-red,monteslu/pagenodes,kanki8086/node-red,xively/habanero,PaGury/node-red,ddm/node-red,btsimonh/node-red,monteslu/pagenodes,ka... |
05a15d9d295ed8912ba1b54bdf03a4a096b138a5 | assets/js/hooks/useFeature.js | assets/js/hooks/useFeature.js | /**
* Feature Flags hook.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* ... | /**
* Feature Flags hook.
*
* Site Kit by Google, Copyright 2020 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* ... | Update guard to ensure enabledFeatures isArray. | Update guard to ensure enabledFeatures isArray.
| JavaScript | apache-2.0 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp |
d45a6bea2c63f927e82b8cf1fdba81b096bb94b1 | gulp/deploy.js | gulp/deploy.js | 'use strict';
const { exec } = require('child_process');
const gutil = require('gulp-util');
module.exports = (gulp) => {
/**
* Sync the site (_site/) with the S3 bucket
*/
gulp.task('deploy:site', () => {
const command = 'aws s3 sync _site/ s3://www.westeleventh.media/';
exec(command, (error, stdo... | 'use strict';
const { exec } = require('child_process');
const gutil = require('gulp-util');
module.exports = (gulp) => {
/**
* Sync the site (_site/) with the S3 bucket
*/
gulp.task('deploy:site', (cb) => {
const command = 'aws s3 sync _site/ s3://www.westeleventh.media/';
return exec(command, (er... | Make exec play nicely with gulp | Make exec play nicely with gulp
| JavaScript | mit | joeyquarters/westeleventh.media,joeyquarters/westeleventh.media,joeyquarters/westeleventh.media |
26dc10cdba74e92e0f6d56e7669181d9f86e2ae2 | updates/0.0.1-admins.js | updates/0.0.1-admins.js | /**
* This script automatically creates a default Admin user when an
* empty database is used for the first time. You can use this
* technique to insert data into any List you have defined.
*/
exports.create = {
User: [
{ 'name.first': 'Admin', 'name.last': 'User', email: 'admin@javascript.org.nz', password: 'a... | /**
* This script automatically creates a default Admin user when an
* empty database is used for the first time. You can use this
* technique to insert data into any List you have defined.
*/
exports.create = {
User: [
{ 'name': 'Admin User', email: 'admin@javascript.org.nz', password: 'admin', isAdmin: true, ... | Update default dev user data | Update default dev user data
| JavaScript | mit | JavaScript-NZ/javascript.org.nz,JavaScript-NZ/javascript.org.nz |
fe2540d08c5f34ff09ea0cc090a4280993b30eef | src/withState.js | src/withState.js | import React from 'react';
import curry from 'lodash/function/curry';
import isFunction from 'lodash/lang/isFunction';
import wrapDisplayName from './wrapDisplayName';
export const withState = (
stateName,
stateUpdaterName,
initialState,
BaseComponent
) => (
class extends React.Component {
static display... | import React from 'react';
import curry from 'lodash/function/curry';
import isFunction from 'lodash/lang/isFunction';
import wrapDisplayName from './wrapDisplayName';
export const withState = (
stateName,
stateUpdaterName,
initialState,
BaseComponent
) => (
class extends React.Component {
static display... | Add callback to updateStateValue function | Add callback to updateStateValue function
| JavaScript | mit | acdlite/recompose,acdlite/recompose |
3dcb7b1b643abd4a9846aa477836b68278e9e256 | src/main/index.js | src/main/index.js | import React from 'react'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import store from './lib/redux/store'
import { hashHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import installExtension, { REACT_DEVELOPER_TOOLS } from 'electron-devtools... | import React from 'react'
import ReactDOM from 'react-dom'
import { AppContainer } from 'react-hot-loader'
import store from './lib/redux/store'
import { hashHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import installExtension, { REACT_DEVELOPER_TOOLS } from 'electron-devtools... | Add router logger for developing | Add router logger for developing
| JavaScript | mit | Sarah-Seo/Inpad,Sarah-Seo/Inpad |
626f87d2f95a68e595f6ffd67ffc456c5f8922d4 | src/model_view.js | src/model_view.js | Minionette.ModelView = Minionette.View.extend({
// Listen to the default events
modelEvents: {
'change': 'render',
'destroy': 'remove'
},
// The data that is sent into the template function.
// Override this to provide custom data.
serializeData: function() {
return thi... | Minionette.ModelView = Minionette.View.extend({
// Listen to the default events
modelEvents: {
'change': 'render',
'destroy': 'remove'
},
// The data that is sent into the template function.
// Override this to provide custom data.
serializeData: function() {
},
// A u... | Return a cloned model.attributes by default | Return a cloned model.attributes by default
| JavaScript | mit | jridgewell/minionette,thejameskyle/minionette |
b57ff9a2de816e3797a367d0fcbf9b75babcd6af | roller/test/slackbot-test.js | roller/test/slackbot-test.js | var slackBot = require('../slackbot/handler').slackBot;
var chai = require('chai');
var expect = chai.expect;
chai.use(require('dirty-chai'));
describe('slackbot', function () {
var received;
var receivedArgs;
var callback = function (error, success) {
received = true;
receivedArgs = [error, success];
... | var slackBot = require('../slackbot/handler').slackBot;
var chai = require('chai');
var expect = chai.expect;
chai.use(require('dirty-chai'));
describe('root command', function () {
var received;
var receivedArgs;
var callback = function (error, success) {
received = true;
receivedArgs = [error, success... | Add tests for roller root command | Add tests for roller root command | JavaScript | mit | dmikrot/slack-dnd-5e |
ae43cafa539d243c54744a40640479c9e4bd02e5 | Gruntfile.js | Gruntfile.js | 'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
allFiles: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js', 'index.js'],
options: {
jshintrc: '.jshintrc',
}
},
... | 'use strict';
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
allFiles: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js', 'index.js'],
options: {
jshintrc: '.jshintrc',
}
},
... | Update grunt file to generate coverage reports | Update grunt file to generate coverage reports
| JavaScript | apache-2.0 | xmpp-ftw/xmpp-ftw-wtf |
33bcdcb9b5b07361d97896b52c6d3ccfe7628b99 | Gruntfile.js | Gruntfile.js | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
js: {
files: ['Gruntfile.js', 'src/*.js'],
tasks: ['uglify'],
spawn: true
}
},
... | module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
js: {
files: ['Gruntfile.js', 'src/*.js'],
tasks: ['uglify'],
spawn: true
}
},
... | Add a build for a concat without minifying. | Add a build for a concat without minifying.
| JavaScript | mit | recallfx/monsterid.php,KevinGaudin/monsterid.js,recallfx/monsterid.php |
b8cbd673b81360214c3bb4d597b83639aca0027f | lib/hacks/animation.js | lib/hacks/animation.js | const Declaration = require('../declaration');
class Animation extends Declaration {
static names = ['animation', 'animation-direction'];
/**
* Don’t add prefixes for modern values.
*/
check(decl) {
return !decl.value.split(/\s+/).find(i => {
const lower = i.toLowerCase();
... | const Declaration = require('../declaration');
class Animation extends Declaration {
static names = ['animation', 'animation-direction'];
/**
* Don’t add prefixes for modern values.
*/
check(decl) {
let found = false;
decl.value.split(/\s+/).forEach(i => {
const lowe... | Fix old JS runtimes support | Fix old JS runtimes support
| JavaScript | mit | yisibl/autoprefixer,postcss/autoprefixer |
fda90c6c5521b1b71518f4d4d9b646a87ff671c2 | waartaa/server/perms.js | waartaa/server/perms.js | UserChannelLogs.allow({
insert: function (userId, log) {
log.status = 'sent';
log.created = new Date();
log.last_updated = new Date();
var user = Meteor.users.findOne({_id: userId});
return _send_channel_message(
user, log.channel_id, log.message, {log: false});
}
}); | UserChannelLogs.allow({
insert: function (userId, log) {
log.status = 'sent';
var user = Meteor.users.findOne({_id: userId});
Meteor.setTimeout(function () {
_send_channel_message(
user, log.channel_id, log.message, {log: false});
}, 5);
if (log.message[0] == '/')
return fa... | Mark channel message as sent once received by app server. | Mark channel message as sent once received by app server.
| JavaScript | mit | waartaa/waartaa,waartaa/waartaa,waartaa/waartaa |
b6f5e2dd57b2295a6a54663e8de1f84cf5b1a62b | server/lib/meteor-request.js | server/lib/meteor-request.js | // Get our NPM stuff.
request = Npm.require("request");
// Wrap request with something that can be `Meteor.wrapAsync`ed.
var requestAsync = function(uri, options, callback) {
request(uri, options, function(error, response, body) {
if (error) {
console.log(error);
callback(error);
} else {
callback(null, ... | // Get our NPM stuff.
var Future = Npm.require("fibers/future");
request = Npm.require("request");
// This is our main wrapping function, using Fibers.
var requestSync = function(uri, options) {
var future = new Future();
request(uri, options, function(error, response, body) {
if (error) {
console.log(error);
... | Revert "Use Meteor.wrapAsync instead of Fibers." | Revert "Use Meteor.wrapAsync instead of Fibers."
This reverts commit b7e5328913c05a016ec760dc47431c7320af514a.
| JavaScript | mit | froatsnook/meteor-request |
a701c82d895049e2a2ceca6d473c61d937450094 | node_package/src/media/sagas/index.js | node_package/src/media/sagas/index.js | import togglePlaying from './togglePlaying';
import muteBackgroundMediaOnPlayFailed from './muteBackgroundMediaOnPlayFailed';
import handlePageDidActivate from './handlePageDidActivate';
import disableScrollIndicatorDuringPlayback from './disableScrollIndicatorDuringPlayback';
import hasNotBeenPlayingForAMoment from '.... | import togglePlaying from './togglePlaying';
import muteBackgroundMediaOnPlayFailed from './muteBackgroundMediaOnPlayFailed';
import handlePageDidActivate from './handlePageDidActivate';
import disableScrollIndicatorDuringPlayback from './disableScrollIndicatorDuringPlayback';
import hasNotBeenPlayingForAMoment from '.... | Hide scroll indicator during video also on iOS | Hide scroll indicator during video also on iOS
Otherwise, when using slim player controls, it is not displayed again
on pause or when the video ends.
| JavaScript | mit | codevise/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow,tf/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow |
de97bfc02d3686c689cac20f02a3284c5c4c9b2d | lib/context.js | lib/context.js | var _ = require('underscore');
function Context(fields) {
this.fields = _.clone(fields);
}
/**
* @param {Object} fields
* @returns {Context}
*/
Context.prototype.extend = function(fields) {
this.fields = _.extend(this.fields, fields);
return this;
};
/**
* @param {Context} context
* @returns {Context}
*/... | var _ = require('underscore');
function Context(fields) {
this.fields = _.clone(fields);
}
/**
* @param {Object} fields
* @returns {Context}
*/
Context.prototype.extend = function(fields) {
this.fields = _.extend(this.fields, fields);
return this;
};
/**
* @param {Context} context
* @returns {Context}
*/... | Simplify Context.merge - reuse Context.etend | Simplify Context.merge - reuse Context.etend
| JavaScript | mit | vogdb/cm-janus,cargomedia/cm-janus,vogdb/cm-janus,cargomedia/cm-janus |
a9b657e8f3a7b2c484b42a5c8af7866335a21bd1 | static/js/nova.js | static/js/nova.js | // NOVA JavaScript
// Author: shadowfacts
$(document).ready(function() {
$(".nova-use-id").each(function (i) {
$(this).text(i + 1);
})
$('.nova-slider').slick({
centerMode: true,
centerPadding: '60px',
slidesToShow: 3,
autoplay: true,
autplaySpeed: 8000,
appendArrows: '.nova-slider-controls',
prevAr... | // NOVA JavaScript
// Author: shadowfacts
$(document).ready(function() {
$(".nova-use-id").each(function (i) {
$(this).text(i + 1);
})
$('.nova-slider').slick({
centerMode: true,
centerPadding: '60px',
slidesToShow: 3,
autoplay: true,
autplaySpeed: 8000,
appendArrows: '.nova-slider-controls',
prevAr... | Fix responsive shit for the carousel | Fix responsive shit for the carousel
| JavaScript | apache-2.0 | NOVA-Team/nova-team.github.io,NOVA-Team/nova-team.github.io |
eb4fc669139a016dd6cbcfb8c2cf1a9067ab4486 | website/static/table.js | website/static/table.js | var MutationTable = function ()
{
var element
function detailFormatter(index, row, element)
{
var impact = row[4]
var affected_sites_count = row[5]
html = 'Impact: ' + impact + '<br>'
html += '# of affected sites: ' + affected_sites_count + '<br>'
if(affected_sites_c... | var MutationTable = function ()
{
var element
function detailFormatter(index, row, element)
{
var impact = row[4]
var affected_sites_count = row[5]
html = 'Impact: ' + impact + '<br>'
html += '# of affected sites: ' + affected_sites_count + '<br>'
if(affected_sites_c... | Expand selected mutation's row on load | Expand selected mutation's row on load
| JavaScript | lgpl-2.1 | reimandlab/ActiveDriverDB,reimandlab/ActiveDriverDB,reimandlab/ActiveDriverDB,reimandlab/Visualistion-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualis... |
6cafa8e26cd538408081a6fd1f139a9006481311 | app/js/main.js | app/js/main.js | (function (window) {
'use strict';
var $ = window.jQuery;
var Modernizr = window.Modernizr;
var moment = window.moment;
function renderMoment() {
$('.moment').text(moment().format('YYYY-MM-DD HH:mm:ss'));
setTimeout(renderMoment, 1000);
}
renderMoment();
if (Moderniz... | (function (window) {
'use strict';
var $ = window.jQuery;
var Modernizr = window.Modernizr;
var moment = window.moment;
function renderMoment() {
$('.moment').text(moment().format('YYYY-MM-DD HH:mm:ss'));
setTimeout(renderMoment, 1000);
}
renderMoment();
if (Modernizr.localstorage) {
$(... | Fix indentation of JS file | Fix indentation of JS file
| JavaScript | mit | rakuten-frontend/rff-fixtures,rakuten-frontend/rff-fixtures |
46ce26a016eb897b9671ab31403ad90b047732b6 | packages/zeitline-react/tests/index-test.js | packages/zeitline-react/tests/index-test.js | import expect from 'expect'
import React from 'react'
import {render, unmountComponentAtNode} from 'react-dom'
import Zeitline from 'src/'
describe('Zeitline', () => {
let node
beforeEach(() => {
node = document.createElement('div')
})
afterEach(() => {
unmountComponentAtNode(node)
})
it('have ... | import expect from 'expect'
import React from 'react'
import {render, unmountComponentAtNode} from 'react-dom'
import Zeitline from 'src/'
describe('Zeitline', () => {
let node
beforeEach(() => {
node = document.createElement('div')
})
afterEach(() => {
unmountComponentAtNode(node)
})
it('have ... | Test unmount and data events | add: Test unmount and data events
| JavaScript | mit | octree-gva/Zeitline,octree-gva/Zeitline |
af97023682ff489cfa207d25bc60657faa22a262 | app/services/current-user.js | app/services/current-user.js | import Service, { inject as service } from '@ember/service';
import { isEmpty } from '@ember/utils';
import RSVP from 'rsvp';
export default Service.extend({
session: service('session'),
store: service(),
load() {
let userId = this.get('session.data.authenticated.profile.barberscore_id');
if (!isEmpty... | import Service, { inject as service } from '@ember/service';
import { isEmpty } from '@ember/utils';
import RSVP from 'rsvp';
export default Service.extend({
session: service('session'),
store: service(),
load() {
let accountId = this.get('session.data.authenticated.profile.sub');
if (!isEmpty(accountId... | Update Current user dialog to access sub | Update Current user dialog to access sub
| JavaScript | bsd-2-clause | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web |
4731374f61ca147a244bce786aab9208a7f626fa | js/views/home/index.js | js/views/home/index.js | import React, {
Component,
PropTypes,
} from 'react';
import {
Button,
View,
Text,
} from 'react-native';
import { add1Action } from './actions';
import styles from './styles';
import Random from './components/Random';
class Home extends Component {
static contextTypes = {
store: PropTypes.object,
}... | import React, {
Component,
PropTypes,
} from 'react';
import {
TouchableHighlight,
View,
Text,
} from 'react-native';
import { add1Action } from './actions';
import styles from './styles';
import Random from './components/Random';
class Home extends Component {
static contextTypes = {
store: PropTypes... | Switch to more visible touchablehighlight | Switch to more visible touchablehighlight
| JavaScript | mit | c-h-/universal-native-boilerplate,c-h-/universal-native-boilerplate,c-h-/universal-native-boilerplate,c-h-/universal-native-boilerplate,c-h-/universal-native-boilerplate |
05c62e5cae2ab872cf0a2769e3f00a40468cbde4 | app/controllers.js | app/controllers.js | /* eslint babel/semi: "error" */
export AttachmentsController from './controllers/api/v1/AttachmentsController';
export BookmarkletController from './controllers/api/v1/BookmarkletController';
export CommentsController from './controllers/api/v1/CommentsController';
export FeedFactoriesController from './controllers/ap... | /* eslint babel/semi: "error" */
export AttachmentsController from './controllers/api/v1/AttachmentsController';
export CommentsController from './controllers/api/v1/CommentsController';
export FeedFactoriesController from './controllers/api/v1/FeedFactoriesController';
export GroupsController from './controllers/api/v... | Remove unused export of BookmarkletController | Remove unused export of BookmarkletController
| JavaScript | mit | FreeFeed/freefeed-server,FreeFeed/freefeed-server |
c6c1e93443ff69e2f7392df61c0ba3f7a10f6bd1 | src/components/video_list.js | src/components/video_list.js | import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return <VideoListItem video = { video }/>
});
return (
<ul className="col-md-4 list-group">
{ videoItems }
</ul>
... | import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = (props) => {
// use .map instead of iterating through an array --> helper functions ES6
const videoItems = props.videos.map((video) => {
return <VideoListItem video = { video }/>
});
return (
<... | Use map fnct v any helper fncts instead of any loops | Use map fnct v any helper fncts instead of any loops
| JavaScript | mit | fzoozai/redux-stephenGrider,fzoozai/redux-stephenGrider |
60fddf837dce87d521807a57bb65bde2b155d5bd | src/core/operations/Image.js | src/core/operations/Image.js | import * as ExifParser from "exif-parser";
import Utils from "../Utils.js";
/**
* Image operations.
*
* @author tlwr [toby@toby.codes]
* @copyright Crown Copyright 2017
* @license Apache-2.0
*
* @namespace
*/
const Image = {
runEXIF(input, args) {
try {
let bytes = Uint8Array.from(inpu... | import * as ExifParser from "exif-parser";
import Utils from "../Utils.js";
/**
* Image operations.
*
* @author tlwr [toby@toby.codes]
* @copyright Crown Copyright 2017
* @license Apache-2.0
*
* @namespace
*/
const Image = {
runEXIF(input, args) {
try {
const bytes = Uint8Array.from(in... | Change let to const in "Extract EXIF" | Change let to const in "Extract EXIF"
| JavaScript | apache-2.0 | artemisbot/CyberChef,gchq/CyberChef,gchq/CyberChef,artemisbot/CyberChef |
e6d1f765be51ae774e215ab1a7fa21686b059fb7 | src/loaders/documentation.js | src/loaders/documentation.js | const fs = require("fs")
const glob = require("glob")
const path = require("path")
const reactDocs = require("react-docgen")
const {toCode} = require("./utils")
module.exports = function () {
const callback = this.async()
const resource = this.request.split("!").pop()
const directory = path.dirname(resource)
... | const fs = require("fs")
const glob = require("glob")
const path = require("path")
const reactDocs = require("react-docgen")
const {toCode} = require("./utils")
module.exports = function () {
const callback = this.async()
const resource = this.request.split("!").pop()
const directory = path.dirname(resource)
... | Use `map` instead of `reduce` | Use `map` instead of `reduce`
| JavaScript | mit | mavenlink/mavenlink-ui-concept |
40a6f113dab6c3ce63acd776b6c891a1678342ac | lib/accounts-config.js | lib/accounts-config.js | orion.users.configure({
// Allow users to create accounts, but don't give them any admin permissions
forbidClientAccountCreation: false,
defaultPermissions: ['files.upload', 'entity.dreams.personal', 'entity.recipes.personal', 'entity.activities.personal'],
// Set home route path to root (user is redirected he... | orion.users.configure({
// Allow users to create accounts, but don't give them any admin permissions
forbidClientAccountCreation: false,
defaultPermissions: ['files.upload', 'entity.dreams.personal', 'entity.recipes.personal', 'entity.activities.personal'],
// Set home route path to root (user is redirected he... | Fix routing conflict between sign-in and slug-based content pages | Fix routing conflict between sign-in and slug-based content pages
| JavaScript | apache-2.0 | GeoMakers/geomakers.org,GeoMakers/geomakers.org |
50e001ef637998e6a2440cf537f24c77b38a7092 | src/build/buildFieldConfigMap.js | src/build/buildFieldConfigMap.js | import { getDescription } from 'graphql/utilities/buildASTSchema';
import produceType from './produceType';
export const buildFieldConfigArgumentMap = (fieldAST, types) =>
fieldAST.arguments.reduce((map, inputValueAST) => {
const type = produceType(inputValueAST.type, types);
const defaultValue = inputValueA... | import { getDescription } from 'graphql/utilities/buildASTSchema';
import { getNamedType } from 'graphql/type';
import produceType from './produceType';
export const buildFieldConfigArgumentMap = (fieldAST, types) =>
fieldAST.arguments.reduce((map, inputValueAST) => {
const type = produceType(inputValueAST.type,... | Fix enum literal value parsing | Fix enum literal value parsing
| JavaScript | mit | bloveit/graphql-utilities |
7b6d7c9aafb4f682ab4df39a04a6be785c951f93 | src/components/search_bar.js | src/components/search_bar.js | import React, { Component } from 'react'
//class-based component (ES6)
class SearchBar extends Component {
render() { //method definition in ES6
return <input onChange={this.onInputChange} />;
}
onInputChange(event) {
console.log(event.target.value);
}
}
export default SearchBar; | import React, { Component } from 'react'
//class-based component (ES6)
class SearchBar extends Component {
render() { //method definition in ES6
return <input onChange={event => console.log(event.target.value)} />;
}
}
export default SearchBar; | Refactor to ES6 arrow functions to make things a bit more concise | Refactor to ES6 arrow functions to make things a bit more concise
| JavaScript | mit | phirefly/react-redux-starter,phirefly/react-redux-starter |
1d866ff20c30d1e20f310b480ae6e381306cd5aa | bin/pwned.js | bin/pwned.js | #!/usr/bin/env node
const program = require('commander');
const pkg = require('../package.json');
// eslint-disable-next-line import/no-unresolved
const addCommands = require('../lib/commands');
// Begin command-line argument configuration
program
.usage('[option | command]')
.description('Each command has its own... | #!/usr/bin/env node
require('source-map-support/register');
const program = require('commander');
const pkg = require('../package.json');
// eslint-disable-next-line import/no-unresolved
const addCommands = require('../lib/commands');
// Begin command-line argument configuration
program
.usage('[option | command]')
... | Enable source-map-support in entry point | Enable source-map-support in entry point
This appears to have been removed erroneously. Although we are not
transpiling the entry point, we are still transpiling the rest of the
source and enabling source maps could add value in debugging any
potential errors that are thrown from further down in the code base.
This r... | JavaScript | mit | wKovacs64/pwned,wKovacs64/pwned |
ad8a4ebec3df1a0ef066f34a56ec995e6c473095 | src/middleware/layout-testing.js | src/middleware/layout-testing.js | const { isEmpty } = require('lodash')
const logger = require('../config/logger')
module.exports = (queryParam) => (req, res, next) => {
const { features } = res.locals
res.locals.isLayoutTesting = false
const layoutTestingFeature = Object.keys(features).filter((feature) =>
feature.includes('layoutTesting')
... | const { isEmpty } = require('lodash')
const logger = require('../config/logger')
module.exports = (queryParam) => (req, res, next) => {
const { features } = res.locals
res.locals.isLayoutTesting = false
const layoutTestingFeature = Object.keys(features).filter((feature) =>
feature.includes('layoutTesting')
... | Replace missing callback from condition | Replace missing callback from condition
| JavaScript | mit | uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 |
ce154bbbbfd352a17619d55c115c33bfcc6af71d | public/dist/v7/js/general.js | public/dist/v7/js/general.js | require.config({baseUrl:"js/modules",paths:{l:"../libs",c:"../common"}}),YYMG.modules.push("base"),require(YYMG.modules,function(){for(var arg=arguments,argLen=arg.length,i=0;argLen>i;i++){var module=arg[i];module&&module.init&&"function"==typeof module.init&&module.init()}}); | require.config({baseUrl:YYMG.staticUrl+"/js/modules",paths:{l:"../libs",c:"../common"}}),YYMG.modules.push("base"),require(YYMG.modules,function(){for(var arg=arguments,argLen=arg.length,i=0;argLen>i;i++){var module=arg[i];module&&module.init&&"function"==typeof module.init&&module.init()}}); | Modify files in v7 static package. | Modify files in v7 static package.
| JavaScript | mit | EchoFUN/melodycoder,EchoFUN/melodycoder |
b7bee715fc795dca470a10409b4fb83515febc70 | src/endpoints/users/show.js | src/endpoints/users/show.js | 'use strict';
/**
* Module dependencies
*/
import * as mongo from 'mongodb';
import User from '../../models/user';
import serialize from '../../serializers/user';
/**
* Show a user
*
* @param {Object} params
* @param {Object} reply
* @param {Object} me
* @return {void}
*/
module.exports = async (params, repl... | 'use strict';
/**
* Module dependencies
*/
import * as mongo from 'mongodb';
import User from '../../models/user';
import serialize from '../../serializers/user';
/**
* Show a user
*
* @param {Object} params
* @param {Object} reply
* @param {Object} me
* @return {void}
*/
module.exports = async (params, repl... | Rename user_id to id parameter | Rename user_id to id parameter
| JavaScript | mit | syuilo/misskey-core,syuilo/misskey-core,syuilo/misskey-core,syuilo/misskey-core |
fbc66cdc64073eb58809db066c7063a1682131d4 | TC/control/DataLoader.js | TC/control/DataLoader.js | TC.control = TC.control || {};
if (!TC.control.TabContainer) {
TC.syncLoadJS(TC.apiLocation + 'TC/control/TabContainer');
}
TC.control.DataLoader = function () {
const self = this;
TC.control.TabContainer.apply(self, arguments);
self.controlOptions = [
{
name: 'externalWMS',
... | TC.control = TC.control || {};
if (!TC.control.TabContainer) {
TC.syncLoadJS(TC.apiLocation + 'TC/control/TabContainer');
}
TC.control.DataLoader = function () {
const self = this;
TC.control.TabContainer.apply(self, arguments);
self.controlOptions = [
{
name: 'externalWMS',
... | Add control specific CSS class | Add control specific CSS class
| JavaScript | bsd-2-clause | sitna/api-sitna,sitna/api-sitna |
7459403c5ad81bb4a22e2a501e2aa7f4b3420e2d | app/client/lib/forms.js | app/client/lib/forms.js | AutoForm.hooks({
'guestbook--add_entry_form': {
onSuccess: function (formType, result) {
$.notify({
message: 'Thank you ! Your entry will be shown after the admin validated it.',
icon: 'glyphicon glyphicon-warning-sign'
},{
type: 'success'
});
Router.go('Guestbook');
... | AutoForm.hooks({
'guestbook--add_entry_form': {
onSuccess: function (formType, result) {
$.notify({
message: 'Thank you ! Your entry will be shown after the admin validated it.',
icon: 'glyphicons glyphicons-ok'
},{
type: 'success'
});
Router.go('Guestbook');
},
... | Fix glyphicon to 'OK' and success. | Fix glyphicon to 'OK' and success.
| JavaScript | mit | Ilshidur/lol-item-sets-generator.org,Ilshidur/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org,Ilshidur/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org |
f49b4773b5a5556de866411ad3d45974f78ab6e1 | webpack.config.js | webpack.config.js | const path = require("path");
const webpack = require("webpack");
module.exports = {
resolve: {
extensions: [".js"]
},
module: {
rules: [
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
... | const path = require("path");
const webpack = require("webpack");
module.exports = {
devtool: "source-map",
resolve: {
extensions: [".js"]
},
module: {
rules: [
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.js$/,
exclude: /(node_mo... | Add source maps in dev | Add source maps in dev
| JavaScript | mit | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js |
7affa3ad336a3425483cc0ec2fd72c00568a9cc7 | webpack.config.js | webpack.config.js | const path = require('path');
const webpack = require('webpack');
const BabiliPlugin = require('babili-webpack-plugin');
const isProd = process.env.NODE_ENV === 'PRODUCTION';
const outputFilename = isProd ? 'react-layout-transition.min.js' : 'react-layout-transition.js';
module.exports = {
devtool: !isProd ? 'so... | const path = require('path');
const webpack = require('webpack');
const MinifyPlugin = require("babel-minify-webpack-plugin");
const isProd = process.env.NODE_ENV === 'PRODUCTION';
const outputFilename = isProd ? 'react-layout-transition.min.js' : 'react-layout-transition.js';
module.exports = {
devtool: !isProd... | Change to minify-plugin from babili | Change to minify-plugin from babili
| JavaScript | mit | bkazi/react-layout-transition,bkazi/react-layout-transition,bkazi/react-layout-transition |
9d8617cb085559298e51f773814e627f6934060f | src/molecules/formfields/DateField/index.js | src/molecules/formfields/DateField/index.js | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import styles from 'molecules/formfields/shared/formfields.module.scss';
function DateField(props) {
const {
className,
children,
label,
focused
} = props;
const baseClassName = classnames(
s... | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import styles from 'molecules/formfields/shared/formfields.module.scss';
function DateField(props) {
const {
className,
children,
label,
focused,
error
} = props;
const baseClassName = classn... | Add error state to DateFieldw | Add error state to DateFieldw
| JavaScript | mit | policygenius/athenaeum,policygenius/athenaeum,policygenius/athenaeum |
c91057ca529b5fe30af6dc8e79460ec41b945ccc | examples/js/controllers.js | examples/js/controllers.js | 'use strict';
angular.module('myApp.controllers', []).
controller('ExBasicCtrl', [function() {
// You were expecting maybe The Adams Family?
}])
// That's all folks
;
| 'use strict';
angular.module('myApp.controllers', [])
// That's all folks
;
| Remove extra junk from examples | docs: Remove extra junk from examples
| JavaScript | mit | kzganesan/angular-snap.js,jtrussell/angular-snap.js,jtrussell/angular-snap.js,Malkiat-Singh/angular-snap.js,kzganesan/angular-snap.js,Malkiat-Singh/angular-snap.js |
0aa35f564ad77ec5660f8a040c9e85eabb9ecfbd | app/soc/content/js/templates/modules/gsoc/_survey.js | app/soc/content/js/templates/modules/gsoc/_survey.js | /* Copyright 2011 the Melange authors.
*
* 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 required by applicable law or agreed... | /* Copyright 2011 the Melange authors.
*
* 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 required by applicable law or agreed... | Make the skeleton survey script use the new melange.template namespace. | Make the skeleton survey script use the new melange.template namespace.
| JavaScript | apache-2.0 | rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son |
c69f59b538e520189cfd22195458080c38ac7460 | evaluator/app.js | evaluator/app.js | /**
* Bootstraps and starts the http server
*/
'use strict';
/**
* Module dependencies
* @private
*/
var connect = require('connect');
var http = require('http');
var morgan = require('morgan');
var qs = require('qs');
var parse = require('./parse');
var calculate = require('./calculate');
/**
* Configure c... | /**
* Bootstraps and starts the http server
*/
'use strict';
/**
* Module dependencies
* @private
*/
var connect = require('connect');
var http = require('http');
var morgan = require('morgan');
var qs = require('qs');
var parse = require('./parse');
var calculate = require('./calculate');
/**
* Configure c... | Fix line too long error | Fix line too long error
| JavaScript | mit | tolgaek/procon-calculator |
ca72fa6a7d82b4ea5b87a6fc3f44f4d7724cb0b1 | templates/_includes/user-rank.js | templates/_includes/user-rank.js | <script>
const getUserRankAndScore = function() {
const currentUserName = '{{ current_user.name }}' || null;
let def = $.Deferred();
$.ajax({
url: '/leaderboard/',
dataType: 'json',
contentType: 'application/json',
data: '{}'
}).done(function(data) {
for (let user... | <script>
const getUserRankAndScore = function() {
const currentUserName = '{{ current_user.name }}' || null;
let def = $.Deferred();
$.ajax({
url: '/leaderboard/',
dataType: 'json',
contentType: 'application/json',
data: '{}'
}).done(function(data) {
for (let user... | Update user rank and score function | Update user rank and score function
| JavaScript | bsd-3-clause | LibCrowds/libcrowds-bs4-pybossa-theme,LibCrowds/libcrowds-bs4-pybossa-theme |
4cbf9692784ece46e56964eb8f9f9df239ff2661 | bin/lib/cli.js | bin/lib/cli.js | const program = require('commander')
const loadInit = require('./init')
const loadStart = require('./start')
const { spawnSync } = require('child_process')
module.exports = function startCli (server) {
program.version(getVersion())
loadInit(program)
loadStart(program, server)
program.parse(process.argv)
if... | const program = require('commander')
const loadInit = require('./init')
const loadStart = require('./start')
const { spawnSync } = require('child_process')
const path = require('path')
module.exports = function startCli (server) {
program.version(getVersion())
loadInit(program)
loadStart(program, server)
pro... | Fix require of package.json for global installs | Fix require of package.json for global installs
| JavaScript | mit | linkeddata/ldnode,dmitrizagidulin/solid-server-unstable,linkeddata/ldnode,dmitrizagidulin/solid-server-unstable,dmitrizagidulin/solid-server-unstable |
763d251736879cfd25b4a3caacbb8316518b7908 | test/safe/run-built-in-script.js | test/safe/run-built-in-script.js | var scripty = require('../../index')
var fs = require('fs')
var intercept = require('intercept-stdout')
var assert = require('assert')
var _ = require('lodash')
var stdout, stopIntercept
module.exports = {
beforeEach: function () {
stdout = ''
stopIntercept = intercept(function (text) {
stdout += text
... | var scripty = require('../../index')
var fs = require('fs')
var intercept = require('intercept-stdout')
var assert = require('assert')
var _ = require('lodash')
var stdout, stderr, stopIntercept
module.exports = {
beforeEach: function () {
stdout = ''
stderr = ''
stopIntercept = intercept(function (text)... | Add a second integration test for the error case. | Add a second integration test for the error case. | JavaScript | mit | testdouble/scripty,testdouble/scripty |
3be46e81bf7b53280d6785a68a117d4eb776082e | core/socket.js | core/socket.js | /*
Created by 'myth' on July 3. 2015
CognacTime is licenced under the MIT licence.
*/
var log = require('./logging')
var util = require('../client/util')
// Start by defining the container object
function iowrapper (io) {
this.connections = []
this.io = io
io.on('connection', function (socket) {
log.... | /*
Created by 'myth' on July 3. 2015
CognacTime is licenced under the MIT licence.
*/
var log = require('./logging')
var util = require('../client/util')
// Start by defining the container object
function iowrapper (io) {
this.connections = []
this.io = io
io.on('connection', function (socket) {
log.... | Add userstats emit to disconnect | Add userstats emit to disconnect
| JavaScript | mit | myth/cognactime,myth/cognactime |
49bb5b7ccc65bf3e0c6db0bd10ec31fe65cb76e8 | VotingApplication/VotingApplication.Web/Scripts/Directives/TruncatedText.js | VotingApplication/VotingApplication.Web/Scripts/Directives/TruncatedText.js | (function () {
angular
.module('GVA.Common')
.directive('truncatedText', truncatedText);
truncatedText.$inject = ['$parse'];
function truncatedText($parse) {
function truncateText(text, limit) {
var words = text.split(' ');
var truncatedtext = words.redu... | (function () {
angular
.module('GVA.Common')
.directive('truncatedText', truncatedText);
truncatedText.$inject = ['$parse'];
function truncatedText($parse) {
function truncateText(text, limit) {
var words = text.split(' ');
var truncatedtext = words.redu... | Fix for text truncation where null or undefined descriptions are used. | Fix for text truncation where null or undefined descriptions are used.
| JavaScript | apache-2.0 | stevenhillcox/voting-application,Generic-Voting-Application/voting-application,JDawes-ScottLogic/voting-application,Generic-Voting-Application/voting-application,JDawes-ScottLogic/voting-application,stevenhillcox/voting-application,JDawes-ScottLogic/voting-application,stevenhillcox/voting-application,tpkelly/voting-app... |
6c6c50f9dd4642a362f105f0de96539033a2263f | modules/core/routing/services/prevent-trailing-slash-route-handler.js | modules/core/routing/services/prevent-trailing-slash-route-handler.js | // DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details.
'use strict';
/**
* @description
* This handler registers itself as an Express middleware that
* redirects all requests with a trailing slash.
* This ensures that content items have a single URL.
*/
var PreventTrailingSlashRo... | // DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details.
'use strict';
/**
* @description
* This handler registers itself as an Express middleware that
* redirects all requests with a trailing slash.
* This ensures that content items have a single URL.
*/
var PreventTrailingSlashRo... | Stop processing after trailing slash handler has redirected. | Stop processing after trailing slash handler has redirected.
| JavaScript | mit | DecentCMS/DecentCMS |
c32a5b0c5839d9650b77d197b1acae6cca03a18b | src/selectors/prescriber.js | src/selectors/prescriber.js | /**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
export const selectCurrentPrescriber = ({ prescriber }) => {
const { currentPrescriber } = prescriber;
return currentPrescriber;
};
export const selectPrescriberName = ({ prescriber }) => {
const currentPrescriber = selectCurrentPrescriber({ pres... | import { UIDatabase } from '../database';
/**
* mSupply Mobile
* Sustainable Solutions (NZ) Ltd. 2019
*/
export const selectCurrentPrescriber = ({ prescriber }) => {
const { currentPrescriber } = prescriber;
return currentPrescriber;
};
export const selectPrescriberName = ({ prescriber }) => {
const current... | Add Prescriber selector for fetching data | Add Prescriber selector for fetching data
| JavaScript | mit | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile |
355210dfab8171f99a9feeb8a6093b59c858a935 | app/assets/javascripts/formsubmit.js | app/assets/javascripts/formsubmit.js | $(function () {
$("#guess").click(function () {
getCurrent(function (pos) {
$.ajax({
type: 'GET',
url: '/bathrooms/nearby',
data: {search: 'true', lat: pos.coords.latitude, long: pos.coords.longitude},
success: function(data, textStatus) {
$('#nearby').html(data);
... | $(function () {
$("#guess").click(function () {
getCurrent(function (pos) {
$.ajax({
type: 'GET',
url: '/bathrooms/nearby',
data: {search: 'true', lat: pos.coords.latitude, long: pos.coords.longitude},
success: function(data, textStatus) {
$('#nearby').html(data);
... | Remove logging statement of geocoding results | Remove logging statement of geocoding results
| JavaScript | agpl-3.0 | RefugeRestrooms/refugerestrooms,valeriecodes/refugerestrooms,azelma/refugerestrooms,valeriecodes/refugerestrooms,mathonsunday/welcomehome,valeriecodes/refugerestrooms,azelma/refugerestrooms,cllns/refugerestrooms,valeriecodes/refugerestrooms,RefugeRestrooms/refugerestrooms,RefugeRestrooms/refugerestrooms,azelma/refugere... |
e4b52342b5e493b86ebb41275f3ef697c9ad1005 | alien4cloud-ui/src/main/build/config/copy.js | alien4cloud-ui/src/main/build/config/copy.js | // Copies files not processed by requirejs optimization from source to dist so other tasks can process them
module.exports = {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: [
'*.{ico,png,txt}',
'.htaccess',
... | // Copies files not processed by requirejs optimization from source to dist so other tasks can process them
module.exports = {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: [
'*.{ico,png,txt}',
'.htaccess',
... | Fix build to add back the roboto font and bootstrap fonts. | Fix build to add back the roboto font and bootstrap fonts.
| JavaScript | apache-2.0 | san-tak/alien4cloud,alien4cloud/alien4cloud,alien4cloud/alien4cloud,alien4cloud/alien4cloud,san-tak/alien4cloud,alien4cloud/alien4cloud,san-tak/alien4cloud,san-tak/alien4cloud |
b27000cc2072d3b4627ecbeae7a50cdadc5c010b | src/tasks/streams/styles.js | src/tasks/streams/styles.js | const browser = require('browser-sync');
const config = require('../../config');
const gulp = require('gulp');
const handleError = require('../../utilities/handleError');
const path = require('path');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
/**
... | const browser = require('browser-sync');
const config = require('../../config');
const gulp = require('gulp');
const handleError = require('../../utilities/handleError');
const path = require('path');
const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
/**
... | Support configuring style include paths | Support configuring style include paths
| JavaScript | mit | hyperbolts/compiler |
e3bb6d03d7dee49330d46c529147e20e763b33c4 | app/assets/javascripts/handlebars_helpers.js | app/assets/javascripts/handlebars_helpers.js | Handlebars.registerHelper('select_list', function(select_options, id) {
var template = HandlebarsTemplates['recipes/foods_select'];
var list = $.map(select_options, function(e) {
if (id === e.id){
e.selected = "selected";
return e;
} else {
return e;
}
});
return new Handlebars.S... | Handlebars.registerHelper('select_list', function(select_options, id) {
var template = HandlebarsTemplates['recipes/foods_select'];
var list = $.map(select_options, function(e) {
if (id === e.id){
return {id: e.id, unique_name: e.unique_name, selected: "selected"}
} else {
return {id: e.id, uni... | Fix bug causing multiple food selected to be selected | Fix bug causing multiple food selected to be selected
| JavaScript | mit | snsavage/carb_tracker,snsavage/carb_tracker,snsavage/carb_tracker |
7047cafe591c9ffcf53fd882d71cea39eabeb92f | assets/javascripts/personal_message_toggler.js | assets/javascripts/personal_message_toggler.js | $(document).ready(function() {
$switcherFieldGroup = $("#request_personal_switch");
if ($switcherFieldGroup.length) {
// If an error is showing they must have selected 'no'
// so set this and don't hide the form.
if ($(".errorExplanation").length) {
$("#request_personal_switch_no").prop("checked"... | $(document).ready(function() {
$switcherFieldGroup = $("#request_personal_switch");
$formSubmitButton = $("#request_form input[type='submit']")[0];
if ($switcherFieldGroup.length) {
// If an error is showing they must have selected 'no'
// so set this and don't hide the form.
if ($(".errorExplanation... | Disable form submitting when personal request selected | Disable form submitting when personal request selected
For keyboard using people (like me) this avoids a confusing situation
where you hit enter for some reason on the form and it submits.
| JavaScript | mit | openaustralia/righttoknow,openaustralia/righttoknow,openaustralia/righttoknow |
4c38131f9f6cbeca7380114c21321311441bca67 | client/src/main.js | client/src/main.js | // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueResource from 'vue-resource'
Vue.use(VueResource)
Vue.config.productionTip = false
/* eslint... | // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueResource from 'vue-resource'
Vue.use(VueResource)
Vue.config.productionTip = false
Vue.filte... | Add a filter for the dates | [+] Add a filter for the dates
| JavaScript | mit | chriscamicas/girr,chriscamicas/girr |
a744dbd6fd89e4ad61bfce578eb109711f1cfb2a | assets/javascript/classes/lazysizes.class.js | assets/javascript/classes/lazysizes.class.js | /**
* Lazysizes
*
* Lazy loader class for (responsive) images
* https://github.com/aFarkas/lazysizes
*/
var lazysizes = {
/**
* Init lazysizes
*/
init: function() {
document.addEventListener('lazyriasmodifyoptions', function(e) {
// If pixel ratio > 1.4 set (resrc) jpg quality to a lower percentage
... | /**
* Lazysizes
*
* Lazy loader class for (responsive) images
* https://github.com/aFarkas/lazysizes
*/
var lazysizes = {
/**
* Init lazysizes
*/
init: function() {
document.addEventListener('lazyriasmodifyoptions', function(e) {
// If pixel ratio > 1.4 set (resrc) jpg quality to a lower percentage
... | Add code to replace not only `data-src`, but also `data-bgset` lazysizes width and quality values with calculated ones. | Add code to replace not only `data-src`, but also `data-bgset` lazysizes width and quality values with calculated ones.
| JavaScript | mit | jolantis/altair,jolantis/altair |
3fbd8db959075c669c5d12c906a1877ae4bae2ff | src/patchers/MemberAccessOpPatcher.js | src/patchers/MemberAccessOpPatcher.js | import NodePatcher from './NodePatcher';
import type { Node, ParseContext, Editor } from './types';
export default class MemberAccessOpPatcher extends NodePatcher {
constructor(node: Node, context: ParseContext, editor: Editor, expression: NodePatcher) {
super(node, context, editor);
this.expression = expres... | import NodePatcher from './NodePatcher';
import type { Node, ParseContext, Editor } from './types';
export default class MemberAccessOpPatcher extends NodePatcher {
constructor(node: Node, context: ParseContext, editor: Editor, expression: NodePatcher) {
super(node, context, editor);
this.expression = expres... | Add support for `@a` shorthand `this`. | Add support for `@a` shorthand `this`.
| JavaScript | mit | decaffeinate/decaffeinate,eventualbuddha/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,alangpierce/decaffeinate |
29892bf24156c47e885b9f100ba16dc877a1462a | lib/module/init_instance.js | lib/module/init_instance.js | Astro.eventManager.on('beforeInit', function() {
var doc = this;
// Object for storing references of related objects.
doc._references = {};
});
| Astro.eventManager.on('beforeInit', function() {
var doc = this;
// Object for storing references of related objects.
doc._references = {};
});
// Reset _references object if object is saved
Astro.eventManager.on('afterSave', function(e) {
var relations = this.constructor.getRelations();
if (!relations) {
... | Reset _references if object is saved | Reset _references if object is saved
| JavaScript | mit | jagi/meteor-astronomy-relations |
1e47cec24a276f4825c886bf8c478be4ac9ffa25 | components/HeaderImg.js | components/HeaderImg.js | import React from 'react';
class HeaderImg extends React.Component {
render() {
const style = {
width: '100%',
height: '500px',
clear: 'both',
margin: '0',
textAlign: 'center',
overflow: 'hidden'
};
const src = 'https://wordanddeedindia.imgix.net/images/child.jpg... | import React from 'react';
class HeaderImg extends React.Component {
render() {
const style = {
width: '100%',
height: '500px',
position: 'absolute',
zIndex: '-1000';
textAlign: 'center',
overflow: 'hidden'
};
const src = 'https://wordanddeedindia.imgix.net/image... | Move Header Image back with z-index | Move Header Image back with z-index | JavaScript | mit | arpith/wordanddeedindia,arpith/wordanddeedindia |
c76401e54fccb47450d077dfde0c0d2434257230 | app/assets/javascripts/les/topology_load_charts/d3_load_chart/transformators/heat_transformator.js | app/assets/javascripts/les/topology_load_charts/d3_load_chart/transformators/heat_transformator.js | var HeatTransformator = (function () {
'use strict';
function fetchChart(data, totals) {
var chart,
subChart,
totals = (totals || []);
for (chart in data) {
subChart = data[chart];
if (subChart.length) {
totals.push({
... | var HeatTransformator = (function () {
'use strict';
function fetchChart(data, totals) {
var chart,
subChart,
totals = (totals || []);
for (chart in data) {
if (data.hasOwnProperty(chart)) {
subChart = data[chart];
if (subCha... | Fix heat transformator for IE11 | Fix heat transformator for IE11
Fixes: #1165
| JavaScript | mit | quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses |
59bb126d6e014681e246f30c1f24f6a96471f32c | src/renderer/router/index.js | src/renderer/router/index.js | import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'landing-page',
component: require('@/components/LandingPage')
},
{
path: '/new',
name: 'new',
component: require('@/components/NewReportSetu... | import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'landing-page',
component: require('@/components/LandingPage')
},
{
path: '/new',
name: 'new',
component: require('@/components/NewReportSetu... | Fix default child route naming | :bug: Fix default child route naming
| JavaScript | mit | mijdavis2/upstream,mijdavis2/upstream,mijdavis2/upstream |
c858d5646acf315a007be478674851593c3d46e0 | src/app/waitList/waitList.controller.js | src/app/waitList/waitList.controller.js | (function() {
'use strict';
angular
.module('app.waitList')
.controller('WaitListController', WaitListController);
function WaitListController() {
var vm = this;
vm.parties = [1, 2, 3, 4];
vm.addParty = addParty;
function addParty() {
vm.parties.push('another');
}
}
})(); | (function() {
'use strict';
angular
.module('app.waitList')
.controller('WaitListController', WaitListController);
WaitListController.$inject = ['$firebaseArray'];
function WaitListController($firebaseArray) {
var vm = this;
var fireParties = new Firebase('https://waitandeat-v2-demo.firebase... | Use firebase data instead of simply array. | Use firebase data instead of simply array.
| JavaScript | mit | anthonybrown/angular-course-demo-app-v2,anthonybrown/angular-course-demo-app-v2 |
e1497c12329ccd42e3675296594d3f7f0e921d71 | plugins/axios/index.js | plugins/axios/index.js | import { getResourcePath } from './resources'
import { scope } from '../../lib/util'
import _ from 'lodash'
export default (context, inject) => {
const { $axios, error, app, req, redirect } = context
const logout = () => {
const url = '/logout'
if (process.client) {
location.href = url
} else {
... | import { getResourcePath } from './resources'
export default (context, inject) => {
const { $axios, error, app } = context
let resourcePath
const $resource = (options = {}) => {
return $axios.$get(resourcePath, {
params: {
include_post_raw: 1,
include_directed_posts: 0,
include_... | Fix axios configuration in accordance with auth module | Fix axios configuration in accordance with auth module
| JavaScript | mit | sunya9/beta,sunya9/beta,sunya9/beta |
da2ff00105b3175034666b5c5a91c702419cdc64 | renderer-process/initializeQuillEditor.js | renderer-process/initializeQuillEditor.js | const Quill = require('quill')
const initializeQuillEditor = function () {
let transcriptEditor = new Quill('.transcript-editor', {
modules: {
toolbar: true // Include button in toolbar
},
theme: 'snow'
})
return (transcriptEditor)
}
module.exports = initializeQuillEditor()
| const Quill = require('quill')
const initializeQuillEditor = function () {
let transcriptEditor = new Quill('.transcript-editor', {
modules: {
toolbar: true // Include button in toolbar
},
theme: 'snow',
placeholder: 'Transcribe away...'
})
return (transcriptEditor)
}
module.exports = ini... | Add placeholder text to editor | Add placeholder text to editor
| JavaScript | agpl-3.0 | briandk/transcriptase,briandk/transcriptase |
c1d3187e56f4c0b19f5bef474f4d039d6d3b874b | src/store/api/productions.js | src/store/api/productions.js | import superagent from 'superagent'
export default {
getProductions (callback) {
superagent
.get('/api/data/projects/all')
.end((err, res) => {
callback(err, res.body)
})
}
}
| import superagent from 'superagent'
export default {
getProductions (callback) {
superagent
.get('/api/data/projects/all')
.end((err, res) => {
callback(err, res.body)
})
},
getProductionStatus (callback) {
superagent
.get('/api/data/project_status')
.end((err, res)... | Add helpers to manage production data through API | Add helpers to manage production data through API
| JavaScript | agpl-3.0 | cgwire/kitsu,cgwire/kitsu |
b8cc3beb3c4138695df89c6629855ea5a39ecb6c | test/mongodb-driver-test.js | test/mongodb-driver-test.js | // mongodb-driver-test.js
//
// Testing the mongodb driver
//
// Copyright 2012, StatusNet Inc.
//
// 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/LI... | // mongodb-driver-test.js
//
// Testing the mongodb driver
//
// Copyright 2012, StatusNet Inc.
//
// 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/LI... | Revert "use mktmp in driver tests" | Revert "use mktmp in driver tests"
This reverts commit 55c3796beadbf427b844972b68fb7c2078fea0ac.
| JavaScript | apache-2.0 | e14n/databank-mongodb |
7389ffb6e3a173759a0c8fa9bccc2a01d9190b7e | src/components/popover/injectPopover.js | src/components/popover/injectPopover.js | import React from 'react';
import PropTypes from 'prop-types';
import Popover from './Popover';
import BaseText from '../../utils/rnw-compat/BaseText';
import OverlayPropTypes from '../../utils/OverlayPropTypes';
import useOverlay from '../../hooks/useOverlay';
export default function injectPopover(Component) {
cons... | import React from 'react';
import PropTypes from 'prop-types';
import Popover from './Popover';
import OverlayPropTypes from '../../utils/OverlayPropTypes';
import useOverlay from '../../hooks/useOverlay';
export default function injectPopover(Component) {
const propTypes = {
tooltip: PropTypes.shape({
tit... | Remove unnecessary BaseText from popover | Remove unnecessary BaseText from popover
| JavaScript | mit | ProAI/react-essentials |
e889d44ce667de47b381b982f0a8d64d1d23ad98 | src/components/Petition/index.js | src/components/Petition/index.js | import React from 'react';
import LayoutWrap from 'components/LayoutWrap';
import LayoutContent from 'components/LayoutContent';
import LayoutSidebar from 'components/LayoutSidebar';
import Container from 'components/Container';
import Section from 'components/Section';
import PetitionHeader from 'containers/PetitionH... | import React from 'react';
import LayoutWrap from 'components/LayoutWrap';
import LayoutContent from 'components/LayoutContent';
import LayoutSidebar from 'components/LayoutSidebar';
import Container from 'components/Container';
import Section from 'components/Section';
import PetitionHeader from 'containers/PetitionH... | Bring back PetitionResponse to petition detail page | Bring back PetitionResponse to petition detail page
| JavaScript | apache-2.0 | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend |
f44d884a806c4937723335d7890aadbec8238990 | src/components/renderTextArea.js | src/components/renderTextArea.js | import React from 'react';
import {
Col,
FormControl,
FormGroup,
} from 'react-bootstrap';
export function renderTextArea(handleTextChange, textFilter) {
return (
<Col lg={8} md={8} sm={12} xs={12}>
<FormGroup style={{marginBottom: '5px',}}>
<FormControl
componentClass='textarea'
... | import React from 'react';
import {
Col,
FormControl,
FormGroup,
Glyphicon,
InputGroup,
} from 'react-bootstrap';
export function renderTextArea(handleTextChange, textFilter) {
return (
<Col lg={8} md={8} sm={12} xs={12}>
<FormGroup style={{marginBottom: '5px',}}>
<InputGroup>
<... | Add magnifying glass for ux | Add magnifying glass for ux
| JavaScript | agpl-3.0 | Johj/cqdb,Johj/cqdb |
268b7980b8764b573029d1b131902db04f4bad2e | blueprints/azure-deploy-config/files/config/deploy.js | blueprints/azure-deploy-config/files/config/deploy.js | module.exports = function(environment) {
var ENV = {};
if(environment === 'production') {
ENV["azure-tables"] = {
storageAccount: "my-storage-account",
storageAccessKey: "my-access-key"
// You can also connect using your connection string, set it as:
// connectionString: "my-connectio... | module.exports = function(environment) {
var ENV = {};
if(environment === 'production' || !environment) {
ENV["azure-tables"] = {
storageAccount: "my-storage-account",
storageAccessKey: "my-access-key"
// You can also connect using your connection string, set it as:
// connectionStrin... | Use production environment by default | Use production environment by default
| JavaScript | mit | duizendnegen/ember-cli-deploy-azure |
011a02b7641812f686d958fbb33c66aedfb724bf | app/config/production.js | app/config/production.js | /*
* App config for production.
*/
module.exports = {
environment: 'production',
connection: {
host: 'localhost',
port: 3000
},
db: 'data/dsw-dashboard.sqlite',
startDate: '2014-07-01'
};
| /*
* App config for production.
*/
module.exports = {
environment: 'production',
db: 'data/dsw-dashboard.sqlite',
startDate: '2014-07-01'
};
| Remove connection info so Heroku can set its own | Remove connection info so Heroku can set its own
| JavaScript | bsd-2-clause | evidenceaction/Dispensers-Dashboard-API |
2d1cb47f3640bb77f072a9704a5cc3e85994e50d | config/userlist.js | config/userlist.js | module.exports = {
users: [ // ADD YOUR USERNAME AT THE TOP
'mattclaw',
'crankeye',
'cgroner',
'tejohnso',
'sp1d3rx',
'evsie001',
'msied',
'd7p',
'kasperlewau',
'kennethrapp',
'briansoule',
'qguv',
'ianwalter',
... | module.exports = {
users: [ // ADD YOUR USERNAME AT THE TOP
'julbaxter'
'mattclaw',
'crankeye',
'cgroner',
'tejohnso',
'sp1d3rx',
'evsie001',
'msied',
'd7p',
'kasperlewau',
'kennethrapp',
'briansoule',
'qguv',
... | Add my name to user list. | Add my name to user list. | JavaScript | mit | josegonzalez/pullup,Zarel/pullup,treygriffith/pullup,larvalabs/pullup,larvalabs/pullup,josegonzalez/pullup,rickhanlonii/pullup,treygriffith/pullup,Zarel/pullup,gitterHQ/pullup,josegonzalez/pullup,larvalabs/pullup,Zarel/pullup,rickhanlonii/pullup,gitterHQ/pullup,gitterHQ/pullup,rickhanlonii/pullup,treygriffith/pullup |
01743a5b55891a1354f2ac1042c0390fd2ddc65e | karma.conf-ci.js | karma.conf-ci.js | const externals = require('./externals.conf.js');
const base = require('./karma.conf.js');
module.exports = function(config) {
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.')
process.exit(1)
... | const externals = require('./externals.conf.js');
const base = require('./karma.conf.js');
module.exports = function(config) {
if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
console.log('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.')
process.exit(1)
... | Use the tunnel identifier from Travis | Use the tunnel identifier from Travis
| JavaScript | mit | noflo/noflo-ui,noflo/noflo-ui |
dd3ed88c85ffaf0124a930c336bb387880190a25 | adapters/scene.js | adapters/scene.js | var skyBox = require('./sky_box'),
TWEEN = require('tween.js'),
global = require('../lib/util').global(),
raf = require('raf-component'),
THREE = require('three');
module.exports = function scene (config) {
var distance = 1000,
camera,
scene,
renderer;
camera = new THREE.Perspect... | var skyBox = require('./sky_box'),
TWEEN = require('tween.js'),
global = require('../lib/util').global(),
raf = require('raf-component'),
THREE = require('three');
module.exports = function scene (config) {
var distance = 1000,
camera,
world,
renderer;
camera = new THREE.Perspect... | Move point light into position behind camera | Move point light into position behind camera
| JavaScript | mit | carlmw/gitlactica,carlmw/gitlactica |
a128ea016239d4d09556489ed9d192d26e82ab53 | src/test/rawmetadata-spec.js | src/test/rawmetadata-spec.js | import assert from 'assert';
import RawMetadata from '../rawmetadata.js';
const fromMetadataJsonToKataGroups = (metadataJson) => {
return RawMetadata.toKataGroups(metadataJson);
};
describe('create KataGroups from the raw metadata', function() {
const group = {items: [{id: 1}]};
const anotherGroup = {items: [{... | import assert from 'assert';
import RawMetadata from '../rawmetadata.js';
const fromMetadataJsonToKataGroups = (metadataJson) => {
return RawMetadata.toKataGroups(metadataJson);
};
class Kata {
static withId(id) {
return {id};
}
}
describe('create KataGroups from the raw metadata', function() {
const gr... | Make data construction a bit simpler to understand. | Make data construction a bit simpler to understand. | JavaScript | mit | tddbin/es6katas.org |
aa6a4c468d52c0fb21033d1c598074c9d7a7a30d | arraybuffer-to-buffer.js | arraybuffer-to-buffer.js | (function(root) {
function ArrayBufferToBuffer(ab) {
var buffer = new Buffer(ab.byteLength);
var view = new Uint8Array(ab);
for (var i = 0; i < buffer.length; ++i) {
buffer[i] = view[i];
}
return buffer;
}
if (typeof exports !== 'undefined') {
if (typeof module !== 'undefined' &&... | (function(root) {
var isArrayBufferSupported = new Buffer(new Uint8Array([1]).buffer)[0] === 1;
var ArrayBufferToBuffer = isArrayBufferSupported ? ArrayBufferToBufferAsArgument : ArrayBufferToBufferPerElement;
function ArrayBufferToBufferAsArgument (ab) {
return new Buffer(ab);
}
function ArrayBufferTo... | Enhance performance due to node4x buffer | Enhance performance due to node4x buffer
| JavaScript | mit | miguelmota/arraybuffer-to-buffer |
4cc0dda3fb24fafde8169d2c336b78bc39dc7717 | fields/types/boolean/BooleanField.js | fields/types/boolean/BooleanField.js | var React = require('react'),
Field = require('../Field');
module.exports = Field.create({
displayName: 'BooleanField',
valueChanged: function(event) {
this.props.onChange({
path: this.props.path,
value: event.target.checked
});
},
renderUI: function() {
var input, fieldClassName = 'field-ui'... | var React = require('react'),
Field = require('../Field');
module.exports = Field.create({
displayName: 'BooleanField',
valueChanged: function(event) {
this.props.onChange({
path: this.props.path,
value: event.target.checked
});
},
renderUI: function() {
var input, fieldClassName = 'field-ui'... | Fix Boolean field - show notes | Fix Boolean field - show notes
| JavaScript | mit | tomasztunik/keystone,tomasztunik/keystone,gemscng/keystone,gemscng/keystone,SJApps/keystone,SJApps/keystone |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.