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\nexport const START_DATE_CHANGE = 'START_DATE_CHANGE';\nexport const END_DATE_CHANGE = 'END_DATE_CHANGE';\n\nexport const FILTER_BY_AREA = 'FILTER_BY_AREA';\nexport const FILTER_BY_IDENTIFIER = 'FILTER_BY_IDENTIFIER';\n\nexport const FIL... | javascript | edit | 0 | 0 | mit | 9b31522d4d65b8f1b0e8b0133914b9059bd81787 | clhenrick/nyc-crash-mapper,clhenrick/nyc-crash-mapper,clhenrick/nyc-crash-mapper | src/constants/action_types.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-magic-numbers */\nimport LabeledMode from './LabeledMode';\nclass LicoriceMode extends LabeledMode {\n static id = 'LC';\n\n constructor(opts) {\n super(opts);\n }\n\n calcAtomRadius(_atom) {\n return this... | javascript | edit | 0 | 1 | mit | d6f71748d574a0d8d00de034328224d0c28e6b22 | epam/miew,epam/miew,epam/miew,epam/miew,epam/miew | src/gfx/modes/LicoriceMode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { cloneDeep } from 'lodash'\nimport filters from './index'\nimport { boolMerge } from '../utils'\n\nexport default class FilterBuilder {\n constructor () {\n this._filters = {}\n }\n /**\n * Apply a filter of a given type... | javascript | edit | 0 | 2 | mit | 086b7eafeefb761f3883b9eeccb231152dfdbda0 | node-packages/bodybuilder,node-packages/bodybuilder,ShareIQ/bodybuilder,ShareIQ/bodybuilder,danpaz/bodybuilder,danpaz/bodybuilder,danpaz/bodybuilder | src/filters/filter-builder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njQuery(document).ready(function () {\n jQuery('#add-another-email').click(function () {\n var emailList = jQuery('#email-fields-list');\n var newWidget = emailList.attr('data-prototype');\n newWidget = newWidget.... | javascript | edit | 0 | 1 | mit | cb20cbe08c0e52613124e18ec8991a216949a11b | geoffroycochard/platform,orocrm/platform,umpirsky/platform,trustify/oroplatform,hugeval/platform,mszajner/platform,akeneo/platform,Djamy/platform,northdakota/platform,2ndkauboy/platform,morontt/platform,ramunasd/platform,trustify/oroplatform,umpirsky/platform,hugeval/platform,akeneo/platform,hugeval/platform,northdakot... | Resources/public/js/emails.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n sass: {\n options: {\n includePaths: ['app/bower_components/foundation/scss']\n },\n dist: {\n o... | javascript | edit | 0 | 1 | mit | 2c62380798476a22bbb50dd7780fbf4f24e02b5c | regdoug/solartime | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function( grunt ) {\n \"use strict\";\n\n grunt.initConfig({\n bump: {\n options: {\n files: [ \"package.json\" ],\n\n // Commit\n commit: true,\n ... | javascript | edit | 0 | 1 | mit | ac7fa80dbd84e31a06dc99a65e268de7c69e0924 | markelog/grunt-checker,jscs-dev/grunt-jscs,BridgeAR/grunt-jscs | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 71144 | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add a history-clear function to conkeror"
},
{
"role": "assistant",
"content": "function history_clear () {\n var history = Cc[\"@mozilla.org/browser/nav-history-service;1\"]\n .getService(Ci.nsIBrowserHistory);\n histor... | javascript | new_file | 0 | 1 | bsd-3-clause | 1a93325776c6ae619d85239a0336cb06d40682fb | pjones/emacsrc | conkeror/bindings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint global-require:0 */\n\nmodule.exports = {\n map: { inline: true },\n plugins: [\n require('postcss-custom-properties')({\n importFrom: 'src/css/00_variables.css'\n }),\n ]\n};\n\n```\n\nApply this change: Add pre... | javascript | edit | 0 | 0 | mit | 5c5bf55009d2cd66819fdfd6dfbef525d837b0bf | frippz/frippz.se,frippz/frippz.se,frippz/frippz.se | postcss.config.js | rejected_duplicate | Near-duplicate of sample 92025 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nvar assertSchema = require('./index');\nvar yargs = require('yargs');\n\nvar opts = yargs\n .demand(1)\n .usage(\n 'Usage: $0 [ -d database url ] <schema>\\n' +\n 'Asserts the existence of... | javascript | edit | 0 | 0 | mit | 04cf346847f0472555407997f5167cf233ba6e0e | apechimp/node-pg-assert-schema | cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar util = require('util'),\n yeoman = require('yeoman-generator');\n\n// mocha:app generator\n//\n// Setup the test/ directory.\n//\n\nmodule.exports = Generator;\n\nfunction Generator(args, options, config) {\n\n yeoman.generators... | javascript | edit | 0 | 1 | bsd-2-clause | 520e87c145d4b659affd67936ea9cd86d4e100ee | yeoman/generator-mocha,yeoman/generator-mocha | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Knex from 'knex';\nimport config from '../../config/config.json';\nconst knex = Knex.initialize(config.bookshelf.postgresql);\n\nexport default function () {\n knex.migrate.latest(config.bookshelf.migrations)\n .then(functi... | javascript | edit | 0 | 1 | mit | 3501a2a8868b0e2c9594555de00d2ed6279696d1 | wellsam/nerd,Xantier/nerd-stack,Xantier/nerd-stack,wellsam/nerd,isp1r0/nerd-stack,isp1r0/nerd-stack | app/data/bookshelf/migrate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nExt.define('TrackAnnot.view.Viewport', {\n renderTo: Ext.getBody(),\n extend: 'Ext.container.Viewport',\n items: [{\n \txtype: 'toolbar',\n \titems: [{\n \t\ttext: 'Metrics',\n \t\tmenu: {\n \t\t xtype: 'menu'... | javascript | edit | 0 | 0 | apache-2.0 | bac5bacb594b772b07f42ce321626337c19dde0b | NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI,NLeSC/eEcology-Annotation-UI | TrackAnnot/app/view/Viewport.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\n\n/**\n * Themeleon helper constructor.\n *\n * See the functions from `factory.js` for variables signification.\n *\n * This constructor has an empty prototype (except the `use` method) sin... | javascript | edit | 0 | 3 | unlicense | 470860f96e1b2b2c866d41690ae9769ad30f89a7 | themeleon/themeleon,themeleon/themeleon | Themeleon.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar audio = document.getElementById(\"chris\");\n\nfunction pauseChris() {\n\taudio.pause();\n}\n\nfunction playChris() {\n\taudio.currentTime = 952;\n\taudio.play();\n\tsetTimeout(pauseChris, 331000);\n}\n\nfunction addChrisButton() {\... | javascript | edit | 0 | 2 | mit | 97fa03ff3bf49d09cbd774fc9846b3298d11b2f2 | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | scripts/chris.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { assign } from \"lodash\";\nimport CommonProps from \"./common-props\";\n\nexport default class Box extends React.Component {\n static propTypes = {\n ...C... | javascript | edit | 0 | 1 | mit | 17aab292abe123e4812a09c41e3a68762213f432 | FormidableLabs/victory-core,FormidableLabs/victory-core | src/victory-primitives/box.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar fs = require('fs');\nvar mergeTrees = require('broccoli-merge-trees');\n\nvar manifest = require('./manifest');\n\nmodule.exports = {\n name: 'broccoli-manifest',\n initializeOptions: function() {\n ... | javascript | edit | 0 | 4 | mit | b4c12ea5777db86718f7bcbf17836e53070f7ed8 | racido/broccoli-manifest,arenoir/broccoli-manifest,nybblr/broccoli-manifest,matthewlehner/broccoli-manifest | lib/ember-addon.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n port: 3000,\n internalClientPort: 3001,\n authKey: 'ASDASD'\n};\n\n```\n\nApply this change: Make server auth key configurable\n\nCan be provided with an env var or with a Docker secret named \"authkey\"."
... | javascript | edit | 0 | 0 | mit | 2609a05dec6e32991e1375ad7991e17dae9d262b | mikko/CentralIntelligence-server | server-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nvar Base = require('../base')\n\n/**\n * @function raw converts the Base object into a normal javascript wObject, removing internal properties.\n * It also converts nested objects and rebuilds arrays from objects with ... | javascript | edit | 0 | 11 | isc | 72360c8d6f8c868c9ea88f5f9018e7ff01ad3fb9 | vigour-io/vjs | lib/methods/raw.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar clientio = require(\"socket.io-client\");\nvar client = clientio.connect(process.env.HOST + \":\" + process.env.PORT);\nvar Gpio = require(\"onoff\").Gpio;\n\nvar slot = {}\nslot.led1 = new Gpio(14, \"out\");\n\n\nclient.emit(\"join... | javascript | edit | 0 | 1 | mit | 8848878d6341abee73b0afcd6670988aeb37ad58 | herpiko/nf-iot-end | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (enyo, scope) {\n\t/**\n\t* {@link moon.Divider} is a simply styled component that may be used as a separator\n\t* between groups of components.\n\t*\n\t* @class moon.Divider\n\t* @mixes moon.MarqueeSupport\n\t* @mixes moon.Ma... | javascript | edit | 0 | 1 | apache-2.0 | fed7876c125287523fed18c0053f5d4456cacdbd | enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone | source/Divider.js | rejected_duplicate | Near-duplicate of sample 94247 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n function Weapon(game, x, y, coolDown, bulletSpeed, bullets, damage) {\n this.game = game;\n this.x = x;\n this.y = y;\n this.coolDown = coolDown;\n this.nextFire = 0;\n this.bullets ... | javascript | edit | 0 | 3 | mit | f22d12a06b8b90506f2ad6bbaf165948df145f60 | werme/DATX02 | src/js/weapon.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\npath = require('path');\n\nmodule.exports = {\n mongo: {\n dbUrl: 'https://api.mongolab.com/api/1', // The base url of the MongoLab DB server\n apiKey: 'gubV4zs5yN-ItUUQDpgUx0pUA98K3MYH', // Our MongoLab API ... | javascript | edit | 0 | 0 | mit | f9421ab35aecdede1ca8454e231043e9f94edba6 | PythagoreLab/PayMyMeeting | server/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nconst HtmlWebpackPluginConfig = new HtmlWebpackPlugin({\n inject: 'true',\n ... | javascript | edit | 0 | 1 | mit | ad43d8c6a4c83b67b5ca95edbf9093bc89e16882 | katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming,katharosada/bus-shaming | client/webpack.base.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nchrome.app.runtime.onLaunched.addListener(function() {\n\n chrome.runtime.getPlatformInfo(function(info) {\n // don't render statusbar over app UI on iOS\n if (info.os === 'cordova-ios' && window.Status... | javascript | edit | 0 | 3 | mit | 36b0096973cbcdfb00aa5f2562d075a70df6e4a0 | clochix/mail-html5,halitalf/mail-html5,sheafferusa/mail-html5,sheafferusa/mail-html5,b-deng/mail-html5,whiteout-io/mail-html5,b-deng/mail-html5,whiteout-io/mail,halitalf/mail-html5,clochix/mail-html5,whiteout-io/mail,kalatestimine/mail-html5,tanx/hoodiecrow,sheafferusa/mail-html5,whiteout-io/mail-html5,whiteout-io/mail... | src/background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst path = require('path');\n\nmodule.exports = {\n\textends: path.join(__dirname, 'index.js'),\n\trules: {\n\t\t'no-var': 'error',\n\t\t'object-shorthand': [\n\t\t\t'error',\n\t\t\t'always'\n\t\t],\n\t\t'prefer-arrow-c... | javascript | edit | 0 | 0 | mit | 79b6179285a28efaad30ba45648a0a871e598324 | sindresorhus/eslint-config-xo | esnext.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction createTask(chrome, title, note) {\n let task = 'twodo://x-callback-url/add?task=' + encodeURI(title) + '¬e=' + encodeURI(note);\n chrome.tabs.update({\n url: task\n });\n}\nchrome.browserAction.onClicke... | javascript | edit | 0 | 5 | mit | fcf75a1589637715c76accbcfc7bb6dd9605ed31 | mkleucker/2do-webextension | src/background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect;\nvar App = require('../app/scripts/app');\n\ndescribe('app', function () {\n\n it('should initialize app with no arguments', function () {\n var app = new App();\n expect(app)... | javascript | edit | 0 | 1 | mit | c3aeac1fd9568ea064f88e92cf16425ba7050f1b | caleb531/truthy,caleb531/truthy | test/app.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport Moment from 'react-moment'\nimport Link from 'next/link'\nimport generateUrl from 'utils/urlGenerator'\n\nimport EditButton from 'containers/EditButton'\n\nimport sty... | javascript | edit | 0 | 1 | mit | e0d8b2aa93bf72a99893e6aaccb8dfbb23085dc2 | bmagic/acdh-client | components/ProgramLine/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar producer = require('../index')().producer;\nvar consumer = require('../index')().consumer;\nvar uuid = require('node-uuid');\n\nvar fixtures = {\n queues: ['test-queue-0']\n};\n\ndescribe('Producer/... | javascript | edit | 0 | 1 | mit | f284b16e5bb43deb3f00a947d5515b515162cfcf | dial-once/node-bunnymq | test/rpc-spec.js | rejected_duplicate | Near-duplicate of sample 67710 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst toolbox = require('sw-toolbox');\n\n// Try network but fallback to cache\ntoolbox.router.default = toolbox.networkFirst;\n\n// Data should query the network first\ntoolbox.router.any('/api/*', toolbox.networkOnly);\n\n// Data shou... | javascript | edit | 0 | 0 | mit | 78ad3613e02ed2ab7c848d33d6ff9ad40a0789ff | AdaRoseEdwards/81,AdaRoseEdwards/81,AdaRoseEdwards/81 | client/scripts/sw.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar helpers = require('../helpers');\n\nmodule.exports = {\n 'name': 'space-after-comma',\n 'defaults': {\n 'include': true\n },\n 'detect': function (ast, parser) {\n var result = [];\n\n ast.traverseByTyp... | javascript | edit | 0 | 14 | mit | 22f41b9cfcf10af245b9bb185d9eb04c2fa82da6 | sasstools/sass-lint,flacerdk/sass-lint,bgriffith/sass-lint,sktt/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,sasstools/sass-lint,srowhani/sass-lint | lib/rules/space-after-comma.js | rejected_complexity | Cyclomatic complexity too high: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @author sk3dsu(Fadli Ishak)\n// @name MyLowyat\n// @version 0.2.1\n// @description Removing some elements of the forum to be a bit cleaner for SFW.\n// @namespace https://github.com... | javascript | edit | 0 | 0 | mit | 74bd38f424fbdea30488ab5ef33afe5036be6018 | mfadliishak/mylowyat | script/mylowyat.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction FindProxyForURL(url, host) {\n return \"PROXY success:80\";\n}\n\n// We end the script with a comment (and no trailing newline).\n// This used to cause problems, because internally ProxyResolverV8\n// would append some functio... | javascript | edit | 0 | 1 | bsd-3-clause | 546d00b3ee7daec01bff311fe7cb6bff8909f8d3 | Chilledheart/chromium,ondra-novak/chromium.src,Chilledheart/chromium,timopulkkinen/BubbleFish,patrickm/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,anirudhSK/chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,Jo... | net/data/proxy_resolver_v8_unittest/ends_with_comment.js | rejected_duplicate | Near-duplicate of sample 68316 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable global-require */\nconst path = require('path');\nconst CircularDependencyPlugin = require('circular-dependency-plugin');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\nconst HtmlWebpackPlugin = require(... | javascript | edit | 0 | 0 | mit | a39aa576808891460fd674345162cecf57a45ee8 | nickjohnson-dev/dawww | examples/configs/webpack-base.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n client: {\n lib: {\n css: [\n 'public/lib/bootstrap/dist/css/bootstrap.min.css',\n 'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',\n ],\n js: [\n 'pu... | javascript | edit | 0 | 0 | mit | 57079e22ece4cde0aef427eee163810a141c4731 | duppercloud/mean,edwardt4482/customerRates,Karma-Tech-Consulting/recipes,NicolasKovalsky/mean,amoundr/doctorNet,mc-funk/exostie-device-sim-js,shteeven/scradio,cleargif/mean,lirantal/vault,ChristopherJones72521/KHE2015,spacetag/TechEx_Josiah_2,devypt/mean,Boonda-P/newmean,ryanjbaxter/mean,helaili/automatic-octo-spork,et... | config/assets/cloud-foundry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nvar intervalId = setInterval(function() {\n fs.readFile('/sys/class/thermal/thermal_zone0/temp', function(err, data) {\n var date = new Date();\n var temp = data / 1000;\n var newData =... | javascript | edit | 0 | 2 | mit | 466ab72d4d10df22740968461398b588b13cc909 | DevinCarr/piTemp,DevinCarr/piTemp | tempLog_server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction propertyAccess ( name ) {\n\treturn name === 'default' ? `['default']` : `.${name}`;\n}\n\nexport default function getExportBlock ( bundle, exportMode, mechanism = 'return' ) {\n\tif ( exportMode === 'default' ) {\n\t\tconst de... | javascript | edit | 0 | 4 | mit | f084957ab6edc9c70333bc83637271730cf3c036 | lukeapage/rollup,Victorystick/rollup,alalonde/rollup,Permutatrix/rollup,corneliusweig/rollup | src/finalisers/shared/getExportBlock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction editselection(adminname, adminusername, adminpassword, adminid){\n\tdocument.getElementById(\"inputadminname\").value = adminname;\n\tdocument.getElementById(\"inputadminusername\").value = adminusername;\n\tdocument.getElement... | javascript | edit | 0 | 1 | mit | 6a5bac62634300a1f34977694840d1cfa1154fd6 | altusgerona/cmsc127project,altusgerona/cmsc127project,altusgerona/cmsc127project | assets/js/adminselection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n!function (assert, path) {\n 'use strict';\n\n require('vows').describe('Integration test').addBatch({\n 'When minifying a CSS file': {\n topic: function () {\n var callback = this.callback,\n ... | javascript | edit | 0 | 1 | mit | 0dd80408bb9b2ab204f984b8f16f964cef6ab629 | candrholdings/publishjs-less,candrholdings/publishjs-less | src/test/integration-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react';\n\nexport default class Header extends React.Component {\n _renderContent() {\n const { game } = this.props;\n\n return (\n <h1>Place your ships</h1>\n );\n }\n\n render() {\n ... | javascript | edit | null | null | mit | e12a57b8d5c005bbb4e7a4f4f98638aa70df3562 | bigardone/phoenix-battleship,bigardone/phoenix-battleship | web/static/js/components/game/header.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['config'],\nfunction(config) {\n 'use strict';\n\n describe('config module', function() {\n it('should allow values to be functions with returns', function() {\n config.option('fn_test', function() { return (1 + 2 + 3)... | javascript | edit | 0 | 1 | mit | 102b402570437fa38dfbd4d5afb94115aaa495dc | gavinhungry/debugger.io,gavinhungry/debugger.io | public/test/spec/config_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst fs = require('fs');\nconst util = require('util');\nconst _ = require('lodash');\nconst LineTokens = require('./LineTokens');\nconst AbstractSyntaxTree = require('./AbstractSyntaxTree');\n\nclass MUMPSCompiler {\n... | javascript | edit | 0 | 1 | apache-2.0 | f29302c93dfb5b6e41193a14e82552a04cc9177e | mfuroyama/mumps-compiler | MUMPSCompiler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\r\nimport ENV from '../config/environment';\r\n\r\nexport function initialize() {\r\n $.getScript('//js.honeybadger.io/v0.2/honeybadger.min.js').then(function() {\r\n if (window.Honeybadger) {\r\n var... | javascript | edit | 0 | 3 | mit | 8dc69b9f6571baaff8dad5ff61debd0c10cfb0f3 | webnuts/ember-cli-honeybadger,webnuts/ember-cli-honeybadger | app/initializers/honeybadger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n entry: './client/index.js',\n output: {\n path: path.resolve(__dirname, 'dist'),\n filename: 'bundle.js'\n },\n p... | javascript | edit | 0 | 0 | mit | e2c43007eec0e388425f4fc07693fae1b33fa775 | ntoung/beer.ly,ntoung/beer.ly | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const initialState = {\n loading: false,\n loaded: false,\n error: false,\n data: {}\n};\n\nconst setLoading = (state, loading) => ({ ...state, loading });\nconst setError = (state, error) => ({ ...state, error });\nconst set... | javascript | edit | 0 | 1 | mit | 576da3b37112a0eba4ff1ab61f0029c66a8a66a4 | Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch | app/javascript/app/pages/ndcs/ndcs-reducers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction wrap(res, fn) {\n return function(...args) {\n if (res.timedout) {\n return res;\n } else {\n return fn.apply(res, args);\n }\n };\n}\n\nexport default (timeoutValue) => {\n r... | javascript | edit | 0 | 2 | mit | e60823af502d8fb5a51be7d41c177f5b2fab5055 | fjodorekstrom/timeout-middleware | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { render } from 'react-dom'\nimport { Provider } from 'react-redux'\nimport { Router, Route } from 'react-router'\nimport config from 'react-global-configuration'\n\n//views\nimport HomePage from './vie... | javascript | edit | 0 | 1 | mit | 05b841b505d91a974a06bb20ae78652cbb9b48e6 | aerian-studios/react-crud | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport React from 'react/addons';\n\nvar stubRouterContext = (Component, props, stubs) => {\n return React.createClass({\n childContextTypes: {\n getCurrentPath: React.PropTypes.func,\n getCurrentR... | javascript | edit | 0 | 1 | isc | a7c61ddb11083242d38c64e6db4f6de2e0dd76d1 | jeffreymoya/sprintly-kanban,pipermerriam/sprintly-kanban,pipermerriam/sprintly-kanban,florapdx/sprintly-kanban,datachand/sprintly-kanban,sprintly/sprintly-kanban,datachand/sprintly-kanban,sprintly/sprintly-kanban,whitebird08/sprintly-kanban,whitebird08/sprintly-kanban,jeffreymoya/sprintly-kanban,florapdx/sprintly-kanba... | app/lib/stub-router-context.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fetch = require('node-fetch');\n\nclass BaseLoader {\n\n constructor(APIToken, baseURL) {\n this.APIToken = APIToken;\n this.fetch = fetch\n this.baseURL = baseURL\n }\n\n get fetchConfiguration() {\n const headers ... | javascript | edit | 0 | 4 | mit | c63cc693b7854745c2abdd8eea55dd695c669821 | dbsystel/1BahnQL | Core/BaseLoader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('permission-language', 'Integration | Component | permission language', {\n integration: true\n});\n\ntest('it... | javascript | edit | 0 | 1 | apache-2.0 | 74ee10552c8791941df3c436dddf25ba2680cc78 | CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-preprints,baylee-d/ember-preprints,caneruguz/ember-preprints,laurenrevere/ember-preprints | tests/integration/components/permission-language-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([], function() {\n var saveSelection, restoreSelection;\n if (window.getSelection && document.createRange) {\n saveSelection = function(el) {\n var sel = window.getSelection && window.getSelection();\n ... | javascript | edit | 0 | 5 | mit | 1df6a847d47cee94cbc2c761a794521a66f2392c | mervick/emojionearea | src/block/selection.js | rejected_duplicate | Near-duplicate of sample 76154 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function nbCodesFromId(codeListById, id) {\n return id ? nbCodes(codeListById[id]) : 0\n}\n\nfunction nbCodes({ isSpec, isLoaded, codes }) {\n return isSpec && !isLoaded ? 10 : codes.length\n}\n```\n\nApply this change: Use 1 ... | javascript | edit | 0 | 3 | mit | f65d07bd4493f4af71e30722f496bbef8f37832c | Zenika/Pogues,Zenika/Pogues,InseeFr/Pogues,InseeFr/Pogues,InseeFr/Pogues,Zenika/Pogues | src/js/utils/code-list-utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction ddg_spice_canistreamit(movies) {\n // console.log(xk);\n\n var result,img,snippet,link,div;\n var items = new Array();\n for(var i = 0; i<movies.length; i++)\n {\n result = movies[i];\n\n ... | javascript | edit | 0 | 5 | apache-2.0 | 907f0b008587aadbcaf1da93491662e874a0301d | andrey-p/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,soleo/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,deserted/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,mr-karan/zer... | share/spice/canistreamit/spice.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {\n Link\n} from 'react-router';\nimport './Menu.css';\nimport User from './User';\nimport language from '../language/language';\n\nconst menuLanguage = language.components.menu;\n\nlet Menu = React.c... | javascript | edit | 0 | 2 | bsd-3-clause | 97290f01c55a2426856d4c9fe095760bf2483e44 | jeromelachaud/Last.fm-Activities-React,jeromelachaud/Last.fm-Activities-React | src/components/Menu.js | rejected_duplicate | Near-duplicate of sample 102993 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('webapp').factory('mp', function($q, $rootScope, $timeout, host) {\n\tvar socket = new WebSocket(\"ws://\" + host + \":8080/stomp\");\n\n\tvar stompClient = Stomp.over(socket);\n\t//stompClient.debug = angular.noop();\n\n... | javascript | edit | 0 | 5 | apache-2.0 | bf7b3c5fb899a1f7b7fef673f691bf20cae94571 | gillius/lunchbus,gillius/lunchbus | src/main/resources/static/mp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$().ready(() => {\n loadContentSection().then(() =>{ \n $(\"#loader\").addClass(\"hide\");\n $(\"#real-body\").removeClass(\"hide\");\n $(\"#real-body\").addClass(\"body\");\n\n $(\".keyword\").click(function() {\n $(t... | javascript | edit | 0 | 1 | apache-2.0 | bd26a8c14f8f1f44a6ad745cf93af2a9898299e7 | googleinterns/step36-2020,googleinterns/step36-2020,googleinterns/step36-2020 | src/main/webapp/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\n\nimport { logoutUser } from '../../redux/actions';\n\nconst NavBar = ({ isAuthenticated, logoutUser }) => (\n <ul classNam... | javascript | edit | 0 | 4 | mit | fe88f534341eabeff89313ae046a2be48043833f | mbchoa/presence,mbchoa/presence | client/src/components/NavBar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst {app, BrowserWindow} = require('electron')\nconst path = require('path')\nconst url = require('url')\n\nlet win\n\nfunction createWindow () {\n win = new BrowserWindow({width: 650, height: 450})\n\n win.loadURL(url.format({\n ... | javascript | edit | 0 | 2 | apache-2.0 | e92ff29bd378db3d07fa389d9b950834234dbc61 | jysperm/elecpass,jysperm/elecpass | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar STATUSES = {\n UP: 0,\n DOWN: 1\n}\nvar mouseStatus = {\n left: STATUSES.UP,\n right: STATUSES.UP\n}\n\nvar BUTTONS = {\n LEFT: 1,\n RIGHT: 3\n};\n\ndocument.onmousedown = function(event) {\n if (event.which === BUTTONS.LEFT)... | javascript | edit | 0 | 5 | isc | 942b75631721f83ac139bf08eb4712718630d552 | wendorf/mousetures,wendorf/mousetures | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['mathlive/mathlive'], \r\n function(mLive) {\r\n\t MathLive = mLive;\r\n\t MathLive.renderMathInDocument();\r\n\t TheActiveMathField = MathLive.makeMathField(\r\n\t\tdocument.getElementById('mathEditorActive'),\r\n\t \t{/... | javascript | edit | 0 | 1 | mit | 1b63df7382dea64feaa9d22ba415b141837277fc | NSoiffer/ProceduralMathEditor,NSoiffer/ProceduralMathEditor | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Modules\nvar http = require('http'),\n urllib = require('url'),\n RPCHandler = require('jsonrpc').RPCHandler,\n scheduler = require('./schedulerRpcWrapper');\n\n// Configuration\nvar cfg = require('config')('ControlNode', {\... | javascript | edit | 0 | 3 | apache-2.0 | 72a8fa47e9f43325b1eb78afda1abea84f79d3fb | anthony-kolesov/kts46,anthony-kolesov/kts46,anthony-kolesov/kts46,anthony-kolesov/kts46 | jslib/controlNode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar uuid = require('node-uuid');\nvar JSData = require('js-data');\n\nvar store;\nvar adapter;\nvar Report;\n\nfunction error(msg) {\n return new Promise(function(resolve, reject) {\n return resolve({ error: msg });\n });\n}\n\nfun... | javascript | edit | 0 | 4 | mit | 426fc75610582bbcfad0a8d1cac575e400419326 | zalmoxisus/remotedev-server,zalmoxisus/remotedev-server | lib/store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst UglifyJsPlugin = require(\"uglifyjs-webpack-plugin\");\nconst path = require(\"path\");\n\nmodule.exports = {\n mode: \"development\",\n devtool: \"inline-source-map\",\n entry: {\n IntelliSearch: \"./src/SearchCli... | javascript | edit | 0 | 0 | mit | be3833211473eaa2f24e4f8ef20af9969d2bd0d0 | IntelliSearch/search-client,IntelliSearch/search-client | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\n\nmodule.exports = {\n entry: {\n index: './src/main/index.js'\n },\n output: {\n path: './target/out',\n filename: '[name].js',\n libraryTarget: 'commonjs'... | javascript | edit | 0 | 0 | mit | 68e3266af5daacee80d207b14ea123898c201b0b | smikhalevski/react-text-input,smikhalevski/react-text-input | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\n\nconst exec = require('child_process').exec;\nconst version = process.versions.v8;\nconst tmpfile = path.join(__dirname, version+'.flags.json');\n\nif (!fs.existsSync(tmpfile)) ... | javascript | edit | 0 | 2 | mit | 5113f6ac77db5315c9b311505f86a3dc1e627204 | tkellen/js-v8flags,js-cli/js-v8flags | fetch.js | rejected_duplicate | Near-duplicate of sample 99952 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar AudioChannel = function(args) {\n this.context = AudioContext ? new AudioContext() : new webkitAudioContext();\n this.oscill = this.context.createOscillator();\n this.gain = this.context.createGain();\n\n if(args) {\n this.fr... | javascript | edit | 0 | 6 | mit | ca7e4f4c5d6ba470b557e87c47b7f298ce40437e | peternatewood/pac-man-replica,peternatewood/pac-man-replica | audio_channel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { Compile } = require(\"@truffle/compile-solidity\");\n\nclass DebugCompiler {\n constructor(config) {\n this.config = config;\n }\n\n async compile(sources = undefined) {\n const compileConfig = this.config.with({ quiet:... | javascript | edit | 0 | 2 | mit | 1a55d508fdb0c9f3fc5bf9a74aea73ab922f287b | ConsenSys/truffle | packages/core/lib/debug/compiler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nfunction createDefaultFormatter() {\n return function defaultFormatter(ctx, errors) {\n ctx.body = {};\n if (errors && errors.length) {\n ctx.status = 500;\n if (errors.length === 1) {\n ctx.st... | javascript | edit | 0 | 6 | mit | 1eede171c8f8d0d8e141832414d258708fac9579 | njakob/koa-formatter | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Image.js\n *\n * @description :: This represents a product image with file paths for different variations (original, thumb, ...).\n * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models\n */\n\nmodule... | javascript | edit | 0 | 7 | mit | b44662de07df147bc64fb439db554f5d045cbb5e | joschaefer/online-shop-api | api/models/Image.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar program = require('commander');\nvar pkg = require('../package.json');\nvar GitterBot = require('../lib/GitterBot');\n\nprogram\n .version(pkg.version)\n .description('Gitter bot for evaluating expressions')\n .usage('[options]')... | javascript | edit | 0 | 0 | mit | 40a85d221a90d4af0fe4377b77eaf9f10348a5c5 | ghaiklor/uwcua-vii | bin/gitter-bot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fm = require('gray-matter');\n\n// makes mdx in next.js suck less by injecting necessary exports so that\n// the docs are still readable on github\n// (Shamelessly stolen from Expo.io docs)\n// @see https://github.com/expo/expo/bl... | javascript | edit | 0 | 2 | apache-2.0 | 7e05dc3eafd6a5ba970624b242d00bd139ec46eb | jaredpalmer/formik,jaredpalmer/formik,jaredpalmer/formik | docs/src/lib/docs/md-loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar util = require(\"util\");\n\nvar AbstractError = require(\"./AbstractError.js\"),\n defaultRenderer = require(\"./defaultRenderer.js\");\n\n/**\n * generate Error-classes based on AbstractError\n *\n * @param e... | javascript | edit | 0 | 3 | mit | 10ddc5f85fe449bed94a3bb751f0250d2ca4e01f | peerigon/erroz | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = {\n rules: {\n \"sort-object-props\": function(context) {\n var caseSensitive = context.options[0].caseSensitive;\n var ignoreMethods = context.options[0].ignoreMethods... | javascript | edit | 0 | 10 | mit | d5b71ae723decdf033d995247ee76a103df800ff | shane-tomlinson/eslint-plugin-sorting,jacobrask/eslint-plugin-sorting | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * redbloom\n * Copyright(c) 2016 Benjamin Bartolome\n * Apache 2.0 Licensed\n */\n\n'use strict';\n\nmodule.exports = redbloom;\n\nvar ee = require('event-emitter');\n\nvar Immutable = require('immutable');\nvar Rx = require('rx')... | javascript | edit | 0 | 2 | apache-2.0 | 56f30e597acc3cef1380f287531ba2f75668498d | eq8/redbloom | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport echoRidge from './echo-ridge';\nimport fireflies from './fireflies';\n\nexport default [\n echoRidge,\n fireflies\n];\n\n```\n\nApply this change: Clean up the portfolio imports"
},
{
"role": "assistant",
"content":... | javascript | edit | 0 | 0 | mit | 25103c5b77422b369c9e1171fa0f03d9ed8dd337 | VoxelDavid/voxeldavid-website,VoxelDavid/voxeldavid-website,vocksel/my-website,vocksel/my-website | src/jsx/routes/portfolio/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst net = require('net');\n\nconst isAvailable = options => new Promise((resolve, reject) => {\n\tconst server = net.createServer();\n\tserver.unref();\n\tserver.on('error', reject);\n\tserver.listen(options, () => {\n\... | javascript | edit | 0 | 3 | mit | 1d9e4ee3231173d5acaf96dbce94a7529b15396b | sindresorhus/get-port,sindresorhus/get-port | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (app) {\n // Default conf.\n app.conf.add({\n vhosts: {\n match: 'hostname',\n notFound: true\n }\n });\n\n // Depends on cantina-web.\n app.require('cantina-web');\n\n // Load stuff.\n a... | javascript | edit | 0 | 2 | apache-2.0 | a23126cf3c1f6dc74d6759d33d238e8bcd80f2fb | cantina/cantina-vhosts | cantina-vhosts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nglobal.__base = __dirname + '/src/';\n\n// Commands\nvar cli = require('commander');\n\ncli\n .version('0.0.1')\n .option('-p, --port <port>' , 'Change static server port [8000]', 8000)\n .option('-P... | javascript | edit | 0 | 0 | mit | 821f52c62015f457b98086643a49f2a000d9b033 | eth0lo/slr | 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: 'telling-stories',\n\n included: function(app) {\n if (!this.shouldIncludeFiles()) {\n return;\n }\n\n this._super.included.apply(this, arguments);\n\n... | javascript | edit | 0 | 2 | mit | f23074f8943c95085c164455b3816c48940cc365 | mvdwg/telling-stories,mvdwg/telling-stories | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport class Serializable {\n\n constructor(props) {\n this.properties = props || {};\n }\n\n toObject() {\n return this.properties;\n }\n\n toString() {\n return JSON.stringify(this.toObject());\n ... | javascript | edit | 0 | 4 | mit | 5ec930689e6a43b010b1ba67099412db9ab2dd0e | ryanvanderpol/expo-analytics | hits.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n\"use strict\";\n\nconst moment = require(\"moment\");\nconst sugar = require(\"sugar\");\nconst chalk = require(\"chalk\");\nconst exec = require(\"child_process\").exec;\n\nprocess.argv.splice(0, 2);\nif (proces... | javascript | edit | 0 | 2 | mit | 3c75375bf0c61e544c8f720ab4a5c2da7f495abd | sam3d/git-date | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar os = require('os')\nvar path = require('path')\nvar homedir = require('os-homedir')\n\nfunction linux (id) {\n var cacheHome = process.env.XDG_CACHE_HOME || path.join(homedir(), '.cache')\n return path.join(cacheHome, id)\n}\n\nfu... | javascript | edit | 0 | 5 | mit | cd6156a92c7641fa3b3e7b0cfb2c258e5789bf6c | LinusU/node-cachedir | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar p4 = require('node-perforce');\nvar through = require('through2');\nvar gutil = require('gulp-util');\nvar PluginError = gutil.PluginError;\n\nvar PLUGIN_NAME = 'gulp-p4';\n\nmodule.exports = function (p4cmd, option... | javascript | edit | 0 | 3 | mit | 458ec938cf110488e3e1caca6738d837b95eae8a | wokim/gulp-p4 | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar stati = [\n 'irritable',\n 'gassy',\n 'diuretic',\n 'constipated',\n 'twisted',\n 'cramped'\n // Have another idea? Submit a pull request or issue\n // https://github.com/itsananderson/gut-status/issues\n];\n... | javascript | edit | 0 | 1 | mit | 3c7d404115288f70c300e0ad26a7f23298ae25fd | itsananderson/gut-status | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Module dependencies.\n */\nvar reduceCSSCalc = require(\"reduce-css-calc\")\n\n/**\n * Expose `plugin`.\n */\n\nmodule.exports = plugin\n\n/**\n * Plugin to convert all function calls.\n *\n * @param {Object} stylesheet\n */\n\n... | javascript | edit | 0 | 3 | mit | b6f80db17489eb5adea2e6afa1f1318de42f13e5 | postcss/postcss-calc | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar tape = require('tape');\nvar through = require('through2');\nvar PluginError = require('gulp-util').PluginError;\nvar requireUncached = require('require-uncached');\n\nvar PLUGIN_NAME = 'gulp-tape';\n\nvar gulpTape ... | javascript | edit | 0 | 4 | mit | 5dca57f086d68d9b5846f25c2a07d33a80abfa78 | yuanqing/gulp-tape | index.js | rejected_duplicate | Near-duplicate of sample 72242 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * days <https://github.com/jonschlinkert/days>\n *\n * Copyright (c) 2014 Jon Schlinkert, contributors.\n * Licensed under the MIT license.\n */\n\nmodule.exports = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'... | javascript | edit | 0 | 0 | mit | 4bcce86558e7be9e0baadef5e2686229241d5d6b | datetime/days | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports = function (options) {\n options = options || {}\n options.property = options.property || 'body'\n options.stringify = options.stringify || JSON.stringify\n\n return function (req, res, next) {\n req.removeAllLis... | javascript | edit | 0 | 4 | mit | 75f75e238be54a709a29ddf4aa69adc693f3ef4a | dominictarr/connect-restreamer | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar postcss = require('postcss'),\n color = require('color');\n\nmodule.exports = postcss.plugin('postcss-lowvision', function () {\n return function (css) {\n css.walkDecls('color', function (decl) {\n var val... | javascript | edit | 0 | 1 | mit | 34c1352671382808810760a9908f4d8b1b3d507d | keukenrolletje/postcss-lowvision | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst appPath = require('app-path');\nconst bundleId = require('bundle-id');\nconst osxAppVersion = require('osx-app-version');\nconst appSize = require('app-size');\n\nmodule.exports = app => {\n\tif (process.platform !=... | javascript | edit | 0 | 3 | mit | b57b340ac0bcc369156fcfe3295dc5e4a54aad55 | gillstrom/osx-app | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n/**\n * Helper to avoid:\n * var DatasetEditController = require('../../../app/hello/dataset/edit/DatasetEditController');\n * Just use rrequire('DatasetEditController') instead!\n */\nvar path = require('path');\nvar rre... | javascript | edit | 0 | 1 | mit | de29f2833d776a6405ab9f9fdf10f558ec916c7d | baelter/require-helper | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { shallow } from 'enzyme';\nimport TimeTable from './../TimeTable.js';\nimport ErrorMsg from './../ErrorMsg';\nimport LoadingMsg from './../LoadingMsg';\n\ndescribe('... | javascript | edit | 0 | 1 | mit | 11de7f2f5db1b6107626a490cfd7f841a5f29568 | kangasta/timetablescreen,kangasta/timetablescreen | src/__tests__/TimeTable.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar gutil = require('gulp-util');\nvar through = require('through2');\nvar assign = require('object-assign');\nvar nunjucks = require('nunjucks');\n\nmodule.exports = function (opts) {\n\treturn through.obj(function (file... | javascript | edit | 0 | 6 | mit | 997a25099704796203d9c0364c0046e82b028ea9 | sindresorhus/gulp-nunjucks | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst execa = require('execa');\nconst errorHandler = require('./errorHandler');\n\nmodule.exports = function runGulp() {\n execa('gulp',\n [\n '--cwd', process.cwd(),\n '--gulpfile', path.jo... | javascript | edit | 0 | 2 | mit | 3f7358297887dbff61704835a8cf782de9735846 | strt/bricks | lib/utils/runGulp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nmodule.exports = function (scope) {\n\tvar rc = require('rc')('npm');\n\treturn rc[scope + ':registry'] ||\n\t\trc.registry || 'https://registry.npmjs.org/';\n};\n\n```\n\nApply this change: Make it work in browsers"
},... | javascript | edit | 0 | 2 | mit | 1bd01d06e230b4f3a09f3404ac2ba4460a78fb8b | sindresorhus/registry-url,sindresorhus/registry-url | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @typedef {import('unist').Node} Node\n * @typedef {import('unist').Parent} Parent\n */\n\nimport {modifyChildren} from 'unist-util-modify-children'\n\nexport const affixEmoticonModifier = modifyChildren(mergeAffixEmoticon)\n\n/*... | javascript | edit | 0 | 10 | mit | f4644972b893e61bece5f40ec9bbd76fbae61765 | wooorm/nlcst-affix-emoticon-modifier | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Range from '../Range'\nimport RefinementList from '../RefinementList'\nimport SidebarSection from '../SidebarSection'\nimport './style.scss'\n\nfunction Facets () {\n return (\n <div data-app='facet... | javascript | edit | 0 | 1 | mit | 6adbbb3a8de7bd37fe4508d0c8e16a564dd85413 | windtoday/windtoday-marketplace,windtoday/windtoday-marketplace,windtoday/windtoday-app | src/app/FacetsWrapper/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar bind = require('function-bind');\nvar define = require('define-properties');\nvar replace = bind.call(Function.call, String.prototype.replace);\n\nvar rightWhitespace = /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\... | javascript | edit | 0 | 1 | mit | fcb2b86684d814825b3efc4d7b37484482e1a784 | es-shims/String.prototype.trimRight,ljharb/String.prototype.trimRight | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n init\n}\n\nvar electron = require('electron')\nvar get = require('simple-get')\n\nvar config = require('../config')\nvar log = require('./log')\n\nvar ANNOUNCEMENT_URL = config.ANNOUNCEMENT_URL +\n '?version=' + c... | javascript | edit | 0 | 4 | mit | 47c554a5ffa52d7c2a24ab3143a977edc99e1c8e | webtorrent/webtorrent-desktop,feross/webtorrent-desktop,feross/webtorrent-app,yciabaud/webtorrent-desktop,yciabaud/webtorrent-desktop,yciabaud/webtorrent-desktop,feross/webtorrent-desktop,feross/webtorrent-app,webtorrent/webtorrent-desktop,michaelgeorgeattard/webtorrent-desktop,feross/webtorrent-desktop,webtorrent/webt... | main/announcement.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst ParserCommon = require('./ParserCommon');\r\n\r\nfunction PropertyValue(xml) {\r\n this.Annotations = {};\r\n\r\n this.validElements = {\r\n };\r\n this.validAttributes = {\r\n 'Bool': {bool: true},\r\n 'String': {},\r\n... | javascript | edit | 0 | 1 | apache-2.0 | 363716de3e6996605d2457d1ac8d6b5fa09ad994 | pboyd04/CSDLParser | lib/PropertyValue.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.