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 extend = require('lodash/object/extend');\nvar resolvePath = require('./resolve-path');\nvar resolveUrl = require('./resolve-url');\n\nfunction AssetResolver(options) {\n if (!(this instanceof AssetResolver)) {\n return new Asse...
javascript
edit
0
2
mit
3a0e8782ca1d2ba9bedb9df83af5648c7ca42a91
borodean/assets,assetsjs/assets
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {actions, create} from 'client/todos/actions';\nimport {expect} from 'chai';\n\n// http://chaijs.com/api/bdd\n\ndescribe('create', () => {\n it('is a function', () => {\n // TODO: Add real test.\n expect(create).to.be.a('f...
javascript
edit
0
1
mit
d22e809900210198633b153d98abbc3f7e880329
TheoMer/Gyms-Of-The-World,zanj2006/este,robinpokorny/este,christophediprima/este,estaub/my-este,XeeD/test,estaub/my-este,TheoMer/Gyms-Of-The-World,neozhangthe1/framedrop-web,nezaidu/este,AlesJiranek/este,SidhNor/este-cordova-starter-kit,este/este,christophediprima/este,syroegkin/mikora.eu,AugustinLF/este,este/este,Vili...
src/test/client/todos/actions.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assert from 'assert';\nimport GithubSearchResult from '../github-search-result.js';\n\ndescribe('create kata groups from the github search result', function() {\n it('', function() {\n const githubJson = {\n items: [\n ...
javascript
edit
0
1
mit
6cdb591158caac1a60b628f2054178f66ee18e8f
tddbin/es6katas.org
src/test/github-search-result-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Rx = require('rx');\nvar rabbit = require('amqp');\n\nmodule.exports = {\n\tconfigure: function(config) {\n\t\tvar exchangeStream = new Rx.Subject();\n\n\t\tvar connection = rabbit.createConnection({ host: config.host, login: config...
javascript
edit
0
2
mit
7d005bd287fb0b207eaf27ac5f19196167a29918
RenovoSolutions/node-queue-logger
rabbit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar shjs = require('shelljs');\n\nif (!shjs.which('docker')) {\n shjs.echo('Sorry, this script requires docker.');\n shjs.exit(1);\n} else {\n // build all images\n // ubuntu\n shjs.cd('ubuntu-base');\n shjs.exec('node build.js');...
javascript
edit
0
0
mit
0a94ff251b5ce45342f76b3cd511e80ccdb07457
inpercima/docker
build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar typeOf = require( '@stdlib/utils/type-of' );\n\n\n// IS FUNCTION //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether ...
javascript
edit
0
1
apache-2.0
9b74dc562b95d2923c1852a3dd316c43a54e5f93
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/utils/is-function/lib/is_function.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction (doc, req) {\n // !json templates.page\n\n var mustache = require(\"vendor/couchapp/lib/mustache\");\n\n var path, cipherdata, errormessage;\n\n if (req.raw_path.substr(-4) == 'main') {\n path = \"../\";\n ...
javascript
edit
0
4
unlicense
cb8b25c51698575d1212e0c8549665d944a4f0c7
rakoo/MultiBin
shows/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport api from '../utils/webAPIUtils';\n\nexport default {\n list: () => api.get('/api/todo'),\n create: (todo) => api.post('/api/todo', todo),\n remove: (id) => api.delete(`/api/todo/${id}`),\n};\n```\n\nApply this change: Add comm...
javascript
edit
0
1
mit
1e7584771848e48910846b0313b7afd9e3878159
gocreating/express-react-hmr-boilerplate,gocreating/express-react-hmr-boilerplate,gocreating/express-react-hmr-boilerplate
src/flux/api/todo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar tokenHelper = require('../token-helper');\n\nmodule.exports = function() {};\n\nmodule.exports.prototype = {\n configure: function(requireTrailingComma) {\n if (typeof requireTrailingComma ...
javascript
edit
0
7
mit
41d322f9f2ad4488df44caf855d45b864d1e986f
hafeez-syed/node-jscs,fishbar/node-jscs,oredi/node-jscs,indexzero/node-jscs,irnc/node-jscs,pm5/node-jscs,faceleg/node-jscs,Qix-/node-jscs,MunGell/node-jscs,bengourley/node-jscs,ptarjan/node-jscs,lukeapage/node-jscs,lukeapage/node-jscs,1999/node-jscs,christophehurpeau/node-jscs,yejodido/node-jscs,addyosmani/node-jscs,st...
lib/rules/require-trailing-comma.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Q = require('q');\n\nmodule.exports = {\n findByName: function(name) {\n var deferred = Q.defer();\n\n if(name === null || name === undefined) {\n deferred.reject('What are we supposed to name you?');\n ...
javascript
edit
0
3
mit
42530fc6611e8befc5679c90db63b117ceca6963
xcjs/courierchat,xcjs/courierchat,xcjs/courierchat
www/api/services/UserFactoryService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar common = require('../../common');\nvar connection = common.createConnection();\nvar assert = require('assert');\n\nvar rows = undefined;\nvar rows1 = undefined;\nvar fields = undefined;\nvar fields1 = undefined;\n\nvar buf = Buffer(...
javascript
edit
0
2
mit
615d6cab0eec81f05b4ba8320a9b130c11aea9de
sidorares/node-mysql2,sidorares/node-mysql2,sidorares/node-mysql2,sidorares/node-mysql2
test/integration/connection/test-buffer-params.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar _ = require('lodash');\nvar Const = require('../const.js');\n\nvar DatabaseManager = {\n \n messageModel:null,\n userModel:null,\n fileModel:null,\n \n init: function(options){\...
javascript
edit
0
2
mit
f224aae12aedb913fc5a73b696311c88ff46531a
cloverstudio/Spika,cloverstudio/Spika,cloverstudio/Spika,cloverstudio/Spika
web/src/server/lib/DatabaseManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Background tasks\n */\nclass PathmarksBackground {\n\n\tstatic standardIcon() {\n\t\tchrome.browserAction.setIcon({path: '../images/icon38.png'});\n\t}\n\n\tstatic devBadge() {\n\t\tif (chrome.runtime.getManifest().short_name ==...
javascript
edit
0
2
mit
5582487afcd252d340b3878b1886b4b1587f4122
markusheer/pathmarks,markusheer/pathmarks
src/js/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2010 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nwindow.onload = function() {\n chrome.management.getAll(funct...
javascript
edit
0
4
bsd-3-clause
0b95428c5c9e1121af7e90bb55b4daade31abac1
Chilledheart/chromium,krieger-od/nwjs_chromium.src,ltilve/chromium,anirudhSK/chromium,dednal/chromium.src,markYoungH/chromium.src,rogerwang/chromium,jaruba/chromium.src,ltilve/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,rogerwang/chromium,patrickm/chromium.src,bright-sparks/chromium-spacewalk,aniru...
chrome/test/data/extensions/management/launch_app/test.js
rejected_duplicate
Near-duplicate of sample 72446
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// import dependencies\nimport {uniqueId} from '../../utils/helpers.js'\nimport template from './form-select.html'\n\n// export component object\nexport default {\n template: template,\n replace: true,\n computed: {\n allOptions()...
javascript
edit
0
5
mit
0ed6d4ea0c40197470b2b7587dcf96b47772a76f
parzonka/vuestrap-base-components,parzonka/vuestrap-base-components,parzonka/vuestrap-base-components,kzima/vuestrap-base-components,kzima/vuestrap-base-components,kzima/vuestrap-base-components
src/components/form-select/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = {\n name: 'Ember CLI Data Factory Guy',\n\n blueprintsPath: function() {\n return path.join(__dirname, 'blueprints');\n },\n\n included: function(app) {\n this._super.included(ap...
javascript
edit
0
2
mit
d0de53805a88e5c8f5eec95a52fcfbad3e8f622b
cristinawithout/ember-cli-data-factory-guy
lib/ember-addon/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// nicknameblacklist.js\n//\n// list of banished nicknames\n//\n// Copyright 2017, Ryan Riddle\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License...
javascript
edit
0
0
apache-2.0
bb2f9b7f080ecf94e6d0c7f2dd04edf7a776f119
pump-io/pump.io,e14n/pump.io,pump-io/pump.io,e14n/pump.io,e14n/pump.io,pump-io/pump.io
lib/nicknameblacklist.js
rejected_duplicate
Near-duplicate of sample 89623
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar saikuWidgetComponent = BaseComponent.extend({\n\n\tupdate : function() {\n\t\tvar myself=this;\n\t\tvar htmlId = \"#\" + myself.htmlObject;\n\t\tif (myself.saikuFilePath.substr(0,1) == \"/\") {\n\t\t\tmyself.saikuFilePath = myself.s...
javascript
edit
0
6
apache-2.0
054d8330e8f9b059d60e660ffec20ea1a02f433f
newenter/saiku,customme/saiku,hengyuan/saiku,hengyuan/saiku,OSBI/saiku,qixiaobo/saiku-self,OSBI/saiku,OSBI/saiku,hengyuan/saiku,newenter/saiku,OSBI/saiku,newenter/saiku,OSBI/saiku,customme/saiku,qixiaobo/saiku-self,hengyuan/saiku,qixiaobo/saiku-self,qixiaobo/saiku-self,newenter/saiku,customme/saiku,customme/saiku
saiku-bi-platform-plugin-p5/src/main/plugin/components/saikuWidget/SaikuWidgetComponent.js
rejected_duplicate
Near-duplicate of sample 75978
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\nvar GNOVEL = GNOVEL || {};\n\n(function() {\n\t\"use strict\";\n\n\t/**\n\t * @class MouseMovedCamera\n\t * If created, will enable effect of mouse moved camera (small shift in the camera's direction vector according to mouse movem...
javascript
edit
0
1
mit
62c43d6851af8d9aaa381376f284571f0852f4fe
bysreg/m_play,bysreg/m_play,bysreg/m_play,bysreg/m_play
src/m_play/gnovel/static/gnovel/js/gnovel/mousemovedcamera.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar w2v = require( './../lib' );\n\nw2v.loadModel( __dirname + '/fixtures/vectors.txt', function( err, model ) {\n\tconsole.log( model );\n\n\tvar wordVecs = model.getVectors( [ 'Hamlet', 'daughter' ] );\n\tconsole.log(...
javascript
edit
0
1
apache-2.0
be95a650e3598ab9abb2a5a0fa1b228bfaf64b84
Planeshifter/node-word2vec,Planeshifter/node-word2vec,Planeshifter/node-word2vec
examples/step3_loadModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mode = 0; //primary\n\nfunction calc_mode() {\n\tvar modes = [\"primary\", \"secondary\", \"tertiary\"];\n\treturn modes[mode];\n}\n\nfunction send_data() {\n\t$.ajax({\n\t\turl: \"calculate/\"+primary+\"/\"+secondary+\"/\"+tertiary...
javascript
edit
0
2
mit
10237126bc0fb4c456f17754bfb44edd84dbea09
claw68/alchemy,claw68/alchemy,claw68/alchemy,claw68/alchemy
includes/js/main.js
rejected_duplicate
Near-duplicate of sample 84860
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Render the splash page of application\n */\nexports.renderSplash = function (req,res) {\n res.render('modules/core/server/views/splash', {\n user: req.user || null\n });\n};\n\n/**\n * Render the main appli...
javascript
edit
0
2
mit
8f50cd51a8daacc5ee65262485ceac336fb76758
DoubleA7/SoundPadLab,DoubleA7/SoundPadLab,DoubleA7/SoundPadLab
modules/core/server/controllers/core.server.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar postcss = require('postcss'),\n color = require('color');\n\nmodule.exports = postcss.plugin('postcss-lowvision', function () {\n return function (css) {\n css.walkDecls('color', function (decl) {\n var val...
javascript
edit
null
null
mit
0ea47e943e1e0cbd51c49b1117d386bd52b75cfe
keukenrolletje/postcss-lowvision
index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write javascript code for the following: Change local storage key prefix back to \"x-font-\" for fontload.js." }, { "role": "assistant", "content": "function loadFont(a,b,c){function d(){if(!window.FontFace)return!1;var a=new FontFace(\"t\",'url(\"data:application/f...
javascript
new_file
0
11
mit
d843ce0f80ae78cda8373513c6aca84a5171a3f7
davidensinger/davidensinger.github.io,davidensinger/davidensinger.github.io,davidensinger/davidensinger.github.io,hellfish2/davidensinger.github.io,S1SYPHOS/davidensinger.github.io,S1SYPHOS/davidensinger.github.io,hellfish2/davidensinger.github.io,S1SYPHOS/davidensinger.github.io
app/_includes/fontloader.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Client() {\n\n}\n\nClient.prototype = {\n chain: [],\n\n events: { },\n\n register: function(action) {\n if(this.chain.length > 0) {\n this.chain.push(action);\n\n return;\n }\n\n action(callback);\n },\n...
javascript
edit
0
2
mit
155169ede04b05a1e40301ce044642e9962c9b42
matthewp/gazel,matthewp/gazel
src/client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('OpiferEntityPicker', ['ui.bootstrap.typeahead'])\n\n .directive('entityPicker', function() {\n\n var tpl =\n '<input type=\"text\" ng-model=\"search\" typeahead=\"object.name for object in getObject(...
javascript
edit
0
3
mit
b749cc81db13fdc08749a040656f179368bc0398
Opifer/CrudBundle,Opifer/CrudBundle,Opifer/CrudBundle
Resources/public/app/entitypicker/entity-picker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Eris = require(\"eris\");\nconst config = require(\"./cfg\");\n\nconst intents = [\n // PRIVILEGED INTENTS\n \"guildMembers\", // For server greetings\n\n // REGULAR INTENTS\n \"directMessages\", // For core functionality\n \...
javascript
edit
0
2
mit
ccd56a1d8886d0991c0219413f059e616471ea39
Dragory/modmailbot
src/bot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\n\nmodule.exports = function(app) {\n\treturn function(req, res) {\n\t\tfs.readFile(app.get('appPath') + '/version.json', 'utf8', function(err, data) {\n\t\t\tif (err) {\n\t\t\t\tres.status(404)....
javascript
edit
0
1
mit
49f44428c89e5affe6ff48099564acaf4de64429
pesan/docker-registry-explorer,pesan/docker-registry-explorer,pesan/docker-registry-explorer
server/components/version/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction loadScript(url, callback){\n var script = document.createElement(\"script\")\n script.type = \"text/javascript\";\n\n if (script.readyState){ //IE\n script.onreadystatechange = function(){\n if (script.readyState ==...
javascript
edit
0
3
mit
5a69682e6f38d6ce3788a082ee8be71225ad747b
gcao/jsgameviewer,gcao/jsgameviewer,gcao/jsgameviewer,gcao/jsgameviewer
js/loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport { API_LOGIN_SUCCESS, API_SIGNUP_SUCCESS } from 'app/actions/auth';\nimport {\n SET_PAGE_LOGIN_STATE,\n SET_PAGE_SIGNUP_STATE,\n SET_OVERRIDE_FRAME,\n CLEAR_OVERRIDE_FRAME\n} from 'app/actions/landingPage';\ni...
javascript
edit
0
6
mit
d21b3d4c7fdbdb7f118f55e655af29a6813f90f2
heymanhn/journey-web,heymanhn/journey-web
app/reducers/landingPage.js
rejected_duplicate
Near-duplicate of sample 79308
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Utils = require(\"../../util/utils\");\n\nmodule.exports = class FeatureList {\n\n constructor() {\n this.features = []\n }\n\n add(properties, geometry) {\n let feature = {\n typ...
javascript
edit
0
3
apache-2.0
1f7e19932b93cfdbc61017e5d4658660ac84c7e3
idm-suedtirol/realtimebusservice
model/realtime/FeatureList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as types from '../constants/actionTypes';\n\nexport function updateArchetype(value) {\n return {\n type: types.UPDATE_ARCHETYPE,\n payload: {\n archetype: value\n }\n };\n}\n\nexport function updateClan(value) {...
javascript
edit
0
1
mit
8df916738a3a723275462cf293f47e3793eecb38
TrueWill/embracer,TrueWill/embracer
src/actions/characterCreationActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Dispatches the \"contentchange\" events. The detail may be different,\n * but the eventType is always \"contentchange\"\n *\n * @param contentElement\n * @param detail\n */\nfunction dispatchContentChangeEvent(contentElement, de...
javascript
edit
0
1
mit
5b2beb40423706cc24259c1bfc404651fe4c53f1
kevinokerlund/content-change
src/events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar HtmlScreenshotReporter = require(\"protractor-jasmine2-screenshot-reporter\");\nvar JasmineReporters = require('jasmine-reporters');\n\nexports.config = {\n seleniumServerJar: '../../../node_modules/protractor/selenium/selenium-s...
javascript
edit
null
null
apache-2.0
0daf3f4ba0678594b031abd5bb5f9a1375ddb9cb
pascalgrimaud/generator-jhipster,robertmilowski/generator-jhipster,ctamisier/generator-jhipster,deepu105/generator-jhipster,ramzimaalej/generator-jhipster,JulienMrgrd/generator-jhipster,liseri/generator-jhipster,rifatdover/generator-jhipster,stevehouel/generator-jhipster,siliconharborlabs/generator-jhipster,rkohel/gene...
app/templates/src/test/javascript/_protractor.conf.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "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
adb51f2f5002f1eb5470014ec9ca7d62d3715b94
seblucas/angular-bootstrap-grid-list-toggle
grid-list-toggle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\n\nvar periodSchema = new mongoose.Schema({\n day: Date,\n start_time: Date,\n end_time: Date,\n title: String,\n linked_day: Number\n});\n\nvar daySchema = new mongoose.Schema({\n d...
javascript
edit
0
0
apache-2.0
9df3ff9d759efd688cab18f7caaf2ffa16411698
dchao19/KentAPIs
models/ScheduleModels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Backbone = require('backbone');\n\nmodule.exports = Backbone.Model.extend({\n defaults: {\n beenSet: true, //set this back to false when done testing\n guid: \"8f9c3e25c0e196647f83fa704a59c6b76f15b686\", //for testing with te...
javascript
edit
0
0
mit
d61cd8143c50825baf038f495fc9376ff588b67f
Kirvx/OpenBazaar-Client,blockchainProject/blockchain-project-client,blockchainProject/blockchain-project-client,jjeffryes/OpenBazaar-Client,jjeffryes/OpenBazaar-Client,OpenBazaar/OpenBazaar-Client,rmisio/OpenBazaar-Client,rmisio/OpenBazaar-Client,programmerpeter/OpenBazaar-Client,OpenBazaar/OpenBazaar-Client,Kirvx/Open...
js/models/userMd.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar reqRegEx = /\\s*(?:\\{(.*)\\})?\\s*(?:(\\$?[^\\s]+))?\\s*(?:\\(([^\\)]*)\\))?\\s*(?:-?\\s*(.*?))\\s*$/;\n\nmodule.exports = {\n\n parse: function (text) {\n var match = reqRegEx.exec(text.trim());\n\n var obj...
javascript
edit
0
5
mit
60ea3820b12c325ce3c7da3e6706dca6c9c6f854
SassDoc/sassdoc
src/annotation/annotations/prop.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add some spec for how this thing ought to work." }, { "role": "assistant", "content": "/**\n * Use this to make an object that rests on the couch.\n\nvar couch = CouchDB.rest(\"http://localhost:5984/example/\");\n\n * Then, j...
javascript
new_file
0
2
mit
304528864c0eab80c3c98698fafd2600e1730853
isaacs/jic-jack-jo,isaacs/jic-jack-jo
lib/couch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n\t\"dojo/_base/declare\"\n], function (declare) {\n\treturn declare(null, {\n\t\t// summary:\n\t\t//\t\tAdds functionality for creating relationships between destroyable or removable objects and this object\n\t\t//\t\twhere th...
javascript
edit
0
5
mit
ec96c977f6092fc3966ad9564db8337c7e17667e
mmaxwell/adjunct
widget/_OwnMixin.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
14f35d315b28b249a4909f6784ab586270ab0192
pmacaluso3/level_up_exercises,zsyed91/level_up_exercises,fengb/level_up_exercises,sumsionp/level_up_exercises,aniruddhabarapatre/level_up_exercises,DejaAugustine/level_up_exercises,mostlybadfly/level_up_exercises,cnorm35/level_up_exercises,schwerdt/level_up_exercises,Tornquist/level_up_exercises,abake-enova/level_up_ex...
art/app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 77977
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n/*!\n * multer\n * Copyright(c) 2014 Hage Yaapa\n * Copyright(c) 2015 Fangdun Cai\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nconst originalMulter = require('multer')\n\nfunction multer(options) {\n co...
javascript
edit
0
2
mit
0217ffea4439ea72cea05ae42436cef4293fb369
koa-modules/multer
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Browser from './browser'\nimport Print from './print'\n\nexport default {\n print: (params, printFrame) => {\n // If showing feedback to user, pre load pdf files (hacky)\n if (params.showModal || Browser.isIE()) {\n l...
javascript
edit
0
3
mit
bc9975704151c7290089faf44b435f20bd71af77
crabbly/Print.js,crabbly/Print.js
src/js/pdf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ExpandablePanelModule from \"./expandablePanel\";\n\nconst { module } = angular.mock;\n\ndescribe(\"ExpandablePanel\", () => {\n beforeEach(module(ExpandablePanelModule));\n\n let $log;\n beforeEach(inject(($injector) => {\n ...
javascript
edit
0
1
mit
7f930f13e246f13ce1ec6b91cb9f03a7d6e71c06
yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend
client/app/components/_expandablePanel/expandablePanel.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { NodeComponent } from 'substance'\nimport katex from 'katex'\n\nexport default class InlineFormulaComponent extends NodeComponent {\n\n render($$) {\n const node = this.props.node\n // TODO: Find out why node.find('tex-ma...
javascript
edit
0
3
mit
140e36095c753af16420d928dc8f0094f94d2dec
substance/texture,substance/texture
src/editor/components/InlineFormulaComponent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport $ from \"jquery\";\nimport Backbone from \"backbone\";\n\nexport default React.createClass({\n displayName: \"Tag\",\n\n propTypes: {\n tag: React.Pr...
javascript
edit
0
2
apache-2.0
f6c87e4f355b154ab0b3fcb4065a521f8bbd8483
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
troposphere/static/js/components/common/tags/Tag.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {Link} from 'react-router';\n\nexport default class Header extends React.Component {\n render() {\n var offline = false;\n if (!navigator.onLine) offline = (<span className=\"offline\">offline</...
javascript
edit
0
2
mit
ce26a43b7e20fc33d75061a19566b9c714c944c7
frigg/frigg-hq-frontend,frigg/frigg-hq-frontend
src/components/header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar fs = require('fs')\nvar miss = require('mississippi')\nvar config = require('../config')\n\nfunction filterJobsList (jobs) {\n var list = []\n\n jobs.forEach(function (job) {\n if (job.indexOf('.json') > -1) {\n...
javascript
edit
0
2
mit
3b67ea13cc23c01dc58381100b435055fce7f278
telemark/tfk-saksbehandling-elev-varsel,telemark/tfk-saksbehandling-elev-varsel
lib/get-next-job.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n var HashArg = {};\n HashArg.get = function(argdefs, argv) {\n var args = {};\n if(!argv) {\n argv = [];\n for(var i = 2; i < process.argv.length; i++) {\n argv.pus...
javascript
edit
0
11
mit
e7d5120e086d1adfc03632aeb24fe5c3acc90c7d
takamin/hash-arg
lib/index.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore')._;\n\nfunction SearchResult(options) {\n\t_.extend(this, _.pick(options, \n\t\t'url', 'permalink', 'siteMediaID', \n\t\t'siteCode', 'icon', 'author', \n\t\t'mediaName', 'duration', 'type'));\n\tvar stats = ...
javascript
edit
0
3
mit
34e7e0e1627d3d7bbb9abfec2150fa00e9adc4bd
fruchtose/muxamp
lib/searchresult.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar winston = require('winston');\n\nvar ScriptRunner = function(service,options){\n\tthis.service = service;\n\tthis.options = options || {};\n};\n\nScriptRunner.prototype.run = function(method,script,options,cb){\n\n\...
javascript
edit
0
4
mit
1c09dbb68c7b3fd4fb8b2dfb6a75d407c3ed4241
andyperlitch/flowxo-sdk,equus71/flowxo-sdk,marian2js/flowxo-sdk,flowxo/flowxo-sdk
lib/scriptRunner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar babylon = require(\"babylon\");\n\nexports.options = {\n sourceType: \"module\",\n strictMode: false,\n allowImportExportEverywhere: true,\n allowReturnOutsideFunction: true,\n plugins: [\n \"asyncFunctions\",\n \"asyncGe...
javascript
edit
0
1
mit
e27e749151d460be1b8b73a22744b3efa8ff5b14
benjamn/reify,benjamn/reify
lib/parsers/babylon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nconst path = require('path');\n\n// Environment variables\nconst node_env = process.env.NODE_ENV || \"Local\";\nconst env_var = process.env.ENV_VAR || \"Local\";\nconst env_color ...
javascript
edit
0
1
mit
06d2b61adf65ea1b5f999ded3ff993c7fbbd8331
fightknights/pipe-demo,fightknights/pipe-demo,fightknights/pipe-demo
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gpio = require('onoff').Gpio;\nvar red = new gpio(16, 'out');\nvar green = new gpio(12, 'out');\nvar blue = new gpio(21, 'out');\nvar button = new gpio(25, 'in', 'both');\nvar express = require('express');\nvar app = express();\n\na...
javascript
edit
0
2
mit
a9a8d2a72dd9647a6780680a073c510e436cd510
davesroka/rpi-node-led,davesroka/rpi-node-led
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Filter = require('broccoli-filter')\n\nmodule.exports = CoffeeScriptFilter\nCoffeeScriptFilter.prototype = Object.create(Filter.prototype)\nCoffeeScriptFilter.prototype.constructor = CoffeeScriptFilter\nfunction CoffeeScriptFilter (...
javascript
edit
0
4
mit
c7eadf2facccf8e27c9e1467a227e7191997fe6e
timmfin/broccoli-coffee,joliss/broccoli-coffee,tsing80/broccoli-coffee
index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Update cache busting for rps.masonry" }, { "role": "assistant", "content": "!function(e,n,r){e(r).ready(function(){var n=e(\".gallery-masonry\").masonry({itemSelector:\".gallery-item-masonry\",columnWidth:\".grid-sizer\",isFi...
javascript
new_file
0
2
bsd-3-clause
0f346b9197aada9db5c231e257dbe88f3d1cf2eb
petervanderdoes/AVH-Raritan-Photographic-Society,petervanderdoes/AVH-Raritan-Photographic-Society,petervanderdoes/AVH-Raritan-Photographic-Society,petervanderdoes/AVH-Raritan-Photographic-Society
assets/js/rps.masonry-a172153.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar RedisStore = require('connect-redis')(express);\nvar routes = require('./routes');\nvar url = require('url');\nvar whiskers = require('whiskers');\n\nvar port = process.env.PORT || 8127;\nvar redis...
javascript
edit
0
0
mit
c39d3923d2a288d57d3a051cfa00aeec6bc74007
sheltr/sheltr
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar glob = require('glob');\nvar path = require('path');\n\n/**\n * Looks for files with .html, .hbs, or .handlebars extensions within the given directory, and adds them as Handlebars partials matching the nam...
javascript
edit
0
2
mit
cbe634d5617cb025077916691c3eae708d0456b9
ppowalowski/panini
lib/loadPartials.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n\trules: {\n\t\t'arrow-parens': ['error', 'always'],\n\t\t'object-curly-spacing': ['error', 'always']\n\t}\n};\n\n```\n\nApply this change: Add a couple rule overrides" }, { "role": "assistan...
javascript
edit
0
0
mit
04053e6d23dd9703418dfeafdaf3a489de81ec31
bdougherty/eslint-config
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Discord = require('discord.js');\nconst client = new Discord.Client();\nconst _ = require('lodash');\nconst winston = require('winston');\n\nrequire('dotenv').config();\n\nconst channel_handler = require('./channel_handler');\ncon...
javascript
edit
0
1
bsd-3-clause
13291477854549053e4c95fbca235567f292f615
ciarancrocker/sgs_bot,ciarancrocker/sgs_bot
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar osx = process.platform === 'darwin'\nvar win = process.platform === 'win32'\nvar other = !osx && !win\nvar fs = require('fs')\n\nif (other) {\n try {\n module.exports = require('which').sync('firefox')\n } catch (_) {\n ...
javascript
edit
0
3
mit
6eb8425875e3731235c08974965401e1064b673d
hughsk/firefox-location
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\textends: ['airbnb'],\n\tenv: {\n\t\tbrowser: false,\n\t},\n\tplugins: ['filenames'],\n\trules: {\n\t\t// Use tab for indentation http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/\n\t\tindent: [2, 'tab'],\n...
javascript
edit
0
0
mit
2364f444a04c16312bb8eb7e2d5c127e49fffd88
qualitybath/eslint-config-qualitybath
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar postcss = require('postcss'),\n mime = require('mime'),\n fs = require('fs');\n\nmodule.exports = postcss.plugin('postcss-data-uri', function (opts) {\n return function (css) {\n css.walkDecls(/background(\\-image)?/...
javascript
edit
0
4
mit
e8c4f6340d0c6e4cf3ea7048bb021b636b8e47f7
slowikk/postcss-data-uri
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire( 'dotenv' ).config();\nvar dropboxModule = require( './modules/dropbox.js' );\nvar googleDocsModule = require( './modules/googleDocs.js' );\nvar paypalModule = require( './modules/paypal.js' );\nvar express = require( 'express' ...
javascript
edit
0
2
mit
0462da11f3e75a3c49a89557d25f37a3dff8bd2d
kmgalanakis/node-js-paypal-rate
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint node: true */\n\"use strict\";\n\n\nvar isEmpty = function (obj) {\n return Object.keys(obj).length === 0;\n}\n\n_.isEmpty\n\n```\n\nApply this change: Add a preliminary version without wildcards or promises." }, { "...
javascript
edit
0
4
mit
2543d449b66eb792c1c6f56c4580686ece2228c4
plediii/HevEmitter
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Internet Icon by Freepik (http://www.flaticon.com/free-icon/worldwide_448589)\n\nconst urlencode = require('urlencode');\n\nmodule.exports = {\n action: 'openurl',\n query: (query) => {\n const items = [];\n const...
javascript
edit
0
1
mit
a14e50f20d2a9f304e00cc22fa0bb93823f16621
justinpchang/dext-search-plugin
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = {\n globalize: require('./src/globalize'),\n toUpperLowerCase: require('./src/toUpperLowerCase'),\n substituir: require('./src/substituir'),\n dataHora: require('./src/dataHora'),\n chaveU...
javascript
edit
0
0
isc
819fc7ecfe978bb8063b7ef7316158fc6992b1ec
bcsteidl/amigo-funcoes,bcsteidl/amigo-funcoes
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\nfunction escapeGlobStringOrArray(escapeFn) {\n return function(glob) {\n if (util.isString(glob)) {\n return escapeFn(glob);\n }\n if (util.isArray(glob)) {\n return glob.map(escapeFn);...
javascript
edit
0
3
mit
74ac7280bdc8cad8713eb14258201ed2b57a04f5
svenschoenung/glob-escape
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport 'aframe';\nimport {Entity, Scene} from 'aframe-react';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport Flashcard from './components/Flashcard';\n\nclass VRScene extends React.Component {\n constructor(p...
javascript
edit
0
1
mit
715c1dd53807376e1de7cf51c3691770ef127cb3
zuhairp/LearningSpace,zuhairp/LearningSpace
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Require modules */\n\nvar nodeTelegramBot = require('node-telegram-bot')\n , config = require('./config.json')\n , request = require(\"request\")\n , cheerio = require(\"cheerio\");\n\n/* Functions */\n\n/**\n * Uses the req...
javascript
edit
0
3
mit
1c5eca1d5232c544373ce9890882f500d165e947
frdmn/telegram-WhatToEatBot
bot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar fs = require('fs')\nvar path = require('path')\nvar minimist = require('minimist')\nvar fasta = require('./')\n\nvar argv = minimist(process.argv.slice(2), { boolean: ['p', 'path'] });\n\nif (argv.help) {\n ret...
javascript
edit
0
2
mit
7ff7a769be56f1eee605f49aa37c6588a6bbe25a
bionode/bionode-fasta
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar jade = require('jade');\nvar fs = require('fs');\n\nexports.name = 'jade';\nexports.outputFormat = 'html';\nexports.compile = function (source, options) {\n var fn = jade.compile(source, options);\n return {fn: ...
javascript
edit
0
3
mit
9d4efb4686d9b1a639559f38409c83ce28c8c89a
jstransformers/jstransformer-pug,jstransformers/jstransformer-jade,jstransformers/jstransformer-jade,jstransformers/jstransformer-pug
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Buffer = require(\"buffer\").Buffer;\nvar through = require(\"through\");\n\n/**\n * Return a file handling function that can \n * be piped to from within a gulp workflow\n * \n * @return {[type]} [description]\n */\nPagemaki.protot...
javascript
edit
0
1
mit
bb0f70efb5e50d1f9e3a5536847750ccd4336379
jasonrhodes/gulp-pagemaki
index.js
rejected_duplicate
Near-duplicate of sample 75001
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ReplaceFlowmapIcon from '../../../src/commands/appdynamics/ReplaceFlowmapIcon'\n\nvar assert = require('assert')\n\nvar href = {\n baseVal: 'images/icon_nodetype_java_100x100.png'\n}\n\nvar node = {\n data: 'Inventory-Service',...
javascript
edit
0
2
apache-2.0
f676139b3a5519cffa0ce6a954a22e98915501c1
svrnm/demomonkey,svrnm/demomonkey
test/commands/appdynamics/ReplaceFlowmapIcon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar React = require(\"react\");\nvar PlayerStore = require(\"../stores/PlayerStore.react\");\nvar moment = require(\"moment\");\nvar momentLocale = require(\"moment/locale/nb.js\");\nmoment.locale(\"nb\", momentLocale...
javascript
edit
0
3
apache-2.0
6130a2e325db4f4dd2d05522884dbf7fea2d3556
ckpt/web-frontend,ckpt/web-frontend
js/components/NewsComments.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\nvar os = require('os');\nvar bleno = require('eddystone-beacon/node_modules/bleno');\nvar eddystone = require('eddystone-beacon');\n\nif (process.arch !== 'x64') {\n var five = require('johnny-five');\n va...
javascript
edit
0
3
apache-2.0
e7927dc76b7f01a19d5900e9902504b90af0926c
alexisduque/pw-coffee-machine,alexisduque/pw-coffee-machine,alexisduque/pw-coffee-machine
peripheral/peripheral.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport './simple-nested-row-expanders.css'\nimport { select } from 'd3-selection'\nimport { selectionChanged } from '@zambezi/d3-utils'\nimport { unwrap } from './unwrap-row'\n\nexport function createSimpleNestedRowExpanders() {\n\n fu...
javascript
edit
0
7
mit
5c9a488a1e9a4a5344caca6d090e0f23748bae21
zambezi/grid
src/simple-nested-row-expanders.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar elixir = require('laravel-elixir');\nrequire('laravel-elixir-livereload');\n/*\n |--------------------------------------------------------------------------\n | Elixir Asset Management\n |--------------------------------------------...
javascript
edit
0
1
mit
e39d8e0e17bec7b032f777eb4a02a0ed8a2930ed
pierrerigal/starter-laravel-angular,pierrerigal/starter-laravel-angular
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n tsc = require('gulp-tsc'),\n tape = require('gulp-tape'),\n tapSpec = require('tap-spec'),\n del = require('del'),\n runSequence = require('run-sequence'),\n istanbul = require('gulp-istan...
javascript
edit
0
1
mit
4eb994fdf3f0301232aef07cd2bf1b0658a5aaa6
Jameskmonger/isaac-crypto
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar brunchConfig = require('../brunch-config').config.overrides['web:dev'];\nvar path = require('path');\nvar publicPath = path.resolve(__dirname, '..', brunchConfig.paths.public);\n\nmodule.exports = function(config) {\n config.set({\...
javascript
edit
0
1
mit
2cf72a0e7b925f5dca7e2bcb72490e1928c04c98
jupl/btc-cordova,jupl/btc,jupl/btc-ember,jupl/btc-angular,jupl/btc-serverpack,jackhung/wokchap,jupl/btc-chaplin
test/karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar helper = require('./specHelper'),\n util = require('util'),\n fs = require('fs');\n\ndescribe(\"fs.watch\", function() {\n var tmpDir = java.lang.System.getProperty('java.io.tmpdir'),\n tmpFile = tmpDir + '/fs-watch-spe...
javascript
edit
0
1
apache-2.0
a313736d5963d78753240416f12cef0bb69aca62
tony--/nodyn,tony--/nodyn,nodyn/nodyn,dherges/nodyn,tony--/nodyn,nodyn/nodyn,dherges/nodyn,nodyn/nodyn,dherges/nodyn
src/test/javascript/fsWatchSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar mkdir = require('mkdirp').sync\nvar rimraf = require('rimraf').sync\n\nbeforeEach(function () {\n rimraf(__dirname + '/output/')\n mkdir(__dirname + '/output/')\n})\nafterEach(function () {\n rimraf(__dirname + '/...
javascript
edit
0
3
bsd-2-clause
d488f14337e8bf0105a3b2bfdf076f48155320bf
ForbesLindesay/npm-fetch
test/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport axios from 'axios';\n\nexport default () => {\n const upload = (image, config) => {\n const formData = new FormData();\n formData.append('image', image.file);\n formData.append('id', image.id);\n return axios.post('/...
javascript
edit
0
1
mit
fb17d6a22f10b48b30db8669aaa9d1d57b9e73b5
tuelsch/bolg,tuelsch/bolg
src/controllers/image-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n/* eslint-env mocha */\n\nconst assert = require('assert')\nconst { isValidEmail, getDomainPart, getLocalPart } = require('../index')\n\ndescribe('email-js', function () {\n describe('getLocalPart()', function () {\n ...
javascript
edit
0
1
mit
5049669158cae212ebcecae02ade6ab5cfd9660b
bash/email-js
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nfunction copyText(text) {\n let copied;\n let input = document.createElement('input');\n document.body.appendChild(input);\n try {\n input.value = text;\n input.select();\n copied = document.ex...
javascript
edit
0
2
mit
680df0464b52d851029fc02766baeb745b6c7344
TruthfulTechnology/unicode.party,TruthfulTechnology/unicode.party
app/components/emoji-tile/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n var canvas = document.getElementById('game');\n canvas.width = window.innerWidth;\n canvas.height = window.innerHeight;\n var ctx = canvas.getContext('2d');\n var FPS = 1000 / 60;\n\n var draw = fu...
javascript
edit
0
1
mit
39f21605b2b5780542c2e1a1d75e24d8dc041d41
msanatan/pong,msanatan/pong,msanatan/pong
javascripts/pong.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Original code adapted from Robert Kieffer.\n// details at https://github.com/broofa/node-uuid\n\n\n(function() {\n var _global = this;\n\n var mathRNG, whatwgRNG;\n\n // NOTE: Math.random() does not guarantee \"cryptographic quali...
javascript
edit
0
1
mit
b8695c478baa705e18cc7130be3af6c679ae0bf7
crypto-browserify/crypto-browserify,crypto-browserify/crypto-browserify
rng.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar wallabify = require('wallabify');\nvar wallabyPostprocessor = wallabify({});\n\nmodule.exports = function () {\n return {\n files: [\n {pattern: 'bower_components/chai/chai.js', load: true},\n {pattern: 'src/*.coffee',...
javascript
edit
0
1
mit
2765b69e48a83fca6eb2bf32c20eb40216cba5b4
mkautzmann/scroll-proxy,mkautzmann/scroll-proxy
wallaby.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { Command } = require('discord-akairo');\n\nfunction exec(message, args) {\n if (!args.guild) {\n this.client.logger.log(3, 'Must be in a guild to check its emotes.');\n return message.delete();\n }\n\n if (...
javascript
edit
0
5
mit
7b438ab6cfd3c970e4c77565fbbee2983bed6c47
1Computer1/megumin-selfbot
src/modules/commands/info/emotes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = grammar({\n name: 'ruby',\n\n rules: {\n program: $ => $._compound_statement,\n\n\t_compound_statement: $ => seq($._statement, rep(seq($._terminator, $._expression)), optional($._terminator)),\n\n\t_statement: $ =>...
javascript
edit
0
1
mit
c4ffce2d5838289520365618f4baf2e6a80928b2
tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby,tree-sitter/tree-sitter-ruby
grammar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport createEngine from './redux-storage-engine-localstorage-multi';\nimport filter from 'redux-storage-decorator-filter';\nimport debounce from 'redux-storage-decorator-debounce';\n\nconst engine = createEngine('binary');\n\nconst fil...
javascript
edit
0
0
mit
ee1273751a61b0b8b9d7f0e54405646a4f4ef169
binary-com/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen
src/_store/storageEngine.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2015-2017 Steven Soloff\n *\n * This is free software: you can redistribute it and/or modify it under the\n * terms of the MIT License (https://opensource.org/licenses/MIT).\n * This software comes with ABSOLUTELY N...
javascript
edit
0
2
mit
2039770bc0693336d28990af5b215b7c9a5c564d
ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js
src/server/middleware/correlation-id.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @module util-identities\n */\n\n'use strict'\n\nconst util = require('./util')\nconst debuglog = util.debuglog\nconst flatList = util.flatList\nconst execFileAsync = util.execFileAsync\n\n/**\n * This function returns a promise ...
javascript
edit
0
2
bsd-2-clause
f1b226ac6c22335f8885de74ed49c1d33479e82f
sethlu/electron-osx-sign,electron-userland/electron-osx-sign
util-identities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const SET_COMPLETION = 'SEARCH_SET_COMPLETION'\nexport const SET_BODY = 'SEARCH_SET_BODY'\nexport const SET_PAGE = 'SEARCH_SET_PAGE'\nexport const TRIGGER_SEARCH = 'TRIGGER_SEARCH'\n\nexport const setCompletion = (completion, nam...
javascript
edit
0
1
mit
17f2da224e18445756814103f044d2fe8b0f6af4
sajari/sajari-sdk-react,sajari/sajari-sdk-react
src/ui-components/web/actions/Search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals window,alert,jasmine */\n'use strict';\n\n(function () {\n var sendMessage = function sendMessage () {\n var args = [].slice.call(arguments);\n\n /* eslint-disable */\n if (window._phantom)...
javascript
edit
0
2
mit
c637e4eff1aacbdeec23130ffd0ffc0567d3e0ab
parkji/grunt-jasmine-webpack
tasks/reporters/phantom-reporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global describe:true*/\n/*global it:true*/\n/*global before:true*/\n'use strict';\n\ndescribe('d4.parsers.nestedGroup', function() {\n before(function(){\n this.data = [{ a: 10, b:20, c:30 }, { a: 100, b:-200, c:-30 }];\n });\n ...
javascript
edit
0
1
mit
dc024a553ffdccacfbf3e6a3e286cc2b537ad2c5
heavysixer/d4,heavysixer/d4
test/tests/parsers/nested-group-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Run test specs in node environment\n * Usage:\n * $ cd seajs\n * $ node tests/runner-node.js\n */\n\nrequire('../lib/sea')\n\ndefine('./tests/node-runner', function(require) {\n var test = require('./test')\n\n var suites ...
javascript
edit
0
1
mit
65d7533aa7dba43fb61c374962d5ae8eb57296af
lovelykobe/seajs,Lyfme/seajs,Lyfme/seajs,baiduoduo/seajs,eleanors/SeaJS,treejames/seajs,miusuncle/seajs,seajs/seajs,angelLYK/seajs,seajs/seajs,imcys/seajs,mosoft521/seajs,PUSEN/seajs,mosoft521/seajs,LzhElite/seajs,uestcNaldo/seajs,ysxlinux/seajs,judastree/seajs,kuier/seajs,ysxlinux/seajs,tonny-zhang/seajs,JeffLi1993/se...
tests/node-runner.js
rejected_duplicate
Near-duplicate of sample 74697
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nSequelize = require('sequelize')\ndbConfig = require('../database.json')['staging']\npg = require('pg').native;\n\nsequelize = new Sequelize(dbConfig.database, dbConfig.user, dbConfig.password, {\n dialect: \"postgres\",\n host: dbCon...
javascript
edit
0
0
isc
31405aa91da41f3786d945d6fa0de66c4989af3a
xdv/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd
config/initializers/sequelize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mobilePattern = /Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i;\nReveal.addEventListener(\"ready\", function() {\n var codes = document.querySelectorAll(\"code.javascript\");\n Array.prototype.forEach.call(codes, funct...
javascript
edit
0
1
mit
53a71760196771ddcef52dd666ff6017c1165626
benjamn/devshop-july-2015,benjamn/goto2015-talk,benjamn/empirenode-2015,benjamn/goto2015-talk,benjamn/empirenode-2015,benjamn/devshop-july-2015
js/init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ActionTypes from './ActionTypes';\n\nexport default function foundReducer(state = null, action) {\n switch (action.type) {\n case ActionTypes.UPDATE_MATCH:\n // For the initial match, set resolvedMatch too. There's no pr...
javascript
edit
0
5
mit
c554f47a9efd77fa403cdcbe3da35aeff7320dc9
4Catalyzer/found,4Catalyzer/found
src/foundReducer.js
accepted
null
true