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 Component from '@ember/component';\nimport layout from '../../../templates/components/nypr-accounts/membership-card/giving-history';\nimport { computed } from '@ember/object';\n\nexport default Component.extend({\n layout,\n in... | javascript | edit | 0 | 1 | mit | cb8c644aca6980f8508b25a87fa321bd6b3592f0 | nypublicradio/nypr-account-settings,nypublicradio/nypr-account-settings | addon/components/nypr-accounts/membership-card/giving-history.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"A flux implementation, packaged for meteor\",\n version: \"0.17.3\",\n git: \"https://github.com/froatsnook/meteor-alt.git\",\n name: \"froatsnook:alt\",\n});\n\nPackage.onUse(function(api) {\... | javascript | edit | 0 | 1 | mit | d865fa4ecd18e31a7b09f6a170c7945233802ad3 | froatsnook/meteor-alt,froatsnook/meteor-alt | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar log = require('npmlog')\n , gcr = require('./gcr')\n , exec = require('child_process').exec\n , utils = exports\n\nutils.genSSHKey = function(cb) {\n var cmd = 'ssh-keygen -t rsa -f ~/.ssh/gcr -N \"\"'\n exec(cmd, {\n env: p... | javascript | edit | 0 | 4 | mit | 04182ab24a3de9f845224a7826828f38665dc585 | dashersw/gcr,bushong1/gcr,evanlucas/gcr | lib/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nManageIQ.angular.app.component('genericObjectTableComponent', {\n bindings: {\n keys: '=',\n values: '=',\n keyType: '@',\n tableHeaders: '=',\n valueOptions: '=',\n noOfRows: '=',\n angularForm: '=',\n },\n cont... | javascript | edit | 0 | 3 | apache-2.0 | 6acb98920b7db46f1f20ec1ffd937eedeedd3791 | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic | app/assets/javascripts/components/generic_object/generic-object-table-component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport { red } from 'chalk';\nimport R from 'ramda';\n\ntype Clog = typeof console.log;\ntype GraphQLError = { message: string };\n\n// FIXME: Improve naming\nexport function exitError(clog: Clog, ...errors: Array<string | E... | javascript | edit | null | null | apache-2.0 | ca515c03d940ffbdaeb639c589387332ab327b04 | amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon,amazeeio/lagoon | cli/src/exit.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.Model.extend({\n name: DS.attr('string'),\n status: DS.attr('contest-status'),\n goal: DS.attr('contest-goal'),\n qual_score: DS.attr('number'),\n year: DS.attr('number'),\n rounds... | javascript | edit | 0 | 0 | bsd-2-clause | 0ac114b33e3f45d551bed822b529e80d00fec513 | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web | app/models/contest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global Promise */\n\nexport default (routesFetchersMap, path, query, options, store) => {\n const { ignoredPathsRegex, log } = options\n const decodedPath = decodeURI(path)\n\n if (ignoredPathsRegex && ignoredPathsRegex.test(decod... | javascript | edit | 0 | 7 | mit | 38bb3a24446a6513d52c911b8e76092609636bc6 | poetcyborg/redux-easy-app | src/server/prefetchData.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global js_beautify: true */\n/*jshint node:true */\n\nvar SanityTest = require('./sanitytest'),\n Urlencoded = require('../lib/unpackers/urlencode_unpacker'),\n js_beautify = require('../lib/beautify').js_beautify,\n run_beau... | javascript | edit | 0 | 1 | mit | 9086a796d6f41126d35b8c9576e0a8a65658a666 | mmsqe/js-beautify,BobJavascript/js-beautify,amacdougall/js-beautify,ephox-luke/js-beautify,blackmiaool/js-beautify,mmsqe/js-beautify,goelmo/js-beautify,foreni-packages/js-beautify,Infocatcher/js-beautify,aecepoglu/js-beautify,melck/js-beautify,wodim/js-beautify,J2TeaM/js-beautify,glennimoss/js-beautify,dinesh-it/js-bea... | js/test/node-beautify-tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst initialState = {}\n\nexport default (state = initialState, action) => {\n return state\n}\n\n```\n\nApply this change: Handle the tap-assert action in the reducer"
},
{
"role": "assistant",
"content": "import { TAP_AS... | javascript | edit | 0 | 2 | mit | 92a0225cc144967211f4f6760367d213237dffd0 | cskeppstedt/electron-tap-view,cskeppstedt/electron-tap-view | app/reducers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (module) {\n module.controller('projectListProcess', projectListProcess);\n projectListProcess.$inject = [\"processes\", \"project\", \"$state\", \"mcmodal\", \"$filter\"];\n\n function projectListProcess(processes, p... | javascript | edit | 0 | 2 | mit | f10d798a6a997e944f0dcf07ee0074666b2ecb35 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/app/application/core/projects/project/processes/process-list-controller.js | rejected_duplicate | Near-duplicate of sample 83267 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { withInfo } from \"@storybook/addon-info\";\nimport { storiesOf } from \"@storybook/react\";\n\nimport getKnobs from \"./getKnobs\";\nimport Label from \"../index\";\nimport infoOptions from \"./inf... | javascript | edit | 0 | 1 | apache-2.0 | d70cd0983dbd50dffd323d7a0112a5dc8506f3a9 | Autodesk/hig,Autodesk/hig,Autodesk/hig | packages/label/src/__stories__/Label.stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport {terminal as term} from \"terminal-kit\";\n\nexport default function terminalRender(store) {\n // term.fullscreen();\n term.alternateScreenBuffer();\n\n store.subscribe(() => {\n const {title, status, entries, categories}... | javascript | edit | 0 | 2 | apache-2.0 | d78f5addfdd0ccf88266739cef2143e718e1a695 | streamkitchen/streamkitchen,streamkitchen/streamkitchen,streamplace/streamplace,streamplace/streamplace,streamkitchen/streamkitchen,streamplace/streamplace | packages/sp-cli/src/terminal/terminalComponent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @externs\n * @fileoverview Symbols needed to compile webcomponents\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://... | javascript | edit | 0 | 0 | bsd-3-clause | eafcc1f31eb5e331e4df6220a31e1ee5c0608f75 | webcomponents/polyfills,webcomponents/polyfills,webcomponents/polyfills | packages/webcomponentsjs/externs/webcomponents.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Author: CM\n */\n(function($) {\n\t$.event.special.clickConfirmed = {\n\t\tbindType: \"click\",\n\t\tdelegateType: \"click\",\n\n\t\tsettings: {\n\t\t\tmessage: 'Please Confirm'\n\t\t},\n\n\t\thandle: function(event) {\n\t\t\tvar... | javascript | edit | 0 | 4 | mit | d7443c01e3f992e0f1b4d7a1e6b5cc7849e39be5 | vogdb/cm,njam/CM,fauvel/CM,fauvel/CM,christopheschwyzer/CM,fvovan/CM,fvovan/CM,mariansollmann/CM,fvovan/CM,fauvel/CM,tomaszdurka/CM,alexispeter/CM,fauvel/CM,njam/CM,vogdb/cm,njam/CM,zazabe/cm,zazabe/cm,cargomedia/CM,alexispeter/CM,vogdb/cm,alexispeter/CM,tomaszdurka/CM,vogdb/cm,fvovan/CM,christopheschwyzer/CM,zazabe/cm... | client-vendor/after-body/jquery.event.clickConfirmed/jquery.event.clickConfirmed.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport require, { has } from 'require';\n\n/**\n ⚠️ This file exists ONLY for DEV ergonomics to ensure\n JS import autocompletion works and flags can be toggled.\n\n In production, The actual flag states are ALWAYS determined\n at b... | javascript | edit | 0 | 4 | mit | b773bfb665cbe1a009193fdd806f3c5fd9761791 | hjdivad/ember-m3,hjdivad/ember-m3,hjdivad/ember-m3 | addon/-infra/features.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar utilPath = require('../../../lib/file/path');\nvar getRealPkgSrc = require('../../../lib/file/get-real-pkg-src');\nvar expect = require('expect');\n\nvar fs = require('fs');\n\ndescribe('Get real paths of the package\\'s files', fun... | javascript | edit | 0 | 2 | mit | d975d89c3e5373c3a4d89d34a8c852e0776ee07d | arrowrowe/tam | test/lib/file/path-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nasync function sqlite_sql(args) {\n/*\ndescription(\"`sqlite db driver\")\nbase_component_id(\"sqlite_server\")\nload_once_from_file(true)\nonly_run_on_server(true)\n*/\n let tables = [{name: \"server_fdfd\"},{name: \"fdfdsffdsd\"},\... | javascript | edit | 0 | 3 | mit | cf4a34fcbc5bcce253f24c6b4c1739ca206367c7 | zubairq/gosharedata,zubairq/yazz,zubairq/yazz,zubairq/gosharedata | public/visifile_drivers/services/sqlite_server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst test = require('tape')\nconst BorrowState = require('borrow-state')\n\nconst sleep50ms = (something) => new Promise(function (resolve, reject) {\n setTimeout(function () {\n resolve(something)\n }, 50)\n})\n\n;[true, false].f... | javascript | edit | 0 | 1 | isc | fa439f1491d479b9bec3e37d59c4f964e93a50d6 | jamescostian/borrow-state | test/read-only-parallel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('services')\n .service('userService',['$q','config','storageService','$http',userService]);\n\n\n\nfunction userService($q,config,storageService,$http) {\n\n var service = {};\n service.get = get;\n service.one =... | javascript | edit | 0 | 2 | mit | debb850be01f1be52823a4f60d2104c344f61be9 | Pranay92/collaborate-client,Pranay92/collaborate-client | app/common/services/services.users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar azure = require('./lib/azure_wrapper.js');\nvar kube = require('./lib/deployment_logic/kubernetes.js');\n\nazure.create_config('kubernetes', { 'etcd': 3, 'kube': 4 });\n\nazure.run_task_queue([\n azure.queue_... | javascript | edit | 0 | 0 | apache-2.0 | 5f067021d6afbc2b32ffdcb458ec3355b1c34d5d | chourobin/weave-demos,errordeveloper/weave-demos,chourobin/weave-demos,chourobin/weave-demos,errordeveloper/weave-demos,errordeveloper/weave-demos,errordeveloper/weave-demos,chourobin/weave-demos | coreos-azure/create-kubernetes-cluster.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(global) {\n 'use strict';\n var GOVUK = global.GOVUK || {};\n var $ = global.jQuery;\n\n GOVUK.autoSubmitForm = {\n attach: function () {\n var destinationLink = document.getElementById(\"saml-response-form\");\n... | javascript | edit | 0 | 2 | mit | 80dc877856df186d24bfa486c024af5b7c4931c7 | alphagov/verify-frontend,alphagov/verify-frontend,alphagov/verify-frontend,alphagov/verify-frontend | app/assets/javascripts/auto_submit_form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa').service('treebankRetriever', function($http) {\n // tokens should always be loaded synchronous - the app should\n // not start anything without knowing an initial state\n\n var xmlToState... | javascript | edit | 0 | 1 | mit | fa96ea0095f588fa1e8106d3e71c42dc874a90d5 | alpheios-project/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa | app/js/services/treebank_retriever.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction randomValue () {\n const value = [];\n const lengthOfTheArray = 30*24*12;\n for (var i=0; i <= lengthOfTheArray ; i++) {\n value.push((Math.random() * 10).toFixed(1))\n }\n return value.join(\",\");\n}\n\n... | javascript | edit | 0 | 3 | apache-2.0 | 421051bf6c41b901efc1e8d4a4272427deb844cd | innowatio/iwwa-back,innowatio/iwwa-back | server/site-month-readings-aggregates/fixtures.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine('scribe-plugin-image-inserter', [\n 'eventsWithPromises',\n 'rangy-core',\n 'rangy-selectionsaverestore',\n 'filter-event'\n],\nfunction (eventsWithPromises, rangy, rangySelectionSaveRestore, filterEvent) {\n 'use strict';\n... | javascript | edit | 0 | 2 | mit | 928c6c95d088872e470cbf705b113d0460253d45 | moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms | app/assets/javascripts/comfortable_mexican_sofa/admin/modules/scribe/scribe-plugin-image-inserter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\n\nvar prompts = [\n {\n type: 'input',\n name: 'projectName',\n message: 'Machine-name of your project?',\n // Name of the parent directory.\n default: _.last(process.cwd().sp... | javascript | edit | 0 | 2 | mit | 2983032481f3e73295383142458bae5867dc982c | phase2/generator-outrigger-drupal,phase2/generator-outrigger-drupal,phase2/generator-outrigger-drupal | prompts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njQuery(document).ready(function($) {\n function update_chars_left() {\n var max_len = 140;\n var textarea = $('#new_tweet')[0];\n var tweet_len = textarea.value.length;\n if (tweet_len >= max_len) {\n ... | javascript | edit | 0 | 2 | mit | c1a6937c6084c3f64b1199785015f212ae59f6a8 | amarandon/smeuhsocial,amarandon/smeuhsocial,amarandon/smeuhsocial,fgirault/smeuhsocial,fgirault/smeuhsocial,fgirault/smeuhsocial | static/js/microblogging.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/**\n * This class will hold API keys etc. when it gets smarter\n */\nclass StackOverflowSearcher {\n getUrlForRelevantAnswer(errorMessage) {\n return `http://stackoverflow.com/search?q=${errorMessage}`;\n }\n}\n... | javascript | edit | 0 | 1 | mit | 0a10e9d9e0f926bc76c8b73505d5f88e1e5f9537 | oliveroneill/bert | lib/stack-overflow-searcher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @ngdoc overview\n * @name alquimia\n * @author Mauro Constantinescu <<EMAIL>>\n * @copyright © 2015 White, Red & Green Digital S.r.l.\n * \n * @description\n * The `alquimia` module provides utility objects for using... | javascript | edit | 0 | 0 | mit | d404236e286366cf2f9e4c81ff5e6d3fb9fa0456 | AlquimiaWRG/alquimia-wa,AlquimiaWRG/alquimia-wa,AlquimiaWRG/alquimia-wa | app/src/alquimia/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($) {\n $('.call-to-action .btn').click(function() {\n $('#geotagging-map').slideToggle('slow');\n });\n\n $('.save-coordinates .btn').click(function() {\n if(map.getStreetView().getVisible()){\n console.log(map.g... | javascript | edit | 0 | 2 | mit | b232595e4c28e2fd6a85988d757a8385c70a3cf5 | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | app/scripts/geotagging.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport React from 'react';\nimport {\n StyleSheet,\n Platform,\n View,\n Button,\n} from 'react-native';\n\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nconst {ToolbarAndroid} = Icon;\n\nconst Too... | javascript | edit | 0 | 2 | mit | 9f33c35de617b63cc659442338258d6aea910e2e | lintonye/react-native-diary,lintonye/react-native-diary,lintonye/react-native-diary | transitions/app/Toolbar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nconst Glitch = () => (\n <div>\n <p><strong>Uh oh, there was a problem.</strong></p>\n <p>There might be something not-quite-right with the content\n you're trying to view. Sorry, machines make mi... | javascript | edit | 0 | 1 | mit | 451c3955786e41b65658bf42ad697a8a4ec3e17e | flowcommerce/redux-fetch | src/components/glitch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar raptorWidgets = require('../');\n\nmodule.exports = function render(input, context) {\n var widgetsContext = raptorWidgets.getWidgetsContext(context);\n\n if (context.featureLastFlush === false) {\n // If the rendering ... | javascript | edit | 0 | 2 | mit | 254536e11029c1bdaf402562a4934b980f77c619 | marko-js/marko,marko-js/marko | taglib/init-widgets-tag.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by gwennael.buchet on 01/01/17.\n */\n\"use strict\";\n\n/**\n * HOW-TO :\n * - rename this file into \"secretKeys.js\"\n * - replace values with your own\n */\n\n//ThingSpeak API keys\nconst THINGSPEAK_CHANNEL_NUMBER = ... | javascript | edit | 0 | 0 | mit | 2fca6a859ef8a3ac1a2b7729839a3a0ab2c7a4e2 | Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot,Zenika/bottleopener_iot | server/src/connectors/secretkeys.js.example.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jshint node:true*/\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-release',\n dependencies: {\n 'ember': 'components/ember#release'\n },\... | javascript | edit | 0 | 0 | mit | 05f7801ff6cab53446e74ae92798dcec80e81ac6 | pk4media/fireplace,rlivsey/fireplace,pk4media/fireplace,rlivsey/fireplace | config/ember-try.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst flatten = require('flatten')\nconst Set = require('es6-set')\n\nfunction normalizeRoot(root) {\n\tif(!root) return document\n\tif(typeof(root) == 'string') return $(root)\n\treturn root\n}\n\nfunction $(selector, root) {\n\tro... | javascript | edit | 0 | 3 | mit | 03fba42ffe6b52c1e9c4f9a4c076acbf722d2ba6 | CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js,CoderPuppy/movie-voting.js | browser/dom.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { resolve } from 'path';\nimport { load as grpcLoad } from 'grpc';\n\n// The proto files are copied as part of the build script (see package.json) to a '/protos' \n// folder under the root of the project\nconst root = resolve(__d... | javascript | edit | 0 | 1 | apache-2.0 | 1cd730878eab16266d4d3a71d3f789427af4768f | KillrVideo/killrvideo-nodejs,KillrVideo/killrvideo-nodejs | src/services/common/load.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.publish('ItemSets.id', function (id) {\n check(id, String);\n this.unblock();\n return ItemSets.find(new Meteor.Collection.ObjectID(id));\n});\nMeteor.publish('ItemSets.last', function () {\n this.unblock();\n return ItemSet... | javascript | edit | 0 | 1 | mit | b37db9b0ba15389ccb38457b9ceb53c23d8ff9f1 | Ilshidur/lol-item-sets-generator.org,Ilshidur/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org,Ilshidur/lol-item-sets-generator.org,league-of-legends-devs/lol-item-sets-generator.org | app/server/publish.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar assert = require('yeoman-generator').assert;\nvar helpers = require('yeoman-generator').test;\nvar os = require('os');\n\ndescribe('ironhide-webapp:app', function () {\n before(function... | javascript | edit | 0 | 1 | mit | c06c25b13c9b9fd10b53d97e54d1b4f1298e0754 | rishabhsrao/generator-ironhide-webapp,rishabhsrao/generator-ironhide-webapp,rishabhsrao/generator-ironhide-webapp | test/test-app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\t'use strict';\n\n\tgrunt.registerMultiTask('typedoc', 'Generate TypeScript docs', function () {\n\t\tvar options = this.options({});\n\n\t\tvar args = [];\n\t\tfor (var key in options) {\n\t\t\tif ... | javascript | edit | 0 | 10 | mit | 659574a11fc1f292326cdc3e6f14617cc313085b | TypeStrong/grunt-typedoc | tasks/typedoc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport createDebug from 'debug';\n\nimport { onLoad } from './util';\n\nconst debug = createDebug('ms:api');\nconst partitionArray = (array, size) => array.map((e, i) => (i % size === 0) ?\n array.slice(i, i + size) : null).filter(e =>... | javascript | edit | 0 | 2 | cc0-1.0 | b5559268875c8d6150586482d23697ae3e0bcd55 | j-f1/forked-metasmoke,angussidney/metasmoke,angussidney/metasmoke,Charcoal-SE/metasmoke,j-f1/forked-metasmoke,j-f1/forked-metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,angussidney/metasmoke,Charcoal-SE/metasmoke,angussidney/metasmoke,j-f1/forked-metasmoke | app/javascript/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Promise = require('../')\n , Domain = require('domain')\n , assert = require('assert');\n\nvar next = 'function' == typeof setImmediate\n ? setImmediate\n : process.nextTick;\n\ndescribe(\"domains\", function () {\n it(\"except... | javascript | edit | 0 | 2 | mit | 8054bec9f81f975089930d5d68a63f07eba1d71f | aheckmann/mpromise | test/promise.domain.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n\t'use strict';\n\n\tif (location.hostname === 'todomvc.com') {\n\t\tvar _gaq=[['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.googl... | javascript | edit | 0 | 2 | mit | 95561133b889334cc006da38f1abb549a34784c2 | chrisfcarroll/todomvc,ckirkendall/todomvc,skatejs/todomvc,mboudreau/todomvc,ckirkendall/todomvc,nbr1ninrsan2/todomvc,theoldnewbie/todomvc,lorgiorepo/todomvc,meligatt/todomvc,ajansa/todomvc,MariaSimion/todomvc,babarqb/todomvc,cbolton97/todomvc,allanbrito/todomvc,kamilogorek/todomvc,nancy44/todomvc,MikeDulik/todomvc,dyla... | assets/base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst tsc = require('gulp-typescript');\nconst Server = require('karma').Server;\nconst tsProject = tsc.createProject('src/tsconfig.json');\nconst tsProjectSpec = tsc.createProject('spec/tsconfig.json');\n... | javascript | edit | 0 | 1 | mit | 7d31323c8a11f16a60524a648390bd8e2358d9bf | Jameskmonger/courtroom,Jameskmonger/courtroom | Gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// PiscoBot Script\n\nvar commandDescription = {\n name: 'GitHub Mention',\n author: 'Daniel Gallegos [@that_taco_guy]',\n trigger: '[none]',\n version: 1.0,\n description: 'Have the bot reply to new commits on GitHub.',\n module:... | javascript | edit | 0 | 2 | mit | 582c8926bdeb47844ad844c5adc12f4b8d998b27 | devacademyla/PiscoBot,devacademyla/PiscoBot | modules/core/github_mention.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst twitchIO = require('socket.io');\nconst twitchClient = require('./tmiClient');\n// const Rx = require('rx');\nconst eventEmitter = require('./eventEmitter');\nconst messageController = require('../db/messageController');\n\n// con... | javascript | edit | 0 | 1 | mit | ac939200325205ee41f7495a9295ea20c5e7e121 | dramich/twitchBot,badT/twitchBot,dramich/Chatson,badT/Chatson,dramich/twitchBot,TerryCapan/twitchBot,badT/twitchBot,TerryCapan/twitchBot,badT/Chatson,dramich/Chatson | backend/utils/socketio.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst file = require('file')\nconst path = require('path')\nconst toml = require('toml')\n\nconst parsers = {\n '.toml': toml.parse,\n '.json': JSON.parse\n}\n\nfunction readGraphObjects(objectsPath) {\n ... | javascript | edit | 0 | 1 | mit | 547d1eea4940e4beb48a2a85b3b48bef6eb2ff25 | frontiernav/frontiernav-data,frontiernav/frontiernav-data | tests/helpers/readGraph.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\ndescribe(\"deselector\", function() {\n var element;\n var state;\n var configurator = { provideResource: function() {} };\n\n beforeEach(module(\"arethusa.core\", function($provide) {\n $provide.value('configu... | javascript | edit | 0 | 1 | mit | cb6184370d41cdeeed92784f0864b45864ddd10f | Masoumeh/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa | spec/arethusa.core/directives/deselector_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n\t'../../Promise'\n], function (Promise) {\n\t'use strict';\n\t\n\tvar resolve = Promise.resolve.bind(Promise),\n\t\tarrayProto = Array.prototype,\n\t\tslice = arrayProto.slice,\n\t\titeratorMethods = [ 'forEach', 'map', 'filt... | javascript | edit | 0 | 2 | bsd-3-clause | 1ccf524338ce1984e0aa7d9dae83be634abf4e28 | kitsonk/core-js,kitsonk/core-js | stores/util/queryResults.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('polestar')\n .directive('jsonInput', function() {\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {},\n link: function(scope, element, attrs, modelCtrl) {\n var ... | javascript | edit | 0 | 1 | bsd-3-clause | 9f8e2346b9ede60d0548af01bf5d7a62f548cde1 | uwdata/polestar,uwdata/polestar,vega/polestar,uwdata/polestar,vega/polestar,vega/polestar | src/components/jsoninput/jsoninput.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\nimport { Accounts } from 'meteor/accounts-base';\nimport { Email } from 'meteor/email';\n\nconst Post = Picker.filter((req, res) => (req.method === 'POST'));\n\nPost.route('/api/register', functi... | javascript | edit | 0 | 1 | mit | 3c46bd1c62ef3242ed18c29d593eaa8e9b8b45e0 | kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt | server/webhooks/registration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { remote } from 'electron';\nimport fs from 'fs';\nimport path from 'path';\n\nwindow.addEventListener('load', () => {\n if (window.$ && Settings.get('welcomed') === remote.app.getVersion() && $('#welcome').length) {\n $('[da... | javascript | edit | 0 | 6 | mit | 541ab943aed2768c53c38833fbfd6ec2f5863f34 | petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,n4k1/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,n4k1/Google-Play-Music-Desktop-Player-... | src/inject/generic/core/appDetails.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction sumAll(arr) {\n var total = 0;\n var len = arr.length;\n \n for(var i = 0; i <= len;i++){\n total += arr[i];\n }\n return total;\n}\n\nsumAll([1, 4]);\n\n```\n\nApply this change: Add sollution to sum all"
},
{
... | javascript | edit | 0 | 3 | mit | 733b948e07dd4b1c9b8ba342d82807e81444e562 | schaui6/geek_out,schaui6/geek_out,schaui6/geek_out | js-notes/sumAll.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux'\nimport { routerMiddleware } from 'react-router-redux'\nimport promiseMiddleware from 'redux-promise-middleware'\nimport createHistory from 'history/createBrowserHistory'\n\n... | javascript | edit | 0 | 0 | mit | c9d48dd038e49d364d7c7a6a567bdb2d059df524 | Code-For-Change/GivingWeb,Code-For-Change/GivingWeb | client/src/store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Find the GitHub branch we are running from\ngetBranch = function (path, repository) {\n // The branch is the word after the repository name, and before the word \"tests\"\n // Assumes that the branch exists in the path\n \n ... | javascript | edit | 0 | 5 | apache-2.0 | aff915b9c9a249d63af8f2e04215dda2c2068caf | highfidelity/hifi_tests,highfidelity/hifi_tests,highfidelity/hifi_tests | tests/utils/branchUtils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Component } from 'substance'\n\n/*\n Simplistic back-matter displaying references and appendixes\n*/\nexport default class BackComponent extends Component {\n\n render($$) {\n const node = this.props.node\n\n let el = $... | javascript | edit | 0 | 3 | mit | 16dc6991addf1b2011e471563f3bf305e444f223 | substance/texture,substance/texture | src/editor/components/BackComponent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n selectedItem: 1,\n budgetItems: [],\n error: {\n show: true,\n text: 'Hello my name is nathan'\n }\n}\n\n```\n\nApply this change: Change initial state of error."
},
{
"role": "assistant",
"con... | javascript | edit | 0 | 0 | mit | f4bbcd84d56810153744fc15c0d245ec63b4086e | JumpStartGeorgia/Georgian-Budget-Public | js/initialState.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar merge = require('merge');\n\nvar temperature = require('../model/temperature.js');\nvar humidity = require('../model/humidity.js');\nvar gas = require('../model/gas.js');\nvar co = require('../model/co.js');\nvar timestamp = require... | javascript | edit | 0 | 3 | mit | 9176e16b49bacd9b57238ddb3a4db6ec0b38cdd9 | FCU-Simple-Smart-Home/Control-Website,FCU-Simple-Smart-Home/Control-Website | controller/NormalMonitorController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nNbsp.Messages = new Mongo.Collection(\"rooms\");\n\nNbsp.MessageSchema = new SimpleSchema({\n from: {\n type: String,\n label: \"Your name\",\n max: 64\n },\n content: {\n type: String,\n label: \"Yo... | javascript | edit | 0 | 1 | mit | 90d80e8e75a37cac3e4cac137a5ab7ea1282e684 | iwazaru/notrebeausapin.fr,iwazaru/notrebeausapin.fr | collections.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n *\n *\n * @copyright 2017 Government of Canada\n * @license MIT\n * @author igboyes\n *\n */\n\nimport Request from \"superagent\";\n\nconst jobsAPI = {\n\n find: () => {\n return Request.get(\"/api/jobs\");\n },\n\n ... | javascript | edit | 0 | 1 | mit | 55ededd619e640eb933b266c9bdd4f0f65328acf | virtool/virtool,igboyes/virtool,igboyes/virtool,virtool/virtool | client/src/js/jobs/api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\ndescribe('keyCapture', function() {\n beforeEach(module('arethusa.core'));\n\n describe('isCtrlActive', function() {\n it('return false before any event', inject(function(keyCapture) {\n expect(keyCapture.is... | javascript | edit | 0 | 1 | mit | 221c6bcc31147ad23ff856ebc3a58f07a59d7966 | PonteIneptique/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa | spec/arethusa.core/key_capture_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nvar playfield;\nvar scene;\nvar game;\n\nfunction init() {\n\tplayfield = document.getElementById('playfield');\n game = new Game();\n scene = new Gamefield(initSceneCanvas('main-scene'), game);\n game.view = s... | javascript | edit | 0 | 1 | mit | eaa17ad8fbd44d58654508acd6fd0abe5ee3053c | BecauseWeCanStudios/dots-connect,BecauseWeCanStudios/dots-connect | dots-connect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Deffy = require(\"deffy\")\n , Enny = require(\"enny\")\n , Parsers = require(\"../parsers\")\n ;\n\nfunction Line(input) {\n this.source = input.source;\n this.target = input.target;\n this.id = this.source.id + \"_\" +... | javascript | edit | 0 | 2 | mit | 968fca58df580c651491637e7e928194fc58a12e | jillix/engine-builder | lib/composition/line/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\n var wicketsource, menu;\n\n menu = chrome.contextMenus.create({\n title: \"Wicket Source\",\n contexts: [\"all\"],\n onclick: function (info) {\n if (wicketsource) {\n var ajax = new XMLHttpReque... | javascript | edit | 0 | 4 | apache-2.0 | f6354171b579714099f2fd8d001dbe4a14d92e70 | cleiter/wicketsource-contextmenu | contextMenu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-unused-vars*/\nimport React, { Component, PropTypes } from 'react';\n/* eslint-enable no-unused-vars*/\n\nimport Icons from 'components/Icons/';\n\nconst IconBar = () => {\n let children = Object.keys(Icons).map(ke... | javascript | edit | 0 | 1 | mit | 849148bac1598f1ba1fcc898181650e927b0b4cc | pl12133/pl12133.github.io,pl12133/pl12133.github.io | src/components/IconBar/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst AppConstants = {\n //Application name\n appName: 'Nano Wallet',\n\n version: 'BETA 1.1.11',\n\n //Network\n defaultNetwork: -104,\n\n // Ports\n defaultNisPort: 7890,\n defaultWebsocketPort: 7778,\n\n //... | javascript | edit | 0 | 0 | mit | 81214343f4e29800faae88a5bc04c6b8c4066748 | him0/NanoWallet,him0/NanoWallet,mizunashi/NanoWallet,mizunashi/NanoWallet | src/app/config/app.constants.js | rejected_duplicate | Near-duplicate of sample 71686 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Declare app level module which depends on views, and components\n/*angular.module('myApp', [\n 'ngRoute',\n 'myApp.view1',\n 'myApp.view2',\n 'myApp.version'\n]).\nconfig(['$locationProvider', '$routeProvider', f... | javascript | edit | 0 | 5 | mit | d8bc594108bc26b866515df88467b64c105a5c8e | glencollins18888/JSONPathFinder,glencollins18888/JSONPathFinder | app/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global describe: false, expect: false, it: false, inject: false, beforeEach: false */\n'use strict';\n\ndescribe('Controller: FormDropAreaCtrl', function () {\n\n // load the controller's module\n beforeEach(module('confRegistratio... | javascript | edit | 0 | 1 | mit | 7133c3a7ce498b73aded39f8de50df787091e541 | CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web | test/spec/controllers/formDropArea.js | rejected_duplicate | Near-duplicate of sample 94595 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction attachAttr (ele, attr) {\n for (var a in attr) {\n ele.setAttribute(a, attr[a]);\n }\n return ele;\n}\n\n```\n\nApply this change: Add JSDoc info for attachAttr"
},
{
"role": "assistant",
"content": ... | javascript | edit | 0 | 2 | mit | 4a837b9ec7956227d9c856181de4b3b3e5b60737 | rockabox/Auxilium.js | src/utils/attach-attr.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequirejs.config({\n paths: {\n jquery: \"/vendor/jquery\",\n }\n});\n\ndefine(['jquery'], function ($) {\n var _ = window._,\n Map = function(svg) {\n this.svg = $(svg);\n };\n\n var _mpro = Map.prototype;\n\n ... | javascript | edit | 0 | 1 | mit | 4dee0a4ef58fca0abb1d040c372be83a17c66a4c | schatten/cartos,schatten/cartos | static/javascript/map.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst isIp = require('is-ip');\n\nconst defaults = {\n\ttimeout: 5000\n};\n\nconst urls = {\n\tv4: 'https://ipv4.icanhazip.com/',\n\tv6: 'https://ipv6.icanhazip.com/'\n};\n\nfunction queryHttps(version, opts) {\n\treturn ... | javascript | edit | 0 | 3 | mit | 77d3124f82c0af43bf7710c04db817471f4ebc15 | sindresorhus/public-ip,sindresorhus/public-ip,sindresorhus/public-ip | browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nvar chai = require(\"chai\");\nvar expect = chai.expect;\nvar vm = require(\"vm\");\n\n\ndescribe(\"Functions into modules/default/calendar/calendar.js\", function() {\n\n\t// Fa... | javascript | edit | 0 | 1 | mit | e08bc01c335bbcf123507b16e63e0e8c6addafc2 | thobach/MagicMirror,Tyvonne/MagicMirror,morozgrafix/MagicMirror,n8many/MagicMirror,morozgrafix/MagicMirror,MichMich/MagicMirror,heyheyhexi/MagicMirror,roramirez/MagicMirror,berlincount/MagicMirror,thobach/MagicMirror,thobach/MagicMirror,marc-86/MagicMirror,Tyvonne/MagicMirror,vyazadji/MagicMirror,morozgrafix/MagicMirro... | tests/unit/functions/calendar_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function($, window, errorHandler) {\n var Multigraph = require('../../core/multigraph.js')($),\n Point = require('../../math/point.js');\n\n if (typeof(Multigraph.registerResizeEvents)===\"function\") { ret... | javascript | edit | 0 | 2 | mit | 9e1fdd5021b9a38b75a905a2ff97cb07e18576b4 | henhouse/js-multigraph,multigraph/js-multigraph,multigraph/js-multigraph,henhouse/js-multigraph,multigraph/js-multigraph,henhouse/js-multigraph | src/events/resize/multigraph.js | rejected_duplicate | Near-duplicate of sample 74806 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nangular.module('arethusa.core').directive('foreignKeys',[\n 'keyCapture',\n 'languageSettings',\n function (keyCapture, languageSettings) {\n return {\n restrict: 'A',\n scope: {\n ngChange: '&',\n ... | javascript | edit | 0 | 4 | mit | fa62ad541d147e740bedd97f470390aafe882e8f | latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa | app/js/arethusa.core/directives/foreign_keys.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n var SettingsCtrl = function($scope, $ionicModal, Auth) {\n var vm = this\n\n $ionicModal\n\n .fromTemplateUrl(\"js/modules/tabs/settings/views/login.html\", {\n\n scope: $scope,\n animation: \"s... | javascript | edit | 0 | 2 | mit | 19413e0a5fc9decff56bbe1429bda4ff82ac3aa5 | Plateful/plateful-mobile,Plateful/plateful-mobile | app/js/modules/tabs/settings/controllers/SettingsCtrl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// MIT license, see: https://github.com/tjcrowder/simple-snippets-console/blob/master/LICENSE\nvar snippet = {\n version: \"1.0\",\n\n // Writes out the given text in a monospaced paragraph tag, escaping\n // & and < so they ar... | javascript | edit | 0 | 4 | mit | e44a46744b04cc89adc231c2b2c50b6a32193b55 | tjcrowder/simple-snippets-console,tjcrowder/simple-snippets-console | snippet.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Model = require('chaos-orm').Model;\nvar ImageTag = require('./image-tag');\nvar Gallery = require('./gallery');\n\nclass Image extends Model {\n static _define(schema) {\n schema.column('id', { type: 'serial' });\n schema.co... | javascript | edit | 0 | 1 | mit | 2cc1ca19ac4bf229eb2f7270e711fa3580005063 | crysalead-js/chaos-database | spec/fixture/model/image.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Copy over the index.html\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nfs.createReadStream(path.join(__dirname, \"index.html\"))\n .pipe(fs.createWriteStream(\"index.html\"));\n\n// Launch the ser... | javascript | edit | null | null | mit | d93c55ab4ee6976c143962da83507c9d3b0c7b6f | curran/example-viewer,curran/example-viewer | cli.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// FORKED FROM https://github.com/muaz-khan/WebRTC-Experiment/tree/master/Chrome-Extensions/desktopCapture\n\n// this background script is used to invoke desktopCapture API to capture screen-MediaStream.\n\nvar session = ['screen', 'wi... | javascript | edit | 0 | 3 | mit | c27428b9ed74120d46700eac0d3b4466453c86a6 | RocketChat/Rocket.Chat.ScreenShare.Extensions,RocketChat/Rocket.Chat.ScreenShare.Extentions | Chrome/background-script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst env = module.exports = {};\n\nenv.rootDir = path.join(__dirname, '..');\nenv.buildDir = path.join(env.rootDir, 'docs'); // we use docs to able publish on gh-pages\nenv.srcDir = path.join(env.rootDir,... | javascript | edit | 0 | 0 | mit | d2c0a53b7b4d308739940659ff9915d0ffa7db63 | rodmax/react-playground,rodmax/react-playground,rodmax/react-playground,rodmax/react-playground | devtools/env.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n client: 'pg',\n connection: process.env.PG_URI + '?ssl=true',\n pool: {\n min: process.env.PG_POOL_MIN,\n max: process.env.PG_POOL_MAX\n },\n migrations: {\n tableName: 'knex_migrations'\n },\n searc... | javascript | edit | 0 | 0 | mit | 501a949395175e83e205ce09ac0386392f1c1999 | nikolay-radkov/ebudgie-server,nikolay-radkov/ebudgie-server | db/knexfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"Unit: eslint-config-openstack\", function() {\n\n it(\"should set espree as the default parser.\", function() {\n var config = require('../index');\n expect(config.parser).toEqual('espree');\n });\n\n it(\"should dis... | javascript | edit | 0 | 2 | apache-2.0 | 234f228f7426b8df90907f7e123b9eb0aad238ec | openstack/eslint-config-openstack | spec/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar filesystem = require('fs');\nvar config = { baseUrl: 'https://metrics-api.librato.com/v1/' };\ntry {\n config = JSON.parse(filesystem.readFileSync('config.json'));\n} catch (err) {\n}\n\nvar saveConfig = function() {\n var configC... | javascript | edit | 0 | 1 | mit | e00ba70ffba16707d8dcc347bb432a20fc0caee2 | plmwong/librato-cli | modules/librato-cli-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst mongoose = require('mongoose');\n\n// Connect to MongoDB\nmongoose.connect('mongodb://localhost/test');\n\nconst db = mongoose.connection;\n\n// Define product schema for e-commerce demo site\n... | javascript | edit | 0 | 0 | mit | a5ce01e766d1c9f453254e3211a1da4b1a0cfbf8 | dshaps10/full-stack-demo-site,dshaps10/full-stack-demo-site | db.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-param-reassign, max-len */\n\n// Validates and defaults the options\nfunction validateOptions(options) {\n // Default options to our preferred value\n options.dest = options.dest || 'carte-blanche';\n options.fil... | javascript | edit | 0 | 4 | mit | 35613f2c36bad1b2f1ee8e9f24c2bdb20bd7d366 | pure-ui/styleguide,carteb/carte-blanche,pure-ui/styleguide,carteb/carte-blanche | webpack-plugin/src/validateOptions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//Handles browser request for the react app.\n\nconst express = require('express');\nconst path = require('path');\nconst app = express();\n\napp.set('port', process.env.port || 9080);\n\napp.use('/', express.static('public'));\n//app.u... | javascript | edit | 0 | 1 | mit | 65045c9fd213caf1f2e5ba3c88c74777a57dc35a | frank18cr/galilee-softec,frank18cr/galilee-softec | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) 2014 Readium Foundation and/or its licensees. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without modification,\n// are permitted provided that the following conditions are... | javascript | edit | 0 | 0 | bsd-3-clause | d7afb70d65a16fa6d6a0c4773167f0fcabd622a2 | bibliolabs/readium-js,looknear/readium-js,bibliolabs/readium-js,ravn-no/readium-js,kivuto/readium-js,readium/readium-js,looknear/readium-js,readium/readium-js,ravn-no/readium-js,kivuto/readium-js | build-config/RequireJS_config_multiple-bundles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use babel\";\n\nimport _ from \"lodash\";\n\nfunction isMappedToGrammer(grammar) {\n return (builder) => {\n console.log(builder);\n return _.includes(builder.grammars, grammar);\n };\n}\n\nexport default {\n activate() {\n ... | javascript | edit | 0 | 3 | mit | c5b0ab7347530d091d98b9265402b76e5f684738 | thomasjo/gluon | lib/main.js | rejected_duplicate | Near-duplicate of sample 89693 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst app = express();\nconst server = require('http').createServer(app);\nconst io = require('socket.io')(server);\n\napp.use('/public', express.static(__dirname + '/public'));\n\nlet users = {};\n\... | javascript | edit | 0 | 2 | mit | 6187b6471d944d63636b837816dbcb1a2e9cec35 | kpace/basic_chat_server,kpace/basic_chat_server | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.config = {\n allScriptsTimeout: 11000,\n\n specs: [\n 'e2e/*.js'\n ],\n\n capabilities: {\n 'browserName': 'chrome',\n 'chromeOptions': {\n 'args': ['load-extension=/Users/adamu/src/screensharing-extensions/chr... | javascript | edit | 0 | 0 | mit | 4681dd8fa864bc9ce60999c447e112f6065a5fa3 | aullman/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,opentok/opentok-meet,aullman/opentok-meet | tests/protractor.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar babel = require('gulp-babel');\nrequire(\"babel-polyfill\");\n\ngulp.task('default', function () {\n return gulp.src('src/superagent-jsonp.js')\n .pipe(babel({ blacklist: ['strict'] }))\n ... | javascript | edit | 0 | 1 | mit | c9efca76015d56f374e11f8d61b9d39b47f1e56a | lamp/superagent-jsonp | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** @namespace */\nvar here = window.here || {};\n\nhere.builder = {\n config: {\n shareURL: 'https://share.here.com/',\n PBAPI: \"https://places.sit.api.here.com/places/v1/\",\n appId: '45vC3JHWu5fUqqUm9Ik2',\n ... | javascript | edit | 0 | 0 | mit | eb61d5bd74bba98eb93f9d857e5c1635b1988dcd | heremaps/map-linkbuilder-app,heremaps/map-linkbuilder-app,heremaps/map-linkbuilder-app | src/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport chalk from 'chalk';\nimport { map } from 'lodash/fp';\n\nconst logger = {\n // default log level is silent!\n level: 0,\n\n init({ level, colour }) {\n if (this.isInitialised) return;\n this.colour = !!colo... | javascript | edit | 0 | 3 | mit | 339ee6c2186a6241540317abc265e7809e6280cc | rohanorton/batch-file-renamer | src/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add requirement to Comment Widget for Clipboard service."
},
{
"role": "assistant",
"content": "angular.module( 'gj.Form.MarkdownEditor', [ 'monospaced.elastic', 'gj.Form', 'gj.Api', 'gj.Clipboard' ] );\n"
}
] | javascript | new_file | 0 | 0 | mit | 511f382b39596a5ca48515b22885a0e711c0065b | gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib | components/form/markdown-editor/markdown-editor.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add declarative flambeau-style Specs actions"
},
{
"role": "assistant",
"content": "// TODO: change to ../config ?\nimport { getActionURL } from '../stores/ConfigurationStore';\n\n\nexport function setSpecsURLsForDocument({ d... | javascript | new_file | 0 | 3 | apache-2.0 | c8a327c4090e05f7b3d8323a1dc689ece5e31f20 | BurntIcing/IcingEditor,BurntIcing/IcingEditor | src/actions/SpecsActions.js | rejected_duplicate | Near-duplicate of sample 87368 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n browserify = require('browserify'),\n babelify = require('babelify'),\n source = require('vinyl-source-stream'),\n paths = require('../paths');\n\ngulp.task('scripts:app', function () {\n retur... | javascript | edit | 0 | 1 | mit | 70d4c50688bb0492a7f5df19504ae4faa3775dca | trendyminds/pura,trendyminds/pura | gulp/tasks/scripts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { List } from 'immutable';\nimport { DraggableCard } from 'containers';\n\nexport default class Hand extends Component {\n static propTypes = {\n cards: PropTypes.instance... | javascript | edit | 0 | 1 | mit | 6fa8f0c12a3802c92f61d08843f9bfca8b7917c6 | inooid/react-redux-card-game,inooid/react-redux-card-game | src/components/Hand/Hand.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nconst formatValue = (item, results) => {\n if (!results.hasOwnProperty(item.query)) {\n return '—';\n }\n\n return (item.formatValue || (e => e))(results[item.query]);\n};\n\nconst Dash... | javascript | edit | 0 | 3 | mit | 258f0cd6ddceaa84c4f416bd1a338f2f653f57ba | quintel/etmobile,quintel/etmobile,quintel/etmobile | src/components/Dashboard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {Transform} from 'vega-dataflow';\nimport {Item, GroupItem} from 'vega-scenegraph';\nimport {inherits} from 'vega-util';\n\n/**\n * Bind scenegraph items to a scenegraph mark instance.\n * @constructor\n * @param {object} params ... | javascript | edit | 0 | 3 | bsd-3-clause | 1cf4715e477e758d73fbf2943d3cc5605166fb6c | vega/vega,vega/vega,vega/vega,lgrammel/vega,vega/vega | packages/vega-view/src/transforms/Mark.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Chosen jQuery plugin to add an image to the dropdown items.\n */\n(function($) {\n $.fn.chosenImage = function(options) {\n return this.each(function() {\n var $select = $(this);\n var imgMap = {}... | javascript | edit | 0 | 2 | mit | 8d40003a2e1a8bdbc07612649a0829b83ec72815 | djgrant/chosen-image,djgrant/chosen-image | chosenImage/chosenImage.jquery.js | rejected_duplicate | Near-duplicate of sample 76249 | true |
[
{
"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(null, 'Check out my first class component!')\n )\n )\n }\n})\n\nvar MyFirstComponent ... | javascript | edit | 0 | 1 | mit | 8d84dec27606c0ef2b590091f916a70eb48fd2cd | bencodezen/cloneflix-react-with-bholt,bencodezen/cloneflix-react-with-bholt | js/ClientApp.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.