messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { expect } from 'chai';\nimport { shallow } from 'enzyme';\nimport ArticlePreview from '../ArticlePreview';\n\ndescribe('ArticlePreview', () => {\n it('should render ArticlePreview component properl...
javascript
edit
0
1
mit
a1aca964cc495ddde6401be94cb231810b53598d
qingweibinary/binary-next-gen,binary-com/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,qingweibinary/binary...
src/news/__tests__/ArticlePreview-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction short_hash(data, type, row, meta)\n{\n return data.substring(0,8);\n}\n\nfunction init_page()\n{\n $('#tickets').dataTable({\n \"ajax\": '../api/v1/tickets?filter=sold eq 1 and year eq 2016',\n columns: [\n ...
javascript
edit
0
1
apache-2.0
26fe7640b6ca46d053d5f9123f21411b3d739c80
BurningFlipside/Tickets,BurningFlipside/Tickets,BurningFlipside/Tickets
_admin/js/sold_tickets.js
rejected_duplicate
Near-duplicate of sample 98335
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ExtentInteraction from '../src/ol/interaction/Extent.js';\nimport GeoJSON from '../src/ol/format/GeoJSON.js';\nimport Map from '../src/ol/Map.js';\nimport View from '../src/ol/View.js';\nimport {OSM, Vector as VectorSource} from ...
javascript
edit
0
0
bsd-2-clause
64167a5d7eba261f3f6c1b6e223d5f6b855b8df5
stweil/ol3,adube/ol3,adube/ol3,openlayers/openlayers,stweil/ol3,oterral/ol3,ahocevar/openlayers,openlayers/openlayers,bjornharrtell/ol3,stweil/openlayers,stweil/ol3,ahocevar/ol3,ahocevar/openlayers,stweil/openlayers,openlayers/openlayers,stweil/openlayers,bjornharrtell/ol3,oterral/ol3,adube/ol3,ahocevar/ol3,ahocevar/op...
examples/extent-interaction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function argsToFindOptions(args, target) {\n var result = {}\n , targetAttributes = Object.keys(target.rawAttributes);\n\n if (args) {\n Object.keys(args).forEach(function (key) {\n if (~targetAttributes.inde...
javascript
edit
0
10
mit
cb87d72a356363cc7350ab3c2c06aeaa1967c846
idris/graphql-sequelize,mickhansen/graphql-sequelize,janmeier/graphql-sequelize
src/argsToFindOptions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\t$('select').chosen();\n\t$('input.date').datepicker({\n\t\tbeforeShowDay: $.datepicker.noWeekends\n\t});\n\n\t$('#save-button').savebutton($('#post-status'), '');\n\t$('#cancel-button').cancelbutton();\...
javascript
edit
0
1
mit
a55246c980e48e3ed4e19a332dbc9178d0cd9265
mrozekma/Sprint,mrozekma/Sprint,mrozekma/Sprint
static/sprints-new.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Component = require('../../ui/Component');\nvar $$ = Component.$$;\n\nfunction CrossLinkComponent() {\n Component.apply(this, arguments);\n}\n\nCrossLinkComponent.Prototype = function() {\n this.render = function(...
javascript
edit
0
4
mit
ac852a0a4478362ef3ca076fd14bbd048f4bc038
TypesetIO/substance,andene/substance,TypesetIO/substance,abhaga/substance,michael/substance-1,stencila/substance,substance/substance,andene/substance,michael/substance-1,substance/substance,jacwright/substance,abhaga/substance,podviaznikov/substance,podviaznikov/substance,jacwright/substance
doc/components/CrossLinkComponent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Tab registration by MediaControlled event\ndocument.addEventListener(\"MediaControlled\", function () {\n chrome.runtime.sendMessage({command: \"registerTab\"});\n});\n\n// Tab unregistration by MediaUncontrolled event\ndocument.a...
javascript
edit
0
5
apache-2.0
d1bd53c204c816dc0cca0cb3a502d30971ddcbcb
kristianj/keysocket,Whoaa512/keysocket,ALiangLiang/keysocket,borismus/keysocket,chrisdeely/keysocket,feedbee/keysocket,borismus/keysocket,vladikoff/keysocket,iver56/keysocket,kristianj/keysocket,vinyldarkscratch/keysocket,legionaryu/keysocket,vinyldarkscratch/keysocket,feedbee/keysocket
extension/media-control-api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.core').service('dependencyLoader', [\n '$ocLazyLoad',\n '$q',\n 'basePath',\n function($ocLazyLoad, $q, basePath) {\n function expand(p) {\n return basePath.path + '/' + p;\n }\...
javascript
edit
0
3
mit
dd81193bee7b57d2ff7c2f604a4ff37d629713bc
fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa
app/js/arethusa.core/dependency_loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst _ = require('lodash');\n\nmodule.exports = function (Model, bootOptions = {}) {\n Model.defineProperty('deleted', {\n type: Boolean,\n required: true,\n default: false\n });\n\n /**\n * @return {Prom...
javascript
edit
0
3
mit
5b2ecde8e9cf8e4cc6e694ddfb6318ca47b342f5
dynamoxteam/loopback-utilities
lib/mixins/soft-delete.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { config } from 'config'\nimport invariant from 'invariant'\nimport isString from 'lodash/isString'\n\nfunction isDataURL (s) {\n // Regex from https://gist.github.com/bgrins/6194623#gistcomment-1671744\n // eslint-disable-next...
javascript
edit
0
5
mit
a9661d03d234101bd51d8fd66ddab653797c4543
mingaldrichgan/gatsby,mingaldrichgan/gatsby,gatsbyjs/gatsby,fabrictech/gatsby,rothfels/gatsby,gatsbyjs/gatsby,okcoker/gatsby,Khaledgarbaya/gatsby,ChristopherBiscardi/gatsby,danielfarrell/gatsby,fk/gatsby,ChristopherBiscardi/gatsby,gatsbyjs/gatsby,Khaledgarbaya/gatsby,rothfels/gatsby,0x80/gatsby,chiedo/gatsby,okcoker/ga...
lib/isomorphic/gatsby-helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar QuizzCollection = Backbone.Collection.extend({\n model: QuizzModel,\n url: './data/quizz.json'\n});\n\n```\n\nApply this change: Change JSON url to API url" }, { "role": "assistant", "content": "var QuizzCollection = B...
javascript
edit
0
0
mit
5e93f2da4c204b82c81eacbd86ab6368b67331ca
KillianKemps/MovieQuizz,KillianKemps/MovieQuizz
scripts/collections/quizz-collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Smallstache(source) {\n this.template = source.match(/^[#|\\.].*/g) ?\n document.querySelector(source) : // source is selector\n source; // source is template\n}\n\nSmallstache.protot...
javascript
edit
0
1
mit
f4086f9dd9381da2179adc2254b03b81d2e4fbb7
macie/smallstache
Smallstache.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2016 Mozilla\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LI...
javascript
edit
0
0
apache-2.0
7be6e466152261159d1b6971ba231fc32464fc10
jsantell/tofino,mozilla/tofino,mozilla/tofino,jsantell/tofino,bgrins/tofino,victorporof/tofino,jsantell/tofino,victorporof/tofino,bgrins/tofino,mozilla/tofino,bgrins/tofino,bgrins/tofino,mozilla/tofino,jsantell/tofino
app/ui/browser/model/shared-prop-types.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport m from 'mithril';\nimport classNames from '../classnames.js';\n\nclass PlayerReactionComponent {\n\n oninit({ attrs: { session, player } }) {\n session.on('send-reaction', ({ reactingPlayer, reaction }) => {\n if (reacti...
javascript
edit
0
3
mit
98ec5b6d04acd5410c71f84a4187c9ca7425defd
caleb531/connect-four
app/scripts/components/player-reaction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\n\ndescribe('ink generator', function () {\n beforeEach(function (done) {\n helpers.testDirector...
javascript
edit
0
2
mit
5ca8e5f6c57387af132f56bd997a06ab60bfe01e
rogeriopvl/generator-ink,rogeriopvl/generator-ink
test/test-creation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport { minify as processUglify } from 'uglify-es'\nimport { minify as processTerser } from 'terser'\nimport { createChunkTransformer } from 'pundle-api'\n\nimport manifest from '../package.json'\n\n// TODO: Fix source maps...
javascript
edit
null
null
mit
a392c18f48b1af268e6882fde1ca09f75a87e73a
motion/pundle,steelbrain/pundle,steelbrain/pundle,steelbrain/pundle
packages/pundle-chunk-transformer-js-uglify/src/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\nconst Lint = require(\"tslint\");\n\nclass Rule extends Lint.Rules.AbstractRule {\n\tapply(sourceFile) {\n\t\tif (sourceFile.fileName.indexOf(\"src/d...
javascript
edit
0
4
mit
edb34ca791f133d22d27e00106e7351965c37152
Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code
lints/disallowImportingNonSharedCodeRule.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport EventBets from '../templates/event-bets'\nimport EventHeading from '../templates/event-heading'\n\nimport styles from './index.module.styl'\n\nexport default ({ data }) => (\n <ol className={styles['...
javascript
edit
0
1
mit
3a2c496d5d65d9e8dd01a09f03123b9b63853400
LuisLoureiro/placard-wrapper
src/pages/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction setupDisplayFieldsEducationTab(TempObject, selectBox){\n // This code is needed to merge the multiselect field and the \"other\" input field per\n if (typeof TempObject[selectBox] != 'undefined') {\n if (TempObje...
javascript
edit
0
6
apache-2.0
f85e476263ffad5ce682ff40faa4979a8facf820
inbloom/APP-tagger,inbloom/APP-tagger
app/assets/javascripts/tagger/functions/setupDisplayFieldsEducation.js
rejected_duplicate
Near-duplicate of sample 75460
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar lib = require(\"__buttercup/module.js\"),\n Westley = lib.Westley;\n\nmodule.exports = {\n\n setUp: function(cb) {\n this.westley = new Westley();\n (cb)();\n },\n\n _getCommandForName: {\n\n cachesCommandWhenCalledTwic...
javascript
edit
0
1
mit
26c3cdec1c2eb9b39372da02e292d401e4eada6e
buttercup-pw/buttercup-core,buttercup-pw/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core
tests/WestleyTests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nexport const compiler = false\nexport const minifier = false\nexport function process(contents) {\n const chunks = contents.split(/\\r?\\n/)\n if (chunks[chunks.length - 1] !== '') {\n chunks.push('')\n }\n return ...
javascript
edit
0
11
mit
1d8de6175eb5405f3e1d316cb8ba65f70791f45f
steelbrain/ucompiler-plugin-rollup
src/main.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Server from './server';\nimport Client from './client';\n\nconst debug = require('debug')('tinylr');\n\n// Need to keep track of LR servers when notifying\nconst servers = [];\n\nexport default tinylr;\n\n// Expose Server / Clien...
javascript
edit
0
3
mit
7b7f5012a087f4454f81cecd1f7292d655265cdb
mklabs/tiny-lr
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar shimmer = require('shimmer')\nvar modules = require('./instrumentation/modules')\n\nmodule.exports = function (client) {\n if (!client._ff_instrument) return\n\n // TODO: This will actual just use the logger of the...
javascript
edit
0
3
bsd-2-clause
6f6df7a1cdda9445ac32813d77b5aadd09664f17
opbeat/opbeat-node,opbeat/opbeat-node
lib/hooks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n define([\n 'base/class',\n 'jquery',\n 'underscore',\n 'base/utils'\n ], function(Class, $, _, Util) {\n\n var LocalJSONReader = Class.extend({\n\n init: function(basepath) {\n this.data = [];\n ...
javascript
edit
0
2
bsd-3-clause
64e7f7f2eef87d86393077ebab953c8954cccd0b
homosepian/vizabi,Gapminder/vizabi,acestudiooleg/vizabi,jdk137/vizabi,sergey-filipenko/vizabi,maximhristenko/vizabi,maximhristenko/vizabi,Gapminder/vizabi,vizabi/vizabi,alliance-timur/vizabi,buchslava/vizabi,logicerpsolution/vizabi,buchslava/vizabi,alliance-timur/vizabi,Rathunter/vizabi,dab2000/vizabi,Rathunter/vizabi,...
src/data-reader/local-json.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * isAuthenticated\n * @description :: Policy that inject user in `req` via JSON Web Token\n */\n\nvar passport = require('passport');\n\nmodule.exports = function (req, res, next) {\n passport.authenticate('jwt', function (error,...
javascript
edit
0
4
mit
0458137ee581e7b9ae4b63496c760fd964099271
konstantinzolotarev/generator-trails,italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,tnunes/generator-trails,italoag/generator-sails-rest-api,eithewliter5518/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,IncoCode/generator-sails-rest-api,jaumard/generator-trails
generators/app/templates/api/policies/isAuthenticated.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint -W117, -W030 */\ndescribe('dataservice', function() {\n beforeEach(function() {\n bard.appModule('app.core');\n bard.inject('$http','$httpBackend','$q','dataservice','$rootScope');\n });\n\n it('exists' , function(){\...
javascript
edit
0
2
mit
9d33aca502e70c3da99a66c98ce54e109dc336e0
bitclaw/angularjs-testing,bitclaw/angularjs-testing
src/client/app/core/dataservice.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Trigger resize event to relayout the React Layout plugin\n\nexport default function resizeLayout() {\n return next => action => {\n next(action)\n if (\n action.type === 'ENABLE_PRESENTATION_MODE' ||\n action.type ==...
javascript
edit
0
4
mit
91db0045d899443f5c18c0dc42b51b679abe3aa4
mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdata/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/inf...
ui/src/shared/middleware/resizeLayout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react';\n\nimport Icon from './Icon';\n\nclass CollapsibleContainer extends Component {\n constructor() {\n super(...arguments);\n\n this.state = {\n toggle: false\n };\n this.toggleCont...
javascript
edit
0
2
apache-2.0
7464095a8f29a8e7630ac518a34c74ff1ed75c49
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
src/js/components/CollapsibleContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\nvar sasslint = require('gulp-sass-lint');\nvar sourcemaps = require('gulp-sourcemaps');\nvar rename = require('gulp-rename');\nvar header = require('gulp-header');\n\nvar pk...
javascript
edit
0
1
mit
1f1dfbc27a77fed2844a128c5dc38b1ffad3bab6
TMG-88/TAH,TMG-88/TAH,TMG-88/hello-world,TMG-88/hello-world
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n scenarios: [\n {\n name: 'default',\n dependencies: { }\n },\n {\n name: 'ember-release',\n dependencies: {\n 'ember': 'components/ember#release',\n 'ember-data': 'compone...
javascript
edit
0
0
mit
45b60408828c430d18a470c16d3c3ac3557d5fc1
emberjs/ember-data-fixture-adapter,emberjs/ember-data-fixture-adapter
config/ember-try.js
rejected_duplicate
Near-duplicate of sample 76064
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\"\nimport TopBarProgressIndicator from \"react-topbar-progress-indicator\"\n\nimport styles from \"./index.css\"\n\nTopBarProgressIndicator.config({\n barColors: {\n \"0\": \"#0085a1\",\n ...
javascript
edit
0
1
mit
dd89728416e7078caf39b7dcb3182ab30d52e594
thangngoc89/blog
web_modules/layouts/PageLoading/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils/native-class' );\nvar RE = require( '@stdlib/regexp/function-name' );\nvar isBuffer = require( '@stdlib/assert/is-buffer' );\n\n\n// MAIN //\n\n/**\n* Determine...
javascript
edit
0
6
apache-2.0
0b148e268b8922d100d51e8bd5703b976955ed2b
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/constructor-name/lib/constructor_name.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nclass CustomerIoEvent {\n constructor(id, name, data) {\n this.id = id;\n this.name = name;\n this.data = data;\n }\n\n getId() {\n return this.id;\n }\n\n getName() {\n return this.name;\n }\n\n g...
javascript
edit
0
1
mit
071b13d9b044fd09d31f3d3f5c4d7f7c2385a793
DoSomething/blink,DoSomething/blink
src/models/CustomerIoEvent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n $(\"a.up-vote-answer\").click(function(event) {\n event.preventDefault();\n var $target = $(event.target);\n console.log($target.data(\"url\"))\n $.ajax({\n type: \"post\",\n...
javascript
edit
0
1
mit
dbfc34db0f4413c10205357ed423b244827c6388
lucasrsantos1/lucky-ambassador,lucasrsantos1/lucky-ambassador,lucasrsantos1/lucky-ambassador
shaq_overflow/app/assets/javascripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport moment from 'moment';\nimport getPetitionEndDate from 'selectors/petitionEndDate';\n\nexport default ({ created, expires }, timeNow) => {\n const endDate = getPetitionEndDate({ created, expires });\n const nowDate = timeNow || ...
javascript
edit
0
1
apache-2.0
3cbedcf697029d844f472c6d2503f47edee6506d
iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend
src/helpers/getPetitionDaysRemaining.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst fs = require(\"fs\");\nconst packageJsonPath = \"./package.json\";\nconst packageJson = require(packageJsonPath);\nconst configurationSchema = require(\"./node_modules/markdownlint/schema/markdownlint-config-sch...
javascript
edit
0
0
mit
aa31895f622ad0beebda72284ff76d7971edaf3a
DavidAnson/vscode-markdownlint
generate-config-schema.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nconst isValidTargetOrigin = require(\"../utils\").isValidTargetOrigin;\nconst DOMException = require(\"../web-idl/DOMException\");\n\nmodule.exports = function (message, targetOrigin) {\n if (arguments.length < 2) {\n ...
javascript
edit
0
5
mit
fa74ef9e2294c798743d689d30fd8aa6138a2e44
mzgol/jsdom,Zirro/jsdom,Zirro/jsdom,mzgol/jsdom,mzgol/jsdom,tmpvar/jsdom,tmpvar/jsdom,snuggs/jsdom,snuggs/jsdom
lib/jsdom/living/post-message.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.assertion = function () {\n\n this.message = 'Page loaded with no errors.';\n\n this.expected = [];\n\n this.pass = function (result) {\n\n return result && result.length === 0;\n };\n\n this.failure = fun...
javascript
edit
0
3
apache-2.0
c442ad739f2b65e5a62b7c4e6579a10ab5d34004
junbon/binary-static-www2,borisyankov/binary-static,massihx/binary-static,borisyankov/binary-static,brodiecapel16/binary-static,massihx/binary-static,massihx/binary-static,junbon/binary-static-www2,einhverfr/binary-static,borisyankov/binary-static,animeshsaxena/binary-static,brodiecapel16/binary-static,tfoertsch/binary...
test/integration/assertions/noJsErrors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//@flow\nimport React from 'react'\nimport { Route, IndexRoute } from 'react-router'\nimport App from './App'\n\nif (process.env.NODE_ENV === 'development' || typeof require.ensure === 'undefined') require.ensure = (undefined, fc) => fc...
javascript
edit
0
1
mit
777ca8757c04561f0bd0c3ad17e43ad384424504
MrEfrem/TestApp,MrEfrem/TestApp
src/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar NotificationComponent = Ember.Component.extend({\n classNames: ['js-bb-notification'],\n\n typeClass: function () {\n var classes = '',\n message = this.get('message'),\n type,\n dismiss...
javascript
edit
0
4
mit
aea16e7ef4aa2fe11d282a2dabfbf73ade85fe31
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
ghost/admin/components/gh-notification.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar angularMeteorUser = angular.module('angular-meteor.user', ['angular-meteor.utils']);\n\nangularMeteorUser.run(['$rootScope', '$meteorUtils', function($rootScope, $meteorUtils){\n var currentUserDefer;\n\n $meteorUtils.autorun($roo...
javascript
edit
0
5
mit
cfeb83d35a957a433362e8eed762c0e364cb4d6e
shankarregmi/angular-meteor,Wanderfalke/angular-meteor,davidyaha/angular-meteor,Urigo/angular-meteor,evanliomain/angular-meteor,manhtuongbkhn/angular-meteor,nweat/angular-meteor,efosao12/angular-meteor,IgorMinar/angular-meteor,idanwe/angular-meteor,omer72/angular-meteor,eugene-d/angular-meteor,ahmedshuhel/angular-meteo...
modules/angular-meteor-user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tape = require(\"tape\"),\n jsdom = require(\"jsdom\"),\n d3 = Object.assign(\n require(\"../\"),\n require(\"d3-selection\")\n );\n\n// An example component.\nfunction Paragraph(){\n return function (context, d)...
javascript
edit
0
1
bsd-3-clause
23b4df8733dd31415a3053b8f8625144b259894c
curran/d3-component
test/component-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Reverse Array In Place\n\n/*RULES:\n Take array as parameter\n Reverse array\n Return reversed array\n\n NOTES:\n Can't create new empty array to push in\n Must modify given array\n Can't use array.reverse();\n*/\n\n/*PSEU...
javascript
edit
0
2
mit
50fbcfd21058af009584b41cfd543c98b38ccb5a
benjaminhyw/javascript_algorithms
reverse-array-in-place.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar utils = require('../utils')\n , selfClosing = require('void-elements')\n\nmodule.exports = function () {}\n\nmodule.exports.prototype =\n { name: 'validateSelfClosingTags'\n\n , configure: function (options) {\n\n utils.vali...
javascript
edit
0
3
isc
c847d07a1d096750b9188a0969795c65afa859f5
benedfit/jade-lint,pugjs/jade-lint,pugjs/pug-lint,benedfit/jadelint
lib/rules/validate-self-closing-tags.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst CommonModel = require('../common/model.js');\n\nclass ServerModel extends CommonModel {\n constructor(validator, messenger, dbStorage, config, jwt) {\n super(validator, messenger);\n\n this.db = dbStorage;\...
javascript
edit
0
2
mit
c8ed1fb00519c3a0c42739476e07ad632bba86c0
scola84/node-auth
lib/server/model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ModalDialog from 'ghost/components/gh-modal-dialog';\nimport upload from 'ghost/assets/lib/uploader';\n\nvar UploadModal = ModalDialog.extend({\n layoutName: 'components/gh-modal-dialog',\n\n didInsertElement: function () {...
javascript
edit
0
2
mit
e31c5e39f3775e2278f7bdb1b8e4de919c97266e
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
ghost/admin/components/gh-upload-modal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['underscore', 'backbone', 'jquery'], function(_, Backbone, $) {\n\t'use strict';\n\n\tvar $navigatorBtn = $('.caption .controls button.navigator');\n\tvar $navigatorOverlay = $('.navigator-overlay');\n\n\treturn Backbone.View.ex...
javascript
edit
0
1
mit
028e456ff191d013c3cf48fcaaa106e11348c5c2
nuclearwingsclan/skymaps,asleepwalker/skymaps,asleepwalker/skymaps,nuclearwingsclan/skymaps
src/js/views/controls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar encoders = require('../lib/encoders');\nvar fixtures = require('./fixture/server');\n\ndescribe('encoders', function () {\n describe('thumbprint', function () {\n it('should return the thumbprint...
javascript
edit
0
1
mit
414958ef0ee5d48d7f823517976493a2b237d2f3
auth0/node-wsfed,auth0/node-wsfed
test/encoders.tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as selectors from '../src/selectors'\n\ndescribe('selectors', () => {\n it('includes selector to get session data', () => {\n const state = {\n session: {\n data: { token: 'abcde' }\n }\n }\n\n const ...
javascript
edit
0
1
mit
03b3bd619dcf68fbba409fa6de788d2e02f4c0ca
jerelmiller/redux-simple-auth
test/selectors.spec.js
rejected_duplicate
Near-duplicate of sample 74967
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require(\"lodash\");\nvar Q = require(\"q\");\nvar fs = require(\"./fs\");\nvar shellescape = require('shell-escape');\nvar spawn = require('spawn-cmd').spawn;\n\nvar links = require(\"./links\");\n\n// Convert a svg file\nvar c...
javascript
edit
0
3
apache-2.0
05a0de2d8680c92a40739027bd15a19c205d1f80
haamop/documentation,jocr1627/gitbook,hongbinz/gitbook,hujianfei1989/gitbook,athiruban/gitbook,switchspan/gitbook,haamop/documentation,bradparks/gitbook,gencer/gitbook,palerdot/gitbook,grokcoder/gitbook,sunlianghua/gitbook,sunlianghua/gitbook,jasonslyvia/gitbook,xxxhycl2010/gitbook,kamyu104/gitbook,webwlsong/gitbook,su...
lib/utils/images.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { app, BrowserWindow } from 'electron';\n\nlet mainWindow = null;\n\napp.on('window-all-closed', () => {\n if (process.platform != 'darwin') {\n app.quit();\n }\n});\n\napp.on('ready', () => {\n mainWindow = new BrowserWind...
javascript
edit
0
2
mit
af861de8c276b56babd2d978e2a1bc2950115ff5
cassidoo/todometer,jdebarochez/todometer,jdebarochez/todometer,cassidoo/todometer
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { Table } from 'react-bootstrap';\nimport { List } from 'immutable';\nimport moment from 'moment';\nimport HeaderRow from './HeaderRow';\n\nfunction HeaderDisplay(props) {\n let headers...
javascript
edit
0
1
mit
8de090891a3492729fbb74b94fb28740c7143428
alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst
src/components/loggertrace/HeaderDisplay.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('<%=angularAppName%>')\n .controller('HomeController', function ($scope, Principal, LoginService) {\n function getAccount() {\n Principal.identity().then(function(account) {\n ...
javascript
edit
0
1
apache-2.0
516e2ca05aefe603e3ad2bbff272af1e2506d339
danielpetisme/generator-jhipster,atomfrede/generator-jhipster,nkolosnjaji/generator-jhipster,ruddell/generator-jhipster,hdurix/generator-jhipster,eosimosu/generator-jhipster,liseri/generator-jhipster,maniacneron/generator-jhipster,PierreBesson/generator-jhipster,atomfrede/generator-jhipster,yongli82/generator-jhipster,...
generators/client/templates/src/main/webapp/app/home/_home.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nconst CONSUMER = 'Consumer';\nconst NON_CONSUMER = 'Non Consumer';\nconst days = (date: number) => date / 1000 / 60 / 60 / 24;\n\nconst ConsumerParty = {\n type: 'Consumer',\n name: 'Consumer',\n};\n\n\nfunction partyTy...
javascript
edit
null
null
mit
86222918e01b9ab91b8a14c2c8990857b944f953
LevelPlayingField/levelplayingfield,LevelPlayingField/levelplayingfield
src/routes/case/utils.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n\ngrunt.initConfig({\n\n\t\tpkg: grunt.file.readJSON('package.json'),\n\n\t\t//JS Source files\n\t\tsrc: {\n\t\t\tjs: ['app/js/**/*.js']\n\t\t},\n\t\t//JS Test files\n\t\ttest: {\n\t\...
javascript
edit
0
1
mit
5bae5495c6e2518bb71ada45cc80fc98cbe94623
joetravis/angular-grunt-karma-coverage-seed
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = require('./load-image')\n\nrequire('./load-image-meta')\nrequire('./load-image-exif')\nrequire('./load-image-exif-map')\nrequire('./load-image-orientation')\n\n```\n\nApply this change: Include the scale and fetch plugi...
javascript
edit
0
0
mit
57e634af79738c46b25df71a12282763721a072c
blueimp/JavaScript-Load-Image,blueimp/JavaScript-Load-Image
js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('worldOfWorkCraftApp')\n .controller('LogAchievementCtrl', function($scope, $routeParams, $location, $http, UserData) {\n\n $scope.challengeName = $routeParams.challengeName;\n\n // TODO replace with real service e...
javascript
edit
0
1
mit
84e9e1957356f730aa78632971cfaa7c1b16eaef
StevenACoffman/WorldOfWorkCraft,StevenACoffman/WorldOfWorkCraft
app/scripts/controllers/logachievement.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Pulsar\n *\n * Core UI components that should always be present.\n *\n * Jadu Ltd.\n */\n\n// Fixes issue with dependencies that expect both $ and jQuery to be set\nwindow.jQuery = window.$ = require('jquery');\n\n// Global UI c...
javascript
edit
0
0
mit
a8ed7c84080df374058353ea93f404a203d8a6b7
jadu/pulsar,jadu/pulsar,jadu/pulsar
js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nVideoStream.utils.loadFileFromURL = function(file, dir = '.'){\r\n\tif(!file){\r\n\t\treturn new Promise(function(resolve){resolve('');});\r\n\t}\r\n\tvar path = file;\r\n\tif(file.startsWith('/') == false && file.startsWith(/http(s):\\...
javascript
edit
0
6
apache-2.0
f4f9703afebfcb51bb6a7905b930feef160f41aa
2b2/video-stream.js
src/utils/file-loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies\n */\n\n// Node.js core.\nconst path = require('path');\n\n// Public node modules.\nconst _ = require('lodash');\n\n/**\n * i18n hook\n */\n\nmodule.exports = function (strapi) {\n const hoo...
javascript
edit
0
3
mit
5e92ba10682c5e3419fd21c9f3e57a315c1e1e38
lucusteen/strap,skelpook/strapi,evian42/starpies,lucusteen/strap,skelpook/strapi,wistityhq/strapi,evian42/starpies,evian42/starpies,wistityhq/strapi,skelpook/strapi,lucusteen/strap
lib/configuration/hooks/i18n/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (global) {\n 'use strict';\n\n var app = global.app = global.app || {};\n \n var fixViewResize = function () {\n \n if (device.platform === 'iOS') {\n setTimeout(function() {\n ...
javascript
edit
0
4
bsd-2-clause
0d23116dc716585310a41cbd083988406d1013b0
telerik/backend-services-push-hybrid-advanced,telerik/backend-services-push-hybrid-advanced
backend-services-push-hybrid-advanced/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n 'use strict';\n grunt.initConfig({\n echo: {\n one: { message: 'one has changed' },\n two: { message: 'two has changed' },\n wait: { message: 'I waited 2s', wait: 2000 },\n i...
javascript
edit
0
1
mit
47aefc0b32b1c008fb7cb2798b02cc7571d82380
testcodefresh/grunt-contrib-watch,testsUser/1428079884569,Ariel-Isaacm/grunt-contrib-watch,chemoish/grunt-contrib-watch,mobify/grunt-contrib-watch,Rebzie/grunt-contrib-watch,gruntjs/grunt-contrib-watch,JimRobs/grunt-chokidar,RealSkillorg/1427451101848,testsUser/1428079877839,yuhualingfeng/grunt-contrib-watch,chrisirhc/...
test/fixtures/multiTargets/Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport ServiceCacheMixin from '../../../mixins/service-cache';\nimport { module, test } from 'qunit';\n\nmodule('Unit | Mixin | service cache');\n\n// Replace this with your real tests.\ntest('it works', func...
javascript
edit
0
1
mit
a08e21fb52b0c46b8b90221719fb54c56f06d317
Rahien/ember-jsonapi-resources,pixelhandler/ember-jsonapi-resources,kmkamruzzaman/ember-jsonapi-resources,greyhwndz/ember-jsonapi-resources,proteamer/ember-jsonapi-resources,rwjblue/ember-jsonapi-resources,Rahien/ember-jsonapi-resources,greyhwndz/ember-jsonapi-resources,proteamer/ember-jsonapi-resources,pixelhandler/em...
tests/unit/mixins/service-cache-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { inject, bindable, bindingMode } from 'aurelia-framework';\nimport { EventAggregator } from 'aurelia-event-aggregator';\n\n@inject(EventAggregator)\nexport class LlLinks {\n @bindable({ defaultBindingMode: bindingMode.twoWay ...
javascript
edit
0
3
mit
dec57486ad76b180f7bd4c1e4541d046677addcf
GETLIMS/LIMS-Frontend,GETLIMS/LIMS-Frontend
src/projects/ll-links.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar test = require('ava');\nvar githubRepos = require('./');\n\ntest('user with more than 100 repos', function (t) {\n\tt.plan(2);\n\tvar token = '523ef691191741c99d5afbcfe58079bfa0038771';\n\n\tgithubRepos('kevva', {to...
javascript
edit
0
1
mit
41c4f7f557aa24983a6367a715bdfcc3f4e7ff78
forivall/github-repositories,kevva/github-repositories
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n/* @flow */\nimport { serve } from 'aspect/src/adapters/server'\n\nasync function run(): Promise<void> {\n const server = await serve({\n port: 'PORT' in process.env ? Number(process.env.PORT) : null\n })\n co...
javascript
edit
null
null
mit
1999ff53d63ec55759b6ccb9109904a467585aa9
vinsonchuong/aspect,vinsonchuong/aspect
src/adapters/cli/serve.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst merge = require('../../../util/merge');\nconst {coroutine: co} = require('bluebird');\n\nclass Renderable {\n constructor(data) {\n this.parent = undefined;\n this.data = data || {};\n this.id = this.c...
javascript
edit
0
4
mit
264e9a53b02f983f2131123eb02a2c17b37bf3b8
coreyp1/defiant,coreyp1/defiant
lib/plugin/theme/renderable/renderable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport {Button} from 'react-bootstrap';\n\nclass DeleteAccountForm extends Component {\n constructor(props) {\n super(props);\n this.state = {\n displayDeleteAccount...
javascript
edit
0
2
mit
8c12936d9664b80716344c8f7e389cf2efcefeb7
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
frontend/src/components/chat/navigation/DeleteAccountForm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\nconst pkg = require('../package.json');\n\nconst buildDir = path.resolve(__dirname, '../build/ol');\n\n// update the version number in util.js\nconst utilPath = path.join(buildDi...
javascript
edit
0
0
bsd-2-clause
4cdab30201d079b0b7112c14ec56615e94155692
geekdenz/openlayers,ahocevar/openlayers,stweil/ol3,adube/ol3,mzur/ol3,oterral/ol3,tschaub/ol3,ahocevar/openlayers,bjornharrtell/ol3,fredj/ol3,geekdenz/ol3,geekdenz/openlayers,stweil/openlayers,ahocevar/ol3,oterral/ol3,fredj/ol3,mzur/ol3,tschaub/ol3,oterral/ol3,openlayers/openlayers,stweil/openlayers,tschaub/ol3,geekden...
tasks/prepare-package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n *\n * IntersectionParams.js\n *\n * copyright 2002, Kevin Lindsey\n *\n */\n\n/**\n * IntersectionParams\n *\n * @param {String} name\n * @param {Array<Point2D} params\n * @returns {IntersectionParams}\n */\nfunction Inter...
javascript
edit
0
1
bsd-3-clause
da007b0590fb4540bc1c8b5d32a140ef57ccf720
Quazistax/kld-intersections,effektif/svg-intersections
lib/IntersectionParams.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2017 The Regents of the University of Michigan.\n// All Rights Reserved. Licensed according to the terms of the Revised\n// BSD License. See LICENSE.txt for details.\n\nconst processTree = require(\"../lib/process-tree\...
javascript
edit
0
1
bsd-3-clause
aaaa6b05c25c3cd7c24d54bfbf906ee77f109f90
daaang/awful-mess
spec/process-tree.spec.js
rejected_duplicate
Near-duplicate of sample 96207
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar scrollingExample = {\n box: {\n id: \"clip\",\n className: \"clip\",\n children: {\n id: \"image\",\n className: \"image\"\n }\n },\n constraints: [\n \"clip.left == ...
javascript
edit
0
0
apache-2.0
cc345fd8262974e3cc192c71199c6555d06bb161
iamralpht/slalom,iamralpht/slalom,iamralpht/slalom
examples/2DScrolling/2DScrolling.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst assert = require(\"power-assert\");\nconst rimraf = require(\"rimraf\");\nconst unzip = require(\"unzip\");\nconst gitDiffArchive = require(\"../\");\n\nconst ID1 = \"\";\nconst ID2 = \"\";\nconst OUTPUT_DIR = `...
javascript
edit
0
2
mit
8bda805d45b23c5c46988acf2d27863b0ed4092a
tsuyoshiwada/git-diff-archive
test/git-diff-archive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('pingPong', function() {\n it(\"is true for a number that is divisible by 3\", function() {\n expect(pingPong(6)).to.equal(true);\n });\n it(\"is true for a number that is divisible by 5\", function() {\n expect(pingPo...
javascript
edit
0
1
mit
de2fb2c260720ae3142066f2a3b611b7ba922af6
kcmdouglas/pingpong,kcmdouglas/pingpong
spec/specs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n\t@autor: Robin Giles Ribera\n\t* Module: TrackNetwork\n\t* Used on trackevent.js\n*/\n\ndefine( [], function() {\n\tconsole.log(\"[TrackNetwork][***###***]\");\n\n\tfunction TrackNetwork() {\n\n\t\tthis.drawLine = function() {\n\t\...
javascript
edit
0
3
mit
7c2a06e6f1d47874b9e394aec4383f5c3a066ab4
robinparadise/videoquizmaker,robinparadise/videoquizmaker
public/src/core/track-network.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['base'], function (base) { \"use strict\";\n\tvar math = base.math;\n\t\n\tdescribe(\"math\", function () {\n\t\tit(\".factorial()\", function () {\n\t\t\texpect(typeof math.factorial).toBe('function');\n\t\t\t[[0,1], [1,1], [2...
javascript
edit
0
4
mit
edb127f1c41dfb84bcb367cf4076cb25bda52727
LeonardoVal/creatartis-base,LeonardoVal/creatartis-base
tests/specs/math.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'standard-minifier-css',\n version: '1.3.3-beta.1',\n summary: 'Standard css minifier used with Meteor apps by default.',\n documentation: 'README.md'\n});\n\nPackage.registerBuildPlugin({\n name: \"minif...
javascript
edit
0
1
mit
af100fdb60b7d5bce620249be4a6370d345071e1
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
packages/standard-minifier-css/package.js
rejected_duplicate
Near-duplicate of sample 85238
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Demo components.\nimport \"./src/CalendarDayMoonPhase.js\";\nimport \"./src/CarouselComboBox.js\";\nimport \"./src/CountryListBox.js\";\nimport \"./src/CustomCarousel2.js\";\nimport \"./src/CustomDrawer.js\";\nimport \"./src/FocusVis...
javascript
edit
0
0
mit
7b02cbde4f8e6118597e940cbc332251a86199b9
JanMiksovsky/elix,elix/elix,JanMiksovsky/elix,elix/elix
demos/demos.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global slimer */\n\nvar webpage = require(\"webpage\").create();\nvar messages = [];\n\nvar system = require(\"system\");\nvar args = system.args;\n\nvar url = args[1] || \"\";\nvar thumbPath = args[2] || \"\";\n\nwebpage.onConsoleMes...
javascript
edit
0
1
mit
7ffa7a9528767ff915e1179e7e6dd7eec66e5afc
variablestudio/pex-examples,pex-gl/pex-examples
utils/slimer-script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar QuestionCtrl = require('../controllers/questionCtrl.js');\n\nmodule.exports = function(express, app){\n var router = express.Router();\n\n router.post('/', QuestionCtrl.create);\n router.get('/', QuestionCtrl.get);\n\n router.pu...
javascript
edit
0
1
mit
4d39b6e4e1334d571e8e03823740a7b5f8ebf218
EasyAce-Edu/easyace-api
routes/questionRoute.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Initialization code for the profile page. Currently, this just loads the necessary\n * modules and puts the profile module on the global context.\n *\n*/\nvar $ = require('jquery');\nvar m = require('mithril');\n\nrequire('../pr...
javascript
edit
0
2
apache-2.0
9c1345b65035216149de35a8959fd6d086c65d44
TomBaxter/osf.io,icereval/osf.io,aaxelb/osf.io,CenterForOpenScience/osf.io,adlius/osf.io,Johnetordoff/osf.io,TomBaxter/osf.io,cslzchen/osf.io,caseyrollins/osf.io,crcresearch/osf.io,HalcyonChimera/osf.io,baylee-d/osf.io,binoculars/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,felliott/osf.io,aaxelb/osf.io,erinspace/osf.io,...
website/static/js/pages/profile-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar request = require('request').defaults({ encoding: null });\nvar url = require('url');\n\nvar h = {\n 'Referer': null,\n 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q...
javascript
edit
0
3
mit
da316224e7a440d30c944a0ecd17e65e1d7528d9
jillesme/ng-movies
api/image.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar StoreWatchMixin = function(stores, options) {\n if (!options) options = {};\n\n options.addListenerFnName = options.addListenerFnName || 'addChangeListener';\n options.removeListenerFnName = options.removeListenerFnName || 'rem...
javascript
edit
0
5
mit
9cea73194d1274f475fae552ba1cf2ac7a2a4ded
rafaelchiti/flux-commons-store-watch-mixin
dist/store_watch_mixin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Bikeshed model\n */\nimport Joi from 'joi'\nimport * as utils from './utils'\n\nexport const INDEXES = ['userId', 'createdAt']\nexport const TABLE = 'bikesheds'\nexport const TYPE = 'Bikeshed'\n\nexport const FileListItemSchema ...
javascript
edit
0
0
apache-2.0
87f37e3b1f94aaae56ae59dfd775f08abe15f7bc
cesarandreu/bshed,cesarandreu/bshed
server/models/bikeshed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nMarketingController = RouteController.extend({\n waitOn: function () {\n return Meteor.subscribe('marketing');\n },\n\n action: function () {\n var indexPage = Pages.findOne();\n if (indexPage) {\n Router.go('pages.show...
javascript
edit
0
3
mit
66db7e0c65a87a3b5a613b39b0cb9fc093e67609
bojicas/letterhead,bojicas/letterhead
client/controllers/marketing/marketing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst nodeExternals = require('webpack-node-externals');\nconst path = require('path');\n\nconst entry = './src/ReactResponsiveSelect.js';\nconst library = 'ReactResponsiveSelect';\nconst module = {\n rules: [{\n test: /\\.js$/,\n ...
javascript
edit
0
0
mit
8a13fac752a4eb37f7b28a7baa938b5228bb9d6b
benbowes/react-responsive-select,benbowes/react-responsive-select,benbowes/react-responsive-select
webpack.config.react-responsive-select.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = process.cwd();\n\nmodule.exports = function (app) {\n\n\tapp.route('/')\n\t\t.get(function (req, res) {\n\t\t\tres.sendFile(path + '/public/index.html');\n\t\t});\n\t\t\n\tapp.route('/:time')\n\t\t.get(functi...
javascript
edit
0
3
mit
98512d9d51ab29b6bf9cf57a90958adc31ddc2a3
paperbagcorner/timestamp-microservice,paperbagcorner/timestamp-microservice
app/routes/index.js
rejected_duplicate
Near-duplicate of sample 75501
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/bin/node\nimport path from 'path';\nimport fs from 'fs';\n\nimport {all as rawMetadata} from '../katas/es6/language/__raw-metadata__';\n\nimport {writeToFileAsJson} from './_external-deps/filesystem';\nimport MetaData from './metadat...
javascript
edit
0
1
mit
5eb79eb1492fdf3bd759bf7c04a57d516ad0581f
tddbin/katas,tddbin/katas,tddbin/katas
src/deploy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n 'use strict';\n\n grunt.initConfig({\n less: {\n development: {\n options: {\n paths: ['velvet']\n },\n files: {\n 'build/style.css': 'velvet/velvet.l...
javascript
edit
0
1
bsd-3-clause
0fc6b9922db01d3c4d71f51120bdbcb2c52df489
sourrust/velvet
Gruntfile.js
rejected_duplicate
Near-duplicate of sample 94796
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg : grunt.file.readJSON('package.json'),\n\n jshint: {\n files: ['Gruntfile.js', '<%= pkg.name %>.js'],\n options: {\n globals: {\n ...
javascript
edit
0
1
mit
67a700f507d46e2b5d6ef3e6c61a747ccfd43db5
premasagar/pablo,premasagar/pablo
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = (grunt) => {\n // Grunt configuration\n grunt.initConfig({\n ghostinspector: {\n options: {\n apiKey: 'ff586dcaaa9b781163dbae48a230ea1947f894ff'\n },\n test1: {\n suites: ['53cf58c0350c...
javascript
edit
0
1
mit
4711c3aab32f24ab4ab1dcdf9ed59f76ece562b1
ghost-inspector/grunt-ghost-inspector
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint node: true, sloppy: true */\n\nmodule.exports = function (grunt) {\n\n grunt.initConfig({\n\n inlineEverything: {\n\n simpleExample: {\n\n options: {\n tags: {\n ...
javascript
edit
0
1
mit
641aa2bdbffc43c70f037ecf50940c4e8905e485
vrabcak/czemaco,vrabcak/czemaco,vrabcak/czemaco
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);\n grunt.initConfig({\n mdlint: {\n pass: ['README.md'],\n fail: ['test/fixtures/*.md']\n },\n simplemocha: ...
javascript
edit
0
1
mit
c1898593b80c25df9d2a8319ea83741da7e6979b
ChrisWren/grunt-mdlint
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { parseRawCommit } = require('conventional-changelog/lib/git')\n\nmodule.exports = function (pluginConfig, {commits}, cb) {\n let type = null\n\n commits\n\n .map((commit) => parseRawCommit(`${commit.hash}\\n${commit.message}`)...
javascript
edit
0
5
mit
8879ea7b095f94dcdca49eb199dda4d78906c554
matreshkajs/matreshka,matreshkajs/matreshka,finom/matreshka,finom/matreshka
tools/commit-analyzer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @author jimbo00000\n */\n\nTHREE.InstancedGeometryExporter = function () {};\n\nTHREE.InstancedGeometryExporter.prototype = {\n\n\tconstructor: THREE.InstancedGeometryExporter,\n\n\tparse: function ( geometry ) {\n\n\t\tvar outp...
javascript
edit
0
3
mit
1fbf265beb5d1c1c63a3ac19c13598e14d6735fb
jimbo00000/Shmiltbrush,jimbo00000/Shmiltbrush
js/exporters/InstancedGeometryExporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\napp.controller('MainController', ['$rootScope', '$scope', '$http', 'growl',\n function($rootScope, $scope, $http, growl) {\n\n // UI\n\n $scope.is_admin = function() {\n return $rootScope.current_user && $ro...
javascript
edit
0
2
mit
5e00fba2922bfc0d67bc7943e2fa0b0ca69ecff2
nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend,nyddogghr/SixQuiPrend
sixquiprend/static/js/main_controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require ./core\n\n(function () {\n\"use strict\";\n\nvar __callbacks = [];\n\nMarbles.Dispatcher = {\n\tregister: function (callback) {\n\t\t__callbacks.push(callback);\n\t\tvar dispatchIndex = __callbacks.length - 1;\n\t\treturn di...
javascript
edit
0
1
bsd-3-clause
c77addad3e26ad040945acccf603d2937d66a0b1
jvatic/marbles-js,jvatic/marbles-js
src/marbles/dispatcher.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = function (grunt) {\n grunt.loadNpmTasks(\"grunt-contrib-uglify\");\n\n grunt.initConfig({\n uglify: {\n options: {\n report: \"gzip\"\n },\n ...
javascript
edit
0
1
mit
ca5297ae6808f336bb3d468db71410fb1b6e5dad
harks198913/q,ajunflying/q,Zeratul5/q,STRd6/q,liwangbest/q,darkdragon-001/q,miamarti/q,willsmth/q,ShopCo/q,potato620/q,behind2/q,dracher/q,criferlo/q,IbpTeam/node-q,bnicart/q,cgvarela/q,gustavobeavis/q,100star/q,X-Bird/q,lidasong2014/q,npmcomponent/techjacker-q,rasata/q,gorcz/q,darkdragon-001/q,gustavobeavis/q,liwangbe...
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Duolingo Comment Links\n// @description Turn comment timestamps into direct links\n// @match *://www.duolingo.com/*\n// @author HodofHod\n// @namespace HodofHod\n// @version 0.0....
javascript
edit
0
1
mit
f3bce3e7938f28c0dd6471ea8bbca5cecab44052
HodofHod/Userscripts
duo-comment-links.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n\t// Project configuration.\n\tgrunt.initConfig({\n\t\tpkg: grunt.file.readJSON('package.json'),\n\t\tless: {\n\t\t\toptions: {\n\t\t\t\tieCompat: true,\n\t\t\t\tstrictImports: false,\n\t\t\t\tsyncI...
javascript
edit
0
1
mit
2204420c74660dd00cf12e1a4e063374d5a9ffff
fluffels/calendar,slventures/calendar,fgaudencio/bootstrap-calendar,davidBearinTokyo/bootstrap-calendar,nagyistoce/bootstrap-calendar,PHPro-grammer/bootstrap-calendar,fgaudencio/bootstrap-calendar,ProfFan/bootstrap-calendar,yekg880809/bootstrap-calendar,slventures/calendar,PHPro-grammer/bootstrap-calendar,primaapriansy...
Gruntfile.js
rejected_duplicate
Near-duplicate of sample 83612
true