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\nimport _ from 'lodash'\n\nclass GraphController {\n constructor() {\n this.prepareData();\n }\n\n prepareData() {\n // I am assuming the reference object is always sent\n // at position 0 so I will not be figuring that out\n...
javascript
edit
0
1
apache-2.0
ad6916c838d96bc3b2a29678aca4b60dc098d9a7
wojtekgalaj/webpack-interview-exercise,wojtekgalaj/webpack-interview-exercise
client/app/components/graph/graph.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ($) {\n\nvar FIELDS = {\n 'centerpage': 'referenced_cp',\n 'channel': 'query',\n 'query': 'raw_query'\n};\n\n\nvar show_matching_field = function(container, current_type) {\n $(['referenced_cp', 'query', 'raw_query...
javascript
edit
0
2
bsd-3-clause
8091c80faced7df102973a726179662a7fd3f2c9
ZeitOnline/zeit.content.cp,ZeitOnline/zeit.content.cp
src/zeit/content/cp/browser/resources/area.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport unpackByOutpoint from './unpackByOutpoint';\n\n// Polyfills and `lbry-redux`\nglobal.fetch = require('node-fetch');\nglobal.window = global;\nif (typeof global.fetch === 'object') {\n global.fetch...
javascript
edit
0
2
mit
1af5312c5a4f8e3561e052525480d6ce6cde07b9
lbryio/lbry-app,lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-app,lbryio/lbry-electron
src/platforms/electron/startSandbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* By default the search is hidden. When you add a component on the page that wants to use the search,\n * then add this as a mixin. It will use CSS to activate the search while the component is shown.\n *\n * WARNING: this assumes that...
javascript
edit
0
1
mit
2be8ae444d43d27c5e7e8eaadc6fb0998cde65a8
dukecon/dukecon_pwa,dukecon/dukecon_pwa,dukecon/dukecon_pwa
src/components/navbar/SearchMixin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { LightShadow } from './LightShadow.js';\nimport { OrthographicCamera } from '../cameras/OrthographicCamera.js';\n\n/**\n * @author mrdoob / http://mrdoob.com/\n */\n\nfunction DirectionalLightShadow( ) {\n\n\tLightShadow.call( t...
javascript
edit
0
1
mit
0442b430be43b04580abcdcc7cdbbbaed5540c44
Liuer/three.js,greggman/three.js,TristanVALCKE/three.js,zhoushijie163/three.js,Samsy/three.js,donmccurdy/three.js,jpweeks/three.js,mrdoob/three.js,SpinVR/three.js,greggman/three.js,stanford-gfx/three.js,TristanVALCKE/three.js,looeee/three.js,Itee/three.js,Samsy/three.js,aardgoose/three.js,TristanVALCKE/three.js,looeee/...
src/lights/DirectionalLightShadow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// this idea borrowed from\n// https://www.planbox.com/blog/development/coding/bypassing-githubs-content-security-policy-chrome-extension.html\n\nchrome.webRequest.onHeadersReceived.addListener(function(details) {\n for (i = 0; i < det...
javascript
edit
0
3
mit
5c4cae3e2e64e35e41dd3a210592846f130f3171
thieman/github-selfies,thieman/github-selfies
chrome/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport {\n BrowserRouter as Router,\n Route,\n Switch\n} from 'react-router-dom';\n\nimport MonthDetail from './components/pages/History/MonthDetail';\nimport HomePage from './componen...
javascript
edit
0
1
mit
9f143c518269d8a14b9c40964dda586aa27a6d37
mbchoa/presence,mbchoa/presence
client/src/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n EditorState,\n AtomicBlockUtils,\n} from 'draft-js';\n\nexport default (editorState, url, extraData) => {\n const urlType = 'image';\n const contentState = editorState.getCurrentContent();\n const contentStateWithEntity ...
javascript
edit
0
1
mit
26f51f95a8547f8a6e7067856b432183ef9908ef
nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins,nikgraf/draft-js-plugin-editor,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins
draft-js-image-plugin/src/modifiers/addImage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2015 the V8 project 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\n// Flags: --allow-natives-syntax\n\nvar stdlib = { Math: Math };...
javascript
edit
null
null
mit
6c19c79f596ae6872c7b5b2fe2b31ff4f5c8cb51
UniversalFuture/moosh,UniversalFuture/moosh,UniversalFuture/moosh,UniversalFuture/moosh
test/mjsunit/asm/math-clz32.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\ninclude('helma/webapp/response');\ninclude('helma/engine');\ninclude('helma/jsdoc');\nrequire('core/array');\n\nexports.index = function index(req, module) {\n var repo = new ScriptRepository(getRepositories()[1]);\n if (module &&...
javascript
edit
0
6
apache-2.0
7f80989cb19f31de01fffcc2976939bf095b0c0d
ringo/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,Transcordia/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ringo/ringojs,Transcordia/ringojs
apps/jsdoc/actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { node, object, oneOfType, string } from 'prop-types'\nimport Bit from './Bit'\nimport Code from './Code'\nimport HTML from 'html-parse-stringify'\nimport React from 'react'\nimport reactify from '../util/reactify'\nimport Image ...
javascript
edit
0
3
mit
ca2c3bf7d57284eaaf8e9be69c6c15746fcd5bde
dlindahl/stemcell,dlindahl/stemcell
src/components/ComponentizeContent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\n\ngulp.task(\n 'ci',\n ['coding-standards', 'test', 'protractor', 'protractor:dist']\n);\n\n```\n\nApply this change: Remove protractor:dist from the ci task (gulp)." }, { "role"...
javascript
edit
0
0
mit
ce3ee6f2131314d395734ef0e69b89a5f62cf51d
algotech/angular-boilerplate,OroianRares/stock-prices,OroianRares/BrowserChatApp,OroianRares/angular-boilerplate,OroianRares/stock-prices,OroianRares/BrowserChatApp,algotech/angular-boilerplate,OroianRares/angular-boilerplate
gulp/continuous-integration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\njsns.run([\n \"htmlrest.domquery\",\n \"htmlrest.storage\",\n \"htmlrest.rest\",\n \"htmlrest.controller\",\n \"htmlrest.widgets.navmenu\",\n \"edity.pageSourceSync\"\n],\nfunction (exports, module,...
javascript
edit
0
1
mit
86abbdef8290ab8dda9553e1981f92382321a602
threax/EdityMcEditface,threax/EdityMcEditface,threax/EdityMcEditface
EdityMcEditface/wwwroot/edity/layouts/editComponents/source.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['react', 'collections/projects', 'models/project', 'rsvp'], function(React, Collection, Model, RSVP) {\n\n var projects = new Collection();\n\n var getProjects = function() {\n return new RSVP.Promise(function(resol...
javascript
edit
0
1
apache-2.0
8110d5ddc810886ca3bb7c72ac2908d05ec6176b
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
troposphere/static/js/controllers/projects.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2014 The Chromium OS Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport AxiomError from 'axiom/core/error';\n\nimport enviro...
javascript
edit
0
1
apache-2.0
b74e5d8d697f113d43f6c0793dc669168220632c
rpaquay/axiom,chromium/axiom,umop/axiom_old_private,ussuri/axiom,mcanthony/axiom
lib/axiom_pnacl/executables.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Actor(other) {\n\tother = other || {};\n\tthis.name = other.name || \"\";\n\tthis.init = other.init || 0;\n\tthis.hp = other.hp || 0;\n};\nvar sort = function(left, right) {\n\treturn left.init==right.init ? 0 : (left.init > ri...
javascript
edit
0
5
mit
a7fb7e9a16e45bbc29603be46d082910c06b30b7
madigan/ncounter,madigan/ncounter
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction quote(s) {\n\treturn \"\\\"\" + s.replace(/([\\\\\\\"])/, \"\\\\$1\") + \"\\\"\";\n}\n\nfunction maybe_quote(s) {\n\tif (/[\\\\\\\"]/.test(s))\n\t\treturn quote(s);\n\telse\n\t\treturn s;\n}\n\nfunction repr(x, max_depth) {\n\t...
javascript
edit
0
1
mit
7c5ddc02666adb0bd8f011e908fb1d0e11a01244
arlolra/flashproxy,infinity0/flashproxy,infinity0/flashproxy,arlolra/flashproxy,infinity0/flashproxy,arlolra/flashproxy,arlolra/flashproxy,glamrock/flashproxy,glamrock/flashproxy,glamrock/flashproxy,infinity0/flashproxy,arlolra/flashproxy,arlolra/flashproxy,infinity0/flashproxy,glamrock/flashproxy,arlolra/flashproxy,gl...
util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport Modal from 'shared/components/modal/modal';\nimport Form from 'shared/components/form/form';\nimport FormEmail from 'shared/components/form/formEmail/formEmail';\nimport FormPassword fro...
javascript
edit
0
3
mit
86e6616397397d0cdcda5aa0d89ee872429769b6
hollomancer/operationcode_frontend,miaket/operationcode_frontend,NestorSegura/operationcode_frontend,sethbergman/operationcode_frontend,tskuse/operationcode_frontend,NestorSegura/operationcode_frontend,alexspence/operationcode_frontend,OperationCode/operationcode_frontend,tskuse/operationcode_frontend,sethbergman/opera...
src/shared/components/login/login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function supportsWorker() {\n\ttry {\n\t\t// eslint-disable-next-line node/no-unsupported-features/node-builtins\n\t\treturn require(\"worker_threads\") !== undefined;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\n```...
javascript
edit
0
6
mit
c15fc1bae4bd27839a0d78e220d02eb94bd4bdae
SimenB/webpack,webpack/webpack,webpack/webpack,webpack/webpack,webpack/webpack,SimenB/webpack,SimenB/webpack,SimenB/webpack
test/helpers/supportsWorker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//Create a runner that will run a separate build for each item\n//in the configs array. Thanks to @jwhitley for this cleverness\nfor (var i = 0; i < __Screwdriver.rjs.moduleConfigs.length; i++) {\n requirejs.optimize(__Screwdriver.rj...
javascript
edit
0
1
apache-2.0
2747aa2c950deb95a99ef937c23c8d7db17d5f86
semperos/screwdriver,semperos/screwdriver
src/main/resources/com/semperos/screwdriver/js/extension/process-rjs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fetch from 'node-fetch';\nimport { API_URL, HTTP_HEADERS } from '../constants';\n\nconst headers = HTTP_HEADERS;\n\nconst formatStats = (data, battletag, competitive) => {\n const stats = data['overall_stats'];\n const gameMode...
javascript
edit
0
3
mit
9678e952e50cef724dfae8871ceda7b3dc056a4f
chesterhow/overwatch-telegram-bot
src/services/fetchOverallStats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport Helmet from 'react-helmet'\n\nimport { NavBar } from '../../components'\n\nconst styles = {\n iframe: {\n width: '100%',\n }\n}\n\nclass TeamPage extends Component {\n componentDidM...
javascript
edit
0
1
mit
d78824b2be952e65117258d3ec701304425fe304
hackclub/api,hackclub/api,hackclub/api
frontend/src/containers/TeamPage/TeamPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar classNames = require('classnames');\n\nvar ListItem = require('./ListItem');\nvar ListItemGroup = require('./ListItemGroup');\n\nvar List = React.createClass({\n displayName: 'List',\n\n getDefaultPr...
javascript
edit
0
2
apache-2.0
ca37507057f8920d078f203fc56cf3070defc8c7
mesosphere/reactjs-components,mesosphere/reactjs-components
src/List/List.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport routes from '../routes'\nimport request from '../request'\n\nconst create = (opts, email, password) =>\n request.post(opts, routes.session, { email, password })\n\nconst verify = Promise.resolve(1)\nconst destroy = Promise.resol...
javascript
edit
0
1
mit
2068d2d2bc6907b2bd7990a933d93d5044cf35e3
pagarme/pagarme-js
src/lib/session/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nApplication.Directives.directive(\"sidebarProjects\", sidebarProjectsDirective);\n\nfunction sidebarProjectsDirective() {\n return {\n restrict: \"AE\",\n replace: true,\n templateUrl: \"index/sidebar-projects.ht...
javascript
edit
0
2
mit
ea60507ab9f00476914a394a0556b6af68b9eca1
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/app/index/sidebar-projects.js
rejected_duplicate
Near-duplicate of sample 80167
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nApplication.Controllers.controller(\"FilesController\", [\"$state\", FilesController]);\nfunction FilesController($state) {\n //console.log(\"FileController going to projects.project.files.all\");\n //$state.go('projects.project.f...
javascript
edit
0
2
mit
927f134f72634ad149dfe7165eb228b1c7214beb
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/app/application/core/projects/project/files/files-controller.js
rejected_duplicate
Near-duplicate of sample 75890
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst volumeSnapshots = {\n templateUrl: 'views/partials/filtered-list.html',\n controller: VolumeSnapshotsListController,\n controllerAs: 'ListController',\n bindings: {\n resource: '<'\n }\n};\n\nexport default volumeSnapshots...
javascript
edit
0
2
mit
fe8f4e74ed73f3c56e8747b393e0036261cc3d4d
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/components/openstack/openstack-volume/openstack-volume-snapshots.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar eng = require('./node/engine');\n\nmodule.exports = {\n minimize: function(func, options, callback) {\n eng.runPython('minimize', func, options, callback);\n },\n nonNegLeastSquares: function(A, b, callback) {\n eng.runPyth...
javascript
edit
0
1
mit
94352ff890da1dc1a83651b316eba519d9101243
acjones617/scipy-node,acjones617/scipy-node
optimize/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\r\n\r\n\r\nmodule.exports = (function(){\r\n /**\r\n * Import modules\r\n */\r\n const footballDb = require('./../db/footballDb')\r\n /**\r\n * football module API\r\n */\r\n return {\r\n ...
javascript
edit
0
1
mit
088a0c67588f9334eb8dbed9447055eff3fbfe30
CCISEL/connect-controller,CCISEL/connect-controller
example/controllers/football.js
rejected_duplicate
Near-duplicate of sample 103102
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n{\n \"name\": \"ES6 Promises\",\n \"property\": \"promises\",\n \"caniuse\": \"promises\",\n \"polyfills\": [\"es6promises\"],\n \"authors\": [\"Krister Kari\", \"Jake Archibald\"],\n \"tags\": [\"es6\"],\n \"notes\": [{\n ...
javascript
edit
0
6
mit
a150a6caa9db55a262335df60a8048e03171a227
Modernizr/Modernizr,Modernizr/Modernizr
feature-detects/es6/promises.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue'\n\nimport { isSSR } from './platform.js'\nimport QAjaxBar from '../components/ajax-bar/QAjaxBar.js'\n\nexport default {\n start () {},\n stop () {},\n increment () {},\n\n install ({ $q, cfg }) {\n if (isSSR...
javascript
edit
0
2
mit
607cedc66dcee8d76c2786e1aa2b2389577bd204
pdanpdan/quasar,quasarframework/quasar,pdanpdan/quasar,pdanpdan/quasar,rstoenescu/quasar-framework,rstoenescu/quasar-framework,fsgiudice/quasar,fsgiudice/quasar,quasarframework/quasar,pdanpdan/quasar,quasarframework/quasar,quasarframework/quasar,rstoenescu/quasar-framework,fsgiudice/quasar
src/plugins/loading-bar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n function fetchPonyfill(options) {\n var Promise = options && options.Promise || self.Promise;\n var XMLHttpRequest = options && options.XMLHttpRequest || self.XMLHttpRequest;\n var global = ...
javascript
edit
0
5
mit
5a63f87a9bf6fa7c4ce54f7c5f650b85190fd930
qubyte/fetch-ponyfill,qubyte/fetch-ponyfill
fetch-browser.js
rejected_duplicate
Near-duplicate of sample 110083
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Remove the PUBLIC_URL, if defined\nprocess.env.PUBLIC_URL = ''\n\nprocess.env.INSPIRE_API_URL = 'inspire-api-url'\n\nrequire('babel-register')()\n\nconst { jsdom } = require('jsdom')\nconst moduleAlias = require('module-alias')\ncons...
javascript
edit
0
2
mit
2cb746c292c9c68d04d9393eeccdf398573a84af
sgmap/inspire,sgmap/inspire
build/tests/bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(pc, candidates, callback) {\n var timer;\n\n pc.onicecandidate = function(evt) {\n if (evt.candidate) {\n console.log(evt);\n candidates.push(evt.candidate);\n }\n else {\n // TODO: tr...
javascript
edit
0
2
bsd-2-clause
9496ca53251d22fa7c43af672dbc39feeeace5fe
ssaroha/node-webrtc,vshymanskyy/node-webrtc,lresc/node-webrtc,siphontv/node-webrtc,martindale/node-webrtc,martindale/node-webrtc,diffalot/node-webrtc,martindale/node-webrtc,siphontv/node-webrtc,siphontv/node-webrtc,ssaroha/node-webrtc,ssaroha/node-webrtc,siphontv/node-webrtc,guymguym/node-webrtc,martindale/node-webrtc,...
test/helpers/capture-candidates.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nuser_pref(\"accessibility.typeaheadfind.flashBar\", 0);\nuser_pref(\"accessibility.typeaheadfind.prefillwithselection\", true);\nuser_pref(\"browser.backspace_action\", 2);\nuser_pref(\"browser.bookmarks.restore_default_bookmarks\", fal...
javascript
edit
0
0
mit
c14bea03e77d0b7573ae087c879cadfc3ca9c970
poiru/dotfiles,poiru/dotfiles,poiru/dotfiles
firefox/prefs.js
rejected_duplicate
Near-duplicate of sample 75897
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n siteMetadata: {\n siteUrl: 'https://chocolate-free.com/',\n title: 'Chocolate Free',\n },\n plugins: [\n {\n resolve: 'gatsby-source-contentful',\n options: {\n spaceId: '0w6gaytm0wfv',\...
javascript
edit
0
0
apache-2.0
9d43d46eac238af0ac1a038916e6ebe21383fc95
Khaledgarbaya/chocolate-free-website,Khaledgarbaya/chocolate-free-website
gatsby-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('mission-control').config(['$stateProvider', '$urlRouterProvider',\n function ($stateProvider, $urlRouterProvider) {\n // For unmatched routes\n $urlRouterProvider.otherwise('/');\n\n // Applica...
javascript
edit
0
1
mit
930bcf06b7cca0993d0c13250b1ae7bd484643ba
craigcabrey/mission-control,craigcabrey/mission-control
src/js/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst eris = justcord.eris;\nconst config = justcord.config;\nconst chat = justcord.chat;\n\neris.on(\"ready\", () => {\n console.log(\"Justcord ready!\"); // TODO: Add logging utility functions\n eris.createMessage(config.eris.id...
javascript
edit
0
4
mit
3b0ea4f643c065a14b8bd79d27111e69d3698b2b
md678685/justcord-3
erisevents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar noop = require('es5-ext/function/noop')\n , assign = require('es5-ext/object/assign')\n , memoize = require('memoizee')\n , ee = require('event-emitter')\n , deferred = require('deferred')\n\n , is...
javascript
edit
0
2
isc
560f6420d7681201cb404eb39e80f3000102e53c
medikoo/fs2
lib/_memoize-watcher.js
rejected_duplicate
Near-duplicate of sample 93276
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect;\nvar request = require('supertest');\nvar http = require('http');\nvar cookie = require('../lib/browser');\n\ndescribe('server-side cookie', function() {\n describe('.set', function() {\n it('sho...
javascript
edit
0
1
mit
b40447a79ed4d94ba05e379e4192556c271a1e4b
srph/cookie-machine
test/browser.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport when from 'when';\n\nlet\n openFiles = ['a.js', 'b.js', 'c.js'],\n saveFile = (file) => {\n console.log('saveFile', file);\n return new Promise((resolve, reject) => {\n setTimeout(\n ...
javascript
edit
0
1
mit
6e6ec8c967ddb486a979a267016e7eb2b5c7ff4d
jgornick/asyncp
eachSeries.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar db = require(\"./firebase\");\n\n// Ensure the updated timestamp is always accurate-ish\nmodule.exports = function(ref) {\n ref.on(\"child_changed\", function(snap) {\n var key = snap.key(),\n ...
javascript
edit
0
3
mit
f7d374595d08b3421f0da67932f5fcbb7a092e8d
tivac/crucible,Ryan-McMillan/crucible,kevinkace/crucible,tivac/anthracite,kevinkace/crucible,tivac/anthracite,tivac/crucible,Ryan-McMillan/crucible
src/lib/watch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (C) 2007-2014, GoodData(R) Corporation.\nvar httpProxy = require('http-proxy');\n\nmodule.exports = function(host) {\n var currentHost, currentPort;\n\n var proxy = new httpProxy.RoutingProxy({\n target: {\n ...
javascript
edit
0
4
bsd-3-clause
09c0f85065d496bec9e869f3ec170648b99f77c9
gooddata/grunt-grizzly,crudo/grunt-grizzly
lib/middleware/request_proxy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ItemsRoute = Em.Route.extend({\n model: function (params) {\n return this.api.fetchAll('items', 'groups', params.group_id);\n },\n\n setupController: function (controller, model) {\n // allow sub-routes to access the GroupI...
javascript
edit
0
1
mit
24bd88bb2965515ac7f9ffecde850e7f63ce23a5
darvelo/wishlist,darvelo/wishlist
app/scripts/app/routes/items.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet RNVersionCheck;\nif (process.env.RNVC_ENV === 'test') {\n RNVersionCheck = {\n country: 'ko',\n packageName: 'com.reactnative.versioncheck',\n currentBuildNumber: 1,\n currentVersion: '0.0.1',\n };\n} else {\n const {...
javascript
edit
0
1
mit
51e2104a004ca63fb1e7f5262e61441b558bd288
kimxogus/react-native-version-check,kimxogus/react-native-version-check,kimxogus/react-native-version-check
packages/react-native-version-check-expo/src/ExpoVersionInfo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Must symlink the generator from xtc's modules up to the project's modules.\n// Else Yeoman won't find it.\n\nvar path = require('path')\n\tfs = require('fs')\n;\n\n// process.cwd() == __dirname\n\nif ('install'...
javascript
edit
0
0
mit
79c32b103f5cbd76b5f9d287c89372704cfbc35e
MarcDiethelm/xtc
bin/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncinema.views.ViewportView = Backbone.View.extend({\n\n initialize: function () {\n this.$el.html(cinema.app.templates.viewport());\n\n this.camera = new cinema.models.CameraModel({\n info: this.model\n ...
javascript
edit
0
2
bsd-3-clause
c1b67784c26c4c2658446dddbed92ef44b8bd84a
Kitware/cinema,Kitware/cinema,Kitware/cinema,Kitware/cinema
web/src/js/app/views/ViewportView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(global) {\n 'use strict';\n\n (function(id) {\n var i, j;\n var tab = document.getElementById(id);\n var thead = tab.querySelector('thead');\n var tbody = tab.querySelector('tbody');\n ...
javascript
edit
0
3
mit
45c28fca5c5bfad96691fb61b71967f3eb38ffe6
Lexicality/esolang,Lexicality/esolang
brainfuck.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar qs = require('querystring')\n\nmodule.exports = function (network, url, opts) {\n\n opts = opts || {}\n\n if (!linkfor[network]) throw new Error('Unsupported network ' + network)\n return linkfor[network](url, opts)\n\n}\n\nvar l...
javascript
edit
0
3
mit
74f1842a096c184982a94d4fc5a95c1a90d18a63
tableflip/share-my-url
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst getJSON = require('get-json');\n\nconst overpass = 'http://overpass-api.de/api/interpreter?data=';\nconst query = '[out:json];way[%22highway%22](around:50,51.424037,-0.148666);out;';\n\ngetJSON(`${overpass}${query}`, (err, result)...
javascript
edit
0
2
mit
43b808affcd475e7ad94e4f494c306334323dbb3
mkhalila/nearest-roads
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar through = require('through2');\n\nvar choppa = function(chunkSize) {\n chunkSize = chunkSize === undefined ? 1 : chunkSize;\n var prev = new Buffer(0);\n\n var transform = function(chunk, enc, cb) {\n chunk = Buffer.concat([pr...
javascript
edit
0
4
mit
7f84fd91f2196394261e287b0048ea30612858b3
sorribas/choppa
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\nmodule.exports = {\n browsers: [\n 'ie 9',\n 'last 1 Chrome versions',\n 'last 1 Firefox versions',\n 'last 1 Safari versions'\n ]\n};\n\n```\n\nApply this change: Drop support for older browsers\n\n...
javascript
edit
0
0
mit
790b051f536065f97da5699f9d9332391d4ec97a
thecoolestguy/frontend,thecoolestguy/frontend,djvoa12/frontend,ilios/frontend,dartajax/frontend,jrjohnson/frontend,dartajax/frontend,ilios/frontend,jrjohnson/frontend,djvoa12/frontend
config/targets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n db: process.env.MONGODB || process.env.MONGOHQ_URL || 'mongodb://localhost:27017/gamekeller',\n sessionSecret: process.env.SESSION_SECRET || 'gkdevel'\n}\n```\n\nApply this change: Remove support for MONGOHQ_URL e...
javascript
edit
0
0
mit
2cdd929e7ee6924387e0f96a84c080d111de6604
gamekeller/next,gamekeller/next
config/secrets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global CodeMirror*/\n$(function() {\n $('pre').each(function() {\n var preElement = $(this);\n var code = dedent(preElement.text()).trim();\n preElement.empty();\n CodeMirror(this, {\n value: code,\n mode: 'java...
javascript
edit
0
3
apache-2.0
1c7c553128fcc842f394c429dfc28dbce934fb86
rvarshney/code-dot-org,pickettd/code-dot-org,rvarshney/code-dot-org,dillia23/code-dot-org,pickettd/code-dot-org,rvarshney/code-dot-org,dillia23/code-dot-org,pickettd/code-dot-org,pickettd/code-dot-org,dillia23/code-dot-org,pickettd/code-dot-org,rvarshney/code-dot-org,dillia23/code-dot-org,pickettd/code-dot-org,rvarshne...
pegasus/sites.v3/code.org/public/js/applab-docs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar aglio = require('aglio');\nvar through2 = require('through2');\nvar gutil = require('gulp-util');\nvar PluginError = gutil.PluginError;\nvar defaults = require('lodash.defaults');\nvar path = require('path');\n\nmodule.exports = fun...
javascript
edit
0
5
mit
f5f96e1458e43f2360f16297b8e52eb71c666d8d
nnnnathann/gulp-aglio,nnnnathann/gulp-aglio
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst shortUrlController = require('./lib/short-url-controller.js');\nconst stubController = require('./lib/stub-controller.js');\nconst logger = require('winston');\n\nconst port = process.env.PORT ...
javascript
edit
0
1
mit
a2ac0281ef8e4a489b87553edec11f650418ef83
glynnw/url-shortener,glynnw/url-shortener
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar postcss = require('postcss');\nvar SEProperties = require('swedish-css-properties');\nvar SEValues = require('swedish-css-values');\n\nmodule.exports = postcss.plugin('postcss-swedish-stylesheets', functi...
javascript
edit
0
3
mit
64c4b12d5300c2a52b56b150f7202757c4d7c958
johnie/postcss-swedish-stylesheets
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar exec = require('child_process').exec;\nmodule.exports = function sysPrefix() {\n return new Promise(function(resolve, reject) {\n exec('python -c \\'import sys; print(sys.prefix)\\'',\n function(err, stdout) {\n if (...
javascript
edit
0
2
apache-2.0
e53f9e79ce9b90480f11341a7427e6e8a63ca65a
rgbkrk/sys-prefix-promise
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * array-last <https://github.com/jonschlinkert/array-last>\n *\n * Copyright (c) 2014 Jon Schlinkert, contributors.\n * Licensed under the MIT license.\n */\n\nvar isNumber = require('is-number');\n\nmodule.exports = function last...
javascript
edit
0
6
mit
4e9b368ea408768aa52b44660b564fa23d344781
jonschlinkert/array-last
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nvar fs = require('fs');\n\nmodule.exports = {\n name: 'uncharted-describe-models',\n\n config: function(env, config) {\n if (env === 'test') {\n return;\n }\n\n if (!fs.existsSyn...
javascript
edit
0
2
mit
bb273759bbb9f9edb716fa6596477fa019057fec
unchartedcode/describe-models,unchartedcode/describe-models
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n handlebars: require('./lib/handlebars'),\n marked: require('./lib/marked'),\n componentTemplate: 'node_modules/foundation-docs/templates/component.html',\n handlebarsHelpers: 'node_modules/foundation-docs/helper...
javascript
edit
0
0
mit
992c7b2c2cc3f73eaef974a5c885da6fe27ebd6c
zurb/foundation-docs,zurb/foundation-docs
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// var http = require(\"http\");\n// app.set('view engine', 'html');\nvar express = require('express');\nvar app = express();\napp.use(express.static(__dirname + '/views'));\napp.use(express.static(__dirname + '/scripts'));\n\napp.liste...
javascript
edit
0
1
apache-2.0
b069edce8a3e82dc64e34678db4dd7fe5c508aa3
XanderPSON/febrezehackathon,XanderPSON/febrezehackathon
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst util = require(\"gulp-util\");\nconst through = require(\"through2\");\nconst moment = require(\"moment\");\n\nmodule.exports = function(options) {\n options = options || {};\n\n function updateDate(file, opti...
javascript
edit
0
4
mit
93d89dfef836e493dc2a13b18ff08ee6b020cc91
Pinjasaur/gulp-update-humanstxt-date
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Map = require('./lib/map'),\n Format = require('./lib/format'),\n safe64 = require('./lib/safe64');\n\nmodule.exports = {\n Map: Map,\n Format: Format,\n safe64: safe64,\n pool: function(datasource) {\n retu...
javascript
edit
0
1
bsd-3-clause
d60976582c1c4f8035a41e59c36489f5fbe95be1
dshorthouse/tilelive-mapnik,CartoDB/tilelive-mapnik,mapbox/tilelive-mapnik,tomhughes/tilelive-mapnik,wsw0108/tilesource-mapnik
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nconst promiseBindMiddleware = (\n { dispatch } : { dispatch : Function },\n) => (next: Function) => (action: Object) => {\n if (action && action.promise && typeof action.promise === 'function') {\n const { type, metadata,...
javascript
edit
null
null
mit
0cb6a403de01d6dd60750ac1cc337d1c8f10177b
machnicki/redux-promise-bind
src/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Enzyme from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\n\n// Configure Enzyme\nEnzyme.configure({ adapter: new Adapter() });\n\n// Add RAF for React 16\nglobal.requestAnimationFrame = function requestAnimationFrame...
javascript
edit
0
1
mit
2e8c529dee0385daf201ecb5fca2e1d4b69d9376
milesj/build-tool-config,milesj/build-tool-config,milesj/build-tool-config
jest-setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport JobStatus from 'girder_plugins/jobs/JobStatus';\n\nJobStatus.registerStatus({\n WORKER_FETCHING_INPUT: {\n value: 820,\n text: 'Fetching input',\n icon: 'icon-download',\n color: '#89d2e2'\n },\n...
javascript
edit
0
0
apache-2.0
8f82186dfb27825a7b2220f9a6c3f66346f0f300
girder/girder_worker,girder/girder_worker,girder/girder_worker
worker/web_client/JobStatus.js
rejected_duplicate
Near-duplicate of sample 79460
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ReactGA from 'react-ga'\nimport {config} from 'config'\n\nReactGA.initialize(config.googleAnalyticsId);\n\nexports.onRouteUpdate = (state, page, pages) => {\n ReactGA.pageview(state.pathname);\n};\n```\n\nApply this change: Add ...
javascript
edit
0
1
bsd-3-clause
688146ec463c255b6000ce72a4462dff1a99cb3c
tadeuzagallo/blog,tadeuzagallo/blog
gatsby-browser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n name: 'live-reload-middleware',\n\n serverMiddleware: function(options) {\n var app = options.app;\n options = options.options;\n\n if (options.liveReload === true) {\n var livereloa...
javascript
edit
0
21
mit
3e0998496283eb83b66f97d765e069a470f3ba5d
jbescoyez/ember-cli-inject-live-reload,rwjblue/ember-cli-inject-live-reload,scottkidder/ember-cli-inject-live-reload
index.js
rejected_complexity
Cyclomatic complexity too high: 21
true
[ { "role": "user", "content": "Write javascript code for the following: Write first component and start first API call" }, { "role": "assistant", "content": "class SearchBox extends React.Component {\n // constructor(){\n // super();\n // this.state = {\n // searched:false;\n // };...
javascript
new_file
0
1
mit
441dd784316cf734126b0ca95116070bd6147189
scottychou/WikipediaViewer,scottychou/WikipediaViewer
js/components.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst command = {\n command: \"serve\",\n description: \"Start Truffle's GraphQL UI playground\",\n builder: {},\n help: {\n usage: \"truffle db serve\",\n options: []\n },\n\n /* This command does starts an express derived ...
javascript
edit
0
1
mit
a1e21bd2df72b0bfd54d2d5ecdab766d6390f785
ConsenSys/truffle
packages/core/lib/commands/db/commands/serve.js
rejected_duplicate
Near-duplicate of sample 73789
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { AppContainer } from 'react-hot-loader'\nimport App from './containers/App'\n\nReactDOM.render(\n <AppContainer>\n <App/>\n </AppContainer>,\n document.getElemen...
javascript
edit
0
1
mit
beee13c55b54fe107651d54105aa7a7d2a89edb0
ytorii/tebukuro,ytorii/tebukuro,gazayas/tebukuro,gazayas/tebukuro,gazayas/tebukuro,ytorii/tebukuro,ytorii/tebukuro,gazayas/tebukuro
front/client/index.js
rejected_duplicate
Near-duplicate of sample 80621
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as path from 'path';\nimport {fs} from 'node-promise-es6';\nimport * as fse from 'fs-extra-promise-es6';\n\nexport default class {\n constructor(basePath) {\n this.basePath = path.resolve(basePath);\n }\n\n async create()...
javascript
edit
0
2
mit
b5e2e552814b00858fce4fa844d326e6b3d81bc0
vinsonchuong/directory-helpers
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar notify = require(\"./notify\");\n\nmodule.exports = function notifyStyleLint (stdout) {\n var messages = stdout.split(\"\\n\");\n\n messages.pop(); // Remove last empty new message.\n\n if(0 < messages.length) {\n var message ...
javascript
edit
0
2
mit
c9e44c6d990f95bb7e92bfa97fc0a74bf636c290
rishabhsrao/generator-ironhide-webapp,rishabhsrao/generator-ironhide-webapp,rishabhsrao/generator-ironhide-webapp
app/templates/tasks/utils/notify-style-lint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('jquery')\nrequire('expose?$!expose?jQuery!jquery')\nrequire(\"bootstrap-webpack\")\nrequire('./less/index.less')\n\n```\n\nApply this change: Add POC for showing the closes weather observation data" }, { "role": "assist...
javascript
edit
0
1
apache-2.0
6cacd255d4c963af7454da36656926f213b676f8
chacal/nrf-sensor-receiver,chacal/nrf-sensor-receiver,chacal/nrf-sensor-receiver
client/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nappRun();\n\nfunction appRun() {\n\n $(document).ready(function() {\n console.log(\"READY\");\n\n $(\".loading\").hide();\n $(\".complete\").show();\n\n //PAGE SWIPES\n $(document).on('pageinit', function(e...
javascript
edit
0
4
mit
b656897309110504fbc52e2c2048ed5dc3d17e23
andkerel/sinbad-and-the-phonegap,andkerel/sinbad-and-the-phonegap
js/sinbad-app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function(state, ctx, model, helpers) {\n\n\tconst ConcretizeIfNative = helpers.ConcretizeIfNative;\n\n\t//TODO: Test IsNative for apply, bind & call\n\tmodel.add(Function.prototype.apply, ConcretizeIfNative(Function.proto...
javascript
edit
0
2
mit
f6cb55ec87878fdd2849dc4ba5ea6bd19b6c96c0
ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE
Analyser/src/Models/FnModels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar nconf = require('nconf');\n\nnconf\n .env()\n .file({ file: './gateway.json' });\n\nnconf.defaults({\n 'RIPPLE_REST_API': 'http://localhost:5990',\n 'DATABASE_URL': 'postgres://username:password@localhost/ripple_gateway'\n});\n\...
javascript
edit
0
0
isc
001259b0263e6b2534b0efdc9a3b6936965bf9b8
whotooktwarden/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,whotooktwarden/gatewayd,crazyquark/gatewayd,zealord/gatewayd,xdv/gatewayd
config/nconf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * Internal dependencies\n */\nimport { DATA_LAYER } from './index.private';\n\n/**\n * Returns a function which, when invoked will initialize the dataLayer and push data onto it.\n *\n * @param {Object} target Object to enhance ...
javascript
edit
0
2
apache-2.0
a549e6988de5071dbbf397c5fd1f894f5ad0a8f7
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/util/tracking/createDataLayerPush.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assign = require('object-assign');\nvar Filter = require('broccoli-filter');\nvar Rework = require('rework');\n\n/**\n * Initialize `ReworkFilter` with options\n *\n * @param {Object} inputTree\n * @param {Object} o...
javascript
edit
0
3
mit
00211245eafbd799b7feda2076d6a84a981e41ad
kevva/broccoli-rework
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by leojin on 3/20/16.\n */\nimport ReactDom from 'react-dom';\nimport React from 'react';\nimport App from './App';\n\nReactDom.render(<App/>, document.getElementById(\"examples\"));\n```\n\nApply this change: Fix file n...
javascript
edit
0
0
mit
bf80fe88a9966d70d94bd567f60805be396fb375
dougcalobrisi/react-jointjs
examples/app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//onReady\n$(function() {\n //temporary testing functionality\n $('#refreshBtn').on('click', function() {\n updateStreams();\n });\n});\n\n\nfunction updateStreams() {\n // Clear out the stale data\n $('#mainContainer').html(\"\...
javascript
edit
0
2
mit
b9ef8725552b57061865e73ca54b901bdf773465
xipxoom/fcc-twitch_status,xipxoom/fcc-twitch_status
app/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar document = require('global/document')\nvar Loop = require('main-loop')\nvar virtualDom = require('virtual-dom')\nvar assert = require('assert')\nvar partial = require('ap').partial\nvar Delegator = require('dom-deleg...
javascript
edit
0
3
mit
828aba16dfb4273329392c369bf637897b80ec87
bendrucker/thermometer
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport class DecoratorUtils {\n static declarationType = [\n \"CLASS\",\n \"CLASS_METHOD\",\n \"CLASS_ACCESSOR\",\n \"OBJECT_LITERAL_METHOD\",\n \"OBJECT_LITERAL_ACCESSOR\"\n ].reduce((obj, name) => {\n return Object...
javascript
edit
0
7
mit
db8e102e618ef8b49a4887523da6563146a3ea91
lukehorvat/decorator-utils
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar needle = require('needle');\n\nfunction Client(base_url, token) {\n this.base_url = base_url\n this.token = token || {}\n}\n\nClient.prototype.get = function (path, body, callback) {\n this.__send('get', path, body, callback);\n}...
javascript
edit
0
2
mit
02601074d529577222d594a01be4d82fc936622b
tresni/node-networkedhelpdesk
lib/client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n \n\n // Status reporting code\n // Use this to report missing hardware, plugin or unsupported browser\n ext._getS...
javascript
edit
0
5
bsd-3-clause
afe60f1030ac7cdff1e0acca3229f9b1ba19fc00
visor841/SkelScratch,Calvin-CS/SkelScratch
Kinect2Scratch.js
rejected_duplicate
Near-duplicate of sample 95236
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\nimport AppBar from 'material-ui/AppBar';\nimport IconButton from 'material-ui/IconButton';\nimport IconMenu from 'material-ui/IconMenu';\ni...
javascript
edit
0
1
mit
afdf07a331ed5f7dad218f9f23e7466ffcf75597
ahoarfrost/metaseek,ahoarfrost/metaseek,ahoarfrost/metaseek
scripts/components/Header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Karma configuration\n// http://karma-runner.github.io/0.10/config/configuration-file.html\n\nmodule.exports = function(config) {\n config.set({\n // base path, that will be used to resolve files and exclude\n basePath: '',\n\n...
javascript
edit
0
1
mit
39bb5e7acfde32763f1f8c228f0335db84f9cae7
seriema/angular-apimock,MartinSandstrom/angular-apimock,seriema/angular-apimock,MartinSandstrom/angular-apimock
karma.conf.js
rejected_duplicate
Near-duplicate of sample 88398
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n classNames: ['organization-profile'],\n\n credentials: Ember.inject.service(),\n\n organizationMembers: Ember.computed.mapBy('organization.organizationMembership...
javascript
edit
0
1
mit
0c59eb01b242e7591bc1a9218f1eb330ec9ec9f4
jderr-mx/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember
app/components/organization-profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n *\n * @flow\n */\n\n'use strict';\n\nimport {StyleSheet} from 'react-native';\n\n const GlobalStyles = {\n contentWrapper: {\n paddingLeft: 5,\n paddingRight: 5,\n },\n sectionHeader: {\n fontSi...
javascript
edit
0
0
mit
b557cbb6c8e98fc5ed0183a8c902561389e4e013
bkrem/educhain,bkrem/educhain,bkrem/educhain,bkrem/educhain
EduChainApp/js/common/GlobalStyles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst externalDeps = [\n\t'@angular/*',\n\t'angular',\n\t'angular-mocks',\n\t'rxjs/*',\n\t'lodash',\n\t'moment',\n\t'moment-timezone',\n];\n\nconst map = {\n\t'@angular': 'node_modules/@angular',\n\t'angular': 'node_mod...
javascript
edit
0
1
mit
696343cd90c8aa3b21a289b363441e005a7413da
RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities
system.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global document window */\nimport { focusFirstEl } from '../../../../../packages/spark-core/utilities/elementState';\n\nconst hideMobileNav = (nav) => {\n document.body.classList.remove('sprk-u-OverflowHidden');\n nav.classList.rem...
javascript
edit
0
2
mit
4df51733774fdbde4e23020127a3084f403d1179
sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system
src/assets/drizzle/scripts/navigation/mobileNav.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst puppeteer = require(\"puppeteer\")\nconst defaults = require(\"../configurations/defaults\")\n\nconst puppeteerArgs = [\n \"--no-sandbox\",\n \"--disable-setuid-sandbox\",\n \"--disable-gpu\"\n]\n\nconst allowedOptions = [\n \...
javascript
edit
0
4
mit
a81e5611622ac50a1c82a26df88e63c87d888e88
tecnospeed/pastor
lib/converter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Winston = require('winston');\n\nfunction Logger(level) {\n const logLevel = level.toLowerCase() || 'info';\n\n const logger = new Winston.Logger({\n level: logLevel,\n transports: [\n new Winston.tra...
javascript
edit
0
1
mit
447902934914f8a803a705044252eb71beb7cc62
rapid7/acs,rapid7/acs,rapid7/acs
lib/logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar fs = require('fs')\nvar path = require('path')\nvar existFile = require('exists-file')\n\nvar minimistPath = path.join(__dirname, '..', 'node_modules', 'meow', 'node_modules', 'minimist')\nvar minimist = require(mini...
javascript
edit
0
3
mit
5b3686c9a28feaeda7e51526f8cdc9e27793b95c
Kikobeats/farm-cli,Kikobeats/worker-farm-cli
bin/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { remote } from 'electron';\nimport { call, select, put, takeLatest } from 'redux-saga/effects';\nimport GIF from './constants';\nimport { result, error, clear } from './actions';\nimport request from '../../utils/request';\n\nex...
javascript
edit
0
5
mit
b183de1dbadae83d82c6573ba61dc7b5fa386856
astrogif/astrogif,astrogif/astrogif
app/containers/gif/sagas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux';\nimport ContactUs from '../components/ContactUs';\nimport { submitForm } from '../actions/contact';\n\nconst mapStateToProps = (state) => ({\n contactStatus: state.contactStatus,\n defaultUserNam...
javascript
edit
0
3
mit
7f5f5482fc30ab8f6fd1470f15569023f95d4920
Vizzuality/GlobalFishingWatch,Vizzuality/GlobalFishingWatch,Vizzuality/GlobalFishingWatch
app/src/containers/ContactUs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AJAX_LOADER = '<span class=\"ajax_loader\"></span>';\n\n$(document).bind('ajaxComplete', function () {\n $('.ajax_loader').remove();\n});\n\n```\n\nApply this change: Mark forms as not submitted after AJAX complete." }, { ...
javascript
edit
0
1
mit
88d7a14c2640c8ee7eddd6044fe84970a0f724c8
DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle,DarvinStudio/DarvinAdminBundle
Resources/public/scripts/globals.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n\tpath = require('path'),\n\tutil = require('../lib/util');\n\nvar Source = util.inherit(Object, {\n\t\t_initialize: function (root) {\n\t\t\tthis._root = root;\n\t\t},\n\n\t\ttravel: function (callback, pathnam...
javascript
edit
0
5
mit
6c355830dcf91e90e3fce6f2ff9d59654716c8b7
nqdeng/ucc
bin/source.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore } from 'redux';\n\nimport reducer from 'reducers';\nimport initialState from 'initialState';\n\nconst store = createStore(reducer, initialState,\n window.devToolsExtension ? window.devToolsExtension() : undefined\n...
javascript
edit
0
3
mit
4ca82da87e04c8b0b2d9a73ae67c7af99e7888da
vincentriemer/io-808,vincentriemer/io-808,vincentriemer/io-808
src/store.js
accepted
null
true