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 OBEX_utils = require('./obex_utils'),\n\t sleep = require('./sleep');\n\n(function pollForNewData(){\n\tconst device = OBEX_utils.mount(process.argv[2], \"~/FRC-SCOUT/dev\");\n\t\n\t// READ DATA\n\t\n\tsetTimeout(() => {\n\t\tsle...
javascript
edit
null
null
bsd-2-clause
f21454f66d4e1355d82b2249814f221e9c866129
FRCteam4909/FRC-Scouting,FRCteam4909/FRC-Scouting,FRCteam4909/FRC-Scouting
backend/main.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport protagonist from 'protagonist';\n\nexport default function parseMson(mson, cb) {\n protagonist.parse(mson.trim(), (err, parseResult) => {\n let dataStructureElements;\n\n if (err) {\n return cb(err);\n }\n\n\n d...
javascript
edit
0
7
mit
f96fd6b6d45b20135013e95f1e3386925e844ef6
apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit
playground/parseMson.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar fs = require('fs');\nvar version = JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).version\n\nvar opt = require('optimist')\n .usage('jQuery Builder '+ version +'\\nUsage: $0')\n .opt...
javascript
edit
0
1
mit
dd2450618ad14bac67909be89188f7c37a7842f2
jgallen23/jquery-builder,michael829/jquery-builder,eric-seekas/jquery-builder
bin/builder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = module.exports = require('./config_defaults.js');\n\nconfig.fundraising_file = '/home/ec2-user/tcbr/fundraising-total.txt'\n\n// config.logger.scraper = {\n// \tname: \"pixo-scraper\",\n// streams: [\n// \t {\n// \t ...
javascript
edit
0
0
mit
24bdc1bc52d705e3af3913dd60d207639b696e4b
dancet/tcbr
config_prod.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { expect } from 'chai';\nimport TestUtils from 'react-addons-test-utils';\nimport * as components from 'components';\n\ndescribe('themability', () => {\n Object.keys(components).forEach((key) => {\n ...
javascript
edit
0
1
mit
2b53cc3ebf8fe586518ed06b53ab8442979352b2
voidxnull/ReUI,voidxnull/ReUI
test/themability-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global __dirname */\nrequire('es6-promise').polyfill();\n\nconst path = require('path');\nconst webpack = require('webpack');\n\nconst publicPath = '/static';\n\nmodule.exports = {\n devtool: 'source-map',\n entry: [\n 'webpack-...
javascript
edit
0
0
mit
7ccc2b726bb4f1706b1211d403149cfc8af62c74
zapier/formatic
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Constant declarations for common key values.\n */\n\ngoog.provide('goog.events.Keys');\n\n\n/**\n * Key va...
javascript
edit
0
0
apache-2.0
9b5063c8e34398d7f54728745f703cbdad704327
google/closure-library,google/closure-library,google/closure-library,google/closure-library,google/closure-library
closure/goog/events/keys.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (typeof define !== 'function') { var define = require('amdefine')(module); }\nif (typeof expect !== 'function') { var expect = require('expect.js'); }\n\ndefine([\n 'app/flowControl'\n], function(answers) {\n describe(\"flow contro...
javascript
edit
0
1
mit
54e44aced9db12b6bcf45b5da035cfde2723b495
ballance/csharp-assessment
tests/app/flowControl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = {\n\n entry: [\n 'webpack-dev-server/client?http://localhost:8080',\n 'webpack/hot/...
javascript
edit
0
0
unlicense
33edb26521cbc28175fd8d434c41ca6d22e92758
jhamPac/battle,jhamPac/battle
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { clipboard, ipcRenderer } = require('electron');\nconst beautify_js = require('js-beautify');\nconst lang = require('language-classifier');\n\nipcRenderer.on('shortcut-hit', (event, arg) => {\n console.log(arg);\n})\n\nfunction ...
javascript
edit
0
5
mit
48073c8b1a75aac41c58e83cd627e4be87bdb527
christopherwk210/quick-fix,christopherwk210/quick-fix
src/Renderer/renderer.js
rejected_duplicate
Near-duplicate of sample 73668
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst elements = document.querySelectorAll('bracket-less');\n\n// when paused will collapse text to (...)\n// when playing doesn't cause trouble\n\nfunction toggleCollapse(state) {\n if (state.collapse) { // play -> text collapsed\n ...
javascript
edit
0
2
isc
57cf45b365ebde3721184a0b88f45dfc14add606
mrv1k/bracketless,mrv1k/bracketless
core/src/bg/toggle_collapse.js
rejected_duplicate
Near-duplicate of sample 86985
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { auth0 } from '../../config/secrets';\nimport { homeLocation } from '../../config/env';\n\nconst { clientID, clientSecret, domain } = auth0;\n\nconst successRedirect = `${homeLocation}/welcome`;\nconst failureRedirect = '/signin...
javascript
edit
0
0
bsd-3-clause
0e0bebed4a9f61bc454b91fa6a4fc4d961630393
BhaveshSGupta/FreeCodeCamp,jonathanihm/freeCodeCamp,BhaveshSGupta/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp,raisedadead/FreeCodeCamp,jonathanihm/freeCodeCamp,raisedadead/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp
api-server/server/passport-providers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction StorageManager(storageMethod) {\n this.storageMethod = storageMethod;\n}\n\nStorageManager.prototype.setCurrentLevel = function(level) {\n this.storageMethod.setItem('currentLevel', level);\n};\n\nStorageManager.prototype...
javascript
edit
0
2
mit
8e4f183ea5bdab4235b4f07d6ebcfa5281597fb7
mnito/factors-game,mnito/factors-game
src/Storage/StorageManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport webpack from 'webpack';\n\nconst buildPath = path.resolve(__dirname, 'dist');\nconst clientPath = path.resolve(__dirname, 'src', 'client.js');\n\nconst devPlugins = [\n new webpack.NoErrorsPlugin(),\n ...
javascript
edit
0
0
mit
3ff3576c02e950cf2600731fd43b59a98f9612c6
atSistemas/react-base
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngenotower.geneticAlgorithm = {\n\n evolve : function () {\n genotower.generation.mutateGenome(genotower.towers);\n genotower.generation.mutateGenome(genotower.walls);\n genotower.map.draw();\n console.log(genotowe...
javascript
edit
0
1
mit
a9efa15eee774ed0a4ff3f41a2847891eb6ed1aa
collettiquette/Genotowers,collettiquette/Genotowers
client/assets/ecmaScript/geneticAlgorithm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('mqWebApp').provider('mqWebQueue', {\n\tqmgr : '',\n\t\n\t$get : ['$http', function($http) {\n\t\treturn {\n\t\t\tgetQueueManager : function() {\n\t\t\t\treturn qmgr;\n\t\t\t},\n\t\t\tinquire : function(args) {\n\t\t\t\ti...
javascript
edit
0
0
mit
64037485ce41f1cb653041d07812664f6f7529bf
fbraem/mqweb,fbraem/mqweb,fbraem/mqweb
static/js/app/queue/provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport $ from \"jquery\";\n\nimport * as compose_state from \"./compose_state\";\nimport * as overlays from \"./overlays\";\nimport * as popovers from \"./popovers\";\n\nexport function is_visible() {\n return $(\"#recent_topics_view...
javascript
edit
0
6
apache-2.0
663743261a1168951eca118d1b23db5631d59e73
eeshangarg/zulip,zulip/zulip,punchagan/zulip,rht/zulip,andersk/zulip,andersk/zulip,punchagan/zulip,kou/zulip,rht/zulip,hackerkid/zulip,eeshangarg/zulip,punchagan/zulip,hackerkid/zulip,kou/zulip,hackerkid/zulip,rht/zulip,rht/zulip,punchagan/zulip,punchagan/zulip,hackerkid/zulip,kou/zulip,hackerkid/zulip,eeshangarg/zulip...
static/js/recent_topics_util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fmiRequest = require('../lib/fmiRequest');\n\nconst queryId = 'fmi::forecast::hirlam::surface::point::simple';\nexports.queryId = queryId;\nexports.params = ['place'];\n\nexports.run = function runQuery(place) {\n return fmiReque...
javascript
edit
0
2
mit
34455930677c739f1445b07d4e16a4444d833bf4
mikko/fmi-js,mjpohja/fmi-js,hannupekka/fmi-js,hannupekka/fmi-js,mikko/fmi-js,mjpohja/fmi-js
query/simpleForecast.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * I am working on this\n */\n(function() {\n var test = \"test\",\n test2 = \"test2\";\n\n function log() {\n console.log(test + \" - \" + test2);\n }\n})()\n```\n\nApply this change: Call log() function - te...
javascript
edit
0
1
mit
7bfc3ccb56a331fd1bf86606baddf1ea38f78e4a
m-xristov/opengym,m-xristov/opengym,m-xristov/opengym
assets/js/work2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.directive('pbNotifications', ['Restangular', 'AuthService', 'config', function(Restangular, AuthService, config) {\n return {\n restrict: 'E',\n templateUrl: config.partialsDir + '/broadcast_block.html',\n li...
javascript
edit
0
2
mit
16b323975d353e448a0dea9bc412e68f671a7a24
CSC-IT-Center-for-Science/pouta-blueprints,CSC-IT-Center-for-Science/pouta-blueprints,CSC-IT-Center-for-Science/pouta-blueprints,CSC-IT-Center-for-Science/pouta-blueprints
pouta_blueprints/static/js/directives/NotificationDirective.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = fs || require('fs');\n\nvar getDirRecursiveSync = function(dir, filelist) {\n\n var files = fs.readdirSync(dir);\n filelist = filelist || [];\n var fileLength = files.length;\n for (var i=0; i<fileLength; i++)\n ...
javascript
edit
0
4
mit
93dfd2e4184e43479ba98469ba7cf38ccea17cf0
ErjanGavalji/grunt-multi-dest
test/get-dir-recursive-sync.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst bcrypt = require('bcryptjs')\nconst jwt = require('jsonwebtoken')\n\n/**\n* Checks if the password provided by the user matches the password\n* in the database\n*/\nfunction comparePasswords (reqPass, dbPass) {\n return bcrypt.co...
javascript
edit
0
1
mit
93d54e411bcc3d07dd5f47d08362002e0448d20c
byteBridge/transcriptus-api
utils/authService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport PageTitle from '../components/layout/PageTitle';\n\nconst Documentation = () => {\n\n return (\n <div id='page-content-wrapper'>\n <div class='container-fluid'>\n <div class='...
javascript
edit
null
null
mit
f70d5513858723b2882d00a32370e607bbac7918
txwkx/RDFJS4U,txwkx/RDFJS4U
src/js/pages/Documentation.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar Gravatar = require('react-gravatar');\n\nclass QueueItem extends React.Component{\n render(){\n return (\n <div className='col-sm-12'>\n <div className=\"col-sm-3 pull-left\">\n ...
javascript
edit
null
null
mit
a71e4166fc8a9f8834943ce43074f4504a61d6db
dfala/edq,tylermcginnis/edq,tylermcginnis/edq,dfala/edq
app/components/secure/queue/QueueItem.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Chance.js 0.1\n// http://chancejs.com\n// (c) 2013 Victor Quinn\n// Chance may be freely distributed or modified under the MIT license.\n\n(function () {\n\n var Chance = {\n VERSION: 0.1,\n\n // Building Blocks/...
javascript
edit
0
6
mit
2f7a7933bfaa3b359a9ac166c1d5501bf3304f7e
franciscop/chancejs,AshCoolman/chancejs,lonely8rain/chancejs,chancejs/chancejs,theusualcoder/chancejs,mcanthony/chancejs,edarchis/chancejs,mklaber/chancejs,alexdiliberto/chancejs,victorquinn/chancejs
chance.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport { ErrorPage } from './ErrorPage';\nimport { LoginPage } from './LoginPage';\nimport { App } from './actions';\nimport { Root } from './router';\n\n\n(function () {\n\nif (!history.pushState) {\n return; // see old.js\n}\n\nv...
javascript
edit
0
9
apache-2.0
bfed245fc3c7c17db2baac525ead3dce35bec211
fmfi-svt/votr,fmfi-svt/votr
votrfront/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['backbone.marionette', 'app', 'hbs!../templates/exam'],\n function (Marionette, App, template) {\n 'use strict';\n\n return Marionette.ItemView.extend({\n tagName: 'tr',\n template: template,\n\n events: {\...
javascript
edit
0
1
mit
e2f0cded9527f4962105425fc472970f76e1b222
nusmodifications/nusmods,mauris/nusmods,chunqi/nusmods,mauris/nusmods,nathanajah/nusmods,nathanajah/nusmods,nusmodifications/nusmods,chunqi/nusmods,chunqi/nusmods,chunqi/nusmods,nathanajah/nusmods,Yunheng/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,Yunheng/nusmods,zhouyichen/n...
app/scripts/timetable/views/ExamView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction merge(a, b) {\n var r = {};\n for (var i=0;i<a.length;++i) {\n r[a[i]] = b[i];\n }\n return r;\n}\n\nfunction Houkou(pattern) {\n this.parameters = (pattern.match(/:([a-z_]+)/gi) || []).map(function(p) { return p.substr...
javascript
edit
null
null
bsd-3-clause
b7db30a44a19998f72a352c3f6864c5c4489c2e6
dariocravero/houkou,deoxxa/houkou
houkou.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n MageHero_App.bindUpvote();\n $('table.listing').tablesorter({\n headers: {\n 1: { sorter: false },\n 2: { sorter: false },\n 4: { sorter: false },\n ...
javascript
edit
0
2
mit
4b8b8d4be1faa1830ead934718a4094d06a9dd5c
kalenjordan/magehero,wojtekn/magehero,wojtekn/magehero,wojtekn/magehero,kalenjordan/magehero,kalenjordan/magehero,wojtekn/magehero,kalenjordan/magehero
js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n description: '',\n\n afterInstall: function () {\n return this.addAddonsToProject({\n packages: [\n {name: 'ember-array-helper', target: '^1.0.0'},\n {name: 'ember-cli-d3-shape', target: '0.9...
javascript
edit
0
1
mit
fe8d173437a9dd94c8b8f9bba04e91e4ba1c4771
notmessenger/ember-frost-viz,notmessenger/ember-frost-viz,notmessenger/ember-frost-viz
blueprints/ember-frost-viz/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport default class HireMe extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n if (!this.props.availableForWork) {\n return <p>Sorry, I'm not looking for a ...
javascript
edit
null
null
apache-2.0
e38f41deb31b57df8737d1f93161645e440afbe3
yrezgui/napersona
src/HireMe/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $(window).scroll(function(){\n if ($(this).scrollTop() >= $(\".section-3\").offset().top) {\n $(\".inner-phone\").css(\"background-color\",\"blue\");\n }else if($(this).scrollTop(...
javascript
edit
0
3
mit
06da07ec9a4bf3819fa69d3a8613a5ad6efce2bb
drodriguez56/flashforward,drodriguez56/flashforward
js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport jwt from 'jsonwebtoken';\n/**\n * verifyToken: This verifies all routes that starts with /api\n * It checks if there is token and checks if the token is valid\n * if the token is valid then it decodes it and send to the next...
javascript
edit
0
5
mit
9aa6a7ee31ecfbefc764ad23f0493b2460ed368e
vynessa/dman,vynessa/dman
server/middlewares/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst mockBot = require('../mockBot')\nconst assert = require('assert')\nconst mockery = require('mockery')\n\ndescribe('urban module', function () {\n before(function () {\n // mockery mocks the entire requi...
javascript
edit
0
2
isc
cd73a60de22c7044641f980f86f03beac5c23c3d
zuzakistan/civilservant,zuzakistan/civilservant
test/modules/urban.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('app')\n .run(init);\n\n /** @ngInject */\n function init(gettextCatalog, gettext) {\n // prepend [MISSING] to untranslated strings\n gettextCatalog.debug = false;\n\n get...
javascript
edit
0
2
apache-2.0
2f356c85db60604ac26ccc711f8687b03d91ce83
AllenBW/manageiq-ui-service,dtaylor113/manageiq-ui-self_service,AllenBW/manageiq-ui-service,ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-self_service,ManageIQ/manageiq-ui-service,AllenBW/manageiq-ui-service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-service,ManageIQ/manageiq-ui-self_service,AllenBW/man...
client/app/config/gettext.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React, { Component } from 'react';\nimport ReactCSS from 'reactcss';\n\nimport colors from '../styles/variables/colors';\nimport 'normalize.css';\nimport '../fonts/work-sans/WorkSans.css!';\nimport '../styles/fel...
javascript
edit
0
1
mit
a5c383535c424200fef5a75360a292c3a1e0d8a5
tobycyanide/felony,henryboldi/felony,tobycyanide/felony,henryboldi/felony
src/components/Felony.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Polymer from '../polymer';\nimport hass from '../util/home-assistant-js-instance';\nimport canToggle from '../util/can-toggle';\n\nrequire('../components/ha-card');\nrequire('../components/entity/ha-entity-toggle');\nrequire('../...
javascript
edit
0
5
apache-2.0
4a85f5fa63a1809990b91f77bb64a1fd6a363e04
sdague/home-assistant-polymer,sdague/home-assistant-polymer
src/cards/ha-entities-card.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\n\nimport withTheme from '../hoc/withTheme';\n\nimport Box from '../box';\nimport theme from './theme.css';\n\nclass Loadin...
javascript
edit
0
1
mit
761b68f569ea011b170bc5d3f22c810c9a01a5c9
teamleadercrm/teamleader-ui
components/loadingBar/LoadingBar.js
rejected_duplicate
Near-duplicate of sample 69298
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst app = require('./server.js');\nconst http = require('http');\nconst https = require('https');\nconst port = process.env.PORT || 8080;\nconst httpsPort = process.env.HTTPS_PORT || 8443;\nconst socketio = require('socket.io');\ncons...
javascript
edit
0
1
mit
95239a331bad4fda03aade9c847c3eae232875b6
awaywego/awaywego,awaywego/awaywego
server/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (angular){\n 'use strict';\n\n angular.module('app')\n .controller('counterController', counterController)\n .controller('todoController', todoController)\n\n\n counterController.$inject = []\n todoController.$in...
javascript
edit
0
2
mit
249491be5cc87dc273ae48086b7deccfcbf777fb
haworku/angular-todo,haworku/angular-todo
controllers.js
rejected_duplicate
Near-duplicate of sample 84945
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar Spawner = require(\"./spawner.js\");\n\nvar api = function(server) {\n var options = {};\n var port = 8000;\n if(typeof arguments[1] == \"object\") {\n options = arguments[1];\n port = options.port || por...
javascript
edit
0
7
mit
e2053984d046c8e9b9f50637183ceafa348f0549
rricard/sspawn
lib/sspawn/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst ServerChannel = require('./ServerChannel');\nconst VoiceChannelDataStore = require('./datastore/VoiceChannelDataStore');\n\nclass VoiceChannel extends ServerChannel {\n constructor(guild, data) {\n super(guild, data);\n thi...
javascript
edit
0
1
apache-2.0
75e3ee86fbbc23910f84594909e4a5c7ba10e88d
appellation/discord.js,SpaceEEC/discord.js,devsnek/discord.js,devsnek/discord.js,robflop/discord.js,hydrabolt/discord.js,devsnek/discord.js,CodeMan99/discord.js,Lewdcario/discord.js,hydrabolt/discord.js,zajrik/discord.js,CodeMan99/discord.js,robflop/discord.js,robflop/discord.js,Lewdcario/discord.js,zajrik/discord.js,C...
src/structures/VoiceChannel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore, combineReducers } from 'redux';\nimport header from './header';\nimport device from './device';\n\nconst types = {\n ACTIVE: 'module_active',\n LOGIN: 'app_login'\n};\n\nexport { types }; // MUST put before reduc...
javascript
edit
0
0
mit
4424e10e32d69c3ed93e6b432c6bb1d235ea146f
masogit/dashboard,masogit/dashboard
src/js/reducers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport demoTest from '../../../tests/shared/demoTest';\n\ndemoTest('table', {\n skip: process.env.REACT === '15' ? ['edit-row'] : [],\n});\n\n```\n\nApply this change: :white_check_mark: Fix react-dnd demo broken in react 15" }, { ...
javascript
edit
0
0
mit
a462c2ddf4c9b40b840900735983a111ebfdfd48
icaife/ant-design,ant-design/ant-design,ant-design/ant-design,zheeeng/ant-design,ant-design/ant-design,elevensky/ant-design,zheeeng/ant-design,icaife/ant-design,ant-design/ant-design,elevensky/ant-design,icaife/ant-design,icaife/ant-design,zheeeng/ant-design,elevensky/ant-design,zheeeng/ant-design,elevensky/ant-design
components/table/__tests__/demo.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.c.AdminUserDetail = (function(m, _, c){\n return {\n controller: function(){\n return {\n actions: {\n reset: {\n property: 'user_password',\n ...
javascript
edit
0
2
mit
88df3c35d0a4da35b881d5a5ea57af94aa15f6a4
adrianob/catarse.js,sushant12/catarse.js,catarse/catarse.js,mikesmayer/cs2.js,thiagocatarse/catarse.js,vicnicius/catarse_admin,catarse/catarse_admin,vicnicius/catarse.js
src/c/admin-user-detail.js
rejected_duplicate
Near-duplicate of sample 88181
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar esformatter = require( 'esformatter' );\nesformatter.register( require( '../lib/plugin' ) );\n\nvar fs = require( 'fs' );\nvar path = require( 'path' );\n\nvar files = fs.readdirSync( './entry/' );\n\nfiles.forEach( function ( file ...
javascript
edit
0
2
mit
dcf929552a057c60bb0920db46d828160b0f0255
royriojas/esformatter-jsx
demo/runner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar quantify = require('./quantifier');\nvar _escapeRegExp = require('./escaper').escapeRegExp;\nvar _translate = require('./specialIdentifiers').translate;\n\n\nvar interpret = function(userArguments) {\n switch (userArgumen...
javascript
edit
0
1
mit
36bb25f649ab44c8e48a54ad89a319511eb5999e
oinak/regularity,angelsanz/regularity,oinak/regularity,angelsanz/regularity
lib/constraintInterpreter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar root = require( 'system.global' )(); // eslint-disable-line no-redeclare\n\n\n// MAIN //\n\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nmodule.exports = nodeList;...
javascript
edit
0
0
apache-2.0
ffc41c5707041ec98933457db195b0d073bfaed8
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/utils/type-of/lib/fixtures/nodelist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = async (client, message) => {\r\n if (message === 'shutdown') {\r\n await client.log.info(`Shuting down!${client.shard ? ` | Shard ID: ${client.shard.id}` : ''}`, 'Client')\r\n await client.provider.destroy()\r\n ...
javascript
edit
0
2
mit
99d85fece3091fc62c62834644bcd3072ca3fa95
Aceheliflyer/AceBot,Aceheliflyer/AceBot,Aceheliflyer/Ace-Bot
processEvents/message.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// import libraries\n// react dom and app\n\n\n// reactdom.render(app, document.get by id)\n\nimport ReactDOM from 'react-dom';\nimport App from 'components/app';\n\nReactDOM.render(<App />, document.getElementById('app'));\n```\n\nAppl...
javascript
edit
0
0
mit
a1b3f6e7c5d82b96dd156ddfc04bf9db5fe5dea9
seabassgonzalez/MERN-simple,seabassgonzalez/MERN-simple
client/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar site= '../site'\nvar map= {\n localhost: site\n ,'127.0.0.1': site\n}\nextractHostFromHost= /([^:]+).*/\n\nmodule.exports= function(req) {\n return map[req.headers.host.replace(extractHostFromHost,'$1')]\n}\n\n```\n\nApply this ch...
javascript
edit
0
1
mit
26349e1fd8649f1366066bc2f78d392587f3c238
randymized/malifi
test/fixtures/common/sites.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require(\"fs\");\nvar shasum = require(\"sha1\");\nvar redis = require(\"redis\");\nvar client = redis.createClient();\nvar meatreader = require(\"./lib/readmeats\");\nvar validations = require(\"./val...
javascript
edit
0
3
mit
d46869ee2d75b28f5ceda56562d2834c42ace8cb
jasonrhodes/meatspace-markov-memeify
listen.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar i2c = require('i2c');\nvar _ = require('lodash');\nvar utils = require('./utils');\n\nvar BH1750 = function (opts) {\n this.options = _.extend({}, {\n address: 0x23,\n device: '/dev/i2c-1',\n command: 0x10,\n...
javascript
edit
0
3
mit
f14f1ecb477d177def9a514d722877e23509dd7a
miroRucka/bh1750
bh1750.js
rejected_duplicate
Near-duplicate of sample 71057
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar User = require('../models/user.js');\nvar TwitterStrategy = require('passport-twitter').Strategy;\n\nmodule.exports = function (passport) {\n passport.use(new TwitterStrategy({\n consumerKey: process.env.NMDICO_CONSUMER_KEY,\n...
javascript
edit
0
2
mit
35b5561ad2dde68ef5ee36eb0bd3574a8827b3f2
sungwoncho/nomad-icon,sungwoncho/nomad-icon
config/passport.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add a filter to convert seconds to readable duration" }, { "role": "assistant", "content": "var catalogApp = angular.module('catalogApp', []);\n\ncatalogApp.filter('readableDuration', [function() {\n return function(second...
javascript
new_file
0
1
mit
d731dd8e1c12299c0aa747720c50d0e8a562a318
satbirjhuti/catalogFeed,satbirjhuti/catalogFeed
js/app.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Test book and document imaging standards" }, { "role": "assistant", "content": "/*\n\n This module tests exif metadata against the standards set forth in UT Libraries' digitization standards (https://wiki.lib.utk.edu/pages/vi...
javascript
new_file
0
27
mit
ccc54b8251db7e966f1ea2c43cb2bbb15e1f85ce
utkdigitalinitiatives/ibu,utkdigitalinitiatives/ibu
src/tap/IMGvalidation.js
rejected_complexity
Cyclomatic complexity too high: 27
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n \t\n \t$(\".login_btn\").on(\"click\", function(event){\n \t\t\tevent.preventDefault();\n \t\t\tconsole.log(\"YOU CLICKED\");\n \t\t\t$(\".login_form\").toggle();\n \t});\n\n \t$(\".signup_btn\").on(\"cl...
javascript
edit
0
1
mit
0e97c70caa0def06d3835b3a1ee29c0ffadfc0a8
nyc-squirrels-2015/SkateLyfe,nyc-squirrels-2015/SkateLyfe,nyc-squirrels-2015/SkateLyfe
public/js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// describe('controllers', function(){\n// var scope;\n\n// beforeEach(module('polyflix'));\n\n// beforeEach(inject(function($rootScope) {\n// scope = $rootScope.$new();\n// }));\n\n// it('should define mo...
javascript
edit
0
1
mit
2646397e9d91bc947d34ffe3d4fdfc7e875e301c
ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix,ryanbradynd05/polyflix
client/angular/src/app/factories/tmdb.factory.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('BlueCube.utils', [])\n\n.factory('$localstorage', ['$window', function($window) {\n\treturn {\n\t\tset: function(key, value) {\n\t\t\t$window.localStorage[key] = value;\n\t\t},\n\n\t\tget: function(key, defaultValue) {\n...
javascript
edit
0
2
bsd-3-clause
3cce9904e0e9cee67f6424820b769742beb5930d
neographophobic/BlueCube,neographophobic/BlueCube,neographophobic/BlueCube,neographophobic/BlueCube,neographophobic/BlueCube,neographophobic/BlueCube
www/js/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport SlideList from './components/slideList.js';\n\nfunction start() {\n const isDev = (location.hostname === 'localhost' || location.hostname === '127.0.0.1');\n\n ...
javascript
edit
0
1
mit
4b34eda36770d09f7c50f7acf0be179a96d19dc2
brainly/datacontest,brainly/datacontest
js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * First we will load all of this project's JavaScript dependencies which\n * includes Vue and other libraries. It is a great starting point when\n * building robust, powerful web applications using Vue and Laravel.\n */\n\nrequire...
javascript
edit
0
1
mit
e524763effb091e8b1bd48b1ac890bf7da1578ca
anodyne/aurora,anodyne/aurora,anodyne/aurora
resources/assets/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst path = require('path');\n\n//const serverAddr = 'https://sheffield.spina.me:3002';\n\n/* Defines the application */\nlet app = express();\n\napp.set('port', 3004);\nlet server = app.listen(app....
javascript
edit
0
1
mit
9fc7d4f56d3ba0bcb25108b513140d6cec5c1f4e
RAD-IC/hack-sheffield,RAD-IC/hack-sheffield,RAD-IC/hack-sheffield,RAD-IC/hack-sheffield,RAD-IC/hack-sheffield,RAD-IC/hack-sheffield
arduino_daemon/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar path = require('path');\nvar lib = require('./lib');\nvar Object = require('./object');\n\n// Node <0.7.1 compatibility\nvar existsSync = fs.existsSync ? fs.existsSync : path.existsSync;\n\nvar FileSystemLoa...
javascript
edit
0
5
bsd-2-clause
e95eed4cbda982d01cc59aa811b1e8c07ad280de
atorkhov/nunjucks,carljm/nunjucks,AaronO/nunjucks,kevinschaul/nunjucks,node-modules/nunjucks,carljm/nunjucks,santoshsahoo/nunjucks,AaronO/nunjucks,punkave/nunjucks,rhengles/nunjucks,campbellwmorgan/nunjucks,campbellwmorgan/nunjucks,devoidfury/nunjucks,rhengles/nunjucks,vigetlabs/nunjucks,devoidfury/nunjucks,atorkhov/nu...
src/node-loaders.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\tgetConnection: getConnection\n};\n\nfunction getDbOpts(opts) {\n\topts = opts || {\n\t\thost: 'localhost',\n\t\tdb: 'my-app',\n\t\tport: 27017\n\t};\n\topts.port = opts.port || 27017;\n\treturn opts;\n}\n\nfunction...
javascript
edit
0
3
mit
7755d9aa0f2e319d884c5feae4da388d70d36478
afloyd/mongo-migrate,ITGlobal/mongo-migrate,zhangchiqing/mongo-migrate,tulip/mongo-migrate,TillerHQ/mongo-migrate
lib/db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Grunt configuration\nmodule.exports = {\n autoprefixer: {\n browsers: ['> 1%', 'last 2 versions']\n },\n concat: {\n src: [\n 'node_modules/svg4everybody/dist/svg4everybody.js',\n ...
javascript
edit
0
0
mit
1692dbbfb58350d542701a43725cb7a0c8c642da
yellowled/blog-theme,yellowled/blog-theme
config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar five = require('johnny-five');\nvar ChipIO = require('../index'); // or require('chip-io');\n\nvar board = new five.Board({\n io: new ChipIO()\n});\n\nboard.on('ready', function() {\n // create (analog) sensor on BAT pin\n var ba...
javascript
edit
0
1
mit
c3cbfb4b8bf326ebc94c700f85626ee0a32d4f47
sandeepmistry/node-chip-io
examples/battery-voltage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n// eslint-disable-next-line no-unused-vars\nimport MessageElement from './message'\n// eslint-disable-next-line no-unused-vars\nimport MessageElementLegacy from...
javascript
edit
null
null
mit
38e4543968dc82675fb5e05405c2b41686a82a15
AtomLinter/linter-ui-default,steelbrain/linter-ui-default,steelbrain/linter-ui-default
src/elements/tooltip.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from './Component';\n\nconst type = 'iframe';\n\nexport default Component.extend(\n {\n defaults() {\n return {\n ...Component.prototype.defaults,\n type,\n tagName: type,\n droppabl...
javascript
edit
0
1
bsd-3-clause
7822eb6cc7e9f414d349d7c895669f50817f0ba6
artf/grapesjs,artf/grapesjs,artf/grapesjs
src/dom_components/model/ComponentFrame.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport options from './options';\nimport { defer } from './util';\nimport { renderComponent } from './vdom/component';\n\n/** Managed queue of dirty components to be re-rendered */\n\n// items/itemsOffline swap on each rerender() call (...
javascript
edit
0
5
mit
b1e17045ec6d1fbf41c17c58ed6d22149616a6e3
neeharv/preact,gogoyqj/preact,neeharv/preact,developit/preact,developit/preact
src/render-queue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport Welcome from '@/components/Welcome'\nimport Bundles from '@/components/bundles/Bundles'\nimport BundleItems from '@/components/bundles/BundleItems'\n\nVue.use(Router)\n\nexp...
javascript
edit
0
0
mit
2fb087e02e8197804efb8fab2c23fcfea9bef2cf
kihashi/stardew_community_checklist,kihashi/stardew_community_checklist
src/router/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction InsertionSort (arr) {\n\tvar i,\n\t\tj,\n\t\tlen = arr.length,\n\t\tswap;\n\n\tfor (i = 0; i < len; i++) {\n\t\tfor (j = i; j > 0; j--) {\n\t\t\tif (arr[j] < arr[j - 1]) {\n\t\t\t\tswap = arr[j];\n\t\t\t\tarr[j] = arr[j - 1];\n...
javascript
edit
0
4
mit
57f2172c8d4ae050b30cdc40e22d6ddb8ddaf791
brunocoelho/abstract-data-types
Sorting/insertion_sort.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* eslint no-console: 0, no-process-env: 0 */\n\nvar fs = require('fs');\nvar path = require('path');\n\nvar buildPath = path.join(process.env.ANTITAMPERING_TEST_DIR, 'platforms/ios/build/emulator');\nvar indexAsset = p...
javascript
edit
0
1
mit
eb3247f5cbd5db6520cc04c34b5901f7098e3fed
duddu/cordova-plugin-antitampering,duddu/cordova-plugin-antitampering
tests/tamper/ios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nconst type = {\n base: 'HelveticaNeue',\n bold: 'HelveticaNeue-Bold',\n emphasis: 'HelveticaNeue-Italic'\n}\n\nconst size = {\n h1: 38,\n h2: 34,\n h3: 30,\n h4: 26,\n h5: 20,\n h6: 19,\n input: 18,\n regular: 17,...
javascript
edit
0
0
mit
23e7a16ed7de3598ae386bcea05edce5707c484a
Alabaster-Aardvarks/traveller,Alabaster-Aardvarks/traveller,Alabaster-Aardvarks/traveller,Alabaster-Aardvarks/traveller,Alabaster-Aardvarks/traveller
traveller/App/Themes/Fonts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux'\nimport createSagaMiddleware from 'redux-saga'\nimport { hashHistory } from 'react-router'\nimport { routerMiddleware } from 'react-router-redux'\n\nexport const sagaMiddlewa...
javascript
edit
0
4
mit
6e72f85c334992747c181fbae3f3e375a42e277a
127labs/generator-duxedo,127labs/generator-duxedo
generators/app/templates/src/utils/configure-store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n/**\n * Module dependencies.\n */\nvar init = require('./config/init')(),\n\tconfig = require('./config/config'),\n\tmongoose = require('mongoose'),\n\tchalk = require('chalk');\n\n/**\n * Main application entry file.\n *...
javascript
edit
0
2
mit
460e9cd505027c993e6953f8e1ee1cbedd73d0be
slicedbread/StartHub,slicedbread/StartHub,slicedbread/StartHub,slicedbread/StartHub
server.js
rejected_duplicate
Near-duplicate of sample 77296
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n onPreBuild({ utils: { status: { show } } }) {\n show({ summary: 'Test' })\n }\n}\n\n```\n\nApply this change: Revert \"Revert \"Try child process\"\"\n\nThis reverts commit a192a4830ef8f719bdb6c6692b05ef2295643...
javascript
edit
0
1
apache-2.0
5d90470f6820b2a27a19f50793c2eea6eda1524c
ehmicky/cv-website,ehmicky/cv-website
plugin.js
rejected_duplicate
Near-duplicate of sample 77273
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * TAC Presets: TAC rankings, followed by wins and numgames\n *\n * @return Presets\n * @author Erik E. Lorenz <<EMAIL>>\n * @license MIT License\n * @see LICENSE\n */\n\ndefine(function () {\n var Presets;\n\n Presets = {\n t...
javascript
edit
0
1
mit
8fc15dd494510184dc0bcc7825e0789c6403831b
elor/tuvero
tac/scripts/presets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar helper = require('../helper')\n\nvar Response = function(id, content, error, internal) {\n this.id = parseFloat(id)\n this.content = content\n this.error = error ? true : false\n this.internal = internal ? true : false\n...
javascript
edit
0
6
mit
3649782e8eac4e944184a602190ece69f9aec4d0
yishn/Goban,yishn/Goban,yishn/Sabaki,yishn/Sabaki
modules/gtp/response.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Made without jQuery because arbitrary restrictions\n * are fun. I guess.\n */\nvar butter = (function(){\n /**\n * SHOW ME WHAT YOU GOT\n */\n function onPurposeRequest() {\n var $verb = document.getElementB...
javascript
edit
0
3
mit
e6a0f3031050f75956746952a89dc5c40ff5cc16
dersam/whatismypurpose,dersam/whatismypurpose
butter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n\n tagName: 'form',\n classNameBindings: [ 'isValid:valid:invalid' ],\n\n cancel: 'cancel',\n isValid: Ember.computed.alias('formModel.isValid'),\n notify: 'not...
javascript
edit
0
3
mit
2d3c79195ec742aa00f4ef8d150eda11b06e3de7
dollarshaveclub/ember-uni-form,dollarshaveclub/ember-uni-form
app/components/validated-form.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * TestFixture for browser options WebUI testing.\n * @ex...
javascript
edit
0
1
bsd-3-clause
3b93b2391455dd1dcf36f891256a0a37f4ecb6c2
TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,littlstar/chr...
chrome/browser/ui/webui/options2/browser_options2_browsertest.js
rejected_duplicate
Near-duplicate of sample 100775
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar app = angular.module('2048App', ['Game', 'Grid', 'Keyboard']);\n\n// Save templates\napp.run(function($templateCache) {\n $templateCache.put('mainId.html',\n '<div id=\"content\" ng-controller=\"GameController a...
javascript
edit
0
1
mit
2824db334d863a610696b90b8c76caed74b0d03d
derek-dchu/angular-2048
app/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Dependencies\nconst cssnext = require('cssnext')\nconst path = require('path')\n\n// Aliases\nvar basedir = __dirname\n\nmodule.exports = {\n paths: {\n destination: path.join(basedir, 'dist'),\n source: path....
javascript
edit
0
0
mit
0a90a4635823bd917e389464f521e6c42a8776c9
sbruchmann/sbruchmann.me,sbruchmann/sbruchmann.me
config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Main AngularJS Entry Point.\n *\n * @author Mohamed Mansour 2015 (http://mohamedmansour.com)\n */\nvar App = angular\n .module('personalDataDashboardApp', [\n 'ui.router',\n 'ngAnimate'\n ...
javascript
edit
0
1
mit
c0ddb427c24bcc7235cfdbb7d05392a3d7130e33
mohamedmansour/personal-data-dashboard,mohamedmansour/personal-data-dashboard
app/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// When declaring a prop with no value it should be evaluated to true\n// but '' is falsy. As a solution add the\nexport default {\n beforeCompile () {\n for (let prop of Object.keys(this._props)) {\n let data = this._props[pro...
javascript
edit
0
5
mit
5fc57c0bc5e76d90de6fa9003d0f016c6dc2ea93
posva/vue-mdl,posva/vue-mdl,posva/vue-mdl
src/mixins/prop-fill.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// server.js\n//\n// entry point activity pump application\n//\n// Copyright 2011-2012, StatusNet 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...
javascript
edit
0
2
apache-2.0
ead8855e5f95fa75a8f4ce6dfa44214cc329debd
OpenSocial/pump.io,stephensekula/pump.io,landsurveyorsunited/pump.io,detrout/pump.io,Acidburn0zzz/pump.io,profOnno/pump.io,gabrielsr/pump.io,pump-io/pump.io,grdryn/pump.io,gabrielsr/pump.io,grdryn/pump.io,e14n/pump.io,pump-io/pump.io,profOnno/pump.io,stephensekula/pump.io,detrout/pump.io,landsurveyorsunited/pump.io,str...
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport Page from '../../components/page'\nimport Header from './header'\nimport PreviousEpisodeSection from './sections/previous-episodes'\nimport EpisodesSection from './sections/episodes'\nimport Panelists...
javascript
edit
0
1
mit
10770a4da9bd0fdc611111152ea841232572fe89
javascriptair/site,javascriptair/site,javascriptair/site
src/pages/home/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar angularMeteorTemplate = angular.module('angular-blaze-template', []);\n\n// blaze-template adds Blaze templates to Angular as directives\nangularMeteorTemplate.directive('blazeTemplate', [\n '$compile',\n function ($compile) {\n ...
javascript
edit
0
6
mit
d1212e4c91e81118248499819fa2f2f614e85e3b
Urigo/angular-blaze-template
angular-blaze-template.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../actions/counter'\n\nconst counter = (state = 0, action) => {\n switch (action) {\n case INCREMENT_COUNTER:\n return state + 1\n case DECREMENT_COUNTER:\n return s...
javascript
edit
0
3
mit
a0dc7d268e2c839c301ceaa5364683f5eb3c27c7
epicsharp/react-boilerplate,epicsharp/react-boilerplate,RSS-Dev/live-html,RSS-Dev/live-html
src/reducers/counter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('./harness');\nvar testName = __filename.replace(__dirname+'/','').replace('.js','');\n\nconnection.addListener('ready', function () {\n puts(\"connected to \" + connection.serverProperties.product);\n var callbacksCalled ...
javascript
edit
0
1
mit
457086edfb55377b1a7ec24bbfa95c47f076515d
albert-lacki/node-amqp,xebitstudios/node-amqp,seanahn/node-amqp,zkochan/node-amqp,segmentio/node-amqp,zkochan/node-amqp,seanahn/node-amqp,hinson0/node-amqp,zinic/node-amqp,remind101/node-amqp,zkochan/node-amqp,postwait/node-amqp,zinic/node-amqp,albert-lacki/node-amqp,albert-lacki/node-amqp,segmentio/node-amqp,xebitstud...
test/test-queue-bind-callbacks-cascaded.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AuthManager = require('../config/auth_manager');\n\n// The default Route class for the main view of ember app\nvar ApplicationRoute = Ember.Route.extend({\n // Init an new authmanager object\n init: function() {\n this._super()...
javascript
edit
0
1
mit
c990ce53b69a564aa8d084b9a28c58a6f74d825a
ricofehr/nextdeploy-webui,ricofehr/nextdeploy-webui
javascripts/routes/application_route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar childProcess = require('child_process');\nvar fs = require('fs');\n\n// Build all of the example folders.\ndirs = fs.readdirSync('examples');\n\nfor (var i = 0; i < dirs.length; i++) {\n process.chdir('examples/' + dirs[i]);\n\n c...
javascript
edit
0
2
bsd-3-clause
f2658e5c22022a57171445cdd72cf272b45f3010
TypeFox/jupyterlab,charnpreetsingh185/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,TypeFox/jupyterlab,jupyter/jupyter-js-ui,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,TypeFox/jupyterlab,jupyter/jupyter-js-ui,TypeFox/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,eskirk/jupyterla...
scripts/buildexamples.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint indent: 2, unparam: true*/\n/*global $: false, document: false, togglbutton: false, createTag: false*/\n'use strict';\n\ntogglbutton.render('#tickets-show:not(.toggl)', {observe: true}, function (elem) {\n\n var link,\n con...
javascript
edit
0
1
bsd-3-clause
fa0c5be7c822533283f3281ff7a53035834c344c
markpavlitski/toggl-button,markpavlitski/toggl-button
src/scripts/content/assembla.js
rejected_duplicate
Near-duplicate of sample 71383
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react');\n\nclass Popular extends React.Component {\n constructor (props) {\n super(props);\n this.state = {\n selectedLanguage: 'All'\n };\n\n this.updateLanguage = this.up...
javascript
edit
0
2
mit
37b1d43498d4e60796a5b61550197cbc2a73f3f2
brianmmcgrath/react-github-battle,brianmmcgrath/react-github-battle
app/components/popular.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// External\nimport * as d3 from 'd3';\n\n// Internal\nimport Bar from './bar';\nimport * as config from './config';\n\nconst BARS_CLASS = 'bars';\n\nclass Bars {\n constructor (selection, visData) {\n let that = th...
javascript
edit
0
2
mit
6932ee3d190b1fe7d1fc58114e2d847c929b815d
flekschas/d3-list-graph,flekschas/d3-list-graph
src/scripts/composition/bars.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { task } from 'ember-concurrency';\n\nconst {\n get,\n computed,\n isPresent\n} = Ember;\n\nexport default Ember.Controller.extend({\n flashMessages: Ember.inject.service(),\n\n userEmail: '',\n ...
javascript
edit
0
2
mit
77d0c1a8184e9152727874831eb45c17417f80f0
ddoria921/Notes,ddoria921/Notes
app/controllers/signin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar abc = require('./converters/abc'),\n fs = require('fs'),\n p = require('path'),\n spl = require('./converters/spl'),\n converters = { abc: abc, spl: spl };\n\nfunction Playlist() {\n this.songs = [];\n}\n\nPlaylist.prototype.lo...
javascript
edit
0
2
mit
26b426c8d4e4319234209a317776a5257100f683
cliffano/roombox
lib/playlist.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar HeaderViewTalk = function(dict) {\n\tvar obj = dict.obj || {};\n\n\tvar UI = require(\"/lib/UI/UI\");\n\tvar i18n = require(\"/lib/i18n/Remote\");\n\n\tvar self = UI.createView({\n\t\theight: Ti.UI.SIZE\n\t});\n\n\tself.add( UI.crea...
javascript
edit
0
2
apache-2.0
d5b645b641b0915b80681f75b1c19fa83397b678
rafaelks/BrazilJS
Resources/ui/HeaderViewTalk.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (modFactory) {\n if (typeof module === 'object' && module.exports) {\n module.exports = modFactory(require('./scheme'), require('./parseScheme'));\n } else if (typeof define === \"function\" && define.amd) {\n define([...
javascript
edit
0
5
mit
9309b70caa84bab66cee111a8e2ab556656ca6f9
ljwall/tinyJSScheme
lib/schemeIO.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Load Symbol polyfill before any other code" }, { "role": "assistant", "content": "import 'regenerator-runtime/runtime';\nimport 'airbnb-js-shims';\nimport 'core-js/fn/symbol';\n" } ]
javascript
new_file
0
0
mit
dac36ace4766991bef06e09eb30f9af88d26ce10
kadirahq/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook
lib/core/src/server/common/polyfills.js
accepted
null
true