messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet TwitterTimeline = {\n init(socket, tweets_container) {\n // Now that you are connected, you can join channels with a topic:\n this.channel = socket.channel(\"twitter_timeline\", {})\n this.container = $(tweets_container)\n... | javascript | edit | 0 | 2 | mit | d7fcda9e22a8c0e43efb15f7ea97b60c42d224ce | kpolitowicz/website,montrealelixir/website,montrealelixir/website,kpolitowicz/website,montrealelixir/website | apps/montreal_elixir_web/assets/js/twitter_timeline.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar dot = require('dot');\n\nhexo.extend.renderer.register('dot', 'html', function(data, locals){\n return dot.template(data.text)(locals);\n}, true);\n```\n\nApply this change: Add hexo requires for hexo3 compliance"
},
{
"rol... | javascript | edit | 0 | 1 | mit | 8371fc577055deee2740b5e3f7410c6e4a4658a6 | hexojs/hexo-renderer-dot | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n/**\n * @module object-loops\n */\nvar dasherize = require('dasherize');\nvar exists = require('101/exists');\nvar envIs = require('101/env-is');\nvar path = require('path');\n\n/**\n * Extends Object.prototype with all \... | javascript | edit | 0 | 3 | mit | ce748b705d242d693f3ce6b34e09b436f10299b3 | tjmehta/object-loops | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Index.js: Add sectionShow function to control menu behavior"
},
{
"role": "assistant",
"content": "window.onload = function() {\n sectionShow();\n};\n\nfunction sectionShow() {\n document.getElementById('about_btn').addEven... | javascript | new_file | 0 | 1 | mit | c014c5fb78e48e241f5491ae2ea5ebd529f954dd | jorgerc85/jorgerc85.github.io,jorgerc85/jorgerc85.github.io | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.name = 'verbatim';\nexports.outputFormat = 'xml';\n\nexports.render = function (str) {\n return '\\n' + str + '\\n';\n}\n\n```\n\nApply this change: Use `'html'` as output format\n\nPer jstransformers/jstransfo... | javascript | edit | 0 | 1 | mit | 8f4826a828a6d53d7ae96c59a040ec9f1685fe0e | jstransformers/jstransformer-verbatim | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar es = require('event-stream');\nvar Mocha = require('mocha');\n\nmodule.exports = function (options) {\n\tvar mocha = new Mocha(options);\n\n\treturn es.through(function (file) {\n\t\tmocha.addFile(file.path);\n\t\tthi... | javascript | edit | 0 | 3 | mit | 75e651cba761fad782dcac3b02695abc5d668e7e | tteltrab/gulp-mocha,sindresorhus/gulp-mocha | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assert = require('assert');\n\nvar WM = require('es6-weak-map');\nvar hasWeakMap = require('es6-weak-map/is-implemented');\nvar defaultResolution = require('default-resolution');\n\nvar runtimes = new WM();\n\nfunct... | javascript | edit | 0 | 4 | mit | ee90fe79a082497352123850eca68ed77384b2aa | gulpjs/last-run,phated/last-run | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports = module.exports = require('./lib/redis');\n\nexports.ReplyError = require('./lib/reply_error');\nexports.Promise = require('bluebird');\nexports.Cluster = require('./lib/cluster');\n\nexports.print = function (err, reply) {\n ... | javascript | edit | 0 | 2 | mit | 64bc0d1a0b1e45d3631388360fba65e04d2c023e | nswbmw/ioredis,luin/ioredis,DynamicYield/ioredis,luin/ioredis,lonely8rain/ioredis,ColmHally/ioredis,phlip9/ioredis,luin/ioredis,xuyanxiang/ioredis,thorsteinsson/ioredis,dguo/ioredis,suprememoocow/ioredis,AVVS/ioredis,mtlima/ioredis,albin3/ioredis,DynamicYield/ioredis,AlphaStaxLLC/ioredis,fracmak/ioredis,paskakaska/iore... | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst url = require('url')\nconst level = require('level')\nconst then = require('then-levelup')\nconst { send, createError, sendError } = require('micro')\n\nconst db = then(level('blog-views'))\n\nmodule.exports = async function (req,... | javascript | edit | 0 | 8 | mit | f433ae4cd007f92646a126b3b0022a8b89a914b5 | micro-analytics/micro-analytics,micro-analytics/micro-analytics-cli,micro-analytics/micro-analytics-cli | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = tempest\ntempest.compile = compile\ntempest.render = render\n\nfunction tempest (s) {\n for (var i = 0, t = 0, p = [], e = [], f, l, o = '{{', c = '}}';;) {\n f = s.indexOf(o, t)\n if (f < 0) brea... | javascript | edit | 0 | 3 | mit | fa8e69618a305104152a4eaa2c1dea96e979f293 | baggo/tempest | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * index.js: Top-level include for flatiron-cli-version\n *\n * (C) 2012, Pavan Kumar Sunkara\n *\n */\n\nvar path = require('path');\n\nvar cliVersion = exports = module.exports;\n\ncliVersion.name = 'cli-version';\n\ncliVersion.at... | javascript | edit | 0 | 5 | mit | 9991f3a3949291d55d6602a180699f9bcc33ab71 | pksunkara/flatiron-cli-version | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\n\nvar path = require('path');\nvar Funnel = require('broccoli-funnel');\nvar MergeTrees = require('broccoli-merge-trees');\n\nmodule.exports = {\n name: 'ember-print-this',\n\n included(app) {\n ... | javascript | edit | 0 | 3 | mit | 53b3b83331c9644d2553ed29f3e310df10ed5e31 | LucasHill/ember-print-this,LucasHill/ember-print-this,LucasHill/ember-print-this | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar createComponent = require('./src/component');\nvar createTemplateComponent = require('./src/template-component');\nvar createAdapter = require('./src/rx/adapter');\nvar React = require('react');\n\nvar RxAdapter = cre... | javascript | edit | 0 | 0 | mit | 43bee11dd6b9380bc4d63dcf40bf6c2d6205e668 | pH200/cycle-react | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// !!\n// This module defines ProseMirror's document model, the data\n// structure used to define and inspect content documents. It\n// includes:\n//\n// * The [node](#Node) type that represents document elements\n//\n// * The [schema](... | javascript | edit | 0 | 0 | mit | 78b81c97464d43457710119d4f76fa5936491ba4 | salzhrani/prosemirror,adrianheine/prosemirror,kiejo/prosemirror,salzhrani/prosemirror,tzuhsiulin/prosemirror,salzhrani/prosemirror,adrianheine/prosemirror,tzuhsiulin/prosemirror,tzuhsiulin/prosemirror,kiejo/prosemirror,kiejo/prosemirror,adrianheine/prosemirror | src/model/index.js | rejected_duplicate | Near-duplicate of sample 86204 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar uuid = require('node-uuid');\nvar CRLF = '\\r\\n';\n\nfunction generate(tuples, options) {\n options = options || {};\n var boundary = options.boundary || uuid();\n var headers = [\n 'From: ' + (options.from || ('nobody ' + Da... | javascript | edit | 0 | 4 | mit | 3a79c68d2df786add359a9732e2cd5fa017e5902 | sergi/mime-multipart | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst bodyParser = require('body-parser');\n\nconst app = express();\napp.use(express.static((__dirname + '/client/public')));\napp.use(bodyParser.json());\n\napp.get('*', (req, res) => {\n res.send... | javascript | edit | 0 | 1 | mit | 5a922377052f8b898ee3a9a394b177649d60ae40 | CrewBuilder/crew-builder,CrewBuilder/crew-builder | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar net = require('net');\nvar util = require('util');\n\nvar MetricClient = function (host, port) {\n this.visorHost = host;\n this.visorPort = port;\n};\n\nMetricClient.prototype.report = function (metric) {\n var client = ne... | javascript | edit | 0 | 2 | apache-2.0 | 5a31c4c00d48245b9be59ece8138e30d838c3477 | dice-cyfronet/monitoring-agent-telnet-client-js | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Load the node-ffi extensions\nrequire('./ffi-extend')\n\n// The main exports is the casting function\nmodule.exports = $\n$._ = $ // legacy. TODO: remove by 0.1.0\n\n// export the exports from the 'import' module\nvar Import = requir... | javascript | edit | 0 | 4 | mit | 96e020b2d831f57129938f6ad0c6670420162208 | telerik/NodObjC,TooTallNate/NodObjC,telerik/NodObjC,mralexgray/NodObjC,jerson/NodObjC,jerson/NodObjC,TooTallNate/NodObjC,mralexgray/NodObjC,jerson/NodObjC | index.js | rejected_duplicate | Near-duplicate of sample 96030 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(value) {\n var length = value.length;\n\n // If `value` is an empty string, then it will have 0 caps and a length of 0,\n // which, when divided, will yield `NaN`. A string with a length of 0 will\n // obvi... | javascript | edit | 0 | 5 | mit | 64d0c5c19883cd8fea610946ae72a780c0023824 | nwitch/caps-rate | index.js | rejected_duplicate | Near-duplicate of sample 92368 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { addError } from './codeship-notifications';\n\ndescribe('codeship-notifications/add-error', () => {\n beforeAll(() => {\n global.atom = {\n notifications: {\n addError: jest.fn(),\n },\n };\n });\n\n a... | javascript | edit | 0 | 1 | mit | 203efd770ea08ee614617563259f2723c79f6267 | cbovis/atom-codeship | lib/codeship-notifications.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar webpack = require('webpack');\nvar WebpackDevServer = require('webpack-dev-server');\n\nvar config = require('./config/webpack.config');\n\n\nvar port = 4000;\nvar ip = '0.0.0.0';\nnew WebpackDevServer(webpack(config)... | javascript | edit | 0 | 2 | mit | 6f8e01bb185a3d9bf9bda12c2f6675e1e6bc3cbc | koodilehto/koodilehto-crm-frontend,bebraw/react-crm-frontend,koodilehto/koodilehto-crm-frontend,bebraw/react-crm-frontend | dev-server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n!function(seine, exports) {\n 'use strict';\n\n var Component = seine.Component,\n Keylogger = demo.Keylogger,\n Player = demo.Player,\n NPC = demo.NPC,\n Tile = demo.Tile;\n\n var World = Component.extend({\n ... | javascript | edit | 0 | 3 | mit | 14ed34a9808a85e1d08e7b5bab9e532bcd4258e6 | reissbaker/gamekernel,reissbaker/gamekernel | demo/world.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * format is {\n * browserName: [versions..]\n * OR\n * browserName: {\n * version: [platforms...]\n * }\n * }\n * for possibilities\n * https://wiki.saucelabs.com/display/DOCS/Platform+Configurator\n */\n\nmodule.expor... | javascript | edit | 0 | 0 | mit | fe4408179c6e92d3a53279952ac25731ae25aa77 | CurtisHumphrey/es6-library-boilerplate | saucelab_browsers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport styled from 'styled-components';\nimport PropTypes from 'prop-types';\nimport theme from 'theme';\n\n\nconst StyledContainer = styled.div`\n background: ${theme.white};\n border-radius: 2px;\n ... | javascript | edit | 0 | 1 | mit | 76b7ac41c71024eb4ca2603a07134f4c455d9c69 | nathanhood/mmdb,nathanhood/mmdb | app/components/LibraryCard/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndocument.getElementById(\"ayuda\").setAttribute(\"aria-current\", \"page\");\n\nvar aside = document.getElementById(\"complementario\");\n\nvar form = document.createElement(\"FORM\");\nvar p = document.createElement(\"P\");\nvar label ... | javascript | edit | 0 | 0 | mit | 268f00a581917bd65bacaf3a459b2366f9225779 | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | scripts/ayuda.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n var xScale = new Plottable.LinearScale();\n var yScale = new Plottable.LinearScale();\n\n var xAxis = new Plottable.XAxis(xScale, \"bottom\");\n var yAxis = new Plottable.YAxis(yScale, \"left\");\n va... | javascript | edit | 0 | 1 | mit | 720f13006153c2643c88702a0720da125e6a86b0 | palantir/plottable,softwords/plottable,palantir/plottable,alyssaq/plottable,jacqt/plottable,NextTuesday/plottable,gdseller/plottable,onaio/plottable,gdseller/plottable,onaio/plottable,jacqt/plottable,alyssaq/plottable,onaio/plottable,RobertoMalatesta/plottable,NextTuesday/plottable,palantir/plottable,jacqt/plottable,so... | tutorials/basicChart/basicChart.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Collect urls to include in sitemap\n//\n\n'use strict';\n\nconst pump = require('pump');\nconst through2 = require('through2');\n\n\nmodule.exports = function (N, apiPath) {\n\n N.wire.on(apiPath, function get_users_sitemap(data... | javascript | edit | 0 | 1 | mit | 58a3b6aacae3131d2d1959875488cd1974a50a6b | nodeca/nodeca.users | internal/common/sitemap/collect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/** Parse a query string into an object mapping param names to values. */\nfunction parseQuery(query) {\n if (query.charAt(0) === '?') {\n query = query.slice(1);\n }\n return query.split('&').reduce(function (map... | javascript | edit | 0 | 2 | bsd-2-clause | 15ade7d0b4cfb38efd84e0013a9cc7d3b5b65c99 | hypothesis/browser-extension,hypothesis/browser-extension,hypothesis/browser-extension,hypothesis/browser-extension | src/help/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (babel) {\n var t = babel.types\n var regex = new RegExp('^(.*)\\\\.jsx$')\n\n const sourceVisitor = {\n Literal (path) {\n if (regex.test(path.node.value)) {\n var replacement = path.node.val... | javascript | edit | 0 | 2 | isc | d0c8a46509575cd1c5657ba0467b69e40566c3b4 | alanshaw/babel-plugin-jsx-strip-ext | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = AsyncCache;\n\nvar LRU = require('lru-cache');\n\nfunction AsyncCache(opt) {\n if (!opt || typeof opt !== 'object') {\n throw new Error('options must be an object');\n }\n\n if (!opt.load) {\n throw new Error('... | javascript | edit | 0 | 5 | isc | 863f97ff4b06a687b4396c010b9d533e9914675a | isaacs/async-cache,isaacs/async-cache | ac.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport { human } from \"./agent\";\nimport { HCH } from \"./hch\";\nimport { parseMessage } from \"./parser\";\n\nconst hch = new HCH(human, 10e6);\nconst startMessage = parseMessage(\"What is the reverse of (1 (2 (3)))?\");... | javascript | edit | 0 | 0 | mit | 0ccbf4d001b11d701a5686b562079471210b08f2 | oughtinc/hch | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar util = require('util');\nvar assert = require('assert');\n\n\n/**\n * Add extend() method to Error type\n * \n * @param subTypeName\n * @param errorCode [optional]\n * @returns {SubType}\n */\n\nError.extend = function(subTypeName, ... | javascript | edit | 0 | 4 | mit | d3c08d88f386e19f6a4b95d56e2821b990081aa6 | jotham/extend-error,joshterrell805-historic/extend-error | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* eslint-env node */\n\nmodule.exports = {\n name: 'ember-cli-eslint',\n\n // TODO: Disable this (or set it to return false) before committing\n isDevelopingAddon: function() {\n return false;\n },\n\n // instr... | javascript | edit | 0 | 6 | mit | 80d820a397c8a7cbd6d4e6db27534a66b922432d | jonathanKingston/ember-cli-eslint,ember-cli/ember-cli-eslint,jonathanKingston/ember-cli-eslint,ember-cli/ember-cli-eslint | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst path = require('path')\n\nconst app = express()\n\napp.use(\n (request, response, next) => {\n const validHeaders = request.headers['accept-encoding'].indexOf('gzip') > -1\n if (!validHea... | javascript | edit | 0 | 2 | mit | e1ef52a4483b0acca16408142139704324a52894 | rhberro/the-react-client,rhberro/the-react-client | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar checkPassive = require('passive-voice')\n\nmodule.exports = function (text, options) {\n return checkPassive(text, options)\n}\n\n```\n\nApply this change: Fix exported function to expect a Common Form"
},
{
"role": "assist... | javascript | edit | 0 | 1 | apache-2.0 | 5c96fbb7a2566552a85144042e7b63160d7c0c46 | anseljh/passive-aggressor | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar through = require('through2'),\n gutil = require('gulp-util'),\n Rollup = require('rollup');\n\nvar PluginError = gutil.PluginError;\n\nmodule.exports = function(options) {\n\n var stream = through.obj(function(file, encoding, ... | javascript | edit | 0 | 3 | mit | 53c5a30ec3edc38e89f46610fad85399841d914f | akavolkol/gulp-rollup-mep | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n'use strict';\n\nvar path = require('path');\nvar fs = require('fs');\nvar through = require('through2');\nvar glob = require('glob');\n\nmodule.exports = function() {\n\n var process = function(filename) {\n var replaceStri... | javascript | edit | 0 | 4 | mit | 710463f471b62b9b7e405148fd7c7a5c2151ee1d | mathisonian/gulp-sass-bulk-import | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-toastr',\n\n included: function(app, parentAddon) {\n var target = (parentAddon || app);\n var bowerDir = target.bowerDirectory;\n\n target.import(bo... | javascript | edit | 0 | 2 | mit | 48aa1d076108d8215a4fd653265d881519dccce2 | GramozKrasniqi/ember-toastr,knownasilya/ember-toastr,knownasilya/ember-toastr,GramozKrasniqi/ember-toastr | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add a crazy hack to symlink \"/var/mobile/Library/AddressBook\" to \"~/Library/AddressBook\" when node-iOS is being run an as non-\"mobile\". This is needed for the AddressBook APIs to work, as internally they use the SQLite database loc... | javascript | new_file | 0 | 0 | mit | 34dd452b65bb10985674e296de6f63e87fb8602b | TooTallNate/node-iOS,TooTallNate/node-iOS | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar babel = require('babel-core');\n\nexports.name = 'babel';\nexports.inputFormats = ['es6', 'babel', 'js'];\nexports.outputFormat = 'js';\n\n/**\n * Babel's available options.\n */\nvar availableOptions = Object.keys(... | javascript | edit | 0 | 4 | mit | 5a9a96c628a53997041695800012291c43053046 | jstransformers/jstransformer-babel | index.js | rejected_duplicate | Near-duplicate of sample 80905 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar electron = require('electron');\nvar app = electron.app;\nvar BrowserWindow = electron.BrowserWindow;\nvar ipc = electron.ipcMain;\n\nvar mainWindow = null;\nvar miniTimerWindow = null;\n\n\napp.on('ready', function () {\n mainWi... | javascript | edit | 0 | 2 | mit | afac4db40e46e85036a653847085e4c22eac04d1 | ruidfigueiredo/electric-tomato,ruidfigueiredo/electric-tomato | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onload = function() {\n sectionShow();\n};\n\nfunction sectionShow() {\n document.getElementById('about_btn').addEventListener('click', function(event) {\n event.preventDefault();\n document.getElementById('about').style.... | javascript | edit | 0 | 1 | mit | f91875c9b27fa51b8e4e1bb51d5e360878e61f80 | jorgerc85/jorgerc85.github.io,jorgerc85/jorgerc85.github.io | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n\n angular\n .module('webrtc.api')\n .service('PeerConnection', PeerConnection);\n\n function PeerConnection($q, $log) {\n\n this.connect = function(id){\n if(!id) {\n ... | javascript | edit | 0 | 2 | mit | daf6e3d2b77a3cfd6979e68dbce03f764bdeed82 | boolinc/peerjs-webrtc-transmitter,boolinc/peerjs-webrtc-transmitter | app/js/api/services/peer.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Continuous delivery server\nconst { spawn } = require('child_process')\nconst { resolve } = require('path')\nconst { createServer } = require('http')\nconst { parse } = require('qs')\n\nconst hostname = '127.0.0.1'\nconst port = 80\n... | javascript | edit | 0 | 3 | mit | 634e1085f5285fb91359da32adac74fdb8423154 | jsonnull/jsonnull.com,jsonnull/jsonnull.com,jsonnull/jsonnull.com | scripts/cd-server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar conf = require('rc')('npm');\n\n/**\n * Get configured proxy\n *\n * @api public\n */\n\nmodule.exports = function () {\n\treturn conf['https-proxy'] ||\n\t\tconf['http-proxy'] ||\n\t\tconf.proxy ||\n\t\tprocess.env... | javascript | edit | 0 | 8 | mit | 0448cb6ab77c2b0dffaa3bda1e59d83aec5f750e | kevva/get-proxy | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * index.js\n * Client entry point.\n *\n * @author Francis Brito <<EMAIL>>\n * @license MIT\n */\n'use strict';\n\n/**\n * Client\n * Provides methods to access PrintHouse's API.\n *\n * @param {String} apiKey API key identifyin... | javascript | edit | 0 | 5 | mit | 00d9413ea04a19c2a1a978991f104e6c4a757044 | francisbrito/ph-node | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport {Transform} from \"./transform\"\nexport {Step, StepResult} from \"./step\"\nexport {canLift, canWrap} from \"./ancestor\"\nexport {joinPoint, joinableBlocks} from \"./join\"\nexport {PosMap, MapResult, Remapping} from \"./map\"\... | javascript | edit | 0 | 0 | mit | eec53f472cac518d19df5fb67c61ad432404885b | ProseMirror/prosemirror-transform | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n function Preloader() {\n this.asset = null;\n this.ready = false;\n }\n\n Preloader.prototype = {\n preload: function () {\n this.asset = this.add.sprite(this.game.width * 0.5 - 110, t... | javascript | edit | 0 | 2 | mit | 12effc7a2aaceafb800c6eb3fcc84c75a3b7624a | opcon/hdyftta,opcon/hdyftta | src/js/preloader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { addDecorator, addParameters } from '@storybook/react';\nimport { withDesign } from 'storybook-addon-designs';\nimport { COLOR } from '../src/constants';\n\naddParameters({\n backgrounds: {\n values: [\n { name: 'Aqua l... | javascript | edit | 0 | 2 | mit | ff7f7d18f9f65f811e370771a00d5f662dc64346 | teamleadercrm/teamleader-ui | .storybook/preview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (<bridge>) {\n // unsafeWindow\n with ({ unsafeWindow: window, document: window.document, location: window.location, window: undefined }) {\n // define GM functions\n var GM_log = function (s) {\n ... | javascript | edit | null | null | mit | 86ae144cccd8cdca5125acc66319e7194640970d | torezzz/greasekit | template.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar optimist = require('optimist'),\n argv;\n\nargv = optimist\n .usage('Pack the input, Usage: $0')\n .alias('h', 'help')\n .describe('h', 'Load this help')\n .argv;\n\nif (argv.help) {\n return optimist.... | javascript | edit | 0 | 0 | unlicense | cd42f833ec0e9e8ec9e228ed741e7f52955df128 | nodar-chkuaselidze/matryoshka | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * merge-descriptors\n * Copyright(c) 2014 Jonathan Ong\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict'\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = merge\n\n/**\n * Module ... | javascript | edit | 0 | 4 | mit | 9ed54d2d46975436da8a656c8a3acf4510722133 | component/merge-descriptors | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = sort\n\nvar severities = {\n true: 2,\n false: 1,\n null: 0,\n undefined: 0\n}\n\nfunction sort(file) {\n file.messages.sort(comparator)\n return file\n}\n\nfunction comparator(a, b) {\n var left ... | javascript | edit | 0 | 4 | mit | 1e984632faa235e11e4a850b3e8a2338201b4104 | wooorm/mdast-message-sort,wooorm/vfile-sort | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar request = require('request');\nvar iconv = new require('iconv').Iconv('euckr', 'utf8');\n\nfunction rqkrCallback(err, response, body) {\n if (response && response.headers['content-type']) {\n if (/charset=(ks_c_... | javascript | edit | 0 | 4 | mit | 4f351a59a7b0ba76573a70516add251d633868a3 | buo/request-korean | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar exec = require('child_process').exec;\nmodule.exports = function sysPrefix() {\n return new Promise(function(resolve, reject) {\n exec('python -c \\'import sys; print(sys.prefix)\\'',\n function(err, stdout) {\n if (... | javascript | edit | 0 | 2 | apache-2.0 | cd34c13b29d73c7c2f8d3ff68de5fc86b07f4c84 | rgbkrk/sys-prefix-promise | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs')\n , spawn = require('child_process').spawn\n\nmodule.exports = function(command) {\n var homePath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE\n\n fs.readFile(homePath+'/.ssh/config'... | javascript | edit | 0 | 3 | mit | 5e2e0ec70234b9424a96cd5453bfd191b457bf9d | romainberger/127-ssh | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar 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 var def =... | javascript | edit | 0 | 1 | mit | 4e6d58912ff64147cb34dec08c3400d5c149708a | kimmobrunfeldt/url-to-image | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nmodule.exports = function (buf) {\n if (!buf || buf.length < 8) return false;\n\n return /^gimp xcf/.test(buf);\n};\n\n```\n\nApply this change: Revert \"make the xcf check a bit more readable\"\n\nDefinitely does not w... | javascript | edit | 0 | 10 | isc | 9a75f350c0cc61245aa96785feaa3fde0cc15aa7 | pskupinski/is-xcf | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar apn = require('apn');\nvar _ = require('lodash');\n\nmodule.exports = function(message, options, callback){\n var defaultOptions = {\n cert: 'cert.pem',\n key: 'key.pem',\n fastMode: true,\n production:... | javascript | edit | 0 | 7 | mit | ba52882a381fea7ce9e7c17515ab2883c0683567 | matiassingers/apn-test | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport TravisCache from 'ember-travis-status/services/travis-cache';\n\nexport default function getTravisStatus(repo, branch) {\n const cachedValue = TravisCache[repo]; // Incase repo is not passed\n let ur... | javascript | edit | 0 | 4 | mit | 7b3070583d1a4ab1c06b225af0bb93a9107f6ddb | elwayman02/ember-travis-status,elwayman02/ember-travis-status,sir-dunxalot/ember-travis-status,sir-dunxalot/ember-travis-status | addon/utils/get-travis-status.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport CodeBlock from './CodeBlock';\n\nexport default class StaticHTMLBlock {\n static propTypes = {\n html: React.PropTypes.string.isRequired\n };\n\n render() {\n const { html } = this.props;\n\n ... | javascript | edit | 0 | 6 | mit | 694772d80f3a8b014c56820d3312f18b5fc49442 | cesarandreu/react-dnd,jgable/react-dnd,arnif/react-dnd,jowcy/react-dnd,nagaozen/react-dnd,zetkin/react-dnd,Reggino/react-dnd,globexdesigns/react-dnd,colbyr/react-dnd,pairyo/react-dnd,wagonhq/react-dnd,numso/react-dnd,nickknw/react-dnd,konce/react-dnd,tomulin1/react-dnd,craigklem/react-dnd,wagonhq/react-dnd,arnif/react-... | site/components/StaticHTMLBlock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require _html-autoload\n$(function() {\n var format_tweet = function() {\n $(\"time\").text(new Date($(\"time\").attr(\"datetime\")).toLocaleString());\n };\n\n $.autopager({\n content: $(\".tweets\"),\n ... | javascript | edit | 0 | 1 | mit | 1e0390bf1bc5acc0f20c55702551d92c92909ec9 | rhenium/aclog,rhenium/aclog,rhenium/aclog | app/assets/javascripts/tweets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// eslint-disable-next-line no-unused-vars\nimport llamaAudio from \"../mp3/llama-2.91.mp3\";\n\n/* global SENTRY_DSN */\n\nconst { hash } = window.location;\nlet config = {};\nif (hash) {\n try {\n config = JSON.parse(decodeURIComp... | javascript | edit | 0 | 0 | mit | 308d3f9136d43a96114391479529995dc568382f | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js | js/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport config from '../config/environment';\n\nexport function initialize(_container, application) {\n const { emberAnchor } = config;\n application.register('config:ember-anchor', emberAnchor, { instantiate: false });\n}\n\nexport de... | javascript | edit | 0 | 2 | mit | 73119b5520140f71c7d4616ba209434119b25e26 | truenorth/ember-anchor,truenorth/ember-anchor,mike-north/ember-anchor,mike-north/ember-anchor,mike-north/ember-anchor,truenorth/ember-anchor | app/initializers/ember-anchor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst knex = require('../../../knex').archive\n\nmodule.exports = function () {\n var selectColumns = [\n 'unique_identifier AS uniqueIdentifier',\n 'ldu_name AS lduName',\n 'team_name AS teamName',\n 'om_name AS omName',\n... | javascript | edit | 0 | 1 | mit | 6a44edca1c08b3800511e5e5c362342fc3638b56 | ministryofjustice/wmt-web,ministryofjustice/wmt-web | app/services/data/get-archive.js | rejected_duplicate | Near-duplicate of sample 72322 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//Needed components\nvar Header = require('../header').component;\nvar Cartridge = require('../cartridge').component;\nvar ContentBar = require('../content-bar').component;\nvar Bar = require('../bar').component;\nvar ContentActions = r... | javascript | edit | 0 | 4 | mit | 03027aadd274791ffd6a335bfad564c77e102fb4 | KleeGroup/focus-components,get-focus/focus-components,anisgh/focus-components,JabX/focus-components,Jerom138/focus-components,Jerom138/focus-components,JRLK/focus-components,Ephrame/focus-components,JRLK/focus-components,asimsir/focus-components,sebez/focus-components,Ephrame/focus-components,anisgh/focus-components,se... | application/layout/app-header.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs'),\n path = require('path'),\n async = require('async'),\n\n IGNORE_FILES = ['index.js', '_servers.js', 'servers.json'],\n SERVERS = [],\n URLS = {};\n\nfs.readdirSync(__dirname).forEach(function (f... | javascript | edit | 0 | 2 | apache-2.0 | 537f7ada9cea295193f42291fb251a2481e9d147 | postmanlabs/postman-runtime,postmanlabs/postman-runtime | test/fixtures/servers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst cwd = require('path').resolve();\nconst fs = require('fs');\nconst { COPYFILE_EXCL } = fs.constants;\n\nfs.copyFile('.eslintrc', '../../.eslintrc', COPYFILE_EXCL, (err) => {\n if (err) console.log('Preserving .eslintrc file fou... | javascript | edit | 0 | 0 | mit | ea51fd742e8a69ce21ba255f42db9362d509c237 | eduardolundgren/eslint-config-liferay | scripts/postinstall.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Main application file\n */\n\n'use strict';\nvar path = require('path');\n\n// Set default node environment to development\nprocess.env.NODE_ENV = process.env.NODE_ENV || 'development';\n\nvar express = require('express');\nvar ... | javascript | edit | 0 | 1 | mit | 903a674df86adbf17b14d2131167affd4195497f | youka-project/youka-server,youka-project/youka-server | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar bogart = require('bogart') \n , router = bogart.router() \n , path = require('path') \n , mysql = require('mysql') \n , util = require('./lib/util').Util \n , settings = require('./config/settings').Settings \n , fs... | javascript | edit | 0 | 1 | mit | b6d4765a298b0da0515d9a94828a37b8788d2375 | bwinkers/ar-bogart,bwinkers/ar-bogart | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// TODO: clean-up\n\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar divide = require( 'compute-divide' );\nvar mean = require( 'compute-mean' );\nvar subtract = require( 'compute-subtract' );\nvar asinh = re... | javascript | edit | 0 | 0 | apache-2.0 | 1e9ecb212d32cbbec09636e9b35429737ea9d418 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/math/base/special/asinh/scripts/accuracy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {extractGithubUrl, renderError, cinvoke} from '../lib/utils'\nimport {all as qall} from 'q'\n\nconst cmp = (one, other) => 0 + (one < other) - (one > other)\nconst cmpKey = key => (one, other) => cmp(one[key], other[key])\n\nexpo... | javascript | edit | 0 | 4 | mit | 6d5068863e3c93c9715f3fa54730394db5cacd89 | weapp/ghpreview,weapp/ghpreview | server/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Mixin from '@ember/object/mixin';\n\nimport { computed, get } from '@ember/object';\nimport { isPresent } from '@ember/utils';\n\nexport default Mixin.create({\n\n /*\n * Default namespace for application\n * container keys.... | javascript | edit | 0 | 2 | mit | ab0efdcf2e852b365a905259e412c8c43b96d349 | tomasbasham/ember-cli-persistence,tomasbasham/ember-cli-persistence | addon/mixins/namespaceable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst config = require('../../config.js')\n\nexports.user = accessToken => {\n return {\n headers: { 'Authorization': `Bearer ${accessToken}` }\n }\n}\n\nexports.bot = { headers: { 'Authorization': `Bot ${config.bot.token}` } }\n\n... | javascript | edit | 0 | 1 | mit | da7414a5e6e476247756bfbf2066c62932feabdd | synzen/Discord.RSS,synzen/Discord.RSS | src/web/constants/discordAPIHeaders.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport m from 'mithril';\nimport Session from '../models/session.js';\nimport GameComponent from './game.js';\nimport UpdateNotificationComponent from './update-notification.js';\nimport SWUpdateManager from 'sw-update-manager';\n\nclas... | javascript | edit | 0 | 4 | mit | 18438dac0da731acaf169bd66bac08c081c0a575 | caleb531/connect-four | app/scripts/components/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPDRClient.directive('permissionsInfo', function() {\n return {\n restrict: 'E',\n transclude: true,\n scope: {\n content: '@',\n placement: '@'\n },\n controller: ['$scope', '$rootScope', '$timeout', function($... | javascript | edit | 0 | 1 | mit | 6bf86383ec27d3b8c4d9ff74ada8b25d44d135f4 | MobilityLabs/pdredesign-server,MobilityLabs/pdredesign-server,MobilityLabs/pdredesign-server,MobilityLabs/pdredesign-server | app/assets/javascripts/client/directives/permissionsInfo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Route = require('../../structures/Route');\nconst Util = require('../../utils/Util');\nconst log = require('../../utils/Log');\n\nclass fileDELETE extends Route {\n\tconstructor() {\n\t\tsuper('/file/:id', 'delete');\n\t}\n\n\tasy... | javascript | edit | 0 | 4 | mit | a891cbc1fc58b5d12bdcc56bc72a790447df9891 | WeebDev/loli-safe,WeebDev/lolisafe,WeebDev/loli-safe,WeebDev/lolisafe | src/api/routes/files/fileDELETE.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst KEY = 'flash-messages'\n\nfunction getMessages() {\n const items = window.sessionStorage.getItem(KEY)\n if (items) {\n try {\n return JSON.parse(items)\n } catch (e) {\n // eslint-disable-next-line no-console\n ... | javascript | edit | 0 | 3 | mit | 0084cc667815e5a45393150a9de0bc014c331e33 | uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend | src/client/utils/flash-messages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n//////////////////////////////////////////////////////////////... | javascript | edit | 0 | 2 | bsd-3-clause | 4935b7b5ffaa1b64db0726dcfdc3c63622fc78e2 | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... | chrome/browser/resources/options/chromeos_system_options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"mocha\": true\n },\n\n \"plugins\": [\n \"mocha\"\n ],\n\n \"rules\": {\n\n // Override to allow asserting that a function throws: (function() { fn(); }).should.throw();\n \"no-wrap-f... | javascript | edit | 0 | 0 | mit | 21e9136abdebe93cbe36d350eaef5c6eb66a2fe9 | Springworks/eslint-config-springworks | mocha.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst Vue = require('vue-test');\nconst _ = require('lodash');\nconst assert = require('assert');\nconst LearnIndex = require('../../src/views/index.vue');\n\nfunction makeVm(options) {\n const Ctor = Vue.extend... | javascript | edit | 0 | 1 | mit | efb6cfcc07072144bcddde21879748b1c90ff07c | MingDai/kolibri,christianmemije/kolibri,rtibbles/kolibri,mrpau/kolibri,DXCanas/kolibri,indirectlylit/kolibri,lyw07/kolibri,rtibbles/kolibri,DXCanas/kolibri,DXCanas/kolibri,MingDai/kolibri,christianmemije/kolibri,benjaoming/kolibri,lyw07/kolibri,benjaoming/kolibri,christianmemije/kolibri,indirectlylit/kolibri,rtibbles/k... | kolibri/plugins/learn/assets/test/views/learn-index.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as React from 'react';\nimport { Platform } from 'react-native';\nimport { BottomTabBar } from 'react-navigation-tabs';\n\nimport {\n type KeyboardState,\n withKeyboardState,\n} from '../keyboard/keyboard-state';\... | javascript | edit | null | null | bsd-3-clause | 0cdc53c21a9adae21fba58a5a7bc4554b43ebce7 | Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal | native/navigation/tab-bar.react.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.RESTSerializer.extend({\n modelNameFromPayloadKey(payloadKey) {\n return this._super(payloadKey);\n },\n\n normalizeResponse(store, primaryModelClass, payload, id, reques... | javascript | edit | 0 | 3 | mit | 107e0cc164119c8e6288c74c6a7dcd605431476f | elwayman02/ember-data-echonest,elwayman02/ember-data-echonest | addon/serializers/echonest-genre.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass CardStackPanResponder {\n}\n\nclass PagerPanResponder {\n}\n\nconst NavigationCard = (props) => null;\n\nNavigationCard.CardStackPanResponder = CardStackPanResponder;\nNavigationCard.CardStackStyleInterpolator = {\n forHorizontal... | javascript | edit | 0 | 1 | mit | ab1d0f5dad1cf41b793aeb0c7952812bdb0468b7 | Root-App/react-native-mock-render,RealOrangeOne/react-native-mock,dingbat/react-native-mock,lelandrichardson/react-native-mock | src/Libraries/NavigationExperimental/NavigationCard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash'),\n express = require('express'),\n STATIC_CACHE_AGE = 365 * 24 * 60 * 60 * 1000; // 1 year;\n\nmodule.exports = function confgureServer(config) {\n var app = express();\n\n function serveIndex(request, ... | javascript | edit | 0 | 3 | bsd-2-clause | 874a593ab2036b85c723b8630aeb06de3d1118c5 | imgix/web-tools | tools/servers/server.spa.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: refactor: Change name used in processor"
},
{
"role": "assistant",
"content": "exports.PLUGIN_NAME = 'eslint-plugin-disable';\nexports.PLUGIN_NAME_SHORT = 'disable';\nexports.PLUGIN_PROCESSOR_NAME = 'disable';\n"
}
] | javascript | new_file | 0 | 0 | mit | f54e4cd322aa93992334670c3139eea07080c365 | mradionov/eslint-plugin-disable | src/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\n\nimport '../css/Search.css';\n\nclass Search extends Component {\n\n render() {\n const { handleSubmit, handleChange, searchTerm } = this.props;\n r... | javascript | edit | 0 | 1 | mit | f88533b140f50d43927337a9cb7c9172eed1be10 | ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos,ayoisaiah/stellar-photos | src/components/Search.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApp.RawTransform = DS.Transform.extend({\n deserialize: function(serialized) {\n return serialized;\n },\n serialize: function(deserialized) {\n return deserialized;\n }\n});\n\nApp.ArrayTransform = App.RawTransform.extend();\... | javascript | edit | 0 | 1 | mit | 70555c03dcfff65e12875aff544f52ba31672e37 | Mause/tumblr-ember | src/js/app/data_utils/transforms.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\nconst program = require('commander')\nconst PipelineRunner = require('../pipeline/runner')\n\nprogram\n .version('scry-css 0.2.1')\n .usage('[options] <type> <dir> <file...>')\n .option(\n '-r --reporter [r... | javascript | edit | 0 | 1 | mit | e36ff3f572965d92530959bcdeb85f3c15f4044a | ovidiubute/scry-css | src/bin/scry-css.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport config from 'app-config';\n\nexport const links = {\n home: {\n to: '/',\n id: 'navigation_home',\n description: 'Go to Home / Landing Page',\n defaultMessage: config.name,\n },\n\n aboutUs: {\n to: '/',\n id... | javascript | edit | 0 | 0 | mit | a199b28d3428a1227c46a21b1be485b1ef3c6224 | Bartekus/r3,opencredo/opencredo-react-boilerplate,Bartekus/r3,opencredo/opencredo-react-boilerplate | src/shared/links.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n( function( $ ) {\n\t'use strict';\n\n\tvar api = wp.customize;\n\n\t// Nav bar text color.\n\tapi( 'amp_navbar_color', function( value ) {\n\t\tvalue.bind( function( to ) {\n\t\t\t$( 'nav.title-bar a' ).css( 'color', to );\n\t\t\t$( 'n... | javascript | edit | 0 | 2 | apache-2.0 | 48d70b3749e4c0e039e57845022c10672f86891b | ampproject/amp-toolbox-php,ampproject/amp-toolbox-php | assets/js/amp-customizer-preview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Print out campaign level counts\n\n// Usage:\n// mongo <address>:<port>/<database> <script file> -u <username> -p <password>\n\nvar cursor = db.campaigns.find({}, {slug: 1, levels: 1});\nvar allFree = 0;\nvar allPremium = 0;\nwhile (... | javascript | edit | 0 | 0 | mit | f50840a11d8b2459ba3b964bedc092089a1e04f8 | codecombat/codecombat,javatlacati/codecombat,SephVelut/codecombat,Fokusnica/codecombat,abhisekp/codecombat,weevilgenius/codecombat,wgsu/codecombat,bsmr-x-script/codecombat,Driphter/codecombat,edtrist/codecombat,Fokusnica/codecombat,SephVelut/codecombat,UltCombo/codecombat,jeremiahyan/codecombat,feifacz/codecombat,eschu... | scripts/analytics/mongodb/queries/campaignLevelCounts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport DocumentTitle from 'react-document-title';\nimport { IssueContainer } from './Issue';\nimport Alternatives from './Alternatives';\nimport { ConcludedIssueListContainer } from '../ConcludedIssueList';\n... | javascript | edit | 0 | 1 | mit | f864069a87737734b342fe560985f22ab7c3385b | dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta | client/src/components/Admin/Home.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n if($('*[data-scrollinity-path]').length > 0) {\n var page_num = 1\n load_path = $('*[data-scrollinity-path]').data('scrollinity-path');\n loading_pic = $('*[data-scrollinity-loading-pic]');\n ... | javascript | edit | 0 | 4 | mit | 625125a6bd792cfc016c4de0cff3524aa980a20c | HeeL/scrollinity | vendor/assets/javascripts/scrollinity.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar meow = require('meow');\nvar w3counter = require('./');\n\nvar cli = meow({\n\thelp: [\n\t\t'Usage',\n\t\t' $ w3counter <type>',\n\t\t'',\n\t\t'Example',\n\t\t' $ w3counter browser',\n\t\t' $... | javascript | edit | 0 | 2 | mit | 31c871c71af261e5603b77c045afbd1170669cad | kevva/w3counter | cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { commands, window, Position, Selection } from 'vscode'\nimport { extensionCommands, extensionCommandsWithInput } from './commands'\nimport { MSG_NO_ACTIVE_TEXT_EDITOR } from './constants'\n\nexport const activate = (context) => ... | javascript | edit | 0 | 2 | mit | 6d442fbac9b46b55a35645ca9bb104f0e77454b8 | jrebocho/vscode-random | src/extension.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport NavigateConstants from '../constants/NavigateConstants'\nimport { ClientError } from '../lib/errors'\n\nexport default async function navigateAction (context, payload) {\n const { location, branch, components, params } = payload... | javascript | edit | 0 | 3 | apache-2.0 | ccf1c88495793e8f7b3b5812812ca28afa032b3a | cesarandreu/bshed,cesarandreu/bshed | client/actions/navigateAction.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {load, read} from 'vega-loader';\n\nexport function loadOptions(_) {\n return arguments.length ? (this._loadopt = _, this) : this._loadopt;\n}\n\nexport function request(target, url, format) {\n var df = this;\n\n df._requests... | javascript | edit | 0 | 3 | bsd-3-clause | 1ac5fe8cf0aa9f85f8e7fbd84b281f3075f02579 | vega/vega-dataflow | src/dataflow/load.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\n window.HandArrow = function(parent) {\n this.followRadius = 0.5;\n this.parent = parent;\n this.mesh = undefined;\n\n new THREE.ObjectLoader().load(\"meshes/MozillaVR-3D-arrow-01.json\", function(mesh) {\n... | javascript | edit | 0 | 2 | apache-2.0 | e826132cb5e94156d38616fd9b9a4e1829c95d9f | leapmotion/VRCollage,leapmotion/VRCollage | javascript/lib/HandArrow.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst $ = require('jquery');\nconst Board = require('./board');\nconst Game = require('./game');\n\nfunction start() {\n var board = new Board();\n var game = new Game(board);\n board.game = game;\n game.welcome();\n\n va... | javascript | edit | 0 | 1 | mit | 8933c81ab20e88eebb5c51626b002946b79e0894 | androidgrl/othello,androidgrl/othello | lib/index.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.