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/**\n * Global adapter config\n * \n * The `adapters` configuration object lets you create different global \"saved settings\"\n * that you can mix and match in your models. The `default` option indicates which \n * \"saved setting\" s...
javascript
edit
0
0
mit
0e5134d71da887d125b228ee773a47935b528c8a
thomaslangston/sailsnode
config/adapters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Monkey-patch sinon.create to patch all created spyCall instances\n// so that the top stack frame is a predictable string.\n// Prevents every test from failing when the test suite is updated.\nmodule.exports = function (sinon) {\n ...
javascript
edit
0
3
mit
49253300460d315b475feca48a0727ad50d6dd13
unexpectedjs/unexpected-sinon,unexpectedjs/unexpected-sinon
test/monkeyPatchSinonStackFrames.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by Omnius on 18/07/2016.\n */\n'use strict';\n\nconst Hapi = require('hapi');\nconst HapiAuthBasic = require('hapi-auth-basic');\nconst HapiAuthHawk = require('hapi-auth-hawk');\nconst Inert = require('inert');\n\n\nmodu...
javascript
edit
0
2
mit
7c2213c67cbc670a7a4aecd5dbdab47013dca4ed
identityclash/hapi-login-test,identityclash/hapi-login-test
test/testServer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.home.rendered = function () {\n initInfiniteScroll.call(this, 'topics');\n};\n\nTemplate.home.destroyed = function () {\n stopInfiniteScroll.call(this);\n};\n\nTemplate.home.helpers({\n\ttopics: function() {\n\t\treturn Topic...
javascript
edit
0
1
mit
d7253c7ddde991aa57eb607e8888758ff6fc27b8
erasaur/binary,erasaur/binary,erasaur/binary
client/views/home/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// http://mochajs.org/\n// @see http://chaijs.com/api/bdd/\ndescribe('View', function() {\n var App;\n var View;\n var testView;\n\n beforeEach(function() {\n App = window.App;\n View = App.View;\n });\n\n afterEach(functi...
javascript
edit
0
1
mit
a11e9cbf5006c81826fdc1d8a79680c3b5097f2e
easy-deep-learning/mvc-pure-js,easy-deep-learning/mvc-pure-js
tests/view.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n var app = angular.module('bonito-filters', []);\n\n /**\n * Print large number using prefixes (k, M, G, etc.) to\n * keep their size short and to be friendlier to the poor non-robots.\n * Adapt...
javascript
edit
0
6
apache-2.0
f3c665de8dc05b474e8b7ec993b1354cf028505c
tsg/bonito,tsg/bonito
src/filters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('config');\n\nconst mongooseOptions = {\n useNewUrlParser: true,\n useFindAndModify: false,\n useCreateIndex: true,\n useUnifiedTopology: true,\n readPreference: 'secondaryPreferred', // Has MongoDB...
javascript
edit
0
0
mit
2075a9bb23763def637f025c551e7cb1044312a8
gfw-api/gfw-subscription-api,gfw-api/gfw-subscription-api,gfw-api/gfw-subscription-api
config/mongoose.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar ko = require('knockout');\nvar AddonNodeConfig = require('js/addonNodeConfig').AddonNodeConfig;\n\nvar url = window.contextVars.node.urls.api + 'googledrive/config/';\nnew AddonNodeConfig('Google Drive', '#googledrive...
javascript
edit
0
1
apache-2.0
be1a9773402ad1f7ace80fb63c7ca179f2da9b85
rdhyee/osf.io,cldershem/osf.io,crcresearch/osf.io,crcresearch/osf.io,Nesiehr/osf.io,jeffreyliu3230/osf.io,TomBaxter/osf.io,Johnetordoff/osf.io,KAsante95/osf.io,caneruguz/osf.io,asanfilippo7/osf.io,dplorimer/osf,sbt9uc/osf.io,njantrania/osf.io,cosenal/osf.io,mattclark/osf.io,MerlinZhang/osf.io,TomHeatwole/osf.io,billyhu...
website/addons/googledrive/static/node-cfg.js
rejected_duplicate
Near-duplicate of sample 76391
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst db = require('./db')\nconst pgp = require('pg-promise')()\n\nconst userQueries = {\n createUser: (name, email, password) => {\n return db.one(`\n INSERT INTO users (name, email, password)\n VALUES ($1, $2, $3)\n ...
javascript
edit
null
null
mit
9652df246c011d31aa3b6d68ea5155d2d846dabc
EmmaEm/Roam,EmmaEm/Roam
src/db/user-queries.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nvar Client = module.exports = function(config) {\n if (! config) {\n config = {};\n }\n\n this.version = config.version || '1';\n\n this._apiSetup();\n};\n\nClient.prototype._apiSetup = function() {\...
javascript
edit
0
3
mit
1d23855155e98688fc1c8b85612e5532c52cc3a3
sungwoncho/node-ufc-api
lib/client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n allowedVersions: {\n 'ember-getowner-polyfill': '^1.0.0 || ^2.0.0',\n 'ember-inflector': '^1.0.0 || ^2.0.0',\n 'ember-runtime-enumerable-includes-polyfill': '^1.0.0 ...
javascript
edit
0
0
mit
89755b9c7da113508ccc5715d7d62a8ee44a809a
thecoolestguy/frontend,thecoolestguy/frontend,ilios/frontend,djvoa12/frontend,dartajax/frontend,ilios/frontend,jrjohnson/frontend,dartajax/frontend,jrjohnson/frontend,djvoa12/frontend
config/dependency-lint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n up: function (queryInterface, Sequelize) {\n return queryInterface.renameColumn('Departments', 'allowence', 'allowance');\n },\n\n down: function (queryInterface, Sequelize) {\n return quer...
javascript
edit
0
2
mit
676117cba78bb0269ce1b8d46d760fe779e2b09e
YulioTech/timeoff,YulioTech/timeoff,timeoff-management/application,timeoff-management/application
migrations/20170329060832-rename_allowence_to_allowance.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react-native';\nconst {\n AppRegistry,\n Component,\n Text,\n View\n} = React;\nimport NavigationBar from 'react-native-navbar';\n\nclass Basic extends Component {\n render() {\n return (\n <View style={{...
javascript
edit
0
1
mit
6ca34a9c9c51ea5bc8d4abd99a78952834e04385
Kureev/react-native-navbar,react-native-fellowship/react-native-navbar
examples/Basic/index.ios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar passport = require('passport'),\n BitbucketTokenStrategy = require('../../lib/index'),\n User = require('mongoose').model('User');\n\nmodule.exports = function () {\n\n passport.use(new BitbucketTokenStrategy({\n...
javascript
edit
0
1
mit
5bf9c027fa2896d8cb41750904a2631c3391b508
GenFirst/passport-bitbucket-token
example/backend/passport.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncinema.models.LayerModel = Backbone.Model.extend({\n\n constructor: function (defaults, options) {\n Backbone.Model.call(this, {}, options);\n if (typeof defaults === 'string') {\n this.setFromString(defaults...
javascript
edit
0
3
bsd-3-clause
6db238389c76f1a8b6ae30126eae28a2e16a95c8
Kitware/cinema,Kitware/cinema,Kitware/cinema,Kitware/cinema
web/src/js/lib/models/LayerModel.js
rejected_duplicate
Near-duplicate of sample 75969
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n The `DS.Transform` class is used to serialize and deserialize model\n attributes when they are saved or loaded from an\n adapter. Subclassing `DS.Transform` is useful for creating custom\n attributes. All subclasses of `DS.Tra...
javascript
edit
0
0
mit
2d40e0c1366e403ab50be6c9aaa603a67825a4c8
fsmanuel/data,wecc/data,lostinpatterns/data,pdud/data,hibariya/data,ryanpatrickcook/data,sammcgrail/data,eriktrom/data,swarmbox/data,duggiefresh/data,mphasize/data,bf4/data,rtablada/data,PrecisionNutrition/data,bf4/data,davidpett/data,martndemus/data,rtablada/data,swarmbox/data,heathharrelson/data,fpauser/data,funtusov...
packages/ember-data/lib/transforms/base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileOverview\n * @name files.js\n * @author V. Glenn Tarcea <<EMAIL>>\n * @license\n */\n\nmodule.exports = function(r) {\n 'use strict';\n return {\n countInProject: countInProject\n };\n\n function *countIn...
javascript
edit
0
1
mit
3dd0305d95ac5bbb8ae04e6e4c30cc45473f7bcf
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/server/db/model/files.js
rejected_duplicate
Near-duplicate of sample 79444
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\tappKey \t\t: 'mgb7ka1nbs3wg',\n\tappSecret \t: 'm1Rv2MHHND',\n\ttoken : {\n\t\tuserId \t\t: '0001',\n\t\tname \t\t: 'TestUser',\n\t\tportraitUri : 'http://rongcloud.cn/images/logo.png'\n\t},\n\tmessage : {\n\t\tf...
javascript
edit
0
0
mit
784943c1278e479382c7f26f1f65aa53bb28517d
rongcloud/server-sdk-nodejs,coocon/server-sdk-nodejs
test/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n tagName: 'ul',\n channel: Ember.inject.service(),\n});\n\n```\n\nApply this change: Connect to our channel:topic as really basic test." }, { "role": "assi...
javascript
edit
0
1
mit
443be4271f06692f65b00054c2ec725b02fc6b0b
cincinnati-elixir/todos_phoenix_ember_example,cincinnati-elixir/todos_phoenix_ember_example,cincinnati-elixir/todos_phoenix_ember_example
client/app/components/todos-list/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst AnnotationParser = require(__dirname+\"/../\").AnnotationParser;\nconst Request = require(__dirname+\"/myannotations/Request\");\n\nAnnotationParser.parse(\n __dirname+\"/annotatedFile.js\",\n __dirname+\"/myannotations/\",\...
javascript
edit
0
0
mit
35a09e0e9d366e06a3eacea63b5aefe6b18c6cf4
anupam-git/nodeannotations
sample/testParser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Jasmine = require(\"jasmine\");\nvar jasmine = new Jasmine();\nvar config = {\n spec_dir: \"\",\n spec_files: [\"tests/**/*.js\", \"app/**/tests/index.js\", \"app/**/tests.js\"],\n helpers: [],\n stopSpecOnExpectationFailure: fa...
javascript
edit
0
0
cc0-1.0
d4421c2a43112c2c1a702ddfd6ce9219967744c7
davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot
tests/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport CartBase from './base/cart-base.js';\n\nclass CartBlogListCtrl extends CartBase {\n constructor($scope, ...args) {\n super(...args);\n this.logInit('CartBlogListCtrl');\n\n this.$scope = $scope;\n\n this.postList = [...
javascript
edit
0
2
mit
45fcea40fe53c784145d015d30f0846926cf01f9
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
src/client/es6/controller/cart-blog-list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport default class Prefs extends React.Component {\n static propTypes = {\n prefs: React.PropTypes.object.isRequired,\n setPrefs: React.PropTypes.func.isRequired,\n providerRefresh: React.PropTyp...
javascript
edit
0
3
isc
8cb0444c4ebd9d4ea42d92942eb02899c14e011b
bhj/karaoke-forever,bhj/karaoke-forever
src/components/providers/cdg/Prefs/Prefs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction register() {\n navigator.serviceWorker.register(\"sw.js\", {scope: '/'}).then(\n function(serviceWorkerRegistration) {\n serviceWorkerRegistration.pushManager.subscribe().then(\n function(pushSubscription) {\n...
javascript
edit
0
1
apache-2.0
dade414e6dad3bae1f358f6132f30858a6958c8e
dougt/githubwebpush,dougt/githubwebpush,dougt/githubwebpush
src/githubpusher/frontend/static/install.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require(\"util\");\nvar thunkify = require(\"thunkify\");\nvar spawn = require(\"child_process\").spawn;\nvar debug = require(\"debug\")(\"offload:runner\");\n\n\nvar runner = function(cmd, args, body, cb){\n\n\tdebug(\"prepi...
javascript
edit
0
2
mit
902bf0c2a79c6967ad339adee867893e86763663
socialtables/offload
lib/runner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Updater = require('./Updater');\nconst SplatNet = require('../splatnet');\nconst { getOriginalGear } = require('../../js/splatoon');\n\nclass MerchandisesUpdater extends Updater {\n constructor() {\n super({\n ...
javascript
edit
0
3
mit
c9f287a5f683a53eed3b18646f29b047c410ea4f
misenhower/splatoon2.ink,misenhower/splatoon2.ink,misenhower/splatoon2.ink
src/updater/updaters/MerchandisesUpdater.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gravity from '../../lib/loaders/gravity';\nimport { CollectorProfileType } from './collector_profile';\nimport {\n GraphQLBoolean,\n} from 'graphql';\n\nexport default {\n type: CollectorProfileType,\n decription: 'Updating a ...
javascript
edit
0
2
mit
2e045cd85f4e1ce600eeecd378c51184a8d60776
mzikherman/metaphysics-1,mzikherman/metaphysics-1,artsy/metaphysics,mzikherman/metaphysics-1,broskoski/metaphysics,craigspaeth/metaphysics,craigspaeth/metaphysics,artsy/metaphysics,artsy/metaphysics,mzikherman/metaphysics-1
schema/me/update_collector_profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = [\n {\n \"title\": \"BibleJS NPM Module\"\n , \"slug\": \"bible-js\"\n , \"publishedAt\": \"25-05-2014\"\n , \"content\": \"bible-js.md\"\n }\n , {\n \"title\": \"Testing Code Highlig...
javascript
edit
0
0
mit
039bda9c3ffb82749732ef1109c869c3a733d003
IonicaBizau/ionicabizau.net,IonicaBizau/ionicabizau.net
posts/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar GraphemeBreaker = require('grapheme-breaker');\nvar assign = require('object-assign');\n\n/**\n * Extracts a section of a string and returns a new string.\n */\nfunction slice(str, beginSlice, endSlice) {\n return GraphemeBreaker.b...
javascript
edit
0
3
mit
66ca45a0a094507eb319ba594c9a4030128dc776
Lokiedu/grapheme-utils
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\n\napp.set('port', (process.env.PORT || 5000));\n\napp.use(express.static(__dirname + '/dist'));\n\n// views is directory for all template files\n// app.set('views', __dirname + '/...
javascript
edit
0
1
mit
64ffd76107741f8894faf91f3de1d2fc54682bbf
RobEasthope/lazarus,RobEasthope/lazarus
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar port = process.env.PORT || 3333;\nvar app = express();\n\napp.use(express.static(__dirname + '/dev/patterns'));\n\napp.get('/', function (req, res) {\n res.sendFile('index.html');\n});\n\napp.list...
javascript
edit
0
1
apache-2.0
269ccb8878f11531b71df3dbb1d990317b2a275b
carbon-design-system/carbon-components,carbon-design-system/carbon-components,carbon-design-system/carbon-components
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst express = require('express')\nconst Slapp = require('slapp')\nconst ConvoStore = require('slapp-convo-beepboop')\nconst Context = require('slapp-context-beepboop')\n\n// use `PORT` env var on Beep Boop - default to...
javascript
edit
0
2
mit
c5e1d62e88221c0780c04683b8f66a01a4008f75
andreascreten/zoom-links
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = asString\nmodule.exports.add = append\n\nfunction asString(fonts) {\n var href = getHref(fonts)\n return '<link href=\"' + href + '\" rel=\"stylesheet\" type=\"text/css\">'\n}\n\nfunction asElement(fonts) {\n var hre...
javascript
edit
0
2
mit
b22c3e01fb12c170f651f92758241ddf1499990b
hughsk/google-fonts,hughsk/google-fonts
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar isSvg = require('is-svg');\nvar SVGO = require('svgo');\nvar through = require('through2');\n\nmodule.exports = function (opts) {\n\topts = opts || {};\n\n\treturn through.ctor({objectMode: true}, function (file, en...
javascript
edit
0
7
mit
bb0e24071e545d06b62d1028f53bfa0a0850361d
imagemin/imagemin-svgo
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar onEntityDelete = require(\"splat-ecs/lib/systems/box-collider\").onEntityDelete;\n\nfunction getCamera(entities) {\n\treturn entities[1];\n}\n\nmodule.exports = function(ecs, data) { // eslint-disable-line no-unus...
javascript
edit
0
2
mit
e81cde0e9247ef9b52e50bada6eb2cc0e804ddf4
TwoScoopGames/Cluster-Junk,TwoScoopGames/Cluster-Junk,TwoScoopGames/Cluster-Junk
src/systems/simulation/handle-collisions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express')\nvar expressApp = express()\nvar path = require('path')\nvar pickerApp = require('./src/bootstrap')\nvar registerRoutes = require('./src/routes')\n\nvar port = 8080\n\n// Open up the static files\nexpres...
javascript
edit
0
2
mit
c46bdbc1225dc1883c71cb6c32363573d7beab28
cvalarida/name-picker,cvalarida/name-picker
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst { setupForSimpleEventAccessors } = require(\"../helpers/create-event-accessor\");\nconst EventTargetImpl = require(\"../events/EventTarget-impl\").implementation;\n\nconst Event = require(\"../generated/Event\")...
javascript
edit
0
3
mit
d80648f8854a168d33eec16bbac453ebbf0b4820
mzgol/jsdom,mzgol/jsdom,mzgol/jsdom,tmpvar/jsdom,tmpvar/jsdom
lib/jsdom/living/aborting/AbortSignal-impl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport replacePath from \"../helpers/replacePath\";\n\nexport default function (t, path, state, {toMatch, toRemove, toReplace}) {\n\tconst pathIsImportDeclaration = path.isImportDeclaration();\n\tconst pathToMatch = path.get(\"source\")...
javascript
edit
0
9
mit
266d52354571e3f341996e1fa1c74c490f290a75
Velenir/babel-plugin-import-redirect
src/transformers/importExportDeclaration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar PluginError = require('plugin-error'),\n through = require('through2'),\n inlineCss = require('inline-css');\n\nmodule.exports = function (opt) {\n return through.obj(function (file, enc, cb) {\n var...
javascript
edit
0
6
mit
d05d48d6ab8a4fc29412f74247a028ff3921e215
jonkemp/gulp-inline-css,jonkemp/gulp-inline-css
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes, Component } from 'react';\nimport d3 from 'd3';\n//import * as parcoords from './lib/d3.parcoords.js';\nimport Parallel from './Parallel.js'; \n\n\n\nexport default class Landing extends Component {\n constru...
javascript
edit
0
1
mit
0662a23ca1b5b9ac8fd09cd3b94fcf79ccbe37d3
benjaminhoffman/Encompass,benjaminhoffman/Encompass,benjaminhoffman/Encompass
server/frontend/components/Landing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar childProcess = require('child_process');\nvar middleware = require('./config/initializers/middleware.js');\nvar router = require('./config/routes.js');\nvar host = process.env.HOST;\nvar port = pro...
javascript
edit
0
1
isc
0e54f763654fc79af4005e49dae810c1478fe128
zealord/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,xdv/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd,zealord/gatewayd,xdv/gatewayd
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Batcher = require('byte-stream')\nvar manualMergeStream = require('manual-merge-stream')\nvar diff2daff = require('diff2daff')\n\nmodule.exports = function (diffStream, opts, merge) {\n if (!opts) {\n opts = {}\n }\n var limit...
javascript
edit
0
3
bsd-2-clause
a1939530519f310e7e4e957b9360ac125ace618a
karissa/knead,finnp/knead
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\nconst htmlTags = require('html-tags');\nconst diff = require('lodash/difference');\nconst compileCSS = require('broccoli-postcss');\n\nconst removeableElements = () => {\n const whitelistedTags = [...
javascript
edit
0
3
mit
14c2d99e593603f4cd49a1b152f30dbc19ac9cf5
fauxton/ember-tachyons-sweeper,fauxton/ember-tachyons-sweeper
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nconsole.log(\"Starting bert. Type 'exit' when you're done.\")\n// TODO: run file watcher\n\n// TODO: add command line option to specify logs location\nlet logDir = resolveHome('~/.bert/');\n\n// create the log direc...
javascript
edit
0
2
mit
3ab481b770d2aeb7aba08a73733043210cb6fb99
oliveroneill/bert
index.js
rejected_duplicate
Near-duplicate of sample 83770
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// L-System Rule Parser\nfunction RuleParser(str) {\n this.str = str;\n this.rules = {};\n\n this.parse = function() {\n var c, d;\n var env = 0;\n var rule_str;\n var variable;\n\n for (var i = 0; i < this.str.length;...
javascript
edit
0
13
bsd-3-clause
781a59f0ae255040bebd4d3ea54de70b812c049f
dwjackson/html_fractals
express/models/rule_parser.js
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar React = require('react');\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.ca...
javascript
edit
0
4
isc
a3238411dc7bde812d20ee6385f3be8e2eefd548
mapbox/react-range
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar core = require(\"./core\");\nvar prompt = require(\"prompt-sync\")();\nvar fs = require(\"fs\");\n\nvar env = process.env.NODE_ENV || \"development\";\n\nmodule.exports = function(filepath, password) {\n var out = fs.readFileSync(f...
javascript
edit
0
3
mit
534f5464d21d3b7ff5485422169e31366ddb1c41
orangemug/encrypt-conf
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Import modules\nvar connect = require('connect');\nvar http = require('http');\nvar serveStatic = require('serve-static');\n\n// Create middleware functions, from nodeJS, to set up server\nvar app = connect();\napp.use(serveStatic('....
javascript
edit
0
2
mit
b62e6b8b50dd8f7c45bab95b1986c73a14ff27f0
NBumgardner/YouTube-Notes,NBumgardner/YouTube-Notes
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport socket from '../../socket';\nimport * as utils from '../../utils';\nimport * as xhr from './tournamentXhr';\nimport socketHandler from './socketHandler';\nimport helper from '../helper';\nimport m from 'mithril';\n\nconst tournam...
javascript
edit
0
5
mit
729e73e920ddfd4beb67d4558e7dc17a1fb648df
btrent/lichobile,btrent/lichobile,btrent/lichobile,btrent/lichobile
project/src/js/ui/tournament/tournamentCtrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { module, test } from 'qunit';\n\nimport ODataAdapter from 'ember-flexberry-data/adapters/odata';\n\nimport startApp from '../../helpers/start-app';\nimport config from '../../../../dummy/config/enviro...
javascript
edit
0
2
mit
468570966eb500348066665bc29177c218b663d3
Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections
tests/unit/odata/execute-odata-CRUD-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function styleInject (css, returnValue) {\n css = css || '';\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n if (s...
javascript
edit
0
5
mit
2a284b62b649a352ddaa3810790ab26ef76edc3e
egoist/style-inject
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(RED) {\n\tfunction PlayAudioNode(config) {\n\t\tRED.nodes.createNode(this,config);\n\t\tvar node = this;\n\t\tthis.on('input', function(msg) {\n\t\t\tRED.comms.publish(\"playaudio\", msg.payload);\n\t\t});\n\t...
javascript
edit
0
2
apache-2.0
8d5527791bcc7f664a784e7e8554d700815a47a1
lorentzlasson/node-red-contrib-play-audio,lorentzlasson/node-red-contrib-play-audio
play-audio.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\tpresets: [\n\t\t[\n\t\t\t'@babel/env',\n\t\t\t{\n\t\t\t\tdebug: true,\n\t\t\t\tmodules: false,\n\t\t\t\tuseBuiltIns: 'usage',\n\t\t\t},\n\t\t],\n\t\t'@babel/react',\n\t],\n\tplugins: ['@babel/plugin-proposal-class-...
javascript
edit
0
0
mit
39dc300c60583cfa66cec96b01869f4ec33286d5
styleguidist/react-styleguidist,sapegin/react-styleguidist,sapegin/react-styleguidist,styleguidist/react-styleguidist,styleguidist/react-styleguidist
examples/basic/babel.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Module dependencies\n */\nvar request = require('superagent')\n , _ = require('underscore');\n\n// Factory\nmodule.exports = function (opts) {\n return new Affilinet(opts);\n};\n\n// Api endpoint\nvar endpoint = 'http://produc...
javascript
edit
0
2
mit
1d7229a91ce127276235fa327ec33d8aba1335f9
urgeiolabs/node-affilinet-lookup
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n var pageToFetch = 2;\n\n $(\".more\").click(function() {\n $(this).addClass(\"loading\");\n $.get(\"/home/mock_set\", {page: pageToFetch}, function(data) {\n $(\".more\").removeClass(\"loading\");\n if...
javascript
edit
0
3
mit
6ae83b945f7ca90b5886e50c4dbcb848cd5deab8
causes/mockr,causes/mockr,causes/mockr
public/javascripts/home/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Q = require(\"q\");\nvar _ = require(\"hr.utils\");\nvar Collection = require(\"hr.collection\");\nvar logger = require(\"hr.logger\")(\"commands\");\n\nvar Command = require(\"../models/command\");\n\nvar Commands = Collection.exte...
javascript
edit
0
3
apache-2.0
3b59fd06535fa25aa9611259a0eaf82e38df6a81
CodeboxIDE/codebox,indykish/codebox,kustomzone/codebox,quietdog/codebox,nobutakaoshiro/codebox,nobutakaoshiro/codebox,rodrigues-daniel/codebox,blubrackets/codebox,Ckai1991/codebox,LogeshEswar/codebox,code-box/codebox,ahmadassaf/Codebox,rodrigues-daniel/codebox,listepo/codebox,quietdog/codebox,LogeshEswar/codebox,ahmada...
editor/collections/commands.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { findChild, findAllChildren } from '../util/domHelpers'\n\nexport default class FootnoteConverter {\n get type () { return 'fn' }\n\n get tagName () { return 'fn' }\n\n import (el, node, importer) {\n // TODO: at some poin...
javascript
edit
0
2
mit
27e6e8d24e213c9d7fb787a5103222c8ef28f1fe
substance/texture,substance/texture
src/article/converter/r2t/FootnoteConverter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport url from 'url';\n\nexport default class AppPermission extends React.Component {\n constructor(props) {\n super(props);\n\n const curl = this.getCur...
javascript
edit
0
5
apache-2.0
9ee1f3962dc33d4f0a431b81ac375900af3b866d
matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk
src/components/views/elements/AppPermission.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2014 The Axiom Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport AxiomError from 'axiom/core/error';\n\nimport environment ...
javascript
edit
0
1
apache-2.0
935bb29bd5116a08a476592b49214d312d871244
umop/axiom_old_private,chromium/axiom,rpaquay/axiom,ussuri/axiom,mcanthony/axiom
src/addon/pnacl/lib/axiom_pnacl/executables.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const createDisposableWorker = response => {\n const URL = window.URL || window.webkitURL\n const blob = new Blob([response], { type: 'application/javascript' }) // eslint-disable-line\n const worker = new Worker(URL.createObj...
javascript
edit
0
2
mit
e0f1af644da67217118f9b49caaac8d30816fd34
israelss/simple-web-worker,israelss/simple-web-worker
src/createDisposableWorker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst React = require('react-native');\n\nconst {\n Image,\n Text,\n StyleSheet,\n View,\n} = React;\n\nmodule.exports = React.createClass({\n render: function() {\n const data = this.props.rowData.data;\n var Thumbnail;\n\n ...
javascript
edit
0
2
mit
2e52ced1b1d03db640618ae2eba5cb6851435dd3
BlakeWilliams/newred
components/subreddit/post-row.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals I18n $ */\n\n/**\n * Given the definition for a chart, returns an array of <div/> elements\n * describing each series in the chart.\n */\nfunction drawLegend(definition, periods) {\n var showPeriods = periods || ['future'];\...
javascript
edit
0
2
mit
2c0bd5dfeef5aaff007f5a1ff0391bdc89c16276
quintel/etmodel,quintel/etmodel,quintel/etmodel,quintel/etmodel
app/assets/javascripts/factsheet/drawLegend.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst timeout = (dispatch, props) =>\n setTimeout(() => dispatch(props.action), props.delay)\n\nconst interval = (dispatch, props) => {\n const id = setInterval(() => {\n dispatch(props.action, Date.now())\n }, props.delay)\n ret...
javascript
edit
0
1
mit
f9923404dd63dc4ea1288dabde34332fb3ca8b58
hyperapp/hyperapp,hyperapp/hyperapp,jbucaran/hyperapp
pkg/time/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n define(\n [\n 'lodash',\n 'knockout',\n 'config/routes',\n 'util/container'\n ],\n function (_, ko, routes, container) {\n ...
javascript
edit
0
4
mit
f301299ba20a0067f44d86e359bf1814d810a9a1
rwahs/research-frontend,rwahs/research-frontend
public/app/ui/components/search/results/SearchResultsComponent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2014 Ian Davies\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 *\n * You may obtain a copy of the License at\n * \t\thtt...
javascript
edit
0
2
mit
53827506709f2a501bb4328b848cfbf470dac5e7
ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app
app/js/app/controllers/AdminPageControllers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @babel */\n/** @jsx etch.dom */\n\nimport etch from 'etch'\nimport StagingAreaComponent from './staging-area-component'\n\nexport default class CommitPanelComponent {\n constructor ({repository}) {\n this.repository = repository...
javascript
edit
0
2
mit
19dfa3f30e552f3cfed7e176262a3282d0380a19
atom/github,atom/github,atom/github
lib/commit-panel-component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Read all filenames from directory and it's subdirectories\n\n'use strict';\n\nvar fs = require('fs')\n , aritize = require('es5-ext/lib/Function/aritize').call\n , curry = require('es5-ext/lib/Function/curry').call\n , invo...
javascript
edit
0
2
mit
b78f6e0e9f8a9ca3e7c8c096400dd32428550397
medikoo/node-ext
lib/fs/readdir-directories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * PageHeaderDateRange component.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\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.\...
javascript
edit
0
1
apache-2.0
5293f49e247b3cb8617e943f7e0b33431de8d1ae
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/components/page-header-date-range.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport GoogleAnalytics from 'react-ga';\n\nGoogleAnalytics.initialize('UA-30688952-5', {\n debug: (process.env.NODE_ENV !== 'production'),\n titleCase: true,\n sampleRate: 100,\n forceSSL: true\n});\n\nexport default GoogleA...
javascript
edit
0
0
bsd-3-clause
f8e2bc8801ddda5301f4ff7c473ee72583c442e8
cwillisf/scratch-gui,LLK/scratch-gui,cwillisf/scratch-gui,LLK/scratch-gui,cwillisf/scratch-gui
src/lib/analytics.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add saving & reading history functions" }, { "role": "assistant", "content": "import fs from 'fs'\n\nexport default class Storage {\n static async addHistoryItem (title, url) {\n return new Promise((resolve, reject) => {\...
javascript
new_file
0
9
apache-2.0
ae9d478e9abecb289c875ac9069dbff0dba96bcb
Nersent/Wexond,Nersent/Wexond
src/utils/storage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Command-line arguments passed to npm when rebuilding binary packages.\nvar args = [\n \"rebuild\",\n\n // The --no-bin-links flag tells npm not to create symlinks in the\n // node_modules/.bin/ directory when rebuilding packages, ...
javascript
edit
0
1
mit
b5005711f41dbd24c4a0f3309048c817477e411f
mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,chasertech/meteor,chasertech/meteor,chasertech/meteor,mjmasn/meteor,chasertech/meteor,mjmasn/meteor,mjmasn/meteor,Hansoft/meteor,mjmasn/meteor,chasertech/meteor,mjmasn/meteor,Hansoft/meteor,chasertech/meteor,mjmasn/meteor,chasertech/meteor,Hansoft/meteor,Hansof...
tools/static-assets/server/npm-rebuild-args.js
rejected_duplicate
Near-duplicate of sample 77086
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const TOOLTIP_DEFAULT_OPTION = true\nexport const POSITION_DEFAULT_OPTION = 'mouse'\nexport const HIGHLIGHTS_DEFAULT_OPTION = true\nexport const HIGHLIGHTS_STORAGE_NAME = 'memex_link_highlights'\nexport const TOOLTIP_STORAGE_NAME...
javascript
edit
0
0
mit
4d1935449f76de2fb775a6a70518e2a897e32b90
WorldBrain/WebMemex,WorldBrain/WebMemex
src/content-tooltip/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst nodemailer = require('nodemailer')\nconst config = require('../config')\n\nlet opts = config.get('mailer.service')\n ? config.get('mailer')\n : config.get('nodemailer')\n\n// Use directTransport when nothing is configured\nif (o...
javascript
edit
0
0
mit
951089170b2b7c3e9e53f292c537165bbd1c5551
DemocracyOS/notifier
lib/mailer/transporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'), app = express(), swig = require('swig');\nvar bodyParser = require('body-parser');\nvar https = require('https'), config = require('./config');\n\napp.engine('html', swig.renderFile);\n\napp.set('view e...
javascript
edit
0
3
mit
6fa2ccc5eee5e7d3fa76a989a029f4a8ba6ee0a7
iveysaur/PiCi
app.js
rejected_duplicate
Near-duplicate of sample 102050
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nProjects = new Mongo.Collection('projects');\n\nMeteor.methods({\n insertProject: function(projectAttributes) {\n check(Meteor.userId(), String);\n check(projectAttributes, {\n name: Match.Where(function(val) {\n chec...
javascript
edit
0
2
mit
2136ad411edde6f3f2208acc12ce204c2d7137c6
PUMATeam/puma,PUMATeam/puma
lib/collections/projects.js
rejected_duplicate
Near-duplicate of sample 82963
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2017 HM Revenue & Customs\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 *\n ...
javascript
edit
0
1
apache-2.0
4e6ebfc002b096753575f9bc966ffe30e201411f
hmrc/node-git-versioning
test/git-describe.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst app = express();\nconst port = 3000;\n\nrequire('./middleware.js')(app, express);\n\napp.listen(port, function() {\n console.log('Now listening on port', port);\n});\n\nmodule.exports = app;\n...
javascript
edit
0
1
mit
a8688da380bd94ecc62c3b3e5591e39358fe2e05
MapReactor/SonderServer,aarontrank/SonderServer,aarontrank/SonderServer,MapReactor/SonderServer
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar bunyan = require('bunyan');\nvar log = bunyan.createLogger({ name: 'app' });\n\nvar app = express();\n\nvar pkg = require('./index.js');\npkg.boot(app, 'somesecret');\n\napp.post('/', pkg.router(fu...
javascript
edit
0
2
mit
17d489ce36b25598ee22a6eec5570b5395fd52c3
datashaman/datashaman-webhooks
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar WebSocketServer = require('websocket').server;\nvar http = require('http');\nvar argv = require('yargs')\n\t.alias('e', 'exec')\n .default('port', 8080)\n .alias('p', 'password')\n .describe('p', 'Set a specific password to...
javascript
edit
0
1
mit
f72cae72a9227502282e63d5bacb7c520cbfdf73
Drag0s/node-websocketd
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Mailchimp AJAX form submit VanillaJS\n * Vanilla JS\n * Author: Michiel Vandewalle\n * Github author: https://github.com/michiel-vandewalle\n * Github project: https://github.com/michiel-vandewalle/Mailchimp-AJAX-form-submit-vani...
javascript
edit
0
3
mit
6935fb259a228bca7d11ac173e23c56235d235dc
michiel-vandewalle/Mailchimp-AJAX-form-submit-vanillaJS,michiel-vandewalle/Mailchimp-AJAX-form-submit-vanillaJS
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar npmMan = require('./');\n\nvar help = require('help-version')(usage()).help,\n minimist = require('minimist'),\n manPager = require('man-pager'),\n defaultPager = require('default-pager...
javascript
edit
0
3
mit
857435f7c5981286f2ac479661f5d60ad8360f45
eush77/npm-man
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('back-link', 'Integration | Component | back link', {\n integration: true\n});\n\ntest('it renders', function(...
javascript
edit
0
1
mit
d659a3fb4492ebe6a782ada2407030fc47853487
ilios/common,ilios/common
tests/integration/components/back-link-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport fs from 'fs';\nimport readInTld from '../readInTld';\nimport {add as addToRegistry} from '../registry';\n\n\nexport function register() {\n const userHome = process.env[(process.platform === 'win32') ? 'USERPRO...
javascript
edit
0
3
mit
9f4973cb9a688c1b611895472c7285b68aa90896
MoritzKn/atom-autocomplete-jsp
src/sources/tlds.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require ../vis/module/header\n//= require moment\n//= require hammer\n//= require ../component/emitter\n\n//= require ../vis/shim\n//= require ../vis/util\n//= require ../vis/DataSet\n//= require ../vis/DataView\n\n//= require ../vi...
javascript
edit
0
0
apache-2.0
1d4203d51cea5ebc090bec9772e03ad89a892127
AlexVangelov/vis-rails,mariowise/vis-rails
vendor/assets/javascripts/vis.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nL.Control.Div = L.Control.extend({\n initialize(element, options) {\n L.Control.prototype.initialize.call(this, options);\n this._container = element || L.DomUtil.create('div', '');\n\n if(this.options.disableClickPropagation)...
javascript
edit
0
4
mit
1f5a5d92290005b2301e41f0e7fe69e24569b489
Flexberry/ember-flexberry-gis,Flexberry/ember-flexberry-gis,Flexberry/ember-flexberry-gis
vendor/leaflet.div-control.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as actionCore from '../core/action-core';\nimport {createJsonRoute, throwStatus} from '../util/express';\nimport {assert} from '../validation';\nimport * as imageHttp from './image-http';\nimport * as throttleCore from '../core...
javascript
edit
0
5
mit
7a9a992ed7ea73f67a31944035dc8e7a5779d3f4
futurice/wappuapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,kaupunki-apina/prahapp-backend
src/http/action-http.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n var element = null;\n var nav_elements = document.querySelectorAll('.nav-item-container');\n\n for (var i = 0; i < nav_elements.length; i++) {\n var current = nav_elements[i];\n if (current.innerHT...
javascript
edit
0
4
mit
c8679aa22383c8966844788d6af1b8c0e232fd91
bluekeyes/gpm-dlv,bluekeyes/gpm-dlv
gpm-dlv/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction parseFields (payload) {\n if (Array.isArray(payload)) {\n payload.forEach(parseFields);\n return;\n }\n\n if (typeof payload === 'object' && payload.hasOwnProperty('fields')) {\n payload.fields = JSON.parse(payload....
javascript
edit
0
6
mit
c40900b5793ae62b3b6747f5c4f95e077acc636f
darvelo/wishlist,darvelo/wishlist
app/scripts/app/utils/parse-fields-metadata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nlet chai = require('chai');\nlet expect = chai.expect;\n\nlet Stream = require('../src/stream');\n\ndescribe('Stream', () => {\n\tdescribe('#constructor', () => {\n\n\t\tit('returns an instanceof stream', () => {\n\t\...
javascript
edit
0
1
mit
194e348fa2691a12e8360cadae714b971b77df97
tsjondin/cody,tsjondin/cody
test/stream.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['jquery', 'DoughBaseComponent'], function($, DoughBaseComponent) {\n\n 'use strict';\n\n var ClearInput,\n uiEvents = {\n 'keydown [data-dough-clear-input]' : 'updateResetButton',\n 'click [data-dough-clear-inpu...
javascript
edit
0
2
mit
41eb7a6919ea9693543ce10fd4dd40e6553a1d0a
moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend
app/assets/javascripts/components/ClearInput.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nlet cp = require('child_process'),\n\tfs = require('fs'),\n\tstarted = false\n\nmodule.exports.start = function (done) {\n\tif (started) {\n\t\treturn done()\n\t}\n\n\t// Fork server\n\tfs.copyFileSync('node_modules/log-...
javascript
edit
0
2
mit
a448207928f130cd13a0a109138b0ff0b93d84c4
clubedaentrega/log-sink
test/utils/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('ngSocial.facebook', ['ngRoute','ngFacebook'])\n\n.config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/facebook', {\n templateUrl: 'facebook/facebook.html',\n controller: '...
javascript
edit
0
2
mit
86a91b9727883cbd9635ca6e48c48661548c98ef
PohrebniakOleskandr/ng-facebook-app,PohrebniakOleskandr/ng-facebook-app
app/facebook/facebook.js
rejected_duplicate
Near-duplicate of sample 102085
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar cancelAppointment = function(timeslot_id) {\n $(\"#modal_remote\").modal('hide');\n swal({\n title: \"Are you sure?\",\n text: \"You will be removed from this appointment.\",\n type: \"warning\",\n show...
javascript
edit
0
2
mit
b50067997bf1c1bb78b078b4333f199baf9f42b4
theresaboard/theres-a-board,theresaboard/theres-a-board,theresaboard/theres-a-board
app/assets/javascripts/cancel_appointment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Meal Selection Page\n$('.meal-selection').click( function(event) {\n if( $('.meal-selection input:checked').length > 3) {\n alert(\"Please only pick 3 feals\");\n event.target.checked = false;\n event.preventDefault();\n }...
javascript
edit
0
3
bsd-3-clause
1591d0f60a8db1ba924959ec5aa6891fd3b74aa5
joeljackson/solidus_subscription_boxes,joeljackson/solidus_subscription_boxes,joeljackson/solidus_subscription_boxes
app/assets/javascripts/solidus_subscription_boxes/subscription_selection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Helmet from 'react-helmet'\nimport { prefixLink } from 'gatsby-helpers'\n\nconst BUILD_TIME = new Date().getTime()\n\nmodule.exports = React.createClass({\n displayName: 'HTML',\n propTypes: {\n ...
javascript
edit
null
null
mit
67696ac08bf39662aa796ce44e556b73e96594a5
maxgrok/maxgrok.github.io,ochaloup/blog.chalda.cz,renegens/blog,wpioneer/gatsby-starter-lumen,hb-gatsby/gatsby-starter-lumen,Chogyuwon/chogyuwon.github.io,maxgrok/maxgrok.github.io,nicklanasa/nicklanasa.github.io,Chogyuwon/chogyuwon.github.io,alxshelepenok/gatsby-starter-lumen,alxshelepenok/gatsby-starter-lumen,YoruNoH...
html.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(angular) {\n\t'use strict';\n\t\n\tvar app = angular.module('bugminerApp', ['ngResource', 'ngRoute']);\n\t\n\tapp.config(['$routeProvider', function($routeProvider) {\n\t\t$routeProvider\n\t\t\t.when('/', {\n\t\t\t\ttemplateUr...
javascript
edit
0
1
mit
7fa187cc34d53cfda7189d95cda2e0970a9c8d11
bugminer/bugminer,bugminer/bugminer,bugminer/bugminer,bugminer/bugminer
bugminer-server/src/main/frontend/app/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n window.shared || (window.shared = {});\n\n // Allow a prop to be null, if the prop type explicitly allows this.\n // Then fall back to another validator if a value is passed.\n var nullable = function(validator) {\n ...
javascript
edit
0
2
mit
8f9737a551807974a261c4afa1a1c48f0eedf2a3
erose/studentinsights,erose/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,erose/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,jhilde/studentinsights,erose/studentinsights
app/assets/javascripts/helpers/prop_types.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global process:false */\n\nimport \"babel-polyfill\";\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { applyMiddleware, createStore, compose } from 'redux';\nimport c...
javascript
edit
0
1
apache-2.0
3662d990b6b0b438b7223ba403ee39c6c16a75d0
integer32llc/rust-playground,integer32llc/rust-playground,integer32llc/rust-playground,integer32llc/rust-playground,integer32llc/rust-playground
ui/frontend/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n 'vt-source': 'http://52.207.244.74', // source of current vector tiles\n 'vt-hist-source': 'http://52.207.244.74', // source of historic vector tiles for compare feature\n}\n\n```\n\nApply this change: Use DNS for d...
javascript
edit
0
0
bsd-3-clause
65809e2efdea1c7a7952def23dbcf100c6f82bd7
hotosm/osm-analytics,ekastimo/osm-analytics-fsp,ekastimo/osm-analytics-fsp,hotosm/osm-analytics,ekastimo/osm-analytics-fsp,hotosm/osm-analytics
app/settings/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet tests = [\n // expect, string to match against\n [ true, 'foobar' ],\n [ false, 'foobaz' ],\n [ true, 'wheelbarrow' ],\n];\n\nlet re = /bar/;\n\nfor (let i = 0; i < tests.length; i++) {\n var test = tests[i];\n var expected = ...
javascript
edit
0
0
apache-2.0
cbe0db51d7806fb07ee4b4d87f1c1f12f1eba7bb
folio-org/stripes-experiments,folio-org/stripes-experiments
util/test-regexp.js
accepted
null
true