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 gulp = require('gulp'),\n csslint = require('gulp-csslint'),\n jshint = require('gulp-jshint'),\n rename = require('gulp-rename'),\n uglify = require('gulp-uglify'),\n aut...
javascript
edit
0
1
mit
4af7e62397088ab5e49f022f1f60f2347249920a
Lochlan/imagelightbox,Lochlan/imagelightbox
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Harmonia = require('harmonia');\n\n// Create a new server that listens to a given queue\nvar harmonia = new Harmonia.Server('rpc');\n\nharmonia.route({\n method : 'math.add',\n module : './math/add.js'\n});\n\nhar...
javascript
edit
0
1
mit
db1c42b80ee59bc6ab4b9757c37172a0dab55d0e
linearregression/harmonia,colonyamerican/harmonia
examples/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Update crel to latest version from github.com/KoryNunn/crel" }, { "role": "assistant", "content": "(e=>{const t=\"function\",n=\"isNode\",r=document,o=(e,t)=>typeof e===t,i=(e,t)=>{null!==t&&(Array.isArray(t)?t.map(t=>i(e,t))...
javascript
new_file
0
10
mit
670474a38b8114afd4e990ad3689f50e868ea356
xSke/Pxls,xSke/Pxls,xSke/Pxls,xSke/Pxls
resources/public/crel.min.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n \"use strict\";\n var cookieDomain = (document.domain === 'www.digitalmarketplace.service.gov.uk') ? '.digitalmarketplace.service.gov.uk' : document.domain;\n var property = (document.domain === 'www.digitalmarketplac...
javascript
edit
0
1
mit
5ab7f8deedf44a29dffa468ffdbed7a406b46458
AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,AusDTO/dto-digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/di...
app/assets/javascripts/analytics/_init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Link from 'gatsby-link'\nimport './index.scss'\n\nexport default ({ data }) => {\n return (\n <section>\n <div className=\"container\">\n <header className=\"major\">\n <h2>Blog...
javascript
edit
0
1
mit
3bbb177681f8c05443f001721ebd50dfd205c4f5
danielbh/danielhollcraft.com,danielbh/danielhollcraft.com,danielbh/danielhollcraft.com-gatsbyjs,danielbh/danielhollcraft.com
ui/src/pages/blog/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar react = require('gulp-react');\nvar git = require('gulp-git');\nvar fs = require('fs');\nvar shell = require('gulp-shell')\n\ngulp.task('brew', function () {\n if (fs.existsSync('homebrew')) {\n git....
javascript
edit
0
2
mit
61ab0adcfc8750dda6f5aae5552cb5c282fc5282
zharley/ferment,zharley/ferment,zharley/ferment,zharley/ferment
gulpfile.js
rejected_duplicate
Near-duplicate of sample 96799
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const formatBytes = (bytes) => {\n if (bytes === 0) {\n return '0 Bytes';\n }\n\n if (!bytes) {\n return null;\n }\n\n const k = 1000;\n const dm = 2;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB...
javascript
edit
0
9
mit
c22367e21f4f5282a8079731fd1f30cf49432ae9
nooproblem/influxdb,nooproblem/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdata...
ui/src/utils/formatting.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst MAIN_API_URL = 'https://api.etherscan.io';\nconst OTHER_API_URL_MAP = {\n ropsten: 'https://api-ropsten.etherscan.io',\n kovan: 'https://api-kovan.etherscan.io',\n rinkeby: 'https://api-rinkeby.etherscan.io',\n homestead: 'htt...
javascript
edit
0
3
mit
c13d87bfb90bd3a7a1951305795c586be6afde98
sebs/etherscan-api
lib/pick-chain-url.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass StateSnapshot {\n constructor({ store, initialState, meta, currentState = initialState }) {\n this.store = store;\n this.initialState = { ...initialState };\n this.items = { ...currentState };\n this.meta = meta;\n ...
javascript
edit
0
2
mit
0d5e7868c1cc1354748af529aca5727ffa9472c4
jay-depot/cloverleaf
lib/state-snapshot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine({\n root: {\n SortBy: \"Ordenar por:\",\n Descending: \"Descendente\",\n Name: \"Nombre\",\n DateAdded: \"Fecha de entrada\",\n Price: \"Precio\",\n Actions: \"Acciones\",\n Add...
javascript
edit
0
0
isc
0a0e0ce83fba432df1a108925933a2a1e9a8c2f7
rishson/dojoEnterpriseApp,rishson/dojoEnterpriseApp
src/js/rishson/widget/example/nls/es/Wishlist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n \"use strict\";\n\n // animate moving between anchor links\n smoothScroll.init({\n selector: \"a\",\n speed: 500,\n easing: \"easeInOutCubic\"\n });\n\n // better external SVG spiresheet support\n svg4ever...
javascript
edit
0
1
mit
55effc39da807b77262aca98a8587db369ca19e5
Pinjasaur/portfolio,Pinjasaur/portfolio
src/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport db from '../db';\nimport { createAction } from 'redux-actions';\n\nexport const USER_LOGIN = 'USER_LOGIN';\nexport const USER_LOGIN_SUCCESS = 'USER_LOGIN_SUCCESS';\nexport const USER_SIGNUP = 'USER_SIGNUP';\nexport const USER_SIG...
javascript
edit
0
1
mit
8513c39e48ed6bd6ff28b21c898f39d96a9a8259
andrew-filonenko/habit-tracker,andrew-filonenko/habit-tracker
src/actions/user-actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"fileUploader\", [\"$window\", function($window) {\n\treturn {\n\t\tcompile: function(tplElm, tplAttr) {\n\t\t\tvar mulitpleStr = tplAttr.multiple === \"true\" ? \"multiple\" ...
javascript
edit
0
4
mit
c042d3fcdf6f38fc2a6562d4d4c1b17bcc2da269
zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io
client/js/directives/file-uploader-directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Levels(prng, paletteRange, paletteBuilder) {\n this.prng = prng;\n this.paletteRange = paletteRange;\n this.paletteBuilder = paletteBuilder;\n}\n\nLevels.prototype.get = function(level) {\n if( typeof this.prng.seed ...
javascript
edit
0
2
mit
a6bc03b09d04df24b049fa9f3e5c257b82040078
mnito/factors-game,mnito/factors-game
src/Model/Game/Levels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (h) {\n 'use strict';\n\n function HelpPage(chromeTabs, extensionURL) {\n this.showHelpForError = function (tab, error) {\n if (error instanceof h.LocalFileError) {\n return this.showLocalFileHelpPage(tab);\n ...
javascript
edit
0
3
bsd-2-clause
fb44adf35090e3e03fa80cdc0cf585b611d458e5
hypothesis/browser-extension,hypothesis/browser-extension,project-star/browser-extension,project-star/browser-extension,hypothesis/browser-extension,project-star/browser-extension,hypothesis/browser-extension
src/chrome/lib/help-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { manualChange } from '../redux/actions';\n\n/**\n * Dispatches a manualChange action once on app start,\n * and whenever a popstate navigation event occurs.\n */\nfunction startListener(history, store) {\n store.dispatch(manual...
javascript
edit
0
2
mit
ab3f0d14c998384b161c966b114c4793e1cb2795
mksarge/redux-json-router
src/history/startListener.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport inlineFieldMixin from 'mixins/inlineFieldMixin';\nimport imagesLoaded from 'imagesloaded';\nimport { eventBus } from 'plugins/eventbus';\n\nexport default {\n\n\tprops: [\n\t\t'type',\n\t\t'index',\n\t\t'fields',\n\t\t'other'\n\t...
javascript
edit
0
2
mit
03ea14a48ad3d8f6a1d1081295113e2ba8289727
unikent/astro,unikent/astro,unikent/astro,unikent/astro,unikent/astro
resources/assets/js/components/BaseBlock.js
rejected_duplicate
Near-duplicate of sample 102764
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Redirect } from 'react-router-dom';\nimport TodoItem from './TodoItem';\nimport TodoTextInput from './TodoTextInput';\n\nimport './TaskList.css';\n\nexport default function (props) {\n if (!props....
javascript
edit
0
3
mit
2f5135c85d627805e587efbcfdc91aa0fab9afca
reimagined/resolve,reimagined/resolve
examples/todo/client/src/components/TaskList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window, $){\n window.toggleDisplayWithCheckedInput = function(args){\n var $input = args.$input,\n $element = args.$element,\n showElement = args.mode === 'show';\n\n var toggleOnChange = function(){\n co...
javascript
edit
0
2
mit
ee2c4f35fdcf4784b08cc341a0aff77d2f33883e
alphagov/manuals-publisher,alphagov/manuals-publisher,alphagov/manuals-publisher
app/assets/javascripts/toggle_display_with_checked_input.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Component.extend({\n attributeBindings: ['dialog-open'],\n didInsertElement () {\n var dialog = document.getElementById(this.$().attr('id'));\n var show...
javascript
edit
0
2
mit
f0ccc846a8e1849e3fb37fbdded2de74ce76e1ae
pe1te3son/spendings-tracker,pe1te3son/spendings-tracker
app/components/add-expense.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {DataTypes as t} from \"sequelize\"\n\nimport format from \"date-fns/format\"\n\nimport createSlug from \"lib/helper/util/createSlug\"\n\n/**\n * @const schema\n *\n * @type {import(\"sequelize\").ModelAttributes}\n */\nconst sch...
javascript
edit
0
0
mit
7b6debe0ab1c1b4beb349ec963cb7ff026a8e48a
octet-stream/eri,octet-stream/eri
server/model/Post/schema.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * Abstration layer for various RESTful api calls\n */\n\nvar apihandler = angular.module('apihandler', []);\n\napihandler.factory('apiFactory', function ($http, configFactory) {\n // Private API\n var url = c...
javascript
edit
0
1
mit
cd8a3d11287f247fe3898593f80bf1bdf3840d4f
learning-layers/sardroid,learning-layers/sardroid,learning-layers/sardroid
app/js/services/apihandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\n/* @flow */\n\nimport type {Provider, Declaration} from './types'\n\nexport function validateDeclarations(declarations: Array<Declaration>) {\n\n}\n\nexport function validateProvider(provider: Provider) {\n\n}\n\n```\n\nA...
javascript
edit
null
null
mit
af0958d59bc9d28fffcefc95054afc1c5fadd177
steelbrain/declarations
lib/validate.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Namespace: lb.base\n * Adapter Modules for Base JavaScript Library\n *\n * Authors:\n * o Eric Bréchemier <<EMAIL>>\n * o Marc Delhommeau <<EMAIL>>\n *\n * Copyright:\n * Eric Bréchemier (c) 2011, Some Rights Reserved\n * Leg...
javascript
edit
0
2
bsd-3-clause
a5468c3b575dfe2d04e03d72bcec34b8e353e9b7
eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp,eric-brechemier/lb_js_scalableApp
src/lb/lb.base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n // Save the other cropper\n Cropper.other = $.fn.cropper;\n\n // Register as jQuery plugin\n $.fn.cropper = function (options) {\n var args = toArray(arguments, 1),\n result;\n\n this.each(function () {\n var $thi...
javascript
edit
0
5
mit
47382b8696201a939ce1394586701d1715e28ffa
Paulyoufu/cropper,samudiogo/cropper,shinygang/cropper,99designs/cropper,liuyan5258/cropper,ashokpant/cropper,iacdingping/cropper,OddPrints/cropper,mesnilgr/cropper,FuYung/cropper,tekinaggul/cropper,bercanozcan/cropper,tekinaggul/cropper,websdotcom/cropper,liuyan5258/cropper,iacdingping/cropper,VANITAX/cropper,itxd/crop...
src/js/plugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n\n 'use strict';\n\n moj.Modules.SubmitOnce = {\n el: '.js-SubmitOnce',\n\n init: function () {\n this.cacheEls();\n this.bindEvents();\n this.options = {\n alt: this.$el.data('alt') || 'Ple...
javascript
edit
0
3
mit
97fc9bbf3ddeeec0d3f3fbae0a08346e6fad0987
ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public,ministryofjustice/prison-visits-public
app/assets/javascripts/modules/moj.submit-once.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Relay from 'react-relay';\n\nimport SettingsMenu from './SettingsMenu';\n\nconst SettingsSection = (props) =>\n <div className=\"twbs-container\">\n <div className=\"clearfix mxn2\">\n <div cl...
javascript
edit
0
1
mit
df039b068a097624e99755199ff86d3d4c6365be
buildkite/frontend,buildkite/frontend,fotinakis/buildkite-frontend,fotinakis/buildkite-frontend
app/components/organization/SettingsSection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport interceptor from \"express-interceptor\";\nimport SVGO from \"svgo\";\n\n/**\n * SVGO middleware: optimize any SVG response.\n */\nexport function svgo(options) {\n const svgo = new SVGO(options);\n return interceptor((req, res...
javascript
edit
0
2
mit
978425c95077c11682d9f01a378f0e2fd7513f63
exogen/badge-matrix,exogen/badge-matrix,exogen/badge-matrix
src/middleware.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction addRandomQuote() {\n const quotes = [\n `Now. Say my name. Heisenberg. You're god damn right`,\n 'I am the danger.',\n 'You see, but you do not observe.',\n 'There’s a woman lying dead. Perfectly sound analysis but...
javascript
edit
0
3
apache-2.0
98bdcd0c819a5845a9bd02a636f46a96bca851fb
googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020,googleinterns/step251-2020
andreystar/portfolio/src/main/webapp/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional...
javascript
edit
null
null
mit
ab13f32c1c42d72982ee78bb0d51111cca664044
graphql/graphql-js,tgriesser/graphql-js,baer/graphql-js,graphql/graphql-js,enaqx/graphql-js,sogko/graphql-js,baer/graphql-js,jjergus/graphql-js,josephsavona/graphql-js,jjergus/graphql-js,sogko/graphql-js,gabelevi/graphql-js,josephsavona/graphql-js,gabelevi/graphql-js,josephsavona/graphql-js,graphql/graphql-js,sogko/gra...
src/validation/rules/ArgumentsOfCorrectType.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport StyleConstants from './StyleConstants';\n\nexport default {\n input: {\n borderColor: StyleConstants.colorBorder,\n borderWidth: 1,\n borderRadius: 5,\n borderStyle: 'solid',\n paddingTop: 8,\n paddingRight: 8,...
javascript
edit
0
0
mit
e63728b2392051b0d8d5535ae76ccb85c94ea052
exponentjs/xde,exponentjs/xde
src/ui/Styles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar AV = require('avoscloud-sdk');\nvar crypto = require('crypto');\n\nAV._config.disableCurrentUser = true;\nAV.Promise.setPromisesAPlusCompliant(true);\n\n// 调用 API 时增加 prod 信息\nif (!AV._old_request) {\n AV._old_reques...
javascript
edit
0
1
mit
c04bab344d7aa2eb6c25e0bcb5492b1405657f07
sdjcw/leanengine-node-sdk,leancloud/leanengine-node-sdk,aisk/leanengine-node-sdk
lib/av-extra.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass Dom {\n constructor(el) {\n this.el = el;\n this.style = window.getComputedStyle(el, '');\n }\n\n set text(val) {\n if ('textContent' in this.el) {\n this.el.textContent = val;\n } else if ('innerText' in this....
javascript
edit
0
3
mit
ebf4e082acced0793e56506afd6ab747b3dc382d
ktsn/truncator,ktsn/truncator
src/utils/dom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { version } from 'root/package.json';\nimport RaisedButton from 'material-ui/lib/raised-button';\nimport FlatButton from 'material-ui/lib/flat-button';\nimport Dialog from 'material-ui/lib/dialog';\n\n...
javascript
edit
0
1
cc0-1.0
9762b789a4e94d2f4ab7fbb553f1a3d08dcd07df
ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer
src/App/Body/AboutButton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gue = require('./index.js');\n\ngue.task('default', ['lint','test']);\n\ngue.task('test', () => {\n return gue.shell('nyc mocha test/**/*.test.js');\n});\n\ngue.task('lint', () => {\n return gue.shell('jscs index.js bin/gue.js l...
javascript
edit
0
1
mit
6c8951dd0021a5d2d740627541fb78635d29d237
skarfacegc/Gue,skarfacegc/Gue
guefile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Listen for keydown events on the main document\n// Note: Will not trigger if focused on an element within an iframe\ndocument.addEventListener('keydown', keyListener, false);\n\n// Keyboard listener callback\nfunction keyListener(e) ...
javascript
edit
null
null
mit
8363401bc728d83bddc2ec8839ea0d432a26e091
DeathIsUnknown/back-to-back
listener.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'aramk:file-upload',\n summary: 'Simple file uploads.',\n version: '0.4.0'\n});\n\nNpm.depends({\n 'mime': '1.3.4'\n})\n\nPackage.onUse(function(api) {\n api.versionsFrom('METEOR@0.9.0');\n api.use([\n ...
javascript
edit
0
1
mit
f59aaaa5b309248dbc3460c262af66ea99915f66
aramk/meteor-file-upload,aramk/meteor-file-upload
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = class XorShift {\n _hex2seed (size, hex) {\n const arr = new Array(size)\n for (let i = 0; i < size; ++i) {\n arr[i] = parseInt(hex.slice(i * 8, (i + 1) * 8), 16) >>> 0\n }\n return arr\n }\n\n rando...
javascript
edit
0
2
mit
629ae1c460dc08f7f00b9e87a19e6f97f36c5aa1
fanatid/xorshift.js,fanatid/xorshift.js
lib/xorshift.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create video list component and load in the video list item component." }, { "role": "assistant", "content": "import React from 'react';\nimport VideoListItem from './video_list_item';\n\nconst VideoList = (props) => {\n\tcon...
javascript
new_file
0
1
mit
244520b237d4d35c0052bf5e5ea18be746b0c535
JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial
src/components/video_list.js
rejected_duplicate
Near-duplicate of sample 72017
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar root = path.dirname(__filename);\nrequire.paths.unshift(path.join(root, '../build/default'));\nrequire.paths.unshift(path.join(root, '../lib'));\n\nvar sys = require('sys');\nvar Buffer = require('buffer...
javascript
edit
0
3
apache-2.0
0ea6a328654399c5b8f21508913f362fbcb99e06
pquerna/node-archive,pquerna/node-archive
tests/tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\r\n window.stop();\r\n\r\n const IS_LOCAL = false,\r\n URL_REMOTE = \"https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js\",\r\n URL_OUT = IS_LOCAL ? chrome.extension.getURL('OUT/OUT.js') : URL_...
javascript
edit
0
2
mit
3be7abc361260753be74490fa4fd0ec2c99caff0
ultratype/UltraTypeBot,ultratype/UltraTypeBot,ultratype/UltraTypeBot
injectChrome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar page = require('webpage').create()\n\npage.onConsoleMessage = function(arg) {\n var parts = arg.split('`')\n var msg = parts[1] || '[LOG] ' + arg\n\n console.log(color(msg, parts[0]))\n\n if (msg === 'END') {\n var result = p...
javascript
edit
0
4
mit
5e9343acc0eb6b9834afe558d8df7d1606930f28
wenber/seajs,tonny-zhang/seajs,zaoli/seajs,LzhElite/seajs,lee-my/seajs,AlvinWei1024/seajs,lianggaolin/seajs,seajs/seajs,moccen/seajs,yern/seajs,lovelykobe/seajs,jishichang/seajs,AlvinWei1024/seajs,judastree/seajs,121595113/seajs,ysxlinux/seajs,zaoli/seajs,baiduoduo/seajs,JeffLi1993/seajs,eleanors/SeaJS,tonny-zhang/seaj...
tools/phantom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar EventBus = require('../lib/messages/EventBus');\n\ndescribe('Event Bus', function () {\n\n it(\"should publish an event\", function () {\n var eventBus = new EventBus(),\n subscriber = {\n ...
javascript
edit
0
1
mit
a91b6aa9cb9d3d37fccdf90610dbf692b0d86cdd
mtfranchetto/bunnycry
test/EventBus.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('./config')\n\nmodule.exports = {\n web: {\n client: 'mssql',\n connection: {\n host: config.DATABASE_SERVER,\n user: config.WEB_APP_DATABASE_USERNAME,\n password: config.WEB_APP_DATABASE_PAS...
javascript
edit
0
0
mit
cd3025a56d13aff29e009f88a601b500199687cb
ministryofjustice/wmt-web,ministryofjustice/wmt-web
knexfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default (initialData = {}) => {\n let data = initialData\n\n return {\n reset: () => (data = initialData),\n getData: () => data,\n persist: d => (data = d),\n restore: jest.fn(() => data)\n }\n}\n\n```\n\nApply th...
javascript
edit
0
1
mit
4332487bb2ae15a36252d4cf59af7077bb7aebc7
jerelmiller/redux-simple-auth
packages/redux-simple-auth/test/utils/testStorage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Update with your config settings.\n\nmodule.exports = {\n\n development: {\n client: 'sqlite3',\n connection: {\n filename: './database.sqlite3',\n },\n seeds: {\n directory: './seeds/knex',\n },\n useNul...
javascript
edit
0
0
mit
805c32a765292c8f76d9c07ae2c426cc2748fd37
andymeneely/dev-fortress-server
knexfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst $ = require('jquery');\nconst board = require('./board');\nconst Piece = require('./piece');\n\nfunction Game(players, board) {\n this.players = players;\n this.turn = 0;\n this.winner = null;\n this.over = false;\n ...
javascript
edit
0
2
mit
3acac48bf0622b6d5e492f3b098d850a9c6c69ae
androidgrl/othello,androidgrl/othello
lib/game.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $('.image-display').click(function(){\n messages.modal_pop({content:'<img src=\"'+$(this).attr('src')+'\" />'});\n });\n});\n\n```\n\nApply this change: Fix for STORE-1324: Update JS to preve...
javascript
edit
0
1
apache-2.0
b2a99e91d887b9b3849116ce07dc1e2f1c7c37bb
Rajith90/carbon-store,daneshk/carbon-store,wso2/carbon-store,splinter/carbon-store,daneshk/carbon-store,madawas/carbon-store,prasa7/carbon-store,wso2/carbon-store,jeradrutnam/carbon-store,jeradrutnam/carbon-store,madawas/carbon-store,cnapagoda/carbon-store,thushara35/carbon-store,wso2/carbon-store,splinter/carbon-store...
apps/publisher/themes/default/js/view-asset.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: 'airbnb-base',\n rules: {\n // Turning off errors about using console, since this is a Node app,\n // as recommended here: http://eslint.org/docs/rules/no-console#when-not-to-use-it\n 'no-console...
javascript
edit
0
0
mit
272663e414e951584b65fbcbbe957a865d0a0d7a
ustwo/wordy-slack-bot
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport HomepageBody from '../components/homepage-body';\nimport './homepage.less';\n\nexport default class Homepage {\n\n\tgetTitle() {\n\t\treturn \"React Server\";\n\t}\n\n\tgetElements() {\n\t\treturn (\n\...
javascript
edit
0
1
apache-2.0
6f3ac539478417204864c8e542d8279b8d2ad743
redfin/react-server,redfin/react-server,emecell/react-server,szhou8813/react-server,szhou8813/react-server,emecell/react-server,lidawang/react-server,lidawang/react-server
packages/react-server-website/pages/homepage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction countBs(s) {\n let count = 0;\n for (let i = 0; i < s.length; ++i) {\n if (s[i] == \"B\") ++count;\n }\n return count;\n}\n\nfunction countChar(s, c) {\n let count = 0;\n for (let i = 0; i < s.length; +...
javascript
edit
0
3
mit
591001d48e2191e73091df20b13e6bf31d7a2bc0
bewuethr/ctci
eloquent_js/chapter03/ch03_ex03.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2016 Mozilla\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LI...
javascript
edit
0
0
apache-2.0
a39c9c8871162bd1ef2963b8faed51db25358ecd
victorporof/tofino,victorporof/tofino
src/browser-frontend/model/shared-prop-types.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nconst ReferenceCell = (refs) => {\n return refs.map((ref) => {\n if (ref.pubMedId && ref.pubMedUrl) {\n return <a href={ref.pubMedUrl}>{ref.pubMedId}</a>;\n } else {\n return <span>{ref.pub...
javascript
edit
0
3
mit
23b3260e6029f4dcd829e7141d5b23a4ede66a83
nathandunn/agr,alliance-genome/agr,alliance-genome/agr,alliance-genome/agr_prototype,nathandunn/agr,nathandunn/agr,alliance-genome/agr,alliance-genome/agr_prototype,nathandunn/agr,alliance-genome/agr
webapp/src/components/disease/referenceCell.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst isProduction = process.env.NODE_ENV === \"production\";\n\nmodule.exports = {\n metadata: {\n siteTitle: \"Bloggify\"\n , description: \"We make publishing easy.\"\n , domain: isProduction ? ...
javascript
edit
0
1
mit
edd900413a3973c52e65f816f9da68dbc1a1ee34
Bloggify/newww,Bloggify/newww
bloggify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO: Switch this out with a proper import from the module when it's ready.\nimport { createTrigger, addTrigger } from '../../../src';\nimport { checkNextPrimeAction } from '../middleware/primesMiddleware';\n\nconst REMOVE_FROM_QUEUE...
javascript
edit
0
2
mit
56d5988bab49598a3be49a99e8e04fff94efc30a
coderkevin/redux-trigger
examples/simple/triggers/primeStateTriggers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport connect from 'react-redux/es/connect/connect';\nimport {Callout, Tag} from '@blueprintjs/core';\nimport {FormattedMessage} from 'react-intl';\nimport SearchAlert from 'src/components...
javascript
edit
0
5
mit
fb66d1dff3f4ce359199b07a6911c131cdc03841
alephdata/aleph,alephdata/aleph,pudo/aleph,pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph
ui/src/components/SuggestAlert/SuggestAlert.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { webcastPropType } from '../../utils/webcastUtils'\n\nconst EmbedDacast = (props) => {\n const channel = props.webcast.channel\n const file = props.webcast.file\n const iframeSrc = `https://static.v...
javascript
edit
0
1
mit
a933b68be4f8c89ac61f50b85dfc8f0d6dd5bccc
bdaroz/the-blue-alliance,fangeugene/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,bdaroz/the-blue-alliance,jaredhasenklein/the-blue-alliance,the-blue-alliance/the-blue-alliance,the-blue-alliance/the-blue-alliance,phil-lopreiato/the-blue-alliance,phil-lopreiato/the-blue-alliance...
react/gameday2/components/embeds/EmbedDacast.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function(lander, undefined){\n var display = document.getElementById('display');\n var horizon = new Array(display.width);\n var horizon_height = 50;\n horizon[0] = horizon_height;\n for (var index = 1; index < display....
javascript
edit
0
2
mit
772948724dcd63c2f8df1f1beb64254fbedc4a39
darwins-challenge/moonlander-game,darwins-challenge/moonlander-game
js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Dump outgoing stanzas to the console.\n *\n * This filter prints XML stanzas to the console. This is useful to inspect\n * stanzas as they are transmitted on the wire, and aids in debugging. It is\n * not recommended to use th...
javascript
edit
0
3
mit
595aec1a409d2f0b068e625f6a53f354c0584535
jaredhanson/junction
lib/junction/filters/dump.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(document).ready(function($){\n\tvar timelineBlocks = $('.cd-timeline-block'),\n\t\toffset = 0.8;\n\n\t//hide timeline blocks which are outside the viewport\n\thideBlocks(timelineBlocks, offset);\n\n\t//on scolling, show/animate t...
javascript
edit
0
3
apache-2.0
a7d6fc81e04f3bde5b05516f0f0a5cf4e58811a0
soujava/historia,soujava/historia
js/main.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add some wrapper code which defines the public API.\n\n* There is now also a default configuration for the algorithm. Which is for\n now the only one." }, { "role": "assistant", "content": "\n /**\n * This is the default ...
javascript
new_file
null
null
mit
18803808f895cc6776fb5cb0b8e1d22c8a4b9905
bbroeksema/d3-treemap
src/end.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.Transform.extend({\n deserialize(serialized) {\n return serialized;\n },\n\n serialize(deserialized) {\n return deserialized;\n }\n});\n\n```\n\nApply this change: Add GeoJSON ...
javascript
edit
0
1
mit
bbc6c4b1a37719e4271cd2a1844b81ca198fb945
bjornharrtell/ember-ol,bjornharrtell/ember-ol
addon/transforms/ol-geometry.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst lag = require('./lag');\n\nmodule.exports = (user, pings) => {\n const original = document.title;\n user.events.on('read', () => {\n document.title = `${original} (${lag.humanize(pings.currentLag())})`;\n });\n};\n\n```\n\nA...
javascript
edit
0
1
mit
94491a2ac736637c92ccee8c758551bf78a49d79
frosas/lag,frosas/lag,frosas/lag
src/browser/page-title.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar alter = require('./alter');\nvar batoto = require('./batoto');\nvar kissmanga = require('./kissmanga');\nvar mangafox = require('./mangafox');\n\n/**\n * Retrieves a series.\n * @param {string} address\n * @return {Se...
javascript
edit
0
2
mit
b059e0786258cf88e0e1837d17a55cf8ee6eedfc
MangaRack/mangarack,Deathspike/mangarack.js,MangaRack/mangarack,Deathspike/mangarack.js,Deathspike/mangarack.js,MangaRack/mangarack
lib/shared/provider/index.js
rejected_duplicate
Near-duplicate of sample 87580
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar imageStore = new FS.Store.GridFS('images')\n\nImages = new FS.Collection('images', {\n stores: [imageStore]\n});\n\nImages.allow({\n 'insert' : function(){\n return true;\n },\n 'update' : function(){\n return true;\n }\n...
javascript
edit
0
1
mit
2f24b195620a4a8e559bde0424806fead3437957
nmmascia/webet,nmmascia/webet
lib/collections/betImages.js
rejected_duplicate
Near-duplicate of sample 81490
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { apiProxyAxios } from '../../../components/Task/utils'\nimport { transformResponseToEventDetails } from '../transformers'\n\nexport const getEventDetails = (eventId) =>\n apiProxyAxios\n .get(`/api-proxy/v3/event/${eventId}`...
javascript
edit
0
1
mit
7ec7b9e6c088d28d9521ccf3408a6a741cbd744f
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2
src/client/modules/Events/EventDetails/tasks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/*\n * composable-middleware\n * https://github.com/randymized/composable-middleware\n *\n * Copyright (c) 2013 Randy McLaughlin\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports= function composable_middlewa...
javascript
edit
0
6
mit
313c74aba8324a32eac65554d22df73e5d2c374d
randymized/composable-middleware
lib/composable-middleware.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * This file specifies the database collection and field names.\n */\nexport const COLLECTION_TRIPS = 'trips';\nexport const TRIPS_NAME = 'name';\nexport const TRIPS_DESCRIPTION = 'description';\nexport const TRIPS_DESTINATION = 'd...
javascript
edit
0
0
apache-2.0
1fd1f157d9a2605bf7b02a290adbf9ecdd6b98ea
googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP
frontend/src/constants/database.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes, StyleSheet, Text, View } from 'react-native';\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport getLocationToSave from '../actions/action_dropNewPin.js';\...
javascript
edit
0
1
mit
149ed4b0f9ffb9b1774d2e7fd5b020fefe916354
InterruptedLobster/ARO
app/containers/container_viewContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst State = require('../../binary/base/storage').State;\nconst Client = require('../../binary/base/client').Client;\nconst PortfolioWS = require('../../binary/websocket_pages/user/account/portfolio/portfolio.init').PortfolioWS;\n\nco...
javascript
edit
0
6
apache-2.0
fd5f2489ad9c376c2c8fb15b3fec4d03b8700566
raunakkathuria/binary-static,raunakkathuria/binary-static,ashkanx/binary-static,binary-com/binary-static,negar-binary/binary-static,kellybinary/binary-static,fayland/binary-static,fayland/binary-static,4p00rv/binary-static,kellybinary/binary-static,binary-com/binary-static,negar-binary/binary-static,binary-static-deplo...
src/javascript/binary_japan/trade_japan/portfolio.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Time in seconds since the epoch.\n*\n* @module @stdlib/time/now\n*\n* @example\n* var now = require( '@stdlib/time/now' );\n*\n* var ts = now();\n* // returns <number>\n*/\n\n// MODULES //\n\nvar bool = require( ...
javascript
edit
0
0
apache-2.0
6187667b8225ba629bc898c77322634cde9e6d44
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/time/now/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http...
javascript
edit
0
1
apache-2.0
c65d1cee1b5dc23991726b208174f82f989cedd6
GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp
assets/src/dashboard/app/api/wpAdapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * Simple wrapper around $ionicPopup for modals and alerts and such\n */\n\nvar modalhandler = angular.module('modalhandler', []);\n\nmodalhandler.factory('modalFactory', function(i$ionicPopup) {\n return {}\n});...
javascript
edit
0
1
mit
40ee6a7448bdad262cf62fdab69a44a14b6d2352
learning-layers/sardroid,learning-layers/sardroid,learning-layers/sardroid
app/js/services/modalhandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Route from '@ember/routing/route';\nimport ajax from 'ember-fetch/ajax';\n\nexport default Route.extend({\n async model(params) {\n try {\n await ajax(`/api/v1//me/crate_owner_invitations/accept/${params.token}`, { metho...
javascript
edit
0
2
apache-2.0
b12465e783d9fc3b4d99e2f87ab924d5b60fabc4
rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io
app/routes/accept-invite.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nhistomicstk.views.AnnotationSelectorWidget = histomicstk.views.Panel.extend({\n events: _.extend(histomicstk.views.Panel.prototype.events, {\n 'click .h-annotation > span': 'toggleAnnotation'\n }),\n setItem: function (i...
javascript
edit
0
3
apache-2.0
370bc7beddcdb22eb54e89d795a54e3ac05af71a
DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK
web_client/js/views/annotationSelectorWidget.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nRippleTransaction = require(\"../models/ripple_transaction\");\nvar async = require(\"async\");\n\nmodule.exports = (function(){\n function userIndex(req, res) {\n req.user.balances(function(err, balances) {\n res.send({ error:...
javascript
edit
0
1
isc
33a3a86f224f9c75bf5d1cbadf2444eb71c84db7
zealord/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,Parkjeahwan/awegeeks,crazyquark/gatewayd,xdv/gatewayd,xdv/gatewayd,whotooktwarden/gatewayd
app/controllers/balances.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n Entity,\n EditorState,\n AtomicBlockUtils\n} from 'draft-js'\n\nexport default (editorState, url) => {\n const urlType = 'embed'\n const entityKey = Entity.create(urlType, 'IMMUTABLE', { src: url })\n const newEditorSta...
javascript
edit
0
1
mit
f76a836f196bec69e0ebc3bc50f0676d0f24d2b8
vacenz/last-draft-js-plugins,vacenz/last-draft-js-plugins
draft-js-embed-plugin/src/modifiers/addEmbed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\n\nvar COLLECTION_NAME = 'tweet';\n\nvar tweetSchema = new mongoose.Schema({\n id: {type: String, required: true},\n text: {type: String, required: true},\n user: {\n id: {type: String, required...
javascript
edit
0
0
mit
91bfb006306ff5e712fd3016d1373859b9106049
magomimmo/snaptkite-engine,magomimmo/snaptkite-engine,RachBLondon/react-essentials-tutorial,Snapkite/snapkite-engine
models/Tweet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function createNodeIterator(root, whatToShow, filter = null) {\n var iter = _create.call(window.document, root, whatToShow, filter, false);\n return typeof(iter.referenceNode) === 'undefined' ? shim(iter, root) : iter;\...
javascript
edit
0
2
mit
5c6f950fcfba27fc913af5392d222400dcceee2f
tilgovi/node-iterator-shim,tilgovi/dom-node-iterator
node-iterator-shim.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('OpenMining', [])\n.value('API_URL', '/process.json?')\n\n.controller('Process',\n function($scope, $http, $location, API_URL) {\n for (var key in $location.search()){\n API_URL += key + \"=\" + $location.search(...
javascript
edit
0
2
mit
bbbf4f9e185aa09abdbcc710417df7acd6249f56
jgabriellima/mining,chrisdamba/mining,mining/mining,avelino/mining,mlgruby/mining,AndrzejR/mining,chrisdamba/mining,AndrzejR/mining,avelino/mining,mlgruby/mining,mlgruby/mining,mining/mining,jgabriellima/mining,seagoat/mining,seagoat/mining
assets/javascript/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\n 'use strict';\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n nodeunit: {\n unit: ['test/unit/test*.js'],\n integration: ['test/integration/tes...
javascript
edit
0
1
mit
3955739938bca7feb4e75aed5a6dab84898d26f6
steveukx/git-js,steveukx/git-js
GruntFile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst gulp = require('gulp');\nconst shell = require('shelljs');\nconst size = require('gulp-size');\nconst argv = require('yargs').argv;\n\n// 'gulp jekyll:tmp' -- copies your Jekyll site to a temporary directory\n// to ...
javascript
edit
0
3
mit
5b43248bc50450d0b46f4f98a373168e27cb3d26
sondr3/generator-jekyllized,sondr3/generator-jekyllized,sondr3/generator-jekyllized
generators/jekyll/templates/build.js
rejected_duplicate
Near-duplicate of sample 77324
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Marionette.Component\n// --------------------\n// An object to represent an application component, typically \n// something visual, encapsulated in to an object that can be \n// instantiated and dispalyed on screen as needed.\n//\n//...
javascript
edit
0
2
isc
6a9feafbbeeb758ccbd84e48d0664d102eecc52a
jfairbank/marionette.component
src/marionette.component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport moment from 'moment';\nimport stringToHue from 'bus-detective/utils/string-to-hue';\nvar inject = Ember.inject;\n\nexport default Ember.Component.extend({\n tagName: 'li',\n clock: inject.service(),\...
javascript
edit
0
1
mit
6af99b14bdb5d52199e02724316dab6d7f89bccc
bus-detective/web-client,bus-detective/web-client
app/components/bd-arrival.js
rejected_duplicate
Near-duplicate of sample 80858
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n\nmodule.exports = function (grunt) {\n\n // Load the project's grunt tasks from a directory\n require('grunt-config-dir')(grunt, {\n configDir: require('path').resolve('tasks')\n });\n\n /*\n * R...
javascript
edit
0
1
cc0-1.0
b78f0d309bb99255aa229d9f99c94eac5b5b28d5
LinuxBozo/hmda-edit-check-api,cfpb/hmda-edit-check-api,porterbot/hmda-edit-check-api,cfpb/hmda-edit-check-api,LinuxBozo/hmda-edit-check-api
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = function (grunt) {\n grunt.initConfig({\n bump: {\n options: {\n files: [\"package.json\"],\n commit: true,\n commitMessage: \"Release...
javascript
edit
0
1
bsd-2-clause
05e6a2d1a58f00a68e61daf0a770fc708835583f
silverwind/droppy,jhliberty/droppy,jhliberty/droppy,silverwind/droppy,silverwind/droppy
Gruntfile.js
rejected_duplicate
Near-duplicate of sample 95588
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nFamousFramework.scene('famous-tests:webgl:custom-shader:fragment', {\n behaviors: {\n '.sphere': {\n 'size': [200, 200],\n 'align': [0.5, 0.5],\n 'mount-point': [0.5, 0.5],\n 'base-c...
javascript
edit
0
0
mit
a8f422db6e5bf535eee25785b646db9d83352adc
infamous/framework,jeremykenedy/framework,jeremykenedy/framework,infamous/framework,ildarsamit/framework,tbossert/framework,woltemade/framework,SvitlanaShepitsena/shakou,SvitlanaShepitsena/framework-1,infamous/famous-framework,woltemade/framework,colllin/famous-framework,SvitlanaShepitsena/framework,Famous/framework,tb...
lib/core-components/famous-tests/webgl/custom-shader/fragment/fragment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n/**\n * Attempts to prevent stalled rooms by launching filler creeps at 300 energy.\n */\n\nclass CityReboot extends kernel.process {\n constructor (...args) {\n super(...args)\n this.priority = PRIORITIES_CITY_RE...
javascript
edit
0
3
mit
540f0080e15daca76e32ab953d832e3ee057f5e1
ScreepsQuorum/screeps-quorum
src/programs/city/reboot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Experiment, ExperimentStep} from './experiment.model';\n\nangular.module('materialscommons').component('mcExperiment', {\n templateUrl: 'app/project/experiments/experiment/mc-experiment.html',\n controller: MCExperimentCom...
javascript
edit
0
2
mit
7dc6a989f056694f3c39687d19245f386b69735f
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/src/app/project/experiments/experiment/mc-experiment.component.js
rejected_duplicate
Near-duplicate of sample 89121
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction simulateNumericDecision(fleet1, fleet2){\n if (fleet1.ships > fleet2.ships) return fleet1;\n if (fleet1.ships < fleet2.ships) return fleet2;\n return null;\n}\n\nconst orion = {\n name: 'orion',\n ships: 295\n}\n\nconst co...
javascript
edit
0
3
mit
dc16bf8c7824869d86dada016d975f1b8f47370a
julianbei/CollisionModel
simple_model/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { ApolloClient, InMemoryCache } from 'apollo-boost';\nimport { createUploadLink } from 'apollo-upload-client';\nimport fetch from 'isomorphic-unfetch';\n\nlet apolloClient = null;\n\nlet isBrowser = typeof window !== 'undefined';...
javascript
edit
0
3
mit
b7da2c005034388176b73e3b38dd4e06912e6ce3
keystonejs/keystone,keystonejs/keystone,keystonejs/keystone
demo-projects/blog/app/lib/init-apollo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(req, res) {\n console.log('req.body', req.body)\n var data = JSON.parse(req.body.params);\n if (!data) {\n res.status(403 /* Unauthorized */ ).send('Invalid params');\n return;\n }\n\n var width = da...
javascript
edit
0
3
mit
f7d2e4b0acf849e850c26f2f45ac5f0850f0bcd1
mixmaxhq/giphy-mixmax-app,mixmaxhq/giphy-mixmax-app
api/resolver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-undef */\nimport { Bert } from 'meteor/themeteorchef:bert';\nimport { upsertDocument } from '/imports/api/documents/methods';\nimport '/imports/lib/validation';\n\nlet component;\n\nconst handleUpsert = () => {\n c...
javascript
edit
0
5
mit
b1a2874921524c6ce40c588b114a0109ffc4a0b6
ggallon/rock,ggallon/rock
imports/modules/documents/lib/document-editor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Escape URI components utility.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\...
javascript
edit
0
2
apache-2.0
dd0e909385711d3f0ab20e9d0aba3c3b04a2a3bb
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/util/escape-uri.js
rejected_duplicate
Near-duplicate of sample 74021
true
[ { "role": "user", "content": "Write javascript code for the following: Add verbose prelude from browser-pack" }, { "role": "assistant", "content": "//based on https://github.com/substack/browser-pack/blob/01d39894f7168983f66200e727cdaadf881cd39d/prelude.js\n// modules are defined as an array\n//...
javascript
new_file
0
7
mit
46ae84b8945d2c3ce8585da29e5aedb387421bef
deathcap/nodeachrome,deathcap/nodeachrome,deathcap/nodeachrome
app/prelude2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n commands: {\n random: {\n help: 'Selects a random choice or number',\n command: function (bot, msg) {\n if (msg.args.length > 2) {\n msg.args.shift()\n return msg.args[Math.flo...
javascript
edit
0
4
isc
35fc0b0e4289b2487b485b908b888e584479d71e
zuzakistan/civilservant,zuzakistan/civilservant
modules/random.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('controllers', function(){\n var scope;\n\n beforeEach(module('wallet'));\n\n beforeEach(inject(function($rootScope) {\n \tscope = $rootScope.$new();\n }));\n\n it('should define more than 5 awesome thing...
javascript
edit
0
1
mit
90aee5473e1911d7572d7af7b4d589d40c294039
tvararu/wallet
test/unit/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass ServersListCtrl {\n constructor($scope, Servers, Socket) {\n this.$scope = $scope;\n this.Servers = Servers;\n this.socket = Socket;\n this.init();\n }\n\n init() {\n this.servers = [];\n this.Servers.list()\n...
javascript
edit
0
1
mit
2a75acbd9f980e625949ae5238b5959e97b65ed6
adonescunha/monithub,adonescunha/monithub
lib/client/app/serverslist/serverslist.ctrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window)\n{\n // if we're running on the Cloud CMS hosted platform, we can auto-acquire the client key that we should use\n (function() {\n\n var uri = window.location.href;\n var z1 = uri.indexOf(window.lo...
javascript
edit
0
4
apache-2.0
8f29607f0e34a4b3aca69bf51ec4a81dc9a2e4c5
gitana/gitana-javascript-driver,gitana/gitana-javascript-driver,gitana/gitana-javascript-driver
src/main/webapp/js_src/gitana/GitanaAutoConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar TaskList = require('../POMs/TasksList.js');\n\ndescribe('Check that task name can be updated', function() {\n\n beforeAll(function() {\n TaskList.actionsBeforeAll();\n });\n\n it('Adding new task', function() ...
javascript
edit
0
1
mit
cdf59e599720db5f2d66d7f1a76fe6034cabe0d0
MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todo-app,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todomvc,MitocGroup/deep-microservices-todo-app
src/deep-todo/tests/e2e/Tests/TaskEditing.spec.js
accepted
null
true