conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add addLines for updating messages\n" }, { "from": "human", "value": "'use babel'\n\nexport default class InfoView {\n\n constructor(serializedState) {\n // Create root element\n this.rootElement = document.createElement('div')\n this.rootElement.classList...
javascript
chosen
[ { "from": "system", "value": "Fix 'parsePronunciation' bug causing js string error w/ some articles.\n\nUnsure why this is only happening with some articles.\n\nNoticed when using this converter on `enwiki > Elon_Musk`:\nhttps://github.com/wikimedia/pcs-html-converter\n\nT242479\n\nChange-Id: Id95a75caf2ae7...
javascript
chosen
[ { "from": "system", "value": "Remove ; after function definitions\n" }, { "from": "human", "value": "'use strict';\n\n// On this codelab, you will be streaming only video (video: true).\nconst mediaStreamConstraints = {\n video: true,\n};\n\n// Video element where stream will be placed.\nconst ...
javascript
chosen
[ { "from": "system", "value": "Remove usage of bad import\n" }, { "from": "human", "value": "import { combineReducers } from 'redux'\nimport { reducer as form } from 'redux-form'\nimport filter from './components/filter/filter.reducer'\nimport routes from './components/routes/routes.reducer'\nimp...
javascript
chosen
[ { "from": "system", "value": "Update iceConnectionState.connected to trigger the connected state, instead of connecting\n" }, { "from": "human", "value": "var humps = require('humps');\n\nvar STATUS_CONNECTING = 'connecting',\n\tSTATUS_CONNECTED = 'connected',\n\tSTATUS_DISCONNECTED = 'disconnec...
javascript
chosen
[ { "from": "system", "value": "Tests: Fix typo in test log.\n" }, { "from": "human", "value": "module.exports.test = function(uiTestCtx) {\n\n describe('Module test: checkout:stub', function() {\n const { config, helpers: { login, openApp, logout }, meta: { testVersion } } = uiTestCtx;\n c...
javascript
chosen
[ { "from": "system", "value": "Add test for function verifyVariable\n" }, { "from": "human", "value": "import { getUrlFromCriterias, storeToArray } from './utils';\n\ndescribe('Utils', () => {\n test('getUrlFromCriterias', () => {\n expect(getUrlFromCriterias()).toBe('');\n expect(getUrlFr...
javascript
chosen
[ { "from": "system", "value": "Comment out faulty email-input assertion test\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport { moduleForComponent, test } from 'ember-qunit';\nimport startApp from '../../helpers/start-app';\nvar App;\n\nmoduleForComponent('email-input', 'emai...
javascript
chosen
[ { "from": "system", "value": "FEAT: Use bulk operation in migration script for performance\n" }, { "from": "human", "value": "const mongoModel = require('./mongo-model');\nconst sqlModel = require('./sql-model');\n\nfunction main() {\n sqlModel.sequelize.sync()\n .then(() => mongoModel.find(...
javascript
chosen
[ { "from": "system", "value": "Configure New Relic from env vars\n" }, { "from": "human", "value": "'use strict'\n\n/**\n * New Relic agent configuration.\n *\n * See lib/config.defaults.js in the agent distribution for a more complete\n * description of configuration variables and their potentia...
javascript
chosen
[ { "from": "system", "value": "Use express server instead of brunch default\n" }, { "from": "human", "value": "module.exports.config = {\n files: {\n javascripts: {\n joinTo: {\n \"js/app.js\": /^app/,\n \"js/vendor.js\": /^(?!app)/\n },\n order: {\n before...
javascript
chosen
[ { "from": "system", "value": "Remove padding call from tutorial.\n" }, { "from": "human", "value": "function makeBarChart() {\n var xScale = new Plottable.OrdinalScale().rangeType(\"bands\");\n var yScale = new Plottable.LinearScale();\n\n var xAxis = new Plottable.XAxis(xScale, \"bottom\", f...
javascript
chosen
[ { "from": "system", "value": "Fix variable leak to global namespace.\n" }, { "from": "human", "value": "var slice = [].slice\nvar util = require('util')\n\nexports.createInterrupterCreator = function (_Error) {\n return function (path) {\n var ejector = function (name, depth, context, ...
javascript
chosen
[ { "from": "system", "value": "Update user api to real functionaliy\n" }, { "from": "human", "value": "/* global console, MashupPlatform */\n\nvar UserAPI = (function () {\n \"use strict\";\n\n var url = \"https://account.lab.fiware.org/user\";\n\n /*************************************...
javascript
chosen
[ { "from": "system", "value": "Fix AudioContext not define reference error.\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2013 Csernik Flaviu Andrei\n *\n * See the file LICENSE.txt for copying permission.\n * \n */\n\n\"use strict\";\n\nfunction PropertyNotInitialized(obj, propName) {\...
javascript
chosen
[ { "from": "system", "value": "Allow boot by specifying the source path\n" }, { "from": "human", "value": "/*jshint rhino:true*/\nprint(\"Rhino showcase\");\nload(\"src/boot.js\");\n\njava.lang.System.exit(0);\n" }, { "from": "gpt", "value": "/*jshint rhino:true*/\nprint(\"Rhino showc...
javascript
chosen
[ { "from": "system", "value": "Fix styling issues for travis tests\n" }, { "from": "human", "value": "'use strict';\n\nvar $ = require('jquery');\nvar Clipboard = require('clipboard');\n\nvar setTooltip = function (elm, message) {\n $(elm).tooltip('hide')\n .attr('title', message)\n .too...
javascript
chosen
[ { "from": "system", "value": "Return to login page if didn't login\n" }, { "from": "human", "value": "'use strict';\n\n(function() {\n angular.module('bifrost',[\n 'lumx',\n 'ui.router',\n 'lbServices',\n 'leaflet-directive',\n 'ngMaterial',\n 'angularFileUpload'\n ])\n .con...
javascript
chosen
[ { "from": "system", "value": "Add defer and delay as side-effect methods\n" }, { "from": "human", "value": "'use strict';\n\nconst COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe'];\nconst FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'for...
javascript
chosen
[ { "from": "system", "value": "Enable back the findDOMNode and render lint rules\n" }, { "from": "human", "value": "module.exports = {\n 'extends': '../.eslintrc.js',\n\n 'env': {\n 'mocha': true\n },\n\n 'rules': {\n 'func-names': 0,\n 'no-unused-expressions': 0,\n 'no-console': ...
javascript
chosen
[ { "from": "system", "value": "Move goog.module.declareLegacyNamespace() calls to be next to goog.module\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRATED_REVID=271418472\n" }, { "from": "human", "value": "// Copyright 2014 The Closure Library Authors. All Rights Reser...
javascript
chosen
[ { "from": "system", "value": "[FEATURE] Add legend for the CLI tool helping new users to understand the CLI commands.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar split = require('./split-file.js');\n\nif (require.main === module) {\n cli();\n}\n\nfunction cli() {\n var option...
javascript
chosen
[ { "from": "system", "value": "Check for updates on every start of teh chrome app and restart automatically.\n" }, { "from": "human", "value": "'use strict';\n\nchrome.app.runtime.onLaunched.addListener(function() {\n chrome.app.window.create('chrome.html', {\n 'bounds': {\n ...
javascript
chosen
[ { "from": "system", "value": "Handle exec-sync failure on Windows.\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n environment: environment,\n baseURL: '/',\n locationType: 'hash',\n EmberENV: {\n FEATURES: ...
javascript
chosen
[ { "from": "system", "value": "fix: Allow initial context to be passed from antwar configuration\n" }, { "from": "human", "value": "import * as path from \"path\";\nimport merge from \"webpack-merge\";\nimport HtmlWebpackPlugin from \"html-webpack-plugin\";\nimport webpack from \"webpack\";\nimpo...
javascript
chosen
[ { "from": "system", "value": "Create an inmutable list with server received data; refactor changeItemState\n" }, { "from": "human", "value": "import types from '../types'\nimport createReducer from '../shared/create-reducer';\n\nconst initialState = []\n\nfunction itemsRequest( state ){ return s...
javascript
chosen
[ { "from": "system", "value": "Use hash location type for Github pages.\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'letnar-frontend',\n environment: environment,\n baseURL: '/',\n locationType: ...
javascript
chosen
[ { "from": "system", "value": "Update file after being uploaded.\n" }, { "from": "human", "value": "\n(function(Rubeus) {\n\n Rubeus.cfg.s3 = {\n\n uploadMethod: 'PUT',\n uploadUrl: null,\n uploadAdded: function(file, item) {\n var self = this;\n var ...
javascript
chosen
[ { "from": "system", "value": "Troubleshoot failing tests on Travis\n" }, { "from": "human", "value": "const dotenv = require('dotenv');\n\ndotenv.config();\n\nmodule.exports = {\n development: {\n username: 'Newman',\n password: 'andela2017',\n database: 'postit-db-dev',\n host: '12...
javascript
chosen
[ { "from": "system", "value": "Make stricter filter for matching the .spec files, so that we don't get 3rd party spec files into the test\n" }, { "from": "human", "value": "// Fetch all the files to be loaded by Karma; parse the actual tests\n// based on '.spec.js' filter\nvar tests = [];\nfor (v...
javascript
chosen
[ { "from": "system", "value": "Improve html markup of added item\n" }, { "from": "human", "value": "// activity item template\nvar itemtemplate = ['<div class=\"activity-item\">',\n\t'<a href=\"{{modifier_url}}\">',\n\t\t'<img src=\"{{modifier_siteicon}}\" />',\n\t'</a>',\n\t'<div>',\n\t\t'<p>',\...
javascript
chosen
[ { "from": "system", "value": "Support full IMDB URLs in the search field.\n" }, { "from": "human", "value": "function AppCtrl($scope, $http) {\n\t$scope.search = function() {\n\t\t$scope.loading = true;\n\t\t$scope.movie = null;\n\n\t\t$http.get('/search/' + $scope.imdbId).then(function(response...
javascript
chosen
[ { "from": "system", "value": "Make English the fallback language in i18next.\n\nFixes: #1580\n" }, { "from": "human", "value": "// commonjs code goes here\n\n(function () {\n var i18n = window.i18n = require('i18next');\n var XHR = require('i18next-xhr-backend');\n var lngDetector = req...
javascript
chosen
[ { "from": "system", "value": "Fix annoying bug in connect middleware\n" }, { "from": "human", "value": "// Local web server running on port 9001 with livereload functionality\n\nmodule.exports = function(grunt) {\n grunt.config('connect', {\n livereload: {\n options: {\n ...
javascript
chosen
[ { "from": "system", "value": "Use cookie instead of local storage.\n" }, { "from": "human", "value": "(function() {\n\tvar user_id = localStorage.getItem('user_id');\n\tvar session_id = localStorage.getItem('session_id');\n\tif (user_id == null || session_id == null) {\n\t\talert('Not signed in....
javascript
chosen
[ { "from": "system", "value": "Switch to appropriate cursor style when panning active\n" }, { "from": "human", "value": "/*globals svgEditor, svgCanvas*/\n/*jslint eqeq: true*/\n/*\n * ext-panning.js\n *\n * Licensed under the MIT License\n *\n * Copyright(c) 2013 Luis Aguirre\n *\n */\n \n/* \n\...
javascript
chosen
[ { "from": "system", "value": "Edit the roundDecimal() comment correcting mistakes\n" }, { "from": "human", "value": "/*\n * Developed by Radu Puspana\n * Date August 2017\n * Version 1.0\n */\n\n\n// Round the n-th decimal of a float number\n// number Number the floating point number to ...
javascript
chosen
[ { "from": "system", "value": "Remove dead code around unused payment_method_field data-hook\n" }, { "from": "human", "value": "//= require admin/spree_backend\n\nSpreePaypalExpress = {\n hideSettings: function(paymentMethod) {\n if (SpreePaypalExpress.paymentMethodID && paymentMethod.val() =...
javascript
chosen
[ { "from": "system", "value": "Enable Chrome and Firefox for tests\n\nSafari is not reliable ATM due to https://github.com/karma-runner/karma-safari-launcher/issues/24\n" }, { "from": "human", "value": "'use strict'\nmodule.exports = function(config) {\n\tconfig.set({\n\t\tbasePath: '',\n\t\tfram...
javascript
chosen
[ { "from": "system", "value": "chore: Set babel env while running Karma\n\nThis is needed for the coverage setup to work.\n" }, { "from": "human", "value": "const path = require(\"path\");\nconst parts = require(\"./webpack.parts\");\n\nmodule.exports = config => {\n const tests = \"tests/*.test...
javascript
chosen
[ { "from": "system", "value": "Add helper function to help users enable logging\n" }, { "from": "human", "value": "import boot from './boot';\nimport logger from 'debug';\nimport React from 'react/addons';\n\nconst debug = logger('app:init');\n\n// Executed when the browser has loaded everything....
javascript
chosen
[ { "from": "system", "value": "Add an action function to void steps so as to execute code on start\n\nIt does not alter the step behaviour, it's just a way to trigger \nadditional actions when needed\n" }, { "from": "human", "value": "'use strict';\n\nconst BaseStep = require('./base-step');\n\nm...
javascript
chosen
[ { "from": "system", "value": "Set diagnostics into old UI\n" }, { "from": "human", "value": "// This function is run when the app is ready to start interacting with the host application.\n// It ensures the DOM is ready before updating the span elements with values from the current message.\nOff...
javascript
chosen
[ { "from": "system", "value": "Use input text for numbers\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport Text from './text';\nimport Radio from './radio';\nimport Select from './select';\nimport Date from './date';\nimport Blob from './b...
javascript
chosen
[ { "from": "system", "value": "Change Ace editor default size.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'io.c9.ace',\n name: 'Config',\n propertie...
javascript
chosen
[ { "from": "system", "value": "Remove JS that handled not-quite-placeholder.\n" }, { "from": "human", "value": "$(document).ready(function() {\n if (window.location.href.search(/query=/) == -1) {\n $('#query').one('click, focus', function() {\n $(this).val('');\n });\n }\n\n $(docum...
javascript
chosen
[ { "from": "system", "value": "Set iPhone 5s as default simulator\n\nDesign for the smallest mobile device first.\n" }, { "from": "human", "value": "import bg from 'gulp-bg';\nimport gulp from 'gulp';\n\n// If this doesn't work, while manual Xcode works, try:\n// 1) delete ios/build directory\n//...
javascript
chosen
[ { "from": "system", "value": "Add functionality to include serfs\n" }, { "from": "human", "value": "import {Router} from 'express'\nimport models from '../models';\n\nexport default () => {\n\tlet app = Router()\n\n\n\tapp.get('/new', (req, res) => {\n\t\tres.render('tasks/new')\n\t})\n\n\tapp.g...
javascript
chosen
[ { "from": "system", "value": "Fix SVG load with spaces in filename\n" }, { "from": "human", "value": "var server = require('webserver').create(),\n fs = require('fs');\nvar serverUrl = '127.0.0.1:8888';\n\nvar workingDirectory = fs.workingDirectory.replace(/\\//g, fs.separator);\n\nfunction c...
javascript
chosen
[ { "from": "system", "value": "Remove initial error if reddit isn't given correct information\n\n" }, { "from": "human", "value": "'use strict';\nconst r = require('../services/reddit');\nlet reportedItemNames = new Set();\nlet hasFinishedFirstRun = false;\n\nconst SUBREDDITS = ['pokemontrades', ...
javascript
chosen
[ { "from": "system", "value": "Add failing test for Workbook file save function\n" }, { "from": "human", "value": "import {Workbook} from '../src/parsing/workbook.js';\nimport {expect} from 'chai';\nimport fs from 'fs';\n\ndescribe('Workbook parsing', () => {\n\n let file = fs.readFileSync('ex...
javascript
chosen
[ { "from": "system", "value": "Enable Symbol (it works fine on Node v0.12 branch)\n" }, { "from": "human", "value": "'use strict';\n\nvar findup = require('findup-sync');\nvar spawnSync = require('child_process').spawnSync;\nvar gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirna...
javascript
chosen
[ { "from": "system", "value": "Load Dashboard charts on scroll.\n" }, { "from": "human", "value": "$(function () {\n // Display correct URL on \"no-experiments\" page. \n $('#base-domain').html(document.location.origin);\n\n // Draw charts on Details page.\n if ($('#details-page').length) { ...
javascript
chosen
[ { "from": "system", "value": "Set up exp time for JWT\n" }, { "from": "human", "value": "import * as m from '../models'\nimport parse from 'co-body'\nimport jwt from 'koa-jwt'\nimport {JWT_KEY} from '../config'\n\nexport default ({api}) => {\n\n api.post('/auth', async ctx => {\n const body ...
javascript
chosen
[ { "from": "system", "value": "Make sure we're setting our bearer token; not basic auth\n" }, { "from": "human", "value": "window.config = {\n // default: '/'\n routerBasename: '/',\n // default: ''\n relativeWebWorkerScriptsPath: '',\n servers: {\n dicomWeb: [\n {\n name: 'Or...
javascript
chosen
[ { "from": "system", "value": "Allow invitations to members to be re-sent.\n" }, { "from": "human", "value": "'use strict';\n\nlet apiClient;\n\nclass DrushIOMember {\n\n constructor(client, project, identifier, data = {}) {\n apiClient = client;\n this.identifier = identifier;\n this.p...
javascript
chosen
[ { "from": "system", "value": "Fix angular 1.3 CommonJS require on example/demo\n" }, { "from": "human", "value": "'use strict';\n\nvar angular = require('angular');\n\n// Require the almost-static-site main module\nvar mainModule = require('../../main');\n\n// Define the Demo App\nvar app = wind...
javascript
chosen
[ { "from": "system", "value": "Revert \"Instantiate when it is imporeted\"\n\nThis reverts commit e80b68bb5791247ae80179e541e04f865002206b.\n" }, { "from": "human", "value": "let PolarBear = Ember.Object.extend({\n schedule(target, f, interval) {\n return Ember.run.later(this, function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add classes to article table elements.\n" }, { "from": "human", "value": "// Adapted from https://github.com/etcet/HNES/blob/master/js/hn.js\n\n$(document).ready(function() {\n \n $('body > center > table > tbody > tr:first-child').attr('id', 'header');\n\n $('#h...
javascript
chosen
[ { "from": "system", "value": "Remove declared but unused vars\n" }, { "from": "human", "value": "$(document).on('turbo:load turbo:render', function() {\n var $panels, $tabs;\n $tabs = $('#lab_tests').tabs();\n $panels = $('.ui-tabs-panel');\n $('#departments').tabs({\n cache: true\n });\...
javascript
chosen
[ { "from": "system", "value": "Add meta data to agriculture contexts store\n" }, { "from": "human", "value": "export const initialState = {\n loading: false,\n loaded: false,\n data: [],\n error: false\n};\n\nconst setLoading = (loading, state) => ({ ...state, loading });\nconst setLoaded = (...
javascript
chosen
[ { "from": "system", "value": "Update copyright year, homepage and email\n" }, { "from": "human", "value": "/*\n * EksiOkuyucu - unofficial eksisozluk client\n * http://eksiokuyucu.com/\n *\n * Copyright (C) 2014 Onur Aslan <onuraslan@gmail.com>\n * Licensed under MIT\n * https://github.com/onu...
javascript
chosen
[ { "from": "system", "value": "Update twilio module reference to 1.4.0\n\nLatest twilio-node: https://github.com/twilio/twilio-node/" }, { "from": "human", "value": "Package.describe({\n summary: \"Twilio API Wrapper for Meteor\"\n});\n\nNpm.depends({ \"twilio\": \"1.1.4\" });\n\nPackage.on_use(...
javascript
chosen
[ { "from": "system", "value": "Allow new blocks to be reloaded.\n" }, { "from": "human", "value": "const { clone, pull } = require('./lib/git')\nconst path = require('path')\nconst jetpack = require('fs-jetpack')\n\nconst configuration = require('./configuration')\n\nclass Package {\n constructo...
javascript
chosen
[ { "from": "system", "value": "Disable the search when the input pattern's length is less than or equal to 1\n" }, { "from": "human", "value": "'use strict'\nconst Fuse = require('fuse.js')\n\nlet fuse = null\nlet fuseIndex = []\n\nconst fuseOptions = {\n shouldSort: true,\n tokenize: true,\n ...
javascript
chosen
[ { "from": "system", "value": "Add examples for each component type.\n" }, { "from": "human", "value": "import { Request } from 'react-axios'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nclass App extends React.Component {\n constructor(props) {\n super(props)\n this.sta...
javascript
chosen
[ { "from": "system", "value": "Fix commented out avatar in profile-cards-react-with-styles" }, { "from": "human", "value": "/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { Image, View, Text } from 'react-sketchapp';\nimport { css, withStyles } from '../withStyles';\n\n...
javascript
chosen
[ { "from": "system", "value": "build: Initialize algolia settings in script\n" }, { "from": "human", "value": "import algolia from 'algoliasearch';\nimport icons from '../dist/icons.json';\nimport tags from '../src/tags.json';\n\nconst ALGOLIA_APP_ID = '5EEOG744D0';\n\nif (\n process.env.TRAVIS_...
javascript
chosen
[ { "from": "system", "value": "Update data source to 2016 feed\n" }, { "from": "human", "value": "angular.module('F1FeederApp.services', [])\n .factory('ergastAPIservice', function($http) {\n\n var ergastAPI = {};\n\n ergastAPI.getDrivers = function() {\n return $http({\n metho...
javascript
chosen
[ { "from": "system", "value": "Align ordering of config vars between files\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\nvar base = require('./base');\n\nconst development = _.merge({}, base, {\n env: 'development',\n auth0: {\n callbackURL: process.env.AUTH...
javascript
chosen
[ { "from": "system", "value": "Update simulator.type for moisture simulator\n" }, { "from": "human", "value": "/*\n * Moisture simulator\n *\n */\nmodule.exports = function(sensor_id){\n \n var simulator = {};\n\n simulator.id = sensor_id;\n simulator.type = 'humidity';\n simulato...
javascript
chosen
[ { "from": "system", "value": "Allow env to specify dist directory\n" }, { "from": "human", "value": "'use strict';\n\nvar static_server = require('./static_server');\n\nstatic_server('dist');" }, { "from": "gpt", "value": "'use strict';\n\nvar static_server = require('./static_server...
javascript
chosen
[ { "from": "system", "value": "Add Access-Control-Allow-Headers to http header\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* @ngdoc overview\n* @name torrentSubscribeFrontendApp\n* @description\n* # torrentSubscribeFrontendApp\n*\n* Main module of the application.\n*/\nangular\n.modu...
javascript
chosen
[ { "from": "system", "value": "Append require function definition to the end\n" }, { "from": "human", "value": "'use strict';\n\nvar browserify = require('browserify'),\n detective = require('detective');\n\nvar fs = require('fs'),\n Path = require('path');\n\n\nmodule.exports = function (p...
javascript
chosen
[ { "from": "system", "value": "Add rel=\"noopener\" for external anchors\n\nRecommended by Lighthouse https://developers.google.com/web/tools/lighthouse/audits/noopener\n" }, { "from": "human", "value": "import React, {PureComponent} from 'react';\nimport classNames from 'classnames';\nimport {Li...
javascript
chosen
[ { "from": "system", "value": "Comment out bootstrap to make test suite pass\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react'\nimport classnames from 'classnames'\nimport { jsdom } from 'jsdom'\nimport OrganisationListRow from './OrganisationListRow'\n\n//Sni...
javascript
chosen
[ { "from": "system", "value": "Change mongo connection to read from process.env OR use localhost\n" }, { "from": "human", "value": "var keystone = require('keystone');\nkeystone.init({\n \n 'name': 'Mottram Evangelical Church',\n \n 'favicon': 'public/favicon.ico',\n 'less': 'public',\n 'st...
javascript
chosen
[ { "from": "system", "value": "Remove UI controls that are not needed now." }, { "from": "human", "value": "/** @jsx React.DOM */\n\nvar React = require('react');\n\nvar View = React.createClass({\n\n render: function() {\n return (\n <header className=\"navigation-bar\">\n <butto...
javascript
chosen
[ { "from": "system", "value": "Switch task to be a multitask so you can have multipe options for what you need\n" }, { "from": "human", "value": "/*\n * grunt-istanbul-coverage\n * https://github.com/daniellmb/grunt-istanbul-coverage\n *\n * Copyright (c) 2013 Daniel Lamb\n * Licensed under the M...
javascript
chosen
[ { "from": "system", "value": "Remove the clearing of the database from the script\n\nThis was causing race conditions with some of the files which were already connected to a mongo connection and then not having a reference to an existing collection. This was picked up in the LogsAPITests were the tests wer...
javascript
chosen
[ { "from": "system", "value": "fix(nodemon): Resolve the correct watch path for nodemon\n" }, { "from": "human", "value": "const nodemon = require('nodemon');\n\nnodemon({\n ext: 'js json',\n // --silent squashes an ELIFECYCLE error when the server exits\n exec: 'DEBUG=fcc* npm run --silent ba...
javascript
chosen
[ { "from": "system", "value": "Add close button to search bar\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport styled from 'styled-components'\nimport TextInput from './TextInput'\nimport { Search } from '../icons'\n\nexport default class SearchBar extends Compo...
javascript
chosen
[ { "from": "system", "value": "Add image upload and delete routes to parent route\n" }, { "from": "human", "value": "var models = require('../models'),\n _validate = require('../../helpers/express-validators'),\n _h = require('../../helpers/helpers'),\n jwt = require('jsonwebtoken'),\n co = r...
javascript
chosen
[ { "from": "system", "value": "Create a second webpack chunk for vendor dependencies\n" }, { "from": "human", "value": "var path = require('path');\n\nvar Paths = {\n APP: path.resolve(__dirname, 'src/js'),\n BUILD_OUTPUT: path.resolve(__dirname, 'out/webpack')\n};\n\nmodule.exports = {\n entr...
javascript
chosen
[ { "from": "system", "value": "Add more modules to vendor entry\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\nvar BundleTracker = require('webpack-bundle-tracker');\nvar CommonsCh...
javascript
chosen
[ { "from": "system", "value": "Check NODE_ENV before setting devserver host\n\nOptional quiet mode. Remove comments to enable quiet mode.\n" }, { "from": "human", "value": "var getConfig = require('hjs-webpack')\nvar webpack = require('webpack')\nvar path = require('path');\n\nmodule.exports = ge...
javascript
chosen
[ { "from": "system", "value": "Format version info with separators\n" }, { "from": "human", "value": "/*\n* Bookmarklet.js\n*/\n\nimport { getGlobalName, getTitle, getVersion } from './utils/constants';\nimport { addNodes, removeNodes } from './utils/dom';\nimport { MessageDialog } from './util...
javascript
chosen
[ { "from": "system", "value": "Change contentBase to docs folder in webpack build." }, { "from": "human", "value": "module.exports = {\n entry: './docs/App.jsx',\n output: {\n filename: './docs/bundle.js'\n },\n devServer: {\n inline: true\n },\n module: {\n rules: [{\n test: ...
javascript
chosen
[ { "from": "system", "value": "Add more complexity to the simple example\n" }, { "from": "human", "value": ";(_ => {\n 'use strict';\n\n class Router2Content extends HTMLElement {\n createdCallback() {\n this.hidden = true; // by default\n }\n }\n\n window.addEventListener('hashcha...
javascript
chosen
[ { "from": "system", "value": "Update for other js file the linting\n" }, { "from": "human", "value": "'use strict'\n\nvar eq = {\n item: {\n detail: function () {\n var elem = document.getElementById('item-detail-search')\n var value = elem.getElementsByTagName('input')[0].value\n\...
javascript
chosen
[ { "from": "system", "value": "Use append mode in case other hooks want to write to build-extras.gradle\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n// add additional build-extras.gradle file to instruct android's lint to ignore translation errors\n// v0.1.c\n// causing error in the ...
javascript
chosen
[ { "from": "system", "value": "Fix GET /files endpoint to list files in user storage.\n" }, { "from": "human", "value": "/**\n * UploadController\n *\n * @description :: Server-side logic for managing uploads\n * @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers\n */\n\...
javascript
chosen
[ { "from": "system", "value": "Switch internal templater to handlebars\n" }, { "from": "human", "value": "module.exports = {\n\toptions : {\n\t\tlatedef : true,\n\t\tnoempty : true,\n\t\tundef : true,\n\t\tstrict : false,\n\t\tnode : true,\n\t\tbrowser : true,\n\t\teqnull : true,\n\t\tscripturl :...
javascript
chosen
[ { "from": "system", "value": "Fix typo: 'Resopnse' should be 'Response'" }, { "from": "human", "value": "/*\n Copyright 2019 Google LLC\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a ...
javascript
chosen
[ { "from": "system", "value": "Remove leftover test after f198d9a.\n" }, { "from": "human", "value": "const expect = require('unexpected');\nconst truncate = require('./truncate');\n\nit('should truncate trace output', () => {\n expect(\n truncate(\n [\n 'expec...
javascript
chosen
[ { "from": "system", "value": "Fix chaining grammar typoo - use '.should.be.a()' instead of (working, but\nless clear) '.should.a()'\n" }, { "from": "human", "value": "/*jshint expr:true */\ndescribe('DeviceModel', function() {\n describe('instantiation', function() {\n beforeEach(function() ...
javascript
chosen
[ { "from": "system", "value": "Mark expect as a global when using Chai\n\nIn some test running configurations (such as when using Karma),\n`expect` is treated as a global symbol and does not need to be imported.\n\nThis PR updates `chai.js` to mark `expect` as a global so ESLint\ndoesn’t report it as an unde...
javascript
chosen
[ { "from": "system", "value": "Add Ember 1.13 to the test matrix\n" }, { "from": "human", "value": "module.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-release',\n dependencies: {\n 'ember': 'components/ember#re...
javascript
chosen
[ { "from": "system", "value": ":new: Move DOM Updates to attachedCallback of BottomTab\n" }, { "from": "human", "value": "'use strict';\n\nclass BottomTab extends HTMLElement{\n\n initialize(Content, onClick) {\n this._active = false\n this._visibility = true\n this.innerHTML = Content\...
javascript
chosen
[ { "from": "system", "value": "Remove return value from getArticles\n" }, { "from": "human", "value": "import {fetchChannels} from '../api/channelsApi'\n\nexport function getArticles(channel) {\n return function(dispatch) {\n return fetchChannels(channel)\n .then(response => {\n d...
javascript
chosen