messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar cookie = require('cookie');\n\n/*\n * A class that encapsulates information about the\n * current HTTP request from FastBoot. This is injected\n * on to the FastBoot service.\n */\nfunction FastBootInfo(request, response) {\n this.... | javascript | edit | 0 | 3 | mit | 1f073dd0b02ee9d8fc9a7daf4ebd08aacc6f31fe | ember-fastboot/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot | lib/fastboot-info.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nimport toggleClassName from '../helper/toggle-class-name';\n\natom.config.observe('atom-material-ui.tabs.tintedTabBar', (value) => {\n toggleClassName('amu-tinted-tab-bar', value);\n\n if (!value) {\n atom.c... | javascript | edit | 0 | 1 | mit | 68031ef189b9a013916fc397ab8b4fb5dd23ffd7 | atom-material/atom-material-ui,thunsaker/atom-material-ui,silvestreh/atom-material-ui | lib/tab-bar/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nclass SearchBar extends Component {\n render(){\n return <input onChange={ event => console.log(event.target.value)} />;\n }\n}\n\nexport default SearchBar;\n\n```\n\nApply this change: ... | javascript | edit | 0 | 1 | mit | 7a157aa36025d5824e0f1db7c9e83ceb7524dfc5 | bryanbuitrago/reactVideoApp,bryanbuitrago/reactVideoApp | src/components/search_bar.js | rejected_duplicate | Near-duplicate of sample 90950 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*======================================================================\n * Exhibit auto-create\n * Code to automatically create the database, load the data links in\n * <head>, and then to create an exhibit if there's no ex:ondatal... | javascript | edit | 0 | 6 | bsd-3-clause | 2f97b9a6dd3ea03138c4f8c7c52df92f2d5c5c73 | zepheira/exhibit,zepheira/exhibit,zepheira/exhibit,zepheira/exhibit,zepheira/exhibit,zepheira/exhibit | src/webapp/api/scripts/create.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as Primitive from \"./primitive.js\";\n\nexport\nfunction isEqual(v1, v2) {\n if (Primitive.check(v1)) {\n\treturn v1.equals(v2);\n } else {\n\treturn v1 === v2;\n }\n}\n\n\nexport\nfunction isEq(v1, v2) {\n /* FIXM... | javascript | edit | 0 | 2 | mit | bc1a9d775a09a1ab61351968abfb4d615af03212 | vishesh/racketscript,vishesh/racketscript,vishesh/racketscript | src/runtime/core/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { connect } from 'stripes-connect';\nimport PatronForm from './PatronForm';\n\n// One of multiple stripes-connected components in the patrons module\nexport default class Patr... | javascript | edit | 0 | 1 | apache-2.0 | e913429cfbcd11dbaa9610f89d69b2747e28ca1b | folio-org/stripes-experiments,folio-org/stripes-experiments | patrons/PatronAdd.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { omit } = require('../../../../../../../utilities');\n\n// Create nested models definitions\nconst getNestedModel = function (def, { inputObjectType, topDef }) {\n const { target } = def;\n\n // Only for nested... | javascript | edit | 0 | 3 | apache-2.0 | 0e598d07ec27117cfe46628968b185a287bcf275 | autoserver-org/autoserver,autoserver-org/autoserver | src/operations/handlers/graphql/compile/schema/types/object/nested_models.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Create new object with same values, but remapped keys\n\n'use strict';\n\nvar f = require('../../Function/functionalize')\n , forEach = require('./for-each').call;\n\nmodule.exports = f(function (callback, scope) {\n\tvar o = ... | javascript | edit | 0 | 1 | isc | 82a7a49cbfb6ce226afaba556d8372c6600f67a6 | medikoo/es5-ext | lib/Object/plain/keys-map.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([], function () {\n\n var refInput = {\n\n init: function (canvas) {\n this.canvas = canvas.getElement();\n return this;\n },\n\n on: function (eventName, fn) {\n switch (e... | javascript | edit | 0 | 2 | mit | 4261a6084422347202f85a7380b32b14215a1191 | WebSeed/grobo.js | js/input.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n Application route for Discourse\n\n @class ApplicationRoute\n @extends Ember.Route\n @namespace Discourse\n @module Discourse\n**/\nDiscourse.ApplicationRoute = Em.Route.extend({\n\n events: {\n showLogin: function() {\n ... | javascript | edit | 0 | 3 | mit | a53f958c78d626b94b316dd0277fd94049f381f1 | tadp/learnswift,tadp/learnswift,tadp/learnswift,natefinch/discourse,natefinch/discourse | app/assets/javascripts/discourse/routes/application_route.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {CheckableComponentViewModel} from './mdc-knockout-base';\nimport template from './templates/checkbox.html';\n\nexport default class CheckboxViewModel extends CheckableComponentViewModel {\n initialize () {\n const checked = ... | javascript | edit | 0 | 3 | apache-2.0 | 537d9d131ffc0236b111f7cea0cfb2d4e418e743 | anton-kachurin/mdc-knockout,anton-kachurin/mdc-knockout | src/mdc-knockout-checkbox.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('ng').filter('formatNumber', function () {\n return function (value) {\n return numeral(value).format('0,0');\n }\n});\nangular.module('ng').filter('formatMs', function () {\n return function (value) {\n ... | javascript | edit | 0 | 1 | mit | a1ee1f9d581272c8386f59ed79621f1b64f96820 | knutin/statman_elli,knutin/statman_elli | priv/docroot/filters.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst logger = require('../logger')\r\nconst slackEncoder = require('../slack-encoder')\r\n\r\nmodule.exports = (controller) => {\r\n\r\n controller.hears([/encode base64 (.*)$/i,], ['direct_message','direct_mention'], (bot, message) =... | javascript | edit | 0 | 1 | mit | 732a3550b8953442f3bec53a853fe4d4d3d85930 | allan-stewart/jarvis | src/skills/encode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar GOVUK = GOVUK || {};\nGOVUK.Analytics = GOVUK.Analytics || {};\nGOVUK.Analytics.Trackers = {};\n\n/*\n * Available methods on control:\n * - trackTimeBasedSuccess(millisecondsUntilSuccess)\n * - trackLinks(linkSelector)\n */\nGOVUK.... | javascript | edit | 0 | 1 | mit | cc54ade08006172d79f53dca9e62c071917ef229 | tadast/static,robinwhittleton/static,tadast/static,robinwhittleton/static,alphagov/static,kalleth/static,kalleth/static,tadast/static,tadast/static,robinwhittleton/static,kalleth/static,alphagov/static,alphagov/static,robinwhittleton/static,kalleth/static | app/assets/javascripts/analytics/tracking-strategies.js | rejected_duplicate | Near-duplicate of sample 83648 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nHNSpecial.settings.registerModule(\"hide_downvote\", function () {\n function hideDownvoteButton () {\n var arrows = _.toArray(document.getElementsByClassName('votearrow'));\n\n arrows.forEach(function(arrow) {\n if (arrow.c... | javascript | edit | 0 | 2 | mit | 78bd04f1e9bf526a47e2695eabd93a2c369a2c5b | gabrielecirulli/hn-special,gabrielecirulli/hn-special,gabrielecirulli/hn-special | lib/modules/hide_downvote.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport toSlate from './conversion/toSlate'\nimport fromSlate from './conversion/fromSlate'\n\nexport default class SlateValueContainer {\n static deserialize(value, context) {\n const state = toSlate(value || [], context)\n\n ret... | javascript | edit | 0 | 3 | mit | e1afadb218db24d86e8e6413116004bbe7a07342 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | src/inputs/BlockEditor-slate/SlateValueContainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* PSEUDO CODE FOR LOGIN MENU\n\n1. COLLECT DATA ENTERED INTO THE <INPUT>\n2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED?\n*/\n\n\n;(function(){\n angular.module('Front-Rails', [ ])\n\n.run(function($htt... | javascript | edit | 0 | 1 | mit | 756ef8dc15af55ece6ef33b2b6719683c6eb00ac | front-rails/GUI,front-rails/GUI | src/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.methods({\n\tgameDelete: function(game) {\n\t\tcheck(game, {\n\t\t\t_id: String\n\t\t});\n\t\tGames.remove({\n\t\t\t_id: game.id\n\t\t});\n\t}\n});\n\n```\n\nApply this change: Fix key for the method"
},
{
"role": "assist... | javascript | edit | 0 | 1 | mit | c67c6734200ed5c3afb1d3734110e56d17cdb94f | jeremyfourna/basket-live-stats,jeremyfourna/basket-live-stats | lib/collections/gamesMethods/gameDelete.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet handle = setInterval(updateTimestamps, 90000);\n\nfunction updateTimestamps() {\n let first = true;\n\n $(\".humantime\").each(function () {\n var $time = $(this);\n\n $.get('/humantime', { stamp: this.dataset.stamp, first: ... | javascript | edit | 0 | 3 | mit | 4adf0ed2989ccbba251070a792634f68443ada2e | JulianNicholls/ruby-rss-reader,JulianNicholls/ruby-rss-reader,JulianNicholls/ruby-rss-reader | public/js/rss-reader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst axios = require('axios')\n\nconst { EmptyHttpResponseError, NotFoundError } = require('./errors')\n\nmodule.exports = async function request(url) {\n const response = await axios({\n url,\n headers: {\n 'User-Agent': '... | javascript | edit | 0 | 6 | mit | e65b1ee42bc246938f098135424e4df1efaf952b | relekang/micro-rss-parser | src/request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nlet mocha = require('mocha');\nlet should = require('should');\n//apply the plugin\nconst syllables = require('../../src/index.js');\nconst nlp = require('nlp_compromise');\nnlp.plugin(syllables);\n\ndescribe('syllables',... | javascript | edit | 0 | 1 | mit | b8f57eded699fc88917312104c65853948a0e69a | nlp-compromise/nlp-syllables,nlp-compromise/nlp-syllables | test/unit_tests/syllables.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('progress-button directive', function() {\n\tvar element, scope\n\n\tbeforeEach(function() {\n\t\tmodule('progressButton')\n\n\t\tinject(function($rootScope, $compile) {\n\t\t\tscope = $rootScope.$new()\n\t\t})\n\t})\n\n\tfunct... | javascript | edit | 0 | 1 | bsd-2-clause | 722c257795b1fbd236d91a13e153e5d5dfc06bb0 | SonicHedgehog/angular-progress-button,SonicHedgehog/angular-progress-button | test/progress-button.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nE2.p = E2.plugins[\"scale_xyz_matrix\"] = function(core, node)\n{\n\tthis.desc = 'Create a matrix that scales the X, Y and Z axis.';\n\t\n\tthis.input_slots = [ \n\t\t{ name: 'x', dt: core.datatypes.FLOAT, desc: 'Amount to scale the X-a... | javascript | edit | 0 | 1 | mit | 0ce58e0ac6b35469509d24fd2a2b571f151cbea5 | vizorvr/patches,vizorvr/patches,vizorvr/vizor,vizorvr/vizor,vizorvr/vizor-create,vizorvr/vizor,engijs/engi,beni55/engi,vizorvr/vizor-create,vizorvr/vizor-create,vizorvr/patches,vizorvr/patches,beni55/engi,engijs/engi,beni55/engi,vizorvr/patches,engijs/engi | browser/plugins/scale_xyz_matrix.plugin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n var links = $(\"#gamelist h1 a\").map(function() {\n var gameName = this.text;\n var baseUrl = this.baseURI.substring(0, this.baseURI.lastIndexOf(\"/\"));\n this.href = baseUrl + \"/\" + gameName... | javascript | edit | 0 | 1 | mit | 11db5423d70b75b7794dfdc1163be9e5ed3f5ac0 | nspforever/bh | js/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction MtkWindow (settings) {\n MtkContainer.call (this, settings);\n\n this.Xaml = this.Control.Content.Root;\n this.Realize ();\n\n this.Override (\"OnSizeAllocationRequest\", function () {\n var self = this;\n ... | javascript | edit | null | null | mit | c9642a1600404e8a67395590ef83ea7cb5d728b0 | abock/moonshine,abock/moonshine,abock/moonshine,abock/moonshine | toolkit/mtk/mtk-window.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar div = React.DOM.div\nvar h1 = React.DOM.h1\n\nvar MyTitle = React.createClass({\n render () {\n return (\n div(null,\n h1({style: {color: this.props.color}}, this.props.title)\n )\n )\n }\n})\n\nvar MyTitleF... | javascript | edit | 0 | 1 | mit | e5e99239d4908f8d482507df183394b545be3cc7 | bencodezen/cloneflix-react-with-bholt,bencodezen/cloneflix-react-with-bholt | js/ClientApp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function checkCookieConsent(rq, rs, nx) {\n if (rq.originalUrl.startsWith(\"/static\")) return nx(); // prevent the data consent from loading on static files\n if (rq.originalUrl.startsWith(\"/acceptcookie\")) ret... | javascript | edit | 0 | 6 | mit | b3844dee0c03ef3300b2951f91f6cce8d3c9f290 | TTtie/TTtie-Bot,TTtie/TTtie-Bot,TTtie/TTtie-Bot | webserver/util/cookies.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction updateUserList(dyDB, table, userId, cb) {\n\n\tdyDB.putItem({\n\t\t\"TableName\": table,\n\t\t\"Item\": {\n\t\t\t\"user_id\": {\"S\": userId.toString()}\n\t\t}\n\t}, function(err, result) {\n\n\t\tif(err){\n\t\t\tcb(err, null);... | javascript | edit | 0 | 2 | mit | 93c6ff1671bf58dc5db84a77f8d01d5dc388a5ec | dollars0427/mtrupdate-bot | lib/database.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar chain = require('es5-ext/function/#/chain')\n , write = process.stdout.write.bind(process.stdout)\n\n , chars = '-\\\\|/'\n , l = chars.length\n , p;\n\np = {\n\tnext: 0,\n\twrite: write,\n\tthrobbed: false,... | javascript | edit | 0 | 2 | isc | 7526be580d7ffc0589d88cc77e84d3b0f2a7d12f | medikoo/cli-color,ralphtheninja/cli-color | lib/throbber.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// TODO: figure out a way to share this code with the CLI (lib/core/src/server/build-dev.js)\n\nimport { localStorage, fetch } from 'global';\n\nconst versionsUrl = 'https://storybook.js.org/versions.json';\nconst checkInterval = 24 * 6... | javascript | edit | 0 | 5 | mit | ed3ab9a21aa072822914860abe820c92c9060d0a | storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook | lib/ui/src/libs/fetch_latest_version.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar inquirer = require('inquirer');\n\nvar question = [{\n choices: getCutsList,\n message: 'Select the cut file',\n name: 'cut',\n type: 'list'\n}];\n\nfunction prompt() {\n\n var promise = new Promise(function(fulfill, reject){\n... | javascript | edit | 0 | 2 | mit | 6a61fe8482a9552c411f50e3d532da123377b9d7 | meeech/kidcut | lib/cut_menu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n//require('bootstrap/js/dist/alert');\n//require('bootstrap/js/dist/button');\n//require('bootstrap/js/dist/carousel');\nrequire('bootstrap/js/dist/collapse');\nrequire('bootstrap/js/dist/dropdown');\nrequire('bootstrap... | javascript | edit | 0 | 0 | mit | f6f8940ce7c79414d53b5f60023e6de6177a81bc | nodeca/nodeca.core,nodeca/nodeca.core | client/lib-admin/bootstrap_custom/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Global variables for isolated world\nvar iconActive = false;\n\nfunction toggle(){\n // Show \"on\" icon when showing the help\n if(iconActive == false){\n activate();\n } else{\n deactivate();\n }\n}\n\nfunction deactivate... | javascript | edit | 0 | 2 | mit | 2e4a7edfd33fc812a247eb36205d6ca1e742d821 | jordanmccullough/github-help-chrome-extension | howto.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// Allows to get the video of the url through the api_url (optional)\nfunction BaseVideoInfo(url, api_url) {\n\tthis.url = url || 'null';\n\tthis.api_url = api_url || \"https://youtube-dl.appspot.com/api/\";\n}\n\nBaseVideoInfo.protot... | javascript | edit | 0 | 3 | bsd-2-clause | a06108790cd3a2fd5f8662292490f10092aa8d69 | kpgx/youtube-dl-web,jaimeMF/youtube-dl-web,jaimeMF/youtube-dl-web,kpgx/youtube-dl-web | VideoInfo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global angular*/\n(function () {\n 'use strict';\n\n // member attribute = member in slide to watch for changes\n // min-font-size attribute = minimum font size in pixels\n // max-font-size attribute = maximum font size in... | javascript | edit | 0 | 2 | mit | 4bc6528cc3c3a0b1a621f2ec488cddc4efd2cf0a | tmol/iQSlideShow,tmol/iQSlideShow,tmol/iQSlideShow | public/modules/core/directives/textFill.js | rejected_duplicate | Near-duplicate of sample 81294 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * New Relic agent configuration.\n *\n * See lib/config.defaults.js in the agent distribution for a more complete\n * description of configuration variables and their potential values.\n */\nexports.config = {\n /**\n * Array o... | javascript | edit | 0 | 0 | mit | e3f9f602a2932019f93e521e4ff0d4a04ad86778 | autoboxer/MARE,autoboxer/MARE | newrelic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\nmodule.exports = function () {\n var result = '';\n var idx = 0;\n\n for (var current = 1; current < arguments.length && idx !== -1; current++) {\n idx = arguments[0].indexOf('%');\n if (argumen... | javascript | edit | 0 | 5 | mit | 3cdb7d2bccc01f3780ff0429ac6382746b2ef874 | floatdrop/pff | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nvar path = require('path');\nvar mergeTrees = require('broccoli-merge-trees');\nvar Funnel = require('broccoli-funnel');\n\nmodule.exports = {\n name: 'ember-maybe-import-regenerator',\n\n inc... | javascript | edit | 0 | 4 | mit | b8642c228716012e87ece77043ef9bed5c889e4f | machty/ember-maybe-import-regenerator,machty/ember-maybe-import-regenerator | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require( 'express' ),\n\t\tapp = express(),\n\t\tdebug = require( 'debug' )( 'dashboard:init' ),\n\t\tconfig = require( './config' ),\n\t\tswig = require( 'swig' ),\n\t\tpath = require( 'path' ),\n\t\ttiles = require('./li... | javascript | edit | 0 | 2 | mit | 07b78dc2548e8156884a60cf03977f31b935415d | dashboard-services/dashboard | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Robin Assistant\n// @namespace com.github.leoverto\n// @include https://www.reddit.com/robin/\n// @version 1\n// @author LeoVerto\n// @grant none\n// ==/UserScript==\n\nfunction se... | javascript | edit | 0 | 1 | mit | d0be0025bb037cf24860b6a46d6f8a497469e6d5 | LeoVerto/Robin-Assistant | robin-assistant.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Password support for accounts\",\n version: \"1.2.12\"\n});\n\nPackage.onUse(function(api) {\n api.use('npm-bcrypt@=0.8.7');\n\n api.use([\n 'accounts-base',\n 'srp',\n 'sha',\n 'ejson',\n... | javascript | edit | 0 | 1 | mit | 0d4cf0236190bba18edd2217d65e5cdcd92a27bd | Hansoft/meteor,chasertech/meteor,chasertech/meteor,mjmasn/meteor,mjmasn/meteor,Hansoft/meteor,chasertech/meteor,chasertech/meteor,chasertech/meteor,Hansoft/meteor,mjmasn/meteor,chasertech/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,chasertech/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,mjmas... | packages/accounts-password/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar logUtils = require('../utils/log-utils.js');\n// var log = logUtils.log;\nvar warn = logUtils.warn;\n\n//////// async / threaded grammar compiler support: ////////////////\nvar asyncSupport = false;\ntry {\n\t// log('#############... | javascript | edit | 0 | 1 | mit | 9d83564ee8994156c5b9a32968fd5efaba626f51 | mmig/mmir-tooling,mmig/mmir-tooling | utils/node-worker-support.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @author Janne K\n// @name Newspaper Paywall Bypass\n// @description Bypasses paywall on Finnish newspapers' websites\n// @version 1.1.4\n// @homepage https://github.com/scoobadog/greasemonke... | javascript | edit | 0 | 1 | mit | 3d588a3597a791e5217b3397865b35c03af3d567 | scoobadog/greasemonkey | scripts/newspaper-paywall-bypass.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %>\nimport hbs from 'htmlbars-inline-precompile';<% } %>\n\nmoduleForComponent('<%= componentPathName %>', '<%= friendlyTestDescription %>', {\n... | javascript | edit | null | null | mit | cb8901127a1a7c7b099a109532cd530a7f896f08 | kanongil/ember-cli,fpauser/ember-cli,joostdevries/ember-cli,scalus/ember-cli,martypenner/ember-cli,kellyselden/ember-cli,ballPointPenguin/ember-cli,josemarluedke/ember-cli,kategengler/ember-cli,johnotander/ember-cli,johanneswuerbach/ember-cli,ef4/ember-cli,trabus/ember-cli,williamsbdev/ember-cli,romulomachado/ember-cli... | blueprints/component-test/files/tests/__testType__/__path__/__test__.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports = {\n\n onReload: function(callback) {\n withLiveReactload(function(lrload) {\n if (!lrload.onReloadCallbacks) {\n lrload.onReloadCallbacks = [];\n }\n lrload.onReloadCallbacks.push(callback);\... | javascript | edit | 0 | 3 | mit | b4e04a23884ae9b38bcf95a9af05286c75c58df2 | milankinen/livereactload-api | index.js | rejected_duplicate | Near-duplicate of sample 92476 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express')\nvar app = express()\nvar session = require('express-session')\nvar bodyParser = require('body-parser')\nvar cookieParser = require('cookie-parser')\nvar passport = require('./passportConfig')\nvar userR... | javascript | edit | 0 | 1 | mit | f52954b9d3c17123f4d9157f71d4cf0a2b388d5b | michalmikolajczyk/viking-garage-api,michalmikolajczyk/viking-garage-api,michalmikolajczyk/viking-garage-api | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar gutil = require(\"gulp-util\");\nvar through = require(\"through2\");\nvar ngAnnotate = require(\"ng-annotate\");\nvar applySourceMap = require(\"vinyl-sourcemaps-apply\");\nvar merge = require(\"merge\");\n\nmodu... | javascript | edit | 0 | 8 | cc0-1.0 | d5d7f6198417f85ca608d2bc13ec9ebd8f455026 | Smarp/gulp-ng-annotate | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Make sure that *this* module's `.eslintrc` is exported."
},
{
"role": "assistant",
"content": "var fs = require('fs');\nvar path = require('path');\n\nmodule.exports = JSON.parse(fs.readFileSync(path.join(__dirname, '.eslintr... | javascript | new_file | 0 | 0 | mit | 785c2346f1847665afd981cfeb562b79d236b834 | briandipalma/eslint-config,ljharb/eslint-config | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Plugin = require('vigour-native/lib/bridge/Plugin')\nvar plugin\n\ndescribe('plugin', function () {\n it('should be requireable', function () {\n plugin = require('../../')\n expect(plugin).instanceOf(Plugin)\n expect(plug... | javascript | edit | 0 | 1 | bsd-2-clause | 2d8d91c421589908687e8841ccc036640b051c8d | vigour-io/statusbar,vigour-io/statusbar | test/browser/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction HtmlReplaceWebpackPlugin(options)\n{\n options = Array.isArray(options) ? options : [options]\n\n options.forEach(function(option)\n {\n if(typeof option.pattern == 'undefined' ||\n typeof option.replacement == 'unde... | javascript | edit | 0 | 4 | mit | f16057c94e772a23b657d54e069941daeb63ee88 | iminif/html-replace-webpack-plugin | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\n function openSubMenu(event) {\n if (this.pathname === '/') {\n event.preventDefault();\n }\n event.stopPropagation();\n $(this).parent().addClass('open');\n\n var menu = $(this).p... | javascript | edit | 0 | 3 | bsd-3-clause | 7e5f87af0fd1b7fd33b8069d2663ca77475236ae | openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean | app/assets/javascripts/bootstrap-dropdown-submenu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar commands = require('./lib/commands');\nvar postBuild = require('./lib/tasks/post-build');\n\nmodule.exports = {\n name: 'ember-cli-cordova',\n init: function() {\n this.setCon... | javascript | edit | 0 | 2 | mit | a96c87e123d103c2ffe6d9bfee9eb4af48a0b198 | bterkuile/ember-cli-cordova,isleofcode/ember-cli-cordova,isleofcode/ember-cli-cordova,greis/ember-cli-cordova,AVCEngineering/ember-cli-cordova,hashg/ember-cli-cordova,poetic/ember-cli-cordova,AVCEngineering/ember-cli-cordova,gordonbisnor/ember-cli-cordova,InboxHealth/ember-cli-cordova,aquadigital/ember-cli-cordova,duke... | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar env = process.env.NODE_ENV || 'development';\nif (env === 'development') {\n require('dotenv').load();\n}\n// The main application script, ties everything together.\nvar bodyParser = require('body-parser');\nvar config = require('.... | javascript | edit | 0 | 2 | mit | 63eafd809cd9077aa84a334f1f033670191b5411 | andela-nmartin/frodocms,andela-nmartin/frodocms | index.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 | 54a370700806fe5c313c114088337604e3f289b3 | bswinnerton/launchbar-github,bswinnerton/launchbar-github | test/pull-request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Replaces internal \"qrc:/*.png\" image URIs with web-friendly URIs\nfunction replaceqrc()\n{\n var imgs = document.images;\n for (var i = 0; i < imgs.length; i++) \n {\n var src = imgs[i].src;\n imgs[i].src... | javascript | edit | 0 | 3 | apache-2.0 | 68ba4fd73846a1640550fedc7f2beaec3031e8ad | nedmech/qlcplus,sbenejam/qlcplus,bjlupo/rcva_qlcplus,mcallegari/qlcplus,hveld/qlcplus,sbenejam/qlcplus,interzona/qlcplus,hveld/qlcplus,joepadmiraal/qlcplus,mcallegari/qlcplus,bjlupo/rcva_qlcplus,plugz/qlcplus,kripton/qlcplus,kripton/qlcplus,mcallegari/qlcplus,nedmech/qlcplus,sbenejam/qlcplus,peternewman/qlcplus,plugz/q... | docs/utility.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport InputMask from 'react-input-mask';\nimport Icon from '../icon';\nimport SingleLineInputBase from './SingleLineInputBase';\nimport { IconTimerSmallOutline } from '@teamleader/ui-icons... | javascript | edit | 0 | 2 | mit | 2a0460f2355f056ec59a51d300d9f7ec19cfd9cc | teamleadercrm/teamleader-ui | src/components/input/TimeInput.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// https://eslint.org/docs/user-guide/configuring\n\nmodule.exports = {\n root: true,\n parser: 'babel-eslint',\n parserOptions: {\n sourceType: 'module'\n },\n env: {\n browser: true,\n },\n // https://github.com/standard/... | javascript | edit | 0 | 0 | mit | b2d350ce5bccb97853b9b43805952bcaf23c1f83 | mishedone/mo-flash-cards,mishedone/mo-flash-cards | .eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nconst fs = require('fs')\nconst path = require('path')\n\nvar fileName = process.argv[2]\nconsole.log(\"Processing: \" +fileName)\nvar PREFIX = \"file://\"\n\nfunction createDir(folder) {\n\tconsole.log(\"Create Les... | javascript | edit | 0 | 3 | mit | 19f012a8dc7d20c5bc0deb5fd8cbdaafe3d56474 | AvnerCohen/dotfiles,AvnerCohen/dotfiles,AvnerCohen/dotfiles | script/lesson.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar key,\r\n path = require('path'),\r\n dirpaths = require(__dirname + '/lib/paths');\r\n\r\nfor (key in dirpaths) {\r\n\tif (dirpaths.hasOwnProperty(key)) exports[key] = dirpaths[key];\r\n}\r\n\r\nexports.readFiles = require(pat... | javascript | edit | 0 | 0 | mit | 907e4209ad6793328932b5557f59a1c53b328e60 | dperetti/node-dir | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Takes a bounding box and returns a new bounding box with a size expanded or contracted\n * by a factor of X.\n *\n * @module turf/size\n * @category measurement\n * @param {Array<number>} bbox a bounding box\n * @param {number} ... | javascript | edit | 0 | 1 | mit | 458d582f1fb9439768744898141f25471f038d25 | Turfjs/turf-size | index.js | rejected_duplicate | Near-duplicate of sample 72241 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst HTTPStatus = require('http-status-codes');\n\nconst scraper = require('./app/routes/scraper');\nconst handleErrorResponse = require('./app/errorResponse');\n\nconst app = express();\n\n// This ... | javascript | edit | 0 | 1 | mit | ba9e77de3b7c97e505583ba026b2999e07cefca8 | C3-TKO/junkan-server | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by Maurice on 6/13/2015.\n */\n\n'use strict';\n\nvar through = require('through2');\nvar gutil = require('gulp-util');\nvar PluginError = gutil.PluginError;\nvar mainBowerFiles = require('main-bower-files');\n\nmodule.e... | javascript | edit | 0 | 3 | mit | 21e7cc6fd0872ffc7e7dbfec5dd371d2085a498a | mauricedb/gulp-main-bower-files | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet P = require('path')\n\nlet srcPath = process.env.USE_BUILT ?\n P.resolve('.') :\n P.resolve('./src')\n\nrequire('babel-register')({\n plugins: [\n ['module-resolver', {\n alias: {\n 'src': srcPath,\n 'suppor... | javascript | edit | 0 | 0 | isc | 1c8a625dbf8ea58f0c87124d52d47aa81613d14a | geigerzaehler/kefir-extra,geigerzaehler/kefir-extra,geigerzaehler/kefir-extra | test/support/boot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar mongoose = require('mongoose');\n\nvar app = express();\n\n// connect to mongo database named \"bolt\"\nmongoose.connect('mongodb://localhost/bolt');\nmongoose.connect(process.env.MONGOLAB_URI, fun... | javascript | edit | 0 | 1 | mit | 0fe8869094da2e7717df1cbf1839f9ecd5693597 | gm758/Bolt,elliotaplant/Bolt,thomasRhoffmann/Bolt,boisterousSplash/Bolt,boisterousSplash/Bolt,gm758/Bolt,thomasRhoffmann/Bolt,elliotaplant/Bolt | server/server.js | rejected_duplicate | Near-duplicate of sample 79094 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { parseLocation } from 'routes/location';\n\n/**\n * Retrieve information about current location\n *\n * @param {string} [value]\n * @returns {Object}\n */\nexport function uri(value) {\n\treturn parseLocation(value);\n}\n\n/**\n... | javascript | edit | 0 | 3 | apache-2.0 | 9513d7c64cfc1f4bc8d9e63ceb3455e83c53d337 | weepower/wee-core | scripts/wee-location.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n plugins: [\n 'vue'\n ],\n extends: [\n 'vast',\n 'plugin:vue/recommended'\n ],\n rules: {\n // Stylistic Issues:\n 'vue/html-indent': ['warn', 4, {\n attr... | javascript | edit | 0 | 0 | mit | 9c027d665f862595a94e4589afd3efe8af031efc | vast-engineering/eslint-config-vast-vue | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nvar api = require('../lib/api/')(require('request'));\n\nrequire('../')(function(log) {\n console.log('prefix: ' + log);\n}, api);\n\n```\n\nApply this change: Replace log function with console.l... | javascript | edit | 0 | 0 | mit | 8ac56fafd8e46139fb0e99744b3ca37779095cdc | stillesjo/buh | bin/buh.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Phonegap DatePicker Plugin Copyright (c) Greg Allen 2011 MIT Licensed\n * Reused and ported to Android plugin by Daniel van 't Oever\n */\n\nvar exec = require('cordova/exec');\n/**\n * Constructor\n */\nfunction DatePicker() {\... | javascript | edit | 0 | 4 | mit | c60353b63b28e4ccceb48afd4a8c237e9c6cfc44 | loiclefloch/cordova-plugin-datepicker,roberthovhannisyan/cordova-plugin-datepicker,jeroenv/cordova-plugin-datepicker,okaybmd/cordova-plugin-datepicker,joewoodhouse/cordova-plugin-datepicker,croshim/cordova-plugin-datepicker-ios-fix,web-slinger/cordova-plugin-datepicker,LouisMazel/cordova-plugin-datepicker,jackuse/cordo... | www/android/DatePicker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Code for specific docs examples.\n\n!function() {\n\n$('[data-docs-example-ofc]').click(function() {\n $('#offCanvasLeft').toggleClass('reveal-for-large');\n});\n\n$('[data-docs-example-series]').click(function() {\n $('#series-exa... | javascript | edit | 0 | 2 | mit | 6f0a0a9aad280a253b53808157f3f19ec5030613 | dimamedia/foundation-6-sites-simple-scss-and-js,Mango-information-systems/foundation,socketz/foundation-multilevel-offcanvas,aoimedia/foundation,pdeffendol/foundation,dragthor/foundation-sites,sashaegorov/foundation-sites,zurb/foundation-sites-6,jaylensoeur/foundation-sites-6,jeromelebleu/foundation-sites,zurb/foundati... | docs/assets/js/docs.examples.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('alienUiApp').controller(\n 'NewCloudController', ['$scope', '$modalInstance', '$http', function($scope, $modalInstance, $http) {\n $scope.newCloud = {};\n\n $http.get('rest/passprovider').success(func... | javascript | edit | 0 | 2 | apache-2.0 | 27d4a771ad349ea5670269e597d713a0742223f0 | PierreLemordant/alien4cloud,ahgittin/alien4cloud,loicalbertin/alien4cloud,igorng/alien4cloud,OresteVisari/alien4cloud,xdegenne/alien4cloud,alien4cloud/alien4cloud,alien4cloud/alien4cloud,PierreLemordant/alien4cloud,ahgittin/alien4cloud,loicalbertin/alien4cloud,san-tak/alien4cloud,igorng/alien4cloud,PierreLemordant/alie... | alien4cloud-ui/yo/app/scripts/clouds/controllers/new_cloud.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar\n\tready = require('enyo/ready'),\n\tkind = require('enyo/kind');\n\nvar\n\tSampleList = require('../src/strawman/SampleList');\n\nvar\n\tsamples = {\n\t\tEnyo: require('../src/enyo-samples'),\n\t\tGarnet: require('./src'),\n\t\tLay... | javascript | edit | 0 | 2 | apache-2.0 | ba8ce7ab45dc0cbecc5fd065ac74a93f8864b43e | enyojs/enyo-strawman | garnet/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Store\n * Used to provide default values for a store configuration\n */\n\nexports.reduce = function (stores, state, transformer, initial) {\n return stores.reduce(function(next, item) {\n let key = item[0]\n let store ... | javascript | edit | 0 | 6 | mit | b7c1d335de8f5b6584b7a856ce284c2102e3cfa5 | leobauza/microcosm,leobauza/microcosm,leobauza/microcosm,vigetlabs/microcosm,vigetlabs/microcosm,vigetlabs/microcosm | src/Store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar EventEmitter = require('events').EventEmitter;\n\nclass ActionCreator extends EventEmitter {\n constructor(api){\n super();\n this.api = api;\n }\n\n subscribe(actionName, callback) {\n this.on(actionName, callback);\n ... | javascript | edit | 0 | 1 | mit | 12b56e38d918e3b66e825c4883ac1e10bf64e607 | codemade/caffeine,codemade/caffeine,codemade/caffeine | app/action-creator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(tabs, windows){\n\n \"use strict\";\n\n const specialUrls =/chrome-extension:|chrome:|chrome-devtools:|file:|chrome.google.com\\/webstore/;\n\n let discardAllTabs = () => {\n windows.getAll({populate: true}, wi... | javascript | edit | 0 | 7 | mit | 28b18e835c4dcb077957a1a95172b86a86f847b3 | Jman/lazy_tab | source/background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function () {\n var App = Ember.Application.create()\n , isDev = /localhost/.test(document.location.href)\n , tokenRegexp = /authentication_token=([a-zA-Z0-9]+)/;\n\n /* Resolve authentication. Removes\n authenticatio... | javascript | edit | 0 | 4 | mit | 3ea2ccda161fe80f2a38dad02bd9f52bb6ef4180 | mhs/t2-people,mhs/t2-people,mhs/t2-people | app/js/application.js | rejected_duplicate | Near-duplicate of sample 83350 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport createStore from './store'\nimport createAction from './action'\nimport { createProvide, createSubscribe } from './injection'\n\n\nexport function createAlfa(name) {\n function alfa(name) {\n return createAlfa(name)\n }\n\n ... | javascript | edit | 0 | 1 | mit | bf016177f987e6ac9920e0f5c7285ff34c86de1c | lsm/alfa | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport postcssPlugin from \"./postcssPlugin\"\nimport standalone from \"./standalone\"\nimport createPlugin from \"./createPlugin\"\nimport rules from \"./rules\"\nimport {\n report,\n ruleMessages,\n styleSearch,\n validateOptions,... | javascript | edit | 0 | 0 | mit | d8d04baf6d32f54bbe3b5fc2cf43d59260e9580a | heatwaveo8/stylelint,gaidarenko/stylelint,gaidarenko/stylelint,gucong3000/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,stylelint/stylelint,gucong3000/stylelint,stylelint/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,hudochenkov/stylelint,gaidarenko/stylelint,stylelint/stylelint,gucong3000/stylelint,style... | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { parser } from './parser';\nimport { compile } from './compiler';\nimport { entity } from './transform/entity';\nimport { whitespace } from './optimize/whitespace';\nimport { getTemplateName } from './utils';\nimport { drawGraph... | javascript | edit | 0 | 1 | mit | 739711a37f45fd98f8d6c177ccacee752d46d7c6 | monkberry/monkberry,monkberry/monkberry | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Loaded ready states\nconst loadedStates = ['interactive', 'complete'];\n\n// Return Promise\nconst whenDomReady = (cb, doc) => new Promise(resolve => {\n\t// Allow doc to be passed in as the lone first param\n\tif (cb && typeof cb !=... | javascript | edit | 0 | 5 | mit | 50c49120b7cc275859db7d77b7c2268def26c988 | lukechilds/when-dom-ready | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nclass Keyv {\n\tconstructor() {\n\t\tthis.store = new Map();\n\t}\n\n\tget(key) {\n\t\treturn Promise.resolve(this.store.get(key)).then(data => {\n\t\t\tif (!data) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tif (Date.n... | javascript | edit | 0 | 3 | mit | 32ae71dc02aa5186b6ea8827ac5cb6ac6a0b6612 | lukechilds/keyv | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function ({ Plugin, types: t }) {\n const visitor = {\n Property: {\n exit(node) {\n if (node.computed || node.key.name !== 'propTypes') {\n return;\n }\n\n const parent = this.findP... | javascript | edit | 0 | 4 | mit | 8c3012ccf1be4c550514f98df9467e94ac58e9e9 | NogsMPLS/babel-plugin-transform-react-remove-statics,nkt/babel-plugin-react-remove-prop-types,oliviertassinari/babel-plugin-transform-react-remove-prop-types | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nJobs = new Mongo.Collection('jobs'); //both on client and server\nApplications = new Mongo.Collection('applications');\n\n// added repoz channel\n\nMeteor.startup(function() {\n // console.log('Jobs.remove({})');\n // Jobs.remove({});... | javascript | edit | 0 | 2 | apache-2.0 | 1cf7bde85c990ad0127f13a6f49a147b9e0173a2 | IngloriousCoderz/GetReel,IngloriousCoderz/GetReel | server/getreel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://www.apache.org/lic... | javascript | edit | 0 | 0 | apache-2.0 | 919b1b6d8db874cd154d53b04c1d61a5a1434e1f | ctrine/webpack-settings,ctrine/webpack-settings | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport PersianNumber, {latinToPersian, arabicToPersian} from './PersianNumber.js';\nimport PersianNumberWords from './PersianNumberWords.js';\n\nconst components = {\n PersianNumber,\n PersianNumberWords,\n latinToPersian,\n arabicT... | javascript | edit | 0 | 0 | mit | 7b59d241f2de6386d75344028d335ed36d7cd8d1 | evandhq/react-persian,mohebifar/react-persian | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('anol.map')\n\n.provider('ControlsService', [function() {\n var _controls = [];\n\n this.setControls = function(controls) {\n _controls = controls;\n };\n\n this.$get = [function() {\n // and thi... | javascript | edit | 0 | 2 | mit | 4b3b0195bc2831b0b536bebfe5dfa5fa21a5ddbf | hgarnelo/orka-app,hgarnelo/orka-app,omniscale/orka-app,omniscale/orka-app | app/anol/modules/map/controls-service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport app from 'app';\nimport fs from 'fs';\nimport path from 'path';\n\nvar appDataPath = path.join(app.getPath('userData'), \"sitesList.json\") ;\nvar appDataIsBeingWritten = false;\n\nvar storableProperties = [\"filePath\", \"id\", ... | javascript | edit | 0 | 3 | mit | 75fd7d9873c8501184290829d7e7cadcb4428ec2 | L-A/Little-Jekyll,L-A/Little-Jekyll | server/storage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\nconst EditableTableHeader = ({columnNames}) => {\n\n return(\n <div>\n {columnNames.map( columnName => {return <div>columnName</div>})}\n </div>\n )\n\n}\n\nE... | javascript | edit | 0 | 1 | mit | 039abc4b9a813c7c2b73a5c5fe62135ba2244ea0 | severnsc/brewing-app,severnsc/brewing-app | src/Components/EditableTable/EditableTableHeader/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Tone = require('../schemas/toneSchema');\r\n\r\n\r\nexports.saveTone = (tone) => {\r\n const newTone = new Tone(tone);\r\n newTone.save().then((result) => {\r\n // console.log('Tone saved:', result);\r\n return result;\r\n... | javascript | edit | 0 | 2 | mit | 31ee971f8ad64500bca5ab8d79f2f32525ea3eec | badT/Chatson,badT/twitchBot,badT/twitchBot,dramich/twitchBot,badT/Chatson,dramich/Chatson,TerryCapan/twitchBot,TerryCapan/twitchBot,dramich/twitchBot,dramich/Chatson | backend/db/controllers/toneController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar yeoman = require('yeoman-generator');\nvar path = require('path');\n\nmodule.exports = yeoman.Base.extend({\n constructor: function () {\n yeoman.Base.apply(this, arguments);\n this.argument('name', {type: Stri... | javascript | edit | 0 | 1 | mit | dd3bcaf5da0bd895b93b007d9c171de1acbbd7fe | 127labs/generator-duxedo,127labs/generator-duxedo | generators/module/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nenyo.kind({\n\tname: \"MyApp.MainView\",\n\tkind: \"moon.Panel\",\n\tclasses: \"moon main-view\",\n\tcontroller: \".app.controllers.messageController\",\n\tbindings: [{\n\t\tfrom: \".controller.message\",\n\t\tto: \".title\"\n\t}],\n\tc... | javascript | edit | 0 | 0 | apache-2.0 | c520c56e18fdfd0cb16b8c7cb66ba6c14582a801 | enyojs-samples/always-viewing-videoplayer-sample,Djspaceg/moonstone-directory-index | source/views/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst tor = require('../lib/tor');\n\nmodule.exports = (req, res) => {\n\n let title = 'Top 10 nodes by consensus weight';\n const query = {\n limit: 10\n };\n if(req.query.s) {\n title = `Search results for \"${req.query.s}\"... | javascript | edit | 0 | 4 | mit | 84940170ed1b25949681335dc51b1f5c3fefcfd9 | lukechilds/tor-explorer,lukechilds/tor-explorer | viewModels/listing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\nconst fs = require('fs');\nconst path = require('path');\nconst Clea... | javascript | edit | 0 | 0 | bsd-3-clause | 438d3834dff3b7ba14e10ae7156fe26b63ce670e | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | scripts/build/generate_css_js_files.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\n //bind the knockoutjs model to the html\n var viewModel = new BuildScreenViewModel();\n ko.applyBindings(viewModel);\n\n //hook up error handling here to avoid the DOM dependency on the v... | javascript | edit | 0 | 2 | mit | debb6d18a4506aed652f9c5467a5be90acf7a7bc | RobBollons/tc-radiate,RobBollons/tc-radiate,travcorp/tc-radiate,travcorp/tc-radiate | Script/Init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { get } from 'lodash'\n\n/**\n * Converts investment summary received by the API into data ranges\n * that the chart component can work with\n */\nexport const investmentSummaryAsDataRanges = (investmentSummary) => {\n const ann... | javascript | edit | 0 | 7 | mit | d2155661a882f3c4478c9220e3d773d2493df1e4 | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 | src/client/components/InvestmentProjectSummary/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require(\"chai\");\nvar chaiAsPromised = require(\"chai-as-promised\");\nvar wd = require('wd');\n\nrequire(\"mocha-as-promised\")();\nrequire('colors');\n\nchai.use(chaiAsPromised);\nchai.should();\n\n// enables chai asserti... | javascript | edit | 0 | 2 | mit | 8885ab281ebb35cf00e34832e0939af39fec9655 | claudijo/storage-messenger,claudijo/storage-messenger | test/integration/spec/shoutbox.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Relay from 'react-relay';\n\nimport Container from './Container';\nimport RouteAggregator from './RouteAggregator';\n\nexport default class RootComponent extends React.Component {\n static displayName... | javascript | edit | 0 | 2 | mit | b8d0138c095a4efa751ab612d712d4c5459a87fb | devknoll/relay-nested-routes,relay-tools/react-router-relay | src/RootComponent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nvar consoleStrings = require('./console-strings.js')\nvar renderTemplate = require('./render-template.js')\nvar validate = require('aproba')\n\nvar Plumbing = module.exports = function (theme, template, width) {\n if (!wi... | javascript | edit | 0 | 2 | isc | 2d4b9659ad481f9f918ea38a48fb4f542f6f0856 | iarna/gauge | plumbing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { useEffect, useState } from 'react';\nimport { OpenfinApiHelpers } from 'stockflux-core';\nimport Components from 'stockflux-components';\nimport './AppShortcuts.css';\n\nexport default () => {\n const [apps, setApps] = ... | javascript | edit | 0 | 3 | mit | 4dbe817b671217c77e9c483a9f9bf845401c2884 | ScottLogic/bitflux-openfin,ScottLogic/StockFlux,ScottLogic/StockFlux,owennw/OpenFinD3FC,owennw/OpenFinD3FC,ScottLogic/bitflux-openfin | packages/stockflux-launcher/src/app-shortcuts/AppShortcuts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by Omnius on 03/08/2016.\n */\n'use strict';\n\nconst Boom = require('boom');\n\nmodule.exports = () => {\n\n return (request, reply) => {\n\n const server = request.server;\n const redis = request.redis... | javascript | edit | 0 | 2 | mit | 7a302b79dbdd64ae2f41fec77a33006826bbf96f | identityclash/hapi-login-test,identityclash/hapi-login-test | server/handlers/welcomeUserHandler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Minimal console.log() polyfill\n */\n\nif (typeof console === 'undefined') {\n Object.defineProperty(this, 'console', {\n value: {}, writable: true, enumerable: false, configurable: true\n });\n}\nif (typeof console... | javascript | edit | 0 | 1 | mit | eced78384c7424e5cb2195aaf645f03959bc9bc2 | tassmjau/duktape,reqshark/duktape,nivertech/duktape,eddieh/duktape,markand/duktape,svaarala/duktape,eddieh/duktape,skomski/duktape,kphillisjr/duktape,harold-b/duktape,chenyaqiuqiu/duktape,sloth4413/duktape,skomski/duktape,kphillisjr/duktape,zeropool/duktape,svaarala/duktape,nivertech/duktape,markand/duktape,eddieh/dukt... | polyfills/console-minimal.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.