conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Move row cell types to 'options' object\n" }, { "from": "human", "value": "var Marionette = require('backbone.marionette'),\n RowLabelCell = require('./cell/RowLabelCell');\n\nvar TableRow = Marionette.ItemView.extend({\n tagName: 'tr',\n\n prependCellType: R...
javascript
chosen
[ { "from": "system", "value": "Add JSDoc annotations with examples\n" }, { "from": "human", "value": "'use strict';\n\n// EXPORTS //\n\nmodule.exports = eval;\n" }, { "from": "gpt", "value": "'use strict';\n\n/**\n* Alias for `eval` global.\n*\n* @module @stdlib/utils/eval\n*\n* @exam...
javascript
chosen
[ { "from": "system", "value": "Fix ThreadListItem prop type checking\n" }, { "from": "human", "value": "var ChatThreadActionCreators = require('../actions/ChatThreadActionCreators');\nvar React = require('react');\nvar cx = require('react/lib/cx');\nvar TimeAgo = require('./TimeAgo.react');\nvar ...
javascript
chosen
[ { "from": "system", "value": ":wrench: Include username in config files\n" }, { "from": "human", "value": "module.exports = {\n CONSUMER_KEY : \"YOUR_CONSUMER_KEY\",\n CONSUMER_SECRET : \"YOUR_CONSUMER_SECRET\",\n ACCESS_TOKEN_KEY : \"YOUR_ACCESS_TOKEN\",\n ACCESS_TOKEN_SECRET ...
javascript
chosen
[ { "from": "system", "value": "Add new line at the end of the file\n" }, { "from": "human", "value": "RocketChat.API.v1.addRoute('spotlight', { authRequired: true }, {\n\tget() {\n\t\tcheck(this.queryParams, {\n\t\t\tquery: String\n\t\t});\n\n\t\tconst { query } = this.queryParams;\n\n\t\tlet res...
javascript
chosen
[ { "from": "system", "value": "Implement getTitle and getDescription for search\n" }, { "from": "human", "value": "Meteor.startup(function () {\n\n PostsSearchController = PostsListController.extend({\n view: 'search',\n onBeforeAction: function() {\n var query = this.params.query;\n ...
javascript
chosen
[ { "from": "system", "value": "tasks: Revert extra code from 0942687 to fix documentation\n\nThe package that caused the problem has been updated so the\nfixing code is no longer needed.\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\nvar os = require('os');\n\nmodule...
javascript
chosen
[ { "from": "system", "value": "Add test to consider message analysis\n" }, { "from": "human", "value": "var expect = require('chai').expect;\nvar consider = require('./helpers/consider');\nvar elda = require('../lib/api.js');\n\ndescribe('API', function() {\n\n var instance;\n\n beforeEach(func...
javascript
chosen
[ { "from": "system", "value": "Clean up chrome console test case\n" }, { "from": "human", "value": "var test = require('tape');\nvar child = require('child_process');\n\ntest('--client chrome', function(t) {\n var exe = child.spawn('node', ['./bin/cmd.js', '--client', 'chrome', 'fixture/console....
javascript
chosen
[ { "from": "system", "value": "Copy files directly into release/google-site-kit.\n" }, { "from": "human", "value": "/**\n * External dependencies\n */\nimport gulp from 'gulp';\n\ngulp.task( 'copy', () => {\n\tgulp.src(\n\t\t[\n\t\t\t'readme.txt',\n\t\t\t'google-site-kit.php',\n\t\t\t'uninstall.p...
javascript
chosen
[ { "from": "system", "value": "Use cli parameters for client_id and token.\n" }, { "from": "human", "value": "var Client = require('node-rest-client').Client,\n clientOptions = {\n connection: {\n rejectUnauthorized: false,\n requestCert: true,\n }\n },\n client =...
javascript
chosen
[ { "from": "system", "value": "Change project image class names\n" }, { "from": "human", "value": "import React from 'react';\n\nimport BuildingWithPoetic from './BuildingWithPoetic';\nimport ProjectInfoList from './ProjectInfoList';\n\nconst poeticUrl = 'http://www.poeticsystems.com';\n\nclass P...
javascript
chosen
[ { "from": "system", "value": "Add acceptance tests and utils tests to Karma\n" }, { "from": "human", "value": "// require source components\nvar componentsContext = require.context('./src', true, /\\.js?$/);\ncomponentsContext.keys().forEach(componentsContext);\n\n// require functional tests\nva...
javascript
chosen
[ { "from": "system", "value": "Fix beforeEach/afterEach callbacks with moduleForAcceptance.\n\nThese were previously calling the provided `beforeEach`/`afterEach`\nblocks with a single argument (that is the original arguments object)\ninstead of the correct arguments.\n\nUpdated to use `.apply` instead of `....
javascript
chosen
[ { "from": "system", "value": ":fire: Remove function wrapping around js includes\n" }, { "from": "human", "value": "'use strict'\n\nconst FS = require('fs')\nconst Path = require('path')\nconst Base = require('./base')\n\nclass GenericPlugin extends Base {\n constructor() {\n super()\n th...
javascript
chosen
[ { "from": "system", "value": "Make AdminQueryHandler consistent with AdminHandler\n" }, { "from": "human", "value": "\"use strict\"\n\nconst QueryHandler = require('./queryHandler');\nconst AdminHandler = require('../../router/handler/adminHandler');\n\nclass AdminQueryHandler extends QueryHandl...
javascript
chosen
[ { "from": "system", "value": "Initialize touch events in react" }, { "from": "human", "value": "var plugins = require('./plugins')\nvar React = require('react')\n\nvar router = require('../components/router.jsx')\nReact.renderComponent(router, document.body);\n\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Stop infinite scroll when calling init. Use 'this' if initializing inside a controller already\n" }, { "from": "human", "value": "function InfiniteScroll (cursor) {\n var self = this;\n\n // observeChanges will fire for initial set, so count can start at 0\n self...
javascript
chosen
[ { "from": "system", "value": "Add google font css for exported html\n" }, { "from": "human", "value": "require('../css/github-extract.css');\nrequire('../css/markdown.css');\nrequire('../css/extra.css');\nrequire('../css/slide-preview.css');\nrequire('../css/site.css');\n" }, { "from": "...
javascript
chosen
[ { "from": "system", "value": "Disable payment test for now, will come back to it\n\nChange-Id: I3737e8164760aee8815020d813ca8b9c7676b13b\n" }, { "from": "human", "value": "/*\nCopyright 2016 Google Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this fi...
javascript
chosen
[ { "from": "system", "value": "Configure karma to use PhantomJS and babel\n" }, { "from": "human", "value": "module.exports = function (config) {\n config.set({\n files : ['test_with_browser/**/*.js'],\n frameworks : ['mocha', 'browserify'],\n plugins : ['karma-browserify'...
javascript
chosen
[ { "from": "system", "value": "Fix jQuery loader to use path of itself. Fixes nested demos.\n" }, { "from": "human", "value": "(function() {\n\nvar parts = document.location.search.slice( 1 ).split( \"&\" ),\n\tlength = parts.length,\n\ti = 0,\n\tcurrent,\n\tversion = \"1.9.0\",\n\tfile = \"http:...
javascript
chosen
[ { "from": "system", "value": "Exclude bin files from built zips.\n" }, { "from": "human", "value": "/**\n * Gulp copy task.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in comp...
javascript
chosen
[ { "from": "system", "value": "Fix test run on buildserver.\nThough that way we don have a coverage overview after each manual run...\n" }, { "from": "human", "value": "module.exports = function (config) {\n 'use strict'\n\n config.set({\n frameworks: ['jspm', 'mocha', 'chai', 'sinon'],\n\n ...
javascript
chosen
[ { "from": "system", "value": "Make unleash record user from gatekeeper header.\n\nSigned-off-by: Elliot Murphy <014ce8fab4ab9f8a957bfe9f974379093994de97@users.noreply.github.com>\n" }, { "from": "human", "value": "'use strict';\n\nconst fs = require(\"fs\");\nconst express = require(\"express\")...
javascript
chosen
[ { "from": "system", "value": "Change body return for error or body return if error exist\n\n" }, { "from": "human", "value": "var request = require('request');\n\nmodule.exports = {\n\n request: function(method, apiUrl, apiKey, data, callback) {\n var options = {};\n options.method = meth...
javascript
chosen
[ { "from": "system", "value": "Move block parser outside return function\n" }, { "from": "human", "value": "/*\n * A Class\n */\n\nvar identifierParser = require('./identifier');\nvar scope = require('../state.js');\n\nmodule.exports = function(obj) {\n if(obj.type !== 'CLASS') {\n ...
javascript
chosen
[ { "from": "system", "value": "Use English as default locale for flagr instead of Chinese\n\nAs the contents for flagr is in English, set the default locale for\nElementUI to English (instead of defaulting to Chinese). This is to\nprevent certain contents from being displayed in Chinese. eg. when\nthere ar...
javascript
chosen
[ { "from": "system", "value": "Add the 'No Shenanigans' response header for '/todos/*' endpoints\n\nFixes #7\n" }, { "from": "human", "value": "'use strict';\n\nconst path = require('path');\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst routes = require('...
javascript
chosen
[ { "from": "system", "value": "Move feed fetch interval time to env\n" }, { "from": "human", "value": "import http from 'http'\nimport throng from 'throng'\n\nimport app from './app'\nimport { FEED_URL } from './constants'\nimport mongoConfig from './mongoConfig'\n\nrequire('dotenv').config()\n\n...
javascript
chosen
[ { "from": "system", "value": "Make options recurse among all prototypes\n" }, { "from": "human", "value": "var Class = require('uclass');\nvar merge = require(\"mout/object/merge\")\n\nvar Options = new Class({\n\n initialize : function(){\n if(!this.options)\n this.options = {};\n /...
javascript
chosen
[ { "from": "system", "value": "[Client] Fix active link in menu when sub item is displayed\n" }, { "from": "human", "value": "import React from 'react'\nimport {Link, withRouter} from 'react-router-dom'\nimport { Image, Menu } from 'semantic-ui-react'\nimport logo from '../logo.svg'\nimport './Ma...
javascript
chosen
[ { "from": "system", "value": "Remove link and twitter alloy buttons, add ul, ol\n" }, { "from": "human", "value": "import React, {Component} from 'react'\n\nimport AlloyEditor from 'alloyeditor/dist/alloy-editor/alloy-editor-no-react'\nimport 'alloyeditor/dist/alloy-editor/assets/alloy-editor-at...
javascript
chosen
[ { "from": "system", "value": "Remove JSHint ignore rules from lib folder\n" }, { "from": "human", "value": "// This file is part of bandiera-client-node.\n// \n// bandiera-client-node is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License...
javascript
chosen
[ { "from": "system", "value": "Add Filter Object and Complex Flag to REST Campaign List Action\n" }, { "from": "human", "value": "var readCampaignModelLogic = require('../../logic/campaign/readCampaignModelLogic')\n\nvar Input = {\n accountHashID: {\n required: true\n }\n}\n\nexports.getCamp...
javascript
chosen
[ { "from": "system", "value": "Add a way to redraw misbehaving elements\n" }, { "from": "human", "value": "(function() {\n\tvar TextAsLabelInput = new Class({\n\t\tinputClass: 'defaultText',\n\t\tlabelClass: 'textAsLabel',\n\t\tinitialize: function(el) {\n\t\t\tthis.el = document.id(el);\n\t\t\tt...
javascript
chosen
[ { "from": "system", "value": "Allow items to have actions\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from './template';\nimport Registerable from '../../mixins/registerable';\n\nexport default Ember.Component.extend(Registerable, {\n layout: layout,\n\n tagNam...
javascript
chosen
[ { "from": "system", "value": "Add node-style-guide to list of rules" }, { "from": "human", "value": "'use babel';\n\nimport path from 'path'\n\nexport default {\n jscsPath: {\n title: 'Path to JSCS binary',\n type: 'string',\n default: path.join(__dirname, '..', 'node_modules', 'jscs',...
javascript
chosen
[ { "from": "system", "value": "Allow to set specific environment\n\nThanks for the useful idea, @sjorobekov!\n" }, { "from": "human", "value": "var path = require('path');\nvar nconf = require('nconf');\n\nmodule.exports = function (filepath) {\n filepath = filepath || path.join(process.cwd(),...
javascript
chosen
[ { "from": "system", "value": "Fix build: Set correct error name\n" }, { "from": "human", "value": "export class CompositionError extends Error {\n constructor(classInstance, message, component) {\n super(`@${classInstance}: ${message}`);\n\n const stackArray = this.stack.split('\\n');\n ...
javascript
chosen
[ { "from": "system", "value": "Access code lower-cased on submit.\n" }, { "from": "human", "value": "/**\n * Emerging Citizens\n * Developed by Engagement Lab, 2015\n * ==============\n * Game player view controller.\n *\n * Help: http://keystonejs.com/docs/getting-started/#routesviews-firstview\...
javascript
chosen
[ { "from": "system", "value": "Allow apps to specify an alternative hoodie.js dependency\n\nIf you project needs a hoodie.js that is different from the default, you\ncan now specify an alternate dependency source for `hoodie`.\n\ne.g.:\n\n```\n{\n \"name\": \"foo\",\n \"version\": \"1.0.1\",\n \"type\": \...
javascript
chosen
[ { "from": "system", "value": "Remove unsupported console functions. Add missing 'debug'.\n\nLittle point having them if they don't behave.\nRelated #4.\n" }, { "from": "human", "value": "var shoe = require('shoe')('/smokestack')\nvar stringify = require('json-stringify-safe')\nvar slice ...
javascript
chosen
[ { "from": "system", "value": "[FIX] Use var instead of let for variable declaration\n\nES2015 will probably not be available on the Raspberry Pi.\n" }, { "from": "human", "value": "Template.dashboard.onCreated( () => {\n Template.instance().subscribe( 'train' );\n});\n\nTemplate.dashboard.helpe...
javascript
chosen
[ { "from": "system", "value": "Add setup complete in the helper\n" }, { "from": "human", "value": "Template.home.helpers({\n\tgame: function() {\n\t\treturn Games.find({\n\t\t\tgameState: {\n\t\t\t\t$nin: ['gameEnded', 'notStarted']\n\t\t\t},\n\t\t\tprivateGame: false\n\t\t}, {\n\t\t\tfields: {\n...
javascript
chosen
[ { "from": "system", "value": "Add dirname to resolve.root to fix import linting in Atom\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\nvar BundleTracker = require('webpack-bundle-...
javascript
chosen
[ { "from": "system", "value": "Fix webpack setup for linked parallel-es\n\nIf the parallel-es module is linked, dependencies imported from transpiled functions can no longer be resolved.\nRequires to set resolve.modules to the project directory\n" }, { "from": "human", "value": "var path = requir...
javascript
chosen
[ { "from": "system", "value": "Add 6to5 npm module compatibility option (--modules commonInterop).\n" }, { "from": "human", "value": "var webpack = require(\"webpack\");\n\nmodule.exports = {\n cache: true,\n entry: \"./app/app.jsx\",\n output: {\n path: __dirname + \"/app\",\n filename:...
javascript
chosen
[ { "from": "system", "value": "Fix bug with space not working in input boxes\n" }, { "from": "human", "value": "window.GLOBAL_ACTIONS = {\n 'play': function () {\n wavesurfer.playPause();\n },\n\n 'back': function () {\n wavesurfer.skipBackward();\n },\n\n 'forth': function () {\n w...
javascript
chosen
[ { "from": "system", "value": "Fix fade of slickslider clashing with bootstrap 4" }, { "from": "human", "value": "/**\n * global: jsFrontend\n */\n(function ($) {\n /**\n * Create responsive media slider, which uses \"slick\" slider\n */\n $.fn.mediaLibrarySlider = function () {\n // loo...
javascript
chosen
[ { "from": "system", "value": "Fix to example domain snippets\n\n" }, { "from": "human", "value": "var assert = require('assert');\ndescribe('Example.com', function() {\n describe('page content', function() {\n it('should navigate to example.com', () =>\n Browser.url('http://...
javascript
chosen
[ { "from": "system", "value": "[QT] Refactor platform branching in JS bridge call\n\nThis is to avoid conflicts in some recent versions of QtWebEngine, where\nwindow.external does seems to be present by default. It's better to\ncheck for Qt first; window.qt is not likely to be defined anywhere else,\nso we w...
javascript
chosen
[ { "from": "system", "value": "Set email verified flag to session after verification\n" }, { "from": "human", "value": "import { GraphQLNonNull, GraphQLString, GraphQLBoolean } from 'graphql'\nimport { mutationWithClientMutationId } from 'graphql-relay'\n\nimport verify from '../auth/verify'\n\ne...
javascript
chosen
[ { "from": "system", "value": "Allow to select another block when one is already selected\n" }, { "from": "human", "value": "window.TransformTool = function(scene, camera, inputTarget)\n{\n this.block = null;\n this.camera = camera;\n this.control = new THREE.TransformControls(camera, in...
javascript
chosen
[ { "from": "system", "value": "Add account debug in example\n" }, { "from": "human", "value": "var cantina = require('cantina'),\n auth = require('cantina-auth'),\n plugin = require('../').plugin;\n\nvar app = cantina.createApp({\n amino: false,\n port: 3000\n});\n\napp.use(auth.plugin, {...
javascript
chosen
[ { "from": "system", "value": "Check user is authenticated when accessing the portal\n" }, { "from": "human", "value": "\"use strict\";\n\nvar express = require('express');\nvar app = express();\n\n// Routes\napp.get('/', function(req, res){\n console.dir(req.user);\n res.sendfile('index.html',...
javascript
chosen
[ { "from": "system", "value": "Support messages on search result page\n" }, { "from": "human", "value": "// ==UserScript==\n// @id Amazon age-verification autoredirect\n// @name Amazon age-verification autoredirect\n// @version 0.0.5\n// @namespace curipha\n// @a...
javascript
chosen
[ { "from": "system", "value": "Remove CLIENT_INTERACTIVE flags from config\n\nThis is very likely the cause of #225. I was not able to re-produce it\non my machine, but reading through this makes me think it is the right\nthing to do:\n\nhttp://dev.mysql.com/doc/refman//5.5/en/mysql-real-connect.html\n" },...
javascript
chosen
[ { "from": "system", "value": "Allow autoupdater to close everything\n" }, { "from": "human", "value": "// @flow\nimport os from 'os'\nimport { app, autoUpdater, dialog } from 'electron'\n\nconst version = app.getVersion()\nconst platform = `${os.platform()}_${os.arch()}`\nconst updateURL = `http...
javascript
chosen
[ { "from": "system", "value": "Fix UUID column error in membership seeder\n" }, { "from": "human", "value": "module.exports = {\n up: (queryInterface, Sequelize) => {\n return queryInterface.bulkInsert('Memberships',\n [\n {\n id: Sequelize.UUIDV1,\n memberId: '7...
javascript
chosen
[ { "from": "system", "value": "Allow for single-line appending of variables\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = !!(\n // Generic environment variables\n process.env.CI || // Travis CI, CircleCI, ...\n process.env.CONTINUOUS_INTEGRATION || /...
javascript
chosen
[ { "from": "system", "value": "Add tension support to the Line series component\n" }, { "from": "human", "value": "(function(d3, fc) {\n 'use strict';\n\n fc.series.line = function() {\n\n // convenience functions that return the x & y screen coords for a given point\n var x =...
javascript
chosen
[ { "from": "system", "value": "Use IE 9-compliant method of parsing special tags\n" }, { "from": "human", "value": "module.exports = parse;\n\nvar TAG_MATCH = /^\\s*<([a-zA-Z\\-]+)(?:\\s|>)/,\n document = window.document;\n\n// Override container type for tags that can only be parsed in specia...
javascript
chosen
[ { "from": "system", "value": "Remove .close if the server error'd... older versions of Node.js throw hard errors if the server is not 'listening'.\n" }, { "from": "human", "value": "'use strict';\r\n\r\nvar NET = require('net');\r\nvar PORTS = {};\r\n\r\nfunction CreateServer(\r\n port,\r\n ...
javascript
chosen
[ { "from": "system", "value": "Add global closure and proper exports for node/broswer environments\n" }, { "from": "human", "value": "var crypto = require('crypto')\n\n// Crockford's Base32\n// https://en.wikipedia.org/wiki/Base32\nvar ENCODING = \"0123456789ABCDEFGHJKMNPQRSTVWXYZ\"\n\nfunction s...
javascript
chosen
[ { "from": "system", "value": "Make bluebird as default promise overriding ES6 promise\n" }, { "from": "human", "value": "import Promise from 'bluebird';\nimport mongoose from 'mongoose';\nimport util from 'util';\nimport config from './config/server/env';\nimport app from './config/server/expres...
javascript
chosen
[ { "from": "system", "value": "Remove ES6 let binding usage\n\nThis makes the module code work nicely with older (ES5) tooling." }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function (object) {\n var keys = Object.keys(object);\n var values = [];\n\n for (let key in object...
javascript
chosen
[ { "from": "system", "value": "Use arrow functions instead of `function` keyword" }, { "from": "human", "value": "'use strict';\n\nconst debug = require('debug')('calendar:routes:day');\nconst express = require('express');\nconst common = require('./common');\nconst validators = require('../lib/v...
javascript
chosen
[ { "from": "system", "value": "Remove flash injection. Doesn't seem to work right\n" }, { "from": "human", "value": "let path = require('path');\nlet fs = require('fs');\nlet _ = require('lodash');\nlet PouchDB = require('pouchdb');\n\nmodule.exports = (dirpath, options) => {\n options = require...
javascript
chosen
[ { "from": "system", "value": "Add resolved debug and rtl values to plugin\n\nThe Lazy Way ©" }, { "from": "human", "value": "'use strict'\n\nvar postcss = require('postcss')\nvar defined = require('defined')\n\nvar noop = postcss.plugin('noop', function () {\n return function (css) {}\n})\n\nmo...
javascript
chosen
[ { "from": "system", "value": "Correct paths that this will work on\n\nThere is an issue that it would not work against https://twitter.com/anyurl.\nThis adds a wildcard after the / to handle all.\n" }, { "from": "human", "value": "var pageMod = require(\"sdk/page-mod\");\n\npageMod.PageMod({\n ...
javascript
chosen
[ { "from": "system", "value": "Implement of next by passing next method to app.handle.\n" }, { "from": "human", "value": "module.exports = function express() {\n var http = require('http');\n\n var app = function(request, response) {\n response.statusCode = 404;\n response.end...
javascript
chosen
[ { "from": "system", "value": "Simplify code and enhance comments\n" }, { "from": "human", "value": "/**\n * Detects if only the primary button has been clicked in mouse events.\n * @param {MouseEvent} event\n * @return {boolean}\n */\nmodule.exports = function isPrimaryClick (event) {\n\treturn ...
javascript
chosen
[ { "from": "system", "value": "Improve Hidden element value logic\n" }, { "from": "human", "value": "\"use strict\";\n\nconst ElementInstance = require('./elementInstance');\nconst he = require('he');\n\nclass HiddenInstance extends ElementInstance {\n async init(data={}) {\n await super.init...
javascript
chosen
[ { "from": "system", "value": "[cleanup] Fix bad default case statement\n" }, { "from": "human", "value": "import GeometryResourceDescriptor from './GeometryResourceDescriptor';\nimport PropTypes from 'react/lib/ReactPropTypes';\nimport THREE from 'three.js';\n\nclass ShapeGeometryResourceDescrip...
javascript
chosen
[ { "from": "system", "value": "Revert \"feat(core): kill process for uptime demonstration\"\n\nThis reverts commit f80e1bfe8bb7203db404bcfb95c979ad2fcdbd93.\n" }, { "from": "human", "value": "const micro = require('micro');\nconst {router, get} = require('microrouter');\nconst {delay} = require('...
javascript
chosen
[ { "from": "system", "value": "Create inital logic for reading, extracting and converting the .plist files\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(){\n\n};\n" }, { "from": "gpt", "value": "'use strict';\n\nvar fs = require('fs');\nvar exec = requi...
javascript
chosen
[ { "from": "system", "value": "Add build set status listener\n" }, { "from": "human", "value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2014 Red Hat, Inc., and individual contributors\n * as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2....
javascript
chosen
[ { "from": "system", "value": "Fix typo in prop name" }, { "from": "human", "value": "'use strict';\n\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nclass CandidateMatchCategory extends Component {\n render() {\n return (\n <div className=\...
javascript
chosen
[ { "from": "system", "value": "Remove meaning less test case\n" }, { "from": "human", "value": "import Textcomplete from '../src/textcomplete';\nimport Completer from '../src/completer';\n\nconst assert = require('power-assert');\n\nimport {getTextarea} from './test-helper';\n\ndescribe('Textcomp...
javascript
chosen
[ { "from": "system", "value": "Add rudimentary Promise support to `navigate` helper\n" }, { "from": "human", "value": "// Navigation helper for the test iframe. Queues navigation actions and\n// callbacks, then executes them serially with respect to async. This is to\n// avoid deep nesting of cal...
javascript
chosen
[ { "from": "system", "value": "Add blue and gray colors.\n" }, { "from": "human", "value": "/*\n** TailwindCSS Configuration File\n**\n** Docs: https://tailwindcss.com/docs/configuration\n** Default: https://github.com/tailwindcss/tailwindcss/blob/master/stubs/defaultConfig.stub.js\n*/\nmodule.ex...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary wrapping DOM nodes around universal apps & be able to pass props to root-app-container" }, { "from": "human", "value": "const { relative } = require('path')\n\nmodule.exports = ReactUniversalServerLoader\n\nfunction ReactUniversalServerLoader(sour...
javascript
chosen
[ { "from": "system", "value": "Make sample filters the default.\n" }, { "from": "human", "value": "class MCWorkflowFiltersComponentController {\n /*@ngInject*/\n constructor(workflowFiltersService, $stateParams) {\n this.whichFilter = 'all';\n this.workflowFiltersService = wor...
javascript
chosen
[ { "from": "system", "value": "Set up linear interpolation for position updates\n" }, { "from": "human", "value": "AFRAME.registerComponent('socket-controls', {\n schema: {\n previousPos: {default: 0},\n nextPos: {default: 0},\n socket: {default: null},\n dur: {default: 100} // set t...
javascript
chosen
[ { "from": "system", "value": "Fix active links on navbar\n" }, { "from": "human", "value": "import React from 'react';\nimport { Link } from 'react-router';\nimport { Menu, Segment } from 'semantic-ui-react';\nimport DynamicLinks from './DynamicLinks';\n\nconst Navbar = ({ id, location, logout }...
javascript
chosen
[ { "from": "system", "value": "Add code to pickup where viewer left off\n" }, { "from": "human", "value": "//Code below manages Wistia gating. Enter email address once, then rest are ungated\nwistiaEmbeds.onFind(function(video) {\n var email = Wistia.localStorage(\"golden-ticket\");\n if (email...
javascript
chosen
[ { "from": "system", "value": "Fix description of time until re-enable clicks\n" }, { "from": "human", "value": "const helpers = require('./support/helpers.js');\n\nbeforeAll(() => {\n jest.useFakeTimers();\n});\n\nafterAll(() => {\n require('./support/teardown.js');\n});\n\ndescribe('Prevent d...
javascript
chosen
[ { "from": "system", "value": "Increase timeout for stack test\n" }, { "from": "human", "value": "/*global describe, it*/\n/*\n * mochify.js\n *\n * Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de>\n *\n * @license MIT\n */\n'use strict';\n\nvar assert = require('assert');\nvar run = r...
javascript
chosen
[ { "from": "system", "value": "Add platformRelease to data posted to Atom.io with crashes\n\nCo-Authored-By: Jason Rudolph <68c46a606457643eab92053c1c05574abb26f861@jasonrudolph.com>\n" }, { "from": "human", "value": "module.exports = function(params) {\n const { crashReporter } = require('elect...
javascript
chosen
[ { "from": "system", "value": "Reduce starting upgrader quantity to 3 at practical room level 6\n\nBecause of the size of the upgraders the storage is drained\nconsiderably while they work. This means the system is basically doing\na big burst of upgrading, stopping to rebuild the energy buffer, and\nthen up...
javascript
chosen
[ { "from": "system", "value": "Remove test that was accidentally added from a previous class\n" }, { "from": "human", "value": "require(\"../www/discography/js/lib/model.js\");\nrequire(\"../www/discography/js/models/artist.js\");\nrequire(\"../www/discography/js/lib/ajax.js\");\nrequire(\"../www...
javascript
chosen
[ { "from": "system", "value": "Add helpers to know if the user own mangas or not\n" }, { "from": "human", "value": "Template.tomeDetails.helpers({\n displayDate: function() {\n return moment(this.releaseDate, \"YYYY/MM/DD\").fromNow();\n },\n notOwned: function() {\n return...
javascript
chosen
[ { "from": "system", "value": "Refactor order of replace in escape\n" }, { "from": "human", "value": "(function() {\n function escape(text) {\n return text\n .replace(/&/g, \"&#x26;\")\n .replace(/>/g, \"&#x3e;\")\n .replace(/--&#x3e;/g, \"-->\")\n .replace(/&#x3e;&#x3e;/g...
javascript
chosen
[ { "from": "system", "value": "Stop rendering after delay on first slide\n" }, { "from": "human", "value": "/*global shower*/\n// Start the app\nrequire( ['detector', 'app', 'container', 'renderer'], function ( Detector, app, container, renderer ) {\n if ( ! Detector.webgl ) {\n Detector.addG...
javascript
chosen
[ { "from": "system", "value": "Use RegEx to count lines.\n\nShould improve speed and enhance code readability." }, { "from": "human", "value": "const assert = require('assert');\nconst string = require('../util/string');\n\nTrailingWhitespacesRule = {};\n\nTrailingWhitespacesRule.name = 'Trailing...
javascript
chosen
[ { "from": "system", "value": "Use correct substance API in tests.\n" }, { "from": "human", "value": "import { platform, DefaultDOMElement as DOM } from 'substance'\n\n// ATTENTION: have to use a custom getMountPoint because\n// during the tests are change the behavior of platform and DefaultDOME...
javascript
chosen
[ { "from": "system", "value": "Add alt names for 7th chords\n" }, { "from": "human", "value": "const chordRegex = require('../src/chord-regex')\nconst tape = require('tape')\n\ntape('Regex against valid chords', function (test) {\n let chords = [\n 'C', 'D', 'E', 'F', 'G', 'A', 'B', // white ...
javascript
chosen
[ { "from": "system", "value": "Fix opening context menu was leaving rightMouseDown stuck on true.\n" }, { "from": "human", "value": "\nvar mousePosition = [140, 20];\n\n$(document).on(\"mousemove\", function (event) {\n mousePosition = [event.pageX - $('.js-mouseContainer').offset().left,\n ...
javascript
chosen
[ { "from": "system", "value": "Fix TotalTracks test after ES6 conversion\n" }, { "from": "human", "value": "\"use strict\";\n\nvar path = '../';\n\njest.autoMockOff();\njest.mock('../../../api/user');\n\ndescribe('TotalTrack Component', function() {\n var React = require('react/addons');\n...
javascript
chosen