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\ndefine(function() {\n\n 'use strict';\n \n var _PARENT = Symbol('parent');\n var _SUBITEMS = Symbol('subitems');\n \n function Item() {\n this[_SUBITEMS] = [];\n }\n \n Item.prototype = {\n eventTarget: window,\n dispa...
javascript
edit
0
1
mit
70effd66c4f2fb605c2196e9e972885f0654a947
radishengine/drowsy,radishengine/drowsy
Item.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _$ from 'jquery';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport TestUtils from 'react-addons-test-utils';\nimport jsdom from 'jsdom';\nimport chai, { expect } from 'chai';\nimport chaiJquery from 'chai-jq...
javascript
edit
0
2
mit
d976e01015aea0860393e6da1b1e7c09c2c59952
DeAnnHuang/ReduxSimpleStarter,zivolution921/ReduxSimpleStarter2,carlos-agu/BlogPosts,YacYac/ReduxSimpleStarter,sebasj/udemy-react-redux-blog,Bojan17/weatherApp,roelver/twotter,robertorb21/ReduxSimpleStarter,erlinis/ReduxSimpleStarter,josephcode773/reactYoutubeViewer,paulofabiano/react-redux-blog,allenyin55/reading_with...
test/test_helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar RSVP = require('rsvp')\nvar temp = require('temp')\ntemp.track()\n\nvar helpers = require('./helpers')\n\n\nexports.MergedTree = MergedTree\nfunction MergedTree (trees) {\n this._trees = trees\n}\n\nMergedTree.prototype.read = func...
javascript
edit
0
2
mit
aa18c9ab391d8549e4b50f4009325fbd56074c48
broccolijs/broccoli,broccolijs/broccoli,gabesoft/broccoli,osxi/broccoli,ixisystems/broccoli,osxi/broccoli,broccolijs/broccoli,osxi/broccoli,jnicklas/broccoli,ember-cli/broccoli,broccolijs/broccoli,gabesoft/broccoli,ixisystems/broccoli,gabesoft/broccoli,ember-cli/broccoli,rwjblue/broccoli,ember-cli/broccoli
lib/merged_tree.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.createBetForm.events({\n \"submit .create-bet\": function(event) {\n var status = \"open\";\n var title = event.target.betTitle.value;\n var wager = event.target.betWager.value;\n var user = Meteor.user();\n\n v...
javascript
edit
0
1
mit
d09efa148aed1a71b1763b91cf55169b679da341
nmmascia/webet,nmmascia/webet
client/templates/create_bet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash'),\n path = require('path');\n\n_.extend(exports, {\n envOverrides: {},\n\n supervisordConfigPath: function() {\n var config = require('api-umbrella-config').global();\n return path.jo...
javascript
edit
0
1
mit
23d53912066877a418ae5f7e9bf9bb49dafb3b61
OdiloOrg/api-umbrella-router,apinf/api-umbrella,apinf/api-umbrella,NREL/api-umbrella,NREL/api-umbrella,apinf/api-umbrella,OdiloOrg/api-umbrella-router,NREL/api-umbrella-router,NREL/api-umbrella-router,NREL/api-umbrella-router,NREL/api-umbrella,OdiloOrg/api-umbrella-router,NREL/api-umbrella,apinf/api-umbrella,apinf/api-...
lib/process_env.js
rejected_duplicate
Near-duplicate of sample 82100
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ReconnectingWebSocket from \"reconnecting-websocket\";\n\nclass SocketService {\n\n constructor($q, $log) {\n \"ngInject\";\n this.socket = null;\n this.$q = $q;\n this.$log = $log;\n this.subscribers = [];\n t...
javascript
edit
0
2
mit
9be6b07906dac571fbeb34c1e054019c392ccc30
yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/karrot-frontend
client/app/services/conversation/socket.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n $(\"td\").dblclick(function() {\n var td = $(this), originalContent = td.text();\n\n td.addClass(\"cellEditing\");\n td.data(\"originalContent\", originalContent);\n var el = document.createElement(\"input\...
javascript
edit
0
2
mit
d64de52e833ababdc322475dd58a2bab8d2594bc
hnakamur/editable_html_table_example
script.js
rejected_duplicate
Near-duplicate of sample 96436
true
[ { "role": "user", "content": "Write javascript code for the following: Update example to great circle" }, { "role": "assistant", "content": "import { greatCircle } from '@turf/turf';\n\ngreatCircle([0, 0], [100, 10]);\n" } ]
javascript
new_file
0
0
mit
f800805be39c8a78e4d53af2749ec0590d58dab2
Turfjs/turf,Turfjs/turf,tilemapjp/turf,tilemapjp/turf,dpmcmlxxvi/turf,tilemapjp/turf,dpmcmlxxvi/turf,Turfjs/turf,dpmcmlxxvi/turf
builds/create-react-app/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport Messages from '../Messages/Messages';\n\nclass Conversation extends React.Component {\n\n constructor(props, context) {\n super(props, context);\n\n this.state = {\n mess...
javascript
edit
0
2
mit
4c927b055f5ea0f1095ed5a6eb68253f0c004733
sevenleaps/chat-template,sevenleaps/chat-template
src/Conversation/Conversation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n // contrib-watch\n watch: {\n all: {\n files: ['src/**/*.js', 'lib/**/*.js', 'test/*...
javascript
edit
0
2
mit
7c38ab1f739e90f79f692b714beb30a86d2b0473
heriwahyudianto/jQuery.countdown,davidBearinTokyo/jQuery.countdown,adrianha/jQuery.countdown,nsekecharles/count-down,fashionsun/jQuery.countdown,shiyamkumar/jQuery.countdown,hilios/jQuery.countdown,baffolobill/jQuery.countdown,tbilous/jQuery.countdown,loki315zx/jQuery.countdown,DigitalCoder/jQuery.countdown,Renji/jQuer...
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nfunction audio(url) {\n return new Audio(url);\n}\n\nconst red = audio(\"https://s3.amazonaws.com/freecodecamp/simonSound1.mp3\");\nconst blue = audio(\"https://s3.amazonaws.com/freecodecamp/simonSound2.mp3\");\ncons...
javascript
edit
0
1
mit
691beb8c766359dd0aa9ab9ecd25d39c2348e99e
arecvlohe/purescript-simon-game,arecvlohe/purescript-simon-game
src/Data/Sounds.js
rejected_duplicate
Near-duplicate of sample 86760
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n\n jshint: {\n files: ['*.js', 'client/app/*.js', 'server/**/*.js', 'database/**/*.js'],\n options: {\n ignores: [\n // (TODO: add lib files here)\n ...
javascript
edit
0
1
mit
5dd53b364029bcd6bed62314686215d8014d89b3
MAKE-SITY/MKSTream,SimonDing87/MKSTream,SimonDing87/MKSTream,MAKE-SITY/MKSTream
Gruntfile.js
rejected_duplicate
Near-duplicate of sample 69427
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('./config.json');\nvar keystone = require('keystone');\n\nkeystone.init({\n\n\t'name': 'anapi',\n\t'brand': 'anapi',\n\n\t'favicon': 'public/favicon.ico',\n\t'view engine': 'jade',\n\n\t'wysiwyg images': true,\n\t'w...
javascript
edit
0
0
mit
34237655119e7df6b5ca58569be9dbc4054b31e0
promethe42/dredd,promethe42/dredd,promethe42/dredd
api/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet gridSize = 32\nlet grid\n\nfunction setup() {\n grid = makeGrid(32, 32)\n createCanvas(512, 512)\n drawGrid()\n}\n\nfunction makeGrid(x, y) {\n let g = new Array(x)\n for (var i = 0; i < g.length; i++) {\n g[i] = new Array(y...
javascript
edit
0
5
apache-2.0
4079167f7e71123383dd9cc1c1df2b50bd64c1aa
hirtiganto/procedural-cats,hirtiganto/procedural-cats
sketch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from \"lodash\";\nimport jQuery from \"jquery\";\nimport moment from \"moment\";\n\nimport DText from \"./dtext.js\";\nimport Tag from \"./tag.js\";\nimport UI from \"./ui.js\";\nimport \"./danbooru-ex.css\";\n\nexport def...
javascript
edit
0
1
mit
7d85fb00fc8219d58b106219013a549595b5170f
evazion/danbooru-ex,evazion/danbooru-ex
src/ex.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Place your application-specific JavaScript functions and classes here\n// This file is automatically included by javascript_include_tag :defaults\n\nprettyPrint();\n\n// Setup judge-table for dataTables\n$(document).ready(function() ...
javascript
edit
0
1
mit
edd3d41a393cc57598f6ab91c992b102d944bd03
kennym/Nejupy-Ruby,kennym/Nejupy-Ruby
public/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = require('app')\nvar dialog = require('dialog')\nvar menu = require('menu')\n\n/*\nBuild the application menu for the current platform.\n*/\nexports.application_menu = function(window) {\n var template = [\n {\n ...
javascript
edit
0
2
mit
95bed5b5f45e77d8de864a2c5e5aa156f2e5a50e
jreese/apollo,jreese/apollo
src/gui.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Select2 Georgian (Kartuli) translation.\n * \n * Author: Dimitri Kurashvili <EMAIL>\n */\n(function ($) {\n \"use strict\";\n\n $.extend($.fn.select2.defaults, {\n formatNoMatches: function () { return \"ვერ მოიძებნ...
javascript
edit
0
1
mit
0505a65fdce11a9ecdcf5e52e50e835e9df7a626
michael-brade/select2,zhangwei900808/select2,chungth/select2,keitler/select2,ZaArsProgger/select2,inway/select2,InteractiveIntelligence/select2,od3n/select2,jlgarciakitmaker/select2,fashionsun/select2,tb/select2,fashionsun/select2,jkgroupe/select2,goodwall/select2,od3n/select2,InteractiveIntelligence/select2,megahallon...
select2_locale_ka.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar wompt = require(\"./includes\"),\n db = wompt.db;\n\nwompt.mongoose.model('User',{\n\n\tcollection : 'users',\n\n\tproperties: [\n\t\t//simple attributes\n\t\t 'name'\n\t\t,'email'\n\t\t,'one_time_token'\n\t\t\n\t\t// embedded do...
javascript
edit
0
0
mit
6357e70e53b0d7709a71c3805c209c1d1727a2e6
Wompt/wompt.com,Wompt/wompt.com,iFixit/wompt.com,iFixit/wompt.com,iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com
nodejs/lib/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Errors = use('core/errors');\n\nconst DefaultProperty = require('./default');\n\n\nclass DateProperty extends DefaultProperty {\n\n constructor() {\n super();\n\n this._addValidator((v...
javascript
edit
0
5
mit
4e7c23e300009f95f61054870ec6748f9946619c
yura-chaikovsky/dominion
core/property/types/date.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = function (grunt) {\n grunt.registerTask(\"make\", [\n \"exec:version\",\n \"check\",\n \"jsdoc:public\",\n \"connectIf\",\n \"concurrent:source\",\n \"exec...
javascript
edit
0
1
mit
414e3b78e9adf2309a4c730c0bd6d85eacec00a7
ArnaudBuchholz/gpf-js,ArnaudBuchholz/gpf-js
grunt/tasks/make.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction confirmEnding(str, target) {\n\n if (str.split(\" \").length > 1){\n var lastChar = str.split(\" \");\n var lastWord = lastChar[lastChar.length - 1];\n\n if (target.length !== lastWord.length){\n console.log(last...
javascript
edit
0
3
mit
83f90ea50b2d8a91b2fe673013b317bb0878bc50
schaui6/geek_out,schaui6/geek_out,schaui6/geek_out
javascript-solutions/confirmEnding.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gulp from 'gulp'\nimport gutil from 'gulp-util'\nimport critical from 'critical'\nimport appPath from '../paths'\n\nexport default () => {\n return gulp\n .src(appPath.allHTML)\n .pipe(\n critical.stream({\n ba...
javascript
edit
0
1
mit
c08098b53f31d2943e8fa3fe2d5b2df9bf589d7d
GA-MO/html-boilerplate,GA-MO/html-boilerplate
scripts/gulpTasks/critical.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Norwegian translation for bootstrap-datepicker\n **/\n;(function($){\n $.fn.datepicker.dates['no'] = {\n days: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],\n daysShort: ['Søn','Man','Tir','Ons','To...
javascript
edit
0
1
apache-2.0
713e1d3126d39c0164ccabc9d2e78e033bdb9bd3
defrian8/bootstrap-datepicker,inspur-tobacco/bootstrap-datepicker,CheapSk8/bootstrap-datepicker,inukshuk/bootstrap-datepicker,stenmuchow/bootstrap-datepicker,keiwerkgvr/bootstrap-datepicker,darluc/bootstrap-datepicker,i-am-kenny/bootstrap-datepicker,vsn4ik/bootstrap-datepicker,HuBandiT/bootstrap-datepicker,wetet2/boots...
js/locales/bootstrap-datepicker.no.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar yeoman = require('yeoman-generator'),\n utils = require('../../utils');\n\nvar LogGenerator = yeoman.generators.Base.extend({\n prompts: require('./prompts'),\n dirs: require('./dirs'),\n s...
javascript
edit
0
1
mit
7cc7d98a62e32097c6cdc87f42ccafc88af5f89b
log-oscon/generator-log-marionette,log-oscon/generator-log-marionette
generators/app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window, document, undefined){\n 'use strict';\n\n var $ = window.jQuery;\n\n function init () {\n\n if ($('#filter-nav').length > 0) {\n return;\n }\n\n var nav = '<div class=\"subnav-links\" id=\"filter-nav\"...
javascript
edit
0
2
mit
51c801cb23e5355431d77a3ab7fa27d4552be616
danielhusar/github-pr-filter
init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { red500 } from 'material-ui/styles/colors';\n\nimport { ListItem } from 'material-ui/List';\nimport Avatar from 'material-ui/Avatar';\n\nclass CastList...
javascript
edit
0
2
mit
2ed56aec9cb6fc35d38abb5d19bb661258ffa57e
tanzdervampire/website,tanzdervampire/website,tdv-casts/website,tdv-casts/website
frontend/src/components/castlist/CastListItem.js
rejected_duplicate
Near-duplicate of sample 73855
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\"\nimport { Label } from \"semantic-ui-react\"\n\nclass ItemStack extends Component {\n\trender() {\n\t\tconst { item } = this.props;\n\n\t\tlet spawn;\n\t\tif (item.id === \"minecraft:spawn_egg\...
javascript
edit
0
4
mit
ff30eac72ce60f0fdfc5fdc0f27f495803b90956
Valandur/admin-panel,Valandur/admin-panel,Valandur/admin-panel,Valandur/admin-panel
src/components/ItemStack/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($) {\n var params = (function() {\n var url_tokens = document.URL.replace(document.baseURI.concat('?'), '').split(/&/g),\n params = {};\n\n for(piece in url_tokens) {\n var slice = url_tokens[piece].split(/=...
javascript
edit
0
2
mit
f0c9841d97c893731ecac31ee7f64a76121317e8
felipeelias/reader_to_plus
javascripts/plus_extension.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* Copyright 2012-2016, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\n'use strict';\n\nvar config = requi...
javascript
edit
0
4
mit
869b155811c173358606136180a8be6e0b639394
asolagmbh/plotly.js,asolagmbh/plotly.js,plotly/plotly.js,aburato/plotly.js,etpinard/plotly.js,iongroup/plotly.js,plotly/plotly.js,aburato/plotly.js,iongroup/plotly.js,plotly/plotly.js,iongroup/plotly.js,asolagmbh/plotly.js,etpinard/plotly.js,etpinard/plotly.js,plotly/plotly.js
src/lib/loggers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/*jshint camelcase: false */\n/*eslint-disable camelcase*/\n\nmodule.exports = {\n options: {\n beautify: {\n keep_quoted_props: true\n }\n },\n buildTests: {\n files: {\n ...
javascript
edit
0
0
mit
883a0150d904ab3ee35dad8dba50db3c027f8664
ArnaudBuchholz/gpf-js,ArnaudBuchholz/gpf-js
grunt/uglify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction FayeAuthentication(endpoint) {\n this._endpoint = endpoint || '/faye/auth';\n}\n\nFayeAuthentication.prototype.endpoint = function() {\n return (this._endpoint);\n};\n\nFayeAuthentication.prototype.outgoing = function(message...
javascript
edit
0
3
mit
a4a64031f9b9a7815fa363b98a462c202f19adf2
dimelo/faye-authentication,dimelo/faye-authentication
vendor/assets/javascripts/faye-authentication.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Language: Backus–Naur Form\n Author: Oleg Efimov <<EMAIL>>\n */\n\nfunction(hljs){\n return {\n contains: [\n // Attribute\n {\n className: 'attribute',\n begin: /</,\n end: />/,\n excludeB...
javascript
edit
0
1
bsd-3-clause
7512e265924a029d9345c6127cc9909e1d56f7e4
carlokok/highlight.js,aurusov/highlight.js,palmin/highlight.js,sourrust/highlight.js,highlightjs/highlight.js,palmin/highlight.js,teambition/highlight.js,MakeNowJust/highlight.js,carlokok/highlight.js,highlightjs/highlight.js,Sannis/highlight.js,highlightjs/highlight.js,isagalaev/highlight.js,bluepichu/highlight.js,San...
src/languages/bnf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst dotenv = require('dotenv');\n\ndotenv.config();\n\nmodule.exports = {\n development: {\n username: 'Newman',\n password: 'andela2017',\n database: 'postit-db-dev',\n host: '127.0.0.1',\n port: 5432,\n secret_key...
javascript
edit
0
0
mit
67113377f87e986349a3bb2db2ce793708b72bfa
Philipeano/post-it,Philipeano/post-it
server/config/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * This script will fix some counters to be used with Switcher.js.\n */\n\n$(document).on('construct', function () {\n\n // Google Analytics\n\n //noinspection JSUnresolvedVariable\n if (typeof _gaq == 'object' && typeof _...
javascript
edit
0
7
bsd-2-clause
2a995f18c030a34b24c914954b8676da3363cdae
difra-org/difra,difra-org/difra
js/all/counters-support.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Loads specific scripts, depending on the parameters.\n * @class SDK Loader\n * @param {Object} options\n * @param {Integer} [options.kit] Represent the serveral bookmarklet types (default: tricket-print).\n * @param {Integer...
javascript
edit
0
5
mit
5545de89d6076ede3184b1af9e39d6efe37befa5
xing/jira-bookmarklets
src/js/sdk/loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar jscs = require('gulp-jscs');\nvar log = require('../utils/log');\n\nmodule.exports = function(gulp, options) {\n var config = require('../config')[options.key || 'jscs'];\n\n return task;\n\n function task() {\n ...
javascript
edit
0
2
apache-2.0
8abe4d57e0832fe95f96e120be36bac41661c0b6
AllenBW/api,mafernando/api,boozallen/projectjellyfish,mafernando/api,boozallen/projectjellyfish,sonejah21/api,projectjellyfish/api,AllenBW/api,stackus/api,boozallen/projectjellyfish,sreekantch/JellyFish,sonejah21/api,AllenBW/api,boozallen/projectjellyfish,projectjellyfish/api,stackus/api,stackus/api,sonejah21/api,sreek...
gulp/tasks/jscs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chokidar = require(\"chokidar\");\nconst log = require(\"./services/logger.service\");\nconst FileIndex = require(\"./util/fileIndex\");\nconst FileRecognizer = require(\"./util/fileRecognizer\");\nconst options = require(\"./util...
javascript
edit
0
1
mit
30d2f21ea117f69c991b90d3e3a5261d2febe6ea
viaacode/node_watchfolder,viaacode/node_watchfolder
src/watchfolder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mongoose from 'mongoose'\nimport bcrypt from 'bcrypt'\n\nconst User = new mongoose.Schema({\n type: { type: String, default: 'User' },\n name: { type: String },\n username: { type: String, required: true, unique: true },\n pa...
javascript
edit
0
2
mit
bffdd3255081313c0b7a4a3c271b2a5c4964185b
adrianObel/koa2-api-boilerplate
src/models/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global exports: true, require: true */\n/*jslint onevar: true, undef: true, nomen: true, eqeqeq: true, bitwise: true, newcap: true, immed: true */\nvar path = require('path'),\n\n compressor = require('solder/compressor');\n\nfunct...
javascript
edit
0
3
mit
06ec07f55641de903a64ae915762064fb3016d26
brettstimmerman/solder
lib/solder/compressor/closure.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet traps = [];\n\nconst React = require('react');\nconst FocusTrap = require('focus-trap-react');\n\n/**\n * MXFocusTrap\n *\n * Why is this needed?\n *\n * FocusTrap does not un-pause the previous trap when the current trap is unmount...
javascript
edit
0
2
mit
6ef94a819245ecf3ebd9038fe964484d5c6366a2
mxenabled/mx-react-components
src/components/MXFocusTrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Modify Draggable to ignore shift key. \nL.Draggable.prototype._onDown = function(e) {\n this._moved = false;\n\n if ((e.which !== 1) && (e.button !== 1) && !e.touches) { return; }\n\n L.DomEvent.stopPropagation(e);\n\n if (L.Drag...
javascript
edit
0
7
isc
01de0fca8c10b4fcf936f54395b495a736513008
gregoryjscott/transitmix,gregoryjscott/transitmix,gregoryjscott/transitmix
public/js/patches.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nL.CRS.proj4js = (function () {\r\n\tvar createProjection = function (code, def, /*L.Transformation*/ transformation) {\r\n\t\tif (typeof(def) !== 'undefined') {\r\n\t\t\tProj4js.defs[code] = def;\r\n\t\t}\r\n\t\tvar proj = new Proj4js.P...
javascript
edit
0
2
bsd-2-clause
7fa04c7f763c76177a0c39c0151822fa19136960
kartena/Proj4Leaflet,kartena/Proj4Leaflet,kartena/Proj4Leaflet,azavea/Proj4Leaflet,emacgillavry/Proj4Leaflet,perliedman/Proj4Leaflet,SeaAroundUs/Proj4Leaflet,semone/Proj4Leaflet,perliedman/Proj4Leaflet,SeaAroundUs/Proj4Leaflet,emacgillavry/Proj4Leaflet,semone/Proj4Leaflet
src/proj4leaflet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Registration record for a dependency\n */\nclass RegistrationRecord {\n /**\n * Initialize a new registration record\n * @param {object} details - Registration details\n */\n constructor(det...
javascript
edit
0
5
mit
7838950f5aa2c97555d60dd704466d0a26d84d04
steve-gray/somersault
lib/registration-record.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction parseQueryParamAsArray(p) {\n return function parseQueryParameter(q) {\n var query = {};\n query[p] = q[p].split(',');\n\n return query;\n };\n}\n\nmodule.exports = parseQueryParamAsArray;\n\n```\n\n...
javascript
edit
0
3
isc
fb491087b9a8771c8b45d441f5185036ee5adf6e
francisbrito/node-restful-qs
lib/parsers/as-array.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar registryUrl = require('registry-url')\nvar request = require('superagent')\nvar url = require('url')\nvar parsePackage = require('./parse-package')\n\nmodule.exports = registryPackage\n\nfunction registryPackage(name, opts, callback...
javascript
edit
0
2
isc
0cf5fd7e04e03aeb7b3744a4fb411a1a90b948e8
jesseditson/npm-package
lib/registry-package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar _readFile = require('../utils/readFile');\n\nfunction resolve(filepath) {\n return path.resolve(this.source.absolutePath, filepath);\n}\n\nfunction addDependency(filepath) {\n this.compilation.fileDepe...
javascript
edit
0
1
mit
0f8c435e05a18bca8d2456a3065ceac19d755564
kisenka/webpack-docs-plugin,kisenka/docpack
lib/processing/extractDocs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport devtools from '../devtools';\nimport { REALLY_BIG_NUMBER } from '../utils';\nimport { load } from '../save';\n\nimport merge from 'deepmerge';\n\nimport PineCone from '../sprites/object/PineCone';\n\nconst itemMax = 500;\n\nconst...
javascript
edit
0
0
mit
1b5c7392413d3976849357bcf31c0efee439fdf2
ThomasMays/incremental-forest,ThomasMays/incremental-forest
src/game-data/player-items.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Use full path for import" }, { "role": "assistant", "content": "define(['mac/resources/open_wctb'], function(open_wctb) {\n return open_wctb;\n});\n" } ]
javascript
new_file
0
1
mit
e964bef212c5655415f67435c3e1e76e9feb262e
radishengine/drowsy,radishengine/drowsy
mac/resources/open_dctb.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst pnut = require('pnut-butter')\n\nmodule.exports = async ctx => {\n const { method, state, params, query, request } = ctx\n if (state.user) {\n pnut.token = state.user.token\n const resource = `/${params[0]}`\n const bod...
javascript
edit
0
6
mit
39f28d7211baf8855dc1b6e4b07e964c5890ead7
sunya9/beta,sunya9/beta,sunya9/beta
lib/routes/proxy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Enzyme = require('enzyme');\nconst EnzymeAdapter = require('enzyme-adapter-react-16');\n\n// Setup enzyme's react adapter\nEnzyme.configure({ adapter: new EnzymeAdapter() });\n\n```\n\nApply this change: Watch the console and thro...
javascript
edit
0
2
mit
9973e7b429181855d1b50b328b9283e1bb0649ad
rscnt/material-ui,mbrookes/material-ui,rscnt/material-ui,mbrookes/material-ui,dmtrKovalenko/material-ui-pickers,callemall/material-ui,mui-org/material-ui,oliviertassinari/material-ui,rscnt/material-ui,callemall/material-ui,mui-org/material-ui,oliviertassinari/material-ui,callemall/material-ui,mbrookes/material-ui,mui-o...
lib/src/__tests__/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport EventEmitter from 'events';\n\nexport default class TimeEmitter extends EventEmitter {\n constructor(dayTime, nightTime) {\n let curTime = new Date();\n let msToDay = Math.abs(curTime - dayTime);\n let m...
javascript
edit
0
3
mit
0295ac003ae02300ebc3069e6141e6610c919d93
tylerFowler/atom-midnight-oil
lib/timeEmitter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction requiresLogin(req, res, next) {\n if (!req.session.account) {\n return res.redirect('/');\n }\n\n next();\n}\n\nfunction requiresLogout(req, res, next) {\n if (req.session.account) {\n return res.redirect('/maker');\n...
javascript
edit
0
2
apache-2.0
e705353443991aa012c7fbd03dc229fcd3849f9b
cognettings/nefarious-octo-prune,cognettings/nefarious-octo-prune
src/middleware/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n \n 'use strict';\n \n return function(item) {\n return item.getBytes().then(function(bytes) {\n var dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n if (dv.getUint32(0, false)...
javascript
edit
0
5
mit
734bfc1fb7ef9202294bba5058ea7102dd103e74
radishengine/drowsy,radishengine/drowsy
mac/resources/open_VWSC.js
rejected_duplicate
Near-duplicate of sample 70726
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = async function listApisAction(args, context) {\n const {apiClient, output} = context\n\n const client = apiClient({\n requireUser: true,\n requireProject: true\n })\n\n let endpoints\n try {\n endpoints = ...
javascript
edit
0
5
mit
7a27fe459a306be837be6d935cd72802570906d5
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/core/src/actions/graphql/listApisAction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component, PropTypes} from \"react\";\nimport {Route} from \"react-router\";\nimport PhenomicPageContainer from \"phenomic/lib/PageContainer\";\nimport LayoutContainer from \"../LayoutContainer\";\nimport OptimisationCont...
javascript
edit
0
3
mit
0b9c80cdd50a78a8008aa1152b3dc8c35ff4e2cf
ben-eb/cssnano
docs/web_modules/app/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { documentHelpers } from '../model'\nimport ApiExtension from './ApiExtension'\n\nexport default class ReferenceApi extends ApiExtension {\n /**\n * @param {object} data from ReferenceModal state\n */\n addReference (data) ...
javascript
edit
0
2
mit
c32b4dbb1bee1b04606310d89caa229d7e67d80f
substance/substance,substance/substance,michael/substance-1,michael/substance-1
commons/ReferenceApi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst tjbot = require('./tjbotlib');\nconst config = require('./config/configs');\n\nconst credentials = config.credentials;\nconst WORKSPACEID = config.conversationWorkspaceId;\n\nconst hardware = ['microphone', 'speaker'];\n\nconst co...
javascript
edit
0
2
apache-2.0
f1686d6d96342e967aca7e97ddba34b306d18391
Halfeld/sarah,Halfeld/sarah
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\r\nrequire('./projectModel');\r\n\r\nvar AkamaiSchema = new mongoose.Schema({\r\n\tDay : { type: String, index: true},\r\n\tURL: String,\r\n\tCompleted : Number,\r\n\tInitiated : String,\r\n\tEDGE_VOL...
javascript
edit
0
0
apache-2.0
353e4ab7978ec1359b275f7a2cae8c019a2e66b9
fengchao/monitorNode,fengchao/monitorNode
models/AkamaiLogData.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\n\nimport { getDescriptionAndTags } from '../helpers';\n\nclass AddActivityForm extends Component {\n createActivity(e) {\n e.preventDefault();\n const { description, tags } = ...
javascript
edit
0
2
mit
786ff41eb0c7e26ea396e4cde7ec3d3f9155f63f
mknudsen01/today,mknudsen01/today
src/components/AddActivityForm.js
rejected_duplicate
Near-duplicate of sample 95827
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngInject\n */\nvar DatasetEditController = function ($scope, $controller, $routeParams, Dataset) {\n\n // EditController -> NpolarEditController\n $controller('NpolarEditController', { $scope: $scope });\n \...
javascript
edit
0
1
mit
ae0dc74d33708c76ac88fc8f0f492ac14759cae7
npolar/npdc-dataset,npolar/npdc-dataset
src/edit/DatasetEditController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"About Maps\", function () {\n\n describe(\"Basic Usage\", function () {\n\n it(\"should understand they are key, value stores\", function () {\n var trooper = new Map();\n\n trooper.set('name', 'Stormtrooper');\...
javascript
edit
0
1
mit
8f01f37070614ceeed74ae94ef7eecbd89f8c56b
tawashley/es6-javascript-koans,tawashley/es6-javascript-koans,tawashley/es6-javascript-koans
koans/AboutMaps.js
rejected_duplicate
Near-duplicate of sample 70574
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * 403 Forbidden Network Error Interceptor\n *\n * This interceptor redirects to login page when\n * any 403 session expired error is returned in any of the\n * network requests\n */\n\nvar LOGIN_ROUTE = '/login';\nvar SESSION_EXPI...
javascript
edit
0
4
bsd-3-clause
e158a96b8e64b91e0f4e5c30d0c354e92cbea629
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
lib/assets/javascripts/builder/data/backbone/network-interceptors/interceptors/forbidden-403.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n define(\n [\n 'lodash',\n 'knockout'\n ],\n function (_, ko) {\n var AVAILABLE_MODES = [ 'List', 'Thumbnails', 'Table' ];\n\n retu...
javascript
edit
0
2
mit
452bddcbb7e93071bb8a2926743b26817ccfc80b
rwahs/research-frontend,rwahs/research-frontend
public/app/models/ListModeSwitcher.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('shipyard')\n .config(getRoutes);\n\n getRoutes.$inject = ['$stateProvider', '$urlRouterProvider'];\n\n function getRoutes($stateProvider, $urlRouterProvider)...
javascript
edit
0
1
apache-2.0
db8c9e4daf185faba078b85a084e8ffa30e31c0f
dockerclubgroup/shipyard,daququ/shipyard,RustJason/shipyard,jsyinwenjun/shipyard,wujingke/shipyard,scapewang/shipyard,vanloswang/shipyard,zhiwei55/shipyard,dockerclubgroup/shipyard,linecheng/shipyard,ehazlett/shipyard,daququ/shipyard,wujingke/shipyard,dockerclubgroup/shipyard,wujingke/shipyard,linecheng/shipyard,linech...
controller/static/app/config.routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar https = require('https');\nvar url = require('url');\nvar crypto = require('crypto');\n\nvar DOMAIN_MAP = {\n\tapi : 'https://api.facebook.com/',\n\tapiVideo : 'https://api-video.facebook.com/',\n\tapiRead : 'https://api-read.facebo...
javascript
edit
0
0
mit
9cce4a63966515ae814129152bec3b95a883609b
suppenkelch/facebook-nodejs,vanng822/facebook-nodejs
lib/facebook.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nModule.register(\"recognizer\",{\n start() {\n console.log(\"Recognizer started\");\n this.sendSocketNotification(\"RECOGNIZER_STARTUP\");\n return;\n },\n\n socketNotificationReceived: function(notification) {\n console....
javascript
edit
0
3
mit
08aed6cc61b49921ce4d6438c77744af47ee6f82
OniDotun123/MirrorMirror,OniDotun123/MirrorMirror,OniDotun123/MirrorMirror
modules/recognizer/recognizer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\nvar _ = require('underscore')\n\n/**\n * Given a maze, position to start at, and a visited set, apply a randomized\n * depth-first-search algorithm to the maze.\n *\n * @param {type} maze Maze to apply the random dfs algor...
javascript
edit
0
2
mit
164ced5c70d40f2688ebb0759a9446d349eac953
GunshipPenguin/mazegame,GunshipPenguin/corridors.io,GunshipPenguin/corridors.io,GunshipPenguin/mazegame
js/maze_generators/random-dfs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from 'fs'\nimport { join } from 'path'\n\nconst templatesDir = join(__dirname, '..', 'templates')\n\nconst readFile = async (file) => {\n return new Promise((resolve, reject) => {\n fs.readFile(file, 'utf8', (err, text) =>...
javascript
edit
0
3
mit
d2982902669ecfa0ec4603886d09b2f05c0338c0
ahmed-taj/handy-gi
lib/generate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports = module.exports = function(registry) {\n var api = {};\n \n api.resolve = function(type, domain, rrtype, cb) {\n registry.resolve(type, domain, rrtype, function(err, records) {\n cb(err, records);\n });\n };\n \...
javascript
edit
0
1
mit
d806075e5c218d76365318cab552a6577eea7ba9
bixbyjs/bixby-sd
app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { ReducerRegistry } from '../base/redux';\n\nimport { LARGE_VIDEO_PARTICIPANT_CHANGED } from './actionTypes';\n\nconst INITIAL_STATE = {\n participantId: undefined\n};\n\nReducerRegistry.register('features/largeVideo',\n (s...
javascript
edit
0
5
apache-2.0
532ad5dfc0641ce599df3f6989cb201229149780
jitsi/jitsi-meet-react,jitsi/jitsi-meet-react,jitsi/jitsi-meet-react,jitsi/jitsi-meet-react
features/largeVideo/reducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require(\"chai\").assert;\nvar Init = require(\"../lib/init\");\nvar fs = require(\"fs\");\nvar path = require('path');\n\ndescribe('init', function() {\n var config;\n\n before(\"Create a sandbox\", function(done) {\n ...
javascript
edit
0
2
mit
d5bb4da1c35b34d91087640e36f97bf750f31567
ConsenSys/truffle
packages/truffle-core/test/init.js
rejected_duplicate
Near-duplicate of sample 78462
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar os = require( \"os\" );\nvar throng = require( \"throng\" );\nvar connections = require( \"./shared/connections\" );\nvar utils = require( \"./shared/utils\" );\n\n\nvar logger = connections.logger( [ \"Pi-System-RPC-Service\" ] );\...
javascript
edit
0
2
mit
ac99d53daf057cd68775426fc616125e5b133852
projectweekend/Pi-System-RPC-Service
app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'extensions/views/graph/graph',\n 'extensions/views/graph/linelabel'\n],\nfunction (Graph, LineLabel) {\n var LineGraph = Graph.extend({\n\n components: function () {\n var labelComponent, labelOptions, yAxisOption...
javascript
edit
0
2
mit
ee5d8bc2469580a78430a3340fa6f19e05d81e35
alphagov/spotlight,alphagov/spotlight,tijmenb/spotlight,alphagov/spotlight,keithiopia/spotlight,keithiopia/spotlight,tijmenb/spotlight,keithiopia/spotlight,tijmenb/spotlight
app/common/views/visualisations/line-graph.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar r = require('rethinkdb');\n\n// Number of seconds after which Reddit will archive an article\n// (180 days): https://github.com/reddit/reddit/commit/b7b24d2e9fa06ba37ea78e0275dce86d95158e64\nvar archiveLimit = 180 * 24 * 60 * 60;\n\...
javascript
edit
0
1
mit
3645325b9d0d353e21040ea5039889e6313070a6
stuartpb/QIKlaxonBot,stuartpb/QIKlaxonBot
lib/bot/queries.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n'use strict';\n\nvar glob = require('glob'),\n _ = require('underscore'),\n ParallelExec = require('./lib/ParallelExec'),\n BehatTask = require('./lib/BehatTask'),\n defaults = {\n src: './**/*.feature',\n bi...
javascript
edit
0
2
mit
e6d74d537139c3896aa5a61921bdf4ce80e20c8c
linusnorton/grunt-parallel-behat
tasks/parallel-behat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Thank with Google Settings Form component.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with t...
javascript
edit
0
1
apache-2.0
881132dc2eaf7d63bbfaf4e38c1d863224f0ce2e
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/modules/thank-with-google/components/settings/SettingsForm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Treasure Client Loader\n */\n\n// Modules\nvar _ = require('./utils/lodash')\n\n// Helpers\nfunction applyToClient (client, method) {\n var _method = '_' + method\n if (client[_method]) {\n var arr = client[_method] || []\n...
javascript
edit
0
4
apache-2.0
1e4ace613d24a63414f6ffaa11db3e3c162ae4fc
treasure-data/td-js-sdk,treasure-data/td-js-sdk
lib/loadClients.js
rejected_duplicate
Near-duplicate of sample 94393
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport {\n SearchBar,\n} from 'react-native-elements';\n\nexport default class RepoSearchBar extends Component {\n constructor(props) {\n super(props)\n this.handleChange = this.handleC...
javascript
edit
0
1
mit
253c99b263c130b1183e3595a7c86f7f27dfbd9e
msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects
app/scenes/SearchScreen/components/RepoSearchBar/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport counterReducer from '../reducers/counterReducer';\nimport simpleActionCreator from '../actions/simpleActionCreators';\n\nfunction createStore( reducer, initialState ) {\n let state = initialState;\n let sub...
javascript
edit
0
1
bsd-3-clause
6da312036cd3f10efae60858de8e4be5f5e16439
philgs/redux-games-testbed,philgs/redux-games-testbed
simple-redux/src/store/simpleStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar PerfTestFramework = require('../../../TestServer/PerfTestFramework.js');\nvar TestDevice = require('../../../TestServer/TestDevice.js');\nvar tape = require('../lib/thali-tape');\n\nvar test = tape({\n setup: funct...
javascript
edit
0
1
mit
f6345efce653ef6ec49dd51b66e3b95d3f99601d
thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin
test/www/jxcore/meta_tests/testPerfTestFramework.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$( document ).on('turbolinks:load', function() {\n $('.modal-trigger').on('click',function(){\n debugger\n $('#modal1').modal();\n })\n})\n```\n\nApply this change: Remove the dubagger from the file" }, { "role": "assist...
javascript
edit
0
1
mit
433e4b2b907f4521a679e455ca961517042c9553
husseinmaad/open-div,husseinmaad/open-div,husseinmaad/open-div
app/assets/javascripts/company.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Module dependencies.\n */\n\nvar Promise = require('bluebird');\nvar path = require('path');\nvar _ = require('lodash');\n\nvar utils = require('../../../utils');\n\n/*\n * Export the p...
javascript
edit
0
2
mit
18c73efa62c0d4bd74a67f2a1b15eb73aab7ac70
frctl/fractal,frctl/fractal
src/services/server/handlers/pages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\nvar util = require('util');\n\nvar validateDeprecation = function(value, expectation, options) {\n if (!options.deprecated) {\n return;\n }\n\n var valid = (value instanceof options.dep...
javascript
edit
0
8
mit
fbe9503ca48d64f96d7a16bee9eede329d204617
IrfanBaqui/sequelize
lib/utils/parameter-validator.js
rejected_duplicate
Near-duplicate of sample 88888
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar keystone = require('keystone'),\n\tTypes = keystone.Field.Types;\n\nvar Station = new keystone.List('Station', {\n\tautokey: { from: 'name', path: 'key' }\n});\n\nStation.add({\n\tname: { type: String, default: Date.now },\n\tlocati...
javascript
edit
0
0
mit
a283345cfd54ad7ce77734814c57019d1b653880
JedWatson/sydney-mongodb-meetup,JedWatson/sydney-mongodb-meetup
models/stations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function (require) {\n\t\n\t// Dependencies\n\tvar $ = require('jquery')\n\t\t, _ = require('lodash')\n\t\t, Backbone = require('backbone')\n\t;\n\t\n\t/**\n\t * Setup view \n\t */\n\tvar View = {};\n\tView.initialize = function(...
javascript
edit
0
1
mit
ed7de25c2763b36b0bc0460bc977ebbd8af7001a
BKWLD/decoy,BKWLD/decoy,SomosAMambo/decoy,SomosAMambo/decoy,SomosAMambo/decoy,BKWLD/decoy
public/js/views/admin-permissions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nconst fs = require(\"fs\");\n\nconst prettyDate = function(date) {\n\tconst months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n\t\t\"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\n\treturn months[...
javascript
edit
0
2
mit
5f31902f99ecb9729ddea428734ebaae703c8a62
thelounge/lounge-bot
util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//noinspection JSUnusedAssignment\ndashlight.widgets = (function (module) {\n\n module.build_status = (function () {\n var build = function (content) {\n var text;\n var textDuration;\n var min...
javascript
edit
0
4
mit
e44066159c5abe2419fe06d8bf7fe740dc4df3b5
niteshpatel/dashlight,niteshpatel/dashlight
source/js/src/widgets/build_status.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function rocketbelt(window, document) {\n window.rb = window.rb || {};\n\n window.rb.getShortId = function getShortId() {\n // Break the id into 2 parts to provide enough bits to the random number.\n // This should be unique up...
javascript
edit
0
4
mit
2c5701a7651548d9b3aaf3864ebc2f65e3e58cb1
Pier1/rocketbelt,Pier1/rocketbelt
rocketbelt/base/rocketbelt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule(\"About Strings (topics/about_strings.js)\");\n\ntest(\"delimiters\", function() {\n var singleQuotedString = 'apple';\n var doubleQuotedString = \"apple\";\n equal(__, singleQuotedString === doubleQuotedString, 'are t...
javascript
edit
0
1
mit
94f60ccc0a9440555da176d4a6f809c00ed87a9e
supportbeam/javascript_koans,supportbeam/javascript_koans
topics/about_strings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar data = require('../../../data/titles');\nvar search = require('../../../data/search');\n\n// Use this space to insert any prototype specific entries onto the available\n// set of data.\n// For example:\ndata.push({\n data: {},\n t...
javascript
edit
0
1
mit
5210a66069d18c880b7fc67f959b55fe17e63a9f
LandRegistry/find-property-information-prototype,LandRegistry/find-property-information-prototype
app/views/private-beta-01/data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar LocationMap = {\n 'initialize': function initialize() {\n // Map centered in NowSecure HQ by default\n this.map = L.map('map').setView([40.2001925,-89.0876265], 3);\n this.markerCluster = L.markerClusterGroup();\n\n L.t...
javascript
edit
0
2
mit
a816f7795e74711bb14829ef36c585250b44391a
jcollado/pic2map,jcollado/pic2map,jcollado/pic2map
pic2map/server/static/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _ = {\n pick: require('lodash.pick'),\n};\nconst express = require('express');\nconst fs = require('fs');\nconst path = require('path');\n\nmodule.exports = () => {\n const router = new express.Router();\n const version = requi...
javascript
edit
0
3
mit
eab5f9ad205fcbcb2c0be1c39c58bf4ccb3d7beb
maxdome/maxdome-node,maxdome/maxdome-node
packages/info/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cozydb from 'cozydb';\nimport invariant from 'invariant';\nimport logger from 'debug';\nimport hasValue from '../hasValue';\n\nconst debug = logger('app:model:favorite_tag');\n\nconst FavoriteTag = cozydb.getModel('FavoriteTag', ...
javascript
edit
0
3
mit
2dd44cecf1ae06e8febf33cf036794adee46a090
jsilvestre/tasky,jsilvestre/tasky,jsilvestre/tasky
server/models/favorite_tag.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function (environment) {\n\tvar ENV = {\n\t\tmodulePrefix: \"dummy\",\n\t\tenvironment: environment,\n\t\tbaseURL: \"/\",\n\t\tlocationType: \"auto\",\n\t\tEmberENV: {\n\t\t\tFEATURES: {\n\t\t...
javascript
edit
0
4
mit
82b4beae47585f4ba2927609cd76b144e8a0d535
srsgores/ember-datetime,srsgores/ember-datetime
tests/dummy/config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n tags: basic, lines\n<p> This example demonstrates how you can use `elements` to draw lines. </p>\n */\n\nconst regl = require('../regl')()\n\nregl.clear({\n color: [0, 0, 0, 1],\n depth: 1\n})\n\nvar lineWidth = 3\nif (lineWidth...
javascript
edit
0
1
mit
c7cbede3650c23f134096e709135fb32c33ee403
mikolalysenko/regl,mikolalysenko/regl
example/elements.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Backbone from 'backbone';\n\nimport {\n configurationContainer,\n entryTypeEditorControllerUrls,\n failureTracking,\n delayedDestroying,\n ForeignKeySubsetCollection\n} from 'pageflow/editor';\n\nexport const Chapter = Backb...
javascript
edit
0
1
mit
091b146c0b6936f91810ac3f0cb3fa7a356f32fc
codevise/pageflow,tf/pageflow,tf/pageflow,codevise/pageflow,tf/pageflow,codevise/pageflow,codevise/pageflow,tf/pageflow
entry_types/scrolled/package/src/editor/models/Chapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar {JFrame, JButton, ImageIcon, JLabel} = javax.swing;\nvar {setInterval} = require('ringo/scheduler');\nvar n = 0;\n\nfunction main() {\n var frame = new JFrame(\"Swing Demo\");\n var button = new JButton(new ImageIcon(\"img/rin...
javascript
edit
null
null
apache-2.0
06291110313fdba2556a971305066274c936d335
Transcordia/ringojs,ringo/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,oberhamsi/ringojs,ringo/ringojs,ringo/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs
examples/swing.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * External dependencies.\n */\n\nvar Formatter = require('hydro-formatter');\n\n/**\n * Dot formatter.\n *\n * @constructor\n */\n\nvar Dot = Formatter.extend();\n\n/**\n * Before all tests.\n *\n * @param {Array} tests\n * @api p...
javascript
edit
0
3
mit
9f00996ffab1026b46862ad61a772c8c661641fb
hydrojs/dot
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'zepto',\n 'Underscore',\n 'Backbone',\n 'models/expenses',\n 'text!../../tpl/home.html' ],\n function ($, _, Backbone, Expenses, template) {\n var HomeView = Backbone.View.extend({\n\n eve...
javascript
edit
0
1
mit
d889a1500bdf6824a06c00f9a0304ec201be31d0
xebia-france/xndf
public/javascripts/views/home.js
accepted
null
true