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'use strict';\n\nvar murl = require('murl');\n\nvar Patterns = module.exports = function (patterns) {\n if (!(this instanceof Patterns))\n return new Patterns(patterns);\n this._patterns = patterns || [];\n};\n\nvar compile = funct... | javascript | edit | 0 | 4 | mit | aed15980981856248ce9fcdb47d13cd30a25c996 | watson/patterns | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\nvar path = require('path');\nvar fs = require('fs');\nvar Funnel = require('broccoli-funnel');\nvar log = require('broccoli-stew').log;\n\nprocess.setMaxListeners(0);\n\nmodule.exports = {\n name... | javascript | edit | 0 | 2 | mit | 7aa7b14a4ae8827c3a65ae8e8fe32550a2a8f5ef | EmberEnterprise/ember-enterprise-core,EmberEnterprise/ember-enterprise-core,EmberEnterprise/ember-enterprise-core | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar options = {\n repository: 'https://github.com/dorian-marchal/phonegap-boilerplate',\n branch: 'master',\n};\n\n/**\n * Check that the cli is used in a phonegap boilerplate project\n * @return {bool} true if we are... | javascript | edit | 0 | 1 | mit | bdf874c617c2239329b9a624d4819d86dec5f1aa | dorian-marchal/phonegap-boilerplate-cli | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst loaderUtils = require('loader-utils');\nconst path = require('path');\nconst deepMerge = require('./lib/deep-merge');\n\nfunction _removeModuleSyntax (moduleSource) {\n return moduleSource\n .replace(/^ ?module.exports ?= ... | javascript | edit | 0 | 4 | mit | 6264e39117c4563dd463fa672df0c875dc41ed17 | bitfyre/config-merge-loader | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-collection',\n init: function(name) {\n var assets_path = require('path').join('layout-bin-packer','index.js');\n this.treePaths['vendor'] = require.res... | javascript | edit | 0 | 1 | mit | 60df05e3b895f92b9593e4c27280931391f09660 | BryanCrotaz/ember-collection,BryanCrotaz/ember-collection,shaunc/ember-collection,shaunc/ember-collection | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst {app, BrowserWindow} = require('electron');\n\nlet win;\n\nfunction createWindow() {\n\twin = new BrowserWindow({width: 800, height: 600});\n\n\twin.loadURL(`file://${__dirname}/src/index.html`);\n\n\twin.webContents.openDevTools(... | javascript | edit | 0 | 0 | mit | 0fcafe4852e64d854d0a38afb86590cf1f9cedb5 | albinekb/kap,albinekb/kap,albinekb/kap,wulkano/kap | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * index.js\n * Client entry point.\n *\n * @author Francis Brito <<EMAIL>>\n * @license MIT\n */\n'use strict';\n\n/**\n * Client\n * Provides methods to access PrintHouse's API.\n *\n * @param {String} apiKey API key identifyin... | javascript | edit | 0 | 4 | mit | f6211f48f4f3fade04198109f01aecf6ed62024d | francisbrito/ph-node | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst defaultOptions = {\n modules: false,\n};\n\nmodule.exports = function buildPreset(context, options) {\n return {\n presets: [\n [require('babel-preset-latest'), {\n es2015: Object.assign({}, defaultOptions, option... | javascript | edit | 0 | 2 | mit | 26330a51e1e25a0bc39b446706c2041ea874f4de | extplug/babel-preset-extplug | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nfunction signal(options) {\n var listeners = []\n var api = {\n push: function(listener) {\n if (listeners.indexOf(listener) < 0) {\n listeners.push(listener)\n }\n return api\n },\n pull... | javascript | edit | 0 | 4 | mit | 8e448477d8acabbf1e6120728a446641576a2ad4 | StephanHoyer/smoke-signal | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = (function store() {\n 'use strict';\n\n function nope() { /* Fallback for when no store is supported */ }\n\n try {\n sessionStorage.setItem('foo', 'bar');\n if (sessionStorage.getItem('foo') !== 'bar') throw 1... | javascript | edit | 0 | 5 | mit | 09b164ae31e0f886625f969abaf1a1bcd4a418d1 | unshiftio/sessionstorage | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Busboy = require('busboy'),\n bytes = require('bytes'),\n concat = require('concat-stream'),\n debug = require('debug')('busboy-bodyparser');\n\nmodule.exports = function (settings) {\n\n settings = settings || {};\n ... | javascript | edit | 0 | 4 | mit | 4c4007dde6481264bab4416dd0938a1d76de3a02 | lennym/busboy-body-parser,lennym/busboy-body-parser | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node:true */\n'use strict';\n\n// Expose `React` as a global, because the ReactIntlMixin assumes it's global.\nvar oldReact = global.React;\nglobal.React = require('react');\n\n// Require the lib and add all locale data to `Re... | javascript | edit | 0 | 1 | bsd-3-clause | de97095c648eca58ce220c656a8f9111436ac00e | ryan1234/react-intl,hukka/react-intl,ryan1234/react-intl,gseguin/react-intl,btd/react-intl,mattikl/react-intl,Vungle/react-intl,hukka/react-intl,hukka/react-intl,gseguin/react-intl,mattikl/react-intl,Vungle/react-intl,gseguin/react-intl,btd/react-intl,keppelen/react-intl,tsironis/react-intl,tsironis/react-intl,Vungle/r... | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @file index\n * @author Jim Bulkowski <<EMAIL>>\n * @project Paperelectron.com\n * @license MIT {@link http://opensource.org/licenses/MIT}\n */\n\n\nvar pomegranate = require('pomegranate');\nvar path = require('path');\nvar _ =... | javascript | edit | 0 | 1 | mit | 2ee2b7826b753d0c150b9c7ec818a6413806292b | PaperElectron/Pomegranate-docker,PaperElectron/Pomegranate-docker,PaperElectron/Pomegranate-docker | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { repeat, take, splitAt, map } from 'ramda';\nimport { handleActions } from 'redux-actions';\n\nimport { buildTrie, tokenizer } from '../parser/parser';\nimport dubliners from '../texts/dubliners';\n\nconst source = take(2000, to... | javascript | edit | 0 | 1 | mit | 6d57f20037c1a8b589122536d99d78e5b6fa8606 | UpBeet/tree-of-scheherazade,UpBeet/tree-of-scheherazade | src/reducers/editor.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 | eb42e2849f63b33f216dcc316f62d1078da81406 | 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\n$(document).ready(function () {\n $('#submit-button').click(function() {\n var day = parseInt($('#day').val(), 10);\n var month = parseInt($('#month').val(), 10);\n var year = parseInt($('#year').val(), 10);\n\n ... | javascript | edit | 0 | 3 | mit | 5947a7444f0c115af62a9b230eade7565aa8c548 | charleskorn/yow-connected-2015,charleskorn/yow-connected-2015,charleskorn/yow-connected-2015 | stage2/content/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n/* exported defaultBorderSettings defaultSettings */\n\nconst defaultBorderSettings = Object.freeze({\n\tborderType: 'momentary',\n\tborderColour: '#008000',\n\tborderLabelFontSize: '18'\n})\n\nconst defaultDebugSettings =... | javascript | edit | 0 | 0 | mit | 3185512f631471a8fb65ad554272e22e23c733a5 | matatk/landmarks,matatk/landmarks,matatk/landmarks | src/static/defaults.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Game = require('./models/game'),\n bowlingGame,\n bowlingBtn,\n onBowl,\n onLoad;\n\n// Create instance of bowling game\nbowlingGame = new Game();\n\n/**\n * Set up bowling game on document load\n * @method onLoad\n */\n... | javascript | edit | 0 | 1 | mit | fad8b5233a30052b90753dbe02842ef322e367b0 | rowanoulton/bowler,rowanoulton/bowler | src/js/bowler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('service', function() {\n beforeEach(module('ngAuth'));\n\n\n describe('version', function() {\n it('should return current version', inject(function(ngAuth) {\n console.log(ngAuth);\n expect(2+2).toEqual(4);\n ... | javascript | edit | 0 | 1 | mit | e45977650f0bd9f2608b5f00b6cc9803285e1a86 | jskrzypek/satellizer,peterkim-ijet/satellizer,david300/satellizer,hsr-ba-fs15-dat/satellizer,peterkim-ijet/satellizer,ELAPAKAHARI/satellizer,romcyncynatus/satellizer,celrenheit/satellizer,xxryan1234/satellizer,peterkim-ijet/satellizer,redwood-strategic/satellizer,hsr-ba-fs15-dat/satellizer,IRlyDontKnow/satellizer,marfa... | test/main.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar browserify = require('browserify')\n , shim = require('browserify-shim')\n , hbsfy = require('hbsfy')\n , envify = require('envify')\n , brfs = require('brfs')\n\nmodule.exports = function (opts, cb) {\n if... | javascript | edit | 0 | 4 | mit | 9af9fdf263588502e00da82289a250a52c0bb663 | atomify/atomify-js | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { test } from 'ember-qunit';\nimport startApp from '../helpers/start-app';\nvar App;\n\nmodule(\"Artist recommendation tests\", {\n setup: function() {\n App = startApp();\n },\n teardown: functi... | javascript | edit | 0 | 1 | bsd-3-clause | 20125c05ae9f33442e47f46595062556c244f3cc | FreeMusicNinja/freemusic.ninja,FreeMusicNinja/freemusic.ninja | ember/tests/integration/artist-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\nconst SubDevice = require('./subdevice');\nconst { Temperature, Humidity } = require('../capabilities/sensor');\n\nmodule.exports = class SensorHT extends SubDevice.with(Temperature, Humidity) {\n\tconstructor(parent,... | javascript | edit | 0 | 1 | mit | e41b2e806d1c71349856f45b5de5e79693617fba | aholstenson/miio | lib/devices/gateway/sensor_ht.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global ic */\nimport { test , moduleFor } from 'ghost/tests/helpers/module_for';\nimport PostsRoute from 'ghost/routes/posts';\n\nmoduleFor('route:posts', \"Unit - PostsRoute\", {\n setup: function(){\n ic.ajax.defineFixture('/gh... | javascript | edit | 0 | 1 | mit | a9346a88c67a9af5e4470ad03a7a6cf3c380fbd2 | manuelmitasch/ghost-admin-ember-demo | tests/unit/routes/posts_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"extends\": \"airbnb\",\n \"plugins\": [\n \"import\"\n ],\n \"rules\": {\n \"complexity\": [2, 6]\n },\n \"env\": {\n \"browser\": true\n }\n};\n\n```\n\nApply this change: test(lint): Extend eslin... | javascript | edit | 0 | 0 | mit | 9c09a1dbb564fb65af9c1530cf28fb0645a40c3f | genpw/genpw.com,genpw/genpw.com,genpw/genpw.com | .eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function (require) {\n 'use strict';\n var jquery = require('jquery');\n var monaco = require('monaco');\n var cpp = require('vs/basic-languages/src/cpp');\n\n // We need to create a new definition for cpp so we ca... | javascript | edit | 0 | 2 | bsd-2-clause | cc5ede9378697ab9e97344a175512b906c080fe3 | dkm/gcc-explorer,dkm/gcc-explorer,mattgodbolt/compiler-explorer,mattgodbolt/gcc-explorer,dkm/gcc-explorer,mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,dkm/gcc-explorer,dkm/gcc-explorer,mattgodbolt/gcc-explorer,mattgodbolt/gcc-explorer,mattgodbolt/gcc-explorer,mattgodbolt/com... | static/cppp-mode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport babel from 'rollup-plugin-babel'\nimport uglify from 'rollup-plugin-uglify'\nimport replace from 'rollup-plugin-replace'\nimport commonjs from 'rollup-plugin-commonjs'\nimport resolve from 'rollup-plugin-node-resolve'\n\nconst co... | javascript | edit | 0 | 0 | mit | 55bda9e6a67a880f5ac7ab8dde116ad922996061 | ReactTraining/react-router,asaf/react-router,rackt/react-router,asaf/react-router,ReactTraining/react-router,OpenGov/react-router,asaf/react-router,reactjs/react-router,DelvarWorld/react-router,ReactTraining/react-router,OpenGov/react-router,reactjs/react-router,d-oliveros/react-router,d-oliveros/react-router,OpenGov/r... | packages/react-router-dom/rollup.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar passport, path, Rat, rat, User, user\n\n\n\n\n\npassport = require( 'passport' )\npath = require( 'path' )\n\nRat = require( '../models/rat.js' )\nUser = require( '../models/user.js' )\n\n\n\n\n\nexports.get = function ( request, re... | javascript | edit | 0 | 3 | bsd-3-clause | 57174e787f1e5942804065ac42f40e3b68fbf77c | FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com | api/controllers/register.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * scripts.js\n * @name - \"scripts\"\n * @task - Compiles & uglifies AMD modules\n */\n\nvar gulp = require(\"gulp\"),\n webpack = require(\"gulp-webpack\"),\n uglify = require(\"gulp-uglify\"),\n rename ... | javascript | edit | 0 | 1 | mit | 25a7b314c7ebe6ca86c1869edc04eb4f0169970f | fspoettel/blaupause,fspoettel/blaupause | gulp/tasks/scripts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by Andrew on 12/7/2015.\n */\nfunction LaughingMan() {\n\n this.laughingManImage = \"https://i.imgur.com/u6A3oCM.gif\";\n}\n\nLaughingMan.prototype.start = function() {\n if (!document.getElementsByTagName) return;... | javascript | edit | 0 | 7 | mit | 5d147672f0dcfa7489b67e03ead68220c980d7c5 | Codeusa/LaughingMan.js,Codeusa/LaughingMan.js | laughingman.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Date object that always reflects current time (with one second resolution)\n\n'use strict';\n\nvar curry = require('es5-ext/lib/Function/curry').call\n\n , update;\n\nupdate = function () {\n\tthis.setTime(Date.now());\n};\n\nmodule... | javascript | edit | 0 | 1 | mit | 2daad2e6b549558b134420307fa60680f531fed9 | medikoo/clock | lib/current.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet React = require('react');\nlet RouterMixin = require('react-mini-router').RouterMixin;\nlet ArticlesControllerView = require('./articles-controller-view.react.js');\n\nconst App = React.createClass({\n mixins: [RouterMixin],\n rou... | javascript | edit | 0 | 1 | mit | c9bcdfa31fa9fbdef879d9d89ae92d7b764957ff | codemade/caffeine,codemade/caffeine,codemade/caffeine | app/components/app.react.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst jetpack = require('fs-jetpack');\nconst archive = require('./archive');\nconst info = require('./info');\nconst manifest = require('./manifest');\nconst config = require('./util/config');\n\n\nmodule... | javascript | edit | 0 | 3 | mit | 22a5de4ccd70faa6a26f5b608476e0ae2658ca87 | toenu23/nxtpm,toenu23/nxtpm | lib/install.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path'),\r\n\tyfm = require('assemble-yaml'),\r\n\tgrunt = require('grunt');\r\n\r\nmodule.exports = function (type, root) {\r\n\tvar files = grunt.file.expand(path.join(type, root, '**/*.md')),\r\n\t\tgroups = [],\r... | javascript | edit | 0 | 3 | mit | 5407c949b4ccb3c728192e6379301b8cfab701eb | moment/momentjs.com,moment/momentjs.com | data/docs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'jquery',\n 'underscore',\n 'backbone',\n 'models/testplan/TestPlanModel',\n 'collections/testplan/TestPlansCollection',\n 'views/testplans/TestPlansListView',\n 'text!templates/testplans/testplansTemplat... | javascript | edit | 0 | 1 | mit | 8554bf5cbf627d6da9e67f731ecef931f3793185 | kinow/nestor,kinow/nestor,kinow/nestor,nestor-qa/nestor,nestor-qa/nestor,nestor-qa/nestor,nestor-qa/nestor,kinow/nestor | public/js/views/testplans/TestPlansView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport ActionFactory from '../utils/actionFactory';\nimport ConstantFactory from '../utils/constantFactory';\n\nexport const USER_PLAYLIST_CONSTANTS = ConstantFactory.buildAsyncFor('USER_PLAYLISTS');\nexport const PLAYLIST_TRACKS_CONSTA... | javascript | edit | 0 | 1 | mit | 04d1efa0055d8a75144effebd89e1e233abc5099 | matiasgarcia/tubify,matiasgarcia/tubify | app/actions/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport axios from 'axios'\n\nimport draw from './draw'\nimport state from '../state'\nimport updateUI from './updateUI'\nimport showError from './showError'\nimport parseResposne from './parseResponse'\n\nexport default function move(di... | javascript | edit | 0 | 3 | mit | 0cced0bb19964795ffd4059b7e3d5d9d4946f85b | Argeento/Gynvael-Misja-008,Argeento/Gynvael-Misja-008 | src/modules/move.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar gulpSequence = require('gulp-sequence');\n\ngulp.task('build:development', function(cb) {\n //gulpSequence('clean', 'copy', ['fonts', 'images'], ['html'], ['webpack-dev-server'], cb);\n gulpSeq... | javascript | edit | 0 | 1 | apache-2.0 | 44ac2586f65d3630ea5837028801ef73f0dae628 | First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui,First-Peoples-Cultural-Council/fv-web-ui | gulpfile.js/tasks/build-development.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * `TaskCtx` constructor.\n *\n * Task functions will be invoked within a context established by this class.\n * The context binds the task to the `rivet` instance, and exposes a shared\n * `scratch`.\n *\n * @api private\n */\nfun... | javascript | edit | 0 | 1 | mit | 79badf9612f20394dbfbe164ab00422dd0caebb7 | jaredhanson/rivet | lib/taskctx.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar venmo = Venmo(1424);\n\nfunction signin() {\n if (venmo.isAuthorized()) {\n $('#signin').addClass('is-hidden');\n picture();\n }\n\n $('.signin-button').click(function () {\n venmo.authorize();\n });\n}\n\nfunction pict... | javascript | edit | 0 | 2 | mit | a18951821c4975563c5c21798abd9b6266edf85e | tomshen/checkmeout,tomshen/checkmeout | static/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\"backbone\", \"underscore\", \"jquery\"], function(Backbone, _, $) {\n return Backbone.Model.extend({\n \t// data attributes\n defaults: {\n \tage: null,\n \tgender: null,\n \taddress: null,\n \tp... | javascript | edit | 0 | 1 | mit | 11672ec2c8bf641c2c40098d0eac035ca8797b96 | HPI-Hackathon/find-my-car,HPI-Hackathon/find-my-car | javascripts/model/userprofile_model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport config from 'ember-get-config';\n\nexport default Ember.Route.extend({\n fileManager: Ember.inject.service(),\n model() {\n return Ember.RSVP.hash({\n theDate: new Date(),\n ... | javascript | edit | 0 | 1 | apache-2.0 | 757e51c1ee0bd284a29d77033317db62f46fcab9 | CenterForOpenScience/ember-preprints,pattisdr/ember-preprints,hmoco/ember-preprints,CenterForOpenScience/ember-preprints,caneruguz/ember-preprints,hmoco/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints,baylee-d/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-pr... | app/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\nvar ObjectId = Schema.Types.ObjectId;\nvar Mixed = Schema.Types.Mixed;\n\nvar device = new Schema({\n serialNo: String,\n name: String,\n type: String,\n department... | javascript | edit | 0 | 0 | mit | 4b42ab11bed126394c19169bac03289f500ae216 | dongliu/runcheck,dongliu/runcheck | models/device.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(sequelize, DataTypes) {\n var notifications = sequelize.define('notifications', {\n msg: DataTypes.STRING,\n region_code: DataTypes.STRING\n }, {\n timestamps: true,\... | javascript | edit | 0 | 1 | mit | 87e1f4a63efe9e37059fbffdf6727f3d68bf2ba6 | hks-epod/paydash | app/models/feedbacks.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('jquery-ui/ui/widgets/sortable');\n\n$(document).ready(() => {\n $('.weight').hide();\n $('.reorder').show();\n\n $('.sidebar-items tbody').sortable({\n axis: 'y',\n stop() {\n $('.weight input').val(index => index... | javascript | edit | 0 | 1 | mit | 8b76b83402d8389dbd5bb39f84f5211e3b9b7fe6 | Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,cysjonathan/coursemology2 | client/app/bundles/course/admin/sidebar_settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\n\nmodule.exports = function(name) {\n \n var nameConversions = [\n initials = /^(\\w).*\\s(\\w).*$/\n firstInitialAndLastName = /^(\\w).*\\s(\\w+)$/,\n firstAndLastName = /^(\\w+)\\s(\\w+)$/,\n... | javascript | edit | 0 | 2 | mit | bdc54b6d13b7b3078bcf27d075deffd5af427925 | stevekinney/node-fake-email | lib/name-formatter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst joi = require('joi');\nconst { nameType } = require('./util');\n\nconst applicationSchema = joi\n .object()\n .options({ stripUnknown: false })\n .keys({\n appName: nameType,\n sdkVersion: j... | javascript | edit | 0 | 0 | apache-2.0 | 00ce76f9c58cb7d7be9bbbd2dd651f962591ea34 | finn-no/unleash,Unleash/unleash,finn-no/unleash,Unleash/unleash,Unleash/unleash,Unleash/unleash,finn-no/unleash | lib/routes/admin-api/metrics-schema.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n/**\n * For a complete API document please\n * refer to https://github.com/FormidableLabs/spectacle#tag-api\n */\nimport {\n Slide, Appear,\n Layout, Fill, Fit,\n Heading, Text, Link, S, Markdown,\n List,... | javascript | edit | 0 | 1 | mit | 3405894fa28c4705d4ec838b077c99f6f88dade7 | sebald/melodrama-scripts,sebald/melodrama-scripts | lib/template/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('lib/rules/disallow-positionalparams-extend', function () {\n var checker = global.checker({\n plugins: ['./lib/index']\n });\n\n describe('not configured', function() {\n\n it('should report with undefined... | javascript | edit | 0 | 1 | mit | 2a9c65261010b88ce96110ec767846a632484c4d | minichate/jscs-ember-deprecations,minichate/jscs-ember-deprecations | test/lib/rules/disallow-controllerneeds.js | rejected_duplicate | Near-duplicate of sample 81293 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nAtmo.Views.NotificationHolder = Backbone.View.extend({\n initialize: function() {\n Atmo.notifications.bind('add', this.add_notification, this);\n },\n add_notification: function(model) {\n var x_close = $('<butto... | javascript | edit | 0 | 2 | apache-2.0 | 24fd9d2303b8df7eb15687902510f20629490045 | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend | troposphere/static/resources/js/cf2/views/notification_holder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// http-delivery.js\n\nvar _ = require('underscore');\n\nvar wrapper = require('../src/javascript-wrapper.js');\n\n/**\n * This updater takes response content, response type, and a {req, res} pair as\n * input. It then writes the conten... | javascript | edit | 0 | 6 | apache-2.0 | 0fa48c2f4da36ed57c9e84cec9f4c145b8a45947 | rdf-pipeline/noflo-rdf-components,rdf-pipeline/noflo-rdf-components,rdf-pipeline/noflo-rdf-components | components/http-delivery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Module = require('module');\nvar dirname = require('path').dirname;\n\nmodule.exports = function requireLike(path, uncached) {\n var parentModule = new Module(path);\n parentModule.filename = path;\n parentModule.paths = Module._... | javascript | edit | 0 | 2 | mit | 773337f122d83bcbbba82c482ac53bfe506dcc29 | felixge/node-require-like | lib/require-like.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nexports.name = 'OBX'\n\nexports.fields = [\n 'SegmentType'\n , 'SetID'\n , 'ValueType'\n , 'ObservationIdentifier'\n , 'ObservationSub-ID'\n , 'ObservationValue'\n , 'Units'\n , 'ReferencesRange'\n , 'Abnormal... | javascript | edit | 0 | 0 | mit | 52daf946d6b633ce44b93540072ce5f9bfb844cd | evanlucas/nodengine-hl7 | lib/segments/obx.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconsole.log(\"menu-fill\");\n\nvar menu_env = $(\"#menu-env\");\n\n\nvar item1 = menu_env_data[0];\nvar item2 = menu_env_data[1];\n\nfunction createSingleLevelMenuItem (item) {\n var _a = $(\"<a/>\", { href: item.link });\n $(\"<i/>\"... | javascript | edit | 0 | 2 | mit | 49c28c17e75bf2d2a4dd4928326b9db9f9093464 | vejuhust/yet-another-monitoring-dashboard,vejuhust/yet-another-monitoring-dashboard | content/menu-fill.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Resource = require('../api-resource').Resource;\n\nclass MembershipResource extends Resource {\n static resourceName() {\n return 'membership';\n }\n}\n\nmodule.exports = MembershipResource;\n\n```\n\nApply this change: Add J... | javascript | edit | 0 | 1 | mit | 91219045c62314951bb1be25ad46c24c6479fc1b | DXCanas/kolibri,christianmemije/kolibri,lyw07/kolibri,rtibbles/kolibri,MingDai/kolibri,MingDai/kolibri,MingDai/kolibri,benjaoming/kolibri,mrpau/kolibri,rtibbles/kolibri,lyw07/kolibri,lyw07/kolibri,benjaoming/kolibri,rtibbles/kolibri,learningequality/kolibri,DXCanas/kolibri,christianmemije/kolibri,learningequality/kolib... | kolibri/core/assets/src/api-resources/membership.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n | For up-to-date information about the options:\n | http://www.browsersync.io/docs/options/\n */\n\nmodule.exports = {\n \"ui\": false, // { \"port\": 8181, \"weinre\": { \"port\": 8080 } },\n \"files\": ['./'],\n \"watc... | javascript | edit | 0 | 0 | mit | af259067e79cc0d835e22a16abaca9d475f3220d | NYCrb/devpunks,NYCrb/devpunks,NYCrb/devpunks,NYCrb/devpunks | watch.browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar pg = require( 'pg' ),\n\tdb = require( './db' );\n\t\nexports.add = function( req, res ) {\n\tvar client = new pg.Client( db.conn );\n\tclient.connect();\n\t\n\tvar queryString = \"INSERT INTO neighborhood_collection ( name, uuid, c... | javascript | edit | 0 | 2 | mit | 8e957ce15a4bf4cc5d86c00d256e7759a5c4fce1 | axismaps/bcworkshop-server | server/collect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.startup(function() {\n Meteor.methods({\n addComment: function(initiativeId, input) {\n var userId = Meteor.userId();\n Meteor.users.update(userId, { $addToSet: { commentedOn: initiativeId } });\n Initiatives.u... | javascript | edit | 0 | 3 | mit | 2a5b2d2de92546c6c837186217cf0e984b3f94aa | mtr-cherish/cherish,mtr-cherish/cherish | server/methods.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n\t_moon.Divider_ is a simple styled component that may be used as a separator\n\tbetween groups of components.\n*/\nenyo.kind({\n\tname: \"moon.Divider\",\n\tclasses: \"moon-divider moon-divider-text\",\n\tmixins: [\"moon.MarqueeSu... | javascript | edit | 0 | 0 | apache-2.0 | 03ee0d53b99ed8d47f00185af8421aac035c9f90 | enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone,mcanthony/moonstone | source/Divider.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n... | javascript | edit | 0 | 1 | apache-2.0 | b6e4fd1296bc5972d34b157c7241500f0076cbbf | cloudant/couchdb-fauxton,cloudant/couchdb-fauxton,popojargo/couchdb-fauxton,popojargo/couchdb-fauxton,garrensmith/couchdb-fauxton,garrensmith/couchdb-fauxton,apache/couchdb-fauxton,robertkowalski/couchdb-fauxton,garrensmith/couchdb-fauxton,popojargo/couchdb-fauxton,robertkowalski/couchdb-fauxton,garrensmith/couchdb-fau... | app/addons/documents/tests/viewsSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.morph').directive('morphFormAttributes', function(morph, $document) {\n return {\n restrict: 'A',\n scope: {\n form: '=morphFormAttributes',\n tokenId: '='\n },\n link: ... | javascript | edit | 0 | 1 | mit | 7885f57acfec0cf68f679ca20e95d11191e2ec51 | alpheios-project/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa | app/js/arethusa.morph/directives/morph_form_attributes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { PROJECT_BADGE } from '~/badges/constants';\nimport { DUMMY_IMAGE_URL, TEST_HOST } from 'spec/test_constants';\n\nexport const createDummyBadge = () => {\n const id = Math.floor(1000 * Math.random());\n return {\n id,\n ... | javascript | edit | 0 | 1 | mit | b4dc978d017101d274a9f26fa69388886fc3427e | iiet/iiet-git,dreampet/gitlab,dreampet/gitlab,mmkassem/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,dreampet/gitlab,stoplightio/gitlabhq,jirutka/gitlabhq,jirutka/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,dreampet/gitlab,jirutka/gitlabhq,stoplightio/gitlabhq,iiet/iie... | spec/javascripts/badges/dummy_badge.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** @jsx React.DOM */\n\nvar PersonContacts = React.createClass({\n getInitialState: function() {\n return {\n filterText:\"\"\n }\n },\n\n handleUserInput: function(text) {\n this.replaceState({... | javascript | edit | 0 | 2 | apache-2.0 | d02805ac7a0dfabaf05ed233e994c9b3bc026907 | read-write-web/react-foaf | scripts/contacts/PersonContacts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport React, { Component } from \"react\";\nimport \"./AdminSidebar.css\";\nimport { Col, Nav, NavItem, NavLink } from \"reactstrap\";\nimport { NavLink as Link } from \"react-router-dom\";\nimport LessonSidebar from \"../L... | javascript | edit | 0 | 1 | mit | f29ef08128de2fda2311021359dcf735333bab0d | celinaberg/BitFit,celinaberg/BitFit,celinaberg/BitFit | client/src/components/AdminSidebar/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n\n 'use strict';\n\n var suSift = {\n \n pick: '.su_basket--pick',\n drop: '.su_basket--drop',\n \n pickBasket: function () {\n \n var basket = document.querySelector(this.pick);\n\n if ( ... | javascript | edit | 0 | 2 | mit | c5ca90644ae42ed064939509dcac2412032706c2 | evolution-ui/evolution-ui,evolution-ui/evolution-ui | components/sift/sift.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Router = require('../src/js/framework/router'),\n WatchFace = require('../src/js/framework/watchFace'),\n NotificationHandler = require('../src/js/framework/watchNotificationHandler');\n\nvar app = require('../src... | javascript | edit | 0 | 1 | mit | a64ecbb83cd717d792c317de89406bf05eb7721d | twlevelup/watch_edition_react,twlevelup/watch_edition_react,twlevelup/watch_edition_react | client/spec/app.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = [].concat(\n require('./accounting'),\n require('./advertising'),\n require('./biomedical-engineering'),\n require('./chemical-engineering'),\n require('./chemistry'),\n require('./civil-and-coastal-engineering'),... | javascript | edit | 0 | 0 | mit | 5126730849f350bbe14e358aa854d8e1968b2efc | KenanY/course-search,KenanY/course-search | client/catalog/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport store, { getSettingsObject } from '../utils/store';\n\nexport const refresh = () =>\n store.state = {...store.state, ...getSettingsObject()};\n\n```\n\nApply this change: :art: Fix store path for Clock module"
},
{
"ro... | javascript | edit | 0 | 1 | mit | b91732fb573fbb2704af59d32ff19bf5a857cd71 | emadalam/mesmerized,emadalam/mesmerized | src/modules/clock/utils/actions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\r\n\r\nvar os = require(\"os\"),\r\n path = require(\"path\"),\r\n express = require(\"express\"),\r\n routes = require(\"./routes\");\r\n\r\nvar app = express(),\r\n hostname = os.hostname(),\r\n port = p... | javascript | edit | 0 | 1 | mit | a1af7591a013cb63b0a0475f9bfd8d3b156c27f9 | albertosantini/node-conpa,albertosantini/node-conpa | src/server/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Load modules\n\nconst Fs = require('fs');\nconst Path = require('path');\nconst Eslint = require('eslint');\nconst Hoek = require('hoek');\n\n// Declare internals\n\nconst internals = {};\n\n\nexports.lint = function... | javascript | edit | 0 | 9 | bsd-3-clause | 076d48f824cbe83d5d115a6a325cdbf8a19892e4 | lloydbenson/lab,AdriVanHoudt/lab,AdriVanHoudt/lab,ldesplat/lab,AdriVanHoudt/lab,ldesplat/lab,lloydbenson/lab,lloydbenson/lab,ldesplat/lab | lib/linters/eslint/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst spaceCase = (a) => {\n return a\n .replace(/(_|-|\\.)/g, ' ')\n .replace(/([A-Z])/g, ' $1')\n .replace(/\\s+/g, ' ')\n .replace(/(^\\s|\\s$)/g, '');\n};\n\nexport default spaceCase;\n\n```\n\nApply this change: Refact... | javascript | edit | 0 | 1 | mit | 5153b4cebc029364b591113934c4b97d35402644 | restrung/restrung-regex | src/space-case.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nconst VideoListItem = (props) => {\n console.log('Video list item props:' + props)\n return <li >video</li>\n};\n\nexport default VideoListItem;\n```\n\nApply this change: Create full video list item"... | javascript | edit | 0 | 1 | mit | 54930709ddde38e05ca8eee04b51d5e18648ab62 | iuriifaevskii/react-youtube-store,iuriifaevskii/react-youtube-store | src/components/video_list_item.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst path = require('path');\nconst app = express();\nconst db = require('../database/schemas.js');\nrequire('./routes.js')(app, db);\n\nconst port = process.env.PORT || 3000;\n\nconst rootPath = pa... | javascript | edit | 0 | 1 | mit | e21ac37bd4e7568e885b8be8c57d51eacf4d6d2d | wolnewitz/raptor-ads,Darkrender/raptor-ads,bwuphan/raptor-ads,Velocies/raptor-ads,bwuphan/raptor-ads,Velocies/raptor-ads,wolnewitz/raptor-ads,Darkrender/raptor-ads | server/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n /* global Event, assert, process, setup, suite, test */\n\nvar CANVAS_GRAB_CLASS = 'a-grab-cursor';\nvar GRABBING_CLASS = 'a-grabbing';\n\nsuite('look-controls', function () {\n setup(function (done) {\n var el = this.sceneEl = doc... | javascript | edit | 0 | 1 | mit | a99c27ad0ea032d057bed577ba7acd3f6ff82484 | jaxmolina/ar,RSpace/aframe,weddingdj/aframe,fernandojsg/aframe,ngokevin/aframe,fernandojsg/aframe,dmarcos/aframe,dmarcos/aframe,aframevr/aframe,jaxmolina/ar,aframevr/aframe,RSpace/aframe,ngokevin/aframe,darkwing/aframe,chenzlabs/aframe,googlecreativelab/aframe,chenzlabs/aframe,darkwing/aframe,mkungla/aframe,wizgrav/afr... | tests/components/look-controls.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['./client_secrets', 'ui/main'], function (secrets, ui) {\n var client_id = secrets.web.client_id,\n scopes = [\n 'https://www.googleapis.com/auth/drive'\n ],\n authorization = null;\n \n ... | javascript | edit | 0 | 4 | mit | 68617f90dfbc2f94c9d4bc6eedd6d017c928aa7b | configurator/billbill,configurator/billbill | scripts/drive/auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { MAX_PHOTO_WIDTH_IN_PX } from '../constants';\n\nexport const getRestaurantId = restaurant => restaurant.place_id;\n\nexport const getRestaurantLocation = restaurant => restaurant.geometry.location;\n\nconst getRestaurantPhotoUr... | javascript | edit | 0 | 3 | mit | 4898cce00f0d1dc68b32b8bc01b74fc0d172cfd6 | soyguijarro/lunchroulette,soyguijarro/lunchroulette | src/api/googleAPIResponseParser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar photos = document.getElementsByTagName(\"img\");\nartsyPhoto = photos[0];\nlaunchPhoto = photos[1];\n\nconsole.log(artsyPhoto);\nconsole.log(launchPhoto);\nartsyPhoto.style.border = \"10px dotted pink\";\nlaunchPhoto.style.border = ... | javascript | edit | 0 | 1 | mit | 0685dbb4ab11dc9fef68888e0c6b76328d171e7c | elliedori/phase-0-tracks,elliedori/phase-0-tracks,elliedori/phase-0-tracks | web_dev/client_side_js/dom-practice.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = {\n context: __dirname,\n entry: './client-test/client.js',\n output: {\n path: path.resol... | javascript | edit | 0 | 0 | mit | 32e155263163b644a72bd4bec64e3fcbb185f8f8 | yoo2001818/webglue,yoo2001818/webglue | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst nodeExternals = require('webpack-node-externals');\nconst path = require('path');\n\nmodule.exports = {\n target: 'node',\n externals: [nodeExternals()],\n entry: {\n authorizerGithub: ['./bootstrap', './src/authorizers/gith... | javascript | edit | 0 | 0 | mit | 736b8d27d4924a9aa29f82894bcf541aac62c18f | craftship/yith,craftship/codebox-npm,craftship/codebox-npm,craftship/yith | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nvar COMMENT_START = /^\\s*\\/\\*\\*/,\n COMMENT_END = /^\\s*\\*\\//;\n\n/**\n * This service reads LESS files and extract jsdoc styles comments.\n * It doesn't parse tags inside comments.\n */\nmodule.expo... | javascript | edit | 0 | 4 | mit | 50525bc1d894ec49f65a25c06579e7d154a2716d | troch/dgeni-less-package | file-readers/less.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nlet counts = require('counts');\n\nclass BaseRole {\n constructor(creep) {\n this.creep = creep;\n this.spawn = Game.spawns[creep.memory.spawnName];\n }\n\n static wantsToBuild(level) {\n l... | javascript | edit | 0 | 4 | mit | e8340668bfe37ded9f1d63375d668b07180c98e3 | boushley/screeps | src/base-role.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mailUser = '<EMAIL>';\nconst mailPass = 'b4da55';\nconst mailServer = 'smtp.mailgun.org';\nconst mailPort = '587';\n\n\nmodule.exports = {\n servers: {\n one: {\n host: '1.2.3.4',\n username: 'root',\n // pem: '... | javascript | edit | 0 | 0 | mit | 97b83a7a41458c3a975a2b7bfe7992b8d46e26a8 | eve-apps/spaicheck,eve-apps/spaicheck | mup.example.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default /*@ngInject*/class LoginController{\n constructor(user,$modalInstance){\n this.user = user;\n this.$modalInstance = $modalInstance;\n this.data = {};\n this.loginFields = [{\n key: 'email',\n type: ... | javascript | edit | 0 | 1 | mit | d2f2e82f9c0cb68c479544a6a0dcfa31a7b2246c | tamaracha/wbt-framework,tamaracha/wbt-framework,tamaracha/wbt-framework | src/user/login/login-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Happen as soon as the DOM is loaded and before assets are downloaded\njQuery(function($) {\n $('.js-hide-other-links').hideOtherLinks();\n $('.js-hide-other-departments').hideOtherLinks({ linkElement: 'span', alwaysVisibleClass: '.... | javascript | edit | 0 | 1 | mit | a8bfbf525346dba98edf8b457ba8d946e8b6d5d3 | robinwhittleton/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,ggoral/whitehall,alphagov/whitehall,askl56/whitehall,askl56/whitehall,ggoral/whitehall,robinwhittleton/whitehall,hotvulcan/whitehall,alphagov/whitehall,YOTOV-LIMITED/whitehall,ggoral/white... | app/assets/javascripts/application/on_ready.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ncollisions = TestCase(\"collisions\");\n\ncollisions.prototype.testMiss = function() {\n\tvar miss = nitch.collision.AABB({\n\t\twidth: 200,\n\t\theight: 100,\n\t\tx: 30,\n\t\ty: 50\t\n\t\t}, {\n\t\twidth: 100,\n\t\theight: 200,\n\t\tx:... | javascript | edit | 0 | 1 | mit | 86fac0a2bee1755545484377ac66ce5a36e4ac10 | recursivelymade/nitch.js,recursivelymade/nitch.js | src-test/collision.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function RoomMaintainer() {\n return {\n updateRooms: function () {\n Object.keys(Game.Rooms).forEach(function (room) {\n this.maintainRoom(room);\n });\n },\n\n ... | javascript | edit | 0 | 2 | mit | ded694ddcf20c12cc3dc1353f57f5cc49633266f | pmaidens/screeps,pmaidens/screeps | src/RoomMaintainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport chai from 'chai'\nimport { get, set } from '../lens'\nimport { prop } from '../es2015'\n\nconst expect = chai.expect\ndeclare var describe;\ndeclare var it;\n\ntype Obj = {\n foo: number,\n bar: string,\n baz?: ... | javascript | edit | null | null | apache-2.0 | ad36eb89b6a6d4a7a83229b747297ceb6cef205f | hallettj/safety-lens,hallettj/lens.js | test/es2015_test.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global defineSuite */\ndefineSuite([\n 'Core/buildModuleUrl',\n 'ThirdParty/Uri'\n ], function(\n buildModuleUrl,\n Uri) {\n \"use strict\";\n /*global jasmine,describe,xdescribe,it,xit,expect... | javascript | edit | 0 | 1 | apache-2.0 | 0a821a80530c8bddd76b9344122a8faa3b46aeb5 | kaktus40/cesium,NaderCHASER/cesium,CesiumGS/cesium,emackey/cesium,wallw-bits/cesium,AnalyticalGraphicsInc/cesium,kiselev-dv/cesium,ggetz/cesium,soceur/cesium,emackey/cesium,wallw-bits/cesium,aelatgt/cesium,likangning93/cesium,CesiumGS/cesium,wallw-bits/cesium,likangning93/cesium,hodbauer/cesium,denverpierce/cesium,gget... | Specs/Core/buildModuleUrlSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Util = require('../lib/util'),\nnode_util = require('util'),\nvows = require('wompt_dependencies').vows;\n\nvar suite = vows.describe('Util module');\n\nsuite.addBatch({\n\t'Util.merge':{\n\t\ttopic: function(){ return blah; },\n\t\... | javascript | edit | 0 | 1 | mit | abad712d1e40d83504e91751d2b9b47e07807d5e | iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com,Wompt/wompt.com,iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com | nodejs/test/util.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\r\n angular.module(\"lsaas\", [])\r\n .controller(\"lsaasController\", [\"$scope\", \"$window\", function($scope, $window) {\r\n $scope.placeholder = \"YOUR TEXT HERE\";\r\n $scope.imageSrc = getImageUr... | javascript | edit | 0 | 2 | mit | 0888c33714cc247645c6051d2e7f6c2500dc7274 | rehret/lsaas,rehret/lsaas | public/app/lsaas.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport styleClassNames from './prop-types';\n\nconst ComponentCommon = () => (\n <h1>This component just holds props and default props.</h1>\n);\n\nComponentCommon.propTy... | javascript | edit | 0 | 1 | mit | 0f10e0ba233bce30a4855bec9783ef1d9846db3e | twisty/formsy-react-components,twisty/formsy-react-components,twisty/formsy-react-components | src/components/component-common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jslint browser: true */\n/* global jQuery */\n(function($) {\n \"use strict\";\n\n $(document).ready(function() {\n var binder = function(context) {\n $('div.availability', context).unbind('mouseover')\n ... | javascript | edit | 0 | 2 | bsd-3-clause | c8fd9cc1b0fd1c8dd283f3a89918c134b05c5c21 | TheVirtualLtd/bda.plone.shop,andreesg/bda.plone.shop,andreesg/bda.plone.shop,TheVirtualLtd/bda.plone.shop,TheVirtualLtd/bda.plone.shop,andreesg/bda.plone.shop | src/bda/plone/shop/browser/shop.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar path = require('path');\n\nvar BUILD_DIR = path.resolve(__dirname, 'public', 'dist');\nvar APP_DIR = path.resolve(__dirname, 'src');\nvar API_BASE_URL = process.env.NODE_ENV === 'production' ? 'htt... | javascript | edit | 0 | 0 | mit | 69c1193ec03dda516e707de015ea51c80980bbc2 | bcongdon/EachDay,bcongdon/EachDay,bcongdon/EachDay,bcongdon/EachDay | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { baseInterceptor } from './baseInterceptor';\nimport { nativeXHR } from '../helpers/nativeServices';\n\nexport const name = 'XMLHttpRequest';\nexport const Reference = nativeXHR;\n\nexport const fakeService = config =>\n baseIn... | javascript | edit | 0 | 4 | mit | 3b400a6fc0ceaf88364fd22ba06cf50b024cc103 | devlucky/Kakapo.js,devlucky/Kakapo.js | src/interceptors/xhrInterceptor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst R = require('ramda')\n\nconst indentLines = require('./utils/indentLines')\nconst associatedNamesForCase = require('./utils/associatedNamesForCase')\n\n\nconst equatesForAssociatedNames = R.pipe(\n\tR.map((associatedName) => `l.${... | javascript | edit | 0 | 2 | mit | 9f5503b4d63d3845996e76368dd3a6f723127866 | BurntCaramel/swift-kick | code-generation/equatable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Wait until the DOM is ready.\n *\n * @param {Function} fn\n */\nimport { flatMap, keyBy } from 'lodash';\n\nexport function ready(fn) {\n if (document.readyState !== 'loading'){\n fn();\n } else {\n document.addEventList... | javascript | edit | 0 | 2 | mit | e5a94f932176ce7a5403dedf7222ca3e4d36b1ce | DoSomething/rogue,DoSomething/rogue,DoSomething/rogue | resources/assets/helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar chalk = require('chalk');\nvar spawn = require('child_process').spawn;\n\nvar isWindows = process.platform === 'win32';\n\nmodule.exports = function (grunt) {\n grunt.registerMultiTas... | javascript | edit | 0 | 5 | mit | 68145d2769857dec89f5fa8772b86499e7584825 | bevacqua/grunt-grunt,fdesjardins/grunt-grunt | tasks/gruntgrunt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Obtain ALL anchors on the page.\nlinks = document.links;\n\n// The previous/next urls if they exist.\nvar previous = findHref(\"prev\");\nvar next = findHref(\"next\");\n\n/**\n * Find the href for a given name.\n * @param {String} T... | javascript | edit | 0 | 5 | mit | acb91ccd63c28eefa3448ec532be5762112cf0dd | jawrainey/leftyrighty | content.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar assert = require('assert')\nvar dependenciesToArray = require('../')\n\nassert.deepEqual(dependenciesToArray({\n dependencies: {\n foo: '^1.0.0'\n }\n}), [\n { package: 'foo', version: '^1.0.0', type: 'dependen... | javascript | edit | 0 | 0 | mit | 5cc56d872a856d07375afc5d039c397fe17ae9be | mmalecki/package-json-dependencies-to-array | test/simple-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function(){\n $('.cd-slideshow').each(function(){\n var $this = this;\n var pageSpeed = ifDataExists($this, 'page-speed', 5000);\n var fadeSpeed = ifDataExists($this, 'fade-speed', 1000);\n $('> :gt(0)', $this).hide();\n ... | javascript | edit | 0 | 2 | mit | 6498596d8b20536273d1aca881d685ca56dc0533 | Yamartino/CSSDevices | devices.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst DOMAIN = 'foo.bar';\n\nexport const UNKNOWN = {\n status: 999,\n statusText: 'Unknown - something unexpected happened.',\n};\nexport const ERR = new Error('Set sail for fail!');\nexport const INVALID_HEADER = 'baz';\nexport cons... | javascript | edit | 0 | 0 | mit | b426cd2f4984ee5584425c0b5be00765cd851e3d | wKovacs64/hibp,wKovacs64/hibp,wKovacs64/hibp | test/testData.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.