messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name:'Instagram',\n prepareImgLinks:function (callback) {\n $('body').on('mouseenter', 'a[href*=\"?taken-by\"]', function () {\n var link ...
javascript
edit
0
3
mit
a1875e57a2da90534d43819f3e05fbcf79b0dfa6
superlime/hoverzoomgold,extesy/hoverzoom,extesy/hoverzoom,superlime/hoverzoomgold
plugins/instagram.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst childProcess = require('child_process')\nconst fs = require('fs')\n\nfunction exec (command, options) {\n return new Promise(function (resolve, reject) {\n childProcess.exec(command, options, function (err, std...
javascript
edit
0
2
isc
a307404e7c4772fa2ba65830fa857e1508056ac7
jcollado/multitest
lib/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log(\"Hello Robot Kata!\");\n\nvar floorContext = document.getElementById('floor').getContext('2d');\nvar floorImage = new Image();\nvar floorOffset = $('#floor').offset();\n\nfloorImage.src = 'roomba-dock.png';\nfloorImage.onlo...
javascript
edit
0
9
mit
91c922ac32d68db8965f335f13882c51f73bb522
ideal-knee/robot-kata-js,ideal-knee/robot-kata-js,ideal-knee/robot-kata-js
public/robot-kata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Configure client\nOpbeat.config({\n orgId: 'b3eba3d11f6e4c3a9db52f477caa4fa2',\n appId: 'e9797db8c7',\n token: '6451721d51b6d95cf6c6b09498feafd865f1f976'\n}).install()\n\n// Set optional user data\nOpbeat.setUserContext({\n email...
javascript
edit
0
1
mit
dae1278238e40b79f5bc08f72e7040ef4291f920
jahtalab/opbeat-js,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-js-core,opbeat/opbeat-js-core,opbeat/opbeat-angular,opbeat/opbeat-angular,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-react
examples/js-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n user: {\n type: 'document',\n schema: {\n attributes: {\n name: String\n }\n },\n user: true\n },\n\n project: {\n type: 'document',\n ...
javascript
edit
0
0
mit
77144a91f28c5801951861c9e7ebc3df8d12097f
pmsipilot/pmsiplan,pmsipilot/pmsiplan,pmsipilot/pmsiplan
server/config/resources.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport getenv from 'getenv'\n\n// To enable a feature, include it in the environment variable KEYBASE_FEATURES.\n// For example, KEYBASE_FEATURES=tracker2,login,awesomefeature\n\nconst tracker2Key = 'tracker2'\nconst logi...
javascript
edit
null
null
bsd-3-clause
29548e72dced63c277f16a33a5a4e44be668473b
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
shared/util/feature-flags.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\n /***********************************************************/\n /* Handle Proceed to Payment\n /***********************************************************/\n jQuery(function() {\n jQuery(document).o...
javascript
edit
0
2
mit
91e8cbf86807bef4636f38d8157557af8901f39c
flaviocopes/grav-plugin-shoppingcart-paypal,flaviocopes/grav-plugin-shoppingcart-paypal
gateways/paypal_express/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as CONST from '../constants/actionTypes';\n\nconst initialState = { open: false };\n\nexport default function promoteModal(state = initialState, action) {\n switch (action.type) {\n case CONST.SHOW_PROMOTE_MODAL:\n return ...
javascript
edit
0
3
mit
fc81c225801101221d308f300d2491a39d2db22e
mgi166/usi-front,mgi166/usi-front
frontend/reducers/promoteModal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (!process.env.NODE_ENV) {\n process.env.NODE_ENV = 'development';\n}\n\nif (process.env.NODE_ENV === 'development') {\n const dotenv = require('dotenv');\n dotenv.config(); // this loads .env with real values. It needs to be first...
javascript
edit
0
0
mit
0888954bb9641cf7b5fe5cf4dc30d89f77f6d953
OpenCollective/opencollective-api,OpenCollective/opencollective-api,OpenCollective/opencollective-api
server/lib/load-dot-env.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * gulp-hub\n * https://github.com/frankwallis/gulp-hub\n *\n * Copyright (c) 2014 Frank Wallis\n * Licensed under the MIT license.\n */\nvar gulp = require('gulp');\nvar path = require('path');\nvar util = require('gulp-util');\nva...
javascript
edit
0
6
mit
1c91214da859ceaa3d44d6e0be87d02a1e49a039
frankwallis/gulp-hub,stevemao/gulp-hub,phated/gulp-hub
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar fakeNullFiber = Object.create(null);\nvar localKey = \"_optimism_local\";\n\nfunction getCurrentFiber() {\n return fakeNullFiber;\n}\n\ntry {\n var fiberPath = require.resolve(\"fibers\");\n} catch (e) {}\n\nif ...
javascript
edit
0
2
mit
fe751015ca6bdeec416c266868c43f67a3ca19f7
benjamn/optimism,benjamn/optimism
lib/local.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('test-harness', function() {\n\n describe('globals', function() {\n\n it('should expose should as a global', function() {\n should.exist(should);\n });\n\n it('should expose sinon as a global', function() {\n ...
javascript
edit
0
1
mit
f4dd36946e54b9ba6d037275b4dd184621729de8
Springworks/node-test-harness
test/test-harness-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar vm = require('vm');\nvar includeInThisContext = function(path) {\n var code = fs.readFileSync(path);\n vm.runInThisContext(code, path);\n}.bind(this);\nincludeInThisContext(__dirname+\"/dist/liphte.min...
javascript
edit
0
1
mit
e7eddd8e4f13e556fa5c07071cec9911a689187b
maveius/liphte.ts,maveius/liphte.ts
liphte.ts.js
rejected_duplicate
Near-duplicate of sample 91466
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const winLinuxMenu = (app, window, openAbout) => (\n [{\n label: 'Daedalus',\n submenu: [{\n label: 'About',\n click() {\n openAbout();\n }\n }, {\n label: 'Close',\n accelerator: 'Ctrl+W...
javascript
edit
0
1
apache-2.0
d664f7aff910b8ccf46f45f341a0776d4498124b
input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus
electron/menus/win-linux.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nconst requirementsObj = {\n list_symbol: \"◇\",\n username: [\"start with letter\", \"be between 3-10 characters\", \"contain only [a-zA-Z] characters\"],\n ['e-mail']: [\"look like: example@example.com\...
javascript
edit
0
2
bsd-3-clause
eec077fa040d29767acae307ae74e97c8d511fba
vFujin/HearthLounge,vFujin/HearthLounge
src/containers/shared-assets/form-assets/form-tooltips.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { csp, channel, looper } from 'ember-processes';\n\nmodule('Unit: Loopers');\n\ntest('loopers take a channel name', function(assert) {\n QUnit.stop();\n assert.expect(3);\n\n let outch = csp.chan();...
javascript
edit
0
1
mit
0f775d0cea33f6525b3875db69f8830859c83b8d
machty/ember-concurrency,jeradg/ember-concurrency,jeradg/ember-concurrency,machty/ember-concurrency,jeradg/ember-concurrency,machty/ember-concurrency,machty/ember-concurrency,jeradg/ember-concurrency
tests/unit/looper-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar _ = require('lodash'),\n Promise = require('bluebird');\n\nmodule.exports = ['data', function (data) {\n var filters = function (query) {\n var where = data.utils.rangeFilter('Year', query.start, query.end);\n ...
javascript
edit
0
3
mit
f017a1d21145668d0182339bb195e98e2da21992
justinsa/maine-coone,justinsa/maine-coone
server/recalls.controller.js
rejected_duplicate
Near-duplicate of sample 79092
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nimport React, { Component } from 'react'\nimport ReactCSS from 'reactcss'\n\nimport colors from '../../styles/variables/colors'\nimport { spacing, sizing } from '../../styles/variables/utils'\n\nclass FloatingButtonItemL...
javascript
edit
0
1
mit
7e6c11f37053a33e0ad4b6ee90b6b2b4317960a7
tobycyanide/felony,henryboldi/felony,henryboldi/felony,tobycyanide/felony
src/components/floating-button/FloatingButtonItemLabel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Simple \"Done\" application\n\nlet doneItems = []\nlet text\n\nfunction input(event) {\n text = event.target.value\n}\n\nfunction done(event) {\n doneItems.push(text)\n Twirlip7.WorkspaceView.toast(\"did \" + text)\n text...
javascript
edit
0
1
mit
d2482daf863450d2ae2470ceba86b341574d7ba8
pdfernhout/Twirlip7,pdfernhout/Twirlip7,pdfernhout/Twirlip7
examples/simple-done-app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// default app configuration\nvar defaultConfig = {\n port: process.env.PORT || 4000,\n db: \"mongodb://nodegoat:<EMAIL>:10000/nodegoat\",\n cookieSecret: \"session_cookie_secret_key_here\",\n cryptoKey: \"a_secure_key_for_c...
javascript
edit
0
0
apache-2.0
10cc6b06dedfd1a90bc45d1eb5d2f469b876e70b
codiscope/NodeGoatExample,panstav/NodeGoat,samheadrick/NodeGoat,diegochavezcarro/nodegoatsecure,zkovalenko/NodeGoatTEST,nearform/NodeGoat,bertonjulian/NodeGoat,OWASP/NodeGoat,abaldock/cs132_security_lab_group_24,zkovalenko/NodeGoatTEST,isp1r0/NodeGoat,GMNetto/NodeSecurity,OWASP/NodeGoat,syzer/NodeGoat,GMNetto/NodeSecur...
config/env/all.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n/**\n * @module registry\n */\n\nmodule.exports.isListed = isListed\nmodule.exports.isUnlisted = isUnlisted\n\nvar vocab = require('solid-namespace')\n\n/**\n * Returns true if the parsed graph is a `solid:UnlistedDocument...
javascript
edit
0
1
mit
5b630ad5fe4719659bdc8fe4276f4fb013336cad
solid/solid-client,solid/solid-client,solid/solid.js,solid/solid-client,solid/solid.js,solid/solid.js
src/registry.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Link } from 'react-router-dom';\n\n\nconst linkStyle = 'pt-button pt-minimal';\n\nclass MainNavigation extends React.Component {\n\n\trender() {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<a className={link...
javascript
edit
0
1
mit
b82572880ad9c3a5960ba56b2603006546d29aa7
bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race
src/client/react/admin/AdminNavbar/MainNavigation.js
rejected_duplicate
Near-duplicate of sample 107865
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\r\n * @name Copy() method\r\n * @frame 600,400\r\n * @description 一个如何使用copy()方法模拟为图像着色的示例。\r\n */\r\nlet draft, ready;\r\nfunction preload() {\r\n ready = loadImage(\"assets/parrot-color.png\");\r\n draft = loadImage(\"assets/parr...
javascript
edit
0
1
mit
2ffec5ba86e05618c2ea809aa24f28386bce4c8f
processing/p5.js-website,processing/p5.js-website
src/data/examples/zh-Hans/05_Image/10_Copy_Method.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst Handler = require('../../router/handler');\n\nclass AlwaysProcessHandler extends Handler {\n init(context) {\n console.log(this.constructor.id, context.request.urlTokenized.join('/'));\n return Promise.re...
javascript
edit
0
1
mit
afc92c86d9c8199283dcd028ae6f09de3fda052e
coreyp1/defiant,coreyp1/defiant
lib/plugin/example/handler/alwaysProcessHandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\n\nimport * as userController from '../../controllers/recipes.js';\n\nconst user = express.Router();\n\n// define route controllers for creating sign up, login and sign out\nuser.post('/', userController.a...
javascript
edit
0
2
apache-2.0
3b02bcafaec47660344803f66baff351b44f2619
larrystone/BC-26-More-Recipes,larrystone/BC-26-More-Recipes
server/routes/recipes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global module, require, process */\n\n(function () {\n 'use strict';\n\n var required = {\n util: require('./util'),\n\n testsUtil: require('./testsUtil'),\n\n assert: require('./assert'),\n\n test: r...
javascript
edit
0
4
mit
abf494d31e5704b89875940aa9aed5e2f1bbd0cd
Xotic750/astrodate
scripts/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Utility function for triggering animate.css animations\n */\n$.fn.animateOnce = function( className ) {\n\tvar animEndEvent = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',\n\t\tanimClass = 'a...
javascript
edit
0
2
mit
83f708e666d6186b681195a674d8b90a39e60a21
NicolajKN/jQuery.animateOnce
jQuery.animateOnce.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2018-present Facebook.\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 * @format\n */\n\nimport Server from '../server.js';\nimport LogM...
javascript
edit
null
null
mit
e418a810e6b20efceb472c3165a750894afc75f0
facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper
src/__tests__/server.device.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('specialBlogApp', [\n 'ngRoute',\n 'ngResource'\n])\n .config(function ($routeProvider, $locationProvider) {\n $routeProvider\n .when('/', {\n templateUrl: 'views/index.html',\n ...
javascript
edit
0
1
mit
d073fe7d70675e9f51dde9737fe04136917b4799
SpecialCyCi/specialblog-node-js,SpecialCyCi/specialblog-node-js,SpecialCyCi/specialblog-node-js
public/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n coverageAnalysis: 'off',\n logLevel: 'info',\n mutate: [\n 'src/**/*.ts?',\n '!src/**/__tests__/*.ts?'\n ],\n mutator: 'typescript',\n reporter: ['html', ...
javascript
edit
0
1
mit
2b1f5c27fd8cfbc06c23a76b5942bec589e553c8
mthmulders/hyperion-web,mthmulders/hyperion-web,mthmulders/hyperion-web
stryker.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('newrelic');\nconst common = require('../common/common');\nconst db = require('./db');\nconst logger = require('./logger');\nconst httpServer = require('./staticHttpServer');\nconst createWsServer = require('./c...
javascript
edit
0
4
mit
97be40abed9993dae673799fbc002fa3cad4f77a
ivosh/jcm2018,ivosh/jcm2018,ivosh/jcm2018
server/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(app) {\n\tapp.controller('dataController',\n\t\t[ '$scope', 'HttpService', '$http', '$cookies',\n\t\tfunction($scope, HttpService, $http, $cookies) {\n\n\t\t\t$http.defaults.headers.common.jwt ...
javascript
edit
0
1
mit
e0181d13dd3e42ee3bbda2aa270848e06f50fe4e
Sextant-WDB/sextant-ng
app/js/controllers/data-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['jquery', 'underscore', 'backbone', 'views'], \nfunction($ , _ , Backbone , View ) {\n var AppRouter = Backbone.Router.extend({\n routes: {\n '': 'showHome',\n 'about': 'showAbou...
javascript
edit
0
2
mit
bd25f30c0bed4a02a165f6741e338f552af23cb0
jonlai/personal-website,jonlai/personal-website,jonlai/personal-website
js/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Head from 'next/head';\nimport { color } from 'lib/variables';\n\n/**\n * Adds the Lagoon icon as the favicon for the website.\n */\nconst Favicon = () => (\n <Head>\n <link rel=\"apple-touch-icon\...
javascript
edit
0
1
apache-2.0
ef7a42074a5f3521ace7a453395b6e8896a0c0ef
amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon
services/ui/src/components/Favicon/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n var worker = null,\n $output = null;\n\n $output = $('#worker-output');\n\n /**\n worker = new Worker('/js/example-worker.js');\n\n worker.addEventListener('message', function...
javascript
edit
0
1
mit
f1f4f9e1afbb331ed3eb679d4b2cebf930a21824
tanzeelkazi/web-worker,tanzeelkazi/webworker,tanzeelkazi/webworker,tanzeelkazi/web-worker,tanzeelkazi/web-worker,tanzeelkazi/webworker
js/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndb.counters.insert(\n {\n _id: \"cemetery\",\n seq: 0,\n }\n)\n\ndb.counters.insert(\n { \n _id: \"geolocation\",\n seq: 0, ...
javascript
edit
0
0
mit
793d224e509715f48e576717a249672bd81f46dc
sjccs/cemetery-reader
scripts/create_sequence.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Boom = require('boom');\n\nconst Errors = require('../lib/errors');\nconst Formatters = require('../lib/formatters');\n\nconst EXISTING_USER = Boom.conflict('User already exist');\n\nexports.listUsers = function({...
javascript
edit
0
3
mit
b555d4c3922ed5ccb2a2affa58c566cce7b9b1f6
cjduncana/adevav-back-end,cjduncana/adevav-back-end,creativo-pty/adevav-back-end,creativo-pty/adevav-back-end
handlers/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc service\n * @name barteguidenMarkedsWebApp.eventService\n * @description\n * # eventService\n * Factory in the barteguidenMarkedsWebApp.\n */\nangular.module('barteguidenMarkedsWebApp.services')\n .facto...
javascript
edit
0
1
apache-2.0
9c117026f141ef68e06571afb5bffc90a29d22ee
Studentmediene/Barteguiden,Studentmediene/Barteguiden
app/scripts/services/eventservice.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst {app} = require('electron').remote;\nconst JsonDB = require('node-json-db');\n\nlet instance = null;\n\nclass ConfigUtil {\n\tconstructor() {\n\t\tif (instance) {\n\t\t\treturn instance;\n\t\t} else {\n\t\t\tinsta...
javascript
edit
0
2
apache-2.0
46cf5c9a5c56c6abcf0ee50c9492a96588b925dc
zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-desktop,zulip/zulip-electron,zulip/zulip-electron,zulip/zulip-electron
app/renderer/js/utils/config-util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// webpack.plugins.js\n\n\"use strict\";\n\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\nconst UglifyJsWebpackPlugin = require(\"uglifyjs-webpack-plugin\");\n\nconst config = {\n plugins: [\n new ExtractTextP...
javascript
edit
0
0
mit
18a8ea8eaac3b0ec2f1868d1b9961f3befd6df78
var-bin/webpack-training,var-bin/webpack-training,var-bin/webpack-training,var-bin/webpack-training
v3/buildUtils/webpack.plugins.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet path = require('path'),\n utils = require('./utils'),\n Region = require('./Region');\n\nmodule.exports = class World {\n constructor(worldPath) {\n this.worldPath = worldPath;\n this.regionPath = path.join(wo...
javascript
edit
0
3
bsd-3-clause
9130da003fb1623b8fc1eb6eeb8bb1573ac8dece
thelonious/kld-mc-world
lib/World.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Minimum viable WebSocket server for Node.js that works through the primus\n * interface.\n *\n * @runat server\n * @api private\n */\nmodule.exports = function server() {\n var Engine = require('engine.io').Ser...
javascript
edit
0
1
mit
fe59cb4ecf7371f775f793f72bb64e5fc7203c8a
modulexcite/primus,primus/primus,primus/primus,basarat/primus,clanwqq/primus,STRML/primus,colinbate/primus,dercodebearer/primus,colinbate/primus,dercodebearer/primus,primus/primus,clanwqq/primus,dercodebearer/primus,colinbate/primus,modulexcite/primus,basarat/primus,STRML/primus,modulexcite/primus,beni55/primus,STRML/p...
transformers/engine.io/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nmodule.exports = function (app) {\n\n app.config([\n 'formioComponentsProvider',\n function(formioComponentsProvider) {\n formioComponentsProvider.register('datagrid', {\n title: 'Data Grid',\...
javascript
edit
0
2
mit
722bd5f6636d448c7b95d636e99726a4c21d9c9f
formio/ngFormio,Kelsus/ngFormio,Kelsus/ngFormio
src/components/datagrid.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Engine = require('./Engine');\nconst PublicSelect = require('./public/PublicSelect');\nconst PublicApiOptions = require('./PublicApiOptions');\nconst Explainer = require('./Explainer');\n\nclass PublicApi\n{\n\t/*...
javascript
edit
0
2
mit
9d5975acddb3dcf1851ea2c5bb2fc38ce7e42a5b
avz/node-jl-sql-api
src/PublicApi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-typography/package.json')\nvar moduleCss = fs.r...
javascript
edit
0
0
mit
12eede4a14e74957d1ad86a9a83807442f90fdd4
fenderdigital/css-utilities,fenderdigital/css-utilities,pietgeursen/pietgeursen.github.io,tachyons-css/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,getfrank/tachyons,topherauyeung/portfolio,cwonrails/tachyons,matyikriszta/moonlit-landing-page
lib/measure-avenir.js
rejected_duplicate
Near-duplicate of sample 71162
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar EventEmitter = require('events').EventEmitter;\n\nvar hardware = module.exports = new EventEmitter();\n//var e = nobleEmitter.connect(peripheralUuid, serviceUuid, characteristicUuid);\n\nvar e = (process.env.DEVICE) ?\n req...
javascript
edit
0
2
mit
501491a520c617e3a9f759f31cdfc479f7e5fe96
bekk/bekkboard,bekk/bekkboard,bekk/bekkboard,bekk/bekkboard
hardware/index.js
rejected_duplicate
Near-duplicate of sample 70201
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Based on specs at: http://wiki.theory.org/BitTorrent_Tracker_Protocol\n */\n\nfunction announceHandler(req, res) {\n console.log(req);\n res.end('stub');\n}\n\nfunction register(server) {\n server.get('/announce', announceH...
javascript
edit
0
2
bsd-3-clause
30aa7fc0d67a049d0ce3c14856226a1c25d376e9
Kami/node-bittorrent-tracker,Kami/node-bittorrent-tracker
lib/http/endpoints/announce.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { GraphQLScalarType } = require('graphql')\nconst cc = require('credit-card')\n\nfunction parse (value) {\n const {\n card,\n validCardNumber,\n validCvv: validCVV,\n validExpiryMonth,\n validExpiryYear,\n isExp...
javascript
edit
0
4
mit
1623531764f7b044f9593f74e0c344c833ceac99
mfix22/gnt
src/credit-card.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nNailPolish.SubviewManager = {\n renderEach: function (subviews) {\n this._subviews = subviews;\n _.each(subviews, function (view) {\n view.parent = view.parent || this.defaultParent();\n view.repository = view.repositor...
javascript
edit
0
4
mit
cd998cac866f0e0e820099534f2ecfaf1038468c
socialchorus/nail_polish,socialchorus/nail_polish,socialchorus/nail_polish
app/assets/javascripts/nail_polish/utils/subview_manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Base } from 'yeoman-generator';\nimport generatorArguments from './arguments';\nimport generatorOptions from './options';\nimport generatorSteps from './steps';\n\nexport default class ServicesGenerator extends Base {\n constr...
javascript
edit
0
1
mit
858675611a4bffd130eea17cba35a698a093cb43
italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,konstantinzolotarev/generator-trails,IncoCode/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,tnunes/generator-trails,jaumard/generator-trails
src/app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// 1: assertThat\n// To do: make all tests pass, leave the assert lines unchanged!\n\nimport {\n assertThat, equalTo,\n containsString, throws, returns,\n} from 'hamjest';\n\ndescribe('The core function, `assertThat()`', () => {\n it...
javascript
edit
0
2
mit
9ab94feb518c518816bd64a4e0e811dfedb3c428
tddbin/katas,tddbin/katas,tddbin/katas
katas/libraries/hamjest/assertThat.js
rejected_duplicate
Near-duplicate of sample 74636
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function() {\n return this.addBowerPackageToProject('uri.js');\n }\n};\n\n```\n\nApply this change: Fix install issue with ember install ember-websockets" ...
javascript
edit
0
1
mit
7cd25460f396d904fecb0c877f8ea06619994c38
thoov/ember-websockets,thoov/ember-websockets
blueprints/ember-websockets/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar powm1 = require( '@stdlib/math/base/special/powm1' );\nvar zeta = require( '@stdlib/math/base/special/riemann-zeta' );\nvar LN2 = require( '@stdlib/math/constants/float64-ln2' );\n\n\n// ETA //\n\n/...
javascript
edit
0
3
apache-2.0
587386215a25ebd49761d336f97ab9b04b8dd1dc
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/special/dirchlet-eta/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Make the clock on the frontpage work." }, { "role": "assistant", "content": "// Place your application-specific JavaScript functions and classes here\n// This file is automatically included by javascript_include_tag :defaults...
javascript
new_file
0
4
mit
9e01d0685c4299920360389c255c14c3a59477ce
bt4y/bulletin_board,bt4y/bulletin_board
public/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ChannelRequest, Promise, refreshProviderObject, stopLongPolling, timeoutID;\n\nPromise = require('bluebird');\n\nrefreshProviderObject = null;\n\nChannelRequest = (function() {\n\n function ChannelRequest(channelName1, callback1) {...
javascript
edit
0
3
mit
f49a0fb3b6271061be2808495cbbb180770fff60
willmendesneto/build-checker-app,willmendesneto/build-checker-app
app/renderer/components/libraries/channel-request.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require) {\n 'use strict';\n\n var AccessLevelsCollection;\n var _ = require('underscore');\n var RoutingCollection = require('oroui/js/app/models/base/routing-collection');\n\n AccessLevelsCollection = Ro...
javascript
edit
0
1
mit
62bf3607a8191925a2eb3b4a71693234dcaf5646
geoffroycochard/platform,orocrm/platform,trustify/oroplatform,geoffroycochard/platform,trustify/oroplatform,orocrm/platform,Djamy/platform,orocrm/platform,trustify/oroplatform,geoffroycochard/platform,Djamy/platform,Djamy/platform
src/Oro/Bundle/UserBundle/Resources/public/js/models/role/access-levels-collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Action } from './../lib/Action';\nimport { Util } from '@aegis-framework/artemis';\n\nexport class Placeholder extends Action {\n\n\tstatic matchString ([ action ]) {\n\t\treturn action === '$';\n\t}\n\n\tconstructor ([action, ...
javascript
edit
0
2
mit
cb33b14464bf23b36f0d1499c7a4cfde95f85f80
MonogatariVN/Monogatari,MonogatariVN/Monogatari,Monogatari/Monogatari
src/actions/Placeholder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { select, local } from \"d3-selection\";\n\nvar componentLocal = local(),\n noop = function (){};\n\nexport default function (tagName, className){\n var create,\n render = noop,\n destroy = noop,\n selector = c...
javascript
edit
0
2
bsd-3-clause
d30faa1e9f1e76715fec1f026d712ea11576af58
curran/d3-component
src/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst client = require('./../../');\n\nmodule.exports.info = {\n\taliases: [\n\t\t'ping',\n\t\t'pong'\n\t]\n};\n\nmodule.exports.command = message =>\n\tmessage.channel.createMessage(`\\`\\`\\`\\n${client.shards.map(shard => `Shard ${sh...
javascript
edit
0
2
mit
07279ef62b8c745f7d6d5e57f6166cd6125ee1c1
moustacheminer/discordmail,moustacheminer/discordmail
server/discord/cogs/ping/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\n\nclass EditActivityForm extends Component {\n componentDidMount() {\n this.description.focus();\n }\n\n updateActivity(e) {\n e.preventDefault();\n const activity = {\n ...
javascript
edit
0
1
mit
21ec0674ea25ea1d3df33fec7b825644162f1b58
mknudsen01/today,mknudsen01/today
src/components/EditActivityForm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global document, Reveal, carousel*/\n(function(document, Reveal, carousel){\n 'use strict';\n\n Reveal.addEventListener('carousel', function(){\n var container = document.getElementById('carousel');\n\n carousel.sh...
javascript
edit
0
1
mit
e3c1f2162caf735f6ba8324d698445929ecac248
dvberkel/polyglot-programming-on-jvm,dvberkel/polyglot-programming-on-jvm
js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// HMAC - keyed-Hash Message Authentication Code\nfunction hmac(hash, size, digest, data, hkey, block) {\n var i, akey, ipad, opad;\n \n data = self.Encoder(data).trunc();\n hkey = self.Encoder(hkey).trunc();\n \n if (hkey.length ...
javascript
edit
0
5
mit
87b3e5b3a0ac04537237208a7535a937109e1d13
coiscir/jsdigest,coiscir/jsdigest
src/hmac.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport SVG from 'svg-inline-react'\n\nconst Resource = ({ icon, value }) =>\n <li>\n <SVG src={icon}/>\n <span>{value}</span>\n </li>\n\nResource.propTypes = {\n icon: PropTypes.object....
javascript
edit
0
1
mit
56b40b666ecedb2c4df37e67b8216682582e77e7
albertoblaz/lord-commander,albertoblaz/lord-commander
src/components/Resource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Locale from 'ember-i18n/utils/locale';\nimport config from '../../config/environment';\n\nconst DEFAULT_LOCALE = config.i18n.defaultLocale;\n\nlet missingMessage = function(locale, key, data) {\n\n co...
javascript
edit
0
3
mit
5d7866930a492909ea703ba5343b8f028a5763b5
HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend
app/utils/i18n/missing-message.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar directives = {\n TOC: function(text) {\n var toc = require('markdown-toc');\n return toc(text).content;\n }\n};\n\nmodule.exports = {\n directiveMap: directives\n};\n\n```\n\nApply this change: Fix TOC anchor tags bug" },...
javascript
edit
0
1
mit
667625bff0a81ee0d420f9ada44d7d95bfbffa10
claudioc/jingo,claudioc/jingo
lib/directives.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Track iframe content height changes and resize element accordingly\nthis.ckan.module('iframe-resize', function(jQuery, _) {\n return {\n initialize: function() {\n var $iframe = this.el;\n var i_window = $iframe.get(0)....
javascript
edit
0
4
mit
f555d3422ada1c77e7c36d88b6b96d962b8b5f76
NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm
ckanext/nhm/theme/public/scripts/modules/iframe-resize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as distance from './distance'\nimport * as geocode from './geocode'\nimport * as itinerary from './itinerary'\nimport * as map from './map'\nimport * as profile from './profile'\nimport * as query from './query'\nimport * as re...
javascript
edit
0
0
mit
31b86c877b4a8a6f61d3dd096d3d6967a00154a5
opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux
lib/util/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add connected component tpl for jest." }, { "role": "assistant", "content": "import React from 'react';\nimport { shallow } from 'enzyme';\nimport { ${_.pascalCase(component)} } from '../../../src/features/${_.kebabCase(featu...
javascript
new_file
null
null
mit
77f9ca109a9b9f84d8d9837b8dc743b902115392
supnate/rekit
packages/rekit-core/templates/jest/ConnectedComponent.test.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class Clock {\n getTime() {\n var date = new Date();\n return date.getTime();\n }\n}\n\n```\n\nApply this change: Remove redundant class name from export" }, { "role": "assistant", "content": "export d...
javascript
edit
0
1
mit
bbb30eace3a304a423b1b1fe47c8f0130e216865
Voles/es2015-modules,Voles/es2015-modules
app/modules/clock/clock.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar title = \"Orion's Belt BattleGrounds\";\nvar Router = require('react-router');\nvar Route = Router.Route, DefaultRoute = Router.DefaultRoute,\n Link=Router.Link, RouteHandler = Router.RouteH...
javascript
edit
0
1
mit
a832aeea3b219b2e40cfa6065c0a94dc19b76a3b
orionsbelt-battlegrounds/frontend,orionsbelt-battlegrounds/frontend,orionsbelt-battlegrounds/frontend
js/components/layouts/Header.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(() => {\n\n 'use strict';\n\n chrome.storage.sync.get(function(storage) {\n let execFlag = true;\n for (var i = 0; i < storage.excludeURL.length; i++) {\n if (parseURL(location.href).match(RegExp(parseURL(storage.excludeUR...
javascript
edit
0
5
mit
11ce50309b409bb9003adc82a0c4785a35d04b67
noraworld/no-more-referrer,noraworld/no-more-referrer
src/js/inject.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Main mixin for the Bolt buic module.\n *\n * @mixin\n * @namespace Bolt.buic\n *\n * @param {Object} bolt - The Bolt module.\n * @param {Object} $ - jQuery.\n */\n(function (bolt, $) {\n 'use strict';\n\n /**\n * Bolt....
javascript
edit
0
2
mit
529c57c39a28bb6343230c52345cac29aa1c2226
joshuan/bolt,one988/cm,rossriley/bolt,Raistlfiren/bolt,bolt/bolt,joshuan/bolt,electrolinux/bolt,romulo1984/bolt,HonzaMikula/masivnipostele,cdowdy/bolt,lenvanessen/bolt,rossriley/bolt,one988/cm,nantunes/bolt,bolt/bolt,romulo1984/bolt,Raistlfiren/bolt,CarsonF/bolt,electrolinux/bolt,nikgo/bolt,rarila/bolt,electrolinux/bol...
app/src/js/modules/buic.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add pending tests for dataviews-serializer" }, { "role": "assistant", "content": "// var Backbone = require('backbone');\n// var DataviewsSerializer = require('../../../../../src/windshaft/map-serializer/anonymous-map-seriali...
javascript
new_file
0
1
bsd-3-clause
440d1c9fd5833bca5c746b9f6787eaa9993643dc
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
test/spec/windshaft/map-serializer/anonymous-map-serializer/dataviews-serializer.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = async function listApisAction(args, context) {\n const {apiClient, output, chalk} = context\n\n const client = apiClient({\n requireUser: true,\n requireProject: true\n })\n\n let endpoints\n try {\n endpo...
javascript
edit
0
5
mit
37771b1cb803e09c51f20305d52fd4df246172a0
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/core/src/actions/graphql/listApisAction.js
rejected_duplicate
Near-duplicate of sample 81952
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport commonjs from '@rollup/plugin-commonjs';\nimport resolve from '@rollup/plugin-node-resolve';\nimport json from '@rollup/plugin-json';\nimport { terser } from 'rollup-plugin-terser';\nimport peggy from 'rollup-plugin-peggy';\nimpo...
javascript
edit
0
2
mit
bf33bafd03eb1265a7b10468b4a9a74f80d5adca
caleb531/truthy,caleb531/truthy
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Reverse Words\n\n/*RULES:\n Function takes a string parameter\n Reverse every word in the string\n Return new string\n\n NOTE:\n Order of words shouldn't change\n Can't use the array.reverse() method\n*/\n\n/*PSEUDOCODE...
javascript
edit
0
0
mit
f535468595a036df443c95a84e9a182fd572115c
benjaminhyw/javascript_algorithms
reverse-words.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of pate...
javascript
edit
null
null
mit
ae8d93f223107d6fde7c1426187ac36e4747b010
fkling/react-docgen,reactjs/react-docgen,janicduplessis/react-docgen,reactjs/react-docgen,reactjs/react-docgen
src/utils/isReactModuleName.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport buble from 'rollup-plugin-buble'\nimport inject from 'rollup-plugin-inject'\nimport resolve from 'rollup-plugin-node-resolve'\nimport commonjs from 'rollup-plugin-commonjs'\nimport builtins from 'builtin-modules'\n\nconst pkg = r...
javascript
edit
0
0
mit
89a27fac6b191459d63d90a63b29da691f823879
goto-bus-stop/miniplug
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n/*:: import type { Window } from '../types'; */\n/*:: declare function getWindow(node: Node | Window): Window; */\n\nexport default function getWindow(node) {\n if (node.toString() !== '[object Window]') {\n const ownerDoc...
javascript
edit
0
4
mit
9f720da6aa6d4f72e9c3a6f26389f95eadf30cf6
FezVrasta/popper.js,floating-ui/floating-ui,floating-ui/floating-ui,FezVrasta/popper.js,floating-ui/floating-ui,FezVrasta/popper.js,FezVrasta/popper.js
src/dom-utils/getWindow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar dbm;\nvar type;\nvar seed;\n\n/**\n * We receive the dbmigrate dependency from dbmigrate initially.\n * This enables us to not have to rely on NODE_PATH.\n */\nexports.setup = function(options, seedLink) {\n dbm...
javascript
edit
0
1
apache-2.0
f3d336e625f576c47c4803051e63934f10e9b3ff
machinomy/machinomy,machinomy/machinomy,machinomy/machinomy
packages/machinomy/migrations/sqlite/20180325060555-add-created-at.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* Controllers */\n\nvar cvAppControllers = angular.module('cvAppControllers', []);\n\ncvAppControllers.controller('HomeController', ['$scope', function($scope) {\n\t$scope.name = 'Elias';\n}]);\n\ncvAppControllers.cont...
javascript
edit
0
1
mit
90effe78be49943827057b60ee6dc0b6c4ce086a
RegularSvensson/cvApp,RegularSvensson/cvApp
app/js/controllers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst winston = require('winston');\nconst util = require('util');\nconst transports = [new winston.transports.Console()];\n\nconst Rollbar = require('rollbar');\nconst rollbar = new Rollbar('ff3ef8cca74244eabffb17dc2365e7bb');\n\nconst...
javascript
edit
0
1
mit
59c2a76434297f7d6ae2389f693a3b4fd484a5f5
synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform,synapsestudios/oidc-platform
api/src/lib/logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n files: {\n javascripts: {\n joinTo: {\n 'app.js': /^app\\//,\n 'vendor.js': /^node_modules\\//\n }\n },\n\n stylesheets: {\n joinTo: {\n 'app.css': /^ap...
javascript
edit
0
0
mit
4a704fb65343f43945ac623abf6706b24ed5b9ea
ryansobol/with-react,ryansobol/with-react
brunch-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { parse } = require('url')\nconst UrlPattern = require('url-pattern')\n\nconst patternOpts = {\n segmentNameCharset: 'a-zA-Z0-9_-',\n}\n\nconst isPattern = pattern => pattern instanceof UrlPattern\n\nconst getParamsAndQuery = (pa...
javascript
edit
0
2
mit
7a6fb64b30513b987e59965a948a681037f406e9
pedronauck/micro-router
src/utils/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { connect } from \"react-redux\";\n\nimport { loadFilesFromReferences } from \"../actionCreators\";\n\nexport class DropTarget extends React.Component {\n constructor(props) {\n super(props);\n ...
javascript
edit
0
2
mit
4a991cfec283699e1c10070b89fc797c6e6320a5
captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js
js/components/DropTarget.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default [\n\t{\n\t\tinput: './src/index.js',\n\t\ttreeshake: false,\n\t\texternal: p => /^three/.test( p ),\n\t\n\t\toutput: {\n\t\n\t\t\tname: 'MeshBVHLib',\n\t\t\textend: true,\n\t\t\tformat: 'umd',\n\t\t\tfile: './umd/index.js...
javascript
edit
0
2
mit
19878840876fc3d85b169b3a02fff412d7d80b95
gkjohnson/three-mesh-bvh,gkjohnson/three-mesh-bvh,gkjohnson/three-mesh-bvh
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==========================================================================\n// Time utils\n// ==========================================================================\n\nimport is from './is';\n\n// Time helpers\nexport const getHo...
javascript
edit
0
4
mit
6d9d315ca741f5472902c0f961591fdff9bbf946
dacostafilipe/plyr,dacostafilipe/plyr,sampotts/plyr,Selz/plyr
src/js/utils/time.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar num;\nvar num_str;\nvar result = '';\n\n// check args\nif (process.argv.length < 3) { // sample value\n num = Math.floor(Math.random() * 1000000000) + 1;\n} else {\n num = process.argv[2];\n}\nnum_str = num.toString();\n\nconsole....
javascript
edit
0
0
mit
d4f7822658f0c67952bc861f8efc10431c481cb1
moji29nabe/quiz
put_comma.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar audio = document.getElementById(\"chris\");\n\nfunction pauseChris() {\n\tif (audio.currentTime >= 331000) {\n\t\taudio.pause();\n\t}\n}\n\nfunction playChris() {\n\taudio.currentTime = 952;\n\taudio.play();\n\tvar interval = setInt...
javascript
edit
0
2
mit
5ea305a1fa5591bb50d1b180546ce1e8efa4b258
nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io
scripts/chris.js
rejected_duplicate
Near-duplicate of sample 79131
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar loopback = require('loopback');\nvar boot = require('loopback-boot');\nvar path = require('path');\nvar bodyParser = require('body-parser');\n\nvar app = module.exports = loopback();\n\n// configure view handler\nap...
javascript
edit
0
3
mit
453c689050e6cb8277f47eed16035b7cd608f262
Flieral/Publisher-Service,Flieral/Publisher-Service
server/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport THREE from 'three';\n\nexport default function pointerLock( controls ) {\n const hasPointerLock = 'pointerLockElement' in document ||\n 'mozPointerLockElement' in document ||\n 'webkitPointerLockElement' in document;\n\n ...
javascript
edit
0
4
mit
ddcf7bd02ba2f41716a6d47e1dbf57e1e274da89
razh/flying-machines,razh/flying-machines
src/js/pointer-lock.js
rejected_duplicate
Near-duplicate of sample 80484
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-text-align/package.json')\nvar moduleCss = fs.r...
javascript
edit
0
0
mit
5db936da218aafcb5480119c655fbb9dc4071b94
getfrank/tachyons,topherauyeung/portfolio,topherauyeung/portfolio,matyikriszta/moonlit-landing-page,fenderdigital/css-utilities,tachyons-css/tachyons,fenderdigital/css-utilities,cwonrails/tachyons,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio
lib/text-align.js
rejected_duplicate
Near-duplicate of sample 70729
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function(params) {\n return this.store.find('namespace', btoa(params.namespace));\n }\n});\n\n```\n\nApply this change: Fix model hook not being called when...
javascript
edit
0
1
mit
e215805c984d8f3da9e5b4380ddf20ea76a88e9e
nihey/firehon,nihey/firehon
app/routes/accounts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport axios from 'axios';\n\nfunction Loader(options = {}) {\n this.page = options.page || 0;\n this.limit = options.limit || 1;\n this.url = options.url || '';\n\n this.nextPage = () => {\n this.page += 1;\n return axios.get...
javascript
edit
0
4
mit
833e6dc23b1d9d2b6d81cd0c68654a904f045578
tuelsch/bolg,tuelsch/bolg
src/modules/gallery-lazy-load.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet tpl = `\n </body>\n</html>\n`;\n\nexports.tpl = () => tpl;\n\n```\n\nApply this change: Add footer info and version number" }, { "role": "assistant", "content": "let tpl = `\n <hr />\n <address>MirrorJson versio...
javascript
edit
0
1
mit
616cfb178b1af953a73e01febef0bc8aac6017f3
makingwaves/mirrorjson,makingwaves/mirrorjson
templates/footer.handlebars.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar svg = new Blob(\n [\"<svg xmlns='http://www.w3.org/2000/svg'></svg>\"],\n {type: \"image/svg+xml;charset=utf-8\"}\n);\n\nvar img = new Image();\nvar featureDiv = document.getElementById(\"blob-urls\");\nimg.onload = function() {\n...
javascript
edit
0
1
mit
4d3fd2b55084f8033cad20ee5e939b0bdbac25a5
ssorallen/blob-feature-check,ssorallen/blob-feature-check
blob-feature-check.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar Matcher = require('../matcher');\nvar factory = require('../factory');\nvar compile = require('../compile');\nvar s = require('../strummer');\n\nmodule.exports = factory({\n initialize: funct...
javascript
edit
0
6
mit
681d637a01145bb623f035b9dec7a1fe5a1d7255
TabDigital/strummer
lib/matchers/hashmap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright (c) 2016 The IBM Research Emergent Solutions authors. All rights reserved.\n * This code may only be used under the MIT style license found at https://ibmresearch.github.io/LICENSE.txt\n * The complete set...
javascript
edit
0
1
mit
589baa87b799e86d070c3c446e32c21e193b9c61
IBMResearch/generator-polymer-init-ibm-element,IBMResearch/generator-polymer-init-ibm-element
test/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst router = require('express').Router();\nconst authRouter = require('./auth/authRouter');\nconst trackRouter = require('./track/trackRouter');\n\nrouter.get('/', function(req, res) {\n res.send('Scrawble dat track ...
javascript
edit
0
1
mit
aa5fe28d4a40438849c88ff067b072cb78ae7940
FTLam11/Audio-Station-Scrobbler,FTLam11/Audio-Station-Scrobbler
src/server/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Kefir = require('kefir');\n\nmodule.exports = Stream;\n\nfunction Stream(value) {\n if (typeof value === 'function') {\n var subscribe = value;\n this._observable = Kefir.fromBinder(function (sink) ...
javascript
edit
0
2
mit
b865cafc14bf29b97b5fea9484f3730c2772d0ec
byggjs/bygg-plugins,byggjs/bygg
mix/lib/stream.js
accepted
null
true