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\nfunction setAriaCurrent() {\n\tvar title = document.title;\n\tif title== \"Comunidad hispanohablante de NVDA \" {\n\t\tvar id = \"inicio\"\n\t}\n\tdocument.getElementById(id).removeAttribute(\"accesskey\");\n\tdocument.getElementById(id...
javascript
edit
null
null
mit
c92368448bc56cff32f747927c315eeaa32706fb
nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io
scripts/ariaCurrent.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nexports.init = init;\n\nfunction init(genericAWSClient) {\n return createSimpleQueueServiceClient;\n\n function createSimpleQueueServiceClient(accessKeyId, secretAccessKey, options) {\n options = options || {};\n var client = ...
javascript
edit
0
4
mit
a0271b0d7df25e39e063ab435ffaff6cb2b75bde
mirkokiefer/aws-lib,livelycode/aws-lib,pnedunuri/aws-lib
lib/sqs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Module dependencies.\nvar express = require('express');\nvar router = express.Router();\nvar api = {};\n\n// ALL\napi.appointmentItems = function(req) {\n return req.store.recordCollection('AppointmentItem');\n};\n\n// GET\napi.appo...
javascript
edit
0
1
mit
16145e3e2d5d8599201187638181802c4c503be5
pixiestix826/schedule-me-api,pixiestix826/schedule-me-api
app/http/resources/protected/appointment-items.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\n'use strict';\n\nmodule.exports = function(/* environment, appConfig */) {\n return {\n name: \"<%= name %>\",\n short_name: \"<%= name %>\",\n description: \"\",\n start_url: \"/\",\n display: \"st...
javascript
edit
0
1
mit
80b2f631edd3c5a62859b4df1da087e94ee13da5
san650/ember-web-app,san650/ember-web-app
blueprints/ember-web-app/files/config/manifest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mix from '../src/index';\nimport test from 'ava';\n\ntest('that it can merge config', t => {\n Config.merge({\n versioning: true,\n foo: 'bar'\n });\n\n t.is('bar', Config.foo);\n t.true(Config.versionin...
javascript
edit
0
1
mit
ab1b26745e10b897b8f556db35688b8fce61c47b
JeffreyWay/laravel-mix
test/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport babel from 'rollup-plugin-babel'\nimport resolve from '@rollup/plugin-node-resolve'\nimport json from '@rollup/plugin-json'\nimport autoExternal from 'rollup-plugin-auto-external'\nimport pkg from './package.json'\nimport fs from...
javascript
edit
0
1
bsd-3-clause
04fe6402efb63c476ce24b86bab60b1a1e218903
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'klaussner:svelte',\n version: '0.0.1',\n summary: 'Use the magical disappearing UI framework in Meteor',\n git: 'https://github.com/klaussner/meteor-svelte.git'\n});\n\nPackage.registerBuildPlugin({\n na...
javascript
edit
0
1
mit
1a4c15d6ebbb3034624cea353cc177d8e029f70b
meteor-svelte/meteor-svelte
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'extremeandy:es6-promisify',\n version: '0.1.2',\n summary: 'es6-promisify for Meteor',\n git: 'https://github.com/extremeandy/meteor-es6-promisify',\n documentation: 'README.md'\n});\n\nPackage.onUse(fun...
javascript
edit
0
1
mit
bdbdb92fddc8b893721e6cccfee55d54dfad284d
extremeandy/meteor-es6-promisify
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('String#trim', function () {\n\n it('should be defined', function () {\n assert('Some text').should(respondTo, 'trim');\n });\n\n it('should remove spaces at end and start of string', function () {\n\n va...
javascript
edit
0
2
mit
33934113874f74b65232045e7a5bb764aea85c00
shuaiyunzhang/es5-shim,shuaiyunzhang/es5-shim,lewisje/es5-shim,fashionsun/es5-shim,ljharb/es5-shim,imsun/es5-shim,goodbedford/es5-shim,lewisje/es5-shim,sky-uk/es5-shim,meteor/es5-shim,sky-uk/es5-shim,ljharb/es5-shim,meteor/es5-shim,es-shims/es5-shim,9040044/es5-shim,matthewjh/es5-shim,es-shims/es5-shim,9040044/es5-shim...
test/string.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport resolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport pug from 'rollup-plugin-pug';\nimport babel from 'rollup-plugin-babel';\n\nexport default {\n entry: 'src/index.js',\n format: '...
javascript
edit
0
0
mit
4d6d8d46257be9b507aa5fd739b0c9a8332bbc1f
QuentinRoy/lightmill-js,QuentinRoy/lightmill-js
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar uglify;\ntry {\n uglify = require('uglify-js');\n} catch (err) { /* NOP */ }\n\nprocess.on('message', function(msg) {\n var outputFile = msg.output,\n data = msg.data,\n sourceMap = msg.sourceMap,\n warnings = [];\n...
javascript
edit
0
6
mit
b68c4d6afe2b6d081a6afe47f3a3fd97db2b2f22
walmartlabs/lumbar
lib/uglify-worker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * js-sorting <http://github.com/Tyriar/js-sorting>\n * Copyright 2014-2015 Daniel Imms <http://www.growingwiththeweb.com>\n * Released under the MIT license <http://github.com/Tyriar/js-sorting/blob/master/LICENSE>\n ...
javascript
edit
0
3
mit
1daa9dd1c6d29178fcbbdbfdb4e1e024b9fb6428
Tyriar/js-sorting
lib/odd-even-sort.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @jsx React.DOM */\n'use strict';\n\nvar React = require('react'),\n App = require('./App');\n\nReact.renderComponent(<App />, document.body);\n```\n\nApply this change: Add code to enable React devtools" }, { "role": "ass...
javascript
edit
0
0
mit
62319bbf125884872143583d2ff79d317936b7e4
msikma/react-hot-boilerplate,amysimmons/mememe,mikeastock/LonelyKnight,JulianSamarjiev/redux-friendlist,jonboerner/flipturn,nataly87s/follow-mouse,fatrossy/color_palette,gonardfreeman/moviesDB,prathamesh-sonpatki/openlib-react,gordon2012/friendlist,saitodisse/react-for-idiots,OlehHappy/oleh_011-DnD_React_Native_Box,cha...
scripts/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar GOVUK = GOVUK || {};\n\nGOVUK.performance = GOVUK.performance || {};\n\nGOVUK.performance.stageprompt = (function () {\n\n var setup, setupForGoogleAnalytics, splitAction;\n\n splitAction = function (action) {\n var parts = act...
javascript
edit
0
2
mit
f81ecc0d6d05b9e10d80da70a193cf9601b5f069
alphagov/stageprompt,alphagov/stageprompt
script/stageprompt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'metemq:metemq',\n version: '0.3.2',\n // Brief, one-line summary of the package.\n summary: 'MeteMQ',\n // URL to the Git repository containing the source code for this package.\n git: '',\n // By defa...
javascript
edit
0
1
mit
99db69c79b3fe7e4ab659c8cd1e67787d538162b
metemq/metemq,metemq/metemq
package.js
rejected_duplicate
Near-duplicate of sample 106691
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// These should be easily identifiable and both visually and conceptually unique\n// Don't include symbols that could be misconstrued to have some actual meaning\n// (like a warning sign)\nconst emojis =\n '🦊🐸🦉🦄🐙🐳🌵🍀🍁🍄🌍⭐️🔥🌈...
javascript
edit
0
1
mit
fc83f0e13b2cc7bfefad70b127875fff00b24ef1
PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure,PRX/Infrastructure
cd/src/pipeline-events-handler/etc/execution-emoji.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"A meteorite package that makes building dynamic two way forms easy\",\n version: '0.2.1',\n name: \"joshowens:simple-form\",\n git: 'https://github.com/MeteorClub/simple-form'\n});\n\nPackage.onUse(fu...
javascript
edit
0
1
mit
f81347d9fb7f1ea6c75aaf17bc6f8d5bf5851236
meteorclub/simple-form
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default ({ compiled: { html }, file }) =>\n new Promise(resolve => {\n // eslint-disable-next-line\n console.log(`<!-- FILE: ${file} -->\\n${html}`)\n resolve()\n })\n\n```\n\nApply this change: Use `process.stdout.wri...
javascript
edit
0
1
mit
3e4891edc2982234affe74f36e1b16062b8a72d5
mjmlio/mjml
packages/mjml-cli/src/commands/outputToConsole.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { BaseHandler, METHODS } from '@r/platform/router';\nimport * as subredditActions from 'app/actions/subreddits';\n\nexport default class ToggleSubredditSubscription extends BaseHandler {\n async [METHODS.POST](dispatch) {\n d...
javascript
edit
0
1
mit
ebdcf420ff5ddbded791456f7e5f17f8bc328ea3
ajacksified/reddit-mobile,ajacksified/reddit-mobile,ajacksified/reddit-mobile,ajacksified/reddit-mobile
src/app/router/handlers/ToggleSubredditSubscription.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from \"ava\";\n\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst localesPath = path.join(__dirname, \"..\", \"locales\");\nfs.readdir(localesPath, (err, filenames) => {\n if (err) throw err;\n \n con...
javascript
edit
0
4
apache-2.0
e6acbd0c0e537061373cc8f877264681c5b9b476
z-------------/cumulonimbus,z-------------/cumulonimbus,z-------------/cumulonimbus
test/locales.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nArtist = (function(){\n\n // Artist constructor. Given an object describing an artist, copy\n // all of its local properties into `this'.\n var Artist = function(record) {\n };\n\n Artist.prototype = {\n // Create a new record ...
javascript
edit
0
1
bsd-2-clause
ba4738a3246f53c944e84a37ce3ba2f5bc30f20c
rm-training/advanced-js,rm-training/advanced-js
www/discography/js/models/artist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Footer Messages\n *\n * This contains all the text for the Footer component.\n */\nimport { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n header: {\n id: 'app.components.Footer.header',\n default...
javascript
edit
0
0
mit
1d28b0b58b0dca8aeb81afc182a53686e09b211b
tarioto/Portfolio,tarioto/Portfolio
app/components/Footer/messages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Simple component to display a font icon (i.e. glyphicon or fontawesome)\n */\nconst React = require('react');\nconst classNames = require('classnames');\n\nclass Icon extends React.Component {\n render() {\n const cx = class...
javascript
edit
0
1
mit
eb45903f169d27dc361488556a3b508ed98cbf86
Opstarts/opstarts-ui
src/icon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar Router = require(\"../router\");\n\nexports.testValidAcceptHeader = function (test) {\n\tvar results = Router.prototype._parseAcceptHeader(\"application/json\");\n\ttest.deepEqual([{\n\t\t\"type\": \"application\"...
javascript
edit
0
1
isc
d9cc135578fe736adb5fc3d407ae3ea94a76b066
whymarrh/mattress
tests/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createTransform } from 'redux-persist';\nimport CryptoJSCore from 'crypto-js/core';\nimport AES from 'crypto-js/aes';\nimport { makeEncryptor, makeDecryptor } from './helpers';\n\nconst makeSyncEncryptor = secretKey =>\n makeE...
javascript
edit
0
2
mit
915030ff1fa7c525dee93488d8adcf76cc53dea1
maxdeviant/redux-persist-transform-encrypt,maxdeviant/redux-persist-transform-encrypt
src/sync.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function serviceColor(serviceTypeId) {\n const Colors = {\n purple: '#e8e9fc',\n orange: '#ffe7d6',\n green: '#e8fce8',\n gray: '#eee'\n };\n\n const map = {\n 507: Colors.orange,\n 502: Colors.green,...
javascript
edit
0
2
mit
4a658134c6d2e8ef5a4b7092dcf56a1ce602dcaf
studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights
app/assets/javascripts/student_profile/service_color.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const resourceBreadcrumbs = {\n template: '<breadcrumbs items=\"$ctrl.items\" active-item=\"$ctrl.activeItem\"/>',\n bindings: {\n resource: '<'\n },\n controller: class ResourceBreadcrumbsController {\n constructor(Res...
javascript
edit
0
2
mit
77f8b1e5e48505856f1a3729a0067cc0673d5016
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/components/resource/resource-breadcrumbs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport commonjs from '@rollup/plugin-commonjs';\nimport glslify from 'rollup-plugin-glslify';\nimport resolve from '@rollup/plugin-node-resolve';\nimport copy from \"rollup-plugin-copy\";\n\n\nexport default {\n input: ['source/gltf-...
javascript
edit
0
0
apache-2.0
27c6b92e18e69f1e705596414467abd9ff660157
KhronosGroup/glTF-Sample-Viewer,KhronosGroup/glTF-Sample-Viewer
rollup.config.js
rejected_duplicate
Near-duplicate of sample 74894
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {globalShortcut} = require('electron').remote\nconst assert = require('assert')\n\ndescribe('globalShortcut module', () => {\n beforeEach(() => {\n globalShortcut.unregisterAll()\n })\n\n it('can register and unregister acce...
javascript
edit
0
3
mit
b017d2d324a5c0ad8b116eee2ff09c48a4925491
wan-qy/electron,kokdemo/electron,deed02392/electron,miniak/electron,thomsonreuters/electron,electron/electron,rreimann/electron,biblerule/UMCTelnetHub,noikiy/electron,leethomas/electron,miniak/electron,leethomas/electron,gerhardberger/electron,deed02392/electron,tinydew4/electron,dongjoon-hyun/electron,tonyganch/electr...
spec/api-global-shortcut-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { terser } from \"rollup-plugin-terser\";\nimport filesize from \"rollup-plugin-filesize\";\nimport license from \"rollup-plugin-license\";\n\nexport default [\n {\n input: \"src/js.cookie.mjs\",\n output: [\n // conf...
javascript
edit
0
0
mit
ac129d269eea79c21f763c2060a663513d5d9043
carhartl/js-cookie,js-cookie/js-cookie,carhartl/js-cookie,js-cookie/js-cookie
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n\t_moon.Button_ is an <a href=\"#enyo.Button\">enyo.Button</a> with Moonstone\n\tstyling applied. The color of the button may be customized by specifying a\n\tbackground color.\n\n\tFor more information, see the documentation on\n\...
javascript
edit
0
1
apache-2.0
b69f528b0251817b8a4349b7ddccdf9bf29adb39
mcanthony/moonstone,enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone
source/Button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nvar mixpanel = window.mixpanel;\n\nexport default Ember.Mixin.create({\n content: mixpanel,\n\n people: function() {\n return Ember.ObjectProxy.extend({\n content: function() {\n if (mixpan...
javascript
edit
0
3
mit
ee95e86ea6b836b13fb3c512997aa5c5d5f377e2
minichate/ember-mixpanel
addon/mixpanel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Spectrum Colorpicker\n// Brazilian (pt-br) localization\n// https://github.com/bgrins/spectrum\n\n(function ( $ ) {\n\n var localization = $.spectrum.localization[\"pt-br\"] = {\n cancelText: \"Cancelar\",\n chooseTe...
javascript
edit
0
1
mit
334f2cfdded8f73ea4647e3c115d357403fa1299
GerHobbelt/spectrum,liitii/spectrum,ajssd/spectrum,armanforghani/spectrum,GerHobbelt/spectrum,armanforghani/spectrum,safareli/spectrum,maurojs25/spectrum,shawinder/spectrum,kotmatpockuh/spectrum,ginlime/spectrum,ginlime/spectrum,liitii/spectrum,shawinder/spectrum,maurojs25/spectrum,safareli/spectrum,c9s/spectrum,kotmat...
i18n/jquery.spectrum-pt-br.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable flowtype/require-parameter-type, flowtype/require-return-type */\nimport {same} from \"tap\"\nimport {replace} from \"ramda\"\n\nimport mapKeys from \"./\"\n\nsame(\n mapKeys(replace(/new/, \"\"))({\n newLabel: \"1...
javascript
edit
0
0
isc
7c4b3a088e9ccd1d6378010887e7ae795589cb0d
krainboltgreene/ramda-extra.js,krainboltgreene/unction.js
source/mapKeys/test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport R from 'ramda';\nimport React from 'react';\n\nconst getDisplayName = (Component) => (\n Component.displayName || Component.name || 'Component'\n);\n\nconst subscribe = (component, store, name) => (\n // subscribe to a store.\n...
javascript
edit
0
3
isc
6942733ea789cd8b6b56021633ddf89d9e3a923c
Intai/bdux
src/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ($(this).val() && Number($(this).val()) > 0)\n\nfunction isValidAmount(input) {\n var maxVal = 100000000\n var minVal = 0\n\n var value = input.split('.')\n var pounds = value[0]\n var pence = value[1]\n pounds = po...
javascript
edit
0
8
mit
ebd8a166cecbdb0945fb18008a8becc17f22358d
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
cla_public/static-src/javascripts/modules/currencyInputValidation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n widgets: [\n {name: 'sanity-tutorials', layout: {width: 'full'}},\n {name: 'document-list'},\n {name: 'document-count'},\n // {name: 'cats', layout: {width: 'medium'}, options: {imageWidth: 50}},\n // ...
javascript
edit
0
0
mit
39c89de8dc47d3e66c33e74d8c28c32cde002cc6
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/test-studio/src/dashboardConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n \"backbone\"\n, \"pouchdb\"\n, \"backbone-pouch\"\n], function(\n Backbone\n, PouchDB\n, BackbonePouch\n) {\n\n function setup(currentUser) {\n if (!currentUser.isLoggedIn())\n return\n\n var dbname = 'todos-' +...
javascript
edit
0
2
apache-2.0
078e578f2202f1be416799326506c605693adb71
backblend/todos-offline,backblend/todos-offline
www/static/models/setupPouch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * client.js: Base client from which all AWS clients inherit from\n *\n * (C) 2012 Nodejitsu Inc.\n *\n */\n\nvar utile = require('utile'),\n request = require('request'),\n base = require('../core/base');\n\nvar Client = expo...
javascript
edit
0
7
mit
1e41253bb748c9b3d058ccff21215e00bdf2e340
mdsummers/pkgcloud,songanbui/pkgcloud,andrewsomething/pkgcloud,mcanthony/pkgcloud,dionjwa/pkgcloud,apla/pkgcloud,DonSchenck/pkgcloud,Phanatic/pkgcloud,Hopebaytech/pkgcloud,hacor/pkgcloud,pkgcloud/pkgcloud,Phanatic/pkgcloud,bunglestink/pkgcloud,temka1234/pkgcloud
lib/pkgcloud/amazon/client.js
rejected_duplicate
Near-duplicate of sample 86367
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\nconst models = require('../models/index')\nconst fuzz = require('fuzzball')\n\nasync function productPrice (query, user) {\n const [products] = awa...
javascript
edit
0
2
mit
23e2b3915bcd6fcbcac715742c8cf87ec3e84263
bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop
lib/botUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nWizard.registerRouter('iron:router', {\n go: function(name, stepId) {\n Router.go(name, this.getParams(stepId));\n },\n getParams: function(stepId) {\n return Tracker.nonreactive(function() {\n var route = Router.current()...
javascript
edit
0
4
mit
02b7610b6acc81a911e1bdb055be830f955ad6da
forwarder/autoform-wizard-iron-router
client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Controller } from \"controllers/controller.js\";\nimport { mapName } from \"utils.js\";\nimport { Ajax } from \"ajax.js\";\n\nexport class ResourcesController extends Controller {\n constructor(base) {\n\tsuper(base);\n\t\n\...
javascript
edit
0
2
mit
df5a7e0a5eaba7e6d49a4507a2763ca4a634b3e8
marriola/SWAPI-demo,marriola/SWAPI-demo
app/controllers/resources.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport $ from 'jquery';\n\nexport default class BasisSelect {\n constructor() {\n this.select = $('[data-c=\"select\"]');\n this.select.each((i, e) => {\n const selectWrapper = $(e);\n const select = se...
javascript
edit
0
1
mit
40004498a04d8e7e87faa69a63b2b69741159045
sass-basis/basis
src/js/select.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst numberRegex = /_number$/\n\nexport default function extractFromDOM(args) {\n const targetProperty = 'currentTarget'\n // If being passed an event with DOM element that has a dataset\n if (args[0] && args[0][targetProperty] && a...
javascript
edit
0
2
mit
8918b858a8d8ab583756bdae3f6ccf2d010a7c8c
RoyalIcing/react-organism
src/adjustArgs/extractFromDOM.js
rejected_duplicate
Near-duplicate of sample 83628
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\r\n * API routes for interacting with the database\r\n */\r\n\r\nimport express from 'express';\r\nconst router = express.Router();\r\n\r\nrouter.get(\"/\", function(req, res) {\r\n // res.sendFile(__dirname + \"/public/index.htm...
javascript
edit
0
2
mit
1a1096598fa72fb308965e4a9854418710038621
Keitarokido/tiles,Keitarokido/tiles
src/apiRoutes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport { shallowEqual } from 'recompose'\nimport { objectEach } from 'fela-utils'\n\nimport createTheme from './createTheme'\n\nexport default function ThemeProviderFactory(\n BaseComponent: any,\n renderChildren: Functio...
javascript
edit
null
null
mit
fad95a6071d39e649916f534f8561bd1fadd8a4a
derek-duncan/fela,rofrischmann/fela,risetechnologies/fela,risetechnologies/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,derek-duncan/fela,risetechnologies/fela,rofrischmann/fela,rofrischmann/fela
packages/fela-bindings/src/ThemeProviderFactory.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n tagName: 'span',\n theme: 'default',\n off: 'Off',\n on: 'On',\n toggled: false,\n\n inputClasses: Ember.observer('themeClass', 'inputCheckbox', function () {...
javascript
edit
null
null
mit
ac4df0c99a4ccab30d8f3d242211c0155ebb619f
knownasilya/ember-toggle,knownasilya/ember-toggle,lifegadget/ember-cli-toggle,paulkogel/ember-cli-toggle,lifegadget/ember-cli-toggle,knownasilya/ember-cli-toggle,paulkogel/ember-cli-toggle,knownasilya/ember-cli-toggle
app/components/x-toggle.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { takeLatest } from 'redux-saga';\nimport HttpService from '../services/HttpService';\n\nimport { ProfileTypes } from './profile/redux';\nimport profileRequest from './profile/sagas';\n\nimport { UserRepositoriesTypes } from './u...
javascript
edit
0
1
mit
14c3009f4899e9400e5e533062b877feec1fc3c7
matheusmariano/react-fission,matheusmariano/react-fission
app/data/sagas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint forin:true sub:true anon:true, sloppy:true, stupid:true nomen:true, node:true continue:true*/\n/*\n * Copyright (c) 2014, Yahoo! Inc. All rights reserved.\n * Copyrights licensed under the New BSD License.\n * See the accompany...
javascript
edit
0
3
bsd-3-clause
e8a0872e2d8a0b28ce8718bc754f205ab289d98f
yahoo/arrow,yahoo/arrow,proverma/arrow,proverma/arrow,proverma/arrow,yahoo/arrow
lib/util/browserManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {Link} from 'react-router-dom'\n\nfunction setArticleLink(title) {\n return encodeURIComponent(title)\n}\n\nconst ArticleCard = ({channel, article}) => {\n return (\n <div className=\"card\">\n ...
javascript
edit
0
1
mit
26e0dfeeb66076d33c83336e4c701417a2e11c35
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
client/src/components/ArticleCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport classnames from 'classnames';\n\nclass Filter extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n active: false,\n };\n }\n\n render() {\n ...
javascript
edit
0
1
mit
31f32e4a63597ae481d6b23fa5101a23d75148a7
wundery/wundery-ui-react,wundery/wundery-ui-react
src/components/Filters/Filter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport moment from 'moment'\n\nexport default function validateDateRange(options) {\n return (key, newValue) => {\n let date = moment(newValue)\n\n return date >= moment(options.min) && date <= moment(options.max)\n }\n}\n\n```\...
javascript
edit
0
2
mit
be292399cd4a6d528fae5b1b5cd0b7443f71f79c
opensource-challenge/opensource-challenge-client,opensource-challenge/opensource-challenge-client
app/validators/date-range.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path')\nvar tmp = require('tmp')\nvar html = require('./html.js')\nvar pdf = require('./pdf.js')\n\nmodule.exports = ribosome = {}\n\nribosome.translate = function(url, success, error, license) {\n tmp.dir(function(...
javascript
edit
0
2
apache-2.0
0db4c9a76a63ac417004b0899f43902ffc9aebf0
color/ribosome,ColorGenomics/ribosome
lib/ribosome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Navigation } from 'components'\nimport { connect } from 'react-redux'\nimport { container, innerContainer } from './styles.css'\n\nconst MainContainer = React.createClass({\n render () {\n // cons...
javascript
edit
0
1
mit
cdebb9acdc409af5f55a224f374bc3f25b04877f
guilsa/ducker,guilsa/ducker
app/containers/main/MainContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njsio('from shared.javascript import Class, bind')\njsio('import fan.views.Value')\n\nexports = Class(fan.views.Value, function(supr){\n\t\n\tthis._domTag = 'input'\n\tthis._domType = 'checkbox'\n\tthis._className += ' Checkbox'\n\t\n\tt...
javascript
edit
0
3
mit
d4a4377e96babe1137e08b281aa774936655383b
marcuswestin/Focus
fan/views/Checkbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\nfunction AnalyzerCtrl($scope, $http, Analyzer, Data){\n $scope.analyzer = Analyzer;\n $scope.data = Data;\n\n $scope.atext = {};\n\n $scope.$watch('analyzer.query', function(value){\n for (i in $scope.analyzer.ana...
javascript
edit
0
2
apache-2.0
a9dbed5c5a866bb48377e63b8cf1d8b6ac8af165
polyfractal/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor,AlphaStaxLLC/elasticsearch-inquisitor,polyfractal/elasticsearch-inquisitor
_site/js/controllers/AnalyzerCtrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (doc) {\n\n\"use strict\";\n\nvar REGEX_URL = /^(https?):\\/\\/(?:gist|raw)\\.github(?:usercontent)?\\.com\\/([^\\/]+\\/[^\\/]+\\/[^\\/]+|[0-9A-Za-z-]+\\/[0-9a-f]+\\/raw)\\//i;\n\nvar devEl = doc.getElementById('url-dev'),\n ...
javascript
edit
0
5
mit
36216b3dc083b9ef0c6d9ce1d2c7cf01848cf120
cnbin/rawgit,rgrove/rawgit,ssddi456/rawgit,rgrove/rawgit,cnbin/rawgit,ssddi456/rawgit,cnbin/rawgit,matsmith/rawgit,gnowxilef/rawgit,raimo/livegit,ddtxra/rawgit,matsmith/rawgit,gnowxilef/rawgit,ssddi456/rawgit,matsmith/rawgit,sereepap2029/rawgit,ddtxra/rawgit,sereepap2029/rawgit,gnowxilef/rawgit,sereepap2029/rawgit,ddtx...
public/js/url-formatter.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Fix local conf for jasmine tests" }, { "role": "assistant", "content": "if(typeof jasmine !== \"undefined\") {\n\tjasmine.getFixtures().fixturesPath = '/src/main/javascript/tetra/spec/javascripts/specs/fixtures';\n}" } ]
javascript
new_file
0
0
mit
3a344d3a91172115dca758974ee6608bb67549d3
viadeo/tetra,viadeo/tetra
spec/javascripts/lib/jasmine/conf/init_local_fixtures.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport class PlayerModelService {\n\tconstructor($log, $http, $localStorage, $q, _, playersApi) {\n\t\t'ngInject';\n\n\t\tthis.$log = $log;\n\t\tthis.$http = $http;\n\t\tthis.$localStorage = $localStorage;\n\t\tthis.$q = $q;\n\n\t\tthis...
javascript
edit
0
1
unlicense
7ff065c62c1d1a1ab0665e4f71967dc9ef5e2c0f
ejwaibel/squarrels,ejwaibel/squarrels
src/app/components/players/player/playerModel.service.js
rejected_duplicate
Near-duplicate of sample 68152
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nlogger.println(text(translate(\"se.pop2\")).color(GameColor.static.green));\n\n// test(function(ch) { logger.println(text(new String(ch))); });\n\nvar c_1 = choice('a', \"Demo\", function(ch) {\n\t\n\tlogger.println(text(\"You choiced...
javascript
edit
0
1
apache-2.0
ad4a9ae6a9ab32e14ff45e532cf79b613e8e2b91
kanomiya/Steward,kanomiya/Steward
assets/script/test/ped2/onColided.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar App = require('./app');\n\nApp.request('addNavigationItem', {\n name: 'NUSWhispers',\n icon: 'heart',\n url: 'http://nuswhispers.com/',\n target: '_blank',\n newLabel: true\n});\n\n```\n\nApply this change: Upd...
javascript
edit
0
0
mit
ef492df0704426dd6db760e76d1a3179a20cac3d
mauris/nusmods,nusmodifications/nusmods,nusmodifications/nusmods,mauris/nusmods,mauris/nusmods,nusmodifications/nusmods,mauris/nusmods,nusmodifications/nusmods
app/scripts/nuswhispers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by dungvn3000 on 2/18/14.\n */\n\nExt.define('sunerp.component.Combobox', {\n extend: 'Ext.form.field.ComboBox',\n alias: 'widget.comboboxx',\n triggerAction: 'all',\n forceSelection: true,\n queryMode: 'l...
javascript
edit
0
1
apache-2.0
4693d84d058bc1dc79842bbb11e0c9126c59bf4a
SunriseSoftVN/sunerp,SunriseSoftVN/sunerp,SunriseSoftVN/sunerp
app/assets/js/component/Combobox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = function (sequelize, DataTypes) {\n let Rescue = sequelize.define('Rescue', {\n id: {\n type: DataTypes.UUID,\n primaryKey: true,\n defaultValue: DataTypes.UUIDV4\n },\n active: ...
javascript
edit
0
1
bsd-3-clause
18f75fe27652ab3c1c9d8cbe53b28e6363ea23e7
FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com
api/db/rescue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport menuFactory from '../menuFactory';\n\nconst styles = {\n\n pageWrap(isOpen, width) {\n return {\n transform: isOpen ? 'translate3d(0, 0, 1px)' : `translate3d(0, 0, -${width}px)`,\n transformOrigin: ...
javascript
edit
0
2
mit
6e910d50ad8929802dded0279037a436f60ba67a
negomi/react-burger-menu,hedgehog34/react-burger-menu,hedgehog34/react-burger-menu,negomi/react-burger-menu
src/menus/scaleDown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n up: (queryInterface, Sequelize) => {\n return queryInterface.bulkInsert('Memberships',\n [\n {\n id: new Sequelize.UUIDV1(),\n memberId: '75b936c0-ba72-11e7-84e1-058ffffd96c5',\n ...
javascript
edit
0
1
mit
304cbd60f2c06ed863ef06ce6bde79b7bb613889
Philipeano/post-it,Philipeano/post-it
server/src/seeders/20171202141325-existing-memberships.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Perc, Label} from './constants';\nimport guideMark from './guide-mark';\nimport {TextMark} from '../marks/marktypes';\nimport {LegendLabelRole} from '../marks/roles';\n\nvar alignExpr = 'datum.' + Perc + '<=0?\"left\"'\n + ':da...
javascript
edit
0
1
bsd-3-clause
67b125e8546bc6d7cdc7d93386831c6566d74538
vega/vega-parser
src/parsers/guides/legend-gradient-labels.js
rejected_duplicate
Near-duplicate of sample 72586
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.Transform.extend({\n deserialize: function(serialized) {\n var map = {\n 0: 'New',\n 7: 'Built',\n 10: 'Started',\n 20: 'Finished',\n 30: 'Verified',\n };...
javascript
edit
0
1
bsd-2-clause
4ef11b0788bcbd870df8da6283878f9e50f867cd
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
app/transforms/appearance-status.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule(\"Double click protection\", {\n setup: function(){\n this.$form = $('<form action=\"/go\" method=\"POST\"><input type=\"submit\" name=\"input_name\" value=\"Save\" /></form>');\n\n $('#qunit-fixture').append(this.$form);\...
javascript
edit
0
1
mit
16df59f1a7c8df7624fb084891ee2d00587ad489
YOTOV-LIMITED/whitehall,alphagov/whitehall,hotvulcan/whitehall,alphagov/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,robinwhittleton/whitehall,ggoral/whitehall,robinwhittleton/whitehall,askl56/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,askl56/whitehall,ggoral/whitehall,askl56/whitehall,alphagov/whi...
test/javascripts/unit/double_click_protection_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { matchPath } from 'react-router'\n\nexport const getRouteMatch = (routes, pathname) =>\n !routes ? null : routes\n .map(r => matchPath(pathname, r.path, { exact: true }))\n .filter(r => r !== null)[0] || nulle\n\n```\n\nA...
javascript
edit
0
1
mit
e79ddb8d651e07fe0fc95ce297e60afc2546ec37
MaxSvargal/react-router-redux-bind
src/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { map } from 'lodash';\n\nimport CampaignTable from '../CampaignTable';\n\nclass CampaignOverview extends React.Component {\n render() {\n const causeData = this.props;\n\n const causeTables = m...
javascript
edit
0
2
mit
02b36658cf08a87717860f7b7de3f08aad92d364
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
resources/assets/components/CampaignOverview/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add settings component unit tests" }, { "role": "assistant", "content": "describe('Settings component', () => {\n let ctrl;\n let speechService;\n let stopwatchService;\n let timerService;\n\n beforeEach(angular.mock.mod...
javascript
new_file
0
2
mit
ed208bea3775153854a3f614b9a31b73670a8d83
JavierPDev/AudioTime,JavierPDev/AudioTime
src/app/settings/settings.component.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Carousel(settings){\n 'use strict';\n this.carousel = document.querySelector(settings.carousel || '.carousel');\n this.slides = this.carousel.querySelectorAll('ul li');\n this.delay = settings.delay || 2.5;\n this.autoplay...
javascript
edit
0
6
mit
136dd3ead528a087571bba104ffde9fe02de44ca
jhderojasUVa/minimal-carousel,wecodeio/minimal-carousel,wecodeio/minimal-carousel,jhderojasUVa/minimal-carousel
minimal-carousel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"commonjs\": true,\n \"es6\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserOptions\": {\n \"ecmaFeatures\": {\n \"e...
javascript
edit
0
0
mit
4ba0fc51dfe71d37fd3ac7937f2d6438f3ce70a9
kepler-12/code-standards
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nconst ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action');\n\nexport default ClosureActionModule.ACTION;\n\n```\n\nApply this change: Fix loading ACTION symbol on ...
javascript
edit
0
0
mit
4031aab3317a8932334b8c036517b2330701f06b
DockYard/ember-functional-helpers,DockYard/ember-functional-helpers
addon/-private/closure-action.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar bcrypt = require('bcrypt');\nvar mongoose = require('mongoose');\nconst saltRounds = 10;\n\nvar userSchema = new mongoose.Schema({\n signupDate: { type: Date, default: Date.now },\n username: { type: String, required: true },\n p...
javascript
edit
0
2
mit
844342dd5e458e3ac677e5491384526059b69577
heymanhn/journey-backend
models/userModel.js
rejected_duplicate
Near-duplicate of sample 74929
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function() {\n return this.addPackagesToProject([\n { name: 'broccoli-sass', target: '0.6.6' }\n ]).then(function() {\n return...
javascript
edit
0
1
mit
95acc8ea8150029259389d360be4aeeba143e045
alphasights/ember-cli-paint,alphasights/ember-cli-paint
blueprints/ember-cli-paint/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction jasmineTests() {\n var jasmineEnv = jasmine.getEnv();\n var consoleReporter = new jasmine.ConsoleReporter();\n window.jasmine_phantom_reporter = consoleReporter;\n jasmineEnv.addReporter(consoleReporter);\n funct...
javascript
edit
0
2
apache-2.0
8e275a22aa419297eee0acc5ef65fc0cce4aa3cb
adsorensen/girder,kotfic/girder,data-exp-lab/girder,jbeezley/girder,Kitware/girder,jbeezley/girder,adsorensen/girder,RafaelPalomar/girder,kotfic/girder,girder/girder,sutartmelson/girder,Xarthisius/girder,sutartmelson/girder,sutartmelson/girder,manthey/girder,data-exp-lab/girder,RafaelPalomar/girder,data-exp-lab/girder,...
clients/web/test/spec/swaggerSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Link } from 'react-router';\nimport moment from 'moment';\n\nmoment().format();\n\nconst RecipeListEntry = (props) => {\n const createdTime = moment(props.recipe.created_at).fromNow();\n return (\n...
javascript
edit
0
1
mit
a27f0313356287605e808957f20e6dd47b51a92e
rompingstalactite/rompingstalactite,forkful/forkful,rompingstalactite/rompingstalactite,forkful/forkful,rompingstalactite/rompingstalactite,forkful/forkful
client/components/RecipeListEntry.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chai = require('chai');\nconst assert = chai.assert;\n// const stub = require('./support/stub')\nconst Num = require(\"../lib/num\")\n\n\ndescribe(\"Num\", function(){\n\n context(\"with calculated attributes\", function(){\n\n ...
javascript
edit
0
1
mit
899d3164f322abce2c287a4a315f82d7ad869cc0
kjs222/gametime,kjs222/gametime
test/num-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @author EmmanuelOlaojo\n * @since 8/13/16\n */\n\nmodule.exports = function(){\n return Promise.all([\n utils.dropCollection(TEST_COLLECTION_A)\n , utils.dropCollection(TEST_COLLECTION_B)\n ]);\n};\n\n```\n\nApply this c...
javascript
edit
0
1
mit
fcb643f589b4168405bfe6d6b85ee9ad0aa29682
e-oj/Fawn
tests/cleanup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n inputValidator: function (fileInfo, callback) {\n\n },\n\n mergeDataWithTemplate: function(data, template, callback) {\n\n }\n} \n\n```\n\nApply this change: Implement Input Validator and Merge Data for Templat...
javascript
edit
0
6
mit
eb7727d2922f4eda310318b119fb435bfcfdc00c
Flieral/Announcer-Service-LB,Flieral/Announcer-Service-LB
common/modules/template100Handler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport CodeListSelector from './code-list-selector'\nimport VisHintPicker from './vis-hint-picker'\n\nimport {\n updateSingle, newCodeListSingle\n} from '../actions/response-format'\n\nimport {...
javascript
edit
0
1
mit
2deaf95cde707b5b85616f9f3d0167f7af47eed4
InseeFr/Pogues,InseeFr/Pogues,Zenika/Pogues,InseeFr/Pogues,Zenika/Pogues,Zenika/Pogues
src/js/components/single-response-format-editor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose')\nconst { Schema } = mongoose\n\nconst locationSchema = new Schema({\n address: { type: String, unique: true, required: true },\n rating: Number,\n reviews: [{rating: Number, content: String, userI...
javascript
edit
0
0
mit
ada2b9c9152edc91f6199c43b6d8838ba8026f98
JabroniZambonis/pLot
server/models/locations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO remove this split between browser & node once the package does it on its own.\n\nimport 'source-map-support/browser-source-map-support';\n\nsourceMapSupport.install(); // eslint-disable-line no-undef\n\n```\n\nApply this change:...
javascript
edit
0
0
mit
ee759f8b085a754b07f89e31f44a169cb5a23a03
foobarhq/reworkjs,reworkjs/reworkjs,reworkjs/reworkjs,reworkjs/reworkjs,foobarhq/reworkjs
src/framework/common/source-map-support/browser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar\n\tkind = require('enyo/kind'),\n\tImg = require('enyo/Image'),\n\tRepeater = require('enyo/Repeater');\n\nvar\n\tDivider = require('moonstone/Divider'),\n\tItem = require('moonstone/Item'),\n\tScroller = require('moonstone/Scroller...
javascript
edit
0
0
apache-2.0
f4b155043a40d690c95323821147b20ff8e007a1
enyojs/enyo-strawman
src/moonstone-samples/lib/ScrollerHorizontalSample.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {connect} from 'react-redux';\n\nimport {filterGreetings} from './selectors';\n\nconst Counter = ({greetings, filteredGreetings}) => (\n <div className=\"Counter\">Showing {filteredGreetings.length}...
javascript
edit
0
1
mit
5143eb144f27717d152cefd32a3fc1f703d20a72
st-he/react-workshop,st-he/react-workshop,DJCordhose/react-workshop,st-he/react-workshop,DJCordhose/react-workshop,DJCordhose/react-workshop,st-he/react-workshop,DJCordhose/react-workshop
code/schritte/5-redux/src/Counter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst STATUS_CODES = require('./status-codes');\n\nconst Handlers = {\n allowed(methods) {\n return (req, res) => {\n res.set('Allow', methods);\n res.status(STATUS_CODES.METHOD_NOT_ALLOWED);\n res.end(...
javascript
edit
0
3
mit
ccc000a58a8c25fdbc5566e7f4bb61b62269078c
rapid7/tokend,rapid7/tokend,rapid7/tokend
lib/control/util/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('app.feature.dateTime').controller('DateTimeController', [\n '$scope', '$interval',\n function($scope, $interval) {\n $interval(function() {\n $scope.dateTime = Date.n...
javascript
edit
0
1
mit
528675ccbd0ea2cb182152c2efdd284c81c2b5ce
molehillrocker/mm-website,molehillrocker/mm-website
src/scripts/feature/dateTime/dateTimeController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\t\"use strict\";\n\tfunction initPage() {\n\n\t\t// The thumbnail images on the show page are links, but the links aren't correct, so remove the links.\n\t\t// The html looks something like the following, but it varies d...
javascript
edit
0
3
apache-2.0
eb4366ca475f12871ad6be067433aa8011704224
uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2
lib/libra2/app/assets/javascripts/remove_download_link.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport { Map, fromJS } from 'immutable';\n\nconst REGISTER_FORM = 'redux-example/forms/REGISTER_FORM';\nconst UNREGISTER_FORM = 'redux-example/forms/UNREGISTER_FORM';\nconst UPDATE_FORM = 'redux-example/forms/UPDATE_FORM';\...
javascript
edit
0
5
mit
789de4ae409cd528c220fce54fab7adc8dae93c2
iansinnott/react-static-webpack-plugin,iansinnott/react-static-webpack-plugin
example/redux/src/modules/forms/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Set API endpoint to https" }, { "role": "assistant", "content": "angular.module('config', [])\n.constant('API_URL', 'https://cloakmd.azurewebsites.net/api');" } ]
javascript
new_file
0
0
mit
bb76872376d5b5c74b83035a054dbd479ad861a7
ymukavozchyk/cloakmd,ymukavozchyk/cloakmd
public/app/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar fs = require('fs');\nvar path = require('path');\nvar nunjucks = require('nunjucks');\n\n/*\n Nunjucks loader similar to FileSystemLoader, but avoid infinite looping\n*/\n\nvar Loader = nunjucks.Loader...
javascript
edit
0
4
apache-2.0
093005bfd926fdae42706e0554ad1a985196d9d7
tshoper/gitbook,strawluffy/gitbook,gencer/gitbook,tshoper/gitbook,GitbookIO/gitbook,ryanswanson/gitbook,gencer/gitbook
lib/template/fs-loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n $('.search').on('click', function() {\n $.post( '/grant_gateway/search', $('#search-form').serialize(), function(data) {\n for (var i = 0; i < data.length; i++) {\n $('.results').append...
javascript
edit
0
2
mit
376e79a26e4e3c3886168d6e7bf3f2b2653a0162
tonysuaus/projectz,tonysuaus/projectz
app/assets/javascripts/form.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chai = require('chai')\nconst chaiAsPromised = require('chai-as-promised')\nconst td = require('testdouble')\nconst tdChai = require('testdouble-chai')\n\nchai.use(chaiAsPromised)\nchai.use(tdChai(td))\n\nchai.config.includeStack ...
javascript
edit
0
1
mit
3ad0835f36c87cdbb6e66528177e1a1413d0c113
mwolson/jazzdom
test/integration/test/integration-mocha-setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n *\n * Meet-Up Event Planner\n * Copyright 2015 Justin Varghese John All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Lic...
javascript
edit
0
2
apache-2.0
17b8376c523ea0e537abb91760fd25d866a3abfd
johnjv/meet-up-event-planner,johnjv/meet-up-event-planner
app/scripts/login.babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { TouchableOpacity, Image, View } from 'react-native';\nimport styles from './styles/ClickableImageStyle';\nimport PropTypes from 'prop-types';\nimport { StackNagivator } from 'react-nav...
javascript
edit
0
1
mit
16cb0348dab24ef26c98b4992aa2d04f73f4d525
fridl8/cold-bacon-client,fridl8/cold-bacon-client,fridl8/cold-bacon-client
components/ClickableImage.js
rejected_duplicate
Near-duplicate of sample 70200
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst pkgConf = require('pkg-conf')\nconst { validate } = require('jest-validate')\n\nfunction replaceRootDir (conf, rootDir) {\n const replace = s => s.replace('<rootDir>', rootDir)\n\n ;['srcPathDirs', ...
javascript
edit
0
4
mit
0c41049a189c2a69b6d9ecfa3f1e00470623efd4
lingui/js-lingui,lingui/js-lingui
packages/lingui-conf/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nmodule.exports = {\n entry: [\n path.resolve(process.cwd(), 'src/theme/assets/main-critical.js'),\n path.resolve(process.cwd(), 'src/theme/assets/main.js')\n ],\n output: {\n ...
javascript
edit
0
0
mit
76c08bcda29127a7e06c41c979854930217d36af
jsor-labs/website,jsor-labs/website
config/webpack-dev-server.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright: 2012, V. Glenn Tarcea\n * MIT License Applies\n */\n\nangular.module('AngularStomp', []).\n factory('ngstomp', function($rootScope) {\n Stomp.WebSocketClass = SockJS;\n var stompClient = Stomp.client('...
javascript
edit
0
1
apache-2.0
fb5275af0191c5ec9532f21c19f400b9798fba2f
davinkevin/AngularStompDK
angular-stomp.js
rejected_duplicate
Near-duplicate of sample 95404
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE\nvar snippet = {\n version: \"1.0\",\n\n // Writes out the given text in a monospaced paragraph tag, escaping\n // & and < so they ar...
javascript
edit
0
5
mit
b55a6f35084d0291d004e64a2b6b2ae68f08f4ad
tjcrowder/simple-snippets-console,tjcrowder/simple-snippets-console
snippet.js
accepted
null
true