messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * jQuery functionality used on the external content admin page\n */\n\n;(function ($, pt) {\n\t$().ready(function () {\n\t\t// bind the upload form\n\t\t$('#Form_EditForm_Migrate').click(function () {\n\t\t\t// we don't want thi...
javascript
edit
0
5
bsd-3-clause
933531dd67dbb8c77e204418dc23149549b14863
nyeholt/silverstripe-external-content,nyeholt/silverstripe-external-content
javascript/ExternalContent.jquery.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n'use strict';\n\nfunction Parser(plugins) {\n var filterPluginsForServices = function(serviceNames) {\n return plugins.filter(function (plugin) {\n return serviceNames.findIndex(function (serviceName) {\n ...
javascript
edit
0
4
mit
7c049bc980375a3514fbe1091aa23b4eb6cd7e46
mattunderscorechampion/vcap-services-parser
node/src/main/vcap-parser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Set the require.js configuration for your application.\nrequire.config({\n\n // Initialize the application with the main application file.\n deps: [\"main\"],\n\n paths: {\n\n // Libraries.\n circliful: \"/static/js/vendor/j...
javascript
edit
0
0
mit
2e5d48c7ef82bac81dde484c9be6f8c0f3bd7993
pricingassistant/mrq,pricingassistant/mrq,pricingassistant/mrq,pricingassistant/mrq
mrq/dashboard/static/js/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Sequelize = require(\"sequelize\");\n\nmodule.exports = function(sequelize, tableConfig) {\n return sequelize.define('UserUrl', {\n email: {\n type: Sequelize.STRING,\n allowNull: false\n },\n webImage: {\n ...
javascript
edit
0
1
mit
c327b87305b267ac84a50010ddb17f914a0066c1
Nayigiziki/Scrapinit,chrisgrovers/loveBiscuits,chrisgrovers/loveBiscuits,Nayigiziki/Scrapinit,TheBlankArrays/Scrapinit,TheBlankArrays/Scrapinit
server/db/models/UserUrl.js
rejected_duplicate
Near-duplicate of sample 81386
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nexport const default_icon = \"fa fa-circle-o\";\n\nexport const un_ocha_icon_mapping = {\n \"core-relief-item\": \"core-relief-item\",\n shelter: \"shelter\",\n health: \"health\",\n nutrition: \"nutrit...
javascript
edit
0
6
mit
17168c992d498dba4ef80a23c0897d741e704a2e
mcallistersean/b2-issue-tracker,mcallistersean/b2-issue-tracker,mcallistersean/b2-issue-tracker
frontend/js/components/icons/issueType.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function flatten(obj) {\n let flatObj = {};\n for (const [key, value] of Object.entries(obj)) {\n if (value !== null && value !== undefined && value.hasOwnProperty('value')) {\n flatObj[key] = value.value;...
javascript
edit
0
5
bsd-3-clause
e245acf55cfd96a2207c16e0d574953234c2cb9e
SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus
src/lwc/geFormRenderer/geFormRendererHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport lazyRequire from '@sanity/util/lib/lazyRequire'\n\nconst helpText = `\nOptions\n -y, --yes Use unattended mode, accepting defaults and using only flags for choices\n --project <projectId> Project ID to use for the studio\n --d...
javascript
edit
0
0
mit
3d7ed00f30f86d4c7bd49fa442111b4668bc1719
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/cli/src/commands/init/initCommand.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Sort menus only in parent containment" }, { "role": "assistant", "content": "var initMenu=function(){var e=\"li:not(.toggle-blade-helper)\",n=function(e,t){var a=[];return e.children(t).map(function(e,o){var l={key:$(o).data(...
javascript
new_file
0
2
mit
5c98a2c1f036a9e9da5555ab7dc8346d84f27a41
misterpaladin/mconsole,misterpaladin/mconsole,misterpaladin/mconsole
public/js/mconsole.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nrequire('coffee-script').register()\n\nvar fs = require('fs'),\n indentation = require('../lib/indentation'),\n buf, emblemFile, hbsFile, output;\n\nif (process.argv.length < 3) {\n if (process.stdin.isTTY)...
javascript
edit
0
1
mit
65048ea8efaab4a556347dfa47f5d449c578dace
patientslikeme/emblem2hbs
bin/emblem2hbs.js
rejected_duplicate
Near-duplicate of sample 97665
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar repl = require(\"repl\");\nvar massive = require(\"../index\");\nvar program = require('commander');\nvar assert = require(\"assert\");\n\nprogram\n .version('0.0.1')\n .option('-d, --database', 'The local d...
javascript
edit
0
2
bsd-3-clause
9fa3bb738ec5261c8cfd263c6d8aa1d3d109c9d5
robconery/massive-js
bin/massive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window){\n window.ajax = function(route, options) {\n var data = options.data || {},\n success = options.success || function(response){},\n error = options.error || function(response){},\n ...
javascript
edit
0
5
mit
3f3b198723c96cba46e64379813ad455ad6ae972
marceloemanoel/desafioCeJs2014
ajax.js
rejected_duplicate
Near-duplicate of sample 73261
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport findCounterpartCharacter from './findCounterpartCharacter';\n\n/**\n * Determines whether a node is surrounded by a matching pair of grouping\n * characters.\n *\n * @param {Object} node\n * @param {string} left\n * @returns {boo...
javascript
edit
0
2
mit
2d96d1d6ab1622a3dd75e6c9cc046c27e40aa6a5
lunks/decaffeinate,alangpierce/decaffeinate,alangpierce/decaffeinate,greyhwndz/decaffeinate,decaffeinate/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,eventualbuddha/decaffeinate,netei/decaffeinate,edi9999/decaffeinate,lunks/decaffeinate,eventualbuddha/decaffeinate,netei/decaffeinate
src/utils/isSurroundedBy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('todoList')\n .controller('todoListCtrl', todoListCtrl);\n\n todoListCtrl.$inject = ['TodoListService'];\n\n function todoListCtrl(TodoListService) {\n\n var vm = this;\n...
javascript
edit
0
1
mit
ab4d3f32db159b0c82cd0b734419755ddf738601
kennethk91/To-Do-List,kennethk91/To-Do-List
public/app/controllers/todo-list.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n\t\n\t$(\"#backbtn-settings\").click({\n param: 'route_view'\n }, showView);\n\t\n\t// first button in settings is to reset favoritelist\n\t// an empty list gets assigned to the favoritelist in l...
javascript
edit
0
1
apache-2.0
2a27f0e7d82ba6a410d7183a15457719d4d5df15
jonny-en/KoblenzBus,jonny-en/KoblenzBus
js/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst webpack = require('webpack');\nconst webpackMerge = require('webpack-merge');\nconst commonConfig = require('./webpack.common.js');\nconst ENV = process.env.NODE_ENV = process.env.ENV = 'production';\n\nmodule.exports = webpackMer...
javascript
edit
0
0
mit
c12adbc809d4a3038be5be5cd72cab65ed236e93
OfficeDev/generator-office
src/app/templates/ts/react/config/webpack.prod.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require(\"webpack\");\nvar Config = require(\"webpack-config\").Config;\n\nmodule.exports = new Config().extend(\"conf/webpack.base.config.js\").merge({\n devtool: \"#source-map\",\n plugins: [\n new webpack.o...
javascript
edit
0
0
mit
75ae2b1388669a299ceff0e95ef19f6b522a7205
MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example
conf/webpack.prod.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.tests = [\n\t{\n\t\tcss: '.foo body > h2 {}',\n\t\tmetrics: {\n\t\t\tredundantBodySelectors: 1\n\t\t}\n\t},\n\t{\n\t\tcss: 'body ul li a {}',\n\t\tmetrics: {\n\t\t\tredundantBodySelectors: 1\n\t\t}\n\t},\n\t{\n\t\tcss: 'body#foo...
javascript
edit
0
0
bsd-2-clause
abb61893261347174fd6055ab2013f2113ed2472
macbre/analyze-css,gmetais/analyze-css,macbre/analyze-css
test/rules/bodySelectors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==========================================================================\n// Project: SproutCore Runtime\n// Copyright: ©2011 Strobe Inc. and contributors.\n// License: Licensed under MIT license (see license.js)\n// ===========...
javascript
edit
0
1
mit
b94dc0ab580fe2c64e2cfad253b64fc041314b08
amk221/ember.js,patricksrobertson/ember.js,KevinTCoughlin/ember.js,balinterdi/ember.js,omurbilgili/ember.js,szines/ember.js,mdehoog/ember.js,jackiewung/ember.js,zenefits/ember.js,rodrigo-morais/ember.js,emberjs/ember.js,nickiaconis/ember.js,wecc/ember.js,kiwiupover/ember.js,michaelBenin/ember.js,chadhietala/mixonic-emb...
packages/sproutcore-runtime/tests/system/run_loop/run_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Object that contains Game initialization data.\n */\n\nexport default class {\n constructor(canvasWidth, canvasHeight) {\n this.gameInits = {};\n\n this._generateInitialSettings(canvasWidth, canvasHeight);\n }\n\n _gener...
javascript
edit
0
1
mit
9ea68515b1371990d5353d7657444f7bf324d5a7
BAJ-/robot-breakout,BAJ-/robot-breakout
js/GameInit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Clean = require('clean-webpack-plugin'),\n ExtractTextPlugin = require('extract-text-webpack-plugin'),\n webpack = require('webpack'),\n webpackConfig = require('webpack-config');\n\nvar config = w...
javascript
edit
0
0
mit
5165725d3230135f16cf7cdd178d93be88c8dc7a
chemoish/videojs-chapter-thumbnails,chemoish/videojs-chapter-thumbnails
webpack.config.production.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { camelToDash } from '@hybrids/core/src/utils';\nimport { error } from '../debug';\n\nexport default function style({ node, expr }, ...propertyNames) {\n if (!propertyNames.length) {\n return (list, { type: globalType, oldVal...
javascript
edit
0
6
mit
5ba467a94ebbb66c18786ed81604612956bdb615
hybridsjs/hybrids
packages/engine/src/markers/style.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar GameLayer = cc.Layer.extend({\n\n\tctor:function () {\n\t\t//\n\t\tthis._super();\n\t\t\n\t\tvar gameLayer = ccs.load(res.GameScene_json);\n\t\tthis.addChild(gameLayer.node)\n\t}\n});\n\nvar GameScene = cc.Scene.extend({\n\tonEnter:...
javascript
edit
0
1
mit
58adf61de75b551d72601eef7f2179897bf99732
darkdukey/PeriodicQuest,darkdukey/PeriodicQuest
src/game/GameScene.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar jf = require('../../'),\n expect = require('chai').expect,\n http = require('http');\n\nvar count = 0;\nfunction testValue(){\n count ++;\n return { num: count }\n}\n\nlet server = http.createServer(\n (...
javascript
edit
0
1
bsd-3-clause
8b3d516638836e7a824b7ebbf03a5efe7564792f
7k8m/json.filed,7k8m/json.filed
test/unit/testDownload_2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nif (typeof localStorage !== \"undefined\"){\n\tfor(var key in localStorage){\n\t\tif (localStorage.hasOwnProperty(key) && key != \"debug\") exports[key] = localStorage[key];\n\t}\n}\nexports.register = function(opt, ele...
javascript
edit
0
5
mit
231302159e2e28deab6aa2f6970fc09c7280e3c1
serprex/openEtG,serprex/openEtG
options.js
rejected_duplicate
Near-duplicate of sample 86054
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nManageIQ.angular.app.component('verifyButton', {\n bindings: {\n validate: '<',\n enabled: '<',\n validateUrl: '@',\n restful: '<',\n valtype: '<',\n buttonLabels: '<',\n },\n controllerAs: 'vm',\n controller: ['$s...
javascript
edit
0
0
apache-2.0
a9a8631584407a0c67cd24c6f0a7a83be3d71585
ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic
app/assets/javascripts/components/verify-button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*globals angular, console*/\n/**\n * @author lattmann / https://github.com/lattmann\n */\n\nangular.module('RequirementsApp').controller('SearchController', function (SearchService, $scope) {\n 'use strict';\n\n var self = this;\...
javascript
edit
0
2
mit
c8081bb7f8c20e59fe91b53191fb72e71df354ef
dynamics-team/requirements-editor,dynamics-team/requirements-editor,dynamics-team/requirements-editor,dynamics-team/requirements-editor
src/client/app/controllers/SearchController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor'\n\nMeteor.startup(function () {\n $.material.init();\n});\n\nMeteor.call(\"gitVersionInfoUpdate\");\n\n```\n\nApply this change: Remove startup code because $.material is undefined\n\nThere is n...
javascript
edit
0
0
mit
7e6b130061ea2d778ce6ac954329f7c0e63d7bec
RobNeXX/4minitz,Huggle77/4minitz,4minitz/4minitz,4minitz/4minitz,4minitz/4minitz,Huggle77/4minitz,Huggle77/4minitz,RobNeXX/4minitz,RobNeXX/4minitz
client/4minitz.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Ripple Client Configuration\n *\n * Copy this file to config.js and edit to suit your preferences.\n */\nvar Options = {\n server: {\n \"trusted\" : true,\n \"websocket_ip\" : \"127.0.0.1\",\n \"websocket_port\" : 5006...
javascript
edit
0
0
isc
b2d9b294026e2d7d2cb1652fcf9f6e90a531f600
xdv/ripple-client-desktop,thics/ripple-client-desktop,vhpoet/ripple-client,resilience-me/DEPRICATED_ripple-client,h0vhannes/ripple-client,MatthewPhinney/ripple-client,h0vhannes/ripple-client,arturomc/ripple-client,ripple/ripple-client,h0vhannes/ripple-client,darkdarkdragon/ripple-client,ripple/ripple-client-desktop,res...
config-example.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n parser: 'babel-eslint',\n extends: ['airbnb-base', 'prettier'],\n plugins: ['prettier'],\n globals: {\n Promise: true\n },\n env: {\n node: true\n },\n rules: {\n 'comma-dangle': 'off',\n 'import...
javascript
edit
0
0
mit
46c62aa4945b646742815d42857cc6c661b246e3
jevakallio/redux-offline,redux-offline/redux-offline
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\n\nconst rootReducer = combineReducers({\n routing: routerReducer\n});\n\nexport default rootReducer;\n```\n\nApply this change: Create roo...
javascript
edit
0
0
mit
2a66c8aff08e9638c31c94e64ef96151db56596b
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
client/reducers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n root: true,\n parser: 'babel-eslint',\n parserOptions: {\n sourceType: 'module'\n },\n // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style\n extends: 'standard',\n // requi...
javascript
edit
0
0
mit
d2ef89c404a03d1823d3aec4237509ba46e40cc5
melonmanchan/reaktor-chat-client,melonmanchan/reaktor-chat-client
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar $ = require('jQuery');\nvar onReady = require('kwf/on-ready');\nvar BaseUrl = require('kwf/base-url');\n\nonReady.onRender('.kwcClass', function(el) {\n //if embed template is used turn all xhr into cross domain xh...
javascript
edit
0
2
bsd-2-clause
26cf0aef62fdadac3ea9697adc1242f4a2dc49ff
koala-framework/koala-framework,koala-framework/koala-framework
Kwc/Advanced/IntegratorTemplate/Embed/Component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: 'fyndiq',\n rules: {\n // This rules causes issues because of nested packages.json, disabling\n 'import/no-extraneous-dependencies': 0,\n 'jsx-a11y/label-has-for': ['error', {\n required: {\...
javascript
edit
0
0
mit
c87d8ba8845e686e9323c99445bdd6ddf2627c74
fyndiq/fyndiq-ui,fyndiq/fyndiq-ui
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = global.Promise\n\nif (!module.exports) {\n try {\n module.exports = require('bluebird')\n } catch (_) {}\n}\n\n```\n\nApply this change: Add attempt to require bluebird first" }, { "role": "assistant", ...
javascript
edit
0
0
mit
e6a577658d1d06abfc8b3efa753575188b39812f
rstacruz/native-or-bluebird,normalize/native-or-bluebird
promise.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Proxy = require('./proxy');\nvar RouterClient = require('./router_client');\nvar ServiceRegistryClient = require('./service_registry_client');\nvar VersionClient = require('./version_client');\n\nvar port = process.env.PORT || 4001;...
javascript
edit
0
2
apache-2.0
078673dfa568f7ddf9c1dec8b19d91995da91b35
zettajs/link-router,zettajs/link-router
proxy_server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ContextualIdentities from '../ContextualIdentity';\nimport PreferenceGroup from './PreferenceGroup';\nimport ContainerPreference from './ContainerPreference';\n\n/**\n * Contains a @see{ContainerPreference} for each existing cont...
javascript
edit
0
1
mit
169ae6727f388814d211a4ac029d66560df2d6bb
kintesh/containerise,kintesh/containerise
src/ui-preferences/ContainerPreferenceGroup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(win, doc, $, ko){\n\n var options = {\n hiddenClass: 'hidden'\n };\n\n ko.bindingHandlers.hint = {\n init:function (element, valueAccessor, allBindingsAccessor) {\n var observable = valueAccess...
javascript
edit
0
3
mit
2f1a460b80e30451e3bb502079c9477889e271d9
s-stude/knockout-hint
src/knockout-hint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require(\"path\");\nvar webpack = require(\"webpack\");\n\nvar DtsBundlePlugin = require(\"./webpack.dts.plugin\");\n\nmodule.exports = {\n entry: {\n main: \"./src/index\",\n },\n\n resolve: {\n extens...
javascript
edit
0
0
mit
dbfca4cb557ebe45e1b81ddbe37785e35b9513a8
Josh-ES/trapezium,Josh-ES/trapezium,Josh-ES/trapezium
webpack/webpack.build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//Source: http://stackoverflow.com/questions/3837037/div-with-scrollbar-inside-div-with-positionfixed\n(function($) {\n $.fn.getPotentialHeight = function() {\n var $element = this;\n //heightOfParent is the height of par...
javascript
edit
0
1
mit
bc0cb8e9849b4f8f1866065436934203ef0ecc91
sjbuysse/sessions-map,sjbuysse/sessions-map
js/setListHeight.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add function to get all todos" }, { "role": "assistant", "content": "const promise = require('bluebird');\n\nconst options = {\n promiseLib: promise\n};\n\nconst pgp = require('pg-promise')(options);\nconst connectionString ...
javascript
new_file
0
2
mit
1319e5d2f7010d68db5df3c090474aba190edaaf
spencerdezartsmith/to-do-list-app,spencerdezartsmith/to-do-list-app
queries.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Identity = require('./Identity');\n\nmodule.exports = {\n pure : function(x){ return new Identity(x); },\n copure : function(idx){ return idx.val; }\n}\n```\n\nApply this change: Add error detection in Identity.cobind" }, { ...
javascript
edit
0
3
mit
7002a6583915ad000faf0edb7f2943e768199d43
5outh/famine
Identity/MonadIdentity.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport { CompositeDisposable } from 'atom';\nimport fs from 'fs';\n\nexport default {\n modalPanel: null,\n subscriptions: null,\n\n config: {\n shouldCreateFile: {\n type: 'boolean',\n default: true,\n ...
javascript
edit
0
3
mit
342a1a88d2cc9494ba9889465074ab45167b4cd2
guilhermelimak/open-tests
lib/open-tests.js
rejected_duplicate
Near-duplicate of sample 84953
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport const ResumeIcon = ({ className, ...props }) => (\n <svg\n {...props}\n className={`text-resume ${className}`}\n role=\"img\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0...
javascript
edit
0
1
mit
c4c8f60870627a8790039073562b45c61d0f1b09
dtjv/dtjv.github.io
src/components/icons/Resume.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Application from '../../app';\nimport config from '../../config/environment';\n\nexport default function startApp(attrs) {\n let application;\n\n // use defaults, but you can override\n let attribut...
javascript
edit
0
1
mit
a06ec625248d6dd318299122cf7f19fc1baed015
kpfefferle/ember-cli-octicons,kpfefferle/ember-octicons,kpfefferle/ember-octicons,kpfefferle/ember-cli-octicons
tests/helpers/start-app.js
rejected_duplicate
Near-duplicate of sample 81079
true
[ { "role": "user", "content": "Write javascript code for the following: Implement basic tests for roles" }, { "role": "assistant", "content": "// Write a test that validates that a new role created has a unique title.\n// Write a test that validates that all roles are returned when Roles.all is c...
javascript
new_file
0
1
mit
70a62f0eda926daec87632849836c1b70fdcc554
andela-oolutola/document-management-system-api
tests/server/roles.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add links to storage providers." }, { "role": "assistant", "content": "module.exports = function(app) {\n require('./storage/url')(app);\n require('./storage/s3')(app);\n require('./storage/dropbox')(app);\n};\n" } ]
javascript
new_file
0
1
mit
a0a7b64abff749d6abc61529300a7d6416cc797b
Kelsus/ngFormio,Kelsus/ngFormio,formio/ngFormio
src/plugins/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = require('xmlbuilder');\nmodule.exports.XMLFragment = require('xmlbuilder/lib/XMLFragment');\n\nmodule.exports.XMLFragment.prototype.addFragment = function(fragment) {\n fragment.parent = this;\n this.children.push(fra...
javascript
edit
0
3
mit
8734bf9d679646e4c01758698fce66dac62e4ca3
groonga/gcs,groonga/gcs
lib/xmlbuilder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst api = require('api');\n\nconst router = require('koa-router')();\n\nrouter.get('/search/em', function*() {\n const value = +this.query.value;\n if (!value) {\n return error(this, 'missing value');\n ...
javascript
edit
0
4
mit
cbc488e92500dbb534dde3f2535fd684c5b99016
cheminfo/node-pubchem
src/server/router.js
rejected_duplicate
Near-duplicate of sample 99206
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst app = express()\nconst path = require('path')\nconst nunjucks = require('nunjucks')\n\nmodule.exports = app\n\n// Set up App\nconst appViews = [\n path.join(__dirname, '/app/views/'),\n path.j...
javascript
edit
0
1
mit
e7d43b2bc3acaf3d890bd37eca48bcc2bc728988
alphagov/govuk_frontend_alpha,alphagov/govuk_frontend_alpha,alphagov/govuk_frontend_alpha
server.js
rejected_duplicate
Near-duplicate of sample 76368
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('app.controllers.channels', []).\n controller('Channels', Channels);\n \n Channels.$inject = ['$rootScope', 'chat'];\n function Channels($rootScope, chat) {\n ...
javascript
edit
0
2
mit
2c5ddda8d285c33f45e63e487eb3086169a9b1d0
BigRoom/mystique,BigRoom/mystique
src/js/controllers/channels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar scripts = document.getElementsByTagName('script'),\n script = scripts[scripts.length - 1],\n report = JSON.parse(script.getAttribute('data-report')),\n type = script.getAttribute('data-type');\n\ngoogle.load('visualization'...
javascript
edit
0
4
mit
a9a521aa44cd8e683b913df75d1b27123e0a66d0
BocuStudio/django-timepiece,caktus/django-timepiece,dannybrowne86/django-timepiece,dannybrowne86/django-timepiece,josesanch/django-timepiece,arbitrahj/django-timepiece,caktus/django-timepiece,caktus/django-timepiece,arbitrahj/django-timepiece,gaga3966/django-timepiece,dannybrowne86/django-timepiece,gaga3966/django-time...
timepiece/static/timepiece/js/chart/productivity_chart.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express')\n\t, app = express()\n\t, http = require('http').Server(app)\n\t, Q = require('q');\n\nvar ROOT = GLOBAL.proj_root\n\t, SENDFILE_OPTS = { root: ROOT }\n\t, PORT = 55221\n\t, START_TIMEOUT = 5;\n\n// Stat...
javascript
edit
0
1
mit
6677136c15c7e81b8e295de68f6d3e1b551987c6
cobalamin/dripdownode
server/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * \n */\n\n$(document).ready(function() {\n\tvar processCheckerUrl = 'AlignmentChecker?id=' + getUrlParameter('id');\n\t\n\t(function poll() {\n\t\t$.ajax({\n\t\t\turl : processCheckerUrl,\n\t\t\ttype: \"GET\",\n\t\t\tsuccess : fu...
javascript
edit
0
3
apache-2.0
dc44b411fb78ac2b761e82b7f81011ec61d065c4
SALSA-W/M-SALSA,SALSA-W/M-SALSA,SALSA-W/M-SALSA,SALSA-W/M-SALSA,SALSA-W/M-SALSA
src/webui/src/main/webapp/js/loading.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {applyMiddleware, compose, createStore as rawCreateStore} from 'redux';\nimport {persistStore, autoRehydrate} from 'redux-persist';\nimport createSagaMiddleware from 'redux-saga';\nimport createRootReducer from './createRootReduc...
javascript
edit
0
4
mit
5426209388cd10500151cbd7136d8437fd36e483
nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map
src/bootstrap/createStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport VideoListItem from './video_list_item';\n\nconst VideoList = (props) => {\n const videoItems = props.videos.map((video) => {\n return <VideoListItem video = {video} />\n });\n\n return (\n <ul...
javascript
edit
0
1
mit
f963425d95973d726705835ec463003673f7c2a3
izabelka/redux-simple-starter,izabelka/redux-simple-starter
src/components/video_list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst env = process.env;\n\nexport const nodeEnv = env.NODE_ENV || 'development';\n\nexport default {\n port: env.PORT || 3001,\n host: env.HOST || '0.0.0.0',\n get serverUrl() {\n return `http://${this.host}:${this.port}`;\n }\n...
javascript
edit
0
0
mit
44128c849cdeb74ac658fb40cdad7259f4ebbf77
hrasoa/react-pwa,hrasoa/react-pwa,hrasoa/react-pwa
src/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n refines: 'foam.core.Requires',\n flags: ['swift'],\n requires: [\n 'foam.swift.Argume...
javascript
edit
0
1
apache-2.0
b04bb087adc8914391d5bdebc1471d833c5e3c00
foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2
src/foam/swift/refines/Requires.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst gcd = require('../../../src').algorithms.math.gcd;\n\nconst assert = require('assert');\n\ndescribe('GCD', () => {\n it('should return 0 for either or both numbers as 0', () => {\n assert.equal(gcd(0, 1...
javascript
edit
0
1
mit
8b1071b55c32343dc4c427924959361a127d970e
ManrajGrover/algorithms-js
test/algorithms/math/testGCD.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {\n BrowserRouter as Router,\n Route,\n Switch\n} from 'react-router-dom';\nimport { NavigationBar } from '../NavigationBar';\nimport { PageHome } from '../PageHome';\nimport { PageLogin } from '../...
javascript
edit
0
2
apache-2.0
96f8fc68343389c15dc6cc02409485ce5fb60e81
nahody/biografia,nahody/biografia
src/components/PageRouter/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {OS_DESKTOP} from './platform.shared'\nimport path from 'path'\n\nexport const isDev = process.env.NODE_ENV === 'development'\nexport const OS = OS_DESKTOP\nexport const isMobile = false\n\nconst runMode = process.env.KEYBASE_RUN...
javascript
edit
0
2
bsd-3-clause
66cee3efb8e1c9e4dfab6ca33f4534023909fbf6
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
react-native/react/constants/platform.native.desktop.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// imports\nvar gulp = require('gulp');\nvar browserify = require('browserify');\nvar source = require('vinyl-source-stream');\nvar uglify = require('gulp-uglify');\nvar buffer = require('vinyl-buffer');\n\n// build src\ngulp...
javascript
edit
0
1
mit
0fb83aef5911c733fe11de81e5b7d316406edd81
microscope-mobile/ionic-maps,microscope-mobile/ionic-maps,microscope-mobile/ionic-maps,microscope-mobile/ionic-maps,microscope-mobile/ionic-maps
tasks/build.js
rejected_duplicate
Near-duplicate of sample 67635
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport JobProvider from './jobProvider'\n\nexport default class extends JobProvider {\n constructor() {\n super({\n id: 'dmtk',\n name: 'domestika.org',\n logo: 'http://4.bp.blogspot.com/-_ntAal9lU2I/T3XBljnauCI/AAAAA...
javascript
edit
0
1
mit
79e07cd02beb910d16c6f80210f1da1f905f1487
xcafebabe/jobsify,xcafebabe/jobsify,xcafebabe/jobsify
src/providers/domestika.org.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==========================================================================\n// Project: SproutCore Handlebar Views\n// Copyright: ©2011 Strobe Inc. and contributors.\n// License: Licensed under MIT license (see license.js)\n// ==...
javascript
edit
0
1
mit
38d94b51f8446e61a7adceac410ce0bff28de6fc
code0100fun/ember.js,wecc/ember.js,JacobNinja/es6,xtian/ember.js,workmanw/ember.js,mfeckie/ember.js,Serabe/ember.js,jherdman/ember.js,paddyobrien/ember.js,Zagorakiss/ember.js,cbou/ember.js,kellyselden/ember.js,johanneswuerbach/ember.js,johnnyshields/ember.js,mrjavascript/ember.js,gfvcastro/ember.js,marcioj/ember.js,pix...
packages/sproutcore-handlebars/lib/controls/checkbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { forEach } from 'lodash-es';\nimport { RECEIVE_WIKIDATA_LABELS } from '../constants';\n\nconst initialState = {\n labels: {}\n};\n\nexport default function wikidataLabels(state = initialState, action) {\n switch (action.type) ...
javascript
edit
0
5
mit
aeb7aeeb4e335b885e71eec5da68819983d3402d
WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard
app/assets/javascripts/reducers/wikidata_labels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = DatasetView;\n\n/** @ngInject **/\nfunction DatasetView() {\n return {\n scope: {\n participant: '=',\n dataset: '=',\n onEdit: '&'\n },\n template: require('./datasetView.direc...
javascript
edit
0
5
mit
1113d8d922fca15167d897decb5383569dff5c73
spikeheap/labking,spikeheap/labking
js/participantFilter/datasetView.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';\n\nexport default Ember.Route.extend(ApplicationRouteMixin, {\n model() {\n const tournamentId = this.modelFor('tournament')...
javascript
edit
0
1
mit
e9d96c7a4af0c8a973dfed0a009da39cd30d06a9
nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf
resources/frontend/app/pods/tournament/matches/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar Model = require('../../core/model');\n\n/**\n * This model is used for getting the total amount of values\n * from the category.\n *\n */\n\nmodule.exports = Model.extend({\n defaults: {\n url: ...
javascript
edit
0
4
bsd-3-clause
a64fccdeb92494b9d500571c242969c2dada93bb
splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js
src/dataviews/category-dataview/category-model-range.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n\tExample usage:\n\n\tvar A = Class(function() {\n\t\t\n\t\tvar defaults = {\n\t\t\tfoo: 'cat',\n\t\t\tbar: 'dum'\n\t\t}\n\n\t\tthis.init = function(opts) {\n\t\t\topts = std.extend(opts, defaults)\n\t\t\tthis._foo = opts.foo\n\t\t\...
javascript
edit
0
3
mit
8921a630e7b036cc6be4fa048ed493c98f44a776
ASAPPinc/std.js,marcuswestin/std.js
extend.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst createTransform = require('./transform')\nconst assert = require('assert')\n\nlet entityId = 0\n\nfunction Entity (components, tags, renderer) {\n assert(!tags || Array.isArray(tags), 'Entity tags must be an array or null')\n th...
javascript
edit
0
5
mit
a76f3e4211a34579e7e74a98643f39b2eba53196
pex-gl/pex-renderer,pex-gl/pex-renderer
entity.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\r\n\r\nlet Games = require('./games.js');\r\nlet uuid = require('node-uuid');\r\n\r\nlet games = new Games(uuid.v4);\r\n\r\nexports.registerRoutes = app => {\r\n app.get('/api/stats', (request, response) => {\r\n respo...
javascript
edit
0
1
mit
f53acc88c6a492c4c50c779157f66882df8440f8
allan-stewart/rest-mastermind,allan-stewart/rest-mastermind
src/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport union from 'lodash/array/union';\nimport without from 'lodash/array/without';\n\nexport default class EnterLeaveCounter {\n constructor() {\n this.entered = [];\n }\n\n enter(enteringNode) {\n this.entered = union(\n ...
javascript
edit
0
3
mit
0b23fe3209f1f2fbdbfff533b512729902b58561
cesarandreu/react-dnd,zetkin/react-dnd,jgable/react-dnd,konce/react-dnd,randrianov/react-dnd,ntdb/react-dnd,hiddentao/react-dnd,craigklem/react-dnd,globexdesigns/react-dnd,nagaozen/react-dnd,Reggino/react-dnd,zetkin/react-dnd,srajko/react-dnd,jowcy/react-dnd,colbyr/react-dnd,tylercollier/react-dnd-demo,pairyo/react-dnd...
modules/utils/EnterLeaveCounter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Processes', function() {\n 'use strict';\n let atf = require('../../specs/atf');\n let ropts = {\n db: 'mctest',\n port: 30815\n };\n\n let r = require('rethinkdbdash')(ropts);\n let p = require...
javascript
edit
0
1
mit
2b3ba3db50797ab7cdc301b55e458caefa6a0f99
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/server/db/model/processes.spec.js
rejected_duplicate
Near-duplicate of sample 89077
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport logger from '../logger'\n\nconst openedModules = {}\n\nconst hotModules = {}\n\nconst createHotModule = () => ({ instances: [], updateTimeout: 0 })\n\nexport const hotModule = moduleId => {\n if (!hotModules[moduleId]) {\n ho...
javascript
edit
0
3
mit
00e5aed30567bdea05c21938dd28b1a534ab3c36
gaearon/react-hot-loader,gaearon/react-hot-loader
src/global/modules.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\nmodule.exports = {\n description: 'ember-cli-tooltipster',\n normalizeEntityName: function() {\n // this prevents an error when the entityName is not specified\n },\n\n afterInstall: function( /*options*/ ) ...
javascript
edit
0
1
mit
f7f2386be131d66cbfe4e8ae6588171a1c511042
altrim/ember-cli-tooltipster,altrim/ember-cli-tooltipster
blueprints/ember-cli-tooltipster/index.js
rejected_duplicate
Near-duplicate of sample 92687
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) Martin Costello, 2017. All rights reserved.\n// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.\n\nvar AlexaAppServer = require(\"alexa-app-server\");\nvar e...
javascript
edit
0
1
apache-2.0
788d1d26a052fdbf2a6d5be5653c0cf0e2e7b2c1
martincostello/alexa-london-travel
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\"\n\nimport Context from \"./context\"\nimport ShadowTree from \"./shadowtree\"\n\nclass Lint {\n constructor(tree, filename = null, namespace = []) {\n Object.assign(\n this,\n {\n ...
javascript
edit
0
1
bsd-2-clause
479582c83b164ef8802401b3bb1cde1beb75b44e
jj101k/php-lint,jj101k/php-lint
src/lib/lint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport axios from 'axios';\n\nclass App extends React.Component {\n\n render() {\n return (\n <Abc/>\n )\n }\n}\n\nclass Abc extends React.Component {\n render() {\n return (\n <div>\n ...
javascript
edit
0
2
mit
4a07b40ee7010a4cff5d1d1a092cd657dfa0efa1
junorouse/valid-xss-checker,junorouse/valid-xss-checker
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Scans your stylesheet for pseudo classes and adds a class with the same name.\n// Thanks to Knyle Style Sheets for the idea.\n(function () {\n\n'use strict';\n\nvar toArray = function(arr) {\n return Array.prototype.slice.call(arr, ...
javascript
edit
0
2
mit
ad7fe2e1971062b92355463655e4032df4f5590d
trungnghia112/styledocco,paulwellnerbou/styledocco,paulwellnerbou/styledocco,jacobrask/styledocco,ooooooo-q/styledocco,ooooooo-q/styledocco,trungnghia112/styledocco
shared/docs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Smooth Scroll', function () {\n\n describe('init', function () {\n it('should include the smoothScroll module', function () {\n expect(!!smoothScroll).toBe(true);\n });\n });\n\n});\n\n```\n\nApply this change: Ad...
javascript
edit
0
1
mit
a8374d7bc31e55ca865952e96087860ba7c08cf3
iksi/smooth-scroll,krrg/smooth-scroll,outsourceage/smooth-scroll,fussinatto/smooth-scroll,cferdinandi/smooth-scroll,krrg/smooth-scroll,iksi/smooth-scroll,hadrienl/smooth-scroll,SevInf/smooth-scroll,zonayedpca/smooth-scroll,mig1098/smooth-scroll,fussinatto/smooth-scroll,SevInf/smooth-scroll,outsourceage/smooth-scroll,cf...
test/spec/spec-smoothScroll.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Template } from 'meteor/templating';\nimport { Blaze } from 'meteor/blaze';\nimport { OHIF } from 'meteor/ohif:core';\n\nconst toolMap = {\n bidirectional: 'targets'\n};\n\nOHIF.measurements.toggleLabelButton = options => {\...
javascript
edit
0
2
mit
81b3bb412604f6d372389a02c09b0e23cb924b7a
OHIF/Viewers,OHIF/Viewers,OHIF/Viewers
Packages/ohif-measurements/client/lib/toggleLabelButton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n\tless = require('gulp-less'),\n\tautoprefixer = require('gulp-autoprefixer'),\n\tminifycss = require('gulp-minify-css'),\n\tnotify = require('gulp-notify'),\n\trename = require('gulp-rename');\n\ngulp.task(...
javascript
edit
0
1
mit
00123a872cc25c1b697811346ff1ec864d02cf73
olumby/caffeine,olumby/caffeine
Gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport DS from 'ember-data';\nimport ENV from '../config/environment';\n\n\nfunction getToken() {\n var token;\n var session = window.localStorage['ember_simple_auth:session'];\n if (session) {\n ...
javascript
edit
0
3
apache-2.0
cdad548abcbc49e10001febaa08b17300035413a
caneruguz/osfpages,caneruguz/osfpages,Rytiggy/osfpages,Rytiggy/osfpages
app/adapters/node.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst config = require('config');\nconst runner = require('punchcard-runner');\n\nconst options = runner.config({\n application: {\n library: {\n src: [\n 'lib',\n 'config',\n ...
javascript
edit
0
1
apache-2.0
0a9a3389c33e82b39c5ac19b132eef8fcbe1aee7
punchcard-cms/demo,punchcard-cms/demo
Gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst checkDate = () => {\n return;\n}\nmodule.exports = checkDate;\n\n```\n\nApply this change: Implement checkDate function for date string arguments" }, { "role": "assistant", "content": "const checkDate = (dateString) =...
javascript
edit
0
2
mit
ea51980646b7f719f0717fb6fcc24273b78642dc
mkermani144/freecodecamp-projects,mkermani144/freecodecamp-projects
backend/timestamp-microservice/src/dateChecker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$('#dripbot-title').css({\n\t\"display\": \"inline-block\",\n\t\"margin-right\": \"20px\"\n});\n\n$('#dripbot').css({\n \"text-align\": \"left\"\n});\n\n$('#dripbot-toggle.stop').css({\n \"background-color\": \"#e9656d\",\n \"c...
javascript
edit
0
0
mit
f07bb14d90525ed304d072ea8e8017ece05f94ef
catofclysm/testing,catofclysm/testing,kyotie/bot,kyotie/bot,apottere/DripBot,apottere/DripBot
dripBot-css.js
rejected_duplicate
Near-duplicate of sample 72082
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name agar-mass-ejector\n// @namespace http://github.com/dimotsai/\n// @version 0.02\n// @description A faster, continuous mass ejector for agar.\n// @author dimotsai\n// @license MIT\n/...
javascript
edit
0
3
mit
7406b87053003b9a23f8e12dbbc65735d7c079ce
dimotsai/agar-mass-ejector
agar-mass-ejector.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.onload = initialize;\n\nvar DATAFILE = \"research.json\";\nvar DONE_READYSTATE = 4;\nvar DONE_STATUS = 200;\nvar OFFICIAL_URL = \"http://www.ecst.csuchico.edu/~kbuffardi/\";\nvar OFFICIAL_HOST = \"www.ecst.csuchico.edu\"\n\nvar r...
javascript
edit
0
3
mit
132ed270e82dac02cc555b6e78ef959487f85182
kbuffardi/ScholarWebsite,kbuffardi/ScholarWebsite
scholar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar request = require('request');\nvar randomstring = require('randomstring');\nvar db = require('./database');\n\nvar handlers = {\n\n showIntro: function(req, res) {\n res.render('intro');\n },\n\n cre...
javascript
edit
0
1
mit
460be4e2357ee15ab2a08fa078015d9989a07c5f
njmcode/ggj-2016,njmcode/ggj-2016
server/handlers.js
rejected_duplicate
Near-duplicate of sample 75704
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst webpack = require('webpack')\nconst ExtractTextPlugin = require('extract-text-webpack-plugin')\n\nmodule.exports = {\n entry: [path.resolve(__dirname, '../client/index.js')],\n module: {\n loader...
javascript
edit
0
0
mit
3d742285efddba5b71e6d59af1dd8d4a5ca90fe4
CodingZeal/react-boilerplate,CodingZeal/react-boilerplate
webpack/base.js
rejected_duplicate
Near-duplicate of sample 91725
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2012 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\n/**\n * @fileoverview Demo login UI.\n */\n\n/**\n * Handles a...
javascript
edit
0
1
bsd-3-clause
933c38e17fcdb48393b37b7c8081788d3a28b7d4
gavinp/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chro...
chrome/browser/resources/chromeos/login/demo_user_login.js
rejected_duplicate
Near-duplicate of sample 81131
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('./lib/polyfill');\nmodule.exports = require('../dist/bin/cli/harmonic');\n\n```\n\nApply this change: Fix bin entry point for Unix-based OS's" }, { "role": "assistant", "content": "#!/usr/bin/env no...
javascript
edit
0
0
mit
1de51f5756c91effc7054f879acc7cd239796659
thotty/harmonic,JSRocksHQ/harmonic,joaopauloti/harmonic,robsongajunior/harmonic,viniciusdacal/harmonic,mauricionr/harmonic
entry_points/harmonic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmyApp.controller('InventoryController', function($scope, $window, $location, $routeParams, inventoryService) {\n inventoryService.loadInventories()\n .then(function(inventories) {\n console.log(\"Loaded stored inven...
javascript
edit
0
1
cc0-1.0
925c4b35ebacea747c490c0b3ed054b0b4739bf8
zcdunn/inventory,zcdunn/inventory
js/InventoryController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['backbone.marionette', 'app', 'hbs!../templates/exam'],\n function (Marionette, App, template) {\n 'use strict';\n\n return Marionette.ItemView.extend({\n tagName: 'tr',\n template: template,\n\n events: {\...
javascript
edit
0
1
mit
28c4434b7ceb86492f1e5448e47b6672889e33e6
mauris/nusmods,Yunheng/nusmods,chunqi/nusmods,Yunheng/nusmods,Yunheng/nusmods,zhouyichen/nusmods,Yunheng/nusmods,Yunheng/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,nathanajah/nusmods,chunqi/nusmods,mauris/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,mauris/nusmods,mauris/nusmods,nusmodifications/nusmods...
app/scripts/timetable_builder/views/ExamView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Requires\nvar _ = require('underscore');\n\nvar fs = require('fs');\n\n// Comannder\nvar prog = require('commander');\n\n// etcd-dump's package.json file\nvar pkg = require('../package.json');\n\n// Dumper clas...
javascript
edit
0
1
apache-2.0
909fa7e69ed9cd01d08c65a2ba04b0499f4c454c
AaronO/etcd-dump
bin/etcd-dump.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar usersController = require('../controllers/users');\n\n/**\n * Get all\n */\nrouter.get('/', usersController.all);\n\n/**\n * Get by id\n */\nrouter.get('/:userId', u...
javascript
edit
0
0
mit
4d1dbddf920975ea1dd6e652c78f4cbe78284240
99999989/sample-manager-server,99999989/sample-manager-server,99999989/sample-manager-server
routes/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport class AdjacencyList {\n constructor(graph) {\n this.a = constructAdjacencyList(graph);\n }\n depthFirstSearch(start, earlyCallback) {\n depthFirstSearch(this.a, start, earlyCallback);\n }\n}\n\nfunction ...
javascript
edit
0
2
mit
296fe1c24a982ffe1d7fa6f8b056f5f0a0d2a908
peferron/algo,peferron/algo,peferron/algo,peferron/algo,peferron/algo,peferron/algo
connected_components/javascript/adjacency_list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cx from 'clsx';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport MediaLoadingIndicator from './MediaLoadingIndicator';\n\nconst LoadingRow = ({\n className,\n selected = false,\n ...attrs\n}) => (\n <d...
javascript
edit
0
1
mit
d3890708919d4c6a7f403a104ea5774f7130eb77
u-wave/web,u-wave/web
src/components/MediaList/LoadingRow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\nimport translations from \"croodle/lang/translations\";\n/* global Croodle */\n\nexport default Ember.View.extend({\n templateName: 'language-switch',\n \n languages: function() {\n var languages = []...
javascript
edit
0
2
mit
e920daf053c68538c3103e7d4b8bad1e7bb4678f
jelhan/croodle,jelhan/croodle,jelhan/croodle
app/views/language-switch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst sitemap = require('./../index')\nconst express = require('express')\n\nconst app = express()\nconst core = new express.Router()\nconst other = new express.Router()\napp.use('/core', core)\napp.use(other)\n\n// expr...
javascript
edit
0
1
mit
903c8677deeb379cf8f3881fe1e46c43f0d2dc17
fmcarvalho/express-sitemap-html
example/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require('request');\n\nvar {processAddress, prefetchAddress} = require('./utils');\n\nconst GEOCODE_BASE_URL = 'http://open.mapquestapi.com/geocoding/v1/address';\n\nfunction MapQuest(apiKey) {\n this.key = apiKey;\n ret...
javascript
edit
0
4
mit
596b298eb0e18bc3a8ce4cd90656e21f77e962b9
keokilee/hitraffic-worker,hitraffic/worker
app/geocoders/mapquest.js
accepted
null
true