messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\n\nvar routes = [\n 'users',\n 'building',\n 'units'\n];\n\nmodule.exports.mount = function(app) {\n _(routes).each(function(route){\n require('./'+route+'_routes').mount(app);\n });\...
javascript
edit
0
1
mit
2bdfb9c7c5c51c86c46fcf724ffe0ce08ea0ebed
romain-grelet/HackersWars,romain-grelet/HackersWars
server/routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Model\nBustinBash.Hints.Model = function() {}\n\n// View\nBustinBash.Hints.View = function() {}\n\nBustinBash.Hints.View.prototype = {\n render: function(hint) {\n var source = $(\"#hints-template\").html();\n var template =...
javascript
edit
0
1
mit
2a2b6a6d421855b20ee40f71695d897433eb41d2
BustinBash/BustinBash,BustinBash/bustinbash.github.io
javascripts/hints/hints.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Path = require('path');\nconst Glob = require('glob');\n\nasync function getFiles(paths, ignored) {\n const opts = {\n nodir: true,\n dot: false,\n };\n\n if (!Array.isArray(paths)) paths = ...
javascript
edit
0
3
mit
fc5bdfad980dc5c47512ba81f5ecf087db7e467b
valtlfelipe/hapi-sequelizejs,valtlfelipe/hapi-sequelizejs
lib/models.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { View, Alert } from 'react-native';\nimport { Text, ListItem, Thumbnail, Body, Left, Form, Content, Button } from 'native-base';\nimport paymentInfoScreenStyle from './paymentInfoScreen...
javascript
edit
0
1
mit
ed290020fef0bd0708b3ca2f73b847927f9a4090
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
js/components/developer/payment-info-screen/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require(\"gulp\"),\n plugins = require(\"gulp-load-plugins\")(),\n pkg = require(\"./package.json\"),\n paths = {\n src: {\n css: \"./src/main/resources/static/sass\"\n },\n d...
javascript
edit
0
1
mit
e43c291da3d14ac64a36254b8055ab4c750d790e
MTUHIDE/CoCoTemp,MTUHIDE/CoCoTemp,MTUHIDE/CoCoTemp,MTUHIDE/CoCoTemp,MTUHIDE/CoCoTemp
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (context) {\n context.log('GitHub WebHook triggered!');\n context.done(null, 'New GitHub comment: ' + context.req.body.comment.body);\n}\n```\n\nApply this change: Add more logging to GitHub sample" },...
javascript
edit
0
1
mit
5caaf488fe4d156dda95c99773e5d969a79a99de
fabiocav/azure-webjobs-sdk-script,fabiocav/azure-webjobs-sdk-script,Azure/azure-webjobs-sdk-script,Azure/azure-webjobs-sdk-script,fabiocav/azure-webjobs-sdk-script,fabiocav/azure-webjobs-sdk-script,Azure/azure-webjobs-sdk-script,Azure/azure-webjobs-sdk-script
sample/WebHook-GitHub/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Remove Position Fixed\n// @namespace name.robgant\n// @description Makes anything on the page with position fixed become static\n// @include *\n// @version 1\n// @grant GM_registerMenuC...
javascript
edit
0
2
mit
94e5e9279953a4098ef01695586c4bea155cb1a2
rgant/homedir,rgant/homedir,rgant/homedir
Library/Application-Support/Firefox/Profiles/robgant.default/gm_scripts/Remove_Position_Fixed/Remove_Position_Fixed.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar loopback = require('loopback');\nvar boot = require('loopback-boot');\n\nvar app = module.exports = loopback();\n\napp.start = function() {\n // start the web server\n return app.listen(function() {\n app.emit('started');\n ...
javascript
edit
0
3
mit
af94e5976370f46979e31e8d9254ff2bca873ad7
EdinburghCityScope/cityscope-loopback-docker,EdinburghCityScope/cityscope-loopback-docker
loopback/server/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst observer = new IntersectionObserver(entries => {\n const intersectingEntries = entries.filter(e => e.isIntersecting);\n for (const entry of intersectingEntries) {\n const previouslyActive = document.querySelector('.pa...
javascript
edit
0
3
apache-2.0
33c372227420154621ed4c187d5f9d479857b51a
WPO-Foundation/webpagetest-docs,WPO-Foundation/webpagetest-docs
src/_includes/scripts/in-page-nav.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine( [\"backbone\", \"backbone.marionette\", \"communicator\", \"medium.editor\", \"jquery\", \"erfgeoviewer.common\",\n \"tpl!template/detail.html\"],\n function( Backbone, Marionette, Communicator, MediumEditor, $, App,\n ...
javascript
edit
0
3
mit
12c7502e43e97be742540e8214a47d29761ff3df
TotalActiveMedia/erfgeoviewer,TotalActiveMedia/erfgeoviewer,TotalActiveMedia/erfgeoviewer
app/scripts/views/detail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar xhr = require('../lib/xhr');\nvar { API, ActionTypes } = require('../Constants');\nvar ServerActionCreators = require('../actions/ServerActionCreators');\n\nvar ApiUtils = {\n loadVisitors () {\n // xhr.getJSON(`${API}/visitors`...
javascript
edit
0
1
mit
8caa0c9514dfeb6b6a7f79d870aebd6bc3a1acb1
jeremymcintyre/vetted,jeremymcintyre/vetted
app/src/js/utils/ApiUtil.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.modifyWebpackConfig = function (config) {\n config.loader('jpg', {\n test: /\\.jpg$/,\n loader: 'url?limit=10000',\n })\n\n config.loader('png', {\n test: /\\.png$/,\n loader: 'url?limit=10000',\n })\n\n config....
javascript
edit
0
1
mit
c4463eb8130561cfdfeb2114d87ca1e10a1857a9
jsis/jsconf.is,jsis/jsconf.is
gatsby-node.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @author Hamza Waqas <<EMAIL>>\n * @since 2/9/14\n */\n\nvar linkedin = require('../../')('75gyccfxufrozz', 'HKwSAPg0z7oGYfh5')\ntoken = process.env.IN_TOKEN;\n\njasmine.getEnv().defaultTimeoutInterval = 20000;\n\nlinkedin = l...
javascript
edit
0
1
mit
55f010c72438fcc227fd1bd967467ca13f9ea64e
ArkeologeN/node-linkedin
specs/services/people_spec.js
rejected_duplicate
Near-duplicate of sample 78632
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'underscore';\nimport React from 'react';\nimport equip from './equip';\nimport PostsGrid from '../StaticResponsiveGrid';\nimport Post from './Post';\n\nconst Posts = ({ style, posts, added }) => {\n const postCards = _...
javascript
edit
0
1
mit
9f361436f851a6006930cb3b2cd92b39a0500ef5
RayBenefield/halo-forge,RayBenefield/halo-forge,RayBenefield/halo-forge
src/components/Posts/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n options: {\n require: ['sass-css-importer'],\n loadPath: ['<%%= bowerOpts.directory || \"bower_components\" %>'],\n bundleExec: true\n },\n debug: {\n src: '<%%= dirs.tmp %>/prepare/assets/styles/main...
javascript
edit
0
0
mit
bc980ffd82cc591a4fc1658ae12f3685cef0f7bf
half-pipe/half-pipe,half-pipe/half-pipe
lib/generators/half_pipe/templates/tasks/options/sass.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n var readme = $('.readme');\n var converter = new Showdown.converter();\n for(var i=0;i<readme.length;i++) {\n var readmeElm = $(readme[i]);\n var module = readmeElm.data('module');\n var path = 'hands-on-exe...
javascript
edit
0
2
mit
63cd6edade8821c647f1a1f488d84c9fd5186f96
nishant8BITS/video-exercises,angularjs-foundation/video-exercises,nishant8BITS/video-exercises,angularjs-foundation/video-exercises,angularjs-foundation/video-exercises,nishant8BITS/video-exercises
js/module.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction verifyStructure(template, struct) {\n for (key in template) {\n if (!keyExists(key, struct)) {\n console.log(\"Could not find expected key:\", key, \"in provided structure\");\n return false;\n ...
javascript
edit
0
10
mit
38e659a1724561be7bb9ffc1608db1b7a35d1ee4
Tactique/jswars
js/Protocol.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Author: CM\n * Dependencies: jquery.transit.js\n */\n(function($) {\n\n document.addEventListener('mousedown', function(event) {\n var $elem = $(event.target).closest('.clickFeedback');\n\n if ($elem.length) {\n var b...
javascript
edit
0
2
mit
d167d0339c25ad4c8c34646b26d7fe041421eba0
fauvel/CM,njam/CM,njam/CM,vogdb/cm,cargomedia/CM,cargomedia/CM,cargomedia/CM,vogdb/cm,njam/CM,fauvel/CM,fauvel/CM,vogdb/cm,cargomedia/CM,fauvel/CM,njam/CM,njam/CM,vogdb/cm,fauvel/CM,vogdb/cm
client-vendor/after-body/jquery.clickFeedback/jquery.clickFeedback.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { parse: parseContentType } = require('content-type');\n\nconst { findFormat } = require('../../../formats');\n\nconst { parsePreferHeader } = require('./headers');\n\n// Using `Prefer: return=minimal` request hea...
javascript
edit
0
2
apache-2.0
25872df03668db7b36488776dbfd5de630a357f8
autoserver-org/autoserver,autoserver-org/autoserver
src/protocols/handlers/http/args.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tabs = {};\n\nchrome.extension.onRequest.addListener(function(request, sender, callback) {\n var tabId = request.tabId;\n\n if (!(tabId in tabs)) {\n chrome.tabs.executeScript(tabId, { file: 'generated_accessibility.js'...
javascript
edit
0
2
apache-2.0
ccb997fa2ce75b5574b11b0631d52e8528bd5a15
modulexcite/accessibility-developer-tools,ckundo/accessibility-developer-tools,japacible/accessibility-developer-tools,Khan/accessibility-developer-tools,seksanman/accessibility-developer-tools,dylanb/accessibility-developer-tools-extension,GabrielDuque/accessibility-developer-tools,ricksbrown/accessibility-developer-t...
extension/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport * as profileActions from '../../modules/profile';\n\nclass UserPicPage extends Component {...
javascript
edit
0
2
mit
82bc5a9e7432ac3f53166c10cad96bdade178644
Rhadow/isomorphic-react-example,Rhadow/isomorphic-react-example
src/shared/containers/User-Pic-Page/User-Pic-Page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global $*/\nmodule.exports = function(page) {\n return page.evaluate(function() {\n const exception = $(\".strong.title\")[0].childNodes[1].textContent;\n const info = $(\".info.normal\")[0].textContent;\n\n ...
javascript
edit
0
3
mit
cb546b2d0e3bd800d44656fbd664a74f2176a31e
ninjaprox/github-webhooks,ninjaprox/github-webhooks
lib/scrapper/exceptionScrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Drawer from 'antd/lib/drawer';\nimport React, { useEffect } from 'react';\n\nfunction DrawerWrapper({\n title,\n visible,\n onClose,\n width,\n placement,\n children\n}) {\n useEffect(() => {\n if (visible) {\n fun...
javascript
edit
0
2
mit
e07aab5d97c4e78085f02a0b34948815e41ea23a
rickbergfalk/sqlpad,rickbergfalk/sqlpad,rickbergfalk/sqlpad
client/src/common/Drawer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log('Do something always');\n\nif (module.hot) {\n console.log('Do something, when hot reload available');\n}\n\nif (module.hot) {\n console.log('Do something, when hot reload available');\n} else {\n console.log('Do somethin...
javascript
edit
0
0
mit
2f5b9831eab4add95356322950a7e21748def386
demiazz/babel-plugin-remove-module-hot
test/fixtures/if-statement/source.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @id iitc-plugin-console@hansolo669\n// @name IITC plugin: console\n// @category Debug\n// @version 0.0.1\n// @namespace https://github.com/hansolo669/iitc-tweaks\n// @updateU...
javascript
edit
0
0
mit
e50b256c4b90bc1056e0436d1848ac4ebc1d7843
hansolo669/iitc-tweaks,hansolo669/iitc-tweaks
console.meta.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* Copyright (C) 2008 10gen Inc.\n* \n* This program is free software: you can redistribute it and/or modify\n* it under the terms of the GNU Affero General Public License, version 3,\n* as published by the Free Softwa...
javascript
edit
0
0
apache-2.0
a9267b8ff1039700abe7bb0aed88de8d5bbdd44d
babble/babble,babble/babble,babble/babble,babble/babble,babble/babble,babble/babble
src/test/ed/lang/python/date1_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-heights/package.json')\nvar moduleCss = fs.read...
javascript
edit
0
0
mit
00802027b63b94cf196f7bb1b4e54c463a0e551f
topherauyeung/portfolio,pietgeursen/pietgeursen.github.io,matyikriszta/moonlit-landing-page,topherauyeung/portfolio,fenderdigital/css-utilities,cwonrails/tachyons,fenderdigital/css-utilities,tachyons-css/tachyons,getfrank/tachyons,topherauyeung/portfolio
lib/heights.js
rejected_duplicate
Near-duplicate of sample 69330
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar feedRead = require('feed-read');\nvar readabilitySax = require('readabilitySAX');\nvar _url = require('url');\n\nfunction fetchFeed(url, cb) {\n console.log('[.] Fetching feed: ' + url);\n\n feedRead(url, function(...
javascript
edit
0
3
mit
b949257b76fb278bf5badc36ce0d4dc9b75b5c7a
cliffano/feedpaper,cliffano/feedpaper,cliffano/feedpaper
lib/fetcher.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar createEditor;\r\nvar author;\r\n\r\nfunction injectCreate(id) {\r\n $(\"#\" + id).load(\"create/html/createHTML\", function() {\r\n injectCreateEditor();\r\n\t\t\r\n\t// Generate a random number from 1 to 10000\r\n ...
javascript
edit
0
2
bsd-3-clause
036d0100f56f90d4a0d83d360ff8455006055aa2
ClemsonRSRG/bydesign,ClemsonRSRG/beginToReason,ClemsonRSRG/beginToReason,ClemsonRSRG/bydesign,ClemsonRSRG/beginToReason
create/javascript/inject.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Ionic Starter App\n\n// angular.module is a global place for creating, registering and retrieving Angular modules\n// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)\n// the 2nd par...
javascript
edit
0
4
bsd-3-clause
75c605206b2de49eaee95eeb345c14edc33bae4c
e-mission/e-mission-phone-cordova-plugins,shankari/e-mission-phone-cordova-plugins,e-mission/e-mission-phone-cordova-plugins,shankari/e-mission-phone-cordova-plugins,e-mission/e-mission-phone-cordova-plugins
eMission/www/listview-js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar gulp = require('gulp');\n\nvar embedDefs = [\n {\n componentPath: 'src/js/components/hello-world.jsx',\n webPath: 'hello-world/'\n },\n {\n componentPath: 'src/js/components/hello-world-two.jsx',\n webPath: 'hello-w...
javascript
edit
0
0
mit
72cf0eef7e9600c806ae22325bb545938fbda4c7
lucified/lucify-component-builder,lucified/lucify-component-builder,lucified/lucify-component-builder
test-projects/multi-embed-test-project/gulpfile.babel.js
rejected_duplicate
Near-duplicate of sample 85724
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar tgTypes = {};\n\ntgTypes.InlineKeyboardMarkup = function (rowWidth) {\n this['inline_keyboard'] = [[]];\n var rowWidth = (rowWidth > 8 ? 8 : rowWidth) || 8; //Currently maximum supported in one row\n //Clos...
javascript
edit
0
2
mit
6db19163c19a629edacdc90e066821c7db32cacf
TheBeastOfCaerbannog/last-fm-bot
modules/telegram/telegramTypes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Reset Password page\n */\n'use strict';\nvar $ = require('jquery');\n\nvar SetPassword = require('js/setPassword');\nvar verificationKey = window.contextVars.verification_key;\nvar resetUrl = '/api/v1/resetpassword/' + verificat...
javascript
edit
0
1
apache-2.0
28de90037a64dcb7ff9bdfb32557090c49c53e3c
cwisecarver/osf.io,acshi/osf.io,Johnetordoff/osf.io,rdhyee/osf.io,aaxelb/osf.io,TomBaxter/osf.io,HalcyonChimera/osf.io,cwisecarver/osf.io,cslzchen/osf.io,felliott/osf.io,mfraezz/osf.io,aaxelb/osf.io,emetsger/osf.io,crcresearch/osf.io,brianjgeiger/osf.io,Nesiehr/osf.io,DanielSBrown/osf.io,CenterForOpenScience/osf.io,slo...
website/static/js/pages/resetpassword-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfind();\r\nwindow.addEventListener(\"focus\", find);\r\n\r\nfunction find() {\r\n if (window == top) {\r\n // Find all the RSS link elements.\r\n var result = document.evaluate(\r\n '//link[@rel=\"alternate\"][contains(@ty...
javascript
edit
0
3
bsd-3-clause
9aeaa777c6d54e9eab162f82c72691d959695f2b
meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u...
chrome/test/data/extensions/samples/subscribe/feed_finder.js
rejected_duplicate
Near-duplicate of sample 70670
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar pager;\nvar items = 100;\nvar itemsOnPage = 10;\nvar pageCount = items/itemsOnPage;\n\nbeforeEach(function() {\n\n $('<div id=\"pager\"></div>').appendTo('body').pagination({\n items: items,\n itemsOnPage: itemsOnPa...
javascript
edit
0
2
mit
8554ba7671c41302ef47c0cfa4d1ed18b9c5f9f0
jochouen/simplePagination.js,mapgears/simplePagination.js,mapgears/simplePagination.js,drafter911/simplePagination.js,jochouen/simplePagination.js,drafter911/simplePagination.js,flaviusmatis/simplePagination.js,flaviusmatis/simplePagination.js
tests/spec/SpecHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n\tbeforeModel: function(){\n\t\tthis.store.unloadAll();\n\t},\n\tcreateFeedFromGtfsService: Ember.inject.service('create-feed-from-gtfs'),\n\t\tmodel: function() {\n\t\t...
javascript
edit
0
3
mit
bebb1b0f8e2a26b4026baa1a697aef709d6231d8
transitland/feed-registry,transitland/feed-registry
app/feeds/new/index/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Theme from 'config/theme';\nimport { StyleSheet } from 'react-native';\n\nexport default StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: Theme.background.main,\n paddingTop: 10\n },\n containerContent...
javascript
edit
0
0
mit
3a438493f2a36ceba3edb25eacfeea13da3db2fc
Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher
app/components/settings/area-detail/styles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function($){\n $('#js-discussion-header').text('foo bar');\n})(jQuery);\n\n```\n\nApply this change: Add You can't merge! logic" }, { "role": "assistant", "content": "'use strict';\n\n(function($){\n var ...
javascript
edit
0
2
mit
370676fbefb12fc56280f6e19d9a747802df7feb
togusafish/sanemat-_-do-not-merge-wip-for-github,sanemat/do-not-merge-wip-for-github,togusafish/sanemat-_-do-not-merge-wip-for-github,sanemat/do-not-merge-wip-for-github,Fryguy/do-not-merge-wip-for-github,togusafish/sanemat-_-do-not-merge-wip-for-github,Fryguy/do-not-merge-wip-for-github,sanemat/do-not-merge-wip-for-gi...
app/scripts/contentscript.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(exports) {\n \"use strict\";\n var request = require('request');\n var Sink = require('pipette').Sink;\n var unzipper = require('../process-zip');\n var fs = require('fs');\n\n exports.downloadLaravel = function(grunt, i...
javascript
edit
0
3
mit
aa34d647542b6a7a4e4f4d15f32776cb7f975eb1
TheMonkeys/monkeybones,TheMonkeys/monkeybones,TheMonkeys/monkeybones
lib/laravel/download.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport files from '@/constants/assets';\nimport fontConfig from '@/constants/bitmap-fonts';\n\nexport default class Loader extends Phaser.Scene {\n /**\n * Takes care of loading the main game assets.\n *\n * @extends Phaser.Sce...
javascript
edit
0
1
mit
68a8107c4b61aa68b0c8cf75396a780a1598c232
rblopes/phaser-3-snake-game,rblopes/phaser-3-snake-game
app/scripts/scenes/loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction ApiResponse () {\n};\n\nApiResponse.error = function (err) {\n var result = {};\n\n result = {\n ok: false\n };\n\n if (err instanceof Error) {\n result.error = err.toString();\n } else {\n result...
javascript
edit
0
2
mit
333a26104f1d0bb6e8b756d57c1e0be496b95fe2
crowi/crowi,crowi/crowi,crowi/crowi
lib/util/apiResponse.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Coordinator (consensus) {\n this._listeners = []\n this._consensus = consensus\n}\n\nCoordinator.prototype.listen = function (url, callback) { // <- listen, POST, -> get them started\n if (this._listeners.indexOf(url) ...
javascript
edit
0
2
mit
babeb444b2d2bff649d9100ffef3de89d6ca7247
demarius/reconfigure,bigeasy/reconfigure,bigeasy/reconfigure,demarius/reconfigure
reconfigure/coordinator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Firebase from 'firebase'\nimport LRU from 'lru-cache'\n\nlet api\n\nif (process.__API__) {\n api = process.__API__\n} else {\n api = process.__API__ = new Firebase('https://hacker-news.firebaseio.com/v0')\n\n // fetched item c...
javascript
edit
0
1
mit
f091824ece25a6384951e215065fa7e2de5c8e97
IRlyDontKnow/sylius-shop,keisei77/vue-hackernews-2.0,IRlyDontKnow/sylius-shop,valentinvieriu/visual-hacker-news,Ryan-PEK/tbz-mock,Ryan-PEK/tbz-mock,keisei77/vue-hackernews-2.0,valentinvieriu/visual-hacker-news
src/store/create-api-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DrawCard = require('../../drawcard.js');\n\nclass IuchiDaiyu extends DrawCard {\n setupCardAbilities(ability) {\n this.action({\n title: '+1 military for each faceup province',\n condition: () => th...
javascript
edit
0
1
mit
4098c1bda28e2fb4e22b8ce3e14a391c46f8eafb
jeremylarner/ringteki,jeremylarner/ringteki,gryffon/ringteki,jeremylarner/ringteki,gryffon/ringteki,gryffon/ringteki
server/game/cards/07-WotW/IuchiDaiyu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('npm-zepto');\nvar Cookies = require('js-cookie');\n\n$(function () {\n var cookiesElement = $('#cookies');\n if (Cookies.get('cookies_closed')) {\n cookiesElement.hide();\n } else {\n var marginElement = cookie...
javascript
edit
0
2
mit
9ab1175c02d935e38a6a3a411b40b31cf5bc9f19
megoth/icanhasweb,megoth/icanhasweb
scripts/global.webpack.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function(){\n\n\tvar $form = $('#pet-search-form'),\n\t\t\t$container = $('.homepage-box-list');\n\n\t$form.on('submit', function(e) {\n\t\te.preventDefault();\n\n\t\tvar action = $(this).attr('action'),\n\t\t\t\tparams = $(this).seri...
javascript
edit
0
1
mit
5d850a80e5d335d57bc321e827aade916c0b7f66
aviaron/touzik,aviaron/touzik
js/custom/pet-search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport axios from 'axios'\nimport { API } from '../constants'\n\nexport const LOGIN = 'LOGIN'\nexport const LOGIN_SUCCESS = 'LOGIN_SUCCESS'\nexport const LOGIN_FAILURE = 'LOGIN_FAILURE'\n\nexport const login = () => async (dispatch, sta...
javascript
edit
0
3
mit
0bf372d7da96953f07f0bcd1db3ff86f7c68612d
danielzy95/oaa-chat,danielzy95/oaa-chat
app/actions/session.js
rejected_duplicate
Near-duplicate of sample 79963
true
[ { "role": "user", "content": "Write javascript code for the following: Add fixture for getting an xform from an external server" }, { "role": "assistant", "content": "var sample_xform = require('./sample_xform');\n\nmodule.exports = function() {\n return [\n {\n request: {\n...
javascript
new_file
0
1
bsd-3-clause
8ef11ed11f09b9f4ce7d53234fdb6100c7fe8451
praekelt/go-jsbox-xform,praekelt/go-jsbox-xform
test/fixtures/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nprocess.stdout.write(\"once test\\n\");\n\nif (process.env.RUN_ONCE_OUTCOME === \"exit\")\n process.exit(123);\n\nif (process.env.RUN_ONCE_OUTCOME === \"kill\") {\n process.kill(process.pid, 'SIGKILL');\n}\n\nif (process.env.RUN_ONCE_...
javascript
edit
0
4
mit
57fe26161d7af3f85d6bf3a009d8a915cdae6690
Hansoft/meteor,mjmasn/meteor,mjmasn/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,Hansoft/meteor,mjmasn/meteor,mjmasn/meteor
tools/tests/apps/once/once.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * This file is reserved for future development\n * \n * Not ready for use\n */\n'use strict';\n\n/**\n * Module dependencies.\n */\nimport { Router } from 'express';\nimport { clone } from 'lodash';\n\nmodule.exports = class CoreG...
javascript
edit
0
1
mit
c765aab5a03cdf25bdc6ce5043aa0d8748695fc6
HiFaraz/identity-desk
src/authentication/authenticator/get.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar MP = require('mercadopago');\n\nmodule.exports = function(app) {\n app.mp = new MP(process.env.MP_ID, process.env.MP_SECRET);\n\n if(process.env.MP_SANDBOX) {\n app.mp.sandboxMode(true);\n }\n\n var at = app.mp...
javascript
edit
0
2
mit
6a5a2cb92b9c2614fd9df1e79657fa4c1191a094
rtroncoso/node-payments,rtroncoso/node-payments
server/boot/mercadopago.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { TAB_NAV__SELECT } from '../../actions'\n\nexport default (state = {}, { type, ...action }) =>\n type === 'TAB_NAV__SELECT' ? action : state\n\n```\n\nApply this change: Fix the string literal action type" }, { "role": ...
javascript
edit
0
2
mit
0c76938a634617427c715b9f36a0a14e58576b1a
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
src/client/components/TabNav/reducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { linkList } from './LinksSection.css'\n\nconst LinksSection = ({links, style}) => {\n return (\n <div>\n <h3>Liens</h3>\n {links.length ? (\n <ul className={linkList}>\n {...
javascript
edit
0
2
mit
a5a03944ab4454aa3fac8acdf8d10e2a0ad2db3e
sgmap/inspire,sgmap/inspire
src/modules/Datasets/components/LinksSection/LinksSection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into including all the files listed below.\n// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically\n// be included in the compiled file accessible f...
javascript
edit
0
0
mit
c659dbeda8895bcf852b4870b34d5bee444e5e40
alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n//= require underscore\n//= require backbone\n//= require moment\n//= require jquery_ujs\n//= require spin\n\n//= require jquery-ui-1.10.0.custom.min\n//= require date.min\n//= require select2\n\n//= require bootstra...
javascript
edit
0
0
mit
02e3bbf6941d7f39755c7ed9780074d6ec30fda1
SCPR/outpost,Ravenstine/outpost,SCPR/outpost,SCPR/outpost,bricker/outpost,Ravenstine/outpost,Ravenstine/outpost,bricker/outpost
app/assets/javascripts/outpost/outpost.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { push } from 'connected-react-router';\nimport MeetingEditor from './components/MeetingEditor';\nimport {\n createMeeting,\n inviteUsersAndGro...
javascript
edit
0
1
mit
2cdf5a49e4f9716c8f2ced2d6a2d01a53392cb0d
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
app/routes/meetings/MeetingCreateRoute.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst baseUrl = process.env.SB_SERVER ? process.env.SB_SERVER : process.webpackEnv.SB_SERVER\n\n// Returns an absolute server URL for a path, if necessary (if running in Electron). If it's not\n// necessary (in the browser), the path wi...
javascript
edit
0
0
mit
49d5a5e1cceea7e7e76a8d2968cc1922cbdc1b84
ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery
client/network/server-url.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
1
mit
7c023921755c3781dffecea0fcb886580271d5be
epicoding/epicoding,epicoding/epicoding,dunphyben/epicoding,dunphyben/epicoding
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/// <binding AfterBuild='nuget-pack' />\n\"use strict\";\n\nvar gulp = require('gulp'),\n path = require('path'),\n exec = require('child_process').exec,\n fs = require('fs');\n\nvar solutionFolder = path.resolve(__dirname, '....
javascript
edit
0
1
mit
30d78335dd4c62cb8841e790a570330c65d7a9ec
markashleybell/MAB.DotIgnore,markashleybell/MAB.DotIgnore
MAB.DotIgnore/gulpfile.js
rejected_duplicate
Near-duplicate of sample 87320
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHAL.Http.Client = function(opts) {\n this.vent = opts.vent;\n $.ajaxSetup({ headers: { 'Accept': 'application/hal+json, application/json, */*; q=0.01' } });\n};\n\nHAL.Http.Client.prototype.get = function(url) {\n var self = this;\n ...
javascript
edit
0
1
mit
20613169eeb4126c1f1d5aa7c142e1461a410fd6
FoxyCart/hal-browser,FoxyCart/hal-browser,FoxyCart/hal-browser
js/hal/http/client.js
rejected_duplicate
Near-duplicate of sample 67721
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar colors = [\"red\", \"blue\", \"magenta\", \"yellow\"]\nvar names = [\"Dan\", \"Dave\", \"Eleanor\", \"Rupert\"]\n\ncolors.push(\"green\")\nnames.push(\"Nathaniel\")\n\nhappyHorses = {}\n\nfor (i = 0; i < names.length; i++) {\n happ...
javascript
edit
0
1
mit
c1115f64d64726a1d3e0e96d24166c53b2425a85
elliedori/phase-0-tracks,elliedori/phase-0-tracks,elliedori/phase-0-tracks
js/data_structures.js
rejected_duplicate
Near-duplicate of sample 91352
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\nconst vectorlayer = require('./VectorLayer.js');\n\nexport class LeafletPathModel extends vectorlayer.LeafletVectorLayerModel {\n...
javascript
edit
0
2
mit
f2ac151d17454b20345bb42adc31143089d089d5
ellisonbg/leafletwidget,ellisonbg/leafletwidget
js/src/layers/Path.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global miqSparkleOn miqSparkleOff showErrorMessage clearMessages */\n\nvar GitImport = {\n retrieveDatastoreClickHandler: function() {\n $('.git-retrieve-datastore').click(function(event) {\n event.preventDefault();\n m...
javascript
edit
0
3
apache-2.0
dbff1b629627610e45ed00d9f7bc9728ba6205e4
hstastna/manageiq,gmcculloug/manageiq,mresti/manageiq,jvlcek/manageiq,israel-hdez/manageiq,mzazrivec/manageiq,d-m-u/manageiq,NickLaMuro/manageiq,aufi/manageiq,fbladilo/manageiq,djberg96/manageiq,ilackarms/manageiq,ilackarms/manageiq,jrafanie/manageiq,NaNi-Z/manageiq,djberg96/manageiq,NaNi-Z/manageiq,mfeifer/manageiq,ge...
app/assets/javascripts/git_import.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport Layout from 'react-toolbox/lib/layout/Layout';\nimport Panel from 'react-toolbox/lib/layout/Panel';\nimport { Settings as BackgroundSettings } from '@modules/background';\n\nclass Settin...
javascript
edit
0
1
mit
31517b7b52a62ed1127b7139cbda1a4c48d07bd8
emadalam/mesmerized,emadalam/mesmerized
src/containers/Settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport {Router} from \"react-router\";\nimport Transmit from \"react-transmit\";\nimport routes from \"views/routes\";\n\n\n/**\n * Fire-up React Router.\n */\nconst rea...
javascript
edit
0
0
bsd-3-clause
0826e837e08b9f989269a3584d84fa02251cbf71
RickWong/react-isomorphic-starterkit,ryancbarry/react-isomorphic-starterkit,joezcool02/PuzzLR,fforres/coworks_old,AnthonyWhitaker/react-isomorphic-starterkit
src/client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*eslint-disable react/no-danger*/\nimport React from \"react\";\nimport serialize from \"serialize-javascript\";\nimport path from \"path\";\nimport process from \"process\";\n\n// Make sure path ends in forward slash\nlet assetPath = ...
javascript
edit
0
2
mit
45db233a6873720d33027c2a9ce5e78260ce50bb
TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick
src/lib/server/getHead.js
rejected_duplicate
Near-duplicate of sample 86554
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncompiler.modulator.compiled = def(\n [\n ephox.bolt.module.modulator.compiled,\n compiler.tools.io\n ],\n\n function (delegate, io) {\n var create = function () {\n var instance = delegate.create.apply(null, arguments);...
javascript
edit
0
1
bsd-3-clause
3714de66c50c14a063cfb8f61b3e3b45b7c1b9e6
boltjs/bolt,boltjs/bolt,boltjs/bolt,boltjs/bolt
src/modulator/compiled.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"About Expects\", function() {\n\n // We shall contemplate truth by testing reality, via spec expectations. \n it(\"should expect true\", function() {\n expect(true).toBeTruthy(); // This should be true\n });\n\n // To...
javascript
edit
0
1
mit
0fc1c9217674f368abe4e1fdc2af65db89ca4236
LesliePajuelo/javascript-koans,LesliePajuelo/javascript-koans,LesliePajuelo/javascript-koans
koans/AboutExpects.js
rejected_duplicate
Near-duplicate of sample 71488
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar nightwatch = require('nightwatch');\nvar originalArgv = JSON.parse(process.argv[2]);\n\nnightwatch.cli(function(argv) {\n for (var key in originalArgv) {\n if (key === 'env' && originalArgv[key].inde...
javascript
edit
0
7
mit
5e5c79a72d8dd5206c8d3c738f839e8af6f5d4cf
tatsuyafw/gulp-nightwatch,StoneCypher/gulp-nightwatch
lib/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('osscdnApp', ['ngAnimate', 'ui.router', 'ngDropdowns', 'semverSort',\n 'ngClipboard', 'angular-flash.service', 'angular-flash.flash-alert-directive'])\n .config(function($stateProvider, $urlRouterPr...
javascript
edit
0
1
mit
c3c34ad993ce0e480d8ef5f9a4750eebe5847920
MaxCDN/osscdn,Tionx/osscdn,Tionx/osscdn,MaxCDN/osscdn
frontend/app/scripts/app.js
rejected_duplicate
Near-duplicate of sample 81112
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dataLoaderRunner = [\n 'dataLoader',\n function (dataLoader) {\n return dataLoader();\n }\n];\n\nangular.module('${appName}', ['ngRoute'])\n.config(function ($routeProvider, $locationProvider) {\n $routeProvider\n .when('/tw...
javascript
edit
0
1
mit
0e90e4d1ef6ff07839a4a2d0a3547d45c19b1c43
JonAbrams/synth,leeric92/synth,leeric92/synth,JonAbrams/synth
templates/front/angular/js/front-app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n /**\n * Browsertime (http://www.browsertime.com)\n * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog\n * and other contributors\n * Released under the Apache 2.0 License\n */\n\n// someway the get entries ...
javascript
edit
0
3
apache-2.0
8b5f0684bd7dfffc40630782cff50eba79391945
tobli/browsertime,sitespeedio/browsertime,sitespeedio/browsertime,sitespeedio/browsertime,sitespeedio/browsertime
browserscripts/userTimings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n parser: \"babel-eslint\",\n env: {\n es6: true,\n node: true,\n },\n extends: \"eslint:recommended\",\n parserOptions: {\n sourceType: \"module\",\n ecmaFeatures: {\n experimentalObjectRestSpre...
javascript
edit
0
0
mit
2782adc92f11af17e62eca0ee3f6df2f88a9f0c8
AsaAyers/js-hyperclick,AsaAyers/js-hyperclick
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react'\nimport { Link } from 'react-router'\n\nclass Navbar extends PureComponent {\n render() {\n return(\n <header className='page-header'>\n <span><Link to='/'>SlimPoll</Link></sp...
javascript
edit
0
2
mit
db6f71d87d82ecb36f3dcf4f8ff4734961a6f97e
SanderSijbrandij/slimpoll,SanderSijbrandij/slimpoll
client/components/interface/Navbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: [\n 'eslint-config-xo-space/esnext',\n 'eslint-config-prettier',\n 'eslint-config-prettier/standard',\n ],\n env: {\n node: true,\n },\n rules: {\n 'comma-dangle': [\n 'error',\n ...
javascript
edit
0
0
mit
b7ad749b3a50aa0188efaff9ede44b91a347dac8
khirayama/micro-emitter,khirayama/micro-emitter,khirayama/MicroEmitter
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Node = require('./nodeModel.js'),\n handleError = require('../../util.js').handleError,\n handleQuery = require('../queryHandler.js');\n\nmodule.exports = {\n\n createNode : function (req, res, next) {\n var newNode...
javascript
edit
0
3
mit
b8f41f761328ed42bf02019b73b98870cb003775
sreimer15/RoadMapToAnything,cyhtan/RoadMapToAnything,RoadMapToAnything/RoadMapToAnything,cyhtan/RoadMapToAnything,delventhalz/RoadMapToAnything,GMeyr/RoadMapToAnything,delventhalz/RoadMapToAnything,RoadMapToAnything/RoadMapToAnything,sreimer15/RoadMapToAnything,GMeyr/RoadMapToAnything
server/api/nodes/nodeController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport { TextEditor } from 'atom';\n\nexport default class EditorInserter {\n setText(text) {\n this.insertionText = text;\n }\n\n performInsertion() {\n if (!this.insertionText) {\n con...
javascript
edit
0
3
mit
3eb418792854093555fd535ef14b5115b007ddcd
Coteh/syntaxdb-atom-plugin
lib/EditorInserter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar dataviews = require('./');\n\nmodule.exports = class DataviewFactory {\n static get dataviews() {\n return Object.keys(dataviews).reduce((allDataviews, dataviewClassName) => {\n allDataviews[dataviewClassName.to...
javascript
edit
0
2
bsd-3-clause
d5d9044686a1ee5eaa01ced5e013029f5b61d63f
CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb
lib/cartodb/models/dataview/factory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// 2016-10-21 V 1.0.0\n// - Initial release\n\n//\n// i18next configuration\n//\nvar i18nextOptions =\n{\n\t// evtl. use language-detector https://github.com/i18next/i18next-browser-languageDetector\n lng: navigator.language || nav...
javascript
edit
0
3
bsd-3-clause
b6266d3dd099c42d27265abaf46ebe40df0b676c
cyosp/CYTHS,cyosp/CYTHS,cyosp/CYTHS,cyosp/CYTHS,cyosp/CYTHS
software/var/www/html/cyths/js/cyths-i18n.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport findUsedIdentifiers from '../findUsedIdentifiers';\nimport parse from '../parse';\n\nit('finds used variables', () => {\n expect(\n findUsedIdentifiers(\n parse(\n `\n api.something();\n const foo = 'foo';\n...
javascript
edit
0
1
mit
9429f118db1da076c372fec4e935ef3050bc8079
trotzig/import-js,trotzig/import-js,trotzig/import-js,Galooshi/import-js
lib/__tests__/findUsedIdentifiers-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Expectation = Backbone.Model.extend({\n\tinitialize: function(){\n \n \t},\n\n \tdefaults: {\n\t\tcomplete: false,\n \t},\n\n \tvalidate: function(attributes){\n\t if(attributes.title === undefined){\n\t return \"Re...
javascript
edit
0
2
mit
d4651c7889b0aaf5b699e459dfaf06352acb0e9e
Zinston/projectexpect,Zinston/projectexpect,Zinston/projectexpect
js/models/Expectation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('./jquery');\nvar jQueryVersion = require('./lib.js');\n\n$(function() {\n console.log(jQueryVersion());\n})();\n\n```\n\nApply this change: Update require to use npm jquery not a local version" }, { "role": "as...
javascript
edit
0
1
isc
1e8d4fb77ba001dda3d3dad9f476a026a54afe01
bitfyre/contacts,bitfyre/boilerplate,bitfyre/drinkmachine
src/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Rules in this file are ultimately random choices.\n *\n * No human should have to type on a keyboard to comply.\n * If it can't be --fix'ed, it doesn't belong in here.\n */\nmodule.exports = {\n 'prettier/prett...
javascript
edit
0
0
bsd-3-clause
f9cdaafa737eee65a9743b40bdc1dfd4f5859ab4
groupon/javascript
lib/rules/opinions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction (newDoc, oldDoc, userCtx) {\n function forbidden(message) { \n throw({forbidden : message});\n };\n \n function unauthorized(message) {\n throw({unauthorized : message});\n };\n\n if (userCtx.roles.indexOf('hf_ap...
javascript
edit
0
5
apache-2.0
fd684ddab77fc5cef3d8f1b688662e8cfce695cb
shmakes/hf-app-review,shmakes/hf-app-review
validate_doc_update.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction searchTickets (args, callback) {\n var seneca = this;\n var ticketsEntity = seneca.make$('cd/tickets');\n var query = args.query || {};\n if (!query.limit$) query.limit$ = 'NULL';\n ticketsEntity.list$(que...
javascript
edit
0
3
mit
9a679fb9bed5c813c33886572b81bc1e4bcd2f6a
CoderDojo/cp-events-service,CoderDojo/cp-events-service
lib/search-tickets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {PureComponent, PropTypes} from 'react'\nimport {highlightElement} from 'prismjs'\nimport 'prismjs/themes/prism.css'\nimport 'prismjs/components/prism-css'\nimport 'prismjs/components/prism-javascript'\nimport 'prismjs/com...
javascript
edit
0
2
mit
23acaf0ad26a220519bea094337b58ce067d5219
cssinjs/cssinjs
src/components/HighlightedMarkdown/Code.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nmodule.exports = {\n entry: [\n './src/component/index'\n ],\n output: {\n path: path.join(__dirname, 'dist'),\n filename: 'focus-file.js',\n publicPath: '/dist/',\n ...
javascript
edit
0
0
mit
8bf06d0e91954e646d76cc89e40421d8be9354f0
KleeGroup/focus-file,pierr/focus-file,pierr/focus-file,KleeGroup/focus-file
focus-file-webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"Dagens bedrift\": \"PRESENTATIONS\",\n \"Fest og moro\": \"NIGHTLIFE\",\n \"Konsert\": \"MUSIC\",\n \"Kurs og events\": \"PRESENTATIONS\",\n \"Revy og teater\": \"PERFORMANCES\",\n \"Foredrag\": ...
javascript
edit
0
0
apache-2.0
280796f433e3aca870b6a66521ed7021fe441236
Studentmediene/Barteguiden,Studentmediene/Barteguiden
server/import/import_scripts/category_mapping.js
rejected_duplicate
Near-duplicate of sample 76793
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\nvar webpackStripLoader = require('strip-loader');\n\nmodule.exports = {\n\tplugins: [\n\t\tnew webpack.DefinePlugin({\n\t\t\t'process.env': {\n\t\t\t\t'NODE_ENV': JSON.stri...
javascript
edit
0
0
mit
71d3d909d1c2b3192cb6b44735aef1fd89c5e00b
PathwayCommons/pathways-search,PathwayCommons/pathways-search
webpack.prod.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('./config');\nvar should = require('should');\nvar nock = require('nock');\nvar up = require('../index')(config);\n\nvar baseApi = nock('https://jawbone.com:443');\n\ndescribe('up', function(){\n describe('.moves',...
javascript
edit
0
1
mit
c173cc7a8bd057b9ebbbbd39cb4321bfce1a5fe4
ryanseys/node-jawbone-up,banaee/node-jawbone-up
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { bodyLoader } from 'src/util/loader'\nimport { remoteFunction } from 'src/util/webextensionRPC'\nimport * as rendering from './rendering'\nimport * as interactions from './interactions'\n\nexport async function init() {\n awa...
javascript
edit
0
2
mit
931460365417ffc356984622d32d34caa04812e4
WorldBrain/WebMemex,WorldBrain/WebMemex
src/direct-linking/content_script/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// https://leetcode.com/problems/length-of-last-word/#/description\n\n/**\n * @param {string} s\n * @return {number}\n */\nvar lengthOfLastWord = function (s) {\n if (!s) return 0;\n s = s.trimRight();\n var arr = s.split(' ');\n re...
javascript
edit
0
8
mit
5ab848471a67b8821730229f51ed16a929d7d99b
lon-yang/leetcode,lon-yang/leetcode
058_LengthOfLastWord.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.addEventListener(\"DOMContentLoaded\", () => {\n document.getElementById(\"leftToggler\").onclick = function() {\n document.getElementById(\"leftColumn\").classList.toggle(\"open\");\n }\n hljs.registerLanguage('s...
javascript
edit
0
2
apache-2.0
b0a80a810dfc8381be3d1290e61283e8461ca2ac
sjrd/dotty,sjrd/dotty,sjrd/dotty,dotty-staging/dotty,sjrd/dotty,sjrd/dotty,lampepfl/dotty,dotty-staging/dotty,lampepfl/dotty,dotty-staging/dotty,dotty-staging/dotty,lampepfl/dotty,lampepfl/dotty,lampepfl/dotty,dotty-staging/dotty
src/main/resources/dotty_res/scripts/ux.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('My App', function() {\n it('should automatically redirect to /home when location hash/fragment is empty', function() {\n browser.get('index.html');\n expect(browser.getLocationAbsUrl()).toMatch(\"/home\...
javascript
edit
0
1
mit
902a1d9946864c11da8e982d626e4d6393e6fb21
AitorRodriguez990/angular-testing-examples,AitorRodriguez990/angular-testing-examples
e2e-tests/scenarios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function checkEdges(tooltipEl) {\n const tooltipBounds = tooltipEl.getBoundingClientRect();\n const bodyBounds = document.body.getBoundingClientRect();\n\n if (tooltipBounds.left === 0) {\n tooltipEl.style...
javascript
edit
0
5
mit
f38ab411a600468a870a69eec657216091e8a046
npms-io/npms-www,npms-io/npms-www
src/shared/components/tooltip/util/checkEdges.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$().ready(() => {\n loadContentSection().then(() =>{ \n $('body').removeClass('loading');\n });\n});\n\n$(\"body\").on('click', '.keyword', function() {\n $(this).addClass(\"active\");\n $(\".base\").hide(200);\n $(\"#real-body\...
javascript
edit
0
2
apache-2.0
0d4919d22140a13374e57db8d83dd218b4db8958
googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020
src/main/webapp/scripts/results.js
rejected_duplicate
Near-duplicate of sample 77297
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React from 'react';\nimport ProfileImage from 'components/atoms/profile_image/ProfileImage';\nimport Username from 'components/atoms/username/Username';\nimport Badges from 'components/molecules/badges/Badges';\n...
javascript
edit
0
2
mit
8c6348d276301e549e40025210b35d3daff49ab3
cassioscabral/rateissuesfront,DominikePessoa/rateissuesfront,DominikePessoa/rateissuesfront,cassioscabral/rateissuesfront
src/components/molecules/user_info/UserInfo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global hljs */\n(function() {\n 'use strict';\n var cells = document.querySelectorAll('.diff tbody td');\n for (var i = 0, len = cells.length; i < len; i++) {\n hljs.highlightBlock(cells[i]);\n }\n})();\n\n```\n\n...
javascript
edit
0
2
mit
3a82f7aca54c37a28158a5bb7f78459bc69e7f0e
takenspc/diffofhtmls,takenspc/diffofhtmls,takenspc/diffofhtmls
public/script/init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n\n // Personally, hash is nicer for test work. The browser knows not\n ...
javascript
edit
0
4
mit
20cfac0e9414eee5ac907c16d63241b7297b21a7
ember-animation/liquid-fire-velocity,byelipk/liquid-fire,jrjohnson/liquid-fire,ember-animation/liquid-fire,topaxi/liquid-fire,monegraph/liquid-fire,givanse/liquid-fire,totallymike/liquid-fire,chadhietala/liquid-fire,chadhietala/liquid-fire,givanse/liquid-fire,totallymike/liquid-fire,jrjohnson/liquid-fire,knownasilya/li...
tests/dummy/config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport sinon from 'sinon';\nimport chai from 'chai';\nconst expect = chai.expect;\nimport * as fetch from '../../../src/functions/fetch.js';\nimport checkWordpress from '../../../src/wordpress/wordpress';\n\ndescribe('wordpress', functi...
javascript
edit
0
2
mit
21043bdce769c06b08b9e9b1054eafebcb842351
juffalow/pentest-tool-lite,juffalow/pentest-tool-lite
test/wordpress/wordpress/index.js
accepted
null
true