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\n$(document).ready(function() {\n // check if the Google Analytics function is available\n if (typeof ga == 'function') {\n function trackFollow() {\n ga('send', 'event', 'Following', 'click Follow button');\n };\n\n func... | javascript | edit | 0 | 2 | mit | d4283f90c29f59a1ee5f2fecb71eb86461f10d0c | openaustralia/righttoknow,openaustralia/righttoknow,openaustralia/righttoknow | assets/javascripts/event_tracking.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ConfluenceAPI = require('confluence-api');\n\nfunction Confluence(options) {\n this.confluence = new ConfluenceAPI({\n username: options.user,\n password: options.password,\n baseUrl: options.baseUrl\n });\n}\n\nConfluen... | javascript | edit | 0 | 3 | mit | d5ec6c065635205dba161bf76c20c7c5bf66e02d | adampetrie/shipit,adampetrie/shipit | lib/confluence.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.run = function (options, cb) {\n var page = require('webpage').create();\n var port = options.port || 3000;\n var id = options.id;\n var size = options.size || '800x600';\n var quality = options.quality || ... | javascript | edit | 0 | 9 | isc | 6d45d58a4070c087c86b2e7d98401db2b3e8b4a1 | AppGeo/print-map,AppGeo/print-map | lib/screenshot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nvar PID_FILENAME = \"ircas.pid\";\nvar fs = require(\"fs\");\nvar q = require(\"q\");\nvar logging = require(\"./logging\");\nvar Validator = require(\"./config/validator\");\nvar log = logging.get(\"hotreload\");\n\nva... | javascript | edit | 0 | 1 | apache-2.0 | 4457ad68a5bdd67faf7acf6d8428f15f6607cf4c | matrix-org/matrix-appservice-irc,matrix-org/matrix-appservice-irc,matrix-org/matrix-appservice-irc | lib/hot-reload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst $ = jQuery = require(\"jquery\")\r\nconst localforage = require(\"localforage\")\r\nconst moment = require(\"moment\")\r\nconst path = require(\"path\")\r\n\r\nconst Audiosearch = require(\"audiosearch-client-node\")\r\nconst audi... | javascript | edit | 0 | 0 | apache-2.0 | dc9fe5359d499bc35bd590238fe98b342c414f17 | z-------------/cumulonimbus,z-------------/cumulonimbus,z-------------/cumulonimbus | public/app/js/global-requires.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst riotcontrol = require('riotcontrol');\n\n\nconst router = function() {\n\n let script = document.createElement('script');\n\n // function addBundle(route) {\n // if (route) {\n // script.src = 'build/Page.j... | javascript | edit | 0 | 4 | mit | e9412d35f981b26a7e953cf6c25637259ba4ad4f | tscok/annsjon-spa,tscok/annsjon-spa | assets/js/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('PassApp')\n.factory('ApiService', function($http){\n\tvar o = {};\n\tvar baseUrl = \"http://localhost:3000\";\n\n\to.getResults = function(id){\n\t\tconsole.log(id);\n\t\treturn;\n\t}\n\n\to.postResults = function(data){... | javascript | edit | 0 | 2 | mit | 8ad5ce9492badf47f6e9d07b2e1bc198a7d6bbf2 | PuppetMasterz/passda,PuppetMasterz/passda | public/js/services/apiservice.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { expect } from 'chai'\nimport { defineSupportCode } from 'cucumber'\n\ndefineSupportCode(({ Given, When, Then }) => {\n Given('I visit {stringInDoubleQuotes}', (url) => browser.url(url))\n\n When('I click the clickable reg... | javascript | edit | 0 | 1 | mit | 606a26e01f096872e5fc1c4cb6482689ab5a3a34 | webdriverio/wdio-allure-reporter | test/fixtures/features/steps/passing-steps.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require(\"path\");\n\nmodule.exports = {\n entry: {\n app: './src/app.tsx'\n },\n output: {\n path: path.resolve(__dirname, 'build'),\n publicPath: \"/build/\",\n filename: \"[name].bundle... | javascript | edit | 0 | 0 | mit | d7e739a826c11059568d874732edea6a8c6f7e62 | jhdrn/myra,jhdrn/myra | docs/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * raygun\n * https://github.com/MindscapeHQ/raygun4node\n *\n * Copyright (c) 2015 MindscapeHQ\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar http = require('http');\nvar https = require('https');\n\nvar send = fu... | javascript | edit | 0 | 5 | mit | 2496bbf7ac29e1dc7a84d03ccc53a09023a213f9 | BlinkUX/raygun4node,MindscapeHQ/raygun4node,MindscapeHQ/raygun4node | lib/raygun.transport.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * These are all the device types defined in Johnny-Five. These\n * extend our Input objects (not elements)\n *\n * min - Minimum value for the device type\n * max - Maximum value for the device type\n * _methods - A li... | javascript | edit | 0 | 0 | mit | e9585fdd3da650ed6825d38408f79707ed26c678 | davatron5000/NodebotUI,dtex/NodebotUI | client/src/deviceTypes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { EJSON } from 'meteor/ejson';\n/* eslint-disable no-undef, import/no-extraneous-dependencies, import/no-unresolved, import/extensions, max-len */\nimport serialize from 'serialize-javascript';\n/* eslint-enable */\nimport { valu... | javascript | edit | 0 | 1 | mit | 5cc09e8bd13998601624ce94066697e2bace7522 | ssr-server/ssr,ssrwpo/ssr,ssrwpo/ssr,ssr-server/ssr | src/server/steps/createDataContext.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.methods({\n\n addSearchSamplePeople: function() {\n\n var first_names = [\n \"Ada\",\n \"Grace\",\n \"Marie\",\n \"Carl\",\n \"Nikola\",\n \"Claude\",\n \"Peter\",\n \"Stefan\",\n ... | javascript | edit | 0 | 2 | apache-2.0 | 91e391e53ffb65d5be0659f25fcaafdc11f20695 | GrowSocial/pilot,GrowSocial/pilot | growsocial/common/methods/searchMethods.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Constants } from \"../constants\";\nimport { Composer } from \"../views/composer\";\n\nComposer.RegisterKeyboardHandler(function(e) {\n return (\n e.type === \"keydown\" &&\n e.keyCode == Constants.BACKSPACE_KEY\n );\n}... | javascript | edit | 0 | 7 | mit | 2227f4fcbb9d6d2a96131f3b18ef930a668ec6ed | metalabdesign/wysihtml5,flowapp/wysihtml5,metalabdesign/wysihtml5,flowapp/wysihtml5 | src/wysihtml5/keyboard/prevent_last_paragraph_delete.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Box from '../box';\nimport WidgetBody from './WidgetBody';\nimport WidgetFooter from './WidgetFooter';\nimport WidgetHeader from './WidgetHeader'... | javascript | edit | 0 | 1 | mit | 75b32696a778300b94cf33c4622f3e67c92f9531 | teamleadercrm/teamleader-ui | src/components/widget/Widget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { SplashEffect } from \"./effect.js\";\n\nexport class GrowAndShrink extends SplashEffect {\n\tconstructor(element, min, max) {\n\t\tsuper(element);\n\n\t\tthis.min = min || 0;\n\t\tthis.max = max || 1;\n\t}\n\n\tin(value) {\n\t\... | javascript | edit | 0 | 3 | mit | e20d32d2a0063f18027c7a2ba7105b0680f5d405 | magnontobi/splasher.js | src/js/effects/growAndShrink.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * model/fancy/localstorage.js\n */\n\nvar localStorageModel = baseModel.extend({\n /**\n * To use, extend this model and specify key as a property.\n *\n * For example:\n * var metrics = tbone.models.localStorag... | javascript | edit | 0 | 2 | mit | 871ad701060b88092b4ffdef204798da950fb130 | appneta/tbone,tillberg/tbone,tillberg/tbone,rachellaserzhao/tbone,appneta/tbone,rachellaserzhao/tbone | src/model/fancy/localstorage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport through from 'through2'\nimport getAssetImporter from './getAssetImporter'\nimport promiseEach from 'promise-each-concurrency'\n\nconst batchSize = 10\nconst concurrency = 6\n\nexport default options => {\n const assetImporter =... | javascript | edit | 0 | 2 | mit | 9920fde0fec4bb69df8a55d596cbb893a330b8db | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/core/src/actions/dataset/import/getBatchedAssetImporter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/*\n |--------------------------------------------------------------------------\n | Browser-sync config file\n |--------------------------------------------------------------------------\n |\n | For up-to-date information about the o... | javascript | edit | 0 | 0 | mit | 16d03de98122eea445949937230da180087d26a4 | getninjas/gaiden,getninjas/gaiden | browser-sync.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst ReadableStream = require('readable-stream')\n\nmodule.exports = function (snapshot) {\n return checkCache.bind(null, snapshot._namespace)\n}\n\nfunction checkCache (namespace, req, rsp) {\n if (rsp.createReadStream) return\n co... | javascript | edit | 0 | 2 | mit | de7aa2b962e1a81180c15a380150a7fb3e1c1ddd | xuset/planktos,xuset/planktos,xuset/planktos | lib/middleware/cache.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * dom/template/render.js\n */\n\n/**\n * Render the named template with the specified view\n * @param {string} id\n * @param {View} view\n */\nfunction renderTemplate(id, view) {\n var template = templates[id];\n if (templ... | javascript | edit | 0 | 4 | mit | 9b315c8ac6636ca0bff5ceec2322d5b6eb6b140c | rachellaserzhao/tbone,rachellaserzhao/tbone,appneta/tbone,appneta/tbone,tillberg/tbone,tillberg/tbone | src/dom/template/render.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar dragDrop = require('drag-drop/buffer');\nvar id3v2 = require('id3v2-parser');\nvar BufferList = require('bl');\n\nvar parser = new id3v2();\n\ndragDrop('body', function(files) {\n var bl = new BufferList();\n bl.append(files[0])\n... | javascript | edit | 0 | 1 | mit | b4ad49176114bd7681a494474a6cda1fc3c23e4d | KenanY/id3v2-in-browser | client/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = { accesskey: true, class: true, dir: true, hidden: true,\n\tid: true, intert: true, lang: true, spellcheck: true, style: true,\n\ttitle: true, translate: true };\n\n```\n\nApply this change: Add onkeypr... | javascript | edit | 0 | 0 | mit | 5f0bc6d44bbc4b7e0a2c5beb1a33d8c73c483edc | medikoo/dbjs-dom | input/_html-attributes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar md5 = require('md5');\n\n/*\n * JavaScript utilities.\n */\nexport default class Utils {\n /*\n * Formats a Date() object into a string.\n */\n static formatDateTime(date) {\n return moment(date).format('LLLL');... | javascript | edit | 0 | 2 | mit | 8a14d40ddc208c8f4e7405e8465a144c497ccc0b | robyparr/adjourn,robyparr/adjourn,robyparr/adjourn | app/javascript/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction TutorialState(game) {\n this.game = game;\n this.playingState = new PlayingState(game);\n var renderRegion = new RenderRegion(null, game.canvas.height * .005, null, game.canvas.height * .10);\n var tutorial = new Tu... | javascript | edit | 0 | 2 | mit | 222a58da1f5300e9ae9ff6fc70dae91a268773f9 | mnito/factors-game,mnito/factors-game | src/States/TutorialState.js | rejected_duplicate | Near-duplicate of sample 87369 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { terser } from 'rollup-plugin-terser'\nimport pkg from './package.json'\nimport { nodeResolve } from '@rollup/plugin-node-resolve'\nimport commonjs from '@rollup/plugin-commonjs'\n\nconst umd = { format: 'umd', name: 'A11yDialog... | javascript | edit | 0 | 1 | mit | 23fcb385a6b1102851c1879fd5844403989ce7f6 | edenspiekermann/a11y-dialog,edenspiekermann/a11y-dialog | rollup.config.js | rejected_duplicate | Near-duplicate of sample 71862 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n* grunt-tfs-unlock\n* https://github.com/danactive/grunt-tfs-unlock\n*\n* Copyright (c) 2013 Dan BROOKS\n* Licensed under the MIT license.\n*/\n\n'use strict';\n\nmodule.exports = function(grunt) {\n\n\t// Please see the Grunt docum... | javascript | edit | 0 | 3 | mit | 8b7784548a87c47b10c8e7fc76bb305bb8622659 | danactive/grunt-tfs-unlock | tasks/tfs-unlock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n/**\n * Builds the primary key name depending on model configurations\n */\nmodule.exports = class PrimaryKeyBuilder {\n constructor(Model) { this.Model = Model; }\n build() {\n let pk = 'id';\n if (!t... | javascript | edit | 0 | 1 | mit | 24fc1cb557d2eacafec6d5124f88b3c00eeb984a | jonathan-casarrubias/loopback-stats-mixin | builders/pk-builder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport expect from \"expect.js\";\n\ndescribe(\"Effect\", () => {\n it(\"works\", () => {\n // TODO\n expect(1).to.be(1);\n });\n});\n\n```\n\nApply this change: Add a test for `isEmpty`"
},
{
"role": "assistant",
"c... | javascript | edit | 0 | 1 | mit | fa68297cc2ea08db7ce71a2f9066c53c1a5c1b56 | hojberg/gongfu,hojberg/gongfu | test/effect_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nlet a = { id_sistema: '7',\n nomeperfilacesso: 'felipe 1629',\n functionalities: [ '1', '4', '12' ] }\n\n//let values = []\nlet lastIDCreated = 50\nlet b = a.functionalities.map(function(e){\n let item = []\n new Array().push.call... | javascript | edit | 0 | 1 | mit | aaabd19553247149bc2a2731819a45528808e65a | felipe-muner/event,felipe-muner/event | test/createOBJBulkQuery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif (typeof document.registerElement === 'function') {\n return;\n}\n\nvar oldCreateElement = document.createElement.bind(document);\ndocument.createElement = function (name, parent) {\n var element = oldCreateElement(name);\n parent ... | javascript | edit | 0 | 2 | mit | 9227b13c0688db663ed25f4a44bd82e81861dd12 | antitoxic/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs,skatejs/skatejs | test/polyfill/create-element.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint strict: false */\n/* globals configData */\n\n/*\n * Doo reads this file from classpath runners/karma.conf.js\n * This sets up junit reporter.\n */\n\nvar path = require('path');\n\n// Doo writes this file to /tmp, so can't us... | javascript | edit | 0 | 1 | mit | 65683b6b97604dd4b39d4035bc1fc751facfbf7d | reagent-project/reagent,reagent-project/reagent,reagent-project/reagent | test/runners/karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Kurahen Premium\n// @namespace karachan.org\n// @version 1.0\n// @include http://www.karachan.org/*\n// @include http://karachan.org/*\n// @exclude http://www.karachan.org/*/src/*\n//... | javascript | edit | 0 | 1 | mit | 669c7fb4a31011b12888a7aaa485c8200250eb22 | Kurahen-Premium/Kurahen-Premium,Kurahen-Premium/Kurahen-Premium,Kurahen-Premium/Kurahen-Premium | kurahenPremium.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n name: 'deploy',\n description: 'Deploys an ember-cli app',\n works: 'insideProject',\n\n availableOptions: [\n { name: 'environment', type: String, default: 'development', aliases: ['e',{'dev' : 'development'... | javascript | edit | 0 | 0 | mit | e9b5744f79ccb32d0d02466ee1b074e4e273c2e4 | ember-cli/ember-cli-deploy,duizendnegen/ember-cli-deploy,achambers/ember-cli-deploy,ember-cli/ember-cli-deploy,ember-cli-deploy/ember-cli-deploy,duizendnegen/ember-cli-deploy,kpfefferle/ember-cli-deploy,LevelbossMike/ember-cli-deploy,LevelbossMike/ember-cli-deploy,ember-cli-deploy/ember-cli-deploy,ember-cli/ember-cli-d... | lib/commands/deploy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport fs from 'fs';\nimport path from 'path';\n\nfunction findRecursive(directory) {\n if (directory === '/') {\n throw new Error('No project root found');\n }\n const pathToPackageJson = path.join(directory, 'package.json');\n ... | javascript | edit | 0 | 5 | mit | a9803f6e493d0989167e199345da4cbe60fcb7bb | trotzig/import-js,trotzig/import-js,Galooshi/import-js,trotzig/import-js | lib/findProjectRoot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global window */\nwindow.es6Example = window.es6Example || {};\nwindow.es6Example.arrow = {};\n\nwindow.es6Example.arrow.code =\n`let square = x => x * x;\nlet add = (a, b) => a + b;\nlet pi = () => 3.1415;\n\nconsole.log(square(5));... | javascript | edit | 0 | 0 | mit | d50d7ff90300c6c21f7d459e057b886a7281bc25 | esfiddle/esfiddle,esfiddle/esfiddle,esfiddle/esfiddle,joshghent/es6-fiddle-web,joshghent/es6-fiddle-web | src/js/examples/arrow-example.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nimport colorByCharacter from '~/constants/colorByCharacter';\n\nfunction WordCard(props) {\n const {word} = props;\n\n function toggleIsRevealed(word) {\n props.toggleIsRevealed && props... | javascript | edit | 0 | 2 | mit | 3d56fd9d8e213609bf5c775ccc3f59834b468d06 | waneka/codenames,waneka/codenames,waneka/codenames | src/components/WordCard/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function(){\n $('.imgTile').click(function(){\n window.location.href = $(this).data('url');\n })\n});\n\nfunction initialize() {\n var mapOptions = {\n center: { lat: 32.7688, lng: -85.5285},\n zoom: 6,\n... | javascript | edit | 0 | 1 | bsd-3-clause | f10de1e4b4a497976d9e4169fa2c8850f351d8f5 | wangchj/bfre,wangchj/bfre,wangchj/bfre | views/site/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = [\n 'contain',\n 'cover',\n 'stretch',\n 'repeat',\n 'center',\n];\n\n```\n\nApply this change: Use Platform to determine extra iOS propTypes"
},
{
"role": "assistant",
"content": "import Platfrom from ... | javascript | edit | 0 | 0 | mit | fda8ead204f19f2987a049ef34ac579b8ad6614f | RealOrangeOne/react-native-mock,Root-App/react-native-mock-render,dingbat/react-native-mock,lelandrichardson/react-native-mock | src/propTypes/ImageResizeMode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { computed, transaction, action, autorun } from 'mobx'\nimport { BarQueryDownload } from './barquery.js'\nimport { config } from '/utils/config.js'\n\nexport class BarStatusDownload extends BarQueryDownload {\n name = 'bar sta... | javascript | edit | 0 | 2 | bsd-3-clause | 676a80b67ced5aee9184092bb36f64d86aa83d2d | sipsop/qdapp,sipsop/qdapp,sipsop/qdapp,sipsop/qdapp,sipsop/qdapp,sipsop/qdapp,sipsop/qdapp | src/network/api/bar/barstatus.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar NicklistCtrl = function ($scope, chatServer) {\n $scope.users = {};\n\n chatServer.on('join', function(params) {\n var channel = params.channel,\n user = params.user;\n\n if ($scope.users[user.nickname... | javascript | edit | 0 | 2 | mit | c148163fd7ddd1991496c9db96a14badf123b5c2 | odyvarv/ting-1,dionyziz/ting,gtklocker/ting,odyvarv/ting-1,odyvarv/ting-1,sirodoht/ting,VitSalis/ting,mbalamat/ting,VitSalis/ting,odyvarv/ting-1,gtklocker/ting,gtklocker/ting,VitSalis/ting,mbalamat/ting,dionyziz/ting,VitSalis/ting,sirodoht/ting,dionyziz/ting,mbalamat/ting,mbalamat/ting,gtklocker/ting,sirodoht/ting,siro... | controllers/nicklist.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Errors = require('./../../errors');\nconst Message = require('./../index');\n\n\nconst JSON_CONTENT_TYPE = \"application/json\";\n\nMessage.request.addInterceptor(requestInterceptorBodyParser);\n\nfunction requestInterceptorBodyPa... | javascript | edit | 0 | 5 | mit | e402db6aff19ccddb2e00300f49a9a2be9137278 | yura-chaikovsky/dominion | core/messages/interceptors/requestBody.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst mongoose = require('mongoose');\n\nconst app = express();\n\nmongoose.connect('mongodb://localhost/speechdoctor');\n\nrequire('./config/middleware')(app, express);\nrequire('./config/routes.js'... | javascript | edit | 0 | 0 | mit | 5592bede688e3e48919fbd0c11cb9bcf4cf49655 | alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor,alexxisroxxanne/SpeechDoctor,nonchalantkettle/SpeechDoctor | server/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mailchimp = require(\"@mailchimp/mailchimp_marketing\");\n\nmailchimp.setConfig({\n apiKey: process.env.MAILCHIMP_API_KEY,\n server: \"us4\",\n});\n\nexport default async (req, res) => {\n try {\n const { stats } = await mai... | javascript | edit | 0 | 2 | mit | 50c55011700828c3be13c5e28af4e65c077cd352 | dracula/dracula.github.io | pages/api/mailchimp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n\tdomain: require('./domain'),\n\tentity: require('./entity')\n};\n\n```\n\nApply this change: [validator] Add validator to the namespace"
},
{
"role": "assistant",
"content": "module.exports = {\n\tdomai... | javascript | edit | 0 | 0 | mit | ffdbeadb630ebca5f80bbec8283c2cadae29f49e | Jerom138/focus,Jerom138/focus,KleeGroup/focus-core,Jerom138/focus | definition/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*eslint-disable no-unused-vars */\nimport React from \"react\";\n/*eslint-enable no-unused-vars */\n\nimport FieldInput from \"./FieldInput\";\n\nconst DEFAULT_PASSWORD_TEXT = \"••••••\";\n\nconst METHODS_TO_BIND = [\"handleOnFocus\"];... | javascript | edit | 0 | 5 | apache-2.0 | 0c83c35d5dc314d33fbbba38c63c855786f4a9c1 | mesosphere/reactjs-components,mesosphere/reactjs-components | src/Form/FieldPassword.js | rejected_duplicate | Near-duplicate of sample 74789 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * jquery.submitOnEnter v1.0.1\n *\n * Copyright (c) 2012 Thibaut Courouble\n * http://thibaut.me\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n */\n\n(function($) {\n 'use strict';... | javascript | edit | 0 | 8 | mit | 406091ba34330ef97401aefc3ad3cf9b59457a82 | Thibaut/jquery-submitonenter | jquery.submitonenter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport shop from '../api/shop'\nimport * as types from '../constants/ActionTypes'\n\nconst receiveProducts = products => ({\n type: types.RECEIVE_PRODUCTS,\n products: products\n})\n\nexport const getAllProducts = () => dispatch => {\... | javascript | edit | 0 | 2 | mit | 5e346e5f15f110140ba83b50bc7a206b5ffaeccb | gaearon/redux,gaearon/redux,CompuIves/redux,CompuIves/redux | examples/shopping-cart/src/actions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction range(start, end, step) {\n var arr = [];\n var mystep = arguments.length == 3 ? step : 1;\n var val = start;\n while (true) {\n arr.push(val);\n val += mystep;\n if (start < end && val > end ||... | javascript | edit | 0 | 6 | mit | ae6ad6d22f9a454a1289589a4b9285753b875573 | bewuethr/ctci | eloquent_js_exercises/chapter04/ch04_ex01.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ModalContainer from 'react-mf-modal/container';\nimport AnimChildren from './animation-helper';\nimport Backdrop from './animated-backdrop';\n\nexport default class AnimatedContainer extends ModalConta... | javascript | edit | 0 | 2 | mit | 8bd0ff10bd1193ddf61d6a1197abbbf261d6939d | Sandreu/react-mf-modal | docs/app/animations/animated-container.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class Home {\n\n render() {\n\n return (\n <footer className=\"pure-u-2-3 center\">\n <ul>\n <li>\n <div className=\"shariff\" data-theme=\"grey\"\n data-services=\"[&qu... | javascript | edit | 0 | 1 | mit | 0281cec574e7a98f8741b407ed79e84837cdbee1 | cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki | src/components/footer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar SilentError = require('silent-error');\nvar SilentErrorLib = require('../../../lib/errors/silent');\nvar expect = require('chai').expect;\n\ndescribe('SilentError', function() {\n it('return silent-error... | javascript | edit | 0 | 1 | mit | 70e250c45f22d821d4d0b2c8e94d4bdc7b9c343d | cibernox/ember-cli,calderas/ember-cli,scalus/ember-cli,romulomachado/ember-cli,BrianSipple/ember-cli,pixelhandler/ember-cli,ember-cli/ember-cli,raycohen/ember-cli,buschtoens/ember-cli,jgwhite/ember-cli,seawatts/ember-cli,seawatts/ember-cli,scalus/ember-cli,HeroicEric/ember-cli,johanneswuerbach/ember-cli,jasonmit/ember-... | tests/unit/errors/silent-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport humps from 'humps';\n\nimport ContentTypes from './constants/ContentTypes';\n\nconst contentTypeNames = Object.keys(ContentTypes)\n .map((name) => humps.camelize(name));\n\nfunction makePluralContentTypeName (name) {\n return n... | javascript | edit | 0 | 6 | mit | 169102285228b58f0fcbe697e349550cb728e168 | outlandishideas/kasia,joshlevinson/kasia | src/customContentTypes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nimport 'normalize.css'\nimport React, { Component } from 'react'\nimport ReactCSS from 'reactcss'\n\nimport '../fonts/work-sans/WorkSans.css!'\nimport '../styles/felony.css!'\nimport colors from '../styles/variables/co... | javascript | edit | 0 | 1 | mit | 529b5c94722b4f49169269980e204d96af8c562c | henryboldi/felony,tobycyanide/felony,tobycyanide/felony,henryboldi/felony | src/components/Felony.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nSlipmat.Views.UserShow = Backbone.CompositeView.extend({\n\n tagName: \"main\",\n className: \"group\",\n template: JST[\"users/show\"],\n\n initialize: function (options) {\n options = options || {};\n this.$rootEl = options.... | javascript | edit | 0 | 2 | mit | 72faf2c8acbaf965c31060d7644013c721c73f2c | cribbles/Slipmat,cribbles/Slipmat,cribbles/Slipmat | app/assets/javascripts/views/users/show.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Part of MOFO Wallet project. */\nfunction Iterator(array) {\n this.cursor = 0;\n this.length = array.length;\n this.array = array;\n}\nIterator.prototype = {\n hasMore: function () {\n return this.cursor < this.length;\n },\... | javascript | edit | 0 | 1 | mit | 5e292eaafb6fa71cc62e68fe82bcfd4993b8cd20 | aliasgherlakkadshaw/mofowallet,aliasgherlakkadshaw/mofowallet-fork,habibmasuro/mofowallet,aliasgherlakkadshaw/mofowallet,fimkrypto/mofowallet,habibmasuro/mofowallet,aliasgherlakkadshaw/mofowallet,habibmasuro/mofowallet,aliasgherlakkadshaw/mofowallet-fork,fimkrypto/mofowallet,aliasgherlakkadshaw/mofowallet,fimkrypto/mof... | app/scripts/lib/iterator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { createStore, applyMiddleware, compose } from 'redux';\nimport ReduxThunk from 'redux-thunk';\n\n// Routes\nimport Routes fr... | javascript | edit | 0 | 1 | mit | e2804223a7aff7ad79a1ba4897961a984d0964a9 | GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app | app/javascript/app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { DragDropContext } from 'react-dnd';\nimport DraggableContext from './draggable-context';\n\nfdescribe('DraggableContext', () => {\n\n it('is wrapped in a DragDropContextContainer', () => {\n expe... | javascript | edit | 0 | 1 | apache-2.0 | c4b6024abd81b33562c78c343ecb99e0210ecfb5 | Sage/carbon,Sage/carbon,Sage/carbon | src/components/with-drag-and-drop/draggable-context/__spec__.js | rejected_duplicate | Near-duplicate of sample 93901 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n moj.Modules.SubTotal = {\n el: '.js-SubTotal',\n\n init: function () {\n _.bindAll(this, 'render', 'showSummary', 'calculate');\n this.cacheEls();\n this.bindEvents();\n moj... | javascript | edit | 0 | 3 | mit | 7fef83983da2bca8046bad9232da2130a59e433b | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | cla_public/assets-src/javascripts/modules/moj.SubTotal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar winston = require('winston')\n, common = require('./common')\n\nvar loggers = new winston.Container({});\n\nvar getLogger = function(name){\n\n\t// The `loggers` collection's `get` method auto-adds on miss, and\n\t// returns exis... | javascript | edit | 0 | 1 | apache-2.0 | d9b5e70401a1eba8838de567498b8489784d0e8e | emecell/react-server,doug-wade/react-server,lidawang/react-server,davidalber/react-server,szhou8813/react-server,szhou8813/react-server,davidalber/react-server,emecell/react-server,doug-wade/react-server,redfin/react-server,redfin/react-server,lidawang/react-server | core/logging/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar archy = require('archy');\nvar chalk = require('chalk');\nvar gutil = require('gulp-util');\n\nfunction logTasks(tree, getDescription) {\n var padding = 0;\n archy(tree)\n .split('\\n')\n .filter(function(v,... | javascript | edit | 0 | 3 | mit | 38706722754fb13c61056f9be9d830f72f9c4e10 | jchip/gulp-clap,jchip/gulp-clap | lib/shared/log/tasks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jshint node:true*/\nmodule.exports = {\n description: 'Adds necessary packages to application',\n\n // locals: function(options) {\n // // Return custom template variables here.\n // return {\n // foo: options.entity.opti... | javascript | edit | 0 | 1 | mit | 56f9e0d403402d7b3a210925a25fd110c597be4c | Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-projections | blueprints/ember-flexberry-data/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport { createQuiz } from '../../services/firebase/createQuiz'\n\nexport class AddQuiz extends Component {\n constructor() {\n super();\n this.state = {\n owner: '',\n subject:... | javascript | edit | 0 | 1 | mit | 253c5bf23864a564db3a12033cfb2fe33dbf3668 | QuizChatbot/quiz-chatbot,QuizChatbot/quiz-chatbot-server,QuizChatbot/quiz-chatbot,QuizChatbot/quiz-chatbot-server,QuizChatbot/quiz-chatbot-server,QuizChatbot/quiz-chatbot | client/src/components/protected/addQuiz.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\nimport BreakpointActions from './breakpointActions';\n\nexport { BreakpointActions };\n\n```\n\nApply this change: Include debugger state actions in action creator idx"
},
{
"role": "assistant",
"content": "'us... | javascript | edit | 0 | 0 | mit | df5014ffe22c384b8a7103b825cea3ae43b75569 | tylerFowler/atom-delve | lib/actions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar page = require('webpage').create(),\n opts = JSON.parse(require('system').args[1]);\n\npage.viewportSize = opts.viewportSize;\nif (opts.userAgent) {\n page.settings.userAgent = opts.userAgent;\n}\n\npage.open(opts.address, funct... | javascript | edit | 0 | 3 | mit | 32834b4a999bb7bd2f91b01413012ae520cf1402 | diffux/diffux,kalw/diffux,kalw/diffux,diffux/diffux,diffux/diffux,kalw/diffux | script/take-snapshot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/**\n * @param mailHeader {String} The content of a mail header\n * @return {Object} A correctly parsed mail with name and address keys\n */\nmodule.exports.decomposeMails = function decomposeMails(mailHeader) {\n va... | javascript | edit | 0 | 1 | mit | d8e2813751442c8523c406e8e2c6dc35a104791e | AnyFetch/gmail-provider.anyfetch.com | lib/helpers/tools.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { FacebookLogin } from 'react-facebook-login-component';\nimport axios from 'axios';\n\nexport class SignIn extends Component {\n constructor(props, context) {\n super(props, context... | javascript | edit | 0 | 1 | mit | ed9a2093ba85459405e577daa29ab972344e284a | scrumptiousAmpersand/journey,scrumptiousAmpersand/journey | client/components/SignIn.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Data = {\n\theaders: [],\t// Title of each column of data received\n\tstate: {},\t\t// Current flight state\n\thistory: [],\t// All past flight states\n\tlocalWaypoints: [],\t// List of waypoints we're working on\n\tremoteWaypoints:... | javascript | edit | 0 | 0 | bsd-3-clause | 5b27e7fb371cbd45fe508318504a44b03f5e9d8f | UWARG/WARG-Ground-Station,UWARG/WARG-Ground-Station,UWARG/WARG-Ground-Station | data.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar baseKarma = require('./base-karma')\n\nmodule.exports = function(config) {\n\n var baseConfig = baseKarma(config);\n\n config.set(Object.assign(baseConfig, {\n browsers: [\n 'bs_firefox_android',\n 'bs_chrome_mac',\n ... | javascript | edit | 0 | 1 | apache-2.0 | 33a7c0b739a952449727b85134633da79941ad96 | FSMaxB/mathjs,josdejong/mathjs,josdejong/mathjs,josdejong/mathjs,FSMaxB/mathjs,FSMaxB/mathjs,josdejong/mathjs,FSMaxB/mathjs,FSMaxB/mathjs,josdejong/mathjs | browser-test-config/browserstack-karma.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport qs from 'querystring'\nimport version from '../version'\n\n/**\n * Create pre configured axios instance\n * @private\n * @param {Object} axios - Axios library\n * @param {Object} HTTPClientParams - Initialization parameters for t... | javascript | edit | 0 | 10 | mit | a03af6c2f15a34a9c2e275a078d9a70789567660 | contentful/contentful.js | lib/create-http-client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\nvar ipc = require('ipc');\nglobal.storage = require(__dirname+'/lib/storage/storage');\nglobal.i18n = require(__dirname+'/lib/i18n');\nvar environment = storage.... | javascript | edit | 0 | 2 | apache-2.0 | db032512e1ec52548e3f7c5cfa849e8b9ef0ae12 | clervens/Markdown-Volcy,clervens/Markdown-Volcy | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar middler = require(\"middler\"),\n httpCrud = require(\"../shared/helpers/httpCrud.js\");\n\nvar router = {\n http: null,\n alamid:null\n};\n\n//prototype extension to be able to use crud methods instead ... | javascript | edit | 0 | 3 | mit | d78fd07d6c0f01d3f9271cb2e2bdd203c48301ca | peerigon/alamid,peerigon/alamid | lib/server/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// French\n\njQuery.extend( jQuery.fn.pickadate.defaults, {\n monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ],\n monthsShort: [ 'Jan', 'Fev', ... | javascript | edit | 0 | 0 | mit | 7c7c975592036cf69c9573419c6e089ed17590df | mdehoog/pickadate.js,mdehoog/pickadate.js | lib/translations/fr_FR.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n extractId: function(href) {\n return href.replace(/^[a-z-]+:\\/+?[^\\/]+/, '' ) // Remove protocol & domain\n .replace(/[\\?\\&]livereload=\\w+/, '' ) // Remove LiveReload cachebuster\n ... | javascript | edit | 0 | 9 | apache-2.0 | 8e7c285de78fb720c0239877ba5feacdc9358e3e | demohi/less.js,gencer/less.js,cgvarela/less.js,bammoo/less.js,nolanlawson/less.js,cypher0x9/less.js,egg-/less.js,SkReD/less.js,aichangzhi123/less.js,idreamingreen/less.js,dyx/less.js,chenxiaoxing1992/less.js,miguel-serrano/less.js,Synchro/less.js,jjj117/less.js,christer155/less.js,christer155/less.js,seven-phases-max/l... | lib/less-browser/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Run a new test with the given +title+ and function body, which will\n * be executed within the proper test declarations for the UIAutomation\n * framework. The given function will be handed a +UIATarget+ and\n * a +UIApplication... | javascript | edit | 0 | 4 | mit | 16a40ecfd9341ee86f6d59f045a2cfd274dbec89 | MYOB-Technology/tuneup_js,Northern01/tuneup_js,songxiang321/ios-monkey,songxiang321/ios-monkey,alexvollmer/tuneup_js,misfitdavidl/tuneup_js,Banno/tuneup_js,giginet/tuneup_js,Banno/tuneup_js,MYOB-Technology/tuneup_js,alexvollmer/tuneup_js,misfitdavidl/tuneup_js,Northern01/tuneup_js,giginet/tuneup_js | test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.startup(function() {\n\tRocketChat.settings.addGroup('Atlassian Crowd', function() {\n\t\tconst enableQuery = {_id: 'CROWD_Enable', value: true};\n\t\tthis.add('CROWD_Enable', false, { type: 'boolean', public: true, i18nLabel: 'E... | javascript | edit | 0 | 1 | mit | 0117fd3728d2630230cf7473772543655b7c98d7 | BorntraegerMarc/Rocket.Chat,intelradoux/Rocket.Chat,LearnersGuild/echo-chat,Kiran-Rao/Rocket.Chat,AlecTroemel/Rocket.Chat,inoxth/Rocket.Chat,AlecTroemel/Rocket.Chat,pachox/Rocket.Chat,abduljanjua/TheHub,igorstajic/Rocket.Chat,marzieh312/Rocket.Chat,k0nsl/Rocket.Chat,trt15-ssci-organization/Rocket.Chat,Gyubin/Rocket.Cha... | packages/rocketchat-crowd/server/settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* SMOOTH SCROLL */\n$('a[href^=\"#\"]').on('click', function(event) {\n\tvar target = $(this.getAttribute('href'));\n\tif (target.length) {\n\t\tevent.preventDefault();\n\t\t$('html, body').stop().animate( {\n\t\t\tscrollTop: target.of... | javascript | edit | 0 | 2 | mit | 69f1c6e8fe49872a275a915550a4a09790deab9c | ederchristian/ederchristian.github.io | assets/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nModule.directive('menuAction',['$parse','MenuService','$swipe',\n function($parse,MenuService,$swipe){\n return {\n restrict: 'A',\n priority: 10,\n scope: false,\n /*\n * The object that is spected is in the form:\n... | javascript | edit | 0 | 3 | mit | 35f6f9eada22a756cb9e1bdb8c1941659b5659e1 | rcheruti/Menu_Service,rcheruti/Menu_Service | src/diretivas/MenuAction.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { League } = require('../model/postgresDB');\n\nconst leagueController = {};\nleagueController.allLeagues = (req, res) = {\n\tLeague.findAll({})\n\t\t\t\t.then(data => res.end(data))\n\t\t\t\t.catch(err => res.statusCode(404).end(... | javascript | edit | 0 | 2 | mit | f35ef30a4c6a650eca0de5822212f2735da73f48 | softballers/softballers | database/controllers/leagueController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('app', [\n 'app.config',\n 'app.core',\n 'app.feature',\n 'ngMaterial'\n ]);\n\n angular.module('app').config([\n '$logProvider', 'LOG', '$locationProvider',\n funct... | javascript | edit | 0 | 1 | mit | 3dc2829d2eca728a3732ab5d2c9d45adb3a448c9 | molehillrocker/mm-website,molehillrocker/mm-website | src/scripts/appModule.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nrequire('coffee-script').register()\n\nvar fs = require('fs'),\n indentation = require('../lib/indentation'),\n buf, emblemFile, hbsFile, output;\n\nif (process.argv.length < 3) {\n console.log('USAGE: embl... | javascript | edit | 0 | 1 | mit | 334bc773562e176eb95a27527a79ed13ec88bf2e | patientslikeme/emblem2hbs | bin/emblem2hbs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Lazy-loaded tabs\n */\njQuery(function() {\n $('.nav.nav-tabs').on('click', '[data-url]', function(event) {\n var loader = $(this);\n\n if (loader.data('loaded'))\n return;\n\n var target = $(loader.attr('href'));... | javascript | edit | 0 | 2 | mit | 29a227e1a060b6d625df82b3eb3f254914f3ec3a | ifad/stradivari,ifad/stradivari | app/assets/javascripts/stradivari/tabs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['angular'], function(angular) {\n\n var config = angular.module('app-config', []);\n config\n .constant('SERVICE_LOC', {\n 'sessionInfo' : 'json/sessionsample.json',\n 'sidebarInfo' : 'samples/... | javascript | edit | 0 | 1 | bsd-3-clause | 843ab59dadeee7b0f68412789939ba2b5a9c69e8 | UW-Madison-DoIT/myuw-smart-widget-creator,UW-Madison-DoIT/myuw-smart-widget-creator,UW-Madison-DoIT/myuw-smart-widget-creator,Ozzyie/myuw-smart-widget-creator,apetro/myuw-smart-widget-creator,Ozzyie/myuw-smart-widget-creator,apetro/myuw-smart-widget-creator | myuw-smart-widget-creator-war/src/main/webapp/js/app-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { applyMiddleware, compose, createStore } from 'redux'\nimport thunk from 'redux-thunk'\nimport { browserHistory } from 'react-router'\nimport makeRootReducer from './reducers'\nimport { updateLocation } from './location'\nimport... | javascript | edit | 0 | 5 | mit | 9652319f0fd903175207733424e51e2e40fa79ca | wv-aut/experience-plus-react-coupled,wv-aut/experience-plus-react-coupled | src/store/createStore.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2014 WebFilings, LLC\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 * ... | javascript | edit | 0 | 2 | apache-2.0 | 3b8ba5b99c578cdfe93ea612f6dc044bfef7b7f0 | Workiva/wf-grunt | test/e2e_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n ADD_PRODUCT,\n REMOVE_PRODUCT,\n\n} from './../mutation-types'\n\nexport default {\n state: {\n products: [],\n total: 0,\n count: 0\n },\n mutations: {\n [ADD_PRODUCT] (state, produ... | javascript | edit | 0 | 2 | mit | 4660a2a7c29ac033df6a002b1305152d05e0088e | vfreitas-/vuex-shopping-list,vfreitas-/vuex-shopping-list | src/vuex/modules/cart.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function () {\n /**\n * Constructor wrapper that makes mixins and proxying easier\n * @param {Function} constructor\n */\n function PrimalClay(constructor) {\n // Create a set of mixins for this constructor\n var mi... | javascript | edit | 0 | 6 | mit | b472aa6d3d5090e7821f962fa4d7007de2d3b147 | Ensighten/Halo | src/public/js/PrimalClay.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport AccountViewContainer from './views/AccountViewContainer'\nimport { fetchRooms } from 'store/modules/rooms'\nimport { fetchPrefs } from 'store/modules/prefs'\n\n// route definition\nexport default function (store) {\n return {\n ... | javascript | edit | 0 | 1 | isc | 4738b14de32b70b9c3b2944762ce635262129868 | bhj/karaoke-forever,bhj/karaoke-forever | src/routes/Account/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\n\nconst webpackConfig = require('../../webpack.config');\nconst config = require('../config');\nconst { authenticationMiddleware } = require('../authentication');\n\nconst router = express.Router();\... | javascript | edit | 0 | 2 | mit | 5f02ac1b4aa34ed5e00482453146fc05d4e13e3b | noms-digital-studio/csra-app,noms-digital-studio/csra-app,noms-digital-studio/csra-app | server/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar kanye = require(\"../../kanye\");\nvar request = require(\"request\");\n\n// The main app can hit this when an SMS is received\napp.get('/sms', function(req, res) {\n if (r... | javascript | edit | 0 | 2 | mit | b1a0f2032eefbd71e45bc64365fb4bb374ea1723 | AaronMorais/Kanye | services/reddit/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Selfish Youtube\n// @version 2013-05-06\n// @namespace https://github.com/ASzc/selfish-youtube\n// @description On the watch page, remove the share panel.\n// @inc... | javascript | edit | 0 | 6 | mit | 710c680d8e9c5c489197f77ffa0475fb4fd134e2 | ASzc/selfish-youtube | selfish-youtube.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { defineComponent } from 'vue'\nimport { RouterLink as VueRouterLink } from 'vue-router'\nimport { getPreloadPath } from './lib/runtime-utils'\n\nconst prefetchedPaths = new Set()\n\nexport const RouterLink = defineComponent({\n ... | javascript | edit | 0 | 6 | mit | 68e6085605fd78db2c7108b6a7659ce04b47655f | ream/ream | packages/app/link.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar RomoWordBoundaryFilter = function(filterString, setElems, getElemTextContentCallback) {\n this.boundaryCharsRegex = /[\\s-_]+/;\n this.matchingNodes = [];\n this.notMatchingNodes = [];\n this.filters = filterSt... | javascript | edit | 0 | 5 | mit | 8d52a0b6e5a0363a6ff797229bb3b07887981c9e | redding/romo,redding/romo,redding/romo | assets/js/romo/word_boundary_filter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Simple middleware that saves res.locals as stringified JSON to\n * `res.locals.INITIAL_STATE`\n *\n * @module midwest/middleware/bootstrap\n */\n\n'use strict'\n\nconst _ = require('lodash')\n\nconst defaultOmit = ['settings']\n\... | javascript | edit | 0 | 6 | mit | 9c027ac6202102b041c216ff84636f324a177333 | thebitmill/midwest | factories/bootstrap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst passport = require('passport');\nconst main = require('../app/controllers/main');\nconst api = require('../app/controllers/api');\nconst auth = require('../app/controllers/auth');\n\n/**\n * Expose routes\n */\n\n... | javascript | edit | 0 | 1 | mit | e9f269f330b66906c6a33f87dd14843b7e77e115 | yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time | server/config/routes.js | rejected_duplicate | Near-duplicate of sample 89846 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nObject.defineProperty = function defineProperty(object, property, descriptor) {\n\t// handle object\n\tif (object === null || typeof object !== 'object') {\n\t\tthrow new TypeError('Object must be an object');\n\t}\n\n\t// handle descri... | javascript | edit | 0 | 10 | mit | 008c3d3433e6d7a2052e746b7774ebf0a5c45c4e | JakeChampion/polyfill-service,mcshaz/polyfill-service,JakeChampion/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,mcshaz/polyfill-service,jonathan-fielding/polyfill-service,mcshaz/polyfill-service,jonathan-fielding/polyfill-service,kdzwinel/polyfill-service,kdzwinel/polyfill-service | polyfills/Object.defineProperty/polyfill-ie7.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nvar resources = require('../dummy/resources');\n\nvar DummyResource = resources.DummyResource;\n\n\nvar DummyConfigResource = DummyResource.extend(function(self, name, store) {\n /**class:DummyConfigReso... | javascript | edit | 0 | 2 | bsd-3-clause | 60647a0565b9c9e90acbf586e2534a2dc4c97945 | GeekFreaker/vumi-jssandbox-toolkit,GeekFreaker/vumi-jssandbox-toolkit | lib/config/dummy.js | rejected_duplicate | Near-duplicate of sample 96803 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint global-require: 0 */\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./configureStore.prod');\n} else {\n module.exports = require('./configureStore.dev');\n}\n\n```\n\nApply this change: Disable ... | javascript | edit | 0 | 0 | mit | d4274145ce3105295b1fd8dccc0e1c1b61e04d33 | chentsulin/redux-boilerplate,neighborhood999/redux-boilerplate,chentsulin/redux-boilerplate,neighborhood999/redux-boilerplate | src/store/configureStore.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Office365ConnectorHook = require(\"./index.js\"),\n winston = require('winston');\n\nvar Logger = winston.Logger;\nvar Console = winston.transports.Console;\n\nvar logger = new Logger({\n transports: [\n new Console({})... | javascript | edit | 0 | 0 | mit | 47974a7c853f940a4113b379b73b4cc9ab34e83e | SukantGujar/winston-office365-connector-hook | test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Run package tests.\n * (C) 2014 Alex Fernández.\n */\n\n// requires\nvar testing = require('testing');\nvar Log = require('log');\n\n// globals\nvar log = new Log('info');\n\n\n/**\n * Run all module tests.\n */... | javascript | edit | 0 | 1 | mit | 2c02dfeadda3ddf2cb4f547bc27a7706fd61f0e4 | alexfernandez/package-quality,alexfernandez/package-quality,alexfernandez/package-quality | test.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.