conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Use bigger image for user picture\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react';\nimport { Link } from 'react-router';\nimport shouldPureComponentUpdate from 'react-pure-render/function';\nimport selectn from 'selectn';\n\nex...
javascript
chosen
[ { "from": "system", "value": "Swap inputTooLong and inputTooShort error messages\n\n\"Engada\" in galician is \"to add\" and therefore should be the base text used for the inputTooShort method, asking the use to add more chars. It seems to be mistakenly defined exactly the opposite it should be (as inputTo...
javascript
chosen
[ { "from": "system", "value": "Create packet assuming variable LiveID length\n\nFixes #7\n" }, { "from": "human", "value": "var dgram = require('dgram');\n\nconst PORT = 5050\nconst PING_PAYLOAD = \"dd00000a000000000000000400000002\"\nconst POWER_PAYLOAD = \"dd02001300000010\"\n\nmodule.exports =...
javascript
chosen
[ { "from": "system", "value": "Add support for Webpack dev server\n" }, { "from": "human", "value": "var fse = require(\"fs-extra\");\n\nfunction WebpackCopyAfterBuildPlugin(mappings) {\n this._mappings = mappings || {};\n}\n\nWebpackCopyAfterBuildPlugin.prototype.apply = function(compiler) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add async to script tag\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-g-recaptcha',\n\n contentFor: function(type, config) {\n var content = '';\n if (type === 'body-footer') {\n var src =...
javascript
chosen
[ { "from": "system", "value": "Include FullStory recording snippet in content-for header-footer\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-full-story'\n};\n" }, { "from": "gpt", "value": "/* jshint node: true */\n'us...
javascript
chosen
[ { "from": "system", "value": "Improve naming of variable and message\n" }, { "from": "human", "value": "// @flow\n\n/* eslint-disable no-console */\n\nimport path from 'path';\nimport { green } from 'chalk';\nimport inquirer from 'inquirer';\nimport createConfig from '../createConfig';\nimport {...
javascript
chosen
[ { "from": "system", "value": "Fix tests in newer v8 (and io.js)" }, { "from": "human", "value": "'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*function\\*/;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tvar ...
javascript
chosen
[ { "from": "system", "value": "Throw original error if debug module cannot be found\n\nOtherwise all errors end up looking like a problem finding the debug\nmodule, which often isn't the case.\n" }, { "from": "human", "value": "if (process.env.SUPERSTRING_USE_BROWSER_VERSION) {\n module.exports ...
javascript
chosen
[ { "from": "system", "value": "Check if obj is null to avoid TypeError in pino\n\nCurrently I'm getting this error in pino since some obj passed by pino to fast-safe-stringify is null. To avoid this and to restore JSON.stringify(null) behavior an additional null check is introduced here.\r\n\r\n```\r\n if (...
javascript
chosen
[ { "from": "system", "value": "Fix for AM/PM with hours\n\nAM/PM does not have 17 hours, obviously\n" }, { "from": "human", "value": "'use strict';\nvar isWeekend = function (date) {\n var dateString = date,\n weekDay = dateString.getDay(),\n hour = dateString.getHours();\n return ((w...
javascript
chosen
[ { "from": "system", "value": "Fix logger error case at start-up\n" }, { "from": "human", "value": "/* 2017 Omikhleia\n * License: MIT\n *\n * RoomJS bot main.\n */\nconst bunyan = require('bunyan')\nconst dotenv = require('dotenv')\n\nconst RoomJSBot = require('./src/room-js-bot')\nconst pkg = r...
javascript
chosen
[ { "from": "system", "value": "Add support for adding dashboard to elastic search\n" }, { "from": "human", "value": "var fs = require('fs');\nvar minify = require('node-json-minify');\nvar argv = require('minimist')(process.argv.slice(2));\nvar jsesc = require('jsesc');\nvar elasticsearch = requi...
javascript
chosen
[ { "from": "system", "value": "Add link for simple-prefs doc\n" }, { "from": "human", "value": "// see:\n// https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/hotkeys\n// https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/tabs\n// https://developer.mozilla.org/en-US/Add-...
javascript
chosen
[ { "from": "system", "value": "Add missing space for curly. NOTE: Last commit comment was truncated from typo, basically was a fix for Firefox and an escaping bug with window.location.hash.\n" }, { "from": "human", "value": "function uriSync(method, model, options) {\n var resp = null,\n ...
javascript
chosen
[ { "from": "system", "value": "Add req. files to run tests using chai\n" }, { "from": "human", "value": "// Karma configuration\n// Generated on Fri May 10 2013 21:56:54 GMT+0200 (CEST)\n\n\n// base path, that will be used to resolve files and exclude\nbasePath = '';\n\n\n// list of files / patte...
javascript
chosen
[ { "from": "system", "value": "Add coveralls back to list of plugins\n" }, { "from": "human", "value": "module.exports = function(config){\n config.set({\n\n basePath : './',\n\n files : [\n 'app/bower_components/angular/angular.min.js',\n 'app/bower_components/angular-ui-router/...
javascript
chosen
[ { "from": "system", "value": "Add support for (t) subexpressions\n" }, { "from": "human", "value": "/**\n An HTMLBars AST transformation that updates all {{t}} statements to\n ensure they have a namespace argument.\n*/\nvar path = require('path');\n\nfunction EnsureTNamespace(options) {\n thi...
javascript
chosen
[ { "from": "system", "value": "Make sure webpack can remove an unnecessary require from the redux store's entry point\n" }, { "from": "human", "value": "const configureStore = process.env.NODE_ENV === 'development' ?\n './configureStore.dev.js' :\n './configureStore.js';\n\n// eslint-disable-ne...
javascript
chosen
[ { "from": "system", "value": "Tweak css for update box.\n" }, { "from": "human", "value": "$('#dripbot-title').css({\n\t\"display\": \"inline-block\",\n\t\"margin-right\": \"20px\"\n});\n\n$('#dripbot').css({\n \"text-align\": \"left\"\n});\n\n$('#dripbot-toggle.stop').css({\n \"background...
javascript
chosen
[ { "from": "system", "value": "Fix mapbox gl errors in production mode\n" }, { "from": "human", "value": "const webpack = require('webpack');\nconst path = require('path');\nconst common = require('./webpack-common');\n\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst Ug...
javascript
chosen
[ { "from": "system", "value": "Fix Editor/:postId 404 on draft\n\ncloses #2857\n- in EditorRoute, get model from the datastore if it's there\n- if page is refreshed, get model from `/posts` API with `{status: 'all'}`\n" }, { "from": "human", "value": "import styleBody from 'ghost/mixins/style-bod...
javascript
chosen
[ { "from": "system", "value": "Append logs (before it was truncating the log file)\n" }, { "from": "human", "value": "var ini = require('ini');\nvar fs = require('graceful-fs');\nvar Log = require('log');\n\nvar arguments = require(__dirname + '/lib/arguments.js');\n\nglobal.log = new Log('debug'...
javascript
chosen
[ { "from": "system", "value": "Update: Update the name of state being updated\n" }, { "from": "human", "value": "import * as types from './constants';\n\nexport const initialState = {\n openFeedbackModal: false,\n};\n\nconst feedbackReducer =\n(state = initialState, action) => {\n switch (actio...
javascript
chosen
[ { "from": "system", "value": "Fix a typo bug referencing headers\n" }, { "from": "human", "value": "const responseFromObject = (mockResponse, response) => {\n // statusCode\n if (mockResponse.statusCode) {\n response.statusCode = mockResponse.statusCode\n }\n // statusMessage\...
javascript
chosen
[ { "from": "system", "value": "Sort languages by country name\n\nInstead of sorting languages by country\ncode, sort by country name.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nimport countries from './countries';\n\n\nexport default Ember.Component.extend({\n i18n: Ember...
javascript
chosen
[ { "from": "system", "value": "Fix namespace page can not search project name\n\nhttps://github.com/rancher/rancher/issues/21380\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport layout from './template';\nimport { inject as service } from '@ember/service';\n\nc...
javascript
chosen
[ { "from": "system", "value": "Add \"String\" as allowed property\n" }, { "from": "human", "value": "'use strict';\n\nvar utils = require('./utils/utils');\n\n//------------------------------------------------------------------------------\n// General rule - Create local version of Ember.* and DS...
javascript
chosen
[ { "from": "system", "value": "Fix require calls with leading .\n\nSigned-off-by: Nathan Stier <013f9af474b4ba6f842b41368c6f02c1ee9e9e08@gmail.com>\n" }, { "from": "human", "value": "var command = process.argv[2]\nvar target = process.argv[3]\n\nvar concerns = require('cfg/concerns.json')\nvar ty...
javascript
chosen
[ { "from": "system", "value": "Add filenameRelative to opts to support AMD module names\n" }, { "from": "human", "value": "'use strict';\nvar gutil = require('gulp-util');\nvar through = require('through2');\nvar applySourceMap = require('vinyl-sourcemaps-apply');\nvar objectAssign = require('obj...
javascript
chosen
[ { "from": "system", "value": "Fix a bug with non-string zero decimals.\n" }, { "from": "human", "value": "'use strict';\n\nconst defaults = {\n currency: '€',\n currencyPosition: 'after',\n decimals: 2,\n decimalSeparator: ',',\n orderSeparator: '.',\n zeroDecimals: '',\n space: '&nbsp;'\...
javascript
chosen
[ { "from": "system", "value": "Revert \"Add party name to race\"\n\nThis reverts commit 5102a124f45b3f5118f3056200c76ad2fa57e01d.\n" }, { "from": "human", "value": "var fs = require('fs');\nvar chalk = require('chalk');\nvar partiesAbbreviation = require('./util/parties-abbreviations.js');\n\nmod...
javascript
chosen
[ { "from": "system", "value": "Add comment about future regex\n" }, { "from": "human", "value": "'use strict';\nconst xRegExp = require('xregexp');\n\nmodule.exports = (text, separator) => {\n\tif (typeof text !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\tseparator = ty...
javascript
chosen
[ { "from": "system", "value": "Remove problematic maps from export\n" }, { "from": "human", "value": "module.exports = {\n\tdevices: require(\"./src/lib/devices\"),\n\tdrivers: require(\"./src/lib/drivers\"),\n\tevents: require(\"./src/lib/events\"),\n\tmaps: require(\"./src/lib/maps\")\n};" },...
javascript
chosen
[ { "from": "system", "value": "Expand the api to have an all()\n" }, { "from": "human", "value": "var Disclosure = function(el) {\n var self = this;\n self.el = el;\n self.isActive = false;\n self.details = el.querySelectorAll('[data-details]');\n el.addEventListener('click', function(e) { s...
javascript
chosen
[ { "from": "system", "value": "Add a line to inspect VCAP_SERVICES\n" }, { "from": "human", "value": "'use strict';\n\n// Load the http module to create an http server.\nvar http = require('http');\n\nvar listenPort = process.env.VCAP_APP_PORT || 8000;\n\n// Configure our HTTP server to respond w...
javascript
chosen
[ { "from": "system", "value": "Add arrow functions with explicit block bodies." }, { "from": "human", "value": "'use strict';\n\nvar getArrowFunctions = function getArrowFunctions() {\n return [\n\t\tFunction('return (a, b) => a * b;')(),\n\t\tFunction('return () => 42;')(),\n\t\tFunction('ret...
javascript
chosen
[ { "from": "system", "value": "Refactor regular expression digit pattern\n" }, { "from": "human", "value": "module.exports = semanticEditionParse\n\nvar digit = '[1-9][0-9]*'\n\nvar EUCD = new RegExp(\n '^' +\n '(' + digit + ')e' +\n '(?:' +\n '(' + digit + ')u' +\n '(?:' +\n '(' + ...
javascript
chosen
[ { "from": "system", "value": "Use XML as output format\n\n[ci skip]" }, { "from": "human", "value": "'use strict';\n\nvar eco = require('eco');\n\nexports.name = 'eco';\nexports.outputFormat = 'html';\nexports.render = function (str, options) {\n return eco.render(str, options);\n};\n" }, {...
javascript
chosen
[ { "from": "system", "value": "Add from prop to fix imports\n" }, { "from": "human", "value": "var through = require('through-gulp')\nvar gutil = require('gulp-util')\nvar rext = require('replace-ext')\nvar preprocessor = require('sourdough-preprocessor')\nvar PluginError = gutil.PluginError\n\nv...
javascript
chosen
[ { "from": "system", "value": "Add 'use-strict' just to trigger the build\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nmodule.exports = (function() {\n var turboLogo = require('turbo-logo'),\n colors = require('colors/safe');\n\n return {\n print: finalPrint\n ...
javascript
chosen
[ { "from": "system", "value": "Add a toJSON method to the error object\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = makeError;\nfunction makeError(code, message, options) {\n var line = options.line;\n var column = options.column;\n var filename = options.filename;\n v...
javascript
chosen
[ { "from": "system", "value": "Use `.github/DUPLICATE_ISSUE_TEMPLATE.md` if it exists\n" }, { "from": "human", "value": "const fs = require('fs');\nconst Fuze = require('fuse.js');\nconst mustache = require('mustache');\n\nconst template = fs.readFileSync('./template.md', {encoding: 'utf-8'});\n\...
javascript
chosen
[ { "from": "system", "value": "Remove placeholder from state atom\n" }, { "from": "human", "value": "'use strict'\n\nvar State = require('dover')\nvar Observ = require('observ')\nvar emailRegex = require('email-regex')({exact: true})\nvar isEmail = emailRegex.test.bind(emailRegex)\nvar h = requir...
javascript
chosen
[ { "from": "system", "value": "Fix `console` stubbing method in oldIE\n\nExpose `console` object to global scope in IE6 and IE7\n\nReference: gh-1229\n" }, { "from": "human", "value": "// Avoid `console` errors in browsers that lack a console.\n(function() {\n var noop = function noop() {};\n ...
javascript
chosen
[ { "from": "system", "value": "Add alert to test AJAX\n" }, { "from": "human", "value": "document.getElementById(\"ayuda\").setAttribute(\"aria-current\", \"page\");\nvar aside = document.getElementById(\"complementario\");\nvar button = document.createElement(\"BUTTON\");\nvar text = document.cr...
javascript
chosen
[ { "from": "system", "value": "Add @TODO as a reminder to fix the fact that the scrollTo is not working with Safari yet.\n" }, { "from": "human", "value": "function scrollTo(e) {\n var distanceToTop = function (el) {\n try {\n return Math.floor(el.getBoundingClientRec...
javascript
chosen
[ { "from": "system", "value": "Fix computed value in demo\n" }, { "from": "human", "value": "Bureaucracy.start.cols = [\n\t{\n\t\t_id: 'name',\n\t\tname: \"Name\",\n\t\ttype: String\n\t},\n\t{\n\t\t_id: 'date',\n\t\tname: \"Travel Date\",\n\t\ttype: Date\n\t},\n\t{\n\t\t_id: 'age',\n\t\tname: \"A...
javascript
chosen
[ { "from": "system", "value": "Add redis cloud, will it work?\n" }, { "from": "human", "value": "var redis = require('redis'),\n redisCon = module.exports = {};\n\nredisCon.subClient = redis.createClient();\nredisCon.pubClient = redis.createClient();\n\nredisCon.subClient.psubscribe('__keyevent@...
javascript
chosen
[ { "from": "system", "value": "Replace phantomjs shim with es6-shim\n" }, { "from": "human", "value": "/* eslint-env node */\nconst path = require('path');\nvar browsers = ['Chrome'];\n\nif (process.env.NODE_ENV === 'test') {\n browsers = ['PhantomJS'];\n}\n\nmodule.exports = (config) => {\n co...
javascript
chosen
[ { "from": "system", "value": "Add headers common to each request\n" }, { "from": "human", "value": "\"use strict\";\n\nvar port = process.env.PORT || 8080;\nvar file = require(\"fs\").readFileSync;\nvar glob = require(\"glob\");\nvar path = require(\"path\");\n\nvar rested = require(\"rested\");...
javascript
chosen
[ { "from": "system", "value": "Change to hapi.js code instead of express\n" }, { "from": "human", "value": "'use strict';\n\nconst Hapi = require('hapi');\n\nconst server = new Hapi.Server();\nconst port = process.env.PORT || 3000;\nconst verifyToken = process.env.VERIFY_TOKEN || '';\nserver.conn...
javascript
chosen
[ { "from": "system", "value": "Use Object.assign for prompt confg\n" }, { "from": "human", "value": "#! /usr/bin/env ./node_modules/.bin/babel-node\n\n\nimport prompt from 'prompt';\nimport {parse} from 'nomnom';\n\n\nconst schema = {\n properties: {\n name: {\n description: 'Package nam...
javascript
chosen
[ { "from": "system", "value": "Fix version warning when react isn't installed\n\nhttps://github.com/fusionjs/eslint-config-fusion/pull/140" }, { "from": "human", "value": "// @flow\nmodule.exports = {\n extends: [\n 'plugin:flowtype/recommended',\n 'plugin:react/recommended',\n 'plugin:...
javascript
chosen
[ { "from": "system", "value": "Set type to javascript to force JS compilation\n" }, { "from": "human", "value": "'use strict';\n\nconst compiler = require('vueify').compiler;\nconst fs = require('fs');\n\nclass VueBrunch {\n\n constructor(config) {\n this.config = config && config.plugins && ...
javascript
chosen
[ { "from": "system", "value": "Enable flag in first invocation to ensure ember-basic-dropdown doesn't include its styles\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-power-select',\n\n included: function(appOrAddon) {\n var ap...
javascript
chosen
[ { "from": "system", "value": "Add better documentation to library\n" }, { "from": "human", "value": "var Sandbox = require('sandbox');\n\nmodule.exports = exports = function(json, callback) {\n\t// run the code in a sandbox to thwart evil people\n\tvar s = new Sandbox();\n\n\t// in a self execut...
javascript
chosen
[ { "from": "system", "value": "Add comment for timer.unref check" }, { "from": "human", "value": "module.exports = function (promise, timeout, opts) {\n var Promise = promise.constructor;\n var rejectWith = opts && opts.rejectWith;\n var resolveWith = opts && opts.resolveWith;\n ...
javascript
chosen
[ { "from": "system", "value": "Fix to use node path module to join path\n" }, { "from": "human", "value": "var exec = require('child_process').exec;\nvar _ = require('lodash');\nvar Q = require('q');\n\n\nfunction UrlToImage() {\n var api = {};\n\n api.render = function(url, file, opts) {\n...
javascript
chosen
[ { "from": "system", "value": "Make Mocha check for leaks.\n" }, { "from": "human", "value": "!function(mocha) {\n 'use strict';\n\n //mocha.checkLeaks();\n mocha.options.ignoreLeaks = true;\n mocha.globals(['chai', 'BatchGl', 'mocha', 'BatchGlMocks']);\n mocha.run();\n}(mocha);\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Add watcher for jsx files." }, { "from": "human", "value": "var gulp = require('gulp'),\n react = require('gulp-react'),\n gulpIf = require('gulp-if'),\n uglify = require('gulp-uglify'),\n _ = require('underscore'),\n elixir = require('laravel-elixir'...
javascript
chosen
[ { "from": "system", "value": "Rename `master` branch to `main`\n" }, { "from": "human", "value": "'use strict';\nconst chalk = require('chalk');\nconst isRoot = require('is-root');\nconst isDocker = require('is-docker');\n\nmodule.exports = message => {\n\tconst defaultMessage = chalk`\n{red.bol...
javascript
chosen
[ { "from": "system", "value": "Add getter of the size of total tasks.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = class TCache {\n constructor(tag) {\n this.tag = tag;\n\n this._tasks = [];\n this._fetching = false;\n }\n\n _run() {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix the document undefined check\n" }, { "from": "human", "value": "var cookie = require('cookie');\n\nvar _cookies = cookie.parse((document && document.cookie) ? document.cookie : '');\n\nfor (var key in _cookies) {\n try {\n _cookies[key] = JSON.parse(_cookies...
javascript
chosen
[ { "from": "system", "value": "Handle errors without a stack" }, { "from": "human", "value": "/**\n * Remove node_modules/hydro/ entries from the\n * error stacks.\n *\n * @param {Object} hydro\n * @api public\n */\n\nmodule.exports = function(hydro) {\n if (!hydro.get('cleanStacks')) return;\n\...
javascript
chosen
[ { "from": "system", "value": "Fix issue w/ building hyperglue selector data-bind selector\n" }, { "from": "human", "value": "var hyperglue = require('hyperglue');\n\nmodule.exports = function (html, data, scope) {\n var keys = Object.keys(data),\n _data = {},\n _key = typeof sco...
javascript
chosen
[ { "from": "system", "value": "Use Chrome in headless mode\n" }, { "from": "human", "value": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n basePath: ''...
javascript
chosen
[ { "from": "system", "value": "Add assertions to integration tests\n" }, { "from": "human", "value": "'use strict'\n\nvar childProcess = require('child_process')\n\nchildProcess.exec('./index.js', function onBoot (err) {\n if (err) {\n throw err\n }\n})\n" }, { "from": "gpt", "va...
javascript
chosen
[ { "from": "system", "value": "Update template, add more examples.\n" }, { "from": "human", "value": "var DS = require('dslink');\n\nvar Increment = DS.createNode({\n onInvoke: function(columns) {\n // TODO: Support for columns.amount, requires bugfix.\n var previous = link.getNode('/count...
javascript
chosen
[ { "from": "system", "value": "Add method to return current code blessing status\n" }, { "from": "human", "value": "var uuid = require('uuid')\n\nvar blessThisCode = function(){\n var blessingId = uuid.v4()\n var blessing = `Blessing ID #${blessingId}: Our blessings are with you.`\n retu...
javascript
chosen
[ { "from": "system", "value": "Simplify checking to see if Elm tests have passed.\n" }, { "from": "human", "value": "var expect = require('chai').expect;\nvar count = require('count-substring');\nvar htmlToText = require('html-to-text');\n\nmodule.exports = function (browser) {\n describe(\"Th...
javascript
chosen
[ { "from": "system", "value": "[error] Include resolver path to error report in dev mode.\n" }, { "from": "human", "value": "import raven from \"raven\"\nimport { assign } from \"lodash\"\n\nconst blacklistHttpStatuses = [401, 403, 404]\n\nexport const shouldLogError = originalError => {\n if (o...
javascript
chosen
[ { "from": "system", "value": "Read all the lines of the md files and return them in the response\n" }, { "from": "human", "value": "import koaRouter from 'koa-router';\nimport fs from 'fs';\nimport path from 'path'\nimport readline from 'readline';\n\nconst router = koaRouter();\n\nfunction line...
javascript
chosen
[ { "from": "system", "value": "Update query configuration and source name\n" }, { "from": "human", "value": "const ZoomdataSDK = require('zoomdata-client/distribute/sdk/zoomdata-client.node');\n\nasync function run() {\n const application = {\n secure: true,\n host: 'developer.zo...
javascript
chosen
[ { "from": "system", "value": "Fix infrastructure spelling and clean up deprecated code\n" }, { "from": "human", "value": "const express = require('express');\nconst path = require('path');\nconst app = express();\n\napp.use(express.static('./build'));\n\napp.get('/', function (req, res) {\n r...
javascript
chosen
[ { "from": "system", "value": "Allow .js extension for JSX files\n\n" }, { "from": "human", "value": "module.exports = {\n parser: 'babel-eslint',\n extends: [\n 'airbnb',\n 'plugin:ava/recommended',\n ],\n plugins: [\n 'import',\n 'ava',\n ],\n rules...
javascript
chosen
[ { "from": "system", "value": "Fix filepath to source directory when srcDir is specified and the first argument is blank\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n react = require('gulp-react'),\n gulpIf = require('gulp-if'),\n uglify = require('gulp-uglify'),\n ...
javascript
chosen
[ { "from": "system", "value": "Add support for templates named *.nunjucks\n\nFixes #8.\n" }, { "from": "human", "value": "var nunjucks = require(\"nunjucks\");\n\nmodule.exports = function(env, callback) {\n var NunjucksTemplate = function(template) {\n this.template = template;\n };\n\n Nu...
javascript
chosen
[ { "from": "system", "value": "Revert \"incorrect call to this.app.import(). causing issues in consuming app\"\n\nThis reverts commit d41144c032dd2bebe05435251b583ed2631da025.\n" }, { "from": "human", "value": "/* globals module */\n\n'use strict'\n\nmodule.exports = {\n name: 'ember-frost-bunse...
javascript
chosen
[ { "from": "system", "value": "Print help if no args, and add check for subtrees.json file presence.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar path = require('path');\nvar fs = require('fs');\nvar colors = require('colors');\nvar shell = require('./lib/shell');\nvar subtree = ...
javascript
chosen
[ { "from": "system", "value": "Exclude spec from coverage reporting.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(config) {\n\n config.set({\n\n autoWatch: true,\n\n browsers: [\n 'PhantomJS'\n ],\n\n colors: true,\n\n ...
javascript
chosen
[ { "from": "system", "value": "Set to `1` if higher\n" }, { "from": "human", "value": "'use strict';\nvar execFile = require('child_process').execFile;\nvar toDecimal = require('to-decimal');\n\nmodule.exports = function (cb) {\n\tif (process.platform !== 'win32') {\n\t\tthrow new TypeError('Only...
javascript
chosen
[ { "from": "system", "value": "Fix silly typo \"recusrive\" => \"recursive\"\n" }, { "from": "human", "value": "// Requires\nvar Q = require('q');\nvar _ = require('underscore');\n\nvar qClass = require('qpatch').qClass;\n\n// Etcd client\nvar Etcd = qClass(require('node-etcd'), ['watcher']);\n\n...
javascript
chosen
[ { "from": "system", "value": "Use `moment.tz.load` instead of `moment.tz.add` to import initial data in Node.\n\n#94\n" }, { "from": "human", "value": "module.exports = require(\"./moment-timezone\");\nmodule.exports.tz.add(require('./data/packed/latest.json'));\n" }, { "from": "gpt", ...
javascript
chosen
[ { "from": "system", "value": "Add option to build parser with enabled cache\n\nUsage: `require('pegjs?cache!parser.pegjs')`" }, { "from": "human", "value": "var pegjs = require('pegjs');\nvar loaderUtils = require('loader-utils');\n\nmodule.exports = function(source) {\n this.cacheable && this....
javascript
chosen
[ { "from": "system", "value": "Add authorization header to api calls\n" }, { "from": "human", "value": "'use strict';\n\nvar util = require('util');\nvar wrapi = require('wrapi');\n\nvar endpoints = require('./api/slack.json');\n\nfunction slackWrapi(token) {\n\n var opts = {\n qs: {\n t...
javascript
chosen
[ { "from": "system", "value": "Add default saturation, brightness, contrast value\n" }, { "from": "human", "value": "import React from 'react';\nimport { requireNativeComponent } from 'react-native';\nimport PropTypes from 'prop-types';\n\nconst RNPdfScanner = requireNativeComponent('RNPdfScanner...
javascript
chosen
[ { "from": "system", "value": "Make timestamps relative to start time\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst fs = require( 'fs' );\nconst path = require( 'path' );\nconst readline = require( 'readline' );\nconst eol = require( 'os' ).EOL;\nconst moment = require( 'moment'...
javascript
chosen
[ { "from": "system", "value": "Define a 'code' style that can be overwritten by plugins.\n" }, { "from": "human", "value": "module.exports = function (expect) {\n expect.output.addStyle('error', function (content) {\n this.text(content, 'red, bold');\n });\n expect.output.addStyle...
javascript
chosen
[ { "from": "system", "value": "Add decoding of first byte and mask.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(){\n\n};\n" }, { "from": "gpt", "value": "'use strict';\n\nmodule.exports = function(bin){\n let data = {};\n data.fin = !!(bin[0] >>> 7)...
javascript
chosen
[ { "from": "system", "value": "Make minor edit to db help output\n" }, { "from": "human", "value": "const OS = require(\"os\");\nconst serveCommand = require(\"./commands/serve\");\n\nconst usage =\n \"truffle db <sub-command> [options]\" +\n OS.EOL +\n OS.EOL +\n \" Available sub-commands: ...
javascript
chosen
[ { "from": "system", "value": "Refactor JSON escaping to handle slashes better.\n" }, { "from": "human", "value": "const name = 'safe';\nexport default function SafeHelper(config, logger) {\n const _logger = logger.child({helper: name});\n return {\n name,\n cb: (string) => {\n _logg...
javascript
chosen
[ { "from": "system", "value": "Fix parsing of commander options\n" }, { "from": "human", "value": "/**\n * Main CLI parser class\n */\nclass Config\n{\n /**\n * @param {Command} argv\n */\n constructor (argv)\n {\n /**\n * @private\n * @type {boolean}\n ...
javascript
chosen
[ { "from": "system", "value": "Add a scalable threshold for advancing\n" }, { "from": "human", "value": "import html from \"innerself\";\nimport Scene from \"./Scene\";\nimport { SCENES } from \"./actions\"\nimport { connect } from \"./store\";\n\nfunction LevelScore(score, idx) {\n return html`...
javascript
chosen
[ { "from": "system", "value": "Make sure test errors report as a failure\n" }, { "from": "human", "value": "var karma = require('karma');\nvar karmaConfig = require('karma/lib/config');\n\nvar config = karmaConfig.parseConfig(__dirname + '/../karma.conf.js', {\n browsers: [],\n oneShot: true,\n...
javascript
chosen
[ { "from": "system", "value": "Add forward sync support to Atom PDF opener\n\nCalls forwardSync on the PDF view on opening\n" }, { "from": "human", "value": "'use babel'\n\nimport Opener from '../opener'\n\nexport default class AtomPdfOpener extends Opener {\n open (filePath, texPath, lineNumber...
javascript
chosen
[ { "from": "system", "value": "Disable ens for rin and rop since they have a different implementation\n" }, { "from": "human", "value": "import domainSale from '@/assets/images/icons/domain-sale.svg';\nimport domainSaleHov from '@/assets/images/icons/domain-sale-hov.svg';\nimport registerDomain f...
javascript
chosen
[ { "from": "system", "value": "Clarify the use of import aliases\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\nvar babelConfig = require('./babel.json');\n\nmodule.exports = {\n devtool: 'eval',\n entry: [\n 'webpack-dev-server/client?http...
javascript
chosen
[ { "from": "system", "value": "Add el option to layers\n" }, { "from": "human", "value": "module.exports = {\n stylePrefix: 'nv-',\n\n // Enable/Disable globally the possibility to sort layers\n sortable: 1,\n\n // Enable/Disable globally the possibility to hide layers\n hidable: 1,\n\n // ...
javascript
chosen
[ { "from": "system", "value": "Add missing functions from console api\n" }, { "from": "human", "value": "import React from 'react';\n\nconst { string, bool } = React.PropTypes;\n\nconst Console = (props) => {\n if (props.log) {\n console.log(props.log);\n }\n\n if (props.info) {\n consol...
javascript
chosen