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\nconst data = [\n { id: 'isbn', name: 'ISBN' },\n { id: 'issn', name: 'ISSN' },\n { id: '0003', name: 'Standard Technical Report number' },\n { id: '0004', name: 'Publisher Number' },\n ...
javascript
edit
0
1
apache-2.0
32d71faa8b99e6c97ef1a42f33bfb756ff8d6811
cledvina/ui-instances
data/instance-identifier-types.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Ractive-Backbone tests\n// ======================\n//\n// This loads in the render.json sample file and checks that each compiled\n// template, in combination with the sample data, produces the expected\n// HTML.\n//\n// TODO: add mo...
javascript
edit
0
1
mit
d3427a147fc21677e48a0e26f665251e3133b518
jugglinmike/ractive-adaptors-ampersand,ractivejs/ractive-adaptors-ampersand
test/tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport RSVP from 'rsvp';\nimport WithDropzone from 'canvas-web/mixins/with-dropzone';\nimport layout from './template';\nimport styles from './styles';\n\nconst { inject, run } = Ember;\n\nexport default Embe...
javascript
edit
0
2
apache-2.0
643bba02881ad94d69e8ccb9ed7de45b6187578d
usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2
app/components/teams-show-route/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Valencia-Tech Repair Database website', function() {\n\n beforeEach(function () {\n browser.get('http://localhost:3000');\n });\n\n /*---------------------------------------------*/\n\n it('should have a title',...
javascript
edit
0
1
mit
07c00c8982257010437f45f8f80caad885210132
jrbenny35/VC-Tech-Repair,jrbenny35/VC-Tech-Repair
tests/spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery.noConflict(); // Allow the test to run with other libs or jQuery's.\n\n// load testswarm agent\n(function() {\n\tvar url = window.location.search;\n\turl = decodeURIComponent( url.slice( url.indexOf(\"swarmURL=\") + 9 ) );\n\tif ...
javascript
edit
0
3
mit
f502d118d1c6226ffcc8e3498d8d12fb05b2d7c5
scottjehl/jquery,sancao2/jquery,kpozin/jquery-nodom,roytoo/jquery,ilyakharlamov/jquery-xul,demetr84/Jquery,jcutrell/jquery,praveen9102/Shazam,rwaldron/jquery,hoorayimhelping/jquery,eburgos/jquery,sancao2/jquery,hoorayimhelping/jquery,quiaro/request-agent,dtjm/jquery,gnarf/jquery,eburgos/jquery,jcutrell/jquery,diracdelt...
test/data/testrunner.js
rejected_duplicate
Near-duplicate of sample 70016
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\n\nimport * as User from '../../controllers/users';\nimport * as Recipe from '../../controllers/recipes';\nimport * as Favorite from '../../controllers/favorites';\n\nimport * as Auth from '../../middlewar...
javascript
edit
0
0
apache-2.0
ffbce51192fcdf338366e2df69721db22c13df52
larrystone/BC-26-More-Recipes,larrystone/BC-26-More-Recipes
server/routes/users/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nfunction parseId(postData, type) {\n type = type || 'tags';\n return postData[type].data.map(function(t) { return t._id; });\n}\n\nfunction getSimilarityScore(arrA, arrB) {\n if (!arrA.length || !arrB.le...
javascript
edit
0
3
mit
3b315e9ce5d4ed8fd6686ca9e727b5af977b0e6e
HyunSeob/hexo-theme-overdose,HyunSeob/hexo-theme-overdose
scripts/related-posts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule = module.exports = function (arr) {\n var len = arr.length,\n random,\n temp;\n\n while (len) {\n random = Math.floor(Math.random() * len);\n len -= 1;\n temp = arr[len];\n arr[len]...
javascript
edit
0
3
mit
d2c06d4f8eb82310c783ff48ba7d22ce9b13080c
pazguille/shuffle-array,bobo2016/shuffle-array,pazguille/shuffle-array,bobo2016/shuffle-array
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst execa = require('execa');\nconst getos = require('getos');\nconst pify = require('pify');\n\nmodule.exports = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn Promise.reject(new Error('Only Linux systems a...
javascript
edit
0
3
mit
11948214bc3a12cdb587afe30246b411a5b8f1e6
kevva/linux-distro
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst fs = require('fs');\nconst Discord = require('discord.js');\n\nconst Nix = require('./lib/nix');\nconst cfg = require('./config.js');\n\nconst discordClient = new Discord.Client();\n\nlet nix = new Nix(discordClient...
javascript
edit
0
1
mit
524692bceb00b73429b889de8dc1ae7d218be800
SpyMaster356/nix-discord-bot,SpyMaster356/nix-discord-bot
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar postcssCached = require('postcss-cached');\nvar through = require('through2');\nvar applySourceMap = require('vinyl-sourcemans-apply');\nvar gulpUtil = require('gulp-util');\n\nmodule.exports = function(options) {\n ...
javascript
edit
0
4
mit
6caf508e76b77e418008f4fcac4f07b999e53339
vinsonchuong/gulp-postcss-cached
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\nvar through = require('through2'),\n gutil = require('gulp-util'),\n po = require('node-po'),\n PluginError = gutil.PluginError;\n\nmodule.exports = function () {\n\n function write (f, enc, cb){\n if (f.isNull())...
javascript
edit
0
5
mit
125d893c1984a227187656f6428f8838f66dd76a
sinedied/gulp-po-requirejs-i18n,Ulflander/gulp-po-json
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\n\nvar Append = require('./lib/broccoli-append');\nvar path = require('path');\n\nmodule.exports = {\n name: 'ember-qunit-assert-helpers',\n\n postprocessTree(type, tree) {\n this._requireBuildP...
javascript
edit
0
4
mit
cd6dca69a15492a521ab884a003f7ed333787c39
workmanw/ember-qunit-assert-helpers,workmanw/ember-qunit-assert-helpers
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport { NativeModules } from 'react-native';\n\nconst { RNTensorflow } = NativeModules;\n\nclass Tensorflow {\n\n initWithModel(modelFileName) {\n RNTensorflow.initTensorflow(modelFileName)\n }\n\n feedWithDims(inputName, src, ...
javascript
edit
0
1
apache-2.0
8e3df21894bfe1be86170bafbd0924fd1ac13a00
reneweb/react-native-tensorflow,reneweb/react-native-tensorflow
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar cookie = require('cookie');\n\nvar _cookies = cookie.parse((typeof document !== 'undefined') ? document.cookie : '');\n\nfor (var key in _cookies) {\n try {\n _cookies[key] = JSON.parse(_cookies[key]);\n } catch(e) {\n // No...
javascript
edit
0
4
mit
7dbf8b142cf42722384658d41fbe12306c2ba834
ChrisCinelli/react-cookie-async,reactivestack/cookies,reactivestack/cookies,eXon/react-cookie,reactivestack/cookies,xpepermint/react-cookie
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst redis = require('./redis');\nconst config = require('../config/index.js');\n\nconst getRequest = async (requestId) => {\n // Set TTL for request\n redis.expire(`requests:${requestId}`, config('requests_ttl'));\n return await re...
javascript
edit
0
1
mit
7ea195640eb8dd544158475abdb4c40a53e8a6cb
DAVFoundation/missioncontrol,DAVFoundation/missioncontrol,DAVFoundation/missioncontrol
server/store/requests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar OpenLayersPlusLegend = {};\n\nOpenLayersPlusLegend = {};\n\nOpenLayersPlusLegend.attach = function(context) {\n var data = $(context).data('openlayers');\n if (data && data.map.behaviors.openlayers_plus_behavior_legend) {\n var...
javascript
edit
0
8
bsd-3-clause
9aeb68e5b72f138a0f7c5815140ee278bce26b4f
CartoDB/wax,CartoDB/wax,mapbox/wax
behaviors/openlayers_plus_behavior_legend.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n \"use strict\";\n \n // Project configuration.\n grunt.initConfig({\n pkg: '<json:package.json>',\n \n test: {\n files: ['test/**/*.js']\n },\n \n lint: {\n files: ['g...
javascript
edit
0
1
mit
d45d525e4b4173fc248513579a5e81d49691d60c
7bp/letternode,7bp/letternode,7bp/letternode
grunt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Document, { Head, Main, NextScript } from 'next/document'\nimport { ServerStyleSheet } from 'styled-components'\n\nexport default class MyDocument extends Document {\n static getInitialProps({ renderPa...
javascript
edit
0
1
unlicense
caf5a511622bfa2bbc438eb4da311770e5cf1d65
isogon/styled-mdl-website
pages/_document.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nfunction ReInterval (callback, interval, args) {\n var self = this;\n\n this._callback = callback;\n this._args = args;\n\n this._interval = setInterval(callback, interval, this._args);\n\n this.reschedule = functio...
javascript
edit
0
5
mit
cc8df5515f31bbc8923efbeb570bb067da21cf42
4rzael/reInterval
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar stringsAndFlowComments = /(`(?:.|\\s)*?`|'(?:.|\\s)*?'|`(?:.|\\s)*?`|\"(?:.|\\s)*?\"|\\/\\*.*?(?::{1,2}|flow-include).*?(?:.|\\s)*?\\*\\/)/;\n\nfunction removeComments(code){\n\treturn code.split(stringsAndFlowComments)\n\t.map( fun...
javascript
edit
0
0
mit
344e18d4d46863df13737e1863c827e5f1af79d6
willheslam/uncomment-flow
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar through = require('through2')\n\nmodule.exports = function (/*streams...*/) {\n var firstTick = true;\n var sources = []\n var output = through.obj()\n var args = arguments\n\n if (args[0] instanceof Array){\n ...
javascript
edit
0
3
mit
b5a1154ab46b406a7d3b4f1b3900592c8a55ec20
grncdr/merge-stream
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar domain = require('domain');\n\nvar eos = require('end-of-stream');\nvar tick = require('next-tick');\nvar once = require('once');\nvar exhaust = require('stream-exhaust');\n\nfunction noop(){}\n\nfunction asyncDone(...
javascript
edit
0
7
mit
f0541f379f6eb49c9e91db0c2d09b4eb126436ea
gulpjs/async-done,phated/async-done,gulpjs/async-done
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\n port: 1337,\n serverUrl: process.env.SERVER_URL || 'http://127.0.0.1:1337'\n\n};\n\n```\n\nApply this change: Increase hook timeout to 3 min" }, { "role": "assistant", "content": "module.exports = {\...
javascript
edit
0
0
mit
9ec6d9e9cf4091aa582914841dbd7811fce9a736
TheConnMan/missd,TheConnMan/missd,TheConnMan/missd
config/env/production.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nrequire(\"babel-core/register\")\nrequire(\"babel-polyfill\")\n\nconst convert = require('pinyin-convert')\nconst split = require('pinyin-split')\n\nconst execute = () => {\n\tconst text = document.querySelector('#input'...
javascript
edit
0
3
mit
d178991515dbd57ad00bc423539457a4b88b3fcf
pepebecker/pinyin,pepebecker/pinyin
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\npageflow.ConfigurationEditorView.register('audio_loop', {\n configure: function() {\n this.tab('general', function() {\n this.group('general');\n\n this.input('additional_title', pageflow.TextInputView);\n this.input(...
javascript
edit
0
1
mit
b8cc9ed32afe0ebdad7899a310fc3d829485fd53
upsworld/pageflow,upsworld/pageflow,upsworld/pageflow
app/assets/javascripts/pageflow/editor/views/configuration_editors/audio_loop.js
rejected_duplicate
Near-duplicate of sample 74515
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar AWS = require('aws-sdk');\nvar moment = require('moment');\nvar path = require('path');\nvar async = require('async');\n\nvar Uploader = require('s3-streaming-upload').Uploader;\n\nvar DynamoBackup = ...
javascript
edit
0
1
mit
6b14504e4cce7897c9a42b718d1dfad728a83d1b
markitx/dynamo-backup-to-s3,LightmakerCanada/dynamo-backup-to-s3
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Pagemaki = require(\"pagemaki\");\nvar Buffer = require(\"buffer\").Buffer;\nvar through = require(\"through\");\n\n/**\n * Returns a file handling function that can \n * be piped to from within a gulp workflow\n * \n * @return {[ty...
javascript
edit
0
2
mit
50ff8341404ba0d5ef5aad6240b8ba4b1f9868dd
jasonrhodes/gulp-pagemaki
index.js
accepted
null
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
f83895146400580869984762f82abda49055acd1
lcnbala/aura,igor-sfdc/aura,badlogicmanpreet/aura,lhong375/aura,lcnbala/aura,DebalinaDey/AuraDevelopDeb,madmax983/aura,SalesforceSFDC/aura,igor-sfdc/aura,badlogicmanpreet/aura,forcedotcom/aura,igor-sfdc/aura,madmax983/aura,igor-sfdc/aura,navyliu/aura,SalesforceSFDC/aura,badlogicmanpreet/aura,madmax983/aura,SalesforceSF...
aura/src/test/components/uitest/dataTable_EmptyItems/dataTable_EmptyItemsTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-trackjs',\n\n contentFor: function (type, config) {\n var trackOpts;\n var trackConfig;\n var trackConfiguration;\n var trackBoilerPlate;\n ...
javascript
edit
0
5
mit
3f0f4b867e824e21c1ad1b27a9e22cfb4e7b05c8
jherdman/ember-cli-trackjs,jherdman/ember-cli-trackjs
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar toArray = require('stream-to-array')\nvar Promise = require('bluebird')\n\nmodule.exports = streamToPromise\n\nfunction streamToPromise (stream) {\n var promise\n if (stream.readable) {\n promise = fromReadable(...
javascript
edit
0
3
mit
41e5cd0f324509a63bfce8b7c067417c70e2f679
bendrucker/stream-to-promise
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar delim = \"---\\n\";\nvar assign = require('object-assign');\n\nmodule.exports = function(converter) {\n\n return function (pages, done) {\n\n try {\n\n pages.forEach(function(page){\n\n var conten...
javascript
edit
0
2
mit
f2a7e86bf62e7ad106773bc43996bdfc05d02412
erickmerchant/static-engine-frontmatter
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * External dependencies.\n */\n\nvar mongoose = require('mongoose');\n\n/**\n * Drop all known mongoose collections before\n * each test.\n *\n * @param {Object} hydro\n * @api public\n */\n\nmodule.exports = function(hydro) {\n ...
javascript
edit
0
2
mit
f7b66fd1bbd62799983dccb0f12c274f86350bd2
hydrojs/mongoose
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [ ],\n browser_args: {\n Chrome: [\n '--disable-gpu',\...
javascript
edit
0
0
mit
490b0c045bd7b69bce580ca28e172f25becba76d
tildeio/router.js,tildeio/router.js,asakusuma/router.js,tildeio/router.js,asakusuma/router.js
testem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//@flow\n\nimport React from \"react\";\nimport { Title, Wrapper } from \"./styled-components\";\nimport { MainNav } from \"../../elements/navigation-main\";\nimport { Highlight } from \"../../elements/highlight\";\nimport { Skewify } f...
javascript
edit
null
null
mit
1e59ab6997da70d16628046b7e5eee7bfd38c769
slightly-askew/portfolio-2017,slightly-askew/portfolio-2017
src/features/header-main/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//exports.list = function (req, res) {\n// res.send({\n// \"lat\": 5.552,\n// \"long\": 2.342,\n// \"message\": \"Bong!\",\n// \"tags\": [\"Lifestyle\", \"Restaurant\", \"YOLO\"],\n// \"relevance\": 1337,\n// ...
javascript
edit
0
2
bsd-3-clause
74e8a48857af875fd9cafaff911ead2deaa32e62
Staytment/Server
routes/posts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\n//var mongoose = require('mongoose');\n//var config = require('./config');\n\n//mongoose.connect('mongodb://localhost/my_database');\n\napp.set('port', (process.env.PORT || 5000))...
javascript
edit
null
null
mit
cdccdc8423de8688eeb388426cec96ed01e39130
xasos/CryptoMessenger-Backend
index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\n\nrouter.get('/search', function(req, res) {\n if (!req.query.hasOwnProperty(\"inp\")) return res.sendStatus(400);\n res.render('searchres', { search: req.query....
javascript
edit
0
2
mit
ef160033719ad75dda07d011380d5a1518fa65d6
rWolstenholme/unicode-webapp,rWolstenholme/unicode-webapp
routes/index.js
rejected_duplicate
Near-duplicate of sample 70631
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\nimport {\n matchContext as matchContextType\n} from './PropTypes'\n\nclass MatchProvider extends React.Component {\n static propTypes = {\n match: PropTypes.any,\n children: PropTypes.no...
javascript
edit
0
1
mit
73eba4ba1d43f586b34fe6cf521f809cfb712194
ReactTraining/react-router,OpenGov/react-router,goblortikus/react-router,asaf/react-router,goblortikus/react-router,rackt/react-router,OpenGov/react-router,rackt/react-router,rafrex/react-router,ReactTraining/react-router,reactjs/react-router,asaf/react-router,reactjs/react-router,DelvarWorld/react-router,goblortikus/r...
modules/MatchProvider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar PrintDocumentationCommand = function () {\n var handle = function () {\n console.log('Space Kitty - Version 1.0.0');\n console.log('');\n console.log('├── create ─ Create a new project');\n console.log('├── ...
javascript
edit
0
1
mit
98fbd111e911e56691ae7b341546454dab9acf27
CapsuleCat/SpaceKitty,MantarayAR/space-kitty,CapsuleCat/SpaceKitty,MantarayAR/space-kitty
src/commands/PrintDocumentationCommand.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Load the book metadata into MongoDB from book_metadata.json\n\nvar databaseURI = \"localhost:27017/bldata\";\nvar collections = [\"bookmeta\"];\nvar db = require(\"mongojs\").connect(databaseURI, collections);\n\nvar fs = require('fs...
javascript
edit
0
3
mit
f829a798e3831def07d0a7cc05d6c9395bed259c
keefmarshall/BLImageDataLoader,keefmarshall/BLImageDataLoader
misc/loadBookMetadata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// http://www.google.com/finance/match?matchtype=matchall&q=msft\n// http://www.google.com/finance/match?&q=?matchtype=matchall&q=msft\n(function () {\n angular\n .module(\"conpa\")\n .factory(\"googl...
javascript
edit
0
1
mit
2dc3d378b6688232f269a23b50beda3b4b56b278
albertosantini/node-conpa,albertosantini/node-conpa
src/client/app/services/google.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Wraps the request module from Npm in a fiber.\",\n version: '0.0.0'\n});\n\nNpm.depends({request: \"2.33.0\"});\n\nPackage.on_use(function (api) {\n api.add_files('request-server.js', 'server');\n api...
javascript
edit
0
1
mit
714b3ed251eeef60e0ead703886b4862b7cb60c6
swiper666/oppskrift,swiper666/oppskrift,oliveirasWell/tudo-gostosissimo,oliveirasWell/tudo-gostosissimo
packages/request/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('app')\n .controller('StudentController', StudentController);\n\n function StudentController($scope, $http) {\n var vm = this;\n\n vm.students = ...
javascript
edit
0
1
mit
8c072a3121dfe582d7124c68eaf850503bf8ce10
nmtoan07/AspNetCoreSPA,nmtoan07/AspNetCoreSPA,nmtoan07/AspNetCoreSPA
src/AspNetCoreSPA.Web/wwwroot/app/components/student/student.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine('editor-plugin-sticky-toolbar', [], function () {\n return function(toolbarNode) {\n return function() {\n var toolbarOffsetTop,\n scrolled = false;\n\n // Listen for scroll - TODO Debounce\n document....
javascript
edit
0
2
mit
64db44241795498d97852f5f5e7560520ffd4159
moneyadviceservice/cms-editor,moneyadviceservice/cms-editor
src/modules/plugins/editor-sticky-toolbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"Gilded Rose\", function() {\n var foo;\n\n // beforeEach(function() {\n // foo = 0;\n // foo += 1;\n // });\n\n // afterEach(function() {\n // foo = 0;\n // });\n\n it(\"should do something\", function() {\n\n ...
javascript
edit
0
1
mit
9f32253fd05705e2401a9ad85d56230d53ffae3a
ThibWeb/gilded-roses
spec/gilded_rose_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fountain = require('fountain-generator');\n\nmodule.exports = fountain.Base.extend({\n writing() {\n const name = this.options.name || 'myComponent';\n const titleCase = string => string.charAt(0).toUpperCase() + string.sli...
javascript
edit
0
4
mit
25d97be366e79b55652e8f1dd24ee15d097c7870
FountainJS/generator-fountain-react,FountainJS/generator-fountain-react,FountainJS/generator-fountain-react
generators/component/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst pkg = require(path.resolve('./package.json'));\nconst semver = require('semver');\nconst versions = require('./versions.json');\n\nconst presetEnv = require.resolve('babel-preset-env...
javascript
edit
0
9
mit
2957997bacf905276bf8ba1ab95f1dff2bce7831
jamieconnolly/babel-preset
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet ServiceConfig = {\n BLACKLIST: [\n 'uris',\n 'ports',\n 'version',\n 'versionInfo',\n 'deployments',\n 'tasks',\n 'taskStats',\n 'tasksHealthy',\n 'tasksRunning',\n 'tasksStaged',\n 'tasksUnhealthy'...
javascript
edit
0
0
apache-2.0
18f355aa42b30eb120260b6b03e7fd1d6b5d5ee6
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
src/js/constants/ServiceConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Source = require(\"./Ship/PollSource.js\");\nconst Connection = require(\"./Ship/Connection.js\");\nconst MessageRouter = require(\"./Ship/MessageRouter.js\");\nconst CommandSource = require(\"./Ship/CommandSource.js\");\n\nconst ...
javascript
edit
0
1
mit
405f53b0ccfa92d93f8e828c09131699985e7ccc
severnbronies/Sail
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar parser = require('js-yaml')\nvar optionalByteOrderMark = '\\\\ufeff?'\nvar pattern = '^(' +\n optionalByteOrderMark +\n '(= yaml =|---)' +\n '$([\\\\s\\\\S]*?)' +\n '^(?:\\\\2|\\\\.\\\\.\\\\.)\\\\s*' +\n '$' +\n (process.platf...
javascript
edit
0
4
mit
a9fe69ee7437d85e6ebe42f26b685020503e7e13
jxson/front-matter
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nlet fs = require('fs');\n\nmodule.exports = {\n name: 'ember-cli-ifa',\n\n isDevelopingAddon: function() {\n return false;\n },\n\n postBuild: function (build) {\n let indexFilePath = ...
javascript
edit
0
7
mit
f80668ffd23284bd133e25a44e04729bd38192c7
RuslanZavacky/ember-cli-ifa,RuslanZavacky/ember-cli-ifa
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar retry = require('retry');\nvar deepExtend = require('deep-extend');\n\nvar errorCodes = [\n 'EADDRINFO',\n 'ETIMEDOUT',\n 'ECONNRESET'\n];\n\nfunction requestReplay(request, options) {\n var originalEmit...
javascript
edit
0
4
mit
d87b0804b56f6e89e50e8fef377a06e554c679ac
IndigoUnited/node-request-replay
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar async = require('async');\nvar request = require('request');\nvar linters = require('./linters');\n\nvar repoURL = 'https://api.github.com/repos/nicolasmccurdy/repos';\nvar options = {\n headers: {\n...
javascript
edit
0
1
mit
fe9f6e1fa03deb5f8213a3e3ce047bad6b183af1
nicolasmccurdy/ghlint
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('./config');\nvar fetch = require('./fetcher');\nvar notify = require('./notifier');\n\nfunction error(err) {\n console.error(err);\n}\n\nfetch(config.consulateUrls, function callback(err, data) {\n if (err) retu...
javascript
edit
0
2
mit
70f88d7bcbf8b9f4f91c8c869c6dfe4be2b80fb3
stefanmaric/telegram-ardillaBot,stefanmaric/telegram-ardillaBot,stefanmaric/consulate-watcher
index.js
rejected_duplicate
Near-duplicate of sample 97754
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst program = require('commander');\nconst dachshund = require('./lib/dachshund');\n\nmodule.exports = {\n underToDash: underToDash,\n dashToUnder: dashToUnder\n};\n\nfunction underToDash(args) {\n program.parse(ar...
javascript
edit
0
2
isc
8f86a5ccbcc48d3c2b3ec394508035faf6b012bc
keokilee/dachshund
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-c3',\n included: function(app) {\n this._super.included(app);\n\n app.import(app.bowerDirectory + '/d3/d3.min.js');\n app.import(app.bowerDirectory +...
javascript
edit
0
4
mit
2082d12306fcd23cac5d50287931eab1c507aca4
Serabe/ember-c3,Serabe/ember-c3
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = defineRules;\n\nvar visionaryWords = [\n /blue\\s*sk(?:y|ies)/,\n /enlighten(?:ed|ing)?/,\n /green\\s*fields?/,\n /reach(?:ed|ing) out/,\n /visionar(?:y|ies)/\n];\n\nfunction defineRules ...
javascript
edit
0
2
mit
4a994a86719f8d32826fa99fb253b6ced0b39113
voidlily/joblint,rowanmanning/joblint,rowanmanning/joblint,voidlily/joblint
lib/rule/realism.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst chokidar = require('chokidar');\nconst kexec = require('kexec');\nconst childProcess = require('child_process');\n\nchokidar.watch('yarn.lock').on('change', () => {\n console.log('yarn.lock has been updated!');...
javascript
edit
0
1
mit
1b5775a9aec55e08c30a48c395dc6ec62163f829
mk0x9/dep-reloader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Redis = require('ioredis');\n\nmodule.exports = url => {\n const redis = new Redis(url);\n\n redis.setJSON = async () => {\n arguments[1] = JSON.stringify(arguments[1]);\n if (typeof arguments[2] === 'object' && arguments[...
javascript
edit
0
4
mit
1404c55ccc67bc63587e1c24d42affac7069643f
maxdome/maxdome-node,maxdome/maxdome-node
packages/redis/index.js
rejected_duplicate
Near-duplicate of sample 88902
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {slideshow} from \"../framework/slideshow\";\nimport Slide from \"../framework/slide\";\n\nclass HelloWorld extends Slide {\n constructor(config) {\n super(config);\n this.completed = false;\n this.init();\n }\n\n ini...
javascript
edit
0
2
mit
65b3b3f7de7f00c0c3e4575ad12315e9a30d3791
tdg5/js4pm,tdg5/js4pm,tdg5/front-end-skills-for-pms,tdg5/front-end-skills-for-pms
src/js/slides/hello-world.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {compose} from 'compose'\nimport PropTypes from 'prop-types'\nimport React from 'react'\nimport withForwardedRef from 'ref'\n\nclass AutoFocus extends React.Component {\n focusHolderRef = React.createRef()\n state = {comple...
javascript
edit
0
6
mit
68e54d94b98fe3bf7404adcf6f71db6001f8993c
openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal,openforis/sepal
modules/gui/frontend/src/widget/autoFocus.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndocument.addEventListener('DOMContentLoaded', function() {\n var checkPageButton = document.getElementById('checkPage');\n checkPageButton.addEventListener('click', function() {\n\n chrome.tabs.getSelected(null, function(tab) {\n ...
javascript
edit
0
2
mit
c3c2fedc9dd03089e1c33ade0eb7826e3659409a
RC-Dynamics/presence-extension,RC-Dynamics/presence-extension
popup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {getJSON} from './fetch.js';\n\n// Retrieve the raw user preferences without defaults merged in\nexport function getRawPreferences() {\n return new Promise((resolve) => {\n chrome.storage.sync.get(['preferences'], (items) => ...
javascript
edit
0
1
mit
7bfa1b92070ccb84da9ae2312e86c52158e143f8
caleb531/youversion-suggest-chrome,caleb531/youversion-suggest-chrome
src/scripts/models/preferences.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {};\n\nfunction calculateMove(game_state) {\n try {\n\n if(gameDecision.wantToBet()) {\n return gameDecision.getBetAmount();\n } else if(gameDecision.canWeKeepCards()) {\n // keep the cards if we can ch...
javascript
edit
0
5
mit
471afd80478b5bf625957f80cc258f4fc02e2328
sinisterstuf/poker-player-zsozso
logic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar chalk = require('chalk'),\n path = require('path'),\n fs = require('fs-extra'),\n // zlib = require('zlib'),\n browserify = require('browserify');\n\nvar EXAMPLES_DIR = 'examples',\n BUILD_DIR =...
javascript
edit
0
2
mit
a494a1daa9d7b7de17712eb5bd8509095de4ae3b
polats/aframe-polats-extras,donmccurdy/aframe-extras,polats/aframe-polats-extras,donmccurdy/sandbox-aframe
build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Encoder = require('../../../encoder')\nconst { Metadata: apiKey } = require('../../apiKeys')\n\n/**\n * Metadata Request (Version: 4) => [topics] allow_auto_topic_creation\n * topics => STRING\n * allow_auto_topic_creation => ...
javascript
edit
0
1
mit
e10c992acea8a981edea0fc0536f8d6cda44addc
tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs
src/protocol/requests/metadata/v4/request.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';\nimport AppBar from 'material-ui/AppBar';\nimport CircularProgress from 'material-ui/...
javascript
edit
0
2
mit
0ff6cc6f3ef7b87de2e72c0575bfd6956e1d2c3f
marmelab/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest,matteolc/admin-on-rest
src/mui/layout/Layout.js
rejected_duplicate
Near-duplicate of sample 88112
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n angular.module('ncsaas')\n .controller('KeyAddController', ['baseControllerAddClass', 'keysService', '$state', KeyAddController]);\n\n function KeyAddController(baseControllerAddClass, keysService, $state) {\n va...
javascript
edit
0
4
mit
53d8802fe477df264c5a0ab6c63a6daf2dc099b0
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/controllers/keys-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction Enemy(game, x, y, health) {\n Phaser.Sprite.call(this, game, x, y, 'enemy');\n this.scale.setTo(0.25,0.25);\n this.game = game;\n this.health = health;\n}\n\nEnemy.prototype = Object.create(Phaser.Sprite.prototype);\n\n...
javascript
edit
0
2
mit
b8dce22aa477bce236afcbb3b172a0d81222cc76
werme/DATX02
src/js/enemy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar timeouts = [];\nfunction updateResults() {\n var query = $(\"#query\").val();\n for (var x=0; x<timeouts.length; x++) {\n clearTimeout(timeouts[x]);\n }\n $.getJSON(\n \"/search\",\n {query: query},\n function proces...
javascript
edit
0
3
mit
f60a839562ea45d3f80b7f23e9b7fabf7b07fac8
albertyw/devops-reactions-index,albertyw/devops-reactions-index,albertyw/reaction-pics,albertyw/reaction-pics,albertyw/devops-reactions-index,albertyw/reaction-pics,albertyw/devops-reactions-index,albertyw/reaction-pics
server/templates/app.js
rejected_duplicate
Near-duplicate of sample 93485
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport onLoadEvent from '../events/onLoad';\nimport {transitionTo} from '../fsm';\nimport type {State} from '../types';\nimport {on} from '../eventBus';\nimport vars from '../vars';\n\nconst state: State = {\n onEnter() {\n...
javascript
edit
null
null
mit
94b925dc49dcedcfb326bff961948f0fac304695
instana/weasel,instana/weasel
lib/states/waitForPageLoad.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngoog.provide('ol.IView');\n\ngoog.require('ol.IView2D');\ngoog.require('ol.IView3D');\n\n\n\n/**\n * Interface for views.\n * @interface\n */\nol.IView = function() {\n};\n\n\n/**\n * @return {ol.IView2D} View2D.\n */\nol.IView.prototyp...
javascript
edit
0
1
bsd-2-clause
46ec3209bd31a9bff3174ef606e98b549f0ea7f7
stweil/ol3,geekdenz/ol3,planetlabs/ol3,thomasmoelhave/ol3,tsauerwein/ol3,NOAA-ORR-ERD/ol3,antonio83moura/ol3,itayod/ol3,bogdanvaduva/ol3,xiaoqqchen/ol3,fperucic/ol3,Antreasgr/ol3,hafenr/ol3,geonux/ol3,alexbrault/ol3,bill-chadwick/ol3,bartvde/ol3,klokantech/ol3,stweil/ol3,Antreasgr/ol3,oterral/ol3,thhomas/ol3,hafenr/ol3...
src/ol/iview.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// const unleash = require('unleash-server');\nconst unleash = require('../lib/server-impl.js');\n\nconst enableGoogleOauth = require('./google-auth-hook');\n\nunleash\n .start({\n databaseUrl: 'postgres://unl...
javascript
edit
0
1
apache-2.0
a317be66bfa1f86c5076059558f343b2e188ea72
Unleash/unleash,finn-no/unleash,finn-no/unleash,Unleash/unleash,Unleash/unleash,Unleash/unleash,finn-no/unleash
examples/keycloak-auth-unleash.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module(\"proBebe.services\")\n.factory('ObserverMicrodonation', function(storage) {\n\n function Observer() {}\n\n Observer.start = function(state){\n var dateShowPopup = storage.get('dateShowPopup');\n if(dateShowPopup ...
javascript
edit
0
4
mit
30e691a9dcea8557c74aab322b971bf82016dc15
InstitutoZeroaSeis/probebe-app,InstitutoZeroaSeis/probebe-app
www/js/services/observer_microdonation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar RCSS = require(\"rcss\");\nvar _ = require(\"underscore\");\n\nvar styleVars = require(\"./style-vars.js\");\n\nvar gridSpacing = 15;\nvar nWide = 5;\nvar baseComponentSize = (styleVars.dashboardWidthPx - (nWide + 1) *\n ...
javascript
edit
0
0
mit
d857cdcef5e2134da66df2070522ee2c5a7fba87
cjfuller/KAshboard
js/style/widget-positioner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('bolt.createProfile', [])\n\n.controller('CreateProfileController', function($location, $scope, Profile, $window) {\n $scope.createProfile = function(first, last, email, phone, distance) {\n $location.path('/');\n\n ...
javascript
edit
0
2
mit
feed7d181bda1e144e6d6c3289ca57a9d29f4354
elliotaplant/Bolt,elliotaplant/Bolt,gm758/Bolt,boisterousSplash/Bolt,boisterousSplash/Bolt,thomasRhoffmann/Bolt,gm758/Bolt,thomasRhoffmann/Bolt
client/app/controllers/createProfileController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assert from 'assert';\nimport {\n assertThat,\n everyItem,\n hasProperty,\n endsWith,\n hasSize,\n promiseThat, is, fulfilled, fulfilledWith,\n allOf, truthy\n} from 'hamjest';\n\nimport fs from 'fs';\nimport path from 'pa...
javascript
edit
0
2
mit
1b3aabec83e230b8ab43b5893c93f1c1e1e2a890
cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki
test/scripts/copy-and-minify-json-files-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('ZendeskWidgetProvider', function() {\n 'use strict';\n\n var subject, mockService, $window;\n\n beforeEach(module('zendeskWidget'));\n beforeEach(inject(function(_$window_, _ZendeskWidget_) {\n subject = _ZendeskWidg...
javascript
edit
0
2
apache-2.0
aa5b947ed4da79b9e6ccf6a2562da1ca7ade8d66
CrossLead/angular-zendesk-widget
test/unit/services/zendeskWidgetProviderSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\nimport Proj from 'ember-flexberry-data';\n\nexport default DS.Store.reopen(Proj.Store);\n\n```\n\nApply this change: Fix breaking changes after update ember-flexberry" }, { "role": "assistant", ...
javascript
edit
0
0
mit
817debfd08457e3886329de4538da2f84d71b1a1
Flexberry/ember-flexberry-gis,Flexberry/ember-flexberry-gis,Flexberry/ember-flexberry-gis
tests/dummy/app/services/store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n///////////////////////////////////////////////////////////////////////\n//// Hello Translation Widget\n//// by Aurelio Jargas 2012-02-17\n//\n// A simple sample widget, using translated strings.\n//\n// Copy/paste all this code to the ...
javascript
edit
0
1
mit
cc820ed3e7c7e2eb6541f99d32a392707e876b8b
aureliojargas/moneylog,aureliojargas/moneylog,aureliojargas/moneylog,aureliojargas/moneylog
sample/widget-hello-translation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\nimport { Match, check } from 'meteor/check';\n\nexport function requireAdmin() {\n const userId = Meteor.userId;\n if (!userId) {\n throw new Meteor.Error(400, 'You must be logged in');\n }...
javascript
edit
0
4
mit
e80d673dcbfa39619afe561f521f8bdfdcd4aa2c
kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt,kyle-rader/greatpuzzlehunt
lib/imports/method-helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nGame.spawns.Spawn1.createCreep([WORK, CARRY, MOVE], undefined, {\n working: false,\n role: 'harvester'\n});\n\n```\n\nApply this change: Update snippet to reflect changes in prototype.spawn.js" }, { "role": "assistant", "c...
javascript
edit
0
0
mit
8fb73e9fb7795c4a11db8fdd9dad1550d7547454
L00Cyph3r/Screeps
snippets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nimport {React} from 'react-for-atom'\n\nexport default React.createClass({\n\n propTypes: {\n readyCount: React.PropTypes.number,\n totalCount: React.PropTypes.number\n },\n\n render () {\n if (isNaN(this.prop...
javascript
edit
0
3
mit
a91131277a101200760367684190d91c1f16a7bc
onezoomin/atom-textual-velocity,viddo/atom-textual-velocity,viddo/atom-textual-velocity
lib/react/loading-progress.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst fs = require('fs');\nconst path = require('path');\n\nconst debug = require('../util/debug')('config:home');\n\nconst mainConfigPath =\n process.env.REST_ON_COUCH_CONFIG ||\n path.resolve(require('os').homed...
javascript
edit
0
4
mit
3074ccf8bbf2998566503d0fc976cca4ce88c36f
cheminfo/rest-on-couch,cheminfo/rest-on-couch,cheminfo/rest-on-couch
src/config/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require('request')\n\n// With username parsed from request, check that the user has submitted a\n// PR to jlord/Patchwork.\n// Because PRs are merged so fast by @RR, we loop through each of the closed\n// issues to find th...
javascript
edit
0
5
bsd-3-clause
9d2f8a295af329ba5d1c75505e285940a05e3d16
jlord/reporobot,jlord/reporobot
prcheck.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by crispin on 10/12/2015.\n */\nfunction loadEmbedIframe(onSave) {\n // add modal window\n $('.workspace-menu').append(templates.embedIframe());\n\n // variables\n var modal = $(\".modal\");\n\n // modal f...
javascript
edit
0
3
mit
a5ce1aaaefafe8d69825ceb85c2c16cd443d5d31
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/legacy/js/functions/_loadEmbedIframe.js
rejected_duplicate
Near-duplicate of sample 91317
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO: conditional defaults\n\nconst defaults = {\n thing: '',\n date: '2000-01-01',\n done: false,\n updated: false,\n options: {\n backgroundColor: '#c5cefa',\n doneButtonColor: '#009387'\n }\n}\n\nfunction onInstalled(e...
javascript
edit
0
3
mit
e920c71c85f98ee38c439188a674b37cd7721d83
matankb/one-main-thing,matankb/one-main-thing
background/oninstall.js
rejected_duplicate
Near-duplicate of sample 93084
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar nodes = require('./nodes').nodes,\n _ = require('underscore');\n\nvar macros = {};\nvar macroexpand = function(ast, env, opts) {\n var compileNodeWithEnv = require('./compile').compileNodeWithEnv;\n return _.map(ast, functi...
javascript
edit
0
2
mit
9d2a30c9ad9a86b3e85bbeb35b2187e6053d88a5
puffnfresh/roy,non/roy,non/roy,non/roy,puffnfresh/roy,puffnfresh/roy
src/macroexpand.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DataComposer = require('./BaseComposer');\n\nconst dataHandler = require('../DataHandler');\nconst eventCentral = require('../../EventCentral');\nconst socketManager = require('../../SocketManager');\nconst storageManager = requir...
javascript
edit
0
2
apache-2.0
93f72ad30afbf5a88855f9d71df3371dfe54cbca
yxeri/roleOOC,yxeri/roleTerminal,yxeri/roleOOC,yxeri/roleTerminal,yxeri/roleTerminal,yxeri/roleOOC
private/library/data/composers/TeamComposer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport UserController from '../controllers/UserController';\n\nconst userRouter = express.Router();\nuserRouter.post('/api/user/signup', UserController.createUser());\nuserRouter.post('/api/user/signin', ...
javascript
edit
0
0
mit
b8e053415be1fb842a44d28651b4f75c4a311194
tomipaul/PostIt,tomipaul/PostIt
server/routes/UserRoutes.js
rejected_duplicate
Near-duplicate of sample 79635
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {plugin} from 'postcss';\nimport has from 'has';\nimport browserslist from 'browserslist';\nimport {isSupported} from 'caniuse-api';\nimport fromInitial from '../data/fromInitial.json';\nimport toInitial from '../data/toInitial.j...
javascript
edit
0
6
mit
e5a93ff28eb8a41ce4ca09157413d20fe65d1f49
ben-eb/cssnano
packages/postcss-reduce-initial/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = chai.assert;\n\ndescribe('LMLayer', function () {\n describe('[[constructor]]', function () {\n it('should construct with zero arguments', function () {\n let lmlayer = new LMLayer();\n assert.instanceOf...
javascript
edit
0
1
apache-2.0
6cc20cfd8340dc14d1219c7eb64ead988e5bdb1d
tavultesoft/keymanweb,tavultesoft/keymanweb
common/predictive-text/unit_tests/in_browser/cases/lmlayer-integration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport shallowEqual from 'shallowequal'\n\n\nexport const withDomain = ({\n domainClass,\n mapPropsToArg,\n mapPropsToArgsArray = props => mapPropsToArg ? [mapPropsToArg(props)] : [],\n createDomain = prop...
javascript
edit
0
4
mit
f4a157f2bcf98fbe98a131557a95427b3a788a90
mindhivenz/meteor-base,mindhivenz/meteor-base
src/domain/withDomain.js
rejected_duplicate
Near-duplicate of sample 84502
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar linspace = require( 'compute-linspace' );\nvar zeta = require( './../lib' );\n\nvar s;\nvar v;\nvar i;\n\ns = linspace( -50.0, 50.0, 200 );\nfor ( i = 0; i < s.length; i++ ) {\n\tv = zeta( s[ i ] );\n\tconsole.log( ...
javascript
edit
0
0
apache-2.0
6eb2cb67f53de4da4787a72c52e3620adddfa4dc
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/special/riemann-zeta/examples/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Policy Mappings\n *\n * Policies are simple functions which run before your controllers.\n * You can apply one or more policies to a given controller, or protect\n * its actions individually.\n *\n * Any policy file (e.g. `api/p...
javascript
edit
0
0
mit
359d3d1d0a9b8fe0fa42e51355eea8f3bf03ffdd
italoag/generator-sails-rest-api,IncoCode/generator-sails-rest-api,konstantinzolotarev/generator-trails,mhipo1364/generator-sails-rest-api,tnunes/generator-trails,synergycns/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,eithewliter5518/gene...
generators/app/templates/config/policies.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n\n // when page loads plane flys in from the right of the page and then images will appear in the windows\n\n //top right corner of the image going to be x, y 0\n})\n```\n\nApply this change: Add flyin t...
javascript
edit
0
1
mit
7879b6142d4d5fecaf157d2f92c3d202f4386ddd
jjparseghian/where_to,jjparseghian/where_to,jjparseghian/where_to
app/assets/javascripts/index_page_transition.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * Copyright (c) 2016, Tidepool Project\n *\n * This program is free software; you can redistribute it and/or modify it under\n * the terms of the associated License, which is identical to the BSD 2-Clause\n * License as publishe...
javascript
edit
0
1
bsd-2-clause
78d87606f8d6d6e281dda164b8668a9dde220ee3
hichameyessou/blip,tidepool-org/blip,hichameyessou/blip,hichameyessou/blip,tidepool-org/blip,tidepool-org/blip
app/components/uploaderbutton/uploaderbutton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n root: true,\n parser: 'babel-eslint',\n parserOptions: {\n sourceType: 'module'\n },\n extends: 'airbnb-base',\n // required to lint *.vue files\n plugins: [\n 'html'\n ],\n // check if imports actual...
javascript
edit
0
0
mit
23799b0f92899debb4b4ac5391af6e36014c2f86
jetpacker/jetpacker-ui,jetpacker/jetpacker-ui
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst config = require('config')\n\nconst logAPI = module.exports = {}\n\nlogAPI.get = function *() {\n var token\n\n // TODO: Add support for session cookie authentication.\n\n token = this.token\n\n // Check necess...
javascript
edit
0
5
mit
d988506661382ce33bbfb573f3d3219e2ec5dacb
teambition/loghub-core
api/log.js
accepted
null
true