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 spawn = require(\"cross-spawn\");\n\nexport default function (cmd, subcmd = [], options = {}) {\n return new Promise((resolve, reject) => {\n options.maxBuffer = 1024 * 1024;\n let cp = spawn(cmd, subcmd, options);\...
javascript
edit
0
3
apache-2.0
6af08f38e9a8223c80caa842f7d4847f53ce1442
manba-inc/ci-yarn-upgrade,manba-inc/ci-yarn-upgrade
src/promise/spawn.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\r\n\r\nangular.module('seblucas.slGridListToggle', [])\r\n .directive('slGridListToggle', function() {\r\n return {\r\n restrict: 'E',\r\n require: '^ngModel',\r\n scope: {\r\n templatePrefix: '='...
javascript
edit
0
1
mit
194abeaa9d11fadd34340a2ad3705a596f8b783e
seblucas/angular-bootstrap-grid-list-toggle
grid-list-toggle.js
rejected_duplicate
Near-duplicate of sample 94943
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n* ---\n* HIDE CUSTOM PROFILE CSS MODULE\n* ---\n*\n* Disables custom CSS on a profile (imagine that!)\n*\n* Interacts with the Page Action popup as well as the profileCSSHandler\n* content script in order to keep a running list of p...
javascript
edit
0
1
mit
b32e479d381879639c4f05566f492b2e28207517
alexzaworski/CodePen-Enhancement-Suite,alexzaworski/CodePen-Enhancement-Suite
ces/modules/js/hideProfileCSS.js
rejected_duplicate
Near-duplicate of sample 77694
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar constants = require('../lib/constants')\nvar windspeed = require('../middleware/windspeed')\n\nrouter.use(windspeed)\n\n/* GET home page. */\nrouter.get('/', functio...
javascript
edit
0
1
mit
70f8244b6d41f0d8d6049044ca77d822a0b1244d
renemarcelo/kcbx-petcoke,open-city/kcbx-petcoke,manleyjster/kcbx-petcoke,manleyjster/kcbx-petcoke,chihacknight/kcbx-petcoke,justinmanley/kcbx-petcoke,benwilhelm/kcbx-petcoke,chihacknight/kcbx-petcoke,renemarcelo/kcbx-petcoke,open-city/kcbx-petcoke,open-city/kcbx-petcoke,chihacknight/kcbx-petcoke,benwilhelm/kcbx-petcoke...
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"About Classes\", function () {\n\n describe(\"Basic Declaration\", function () {\n\n it(\"should understand base usage\", function () {\n\n //Sugar Syntax for car.prototype\n class Car {\n constructor(m...
javascript
edit
0
1
mit
aca55a4941947799f5095d4882f042a59e4c2f88
tawashley/es6-javascript-koans,tawashley/es6-javascript-koans,tawashley/es6-javascript-koans
koans/AboutClasses.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport \"whatwg-fetch\";\nimport { checkStatus, parseJSON } from \"../common\";\n\nconst config = {\n path: \"/src/configs/nuage/configurations/\",\n cachingTime: 30000, // (ms) -> default 30s\n}\n\nconst fetchConfiguration = func...
javascript
edit
0
1
bsd-3-clause
0f783ac13b24321a2e3bd726a118fb861d18b664
nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework,nuagenetworks/visualization-framework
src/services/configurations/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n \n ## ##### Copyright (c) - Kevin McGinty\n # _ # ### \n # # # AtomicFrameworks\n \n*/\n\nfunction getParam(param) {\n var query = new RegExp('[?|&]'+param+'(=)?...
javascript
edit
0
3
mit
46ed165313d3c91f63c9abc1f52b9221a019e6b2
atomicframeworks/getParams.js
getParam.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nconst style = {\n position: 'fixed',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n};\n\nexport default function(storyFn) {\n ...
javascript
edit
0
1
mit
c757c8def9df65353cde125c99230b0d33dc03ff
kadirahq/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,rhalff/storybook,jribeiro/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,rhalff/storybook,jribeiro/storybook,storybooks/storybook,storybooks/react-s...
addons/centered/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('yeoMeanApp')\n .controller('UmmCtrl', function ($scope, $http) {\n $scope.movieList = [];\n\n //Update movieList to have the same data that's in the database on the sever\n $http.get('/api/movi...
javascript
edit
0
3
mit
d4dede3ed83c1551d82cc6e24d7ac4ee61bf152f
bman4789/YeoMEAN,bman4789/YeoMEAN
client/app/umm/umm.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(Modules) {\n \"use strict\";\n\n let isSixDigitHex = value => value.match(/^#[0-9A-F]{6}$/i);\n let colourOrWhite = value => isSixDigitHex(value) ? value : '#FFFFFF';\n\n Modules.ColourPreview = function() {\n\n this.st...
javascript
edit
0
0
mit
b10f0747aebe61631576f41ac8af844a7a64d9aa
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
app/assets/javascripts/colourPreview.js
rejected_duplicate
Near-duplicate of sample 83679
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n\n/*global nodeca*/\n\n\n\"use strict\";\n\n\nvar app = require('nlib').Application.create({\n name: 'fontomas',\n root: __dirname\n});\n\n\n//\n// Preset application version\n//\n\n\nnodeca.runtime.version = re...
javascript
edit
0
3
mit
0d40f465eaf0b5cdc92f042d8c7a1a7dbcf36074
marcia-kubik/fontello,Sivalingaamorthy/fontello,modulexcite/fontello,SKing7/fontellomt,asrin475/fontello,cnbin/fontello,vinod1988/fontello,cnbin/fontello,liguangmings/fontello,CapeSepias/fontello,CapeSepias/fontello,fontello/fontello,Sivalingaamorthy/fontello,liguangmings/fontello,modulexcite/fontello,CapeSepias/fontel...
fontello.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default ({title=\"\", meta=\"\", links=\"\", content=\"\", initialState={}, env={}, base_path=\"\" }) => `\n<html>\n <head>\n <meta charset=\"utf-8\">\n ${title}\n <meta name=\"viewport\" content=\"width=d...
javascript
edit
0
1
mit
e0adad556c9b4974834d7635846aec216aa38ff9
tuxsudo/react-starter
src/app/HTML.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Users from \"meteor/vulcan:users\";\nimport { addCallback } from 'meteor/vulcan:core';\n\nconst TRUSTLEVEL1_THRESHOLD = 2000\n\nfunction updateTrustedStatus ({newDocument, vote}) {\n\n const user = Users.findOne(newDocument.user...
javascript
edit
0
4
mit
e6561ad332ba95b408c566a3c696b92c052c740a
Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2
packages/lesswrong/lib/collections/users/callbacks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n $ = require('gulp-load-plugins')(),\n browserSync = require('browser-sync'),\n reload = browserSync.reload,\n config = {\n // destinations\n tmp: '.tmp',\n app: 'app',\n ...
javascript
edit
0
1
mit
af0590a693c8789c11aeeccf4e943ca8d9bccb4b
SevereOverfl0w/generator-buymilk
Gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction recipeSearch(input) {\n $(\".drop-down\").remove();\n $.ajax({\n url: \"/recipes\",\n data: input,\n }).done(function(recipeItemPartial) {\n $(recipeItemPartial).appendTo(\".main-searchbar\");\n });\n}\n\nvar throt...
javascript
edit
0
2
mit
7a7d1613c7df74bf2b8aa9922799661486eb5dba
mastein109/InstaChef,mastein109/InstaChef,mastein109/InstaChef
app/assets/javascripts/interactivity.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar uglify = require('gulp-uglify');\nvar mocha = require('gulp-mocha');\nvar coveralls = require('gulp-coveralls');\nvar rename = require('gulp-rename');\nvar lint = require('gulp-jshint');\n\ngulp.task('bu...
javascript
edit
0
1
mit
7ad13a204e1cf4a8c807ae9337506212ceeee464
chezstov/guitar.js
Gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Fix babel problems in node modules" }, { "role": "assistant", "content": "require('babel-register')({\n only: 'node_modules/grrr-gulpfile'\n});\nrequire('./gulpfile.babel.js');\n" } ]
javascript
new_file
0
0
bsd-3-clause
b3c912e3fb9593d248c12050ad43445e88b1962e
grrr-amsterdam/gulpfile
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport CompositeClosureHelper from '../../../Common/Core/CompositeClosureHelper';\n\n// ----------------------------------------------------------------------------\n// Annotation Store Provider\n// -------------------------------------...
javascript
edit
0
2
bsd-3-clause
dca99caf0ac4c766e9394ca22998375fed739014
Kitware/paraviewweb,Kitware/paraviewweb,Kitware/paraviewweb,Kitware/paraviewweb
src/InfoViz/Core/AnnotationStoreProvider/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n/*\n * App config for production.\n */\n\nmodule.exports = {\n environment: 'production',\n APIBaseURL: 'https://ifc.ds.io/',\n dataHubURL: 'https://ifc.ds.io/',\n dataHubOrganization: 'offgrid-market-opportunities',\n...
javascript
edit
0
0
mit
5015755e6b9c763aaf3b02c509b4acce5f5f3d5d
energy-data/market-opportunities,energy-data/market-opportunities,energy-data/market-opportunities
app/assets/scripts/config/production.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\nDiscourse.Dialect.inlineBetween({\n start: '\\[yuml\\]',\n stop: '\\[\\/yuml\\]',\n rawContents: true,\n emitter: function(contents) {\n var uri = \"http://yuml.me/diagram/scruffy/class/\" + encodeURI...
javascript
edit
0
1
mit
9e5e4c18e6f4fac4c546bb016374128dddf41a2d
sekhat/discourse-yuml,sekhat/discourse-yuml
assets/javascript/yuml_dialect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar argv = require('minimist')(process.argv.slice(2));\nvar injection = require('./services/injection');\n\nvar port = argv.port || process.env.PORT || 9080;\nvar gitUrl = argv.git || process.env.GIT_URL;\nvar dbU...
javascript
edit
0
3
mit
dc11b6eb49d321d164cb881fd1f74a1eb0f3e22d
allcount/allcountjs,chikh/allcountjs,chikh/allcountjs,allcount/allcountjs
allcount.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp'),\n browserify = require('browserify'),\n transform = require('vinyl-transform'),\n uglify = require('gulp-uglify'),\n sourcemaps = require('gulp-sourcemaps'),\n jasmine = requir...
javascript
edit
0
1
mit
085b4876e8c5b733c2671237ddaa96f3eb97e8eb
rowanoulton/bowler,rowanoulton/bowler
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar apigen = require('gulp-apigen');\nvar phpunit = require('gulp-phpunit');\nvar spawn = require('child_process').spawn;\nvar jasmine = require('gulp-jasmine');\n\ngulp.task('apigen', function() {\n gulp.s...
javascript
edit
0
1
mit
0ed2e70f6ef7bead5766b6e79459f42809203ac7
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar browserSync = require('browser-sync').create();\n\ngulp.task('default', function() {\n browserSync.init({\n server: {\n baseDir: \"./app\"\n }\n });\n});\n\n\n```\n\nApply this change: Add b...
javascript
edit
0
1
mit
a6d83744dcaa3d17472d0df7709f47bcec45a7b0
rish/fame,rish/fame
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst gulp = require('gulp'),\n\n config = require('./gulp/config.json');\n\nlet tasks = Object.keys(config.task),\n defaultTasks = tasks.filter(taskName => {\n return config.task[taskName].default;\n ...
javascript
edit
0
1
mit
4e93a468650cbf98fc632fe2ff13f32dd0994627
mparaz/wooji-js-starter-kit,mparaz/wooji-js-starter-kit
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar eslint = require('gulp-eslint');\nvar htmlExtract = require('gulp-html-extract');\nvar stylelint = require('gulp-stylelint');\n\ngulp.task('lint', ['lint:js', 'lint:html', 'lint:css']);\...
javascript
edit
0
1
apache-2.0
856520193d4b38850e5ab8188bb0ba4d87fb6f8f
vaadin/vaadin-date-picker,vaadin/vaadin-date-picker
gulpfile.js
rejected_duplicate
Near-duplicate of sample 78028
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar Cache = require('./Cache'),\n inherits = require('inherits');\n\nvar MemCache = function () {\n this._cache = { };\n this._timestamps = { };\n this._expireTime = 1000 * 60 * 10;\n};\n\ninherits(MemCach...
javascript
edit
0
3
mit
6d8c4259e6f3f1286c4f27a44e610a398d221fec
mtfranchetto/ng-common
lib/net/MemCache.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar sourcemaps = require('gulp-sourcemaps');\nvar stylus = require('gulp-stylus');\nvar rename = require('gulp-rename');\nvar nib = require('nib');\nvar cssnano = require('gulp-cssnano');\n\nvar mainStyl = '...
javascript
edit
0
1
mit
1ac99dc52cc1035d67061b20e4ab15660528d656
RyenNelsen/baremetal
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport \"bootstrap/dist/css/bootstrap.css\"; //Bootstrap\nimport \"./index.css\"; //NWB Styles\nimport \"./theme.css\"; //Cayman Theme\nimport \"../../node_modules/highlight.js/styles/tomorrow-night.css\";\n\nimport React from \"react\"...
javascript
edit
0
0
mit
17a0900a5f91506244e72f21728ea1182fbc7746
cbartram/nanoleaf-layout,cbartram/nanoleaf-layout
demo/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst gulp_ts = require('gulp-typescript');\nconst gulp_tslint = require('gulp-tslint');\nconst gulp_sourcemaps = require('gulp-sourcemaps');\nconst tslint = require('tslint');\nconst del = require('del');...
javascript
edit
0
1
mit
32f74aaf742addcdcb1b96a3c18f355eeaf0f17a
zajrik/yamdbf,zajrik/yamdbf
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar babel = require('babel-jest'),\n jsPath = /.*\\/react\\-seed\\/src\\/js(?:\\/[a-z]+)?(?:\\/__tests__)?\\/[a-zA-Z]+(?:\\-test)?\\.jsx?$/,\n lessPath = /.*\\/react\\-seed\\/src\\/less\\/[a-z]+\\/[a-zA-Z]+\\.less$/;\n\n\nmodule.e...
javascript
edit
0
3
mit
ce2964fb5848326a5c4b6c550ab09a39e307e209
ameyms/react-seed,ameyms/react-seed
build/jest/module-preprocessor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Mn from 'backbone.marionette';\n\nvar OverlayView = Mn.ItemView.extend({\n className: 'overlay-view hide',\n\n // The OverlayView doesn't need a template: it's simply an element\n // that covers up the entirety of the applicat...
javascript
edit
null
null
mit
63579450b396e1c115519158aa2020a2ee4e6213
jmeas/backbone.overlay-view,jmeas/backbone.overlay-view
src/marionette-overlay-view.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nexport function roundValue(value: number | string | void): number | string {\n if (typeof value !== 'number') {\n return '—';\n }\n const parsedValue = parseFloat(value.toString());\n const sizes = ['', ' K'...
javascript
edit
null
null
mit
cf970b2f1be3764641657a82adc51bc3da51790f
moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0
src/helpers.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux'\nimport { push } from 'connected-react-router';\n\nimport { selectors } from '@openchemistry/redux'\nimport { calculations, molecules } from '@openchemistr...
javascript
edit
0
2
bsd-3-clause
fb1ee7a7493a313ffc43ff70500b00e430590229
OpenChemistry/mongochemclient,OpenChemistry/mongochemclient
src/containers/calculations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst MotifulClient = require('./structures/MotifulClient');\nconst CommandController = require('./controllers/CommandController');\nconst DiscordAPIError = require('discord.js/src/rest/DiscordAPIError');\n\nconst client = new MotifulCl...
javascript
edit
0
6
mit
25a45c88604af24eb97afdfaa43fe1d77a0bae66
robflop/motiful
src/motiful.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\n\nmodule.exports = function (start, opts) {\n var modules = opts.moduleDirectory || 'node_modules';\n var splitRe = process.platform === 'win32' ? /[\\/\\\\]/ : /\\/+/;\n var parts = start.split(s...
javascript
edit
0
7
mit
b5ba0430b012d93367a4f87c304f1d4c8c22941c
AuyaJackie/node-resolve,jameswomack/node-resolve,substack/node-resolve,parshap/node-resolve
lib/node-modules-paths.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Japanese translation for foundation-datepicker\n * Norio Suzuki <https://github.com/suzuki/>\n */\n;(function($){\n\t$.fn.fdatepicker.dates['ja'] = {\n\t days: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\...
javascript
edit
0
1
apache-2.0
bf4c31f4992b20eb0d585b846ec043eae0cd7a96
najlepsiwebdesigner/foundation-datepicker,najlepsiwebdesigner/foundation-datepicker
js/locales/foundation-datepicker.ja.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n// Import Wit.Ai\nconst botlogic = require('./botlogic/botlogic.js');\nconst facebook = require('./channels/facebook.js');\n\nvar messageReceived;\n\nmodule.exports = {\n receivedMessage: function(message) {\n r...
javascript
edit
0
3
apache-2.0
4f4837536a973054493ac7e79fe5a4857339d1be
ArnaudFavier/Chatbot-GrandLyon,ArnaudFavier/Chatbot-GrandLyon,ArnaudFavier/Chatbot-GrandLyon,ArnaudFavier/Chatbot-GrandLyon
core.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable global-require, import/no-dynamic-require */\n\nimport React, { Component, PropTypes } from 'react'\n\nexport default class ComponentDoc extends Component {\n static propTypes = {\n path: PropTypes.string.isRequire...
javascript
edit
0
3
mit
70bd68a426e62ea1450a674106f75ea9de85cb4e
5rabbits/portrait
docs/ComponentDoc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const defaultOptions = {\n acornOption: {\n ecmaVersion: 6,\n // sourceType: 'script' or 'module'\n // 'module' is used for ES6 modules and\n // 'use strict' assumed for those modules.\n // T...
javascript
edit
0
0
apache-2.0
9c495597dbc7a04496829ee887e83ceea8cd737d
webida/yatern,happibum/yatern,webida/yatern,webida/calcium,webida/calcium,happibum/calcium,happibum/yatern,happibum/calcium
defaultOption.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Objectid = mongoose.Schema.Types.ObjectId;\n\nvar GuestSchema = new Schema({\n\tname: String,\n\torganisation: String,\n\tlocation_id: Objectid,\n\tem...
javascript
edit
0
0
mit
b089f1ac3393b861b1d1fc1d31b9f6d6a6aa0281
10layer/jexpress,10layer/jexpress
models/guest_model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { resolve } from 'path'\nimport { node } from 'execa'\n\nconst childProcessHelperPath = resolve(__dirname, 'childProcessHelper.js')\n\nexport default class ChildProcessRunner {\n #env = null\n #functionKey = null\n #handlerNam...
javascript
edit
0
2
mit
e97ecd3cd178926784c09f2c5f588b8e0d34f0e9
dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline
src/lambda/handler-runner/child-process-runner/ChildProcessRunner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Collapse remember\n * Use a cookie to \"remember\" the state of bootstrap collapse divs\n * use the 'collapse-remember' class to get this functionality\n */\n$(document).ready(function () {\n const state_cookie_c = 'collapse-remem...
javascript
edit
0
3
apache-2.0
88c2cfa9c2a0c7ae49b7044437477973b304460a
twschum/mix-mind,twschum/mix-mind,twschum/mix-mind,twschum/mix-mind
mixmind/static/js/collapse_remember.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar async = require('async');\nvar qs = require('querystring');\n\n/**\n * Fetch documents and populate their `document_type` and `provider` keys\n * @param {Object} [params] GET parameters to pass to `/documents` (e.g....
javascript
edit
0
2
mit
fe0e70a8db385d8d963e1ec17aa62bf228b9377c
AnyFetch/anyfetch.js,AnyFetch/anyfetch.js
lib/utility/get-documents-with-info.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar iframeID = 1408059618092;\n\nfunction hideMenus() {\n\tvar iframe = document.getElementById(iframeID);\n\tiframe.hidden = true;\n}\n\n```\n\nApply this change: Add console message that describes behavior" }, { "role": "assis...
javascript
edit
0
1
mit
f03e2624fe48172be654736a3c3eeecfd71c714d
KentDenverSchool/KentLunchExtension
extension.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global ERRORS */\n\nimport * as generatedErrors from '../generated-errors/index';\nimport ChromiumNetError from './ChromiumNetError';\n\nconst errors = ERRORS;\n\nconst errorCodeMap = {};\nerrors.forEach((error) => {\n errorCodeMap[...
javascript
edit
0
2
mit
62df5146c594698de0ce835ad2fc352c1e3e9f84
maxkueng/chromium-net-errors,maxkueng/chromium-net-errors
src/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar _ = require('lodash')\nvar chalk = require('chalk')\n\nvar helpers = {\n\n // Pick off the attributes from only the current layer of the object.\n skim: function(data) {\n return _.map(data, function(obj) {\n return ...
javascript
edit
0
3
mit
72c934a2d107f9ff7864b8b42bb843e31ad4e3bc
harriha/knex,carragom/knex,CorvusCorrax/knex,joeframbach/knex,Atlantis-Software/knex,maxcnunes/knex,maxcnunes/knex,noodle/knex,abegines/knex,statyan/knex,WaltRock/knex,whitelynx/knex,joeframbach/knex,joeframbach/knex,CorvusCorrax/knex,tgriesser/knex,carragom/knex,wubzz/knex,wubzz/knex,Atlantis-Software/knex,abegines/kn...
src/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nGoogleApi = {\n get: Meteor._wrapAsync(_.bind(GoogleApiAsync.get, GoogleApiAsync)),\n \n post: Meteor._wrapAsync(_.bind(GoogleApiAsync.post, GoogleApiAsync))\n}\n\n```\n\nApply this change: Allow async API on server" }, { "ro...
javascript
edit
0
2
mit
4007973b864d140338b0f9788d89b83700102c84
jasonparekh/meteor-google-api,wizonesolutions/meteor-google-api,danopia/meteor-google-api,quackware/meteor-google-api,percolatestudio/meteor-google-api,ro6/meteor-google-api,hexsprite/meteor-google-api
google-api-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar GameDataCreator = require('../gamedata');\nvar PointView = require('../prefabs/pointview');\n\nfunction Editor() {}\nEditor.prototype = {\n create: function() {\n this.game.data = new GameDataCreator.GameData();\n...
javascript
edit
0
1
bsd-3-clause
e817c411254e4da4857c17d960cf49f2fa4e3d5a
Juholei/Lukuinto-Spring-2015-editor,Juholei/Lukuinto-Spring-2015-editor
game/states/editor.js
rejected_duplicate
Near-duplicate of sample 87665
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * main.js\n */\n\n'use strict';\n\n/* eslint-disable */\n\n// Only run in capable browsers via feature detection\nvar didCutTheMustard = 'querySelector' in document\n && 'classList' in document.createElement('a')\n && 'addEventL...
javascript
edit
0
1
mit
9980c2a7a0dedb8ff179d03b1381b5a9473bae89
frippz/frippz.se,frippz/frippz.se,frippz/frippz.se
src/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global Calendar, vis */\n\n(function() {\n \"use strict\";\n\n var calendar = new Calendar();\n calendar.init(document.getElementById('visualization'),\n {\n height: \"100vh\", \n orientation: \"top\",\n zo...
javascript
edit
0
4
apache-2.0
de9747044ca07aaa23e99a769eebc125c9bd8a4f
fidash/widget-calendar,fidash/widget-calendar
src/js/main.js
rejected_duplicate
Near-duplicate of sample 70100
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { StatsD } from 'node-dogstatsd'\nvar dogstatsd = new StatsD()\n\nfunction registerEvents (bot) {\n bot.on('messageCreate', (msg) => {\n dogstatsd.increment('blair.messages_total')\n if (msg.command) {\n dogstatsd.inc...
javascript
edit
0
3
mit
db4f7edfcfae9ecff2c9aafd30c89d3422daa84f
germanoeich/blair-bot,germanoeich/blair-bot
src/metrics.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\n'use strict';\n\nfunction getTaskConfig(projectConfig) {\n\t//Browser Sync options object\n\t//https://www.browsersync.io/docs/options\n\n\tvar taskConfig = {\n\t\t//Server config options\n\t\tserver: {\n\t\t\...
javascript
edit
0
1
mit
26abb8f60a8b4026bdb53c0d89f4dc0b22f87500
cartridge/cartridge-local-server
_config/task.local-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport store from '../store';\n\nexport const getInstance = () => {\n return store.getState().pouchdb;\n};\n\nexport const getDocument = async (dbName) => {\n const { instance } = getInstance();\n\n try {\n const result = await in...
javascript
edit
0
2
mit
0497effe18a9db99e5a9a3853b86825d4bbe8a49
nikolay-radkov/EBudgie,nikolay-radkov/EBudgie,nikolay-radkov/EBudgie
src/services/pouchdbService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {field, isFunction, isObject} from 'vega-util';\n\nfunction isBuffer(_) {\n return (typeof Buffer === 'function' && isFunction(Buffer.isBuffer))\n ? Buffer.isBuffer(_) : false;\n}\n\nexport default function(data, format) {\n ...
javascript
edit
0
3
bsd-3-clause
bf645a3bceee288ccf1d4615fbba6b05b4ff0cde
vega/vega,vega/vega,vega/vega,vega/vega,lgrammel/vega
packages/vega-loader/src/formats/json.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (typeof document !== \"undefined\") {\n (function() {\n minispade = {\n root: null,\n modules: {},\n loaded: {},\n\n require: function(name) {\n var loaded = minispade.loaded[name];\n var mod = m...
javascript
edit
0
6
mit
4b7b4d5273ec3a9363aef3ce251ea765f80ad3c8
wycats/minispade,wycats/minispade
lib/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n<<<<<<< HEAD\nimport ZeroClipboard from 'ember-cli-zero-clipboard/components/zero-clipboard';\n\nexport default ZeroClipboard.extend({\n layoutName: 'components/bs-button',\n tagName: 'button',\n classNameBindings: 'class',\n ...
javascript
edit
0
1
bsd-3-clause
1ae115af3e87e35b0faafcff1f541d58905f2d85
nju520/portia,SouthStar/portia,SouthStar/portia,nju520/portia,amikey/portia,NicoloPernigo/portia,hanicker/portia,NoisyText/portia,chennqqi/portia,anjuncc/portia,amikey/portia,nju520/portia,naveenvprakash/portia,Youwotma/portia,naveenvprakash/portia,pombredanne/portia,nju520/portia,Suninus/portia,CENDARI/portia,verylast...
slyd/app/components/copy-clipboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar memoize = require('memoizee/plain')\n , defineStringLine = require('../string-line');\n\nmodule.exports = memoize(function (db) {\n\treturn defineStringLine(db).extend('Filename', {\n\t\tpattern: { value: ...
javascript
edit
0
3
mit
a264056e89c331f56fcd4163941ff9b4eb69060c
medikoo/dbjs-ext
string/string-line/filename.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst expect = require('chai').expect\nconst nunjucks = require('nunjucks')\nconst components = require('../../../lib/components')\n\nconst expectComponentRenders = (name, input) => {\n let componentPath = components.templatePathFor(na...
javascript
edit
0
2
mit
aad8bc05158c4cc30dcd6b2f534fa240e5d46c57
alphagov/govuk_frontend_alpha,alphagov/govuk_frontend_alpha,alphagov/govuk_frontend_alpha
test/specs/components/smoke_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar markdown = require('markdown');\n\n(function(dust) {\n dust.helpers.markdown = function(chunk, context, bodies, params) {\n if (bodies.block) {\n return chunk.capture(bodies.block, context, function(string, chunk) {\n ...
javascript
edit
0
2
mit
23aba14765e2a5a6ea1df68096bde802e5f7bc0f
paulomcnally/dustjs-helpers-markdown
lib/dust-helpers-markdown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { storiesOf } from '@storybook/react'\nimport { Timestamp } from '../src/index.js'\n\nconst stories = storiesOf('Timestamp', module)\n\nconst customFormatter = timestamp => `Yes!: ${timestamp}`\n\nstori...
javascript
edit
0
1
mit
06e8a00f1260bad05fc9284afc35e7d3c89e81bd
helpscout/blue,helpscout/blue,helpscout/blue
stories/Timestamp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function() {\n window.stubFileUpload = function(el) {\n return new FakeFileUpload(el);\n };\n\n function FakeFileUpload(fileInputElement) {\n var self = this;\n spyOn($.fn, 'fileupload').andCallFake(funct...
javascript
edit
0
1
apache-2.0
29e43e17af96c05880d4b3b49e097eb99bc477f2
lukepolo/chorus,mpushpav/chorus,hewtest/chorus,prakash-alpine/chorus,lukepolo/chorus,lukepolo/chorus,jamesblunt/chorus,atul-alpine/chorus,mpushpav/chorus,mpushpav/chorus,jamesblunt/chorus,hewtest/chorus,jamesblunt/chorus,jamesblunt/chorus,jamesblunt/chorus,lukepolo/chorus,prakash-alpine/chorus,lukepolo/chorus,atul-alpi...
spec/javascripts/helpers/fake_upload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { uniq, sort } from '@ember/object/computed';\nimport Controller from '@ember/controller';\n\nexport default Controller.extend({\n sortProperties: [\n 'statusSort:asc',\n 'organizationKindSort:asc',\n 'nomen:asc',\n ],...
javascript
edit
0
1
bsd-2-clause
816802feabbade5309a388095d1fd5ee1e97b14d
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
app/controllers/dashboard/session-manager/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.elasticsearchHealth.onCreated(function () {\n // Get reference to template instance\n const templateInstance = this;\n\n // Create reactive variable for Elasticsearch health\n templateInstance.elasticsearchHealth = new Reac...
javascript
edit
0
2
mit
821d1e67fc2d2eed1d854d570906fcdad6dc477e
apinf/api-umbrella-dashboard,apinf/api-umbrella-dashboard
dashboard/client/health/health.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nself.addEventListener('push', (event) => {\n const icon = '/images/icon-256x256.png';\n event.waitUntil(fetch('/event').then((res) => {\n if (res.status !== 200) {\n console.log('Error fetching latest notification:', res.statu...
javascript
edit
0
5
mit
392da9963e37840b8c2cfe4d1e68b6f3d0fbcab1
Ikornaselur/canaritus,Ikornaselur/canaritus
src/worker/service-worker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.listeners = {\n\thit: function (l10n) {\n\t\treturn function (room, attacker, defender, players, hitLocation, damageDealt) {\n\t\t\tcheckForCrit(attacker, defender, damageDealt);\n\t\t}\n\t},\n};\n\nfunction checkForCrit(attacke...
javascript
edit
0
4
mit
e4336dd1176a59f9ee034f611bcf96ef05c7e68a
shawncplus/ranviermud,seanohue/ranviermud,seanohue/ranviermud
scripts/behaviors/objects/wieldable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a...
javascript
edit
0
0
apache-2.0
d3ec368071544e4fd9409f22eda7804b0dd0bbc8
gtrujillop/RealEstateWeb,gtrujillop/RealEstateWeb,gtrujillop/RealEstateWeb
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n( function() {\n\tvar is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,\n\t is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,\n\t is_ie = navigator.userAgent.toLowerCase().indexOf( '...
javascript
edit
0
6
mit
67fb1af3f3118b8241e094e11c01afa437dca0ef
andbaz/launchbaz,carl-alberto/business-portfolio,vaishaliagola27/_s,jchck/jchck_,vaishaliagola27/_s,andbaz/launchbaz,vaishaliagola27/_s,carl-alberto/business-portfolio,jchck/jchck_
js/skip-link-focus-fix.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
0
mit
89d19a986bdf33568dbd11b03a52150347ea7946
jasnow/24pullrequests,tarebyte/24pullrequests,tarebyte/24pullrequests,tarebyte/24pullrequests,pimterry/24pullrequests,jasnow/24pullrequests5,tarebyte/24pullrequests,arumoy-shome/24pullrequests,jasnow/24pullrequests,24pullrequests/24pullrequests,arumoy-shome/24pullrequests,acrogenesis-lab/24pullrequests,24pullrequests/2...
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
0
mit
06b3e56b50e35c8536f891f152825c341394530a
varunarang/oratsapp,varunarang/oratsapp
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 77461
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n refines: 'foam.dao.DAOProperty',\n properties: [\n {\n name: 'swiftType',\n ...
javascript
edit
0
0
apache-2.0
9a4af17df85fca6c83331f0a0d6473e3187de4a0
foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2
src/foam/swift/refines/AbstractDAO.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ExpandingList = new Vue({\n el: \"#expandingList\",\n data: {\n names: ['']\n },\n methods: {\n addBlankName: function () {\n if (this.hasBlankName()) {\n return\n }\n this.names.push('')\n },\n\n ...
javascript
edit
0
3
mit
71ffb35c8694ad9d2b476e4d9db9180d3073ed2b
koppen/javascript-expanding-list-experiment,koppen/javascript-expanding-list-experiment,koppen/javascript-expanding-list-experiment
vue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { test } from 'qunit';\nimport moduleForAcceptance from 'cargo/tests/helpers/module-for-acceptance';\n\nmoduleForAcceptance('Acceptance | crate page');\n\ntest('visiting a crate page from the front page', function(assert) {\n ...
javascript
edit
0
1
apache-2.0
881d009254d1bf288d02aa563687fab3cc6a5f1c
rust-lang/crates.io,steveklabnik/crates.io,steveklabnik/crates.io,rust-lang/crates.io,rust-lang/crates.io,steveklabnik/crates.io,rust-lang/crates.io,steveklabnik/crates.io
tests/acceptance/crate-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Define the map component of the map module.\n */\n'use strict';\n\nangular.module('map').component('mapComponent', {\n templateUrl: 'map/map.template.html',\n controller: function($scope, $http) {\n\n ...
javascript
edit
0
1
apache-2.0
31fe3f1b56b5f17266165c77aaf93bf62c4d0595
googleinterns/step263-2020,googleinterns/step263-2020,googleinterns/step263-2020,googleinterns/step263-2020
capstone-project/src/main/webapp/map/map.component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = function (config) {\n let storage = config.common.storage\n config.common.dbIndexes = {\n 'users': { user: 1, username: 1, email: 1 },\n 'users.code': { user: 1 },\n 'rooms': { active: 1, status: 1 },\n ...
javascript
edit
0
1
mit
bd02ca81e7028f12400adabe78ce0bdc24614949
ScreepsMods/screepsmod-mongo
lib/common/storage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Image, requireNativeComponent } from 'react-native';\nimport { meetOrSliceTypes, alignEnum } from '../lib/extract/extractViewBox';\nimport extractProps, { propsAndStyles } from '../lib/extract/extrac...
javascript
edit
0
1
mit
3cff87fd4f357ca33a9671ce86af679739ee16fc
magicismight/react-native-svg,magicismight/react-native-svg,magicismight/react-native-svg,magicismight/react-native-svg,react-native-community/react-native-svg,magicismight/react-native-art-svg,react-native-community/react-native-svg,magicismight/react-native-svg,react-native-community/react-native-svg,react-native-com...
elements/Image.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @ngdoc service\n * @name just.service.service:faqService\n * @description\n * # faqService\n * Service to handle FAQ's.\n */\nangular.module('just.service')\n .service('faqService', ['i18nService', 'Resources', '$q', function ...
javascript
edit
0
1
mit
e41096891fab0658a11a2db0ee3ab84a14c5b834
justarrived/just-match-frontend,justarrived/just-match-frontend,justarrived/just-match-frontend,justarrived/just-match-frontend
src/app/common/services/faq-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"extends\": \"justinlocsei/configurations/es6\",\n \"ecmaFeatures\": {\n \"jsx\": true\n },\n \"env\": {\n \"browser\": true\n },\n \"plugins\": [\n \"react\"\n ],\n \"rules\": {\n \"jsx-quotes\...
javascript
edit
0
0
mit
2b5736dde6a731d4dd54975b212119f6d20db819
justinlocsei/eslint-config-chiton
configurations/react.js
rejected_duplicate
Near-duplicate of sample 92046
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require_tree ./lib\n//= require_tree .\n//= require_self\n\n//= require select2\n\nGOVUK.orderedLists.init();\nGOVUK.curatedLists.init();\n\n(function() {\n \"use strict\";\n window.GOVUK = window.GOVUK || {};\n var $ = window.jQ...
javascript
edit
0
2
mit
0f29b8123e58fcfe349295b18be2c58cf8aebee8
alphagov/collections-publisher,alphagov/collections-publisher,alphagov/collections-publisher
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.profileShow.helpers({\n initiatives: function(){\n return Initiatives.find({\n createdBy: Meteor.userId(),\n usersVoted: Meteor.userId()\n });\n }\n})\n```\n\nApply this change: Fix CreatedBy error in profile"...
javascript
edit
0
1
mit
74ff96a7808e6c8df370356a464d34e61a6594a3
mtr-cherish/cherish,mtr-cherish/cherish
client/templates/profile/show/show.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a...
javascript
edit
0
0
apache-2.0
2528d9c36e11e87ba77433756b24b013bad027b6
azyth/RNR_tracker,azyth/RNR_tracker,azyth/RNR_tracker,azyth/RNR_tracker
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 71086
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require govuk_toolkit\n//= require_tree .\n\njQuery(function($) {\n\n \"use strict\";\n GOVUK.primaryLinks.init('.primary-item');\n\n $('.js-collapsible-collection').each(function(){\n new GOVUK.CollapsibleCollection({$el:$(th...
javascript
edit
0
2
mit
72a04474276641b5302a75399841f676e2504d5a
alphagov/manuals-frontend,alphagov/manuals-frontend,alphagov/manuals-frontend,alphagov/manuals-frontend
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst test = require('tape');\n\n// Load Array.prototype.customMap function\nrequire('../exercises/map/map');\n// Load Array.prototype.customFilter function\nrequire('../exercises/filter/filter');\n// Load Array.prototype.concatAll func...
javascript
edit
0
1
mit
5d2d5d3fe2fde142c449bffc27bf3674efb56d77
Code-Craftsmanship-Saturdays/software-testing,Code-Craftsmanship-Saturdays/software-testing
unit-test/program.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by dungvn3000 on 4/4/14.\n */\n\nExt.define('sunerp.component.NhanVienCb', {\n extend: 'sunerp.component.Combobox',\n alias: 'widget.nhanviencb',\n gird: null,\n valueField: 'maNv',\n displayField: 'fullNa...
javascript
edit
0
3
apache-2.0
fa4c0b42c4c0bdafcc2a56806ce95f787c7bfc60
SunriseSoftVN/sunerp,SunriseSoftVN/sunerp,SunriseSoftVN/sunerp
app/assets/js/component/NhanVienCb.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar five = require('johnny-five');\nvar myBoard = new five.Board();\n\n/**\n * The code for the project, that will be run when the board is ready\n *\n * This is a 'callback' function that will be run by johnny-five aft...
javascript
edit
0
1
mit
b149ed69f468aabd414432e1bda73b0a561ab9e6
mMerlin/j5-exploring
lint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar WebFont = require(\"webfont\"),\n stripDomain = new RegExp(\"^(.*://[^/]*/)?(.*)$\");\n\nexports.locate = function(load) {\n return decodeURI(load.name.match(stripDomain)[2]);\n}\n\nexports.fetch = function(load) {\n return new...
javascript
edit
0
5
mit
17e4e2db2e332adc95e55e8ca66a693ad897fa45
LukeXuan/plugin-webfont,systemjs/system-font,LukeXuan/plugin-webfont,systemjs/system-font
font.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet Telegram = require( 'node-telegram-bot-api' );\nlet config = require( '../config.js' );\nlet BotPlug = require( './BotPlug.js' );\n\nclass TelegramBotPlug extends BotPlug {\n constructor( bot ){\n super( b...
javascript
edit
0
3
mit
408bdc6a9a34bbc84bf5f68dd37c8a691f23fd6f
kokarn/KokBot
plugins/Telegram.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nclass MembersPreview extends Component {\n\n render() {\n const {displayName, intro} = this.props;\n\n return (\n <div>\n <p>{displayName}</p>\n <p>{intro}</p>\n ...
javascript
edit
0
1
cc0-1.0
0e1673f669ed0d92c32fac77f79b57a8be8b27d6
cape-io/acf-client,cape-io/acf-client
src/components/Members/MembersPreview.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * A script to generate Pull Request in Github\n */\nlet execSync = require(\"child_process\").execSync;\nlet urlOfPR = ``;\nexecSync(`open ${urlOfPR}`);\n\n```\n\nApply this change: Add static url to generate PR" }, { "rol...
javascript
edit
0
0
mit
a1480cb378f9e6bb12e99f325698999613074ee1
bvenkatr/common
scripts/generatePR.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\tvar LiveApi = window['binary-live-api'].LiveApi;\n\tvar api = new LiveApi();\n\tbinary_visual.login = function login(token, callback){\n\t\tapi.authorize(token).then(function(value){\n\t\t\tcallback(value);\n\t\t}, func...
javascript
edit
0
1
mit
a283dda17b8f917c5cf80da833eda3ef2c6374fb
aminmarashi/binary-bot,aminmarashi/binary-bot,binary-com/binary-bot,binary-com/binary-bot
www/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst spawn = require('child_process').spawn;\n\nspawn('node', ['node_modules/supervisor/lib/cli-wrapper.js', '-n', 'error', '-w', 'mocks', '-i', 'mocks/data,mocks/node_modules', '--', 'node_modules/mockizen/bin/m...
javascript
edit
0
1
mit
e3d15736b9a4df385ced647321eca2f9a600bfc8
e1-bsd/omni-common-ui,e1-bsd/omni-common-ui
scripts/start-mock.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2012 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a cop...
javascript
edit
0
0
apache-2.0
ad9768c92aa1b5e2e1f8c43bba7dfc66d41421d0
shepheb/foam,shepheb/foam,mdittmer/foam,jlhughes/foam,foam-framework/foam,foam-framework/foam,foam-framework/foam,foam-framework/foam,jacksonic/foam,jlhughes/foam,mdittmer/foam,osric-the-knight/foam,jacksonic/foam,osric-the-knight/foam,foam-framework/foam,osric-the-knight/foam,shepheb/foam,mdittmer/foam,osric-the-knigh...
core/bootFOAMnode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { GraphQLClient } = require(\"graphql-request\");\nconst { writeFileSync, existsSync, mkdirSync } = require(\"fs\");\n\nasync function fetchMembers(organisation) {\n const token = process.env.GH_TOKEN;\n\n if (!token) {\n con...
javascript
edit
0
3
bsd-3-clause
9b3843dc451bbf993433f4f8e871059db2585956
nteract/nteract.io
fetch-members.js
rejected_duplicate
Near-duplicate of sample 86344
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\n// These modules are already transpiled and should be excluded\nconst folioScopeBlacklist = [\n 'react-githubish-mentions',\n].map(segment => path.join('@folio', segment));\n\n// We want to transpile fi...
javascript
edit
0
5
apache-2.0
3fafc9998cf4f9259d19bb425362cca6350b12bd
folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core
webpack/babel-loader-rule.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport omit from 'lodash.omit';\nimport theme from './theme.css';\n\nclass StatusLabel extends Component {\n static propTypes...
javascript
edit
0
2
mit
3e1b281761d7becb23804a54d6a944696dedfbc6
teamleadercrm/teamleader-ui
components/statusLabel/StatusLabel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\n// create custom Error object for better callback(err, ...) support\n// accepts an JSON object from CouchDB's REST errors\nfunction CouchError (err) {\n\t// ensure proper stack trace\n\tError.call(this);\n...
javascript
edit
0
3
mit
aaf1aee4950d3ca4a81e163693c30d584de21966
flatiron/cradle,abutcher-gh/cradle,pietervandereems/cradle
lib/cradle/errors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nexport function isImageURL(url) {\n return (/^http.+(jpg|gif|png|svg)$/i).test(url || \"\");\n}\n\nexport function checkStatus(response) {\n if (response.status >= 200 && response.status < 300) {\n return response;\n }...
javascript
edit
0
4
mit
84b60e1496c7c91b82a2b2b7eb8b0028db9c04f5
kcsry/infotv,kcsry/infotv,kcsry/infotv
infotv/frontend/src/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar exists = require( '@stdlib/fs/exists' );\n\n\n// MAIN //\n\n/**\n* Filters out non-existing file paths.\n*\n* @private\n* @param {StringArray} files - file paths\n* @param {Callback} clbk - callback...
javascript
edit
0
4
apache-2.0
78f19e010c25510963439936b055bc586435ff54
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
tools/search/create/lib/get_existing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n API_URL: 'https://api.import.io/store/data/3cf27c3b-c9e2-45c8-8a97-c4fc559ed74f/_query?_apikey=Xk6Emf7P1fSYy8lvBrvM0ygZdrQZytV5AAR4ykx5R%2FlwmgvPBYTH7XRwObZESjTduH6C0fsqr9N5y2LC9btu6g%3D%3D&_user=c5b82e89-e0b8-41f9...
javascript
edit
0
0
apache-2.0
8f49b3a7e665f5de04de3b3ea0b4c1bbd9dbd962
yrezgui/dokomygp
src/scripts/constants/app-constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst assert = require('assert')\n\nfunction createGL (opts) {\n assert(!opts || (typeof opts === 'object'), 'pex-gl: createGL requires opts argument to be null or an object')\n if (!opts) opts = {}\n\n let canvas = opts.canvas\n if...
javascript
edit
0
9
mit
bde5e1162e6b16ae6a0cd810001c01cb29945fb6
pex-gl/pex-gl
index-browser.js
accepted
null
true