messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport { Button } from 'react-bootstrap'\nimport { connect } from 'react-redux'\n\nimport { planTrip, profileTrip } from '../../actions/api'\n\nclass PlanTripButton extends Component ... | javascript | edit | 0 | 3 | mit | 63664808b2e29f138478f3081eebd3f3a7409dae | opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux,opentripplanner/otp-react-redux | lib/components/form/plan-trip-button.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n\n\tprops: [\n\t\t'type',\n\t\t'index',\n\t\t'fields',\n\t\t'other'\n\t],\n\n\tdata() {\n\t\treturn this.fields;\n\t},\n\n\tcreated() {\n\t\tthis.watching = {};\n\t\tthis.watchFields(this.fields);\n\n\t\t// should only... | javascript | edit | 0 | 2 | mit | 4b8aff3d8fa7cb80926806a16c945d69e3aaa7b1 | unikent/astro,unikent/astro,unikent/astro,unikent/astro,unikent/astro | resources/assets/js/components/BaseBlock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction getTurnCount(state, robot, memory) {\n for (let turn = 0;; turn++) {\n if (state.parcels.length == 0) {\n return turn;\n }\n let action = robot(state, memory);\n state = state.move(acti... | javascript | edit | 0 | 3 | mit | bab11fc78f329d37e33ea7ba28803fa1bfedde7a | bewuethr/ctci | eloquent_js/chapter07/ch07_ex01.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable camelcase */\nimport styled from \"styled-components\";\nimport { colors } from \"constants/theme\";\n\nconst PropertyPane = styled.div`\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color... | javascript | edit | 0 | 0 | mit | 795a110d8cc095478e67cc8decf736f6ff8157b6 | ONSdigital/eq-author,ONSdigital/eq-author,ONSdigital/eq-author | src/components/PropertyPane/PropertyPane.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assert = require('assert');\nvar sinon = require('sinon');\n\nvar Api = require('../../lib/endpoints/api');\nvar Request = require('../../lib/request');\n\ndescribe('endpoints/api', function () {\n describe('list... | javascript | edit | 0 | 1 | mit | be544f76d4001bcf6bcf2fa80be5853031126c74 | jwilsson/glesys-api-node | test/endpoints/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nlet lastEval = undefined;\nlet ringBuffer = [];\n\nfunction createAPI() {\n const api = {\n $_: lastEval,\n };\n\n [ 0, 1, 2, 3, 4 ].forEach(idx =>\n api[`$${idx}`] = ringBuffer[idx]);\n\n return api;\n}\n\nOb... | javascript | edit | 0 | 3 | mit | b1d1be1104d7bdb620a96b635cd4240b2bbe6d8b | buggerjs/bugger,buggerjs/bugger,buggerjs/bugger | lib/agents/cli-api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = [\n ['console.log();', 'красноглазое.чмо() нах'],\n /**\n * Вхождения внутри слова\n *\n * https://github.com/samgozman/YoptaScript/issues/30\n */\n ['checking', 'checking'],\n ['form', 'form'],\n ['setting... | javascript | edit | 0 | 0 | mit | ea479d83185c2879f3140657c96e49c2cb3666bd | nfrigus/YoptaScript,nfrigus/YoptaScript,samgozman/YoptaScript,samgozman/YoptaScript | test/compile.cases.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * This is intended to start necessary effort for sync access to data for server-side rendering.\n */\n\nconst TopData = require('../../storage/top-stories.js');\nconst items = require('../../storage/items.js');\n\n... | javascript | edit | 0 | 1 | mit | 207a6ad31a89a3ffd1ffa0c25f5dc7ac237052b9 | kristoferbaxter/preact-hn,kristoferbaxter/preact-hn | src/restify/routes/api/provideRenderData.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['jquery', 'backbone', 'underscore', 'moxie.conf', 'hbs!places/templates/detail', 'hbs!places/templates/busrti', 'hbs!places/templates/trainrti'],\n function($, Backbone, _, conf, detailTemplate, busRTITemplate, trainRTITempla... | javascript | edit | 0 | 2 | apache-2.0 | cae46a681a6eb00a887daa9ddf4d285e96c1f67c | ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client,ox-it/moxie-js-client | app/places/views/DetailView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nglobal.process = { __proto__: process, pid: 123456 }\nDate.now = function () { return 1459875739796 }\nrequire('os').hostname = function () { return 'abcdefghijklmnopqr' }\nvar pino = require(require.resolve('./../../../'))\nvar log = p... | javascript | edit | 0 | 1 | mit | d30aeb96483c043e6d168041db536c008ccf1d6c | mcollina/pino | test/fixtures/events/no-event-loop.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar test = require('tape'),\n\tes2015 = require('babel-preset-es2015'),\n\tes2015Loose = require('..');\n\nvar LOOSE = { loose: true };\n\nvar PREFIX = 'transform-es2015-';\n\nvar SHOULD_BE_LOOSE = [\n\tPREFIX+'template-literals',\n\tPR... | javascript | edit | 0 | 4 | mit | 01a6256a22552e7b69d71c65f484a4c14ef34b60 | bkonkle/babel-preset-es2015-loose | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport main from '../'\nimport test from 'ava'\n\ntest('extends files', t => {\n const expected = [\n 'airbnb',\n 'wyze/base',\n 'wyze/rules/react',\n 'wyze/rules/jsx-a11y',\n ]\n\n t.deepEqual(main.extends, expected)\n})... | javascript | edit | 0 | 1 | mit | c52a6e1eb92bf034aa11f8dd5673125513a85102 | wyze/eslint-config-wyze | test/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Botkit = require('botkit');\nconst apiaibotkit = require('../api-ai-botkit');\n\nconst slackToken = process.env.SLACK_TOKEN;\nconst apiaiToken = process.env.APIAI_TOKEN;\n\nconst apiai = apiaibotkit(apiaiToken);\n... | javascript | edit | 0 | 1 | apache-2.0 | a24701fc2781e919a76ee4d7789286bcc4d6c239 | dialogflow/dialogflow-botkit-client | examples/sample_bot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nAccounts.onCreateUser(function(options, user) {\n if (Accounts.ui._options.onPostSignUpHook) {\n return Accounts.ui._options.onPostSignUpHook(options, user);\n }\n return user;\n});\n\n```\n\nApply this change: Allow for no change... | javascript | edit | 0 | 3 | mit | d20e9fee80b79510f3a1f71aced6465a8e8049fb | studiointeract/accounts-ui | imports/api/server/onPostSignUpHook.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst test = require('tap').test;\nconst TextToSpeech = require('../../src/extensions/scratch3_text2speech/index.js');\n\nconst fakeStage = {\n textToSpeechLanguage: null\n};\n\nconst fakeRuntime = {\n getTargetForStage: () => fak... | javascript | edit | 0 | 1 | bsd-3-clause | 64eace3b901435e8e5687c365c967d7c929bce73 | LLK/scratch-vm,LLK/scratch-vm,LLK/scratch-vm | test/unit/extension_text_to_speech.js | rejected_duplicate | Near-duplicate of sample 80435 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as ACTION_TYPES from '../constants/action_types'\nimport * as MAPPING_TYPES from '../constants/mapping_types'\nimport * as api from '../networking/api'\nimport * as StreamFilters from '../components/streams/StreamFilters'\nimpo... | javascript | edit | 0 | 1 | mit | d55c4daec8ee50ddd9164ab4c335614e4a002a9b | ello/webapp,ello/webapp,ello/webapp | src/actions/notifications.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport './App.scss';\nimport Component from 'react-pure-render/component';\nimport Footer from './Footer.react';\nimport Header from './Header.react';\nimport Helmet from 'react-helmet';\nimport React, { PropTypes } from 'react';\nimpor... | javascript | edit | 0 | 1 | mit | 1bff925e5b11f515a9712c751d96c8996c23444b | abelaska/este,robinpokorny/este,skallet/este,este/este,robinpokorny/este,amrsekilly/updatedEste,estaub/my-este,skallet/este,SidhNor/este-cordova-starter-kit,skallet/este,sikhote/davidsinclair,syroegkin/mikora.eu,christophediprima/este,TheoMer/este,syroegkin/mikora.eu,amrsekilly/updatedEste,este/este,vacuumlabs/este,amr... | src/browser/app/App.react.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\n\nmodule.exports = {\n\n line: function (browser, selector, index) {\n var lineInGroup = _.isNumber(index) ? '.group' + index : '';\n return function () {\n return browser\n .$(selector... | javascript | edit | 0 | 2 | mit | c63cd5fd35b6d985fd25b54d44cb3e0efdb45cf0 | alphagov/cheapseats | lib/tests/modules/graph/components.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport cli from 'cli';\nimport {Gpio} from 'chip-gpio';\nimport sensor from 'ds18x20';\n\nvar options = cli.parse();\n\nvar interval = 2000;\nvar threshold = 25;\n\nvar heater = new Gpio(0, 'out');\n\nfunction setHeater(on) {\n console... | javascript | edit | 0 | 3 | mit | 1dfc9ee6a1c2a3e8fb014a9e693c8a5d8b5cab0b | cinderblock/thermostat | thermostat.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport moment from 'moment';\n\nconst { computed, Logger:logger } = Ember;\n\nexport default Ember.Service.extend({\n _timeZone: null,\n\n locale: null,\n defaultFormat: null,\n\n init() {\n this._supe... | javascript | edit | 0 | 2 | mit | 80bcd503160fea3cf948303ca6c079ede159f7ae | stefanpenner/ember-moment,exop-group/ember-moment,stefanpenner/ember-moment,exop-group/ember-moment | addon/services/moment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\n\nclass SearchBar extends Component{\n\n constructor(props){\n super(props);\n\n this.state = { term : ''}; //оголошує обєкт\n console.log(this.state);\n }\n \n ... | javascript | edit | 0 | 1 | mit | b2c52e3ecc069bcaa9a92f6f9b86c7e712012b90 | iuriifaevskii/react-youtube-store,iuriifaevskii/react-youtube-store | src/components/search_bar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require jquery\n//= require handlebars.runtime\n//= require underscore/underscore\n//= require backbone/backbone\n//= require backbone/backbone.handlebars.adapter\n//= require marionette/backbone.babysitter\n//= require marionette/b... | javascript | edit | 0 | 0 | mit | a41fc842e4e25cd4bfc02bb1c51b36cc0f33e7e2 | yanotec/yano-backbone-rails | vendor/assets/javascripts/backbone.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.core',\n name: 'AxiomCloner',\n documentation: 'An axiom that clones an a... | javascript | edit | 0 | 0 | apache-2.0 | 5fdfc80f24d31de16f075c1048e729062e99d017 | foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2 | src/foam/core/AxiomCloner.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nclass BoardContainer extends Component {\n constructor() {\n \n }\n}\n\nexport default BoardContainer;\n\n```\n\nApply this change: Add method to generate random game of life board"
},... | javascript | edit | 0 | 3 | mit | 37a7b254bd696725a6a5969fb34502433043cdcd | mkermani144/freecodecamp-projects,mkermani144/freecodecamp-projects | game-of-life/src/BoardContainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport { compose } from 'redux';\nimport { connect } from 'react-redux';\nimport { dispatched } from '@webkom/react-prepare';\n\nimport UserSettingsNotifications from './components/UserSettingsNotifications';\nimport {\n fe... | javascript | edit | 0 | 1 | mit | f01212d6928a75817d07a5e930643cc6eec03d89 | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | app/routes/users/UserSettingsNotificationsRoute.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * PhantomJS\n */\nconditionizr.add('phantomjs', ['class'], function () {\n return /\\sPhantomJS\\/[[0-9]+\\]/.test(navigator.userAgent);\n});\n\n```\n\nApply this change: Fix PhantomJS test (remove 'class' from Array)"
},
{
... | javascript | edit | 0 | 1 | mit | 3ef4315612b29370ccc55abeacb1af95e96ad5bf | conditionizr/conditionizr,jillesme/conditionizr,jillesme/conditionizr,conditionizr/conditionizr | detects/phantomjs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {ApolloClient, HttpLink, InMemoryCache} from \"@apollo/client\"\n\nimport fetch from \"isomorphic-fetch\"\n\n/**\n * @typedef {import(\"@apollo/client\").NormalizedCacheObject} NormalizedCacheObject\n */\n\n/**\n * @type {ApolloC... | javascript | edit | 0 | 6 | mit | 42ec4db561623c9be33b3cd8969171f8a18a5c27 | octet-stream/eri,octet-stream/eri | lib/graphql/client/initializeApollo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequirejs.config({\n baseUrl: 'assets/js',\n paths: {\n 'jquery': '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min',\n 'bootstrap': '//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min',\n 'unde... | javascript | edit | 0 | 0 | mit | 2a096d956428458497610291a49c5f83f67a0a7c | joni-jones/yii2-wschat,joni-jones/yii2-wschat | assets/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a... | javascript | edit | 0 | 0 | mit | 188693f80cff1782b74325683d2a12502f8cc32e | aattsai/Pathway,aattsai/Pathway,aattsai/Pathway | pipeline/app/assets/javascripts/application.js | rejected_duplicate | Near-duplicate of sample 71086 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @providesModule ZeroProj.Redux.Store\n */\n\n/* eslint-disable no-underscore-dangle */\n\nimport { applyMiddleware, createStore } from 'redux';\nimport reducers from '../reducers';\n\n// export default createStore(\n// reducer... | javascript | edit | 0 | 0 | mit | 517af4d7985e10eaa0ff731859bff6bccfba6c95 | ethan605/react-native-zero,ethan605/react-native-zero,ethan605/react-native-zero | app/redux/store/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst Errors = require('../errors')\nconst Decal = require('../classes/Decal')\nconst User = require('../db').User\nconst Permission = require('../permission')\n\nclass HTTP {\n static check (request, response, next) {\... | javascript | edit | 0 | 4 | bsd-3-clause | f50f5b36c2cc5f5c0b8134965f9b3b89a292fa63 | FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com | api/controllers/decal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar runway = require('./runway.js')\nmodule.exports = runway\n\n\n\ndocument.onclick = function(event) {\n event = event || window.event // IE specials\n var target = event.target || event.srcElement // IE specials\n\n if (target.t... | javascript | edit | 0 | 4 | mit | 0fff202f5c64f47a78bf7faa834a53f5adc59b7a | rm-rf-etc/concise,rm-rf-etc/concise-demo,rm-rf-etc/concise-demo | libs/runway-browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const KERNEL_LENGTH = 20;\nexport const RENDER_QUANTUM = 128;\nexport const FRAME_SIZE = KERNEL_LENGTH * RENDER_QUANTUM;\nexport const QUEUE_SIZE = 40960;\n\n```\n\nApply this change: Add another blank like in constant.js file"
... | javascript | edit | 0 | 0 | apache-2.0 | 8d0e26262c3a0956751eb7b6049b9b2572cce11f | GoogleChromeLabs/web-audio-samples,GoogleChromeLabs/web-audio-samples,GoogleChromeLabs/web-audio-samples,GoogleChromeLabs/web-audio-samples | src/audio-worklet/free-queue/examples/simple-passthrough/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport AuthenticateRoute from 'wholetale/routes/authenticate';\n\nexport default AuthenticateRoute.extend({\n model() {\n\n return {\n tales: this.get('store').findAll('tale', {reload: true, adapterO... | javascript | edit | 0 | 1 | mit | 33e9eb150ca23d90393e88cb53da726d83e696ff | whole-tale/dashboard,whole-tale/dashboard,whole-tale/dashboard | app/routes/tale/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport { text, select, boolean } from '@storybook/addon-knobs';\nimport { action } from '@storybook/addon-actions';\nimport OptionsHelper from '../../utils/helpe... | javascript | edit | 0 | 1 | apache-2.0 | 36840a69e0e69eb3b007b3dadbe2135a5a03e751 | Sage/carbon,Sage/carbon,Sage/carbon | src/components/message/message.stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BaseDataview = require('./base');\n\nvar TYPE = 'list';\n\nvar listSqlTpl = ctx => `select ${ctx._columns} from (${ctx._query}) as _cdb_list`;\n\n/**\n{\n type: 'list',\n options: {\n columns: ['name', 'description']\n ... | javascript | edit | 0 | 2 | bsd-3-clause | 050e9776d1355e9c24fed37d71fe9ef32b583dc2 | CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb | lib/cartodb/models/dataview/list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst BaseDataview = require('./base');\nconst debug = require('debug')('windshaft:dataview:list');\n\nconst TYPE = 'list';\n\nconst listSqlTpl = ctx => `select ${ctx._columns} from (${ctx._query}) as _cdb_list`;\n\n/**\n{\n type: 'l... | javascript | edit | 0 | 2 | bsd-3-clause | 2a0b15f085d9c29a954544e15a2fb39dc580d35b | CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb | lib/cartodb/models/dataview/list.js | rejected_duplicate | Near-duplicate of sample 73739 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar DocsParser = require(\"../docsparser\");\nvar xregexp = require('../xregexp').XRegExp;\n\nfunction RustParser(settings) {\n DocsParser.call(this, settings);\n}\n\nRustParser.prototype = Object.create(DocsParser.prototype);\n\nRus... | javascript | edit | 0 | 2 | mit | 7e53cea181c5c2ea68e5a0a439c2f23f71d73a17 | NikhilKalige/docblockr | lib/languages/rust.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar program = require('commander');\nvar config = {\n api: require('./config/api.json'),\n app: require('./config/app.json'),\n version: require('./package.json').version\n};\n\nmain(\n program\n .version('... | javascript | edit | 0 | 2 | isc | de592c675558bba39eeab2c3a03f3e64170595eb | CodeMan99/wotblitz.js | wotblitz.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint strict: [\"error\", \"never\"] */\n\nconst getJsonFiles = require('./lib/getJsonFiles');\nconst { execSync } = require('child_process');\nconst path = require('path');\n\n// eslint-disable-next-line max-statements\nconst execJ... | javascript | edit | 0 | 4 | mit | cf74075defb57a24ddbb111222c4f4ff56d1cd40 | fabiencrassat/UserScripts | scripts/jsonlint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.files = {\n javascripts: {\n joinTo: {\n 'fateOfAllFools.js': /^(?!spec)/\n }\n },\n stylesheets: {\n joinTo: 'fateOfAllFools.css'\n }\n};\n\n/*\n Tests are handled by Karma. This is to silence a warning that ... | javascript | edit | 0 | 1 | mit | 38ddc2b650cf493df35e6d3d1cd61eccb901a471 | rslifka/fate_of_all_fools,rslifka/fate_of_all_fools | brunch-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Ajax link validator for VZ URL fieldtype\n// by Eli Van Zoeren (http://elivz.com)\njQuery(document).ready(function() {\n\tjQuery('.vz_url_field').blur(function() {\n\t\tfield = $(this);\n\t\tjQuery.get( \n\t\t\tFT_URL+'ff_vz_url/prox... | javascript | edit | 0 | 2 | mit | af3816f789e38989ec39c93307db2dc2c9b5a258 | elivz/vz_url,elivz/vz_url | extensions/fieldtypes/ff_vz_url/ff_vz_url.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { configure, addParameters } from '@storybook/vue';\n\n// Option defaults:\naddParameters({\n options: {\n name: 'Vue Visual',\n }\n})\n\n// automatically import all files ending in *.stories.js\nconst req = require.context(... | javascript | edit | 0 | 1 | mit | fe97cace3c3f03def6d25b5b0a7e4720fac63d61 | BKWLD/vue-visual | .storybook/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ncontract('Example', function(accounts) {\n it(\"should assert true\", function(done) {\n var example = Example.at(Example.deployed_address);\n assert.isTrue(true);\n done();\n });\n});\n\n```\n\nApply this change: Use Example... | javascript | edit | 0 | 1 | mit | f1d1997ea43ac131a2632f0cda3068647a089135 | ConsenSys/truffle | packages/truffle-core/templates/example.js | rejected_duplicate | Near-duplicate of sample 70310 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { map } from \"lodash-es\";\n\nimport { Alert } from \"../../base\";\n\nconst JobError = ({ error }) => {\n if (!error) {\n return null;\n }\n\n // Traceback from a Python exception.\... | javascript | edit | 0 | 3 | mit | 35f0bbce7c6d8221d95b19f365ecb4cb86994fdb | virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool | client/src/js/jobs/components/Error.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst React = require('react')\nconst { map, objOf, zipWith, merge, compose, indexBy, prop, converge, dissoc } = require('ramda')\n\nexport default ({ members, submit }) => {\n const onSubmit = (e) => {\n e.preventDefault()\n sub... | javascript | edit | 0 | 1 | mit | caf73e4296e2c16469a5113b1d16e99f25111ac0 | foundersandcoders/sail-back,foundersandcoders/sail-back | src/admin/dumb_components/custom_email_form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Interests = require('./interests.server.model.js');\nvar Q = require('q');\n\nmodule.exports = {\n add: function (req, res, next) {\n var interest = {};\n interest.id = req.body.id;\n //interest.user = req.user._id;\n\n ... | javascript | edit | 0 | 2 | mit | 60175d78ce0e732274ac8e764a0d92277bf758ce | drabinowitz/Brainstorm,ekeric13/Brainstorm,ekeric13/Brainstorm,HRR2-Brainstorm/Brainstorm,EJJ-Brainstorm/Brainstorm,EJJ-Brainstorm/Brainstorm,JulieMarie/Brainstorm,plauer/Brainstorm,JulieMarie/Brainstorm | server/interests/interestsController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar userSchema = new Schema({\n githubId: Number,\n name: String,\n avatar_url: String,\n projects: Array\n});\n\nmodule.exports = mongoose.model('User', userSche... | javascript | edit | 0 | 0 | apache-2.0 | 80fa0df141371e5b929726e9eabef959adcfed28 | with-regard/regard-website-api | schemas/userSchema.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//var Teachers = require('../models/teachers');\n//var TeacherClasses = require('../models/Teacher_classes');\n//var Classes = require('../models/classes');\n//var ClassLessons = require('../models/class_lessons');\n// var Lessons = req... | javascript | edit | 0 | 1 | mit | 227ec4c8bd245fc42e321a61e5b0c454675691e3 | shanemcgraw/thumbroll,Jakeyrob/thumbroll,absurdSquid/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll | server/controllers/students.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ASN_SVS = {};\n\n/* For the cancel button - if the user made progress, we need them to confirm that they want to discard their progress */\nASN_SVS.confirmDiscardOrSubmit = function(attachmentsModified)\n{\n\tvar inlineProgress = fa... | javascript | edit | 0 | 4 | apache-2.0 | 63e606aa152ce3baaea7f5638ee331c27f971039 | liubo404/sakai,pushyamig/sakai,zqian/sakai,wfuedu/sakai,noondaysun/sakai,duke-compsci290-spring2016/sakai,ouit0408/sakai,bzhouduke123/sakai,tl-its-umich-edu/sakai,kingmook/sakai,frasese/sakai,conder/sakai,whumph/sakai,udayg/sakai,Fudan-University/sakai,ouit0408/sakai,clhedrick/sakai,surya-janani/sakai,kwedoff1/sakai,ud... | assignment/assignment-tool/tool/src/webapp/js/studentViewSubmission.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\nvar config = require('./webpack.config');\n\nconfig.output = {\n path: './dist/',\n publicPath: '/',\n filename: '[name].bundle.js'\n};\nconfig.devServer = {\n contentB... | javascript | edit | 0 | 0 | mit | 854f71cc5514793246e3d5eb3e3b3e3f7876c28e | JavierPDev/AudioTime,JavierPDev/AudioTime | webpack.dev.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { render } from 'react-dom'\n\nfunction Hello () {\n return <div>Hello React JSX World! powered by Babel</div>\n}\n\nrender(\n <Hello />,\n document.getElementById('root')\n)\n\n```\n\nApply this cha... | javascript | edit | null | null | mit | fcf678a93b675cc5f43f17ce14b80d04f597c7ad | PedDavid/qip,PedDavid/qip,PedDavid/qip | WebClient/src/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Every time the form field is changed, sanitize its contents with the given\n * function to only allow input of a certain form.\n */\n(function ($) {\n var inputEvents = \"input\";\n if (!(\"oninput\" in document || \"oninpu... | javascript | edit | 0 | 3 | mit | 3b6579b6e934cbe5558d168d95208b0b6a329bcb | treyhunner/jquery-formrestrict | jquery.formrestrict.js | rejected_duplicate | Near-duplicate of sample 68028 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar bloodhound = new Bloodhound({\n datumTokenizer: Bloodhound.tokenizers.obj.whitespace,\n queryTokenizer: Bloodhound.tokenizers.whitespace,\n local: repositories,\n});\n\nfunction matchWithDefaults(q, sync) {\n if (q ===... | javascript | edit | 0 | 2 | apache-2.0 | 425e00ccac4a0d2bdd86fa99f3ad27b99d183be2 | Jucyio/Jucy,Jucyio/Jucy,Jucyio/Jucy | web/static/js/pick.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport mongoose, { Schema } from 'mongoose';\n\nconst userSchema = new Schema({\n first_name: { type: String, required: true },\n last_name: { type: String, required: true },\n email: { type: String, unique: true, required: tru... | javascript | edit | 0 | 0 | mit | c5dffe31e6de8a9db5392f222918598f5aa3bc87 | davidlamt/antfinder-api | models/users_model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n\t\"parser\": \"babel-eslint\",\n\t\"env\": {\n\t\t\"browser\": true\n\t},\n\t\"plugins\": [\n\t\t\"react\"\n\t],\n\t\"extends\": [\n\t\t\"eslint:recommended\",\n\t\t\"plugin:react/recommended\"\n\t],\n\t\"rules\": {... | javascript | edit | 0 | 0 | mit | 4eda1050e81c613f3e1a733d0f22e33baec8c8f3 | tomi/scrum-poker-cards,tomi/scrum-poker-cards,tomi/scrum-poker-cards | .eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'parser': 'babel-eslint',\n 'env': {\n 'browser': true,\n 'es6': true,\n 'node': true,\n },\n 'extends': 'eslint:recommended',\n 'installedESLint': true,\n 'parserOptions': {\n 'ecmaFeatures': {\n ... | javascript | edit | 0 | 0 | mit | 62048b323862016705e8b89466024dff0d60c8d6 | OddEssay/react-seed,OddEssay/react-seed | .eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserOptions\": {\n \"sourceType\": \"module\"\n },\n \"rules\": {\n \"i... | javascript | edit | 0 | 0 | mit | 135eff847339056712a184f96d8fe267581ac640 | solkaz/source-copy,solkaz/source-copy | .eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nconst LINE_BREAKS_REGEX = /(?:\\r\\n|\\r|\\n)/g\n\nexport default document.registerElement('textual-velocity-preview', {\n prototype: Object.assign(Object.create(HTMLElement.prototype), {\n\n updatePreview (path: stri... | javascript | edit | null | null | mit | af3f21f5a8fbec882f52b87b6444eb649f15fd1c | viddo/atom-textual-velocity,viddo/atom-textual-velocity,onezoomin/atom-textual-velocity | lib/preview-element.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Remove concourse elements\n// @namespace cloudpipeline.digital\n// @description Strips away some of the cruft from the concourse pipeline view when showing it on monitoring screens.\n// @include ... | javascript | edit | 0 | 2 | mit | cb370e544fbf2be6155a8b13d87e5f03cbed516c | jimconner/paas-cf,alphagov/paas-cf,jimconner/paas-cf,alphagov/paas-cf,jimconner/paas-cf,jimconner/paas-cf,alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf,alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf,alphagov/paas-cf,alphagov/paas-cf,jimconner/paas-cf | concourse/chrome_plugin/src/inject.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet React = require(\"react\")\nlet draggable = require('./higher_order_components/draggable')\nlet {div} = React.DOM\n\n@draggable\nexport default class extends React.Component {\n static defaultProps = Object.assign(require(\"../../d... | javascript | edit | 0 | 1 | mit | 2a1cf8d00952c0e567f42ee7604a932eeafd1971 | frig-js/frigging-bootstrap,frig-js/frigging-bootstrap | src/javascripts/components/color/hue_slider.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar validator = require('validator'),\n iz = require('iz');\n\nvar assessmentValidator = {};\n\nvar validate = function (assessment) {\n var toReturn = true;\n var results = [\n validator.isLength(assessment.id, 2),\n ... | javascript | edit | 0 | 2 | mit | 01a87aa7d86e1662970726ce7e9119cd67d88f4c | AdapTeach/code-assesser,AdapTeach/code-assesser | src/assess/assessmentValidator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst Generator = require('yeoman-generator')\nconst sort = require('sort-package-json')\n\nmodule.exports = class NodeModule extends Generator {\n configuring () {\n const {name, description, github, me} = this.opti... | javascript | edit | 0 | 1 | mit | 5bb05433463b570f2d4de693fbe736dfd1be9b1d | bendrucker/generator-bd | node-module/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport createContentfulAdapter from 'tux-adapter-contentful'\nimport tux from './middleware/tux'\nimport history from 'react-chain-history'\nimport createReactChain from 'react-chain'\nimport Home from './home... | javascript | edit | 0 | 1 | mit | 9d7e2254c57d99f87c8f984be5a2ce228a44a1a3 | aranja/tux,aranja/tux,aranja/tux | packages/tux-scripts/template/new/src/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals __DEFAULT_ROLLBARJS_URL__ */\n/* globals _rollbarConfig */\n\nvar RollbarShim = require('../shim').Rollbar;\nvar snippetCallback = require('../snippet_callback');\n\n_rollbarConfig.rollbarJsUrl = _rollbarConfig.rollbarJsUrl |... | javascript | edit | 0 | 0 | mit | 467a4fc68453eb098f8bb1f5bad4a893c0b71048 | rollbar/rollbar.js | src/bundles/rollbar.snippet.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {getField} from \"./getField\";\n\n/**\n * Creates a new object whose fields are either equal to obj[field]\n * or defaultValue.\n * Useful for extracting a subset of fields from an object.\n *\n * @param obj the object to q... | javascript | edit | 0 | 2 | apache-2.0 | a9a76cddfe7a2efef07c861c047f532768f7cc3e | googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020 | src/main/webapp/components/utils/getFields.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { HomeView } from 'routes/Home/components/HomeView'\nimport { render } from 'enzyme'\n\ndescribe('(View) Home', () => {\n let _component\n\n beforeEach(() => {\n _component = render(<HomeView />)\n... | javascript | edit | 0 | 1 | mit | 605f57f681e4f94297167b5800756d2c0e8722fd | rojasmi1/ArtCR,rojasmi1/ArtCR | tests/routes/Home/components/HomeView.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path')\n , fs = require('fs')\n ;\n\n/**\n * Reads all the JavaScript files within a directory, assuming they are all \n * proper node.js modules, and loads them. \n * @return {Array} Modules loaded.\n */\nfunction... | javascript | edit | 0 | 6 | mit | 0a5aa52dd3f41ed5c2a1caa03655e3044b3207b3 | numenta/nupic.wallboard,rhyolight/nupic.wallboard,numenta/nupic.wallboard,rhyolight/nupic.wallboard | server/utils/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n /**\n * Get computed style of an element.\n * @param {Element} element\n * @return {Object} computerd style object\n */\n getComputedStyle(element) {\n return element.currentStyle || getComputedStyle(elem... | javascript | edit | 0 | 3 | mit | 148481a8941c168d5018fb74c77a54dc9f2c6c87 | nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note | sashimi-webapp/src/helpers/domUtils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst ldap = require(\"ldapjs\");\n\nconst parseLdapFilter = function (filterString) {\n try {\n const filter = ldap.parseFilter(filterString);\n return { filter: filter, isValid: true };\n } catch (err) {\n console.log(err.m... | javascript | edit | 0 | 2 | mit | 2f1af4046157331738e63de86fd50c724252779b | auth0/ad-ldap-connector | lib/parseLdapFilter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst randomSubs = ['random', 'randnsfw', 'myrandom'];\nconst fakeSubs = ['all', 'mod', 'friends'].concat(randomSubs);\n\nexport { fakeSubs, randomSubs };\n\nexport default function isFakeSubreddit(subredditName) {\n return !!subreddit... | javascript | edit | 0 | 3 | mit | 2d8b5dc24fdc677d634edb9ae24f35cdcc8d9aa6 | uzi/reddit-mobile,madbook/reddit-mobile,madbook/reddit-mobile,uzi/reddit-mobile,uzi/reddit-mobile,madbook/reddit-mobile | src/lib/isFakeSubreddit.es6.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport {\n AppRegistry,\n StyleSheet,\n Container,\n TextInput,\n Label,\n Text,\n View,\n Button,\n } from 'react-native';\n\nexport default class LoginScreen extends Component {\n s... | javascript | edit | 0 | 1 | mit | 7e5bb2069ac3f6a3f42773d52942e53c709b21d5 | nyc-fiery-skippers-2017/AwesomeProject,nyc-fiery-skippers-2017/AwesomeProject,nyc-fiery-skippers-2017/AwesomeProject | Users/Login.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar NativeStorageError = require('./NativeStorageError');\n\n// args = [reference, variable]\nfunction LocalStorageHandle(success, error, intent, operation, args) {\n var reference = args[0];\n var variable = args[1];\n\n if (o... | javascript | edit | 0 | 11 | apache-2.0 | 2bba64bf352c3897cc21157e9af41fb903e68f51 | TheCocoaProject/cordova-plugin-nativestorage,TheCocoaProject/cordova-plugin-nativestorage | www/LocalStorageHandle.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n var share = new Share(\"#share-button-top\", {\n networks: {\n facebook: {\n app_id: \"1604147083144211\",\n }\n }\n });\n\n\n var winWidth = $(window).width();\n\n var stickyHeader = function... | javascript | edit | 0 | 2 | mit | 14bb729bccbe95e14ff601c4aed94240be8b33e3 | seffw/headlesscms.org,seffw/headlesscms.org | site/static/js/all.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Component = require('./Component');\n\nmodule.exports = Component.extend({\n\n getName() {\n let name = this.get('tagName');\n let customName = this.get('custom-name');\n name = name.charAt(0).toUpperCase() + name.slice(1)... | javascript | edit | 0 | 3 | bsd-3-clause | 24a85bb40594bda3fe30d401cdba639a0bccfc25 | QuorumDMS/grapesjs,artf/grapesjs,artf/grapesjs,artf/grapesjs,QuorumDMS/grapesjs | src/dom_components/model/ComponentSvg.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//@flow\n\nimport React from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { pure, compose, withState, withHandlers } from \"recompose\";\nimport { ThemeProvider } from \"styled-components\";\nimport mainTheme from \"..... | javascript | edit | null | null | mit | 21ec062c9a6c9661b7a3808fbbbaf1681701760a | slightly-askew/portfolio-2017,slightly-askew/portfolio-2017 | src/elements/linkedin-icon/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n* ViewData.js\n*\n* @description :: This model represents the data for all the video statistics.\n* @docs :: http://sailsjs.org/#!documentation/models\n*/\n\nmodule.exports = {\n\tattributes: {\n\t\tcoordinates: {\n\t\t\ttyp... | javascript | edit | 0 | 0 | mit | 486d0867d9bf4e5cf3b7ed874d5d7ffd5560ac29 | nus-mtp/zoomable.js,nus-mtp/zoomable.js,nus-mtp/zoomable.js | api/models/ViewData.js | rejected_duplicate | Near-duplicate of sample 76851 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport findit from 'findit'\nimport path from 'path'\nimport fs from 'fs'\n\nexport default () => {\n const finder = findit(path.join(process.cwd(), 'node_modules'))\n\n finder.on('link', link => {\n if (link.indexOf('.bin') !== -1... | javascript | edit | 0 | 2 | mit | 8d455015a6a8783fa6d91ce94a5e9b113dc9a71c | momentumft/navy,momentumft/navy,momentumft/navy | packages/navy-plugin-nodejs/src/hooks/rewrite-linked-node-modules.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @class Denkmal_App\n * @extends CM_App\n */\nvar Denkmal_App = CM_App.extend({\n\n ready: function() {\n CM_App.prototype.ready.call(this);\n\n this._registerServiceWorker();\n },\n\n _registerServiceWorker: function() ... | javascript | edit | 0 | 3 | mit | d94e82f2ecc69c069c934fd091f1cea1fe5b46ae | denkmal/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,njam/denkmal.org,njam/denkmal.org,njam/denkmal.org,njam/denkmal.org,denkmal/denkmal.org | library/Denkmal/library/Denkmal/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport request from 'ic-ajax';\nimport ENV from './../config/environment';\nvar run = Ember.run;\n\nconst POLL_INTERVAL = 15 * 1000;\n\nexport default Ember.Route.extend({\n pendingRefresh: null,\n\n model:... | javascript | edit | 0 | 1 | mit | 184a0341b5b8303f1966fd6ef3cbedf8033a2d8b | bus-detective/web-client,bus-detective/web-client | app/routes/arrivals.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst i18next = require('i18next');\nconst i18nextXHRBackend = require('i18next-xhr-backend');\nconst jqueryI18next = require('jquery-i18next');\n\ni18next\n.use(i18nextXHRBackend)\n.init({\n fallbackLng: 'en-US',\n debug: false,\... | javascript | edit | 0 | 1 | mit | 3184bfa7bd52cc6d9231d1956a45136ba3d4b600 | deimos-initiative/deimos-asset-issuer,deimos-initiative/deimos-asset-issuer | app/js/translations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar indexOf = require( '@stdlib/utils/index-of' );\nvar orders = require( '@stdlib/types/ndarray/base/orders' );\n\n\n// VARIABLES //\n\nvar ORDERS = orders();\n\n\n// MAIN //\n\n/**\n* Tests whether an... | javascript | edit | 0 | 3 | apache-2.0 | e06d72d3ede08b786e06c734f2ecd8ff592e60b5 | 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/types/ndarray/base/assert/is-order/lib/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\n\n/**\n * Returns copy of an object with mapped values. Works really similar to\n * lodash's mapValues, with difference that also EVERY nested object is\n * also mapped with passed function.\n *\n * @param {Obje... | javascript | edit | 0 | 3 | mit | e7aea7c181a5a7619d0756e4e02f7694446c9289 | devlucky/Kakapo.js,devlucky/Kakapo.js | src/helpers/util.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction getRoute(path, subComponentName) {\n return {\n path: path,\n subComponentName: subComponentName,\n getComponents(location, cb) {\n require.ensure([], (require) => {\n cb(null, require('../../components/vi... | javascript | edit | 0 | 1 | mit | 21170be839a7ace82dcd5cb59b10071e3df95672 | ello/webapp,ello/webapp,ello/webapp | src/routes/onboarding/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Addon that extends ember-data with ember-flexberry-projections to support work in offline mode.\n *\n * @module ember-flexberry-offline\n * @main ember-flexberry-offline\n */\n\nimport Model from './models/model';\nimport Offlin... | javascript | edit | 0 | 0 | mit | d3b90c66aa2b2aa12265759e05142d46d98703e8 | Flexberry/ember-flexberry-offline,Flexberry/ember-flexberry-offline | addon/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('scrambler tests', function(){\n beforeEach(function() {\n fixture.setBase('fixtures')\n });\n\n beforeEach(function(){\n this.sample = fixture.load('sample.html');\n\n runSpy = spyOn(scrambler._sc... | javascript | edit | 0 | 1 | mit | 284f33c5784ddf56813eb75fbce8e17568f7c870 | grudelsud/ScramblerJS,RufousWork/ScramblerJS,RufousWork/ScramblerJS,grudelsud/ScramblerJS | app/tests/scrambler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n plugins: ['@babel/plugin-proposal-async-generator-functions'],\n env: {\n es: {\n plugins: ['./babel-plugin-pure-curry']\n },\n cjs: {\n plugins: [\n 'add-module-exports',\n '@babe... | javascript | edit | 0 | 0 | mit | d3887cee9624f8cdefd243649d3280ad2231aff8 | sithmel/iter-tools,sithmel/iter-tools | babel-es2015.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// jshint node:true\n\n// For details on each option run `ember help release`\nmodule.exports = {\n\n // ember style guide: https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md#commit-tagging\n // angular style guide: https... | javascript | edit | 0 | 0 | mit | 5cbd75f443a87c9a966ffe0320d8258c6691d4ba | runspired/ember-cli-changelog,runspired/ember-cli-changelog | blueprints/ember-cli-changelog/files/config/changelog.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Service for the spec config.\n// We keep this separate so that changes are kept even if the spec changes.\nangular.module('vlui')\n .factory('Config', function() {\n var Config = {};\n\n Config.data = {};\n ... | javascript | edit | 0 | 2 | bsd-3-clause | be6bc61e0be6226af1c1b6fbbee0ffbfee38248c | uwdata/vega-lite-ui,vega/vega-lite-ui,uwdata/vega-lite-ui,uwdata/vega-lite-ui,vega/vega-lite-ui,vega/vega-lite-ui | src/services/config/config.service.js | rejected_duplicate | Near-duplicate of sample 102467 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst request = require('request');\n\n/**\n * Function checks that a string given is string with some number of\n * characters\n *\n * @params {string} str string value to check for validity\n * @return true if the string is valid; o... | javascript | edit | 0 | 6 | mit | 9494ce3faf614483079b6bfe85ae1f48e8373e22 | tsangjustin/CS546-Product_Forum,tsangjustin/CS546-Product_Forum | data/clothing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar senecaOptions = {\n transport: {\n web: {\n port: process.env.PORT || 8080\n }\n },\n apiBaseUrl: process.env.API_BASE_URL || 'http://localhost:3000',\n apiSecret: process.env.AP... | javascript | edit | 0 | 0 | mit | 077242d046e3e755ff82ba4b29cce2477fd50bea | CoderDojo/cp-badges-service,bmatthews68/cp-badges-service,CoderDojo/cp-badges-service,bmatthews68/cp-badges-service | config/seneca-options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar WebpackDevServer = require('webpack-dev-server');\nvar config = require('./webpack.config');\n\nnew WebpackDevServer(webpack(config), {\n publicPath: config.output.publicPath,\n hot: true,\n his... | javascript | edit | 0 | 2 | mit | 69a349f1865e59c5751e6ec685e41b57bb1b1f9a | nhabuiduc/react-filter-box,nhabuiduc/react-filter-box,nhabuiduc/react-filter-box | js-example/server.js | rejected_duplicate | Near-duplicate of sample 96418 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst storage = require('../storage')\nconst fixtures = require('./fixtures')\n\nconst recipes = fixtures.createRecipes(10)\n\nfunction save (recipe) {\n return storage.put(recipe.id, recipe)\n}\n\nstorage.connec... | javascript | edit | 0 | 1 | mit | d72326fe7646a6c44d08637141f7df5f7d293fb7 | ruiquelhas/electron-recipes,ruiquelhas/electron-recipes | src/helpers/seeder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* uses schwartzian transform to sort the selected elements in-place */\n(function($) {\n\t$.fn.sortBy = function(sortfn) {\n\t\tvar values = [],\n\t\t\t$self = this;\n\n\t\tthis.children().each(function(i,o) {\n\t\t\tvalues.push([ $(o)... | javascript | edit | 0 | 3 | bsd-2-clause | 08eaac64daa1b7bb5137261967cd7c655b7dbc1f | propcom/jquery-sortBy | jquery.sortBy-0.1.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by Omnius on 6/27/16.\n */\nconst submitForm = () => {\n\n // TODO: Supposedly needs sanitation using ESAPI.encoder().encodeForJavascript() or some other sanitation\n // mechanism on inputUsername and inputPassword... | javascript | edit | 0 | 2 | mit | 989a705f204a2a6078475493650d30e569cdaf0d | identityclash/hapi-login-test,identityclash/hapi-login-test | views/js/helpers/login/loginsubmitter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow\n */\n\n'use strict';... | javascript | edit | null | null | bsd-3-clause | 96f19a3d8937b075080ad70d304ecfa4136b6ff9 | hammerandchisel/react-native,arthuralee/react-native,hoangpham95/react-native,facebook/react-native,javache/react-native,facebook/react-native,exponent/react-native,exponentjs/react-native,janicduplessis/react-native,pandiaraj44/react-native,exponent/react-native,javache/react-native,exponent/react-native,myntra/react-... | Libraries/Utilities/RCTLog.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport PropTypes from 'prop-types'\nimport React from 'react'\nimport {diffJson} from 'diff'\nimport styles from './styles/Diff.css'\n\nfunction getDiffStatKey(part) {\n if (part.added) {\n return 'added'\n }\n if (part.removed) {... | javascript | edit | 0 | 3 | mit | 54b9597c9a01ed7904d0b9ed12cb46cbe211e7b8 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/desk-tool/src/components/Diff.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n \"use strict\";\n\n $(function(){\n if($('#fluent-log').length === 0) return;\n\n new Vue({\n el: \"#fluent-log\",\n paramAttributes: [\"logUrl\"],\n data: {\n \"autoFetch\": false,\n ... | javascript | edit | 0 | 2 | apache-2.0 | 0b36c6109e9a96403d6c779c56c1b1482df0a48f | fluent/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui,mt0803/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui | app/assets/javascripts/vue/fluent_log.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BridgeDb = require('../index.js');\n\nvar bridgeDb1 = BridgeDb({\n apiUrlStub: 'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb.php',\n dataSourcesUrl:\n 'http://pointer.ucsf.edu/d3/r/data-sources/bridgedb-datasources.php'\n... | javascript | edit | 0 | 1 | apache-2.0 | 78b7f1ec0a9309dbbac47e566478912224e3494d | bridgedb/bridgedbjs,bridgedb/bridgedbjs,bridgedb/bridgedbjs | test/manual-tests/get-data-sources.js | rejected_duplicate | Near-duplicate of sample 80134 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n store_url: 'http://localhost:8080',\n account_user: 'test',\n account_password: 'testing',\n account_name: 'tester',\n container_name: 'test_container',\n object_name: 'test_object',\n segment_c... | javascript | edit | 0 | 0 | mit | 29bdb0a226c76279193033bf2d0e777381d2a870 | Tezirg/os2 | tests/test.config.circle-ci.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.