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\nimport sortBy from \"lodash/collection/sortBy\";\n\nexport var metadata = {\n group: \"builtin-trailing\"\n};\n\n/**\n * [Please add a description.]\n *\n * Priority:\n *\n * - 0 We want this to be at the **very** bottom\n * - 1 Defa...
javascript
edit
0
5
mit
2ab41ec1f71f405f7e718db2f11acbc010862b0d
mcanthony/babel,aalluri-navaratan/babel,iamstarkov/babel,abdulsam/babel,thorikawa/babel,existentialism/babel,greyhwndz/babel,spicyj/babel,zorosteven/babel,sethcall/babel,rn0/babel,hzoo/babel,rn0/babel,codenamejason/babel,andrewwilkins/babel,nmn/babel,moander/babel,plemarquand/babel,guybedford/babel,VukDukic/babel,VukDu...
packages/babel/src/transformation/transformers/internal/block-hoist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path'\nimport get from 'lodash/get'\nimport merge from 'lodash/merge'\nimport {loadJsonSync} from './safeJson'\n\nconst defaults = {\n server: {\n staticPath: './static',\n port: 3910,\n hostname: 'localhost'...
javascript
edit
0
3
mit
9956f54a1e34d66f1d2af3a89d245b36681b4d8f
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/util/src/getConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Cookie from 'js-cookie'\nimport _ from 'lodash'\n\nimport { SAVE_FILE, DELETE_FILE } from '../actions/file_list_actions'\n\nconst initialState = Cookie.get('files')\n\nconst setState = () => {\n const files = Cookie.get('files')...
javascript
edit
0
4
mit
dc74ef87e18cfcb537b93dbc535788cb8893be37
raquelxmoss/markdown-writer,raquelxmoss/markdown-writer
reducers/file_list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport babel from 'rollup-plugin-babel'\nimport commonjs from 'rollup-plugin-commonjs'\nimport resolve from 'rollup-plugin-node-resolve'\n\nexport default {\n entry: './src/index.js',\n targets: [\n {\n dest: './...
javascript
edit
0
0
mit
94558f5dcf5ce15b7b1964dd36e1a7fa26c730fd
FullHuman/purgecss,FullHuman/purgecss,FullHuman/purgecss,FullHuman/purgecss
packages/purgecss-webpack-plugin/rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Https = require('https');\nvar Common = require('./common');\n\nexports.main = {\n handler: function (request, reply) {\n var params = Common.getRoomParameters(request, null, null, null);\n\n reply.view('index_template', para...
javascript
edit
0
1
mit
1d9ec16d01ea54dabb046b1b798a64c8ae6279bd
MidEndProject/node-apprtc,MidEndProject/node-apprtc
controller/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction component( args ) {\n/*\nbase_component_id(\"editorComponent\")\nload_once_from_file(true)\n*/\n\n //alert(JSON.stringify(args,null,2))\n var uid = uuidv4()\n var uid2 = uuidv4()\n var mm = Vue.component(uid, {\n ...
javascript
edit
0
1
mit
196b1746e17241d764f35d67d257da8b0c111a7c
zubairq/AppShare,zubairq/AppShare,zubairq/yazz,zubairq/AppShare,zubairq/gosharedata,zubairq/gosharedata,zubairq/yazz,zubairq/AppShare
public/visifile_drivers/ui_components/editorComponent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { inject as service } from '@ember/service';\nimport fetch from 'fetch';\nimport Route from '@ember/routing/route';\nimport ResetScrollPositionMixin from 'frontend/mixins/reset-scroll-position';\n\nexport default Route.extend(Res...
javascript
edit
0
3
mit
2343d77cd75492c4b1bda09b4c87d406a8e3a87d
roschaefer/rundfunk-mitbestimmen,roschaefer/rundfunk-mitbestimmen,roschaefer/rundfunk-mitbestimmen
frontend/app/routes/visualize/graph.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst postcss = require('postcss')\nconst _ = require('lodash')\n\nfunction findColor(colors, color) {\n const colorsNormalized = _.mapKeys(colors, (value, key) => {\n return _.camelCase(key)\n })\n\n return _.get(colorsNormalized...
javascript
edit
0
2
mit
c04a3b26c6b1859bf77df6a84936c95b457bf65c
tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindcss/tailwindcss,tailwindlabs/tailwindcss
src/generators/background-colors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar wingedMonkeyControllers = angular.module('wingedMonkeyControllers',[]);\n\nwingedMonkeyControllers.controller(\"ProviderAppsCtrl\", function($scope, $filter, ProviderApplication) {\n $scope.appsLoaded = false;\n\n $scope.refreshPr...
javascript
edit
0
2
apache-2.0
2ada6c33fca5a88ae22411408b7f6e35fd309831
jtomasek/wingedmonkey,jtomasek/wingedmonkey
app/assets/javascripts/angular/controllers/winged_monkey_controllers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mkdirp = require('mkdirp');\nvar clicolour = require(\"cli-color\");\nvar exec = require('child_process').exec;\n\nexports.createTmp = function createTmp(argument) {\n mkdirp(\"./tmp\", function(err){\n console.log(clicolour.cya...
javascript
edit
0
1
mit
247efe2dfbd2762628415137ac1a2f9023cabbf3
Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/boss.js,Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/Web-OS,Gum-Joe/Web-OS,Gum-Joe/boss.js,Gum-Joe/Web-OS,Gum-Joe/boss.js
boot/kernal/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction renderPuzzle( levelNumber, canvas, width, height ) {\n \n document.body.appendChild(canvas);\n\n canvas.width = width;\n canvas.height = height;\n\n canvas.style.backgroundColor = '#333333';\n\n canvas.id = 'g...
javascript
edit
0
1
mit
65326a10745b64c6518868a83c5ce0aa7ff8097b
mnito/factors-game,mnito/factors-game
prelim/renderPuzzle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\nimport { Template } from 'meteor/templating';\nimport { ReactiveVar } from 'meteor/reactive-var';\n\nimport moment from 'moment';\n\nimport './alert-ending-soon.html';\n\nTemplate.AlertEndingSoon...
javascript
edit
0
3
mit
b4dbc7fdda88de3c18a2b1d23fb29894ae407903
athyuttamre/signmeup,etremel/signmeup,athyuttamre/signmeup,gregcarlin/signmeup,etremel/signmeup,gregcarlin/signmeup,signmeup/signmeup,etremel/signmeup,gregcarlin/signmeup,signmeup/signmeup
app/imports/ui/components/alerts/alert-ending-soon/alert-ending-soon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This module is the server of my site.\n\n// Require external dependecies.\nvar http = require('http');\nvar filed = require('filed');\nvar path = require('path');\nvar readFile = require('fs').readFile;\nvar publish = require('./publ...
javascript
edit
0
5
mit
de54880d4ef939358cba6687a109b792475e03d0
michaelnisi/troubled,michaelnisi/troubled,michaelnisi/troubled
conf/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('../js/util');\nvar assert = require('assert');\n\ndescribe('Hello World function', function() {\n it('should always fail', function() {\n\n assert.equal(false, false);\n\n });\n\n it('should just say ...
javascript
edit
0
1
mit
8f89c947b4d12ddc7222843c0fc60300df96e72f
fhinkel/SimpleChatServer,fhinkel/SimpleChatServer
tests/util-tests.js
rejected_duplicate
Near-duplicate of sample 76649
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar hemera = require('./index');\nvar controller;\n\n/**\n * Every time a user posts a message, we update their slack profile so we can stay up to date on their profile\n * @param {Object} bot\n * @param {Object} message\n */\nmodule....
javascript
edit
0
3
mit
5a18e7bc20eea459c4cef4fe41aa94b5c6f87175
tgolen/node-multi-slack
controllers/hemera/updateSlackProfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n\tif(!config.port || !_.isNumber(config.port)) throw new Error('Port undefined or not a number');\n\n\tvar domain = 'changethisfool.com';\n\n\tvar c = {\n\t\tdefaults: {\n\t\t\ttitle: 'Change This Fo...
javascript
edit
0
5
mit
aecea1524533c36829bc9ebc933a925acb091f74
thecodebureau/epiphany
config/site.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar app = require('app');\n\nvar mainWindow = null;\nvar dribbbleData = null;\n\nvar menubar = require('menubar')\n\nvar mb = menubar({\n index: 'file://' + __dirname + '/app/index.html',\n icon: __dirname + '/app/asset...
javascript
edit
0
1
cc0-1.0
2caea723c87b1b7726264e7ff03621ad101ec0f9
andrewnaumann/hotshot,andrewnaumann/hotshot
main.js
rejected_duplicate
Near-duplicate of sample 97995
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncontrollers.controller('HomeCtrl', function($scope, Settings, AdUtil) {\n\n function showHomeAd() {\n if(AdMob){//Because android need this on start up apparently\n var platform = Settings.getPlatformSettings();\n console....
javascript
edit
0
2
mit
ba3147083f0d41be4835098a77f988b2d49b545c
flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free,flashquartermaster/Give-For-Free
www/js/controllers/home_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\nvar fs = require('fs');\nvar hljs = require('../../build');\nvar jsdom = require('jsdom').jsdom;\nvar utility = require('../utility');\n\ndescribe('special cases tests', funct...
javascript
edit
0
1
bsd-3-clause
2df528d81a60e1a8a71d5cdc3fb7ac063d235902
lead-auth/highlight.js,StanislawSwierc/highlight.js,MakeNowJust/highlight.js,carlokok/highlight.js,VoldemarLeGrand/highlight.js,Sannis/highlight.js,0x7fffffff/highlight.js,isagalaev/highlight.js,dbkaplun/highlight.js,VoldemarLeGrand/highlight.js,highlightjs/highlight.js,Sannis/highlight.js,isagalaev/highlight.js,sourru...
test/special/index.js
rejected_duplicate
Near-duplicate of sample 67768
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n(function() {\n \"use strict\";\n\n const fs = require('fs');\n const CONFIG_FILE = \"package.json\";\n\n console.log(readFile(CONFIG_FILE));\n\n function readFile(path) {\n let contents = fs.readFileSync(...
javascript
edit
0
3
unlicense
a1284f1be70ba643b23b17285b13119488e15bcc
Jameskmonger/dependument,dependument/dependument,dependument/dependument,Jameskmonger/dependument
dependument.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\n\nmodule.exports = function(context) {\n\n //\n // Write some data to a file.\n //\n context.writeFile = function(data, file) {\n fs.writeFile(file, data, function(err) {\n if (err) {\n throw ...
javascript
edit
0
2
isc
9f3ac4bd9932a0d2dc991199e41001ce30f8eecd
fiveisprime/screpl
lib/plugins/write-file.js
rejected_duplicate
Near-duplicate of sample 74413
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (C) 2013 salesforce.com, 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 ...
javascript
edit
0
1
apache-2.0
590abe07d9af483dea0e82b1ee481e191821edc9
madmax983/aura,forcedotcom/aura,forcedotcom/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,forcedotcom/aura,madmax983/aura,madmax983/aura,madmax983/aura
aura-components/src/main/components/uiExamples/radio/radioController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = '#playPanel > .panel-inner';\n\nConnector.artistSelector = '.artist';\n\nConnector.trackSelector = '.songname';\n\nConnector.isPlaying = function () {\n\treturn !$('....
javascript
edit
0
1
mit
14d6dad3991c6a5f37cc801550bbdf4fc1475d75
inverse/web-scrobbler,Paszt/web-scrobbler,alexesprit/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,ex47/web-scrobbler,alexesprit/web-scrobbler,carpet-berlin/web-scrobbler,Paszt/web-scrobbler,usdivad/web-scrobbler,david-sabata/web-scrobbler,ex47/web-scrobbler,carpet-berlin/web-scrobbl...
connectors/v2/baidu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport through from 'through2'\nimport getAssetImporter from './getAssetImporter'\nimport promiseEach from 'promise-each-concurrency'\n\nconst batchSize = 10\nconst concurrency = 6\n\nexport default options => {\n const assetImporter =...
javascript
edit
0
3
mit
d458223003e0a110549c03862e7a00984a211719
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/core/src/actions/dataset/import/getBatchedAssetImporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\r\n/**\r\n * Since only a single constructor is being exported as module.exports this comment isn't documented.\r\n * The class and module are the same thing, the contructor comment takes precedence.\r\n * @module DataLi...
javascript
edit
0
3
mit
1dc9e07b3eba41f48806cc2545b190f048ab9019
chad-autry/data-chains
src/DataLinkMixin.js
rejected_duplicate
Near-duplicate of sample 67607
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst MarkdownRenderer = require('../src/renderer').MarkdownRenderer\n\ndescribe ('Renderer', () => {\n var renderer\n var callback\n\n beforeEach(() => {\n callback = jasmine.createSpy('callback')\n renderer = new MarkdownRend...
javascript
edit
0
1
unlicense
ae0e43c40e037a7631efc0e631c7b09a0c930909
pfertyk/mauve,pfertyk/mauve
spec/renderer.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Class = require('../Class'),\n\tPublisher = require('../Publisher'),\n\tcreate = require('./create'),\n\tstyle = require('./style'),\n\tgetOffset = require('./getOffset')\n\nmodule.exports = Class(Publisher, function() {\n\n\tthis.i...
javascript
edit
0
2
mit
42fead0aa8484ea83c91781ee4c298248e0cccf2
ASAPPinc/std.js,marcuswestin/std.js
dom/Component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule(\"About Scope (topics/about_scope.js)\");\n\nthisIsAGlobalVariable = 77;\n\ntest(\"global variables\", function() {\n equal(__, thisIsAGlobalVariable, 'is thisIsAGlobalVariable defined in this scope?');\n});\n\ntest(\"variable...
javascript
edit
0
1
mit
88440db50bce90f918beb61c0335294389015f69
supportbeam/javascript_koans,supportbeam/javascript_koans
topics/about_scope.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _IsLoggedIn = undefined;\n\n\nfunction checkIfLoggedInAndTriggerEvent(notifyLoggedOutEveryTime){\n\trequest({module:\"user\", type: \"IsLoggedIn\"}, function(res){\n\n\t\tif(_IsLoggedIn === undefined){\n\t\t\t$(document).trigger(\"I...
javascript
edit
0
8
mit
25b98d508c2b9eb70a73c363ae6c29c54ad3920f
palantus/mod-user
www/loginchecker.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 .service('resourcesService', ['RawResource', 'currentStateService', '$q', resourcesService]);\n\n function resourcesService(RawResource, currentStateService, $q) {\n va...
javascript
edit
0
1
mit
abf3f9d87828d7159c3c04a46b5e6630a6af43b7
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/services/resources-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports.int = function(_msg) {\n if (_msg.properties.contentType === 'application/json') {\n return JSON.parse(_msg.content.toString());\n }\n\n return _msg.content.toString();\n};\n\nmodule.exports.out = function(content,...
javascript
edit
0
2
mit
02f9e21ff32ddbd4c829ae1a1370fe19e12938bd
dial-once/node-bunnymq
lib/helpers/message-parsers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _ = require('lodash/fp')\nconst fs = require('fs')\nconst path = require('path')\n\nconst matchers = _.flow(\n _.map(file => path.basename(file, '.js')),\n _.without(['index'])\n)(fs.readdirSync(__dirname))\n\nmodule.exports = _...
javascript
edit
0
0
isc
1e90e61bfe9b5fd6b0de0bc83b931bf7034ae885
nickmccurdy/purespec
src/matchers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n log: {\n level: 'silent'\n },\n views: {\n locals: {\n foo: '!bar!'\n }\n },\n blueprints: {\n defaultLimit: 10\n },\n models: {\n migrate: 'alter'\n },\n globals: false\n};\n\n```\n\nAp...
javascript
edit
0
0
mit
767bb63da813da20d02ba4dc938750d283fb10de
rlugojr/sails,balderdashy/sails,rlugojr/sails
test/integration/fixtures/sampleapp/config/local.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncore.Class(\"lowland.base.UserData\", {\n construct : function() {\n this.__$$userdata = {};\n },\n \n members : {\n setUserData : function(key, value) {\n if (core.Env.getValue(\"debug\")) {\n if (!key) {\n ...
javascript
edit
0
4
mit
22e488049a640d04cc5db19fec3043354ee335db
fastner/lowland,fastner/lowland
src/base/UserData.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nbasePath = '../';\n\nfiles = [\n JASMINE,\n JASMINE_ADAPTER,\n 'app/lib/jquery/jquery-*.js',\n 'app/lib/angular/angular.js',\n 'app/lib/angular/angular-*.js',\n 'app/lib/underscore.js',\n 'test/lib/angular/angular-mocks.js',\n '...
javascript
edit
0
0
mit
76c587ac9c7619aa9788daf960b7556b323fb08e
DerekDomino/forms-angular,behzad88/forms-angular,behzad88/forms-angular,DerekDomino/forms-angular,forms-angular/forms-angular,b12consulting/forms-angular,forms-angular/forms-angular,b12consulting/forms-angular,forms-angular/forms-angular,DerekDomino/forms-angular
config/karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint ember/order-in-components: 0 */\nimport $ from 'jquery';\nimport { inject as service } from '@ember/service';\nimport Component from '@ember/component';\nimport { computed } from '@ember/object';\n\nconst defaultButtons = [\n ...
javascript
edit
0
1
mit
4b4020d9c2c489b8f113ed817e9b13d8f6003427
jrjohnson/frontend,thecoolestguy/frontend,jrjohnson/frontend,djvoa12/frontend,ilios/frontend,dartajax/frontend,ilios/frontend,thecoolestguy/frontend,djvoa12/frontend,dartajax/frontend
app/components/html-editor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Link } from 'react-router';\nimport Avatar from '../widgets/Avatar';\nimport './LikesList.scss';\n\nexport default class LikesList extends Component {\n constructor(props) {\n supe...
javascript
edit
0
1
mit
7daab629eaccd22f474da04a9d83f560dbeb4685
ryanbaer/busy,Sekhmet/busy,Sekhmet/busy,ryanbaer/busy,busyorg/busy,busyorg/busy
src/post/LikesList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar d = require('d')\n , db = require('mano').db\n , _ = require('mano').i18n.bind('View: Manager Select');\n\nmodule.exports = function (descriptor) {\n\tObject.defineProperties(descriptor, {\n\t\tinputOptions: d({\n...
javascript
edit
0
1
mit
0605156573b379514f243119d20f55fb8ce8b660
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
view/dbjs/active-managers-select.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst React = require(\"react\");\nconst ReactDOM = require(\"react-dom\");\n\nconst HeroUnit = require(\"./components/main.jsx\");\nconst data = require(\"../../data/schedule.json\");\n\nconst projectConfig = require(\"../../../project...
javascript
edit
0
0
mit
78ce6d2bf9c2307f322f1d2ea9a28639868445c6
baer/isThereAFuckingGame
src/client/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DEFAULT_APP_RESOURCES = {cpus: 1, mem: 128};\nconst DEFAULT_APP_SPEC = Object.assign({instances: 1}, DEFAULT_APP_RESOURCES);\n\nmodule.exports = {\n DEFAULT_APP_RESOURCES,\n DEFAULT_APP_SPEC\n};\n\n```\n\nApply this change: Chan...
javascript
edit
0
0
apache-2.0
f0678e2e83fbddd440c775742691da408e21367b
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
plugins/services/src/js/constants/DefaultApp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n/**\n * dependency package versions\n */\nexport default {\n redis: '2.3.0',\n sqlite3: '3.1.4',\n ejs: '2.3.4',\n jade: '1.11.0',\n mongodb: '2.0.48',\n memjs: '0.8.7',\n sockjs: '0.3.15',\n nunjucks: '2.2.0',\n ...
javascript
edit
0
0
mit
8742599f32274925b24b668e8915ce2966d8ea89
Qihoo360/thinkjs,thinkjs/thinkjs,snadn/thinkjs,75team/thinkjs,75team/thinkjs,75team/thinkjs
src/config/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = (srcPath) => {\n const Broadcast = require(srcPath + 'Broadcast');\n const Parser = require(srcPath + 'CommandParser').CommandParser;\n\n return {\n aliases: ['attack', 'slay'],\n command : (st...
javascript
edit
0
5
mit
19faa2f7d98a8a9212bf253668bc0f8ab066d3ee
shawncplus/ranviermud
bundles/ranvier-combat/commands/kill.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(r) {\n\n const {addFileToDirectoryInProject} = require('./dir-utils')(r);\n\n const uploadFileToProjectDirectory = async(file, projectId, directoryId, userId) => {\n let upload = await addFileToDir...
javascript
edit
0
2
mit
e197f10b72a8f3dea6d25d06c4c902e6c7d80ad8
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/servers/mcapid/lib/dal/files.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Path = require(\"path\");\n\nmodule.exports = {\n SystemStyle: Path.join(__dirname, \"css\", \"styles.css\"),\n DefaultStyle: Path.join(__dirname, \"css\", \"markdown.css\"),\n DefaultHighlight: Path.join(__dirname, \"css...
javascript
edit
0
0
mit
cd461531e850fd30cbd5e1903308b25b19460c0a
manuth/MarkdownConverter,manuth/MarkdownConverter,manuth/MarkdownConverter
MarkdownConverter/Resources/Files.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from 'fs';\nimport path from 'path';\nimport Sequelize from 'sequelize';\n// import configs from '../config/config';\n\nconst basename = path.basename(module.filename);\n// const env = process.env.NODE_ENV || 'development';\n/...
javascript
edit
0
2
apache-2.0
dec162c8555fadb12abf8c390f0d899061f5775c
larrystone/BC-26-More-Recipes,larrystone/BC-26-More-Recipes
server/models/index.js
rejected_duplicate
Near-duplicate of sample 98731
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar argv = require( 'minimist' )( process.argv.slice( 2 ) );\nvar downloadSite = require( './download' );\n\nif ( ! argv.site ) {\n\tconsole.error( 'Provide a site with the --site option' );\n\tprocess.exit( 1 );\n}\n\nvar wpcom = requi...
javascript
edit
0
0
mit
7b9c2ef3a0b044ea2697848a7f91c9e380878934
sirbrillig/wordpress-warp,sirbrillig/wordpress-warp
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Frontend manifest\n//= require transactions\n//= require media-player-loader\n//= require checkbox-filter\n//= require support\n//= require live-search\n//= require shared_mustache\n//= require templates\n//= require track-external-l...
javascript
edit
0
0
mit
91c61c8d9ad1fc6ed7561f95de347334ea387f04
alphagov/frontend,alphagov/frontend,alphagov/frontend,alphagov/frontend
app/assets/javascripts/frontend.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar color = require('color')\n , hex = require('text-hex');\n\n/**\n * Generate a color for a given name. But be reasonably smart about it by\n * understanding name spaces and coloring each namespace a bit lighter so t...
javascript
edit
0
4
mit
47135b7ca6c91ff4ae7f714d316f15a6ed3d3cc6
bigpipe/colorspace
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { RadioGroup, Radio, Checkbox } from '@blueprintjs/core';\n\nimport { NotificationTypes } from 'enums';\n\nconst NotificationsPanel = ({\n notificationType,\n onS...
javascript
edit
0
1
mit
187269cfc24909ee5c21d33d9680f7d1467ab03b
builtwithluv/ZenFocus,builtwithluv/ZenFocus
app/components/Settings/components/notifications-panel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { getSetting } from 'meteor/vulcan:core';\nimport googleMaps from '@google/maps'\n\nconst googleMapsApiKey = getSetting('googleMaps.serverApiKey', null)\nlet googleMapsClient = null\nif (googleMapsApiKey) {\n googleMapsClient = ...
javascript
edit
0
3
mit
dbd5d56fe2fa39c89d063bfbbf0f0fdfedae8168
Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope
packages/lesswrong/server/mapsUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Auth against a flat file\n\nexports.register = function () {\n this.inherits('auth/auth_base');\n}\n\nexports.hook_capabilities = function (next, connection) {\n // don't allow AUTH unless private IP or encrypted\n if (!net_...
javascript
edit
0
5
mit
e781a6a037ae7f7888b84d6f83801305bf2d1205
craigslist/Haraka,hiteshjoshi/my-haraka-config,AbhilashSrivastava/haraka_sniffer,Synchro/Haraka,danucalovj/Haraka,hatsebutz/Haraka,typingArtist/Haraka,hatsebutz/Haraka,pedroaxl/Haraka,craigslist/Haraka,MignonCornet/Haraka,MignonCornet/Haraka,fredjean/Haraka,MignonCornet/Haraka,typingArtist/Haraka,Dexus/Haraka,slattery/...
plugins/auth/flat_file.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n\tREQUESTING,\n\tRECEIVE_TOP_RATED,\n\tRECEIVE_NOW_SHOWING,\n\tRECEIVE_POPULAR\n} from \"./ActionTypes\"\n\nexport function request() {\n\treturn {\n\t\ttype: REQUESTING\n\t}\n}\n\nexport function receivedNowShowing(data) {\n\...
javascript
edit
0
1
mit
67830a4214f33ee1e9c94fdfc5dd27747563579e
Guru107/test_app
src/app/api/Actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n$(function() {\n $('div.pym-interactive').each(function(index, element) {\n new pym.Parent($(element).attr('id'), $(element).data('url'));\n });\n});\n\n```\n\nApply this change: Build embed code including height attrbute...
javascript
edit
0
2
mit
4961e4c984cee1c13f15966b670fccb0360391ee
ONSdigital/babbage,ONSdigital/babbage,ONSdigital/babbage,ONSdigital/babbage
src/main/web/js/app/pym-interactive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Part 1\n[...document.body.textContent.trim()].reduce((s,c,i,a)=>(c==a[(i+1)%a.length])*c+s,0)\n\n// Part 2\n[...document.body.textContent.trim()].reduce((s,c,i,a)=>(l=>c==a[(i+l/2)%l])(a.length)*c+s,0)\n\n```\n\nApply this change: Us...
javascript
edit
null
null
mit
e7477b991a2f452d25ac35475e8adecceb7fac85
yishn/adventofcode,yishn/adventofcode
2017/01.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// just to make sure this file is being minified properly\nvar foobar = (function() {\n\tvar anotherLongVariableName = \"foo\";\n\tvar baz = \"baz\";\n\treturn anotherLongVariableName + baz;\n}());\n\nSystem.paths.foo = \"bar\";\n\n```\...
javascript
edit
0
1
mit
b0bc5f4bbef6c297119146f3528bfdb15138a4fd
stealjs/steal-tools,stealjs/steal-tools
test/minify/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Application from './components/application';\nimport logger from 'debug';\nimport React from 'react';\nimport { Provider } from 'react-redux';\nimport startRouter from './router';\nimport { configureStore } from './store.js';\n\n...
javascript
edit
0
2
mit
5124396ada1aa788d80403b4056c675b6324ba34
jsilvestre/tasky,jsilvestre/tasky,jsilvestre/tasky
src/client/app/boot.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add initial tests for Registry" }, { "role": "assistant", "content": "import test from 'ava';\nimport Registry from '../src/registry';\n\ntest('Registry returns a registry', t => {\n let registry = Registry([document.body]...
javascript
new_file
0
1
mit
5807a4997fb651adba6665ccf9f7edf1517c86d8
kudago/in-view,camwiegert/in-view
test/registry.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport PipelineIcon from '../icons/Pipeline';\n\nclass Welcome extends React.Component {\n static propTypes = {\n organization: React.PropTypes.string.isRequired\n }\n\n render() {\n return (\n ...
javascript
edit
0
1
mit
67d8f92bc99e95ec0c567250eae0f8aca5cadd76
fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend
app/components/organization/Welcome.js
rejected_duplicate
Near-duplicate of sample 68212
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/data-visual';\n\nimport Stage from '../system/stage';\n\nexport default Ember.Component.extend({\n classNames: [ 'data-visual' ],\n layout,\n\n width: 300,\n he...
javascript
edit
0
1
mit
829082a9fdb07be6892b9fc552e874e9b1eeb81c
ming-codes/ember-cli-d3,ming-codes/ember-cli-d3
addon/components/data-visual.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Chrome New Tab Prettify.\n// @namespace https://github.com/kilfu0701\n// @version 0.1\n// @description Prettify UI on Chrome new tab.\n// @author kilfu0701\n// @match /^http[s]?:...
javascript
edit
0
0
mit
fab4325bf85c8aa4386464b09781d385b07f5c77
kilfu0701/thk-user-script
src/browser_tools/chrome_new_tab_pretty.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global window */\n\nimport {\n configure,\n addParameters,\n // setCustomElements,\n} from '@storybook/web-components';\n\n// import customElements from '../custom-elements.json';\n\n// setCustomElements(customElements);\n\naddPar...
javascript
edit
0
0
mit
fce850eeb8b91f00d4cdeaf7cfa3d74e7b47b4c0
storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook
lib/cli/src/generators/WEB-COMPONENTS/template-csf/.storybook/preview.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst listenerUser = require ('./listenerUser');\nconst listenerApp = require ('./listenerApp');\n\n// Initialize routes.\nfunction init (app) {\n listenerUser.init ();\n listenerApp.init ();\n\n app.post ('/api/login', listenerUser....
javascript
edit
0
2
mit
10ce33fdc1035c764f27c69562b8f2a409e419fa
fcc-joemcintyre/pollster,fcc-joemcintyre/pollster,fcc-joemcintyre/pollster
src/server/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function (event) {\n event.preventDefault();\n event.stopPropagation();\n $(this).parent().addClass('open');\n\n var menu = $(this)....
javascript
edit
0
3
bsd-3-clause
f073042945f2f876cccc35c59c4eff0b0cfb4535
openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean,openHPI/codeocean
app/assets/javascripts/bootstrap-dropdown-submenu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport default class Head extends React.Component {\n render() {\n return (\n <head>\n <meta charSet=\"utf-8\"/>\n <meta httpEquiv=\"X-UA-compatible\" content=\...
javascript
edit
0
1
mit
ebccc846b56b4591a011666953a6ad75ef35fabc
mlcdf/website,mlcdf/website
src/components/Head.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar path = require('path')\nvar async = require('async')\nvar config = require('./config')\nvar child_process = require('child_process')\n\nfunction runCmd (cwd, argv) {\n var scripts = argv._.slice(1)\n var pkg = requ...
javascript
edit
0
3
mit
344b2d6018ba63f139da4529978587e209d9566b
alexanderGugel/ied,alexanderGugel/mpm
lib/run_cmd.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n $('#lga_filter').keyup(function(ev) {\n var list = $('#lga_list');\n var filter = $(this).val();\n\n if (filter === '') {\n // Show all when the filter is cleared\n list.find('div.lga').show();\n ...
javascript
edit
0
5
apache-2.0
70b62a39c353ff3ebe4847868feb24907d27cea3
NSWPlanning/data-verification-tool,NSWPlanning/data-verification-tool,NSWPlanning/data-verification-tool
app/assets/javascripts/lga_filter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet SearchStore = require('../search-store');\n/**\n * Class standing for all advanced search information.\n * The state should be the complete state of the page.\n */\nclass QuickSearchStore extends SearchStore{\n constructor(conf){\n...
javascript
edit
0
2
mit
702c888a12716d96f7382fbf2d995fbaf4243a4a
Jerom138/focus,KleeGroup/focus-core,Jerom138/focus,Jerom138/focus
store/search/quick-search/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"About Promises\", function () {\n\n describe(\"Asynchronous Flow\", function () {\n\n it(\"should understand promise declaration usage\", function () {\n \n });\n });\n});\n\n```\n\nApply this change: feat: Add typ...
javascript
edit
0
2
mit
8599b9c74d4273843cb5ae4f11a5799c2f1f8cc5
tawashley/es6-javascript-koans,tawashley/es6-javascript-koans,tawashley/es6-javascript-koans
koans/AboutPromises.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env es6 */\n/* global THREE */\nwindow.applyBoxVertexColors = (function() {\n 'use strict';\n\n return function vertexColors( geometry ) {\n const red = new THREE.Color( '#f00');\n const green = new THREE.Color( '#0f0'...
javascript
edit
0
4
mit
bf32038659afa4a77cdd79c59c52d9a9adb9b1d8
razh/experiments-three.js,razh/experiments-three.js
lathe/js/box-colors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Hide offline presence dot on old reddit\n// @namespace https://mathemaniac.org\n// @version 1.0\n// @description Hides the offline presence dot from old reddit. Only hides offline presence, s...
javascript
edit
0
1
mit
41e40acc7a7afe8d5bde99ed41a730cd88d73e86
Eckankar/userscripts,Eckankar/userscripts
reddit/old-reddit-hide-offline-presence.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.mock('../../models/meeting');\njest.mock('../../utils');\nconst { emit, broadcast } = require('../../utils');\nconst { createGenfors } = require('../../models/meeting');\nconst { generateGenfors, generateSocket } = require('../../u...
javascript
edit
0
1
mit
838745ae7fea6685498bab8b66a043090a582774
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
server/channels/__tests__/authAdmin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\r\n\r\nconst HotelData = require(\"../data\").hotel;\r\nconst UserData = require(\"../data\").users;\r\nconst breedsData = require(\"../data/models/breeds\");\r\n\r\nfunction loadRegisterPage(req, res) {\r\n\tif(!req.isA...
javascript
edit
0
3
mit
dcecb81dba5a938beb7be702f2ab2012f0545594
ilian1902/Team-D-Animals-Hotel,ilian1902/Team-D-Animals-Hotel,knmitrofanov/animalshotel,knmitrofanov/animalshotel
server/controllers/hotel-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n ___ usage ___ en_US ___\n usage: prolific syslog <options>\n\n -a, --application <string>\n The application name to display in the syslog record. Defaults to\n the value of `process.title` which w...
javascript
edit
0
2
mit
e457d0dcb9af16528f6d84ff7b5c726edb2f1478
bigeasy/prolific,bigeasy/prolific
prolific.syslog/syslog.argv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport css from './LastVotes.css';\nimport { voteWithNameSelector } from '../selectors/voting';\n\nconst LastVotes = ({ votes }) =>...
javascript
edit
0
3
mit
a25dadd4f4078965e647ec34265cdfe5fd879826
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
client/src/components/LastVotes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport default class FileDescription extends React.Component {\n\n render() {\n return <div className=\"file-description\">\n <span className=\"file-name\">{this.props.file.name}</span>\n <spa...
javascript
edit
0
1
bsd-3-clause
cde94167d2bb18a2873a943c7df25dd8258e117f
gramakri/filepizza,bradparks/filepizza_javascript_send_files_webrtc,hanford/filepizza,Ribeiro/filepizza,pquochoang/filepizza,jekrb/filepizza,codevlabs/filepizza,codebhendi/filepizza
client/components/FileDescription.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Arrow = require('arrow');\n\nmodule.exports = Arrow.createModel('base', {\n\n connector: 'appc.redis',\n\n fields: { },\n\n expire: function expire(seconds, callback){\n return this.getConnector().expire(this.getMode...
javascript
edit
0
1
apache-2.0
651bc5ecf574d4716683343c9f543d88263fd4cb
titanium-forks/appcelerator.appc.redis
models/base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n mongoose = require('mongoose'),\n app = express()\n\napp.set('port', process.env.PORT || 3000)\napp.set('mongodb-url', process.env.MONGODB_URL || 'mongodb://localhost/hangman')\n\nif ('test' ===...
javascript
edit
0
2
mit
70b72554e264bb3d06f6116080252c20b19bce25
gabrielelana/hangman-http-kata
take-002-nodejs-server-clone/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Mocha = require('mocha'),\n _ = require('underscore'),\n moduleTest = require('./module');\n\nmodule.exports = function (browser, dashboard, suite, config) {\n\n suite = Mocha.Suite.create(suite, dashboard.title);\n\n suite....
javascript
edit
0
1
mit
ea7cba4da1698273cb0023c30ae4f00268129e1c
alphagov/cheapseats
lib/tests/dashboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar notifier = new require(\"node-notifier\")({});\nvar extend = require(\"extend\");\nvar path = require(\"path\");\nvar CFG = require(\"./config.js\");\nvar pkg = require(path.join(\"..\", \"..\", CFG.FILE.config.pkg))...
javascript
edit
0
2
mit
1a573086b88669d8edf4097201d4df7ff53427ee
rishabhsrao/remember,rishabhsrao/remember,rishabhsrao/remember
gulp/utils/notify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst createLifecyclesManager = db => {\n let subscribers = [];\n\n const lifecycleManager = {\n subscribe(subscriber) {\n // TODO: verify subscriber\n subscribers.push(subscriber);\n\n return () => ...
javascript
edit
0
6
mit
007bd9cd36f3d2069f5681245f4c80d28c3e0841
wistityhq/strapi,wistityhq/strapi
packages/core/database/lib/lifecycles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['../is', '../array/last', '../functional'], function(is, last, functional) {\n var map = functional.map;\n var filter = functional.filter;\n var forEach = functional.forEach;\n\n function annotate() {\n var ar...
javascript
edit
0
3
mit
9ff4f729ba2970cd1407f47d7d1ceecc52dd7f61
bebraw/funkit,bebraw/funkit
lib/common/annotate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { space, width, height } from 'styled-system';\n\nimport { preset } from 'react/styles/functions';\n\nimport...
javascript
edit
0
1
mit
3789c3c739f450188cdb50ffd25fe3099f8b458c
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
react/components/UI/LoadingIndicator/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { Link, IndexLink } from 'react-router';\n\nimport { Login } from 'auth';\nimport { ErrorHandler } from 'error';\nimport { rendered } from 'lib/fetchData';\n\nexport default class App ex...
javascript
edit
0
1
mit
f3d1753ded9f0ecf6c88252db1efa652e2ab632f
terribleplan/isomorphic-redux-plus,isogon/isomorphic-redux-plus
app/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Internal dependencies\n */\nimport { addAMPExtraProps } from '../';\n\ndescribe( 'addAMPExtraProps', () => {\n\tit( 'does not modify non-child blocks', () => {\n\t\tconst props = addAMPExtraProps( {}, { name: 'foo/bar' }, {} );\...
javascript
edit
0
1
apache-2.0
753c56b41f2d7564dd660995d24606f17b0ffbbd
ampproject/amp-toolbox-php,ampproject/amp-toolbox-php
assets/src/stories-editor/helpers/test/addAMPExtraProps.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class ChannelHistogramController {\n constructor() {\n 'ngInject';\n }\n\n $onInit() {\n this.histOptions = {\n chart: {\n type: 'lineChart',\n showLegend: f...
javascript
edit
0
3
apache-2.0
0a77c621aed25a004b0347bf8adfdf1888dc554f
azavea/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,aaronxsu/raster-foundry,aaronxsu/raster-foundry,raster-foundry/raster-foundry,raster-foundry/raster-foundry,aaronxsu/raster-foundry,aaronxsu/raster-foundry,azavea/raster-foundry,azavea/raster-foundry,raster-foundry/raster-foundry
app-frontend/src/app/components/channelHistogram/channelHistogram.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport bg from 'gulp-bg';\nimport eslint from 'gulp-eslint';\nimport gulp from 'gulp';\nimport runSequence from 'run-sequence';\nimport webpackBuild from './webpack/build';\n\nconst runEslint = () => {\n return gulp.src([\n 'gulpfil...
javascript
edit
0
1
mit
ffeca8d1b1e312864f75e859babbc3a5abb53d8f
Brainfock/este
web/gulpfile.babel.js
rejected_duplicate
Near-duplicate of sample 93370
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\r\n * Handles writting the notes to the browser console in synchronization with the reveal.js\r\n */\r\nvar ConsoleNotes = (function() {\r\n\r\n function log(event) {\r\n\t // event.previousSlide, event.currentSlide, event.ind...
javascript
edit
0
2
mit
981d520b780cbe87d05bca2448d6495ee15650aa
itkoren/revealular,itkoren/revealular
js/console-notes.js
rejected_duplicate
Near-duplicate of sample 91069
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst ENV = {\n // ...\n \"ember-validated-form\": {\n label: {\n submit: \"Go for it!\"\n },\n css: {\n // bootstrap classes\n group: \"form-group\",\n radio: \"radio\",\n control: \"form-control\",\...
javascript
edit
0
0
mit
cd3230171aa42b3eb574da1d06c0488face95001
adfinis-sygroup/ember-validated-form,adfinis-sygroup/ember-validated-form,adfinis-sygroup/ember-validated-form
tests/dummy/app/snippets/config-bootstrap-v4.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst spawn = require(\"./spawn\");\n\nmodule.exports = function(workDir, isDebug){\n function git() {\n var len = arguments.length;\n var args = new Array(len);\n\n for (var i = 0; i < len; i++) {\n a...
javascript
edit
0
2
bsd-3-clause
0785140b62ddd655c4f472a157022b2c5a11164d
NoahDragon/update-forked-repo
lib/git.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst _ = require('lodash');\nconst updateNotifier = require('update-notifier');\n\n/**\n * Expose a CLI with given actions as subcommands\n * @param {Array} actions Array of subclasses of Action\n * @param...
javascript
edit
0
1
mit
07059d2cc11db8cdddedc82de931c2c80d4faff4
launchdeckio/shipment
lib/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar argv = require('argv');\nvar polyjuice = require('./polyjuice');\n\nvar options = [\n {\n name: 'jshint',\n type: 'string',\n description: 'Defines the source file for jshint',\n example: '\\'poly...
javascript
edit
0
0
mit
45255860bc78e5a90d7f6b3938c213628d8d6609
brenolf/polyjuice
lib/bin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'jquery',\n 'var/eventStorage',\n 'prototype/var/EmojioneArea'\n],\nfunction($, eventStorage, EmojioneArea) {\n EmojioneArea.prototype.off = function(events, handler) {\n if (events) {\n var id =...
javascript
edit
0
4
mit
66ce8257b0164f8618b53d2fbe15bda4fa73fb33
mervick/emojionearea
src/prototype/off.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nRouter.hooks = {\n dataNotFound: function (pause) {\n var data = this.data();\n var tmpl;\n\n if (data === null || typeof data === 'undefined') {\n tmpl = this.lookupProperty('notFoundTemplate');\n\n if (tmpl) {\n ...
javascript
edit
0
5
mit
554d3977a180989956124761c4178fc01f69ed78
firdausramlan/iron-router,Aaron1992/iron-router,TechplexEngineer/iron-router,abhiaiyer91/iron-router,tianzhihen/iron-router,ecuanaso/iron-router,DanielDornhardt/iron-router-2,Aaron1992/iron-router,jg3526/iron-router,assets1975/iron-router,leoetlino/iron-router,TechplexEngineer/iron-router,Sombressoul/iron-router,appoet...
lib/client/hooks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Helper.helper(function ([prefix, ...classNames]) {\n var classString = '';\n\n classNames.forEach(function(name) {\n if (!name) return;\n\n var trimmedName = name.replace(/\\s/g...
javascript
edit
0
5
mit
fa6f1f516775a84db71769b07f11fd23d5b39f7e
prototypal-io/untitled-ui,prototypal-io/untitled-ui,prototypal-io/ui-base-theme,prototypal-io/ui-base-theme
addon/helpers/-ui-component-class.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar Client = require('../index').Client;\nvar Transport = require('./mock/Transport');\nvar OutgoingFrameStream = require('./mock/OutgoingFrameStream');\nvar assert = require('assert');\n\ndescribe('Client.connect', function() {\n\n ...
javascript
edit
0
1
mit
37b8b0c2a0c887b942653eaa832c5c4d15e3b205
gdaws/node-stomp
test/Client.connect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = profile => {\n\treturn {\n\t\tuid: profile.username || profile.id,\n\t\tmail: profile.emails && profile.emails[0] && profile.emails[0].value,\n\t\tcn: profile.displayName,\n\t\tdisplayName: profile.displayName,\n\t\tgiv...
javascript
edit
0
4
apache-2.0
f0aad1536f204a108876fea8bbda7aa8ba102749
GluuFederation/gluu-passport,GluuFederation/gluu-passport
server/mappings/windowslive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Obtain ALL anchors on the page.\nvar links = document.links;\n\n// The previous/next urls if they exist.\nvar prev = 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
3617df199a77a9758b391615ec12e6ab0ae6362e
jawrainey/leftyrighty
content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.module(\"ContentModule\", function(ContentModule, app){\n ContentModule.listTemplate = \"<div>List</div>\";\n ContentModule.showTemplate = \"<div>Show <%= id %></div>\";\n\n ContentModule.ListView = Marionette.ItemView.extend({...
javascript
edit
0
1
mit
394ccb91c645cab13fbd2681cfdac3dd3bbaa602
Gerg/marionette-boilerplate
app/contentModule.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction randomIntFromInterval(min,max){return Math.floor(Math.random()*(max-min+1)+min);};\n\nvar markovGenerator = {\n\torder: 2,\n\ttable:{},\n\tload:function(text){\n\t\ttext = text.toLowerCase();\n\t\t//text.replac...
javascript
edit
0
4
bsd-3-clause
e7fba0907c173ee96a277f3d75e894e886f38c5b
Albertoni/JavascriptMarkovChain,Albertoni/JavascriptMarkovChain
markovChain.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n connect: {\n server: {\n options: {\n port: 8000,\n useAvailablePort: true,\n hostname: '*',\n keepalive: true\n }\n ...
javascript
edit
0
1
mit
1a8061be07063cb673b603ada0e2742e0b3cfa0c
krescruz/angular-local-storage
Gruntfile.js
accepted
null
true