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\nmodule.exports = (slackapp) => {\n slackapp.webserver.post('/incoming-webhooks/:teamId', (req, res) => {\n const events = req.body.events;\n if (!events) {\n slackapp.log('Bad incoming webhook request', req);\n res.send...
javascript
edit
0
2
mit
c078fa8329bcf7c3cdc25c2ce68d0fd1b0fdac02
trustpilot/slack-trustpilot
app/webserver-extensions/extra-routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Area from './templete'\nimport {\n getRangeAncestorElem,\n getRange,\n isSelectionInArea,\n createSelectionBaseNode,\n createRange\n} from 'utils/selection'\n\nconst sciprt = ({ options, widget, el, __S_ }) => {\n $(documen...
javascript
edit
0
4
mit
06601d20b6aab392053b6307955311cce1ded4cf
Cedcn/holy-editor,Cedcn/holy-editor
src/core/area/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport pipe from '../pipe';\n\nexport const transformIn =\n transformer =>\n pipeline =>\n (stream, close) =>\n pipeline(transformer(stream), close);\n\nexport const transformOut =\n transformer =>\n pipeline =>\n ...
javascript
edit
0
2
mit
ba8b9e01204a9cd68bd8b2aaf7769a6a092ffcdb
MrBr/pipelinejs
src/enhancers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport List from '../List/List';\nimport ScaledComponent from './ScaledComponent';\nimport DelayedItems from './DelayedItems';\n\nconst propTypes = {\n children: PropType...
javascript
edit
0
1
mit
695ab5108b65509299bed35ebaace2e8ff4dc74b
kradio3/react-mdc-web
src/Menu/MenuList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n\n var hc_scoreboard_series = {\n name: 'Points',\n id: ':scores',\n data: [],\n dataLabels: {\n enabled: true,\n color: '#FFFFFF',\n align: 'center',\n ...
javascript
edit
0
1
bsd-3-clause
f3b4def6e989a7739947d3e5b39fe9b3751a4aa1
pereztr5/cyboard,pereztr5/cyboard,pereztr5/cyboard,pereztr5/cyboard
static/assets/js/hc_scoreboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable import/prefer-default-export */\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nexport const ACTIONS = {\n // tableAction constants\n SORT_DATA: 'sortData',\n FILTER_DATA: 'filterData',\n R...
javascript
edit
0
0
mit
2e890cca49509a2a9536e373d09854e8e77ab51f
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/pages/dataTableUtilities/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { SET_SEARCH_TERM } from './actions'\n\nexport function setSearchTerm (searchTerm) {\n return { type: SET_SEARCH_TERM, searchTerm }\n}\n\n```\n\nApply this change: Add omdb action creator and thunk async action" }, { "ro...
javascript
edit
0
2
mit
198966c565e54a9e754e7e409126985af7bbcf87
galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka
js/actionCreators.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as React from 'react';\n\n/**\n * Main List Element to be displayed on the Navigation.\n *\n * @param {Object} props\n * @param {string} props.href hyperlink for the href attribute.\n * @param {string} props.innerText rendered ...
javascript
edit
0
1
apache-2.0
6ab46c00d530fd95d1947e80aa6fa6208d2a8f0e
googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020
src/main/webapp/components/Navigation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global angular: true, FileReader: true */\n\nangular.module('webPGQ.directives')\n .directive('openFile', function()\n {\n function link(scope, element)//, attrs)\n {\n var input = element.find('input')...
javascript
edit
0
1
mit
407d2b01afb95f389daaab81f600b27ada87d5d1
HydroLogic/web-pgq,whitelynx/web-pgq,HydroLogic/web-pgq,whitelynx/web-pgq
static/js/directives/open-file.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Game = function (options) {\n this.stage = options.stage;\n this.grid = options.grid;\n this.player = 0;\n}\n\nGame.prototype = {\n start: function(){\n this.addCurrentPlayerCoin();\n },\n coinDropped: function(e){\n var...
javascript
edit
0
3
mit
bdb0fc2ac58a60983857af7b70094ce55d0626a8
Gunga/Gunga.github.io,Gunga/Gunga.github.io
blog-posts/projects/socket4/js/game.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst globalHooks = require('../../../hooks');\nconst hooks = require('feathers-hooks');\nconst auth = require('feathers-authentication').hooks;\n\nexports.before = {\n all: [\n globalHooks.isAdmin()\n ],\n find: ...
javascript
edit
0
0
mit
897738ebfffa12542efcf567bd895fb3b05c6f40
davejtoews/cfl-power-rankings,davejtoews/cfl-power-rankings
src/services/user/hooks/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {remote} from 'electron'\n\nconst Notifier = {\n send(options) {\n const {title, body} = options\n const icon = 'resource/img/icon.png'\n const notification = new Notification(title, {body, icon})\n notification.oncl...
javascript
edit
0
2
mit
03c2c87415fd506c4049805d2f2dd6ea69e26b7d
CyanSalt/todu,CyanSalt/todu
src/plugin/notifier.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nasync registerElement('$variable_id', function () {\n try {\n await refreshString('$element_id', 'textContent', '$data_uri');\n } catch {\n }\n});\n\n```\n\nApply this change: Put async in right place" }, { "role": "assist...
javascript
edit
0
2
mit
a0afdd3bc1af26bc2597ef417b51a417c7f79f53
crosscompute/crosscompute,crosscompute/crosscompute,crosscompute/crosscompute,crosscompute/crosscompute
crosscompute/templates/stringOutput.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from 'react-pure-render/component';\nimport R from 'ramda';\nimport React, { PropTypes } from 'react';\nimport { defineMessages, injectIntl, intlShape } from 'react-intl';\nimport { IconButton, Menu } from 'react-mdl/li...
javascript
edit
0
2
mit
ef49f46f340058167ffe68db44d067524096a7ac
cjk/smart-home-app
src/browser/fermenter/Commander.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar λ = require('./lambada');\n\ndescribe('lambada', function () {\n it('should return a function', function () {\n expect(typeof λ).toBe('function');\n });\n});\n\n```\n\nApply this change: Test for simple arithmetic funct...
javascript
edit
0
1
mit
333f67a4ef7bd4085257fb5078a6a86e581c952b
rbonvall/lambada
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Based on http://www.html5rocks.com/en/tutorials/workers/basics/\ndefine(function() {\n var URL = window.URL || window.webkitURL\n if (URL && Worker && Blob) {\n var blobUrl = URL.createObjectURL(new Blob(\n ['...
javascript
edit
0
7
mit
844d4d4410b9fd73cb49a01ab1c975c3bb84d017
frosas/lag,frosas/lag,frosas/lag
public/scripts/realtime-set-interval.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar utils = require(\"../utils\");\nvar log = require(\"npmlog\");\n\nmodule.exports = function(defaultFuncs, api, ctx) {\n return function changeThreadEmoji(emoji, threadID, callback) {\n var form = {\n 'emo...
javascript
edit
0
3
mit
dc71fbaeb988e60454630db72e1a09f74799ee13
GAMELASTER/facebook-chat-api,Schmavery/facebook-chat-api,ravkr/facebook-chat-api
src/changeThreadEmoji.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport RNFS from 'react-native-fs';\n\n\nconst Constants = {\n API_PATH: 'http://localhost:3000',\n IMAGE_DIR: RNFS.DocumentDirectoryPath + '/images/',\n}\n\nexport default Constants;\n\n```\n\nApply this change: Change to targe...
javascript
edit
0
0
mit
eb830c544c0a51bd8b6b82f07376a9a59fc0e266
buzzfeed-openlab/shit-vcs-say,buzzfeed-openlab/shit-vcs-say,buzzfeed-openlab/shit-vcs-say,buzzfeed-openlab/shit-vcs-say
app/src/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==========================================================================\n// Project: MySystem Unit Test\n// Copyright: ©2010 Concord Consortium\n// ==========================================================================\n/*gl...
javascript
edit
0
1
mit
36a265a63fcc2f6a1bef897996f03f44d3d5640f
concord-consortium/mysystem_sc,concord-consortium/mysystem_sc,concord-consortium/mysystem_sc
apps/my_system/tests/views/add_button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport styled from '@emotion/styled';\n\nconst Content = styled.footer`\n text-align: center;\n color: rgba(0, 0, 0, 0.25);\n`;\n\nconst Paragraph = styled.p`\n margin-bottom: 8px;\n font-size: 12px;\n\n ...
javascript
edit
0
1
bsd-3-clause
63941d646d01e78bbea58f9a686f5aa173313e5c
mirego/mirego-open-web,mirego/mirego-open-web
src/components/Footer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const cardName = {\n key: 'cardName',\n prompt: 'what card are you searching for?\\n',\n type: 'string'\n}\n\nexport const soundKind = {\n key: 'soundKind',\n prompt: '',\n type: 'string',\n default: 'play'\n...
javascript
edit
0
3
mit
3ca517197395f5c8470bd5a84dfba4f326b8018e
tinnvec/stonebot,tinnvec/stonebot
src/command-arguments.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n keys: ['FEEDPARSER', 'RSS_PARSER', 'FEEDME'],\n RSS_PARSER: require('./rss-parser'),\n FEEDPARSER: require('./feedparser'),\n FEEDME: require('./feedme'),\n}\n\n```\n\nApply this change: fix: Remove feedme from ...
javascript
edit
0
0
mit
8044de70c2949c0e79f74d78f8bc8a0facdd3e02
relekang/micro-rss-parser
src/parsers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n\n function load_new_items(){\n sign = load_path.indexOf('?') >= 0 ? '&' : '?'\n $.get(load_path + sign + 'page=' + (++page_num), function(data, e) {\n if(data.length < 5) {\n page_num =...
javascript
edit
0
4
mit
2d5cf2c181ba9c5f6f5cd020ad4727eb5a2a053f
HeeL/scrollinity
vendor/assets/javascripts/scrollinity.js
rejected_duplicate
Near-duplicate of sample 96975
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux';\nimport Player from '../presentational/audio-player/Player';\nimport { togglePlay, changeCurrentSeconds, seekToSeconds, setDuration } from './../actions/player';\n\nexport const mapStateToProps = (...
javascript
edit
0
1
mit
ba44156fe8d5057c4b164ade61b76e0d6654d607
AbsoluteZero273/Deezic
app/renderer/containers/PlayerContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport renderer from 'react-test-renderer';\nimport shallow from 'react-test-renderer/shallow';\nimport 'jest-specific-snapshot';\n\nfunction getRenderedTree(story, context, options) {\n const storyElement = s...
javascript
edit
0
2
mit
8e87fb8ba6599f90a4646816daf7a36ab08b6784
rhalff/storybook,rhalff/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,rhalff/storybook,storybooks/storybook,rhalff/storybook,storybooks/storybook,storybooks/storybook,rhalff/storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/react-storybook,story...
addons/storyshots/src/test-bodies.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst assert = require('assert');\n\nconst Account = require('../Contents/Scripts/account.js').Account;\nconst PullRequest = require('../Contents/Scripts/pull-request.js').PullRequest;\nconst Repository = require('../Contents/Scrip...
javascript
edit
0
1
mit
8358bd83692c5731a4817f841845e2104526b804
bswinnerton/launchbar-github,bswinnerton/launchbar-github
test/pull-request.js
rejected_duplicate
Near-duplicate of sample 95492
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery.tokeninput\n\n$(document).ready(function(){\n $('input.token-input').tokenInput(function($input){\n var modelName = $input.data(\"model-name\");\n return \"/admin/autocomplete/\"+modelName;\n }, {\n minChar...
javascript
edit
0
1
mit
cf7bcbdeb6890a817095392ea85127658f9082ee
BookBub/active_admin_associations,BookBub/active_admin_associations,BookBub/active_admin_associations
vendor/assets/javascripts/active_admin_associations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Button from 'react-bootstrap/Button';\n\nimport '../../styles/add-trip.css'\n\n\n/**\n * Component corresponding to add trips modal.\n */\nconst AddTrip = (props) => {\n const showHideClass = props.sh...
javascript
edit
0
3
apache-2.0
d6cfb91652099ad880409caab6d8ec78e6568a01
googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP
frontend/src/components/AddTrip/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar configFilePath = process.argv[2];\nvar config = {};\n\nif (configFilePath) {\n try {\n config = require(configFilePath);\n } catch(e) {\n console.log('Cannot load '+configFilePath);\n process.exit(1); \n }\n}\n\nvar uti...
javascript
edit
0
0
mit
1a259cdf59ac11d0d93d51200c712ae68bdcde19
parse-server-modules/parse-files-utils
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'views/root',\n 'backbone'\n], function (RootView, Backbone) {\n return new (Backbone.Router.extend({\n routes: {\n\n }\n }));\n});\n\n```\n\nApply this change: Return router class, instead of instance" }, { ...
javascript
edit
0
1
mit
ccfce1c8bba0c9b1cc9d5e66fcb046a0c5bb3fd9
FormidableLabs/generator-handlebones,walmartlabs/generator-thorax,walmartlabs/generator-thorax
templates/_router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = new AsyncState()\n\nfunction AsyncState () {\n var tracing\n var state = this\n\n try {\n tracing = require('tracing')\n } catch (e) {\n tracing = require('./lib/tracing_polyfill.js')\n }\n\n ...
javascript
edit
0
2
mit
130ad593fd457f88ec390b69cd13479525ee5eba
watson/async-state
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar yaml = require('js-yaml');\n\nmodule.exports = function (source) {\n this.cacheable && this.cacheable();\n var res = yaml.safeLoad(source);\n return JSON.stringify(res, undefined, '\\t');\n};\n\n```\n\nApply this change: Revert \...
javascript
edit
0
2
mit
8145fb45a41f200e47aabd222fb93439168eee0c
okonet/yaml-loader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar exec = require('child_process').exec;\nvar plist = require('simple-plist');\n\nmodule.exports = function(path, callback){\n exec('codesign -d --entitlements :- ' + path, function(error, output){\n if(error){\n ...
javascript
edit
0
2
mit
92e3bd9cff930295d05b84b4f31ab69fd2964fb3
matiassingers/entitlements
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('./common');\n\nvar\n DB_NAME = 'node-couchdb-test',\n\n callbacks = {\n A: false,\n B1: false,\n B2: false,\n C: false,\n },\n\n db = client.db(DB_NAME);\n\n// Init fresh db\ndb.remove();\ndb\n .create(function...
javascript
edit
0
2
mit
bea2fc9a3a53e46061de03ae52eb07e3b5ef4f5a
isaacs/node-couchdb,felixge/node-couchdb,medic/node-couchdb
test/test-changes.js
rejected_duplicate
Near-duplicate of sample 76182
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Transform = require( 'stream' ).Transform;\n\nvar MyactStreamTransform = module.exports = function( keyProperty ) {\n Transform.call( this, { objectMode: true });\n\n this.keyProperty = keyProperty;\n};\n\nMyactStreamTransform...
javascript
edit
0
2
mit
8ab6e6072d05867f30d0361d0a8f8ae041b4680c
myact/myact-stream-transform
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('util').inherits;\nvar NanoTimer = require('nanotimer');\n\nfunction StepSequencer(tempo, division, sequence) {\n this.tempo = tempo;\n this.d...
javascript
edit
0
4
mit
835a3c665d9ab0b9f23df73bbd59368c904815f8
freitagbr/step-sequencer
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst test = require(\"ava\")\nconst header = require(\"../../lib/utils/\")\nconst themes = require(\"../../lib/themes\")\nconst pkg = require(\"../../package.json\")\n\nlet darkThemeHeader = null\n\ntest.before(() => {\n darkThemeHead...
javascript
edit
0
1
mit
04926d8ed4cd2d842dfde75ba58c0ddf2175fe83
primer/github-syntax-theme-generator
test/utils/header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nKwf.onElementReady('.kwcStatisticsOptBox', function(el, config) {\n if (Kwf.Statistics.getDefaultOptValue() == 'out' && !Kwf.Statistics.issetUserOptValue()) {\n el.slideIn('t', { duration: 2 });\n }\n});\n```\n\nApply this ...
javascript
edit
0
3
bsd-2-clause
bd6eb49a77eee89572b9cb08edc8e276f2b1c178
Ben-Ho/koala-framework,nsams/koala-framework,nsams/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework,yacon/koala-framework,yacon/koala-framework,Sogl/koala-framework,darimpulso/koala-framework,yacon/koala-framework,Ben-Ho/koala-framework,koala-framework/koala-framework,nsams/koala-framework,Sogl/ko...
Kwc/Statistics/OptBox/Component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {app, BrowserWindow, protocol} = require('electron')\n\nrequire('electron-debug')({ showDevTools: true, enable: true })\n\nvar path = require('path')\n\nvar main = null\n\napp.on('ready', function () {\n main = new BrowserWindow(...
javascript
edit
0
2
mit
4511d003dcd808d7cf066428cd22116d597715e4
codeforscience/sciencefair,codeforscience/sciencefair,greggraf/sciencefair,codeforscience/sciencefair,greggraf/sciencefair,greggraf/sciencefair
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndocument.write('<div id=\"ember-testing-container\"><div id=\"ember-testing\"></div></div>');\n\nEmber.testing = true;\n\nvar App = requireModule('appkit/app');\n\nApp.rootElement = '#ember-testing';\nApp.setupForTesting();\nApp.injectT...
javascript
edit
0
2
mit
0c50ab262801f30034834712c65fb0a437d83a62
arjand/weddingapp,ghempton/ember-libs-example,aboveproperty/ember-app-kit-karma,ClockworkNet/ember-boilerplate,shin1ohno/EmberAppKit,cevn/tasky-web,grese/miner-app-OLD,stefanpenner/ember-app-kit,ebryn/ember-github-issues,jwlms/ember-weather-legacy,mharris717/eak_base_app,teddyzeenny/assistant,grese/miner-app-OLD,Anshde...
tests/test_helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar lib = require('phosphide/index');\n\n\nlib.listPlugins().then((plugins) => {\n console.log(plugins);\n lib.loadPlugin('foo').then(() => {\n console.log('foo finished loading');\n lib.loadPlugin('bar').then(() => ...
javascript
edit
0
1
bsd-3-clause
1c80c173a8e651d9a4426787ca7e499eb14a65e0
blink1073/phosphor-plugins,blink1073/phosphor-plugins,blink1073/phosphor-plugins
example/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar GLOBAL_DAILY_LIMIT = 50000;\nvar GLOBAL_HOURLY_LIMIT = 10000;\nvar USER_DAILY_LIMIT = 500;\nvar USER_HOURLY_LIMIT = 3;\n\nvar RateLimiter = require('./ratelimiter');\n\n\n```\n\nApply this change: Add callbacks for allow and block f...
javascript
edit
0
1
mit
e22f74c0351322c6a3036f7d62b7eac50e6baad7
emiraydin/ratelimiter
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Gitter = require('./gitter');\nconst Lexicon = require('./lexicon');\n\nconst client = new Gitter();\n\nfunction listenAndReply(roomId) {\n client.readChatMessages(roomId, (message) => {\n if (message.operation === 'create') {...
javascript
edit
0
5
mit
5844ddc45b725140edd858ed276b92a337f6b5ea
esoui/lexicon,esoui/lexicon
index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add options to exported types" }, { "role": "assistant", "content": "/**\n * @typedef {import('./lib/index.js').StringifyEntitiesLightOptions} StringifyEntitiesLightOptions\n * @typedef {import('./lib/index.js').StringifyEnti...
javascript
new_file
0
0
mit
d9617855bd112b523333c1c4cdfb8e725f52b1e9
wooorm/stringify-entities
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nApp.Slide = DS.Model.extend({\n url: 'banners',\n\n title: DS.attr('string'),\n body: DS.attr('string'),\n image: DS.attr('string'),\n imageBackground: DS.attr('string'),\n video: DS.attr('string'),\n\n language: DS...
javascript
edit
0
1
bsd-3-clause
683d10ab341a3b6a6767557f0496fb1e0e2f8cff
onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle
bluebottle/slides/static/js/bluebottle/slides/models.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.register = function register(skill) {\n skill.onIntent('LaunchIntent', () => ({ reply: 'Intent.Launch', to: 'entry' }));\n skill.onIntent('AMAZON.HelpIntent', () => ({ reply: 'Intent.Help', to: 'die' }));\n};\...
javascript
edit
0
1
mit
b767f184caf17277501f13b063cbc26c1378068e
mediarain/generator-voxa-skill
generators/app/templates/skill/states.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nexport default function users(): Object {\n return {\n profile: (username: string) => {\n const url = `/users/${username}`;\n\n return this.request({\n url,\n method: \"GET\"\n });\n },...
javascript
edit
null
null
mit
f6590f8c05acf2ed3d59a09e719986a5966c5b0a
unsplash/unsplash-js,unsplash/unsplash-js,naoufal/unsplash-js
src/methods/users.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {Breadcrumb} from 'react-bootstrap'\nimport {IndexLinkContainer as Link} from 'react-router-bootstrap'\n\nexport default class Breadcrumbs extends React.Component {\n\tmakeItem(item) {\n\t\treturn (\n\t...
javascript
edit
0
1
mit
1f7058de156dd4b6997a88b43f8c909950cba2bf
NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet
client/src/components/Breadcrumbs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, 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 grant\n ...
javascript
edit
null
null
bsd-3-clause
b69d1bb34980f58b29ee4d5cc068151492733f79
aarondancer/react-devtools,aolesky/react-devtools,keyanzhang/react-devtools,aolesky/react-devtools,aolesky/react-devtools,jhen0409/react-devtools,jhen0409/react-devtools,aarondancer/react-devtools,keyanzhang/react-devtools,aarondancer/react-devtools,jhen0409/react-devtools
frontend/detail_pane/DetailPaneSection.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function()\n{\n angular\n .module('ionic.utils', [])\n .factory('localStorage', localStorage);\n\n localStorage.$inject = ['$window'];\n\n function localStorage($window)\n {\n return {\n set : function (key, val...
javascript
edit
0
4
mit
b9ba28cc9b550c56c95fddcb18076eac1d26f75e
dank-meme-dealership/foosey,dank-meme-dealership/foosey,brikr/foosey,dank-meme-dealership/foosey,brikr/foosey,dank-meme-dealership/foosey,dank-meme-dealership/foosey
app/www/js/local-storage/local-storage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nBehaviour.register({\n\t'#Form_EditForm' : {\n\t\tgetPageFromServer : function(id) {\n\t\t\tstatusMessage(\"loading...\");\n\t\t\tvar requestURL = 'admin/_queued-jobs/showqueue/' + id;\n\t\t\tthis.loadURLFromServer(requestURL);\n\t\t\t$...
javascript
edit
0
1
bsd-3-clause
a3f71bfa790f4f0e8d767f0f5a7f8997b3e26c14
andrewandante/silverstripe-queuedjobs,open-sausages/silverstripe-queuedjobs,nyeholt/silverstripe-queuedjobs,open-sausages/silverstripe-queuedjobs,souldigital/silverstripe-queuedjobs,souldigital/silverstripe-queuedjobs,silverstripe-australia/silverstripe-queuedjobs,andrewandante/silverstripe-queuedjobs,nyeholt/silverstr...
javascript/QueuedJobsAdmin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nprocess.env.NODE_ENV = 'test';\nconst path = require('path');\n\nvar webpackConfig = require(path.join(__dirname, './node_modules/react-scripts/config/webpack.config.dev.js'));\nwebpackConfig.devtool = 'inline-source-map';\n\nmodule.exp...
javascript
edit
0
1
mit
5ab43ba75dd491770855cac859be106c8d409eb7
apiaryio/console-proxy,apiaryio/apiary-console-seed,apiaryio/console-proxy,apiaryio/apiary-console-seed
client/karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst cors = require('cors');\n\nconst app = express();\n\napp.use(bodyParser.json());\napp.use(cors());\napp.set('view engine', 'ejs');\napp.set('views', ...
javascript
edit
0
2
mit
2b6c2e33ac40e6096b4317f4f910065ee5d796ad
apiaryio/apiary-console-seed,apiaryio/apiary-console-seed,apiaryio/console-proxy,apiaryio/console-proxy
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar sudo = require('sudo-prompt');\nvar cmdFnPath = require.resolve('cmd-fn');\n\nvar setName = sudo.setName;\n\nvar call = function(options, cb) {\n var cmd = process.execPath + ' ' + cmdFnPath;\n\n if (process.execPath.indexOf(\"/Co...
javascript
edit
0
7
mit
60830702cfad70c1417d6c5708b8de36f19e2226
davej/sudo-fn
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['phaser'], function(Phaser) {\n var state = new Phaser.State();\n var paddle;\n state.create = function() {\n paddle = state.add.sprite(400, 500, 'atlas', 'paddle');\n paddle.anchor.set(0.5);\n stat...
javascript
edit
0
1
mit
de0ca8f858b5b3f0692a55f9a0b7835bbc432903
zekoff/1gam-breakout,zekoff/1gam-breakout
js/state/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimportScripts('common.js');\n\nfunction continuouslyGenerateRsaKey()\n{\n var extractable = false;\n var usages = ['encrypt', 'decrypt'];\n // Note that the modulus length is small.\n var algorithm = {name: \"RSAES-PKCS1-v1_...
javascript
edit
0
1
bsd-3-clause
63b7714347e0e7793c19ccae2e7d96cd834bd7bd
jtg-gg/blink,modulexcite/blink,modulexcite/blink,nwjs/blink,PeterWangIntel/blink-crosswalk,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,modulexcite/blink,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,Pluto-tv/blink-crosswalk,hgl888/blink-crosswalk-efl,ondra-novak/blink,hgl888/blink-crosswalk-efl,o...
LayoutTests/crypto/resources/worker-infinite-loop-generateKey.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction only_on_page(name, fn) {\n if ($('body').data('page') === name) {\n fn();\n }\n}\n\nfunction init_on_page(name, fn) {\n $(document).on('turbolinks:load', function () {\n only_on_page(name, function() {\n fn();\n ...
javascript
edit
0
2
apache-2.0
ce9ce6ecf7a6dde9b21b29b7b39c85b9986dd143
Xalgorithms/xa-elegans,Xalgorithms/xa-elegans,Xalgorithms/xa-elegans
app/assets/javascripts/globals.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst React = window.React;\nimport RangeInputFixtures from './range-inputs';\nimport TextInputFixtures from './text-inputs';\nimport SelectFixtures from './selects';\nimport TextAreaFixtures from './textareas/';\n\n/**\n * A simple rou...
javascript
edit
0
5
mit
85aa7eebfc4857a12c1c49048ea8cf6c8696b6d3
AlmeroSteyn/react,Simek/react,kaushik94/react,joecritch/react,yungsters/react,flarnie/react,roth1002/react,acdlite/react,silvestrijonathan/react,nhunzaker/react,jameszhan/react,joecritch/react,TheBlasfem/react,jordanpapaleo/react,nhunzaker/react,TheBlasfem/react,jdlehman/react,mosoft521/react,aickin/react,mjackson/reac...
fixtures/src/components/fixtures/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// 12: destructuring - object\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('destructuring objects', () => {\n\n it('is simple', () => {\n const {x} = {x: 1};\n assert.equal(x, 1);\n });\n\n desc...
javascript
edit
0
1
mit
d0c08ec3d1bd509086c322d0b53847e637074fdc
ehpc/katas,ehpc/katas,ehpc/katas,Semigradsky/katas,JonathanPrince/katas,JonathanPrince/katas,tddbin/katas,JonathanPrince/katas,cmisenas/katas,Semigradsky/katas,Semigradsky/katas,cmisenas/katas,rafaelrocha/katas,rafaelrocha/katas,rafaelrocha/katas,tddbin/katas,tddbin/katas,cmisenas/katas
katas/es6/language/destructuring/object.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* Expose. */\nmodule.exports = visit;\n\nvisit.CONTINUE = true;\nvisit.SKIP = 'skip';\nvisit.EXIT = false;\n\nvar is = require('unist-util-is');\n\n/* Visit. */\nfunction visit(tree, test, visitor, reverse) {\n if (ty...
javascript
edit
0
11
mit
3c31f728b9736ffbc41e9766eddff19f803a84cc
wooorm/mdast-util-visit,wooorm/unist-util-visit
index.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nconst whitelist = [\n 'style',\n 'className',\n 'role',\n 'id',\n 'autocomplete',\n 'size',\n];\n\nconst whitelistRegex = [/^aria-/, /^data-/, /^on[A-Z]\\w+/]\n\nexport function pick(props, componentClass) {\n let keys = Object...
javascript
edit
0
3
mit
1276870295d9239124bac74e6f6762ab58f26817
jquense/react-widgets,jquense/react-widgets,jquense/react-widgets,haneev/react-widgets,haneev/react-widgets
packages/react-widgets/src/util/Props.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-medium-editor',\n\n included: function(app) {\n this._super.included(app);\n var options = app.options.mediumEditorOptions || {};\n\n this.app.im...
javascript
edit
0
5
isc
40825ff0a2c4d0292943bd5d6c095920a6306c37
lukebrenton/ember-cli-medium-editor
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\"use strict\";\nconst meow = require(\"meow\");\nconst Promise = require(\"pinkie-promise\");\nconst Xray = require(\"x-ray\"), xray = Xray();\n\nconst periods = ['day', 'week', 'month'];\n\nconst cli = meow(`\n U...
javascript
edit
0
2
mit
34f823129e9d42246b6d66e753517c02a0dba3cc
kshvmdn/pkg-stats
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar stemmer;\n\n/**\n * Module dependencies.\n */\n\nstemmer = require('lancaster-stemmer');\n\n/**\n * `changetextinside` handler;\n *\n * @this Node\n */\n\nfunction onchangetextinside() {\n var value;\n\n value...
javascript
edit
0
2
mit
5d950f48b7a24143aba6f073d54c5c3b7da1975b
wooorm/retext-lancaster-stemmer
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('./config');\nconst express = require('express');\nconst cors = require('cors');\nconst importer = require('./middleware/importer');\nconst mongoose = require('mongoose');\nconst dbHelper = require('./lib/db');\n\...
javascript
edit
0
1
mit
2dc611a249044ba57290c387f2a5665cc7d123b5
cmihaylov/bitcoin-price-api,cmihaylov/bitcoin-price-api
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = isJsObject;\n\nfunction isJsObject(obj) {\n return /^\\[object (?:object|global)\\]$/i\n .test(Object.prototype.toString.call(obj));\n}\n\n```\n\nApply this change: Make it work in Firefox\n\nFirefo...
javascript
edit
0
2
isc
b02d185b8fb7d4ff2d4c3be40f97fe87542db8d8
joaquimserafim/is-js-object
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = visit\n\nvar visitParents = require('unist-util-visit-parents')\n\nvar CONTINUE = visitParents.CONTINUE\nvar SKIP = visitParents.SKIP\nvar EXIT = visitParents.EXIT\n\nvisit.CONTINUE = CONTINUE\nvisit.SKI...
javascript
edit
0
3
mit
585ce986ea286dc488fd34582cb075eac93e12e2
wooorm/mdast-util-visit,wooorm/unist-util-visit
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar PATH_SEPARATOR = require('path').sep;\nvar requirejs = exports.requirejs = require('requirejs');\nvar getStackTrace = require('./stack-trace');\n\nrequirejs.config({baseUrl: process.cwd()});\n\nvar loadedModules = Object.create(null...
javascript
edit
0
2
mit
6917cbf558cbe2a2ab2d602154c588c44290abb2
davidaurelio/node-define
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (App) {\n\tif (typeof (App) == 'undefined') {\n\t\tconsole.error('ERROR: Seminarjs not detected');\n\t\tprocess.exit(-1);\n\t}\n\n\ttry {\n\n\t\tApp.express.use('/plugins/chat/', function (req, res, next) {\n\t...
javascript
edit
0
3
mit
3dd5774a998c26740e319d0b31c2364e1e75a49b
Nichejs/Seminarjs-Chat
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar EventEmitter = require('events').EventEmitter;\nvar inherits = require('inherits');\n\nmodule.exports = function(fn) {\n\n inherits(fn, EventEmitter);\n\n var self = new fn();\n\n self.addEventListener = function(ev, cb) {\n ...
javascript
edit
0
1
mit
5574187f570acc10ccc14078788b853cfadf0499
deathcap/unworkify
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar explode = require('turf-explode');\nvar point = require('turf-point');\n\n/**\n * Calculates the centroid of a polygon Feature or\n * FeatureCollection using the geometric mean of all vertices.\n * This lessens the effect of small i...
javascript
edit
0
2
mit
347f3dd6b971f9c89f82759c78028504adde54ec
Turfjs/turf-centroid
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = ({ env }) => ({\n host: env('HOST'),\n port: env.int('PORT'),\n});\n\n```\n\nApply this change: Use default host and port\n\nSigned-off-by: Alexandre Bodin <<EMAIL>>" }, { "role": "assistant", "content": "...
javascript
edit
0
1
mit
0ed90fd2f19781a5f6ea0c6fa192bf1f8ee11d61
wistityhq/strapi,wistityhq/strapi
packages/strapi-generate-new/lib/resources/files/config/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar test = require('tape')\nvar parse = require('../parser')\n\ntest('partial input', function (t) {\n // These should all produce syntax errors at the end of the input\n var examples = [\n { input: \"echo ( this will fail\", posit...
javascript
edit
0
3
mit
1ac3f864b65d93c153ec1ef112cd83f01c437845
grncdr/js-shell-parse
tests/parse-error.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar bluebird = require('bluebird');\nvar fs = bluebird.promisifyAll(require('fs'));\nvar glob = require('glob');\nvar hljs = require('../../build');\nvar path = require('path');\nvar utility = require...
javascript
edit
0
1
bsd-3-clause
45a9cc5a2d330c8c89a947627566fa0cda0a6be2
abhishekgahlot/highlight.js,aristidesstaffieri/highlight.js,Delermando/highlight.js,yxxme/highlight.js,MakeNowJust/highlight.js,Sannis/highlight.js,STRML/highlight.js,Delermando/highlight.js,bluepichu/highlight.js,carlokok/highlight.js,liang42hao/highlight.js,teambition/highlight.js,J2TeaM/highlight.js,kayyyy/highlight...
test/markup/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// JavaScript Document\n\n// Scripts written by __gulp_init__author_name @ __gulp_init__author_company\n\nimport Slideout from \"slideout\";\n\n// get the elements\nconst PANEL = document.getElementById(\"page-container\");\nconst MENU ...
javascript
edit
0
5
mit
196e973b703b9f1c86efd7594fab5c0cd3c6bbdd
JacobDB/new-site,JacobDB/new-site,revxx14/new-site,JacobDB/new-site,revxx14/new-site
src/assets/scripts/modern/slideout.init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport styled from 'styled-components'\n\nconst Wrapper = styled.div`\n margin-top: 2rem;\n`\n\nconst Key = styled.label`\n font-weight: 700;\n`\n\nconst Value = styled.label`\n word-break: break-all;\n`\n\...
javascript
edit
0
1
mit
e51b4152b15a75ca9b18cb6afd435926ac0b5086
joelgeorgev/file-hash-verifier,joelgeorgev/file-hash-verifier
src/components/FileDetails/FileDetails.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport BaseWorker from '../../base'\nimport twilio from 'twilio'\nimport path from 'path'\n\nconst client = new twilio.RestClient(\n process.env.TWILIO_SID,\n process.env.TWILIO_TOKEN\n)\n\nexport class TextMessage extends BaseWorker ...
javascript
edit
0
2
mit
03badb0a4760b8ee40e31373c56e50777349a815
craftship/phonebox,craftship/phonebox,craftship/phonebox
src/workers/egress/text_message/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Measurement from 'esri/dijit/Measurement';\nimport React, {\n Component,\n PropTypes\n} from 'react';\n\nexport default class InfoWindow extends Component {\n static contextTypes = {\n map: PropTypes.object.isRequired\n }\...
javascript
edit
0
8
mit
22edd37a0f8bf93f0bf1e3e86ffc8bcae9eda116
wri/gfw-mapbuilder,wri/gfw-mapbuilder,wri/gfw-mapbuilder
src/js/components/TabPanel/Measurement.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMeteor.publish('categories', function (name) {\n return Categories.find({\n name: { $regex: name }\n });\n});\n\nCategories.allow({\n insert: function(userId, doc){\n return true;\n },\n update: function(us...
javascript
edit
0
1
mit
5b6b999e55ed669070ccb7127ebbc1560828414d
be-ndee/notes-app,be-ndee/notes-app
server/categories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport Firebase from 'firebase';\n\nconst router = express.Router();\n\nrouter.post('/dump', (req, res) => {\n const distance = req.body.distance;\n const remoteAddress = req.body.remoteAddress;\n\n co...
javascript
edit
0
1
mit
14373be962e1f21d5bbff2b13b0462bdb834d401
sbekti/parkviz,sbekti/parkviz
server/routes/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar isError = require('es5-ext/lib/Error/is-error');\n\nmodule.exports = function (t, a) {\n\tvar week = t.create('Enumweektest', {\n\t\toptions: ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU']\n\t});\n\n\ta(week('MO'), 'MO'...
javascript
edit
0
1
mit
f795c21c0ea556f0c050fc15b1b68520799944c1
medikoo/dbjs
test/types-ext/string/string-line/enum.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _merge from 'lodash/merge'\nimport _template from 'lodash/template'\n\n/**\n * Send a request using axios. Designed to be used by Model and their instance\n *\n * @param {Object} caller Object that call this function\n * @param ...
javascript
edit
0
2
mit
e1115c1af7393ec5e284680c828a91d11f65bf21
alexandremagro/modele
src/core/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assert from 'assert';\nimport { parse } from 'graphql';\nimport { validate } from 'graphql/validation';\nimport { buildASTSchema } from 'graphql/utilities/buildASTSchema';\n\nimport { FieldsHaveDescriptions } from '../../src/rule...
javascript
edit
0
1
mit
960c0f871e387c9d623606314c663b2e66259830
cjoudrey/graphql-schema-linter
test/rules/fields_have_descriptions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport buble from 'rollup-plugin-buble';\n\nexport default {\n input: \"src/codemirror.js\",\n output: {\n banner: `// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirro...
javascript
edit
0
0
mit
6ec64f59cfd817ab1e8724c9e4b9a1498963e27d
mtaran-google/CodeMirror,pabloferz/CodeMirror,hackmdio/CodeMirror,pabloferz/CodeMirror,dperetti/CodeMirror,pabloferz/CodeMirror,hackmdio/CodeMirror,codio/CodeMirror,namin/CodeMirror,nightwing/CodeMirror,thomasjm/CodeMirror,nightwing/CodeMirror,dperetti/CodeMirror,namin/CodeMirror,mtaran-google/CodeMirror,notepadqq/Code...
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\r\n * @copyright © 2015, Rick Wong. All rights reserved.\r\n */\r\n\"use strict\";\r\n\r\nvar React = require(\"./react\");\r\nvar assign = React.__spread;\r\n\r\n/**\r\n * @function render\r\n */\r\nmodule.exports = function (Comp...
javascript
edit
0
3
bsd-3-clause
e1e1bbc6b366d441d4ef1a4cf4d6ca9996223097
brysgo/react-transmit,leonid-shevtsov/react-transmit,RickWong/react-transmit,alexeyraspopov/react-transmit,leonid-shevtsov/react-transmit,alexeyraspopov/react-transmit,RickWong/react-transmit,brysgo/react-transmit
src/lib/render.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst FS = require('fs');\nconst Child = require('child_process').execSync;\n\n// Copy local package files\nChild('npm run clean');\nChild('npm run compile');\nChild('npm run compile:module');\nChild('npm run compile:rollup');\nChild('n...
javascript
edit
0
0
mit
bbb7afd4468b72088eccdb0f085f010734f34c90
otalk/stanza.io,legastero/stanza.io,otalk/stanza.io,legastero/stanza.io
scripts/build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst glob = require(`glob`);\n\nconst buildArticleHtml = require(`./build/article-html.js`);\nconst buildBaseCss = require(`./build/base-css.js`);\nconst buildBaseHtml = require(`./build/base-html.js`);\nconst extractArticleData = requ...
javascript
edit
0
1
mit
ca4c1ed33e6169a6f5462fe781e76bf58203d327
maoberlehner/markus-oberlehner-net,maoberlehner/markus-oberlehner-net
scripts/build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function toggleHelpMenu () {\n // TODO\n}\n\nexport function toggleSaka () {\n try {\n browser.runtime.sendMessage(\n 'nbdfpcokndmapcollfpjdpjlabnibjdi',\n 'toggleSaka'\n )\n } catch (e) {\n console.error(\n...
javascript
edit
0
3
mit
acc391181995a16dcac3d5df0a0579b220726ab6
lusakasa/saka-key,lusakasa/saka-key
src/modes/command/client/commands/misc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport md from 'components/md'\n\nconst WhenToUseAttrs = () => md`\n ## When to use attrs?\n\n You can pass in attributes to styled components using [attrs](/docs/basics#attaching-additional-props), but\n it is not always sensible to...
javascript
edit
0
1
mit
41f89690312be521a90db8fd092eb619b883bf9c
styled-components/styled-components-website,styled-components/styled-components-website
sections/faqs/when-to-use-attrs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n createMessage,\n} from '../api/messaging';\n\n// Usage, assuming using Fluorine\n// dispatch(executeCell(id,source)(channels))\n\nexport default function kernelInfo(channels) {\n if (!channels || !channels.shell) {\n thr...
javascript
edit
0
3
bsd-3-clause
d4d728b18295cc91e1059681b5791fb2fcebcd8f
nteract/nteract,jdetle/nteract,jdetle/nteract,temogen/nteract,rgbkrk/nteract,0u812/nteract,jdfreder/nteract,jdfreder/nteract,0u812/nteract,nteract/composition,captainsafia/nteract,rgbkrk/nteract,rgbkrk/nteract,temogen/nteract,jdetle/nteract,nteract/nteract,captainsafia/nteract,nteract/nteract,0u812/nteract,jdfreder/nte...
src/notebook/api/messaging/kernel-info.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction insert_version_links() {\n var labels = ['dev', '0.7', '0.6', '0.5', '0.4', '0.3'];\n\n for (i = 0; i < labels.length; i++){\n open_list = '<li>'\n if (typeof(DOCUMENTATION_OPTIONS) !== 'undefined') {\n ...
javascript
edit
0
6
bsd-3-clause
37e8345dc86778b29c75352ad68e4e4fa6902d66
vighneshbirodkar/scikit-image,bsipocz/scikit-image,almarklein/scikit-image,Midafi/scikit-image,GaZ3ll3/scikit-image,WarrenWeckesser/scikits-image,dpshelio/scikit-image,jwiggins/scikit-image,rjeli/scikit-image,dpshelio/scikit-image,juliusbierk/scikit-image,newville/scikit-image,chriscrosscutler/scikit-image,jwiggins/sci...
doc/source/_static/docversions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n\t_moon.Button_ is an <a href=\"#enyo.Button\">enyo.Button</a> with Moonstone\n\tstyling applied. The color of the button may be customized by specifying a\n\tbackground color.\n\n\tFor more information, see the documentation on\n\...
javascript
edit
0
1
apache-2.0
d9c85070000c05c3237eb4ed93aaea3a254fed2e
mcanthony/moonstone,enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone
source/Button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { JSDOM } = require('jsdom');\n\nfunction getBrowserGlobals(html) {\n const dom = new JSDOM(html);\n const { window } = dom;\n const noop = function noop() {};\n\n const EventSource = noop;\n\n const navigator = {\n userAg...
javascript
edit
0
2
mit
f95e961379088dcb5883bb29ff879bce50f6ed3f
oblador/loki,oblador/loki,oblador/loki
src/targets/chrome/get-browser-globals.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Enzyme, {mount} from 'enzyme';\nimport {ProcessAttachments} from '../components/ProcessAttachments'; //import redux-independent component\nimport Adapter from '@wojtekmaj/enzyme-adapter-react-17';\n\nj...
javascript
edit
0
1
apache-2.0
65277619b53bf29abbc21a971094695d547e7998
TouK/nussknacker,TouK/nussknacker,TouK/nussknacker,TouK/nussknacker,TouK/nussknacker
ui/client/test/ProcessAttachments-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// DOM Manipulation Challenge\n\n\n// I worked on this challenge [by myself, with: ].\n\n\n// Add your JavaScript calls to this page:\n\n// Release 0:\n\n\n\n\n// Release 1:\n\n\n\n\n// Release 2:\n\n\n\n\n// Release 3:\n\n\n\n\n// Rele...
javascript
edit
0
0
mit
93997bcd8207d567131327f4b773bd108e99ddb0
dma315/phase-0,dma315/phase-0,dma315/phase-0
week-9/dom-manipulation/home_page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global assert */\nmodule.exports = function(runner, options) {\n var called = {};\n\n runner.on('setup', function (next) {\n console.log('called \"setup\"');\n called.setup = true;\n next(null);\n });\n ...
javascript
edit
0
1
mit
08e2f7143b556f8d635b4936373f7bd63d20b84c
themouette/screenstory
samples/extensions/function.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport PropTypes from 'proptypes'\n\nexport default {\n any: {\n options: {\n of: PropTypes.array.isRequired\n },\n parse(options, typeBuilders, schema) {\n const containsTypes = options.of.map(typeDef => {\n ...
javascript
edit
0
2
mit
7a93df93348c83a6c759d0af136e3d415382172a
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
src/types/bundled.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createAction } from 'redux-actions';\nimport { createThunkAction } from 'utils/redux';\nimport qs from 'query-string';\n\nconst fetchGhgEmissionsInit = createAction('fetchGhgEmissionsInit');\nconst fetchGhgEmissionsFail = creat...
javascript
edit
0
2
mit
3ec62bf0d143829d417e6f451ab88256551ee3a1
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
app/javascript/app/components/ghg-emissions/ghg-emissions-actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name SFcomic Viewer\n// @namespace \n// @version 0.2.1\n// @description Auto load comic picture.\n// @author AntonioTsai\n// @match http://comic.sfacg.com/*\n// @include http://c...
javascript
edit
0
2
mit
146901051de2547abf2d450c4ab49a201daf782b
AntonioTsai/SFcomic-Viewer
SFcomicViewer.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('arachne.widgets.directives')\n\n.directive('con10tSearchQuery', function() {\nreturn {\n restrict: 'A',\n link: function(scope, element, attrs) {\n\n attrs.$observe('con10tSearchQuery', func...
javascript
edit
0
2
apache-2.0
838ebb7e7194a27ebb8b9d63211903b741b67938
dainst/arachnefrontend,codarchlab/arachnefrontend,codarchlab/arachnefrontend,dainst/arachnefrontend
js/widgets/con10t_search_query.js
accepted
null
true