messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n qunit: ['./test/index.html'],\n lint: ['supermodel.js', './test/*.js'],\n jshint: {\n options: {\n eqnull: true,\n undef: true\n },\n glo... | javascript | edit | 0 | 1 | mit | c41a28a4794d9460bce2c5dca9160c26aae55fb4 | pathable/supermodel,Gywem/supermodel,TheBox193/supermodel,TheBox193/supermodel,pathable/supermodel,Gywem/supermodel | grunt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global describe, it */\n\nrequire('es6-promise').polyfill()\n\nvar popsicle = require('popsicle')\nvar nock = require('nock')\nvar expect = require('chai').expect\nvar prefix = require('./')\n\ndescribe('popsicle prefix', function ()... | javascript | edit | 0 | 1 | mit | 9257f2dda70c04ba670cbd1c959c5302c517297f | blakeembrey/popsicle-prefix | test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Koa = require('koa');\r\nconst fetch = require('node-fetch');\r\nconst app = new Koa();\r\nconst port = process.env.PORT || 3000;\r\n\r\napp.use(async (ctx, next) => {\r\n var response = await fetch('http://inspirobot.me/api?ge... | javascript | edit | 0 | 1 | mit | 8aff666c35c61b49ed6b04d3576bfeb4b7224874 | Shtian/inspireme | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction vargs(fn) {\n var slice = Array.prototype.slice,\n paramsCount = fn.length\n\n return function () {\n var argsCount = arguments.length,\n lastArg = arguments[argsCount - 1]\n\n if (argsCoun... | javascript | edit | 0 | 6 | mit | b40023f159b3e96a09249f014e43eb5def4eef49 | furagu/vargs-callback | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar postcssCached = require('postcss-cached');\nvar through = require('through2');\nvar applySourceMap = require('vinyl-sourcemaps-apply');\nvar gulpUtil = require('gulp-util');\n\nmodule.exports = function(options) {\n ... | javascript | edit | 0 | 4 | mit | 7b57b2725576aa6593f54881271bfb0f491e1c0f | vinsonchuong/gulp-postcss-cached | index.js | rejected_duplicate | Near-duplicate of sample 83722 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar redis = require('redis'),\n coRedis = require('co-redis'),\n koa = require('koa');\n\nvar app = koa(),\n client = redis.createClient(\n process.env.REDIS_PORT,\n process.env.REDIS_HOST\n ),\n ... | javascript | edit | 0 | 3 | mit | b5522577e6a1f4b44db17415a424dee5f8f772fb | philipheinser/ember-lightning,jrowlingson/ember-lightning | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar siteKey = process.env.HORSELIGHTS_SITEKEY\nvar lightId = process.argv[2]\n\nif(siteKey == null || lightId == null) {\n throw \"Please provide site key in environment variable and light id as command line parameter\"\n}\n\nconsole.l... | javascript | edit | 0 | 2 | mit | c1a7bcb4bd2c17fa9d8c7010ea4b803500bc015b | codeflows/houmio-midi-control | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Promise = require('bluebird')\nvar request = require('got')\nvar extend = require('xtend')\n\nvar BASE_URL = 'http://www.broadbandmap.gov/broadbandmap/broadband/jun2014/'\n\nmodule.exports = function broadbandMap (lat, long, options... | javascript | edit | 0 | 2 | mit | fda423fba65685a199c2f910553394bc9b8544b7 | bsiddiqui/broadband-map | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Load the node-ffi extensions\nrequire('./ffi-extend')\n\n// The main exports is the casting function\nmodule.exports = $\n$._ = $ // legacy. TODO: remove by 0.1.0\n\n// export the exports from the 'import' module\nvar Import = requir... | javascript | edit | 0 | 4 | mit | a6b22b3193e3df0860c477edfcad740383a306f7 | jerson/NodObjC,TooTallNate/NodObjC,jerson/NodObjC,mralexgray/NodObjC,mralexgray/NodObjC,telerik/NodObjC,TooTallNate/NodObjC,telerik/NodObjC,jerson/NodObjC | index.js | rejected_duplicate | Near-duplicate of sample 96030 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nconst most = require('most')\nconst request = require('request')\nconst EventEmitter = require('events')\nconst emitter = new EventEmitter()\nconst jsdom = require('jsdom')\nconst Promise = require('bluebird')\nconst _ = r... | javascript | edit | 0 | 2 | mit | 34a38da774bc98141061b0730e343ab5071a04ef | dumconstantin/crawler,dumconstantin/crawler | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-nouislider',\n\n included: function(app) {\n this._super.included(app);\n if (!process.env.EMBER_CLI_FASTBOOT) {\n var bowerDirectory = app.bow... | javascript | edit | 0 | 4 | mit | 8baaf1ff3d3dd6fb376ba2bbaceb9aaecf6d0108 | kennethkalmer/ember-cli-nouislider,kennethkalmer/ember-cli-nouislider,kennethkalmer/ember-cli-nouislider | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (template, args) {\n if (!args) {\n return interpolate.bind(null, template);\n }\n\n return interpolate(template, args);\n};\n\nfunction interpolate(template, args) {\n return template.r... | javascript | edit | 0 | 2 | mit | 5b2ef86aa9a781c45802efc31f356eaafb44e096 | stephenplusplus/string-format-obj | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// flow-typed signature: 3193712ae4ddd5385f359c7b985ac6fd\n// flow-typed version: 1517003b23/react-hot-loader_v4.x.x/flow_>=v0.53.0\n\n// @flow\ndeclare module \"react-hot-loader/root\" {\n declare type Module = {\n id: string... | javascript | edit | null | null | mit | 39f99915297b89883b160d625e807e320eeaf27c | moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0,moira-alert/web2.0 | flow-typed/npm/react-hot-loader_v4.x.x.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n path = require('path'),\n extend = require('extend');\n\nfunction load() {\n // Recursively load one or more directories passed as arguments.\n\n var dir, result = {};\n\n function processFilenam... | javascript | edit | 0 | 2 | cc0-1.0 | 50f13267f73396ddd49c7de4fa1c469e2ff935d5 | teoli2003/browser-compat-data,mdn/browser-compat-data,chrisdavidmills/browser-compat-data,chrisdavidmills/browser-compat-data,mdn/browser-compat-data | index.js | rejected_duplicate | Near-duplicate of sample 68464 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Used to detect for Cygwin\nvar os = require('os');\n\n// Required for Windows/Cygwin support\nvar root = [__dirname, '/vendor/libgit2/build/shared'].join(''),\n path = process.env.PATH;\n\nif (~os.type().indexOf('CYGWIN') && !~path.... | javascript | edit | 0 | 0 | mit | 6fa8f12fb6de8ab5a98bd9837c2789ead991dd92 | cbargren/nodegit,cbargren/nodegit,Naituw/nodegit,eunomie/nodegit,nodegit/test2,dancali/nodegit,freder/nodegit,cwahbong/nodegit,tannewt/nodegit,chasingmaxwell/nodegit,saper/nodegit,heavyk/nodegit,danawoodman/nodegit,StephanieMak/nodegit,dkoontz/nodegit,freder/nodegit,KenanSulayman/nodegit,jdgarcia/nodegit,jfremy/nodegit... | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'; // jshint ignore:line\nlet _ = require('lodash');\n\nlet JoiSequelize = function(model) {\n this._joi = {};\n this._model = model;\n this.sequelize = {\n define: require('./lib/define').bind(this)\n };\n this.datat... | javascript | edit | 0 | 3 | mit | 9787ecf581f65dfa2706db925d47c6114348cbe9 | joeybaker/joi-sequelize,mibrito/joi-sequelize | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Randomly generate a boolean based on an input probability.\n * @private\n * @param {Number} chance Value between 0 and 1 representing 0% and 100%\n * probabilities of a true value, respectively\n * @return {Boolean} Random val... | javascript | edit | 0 | 4 | mit | 3d0c815b2d98e3420c6428b9b8aa50cf04120f6f | j-/express-simulate-errors | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst PluginError = require('plugin-error');\nconst rocambole = require('rocambole');\nconst through = require('through2');\n\nmodule.exports = () => {\n let out = '';\n\n return through.obj((file, enc, cb) => {\n... | javascript | edit | 0 | 8 | mit | d53a201e1ccd719888f846e51c3dbaa220c7394f | jwilsson/gulp-debug-finder | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar connect = require('connect');\nvar faker = require('faker');\nvar serveStatic = require('serve-static');\nvar WebSocketServer = require('ws').Server;\n\nconnect().use(serveStatic(__dirname)).listen(8080);\n\nvar wss = new WebSocketS... | javascript | edit | 0 | 1 | mit | 71b1dbe65c553a118ccc55b4492f3bef28ee4eb5 | zsiciarz/isthisachat,zsiciarz/isthisachat | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nvar escape = function (str) {\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\");\n};\n\nvar regexp = ['lib', 'test'].map(function (i) {\n return '^' + escape(pa... | javascript | edit | 0 | 2 | mit | 0ee7ba0b11a0d65cfabb1ffb97a69bde272850a9 | phillipalexander/postcss,dpostigo/postcss,justim/postcss,bezoerb/postcss,OEvgeny/postcss,whitneyit/postcss,kk9599/postcss,MadLittleMods/postcss,qiucanghuai/postcss,wjb12/postcss,Shugar/postcss,zhuojiteam/postcss,himynameisdave/postcss,Semigradsky/postcss,longdog/postcss,notacouch/postcss,LucasFrecia/postcss,alexmchardy... | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//\n// lambdash - AWS Lambda function to run shell commands\n//\n// See also: https://alestic.com/2014/11/aws-lambda-shell/\n//\nvar AWS = require('aws-sdk');\nvar exec = require('child_process').exec;\nvar MAX_OUTPUT = 1024 * 1024 * 10... | javascript | edit | 0 | 1 | apache-2.0 | 2450ef2dd890d2d0f7304cbe7ed778de1b237d8b | alestic/lambdash,alestic/lambdash,alestic/lambdash | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar request = require('request');\n\n\nmodule.exports = function herokuSelfPing(url, options) {\n if(!options) {\n options = {};\n }\n\n options.interval = options.interval || 45 * 1000 * 60;\n options.logger =... | javascript | edit | 0 | 10 | mit | 03ad5f5d0f1fdce4450c97c1188c00d0c6679acd | gmaclennan/heroku-self-ping,Neamar/heroku-self-ping | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Admit One\n *\n */\n\nimport Auth from 'ember-tiny-auth';\nimport Authenticator from 'ember-admit-one/authenticator';\nimport Authorizer from 'ember-admit-one/authorizer';\nimport setup from 'ember-admit-one/set... | javascript | edit | 0 | 0 | mit | 6347af64b141f3d19d5dd60d2518d61e49624e85 | wbyoung/admit-one-ember | packages/ember-admit-one/lib/admit-one.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a... | javascript | edit | 0 | 3 | mit | 9ca88afd01b5a0995e124d84eb8730d69207b80a | fenhl/lore-seeker,taw/magic-search-engine,fenhl/lore-seeker,fenhl/lore-seeker,taw/magic-search-engine,taw/magic-search-engine,fenhl/lore-seeker,fenhl/lore-seeker | frontend/app/assets/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar loadTemplate = require('../loadTemplate')\n\nvar config = require('config')\n\nvar federate = require('../federate')\nvar collateObjects = require('../collateObjects')\n\nfunction PrefixesEndpoint(req, callback) {\n\n callback(... | javascript | edit | 0 | 1 | bsd-2-clause | 7cf307b2270459786bd99088dca9aaf977c7d932 | ICO2S/sbolstack-api,ICO2S/sbolstack-api,ICO2S/sbolstack-api | lib/endpoint/PrefixesEndpoint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// need to subtract 2 from source maps\nimport 'source-map-support/register';\n\nimport chai from 'chai';\nimport fs from 'fs';\nimport os from 'os';\nimport path from 'path';\nimport pngToIcns from './../../lib/pngToIcns';\n\nlet asser... | javascript | edit | 0 | 2 | mit | 30fd51fc850edd24d622ac59e40ec62f7bf90cc5 | gfpacheco/Nativefier,gfpacheco/Nativefier,zucher/nativefier,pixel9/nativefier,jiahaog/Nativefier,skewedlines/Nativefier,pixel9/nativefier,gfpacheco/Nativefier,zucher/nativefier,jiahaog/Nativefier,skewedlines/Nativefier,faceair/nativefier-slack,faceair/nativefier-slack,zucher/nativefier,pixel9/nativefier,jiahaog/Nativef... | test/module/getIcon-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n'use strict';\n\nvar bunyan = require('bunyan');\n\nvar logShim = require('thehelp-log-shim');\n\nvar logger = logShim('test:scenarios:bunyan');\n\nlogger.verbose('this is the default verbose text');\n\nlogger.info('this is the info t... | javascript | edit | 0 | 1 | mit | 851963d039ceb2491a4d87f2b8be8cd73218c74d | thehelp/log-shim | test/scenarios/bunyan/go.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Move from 'ember-animated/motions/move';\nimport Scale from 'ember-animated/motions/scale';\n\nexport function * transition() {\n this.insertedSprites.forEach(sprite => {\n sprite.reveal();\n });\... | javascript | edit | 0 | 1 | mit | 81e5d73486af5daf91563fe2056d8769d7b372bb | ember-animation/ember-animated,ember-animation/ember-animated,ember-animation/ember-animated | tests/dummy/app/controllers/hero/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Node = require('./Node');\n\nclass Slot extends Node {\n constructor(def) {\n super('Slot');\n\n this.generatorSlot = null;\n }\n\n generateCode(generator) {\n // At the time the code f... | javascript | edit | 0 | 2 | mit | 86f7f406e45fe41224c8371d44eef80a9d5e14ad | marko-js/marko,marko-js/marko | compiler/ast/Slot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-undef */\nimport { fork, call, select } from 'redux-saga/effects';\nimport { isIos } from 'worona-deps';\nimport * as deps from '../deps';\n\nfunction* redirectHome() {\n const contentType = yield select(deps.selec... | javascript | edit | 0 | 4 | mit | 7611265434c09bfbc0ce19887c7b516d16e22bcb | worona/starter-pro-app-theme-worona | src/app/sagas/index.js | rejected_duplicate | Near-duplicate of sample 89940 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass ModelController {\n constructor($rootScope, $parse) {\n this.$parse = $parse;\n this.listener = $rootScope.$on('render', (event, component) => {\n this.render(event, component);\n });\n this.settings = {\n m... | javascript | edit | 0 | 3 | mit | 897abebbd404ca2bdd4bd72056899b1faa365681 | ui-storybook/sb,ui-storybook/sb | src/sb/components/model/model.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express'\nimport graphQLHTTP from 'express-graphql'\nimport { maskErrors } from 'graphql-errors'\nimport cors from 'cors'\nimport cookieParser from 'cookie-parser'\nimport dotenv from 'dotenv'\nimport debug from 'de... | javascript | edit | 0 | 1 | mit | 8fba73a948c5d30e9be0e44f310974951e1677b0 | jkettmann/universal-react-relay-starter-kit,jkettmann/universal-react-relay-starter-kit | server/graphql/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { StackNavigator } from 'react-navigation'\nimport Home from './stateless/screens/Home'\nimport ReposList from './stateless/screens/ReposList'\n// import SEARCH_QUERY from './stateless/screens/Home'\n\n... | javascript | edit | 0 | 1 | mit | 5ca751dbb2aff72c55c4d8c41966c72fe80e46f2 | bnovf/react-native-github-graphql-app | components/router.js | rejected_duplicate | Near-duplicate of sample 75974 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node:true, strict:false */\n\nvar\n requirejs = require('requirejs'),\n\n jasmine = (function () {\n var Jasmine = require('jasmine');\n return new Jasmine({ projectBaseDir: require('path').resolve() });\n }()),\n\n ... | javascript | edit | 0 | 1 | mit | 37d6092c2062e503e0b3cf426c2ceeb0039e829e | biril/backbone-control,biril/backbone-control,biril/backbone-control | spec/specrunner.node.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { isArray, forEach } from 'lodash'\nimport qs from 'qs'\nimport Datasets from './Datasets'\n\nconst DISABLED_FILTERS = ['q', 'page', ]\n\nexport function _extractFilters(query) {\n let f... | javascript | edit | 0 | 3 | mit | 65107ff9d397bea9b3eaff264fc12a8e139f3b7c | sgmap/inspire,sgmap/inspire | src/components/Dataset/WrappedDatasets.js | rejected_duplicate | Near-duplicate of sample 88365 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Markdown from 'react-markdown';\nimport styles from 'components/Paragraph/paragraph.scss';\n\nconst MarkdownParagraph = ({ text, noMargin }) => (\n <Markdown\n className={styles[noMargin ? 'no-marg... | javascript | edit | 0 | 2 | apache-2.0 | 2a393e96fbf14190c3c0e63c7ae4ed222f1fb7aa | iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend | src/components/MarkdownParagraph/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n\nfunction getCard(user, cardID){\n\n\tif(user == 'a'){\n\t\treturn '/html/resources/users/a/' + cardID + '.html'\n\t}else if(user == 'b'){\n\t\treturn '/html/resources/users/b/' + cardID + '.html'\n\t}else{\n\t\talert(\"ERROR\");\n\t... | javascript | edit | null | null | mit | 1938978b482fccbc78c774fcec633524e73eb333 | masterkoppa/ag-hack_day,masterkoppa/ag-hack_day,masterkoppa/ag-hack_day,masterkoppa/ag-hack_day | javascript/custom/greeting-loader.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const colors = {\n blue: \"#3B7A9E\",\n lightBlue: \"#61BDE0\",\n darkBlue: \"#5F7682\",\n grey: \"#999999\",\n darkGrey: \"#666666\",\n lightGrey: \"#c3c3c3\",\n lighterGrey: \"#f5f5f5\",\n red: \"#D0021B\",\n orange: \... | javascript | edit | 0 | 0 | mit | 1c817a3976196d0e7ef0b3143ace78e7a989fb22 | ONSdigital/eq-author,ONSdigital/eq-author,ONSdigital/eq-author | src/constants/theme.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Mocha Specification Suite\n\n// Imports\nimport { assertDeepStrictEqual } from 'assert-deep-strict-equal';\nimport { readdirSync } from 'fs';\n\n////////////////////////////////////////////////////////////////////////////////////////... | javascript | edit | 0 | 1 | mit | b623bd8b73729252f6a932d1ca03bf9214c4741b | center-key/hamburger-menu,center-key/hamburger-menu | spec/package.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar questionView = {\n $getOptions: $( '.get-options' ),\n $followupNoNotSure: $( '.followup__no-not-sure' ),\n $followupYes: $( '.followup__yes' ),\n $nextSteps: $( '.next-steps' ),\n $feedback: $( '.feedback' ),\... | javascript | edit | 0 | 2 | cc0-1.0 | 6919560ac8de1b6fdebe4acfb7a69cc536cde695 | mistergone/college-costs,mistergone/college-costs,mistergone/college-costs,mistergone/college-costs | src/disclosures/js/views/question-view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('colors');\n\n\nmodule.exports = {\n plugins: [\n require('postcss-preset-env')({\n warnForDuplicates: false,\n features: {\n rem: {\n html: false\n ... | javascript | edit | 0 | 0 | mit | 09fdead0f000ee5119f1ab766854a06147f1136a | sfi0zy/muilessium,sfi0zy/muilessium | postcss.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport SearchBar from 'react-search-bar';\n\nexport default React.createClass({\n getInitialState: function () {\n return {\n users: [\n 'leo',\n 'bill',\n 'barbara',\n 'c... | javascript | edit | 0 | 2 | bsd-3-clause | 6df9a9d3d65c302342fff6b0166ab7e2dcfb52f9 | MissingMaps/users,MissingMaps/users | src/containers/Users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nfunction noop() {}\n\nexport default class TransientManager {\n\tconstructor(name, onTransChange=noop) {\n\t\tthis.name = name;\n\t\tthis.onTransChange = onTransChange;\n\t}\n\n\tlock(trans) {\n\t\tif (trans === this.trans) { return t... | javascript | edit | 0 | 4 | mit | 45ed9b3fb9008747cfc290cd952b15f559e09feb | akrumel/f.lux-react | src/TransientManager.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Actions from '../actions/actions';\nimport mapStore from '../stores/mapStore';\nimport { ModeConstants } from '../constants/constants';\n\nexport default class Marker {\n constructor(latLng, icon) {\n this.icon = icon;\n l... | javascript | edit | 0 | 2 | mit | 04e89653956b2299d8d4192a30fa62b6648462db | prodec/trail-blazer,prodec/trail-blazer | src/js/utils/marker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Actions from '../actions/actions';\nimport mapStore from '../stores/mapStore';\nimport { ModeConstants } from '../constants/constants';\n\nexport default class Marker {\n constructor(latLng, icon) {\n this.icon = icon;\n l... | javascript | edit | 0 | 2 | mit | 8a9cdb1e0a38e3647166b5701c31be2196b2a8fe | prodec/trail-blazer,prodec/trail-blazer | src/js/utils/marker.js | rejected_duplicate | Near-duplicate of sample 97718 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst router = express.Router()\nconst api = require('./api')\n\nconst { FACEBOOK_APP_ID, APP_URL, APP_TITLE, APP_DESCRIPTION, APP_IMAGE } = process.env\n\n/* GET Home page. */\nrouter.get('/', functi... | javascript | edit | 0 | 2 | mit | 469521d9ed3b721fa7fbe961f06cb225f32f2468 | hckhanh/games-searcher,hckhanh/games-searcher | routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nconst router = express.Router();\n\n//home\nrouter.get('/', function(req, res) {\n res.render('index', {\n header: 'express-boilerplate',\n description: 'Your basic web-app structure.'\n ... | javascript | edit | 0 | 1 | mit | d88d064cfdebe53f95045ab01817f20ae3c729fd | frenchbread/ExpressBoilerplate,frenchbread/ExpressBoilerplate | routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global $ */\nvar CartConst = require('../const/const.js');\n\nmodule.exports = function($scope, $location, $routeSegment, footerService) {\n console.log('CartMainCtrl');\n\n $scope.segment = $routeSegment;\n ... | javascript | edit | 0 | 2 | mit | 1d8f6ead098a8237ca01ace0b0ed5b895d75e30b | agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart | web/src/scripts/controller/CartMainCtrl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nconst path = require(\"path\");\nconst fs = require(\"fs-extra\");\nconst replaceExt = require(\"replace-ext\");\n\nfunction html() {\n return fs.readdirSync(path.join(__dirname, \"compilations\"))\n .map(file => `- {.link ${path.... | javascript | edit | 0 | 4 | mit | 34e4a38c192cea93e494366b3d0df341ea5645f4 | sethlu/fa17-tutoring | src/compilation-list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst favicon = require('serve-favicon');\nconst app = express();\n\n\napp.get('/', (req, res) => res.send('Hello World'));\n\napp.use(favicon(__dirname + '/public/favicon.ico'));\n\napp.listen(3000)... | javascript | edit | 0 | 1 | mit | fa27cfbc7180659b4fd7982372139bd49ce54dad | lopno/invest-bot | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Make it actually play the sound"
},
{
"role": "assistant",
"content": "var sound = require('./sound'), capture = require('./capture');\n\ncapture.on('capture', sound.addSound);\n\nsound.run();\n"
}
] | javascript | new_file | 0 | 0 | mit | 7b112f3d8c1f19bc9cfe95c301f057151b3aeeac | xymostech/Chorus | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport 'isomorphic-fetch';\n\nclass HelloMessage extends React.Component {\n\n constructor() {\n super();\n this.state = {};\n}\n\n componentDidMount() {\n fetch('https://199911.github.io/blog-data/fron... | javascript | edit | 0 | 2 | mit | 08b70c87156c9391f933b83c6741a80d67a0f72d | 199911/experimental-blog,199911/experimental-blog | src/pages/FrontPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * connect-cache-control\n *\n * Connect middleware to prevent the browser\n * from caching the response.\n *\n * Copyright (c) Eric Elliott 2013\n *\n * MIT License\n *\n * Written for the book, \n * \"Programming JavaScript Appli... | javascript | edit | 0 | 1 | mit | 9046e74fa7ade92f4002beaa6a78514fbbd5d930 | ericelliott/connect-cache-control | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\n\nconst helpers = require('../helpers');\nconst settingsFilePath = 'settingsData.json'\n\nfunction getSettings() {\n if (fs.existsSync(settingsFilePath)) {\n let data = fs.readFileSync(settingsFilePath);\n... | javascript | edit | 0 | 3 | mit | 1f8b0e59064365b7222530435c80cd13549b94c9 | Belar/space-cli | lib/modules/settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst EventEmitter = require('events');\nconst createPublicWebApp = require('./web/public');\nconst createPrivateWebApp = require('./web/private');\nconst actions = require('./core/actions');\nconst ... | javascript | edit | 0 | 2 | mit | 7b84f42489983396f5f76d88ce6605d9761881b7 | AudienseCo/monorail,AudienseCo/monorail | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar server = require('http').createServer()\nvar wr = require('./water_rower.js')({ debug: false} );\nvar ws = require('ws');\nvar url = require('url')\nvar WebSocketServer = ws.Server\nvar wsServer = new WebSocketServer({ server: serve... | javascript | edit | 0 | 2 | bsd-3-clause | 49da1c3e8400fbffb79eae5e94b8cf40167571ec | crertel/node-wr,crertel/node-wr | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n\n Copyright 2015 Covistra Technologies Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n htt... | javascript | edit | 0 | 1 | apache-2.0 | 54f92f11220c43044046ed8c71e570f9cc077b6b | Covistra/hapi-plugin-covistra-messaging | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar request = require('superagent');\nvar config = require('./config');\nvar debug = require('debug')('cyan-git-stats');\n\nvar personalAccessToken = config.personalAccessToken;\n\ndebug('token', personalAccessToken);\n```\n\nApply this... | javascript | edit | 0 | 2 | mit | 994d883c051031eace001a267e51e622c64888d3 | tylerpeterson/cyan-git-stats | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {takeLatest} from 'redux-saga';\nimport {call, fork, put} from 'redux-saga/effects';\nimport {arrayOf} from 'normalizr';\nimport {receiveAddress} from './actions';\nimport {mapActions} from './constants';\nimport {receiveUnits, s... | javascript | edit | null | null | mit | ee49d26e40a0681fb72125d79190cc2ec939f55c | nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map,nordsoftware/outdoors-sports-map | src/modules/map/saga.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar SHA1Stream = require('./helpers/SHA1Stream')\n\n\n/**\n * Export the raw class\n * @type {SHA1Stream|exports}\n */\nexports.SHA1Stream = SHA1Stream\n\n\n/**\n * Shorthand constructor\n * @return {SHA1Stream}\n */\nexp... | javascript | edit | 0 | 1 | mit | e7bddc5c7706366c71e7fdb15b4a2917e8451121 | snailjs/sha1-stream | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fill = require('flood-fill')\n\nmodule.exports = scan\n\nfunction scan(grid, opts) {\n opts = opts || {}\n\n var indexer = 'indexer' in opts ? functor(opts.indexer) : defaultIndexer\n , empty = opts.empty || defaultEmpty\n ,... | javascript | edit | 0 | 9 | mit | eba71105dba463de1e46979263155ffaa67cc078 | hughsk/flood-scan | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction selection_cloneShallow() {\n return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling);\n}\n\nfunction selection_cloneDeep() {\n return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling);\... | javascript | edit | 0 | 2 | isc | 80c8014524bd54bdc83eab90eccc8629a9f14593 | d3/d3-selection | src/selection/clone.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar $ = require('jquery');\nvar forOwn = require('lodash/object/forOwn');\nvar isArray = require('lodash/lang/isArray');\nvar isPlainObject = require('lodash/lang/isPlainObject');\nvar extend = require('lodash/object/ex... | javascript | edit | 0 | 3 | mit | ebc30d269c0412e10e3183615e5402ae73bc72a0 | mojular/mojular | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar moment = require('moment');\nvar parseDates = require('./lib/parse');\n\nmodule.exports = function(options) {\n options = options || {};\n\n if (typeof options.format === 'undefined') {\n options.formats = ['x', 'MM-DD-YYYY', m... | javascript | edit | 0 | 4 | mit | 239b9b2656d6b94fe8f47ea5d62142f64c968d50 | mariusc23/express-query-date | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ngAnnotate = require('ng-annotate'),\n SourceMapSource = require('webpack-core/lib/SourceMapSource');\n\nfunction ngAnnotatePlugin(options) {\n this.options = options || { add: true };\n}\n\nngAnnotatePlugin.prototype.apply = ... | javascript | edit | 0 | 6 | mit | 6b5a0aa023a6ebaf3af73a73e80af4f88f4cec55 | jeffling/ng-annotate-webpack-plugin | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar browserSync = require('browser-sync');\n\nfunction BrowserSyncPlugin(browserSyncOptions, options) {\n var self = this;\n\n var defaultOptions = {\n reload: true,\n name: 'bs-webpack-plugin',\n ... | javascript | edit | 0 | 5 | mit | f19834a27e16d596e69be1eee3fbd6a114567f95 | Va1/browser-sync-webpack-plugin | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * parse-author <https://github.com/jonschlinkert/parse-author>\n *\n * Copyright (c) 2014 Jon Schlinkert, contributors.\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar re = require('author-regex');\n\nmodule.expor... | javascript | edit | 0 | 4 | mit | 3045314efb777cc001e2671c0b76a27074d6b6aa | jonschlinkert/parse-author | 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 program = require('commander')\n , gulp = require('gulp')\n , chalk = require('chalk')\n , exec = require('exec')\n , pjson = require('./package.json')\n\nvar strings = {\n crea... | javascript | edit | 0 | 2 | mit | 20789a614839757cbb150143f3d226bd0fd4c7e8 | jinn-tool/jinn | index.js | rejected_duplicate | Near-duplicate of sample 83754 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n\ndefine([], function () {\n\n\t'use strict';\n\n\treturn {\n\n\t\t'oauthConsumerKey': 'wPfXjdZViPvrRWSlenSWBsAWhYKarmOkOKk5WS4U',\n\t\t'oauthSecret': 'kaBZXTHZHKSk2jvBUr8vzk7JRI1cryFI08ubv7Du',\n\n\t\t// 'overpassServer': 'http://ove... | javascript | edit | 0 | 1 | mit | 7a2c1120646c97492fc60aa10b4e0acb2b2cf569 | MapContrib/MapContrib,MapContrib/MapContrib,MapContrib/MapContrib | src/public/js/settings.js | rejected_duplicate | Near-duplicate of sample 97138 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require(\"http\");\nvar log4js = require(\"log4js\");\nvar logger = log4js.getLogger(\"OpenWeatherMapAdapter\");\nvar Q = require(\"q\");\nvar _ = require(\"lodash\");\nvar request = require(\"request\");\nvar WeatherInterfac... | javascript | edit | 0 | 2 | mit | b201d9f525b2f840eb49146c51c48e4fd80c1bdb | ebonwheeler/fantastic-waddle | service/OpenWeatherMapAdapter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst SPAWN = require('child_process').spawn\nconst DEFAULTS = require('./lib/defaults')()\nconst QUERY = require('./lib/query')\n\nlet Mongonaut = function (options) {\n this.config = Object.assign(DEFAULTS, options)\n... | javascript | edit | 0 | 6 | mit | 6b0582874a414656feebe449e39902156d15d19d | otterthecat/mongonaut | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { DataParser } = require('./DataParser');\n\nconst { DataEntry } = require('../entity/DataEntry');\nconst { Syntax } = require('../Enum');\n\nclass ClassComponentDataParser extends DataParser {\n parse (node) {\n switch (node.... | javascript | edit | 0 | 4 | mit | 802a7df1e59816bcc615d04a95c925275e789ea0 | vuedoc/parser,vuedoc/parser,vuedoc/parser | lib/parser/ClassComponentDataParser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar app = angular.module(\"browseApp.routes\", ['ui.router']);\n\n/*\n* Configurations for states for ui-router. Controllers refer to\n* the controllers located in mainctrls.js.\n*\n*/\napp.config(function($stateProvider, $urlRouterPr... | javascript | edit | 0 | 1 | mit | 2989be96907bf7e3dd3400a54316a8252de5f273 | alexcw234/feyAnthology,alexcw234/feyAnthology,alexcw234/feyAnthology | public/js/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n // Get the last updated timestamp\n var getLastUpdatedTime = function () {\n $('#last-updated-time').load('/last-updated');\n };\n\n getLastUpdatedTime();\n setInterval(getLastUpdatedTime, 30 * 10... | javascript | edit | 0 | 1 | mit | 6eecd59146cd00355fbdb02c7ad2de73fe953f32 | taeram/yyc-water | public/js/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport Page from '../../components/page'\nimport Header from './header'\nimport PreviousEpisodeSection from './sections/previous-episodes'\nimport EpisodesSection from './sections/episodes'\nimport Panelists... | javascript | edit | 0 | 1 | mit | 810a0e8ee0baf6d0abe43fdf03b09500dc611b30 | javascriptair/site,javascriptair/site,javascriptair/site | src/pages/home/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass PalindromError extends Error {\n constructor(message) {\n super(message);\n this.message = message;\n }\n}\n\nclass PalindromConnectionError extends PalindromError {\n /**\n *\n * @param {String} mes... | javascript | edit | 0 | 3 | mit | ef96bf38432f1e3664541056395071965747c8d8 | PuppetJs/PuppetJs,Palindrom/Palindrom,Palindrom/Palindrom,PuppetJs/PuppetJs | src/palindrom-errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jshint esversion: 6 */\nvar AWS = require(\"aws-sdk\");\n\nexports.handler = (event, context, callback) => {\n console.log(event);\n callback(null, 'Hello from Lambda');\n};\n\n```\n\nApply this change: Split IP string and log"
... | javascript | edit | 0 | 1 | unlicense | 300a38b3ecda8ac176a8774fd43bbf0156c67d1c | GroundwireDevs/impact-map,GroundwireDevs/impact-map | write.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar PinPoint = PinPoint || {};\n\nPinPoint.updatePopup = function() {\n chrome.tabs.query({active: true, currentWindow: true}, function(tabs){\n // Pull the url from the current tab\n var url = tabs[0].url;\n // Create array o... | javascript | edit | 0 | 1 | mit | 06a48fbe85f568130369c6f8243a02648abf2a13 | ospreys-2014/PinPoint | popup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { state } from './index.js';\n\n/**\n * Removes all tools from the target element with the provided name\n * @export @public @method\n * @name removeToolForElement\n *\n * @param {HTMLElement} element The element.\n * @param {str... | javascript | edit | 0 | 3 | mit | 7c5a2ae8e27989ee5ec2eb4fe0bfc146a9d4166a | cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,chafey/cornerstoneTools,cornerstonejs/cornerstoneTools | src/store/removeTool.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.methods({\n insertImage: function (base64FullImage) {\n insertImage(base64FullImage)\n }\n})\n\ninsertImage = function (base64FullImage) {\n var imageBuffer = new Buffer(base64FullImage.base64, 'base64')\n makeThumbNail(im... | javascript | edit | 0 | 2 | mit | 7528b1ab38a5c4e8b7cfcbd5fa51aeade3f0f216 | Kriegslustig/meteor-gallery | server/methods.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfoam.CLASS({\n package: 'foam.demos.analytics',\n name: 'StockSnapshot',\n ids: ['time', 'symbol'],\n properties: [\n {\n class: 'DateTime',\n name: 'time'\n },\n {\n class: 'String',\n name: 'symbol'\n ... | javascript | edit | 0 | 0 | apache-2.0 | 6fe1a5ee816da850e68feef91ebc0bccf8fd2c64 | foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2 | src/foam/demos/analytics/StockSnapshot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport rule, { ruleName, messages } from \"..\";\n\ntestRule(rule, {\n ruleName,\n config: [true],\n syntax: \"scss\",\n\n accept: [\n {\n code: \"// comment\",\n description: \"Double slash comments\"\n },\n {\n ... | javascript | edit | 0 | 0 | mit | 51786388d364874e943d8c5108d772fa82d0bf4a | kristerkari/stylelint-scss | src/rules/comment-no-loud/__tests__/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global*/\nimport config from './index.config';\n\nimport routerConfig from './index.route';\n\nimport runBlock from './index.run';\nimport HomeController from './home/home.controller';\nimport PortfolioIndexService from './home/portf... | javascript | edit | 0 | 0 | mit | d64fa2b5148a4e045626c915898eab2dcce72fc8 | RobEasthope/lazarus,RobEasthope/lazarus | src/app/index.module.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Config object, import as JSON\n * @type {Object}\n *\n * @example\n * {\n * \"consulateUrls\": {\n * \"country\": \"https://example.com/countries.php\",\n * \"consulate\": \"https://example.com/consulates.php\",\n * ... | javascript | edit | 0 | 2 | mit | c7592bde09d811ca7b9407b8cb57f7514a54ec1e | stefanmaric/telegram-ardillaBot,stefanmaric/telegram-ardillaBot,stefanmaric/consulate-watcher | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('truncate', [])\n .filter('characters', function () {\n return function (input, chars, breakOnWord) {\n if (isNaN(chars)) return input;\n if (chars <= 0) return '';\n if (input &... | javascript | edit | 0 | 8 | mit | 8f34133452026528e5c5e8b0bfed9d5e085b7a2e | BernardoSilva/angular-truncate-2,penance316/angular-truncate,bernardolm/angular-truncate,nagyistoce/angular-truncate,reillydavis/angular-truncate,penance316/angular-truncate,bernardolm/angular-truncate,sparkalow/angular-truncate,nagyistoce/angular-truncate,sparkalow/angular-truncate,reillydavis/angular-truncate | src/truncate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(arrayOfTests, generateTestDetails) {\n arrayOfTests = arrayOfTests || []\n generateTestDetails = generateTestDetails || function() {}\n\n arrayOfTests.forEach(function(test) {\n test = test || {}\n\n v... | javascript | edit | 0 | 6 | cc0-1.0 | 9763b313b8f0ad83c516bb23a9752b53e07816ea | msafi/mocha-dynamic-tests | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar aps = Array.prototype.slice;\n\nvar segue = function(cb) {\n\n var running = false;\n var queue = [];\n var nextArgs = [];\n\n var next = function() {\n\n var args = aps.call(arguments);\n var err = args.s... | javascript | edit | 0 | 3 | mit | fc97c5399389d7da0e577525754de09b950d8d27 | yuanqing/segue | index.js | rejected_duplicate | Near-duplicate of sample 93172 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\"\n\nconst express = require('express');\nconst HTTPStatus = require('http-status-codes');\n\nvar scraper = require('./app/routes/scraper');\n\nconst app = express();\n\napp.use('/', scraper);\n\n// Final catch any route mi... | javascript | edit | 0 | 2 | mit | db970f4a3f0301b77f48a700d5ebf9ac7e66cded | C3-TKO/junkan-server | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { writeFile } = require('fs')\nconst { renderTemplates } = require('./chippanfire.js')\n\nfunction writeToBuildDirectory (renderedTemplates) {\n return Promise.all(renderedTemplates.map(writeToFile))\n}\n\nfunction writeToFile(te... | javascript | edit | 0 | 2 | apache-2.0 | 1d1a6e791d2c05e6aeb096d2c31ed8b166175696 | crosslandwa/chippanfire-site | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { BrowserWindow } from 'electron';\nimport path from 'path';\n\nexport const showDesktopSettings = () => {\n if (WindowManager.getAll('settings').length > 0) {\n WindowManager.getAll('settings')[0].show();\n return;\n }\n... | javascript | edit | 0 | 4 | mit | e20f68504bd78cb3bbfae5c4b8aff4f164b90c2f | MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-,MCManuelLP/Google-Play-Music-Desktop-Player-UNOFFICIAL-,n4k1/Google-Play-Music-Desktop-Player-UNOFFICIAL-,petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL-,n4k1/Google-Play-Music-Desktop-Player-UNOFFICIAL-,bjohnso5/Google-Play-Music-Desktop-Player-UNOF... | src/main/features/core/desktopSettings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar crypto = require('crypto');\nvar CustomStats = require('webpack-custom-stats-patch');\n\nvar DEFAULT_PARAMS = {\n customStatsKey: 'sprockets',\n ignore: /\\.(gz|html)$/\n};\n\nfunction SprocketsStatsWebpackPlugin(... | javascript | edit | 0 | 4 | mit | daa629a7a69ea63c32f030c112337ad61934d2ea | mikechau/sprockets-stats-webpack-plugin | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nvar proxyGenerator = function(name){\n return function(msg = '', title = '') {\n window.toastr[name](msg.toString(), title.toString());\n };\n};\n\nexport function initialize(container, application, op... | javascript | edit | 0 | 2 | mit | 6a08613c2af9e690b9c64553b96c34a94f071f65 | knownasilya/ember-toastr,GramozKrasniqi/ember-toastr,knownasilya/ember-toastr,GramozKrasniqi/ember-toastr | addon/initializers/toastr.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n\n name: 'ember-cli-sentry',\n\n contentFor: function(type, config){\n if (type === 'body') {\n return '<script src=\"' + config.sentry.cdn + '/' + config.sentry.ve... | javascript | edit | 0 | 3 | mit | 5c2c013f209d13f03b52b635f35988138edb1b61 | hussfelt/ember-cli-sentry,hussfelt/ember-cli-sentry | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar co = require('co');\n\nmodule.exports = function(timeout) {\n return function *(next) {\n var ctx = this;\n yield Promise.race([\n new Promise(function(resolve, reject) {\n setTimeout(function() {\n var... | javascript | edit | 0 | 2 | mit | f995cb7d67d924eedfc9358d73919b8c0a4ad143 | wejendorp/koa-timeout | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Model, { hasMany, belongsTo, attr } from '@ember-data/model';\nimport { htmlSafe } from '@ember/template';\nimport { use } from 'ember-could-get-used-to-this';\nimport ResolveAsyncValue from 'ilios-common/classes/resolve-async-va... | javascript | edit | 0 | 2 | mit | aa74611f9ca55bad4d743067c73f169e271bbc47 | ilios/common,ilios/common | addon/models/session-type.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar $ = require('dom')\n\nmodule.exports = Button\n\nfunction Button(ele, opts) {\n if (!(this instanceof Button))\n return new Button(ele, opts)\n\n this.opts = {\n loadingText: opts.loadingText || 'loading...'\n }\n this.ele... | javascript | edit | 0 | 5 | mit | f8d8150499b05a96618c067a3c99f8d76004d5bc | evanlucas/bootstrip-button | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar VOWELS = /[aeiou]/gi;\nvar VOWELS_AND_SPACE = /[aeiou\\s]/g;\n\nexports.parse = function parse(string, join){\n if(typeof string !== 'string'){\n throw new TypeError('Expected a string as the first option');\n }\n\n return s... | javascript | edit | 0 | 3 | mit | 59f488d00ffc93cb8bd31ab7367a52aa7809b368 | lestoni/unvowel | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar ExecBuffer = require('exec-buffer');\nvar isPng = require('is-png');\nvar optipng = require('optipng-bin').path;\nvar through = require('through2');\n\n/**\n * optipng imagemin plugin\n *\n * @param {Object} opts\n ... | javascript | edit | 0 | 6 | mit | 676f03582270cf704f42d1c57b3080021d2b7163 | imagemin/imagemin-optipng | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * Dependencies..\n */\n\nvar Ware;\n\nWare = require('ware');\n\n/*\n * Components.\n */\n\nvar parse,\n stringify;\n\nparse = require('./lib/parse.js');\nstringify = require('./lib/stringify.js');\n\n/**\n * Co... | javascript | edit | 0 | 2 | mit | b8fb34f3fbe60317f0b3ea6e584a03fe131f2b54 | yukkurisinai/mdast,tanzania82/remarks,ulrikaugustsson/mdast,eush77/remark,eush77/remark,chcokr/mdast,ulrikaugustsson/mdast,wooorm/remark,yukkurisinai/mdast,chcokr/mdast | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst reshape = require('reshape')\n\nexports.name = 'reshape'\nexports.inputFormats = ['reshape', 'html']\nexports.outputFormat = 'html'\n\nexports.renderAsync = function (str, options, locals) {\n return new Promise((... | javascript | edit | 0 | 11 | mit | 94f097e423769a94ea3b56608e1c824ffb348476 | jstransformers/jstransformer-reshape,jstransformers/jstransformer-reshape | index.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.