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\nlet nock = require('nock');\nlet cmd = require('../../../commands/domains');\nlet expect = require('chai').expect;\n\ndescribe('domains', function() {\n beforeEach(() => cli.mockConsole());\n\n it('shows the doma... | javascript | edit | 0 | 1 | isc | 9b00fcb2ff19bf4b48dcccc4528c6a5ae14c409e | heroku/heroku-cli,heroku/cli,heroku/cli,heroku/cli,heroku/heroku-cli,heroku/heroku-cli,heroku/heroku-cli,heroku/cli | packages/heroku-apps/test/commands/domains/index.js | rejected_duplicate | Near-duplicate of sample 101718 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default Ember.TextField.extend(Ember.TargetActionSupport, {\n change: function() {\n this.triggerAction({\n action: 'search'\n });\n },\n \n insertNewline: function() {\n this.triggerAc... | javascript | edit | 0 | 1 | mit | a92dcb2c0c3b6fb4f79de28c18b3b0dd357d139d | HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend | app/components/text-search.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport { makeCourseStatusDisplay } from '../util/util';\n\nclass CourseList extends React.Component {\n render() {\n const { dashboard, courseList } = this.props;\n let dashboardLookup = {};\n for... | javascript | edit | 0 | 1 | bsd-3-clause | 0483e4269e66992329f0c451d2188a2230f7b81c | mitodl/micromasters,mitodl/micromasters,mitodl/micromasters,mitodl/micromasters | static/js/components/CourseList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar d3 = window.d3;\n\nvar previousD3ma = window.d3.ma;\n\nvar d3ma = d3.ma = {};\n\nd3ma.noConflict = function() {\n\twindow.d3ma= previousD3ma;\n\treturn d3ma;\n};\n\nd3ma.assert = function(test, message) {\n\tif(test) { return; }\n\t... | javascript | edit | 0 | 2 | mit | 6772db0ad6d5b4733a9101537795f5fb9dfe3fe1 | mattma/d3.ma.js | src/common/core.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport createChainableTypeChecker from './utils/createChainableTypeChecker';\n\nfunction elementType(props, propName, componentName, location, propFullName) {\n const propValue = props[propName];\n const ... | javascript | edit | 0 | 6 | mit | 1505e4cae9730677d513c81d4cd66df1017e09e5 | react-bootstrap/prop-types-extra | src/elementType.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport logo from './logo.svg';\nimport './App.css';\n\nclass App extends Component {\n render() {\n return (\n <div className=\"App\">\n <div className=\"App-header\">\n ... | javascript | edit | 0 | 2 | mit | 5ca0961dbd3c171a248452726e9f283a955babb8 | cauldyclark15/pomodoro,cauldyclark15/pomodoro | src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('dotenv').config();\n\nexport const sendSMS = (message) => {\n \n const formData = new FormData()\n\n formData.append('body', encodeURIComponent(message))\n\n formData.append('to', encodeURIComponent(process.env.TO_PHONE))\n... | javascript | edit | 0 | 2 | mit | bf6234ad7030b45fe2ae70c67d720b6fd1898fe9 | severnsc/brewing-app,severnsc/brewing-app | src/lib/Twilio.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar JWTHelper = require('./jwt-helper');\nvar JWTConfig = require('./jwt-config');\n\nvar JWTRequest = {\n setAuthorizationHeader(options, token) {\n if (!options.headers) options.headers = {};\n options.headers[JWTConf... | javascript | edit | 0 | 3 | mit | fb083580920b89bda2cbfc0d3be5ad5c2a0ca074 | iDay/react-native-http,iktw/react-native-http | src/jwt-request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('Controller: ActionCtrl', function () {\n\n // load the controller's module\n beforeEach(module('nameApp'));\n\n var ActionCtrl,\n scope;\n\n // Initialize the controller and a mock scope\n beforeEach(i... | javascript | edit | 0 | 1 | mit | 115a2e1b9c0cad8c5a05c13a73569daff11c76a3 | RaphaelDeLaGhetto/grunt-init-gebo-hai | root/test/spec/controllers/action.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst yarpm = require('../lib');\n\nconst argv = process.argv.slice(2);\n\nexports.run = function run(options) {\n yarpm(argv, Object.assign({stdin: process.stdin, stdout: process.stdout, stderr: process.stderr}, optio... | javascript | edit | 0 | 3 | mit | bb89d991e9495f15d6fabed5be9441177003b716 | BendingBender/yarpm,BendingBender/yarpm | bin/bin-executor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { CircularProgress } from 'material-ui/Progress';\nimport Text from './Text';\n\nconst Loading = ({ message }) => (\n <div className=\"loading\">\n <CircularProgress\n size={300}\n thickn... | javascript | edit | 0 | 1 | mit | 1c0597d51a0ff4646bff7ffe895cd7ac8c1e77c2 | u-wave/hub | client/components/Loading.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nif (process.env.NO_UPDATE) {\n process.exit(0);\n}\n\nconst path = require(\"path\");\nconst fs = require(\"fs\");\nconst request = require(\"request\");\n\n// Pin to specific version, reflecting the spec version in ... | javascript | edit | 0 | 0 | mit | ae3c0d72e26ec037aac7290fbb248386e35a04c9 | jsdom/whatwg-url,jsdom/whatwg-url,jsdom/whatwg-url | scripts/get-latest-platform-tests.js | rejected_duplicate | Near-duplicate of sample 102423 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global jQuery:false*/\n(function($) {\n function equalize() {\n var elements = $('.left, .right');\n var max_height = Math.max.apply(\n null,\n elements.map(function(index, elt) {\n ... | javascript | edit | 0 | 2 | mit | b23cdded1bd8067bbd6312dc38379bf7f22b5769 | NealRame/CV,NealRame/Blog,NealRame/Blog,NealRame/Blog,NealRame/CV | src/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Driver = global.WebSocket || global.MozWebSocket;\nif (Driver) {\n\tmodule.exports = function WebSocketBrowserDriver(url) {\n\t\treturn new Driver(url);\n\t};\n}\n\n```\n\nApply this change: FIX error with webpack w... | javascript | edit | 0 | 1 | mit | 0e00766548766aa280a0a5410c4019745e20c46e | sockjs/sockjs-client,sockjs/sockjs-client,sockjs/sockjs-client | lib/transport/browser/websocket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst router = require('express').Router()\nconst nonUser = require('./non-user')\nconst user = require('./user-only')\n\nrouter.use((req, res, next) => {\n let loggedIn = false\n if (req.session.user) {\n loggedIn = true\n }\n r... | javascript | edit | 0 | 2 | mit | a2b90b5f99c4b4bf0b9049001b1288cc57128259 | Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge,Maighdlyn/phase-4-challenge | src/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst MONGOOSE_CONSOLE_DEFAULT_PORT = 8080;\nconst PROMETHEUS_CONFIGURATION_PATH = '/configuration/prometheus.yml';\n\nvar express = require('express');\nvar bodyParser = require('body-parser');\nvar fs = require('fs');\n\nvar app = exp... | javascript | edit | 0 | 2 | mit | 575d973524bd2d953a9615c66dcf8e409e40bab9 | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | console/server/node-server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable */\n$('.nav-toggle').click(function (e) {\n $('.nav-menu').slideToggle(500);\n});\n\ndebounce(function(){\n $(window).resize(function(){\n if($(window).width() > 720){\n $('.nav-menu').removeAtt... | javascript | edit | 0 | 2 | mit | b30815c324d90e99bb3fca25eb6d00b5cdfef4e8 | agolomazov/bouncy,agolomazov/bouncy | markup/components/header/header.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar keystone = require('keystone');\nvar Types = keystone.Field.Types;\n\n/**\n * Y Model\n * ==========\n */\nvar Y = new keystone.List('Y');\n\nY.add({\n\tname: { type: Types.Name, required: true, index: true },\n\temail: { type: Type... | javascript | edit | 0 | 1 | mit | 415b7d0250887764ee9836ee823be07d45708173 | chrisslater/snapperfish | api/models/Y.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Helmet from 'react-helmet';\nimport Hero from './Hero';\n\nconst LandingPageHero = ({ title, headline }, { modals }) => {\n return (\n <div>\n <Helmet title={title} />\n <Hero\n he... | javascript | edit | 0 | 2 | mit | 941c1565dbc89005b99b9302370028cbd5c820c1 | Syncano/syncano.com,Syncano/syncano.com | components/LandingPageHero.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* ============================================================================\n\n Copyright (C) 2006-2016 Talend Inc. - www.talend.com\n\n This source code is available under agreement available at\n https://github.com/Talend/data-pr... | javascript | edit | 0 | 2 | apache-2.0 | b5b6d9b04bec0c9e937441a60dcac34f30e0a041 | Talend/data-prep,Talend/data-prep,Talend/data-prep | dataprep-webapp/src/app/components/preparation/creator/datasets-filters/datasets-filters-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst buble = require('rollup-plugin-buble');\nconst nodeResolve = require('rollup-plugin-node-resolve');\nconst commonJS = require('rollup-plugin-commonjs');\n\n\nmodule.exports = {\n frameworks: ['jasmine', 'sinon'],\n\n files: [\n ... | javascript | edit | 0 | 0 | mit | 3fe151d044e6a6f4ea957e3a75105a45a2865314 | demiazz/lighty | build/karma.base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is the main server file.\n//\n// It parses the command line and instantiates the two servers for this app:\nconst async = require('async')\nconst {cyan, dim, green, red} = require('chalk')\nconst ExoRelay = require('exorelay');\... | javascript | edit | 0 | 1 | mit | 7652f2b6ac6e0602d5d3746e9c42173cf3730622 | Originate/exosphere,Originate/exosphere,Originate/exosphere,Originate/exosphere | templates/add-service/web-express-es6/app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Returns a list of resources by IDs or label\nexport default function(state, resourceName, idsOrLabel) {\n const resourceSlice = state[resourceName];\n if (!resourceSlice) {\n return [];\n }\n\n const resources = resourceSlice.... | javascript | edit | 0 | 6 | mit | 0b5f74f9d0a3ab08b742a537e1e900765f8f52d8 | jmeas/resourceful-redux,jmeas/resourceful-redux | packages/resourceful-redux/src/utils/get-resources.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Here you can add settings which change per environment. This file will be also used by the buildserver to inject environment specific values.\n// Settings are made available through the configService.\nvar environmentSettings = {\n\t... | javascript | edit | 0 | 0 | mit | 77749a3cc52eb8ebabbdb0f13a58338fd543b6bd | robinvanderknaap/SkaeleFrontend,robinvanderknaap/SkaeleFrontend | src/environment-settings-template.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar userData, offlineUser;\nofflineUser = localStorage.getItem('offline_users');\n\nif (offlineUser) {\n userData = JSON.parse(localStorage.getItem('offline_users-' + offlineUser));\n if (userData && userData.offlineD... | javascript | edit | 0 | 2 | bsd-3-clause | 266e31e911e1337589aa5134efd194de6b124551 | glensc/toggl-button,glensc/toggl-button,glensc/toggl-button | src/scripts/content/toggl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n angular.module('ncsaas')\n .directive('helpicon', ['$document', helpicon]);\n\n function helpicon($document) {\n return {\n restrict: 'E',\n templateUrl: \"views/directives/help-icon.ht... | javascript | edit | 0 | 2 | mit | 0ede5818a3dd1d087ef4a01511d83a76390a35e3 | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | app/scripts/directives/help-icon.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nEmber.Adapter = Ember.Object.extend({\n find: function(record, id) {\n throw new Error('Ember.Adapter subclasses must implement find');\n },\n\n findQuery: function(record, id) {\n throw new Error('Ember.Adapter subclasses must... | javascript | edit | 0 | 1 | mit | a5bc2b05f6a2d948d596cb562796be98cfbd1d49 | greyhwndz/ember-model,juggy/ember-model,gmedina/ember-model,sohara/ember-model,ipavelpetrov/ember-model,asquet/ember-model,ebryn/ember-model,GavinJoyce/ember-model,zenefits/ember-model,c0achmcguirk/ember-model,asquet/ember-model,ipavelpetrov/ember-model,CondeNast/ember-model,Swrve/ember-model,ckung/ember-model,julkiewi... | packages/ember-model/lib/adapter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\n//var gutil = require('gulp-util');\nvar fs = require('fs');\nvar durandal = require('gulp-durandal');\nvar header = require('gulp-header');\nvar paths = require('../paths');\n\ngulp.task('durandal', functio... | javascript | edit | 0 | 1 | mit | 94a9e274fa01e834bd88e9b03dcba8a1c643120d | mryellow/durandal-gulp-boilerplate,mryellow/durandal-gulp-boilerplate | build/tasks/durandal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * Socket.io related things go !\n */\n\nimport { log, LOG_TYPES } from './log';\nimport { decodeJWT } from './JWT';\n\nconst EVENT_TYPES = {\n DISCONNECT : 'disconnect',\n CONNECTION : 'connect... | javascript | edit | 0 | 2 | mit | ebd672e35424298de480a1e19c7ac57bd0b78e67 | learning-layers/sardroid-server,learning-layers/sardroid-server | app/utils/socketIO.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport R from 'ramda';\n\n// a -> a\nconst spaceCase = R.compose(\n R.trim,\n R.replace(/([a-z])([A-Z])/g, '$1 $2'),\n R.replace(/(\\.|-|_)/g, ' ')\n);\n\nexport default spaceCase;\n\n```\n\nApply this change: Refactor spaceCase func... | javascript | edit | 0 | 0 | mit | 0717d0940e525eb17831cac42093c6a67fc658f0 | restrung/restrung-js | src/space-case.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar self = require(\"sdk/self\");\nvar panel = require(\"sdk/panel\");\n\n\n\nvar initToolbar = function(freedom) {\n // create toolbarbutton\n var tbb = require(\"pathfinder/ui/toolbarbutton\").ToolbarButton({\n id: \"UProxyItem\"... | javascript | edit | 0 | 1 | apache-2.0 | 113d7863c178a851c52e8b68711752ecaa883772 | MinFu/uproxy,IveWong/uproxy,uProxy/uproxy,uProxy/uproxy,jpevarnek/uproxy,IveWong/uproxy,roceys/uproxy,dhkong88/uproxy,itplanes/uproxy,qida/uproxy,uProxy/uproxy,qida/uproxy,qida/uproxy,itplanes/uproxy,itplanes/uproxy,dhkong88/uproxy,MinFu/uproxy,jpevarnek/uproxy,chinarustin/uproxy,IveWong/uproxy,roceys/uproxy,itplanes/u... | firefox/lib/main.js | rejected_duplicate | Near-duplicate of sample 91817 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport omit from 'lodash.omit';\nimport pick from 'lodash.pick';\n\nconst boxProps = [\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'borderWidth',\n 'borderBottomWidth',\n 'borderColor',\n 'borderLeftWidth',\n 'borderRight... | javascript | edit | 0 | 1 | mit | ddd5cae6fb518d8ea6c073ecbf90a20fc4bec8dd | teamleadercrm/teamleader-ui | src/components/box/boxProps.js | rejected_duplicate | Near-duplicate of sample 82579 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport ServerboardView from 'app/components/project'\nimport store from 'app/utils/store'\nimport { projects_update_info } from 'app/actions/project'\n\nvar Project=store.connect({\n state(state){\n if (state.project.current != \"/\... | javascript | edit | 0 | 3 | apache-2.0 | 35cabf1fcf225e7d7168f12a52baca7c5728aa4a | serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards,serverboards/serverboards | frontend/app/js/containers/project/index.js | rejected_duplicate | Near-duplicate of sample 92000 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Vector(x, y) {\n this.x = x;\n this.y = y;\n}\n\nVector.prototype.plus = function(vec) {\n return new Vector(this.x + vec.x, this.y + vec.y);\n}\n\nVector.prototype.minus = function(vec) {\n return new Vector(this.x... | javascript | edit | 0 | 1 | mit | b52cc64da7f2ecf037c5b3226a4c6641fe4c4b73 | bewuethr/ctci | eloquent_js_exercises/chapter06/chapter06_ex01.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This file is required by the index.html file and will\n// be executed in the renderer process for that window.\n// All of the Node.js APIs are available in this process.\nconst {clipboard} = require('electron')\nalert(clipboard.readT... | javascript | edit | 0 | 1 | cc0-1.0 | 1b565f867fc123d54cb54c96fdb2e188ff71227a | weitalu/awesome-answering-machine,weitalu/awesome-answering-machine | renderer.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add Chapter 09, exercise 3"
},
{
"role": "assistant",
"content": "let number = /^[+-]?\\d*(\\d\\.|\\.\\d)?\\d*([eE][+-]?\\d+)?$/;\n"
}
] | javascript | new_file | 0 | 0 | mit | 3073499ecb1147986f6164688a5b8e4e1700ef44 | bewuethr/ctci | eloquent_js_exercises/chapter09/chapter09_ex03.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// dependencies ------------------------------------------------------------\n\nimport aws from '../libs/aws';\n\n// handlers ----------------------------------------------------------------\n\n/**\n * Jobs\n *\n * Handlers for job acti... | javascript | edit | 0 | 4 | mit | 73b4e1dee95f584129f03bad8c5a7448eee31b3a | poldracklab/crn_server,poldracklab/crn_server | handlers/awsJobs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n concat: {\n dist: {\n src: ['src/**/*.js'],\n dest: 'dist/<%= pkg.name %>.js'\n }\n ... | javascript | edit | 0 | 1 | bsd-3-clause | d62e85df1a66f6cd6a8d7df237147164f5320190 | infrabel/gnap-map,infrabel/gnap-map | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (grunt) {\n\n grunt.initConfig({\n mochacli: {\n options: {\n ui: 'bdd',\n reporter: 'spec',\n require: [ 'espower_loader_helpe... | javascript | edit | 0 | 1 | mit | bbb6168aef0478fae75da18410a90dd12a9d3fd5 | takas-ho/tddbc-201411-js,takas-ho/tddbc-201411-js | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar nunjucks = require('nunjucks');\nvar utils = require('./utils');\nvar _ = require('lodash');\n\nnunjucks.env = new nunjucks.Environment();\n\nvar basicFormatter = new Intl.NumberFormat('en');\n\nvar specificFormat... | javascript | edit | 0 | 4 | apache-2.0 | ff0e9e0c7aee05422b63e9cf5516eb9fbcfdd1d1 | kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed | src/mmw/js/src/core/filters.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport ActionExitToApp from 'material-ui/svg-icons/action/exit-to-app';\nimport { defaultProps, setDisplayName, setPropTypes } from 'recompose';\nimport RaisedButton from 'material-ui/RaisedButton';\nimport React from 'react';\nimport R... | javascript | edit | 0 | 1 | mit | 7cc81eb68da50a7b505a8669885af646e4a45241 | romy/personal-imgur-gallery,romy/personal-imgur-gallery | app/containers/HomePage/Login/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).on(\"turbolinks:load\", function() {\n\n $(\".first-date-picker\").datepicker(\n {\n dateFormat: 'DD, d MM yy',\n altFormat: 'yy-mm-dd',\n altField: \"#first_date\",\n// minDate: -42,\n ... | javascript | edit | 0 | 1 | mit | 6f1262a480b7d37093e1367e21a26a41ed95181e | BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks | app/assets/javascripts/switch_meter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = rquire('fs');\n\nmodule.exports = function (context, xmlZipBlob) {\n context.log('Node.js blob trigger function processed blob:', xmlZipBlob);\n console.log(`typeof xmlZipBlob:`, typeof xmlZipBlob);\n\n fs.writeFile('x... | javascript | edit | 0 | 2 | mit | 94ed33ff52d90b3b153f5fd09069e09b29d530d1 | mattmazzola/sc2iq-azure-functions | xmlToJson/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n 'use strict';\n\n grunt.initConfig({\n jshint: {\n options: grunt.file.readJSON('.jshintrc'),\n gruntfile: 'Gruntfile.js',\n bin: {\n src: [\n 'bin/*.js',\n ... | javascript | edit | 0 | 1 | bsd-2-clause | d53860ae453ed40e410af32ac5d1b7baa84f5950 | yeoman/yo | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n var attache = {\n buildDir: 'dist'\n };\n\n // Project configuration.\n grunt.initConfig({\n appConfig: attache,\n pkg: grunt.file.readJSON('package.json'),\n jsdoc : {\n dis... | javascript | edit | 0 | 1 | mit | e7e7da9fac092e06d6a234d2be0fc522da5585a5 | janfoeh/attachejs,janfoeh/attachejs,janfoeh/attachejs | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2013-2014 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n ... | javascript | edit | 0 | 2 | bsd-3-clause | bc11793c04236270996f506e7bd4b6bceddc9543 | ms-carterk/react,gregrperkins/react,sejoker/react,BreemsEmporiumMensToiletriesFragrances/react,mohitbhatia1994/react,dmitriiabramov/react,ning-github/react,pyitphyoaung/react,chicoxyzzy/react,bruderstein/server-react,insionng/react,jordanpapaleo/react,Nieralyte/react,liyayun/react,glenjamin/react,magalhas/react,Jyrno42... | examples/todomvc-flux/js/components/Header.react.js | rejected_duplicate | Near-duplicate of sample 101710 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction foo() {\n var bar;\n function zip() {\n var quux;\n }\n}\n\n```\n\nApply this change: Complete 'Global scope & Shadowing' challenge in 'Scopes chains closures' tutorial"
},
{
"role": "assistant",
"content": "f... | javascript | edit | 0 | 1 | mit | f9c828be3c1a9c647757565f285a67c5e6d814cb | PaoloLaurenti/nodeschool | scopes-chains-closures/scopes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar browserSync = require('browser-sync');\nvar sass = require('gulp-sass');\nvar sourcemaps = require('gulp-sourcemaps');\nvar handleErrors = require('../util/handleErrors');\nvar config ... | javascript | edit | 0 | 1 | mit | 4447aedd0b2fa88be5ffa8f0d1aef7e0a9289116 | Bastly/bastly-tumblr-theme,Bastly/bastly-tumblr-theme | gulpfile.js/tasks/styles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n bower: {\n install: {\n options: {\n targetDir: './lib/ui',\n layout: 'byComponent',\n ... | javascript | edit | 0 | 1 | mit | 6aa47fbe9e0185398d1dce628a9f7308455c1600 | iknowcss/rmd-dashboard | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module(\"protonet.platform\").controller(\"InstallUpdateCtrl\", function($scope, $state, $timeout, API, Notification) {\n\n function toggleDetailedUpdateStatus() {\n $scope.showDetailedUpdateStatus = !$scope.showDetailedUpda... | javascript | edit | 0 | 3 | apache-2.0 | d62ffda36104d6620756a2d083b125d893d07419 | experimental-platform/platform-frontend,DarkSwoop/platform-frontend,DarkSwoop/platform-frontend,experimental-platform/platform-frontend,DarkSwoop/platform-frontend,experimental-platform/platform-frontend | frontend/scripts/controllers/install_update_ctrl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {ReferenceInput} from 'role:@sanity/form-builder'\nimport client from 'client:@sanity/base/client'\nimport {unprefixType} from '../utils/unprefixType'\n\nfunction fetchSingle(id) {\n return client.fetch('*[.$id == %id]', {id}).t... | javascript | edit | 0 | 1 | mit | 197563cf26894571304abb762aeb192c5f63c21a | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | src/sanity/inputs/Reference.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.up = function(knex, Promise) {\n return knex.schema.createTable('Transactions', function (table) {\n table.increments(\"id\").primary();\n table.string(\"address\", 128);\n table.integer(... | javascript | edit | 0 | 1 | isc | 39c5facffd81d7e768d6519036d0f0f0a7ed3ad2 | Payshare/stellar-payments,nybbs2003/stellar-payments,Payshares/payshares-payments | migrations/20141022152322_init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTinytest.addAsync('CurrentRoute.name returns the name of the current route', function (test, next) {\n Router.go('apple');\n setTimeout(function () {\n test.equal(CurrentRoute.name, 'apple');\n next();\n }, 500);\n});\n\nTinyte... | javascript | edit | 0 | 1 | mit | 6b691039e6a2a6bcd7e45d291fbc42650c6c1f01 | sungwoncho/iron-utils | tests/current_route_tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar crypto = require('crypto');\nvar charset = require('./charset.js');\n\nexports.generate = function(length, options) {\n \n var chars;\n \n if (typeof options === 'object') {\n if (options.charset) {\n ... | javascript | edit | 0 | 8 | mit | 0562d99c152305c93a6dbb1298549c766018358f | prashantgupta24/node-randomstring,prashantgupta24/node-randomstring,klughammer/node-randomstring | lib/randomstring.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready( function () {\n $(\".upvote\").click( function() {\n var commentId = $(\".upvote\").data(\"id\");\n event.preventDefault();\n $.ajax({\n url: '/response/up_vote',\n method: 'POST',\n data: { i... | javascript | edit | 0 | 2 | mit | b30f6630199cb723a59d5581161c60a742d29c14 | great-horned-owls-2014/dbc-what-is-this,great-horned-owls-2014/dbc-what-is-this | app/assets/javascripts/responses.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('offlineMode', [])\n\t.config(function ($httpProvider) {\n\t\t$httpProvider.interceptors.push('httpInterceptor');\n\t})\n\t.factory('httpInterceptor', function ($q) {\n\n\t\tvar OFFLINE = location.search.... | javascript | edit | 0 | 5 | mit | e5c56ff931be01e97055f47fd05da85d56acca74 | MartinSandstrom/angular-apimock,seriema/angular-apimock,seriema/angular-apimock,MartinSandstrom/angular-apimock | app/scripts/services/offlinemode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar React = require('react');\n\nfunction evalDependsOn(dependsOn, values) {\n\tif (!_.isObject(dependsOn)) return true;\n\tvar keys = _.keys(dependsOn);\n\treturn (keys.length) ? _.every(keys, function(key) {\n\t\tvar matches = _.isArr... | javascript | edit | 0 | 3 | mit | a05a9eb968458117c00de3a196ed8891be52b3a0 | Adam14Four/keystone,sendyhalim/keystone,webteckie/keystone,andrewlinfoot/keystone,MORE-HEALTH/keystone,webteckie/keystone,kidaa/keystone,the1sky/keystone,dryna/keystone-twoje-urodziny,kidaa/keystone,Yaska/keystone,asifiqbal84/keystone,kloudsio/keystone,nickhsine/keystone,Adam14Four/keystone,francesconero/keystone,vokal... | admin/src/components/FormHeading.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar cdb = require('cartodb.js-v3');\n\nvar DEFAULT_LIGHT_ACTIVE = false;\n\nmodule.exports = cdb.core.View.extend({\n initialize: function () {\n this._initModels();\n\n this.template = this.isHosted\n ? cdb.templates.getTem... | javascript | edit | 0 | 2 | bsd-3-clause | ce41f4599a9a68c23ccb9569f702ee1c0bb25bd0 | CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb | lib/assets/javascripts/cartodb/common/public_footer_view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;(function() {\n\t'use strict';\n\tangular.module('pagespeedApp', ['pagespeed.templates']).config(function($sceDelegateProvider) {\n\t\t$sceDelegateProvider.resourceUrlWhitelist([\n\t\t\t'self',\n\t\t\t'https://www.googleapis.com/pagesp... | javascript | edit | 0 | 1 | mit | 977c9fe1b897e8ed3a25eab75c01f60f828319a0 | WileESpaghetti/demo-pagespeed,WileESpaghetti/demo-pagespeed | src/js/app/pagespeed-app.module.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n /**\n * This adds {fileName, lineNumber} annotations to React component definitions\n * and to jsx tag literals.\n *\n *\n * == JSX Literals ==\n *\n * <sometag />\n *\n * becomes:\n *\n * <sometag __self={this} />\n */\n\nconst TRAC... | javascript | edit | 0 | 1 | mit | 856b1f29230acc829d627aa8779f345c71a3ddaa | babel/babel,claudiopro/babel,kaicataldo/babel,tikotzky/babel,hzoo/babel,samwgoldman/babel,kellyselden/babel,shuhei/babel,PolymerLabs/babel,kassens/babel,babel/babel,iamchenxin/babel,samwgoldman/babel,hulkish/babel,tikotzky/babel,garyjN7/babel,hzoo/babel,KunGha/babel,Skillupco/babel,shuhei/babel,jridgewell/babel,jridgew... | packages/babel-plugin-transform-react-jsx-self/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar ensure = require('ensure.js'),\n ClassNotFoundException = require('./Exceptions/ClassNotFoundException.js'),\n ClassMap = require('../Mapper/ClassMap.js');\n\nvar Loader;\n\n/**\n * ClassLoader\n *\n * Capable... | javascript | edit | 0 | 4 | mit | cc719f1526929d67df889ad2edfbb15f12445fbe | etcinit/enclosure | src/Chromabits/Loader/Loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {browser} from '../mini-testium-mocha';\nimport {delay} from 'Bluebird';\n\ndescribe('proxy', () => {\n before(browser.beforeHook);\n\n describe('handles errors', () => {\n it('with no content type and preserves status code'... | javascript | edit | 0 | 1 | bsd-3-clause | 40ee9312b1d8c6f1d13f737ffc0846bb4c104d8e | testiumjs/testium-driver-wd | test/integration/proxy.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @file Hydrate the file from scratch.\n * Download it from Cluestr, save it to local storage, run tika and returns the result.\n *\n * This helper is used in the server queue.\n */\n\n\nvar async = require('async... | javascript | edit | 0 | 1 | mit | a27e54cf245444f6b858ff57549967795e11021b | AnyFetch/anyfetch-hydrater.js | lib/hydrater-tika/helpers/hydrate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar crypto = require('crypto');\nvar _ = require('underscore');\n\nfunction TokenContainer() {\n this._tokens = {};\n this._startGarbageCollecting();\n}\n\nTokenContainer._hourMs = 60 * 60 * 1000;\nTokenContainer._collectorIntervalMs ... | javascript | edit | 0 | 2 | mit | a34b2269c3749a5c014e2fcdd663795f3c8f1731 | cargomedia/pulsar-rest-api,njam/pulsar-rest-api,cargomedia/pulsar-rest-api,njam/pulsar-rest-api,cargomedia/pulsar-rest-api,vogdb/pulsar-rest-api,cargomedia/pulsar-rest-api,njam/pulsar-rest-api,vogdb/pulsar-rest-api,njam/pulsar-rest-api,vogdb/pulsar-rest-api | lib/auth/token-container.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nRequests = new Mongo.Collection('requests');\n\nMeteor.methods({\n addRequest: function(requestAttributes) {\n check(Meteor.userId(), String);\n check(requestAttributes, {\n user: Object,\n project: Object\n });\... | javascript | edit | 0 | 2 | mit | 3bc6773ac0ae53037a53dfea0df672ba2fa613f8 | PUMATeam/puma,PUMATeam/puma | lib/collections/requests.js | rejected_duplicate | Near-duplicate of sample 91527 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Utlity to have the page wait for a given length.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance ... | javascript | edit | 0 | 2 | apache-2.0 | e5f08ef8be8d7484c963454e84e89e9f28aae810 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | tests/e2e/utils/page-wait.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global __dirname, require, module*/\n\nconst webpack = require('webpack');\nconst UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;\nconst path = require('path');\nconst env = require('yargs').argv.env; // use --env with webpack 2\n\... | javascript | edit | 0 | 0 | mit | df4ec07d287066f89ae9077bbcc622426005ae06 | krasimir/webpack-library-starter | webpack.config.js | rejected_duplicate | Near-duplicate of sample 68671 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('contextModule').controller('Context.ListController', [\n '$scope',\n '$http',\n '$filter',\n '$routeParams',\n 'FoundationApi',\n 'Event.Service',\n\nfunction ($scope, $http, $filter, $routeParams, foundationApi, e... | javascript | edit | 0 | 3 | apache-2.0 | dbe77896c2233f3ae06e539a4c3a50cbee778b28 | greathouse/tidewater,greathouse/tidewater,greathouse/tidewater | web/src/main/ng/client/assets/js/context/List.Controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\npc.extend(pc, function () {\r\n\r\n /**\r\n * @name pc.DepthMaterial\r\n * @class A Depth material is is for rendering linear depth values to a render target.\r\n * @author Will Eastcott\r\n */\r\n var DepthMateria... | javascript | edit | 0 | 1 | mit | eaad32c88ae888c9e479ec5a7bef08f6d0f4502a | guycalledfrank/engine,aidinabedi/playcanvas-engine,guycalledfrank/engine,sereepap2029/playcanvas,H1Gdev/engine,sereepap2029/playcanvas,H1Gdev/engine,sereepap2029/playcanvas,MicroWorldwide/PlayCanvas,playcanvas/engine,aidinabedi/playcanvas-engine,MicroWorldwide/PlayCanvas,playcanvas/engine | src/scene/scene_depthmaterial.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar process = require('process');\nvar fs = require('fs');\n\nvar nodeModules = {};\nfs.readdirSync('node_modules')\n .filter(function(x) {\n return ['.bin'].indexOf(x) === -1;\n })\n .forEach(function... | javascript | edit | 0 | 0 | mit | fadf55c806d8339d2aca59fdbc1b1ebcc92de81d | mgi166/usi-front,mgi166/usi-front | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * First we will load all of this project's JavaScript dependencies which\n * includes Vue and other libraries. It is a great starting point when\n * building robust, powerful web applications using Vue and Laravel.\n */\n\nrequi... | javascript | edit | 0 | 2 | mit | 4ac5daf222c879222677d66049505637a9a7836d | vadremix/zealoustools-core,vadremix/zealoustools-core | resources/assets/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar scanner = require('./scanner');\n\nmodule.exports = {\n run: function(pattern) {\n\n // load jasmine and a terminal reporter into global\n load(\"jasmine-1.3.1/jasmine.js\");\n load('./terminalReporter.js');\n\n // load... | javascript | edit | 0 | 2 | apache-2.0 | a54ed8d797aa22cdeefc30c28f18e737fda1265c | dherges/nodyn,tony--/nodyn,tony--/nodyn,tony--/nodyn,dherges/nodyn,nodyn/nodyn,nodyn/nodyn,dherges/nodyn,nodyn/nodyn | src/test/resources/specRunner.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst uuid = require('uuid');\n\nconst DEFAULT_HEADER_NAME = 'x-request-id';\n\n/**\n * Create a request loging express middleware\n * @param {Object} logger - a logger instance\n * @param {Object} options\n * @param {String?} opti... | javascript | edit | 0 | 2 | mit | 58d581984caa03c468f4b5d05d7e2a61cc66374b | wework/we-js-logger | src/util/server/requestLogger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport { inject as service } from '@ember/service';\n\nimport layout from '../../templates/components/field-editors/cardstack-cards-editor';\n\nexport default Component.extend({\n tools: servi... | javascript | edit | 0 | 1 | mit | 30d95d67c12157692037c015a41d18b352de5a89 | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | packages/card-picker/addon/components/field-editors/cardstack-cards-editor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Generator = module.exports = function () {\n\tvar cb = this.async();\n\tvar ignores = [\n\t\t'.git',\n\t\t'CHANGELOG.md',\n\t\t'CONTRIBUTING.md',\n\t\t'LICENSE.md',\n\t\t'README.md'\n\t];\n\n\tthis.prompt([{\n\t\tna... | javascript | edit | 0 | 4 | mit | 9fe2c911f946bb05c6883405d24b7f61283f6aa4 | h5bp/generator-h5bp | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createStore, combineReducers } from 'redux'\n\nimport Task from './reducers/Task'\n\nexport default createStore(\n combineReducers(\n {\n Task\n }\n )\n)\n\n```\n\nApply this change: Rename the state from 'Task' to... | javascript | edit | 0 | 0 | mit | c632fde791d79cd58b010189a9995ef9917f0040 | rhberro/the-react-client,rhberro/the-react-client | app/store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n\t$('a.white-text').on('click', function() {\n\t\t$(this).addClass('animated bounceOutUp');\n\t\tvar href = $(this).attr('href');\n\t\tsetTimeout(function() {window.location = href}, 750);\n\t\treturn false;\n\t});\n\n\t... | javascript | edit | 0 | 1 | mit | c5b02f68eb68b83e63c4ec53f8ece85371e96ca0 | whathejoe/lms-m4g4,whathejoe/lms-m4g4,whathejoe/lms-m4g4 | js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n<script type=text/javascript>\n $SCRIPT_ROOT = {{ request.script_root|tojson|safe }};\n function add(app_id) {\n var url = $SCRIPT_ROOT + \"/admin/featured/\" + app_id;\n var xhr = $.ajax({\n type: 'POST',\n ... | javascript | edit | null | null | mit | dfb2455921900dd6ca257d86bbc19c5d2bd1a7e2 | spMohanty/geotagx-theme,geotagx/geotagx-theme,spMohanty/geotagx-theme,CRUKorg/pybossa-cruk-theme,jeffersonrpn/pybossa-contribua-theme,CRUKorg/pybossa-cruk-theme,PyBossa/pybossa-default-theme,proyectos-analizo-info/pybossa-analizo-info-default-theme,jeffersonrpn/pybossa-contribua-theme,AltClick/pybossa-amnesty-theme,spM... | templates/admin/js/featured_apps.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar LanguageMap = {\n \"crystal\": \"ruby\",\n \"gcc\": \"c++\"\n};\n\nexport default Ember.Component.extend({\n highlightLanguage: function() {\n return LanguageMap[this.get('language')] || this.get('language');\n }.property('la... | javascript | edit | 0 | 2 | mit | b4c8c52d3bd293c7067a5a9d16121aa34a4b855e | jhass/carc.in,jhass/carc.in | frontend/app/components/source-code.js | rejected_duplicate | Near-duplicate of sample 71097 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ngoog.require('fontface.Observer');\n\nif (typeof module !== 'undefined') {\n module.exports = fontface.Observer;\n} else {\n window['FontFaceObserver'] = fontface.Observer;\n window['FontFaceObserver']['prototype']['load'] = fontface... | javascript | edit | 0 | 0 | bsd-2-clause | 14d31914de651203912a95fdcdef461be35ba1ac | bramstein/fontfaceobserver,bramstein/fontfaceobserver | exports.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Temporary Shim File for use while migrating from QUnit to Mocha\n/*global chai */\nfunction qunitShim() {\n var _currentTest,\n _describe = describe;\n\n function emitQUnit() {\n if (_currentTest) {\n _describe(_curren... | javascript | edit | 0 | 5 | mit | 785e223325cbce75b63a93db432fec2d2bea6dca | walmartlabs/phoenix-build | mixin/test/js/qunit-shim.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nconst program = require('commander');\nconst pkg = require('../package.json');\nconst addCommands = require('../lib/commands');\n\n// Begin command-line argument configuration\nprogram\n .usage('[option | command]'... | javascript | edit | 0 | 1 | mit | a29448bea260e5ac85c095035001ed0388f1a212 | wKovacs64/pwned,wKovacs64/pwned | bin/pwned.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst session = require('express-session')\n\nconst redisStore = require('../../config/redis-store')\nconst config = require('../../config')\n\nconst sessionStore = session({\n store: redisStore,\n proxy: config.isProd,\n cookie: {\n... | javascript | edit | 0 | 0 | mit | 649f0298319c941883ff220e4245282664829002 | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend | src/middleware/session-store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar forever = require('forever-monitor');\n\nvar server = new (forever.Monitor)('server.js', {\n options: process.argv.slice(2)\n});\n\nserver.on('exit', function() {\n console.log('server.js exiting');\n});\n... | javascript | edit | 0 | 1 | mit | 7fa8cd27d134a0d493535c5ae6a25edbb0629697 | voithos/swiftcode,voithos/swiftcode,BarthV/swiftcode,BarthV/swiftcode | runserver.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst args = unescape(document.location.hash).substring(1);\nlet argv = args === \"\" ? [] : args.split(' ');\nif (argv.length === 0 && window.DEFAULT_ARGV) argv = window.DEFAULT_ARGV;\nModule['arguments'] = argv;\n\n```\n\nApply this c... | javascript | edit | 0 | 0 | mit | ed0297e988e707d158f00f3cec07cb6d8dc4ded7 | satoshinm/NetCraft,satoshinm/NetCraft,satoshinm/NetCraft,satoshinm/NetCraft,satoshinm/NetCraft | src/pre.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require(\"express\"),\n app = express()\n\napp.get(\"/\", function (req, res) {\n res.send(\"<!DOCTYPE html>\" +\n \"<html>\" +\n \"<head>\" +\n \"<title>2.x basic usage</title>\" +\n \"</head>\" +\n ... | javascript | edit | 0 | 1 | mit | dc67b982481411b0fae26c3f69e3c0ac2ad7b2aa | milankinen/livereactload | examples/03-build-systems/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Telegraf from 'telegraf';\nimport config from 'config';\nimport feedReader from './feed';\n/* commands */\nimport commands from './commands';\n/* helpers */\nimport { sendIntervalMessages } from './helpers/messageHelper';\n// TOD... | javascript | edit | 0 | 2 | mit | 7e760caf56b58bea8a35bbdf86c70cc364dbbced | erikvilla/promo-bot,erikvilla/promo-bot | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {shallow} from 'enzyme'\nimport toJson from 'enzyme-to-json'\nimport SummaryButton from './SummaryButton'\n\ndescribe('<SummaryButton />', () => {\n it('should render', () => {\n const wrapper = sha... | javascript | edit | 0 | 1 | mit | 6ea3c3e834314fcd9dd9a29041f3eae633ebf1ff | gibbok/react-redux-weather-app,gibbok/react-redux-weather-app | src/forecast/forecastHourly/SummaryButton.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar selftest = require('../tool-testing/selftest.js');\nvar Sandbox = selftest.Sandbox;\nvar files = require('../fs/files.js');\n\nselftest.define(\"add cordova platforms\", [\"cordova\"], function () {\n var s = new Sandbox();\n var ... | javascript | edit | 0 | 1 | mit | 932750f77df037b7b4b3e5d04bcb79522588ee27 | mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,mjmasn/meteor,mjmasn/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,mjmasn/meteor,mjmasn/meteor,Hansoft/meteor | tools/tests/cordova-platforms.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport SearchBar from './components/search_bar';\n\nimport secret from './_secret.js';\n\nconst YOUTUBE_API_KEY = secret.API_KEY;\n// console.log(YOUTUBE_API_KEY);\n\n// T... | javascript | edit | 0 | 1 | mit | 53640302616c8ddc1b0012b72cec65d17d249bba | RobGThai/ReduxTutorial,RobGThai/ReduxTutorial | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar formatLocale = require('./utils').formatLocale\n\nfunction getLocale(locale) {\n if (locale) return locale\n\n if (global.Intl && typeof global.Intl.DateTimeFormat === 'function') {\n return global.Intl.DateTimeFormat().resolve... | javascript | edit | 0 | 8 | mit | 9a556e8fb8ed74b000a4cc354cba8d2d9fe9082a | moimikey/locale2,moimikey/locale2 | src/index.js | rejected_duplicate | Near-duplicate of sample 77638 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport \"core-js/fn/array/from\";\nimport \"core-js/fn/object/get-own-property-symbols\";\nimport \"core-js/fn/object/keys\";\nimport \"core-js/fn/set\";\nimport Helmet from \"./Helmet\";\n\nexport default Helmet;\n\n```\n\nApply this c... | javascript | edit | 0 | 0 | mit | 0ed8255690d62eeb08700c5410149c7f2d2a58c4 | magus/react-helmet,bountylabs/react-helmet,nfl/react-helmet | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default ({ types: t }) => {\n const buildPropertyAssignment = (objName, propName, valueNode) =>\n t.assignmentExpression(\n '=',\n t.memberExpression(t.identifier(objName), t.identifier(propName)),\n valueNode\... | javascript | edit | 0 | 7 | mit | 1e60681342054cae707c66a797fe303146f95023 | jamonkko/babel-plugin-rename-assigned-properties | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\nimport './index.scss';\n\nReactDOM.render(\n <App />,\n document.getElementById('root')\n);\n\n```\n\nApply this change: Change page title with w... | javascript | edit | 0 | 2 | mit | f08fa9edef3e8fc31b9628779b29794e0785cb96 | emyarod/afw,emyarod/afw | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport let IntercomAPI = window.Intercom || function() { console.warn('Intercome not initialized yet') };\n\nexport default class Intercom extends React.Component {\n static propTypes = {\n appID: React... | javascript | edit | 0 | 4 | mit | add4e0ae8afeb3726cd4fe901a882b0635cf33ff | nhagen/react-intercom | src/index.js | rejected_duplicate | Near-duplicate of sample 81829 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(document).on(\"ajax:success\", \"a[data-remote]\", function(e, data, status, xhr) {\n $(\"#invitations\").html(xhr.responseText);\n\n $('select').chosen(function(){\n allow_single_deselect:... | javascript | edit | 0 | 1 | mit | ba5ef76991b2fc557240374edb1502c4772ea586 | codebar/planner,codebar/planner,laszpio/planner,laszpio/planner,laszpio/planner,codebar/planner,codebar/planner,laszpio/planner | app/assets/javascripts/invitations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require govuk_publishing_components/dependencies\n//= require govuk_publishing_components/all_components\n//= require password-strength-indicator\n//= require jquery_ujs\n\n```\n\nApply this change: Switch from jquery_ujs to rails-u... | javascript | edit | 0 | 0 | mit | 63cd62a25e3d1f6781921976afeaf71950fa35fc | alphagov/signonotron2,alphagov/signonotron2,alphagov/signonotron2,alphagov/signonotron2 | app/assets/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst logger = require('logfilename')(__filename);\n\nconst { User, PendingUser } = require('../models');\n\nmodule.exports = (req, res, next) => {\n const username = req.body.username || req.body.email;\n const usernameField = req.bo... | javascript | edit | 0 | 3 | mit | 3f3c77c0f159d058d091df03cf2561b707307c3b | Waiyaki/provisioning-scheduler,Waiyaki/provisioning-scheduler,Waiyaki/provisioning-scheduler | server/middleware/checkUserExistence.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Web3 from 'web3'\nimport App from './App';\nimport registerServiceWorker from './registerServiceWorker';\nimport { useStrict } from 'mobx';\nimport { Provider } from ... | javascript | edit | 0 | 0 | mit | 352dbf15e0ed91a78519d6f37c5678492b6988d5 | oraclesorg/ico-wizard,oraclesorg/ico-wizard,oraclesorg/ico-wizard | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Coordinator from '../models/coordinator';\n\nexport default {\n name: \"setup coordinator\",\n\n initialize: function(container,app) {\n app.register(\"drag:coordinator\",Coordinator);\n app.inject(\"component\",\"coordin... | javascript | edit | 0 | 2 | mit | 3bfbcc81d6ad2b0984db6485b335eb9fe8706942 | mharris717/ember-drag-drop,mharris717/ember-drag-drop,drourke/ember-drag-drop,drourke/ember-drag-drop,curit/ember-drag-drop,curit/ember-drag-drop | app/initializers/coordinator-setup.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.