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\n'use strict';\n\nangular.module('velo-app').controller('MainCtrl', ['$scope', 'apiService', function ($scope, apiService) {\n $scope.initialize = function () {\n var map = L.mapbox.map('map', 'mapbox.streets');\n\n var ...
javascript
edit
0
1
mit
75b115d9779d2f8826ad9c33bb73be80f02d8fe0
jordanabderrachid/velo-app,jordanabderrachid/velo-app
public/js/controllers/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Watcher = require('large-watcher');\n\n\nmodule.exports = function(codebox) {\n var events = codebox.events;\n\n codebox.logger.log(\"Starting the file watcher\");\n\n codebox.workspace.path()\n .then(function(path) {\n ...
javascript
edit
0
1
apache-2.0
5312be998369de295e0c9a4ea88338f8ca0a558b
etopian/codebox-package-watcher,CodeboxIDE/package-watcher
lib/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('gm.typeaheadDropdown', ['ui.bootstrap'])\n.directive('typeaheadDropdown', function() {\n\treturn {\n\t\ttemplateUrl:'templates/typeaheadDropdown.tpl.html',\n\t\tscope: {\n\t\t\tmodel:'=ngModel',\n\t\t\tgetOptions:'&optio...
javascript
edit
0
2
mit
fbfe04e6f6203394a98a2b246ecc721d8d1f5ec0
spongessuck/gm.typeaheadDropdown,spongessuck/gm.typeaheadDropdown
src/gm.typeaheadDropdown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Controllers\n */\n\nvar homeController = require('../controllers/home_controller');\nvar authController = require('../controllers/authentication_controller');\n\n/*\n * Routes\n */\n\nmodule.exports = function(app, passport){\n\n...
javascript
edit
0
1
mit
ce3a219b04f14d3629bd588ac8a60f004c6b61fd
tangosource/pokerestimate,tangosource/pokerestimate
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res, next) {\n res.render('index', { title: \"Dito's laboratory\" });\n});\n\nmodule.exports = router;\n\n```\n\nA...
javascript
edit
0
2
mit
ff70ff08b9a1f3c5f5c3bcd3966ff00aa91b8910
DominikDitoIvosevic/dito.ninja,DominikDitoIvosevic/dito.ninja
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst babylon = require(\"babylon\");\n\nexports.options = {\n allowImportExportEverywhere: true,\n allowReturnOutsideFunction: true,\n plugins: [\n \"*\", \"flow\", \"jsx\",\n // The \"*\" glob no longer see...
javascript
edit
0
1
mit
edd5d3098b12e6f91c89ffc5dc234b5026f52f51
benjamn/reify,benjamn/reify
lib/parsers/babylon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport math from 'mathjs';\nimport {Sample} from './Sampler.js'\nimport {jStat} from 'jstat'\n\nexport var Sampler = {\n sample({hits, total}, n) {\n // This treats your entry as a prior, and assumes you are 2 times more confident t...
javascript
edit
0
1
mit
cc5a2f0accc2e878e25066c76189e96f62208bf8
getguesstimate/guesstimate-app
src/lib/guesstimator/samplers/DistributionBeta.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict\n * @format\n */\n\n'use s...
javascript
edit
null
null
mit
c3001938537b7f5590d71e536653ebfd083ffa52
pandiaraj44/react-native,pandiaraj44/react-native,janicduplessis/react-native,arthuralee/react-native,facebook/react-native,pandiaraj44/react-native,javache/react-native,arthuralee/react-native,arthuralee/react-native,janicduplessis/react-native,facebook/react-native,janicduplessis/react-native,myntra/react-native,pand...
packages/react-native-codegen/src/generators/modules/Utils.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport moment from 'moment'\nimport textTable from 'text-table'\n\nconst find = (apiWrapper) => (search, options) => {\n const {\n startdate,\n enddate,\n businessunitids\n } = options\n return new Promise((resolve, reject) ...
javascript
edit
0
2
mit
51bcf356fc5459e9427dc46eb7abddc17f14f7e0
gish/friskis-slack-booking
src/commands/find.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar utils = require('../utils/httpUtils.js');\nvar _ = require('underscore');\nvar constants = require('../utils/constants.js');\n\nexports.create = function(options) {\n var optionsToSend = {\n accessToken : options.accessToken\n ...
javascript
edit
0
2
apache-2.0
3421372936284eb4e143524e8ce2fcad9cc0d2ac
smartsheet-platform/smartsheet-javascript-sdk
lib/sheets/comments.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @babel */\n/** global atom */\n\nimport { delay } from 'redux-saga'\nimport { put, call, select, take, fork } from 'redux-saga/effects'\nimport { run } from 'node-jq'\nimport { ACTIONS as ACTION } from './constants'\n\nconst ONE_SEC...
javascript
edit
0
3
mit
87cf5c61ea9a023d125b59688bd687d1d465d8c3
sanack/atom-jq
src/sagas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/**\n * Handle arguments for backwards compatibility\n * @param {Object} args\n * @returns {{config: {}, cb: *}}\n */\nmodule.exports = function (args) {\n\n var config = {};\n var cb;\n\n switch (args.length...
javascript
edit
0
12
apache-2.0
e88e85110242e88aefa3e02d36737c09205c1253
chengky/browser-sync,nothiphop/browser-sync,pmq20/browser-sync,chengky/browser-sync,portned/browser-sync,schmod/browser-sync,schmod/browser-sync,pepelsbey/browser-sync,BrowserSync/browser-sync,pepelsbey/browser-sync,zhelezko/browser-sync,beni55/browser-sync,lookfirst/browser-sync,guiquanz/browser-sync,BrowserSync/brows...
lib/args.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar copy = require(\"./copy\");\nvar path = require(\"path\");\nvar temp = require(\"temp\").track();\nvar Config = require(\"./config\");\n\nvar Init = function(destination, callback) {\n var example_directory = path.resolve(path.join...
javascript
edit
0
2
mit
d9bbd11b08973865e288102114de7523d5f78768
ConsenSys/truffle
packages/truffle/lib/init.js
rejected_duplicate
Near-duplicate of sample 104038
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable new-cap */\n\nconst router = require('express').Router();\nconst jsonParser = require('body-parser').json();\n\nconst handlers = require('./handlers');\n\n// Geometry tools\n\nrouter.post('/', jsonParser, handlers.getI...
javascript
edit
0
0
mit
00a1e98c52d51b07a0c051dba6107bc6e99e8916
axelpale/tresdb,axelpale/tresdb
server/api/geometry/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n({\n mainConfigFile: '../requirejs.conf.js',\n paths: {\n almond: 'lib/almond/almond'\n },\n baseUrl: '..',\n name: \"streamhub-permalink\",\n include: [\n 'almond',\n 'streamhub-permalink/default-permalink-content-render...
javascript
edit
0
2
mit
a3c781ff7ad00536ee3b70e93b5832ea4145b7aa
Livefyre/streamhub-permalink,Livefyre/streamhub-permalink
tools/build.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global -Promise */\nvar Promise = require('bluebird');\nvar _ = require('underscore');\nvar glob = require('glob');\n\nvar getFileList = function getFileList (files) {\n var fileList = [];\n\n return new Promise(fu...
javascript
edit
0
3
mit
cd6a769dc0c6343047632179c2e6c34ea50768e7
caniuse-js/caniuse-js
lib/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst SubscriberAggregator = require(\"./SubscriberAggregator\");\nconst Emittery = require(\"emittery\");\n\nclass EventManager {\n constructor(eventManagerOptions) {\n const { logger, muteReporters, globalConfig } = eventManagerOp...
javascript
edit
0
1
mit
e1490ca31e8b47ebcf0c8480d6fbc758a81abe2e
ConsenSys/truffle
packages/truffle-events/EventManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ReactDOM from 'react-dom';\nimport React from 'react';\nimport { shallow, render } from 'enzyme';\nimport { expect } from 'chai';\nimport { Text } from 'recharts';\n\ndescribe('<Text />', () => {\n it('Does not wrap long text if...
javascript
edit
0
1
mit
863071cc834c0c9e3b17d668c37f4886da5bd932
recharts/recharts,recharts/recharts,sdoomz/recharts,sdoomz/recharts,thoqbk/recharts,recharts/recharts,recharts/recharts,thoqbk/recharts,sdoomz/recharts,thoqbk/recharts
test/specs/component/TextSpec.js
rejected_duplicate
Near-duplicate of sample 106130
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n//note must be set in gulp .sh config.\nconst ServiceURL = process.env.ASSET_PROCESSING_SERVICE\n\nconst Endpoints = {\n imageTagging: ServiceURL + \"/image/tags/\"\n}\n\nvar AssetActions = {\n \n getSuggestedTags(mediaObject...
javascript
edit
0
2
mit
c26eeac896b9a96a51a8ec9b6bb57ab429abda76
UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy
src/js/actions/asset-actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function parseTimeString(str) {\n const regexRes = new RegExp('[0-9]{0,2}:[0-9]{0,2}').exec(str);\n let hours = null;\n let minutes = null;\n if (regexRes) {\n const parts = regexRes[0].split(':');\n\n ...
javascript
edit
0
4
mit
e1123e2de6d9542950967a4128e616ddcbad7259
TobitSoftware/chayns-components,TobitSoftware/chayns-components,TobitSoftware/chayns-components
src/react-chayns-openingtimes/utils/parseTimeString.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react'\n\nconst ENTER = 13\nconst ESCAPE = 27\nconst RawQueryEditor = React.createClass({\n propTypes: {\n query: PropTypes.shape({\n rawText: PropTypes.string.isRequired,\n id: PropTypes.st...
javascript
edit
0
3
mit
a1d7933c578882aa73b5855961ff8622119c4141
nooproblem/influxdb,li-ang/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,ma...
ui/src/data_explorer/components/RawQueryEditor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst fs = require('fs-extra');\nconst marked = require('marked');\nconst parser = require('./littlePostParser');\n\nmodule.exports = function readFiles(path) {\n const posts = [];\n fs.ensureDirSync(path);\n fs.readdi...
javascript
edit
0
2
mit
40d2bf71e8515d16866ab1a6f77d562d81bf5c6c
corderophilosophy/tickle-js-ssg,corderophilosophy/tickle-js-ssg
src/readFiles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar bag = require('bagofholding'),\n sandbox = require('sandboxed-module'),\n should = require('should'),\n checks, mocks,\n sapi;\n\ndescribe('sapi', function () {\n\n function create(checks, mocks) {\n return sandbox.require('...
javascript
edit
0
2
mit
2b8b8b78926aae2dc3c4a2140893f81a1ce9fb46
cliffano/sapi
test/sapi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\n\nclass MainNavigation extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t<div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n\nexport default MainNavigation;\n\n```\n\nApply this change: [ADD] Add visit site ...
javascript
edit
0
1
mit
1d1fdcb0bd822a1b30d9f76c1a37b529216293f2
bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race
src/client/react/admin/AdminNavbar/MainNavigation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst CustomEvent = ((Event) => {\n if (Event) {\n try {\n new Event(); // eslint-disable-line no-new\n } catch (e) {\n return undefined;\n }\n }\n return Event;\n})(window.CustomEvent);\n\nfunction createCustomEve...
javascript
edit
0
4
mit
d16d986edec59eed0a73490e4587efd5455e7b28
chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs
src/api/emit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nangular.module('arethusa.morph').directive('formSelector', function () {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var id = scope.id;\n\n function action(event) {\n ev...
javascript
edit
0
3
mit
d1adefd5d3b4dd86afff010c3199864e61275bdb
Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa
app/js/arethusa.morph/directives/form_selector.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Sequelize = require('sequelize');\nvar inflection = require('inflection');\n\n$config.database.logging = $config.database.log ? console.log : false;\nvar sequelize = new Sequelize($config.database.name,\n ...
javascript
edit
0
2
mit
f19d140732d9ab951849efdcd51b1fd3c3446226
wikilab/wikilab-api
models/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport Box from '../box';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nconst factory = (baseType, type, defaultElement) => {\n cl...
javascript
edit
0
2
mit
d7024ba7638a738d8e730a8663c5b474c16b2b00
teamleadercrm/teamleader-ui
components/typography/Text.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from 'fs';\nimport test from 'ava';\nimport pify from 'pify';\nimport index from '../';\n\ntest('every rule should defined in the index file and recommended settings', async t => {\n const files = await pify(fs.readdir, Promi...
javascript
edit
0
1
mit
7d5e3d2f00c57856c5f1364d238e2ab7c3fe81dd
eslint-plugin-cleanjs/eslint-plugin-cleanjs,jfmengels/eslint-plugin-fp
test/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Gitter = require('node-gitter');\nvar fs = require('fs');\nvar config = fs.existsSync('../config/local.js') ? require('../config/local.js') : {};\n\n/**\n * Create new instance of GitterBot\n * @param {String} key Your API key\n * @...
javascript
edit
0
2
mit
9abe60c45aa83fbbf12553ea4af089ed685da08f
ghaiklor/uwcua-vii
lib/GitterBot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport eventsGetAll from '../middleware/api/eventsGetAll';\n\nconst router = express.Router();\n\nrouter.get('/', (request, response) => {\n response.json({success: true});\n});\n\n// TODO\n// - Add GE...
javascript
edit
0
1
mit
ed2256078319137956d4d90296a6b530115bf592
MarcL/js-unit-testing-examples
src/routes/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport EventEmitter from 'events';\n\nconst cable = {\n __proto__: EventEmitter.prototype,\n\n init(websocket) {\n if (this._websocket) {\n this._websocket.terminate();\n }\n this._websocket = websocket;\n this.emit('...
javascript
edit
0
3
mit
89ee84da83644dbdf1984da6f728ac549170d604
rpeev/konsole,rpeev/konsole
src/node/cable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* ---------- Electron init ------------------------------------------------- */\nimport { app, BrowserWindow } from 'electron'\n/* ---------- Requires ------------------------------------------------------ */\nimport { host, port } fro...
javascript
edit
0
2
mit
97929daf840393df65574980362f235af4946545
guillaumearm/react-redux-functional-boilerplate,guillaumearm/react-redux-functional-boilerplate
src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport R from 'ramda';\nimport spaceCase from './space-case.js';\nimport uncapitalize from './uncapitalize.js';\n\n// a -> a\nconst snakeCase = R.compose(\n uncapitalize,\n R.join('_'),\n R.split(' '),\n spaceCase\n);\n\nexport defa...
javascript
edit
0
0
mit
324cffb9348053a54a5572fb008a38a934ab5aac
restrung/restrung-js
src/snake-case.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require(\"util\");\nvar assert = require(\"assert\");\nvar now = require(\"date-now\");\n\nvar _console = {};\nvar times = {};\n\nvar functions = [\n\t['log','info'],\n\t['info','info'],\n\t['warn','warn'],\n\t['error','error...
javascript
edit
0
2
mit
0768c7bb8d211d2e7e63e91e553df0f2d796a92e
tonylukasavage/ti-console
src/ti-console.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst fields = [\n 'tags',\n 'tags_vision',\n 'tags_verified'\n]\n\nmodule.exports = metadata => {\n fields.forEach(field => {\n const value = metadata[field];\n if(typeof(value) === 'string' && value !== '') ...
javascript
edit
0
3
mit
fb93c3f778bb021d2047138091082c6a0788398d
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
webapplication/indexing/transformations/split-tags.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n\n render(createComponent) {\n const attrs = {\n disabled: this.disabled,\n href: this.href\n };\n const elementType = this.href ? 'a' : 'button'\n return createComponent(elementType, {\n cl...
javascript
edit
0
2
mit
e426e9d0073b6e6fc0a79aacb9147bcb30bb3016
spartez/vue-aui,spartez/vue-aui
src/components/buttons/AuiButton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assign = require('lodash.assign');\nvar testrunner = require('../lib/testrunner').testRunner;\n\nvar es2015 = require('./es2015.json');\nvar es2016 = require('./es2016.json');\nvar es2017 = require('./es2017.json');\n\nfunction synt...
javascript
edit
0
3
mit
cd365cca6365d2f3aea0f244d3276c0d5f8a6df1
Tokimon/es-feature-detection,Tokimon/es-feature-detection,Tokimon/es-feature-detection
syntax/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass PublicTagsAPIService {\n constructor(publicAPIRoute) {\n this.publicAPIRoute = publicAPIRoute;\n }\n\n getPopularTags() {\n return this.publicAPIRoute('tags').one('popular').getList().then(\n (tag...
javascript
edit
0
1
mit
7f8ac834b5ac9e07f1624883cc399d62974b7226
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/src/app/models/api/public-tags-api.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet Config = require('../../config');\nlet url = require('url');\nlet webHook = url.resolve(Config.app.url, '/codeship/');\n\nclass FormatterService {\n\n\tformat(type, build) {\n\t\treturn defaultFormat(build)\n\t}\n\n\tgetStartMessage...
javascript
edit
0
1
mit
2f36d03cda77a74fda5bd1883c0e7a2a7cb2ab36
freshfox/codeship-telegram-bot,freshfox/codeship-telegram-bot
api/services/formatter-service.js
rejected_duplicate
Near-duplicate of sample 92766
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst crypto = require('crypto');\nconst Network = require('./network');\nconst Witness = require('./witness');\nconst MAX_MEMORY = Math.pow(2, 21) + (64 * 1000);\n\nclass Secret extends EncryptedPromise {\n constructo...
javascript
edit
0
2
mit
c6d10301951acdc6f49cb91b57dc29760b432d3e
martindale/fabric,martindale/fabric,martindale/fabric
types/secret.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar taxonHelpers = require('../helpers/taxon-helpers.js');\nvar filterHelpers = require('../helpers/filter-helpers.js');\n\nfunction TaxonPresenter (taxonSlug, request) {\n this.taxonSlug = taxonSlug; // the slug of the taxon in the Co...
javascript
edit
0
2
mit
be3bd7187ed33c14b590107198da71e6fba7aeef
alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype
app/presenters/taxon-presenter.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add first javascript test and make the test pass" }, { "role": "assistant", "content": "describe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists', function(){\n ...
javascript
new_file
0
1
mit
29e565d176c2a2cff221909fdb4c1fd566a0ddf3
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
test/spec/test_captcha.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\"\nimport PropTypes from \"prop-types\"\nimport styled from \"styled-components\"\n\nimport FeaturedGene from \"./FeaturedGene\"\n\nconst propTypes = {\n featuredGeneLinks: PropTypes.array,\n}\n\nconst Layout ...
javascript
edit
0
3
mit
156200098a3e7feada08a41ea7c4da14f049f86d
joeyAghion/force,oxaudo/force,artsy/force-public,artsy/force,eessex/force,eessex/force,oxaudo/force,joeyAghion/force,joeyAghion/force,artsy/force-public,artsy/force,oxaudo/force,eessex/force,joeyAghion/force,eessex/force,artsy/force,artsy/force,oxaudo/force
src/desktop/apps/categories/components/FeaturedGenes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar LocalStorageUtils = require(\"./utils/LocalStorageUtils\");\nvar StateIds = require(\"./states/States\");\n\nvar InitializeState = require(\"./states/InitializeState\");\nvar MenuState = require(\"./states/MenuSta...
javascript
edit
0
1
mit
475c73ef704c672965f8efad70334e202e483db0
Morathil/ranggln,Morathil/ranggln,Morathil/ranggln,Morathil/ranggln
src/js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists', function(){\n expect(Captcha).toBeDefined();\n });\n var captcha = new Captcha();\n it(\"Captcha object...
javascript
edit
0
1
mit
ccdb86e55c3dbfb673344e141bc068b83056c782
sonjahohlfeld/Captcha-Generator,sonjahohlfeld/Captcha-Generator
test/spec/test_captcha.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { ROUTES } from '../navigation/constants';\nimport { UIDatabase } from '../database';\nimport { PRESCRIPTION_ACTIONS } from '../actions/PrescriptionActions';...
javascript
edit
0
8
mit
f92a511cd9e63e66bb92a1b68c9882ce567e5d11
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/reducers/PrescriptionReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { h, Component } from 'preact';\nimport style from './style';\n\nimport Icon from '../Icon';\n\nexport default class Badge extends Component {\n render() {\n const { artist, event, small } = this.props;\n\n if (!event && !...
javascript
edit
null
null
mit
468fb779830bd727aef77d55e85942ee288fd0d9
zaccolley/songkick.pink,zaccolley/songkick.pink
src/components/Badge/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { View, __, Sidebar, ViewManager, NavBar } from 'erste';\nimport MainView from '../main-view';\n\n\nclass LoggedInView extends View {\n constructor() {\n super();\n this.navBar = new NavBar({\n title: ...
javascript
edit
0
2
mit
f22843697d00cc4bf1c660b9a89fc8f136845d5c
korayguney/veteranteam_project,zekicelik/veteranteam_project,zekicelik/veteranteam_project,korayguney/veteranteam_project
src/views/loggedin/loggedin-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name:'Wired',\n version:'0.1',\n prepareImgLinks:function (callback) {\n var res = [];\n hoverZoom.urlReplace(res,\n 'img',\n ...
javascript
edit
0
7
mit
ed781120958633b55223525533b287964393dc49
extesy/hoverzoom,extesy/hoverzoom
plugins/wired.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Validate that all Connections include PageInfo" }, { "role": "assistant", "content": "import 'lint-tests'; // eslint-disable-line\n\nimport assert from 'assert';\nimport Client from '../src/client';\n\nsuite('manual-lint-test...
javascript
new_file
0
4
mit
44e38454ad1412a798f1e25a56155458f788c953
Shopify/js-buy-sdk,Shopify/js-buy-sdk
test/lint-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'marked',\n 'to-markdown'\n], function (\n marked,\n tomarkdown\n) {\n 'use strict';\n return (function() {\n var toHTML = function(src) {\n marked.setOptions({\n breaks: true,\n table: false\n ...
javascript
edit
0
1
mit
af4d63748c74c4d6105de099b3d7ff88af708d1b
moneyadviceservice/cms-editor,moneyadviceservice/cms-editor
src/app/modules/source-converter/source-converter.js
rejected_duplicate
Near-duplicate of sample 78958
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = defineRoute;\n\n// Define the route\nfunction defineRoute (server, opts) {\n\n server.route({\n method: 'GET',\n path: '/',\n handler: handler,\n config: {\n js...
javascript
edit
0
1
mit
6ebf3b012f41bc222ef96b22cb55b8398db313d5
rowanmanning/thingme
route/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nsteal(\"../../browser/jquery\", \"jquerypp/index.js\", function($){\n\twindow.jQuery = $;\n\n\tvar hoveredOnce = false;\n\t$(\".over\").bind('mouseover',function(){\n\t\tif (!hoveredOnce) {\n\t\t\t$(this).addClass('hover')\n\t\t\t$(docu...
javascript
edit
0
2
mit
9733b718f083bf0d82ea0c75d957b81301ea8666
bitovi/funcunit,bitovi/funcunit,bitovi/funcunit
test/drag/drag.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Item = require('../models/item').Item;\nvar ItemTypes = require('../models/item').ItemTypes;\nvar ItemStates = require('../models/item').ItemStates;\nvar ItemTypeIcons = require('../models/item').ItemTypeIcons;\n\nexports.changeStat...
javascript
edit
0
3
mit
a187f52b79e62b1d657bfa314c6c32847881f7a1
ziacik/lumus,ziacik/lumus,ziacik/lumus
routes/item.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n{\n angular\n .module('meganote.users')\n .directive('userLinks', [\n\n 'CurrentUser',\n\n (CurrentUser) => {\n\n class UserLinksController {\n user() {\n return CurrentUser.get();\n ...
javascript
edit
0
1
mit
21c51b43e81696fd90510a8690b0d86d2e03999f
sbaughman/meganote,sbaughman/meganote
app/users/user-links.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport {fromString} from '../helpers/pipe';\nimport markdown from '../../lib/plugins/markdown';\n\ntest('Compiles Markdown - .md', t => {\n const input = '# Hello World';\n const expected = '<h1>Hello World</h...
javascript
edit
0
1
mit
2ab9cc689d2c32c15565ea8a46d5ad8841ea5942
kellychurchill/gulp-armadillo,Snugug/gulp-armadillo
tests/plugins/markdown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar bs = require('../lib/beanstalk_client');\nvar net = require('net');\n\nvar port = process.env.BEANSTALK_PORT || 11333;\n\nvar mock = process.env.BEANSTALKD !== '1';\nvar mock_server;\n\nvar connection;\n\nmodule.exports = {\n\tbind ...
javascript
edit
0
3
mit
ca92ad2e97cde2a9e939abc7a12aa914970e0d9b
pascalopitz/nodestalker
tests/helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar d = require('es5-ext/lib/Object/descriptor')\n , Db = require('dbjs')\n , DOMText = require('./_text')\n , getValue = Object.getOwnPropertyDescriptor(DOMText.prototype, 'value').get\n\n , Base = Db...
javascript
edit
0
3
mit
1bbd54e1fbedeb337fd33610ead89d81e6ecf2c9
medikoo/dbjs-dom
text/boolean.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar m = require('mithril');\nvar Fangorn = require('js/fangorn');\n\nfunction _fangornLazyLoadError (item) {\n item.notify.update('Dropbox couldn\\'t load, please try again later.', 'deleting', undefined, 3000);\n ...
javascript
edit
0
0
apache-2.0
fc03f5f65d40405c6b322c19114479bcc3e3cf12
KAsante95/osf.io,jmcarp/osf.io,reinaH/osf.io,cldershem/osf.io,ZobairAlijan/osf.io,abought/osf.io,danielneis/osf.io,wearpants/osf.io,cldershem/osf.io,emetsger/osf.io,brandonPurvis/osf.io,sloria/osf.io,ticklemepierce/osf.io,samchrisinger/osf.io,brandonPurvis/osf.io,icereval/osf.io,ticklemepierce/osf.io,haoyuchen1992/osf....
website/addons/dropbox/static/dropboxFangornConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs')\n\nvar documents = {}\n\nmodule.exports = {\n init: (config, callback) => {\n var directories = fs.readdirSync('.')\n if (directories.indexOf(config.directory) === -1) {\n fs.mkdirSync(config.directory...
javascript
edit
0
3
mit
8b172631f2960b85d936f3b2c6b6e0c05b476830
ItsJimi/store-data
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Connection = require('../lib/tedious').Connection;\nvar Request = require('../lib/tedious').Request;\n\nvar config = {\n server: '192.168.1.212',\n userName: 'test',\n password: 'test'\n /*\n ,options: {\n debug: {\n pa...
javascript
edit
0
2
mit
3c109311a9cc2839e50f07cc5f31b1dfd599811e
arthurschreiber/tedious,spanditcaa/tedious,LeanKit-Labs/tedious,pekim/tedious,tediousjs/tedious,tediousjs/tedious,Sage-ERP-X3/tedious
examples/minimal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar MoochSentinel = {\n\n render: function(status) {\n document.getElementById(\"status\").innerText = status.okay? \"Okay!\" : \"Blocked\";\n },\n\n requestStatus: function() {\n var user = localStorage['moochLogin...
javascript
edit
0
2
mit
e7364f42d49f0e5cccef7da49d109418fe8b5c89
asivokon/mooch-sentinel,asivokon/mooch-sentinel,asivokon/mooch-sentinel,asivokon/mooch-sentinel
chrome-extension/mooch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n var fs = require('fs'),\n __bind = require('./helpers').bindFunctionToScope,\n escapeRegExp = require('./helpers').escapeRegExp,\nAssetDirectives = require('./asset_directives').AssetDirectives;\n\n/*\n * @class Asset...
javascript
edit
0
3
bsd-3-clause
8be3fbee9a972a580058973ec7860d10492db38e
jvatic/node-assets
lib/asset.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar sass = require(\"node-sass\");\nvar through = require(\"through\");\nvar path = require(\"path\");\nvar extend = require('util')._extend;\n\nmodule.exports = function (fileName, globalOptions) {\n if (!/(\\.scs...
javascript
edit
0
6
mit
edcb529531029187b2a3a001fa2c631fd9693316
davidguttman/sassify,oncletom/sassify
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar BinWrapper = require('bin-wrapper');\nvar pkg = require('../package.json');\nvar url = 'https://raw.githubusercontent.com/imagemin/gifsicle-bin/' + pkg.version + '/vendor/';\n\nmodule.ex...
javascript
edit
0
0
mit
c5751e5933bce2ef2ac80527970868c2ed7fc71e
imagemin/gifsicle-bin,jihchi/giflossy-bin
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function diffObjects(prev, cur) {\r\n let newValues = Object.assign({}, prev, cur);\r\n let diff = {};\r\n\r\n for (const [key, value] of Object.entries(newValues)) {\r\n if (prev[key] !== value) {\r\n diff[key] = valu...
javascript
edit
0
3
mit
87122e3056721999402f8b7cc9408b86de4719b1
DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager,DjLeChuck/recalbox-manager
client/src/utils/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require(\"path\");\n\nmodule.exports = function (grunt) {\n grunt.loadNpmTasks('grunt-gitbook');\n grunt.loadNpmTasks('grunt-gh-pages');\n grunt.loadNpmTasks('grunt-contrib-clean');\n\n grunt.initConfig({\n ...
javascript
edit
0
1
mit
a73231ebed92a3f5409d033e59e9af20816e35b2
daikeren/django_tutorial
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n program.prompt([\n 'Hello—I\\'m Prompt.'\n ]);\n\n}());\n\n```\n\nApply this change: Add personality (like a homepage)" }, { "role": "assistant", "content": "(function() {\n 'use stri...
javascript
edit
0
4
mit
9d098f474ea4b39133d4ce422e725519498339c6
jsejcksn/prompt,jsejcksn/prompt
js/menu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport styles from './BookList.css';\nimport classes from 'classnames';\n\nexport default ({title, zebra, children, className}) => (\n <div>\n {title ? <h3 className={styles.listTitle}>{title}</h3> : ''}\n <ul className...
javascript
edit
0
2
mit
0170d8a7d0969c0e594aceb0c4dffb9c898db6ef
mdjasper/React-Reading-List
src/app/components/BookList/BookList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n var allSassFiles = [];\n\n var path = require('path');\n\n grunt.file.recurse(\n \"./stylesheets/\",\n function(abspath, rootdir, subdir, filename) {\n if (filename.match(/\\.scss/)) {\...
javascript
edit
0
3
mit
c21952e22109bc466cadf821bad3e3988b5653e7
quis/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,alphagov/govuk_frontend_toolkit,alphagov/govuk_frontend_toolkit,alphagov/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,...
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * boilerplate-redux-react\n *\n * Copyright(c) 2015 André König <<EMAIL>>\n * MIT Licensed\n *\n */\n\n/**\n * @author André König <<EMAIL>>\n *\n */\n\nimport React, {Component} from 'react';\nimport {Provider} from 'react-redux';...
javascript
edit
0
1
mit
c4273c8ba589e57a36e1023229b229ee79c66e92
akoenig/boilerplate-redux-react,akoenig/boilerplate-redux-react
lib/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as Backbone from 'backbone';\nimport AppRouter from './routers/app-router';\n\nlet router = new AppRouter();\nBackbone.history.start({pushState: true});\n\n```\n\nApply this change: Remove unused variable name for router" }, ...
javascript
edit
0
0
mit
86d0647a7daece3a28919b60ce71ea25bba6da4c
trevormunoz/katherine-anne,trevormunoz/katherine-anne,trevormunoz/katherine-anne
src/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (process.env.NODE_ENV !== 'production') {\n // we're importing script and styles from given plugin\n // this method should be only used in development\n // for production specify your plugin in package.json\n require('epl-plugin/...
javascript
edit
0
2
apache-2.0
850d0f710336b0bdc91ca5d3440aaa8d499dc7ac
mkacper/erlangpl,Baransu/erlangpl,erlanglab/erlangpl-ui,Hajto/erlangpl,erlanglab/erlangpl,Baransu/erlangpl,erlanglab/erlangpl,Hajto/erlangpl,Hajto/erlangpl,mkacper/erlangpl,erlanglab/erlangpl-ui,erlanglab/erlangpl,Baransu/erlangpl,mkacper/erlangpl
src/plugins.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = {\n entry: './index.js',\n output: {\n path: path.join(__dirname, 'dist'),\n filename: 'bundle.js'\n },\n module: {\n loaders: [\n {\n\ttest: /\\.js$/,\n\texclude: /node_...
javascript
edit
0
0
mit
2b5eaa2603849fb41838621fdc274e9c22f11dad
dotKom/glowing-fortnight,dotKom/glowing-fortnight
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { join } = require('path')\nconst { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')\n\nmodule.exports = {\n webpack: function (config, { dev }) {\n if (!dev) {\n config.plugins.push(new BundleAnalyzerPlugin({\...
javascript
edit
0
2
mit
dbcec2cbd00580ac81a3c3b9340da7cafb895928
sgmap/inspire,sgmap/inspire
next.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n router = express.Router(),\n bcrypt = require('bcrypt'),\n db = require('../models/db'),\n index = {};\n\nindex.all = function(oauth){\n /* GET home page. */\n router.get('/', oauth.auth...
javascript
edit
0
1
apache-2.0
d383cf564507d9b6c166f56321527e46b2fd732e
tessel/oauth,tessel/oauth,tessel/oauth
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar user = module.parent.require('./user'),\n db = module.parent.require('./database'),\n plugin = {};\n\nplugin.init = function(params, callback) {\n\tvar app = params.router,\n\t\tmiddleware = params.middlewar...
javascript
edit
0
2
bsd-2-clause
028d511f2f663685999c8d6a7bbcb9ff5af865e9
btw6391/nodebb-plugin-custom-topics
library.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2013, <EMAIL>\n// MIT-license\n\nvar Norm = function(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n\nvar Normalize = function(v) {\n var norm = Norm(v);\n return [v[0] / norm, v[1] / norm];\n}\n\nvar Subt...
javascript
edit
0
1
mit
6b9bfebcb7dd5759b19451a2f99a816388c86dfc
odanielson/vector_2d.js
vector_2d.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport expect from 'expect';\nimport I from 'immutable';\n\nimport {Note} from '../../../../../reducers/chart';\nimport {NOTE_HEIGHT} from '../..//constants';\n\nimport {\n WIDTH,\n HEIGHT,\n renderNotes,\n} from '../';\n\nclass Mock...
javascript
edit
0
1
mit
75aabb93187c47d412f415f50671d72ea54ecbd6
thomasboyt/bipp,thomasboyt/bipp
app/views/lib/Charts/CanvasChart/__tests__/CanvasChart.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction init() {\n test();\n}\n\nfunction test() {\n const divObject = document.getElementById('content');\n\n // create database reference\n const dbRefObject = firebase.database().ref().child('object');\n\n // sync obj...
javascript
edit
0
1
apache-2.0
1e2295629b93eb5a3fec43541afe31dfeca417b2
googleinterns/step14-2020,googleinterns/step14-2020,googleinterns/step14-2020,googleinterns/step14-2020
public/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.bookmarksList.helpers({\n bookmarks: function() {\n if (Meteor.user()) {\n var searchTags = document.getElementById(\"tagSearch\").value;\n if (searchTags != undefined) {\n return ...
javascript
edit
0
2
mit
36e5b580ba633a978ee24c92b70b170deee83d5c
blumug/georges,blumug/georges,blumug/georges
client/templates/bookmark/bookmarks_list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global angular */\n\nangular\n .module('speciesApp')\n .factory('SpeciesService', [\n 'API_BASE_URL',\n '$resource',\n SpeciesService\n ])\n\nfunction SpeciesService (API_BASE_URL, $resource) {\n return $resource(\n A...
javascript
edit
0
1
mit
83442c6ae8861702fdc49e286dd0afd4f8e86cf5
stivaliserna/scripts,stivaliserna/scripts
species-explorer/app/services/species.service.js
rejected_duplicate
Near-duplicate of sample 85413
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('babel-core/register');\nrequire('dotenv').load();\n\nconst serverConfig = require('./config');\n\n// To ignore webpack custom loaders on server.\nserverConfig.webpackStylesExtensions.forEach((ext) => {\n require.extensions[`.$...
javascript
edit
0
1
mit
00cbe3a1649cb06d07157384ec5e9fbd52dfc2aa
fastmonkeys/respa-ui
server/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Main starting point of the application\nconst express = require('express');\nconst path = require('path')\nconst http = require('http');\nconst bodyParser = require('body-parser');\nconst morgan = require('morgan');\nconst app = expr...
javascript
edit
0
0
apache-2.0
237db234a37b364a4271b9d87687985af0a11acc
ryanthomas30/AudioNimbus,ryanthomas30/AudioNimbus
server/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* Copyright 2012-2021, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nmodule.exports = {...
javascript
edit
0
0
mit
a363aecf61ea49d67c3e3f74baa949e7e3e9f458
plotly/plotly.js,plotly/plotly.js,plotly/plotly.js,etpinard/plotly.js,etpinard/plotly.js,plotly/plotly.js,etpinard/plotly.js
src/plots/frame_attributes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2011 Kevin Decker (http://www.incaseofstairs.com/)\n * See LICENSE for license information\n */\n$(document).ready(function() {\n var canvas = document.getElementById(\"imageDisplay\"),\n linePreview = doc...
javascript
edit
0
2
bsd-3-clause
b6a901df37b79b9d3342380b1b7d99f82009df77
kpdecker/gradient-scanner,leonardohipolito/gradient-scanner,leonardohipolito/gradient-scanner
gradient-scanner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nconst test = require('tape');\nconst randoPort = require('../../lib/randoport');\nconst _ = require('lodash');\n\ntest('empty object', t => {\n t.plan(1);\n\n const emptyObject = {};\n\n const r = randoPort(emptyObje...
javascript
edit
0
2
mit
1dd85270c63f069d6ef2e1e36213df1d148e5ff2
ryanlabouve/ember-cli-randoport,ryanlabouve/ember-cli-randoport
tests/lib/randoport-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar moment = require('moment');\nvar rank = require('librank').rank;\n\n// data backup path\nvar data_path = \"./data/talks/\";\n\n// read all files in the database\nvar res = fs.readdirSync(data_path);\n\n// cu...
javascript
edit
0
1
mit
28a1190d8232a73ada8da4f4b6d25658d71c74e0
tlksio/db
update.local.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2019 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the “License”);\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n// <https://apache.o...
javascript
edit
0
2
apache-2.0
20147f80e8e917312f2f5961c1052c5ee17c0761
GoogleChromeLabs/jsvu
engines/quickjs/extract.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n ZeroClipboard.config({swfPath: $('[data-swf-path]').data('swf-path')});\n\n $('pre').each(function () {\n if (!$(this).find('code').length) {\n var code = $(this).html();\n $(this).ht...
javascript
edit
0
2
mit
262c982ce8734ce52df072a0ad536365d6f68924
wenzhixin/redmine-chrome,wenzhixin/redmine-chrome,wenzhixin/redmine-chrome
js/copy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndocument.getElementById('generate').onclick = genPassword;\n\nfunction getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}\n\nfunction genPassword() {\n var passLength = document.getElementById(...
javascript
edit
0
8
mit
c5d16b8a771a186d6bfabe536636b7425cad8fc8
Carlgo11/password,Carlgo11/password
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar CommentBox = React.createClass({\n render: function() {\n return (\n <div className=\"commentBox\">\n Hello, world! I am a CommentBox.\n </div>\n );\n }\n});\n\nReact.render(\n <CommentBox />,\n document.g...
javascript
edit
0
1
mit
779efe4ae9a6af8bf0ef8280e2e3968ed18f51f3
thinkswan/react-comments,thinkswan/react-comments
public/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = [\n\t'\\n\\n\\n',\n\t'/**',\n\t' * DEVELOPMENT MODE ONLY',\n\t' *',\n\t' * Browser-sync script loader',\n\t' * to enable script/style injection',\n\t' *',\n\t' * Run \"gulp build\" to generate the theme',\n\t' * for pro...
javascript
edit
0
0
mit
d11f5f7a893051771fcee1d84fe4b4a1d79a296b
tylershuster/wp-theme-starter,tylershuster/wp-theme-starter
gulp/core/templates/browser-sync-snippet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nlet InteractiveConfigurationPanel = null;\n\nexport default {\n initialize() {\n if (InteractiveConfigurationPanel !== null) return ;\n\n InteractiveConfigurationPanel = require('./interactive-configuration-panel'...
javascript
edit
0
3
mit
9e1cf07dba6e93f0e397a0c6005b38867fb0c569
HiroakiMikami/atom-user-support-helper
lib/user-support-helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\"\nimport classes from \"./HeaderBar.module.css\"\nimport Logo from \"../../assets/sGonksLogo.png\"\nimport { Link, NavLink } from \"react-router-dom\"\nimport LinkButton from \"../UI/LinkButton/LinkButton\"\ni...
javascript
edit
0
2
apache-2.0
2791f5415e74395067d5251991c7b347386a6aab
googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks
project/frontend/src/components/HeaderBar/HeaderBar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jquery');\n\nmodule.exports = {\n\n\t$doc: $(document),\n\n\tsetupDom: function () {\n\n\t\tthis.$el = $(this.element);\n\n\t\tthis.$el.addClass(this.options.classes.originalSelect);\n\n\t\t// Setup wrapper\n\t\tthis.$w...
javascript
edit
0
1
mit
b89730069ce4a894305f37d19dbf88de486b4bea
niksy/kist-selectdown,niksy/kist-selectdown
lib/dom.js
rejected_duplicate
Near-duplicate of sample 98351
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nhqDefine('toggle_ui/js/flags', [\n 'jquery',\n 'knockout',\n 'reports/js/config.dataTables.bootstrap',\n 'hqwebapp/js/components.ko', // select toggle widget\n], function (\n $,\n ko,\n datatablesConfig\n) {\n ...
javascript
edit
0
4
bsd-3-clause
22df5bce43549e73744220fb1ef40f1d0f7b00ff
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/apps/toggle_ui/static/toggle_ui/js/flags.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet cli = require('heroku-cli-util');\nlet request = require('request');\n\nmodule.exports = {\n topic: 'builds',\n command: 'output',\n needsAuth: true,\n needsApp: true,\n description: 'show build output',\n ...
javascript
edit
0
1
isc
e92c57af03c2319b5e313faa8df9c5969a2c2164
heroku/heroku-builds
commands/builds/output.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['itemObjectModel'], function(itemOM) {\n\n 'use strict';\n \n function open(item) {\n \n function onSubitem(subitem) {\n switch(subitem.dataset.resourceType) {\n case 'STR ':\n subitem.getDataObject()...
javascript
edit
0
6
mit
8516e9394955de86c7e46bc39a94c0afe50ab258
radishengine/drowsy,radishengine/drowsy
mac/filetypes/open_MMSD.js
accepted
null
true