messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2016, Christopher Ramírez\n * All rights reserved.\n *\n * This source code is licensed under the MIT license.\n */\n\n'use strict'\n\nconst validIdNumberRegExp = /^(\\d{3})[ -]?(\\d{6})[ -]?(\\d{4}\\S{1})$/\n\ncla...
javascript
edit
0
2
mit
73d5d2b89ef60ffc1035e2a3787ae86c5f360725
christopher-ramirez/nic-id
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = Object.keys || require('object-keys');\n\nvar assignShim = function assign(target, source) {\n\treturn keys(source).reduce(function (target, key) {\n\t...
javascript
edit
0
3
mit
7cf7979e06f0774f46d133e070887cb29957c9d5
ljharb/object.assign,es-shims/object.assign,reggi/object.assign
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict'; /*jslint node: true, es5: true, indent: 2 */\n\nvar Parser = exports.Parser = require('./parser');\nvar Stringifier = exports.Stringifier = require('./stringifier');\n\n// function logEvents(emitter, p...
javascript
edit
0
0
mit
b71c2f7fbf9d7aa16ef5c7e702f19ad50a9dc6d0
chbrown/sv,chbrown/sv
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nEmoji = {};\n\nEmoji.baseImagePath = '/packages/davidfrancisco_twemoji/img/';\n\nEmoji.convert = function (str) {\n if (typeof str !== 'string') {\n return '';\n }\n\n return str.replace(/:[\\+\\-a-z0-9_]+:/gi, function(...
javascript
edit
0
2
mit
a16f274a861655f73ad07adff88196540aacd698
dmfrancisco/meteor-twemoji
emoji.js
rejected_duplicate
Near-duplicate of sample 70235
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar svg = require('virtual-dom/virtual-hyperscript/svg')\nvar bezier = require('bezier-easing')\nvar Size = require('create-svg-size')\nvar Circle = require('./circle')\nvar Mask = require('./mask')\n\nmodule.exports = f...
javascript
edit
0
2
mit
922e3caa9810b45a173524a4f9b7b451835c86c0
bendrucker/circle-bounce
index.js
rejected_duplicate
Near-duplicate of sample 101340
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\"\nvar fs = require(\"fs\")\nvar path = require(\"path\")\nvar dz = require(\"dezalgo\")\nvar npa = require(\"npm-package-arg\")\n\nmodule.exports = function (spec, where, cb) {\n if (where instanceof Function) cb = where,...
javascript
edit
0
5
isc
e6c66260031b793e25b2c4c50859699b9d0d7e17
npm/realize-package-specifier
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar path = require('path');\nvar sass = require('node-sass');\n\nmodule.exports = function dmpSass ($, document, done) {\n sass.render({\n file: 'assets/css/style.scss',\n outputStyle: 'compres...
javascript
edit
null
null
mit
022e9339a27d89511811bff56e417e069d21610e
jeroenkruis/dmp-sass
index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(root, factory) {\n \n if (typeof define === 'function' && define.amd) {\n \n define(['backbone', 'underscore', 'backbone.paginator'], function(Backbone, Underscore, PageableCollection) {\n\n retu...
javascript
edit
0
4
mit
91b608d905aa602fd9f8d7b0019602b6d077f6ea
gomoob/backbone.hateoas,gomoob/backbone.hateoas,gomoob/backbone.hateoas
src/umd-wrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst onepass = require(\"onepass\")({\n bundleId: \"com.sudolikeaboss.sudolikeaboss\"\n});\n\nexports.decorateTerm = (Term, { React }) => {\n return class extends React.Component {\n\n _onTerminal (term) {\n if (this.props &&...
javascript
edit
0
4
mit
c6eb2c136ed61fc0ac5e38a1c2e16872a7f99822
sibartlett/hyperterm-1password
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Automerge = require('automerge')\n\nfunction applyCodeMirrorChangeToAutomerge(state, findList, change, cm) {\n const startPos = cm.indexFromPos(change.from)\n\n if (change.to.line === change.from.line && change.to.ch === change....
javascript
edit
0
5
mit
cd460dadc9bd85f4dc7356b20abf7cb3e3401dd0
aslakhellesoy/automerge-codemirror,aslakhellesoy/automerge-codemirror
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\nvar opts = require('optimist').argv\nvar through = require('through2');\n\nfunction indexhtmlify(opts) {\n var s = through(function onwrite(chunk, enc, cb) {\n s.push(chunk)\n cb()\n }, functi...
javascript
edit
0
4
mit
48aeb44374abc3baae4bb098f9e94dea26c91494
dominictarr/indexhtmlify
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport logo from './logo.svg'\nimport './App.css'\n\nclass App extends Component {\n render() {\n return (\n <div className=\"App\">\n <header className=\"App-header\">\n ...
javascript
edit
0
1
mit
5b5e156f3581cce8ecca166198e4a2d758eb576e
svef/www,svef/www
websites/submit.vefverdlaun.is/src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\ndescribe('keyCapture', function() {\n beforeEach(module('arethusa.core'));\n\n describe('onKeyPressed', function() {\n it('calls the given callback', inject(function(keyCapture) {\n var event = {\n ke...
javascript
edit
0
1
mit
e25ee1f46a21bcee96821e459617090a5bb922e5
alpheios-project/arethusa,Masoumeh/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa
spec/arethusa.core/key_capture_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// DecentCMS (c) 2015 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details.\n'use strict';\n\nfunction UrlHelper(scope) {\n this.scope = scope;\n}\nUrlHelper.prototype.feature = 'content';\nUrlHelper.prototype.service = 'u...
javascript
edit
0
4
mit
065ba9eda7d93f2bb956ac74166b241af83c6202
DecentCMS/DecentCMS
modules/core/content/services/url-helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('traffic', function() {\n beforeEach(function() {\n window.matrix.settings = {\n profileId: ''\n };\n subject = window.matrix.traffic;\n });\n it('has initial points', function() {\n expect(subject.points)....
javascript
edit
0
1
mit
6cae911047d15eef3bb48c39a448f8b66f54ee49
codeforamerica/city-analytics-dashboard,codeforamerica/city-analytics-dashboard,codeforamerica/city-analytics-dashboard
tests/trafficSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire.config({\n paths:{\n jquery: \"vendor/assets/javascripts/jquery/jquery-1.7.2.min\",\n jsmin: \"vendor/assets/javascripts/jsmin\",\n polyfills: \"vendor/assets/javascripts/polyfills\",\n lib: 'public/assets/javascrip...
javascript
edit
0
0
mit
d4edd2fba11ee073a65807f347ca9857a1663572
Lostmyname/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo,Lostmyname/rizzo,lonelyplanet/rizzo,lonelyplanet/rizzo,Lostmyname/rizzo
spec/javascripts/helpers/SpecHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { useEffect, useState } from 'react';\nimport { isBlackFridayPeriod } from 'proton-shared/lib/helpers/blackfriday';\n\nconst EVERY_TEN_MINUTES = 10 * 60 * 1000;\n\nconst useBlackFriday = () => {\n const [blackFriday, setBlackF...
javascript
edit
0
1
mit
0c313cf2f04bc5f769f1fa1e4ba9dc31da615861
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
packages/components/hooks/useBlackFriday.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar isPatched = false;\n\nif (isPatched) return console.log('already patched');\n\nfunction addColor(string, name) {\n var colors = {\n green: ['\\x1B[32m', '\\x1B[39m'],\n red: ['\\x1B[1m\\x1B[31m', '\\x1B[39m\\x1B[22m'],\n y...
javascript
edit
0
4
mit
65cdcae6172ce01bcc8be4e31252f9740816438d
coachme/console-time
index.js
rejected_duplicate
Near-duplicate of sample 87330
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar postcss = require('postcss'),\n colors = require('color');\n\nmodule.exports = postcss.plugin('postcss-lowvision', function () {\n return function (css) {\n css.walkDecls('color', function (decl) {\n var co...
javascript
edit
0
1
mit
34cd265eb9284effdffb6b6314ea4632e80fbd86
keukenrolletje/postcss-lowvision
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n path = require('path');\n\n// Load all stated versions into the module exports\nmodule.exports.version = {};\n\n['2.0.0', '2.0.1', '2.0.2', '2.1.0', '2.1.1', 'latest'].map(function(version) {\n module.exp...
javascript
edit
0
2
unlicense
f7a134a8ebe7fa255932ceb9aba9bb8197dbdfac
mapycz/mapnik-reference,CartoDB/mapnik-reference,mapnik/mapnik-reference,mapnik/mapnik-reference,mojodna/mapnik-reference,florianf/mapnik-reference,mapycz/mapnik-reference,florianf/mapnik-reference,gravitystorm/mapnik-reference,mojodna/mapnik-reference,gravitystorm/mapnik-reference,CartoDB/mapnik-reference,mapnik/mapni...
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst driver = require('node-phantom-simple')\n\nfunction genPromiseFunc(originalFunc) {\n return function () {\n const _args = Array.prototype.slice.call(arguments)\n const _this = this\n\n return new Promise(...
javascript
edit
0
5
mit
56415d857b49a427736679050a0b59cddbbfb65f
foray1010/node-phantom-promise
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* \n * This is a very basic webserver and HTTP Client.\n * In production, you may want to use something like Express.js\n * or Botkit to host a webserver and manage API calls\n */\nconst {TOKEN, PORT} = process.env,\n triage = req...
javascript
edit
0
2
mit
2c534a16c1bfabb72ba01f40f8a50ab941df15fe
Ihamblen/slacktriage
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Return the panorama ID\nvar getPanoID = function(string) {\n\tlet value = decodeURIComponent(string).match(\"^https:\\/\\/.*\\!1s(.*)\\!2e.*$\");\n\n\tif (value === null) {\n\t\tthrow \"URL incorrect\";\n\t}\n\n\tv...
javascript
edit
0
5
mit
5239a5418abaac18e3a15cf1f0581f361f54449e
dorianneto/get-streetview-panorama-id
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-chart',\n included: function included(app) {\n this._super.included(app);\n app.import(app.bowerDirectory + '/chartjs/dist/Chart.js');\n }\n};\n\n```\n...
javascript
edit
0
2
mit
24093d73f2b3b7518f7447d9261f0bf896f13526
aomra015/ember-cli-chart,aomran/ember-cli-chart,aomran/ember-cli-chart,aomra015/ember-cli-chart
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(){\n\n};\n\n```\n\nApply this change: Add initial file-reading and line formatting" }, { "role": "assistant", "content": "'use strict';\n\nvar fs = require('fs');\nvar stream = requ...
javascript
edit
0
3
mit
93f0d993dbfc7bbbd88c452c5aace505b73c761f
matiassingers/whatsapp-log-parser
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.confEditor').directive('pluginConf', function() {\n return {\n restrict: 'AE',\n scope: true,\n link: function(scope, element, attrs) {\n var name = scope.$eval(attrs.name);\n ...
javascript
edit
0
1
mit
662aaae249f1411499aaf21b02c6527ceec1cca4
fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa
app/js/arethusa.conf_editor/directives/plugin_conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar forIn = require('for-in'),\n xobj = require('xhr'),\n XhrError = require('xhrerror');\n\nfunction noop() { }\n\nfunction xhr(options, callback, errback) {\n var req = xobj();\n\n if(Object.prototype.toString.call(options) ==...
javascript
edit
0
6
mit
d42fcb9add392e3cca86600b494af6bb7c51468d
matthewp/xhr,npmcomponent/matthewp-xhr
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mozjpeg = require('mozjpeg')\nvar dcp = require('duplex-child-process')\n\n/**\n * @param {Object} options\n * @param {Number} opts.quality the 1 to 100. Docs suggest 5 to 95 is actual useable range.\n * @param {String} opts.args...
javascript
edit
0
5
isc
3a18004c4d66395faf0559e37c68d02370f5e1b5
tableflip/mozjpeg-stream
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component, PropTypes} from 'react';\nimport {Akkad, Scene, shapes, cameras, lights, systems} from \"akkad\";\n\nconst googleStorageEndpoint = `http://storage.googleapis.com/akkad-assets-1/`;\n\nconst {ArcRotateCamera} = c...
javascript
edit
0
1
mit
e5d46a0a24acd994ccd5c2f59c89f8c7c69485c6
brochington/Akkad,cgrinker/Akkad,brochington/Akkad,cgrinker/Akkad
example/src/pages/MeshPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Promise = require('bluebird')\nvar request = require('got')\nvar extend = require('xtend')\n\nvar BASE_URL = 'http://www.broadbandmap.gov/broadbandmap/broadband/jun2014/'\n\nmodule.exports = function broadbandMap (lat, long, options...
javascript
edit
0
5
mit
e374134bd7ff60faeaa561ee984f2d23802d486e
bsiddiqui/broadband-map
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction DefaultRegistry(){\n this._tasks = {};\n}\n\nDefaultRegistry.prototype.get = function get(name){\n return this._tasks[name];\n};\n\nDefaultRegistry.prototype.set = function set(name, fn){\n this._tasks[name]...
javascript
edit
0
1
mit
a16fe50dad78d42b10fe9fd6af24a3b63754afa3
phated/undertaker-registry,gulpjs/undertaker-registry
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * data-driven\n * Copyright(c) 2013 Fluent Software Solutions Ltd <<EMAIL>>\n * MIT Licensed\n */\n\n module.exports = function(data, fn) {\n var mochaIt = it\n \n data.forEach(function(testData) {\n try {\n ...
javascript
edit
0
4
mit
954762c783fa53ab6772f2ff08a63b7dc018b396
danbehar/data-driven,fluentsoftware/data-driven
index.js
rejected_duplicate
Near-duplicate of sample 100971
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Turnpike.JS\n *\n * A lightweight and politely opinionated MVC framework for Node.js. Turnpike can be used as a traditional\n * framework, with code generation and rapid deployment, or invoked as a library for more obscure use c...
javascript
edit
0
0
mit
8decbaffecdfa2528f6dafaeb3dcde940a208c61
jay-depot/turnpike,jay-depot/turnpike
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar es = require('event-stream');\nvar coffee = require('coffee-script');\nvar gutil = require('gulp-util');\nvar formatError = require('./lib/formatError');\nvar Buffer = require('buffer').Buffer;\n\nmodule.exports = function(opt){\n ...
javascript
edit
0
4
mit
cca531597c989497759bdcf3bbd6cd8da0a0a4ef
steveluscher/gulp-coffee,develar/gulp-coffee,t3chnoboy/gulp-coffee-es6,doublerebel/gulp-iced-coffee,contra/gulp-coffee,coffee-void/gulp-coffee,jrolfs/gulp-coffee,leny/gulp-coffee,stevelacy/gulp-coffee,dereke/gulp-pogo,mattparlane/gulp-coffee,halhenke/gulp-coffee,typicode/gulp-coffee,wearefractal/gulp-coffee
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Global config settings.\n * (C) 2015 Diego Lafuente.\n */\n\n // requires\nvar Log = require('log');\n\n// globals\nexports.logLevel = 'info';\nvar log = new Log(exports.logLevel);\n\nexports.limit = 100;\nexpor...
javascript
edit
0
0
mit
60aabaa0d9c071939b7960557f122224d4e5231b
alexfernandez/package-quality,alexfernandez/package-quality,alexfernandez/package-quality
config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'emberfire-utils'\n};\n\n```\n\nApply this change: Add base code for tree-shaking" }, { "role": "assistant", "content": "/* jshint node: true */\n'use str...
javascript
edit
0
2
mit
84562c0e47351abb6a2db7d58e58b5820af15131
rmmmp/emberfire-utils,rmmmp/emberfire-utils
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar DtsCreator = require('typed-css-modules');\nvar loaderUtils = require('loader-utils');\n\nmodule.exports = function(source, map) {\n this.cacheable && this.cacheable();\n this.addDependency(this.resour...
javascript
edit
0
5
mit
d06d593a348d01a633b7ac23babfbe0f96e563ad
olegstepura/typed-css-modules-loader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar build = require('./build');\nvar clean = require('./clean');\nvar copy = require('./copy');\nvar karma = require('./default-karma.conf');\nvar lint = require('./lint');\nvar requirejs = require('./requirejs');\nvar resolve = require...
javascript
edit
0
0
mit
7e4d2ccc6a1ecfabcdd70ec73a3d49a1fc835721
RenovoSolutions/Gulp-Typescript-Utilities,SonofNun15/Gulp-Typescript-Utilities
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require( \"fs\" );\nvar path = require( \"path\" );\nvar slash = require( \"slash\" );\nvar through = require( \"through2\" );\n\nmodule.exports = function( jadeFile, options ) {\n\tvar scriptTags = \"\";\n\toptions.root = opti...
javascript
edit
0
2
mit
e0fc535bba6b9e08548a43ef47b2d692ec0a8119
oliversalzburg/gulp-pug-script,oliversalzburg/gulp-jade-script
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Assert = require('assert');\nconst FS = require('fs');\n\nconst Winston = require('winston');\n\nconst Factory = require('./lib/factory');\n\nvar exceptionLogger;\n\nfunction isString(str) {\n return typeof str === 'string';\n}\n...
javascript
edit
0
3
mit
5eaee47df9738da4fe488289e2b3220d9585f0ca
onmodulus/logger
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst port = 5000\n\nvar server = require('./server')\n\nserver.listen(port, () => console.log('Server is up on port %d.', port))\n\n```\n\nApply this change: Use port specified in environment for server" }, { "r...
javascript
edit
0
1
mit
d219f427858f0bf97e2ae13564113e49659acb5b
mooniker/captran
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar catchErrors = require('./lib/catchErrors');\nvar log = require('./lib/log');\nvar transportConsole = require('./lib/transports/console');\nvar transportFile =...
javascript
edit
0
2
mit
24f59d9b90e634932e801870ade69e2fa6cd9a84
megahertz/electron-log,megahertz/electron-log,megahertz/electron-log
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ls = require('ls');\nvar fs = require('fs');\nexports.generate = function(dir) {\n if(dir === undefined || dir === null) {\n dir = __dirname;\n }\n fs.mkdir(dir);\n var decks = ls(__dirname + \"/decks/*.js\");\n ...
javascript
edit
0
4
mit
2dfb621099b647dd5b513fef9abc02256dcd74ec
DataDecks/DataDecks-Data
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar rollbar = require(\"rollbar\");\n\nmodule.exports = {\n install: function(Vue, options) {\n Vue.rollbar = rollbar.init(options);\n }\n};\n\n```\n\nApply this change: Use new Rollbar initialization method" }, { "role": "...
javascript
edit
0
1
mit
09920accba7a74d481e57b6389af6c45b3307375
Zevran/vue-rollbar,Zevran/vue-rollbar
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n parser: 'babel-eslint',\n extends: 'airbnb',\n globals: {\n describe: true,\n it: true,\n },\n};\n\n```\n\nApply this change: Allow some more test functions." }, { "role": "assistant", "content...
javascript
edit
0
0
mit
8ef4d85fd4fcc1a90841730fd01b3dd95354bd9c
crewmeister/eslint-config-crewmeister
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar async = require( 'async' );\nvar Validation = require( './validation' );\nvar Data = require( './data' );\nvar Output = require( './output' );\nvar utils = require( '../utils' );\nvar validationError = require( '../utils/error_messa...
javascript
edit
0
2
mit
14edb196096b9263a5e119a69a83d729dc0607f2
projectweekend/Node-Backend-Seed
api/signup/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar postcss = require('postcss');\nvar autoprefixer = require('autoprefixer');\n\nvar app = 'src/app.css';\nvar dist = 'dist/build.css';\n\nvar css = fs.readFileSync(app);\n\npostcss([autoprefixer])\n .process(...
javascript
edit
0
1
mit
03a39b08a64b898717a46405c92d67b285dae98f
cahamilton/postcss-test
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\"\nvar grunt = require('grunt');\nvar rr = require(\"rimraf\");\n\nexports.docco = {\n tests: function(test) {\n\n var css = grunt.file.read(\"docs/docco.css\");\n var html = grunt.file.read(\"docs/docco.html\");\n...
javascript
edit
0
1
mit
fb3cfeda6e6f3dcb7c72df8ae750005067b7ed94
DavidSouther/grunt-docco,neocotic/grunt-docco,joseph-jja/grunt-docco-dir,joseph-jja/grunt-docco-dir
test/docco_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar importcss = require('rework-npm')\n , rework = require('rework')\n , variables = require('rework-vars')\n , path = require('path')\n , read = require('fs').readFileSync\n\nmodule.exports = function (opts, cb) {\n opts = opts ||...
javascript
edit
0
5
mit
1a54820bbac1c3fff9f68ecee7b979cb9679bbc8
atomify/atomify-css
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window, undefined) {\n\n var data = window.data = window.data || { };\n var map = data.map = data.map || { };\n map['Germany'] = [52.5, 13.4];\n map['France'] = [48.9, 2.4];\n\n})(window);\n```\n\nApply this change: Add re...
javascript
edit
0
3
apache-2.0
e8dffdae918fd10fdc547b80a10c5fb09e8fe188
SF-Housing-Visualization/mids-sf-housing-visualization,SF-Housing-Visualization/mids-sf-housing-visualization
app/scripts/map-data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport gulp from 'gulp';\nimport ignite from 'gulp-ignite';\nimport browserify from 'gulp-ignite-browserify';\nimport babelify from 'babelify';\nimport inject from 'gulp-inject';\nimport uglify from 'uglify-js';\n\ncons...
javascript
edit
0
1
mit
5904b6e737d32dd743a2c323c56e105ab5a710b6
buildabonfire/Bonfire.JavascriptLoader,buildabonfire/Bonfire.JavascriptLoader,buildabonfire/Bonfire.JavascriptLoader
gulpfile.babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-sinon',\n\n options: {\n nodeAssets: {\n 'sinon': {\n import: [{ path: 'pkg/sinon.js', type: 'test' }]\n }\n }\n },\n\n included: fun...
javascript
edit
0
3
mit
5190e1409985f4c1e1268772fd378e8a275c128e
csantero/ember-sinon,csantero/ember-sinon
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst loaderUtils = require('loader-utils');\nconst path = require('path');\nconst deepMerge = require('./lib/deep-merge');\n\nmodule.exports = function(source) {\n const HEADER = '/**** Start Merge Loader ****/';\n const FOOTER = '/*...
javascript
edit
0
5
mit
2b5ca9641957a664b772d8d146273abd0fcf286b
bitfyre/config-merge-loader
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport cp from 'child_process';\nimport http from 'http';\nimport test from 'ava';\n\nlet rs;\n\ntest.before('start the server', async () => {\n\trs = cp.spawn('npm', ['start']);\n\trs.stderr.on('data', data => console.error(data.toStri...
javascript
edit
0
1
apache-2.0
c22b100cbd55f6bb4e4097f2def34839f5d70780
emecell/react-server,lidawang/react-server,redfin/react-server,lidawang/react-server,emecell/react-server,redfin/react-server
packages/generator-react-server/generators/app/templates/test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Kefir as K } from \"kefir\";\n\nconst NEVER = K.never();\nconst ZERO = K.constant(0);\n\nconst ADD1 = (x) => x + 1;\nconst SUBTRACT1 = (x) => x - 1;\nconst ALWAYS = (x) => () => x;\n\nconst delay = (n, s) => s.slidingWindow(n +...
javascript
edit
0
1
mit
33ab3db66a6f37f0e8c8f48a19035464fea358c1
standard-library/galvo
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar ejs = require('ejs');\nvar fs = require('fs');\n\nexports.name = 'ejs';\nexports.outputFormat = 'xml';\nexports.compile = ejs.compile;\nexports.compileClient = function (source, options) {\n options = options || {...
javascript
edit
0
3
mit
266931cf123010a232981421b96c6d7381f9fe57
jstransformers/jstransformer-ejs,jstransformers/jstransformer-ejs
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst helmet = require('helmet');\nconst winston = require('winston');\nconst bodyParser = require('body-parser');\nconst env = require('./src/env');\n\nvar server = express();\nvar router = require(...
javascript
edit
0
2
mit
aba731a6b68d09a065e2b97c4eff2d51a86195e1
NSAppsTeam/nickel-bot
index.js
rejected_duplicate
Near-duplicate of sample 100020
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * A lightweight promise-based Reddit API wrapper.\n * @module reddit-api\n */\n\n\nexports = module.exports = Reddit;\n\nfunction Reddit() {\n this.baseApiUrl = 'http://www.reddit.com';\n return this;\n};\n\n\n/**\n * Logs i...
javascript
edit
0
1
mit
4dec8ace74bc153a67cd32b1e5be026bfbf852be
imiric/reddit-api
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar User = new Schema({\n\tname: String,\n\tusername: String,\n\tpassword: String,\n\tdate: Date\n});\n\nmodule.exports = mongoose.model('User', User...
javascript
edit
0
0
mit
3bc450b26c681b10efc3144e1e83cd97f703aa3b
mirabalj/graphriend,mirabalj/graphriend
app/models/users.js
rejected_duplicate
Near-duplicate of sample 70983
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * Mongoose findOrCreate Plugin\n * Copyright(c) 2012 Nicholas Penree <<EMAIL>>\n * MIT Licensed\n */\n\nfunction findOrCreatePlugin(schema, options) {\n schema.statics.findOrCreate = function findOrCreate(conditions, doc, options...
javascript
edit
0
7
mit
5a58033f8cc97ac0d07b220ac73c8ae76a34d5c3
yura415/mongoose-findorcreate
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nimport ResetScrollMixin from '../mixins/reset-scroll';\nimport Analytics from 'ember-osf/mixins/analytics';\n\n/**\n * @module ember-preprints\n * @submodule routes\n */\n\n/**\n * Loads all disciplines and...
javascript
edit
0
2
apache-2.0
f086077dd8eee8503192c13f646e9d63231e0174
laurenrevere/ember-preprints,baylee-d/ember-preprints,baylee-d/ember-preprints,laurenrevere/ember-preprints,CenterForOpenScience/ember-preprints,CenterForOpenScience/ember-preprints
app/routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $('.add_child').click(function() {\n var assoc = $(this).attr('data-association');\n var content = $('#' + assoc + '_fields_template').html();\n var regexp = new RegExp('new_' + assoc, 'g')\...
javascript
edit
0
2
mit
516e2af441385f592d4dc51ae00dd8a555de0736
timriley/complex-form-examples,timriley/complex-form-examples
public/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 96561
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar CELOS_USER = \"celos\";\n\nvar CELOS_DEFAULT_OOZIE = \"http://oozie002.ny7.collective-media.net:11000/oozie\";\n\nvar CELOS_DEFAULT_HDFS = \"hdfs://nameservice1\";\n\nvar NAME_NODE = CELOS_DEFAULT_HDFS;\n\nvar JOB_TRACKER = \"admin1...
javascript
edit
0
0
apache-2.0
bb95b8a1375f5bd395e6cb9d3db40b7b427d12b7
collectivemedia/celos,collectivemedia/celos,collectivemedia/celos
production/defaults/collective.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'backbone',\n 'marionette'\n], function(Backbone, Marionette) {\n var Controller = Marionette.Controller.extend({\n initialize: function(options) {\n this.app = options.app;\n this.addres...
javascript
edit
0
1
apache-2.0
0716c83e8ec9bbd3b7359d962c95ecb1b43e00e4
tumbarumba/dropwizard-marionette,tumbarumba/dropwizard-marionette,tumbarumba/dropwizard-marionette
application/src/main/resources/assets/js/app/controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* ==================================\n Express server - main server side file\n===================================== */\n\n\nvar path = require('path');\nvar fs = require('fs');\nvar http = require('http');\nvar express = require('exp...
javascript
edit
0
1
apache-2.0
5a66d394be7c4ac22693fa4fce38da2c40c64d53
arthuralee/nito,arthuralee/nito
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert'),\n config = require('config'),\n Harvest = require('../index');\n\ndescribe('The Harvest API Client', function() {\n describe('Instantiating a Harvest instance', function() {\n it('should b...
javascript
edit
0
1
mit
88ad1c1a133236e609d6fad45c80d637a2ad9a55
peterbraden/node-harvest,log0ymxm/node-harvest,Pezmc/node-harvest-2,clearhead/node-harvest
test/harvest-client-tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * @flow\n */\n\nimport * as React from 'react';\n\nexport default function Navbar() {\n return (\n <nav className=\"navbar navbar-default navbar-fixed-top navbar-inverse\">\n <div className=\"container-fluid\">\n <d...
javascript
edit
null
null
apache-2.0
b658af5d5c150f1597fba03063821aafa801f601
pinterest/bonsai,pinterest/bonsai,pinterest/bonsai
src/components/Navbar.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport gulp from 'gulp';\nimport gulpWebpack from 'webpack-stream';\nimport webpack from 'webpack';\nimport config from '../config';\n\nlet app = './src/main.js';\n\ngulp.task('webpack', () => {\n return gulp.src(app)\n .pipe(gulpWe...
javascript
edit
0
1
mit
a096b4d565db8d713c1bdb78ad3bc881f5817b10
marcosmoura/angular-material-steppers,marcosmoura/angular-material-steppers
gulp/tasks/webpack.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst fs = require('fs');\nconst components = process.argv.slice(2);\n\nconst componentDefaultContent = componentName => `\nimport React, {\n Component,\n PropTypes,\n} from 'react';\n\nclass ${componentName} ex...
javascript
edit
0
2
mit
0ae4e58f86bad13975fd816b9260e78c187aea05
Lukavyi/generate-reactjs-component-folder-css-modules
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\"\n\nvar http = require('http')\nvar shoe = require('shoe');\n\nvar app = http.createServer()\n\nmodule.exports = function(options, cb) {\n if (typeof options === 'function') cb = options, options = undefined\n options = ...
javascript
edit
0
6
mit
03f6c68e7e66fe8bdba9164702e5102c0793e186
ninjablocks/ninja-tail-stream
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar parse = require('coffee-script').compile;\n\nexports.extension = 'coffee';\nexports.compile = function (src, options) {\n\tvar opts = { bare: true }, code, data, map;\n\tif (!options.sourceMap) return { code: parse(...
javascript
edit
0
3
mit
d97b5e5392e118bca6a30d1eaa3601af5fa9ec32
medikoo/webmake-coffee
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar utility = require('../utility');\n\ndescribe('sub-languages', function() {\n before(function() {\n this.block = document.querySelector('#sublanguages');\n });\n\n it('should highl...
javascript
edit
0
1
bsd-3-clause
0c665c9998bf7d7619184d073cdf832b30a1d8af
SibuStephen/highlight.js,isagalaev/highlight.js,0x7fffffff/highlight.js,yxxme/highlight.js,tenbits/highlight.js,aurusov/highlight.js,tenbits/highlight.js,jean/highlight.js,STRML/highlight.js,snegovick/highlight.js,snegovick/highlight.js,MakeNowJust/highlight.js,tenbits/highlight.js,weiyibin/highlight.js,martijnrusschen...
test/special/subLanguages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n\t$('#sidebar').affix({\n\t\t offset: {\n\t\t\t//top: $('.navbar-fixed-top').height()\n\t\t\t//top: $('.navbar-fixed-top').offset().top\n\t\t\ttop: $('main').offset().top + 10\n\t\t }\n\t});\n});\n\n\n\n```\n\nApply t...
javascript
edit
0
1
mit
e6f9b7b2eb9e7e651aa0a7ea37b4543d64d3d3bc
Ecotrust/Measuring-Our-Impact-Wireframes,Ecotrust/Measuring-Our-Impact-Wireframes
app/scripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport m from 'mithril';\nimport dropdown from './dropdown';\n\nconst filterDropdown = {\n view(ctrl, args) {\n const wrapper_c = args.wrapper_class || '.w-col.w-col-3.w-col-small-6';\n return m(wrapper_c, [\n ...
javascript
edit
0
4
mit
cceb968c9c98e961938595b68602466bcb75e350
sushant12/catarse.js,catarse/catarse.js,catarse/catarse_admin
src/c/filter-dropdown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar mochify = require('mochify');\nvar config = require('../config').js;\n\ngulp.task('mochify', ['jshint'], function () {\n mochify( config.test, {\n reporter : 'spec'\n //debug: tr...
javascript
edit
0
1
mit
03d408714f001c291ea9ce97c4077ffceb0a94b7
aboutlo/gulp-starter-kit,aboutlo/gulp-starter-kit
gulp/tasks/mochify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar url = require('url');\nvar request = require('request');\n\nvar bodyParser = require('body-parser');\napp.use(bodyParser.json());\napp.use(bodyParser.urlencoded({ extended: tr...
javascript
edit
0
1
mit
5d302a96832bae71bf110479683659ace7e6377f
WilliamBZA/DiceMaster
index.js
rejected_duplicate
Near-duplicate of sample 99187
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar events = require('events');\nvar configs = require('./configs');\nvar rump = module.exports = new events.EventEmitter();\n\nrump.addGulpTasks = function() {\n require('./gulp');\n};\n\nrump.reconfigure = function(o...
javascript
edit
0
4
mit
55c823e3fd29a9ed4eee7bac24fec69f518c5edf
rumps/core,rumps/rump
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2014 Andrei Karpushonak\n\n\"use strict\";\n\nvar _ = require('lodash');\nvar ECMA_SIZES = require('./byte_size');\n\n/**\n * Main module's entry point\n * Calculates Bytes for the provided parameter\n * @param o...
javascript
edit
0
6
mit
eb11d289fd6924ea178c2200b6e96c3763c2ca16
miktam/sizeof,avrora/sizeof
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar userHome = require('user-home');\n\nmodule.exports = function (str) {\n\treturn userHome ? str.replace(/^~\\//, userHome + '/') : str;\n};\n\n```\n\nApply this change: Throw if input is not a string" }, { "rol...
javascript
edit
0
3
mit
f997f034b1a028448b266b617f6cb4c3b0269d0b
sindresorhus/untildify,sindresorhus/untildify
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst pkg = require(path.resolve('./package.json'));\nconst semver = require('semver');\nconst versions = require('./versions.json');\n\nconst presetEnv = require.resolve('babel-preset-env...
javascript
edit
0
6
mit
53c7d27f9097c6c80b080f2708f34cbfa296db5e
jamieconnolly/babel-preset
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n titleToken: 'Add a student',\n\n model() {\n return this.store.createRecord('student');\n }\n});\n\n```\n\nApply this change: Clean up repeat visits to add studen...
javascript
edit
0
2
bsd-2-clause
a2c4f70e192793f2f241a3acba5878c79090d0d8
mblayman/lcp,mblayman/lcp,mblayman/lcp
client/app/dashboard/students/new/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar app = app || {};\n\n(function() {\n app.db = {\n id: \"todoDB\",\n description: \"Database of the todo list\",\n migrations : [\n {\n version: \"1.0\",\n migrate: func...
javascript
edit
0
1
mit
697b1268296a2aa9b753f0306166f18ca6598884
Vicos/viTodo
js/db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst csvGenerator = {\n\tinit() {\n\t\tconst downloadCsvBtnEl = document.querySelector(\".js-download-csv-btn\");\n\t\tif (downloadCsvBtnEl) {\n downloadCsvBtnEl.addEventListener(\"click\", e => {\n \twindow.open(window.locat...
javascript
edit
0
2
mit
5f032a0fe59a2bbea943bf79fcb40e0382872310
participedia/api,participedia/api,participedia/api,participedia/api
public/js/csv-generator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Collection for interfacing with localStorage.\n */\n\n'use strict';\n\nvar Backbone = require('backbone');\nvar _ = require('lodash');\n\nmodule.exports = Backbone.Collection.extend({\n\n model: Backbone.Model,\n\n init...
javascript
edit
0
2
mit
0ceee8a2ad1e72ad628fe31974670b1fc11220d8
ptmccarthy/wikimapper,ptmccarthy/wikimapper
src/web/js/collections/localStorage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(function($) {\n\tfunction addNewField() {\n\t\tvar self = $(this);\n\t\tvar val = self.val();\n\n\t\t// check to see if the one after us is there already - if so, we don't need a new one\n\t\tvar li = $(this).closest('li').next('...
javascript
edit
0
4
bsd-3-clause
445c6fcf835af3c7af438864765a6a1ded2edecd
souldigital/silverstripe-multivaluefield,souldigital/silverstripe-multivaluefield,designcity/silverstripe-multivaluefield,silverstripe-australia/silverstripe-multivaluefield,silverstripe-australia/silverstripe-multivaluefield,designcity/silverstripe-multivaluefield
javascript/multivaluefield.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nManageIQ.angular.app.directive('validationStatus', function() {\n return {\n require: 'ngModel',\n link: function (scope, elem, attrs, ctrl) {\n ctrl.$validators.validationRequired = function (modelValue, viewValue) {\n ...
javascript
edit
0
3
apache-2.0
18b18dd15046c89d4e81ab0d17f87a1733159cf7
djberg96/manageiq,KevinLoiseau/manageiq,yaacov/manageiq,gmcculloug/manageiq,israel-hdez/manageiq,lpichler/manageiq,ailisp/manageiq,jvlcek/manageiq,gmcculloug/manageiq,tzumainn/manageiq,chessbyte/manageiq,jameswnl/manageiq,borod108/manageiq,kbrock/manageiq,romaintb/manageiq,jvlcek/manageiq,chessbyte/manageiq,mfeifer/man...
app/assets/javascripts/directives/validation/validation_status.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport styled from 'styled-components'\nimport SelectInputField from './SelectInputField';\n\nexport default SelectInputField.withComponent('div').extend`\n position: absolute;\n top: 0px;\n left: 0px;\n visibility: hidden;\n heigh...
javascript
edit
0
0
mit
1827499c2e834072c488c5ec7b1e67eccde8e4ea
agutoli/react-styled-select
src/Select/partials/SelectInputFieldSize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst glob = require('glob')\n\nconst outputDirectory = [process.argv[2] || 'snapshots']\n .filter(x => x)\n .join('/')\n\nconst createDir = dir => {\n const splitPath = dir.split('/')\n splitPath.reduce((p...
javascript
edit
0
3
mit
2346a2e653ba30424ac5a5be08a6bd741d7c3814
Ciunkos/ciunkos.com
jest/moveSnapshots.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Resource } from 'kolibri.lib.apiResource';\n\nexport default new Resource({\n name: 'facilitytask',\n\n /**\n * @param {string} facility\n * @return {Promise}\n */\n dataportalsync(facility) {\n return this.postList...
javascript
edit
0
1
mit
78c19a634a06277e134c3af1024f9648bc3d3b26
mrpau/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,learningequality/kolibri
kolibri/core/assets/src/api-resources/facilityTask.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst CoreView = require('backbone/core-view');\nconst template = require('./footer.tpl');\nconst checkAndBuildOpts = require('builder/helpers/required-opts');\n\nconst REQUIRED_OPTS = [\n 'configModel'\n];\n\n/**\n * Decide what supp...
javascript
edit
0
2
bsd-3-clause
a03061c9710dda8faf1d10eb664206b41835be96
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
lib/assets/javascripts/dashboard/components/footer/footer-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { findParentByType } from './nodeHelpers'\n// TODO: move AddEntityCommand into shared\nimport AddEntityCommand from '../metadata/AddEntityCommand'\n\nexport default class InsertFootnoteCommand extends AddEntityCommand {\n detect...
javascript
edit
0
4
mit
8a175bd8b14dc91719fcd2aa40137fc1e20370b5
substance/texture,substance/texture
src/article/shared/InsertFootnoteCommand.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mediumZoom from 'src/config/medium-zoom';\nimport lqip from 'src/modules/lqip';\nimport galleryLoader from 'src/modules/gallery-lazy-load';\n\nwindow.addEventListener('DOMContentLoaded', () => {\n galleryLoader({\n afterInser...
javascript
edit
0
2
mit
4122f817b94d9f518c12a01c5d77e719726c2ac6
tuelsch/bolg,tuelsch/bolg
src/gallery.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar page = require('webpage').create(),\n system = require('system'),\n address, output;\n\nif (system.args.length < 3 || system.args.length > 4) {\n console.log('Usage: graph.js IP filename');\n phantom.e...
javascript
edit
0
2
apache-2.0
79a7e9a58d3d6e724ae1e5b434210084f0e908bf
punitvara/ntppool,punitvara/ntppool,tklauser/ntppool,tklauser/ntppool,tklauser/ntppool,tklauser/ntppool,punitvara/ntppool
phantom/graph.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add router saga to rootSaga" }, { "role": "assistant", "content": "import { createBrowserHistory as createHistory, saga as router } from 'redux-tower';\nimport routes from './routes'\nimport { fork } from 'redux-saga/effects'...
javascript
new_file
0
1
mit
784c672f4b0c9b42d5b6431a0a155a164493669d
ygkn/DJ-YAGICHAN-SYSTEM,ygkn/DJ-YAGICHAN-SYSTEM
client/src/sagas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n function Menu() {\n this.titleTxt = null;\n this.startTxt = null;\n }\n\n Menu.prototype = {\n\n create: function () {\n this.background = this.add.tileSprite...
javascript
edit
0
2
mit
73918b480e9f028b7884eec9658376788f07b6fc
cravesoft/dodger,cravesoft/dodger
src/js/menu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar People = new Mongo.Collection(\"people\");\n\nif (Meteor.isClient) {\n Template.body.helpers({\n people: function () {\n return People.find({});\n }\n });\n\n Template.body.events({\n \"submit .new-person\": functio...
javascript
edit
0
1
mit
69220b4c4c2ec3d4c24db037db0f5a0c7319299c
paircolumbus/pairs,paircolumbus/pairs
pairs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Module dependencies\n */\n\nvar _ = require ('lodash');\n\n\n\n\n/**\n * Calculate the base URL (useful in emails, etc.)\n * @return {String} [description]\n */\n\nmodule.exports = function getBaseurl() {\n var sails = this;\n\...
javascript
edit
0
8
mit
27fbc59c87a41eebd9e6a4ebf0a7d87c0d3ba5f1
jianpingw/sails,balderdashy/sails,Hanifb/sails,rlugojr/sails,rlugojr/sails,jianpingw/sails
lib/app/getBaseurl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Model from 'ember-data/model';\nimport {belongsTo, hasMany} from 'ember-data/relationships';\nimport attr from 'ember-data/attr';\n\nexport default Model.extend({\n\n artist: attr('string'),\n title: attr('string'),\n year: at...
javascript
edit
0
4
mit
8c499badf087794fc5d9f2109a6a2d64e03cb53d
ThreeDRadio/playlists,ThreeDRadio/playlists,ThreeDRadio/playlists
frontend/app/models/release.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { translate, rand, vLog, objToArr, getR,\n massToRadius, filterClose, vectorToString } from './VectorHelpers';\nimport { GRAVITY, PLANET_SPRING } from './Constants';\n\nconst getGravityAccel = (vR, mass) => {\n const rMag2 = vR...
javascript
edit
0
2
mit
46f1cd6aed617e033ef0705c1b012a36d521f95c
elliotaplant/celestial-dance,elliotaplant/celestial-dance
src/js/Helpers/AccelerationLogic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar bodyParser = require('body-parser');\nvar db = require('../models/index');\nmodule.exports = function (app, express) {\n \n //Handle CORS\n app.use(function(req, res, next) {\n res.header('Access-Control-Allow-Origin', 'http:/...
javascript
edit
0
1
mit
b99b971210da9951ff468519bd1066a68d885c78
benjaminhoffman/Encompass,benjaminhoffman/Encompass,benjaminhoffman/Encompass
server/config/middleware.js
accepted
null
true