conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Refactor setting of request body\n\nCode could be tidied up to not use Object.assign\n" }, { "from": "human", "value": "const { pick, pickBy } = require('lodash')\n\nconst { search } = require('../../search/services')\nconst { transformApiResponseToSearchCollection ...
javascript
chosen
[ { "from": "system", "value": "Remove star section from help\n" }, { "from": "human", "value": "import React from 'react';\nimport { List, ListItem } from 'material-ui/List';\nimport Divider from 'material-ui/Divider';\n\nimport './Help.css';\n\nconst Help = ({ sidebarExpanded }) => {\n const ma...
javascript
chosen
[ { "from": "system", "value": "Fix methods not using separator property\n" }, { "from": "human", "value": "function CaseSeparated(separator) {\n Object.defineProperty(this, {\n separator: {\n value: separator,\n enumerable: true,\n configurable: false\n ...
javascript
chosen
[ { "from": "system", "value": "Remove trailing slashes from requests in frontend\n" }, { "from": "human", "value": "import axios from 'axios';\n\n\nexport function getRestaurants ({ commit }) {\n return new Promise((resolve, reject) => {\n axios\n .get('/api/restaurant/')\n .then((r...
javascript
chosen
[ { "from": "system", "value": "Fix issue when generating URIs.\nPrevious behavior removed URI-path separators, but did not properly concatenate with a base-value.\nThis led to /path/to getting converted to /pathto.\n" }, { "from": "human", "value": "export default class Controller {\n construc...
javascript
chosen
[ { "from": "system", "value": "Fix missing style for TextFilter\n" }, { "from": "human", "value": "/** @jsx hJSX */\nimport {hJSX} from '@cycle/dom';\nimport {ControlledInputHook} from 'power-ui/hooks';\nimport styles from './styles.scss';\nhJSX();\n\nfunction TextFilter(sources) {\n const value...
javascript
chosen
[ { "from": "system", "value": "Test for existence of setData method fails\n" }, { "from": "human", "value": "describe('The constructor is supposed a proper WgaPipeline object', function(){\n\tit('Constructor wgaPipeline exists', function(){\n\t\texpect(WgaPipeline).toBeDefined();\n\t});\n\tvar sv...
javascript
chosen
[ { "from": "system", "value": "Bring back commented lines of code.\n" }, { "from": "human", "value": "var Model;\n\nmodule(\"Ember.RecordArray\", {\n setup: function() {\n Model = Ember.Model.extend({\n id: Ember.attr(),\n name: Ember.attr()\n });\n Model.adapter = Ember.Fixtu...
javascript
chosen
[ { "from": "system", "value": "Add example for url prefix in config\n" }, { "from": "human", "value": "module.exports = {\n server: {\n host: 'localhost',\n port: 3000\n },\n\n router: {\n urlPrefix: ''\n },\n \n database: {\n host: 'localhost',\n ...
javascript
chosen
[ { "from": "system", "value": "Change default service port 8080 to 8888\n" }, { "from": "human", "value": "/*\n Copyright 2015 The Trustees of Princeton University\n\n Licensed under the Apache License, Version 2.0 (the \"License\" );\n you may not use this file except in compliance with th...
javascript
chosen
[ { "from": "system", "value": "Remove last uses of `popup`\n" }, { "from": "human", "value": "/*\n * Word Count content script\n */\n\n/* global chrome:false, $:false, pluralize:false, PeripheryLabel:false, SelectionListener:false */\n\n\n/*\n * Instantiate popup and and listeners\n */\nvar COUNT...
javascript
chosen
[ { "from": "system", "value": "FIX populateModuleFixture to insert module objects correctly\n" }, { "from": "human", "value": "import { Modules } from '../database-controller/module/module';\nimport { createModuleCollection,\n insertToModuleCollection,\n removeOneModule,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix problem of not saving artifacts" }, { "from": "human", "value": "var Conference = artifacts.require(\"./Conference.sol\");\nvar InvitationRepository = artifacts.require(\"./InvitationRepository.sol\");\nvar ConfirmationRepository = artifacts.require(\"./Confirma...
javascript
chosen
[ { "from": "system", "value": "Add method to check whether Vault is running.\n" }, { "from": "human", "value": "'use strict';\n\nconst AWS = require('aws-sdk');\nconst Err = require('./error');\nconst upload = require('multer')();\n\nmodule.exports = function Index(app) {\n app.get('/', function...
javascript
chosen
[ { "from": "system", "value": "Fix in place; no data reduction occuring now. Code could likely be cleaned up, but this solves this issue at hand.\n" }, { "from": "human", "value": "export const simulate = (expr, inputs, numSamples) => {\n const data = {expr, numSamples: numSamples/window.workers...
javascript
chosen
[ { "from": "system", "value": "Fix greate/less than HTML entity in problem description\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\nvar md = require('cli-md');\n\nmodule.exports = function (filepath) {\n return md(fs.readFileSync(filepath, 'utf8'))\n ...
javascript
chosen
[ { "from": "system", "value": "Fix typo, remove line breaks from generated meta\n" }, { "from": "human", "value": "export const generateHead = ({title = '{{ project }}', description = null, keywords = null})=> `\n${title ? `<title>${title}</title>` : ''}\n${description ? `<meta name=\"description...
javascript
chosen
[ { "from": "system", "value": "Add Startup Logic With Domain Prompt\n" }, { "from": "human", "value": "'use strict'\n\nclass Protocol {\n constructor(initialAddress) {\n this.initialAddress = initialAddress\n }\n}\n\nlet init = address => {\n \n}\n\n\n" }, { "from": "gpt", "valu...
javascript
chosen
[ { "from": "system", "value": "DELETE requests should now work\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\nvar errands = require('../modules/errands');\n\nrouter.get('/', function(req, res, next) {\n errands.getAll(function (err, resu...
javascript
chosen
[ { "from": "system", "value": "Fix runner config default port\n" }, { "from": "human", "value": "'use struct';\n\nvar ConsoleAuditStream = require('../audit/console_audit_stream');\n\nfunction ImplementationRunnerConfig() {\n this._hostname = 61616;\n this._requestTimeoutMillis = 500;\n ...
javascript
chosen
[ { "from": "system", "value": "Add cache busting hash to scripts, etc.\n\nFor cache busting we can simply append the hash that Webpack generates\non each build to the scripts, stylesheets, etc. that it outputs.\n\nActually the 'html-webpack-plugin' makes this laughably easy to do here\nby adding the 'hash' o...
javascript
chosen
[ { "from": "system", "value": "Add react production mode support in webpack\n" }, { "from": "human", "value": "let webpack = require('webpack');\nlet path = require('path');\n\nlet BUILD_DIR = path.resolve(__dirname, 'client/dist');\nlet APP_DIR = path.resolve(__dirname, 'client/src');\n\n// cons...
javascript
chosen
[ { "from": "system", "value": "Fix splitting of parameter string\n" }, { "from": "human", "value": "var _ = require('lodash');\nvar yargs = require('yargs');\n\nfunction parseParams(params) {\n if (_.isString(params)) {\n return yargs.parse(params.trim().split('\\s+'));\n }\n\n if (_.isArra...
javascript
chosen
[ { "from": "system", "value": "Fix a bug for highlighting the player\n" }, { "from": "human", "value": "Template.leaderboard.helpers({\n scores:function(){\n var scores = Scores.find({}, {sort:{currentScore:-1}}).fetch();\n\n var me = Meteor.user().emails[0].address;\n var index = 1;\n ...
javascript
chosen
[ { "from": "system", "value": ":zap: Use unsplash api for backgrounds\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport FullscreenImage from '../components/FullscreenImage';\nimport placeholderImage from '../images/placeholder.jpeg';\n\nclass Background extends ...
javascript
chosen
[ { "from": "system", "value": "Send page pathname rather than whole URL\n" }, { "from": "human", "value": "(function (GOVUK) {\n \"use strict\";\n\n var sendVirtualPageView = function() {\n var $element = $(this);\n var url = $element.data('url');\n if (GOVUK.analytics && url){\n ...
javascript
chosen
[ { "from": "system", "value": "Remove hyphens from ISBNs before converting.\n" }, { "from": "human", "value": "var sys = require('sys');\nvar isbnlib = require('./lib/isbn');\nvar _ = require(\"underscore\");\n// Take ISBN-10 and ISBN-13 to well-formed (no dashes) ISBN-13 codes.\n// If the input ...
javascript
chosen
[ { "from": "system", "value": "Update mocha tests to better support Zeus projects\n" }, { "from": "human", "value": "/*\n gulpfile.js\n ===========\n Each task has been broken out into its own file in build/tasks. Any file in that folder gets\n automatically required by the loop in ./gulp/ind...
javascript
chosen
[ { "from": "system", "value": "Make dictionary lowercase and searches case insensitive\n" }, { "from": "human", "value": "\n/**\n * Module dependencies.\n */\nvar _ = require('lodash'),\n Dawg = require('udawg');\n\nexports = module.exports = {\n search: search,\n dictionary: dictionary\n}\n...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded code and add wildcards for rbnett and smp\n" }, { "from": "human", "value": "/*\n Author: mythern\n \n Copyright (C) 2014, MIT License\n http://www.opensource.org/licenses/mit-license.php\n\n Adressaway is provided free of charge, to a...
javascript
chosen
[ { "from": "system", "value": "Add support for disabling text areas" }, { "from": "human", "value": "Flame.TextAreaView = Flame.View.extend({\n classNames: ['flame-text'],\n childViews: ['textArea'],\n layout: { left: 0, top: 0 },\n defaultHeight: 20,\n defaultWidth: 200,\n acce...
javascript
chosen
[ { "from": "system", "value": "Simplify the singleton sample window creation.\n" }, { "from": "human", "value": "var singletonWindow;\n\n/**\n * Listens and launches the window, using a reference\n * to determine if a window already exists. If it does\n * that window is focused, otherwise a new w...
javascript
chosen
[ { "from": "system", "value": "Use correct filename for createUiDefinition.json\n\nAzure expects the filename to be camel case for\n`createUiDefinition.json` and will fail to accept a zipfile containing\nwith any different filename. This fixes the Gruntfile to look for the\ncorrect filename and generate ever...
javascript
chosen
[ { "from": "system", "value": "Add Karma as Grunt task\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n bump: {\n options: {\n files: ['package.json'],\n ...
javascript
chosen
[ { "from": "system", "value": "Disable autoprefixing IE < 11 and flexbox 2009\n" }, { "from": "human", "value": "/* eslint-disable flowtype/require-valid-file-annotation */\n/* eslint-disable flowtype/require-parameter-type */\n\n'use strict'\n\nconst Path = require('path')\nconst Autoprefixer = ...
javascript
chosen
[ { "from": "system", "value": "Add fr and it translations" }, { "from": "human", "value": "import 'dayjs/locale/ca';\nimport 'dayjs/locale/es';\nimport 'dayjs/locale/de';\nimport 'dayjs/locale/sl';\nimport 'dayjs/locale/ja';\nimport 'dayjs/locale/zh-tw';\nimport 'dayjs/locale/ru';\nimport 'dayjs/...
javascript
chosen
[ { "from": "system", "value": "Fix Hover Out when Clicking Minimize Button\n" }, { "from": "human", "value": "function updateImageUrl(image_id, new_image_url) {\n var image = document.getElementById(image_id);\n if (image)\n image.src = new_image_url;\n}\n\nfunction addButtonHandlers(button_...
javascript
chosen
[ { "from": "system", "value": "Reorder action functions: no functional change\n" }, { "from": "human", "value": "\n\nfunction setCurrentUser(currentUser) {\n return {\n type: 'SET_CURRENT_USER',\n currentUser,\n };\n}\n\nfunction setCurrentPerms(currentPerms) {\n return {\n type: 'SET...
javascript
chosen
[ { "from": "system", "value": " Unify 'onEventAppeared' and 'onEvent' signatures.\n\n`onEvent` has the signature `(subscription, event) => { }`. \r\n`onEventAppeared` should also be `(subscription, event) => {}` and not `(event) => {}`." }, { "from": "human", "value": "import connectionManager fr...
javascript
chosen
[ { "from": "system", "value": "Set default amount based on param donation_amount in url\n" }, { "from": "human", "value": "console.log('eu.wemove.contribjs');\n" }, { "from": "gpt", "value": "// set default amount based on param donation_amount in url\nvar name = 'donation_amount';\nv...
javascript
chosen
[ { "from": "system", "value": "Rename menu item \"search\" to \"map\"\n" }, { "from": "human", "value": "'use strict';\n\n// Configuring the Search module\nangular.module('search').run(['Menus',\n function(Menus) {\n // Set top bar menu items\n Menus.addMenuItem('topbar', 'Search', 'search...
javascript
chosen
[ { "from": "human", "value": "Add header-comment and wrapper to js.\n" }, { "from": "gpt", "value": "/*\n * text-toggle\n * https://github.com/jsvine/text-toggle\n *\n * Author: Jeremy Singer-Vine\n * Based on a script originally published on Slate Magazine (slate.com)\n * Licensed under the MIT ...
javascript
chosen
[ { "from": "system", "value": "Correct reference to ScrollingBehaviour source files." }, { "from": "human", "value": "//= require_directory ./AbstractDocument\r\n//= require_directory ./BrowserWidget\r\n//= require_directory ./ComponentStateManager\r\n//= require_directory ./Desktop\r\n//= requir...
javascript
chosen
[ { "from": "system", "value": "Change the service detail task label\n" }, { "from": "human", "value": "import mixin from 'reactjs-mixin';\nimport React from 'react';\nimport {StoreMixin} from 'mesosphere-shared-reactjs';\n\nimport MesosStateStore from '../stores/MesosStateStore';\nimport Service ...
javascript
chosen
[ { "from": "system", "value": "Check if username was actually changed by the CSRF" }, { "from": "human", "value": "/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\nconst models = require('../models/index')\nconst insecurity = require('../lib/insecurity')\n...
javascript
chosen
[ { "from": "system", "value": "Sort sources by distance to controller\n\nThe logic here is that we want creeps to start with the closer sources\n(that way the first creep spawned will be able to fill the controller\nup faster). To save CPU it looks for the controller rather than doing a\ncheck for all spawns...
javascript
chosen
[ { "from": "system", "value": "Add logic rendering report type\n\n" }, { "from": "human", "value": "import React from 'react'\nimport SummaryChart from './SummaryChart'\nimport Details from './Details'\nimport SummaryButton from './SummaryButton'\nimport DetailsButton from './DetailsButton'\n\nco...
javascript
chosen
[ { "from": "system", "value": "Fix issue where switching from a component to an element of the same resulting `nodeName` would not trigger unmount.\n" }, { "from": "human", "value": "import { clone, isString, isFunction, toLowerCase } from '../util';\nimport { isFunctionalComponent } from './func...
javascript
chosen
[ { "from": "system", "value": "Change comments and new routes\n" }, { "from": "human", "value": "// Import node module\nimport express from 'express';\nimport React from 'react';\nimport ReactDOMServer from 'react-dom/server';\n\nimport Home from '../src/home';\n\nconst router = express.Router();...
javascript
chosen
[ { "from": "system", "value": "Fix the second parameter passing to onUpdate\n" }, { "from": "human", "value": "/**\n * @jsx React.DOM\n */\n'use strict';\n\nvar React = require('react/addons');\nvar cx = React.addons.classSet;\nvar FormMixin = require('./FormMixin');\nvar FormFor = r...
javascript
chosen
[ { "from": "system", "value": "Replace tabs with spaces to match style\n" }, { "from": "human", "value": "function scrobble (artist, title, duration) {\n chrome.runtime.sendMessage({type: 'validate', artist: artist, track: title}, function (response) {\n if (response !== false) {\n ...
javascript
chosen
[ { "from": "system", "value": "Change get/getPrevious to both receive a bool and that if a get exists but a getPrevious does not, getPrevious triggers the get method but with a true passed to it.\n" }, { "from": "human", "value": "var CustomAccessor = new Class({\n options: {\n accessor...
javascript
chosen
[ { "from": "system", "value": "Set expectations for the project disclaimer\n" }, { "from": "human", "value": "import React from 'react';\nimport { mount, shallow } from 'enzyme';\nimport { expect } from 'chai';\nimport { project, workflow } from '../dev-classifier/mock-data';\nimport ProjectPage ...
javascript
chosen
[ { "from": "system", "value": "Add handlebars to require js config\n" }, { "from": "human", "value": "/* Sitewide require configuration\n * This file MUST be loaded asynchronously on all pages for require to work\n */\n\n// These settings are mirrored in build.main.js, if you're going to change t...
javascript
chosen
[ { "from": "system", "value": "Add function to loop in initial set of items to rtree\n" }, { "from": "human", "value": "var neo4j = require('node-neo4j');\nmodule.exports.db = db = new neo4j('http://dgwneo4j.cloudapp.net:7474');\n// module.exports.db = new neo4j('http://localhost:7474');\n//\nmod...
javascript
chosen
[ { "from": "system", "value": "Update admin area queries to use new `filter` parameter\n\nrefs #6005\n- updates use of the query params removed in #6005 to use new `filter` param\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n notific...
javascript
chosen
[ { "from": "system", "value": "Use environment port instead of hardcoded one\n" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\nvar items = require('./data/items');\n\napp.get('/items', function (req, res) {\n res.json(items);\n});\n\napp.use(express.stat...
javascript
chosen
[ { "from": "system", "value": "Add middleware to verify token\n" }, { "from": "human", "value": "// import necessary modules\nimport express from 'express';\nimport books from '../controllers/books';\n\nconst router = express.Router();\n\n// Endpoint to add a book\nrouter.post('/', books.createBo...
javascript
chosen
[ { "from": "system", "value": "Break out page data code into separate function\n" }, { "from": "human", "value": "/*eslint no-console:0*/\n\"use strict\"\n\nconst express = require(\"express\")\nconst app = express()\nconst template = require(\"jade\").compileFile(__dirname + \"/src/t...
javascript
chosen
[ { "from": "system", "value": "[HG] Return 200 from the /uploads route\n" }, { "from": "human", "value": "var express = require('express');\nvar multiparty = require('connect-multiparty');\nvar multipartyMiddleware = multiparty();\nvar app = express();\n\napp.get(\"/\", function (req, res) {\n\tr...
javascript
chosen
[ { "from": "system", "value": "Use evt.target instead of this in animation end\n" }, { "from": "human", "value": "exports.push = push;\nexports.pop = pop;\nexports.peer = peer;\n\ndocument.body.textContent = \"\";\nvar pages = [];\n\nfunction push(next) {\n next.addEventListener(\"animationend\"...
javascript
chosen
[ { "from": "system", "value": "Load cache reload iframe as soon as we have a url\n\nWe should not wait for onload to fire because it might never fire.\nInstead, we run the cache reload code as soon as we have a url, and\nallow it to reload the user's browser cache.\n" }, { "from": "human", "value...
javascript
chosen
[ { "from": "system", "value": "Remove the example spec that was included by yeoman.\n" }, { "from": "human", "value": "/* global describe, it */\n\n(function () {\n 'use strict';\n\n describe('Give it some context', function () {\n describe('maybe a bit more context here', function () {\n ...
javascript
chosen
[ { "from": "system", "value": "Use direct link to hacks\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nlet ciJobNumber = require('ci-job-number')\nlet real = require('postcss-parser-tests/real')\n\nlet safe = require('../build')\n\nif (ciJobNumber() === 1) {\n real(() => true, [['Brow...
javascript
chosen
[ { "from": "system", "value": "Fix number widgets in sample dashboard\n" }, { "from": "human", "value": "var current_valuation = 0;\nvar current_karma = 0;\n\nsetInterval(function() {\n var last_valuation = current_valuation;\n var last_karma = current_karma;\n var current_valuation = Math.flo...
javascript
chosen
[ { "from": "system", "value": "Add test for queue timeout\n" }, { "from": "human", "value": "'use strict';\n\nconst BaaSServer = require('..').Server;\nconst freeport = require('freeport');\nconst assert = require('chai').assert;\nconst _ = require('lodash');\nconst BaaSClient = require('../clien...
javascript
chosen
[ { "from": "system", "value": "Fix problem when using the numpad\n\nThe numpad numbers' code are different from the standard numbers. The\ncode number starts in 96 (number 0) and ends in 105 (number 9).\n\nThe problem is in the String.fromCharCode function because it doesn't\nrecognize the numpad code number...
javascript
chosen
[ { "from": "system", "value": "Fix en generador de código de módulo ADC\n" }, { "from": "human", "value": "goog.require('Blockly.JavaScript');\n\n\nBlockly.JavaScript['adc_done'] = function(block) {\n\tvar code = 'adc_done()';\n\treturn [code, Blockly.JavaScript.ORDER_NONE];\n};\nBlockly.JavaScri...
javascript
chosen
[ { "from": "system", "value": "Add failing test for keys array\n" }, { "from": "human", "value": "'use strict';\n\ndescribe(\"WordCount\", function() {\n var words;\n\n beforeEach(function() {\n words = new WordCount(\"This is a string; great, this, stuff\");\n });\n\n describe(\"#split\",...
javascript
chosen
[ { "from": "system", "value": "Add firefox to browsers in CI\n" }, { "from": "human", "value": "/* eslint-env node */\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [\n 'Chrome'\n ],\n brows...
javascript
chosen
[ { "from": "system", "value": "feat: Make apartment component render two tabs\n\nFirst tab shows apartment list and second tab is for a form\n" }, { "from": "human", "value": "import React from 'react'\nimport ApartmentTable from './ApartmentListContainer'\nimport MuiThemeProvider from 'material-...
javascript
chosen
[ { "from": "system", "value": "Change ordering of dependencies (OCD)\n" }, { "from": "human", "value": "Package.describe({\n git: 'https://github.com/zimme/meteor-collection-softremovable.git',\n name: 'zimme:collection-softremovable',\n summary: 'Add soft remove to collections',\n version: '...
javascript
chosen
[ { "from": "system", "value": "Add missing default props to info component\n" }, { "from": "human", "value": "import React from 'react';\nimport { Box, BoxContent } from '../Box';\n\nfunction Info({ children, margin }) {\n return (\n <Box theme=\"info\" margin={margin}>\n <BoxContent>\n ...
javascript
chosen
[ { "from": "system", "value": "Fix for a wrong router path when clicking on a table row.\n" }, { "from": "human", "value": "Template.TableReportView.events({\n 'click .row-item': function(event, tmpl) {\n Router.go('/reports/' + this._id);\n },\n 'click .checkbox': function(event, tmpl) {\n...
javascript
chosen
[ { "from": "system", "value": "Move comment to conditional block\n" }, { "from": "human", "value": "var traceur = Npm.require('traceur');\n\nPlugin.registerSourceHandler(\"next.js\", function (compileStep) {\n var oldPath = compileStep.inputPath;\n var newPath = oldPath.replace(/\\.next\\.js$/,...
javascript
chosen
[ { "from": "system", "value": "Set private repo from ENV var\n" }, { "from": "human", "value": "export default {\n port: process.env.UPDATES_PORT || process.env.PORT || 3000,\n host: process.env.UPDATES_HOST || '0.0.0.0',\n github: {\n token: process.env.GITHUB_TOKEN,\n api: {\n ver...
javascript
chosen
[ { "from": "system", "value": "Replace colors with Nova color scheme plugin\n" }, { "from": "human", "value": "const nova = {\n normal: {\n black: '#445660',\n red: '#DF8C8C',\n green: '#A8CE93',\n yellow: '#DADA93',\n blue: '#83AFE5',\n magenta: '#9A93E1',\n cyan: '#7FC1CA'...
javascript
chosen
[ { "from": "system", "value": "Add summary lines to output\n" }, { "from": "human", "value": "let tests = [\n // what result to expect, string to match against\n [ true, '/home/mike/git/work/stripes-experiments/stripes-connect' ],\n [ true, '/home/mike/git/work/stripes-loader/' ],\n [ true, '...
javascript
chosen
[ { "from": "human", "value": "Move to page 3 out of 9 for happy path testing" }, { "from": "gpt", "value": "describe('Mini test', function() {\n it('should work', function () {\n cy.visit(\"https://staging.checklegalaid.service.gov.uk/start\")\n\n cy.contains('Choose the area you most need...
javascript
chosen
[ { "from": "system", "value": "Clean additions and send message amount\n" }, { "from": "human", "value": "/*\n * clean.js - Clean only the bots messages.\n * \n * Contributed by Ovyerus\n */\n\nexports.commands = [\n 'clean'\n];\n\nexports.clean = {\n desc: 'clean messages created by the bo...
javascript
chosen
[ { "from": "system", "value": "Fix webpack bundle output path\n" }, { "from": "human", "value": "/* global require */\n\nvar webpack = require('webpack');\n\n//noinspection JSUnresolvedVariable\nmodule.exports = {\n entry: './client/main.js',\n output: {\n path: __dirname,\n f...
javascript
chosen
[ { "from": "system", "value": "Clean up size script output\n" }, { "from": "human", "value": "var Analyzer = require('webpack-bundle-analyzer').BundleAnalyzerPlugin\nvar webpack = require('webpack')\n\nmodule.exports = {\n plugins: [\n new webpack.optimize.UglifyJsPlugin({ minimize: true }),\...
javascript
chosen
[ { "from": "system", "value": "Add title field to PostsNew\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nclass PostsNew extends Component {\n render() {\n return (\n <div>\n PostsNew!\n </div>\n );\n }\n}\n\nexport default PostsNew;" },...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary explicit index check.\n" }, { "from": "human", "value": "// Place your library's code here\n//\n// If you add additional files, be sure to\n// load them in order in ./wrapper.js\n//\n\nimport _ from 'underscore';\nimport moment from 'moment';\n\nv...
javascript
chosen
[ { "from": "system", "value": "Add event callback for no document found\n" }, { "from": "human", "value": "import queryString from 'query-string'\nimport events from '../core/events'\nimport * as constants from '../constants'\nimport { actions } from '../store/actions'\nimport ReconnectingWebSock...
javascript
chosen
[ { "from": "system", "value": "Move webpack output into correct place\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst chalk = require(\"chalk\");\nconst cli = require(\"../cli/cli\");\n\nconsole.log(``);\nconsole.log(`${chalk.black(chalk.bgYellow(\" ~~~~~~~~~~ \"))}`);\nconsole....
javascript
chosen
[ { "from": "system", "value": "Rename to internal / external\n" }, { "from": "human", "value": "/* jshint -W078 */\n\n'use strict';\n\nlet stream = require('stream');\n\nfunction BidiTransform(options) {\n this._clientToServer = new stream.Transform();\n this._serverToClient = new stream.Transf...
javascript
chosen
[ { "from": "system", "value": "Add png mime type to the download blob\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport downloadIcon from '../icons/downloadIcon.svg';\n\nclass DownloadButton extends Component {\n constructor(props) {\n super(props);\n\n thi...
javascript
chosen
[ { "from": "system", "value": "Switch from `let` to `var` to support older versions of node.\n" }, { "from": "human", "value": "var path = require('path');\n\nmodule.exports = function(f, stat) {\n let parts = f.split(path.sep);\n return parts.indexOf('src') !== -1 || parts.indexOf('style')...
javascript
chosen
[ { "from": "system", "value": "Remove `replace` flag in directive" }, { "from": "human", "value": "/**\n * AngularJS throbber directive\n *\n * @author Hein Bekker <hein@netbek.co.za>\n * @copyright (c) 2015 Hein Bekker\n * @license http://www.gnu.org/licenses/agpl-3.0.txt AGPLv3\n */\n\n(functio...
javascript
chosen
[ { "from": "system", "value": "Revert \"Add podModulePrefix to app blueprint\"\n\nThis reverts commit f6ada104a403e48ae0aa64174a7e5ef1baca0e72.\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: '<%= modulePrefi...
javascript
chosen
[ { "from": "system", "value": "Use only one locale section for external docs\n" }, { "from": "human", "value": "export const externalDocs = {\n 'type': 'object',\n 'hideValueIfEmpty': true,\n 'children': {\n 'description': {\n 'type': 'textarea',\n 'hideValueIfEmpty': true\n },...
javascript
chosen
[ { "from": "system", "value": "Fix jshint warnings, some source formatting\n" }, { "from": "human", "value": "angular.module('skjutsgruppen.factories', ['skjutsgruppen.JSONReader'])\n\n.factory('AchievementsFactory', function(JSONReader) {\n return {\n getAchievements: function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Delete Coffee script comments from javascript file.\n" }, { "from": "human", "value": "# Place all the behaviors and hooks related to the matching controller here.\n# All this logic will automatically be available in application.js.\n# You can use CoffeeScript in th...
javascript
chosen
[ { "from": "system", "value": "feat: Add or remove from favorites action\n\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Component.extend({\n indexedDbPromised: Ember.inject.service('indexed-db'),\n tagName: 'li',\n classNames: [...
javascript
chosen
[ { "from": "system", "value": "Add test URL to try against server\n" }, { "from": "human", "value": "/*global define*/\n// ignore non-camel case decided by server\n/* jshint -W106*/\ndefine(['underscore', 'backbone'], function(_, Backbone) {\n 'use strict';\n\n // UsageModel\n // -------...
javascript
chosen
[ { "from": "system", "value": "Change some map test names\n" }, { "from": "human", "value": "(function() {\n module(\"R.map\");\n\n var map = require('eigensheep/map')['default'];\n var double = function(x) { return x * 2 };\n\n test(\"on empty arrays\", function() {\n deepEqual(map(double...
javascript
chosen
[ { "from": "system", "value": "Store rpnow data in home directory instead of application directory\n" }, { "from": "human", "value": "const path = require('path');\n\nfunction getProjectDirectory() {\n if (process.pkg) {\n return path.dirname(process.argv[0]);\n } else {\n ret...
javascript
chosen
[ { "from": "system", "value": "Reset regex lastIndex after use\n" }, { "from": "human", "value": "module.exports = (function () {\n\n var\n fs = require( 'fs' ),\n // http://stackoverflow.com/q/1068308 / https://github.com/jxson/front-matter\n regex = /^(\\s*\\{\\{\\{([\\s\\S]+)\\}\\}\\...
javascript
chosen
[ { "from": "system", "value": "Change all private variables to use underscores.\n" }, { "from": "human", "value": "var clipboard = {};\n\nclipboard.copy = (function() {\n var interceptCopy = false;\n var copyObject; // Map from data type (e.g. \"text/html\") to value.\n\n document.addEventList...
javascript
chosen