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\nvar url = require('url'),\n add = function (logger, level) {\n loggers.push([logger, level]);\n return fn;\n },\n loggers = [],\n fn,\n Churchill;\n\nfn = function (req, res, next) {\n var requestEnd = re...
javascript
edit
0
2
mit
6bc6776a0722d1b87cf7b2479e01e47432adba59
easternbloc/churchill
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from 'redux-clazz'\nimport Player from './Player'\n\nimport * as PlayerActions from './PlayerActions'\nimport * as PlayerSelectors from './PlayerSelectors'\nimport * as TorrentSelectors from '../Torrent/TorrentSelecto...
javascript
edit
0
1
mit
34a66652a7899c4dd3db344686a25d83d771c07e
TriPSs/popcorn-time-desktop,TriPSs/popcorn-time-desktop
app/api/Player/PlayerContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require('request');\nvar path = require('path');\nvar fs = require('fs');\n\nfunction on_error(err, options) {\n if (options.done) {\n return options.done(err);\n }\n \n throw err;\n}\n\nmodule.exports =...
javascript
edit
0
6
mit
c1ee390354946565c98023fe8754637c87258a2b
demsking/image-downloader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Copyright (c) 2013 Wang Wenlin. See LICENSE for more information */\n\n;(function () {\n var TCP = process.binding('tcp_wrap').TCP\n , _setKeepAlive = TCP.prototype.setKeepAlive\n , _shutdown = TCP.prototype.shutdown;\n\n TCP...
javascript
edit
0
3
mit
20eac5284a5407803e95134891067dcca217d337
soplwang/node-ka-patch
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Dependencies\nvar $ = require(\"/libs/jquery\");\nrequire(\"./libs/sidebar\")\n\n/**\n * init\n *\n * @name init\n * @function\n * @return {undefined}\n */\nexports.init = function () {\n var conf = this._config;\n conf.selecto...
javascript
edit
0
2
mit
1f828e7a37c09150dc634bd69558fabcb338a60f
jillix/engine-sidebar
client/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {helper} from '@ember/component/helper';\n\nexport const DEFAULT_QUERY_PARAMS = {\n posts: {\n type: null,\n visibility: null,\n author: null,\n tag: null,\n order: null\n },\n pages: {...
javascript
edit
0
1
mit
b5d1d5918c2b66b832ea2c903bbc16f69025ae5e
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
ghost/admin/app/helpers/reset-query-params.js
rejected_duplicate
Near-duplicate of sample 97985
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Player from './player.js';\n\n// A player whose moves are not determined through local user interaction, but\n// rather, by a asynchronous getNextMove method that AsyncPlayer subclasses\n// define\nclass AsyncPlayer extends Playe...
javascript
edit
0
1
mit
eae7aaca9dcc5ce8698d5dcbadfbc91142a3bdee
caleb531/connect-four
app/scripts/models/async-player.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMongo.Collection.prototype.helpers = function(helpers) {\n var self = this;\n\n if (self._transform && ! self._helpers)\n throw new Meteor.Error(\"Can't apply helpers to '\" +\n self._name + \"' a transform function already ex...
javascript
edit
0
8
mit
af1cc5e3bb9e63259008d645d4688845eec905f7
stfnbrgh/meteor-nested-collection-helpers
collection-helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n entry: './client/main.js',\n output: {\n path: __dirname + '/public',\n filename: 'bundle.js'\n },\n module: {\n loaders: [\n { test: /\\.css$/, loader: 'style!css' },\n {\n test: /\\.j...
javascript
edit
0
0
apache-2.0
923cfc7c1de49a445c72c42059916ac07e394e56
chacal/nrf-sensor-receiver,chacal/nrf-sensor-receiver,chacal/nrf-sensor-receiver
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar calendar_grid = document.querySelector('div[role=\"grid\"]');\nvar body = document.querySelector('body');\n\nvar disable_scroll = function () {\n// Get a handle on the calendar grid\n $('div[role=\"grid\"]').on('mousewheel', func...
javascript
edit
0
4
apache-2.0
e92c2992283623842ec505f5e557a90c4cf5cdb0
alter-ego/google-calendar-scroll-disabler
code/content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { observable, action } from 'mobx';\n\nclass ReservedTokenStore {\n\n @observable tokens;\n\n constructor(tokens = []) {\n this.tokens = tokens;\n }\n\n @action addToken = (token) => {\n this.tokens.push(token);\n }\n\...
javascript
edit
0
4
mit
bed365606b2ab25026284224facfca153e179928
oraclesorg/ico-wizard,oraclesorg/ico-wizard,oraclesorg/ico-wizard
src/stores/ReservedTokenStore.js
rejected_duplicate
Near-duplicate of sample 95814
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs')\n , findExec = require('find-exec')\n , child_process = require('child_process')\n , players = [\n 'mplayer',\n 'afplay',\n ...
javascript
edit
0
7
mit
6ecd5007398245b8751273a3011a9c1be1a16c3b
shime/play-sound
index.js
rejected_duplicate
Near-duplicate of sample 82748
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (mongoose, properties, schemaExtensions) {\n if (!schemaExtensions) {\n schemaExtensions = {};\n }\n\n if (!schemaExtensions.Account) {\n schemaExtensions.Account = requi...
javascript
edit
0
4
mit
c12332c356d96c9c498ed7b2741d03477e088504
steveukx/mongoose-user-model
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\npref(\"extensions.rspamd-spamness.header\", \"x-spamd-result\");\npref(\"extensions.rspamd-spamness.display.column\", 0);\npref(\"extensions.rspamd-spamness.display.messageScore\", true);\npref(\"extensions.rspamd-spamness.display.messa...
javascript
edit
0
0
bsd-3-clause
8cc25df2908a365b5a4c982c69f51ba7cf17847e
moisseev/rspamd-spamness,moisseev/spamness,moisseev/rspamd-spamness
defaults/preferences/spamness.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Quest = require('./quest')\n\nconst winston = require('winston')\n\nclass CommunityManager {\n static start() {\n if (this.choreTimer) { return winston.info('Community manager already running.') }\n this.choreTime...
javascript
edit
0
2
mit
f9d4f624c3631eb453fa648b54a4ddd43b1f15ff
tinnvec/stonebot,tinnvec/stonebot
src/community/community-manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar through = require('pull-through')\nvar Buffer = require('safe-buffer').Buffer\n\nmodule.exports = function block (size, opts) {\n if (!opts) opts = {}\n if (typeof size === 'object') {\n opts = size\n size = ...
javascript
edit
0
6
mit
405d1abc5c5e285b0544e52c0452fade9a503001
dignifiedquire/pull-block
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar tk = require('rocambole-token');\nvar rocambole = require('rocambole');\n\n\nexports.transformBefore = transformBefore;\nfunction transformBefore(ast) {\n rocambole.moonwalk(ast, radixParam);\n}\n\n\nfunction radix...
javascript
edit
0
6
mit
ed98b6bb59c6e73be7f5e8ae4b2d8c1168d3a5e1
kewah/esformatter-parseint
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n book: {\n assets: \"./book\",\n js: [\n \"test.js\"\n ],\n css: [\n \"test.css\"\n ]\n },\n hooks: {\n init: function() {\n console...
javascript
edit
0
1
apache-2.0
da4d4ab48902229b4b21cabf09569ecae4da0487
rlmv/gitbook-plugin-anchors,gaearon/gitbook-plugin-prism,todvora/gitbook-plugin-image-captions,GitbookIO/plugin,genomecompilermanual/gitbook_plugin,marcusgadbem/gitbook-plugin-anchors-wrapper,wabarr/plugin-wabtheme,gaearon/gitbook-plugin-anchors,rlmv/gitbook-plugin-include,kmelve/gitbook-plugin-typekit,todvora/gitbook-...
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar sizeOf = require('image-size');\nvar loaderUtils = require('loader-utils');\n\nmodule.exports = function(content) {\n this.cacheable && this.cacheable();\n if(!this.emitFile) throw new Error('emitFile is required from module syste...
javascript
edit
0
8
apache-2.0
44498baec5bd40ce416ab0cb4c7ec7e28a31e70b
boopathi/image-size-loader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar port = process.env.PORT || 3000;\nvar data;\n\nvar app = require('express')();\nvar myParser = require(\"body-parser\");\napp.use(myParser.json());\n\nvar server = require('http').Server(app);\nserver.listen(port);\n\napp.post('/', ...
javascript
edit
0
6
mit
fa82a3367fd3e31ad11286d4610f7b8bdc92f9c1
resmio/sombrero
index.js
rejected_duplicate
Near-duplicate of sample 72654
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst getRepos = require('./lib/getRepos');\nconst parseReposToMd = require('./lib/parseReposToMd');\nconst saveToFile = require('./lib/saveToFile');\n\nlet username = 'frenchbread';\nlet path = __dirname + '/repos.md';...
javascript
edit
0
2
mit
a381373f734c53193b92b016621cea977b1d84d8
frenchbread/repos2md
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * (c) Facebook, Inc. and its affiliates. Confidential and proprietary.\n *\n * Types for things in the DOM used in Draft.js. These should eventaully be\n * added to the flow DOM lib itself.\n *\n * @emails oncall+draft_js\n * @flo...
javascript
edit
null
null
mit
bf7420c9c60c3124d5fa096c79a5b5b13e011032
facebook/draft-js
src/component/utils/DraftDOMTypes.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Octokat = require('octokat')\nconst open = require('open')\nconst Promise = require('bluebird')\nvar octo, organization, repository\n\nmodule.exports = function openNotifications (input, opts, token) {\n octo = new Octokat({\n ...
javascript
edit
0
6
mit
28446c571955c7e7b1e306e459379dd453af5e85
RichardLitt/open-github-notifications
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = [\n 'testproxy.php', // open proxy test\n 'tmunblock.cgi',\n 'getheaders9.php',\n 'getheaders2.php',\n 'cgi-bin/common/attr', // open proxy test\n 'scripts/setup.php', // phpMyAdmin se...
javascript
edit
0
0
mit
176b0cb51d7683b79244e0aced8926265b9fc23f
kokarn/web-vuln-scan-list
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar vows = require('vows'),\n assert = require('assert'),\n AssetGraph = require('../lib');\n\nvows.describe('transforms.compressJavaScript').addBatch(function () {\n var test = {};\n [undefined, 'uglifyJs', 'yuicompressor',...
javascript
edit
0
2
bsd-3-clause
ebb4453236ff650432b9bd8a3ec2a70c8cfd8dca
slang800/assetgraph,slang800/assetgraph
test/compressJavaScript-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect;\n\nvar floraCluster = require('../');\n\ndescribe('flora-cluster', function () {\n it('should be an object', function () {\n expect(floraCluster).to.be.an('object');\n }...
javascript
edit
0
1
mit
13dfa98ac05e2d701391d80833f84a9005646235
godmodelabs/flora-cluster
test/flora-cluster.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(RED) {\n \"use strict\";\n var osc = require('osc');\n var dgram = require('dgram');\n \n function QlabIn(config) {\n RED.nodes.createNode(this,config);\n var node = this;\n ...
javascript
edit
0
1
mit
43e4325a1fdc215bf163b648eb7a09c388d31f4d
slevey087/node-red-contrib-qlab,slevey087/node-red-contrib-qlab
qlab.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport var bodies = {\n\t_atmDensity: 1.2230948554874,\n\n\tKerbin: {\n\t\tname: 'Kerbin',\n\t\tradius: 600000,\n\t\trotPeriod: 21600,\n\t\tatmosphere: 70000,\n\t\tatmosphereScaleHeight: 5600,\n\t\tatmosphereColor: 0x0077cc,\n\t\tatmosp...
javascript
edit
0
0
mit
b7b0cd11c49cbef4b113eea87e37fcff2a1a192c
Lokaltog/KeRD,Lokaltog/KeRD
app/assets/js/resources/bodies.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet assert = require('assert'),\n path = require('path'),\n parser = require('../lib/support/browserScript');\n\nconst TEST_SCRIPTS_FOLDER = path.resolve(__dirname, 'browserscripts', 'testscripts');\n\ndescribe('#pars...
javascript
edit
0
1
apache-2.0
5bf7c484a2d325e433105264fad62395a06ae3f5
sitespeedio/browsertime,sitespeedio/browsertime,sitespeedio/browsertime,tobli/browsertime,sitespeedio/browsertime
test/browserScriptTests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar cmm = require(\"__buttercup/classes/commands/command.cmm.js\");\n\nmodule.exports = {\n setUp: function(cb) {\n this.command = new cmm();\n (cb)();\n },\n\n callbackInjected: {\n callsToCallback: functi...
javascript
edit
0
2
mit
b86ed23f1b7949ed0bd5dbfe23cb883f9fcbe652
perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup-pw/buttercup-core,buttercup/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup-pw/buttercup-core
tests/commands/cmmTests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tgr = require(\"__buttercup/classes/commands/command.tgr.js\");\n/*\nmodule.exports = {\n failMe: {\n failmeplease: function(test) {\n console.log(tgr);\n test.fail();\n test.done();\n }\n }\n};\n*/\n\n```\n\n...
javascript
edit
0
1
mit
665cf3ad4235befb89c1f414239bf041896fac75
perry-mitchell/buttercup-core,buttercup-pw/buttercup-core,buttercup/buttercup-core,buttercup-pw/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core,perry-mitchell/buttercup-core
tests/commands/tgrTests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * This file provides the \"app\" namespace, which is the\n * application's main namespace. And it defines the application's Angular\n * module.\n */\ngoog.provide('app');\n\ngoog.require('gmf');\n\n\n/**\n * @type {!angular.Module...
javascript
edit
0
2
mit
d9f20891fe1f8a3af1558613b4f27c3c3c412913
kalbermattenm/ngeo,Jenselme/ngeo,kalbermattenm/ngeo,adube/ngeo,adube/ngeo,Jenselme/ngeo,ger-benjamin/ngeo,ger-benjamin/ngeo,camptocamp/ngeo,camptocamp/ngeo,pgiraud/ngeo,camptocamp/ngeo,adube/ngeo,Jenselme/ngeo,camptocamp/ngeo,pgiraud/ngeo,kalbermattenm/ngeo,pgiraud/ngeo,Jenselme/ngeo,camptocamp/ngeo,adube/ngeo,ger-benj...
contribs/gmf/apps/appmodule.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { shallow } from 'enzyme';\n\nimport Header from './Header';\n\ndescribe('Component: Header', () => {\n const props = {};\n\n it('renders without crashing', () => {\n expect(shallow(<Header {...pr...
javascript
edit
0
1
mit
dd18d0bd88cca645e6273d87a8dd48a05a76e6ab
ResistanceCalendar/resistance-calendar-frontend,dorono/resistance-calendar-frontend,dorono/resistance-calendar-frontend,ResistanceCalendar/resistance-calendar-frontend
src/components/Header/Header.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Application from '../../app';\nimport config from '../../config/environment';\n\nexport default function startApp(attrs) {\n let application;\n\n // use defaults, but you can override\n let attribut...
javascript
edit
0
1
mit
efd1f74fd489f016323f8cf205fcdf7289e610ce
thoov/ember-websockets,thoov/ember-websockets
tests/helpers/start-app.js
rejected_duplicate
Near-duplicate of sample 81079
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('./config/config');\n\nvar express = require('express'),\n app = express(),\n DockerRemote = require(__services + 'docker_remote');\n\napp.get('/', function(req, res){\n // DockerRemote.stats('999f3c428c18').then(function(sta...
javascript
edit
0
3
mit
0f111be9c52fcac4df8e2fbc983fed87754716c7
davidcunha/wharf,davidcunha/wharf
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport logger from 'morgan';\nimport bodyParser from 'body-parser';\nimport passport from 'passport';\nimport http from 'http';\nimport routes from './server/routes';\nimport models from './server/models'...
javascript
edit
0
1
mit
cf7df05d1cf5559a43d76491643686316ab3b121
3m3kalionel/PostIt,3m3kalionel/PostIt
app.js
rejected_duplicate
Near-duplicate of sample 75602
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose');\n\nmongoose.connect('localhost', 'muffin');\n\nconst db = mongoose.connection;\ndb.on('error', console.error.bind(console, 'Connection error:'));\n\nmodule.exports = db;\n\n```\n\nApply this change:...
javascript
edit
0
1
mit
cc98ff7f0b9a4dff9d0c40ffa49afb4c1593927a
muffin/server,kunni80/server
lib/db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n root: true,\n parserOptions: {\n ecmaVersion: 6,\n sourceType: 'module'\n },\n extends: 'eslint:recommended',\n env: {\n browser: true\n },\n rules: {\n }\n};\n\n```\n\nApply this change: Configure ...
javascript
edit
0
0
mit
db288cfa6cf660c58e0228ba2271dd4fcf7243be
akatov/ember-cli,pzuraq/ember-cli,buschtoens/ember-cli,kategengler/ember-cli,cibernox/ember-cli,fpauser/ember-cli,romulomachado/ember-cli,gfvcastro/ember-cli,balinterdi/ember-cli,kellyselden/ember-cli,trentmwillis/ember-cli,HeroicEric/ember-cli,kanongil/ember-cli,jrjohnson/ember-cli,twokul/ember-cli,Turbo87/ember-cli,e...
blueprints/app/files/.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n bodyParser = require('body-parser'),\n app = express(),\n server = require('http').Server(app),\n router = express.Router(),\n request = require('request'),\n config = require('./con...
javascript
edit
0
5
mit
982f13ed0531ad77a4760d9a2fdd70f5f31b0c79
hjamesw93/wallboarder-slack-event
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst LEADERBOARD_SIZE = 10;\n\nclass leaderboard {\n\n constructor () {\n this.db = fbApp.database();\n }\n\n refreshScores (callback) {\n this.db.ref('leaderboard').orderByValue().limitToLast(LEADERBOARD_SIZE).o...
javascript
edit
0
1
mit
17b4a496321c91bfd428c694c0735d1ad91da0e4
BecauseWeCanStudios/dots-connect,BecauseWeCanStudios/dots-connect
leaderboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Mini test', function() {\n it('should work', function () {\n cy.visit(\"https://lga-1543-install-and-integra.staging.checklegalaid.service.gov.uk/start\")\n\n cy.contains('Choose the area you most need help with')\n ...
javascript
edit
0
1
mit
dd7d7b3de7231cc86fef4a3395fe8957e3ff9d38
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
cypress/integration/sample_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar backup = require(\"../lib/backup\");\n\nfunction main(argv) {\n\tvar args = argv.slice(2);\n\tif (args.length !== 2) {\n\t\tconsole.error(\"Usage: github-backup username path\");\n\t\tprocess.exit(-1);\n\t}\n\tbac...
javascript
edit
0
3
mit
1c380d16f4a446c856a6c90c4209081c1ac0047c
ericlathrop/github-backup
bin/github-backup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(configLocalDb) {\n\n var childProcess = require('child_process');\n\n function isoDate() {\n return (new Date()).toISOString().slice(0, 16).replace(/T|:/g, '-');\n }\n\n function dumpLocalDB() {\n var...
javascript
edit
0
2
isc
32c6bd3a692f093cd772003f56a97b5ebba687bb
wolfgangschoeffel/syncdb,wolfgangschoeffel/syncdb
lib/local-db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nexports.directory = function(path) {\n var stats;\n\n try {\n stats = fs.statSync(path);\n } catch (err) {\n if (err.code === 'ENOENT') {\n throw new Error('No such directory ...
javascript
edit
0
4
mit
bb83106480c6b5e6cbf521a1b31a442910efe625
vgno/requirejs-module-build
lib/validate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Kurahen Premium\n// @namespace karachan.org\n// @version 1.0\n// @include http://www.karachan.org/*\n// @include http://karachan.org/*\n// @exclude http://www.karachan.org/*/src/*\n//...
javascript
edit
0
1
mit
c520687f9294b8049b8712b9f6dc2eeea783e4b0
Kurahen-Premium/Kurahen-Premium,Kurahen-Premium/Kurahen-Premium,Kurahen-Premium/Kurahen-Premium
kurahenPremium.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport unified from 'unified';\nimport parse from 'remark-parse';\nimport remark2react from 'remark-react';\n\nexport function convertMarkdownToReact(markdown) {\n const content = unified()\n .use(parse)\n .use(remark2react)\n ...
javascript
edit
0
1
mit
40b68377716852e3cff5b0b248c168def9e8f410
dracula/dracula.github.io
lib/markdown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar Global = require('../global');\nvar search = require('../commands/search');\n\nvar router = express.Router();\n\nrouter.get('/*', function(req, res) {\n var response = '';\n var arg = req.bod...
javascript
edit
0
3
apache-2.0
5cba93d251ac38cac14a7665e8454839e1285f01
woz5999/SlackCommandAPI
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar yaml = require('js-yaml');\nvar fs = require('fs');\n\nmodule.exports = function(file) {\n\n // check for existence first\n if (!fs.existsSync(file)) {\n throw new Error(file + ' doesn\\'t e...
javascript
edit
0
4
mit
b54cc4400e8c450e502a735af831db6fbe8a9b65
SolomoN-ua/load-grunt-config,firstandthird/load-grunt-config,SolomoN-ua/load-grunt-config,firstandthird/load-grunt-config
lib/readfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.ping = function ping (req, res) {\n return res.send('OK', 200);\n}\n\nvar package = require('../package.json')\n\nexports.status = function status (req, res) {\n return res.json({\n status: 'OK',\n pid: process.pi...
javascript
edit
0
1
isc
b94fb5e74f3408313325113ca95eaf0c19bee2ab
sundayliu/npm-www,sundayliu/npm-www,sundayliu/npm-www
routes/healthchecks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst http = require('http');\n\nconst createPath = filePath => http.resolve(__dirname, '..', filePath);\n\nconst paths = {\n indexHtml: createPath('server/public/index.html'),\n publicDir: createPath('server/public'),\n};\n\nmodule.e...
javascript
edit
0
1
mit
6a4c7c89d8dac192d4375d2745dcadb33abad190
commandzpdx/habit-calendar,commandzpdx/habit-calendar,didju/didju,didju/didju
server/config/paths.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar phantom = require(\"phantomjs\")\n, execFile = require(\"child_process\").execFile\n, jn = require(\"path\").join\n, u = require(\"url\")\n, querystring = require(\"querystring\")\n, r2hPath = jn(__dirname, \"../node_mod...
javascript
edit
0
4
mit
ba59fd569c751b8a72288e281ed026a95d486555
w3c/spec-generator,w3c/spec-generator,w3c/spec-generator
generators/respec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function timeoutLimits (metadataBackend) {\n return function timeoutLimitsMiddleware (req, res, next) {\n const { user, authenticated } = res.locals;\n\n metadataBackend.getUserTimeoutRenderLimits(user,...
javascript
edit
0
4
bsd-3-clause
e4067132b064816b89f53192cf36bd201e1137c7
CartoDB/CartoDB-SQL-API,CartoDB/CartoDB-SQL-API
app/middlewares/timeout-limits.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Korean translation for bootstrap-datetimepicker\n * Gu Youn <http://github.com/guyoun>\n */\n;(function($){\n\t$.fn.datetimepicker.dates['kr'] = {\n\t\tdays: [\"일요일\", \"월요일\", \"화요일\", \"수요일\", \"목요일\", \"금요일\", \"토요일\", \"일요일\...
javascript
edit
0
1
apache-2.0
9f970f2def42e8aacff84fc85575a1f6655848f8
rento41/bootstrap-datetimepicker,XanderDwyl/bootstrap-datetimepicker-1,foxythemes/bootstrap-datetimepicker,davidpatters0n/bootstrap-datetimepicker,rento41/bootstrap-datetimepicker,lincome/bootstrap-datetimepicker-1,cnbin/bootstrap-datetimepicker,jperkelens/bootstrap-datetimepicker,XanderDwyl/bootstrap-datetimepicker-1,...
js/locales/bootstrap-datetimepicker.kr.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire.config({\n urlArgs: \"bust=v\"+(new Date().getTime()), // Comment out/remove to enable caching\n baseUrl: \"js/\",\n paths: {\n colt: 'libs/colt.0.2.5'\n }\n});\n\ndefine(['colt'], function (Colt) {\n \n ...
javascript
edit
0
1
mit
4e942b154ccac0ed5619c19f806c8066718d4be8
Fluidbyte/ColtJS
demo/js/main.js
rejected_duplicate
Near-duplicate of sample 67504
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar knex = require('knex'),\n config = require('../../config'),\n dbConfig = config.database,\n knexInstance;\n\nfunction configure(dbConfig) {\n var client = dbConfig.client,\n pg;\n\n if (client === 'pg' ||...
javascript
edit
0
7
mit
57271878c0107ce50add73b7c9305a91ff3d79bc
epicmiller/pages,dbalders/Ghost,adam-paterson/blog,NovaDevelopGroup/Academy,letsjustfixit/Ghost,Gargol/Ghost,novaugust/Ghost,rizkyario/Ghost,JohnONolan/Ghost,mohanambati/Ghost,jorgegilmoreira/ghost,lf2941270/Ghost,tidyui/Ghost,SkynetInc/steam,AlexKVal/Ghost,AlexKVal/Ghost,javorszky/Ghost,olsio/Ghost,syaiful6/Ghost,Xiba...
core/server/data/db/connection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Sequelize = require('sequelize');\n\nlet db;\n\nif (process.env.DATABASE_URL) {\n db = new Sequelize(process.env.DATABASE_URL, {\n dialect: 'postgres',\n protocol:'postgres',\n port: match[4],\n host: match[3],\n l...
javascript
edit
0
0
mit
8a983910adf08af5cdf8fd2fbbb8019db90c4d4c
bwuphan/raptor-ads,bwuphan/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads,Velocies/raptor-ads,wolnewitz/raptor-ads,wolnewitz/raptor-ads,Darkrender/raptor-ads
database/database.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n<script type=\"text/javascript\">\n//\n// Reload the app if server detects local change\n//\n(function() {\n\n function checkForReload() {\n var xhr = new XMLHttpRequest;\n xhr.open('get', 'http://' + document.location....
javascript
edit
null
null
apache-2.0
d299e2577fe3578df508ed9d96887ea49253ff61
tohagan/connect-phonegap,sundbry/connect-phonegap,phonegap/connect-phonegap,sundbry/connect-phonegap,phonegap/connect-phonegap
res/middleware/autoreload.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar std = require('std')\n\n// TODO Send email on error\nmodule.exports = std.Class(function() {\n\n\tvar defaults = {\n\t\tname: 'Logger'\n\t}\n\n\tthis._init = function(opts) {\n\t\topts = std.extend(opts, defaults)\n\t\tthis._name = ...
javascript
edit
0
2
mit
392008c4f5907d15dfd87434944be3842ef175e1
ASAPPinc/std.js,marcuswestin/std.js
Logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction reliableMultiply(a, b) {\n for (;;) {\n try {\n return primitiveMultiply(a, b);\n } catch (error) {\n if (!(error instanceof MultiplicatorUnitFailure)) {\n throw error;\n ...
javascript
edit
0
4
mit
f2f33e935ded1cc6368c30e94933c8c985dbc599
bewuethr/ctci
eloquent_js/chapter08/ch08_ex01.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Twitter from 'twitter'\nimport S3TweetRepository from './lib/s3-tweet-repository'\nimport slscrypt from '../node_modules/serverless-crypt/dists/slscrypt'\n\nconst tweetRepository = new S3TweetRepository(process.env.TWEET_CACHE_BU...
javascript
edit
0
2
apache-2.0
a600c85cda889b79f55d7d62992a90a54d9467a4
ceilfors/realtime-ww2-alexa
packages/core/src/cache-tweets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\"\n\nimport UserList from \"./user_list\"\nimport CategoryColumn from \"./category_column\"\nimport IdeaSubmissionForm from \"./idea_submission_form\"\n\nclass Room extends Component {\n constru...
javascript
edit
0
1
mit
2c6455c95974f70fc3960a09d0d701ecb9dccb91
tnewell5/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,samdec11/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro
web/static/js/components/room.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require signature_pad\n$( document ).ready(function() {\n var wrapper = document.getElementById(\"Signature\"),\n clearButton = document.getElementById(\"clear\"),\n saveButton = wrapper.querySelector(\"[data-action=save]...
javascript
edit
0
2
mit
1c6852058bd117545eef7d05fdc9341d79de80e8
bjmllr/habitat_humanity,bjmllr/habitat_humanity,rubyforgood/habitat_humanity,rubyforgood/habitat_humanity,bjmllr/habitat_humanity,rubyforgood/habitat_humanity
app/assets/javascripts/signature.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint no-console:0 */\n// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/java...
javascript
edit
0
0
apache-2.0
303b3ea00de021788d419b19399057065a5c1f22
thecartercenter/elmo,thecartercenter/elmo,thecartercenter/elmo
app/javascript/packs/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Utils = require('utils');\nconst defaults = require('lodash/defaults');\n\nconsole.log(Util);\n\nconst defaultConfig = {\n baseUrl: '/',\n};\n\nclass JSONAPI {\n constructor(apiConfig) {\n Utils.const(this, 'config', ...
javascript
edit
0
1
mit
8d16059e20af2b1fe1032d8351cd4ab02cad4889
SplitTime/OpenSplitTime,SplitTime/OpenSplitTime,SplitTime/OpenSplitTime
app/javascript/src/jsonapi/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n/**\n * Webpack frontend test (w/ coverage) configuration.\n */\nvar _ = require(\"lodash\");\nvar testCfg = require(\"./webpack.config.test\");\n\nmodule.exports = _.merge({}, testCfg, {\n module: {\n preLoaders: [...
javascript
edit
0
0
mit
39e53117259c23b3f0f775939702d177b3b4a6b8
FormidableLabs/victory-chart,FormidableLabs/victory-chart,GreenGremlin/victory-chart,GreenGremlin/victory-chart
webpack.config.coverage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Add the mouse listeners for the above functions\nfunction linkHover() {\n\twindow.onmouseover = function(event) {\n\t\tif (event.target.matches('a')) {\n\t\t\twindow.webkit.messageHandlers.mouseDidEnter.postMessage(event.target.href)...
javascript
edit
0
2
mit
b7a37e2a25d01de2eb64308b26fc91fb41b39f4d
brentsimmons/Evergreen,brentsimmons/Evergreen,brentsimmons/Evergreen,brentsimmons/Evergreen
Mac/MainWindow/Detail/main_mac.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// js/routes\n\n(function() {\n \"use strict\";\n\n angular.module(\"NoteWrangler\")\n .config(config);\n\n function config($routeProvider) {\n $routeProvider\n .when(\"/notes\", {\n templateUrl: \"../templates/page...
javascript
edit
0
1
mit
e1e6681d0cf0589cb05cfe664a4b270ac56bf1c9
var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training
NoteWrangler/public/js/routes.js
rejected_duplicate
Near-duplicate of sample 77131
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.setup = function(Tests){\n\nvar Suite = require('lib/suite').Suite;\n\nTests.describe('Suites', function(it, setup){\n\n\tsetup('beforeEach', function(){\n\n\t});\n\n\tit('should error out if no `it` named argument is declared',...
javascript
edit
0
2
mit
4e43cc07566d5704831741ad008553c205831c99
keeto/testigo
Specs/suites/Suite.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2017 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n *\n * http://...
javascript
edit
0
0
apache-2.0
18973cb373cd8239af241aa97418257812c7b9e5
google/jsinterop-base,google/jsinterop-base,google/jsinterop-base
java/jsinterop/base/jsinterop.js
rejected_duplicate
Near-duplicate of sample 79401
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n init () {\n Ember.run.schedule('afterRender', () => {\n componentHandler.upgradeAllRegistered();\n });\n },\n\n settingsSnackbar (message) {\n con...
javascript
edit
0
2
mit
b0cfd42f4c031a8d99d9fe79e07a026703a5cc79
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
app/controllers/home/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar express = require('express')\nvar app = express()\nvar dafuq = require('./')\n\nvar argv = require('yargs')\n\t.usage('$0 Leverages command-based api')\n .describe('commands', 'the path to commands directory'...
javascript
edit
0
0
mit
4bb17bc94de157d6a6cefe1f5bd3114d880d8851
Upplication/node-dafuq
src/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n var height = $(\"#page-header\").height()\n $(\"a\").click(function(e) {\n e.preventDefault();\n var href = $(this).attr(\"href\");\n $('html, body').animate({\n scrollTop: $(hre...
javascript
edit
0
1
mit
4c070ecfe37c645ae41ebea99b9e6af32f0f8fb6
dgraph-io/hugo-dgraph-theme,dgraph-io/hugo-dgraph-theme
static/js/custom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst helpers = require('../../shared/helpers');\n\nfunction adjustClasses() {\n if (helpers.isMobile($) === true) {\n $('body').addClass('is-mobile').removeClass('is-desktop');\n }\n else {\n $('body').addClas...
javascript
edit
0
2
mit
edf641fede9453d22c0d0ba3880aedbacb8fafec
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
app/scripts-browserify/mobile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\nvar util = require('util');\n\nvar validateDeprecation = function(value, expectation, options) {\n if (!options.deprecated) {\n return;\n }\n\n var valid = (value instanceof options.dep...
javascript
edit
0
8
mit
fbe9503ca48d64f96d7a16bee9eede329d204617
IrfanBaqui/sequelize
lib/utils/parameter-validator.js
rejected_duplicate
Near-duplicate of sample 88888
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global React ReactDOM */\nvar div = React.DOM.div\nvar h1 = React.DOM.h1\n\nvar MyTitle = React.createClass({\n render () {\n return (\n div(null,\n h1(null, 'A component!')\n )\n ...
javascript
edit
0
1
mit
3ce02018152b99f3a56766af8189ebe4d89e7f6c
sheamunion/fem_intro_react_code_along,sheamunion/fem_intro_react_code_along
js/ClientApp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('config');\nconst crypto = require('crypto');\n\nmodule.exports.info = {\n\tname: 'Rate and Rank',\n\tdescription: 'Interprets and determines the relevant rank for a query',\n\tcategory: 'Fun',\n\taliases: [\n\t\t...
javascript
edit
0
2
mit
5f292e6d92b332fbc23735e3b13e6e3c71b15efa
moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord
server/discord/cogs/rate/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {GLOBAL_VERSION} from \"./constants\";\nimport events from \"./events\";\n\nexport function makeKey({\n\tname,\n\tversion,\n}, args){\n\tconst pieces = [\n\t\tGLOBAL_VERSION,\n\t\tname,\n\t\tversion || 0,\n\t\t...args,\n\t]\n\tfo...
javascript
edit
0
5
apache-2.0
1218a475d509565ffdb17f77229e7e09882c2c50
redfin/stratocacher
packages/stratocacher/src/keys.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//----------------------------------------------------------------------------//\nvar express = require('express');\nvar router = express.Router();\nvar pg = require('pg');\nvar connectionString = require('../modules/db-config.module');...
javascript
edit
0
2
mit
cf99e1301e72356229a9613cbc8fe8ec0c59a5a5
STEMentor/STEMentor,STEMentor/STEMentor
server/routes/profile.route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n @ngdoc service\n * @name umbraco.services.overlayService\n *\n * @description\n * <b>Added in Umbraco 8.0</b>. Application-wide service for handling overlays.\n */\n(function () {\n \"use strict\";\n\n function overlayServic...
javascript
edit
0
4
mit
e96d16536bc827ef96a448c0bbc13cd8e578bb12
tcmorris/Umbraco-CMS,hfloyd/Umbraco-CMS,rasmuseeg/Umbraco-CMS,abryukhov/Umbraco-CMS,JimBobSquarePants/Umbraco-CMS,mattbrailsford/Umbraco-CMS,arknu/Umbraco-CMS,tompipe/Umbraco-CMS,KevinJump/Umbraco-CMS,dawoe/Umbraco-CMS,bjarnef/Umbraco-CMS,dawoe/Umbraco-CMS,umbraco/Umbraco-CMS,tcmorris/Umbraco-CMS,marcemarc/Umbraco-CMS,...
src/Umbraco.Web.UI.Client/src/common/services/overlay.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* ***********************************************************************************************\n\n Unify Project\n\n Homepage: unify-project.org\n License: MIT + Apache (V2)\n Copyright: 2012, Sebastian Fastner, Mainz, G...
javascript
edit
0
3
mit
d25ffaac295662dc452ccb2fa930c254a202c591
unify/unify,unify/unify,unify/unify,unify/unify,unify/unify,unify/unify
unify/framework/source/class/unify/ui/layout/queue/Visibility.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n'use strict';\n\ndefine(['../../../src/client/config'], function(config) {\n\n config.baseUrl = '/';\n\n config.paths.jquery = 'bower_components/jquery/dist/jquery';\n config.paths['thehelp-test'] = 'node_modules/thehelp-test/dist/...
javascript
edit
0
1
mit
588d56393840ef247a923df4d2f6eeabfdbe72b7
thehelp/core,thehelp/core
test/integration/client/dev_setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst normalize = require('path').normalize;\nconst root = 'angular/';\n\nmodule.exports = {\n appRoot: require('path').resolve(__dirname, '..'),\n assetsPath: 'public/assets/',\n src: {\n rootPath: root,\n typesc...
javascript
edit
0
0
mit
4dc62bc4847c92cc6f5e220fc257d50c4ed67e5c
jaesung2061/anvel,jaesung2061/anvel,jaesung2061/anvel
tasks/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// If you are requiring twilio-video from CommonJS,\n//\n// const Video = require('twilio-video');\n//\n// If you are including twilio-video.js from a <script> tag,\n//\n// const Video = Twilio.Video;\n//\n\n// 1.0.0-beta4 and ...
javascript
edit
0
1
mit
e7c7b7ee125c4a514c280403bbf7ac03a9303f2b
teoreteetik/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snip...
video/getting-started/create-video-client/create-video-client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AnimationModule = require('../src/js/visuals/animation/index');\nvar PromiseAnimation = AnimationModule.PromiseAnimation;\nvar Animation = AnimationModule.Animation;\nvar Q = require('q');\n\ndescribe('Promise animation', function()...
javascript
edit
0
1
mit
cfd78346a75cd41e633407879ac20d7044c79be7
pcottle/learnGitBranching,pcottle/learnGitBranching,pcottle/learnGitBranching
__tests__/animation.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\n\nfunction BitRing(capacity) {\n assert.ok(capacity < 32, 'Capacity must be less than 32');\n this.capacity = capacity;\n this.bits = 0;\n this.pos = 0;\n this.length = 0;\n this._count...
javascript
edit
0
3
mit
8223a053c2153793d0fd56051eee7e039ec393f2
uber/airlock
bit-ring.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add user stories and refactor to telephone." }, { "role": "assistant", "content": "// inputs will be:\nvar oddList = [1, 2, 3, 4, 5, 5, 7]\nvar evenList = [4, 4, 5, 5, 6, 6, 6, 7]\n\n//Our functions are:\nfunction Sum(list) {...
javascript
new_file
0
2
mit
6215b406f12d0b99760a5539e6aa68bbf35a8dca
tnewcomb0/Phase-0,tnewcomb0/Phase-0,tnewcomb0/Phase-0
week-7/group_project_solution.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals console */\n/* eslint no-console: 0 */\nimport http from 'http';\nimport { get } from 'lodash';\n\nimport { ENV } from 'config';\nimport { stringifyObjectValues, setResponse, httpRequest } from 'utils';\n\n/**\n * Forwards an...
javascript
edit
0
7
mit
e19d5958f6d1ed7bdcf2331b53400ccd74908dff
Nase00/moirai,Nase00/moirai,Nase00/pantheon,Nase00/moirai,Nase00/pantheon
server/middleware/forward-http-request.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This alert was to test to see if the JavaScript was loaded :)\n// alert(\"Hello World\")\n\n$(document).ready(function() {\n\n\tfunction myFunction() {\n\t\tlet userinput = $(\"#searchbarid\").val();\n\t\t$.post('/searchajax',{data: ...
javascript
edit
0
2
mit
44cd2fa9597ebe190bbf0c30693241925f34da0f
demolia/NYCDA-Assignments,demolia/NYCDA-Assignments
user-information-ajax/static/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport '../styles/WeaveElement.css';\nimport '../styles/Scheme4.css';\n\nclass WeaveElement extends Component {\n constructor() {\n super();\n this.handleClick = this.handleClick.bind(th...
javascript
edit
0
5
mit
fb2bd5aba24cf1144d381403ab82f7da0a78fedf
nobus/weaver,nobus/weaver
src/components/WeaveElement.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n entry: './angular2-bootstrap-confirm.ts',\n output: {\n filename: './angular2-bootstrap-confirm.js',\n libraryTarget: 'umd',\n library: 'ng2BootstrapConfirm'\n },\n externals: {\n 'angular2/core': {\...
javascript
edit
0
0
mit
456de23c7e56c3f8e1061cca0678735b1ffbdbc1
mattlewis92/angular2-bootstrap-confirm,mattlewis92/angular2-bootstrap-confirm
webpack.config.dist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nconst aim = require(\"arangodb-instance-manager\");\n\nexports.create = () => {\n let pathOrImage;\n let runner;\n if (process.env.RESILIENCE_ARANGO_BASEPATH) {\n pathOrImage = process.env.RESILIENCE_ARANGO_BASEPA...
javascript
edit
0
5
apache-2.0
735598fa34216071b9a1cfc211dfe0a91e7dad16
arangodb/resilience-tests
InstanceManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Imports\nimport UserRoles from '../../core/auth/constants/userRoles';\nimport WorkshopListController from './workshop-list.controller';\nimport WorkshopListHeaderController from './workshop-list-header.controller';\nimport { workshop...
javascript
edit
0
1
mit
a4ab990d520f90b2430653a230d00b0905f14a70
ProtaconSolutions/Poc24h-January2017-FrontEnd,ProtaconSolutions/Poc24h-January2017-FrontEnd
src/modules/workshop-list/workshop-list.routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array/float64\n*\n* @example\n* var ctor = re...
javascript
edit
0
0
apache-2.0
a3dd2a013496efee8cc3ab0fef3ac8b165c69720
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/array/float64/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require(\"util\");\nvar tty = require(\"tty\");\n\nvar opts = {\n depth: null,\n // colors: tty.isatty(process.stdin),\n colors: true,\n};\n\nfunction inspect(x) {\n return util.inspect(x, opts);\n}\n\nmodule.expo...
javascript
edit
0
1
mit
b96161cdb6cb8da90e1a998d7147b80926b203be
squiggle-lang/squiggle-lang,saikobee/squiggle,wavebeem/squiggle,saikobee/expr-lang,saikobee/squiggle,wavebeem/squiggle,saikobee/expr-lang,wavebeem/squiggle,saikobee/expr-lang,saikobee/squiggle,squiggle-lang/squiggle-lang,squiggle-lang/squiggle-lang
src/inspect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar devConfig = require('../webpack.dev.config.js');\n\n// If the node_env is NOT set to production, run the webpackdev server\n// Uses the webpack.dev.config.js file for webpack configuration.\nif (pr...
javascript
edit
0
2
isc
de18cab53dbd7766db8d0e92da67eea291d1159f
codefordenver/encorelink,codefordenver/encorelink
server/boot/01-frontend-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// State machine representing URI's\n//\n// Cleans up the logic of connecting via ports,\n// urls or file sockets.\n\nvar state = require('state');\n\nmodule.exports = state({\n // Possible states for the URI\n Initial: state('initial...
javascript
edit
0
1
mit
501fceee14551b946e1161993ac992bc87d84b9d
AdrianRossouw/waif
uri.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.addEventListener('load', function() {\n var context = document.getElementById('display').getContext('2d');\n var display = new Display(context);\n //var game = new Snake(display);\n var video = new VideoGame(display, ...
javascript
edit
0
1
unlicense
db3bcd017d7ea2c0d890c13d8ec7b5945642e0f4
skeeto/ti-game
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar fs = require('fs');\nvar path = require('path');\nvar chalk = require('chalk');\nvar rimraf = require('rimraf');\nvar helpers = require('broccoli-kitchen-sink-helpers');\nvar Watcher = require...
javascript
edit
0
2
mit
d9f65c2e8bed3afa9576b7ae0cf28e7a660f8e2e
rwjblue/broccoli-timepiece
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gulp = require('gulp')\nconst runSequence = require('run-sequence')\nconst harp = require('harp')\nconst webpackStream = require('webpack-stream')\nconst del = require('del')\n\nconst config = require('./config')\n\ngulp.task('cle...
javascript
edit
0
1
mit
64bb28d5db80a5c6e32da653f963d3a672086a03
ipfs/distributions,ipfs/distributions,ipfs/distributions
tasks/build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = function (filename, encoding) {\n\n}\n\n```\n\nApply this change: Add the default values to the parameters." }, { "role": "assistant", "content": "'use strict'\n\n\nmodule.exports = function ...
javascript
edit
0
3
mit
edfcf41c59b7a91daf351004f72bbb09916a5158
rhberro/thenv
index.js
accepted
null
true